issue-create: refuse bodies that skip the capture template #765

Closed
opened 2026-09-27 12:10:27 +00:00 by jared · 2 comments
Owner

Problem

On 2026-09-27 agents filed #753-#764 with os-backlog issue-create using an ad hoc Problem/Evidence/Fix/Origin body and no skeptic verdict. The CLI accepted every one of them. issue-create checks only for a ## Origin heading, a scope label, and one filed-by/* label. The capture SKILL.md's steps 1-3 (fill in the template, run the STE pass, pass the skeptic gate) are prose instructions only, so a subagent handed the command shape bypasses them.
This ticket absorbs #739: six tickets (#710 #711 #720-#723) reached the tracker with title "T" and body "## Origin\nB".

Reproduce

os-backlog issue-create --title "x" --body "## Problem\nx\n## Origin\nnone" --label plugin/os-backlog --label filed-by/agent

Today this creates an issue, though the body skips the template, the STE pass, and the skeptic gate.

Approach

issue-create refuses a body unless:

  1. the first heading is ## Problem;
  2. Origin contains Session:, Transcript:, and Where: lines;

  3. when the label set includes filed-by/agent, the body contains a VERDICT: CREATE line, or the caller passes --user-approved.
  4. the title has at least 8 characters.

Print which check failed, in the style of the existing scope-label refusal.
All checks, old and new, move into one Backlog::IssueCreate validator so one place names the failed check.

Required work:

  1. Add the ## Problem-first check to issue-create's body validation — check: os-backlog issue-create with a body not starting ## Problem refuses and names the failed check
  2. Add the Session:/Transcript:/Where: presence check to the ## Origin validation — check: a body with ## Origin missing any of the three lines refuses and names the failed check
  3. Add the VERDICT: CREATE / --user-approved check for filed-by/agent bodies — check: a filed-by/agent body with neither refuses and names the failed check
  4. Update capture SKILL.md step 4 text to describe the three new refusals
  5. Add the 8-character title minimum — check: --title T refuses and names the check.
  6. Move the existing scope, origin, and filed-by checks into Backlog::IssueCreate; give the existing gate tests compliant bodies.

Acceptance criteria

  1. Given a body that does not start with ## Problem, when issue-create runs, then it refuses and names that check.
  2. Given a body whose ## Origin section omits Session:, Transcript:, or Where:, when issue-create runs, then it refuses and names that check.
  3. Given a filed-by/agent body with no VERDICT: CREATE line and no --user-approved flag, when issue-create runs, then it refuses and names that check.
  4. Given a body that satisfies all three checks, when issue-create runs, then it creates the issue as before.
  5. Given a title shorter than 8 characters, when issue-create runs, then it refuses and names that check.
  6. Given the existing scope-label, origin, and filed-by gate tests, when the suite runs, then they pass with template-shaped bodies.

Owner sketch

class Backlog::IssueCreate
def validate_body!(body, labels:, user_approved:)
end
end

Origin

• Trigger: retrofit pass on #753-#764, 2026-09-27, coordinator-directed
• Improvised this session: none
• Chain: #753-#764 skip the capture template ← IMPROVISATION (a subagent filed issues directly with issue-create, bypassing the skill's prose-only template/STE/skeptic steps)
• Root candidate: this ticket
• Where: plugins/os-backlog/bin/os-backlog issue-create; plugins/os-backlog/skills/capture/SKILL.md
• Session: 8e4aac4f-9878-45da-ac68-c7d55261a73f
• Transcript: /tmp/claude-1000/-home-jared-dev-cc-os--claude-worktrees-crc-pass-os-sdlc/8e4aac4f-9878-45da-ac68-c7d55261a73f

## Problem On 2026-09-27 agents filed #753-#764 with os-backlog issue-create using an ad hoc Problem/Evidence/Fix/Origin body and no skeptic verdict. The CLI accepted every one of them. issue-create checks only for a ## Origin heading, a scope label, and one filed-by/* label. The capture SKILL.md's steps 1-3 (fill in the template, run the STE pass, pass the skeptic gate) are prose instructions only, so a subagent handed the command shape bypasses them. This ticket absorbs #739: six tickets (#710 #711 #720-#723) reached the tracker with title "T" and body "## Origin\nB". ## Reproduce os-backlog issue-create --title "x" --body "## Problem\nx\n## Origin\nnone" --label plugin/os-backlog --label filed-by/agent Today this creates an issue, though the body skips the template, the STE pass, and the skeptic gate. ## Approach issue-create refuses a body unless: 1. the first heading is ## Problem; 2. ## Origin contains Session:, Transcript:, and Where: lines; 3. when the label set includes filed-by/agent, the body contains a VERDICT: CREATE line, or the caller passes --user-approved. 4. the title has at least 8 characters. Print which check failed, in the style of the existing scope-label refusal. All checks, old and new, move into one Backlog::IssueCreate validator so one place names the failed check. Required work: 1. Add the ## Problem-first check to issue-create's body validation — check: os-backlog issue-create with a body not starting ## Problem refuses and names the failed check 2. Add the Session:/Transcript:/Where: presence check to the ## Origin validation — check: a body with ## Origin missing any of the three lines refuses and names the failed check 3. Add the VERDICT: CREATE / --user-approved check for filed-by/agent bodies — check: a filed-by/agent body with neither refuses and names the failed check 4. Update capture SKILL.md step 4 text to describe the three new refusals 5. Add the 8-character title minimum — check: --title T refuses and names the check. 6. Move the existing scope, origin, and filed-by checks into Backlog::IssueCreate; give the existing gate tests compliant bodies. ## Acceptance criteria 1. Given a body that does not start with ## Problem, when issue-create runs, then it refuses and names that check. 2. Given a body whose ## Origin section omits Session:, Transcript:, or Where:, when issue-create runs, then it refuses and names that check. 3. Given a filed-by/agent body with no VERDICT: CREATE line and no --user-approved flag, when issue-create runs, then it refuses and names that check. 4. Given a body that satisfies all three checks, when issue-create runs, then it creates the issue as before. 5. Given a title shorter than 8 characters, when issue-create runs, then it refuses and names that check. 6. Given the existing scope-label, origin, and filed-by gate tests, when the suite runs, then they pass with template-shaped bodies. ## Owner sketch class Backlog::IssueCreate def validate_body!(body, labels:, user_approved:) end end ## Origin • Trigger: retrofit pass on #753-#764, 2026-09-27, coordinator-directed • Improvised this session: none • Chain: #753-#764 skip the capture template ← IMPROVISATION (a subagent filed issues directly with issue-create, bypassing the skill's prose-only template/STE/skeptic steps) • Root candidate: this ticket • Where: plugins/os-backlog/bin/os-backlog issue-create; plugins/os-backlog/skills/capture/SKILL.md • Session: 8e4aac4f-9878-45da-ac68-c7d55261a73f • Transcript: /tmp/claude-1000/-home-jared-dev-cc-os--claude-worktrees-crc-pass-os-sdlc/8e4aac4f-9878-45da-ac68-c7d55261a73f
Author
Owner

Work started 2026-09-27 on branch ticket-765 via /os-sdlc:implement; absorbs #739.

Work started 2026-09-27 on branch ticket-765 via /os-sdlc:implement; absorbs #739.
Author
Owner

Resolution

Done: Backlog::IssueCreate owns every issue-create gate: scope label, filed-by label, ## Problem first heading, ## Origin with Session:/Transcript:/Where: lines, 8-character title minimum, and VERDICT: CREATE or --user-approved for filed-by/agent bodies; each refusal names the failed check in the issue-create: style; capture SKILL.md step 4 describes the new refusals; ADR-0234 records the decision and amends ADR-0161.

Evidence: Implementation 53 on branch ticket-765, 20 dispatches, all gates green at close; tests issue_create_template_gate_cli_test.rb and issue_create_origin_lines_gate_cli_test.rb; os-backlog suite 266 runs 0 failures; this very ticket #777 was filed through the new gates with --body-file. Deviation: three inherited fixtures from #658/#728 (one-character titles, bare bodies) were hand-fixed by the orchestrator after three programmer-repair rounds could not edit tests, then the run re-entered at the repair node.

Follow-ups: #777 IssueCreate drops its svc dependency (lens challenge: A11 holds, code defect) VERDICT: CREATE.

## Resolution **Done:** Backlog::IssueCreate owns every issue-create gate: scope label, filed-by label, ## Problem first heading, ## Origin with Session:/Transcript:/Where: lines, 8-character title minimum, and VERDICT: CREATE or --user-approved for filed-by/agent bodies; each refusal names the failed check in the issue-create: style; capture SKILL.md step 4 describes the new refusals; ADR-0234 records the decision and amends ADR-0161. **Evidence:** Implementation 53 on branch ticket-765, 20 dispatches, all gates green at close; tests issue_create_template_gate_cli_test.rb and issue_create_origin_lines_gate_cli_test.rb; os-backlog suite 266 runs 0 failures; this very ticket #777 was filed through the new gates with --body-file. Deviation: three inherited fixtures from #658/#728 (one-character titles, bare bodies) were hand-fixed by the orchestrator after three programmer-repair rounds could not edit tests, then the run re-entered at the repair node. **Follow-ups:** #777 IssueCreate drops its svc dependency (lens challenge: A11 holds, code defect) VERDICT: CREATE.
jared closed this issue 2026-09-27 16:13:41 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jared/cc-os#765
No description provided.