os-sdlc: behavior-verifier judges from ticket_brief and code_changes only; Bash-only; complains loudly on missing evidence #555

Closed
opened 2026-09-11 15:00:39 +00:00 by jared · 2 comments
Owner

Context

The behavior-verifier charter (plugins/os-sdlc/agents/behavior-verifier.md:10) lists five inputs.
The map node (plugins/os-sdlc/maps/poodr-implementation.yaml:114) enriches only [ticket_brief, gate_results].
BriefFacts::FACT_RESOLVERS (lib/os_sdlc/runner/brief_facts.rb:17-22) has no production-diff fact.
test_changes exists in BriefFacts but is not enriched for this node.
In session d9e1984d, the verifier used Read/Grep/Glob to fetch the diff itself.
In one run, an orchestrator prompt nudged the verifier to run the full suite.
The user decided on 2026-09-11 that the verifier's sole responsibility is: does the production diff deliver the behavior the ticket asks for.
Test relevance belongs to test-reviewer.
Design belongs to contract-auditor.
Gate status belongs to the map.
Evidence is ticket_brief and code_changes only.
Programmer handoff is attached structurally by BriefComposer but is not evidence.
The charter may consult the handoff only after reaching a fail verdict, and only to check critically whether the programmer justified a deviation.
Tools are [Bash] only, used for the subagent-stop settlement pipe.
If evidence is missing, the verifier must settle error naming the missing fact, and must never gather it itself.
This ticket subsumes #554 (red-gate rule removal): the red-gate rule and the "gates are not green" error clause are removed as part of this reshape.
This ticket also carries #554's task: a map test confirming behavior-verifier is reached only via pass edges of gated nodes.
code_changes diffs working tree against HEAD, the same base test_changes uses, because the runner records no commits (commit step ADR-0171 is off; commit_record is in-memory only).
Ticket 2 covers a persisted start commit for this diff base.

Tasks

  • Extract PathDiff (paths, root:) from TestDiff#git_diff; TestDiff delegates to it.
  • Add a code_changes resolver to BriefFacts (DiffedRubyFiles filtered to project.code_path/ prefix, truncated).
  • Map: behavior-verifier enrich: [ticket_brief, code_changes].
  • Charter rewrite: input line, rules, verdict definitions, tools: [Bash], drop the TEST: prefix, keep BEHAVIOR:/CORRECTION:, add the loud-complaint-on-missing-evidence rule.
  • Tests: charter test (Bash-only, input names code_changes, no TEST prefix, complaint rule), brief_facts code_changes test, map enrich test, map routing test (the #554 task).
  • Run bin/refresh-plugins.
  • Add a History row to docs/implementation-status/os-sdlc.md.

Acceptance criteria

  • The behavior-verifier charter names exactly two evidence inputs: ticket_brief and code_changes.
  • The charter declares tools: [Bash] only.
  • The charter has no TEST: prefix and no red-gate or "gates are not green" error clause.
  • A map test proves behavior-verifier is reached only via pass edges of gated nodes.
  • #554 is closed as subsumed by this ticket.

Origin

  • Trigger: design review of the behavior-verifier charter and map enrichment mismatch, 2026-09-11
  • Improvised this session: none
  • Chain: verifier fetches its own evidence via Read/Grep/Glob ← map under-enriches relative to the charter's claimed inputs ← DESIGN gap, charter written before BriefFacts resolvers existed
  • Root candidate: this ticket
  • Where: plugins/os-sdlc/agents/behavior-verifier.md, plugins/os-sdlc/maps/poodr-implementation.yaml, lib/os_sdlc/runner/brief_facts.rb
  • Session: 6d4567e1-5bdc-481a-9221-cfd012b7cc39
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/6d4567e1-5bdc-481a-9221-cfd012b7cc39.jsonl
## Context The behavior-verifier charter (`plugins/os-sdlc/agents/behavior-verifier.md:10`) lists five inputs. The map node (`plugins/os-sdlc/maps/poodr-implementation.yaml:114`) enriches only `[ticket_brief, gate_results]`. `BriefFacts::FACT_RESOLVERS` (`lib/os_sdlc/runner/brief_facts.rb:17-22`) has no production-diff fact. `test_changes` exists in `BriefFacts` but is not enriched for this node. In session d9e1984d, the verifier used Read/Grep/Glob to fetch the diff itself. In one run, an orchestrator prompt nudged the verifier to run the full suite. The user decided on 2026-09-11 that the verifier's sole responsibility is: does the production diff deliver the behavior the ticket asks for. Test relevance belongs to test-reviewer. Design belongs to contract-auditor. Gate status belongs to the map. Evidence is ticket_brief and code_changes only. Programmer handoff is attached structurally by BriefComposer but is not evidence. The charter may consult the handoff only after reaching a `fail` verdict, and only to check critically whether the programmer justified a deviation. Tools are `[Bash]` only, used for the subagent-stop settlement pipe. If evidence is missing, the verifier must settle `error` naming the missing fact, and must never gather it itself. This ticket subsumes #554 (red-gate rule removal): the red-gate rule and the "gates are not green" error clause are removed as part of this reshape. This ticket also carries #554's task: a map test confirming behavior-verifier is reached only via `pass` edges of gated nodes. `code_changes` diffs working tree against HEAD, the same base `test_changes` uses, because the runner records no commits (commit step ADR-0171 is off; `commit_record` is in-memory only). Ticket 2 covers a persisted start commit for this diff base. ## Tasks - [ ] Extract `PathDiff` (paths, root:) from `TestDiff#git_diff`; `TestDiff` delegates to it. - [ ] Add a `code_changes` resolver to `BriefFacts` (DiffedRubyFiles filtered to `project.code_path/` prefix, truncated). - [ ] Map: behavior-verifier `enrich: [ticket_brief, code_changes]`. - [ ] Charter rewrite: input line, rules, verdict definitions, `tools: [Bash]`, drop the `TEST:` prefix, keep `BEHAVIOR:`/`CORRECTION:`, add the loud-complaint-on-missing-evidence rule. - [ ] Tests: charter test (Bash-only, input names code_changes, no TEST prefix, complaint rule), brief_facts code_changes test, map enrich test, map routing test (the #554 task). - [ ] Run bin/refresh-plugins. - [ ] Add a History row to docs/implementation-status/os-sdlc.md. ## Acceptance criteria - The behavior-verifier charter names exactly two evidence inputs: ticket_brief and code_changes. - The charter declares `tools: [Bash]` only. - The charter has no `TEST:` prefix and no red-gate or "gates are not green" error clause. - A map test proves behavior-verifier is reached only via `pass` edges of gated nodes. - #554 is closed as subsumed by this ticket. ## Origin - Trigger: design review of the behavior-verifier charter and map enrichment mismatch, 2026-09-11 - Improvised this session: none - Chain: verifier fetches its own evidence via Read/Grep/Glob ← map under-enriches relative to the charter's claimed inputs ← DESIGN gap, charter written before BriefFacts resolvers existed - Root candidate: this ticket - Where: plugins/os-sdlc/agents/behavior-verifier.md, plugins/os-sdlc/maps/poodr-implementation.yaml, lib/os_sdlc/runner/brief_facts.rb - Session: 6d4567e1-5bdc-481a-9221-cfd012b7cc39 - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/6d4567e1-5bdc-481a-9221-cfd012b7cc39.jsonl
Author
Owner

Resolution

Done: behavior-verifier reshaped: evidence is ticket_brief + code_changes only, tools [Bash], MISSING: complaint on absent evidence, red-gate rule and TEST: prefix removed; PathDiff extracted, CodeDiff owns the production diff, code_changes named fact; map enrich updated; ADR-0173 amends ADR-0162

Evidence: main dcbbf93 on 2026-09-11; suite 1174 runs 0 failures; rubocop clean; bin/refresh-plugins run; History row added in docs/implementation-status/os-sdlc.md

Follow-ups: #556 persisted start commit (diff base survives an enabled commit step); live verification of the reshaped charter on the next pipeline run, no ticket, will surface as a MISSING: complaint if the brief is wrong

## Resolution **Done:** behavior-verifier reshaped: evidence is ticket_brief + code_changes only, tools [Bash], MISSING: complaint on absent evidence, red-gate rule and TEST: prefix removed; PathDiff extracted, CodeDiff owns the production diff, code_changes named fact; map enrich updated; ADR-0173 amends ADR-0162 **Evidence:** main dcbbf93 on 2026-09-11; suite 1174 runs 0 failures; rubocop clean; bin/refresh-plugins run; History row added in docs/implementation-status/os-sdlc.md **Follow-ups:** #556 persisted start commit (diff base survives an enabled commit step); live verification of the reshaped charter on the next pipeline run, no ticket, will surface as a MISSING: complaint if the brief is wrong
jared closed this issue 2026-09-11 15:09:28 +00:00
Author
Owner

Follow-up from the #553 run (session 5fdd0aa3, implementation 3, dispatch 18): the test-reviewer charter still settles verdict error on a contradictory gate read (genuine NameError red that looked stale against the tree), and the map routes that error to implementation_failed with no repair route. Same root as this ticket's behavior-verifier fix. Ticket-skeptic verdict: DROP as a separate ticket; fold into #555's scope or its follow-up. Correct verdict in that case was pass (red for the intended reason).

Follow-up from the #553 run (session 5fdd0aa3, implementation 3, dispatch 18): the test-reviewer charter still settles verdict error on a contradictory gate read (genuine NameError red that looked stale against the tree), and the map routes that error to implementation_failed with no repair route. Same root as this ticket's behavior-verifier fix. Ticket-skeptic verdict: DROP as a separate ticket; fold into #555's scope or its follow-up. Correct verdict in that case was pass (red for the intended reason).
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#555
No description provided.