TemplateValidator requires Owner sketch and Cases on ready-for-agent tickets; capture template and ticket-decompose emit them (ADR-0190) #588

Closed
opened 2026-09-15 13:37:42 +00:00 by jared · 2 comments
Owner

Context

Per ADR-0190, tickets labeled ready-for-agent must carry ## Owner sketch and ## Cases sections so the os-sdlc ticket map can consume them. Backlog::TemplateValidator must gate on these two sections only when the ticket carries ready-for-agent, without adding them to the always-required REQUIRED_SECTIONS (Slice, Acceptance criteria, Non-goals) — that would fail every existing ticket and mis-tier bodies.

Owner sketch

module Backlog
  class TemplateValidator
    AGENT_READY_SECTIONS = [\"Owner sketch\", \"Cases\"].freeze
    def validate_body(body, labels)
    def build_checker(body, labels)   # passes conditional_sections: AGENT_READY_SECTIONS when labels include ready-for-agent
    def agent_ready?(labels)
  end
  class TicketBodyChecker
    def initialize(body:, tracker:, required_depth:, required_sections:, conditional_sections:)
    def check_headings                # iterates required + conditional
    def check_cases_listed(match)     # CASE_LINE = /^\\s*(?:\\d+\\.|[-*])\\s+\\S/
    def ticket_attempt?               # unchanged: uses required_sections only
  end
end

Cases

  1. Given a ticket body with the three required sections but no Owner sketch, when validated with labels including ready-for-agent, then the result fails and the report names "Owner sketch".
  2. Given the same body validated with no labels, then the result is tier ticket and passes (gate is label-conditional).
  3. Given Owner sketch present and a Cases section of prose with no list line, when validated as ready-for-agent, then the report says the Cases section must list at least one case.
  4. Given a complete agent-ready body, when validated as ready-for-agent, then it passes.

Structural follow-through

  • references/templates/capture.md gains an agent-ready variant carrying ## Owner sketch and ## Cases.
  • skills/ticket-decompose/SKILL.md requires both sections before applying ready-for-agent.
    These are documentation edits verified by reading, not by a test (see #593).

Observed

plugins/os-backlog/lib/backlog/template_validator.rb defines REQUIRED_SECTIONS as Slice, Acceptance criteria, Non-goals; ticket_attempt? tiers on those alone. Neither references/templates/capture.md nor plugins/os-backlog/skills/ticket-decompose/SKILL.md (line ~51) emits or requires Owner sketch/Cases today.

Reproduce

n/a: design/feature ticket, not a reproduced bug

Expected

TemplateValidator fails a ready-for-agent ticket missing either section and names it in the report; non-agent-ready tickets are unaffected. capture.md gains an agent-ready template variant with both sections; ticket-decompose/SKILL.md requires both sections before applying the ready-for-agent label. Test coverage in plugins/os-backlog/tests/template_validator_test.rb. Constraint: do not add "Owner sketch"/"Cases" to REQUIRED_SECTIONS.

Origin

  • Trigger: user decision 2026-09-15, ADR-0190 (being written)
  • Improvised this session: none
  • Chain: agent-ready ticket shape gap ← ADR-0190 decision ← DESIGN (ADR-0190)
  • Root candidate: this ticket
  • Where: plugins/os-backlog/lib/backlog/template_validator.rb
  • Session: b1c83b81-7be1-4f17-9e8e-cae36a934f25
  • Transcript: n/a

VERDICT: CREATE (ticket-skeptic, os-backlog:ticket-skeptic dispatch)

## Context Per ADR-0190, tickets labeled `ready-for-agent` must carry `## Owner sketch` and `## Cases` sections so the os-sdlc ticket map can consume them. `Backlog::TemplateValidator` must gate on these two sections only when the ticket carries `ready-for-agent`, without adding them to the always-required `REQUIRED_SECTIONS` (Slice, Acceptance criteria, Non-goals) — that would fail every existing ticket and mis-tier bodies. ## Owner sketch ```ruby module Backlog class TemplateValidator AGENT_READY_SECTIONS = [\"Owner sketch\", \"Cases\"].freeze def validate_body(body, labels) def build_checker(body, labels) # passes conditional_sections: AGENT_READY_SECTIONS when labels include ready-for-agent def agent_ready?(labels) end class TicketBodyChecker def initialize(body:, tracker:, required_depth:, required_sections:, conditional_sections:) def check_headings # iterates required + conditional def check_cases_listed(match) # CASE_LINE = /^\\s*(?:\\d+\\.|[-*])\\s+\\S/ def ticket_attempt? # unchanged: uses required_sections only end end ``` ## Cases 1. Given a ticket body with the three required sections but no Owner sketch, when validated with labels including ready-for-agent, then the result fails and the report names "Owner sketch". 2. Given the same body validated with no labels, then the result is tier ticket and passes (gate is label-conditional). 3. Given Owner sketch present and a Cases section of prose with no list line, when validated as ready-for-agent, then the report says the Cases section must list at least one case. 4. Given a complete agent-ready body, when validated as ready-for-agent, then it passes. ## Structural follow-through - references/templates/capture.md gains an agent-ready variant carrying `## Owner sketch` and `## Cases`. - skills/ticket-decompose/SKILL.md requires both sections before applying ready-for-agent. These are documentation edits verified by reading, not by a test (see #593). ## Observed `plugins/os-backlog/lib/backlog/template_validator.rb` defines `REQUIRED_SECTIONS` as Slice, Acceptance criteria, Non-goals; `ticket_attempt?` tiers on those alone. Neither `references/templates/capture.md` nor `plugins/os-backlog/skills/ticket-decompose/SKILL.md` (line ~51) emits or requires Owner sketch/Cases today. ## Reproduce n/a: design/feature ticket, not a reproduced bug ## Expected `TemplateValidator` fails a `ready-for-agent` ticket missing either section and names it in the report; non-agent-ready tickets are unaffected. `capture.md` gains an agent-ready template variant with both sections; `ticket-decompose/SKILL.md` requires both sections before applying the `ready-for-agent` label. Test coverage in `plugins/os-backlog/tests/template_validator_test.rb`. Constraint: do not add "Owner sketch"/"Cases" to `REQUIRED_SECTIONS`. ## Origin - Trigger: user decision 2026-09-15, ADR-0190 (being written) - Improvised this session: none - Chain: agent-ready ticket shape gap ← ADR-0190 decision ← DESIGN (ADR-0190) - Root candidate: this ticket - Where: plugins/os-backlog/lib/backlog/template_validator.rb - Session: b1c83b81-7be1-4f17-9e8e-cae36a934f25 - Transcript: n/a VERDICT: CREATE (ticket-skeptic, os-backlog:ticket-skeptic dispatch)
Author
Owner

Work started via /os-sdlc:implement on branch ticket-588 (worktree .claude/worktrees/ticket-588), map poodr-ticket-implementation.yaml, target os-backlog.

Work started via /os-sdlc:implement on branch ticket-588 (worktree .claude/worktrees/ticket-588), map poodr-ticket-implementation.yaml, target os-backlog.
Author
Owner

Resolution

Done: Backlog::TemplateValidator adds AGENT_READY_SECTIONS (Owner sketch, Cases) as a conditional set when labels include ready-for-agent; TicketBodyChecker#check_cases_listed requires one listed case; capture.md gains the agent-ready variant; ticket-decompose SKILL.md refuses the label without both sections. ADR-0190.

Evidence: Branch ticket-588; 4 new validator tests + 1 agent-ready checkout fixture; suite 229 runs 0 failures direct; rubocop clean on lib. Pipeline implementation 19: 13 dispatches, 1174 s, terminal implementation_failed bound_exhausted:suite-check/fail caused by BinMissingThorGuardTest failing only under the gate subprocess env (#594), not by the diff. Orchestrator hand-finished: removed an enforce_agent_ready bypass the repair round added to checkout.rb, re-indented three methods, wrote the follow-through docs. refactorer and contract-auditor did not run. Two hand settlements (dispatches 249, 250) after agents relayed the wrong dispatch id; hand gate on 249 overwrote the suite-check red with a green in the report row.

Follow-ups: #594 suite gate env defect (filed); #593 documentation-only cases (filed earlier); implement SKILL.md should invoke check-out so the early bounce fires on the pipeline path: not filed, user to decide; none other.

## Resolution **Done:** Backlog::TemplateValidator adds AGENT_READY_SECTIONS (Owner sketch, Cases) as a conditional set when labels include ready-for-agent; TicketBodyChecker#check_cases_listed requires one listed case; capture.md gains the agent-ready variant; ticket-decompose SKILL.md refuses the label without both sections. ADR-0190. **Evidence:** Branch ticket-588; 4 new validator tests + 1 agent-ready checkout fixture; suite 229 runs 0 failures direct; rubocop clean on lib. Pipeline implementation 19: 13 dispatches, 1174 s, terminal implementation_failed bound_exhausted:suite-check/fail caused by BinMissingThorGuardTest failing only under the gate subprocess env (#594), not by the diff. Orchestrator hand-finished: removed an enforce_agent_ready bypass the repair round added to checkout.rb, re-indented three methods, wrote the follow-through docs. refactorer and contract-auditor did not run. Two hand settlements (dispatches 249, 250) after agents relayed the wrong dispatch id; hand gate on 249 overwrote the suite-check red with a green in the report row. **Follow-ups:** #594 suite gate env defect (filed); #593 documentation-only cases (filed earlier); implement SKILL.md should invoke check-out so the early bounce fires on the pipeline path: not filed, user to decide; none other.
jared closed this issue 2026-09-15 14:21:11 +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#588
No description provided.