os-sdlc: read-only judgment charters (behavior-verifier and peers) fail with verdict:error when the brief exceeds the hook cap #662

Closed
opened 2026-09-24 01:23:16 +00:00 by jared · 2 comments
Owner

Problem

Observed 2026-09-23 on #639 implementation 14, dispatch 172: the behavior-verifier brief exceeded the ADR-0206 hook cap, the hook replaced it with the os-sdlc-runner brief --dispatch-id 172 instruction, and the charter forbade every command except subagent-stop, so the verifier settled error and the run terminated as implementation_failed with no re-entry. Session 007cbccc hot-fixed behavior-verifier.md to allow the brief fetch (same carve-out ADR-0206 item 3 gave wiring).

Approach

  1. Charter carve-out. Seven charters under plugins/os-sdlc/agents/ may receive the hook-cap fallback:

    • plugins/os-sdlc/agents/behavior-verifier.md
    • plugins/os-sdlc/agents/contract-auditor.md
    • plugins/os-sdlc/agents/seam-designer.md
    • plugins/os-sdlc/agents/test-reviewer.md
    • plugins/os-sdlc/agents/wiring.md
    • plugins/os-sdlc/agents/reviewer.md
    • plugins/os-sdlc/agents/change-auditor.md

    Replace every existing carve-out sentence, and add to the two missing charters (reviewer.md, change-auditor.md), this exact text:

    When your brief says "Brief exceeds the hook cap", run the command it names, once. The JSON it prints is your full brief. Work from it.
    

    For the five judgment charters (behavior-verifier, contract-auditor, seam-designer, test-reviewer, wiring), the existing follow-on sentence "That is the only other command you may run." stays. For reviewer and change-auditor, which run ast-grep / the evidence CLI, do not add that restriction sentence — they have other permitted commands.

    No ADR number in the carve-out sentence itself.

  2. ADR-0206 amendment. ADR-0206 item 3 currently names only wiring. A new ADR amending 0206 will name all seven charters listed above. That ADR is written at implementation time, not as part of ticket decomposition.

  3. Error routing (resolved, out of scope for this ticket's changes). verdict:error from a verifier stays routed to implementation_failed. The map is unchanged. This closes part 3 of the original ticket text below without a code or map change.

Required work:

  1. Edit behavior-verifier.md, contract-auditor.md, seam-designer.md, test-reviewer.md, wiring.md: replace the existing carve-out sentence with the exact text above (keep each charter's existing "only other command" follow-on sentence).
  2. Edit reviewer.md and change-auditor.md: add the exact carve-out sentence above, with no "only other command" follow-on.
  3. Run bin/refresh-plugins so the edited charters reach active sessions.
  4. Generalize plugins/os-sdlc/tests/pipeline/hook_context_cap_wiring_test.rb: one test asserts the exact sentence is present in all seven charters; one asserts reviewer.md and change-auditor.md contain no "only other command" sentence. Rerun plugins/os-sdlc/tests/charter_shared_goal_test.rb and the full os-sdlc suite.

Acceptance criteria

  • Each of the seven files listed above contains the exact carve-out sentence verbatim.
  • reviewer.md and change-auditor.md contain no "only other command" restriction sentence.
  • The five judgment charters (behavior-verifier, contract-auditor, seam-designer, test-reviewer, wiring) retain their "That is the only other command you may run." sentence immediately after the carve-out.
  • An ADR exists that amends ADR-0206 and names all seven charters in item 3 (not just wiring).
  • bin/refresh-plugins has been run since the charter edits.
  • charter_shared_goal_test.rb and hook_context_cap_wiring_test.rb pass.

Owner sketch

# no Ruby owner: seven charter files under plugins/os-sdlc/agents/
# test owner: OsSdlc::Pipeline::HookContextCapWiringTest

Blast radius

\1

Files containing "hook cap" or "brief --dispatch-id" before this ticket:

  • plugins/os-sdlc/agents/wiring.md
  • plugins/os-sdlc/agents/contract-auditor.md
  • plugins/os-sdlc/agents/test-reviewer.md
  • plugins/os-sdlc/agents/behavior-verifier.md
  • plugins/os-sdlc/agents/seam-designer.md
  • docs/adr/0206-an-oversized-subagentstart-brief-is-delivered-by-a-recompose-by-dispatch-id-cli-instead-of-inline-hook-context-amends-adr-0109-adr-0141-adr-0204.md
  • docs/implementation-status/os-sdlc.md

reviewer.md and change-auditor.md do not currently mention "hook cap" or "dispatch-id" — confirmed missing, per the decided design.

No test in test/ or plugins/os-sdlc/tests/ asserts on the literal carve-out sentence text, so the sentence swap will not turn any existing test red by itself. plugins/os-sdlc/tests/charter_shared_goal_test.rb does assert other literal charter text (e.g. refute_charter_text(all_charters, "behavior-verifier owns that")) across the same charter set named in this ticket, including reviewer and change-auditor — rerun it after editing. plugins/os-sdlc/tests/pipeline/hook_context_cap_wiring_test.rb only checks wiring.md's frontmatter tools: line today; it does not cover the other six charters. No charter-conformance lint exists under plugins/os-sdlc/lib or plugins/os-sdlc/bin.

Non-goals

  • The amending ADR naming all seven charters in ADR-0206 item 3: written once for #630, #662, #670 after all three land, outside this run.

  • Any change to verdict:error routing behavior (resolved as no-change, see Decided design item 3).

  • #630

  • #670


Origin

Observed 2026-09-23 on #639 implementation 14, dispatch 172: the behavior-verifier brief exceeded the ADR-0206 hook cap, the hook replaced it with the 'Run: os-sdlc-runner brief --dispatch-id 172' instruction, and the charter forbade every command except subagent-stop, so the verifier settled error and the run terminated as implementation_failed with no re-entry. Session 007cbccc hot-fixed behavior-verifier.md to allow the brief fetch (same carve-out ADR-0206 item 3 gave wiring). Required work: 1. audit every read-only judgment charter (test-reviewer, contract-auditor, reviewer, seam-designer, change-auditor) for the same gap and add the carve-out where the brief can exceed the cap; 2. amend ADR-0206 so item 3 names every charter that may run the fetch, not only wiring; 3. decide whether verdict:error on a verifier should terminate the implementation or route to a retry of the same node.

## Problem Observed 2026-09-23 on #639 implementation 14, dispatch 172: the behavior-verifier brief exceeded the ADR-0206 hook cap, the hook replaced it with the `os-sdlc-runner brief --dispatch-id 172` instruction, and the charter forbade every command except subagent-stop, so the verifier settled `error` and the run terminated as `implementation_failed` with no re-entry. Session 007cbccc hot-fixed behavior-verifier.md to allow the brief fetch (same carve-out ADR-0206 item 3 gave wiring). ## Approach 1. **Charter carve-out.** Seven charters under `plugins/os-sdlc/agents/` may receive the hook-cap fallback: - `plugins/os-sdlc/agents/behavior-verifier.md` - `plugins/os-sdlc/agents/contract-auditor.md` - `plugins/os-sdlc/agents/seam-designer.md` - `plugins/os-sdlc/agents/test-reviewer.md` - `plugins/os-sdlc/agents/wiring.md` - `plugins/os-sdlc/agents/reviewer.md` - `plugins/os-sdlc/agents/change-auditor.md` Replace every existing carve-out sentence, and add to the two missing charters (`reviewer.md`, `change-auditor.md`), this exact text: ``` When your brief says "Brief exceeds the hook cap", run the command it names, once. The JSON it prints is your full brief. Work from it. ``` For the five judgment charters (behavior-verifier, contract-auditor, seam-designer, test-reviewer, wiring), the existing follow-on sentence "That is the only other command you may run." stays. For reviewer and change-auditor, which run ast-grep / the evidence CLI, do not add that restriction sentence — they have other permitted commands. No ADR number in the carve-out sentence itself. 2. **ADR-0206 amendment.** ADR-0206 item 3 currently names only wiring. A new ADR amending 0206 will name all seven charters listed above. That ADR is written at implementation time, not as part of ticket decomposition. 3. **Error routing (resolved, out of scope for this ticket's changes).** `verdict:error` from a verifier stays routed to `implementation_failed`. The map is unchanged. This closes part 3 of the original ticket text below without a code or map change. Required work: 1. Edit `behavior-verifier.md`, `contract-auditor.md`, `seam-designer.md`, `test-reviewer.md`, `wiring.md`: replace the existing carve-out sentence with the exact text above (keep each charter's existing "only other command" follow-on sentence). 2. Edit `reviewer.md` and `change-auditor.md`: add the exact carve-out sentence above, with no "only other command" follow-on. 3. Run `bin/refresh-plugins` so the edited charters reach active sessions. 4. Generalize `plugins/os-sdlc/tests/pipeline/hook_context_cap_wiring_test.rb`: one test asserts the exact sentence is present in all seven charters; one asserts `reviewer.md` and `change-auditor.md` contain no "only other command" sentence. Rerun `plugins/os-sdlc/tests/charter_shared_goal_test.rb` and the full os-sdlc suite. ## Acceptance criteria - Each of the seven files listed above contains the exact carve-out sentence verbatim. - `reviewer.md` and `change-auditor.md` contain no "only other command" restriction sentence. - The five judgment charters (behavior-verifier, contract-auditor, seam-designer, test-reviewer, wiring) retain their "That is the only other command you may run." sentence immediately after the carve-out. - An ADR exists that amends ADR-0206 and names all seven charters in item 3 (not just wiring). - `bin/refresh-plugins` has been run since the charter edits. - `charter_shared_goal_test.rb` and `hook_context_cap_wiring_test.rb` pass. ## Owner sketch ```ruby # no Ruby owner: seven charter files under plugins/os-sdlc/agents/ # test owner: OsSdlc::Pipeline::HookContextCapWiringTest ``` ## Blast radius \1 Files containing "hook cap" or "brief --dispatch-id" before this ticket: - `plugins/os-sdlc/agents/wiring.md` - `plugins/os-sdlc/agents/contract-auditor.md` - `plugins/os-sdlc/agents/test-reviewer.md` - `plugins/os-sdlc/agents/behavior-verifier.md` - `plugins/os-sdlc/agents/seam-designer.md` - `docs/adr/0206-an-oversized-subagentstart-brief-is-delivered-by-a-recompose-by-dispatch-id-cli-instead-of-inline-hook-context-amends-adr-0109-adr-0141-adr-0204.md` - `docs/implementation-status/os-sdlc.md` `reviewer.md` and `change-auditor.md` do not currently mention "hook cap" or "dispatch-id" — confirmed missing, per the decided design. No test in `test/` or `plugins/os-sdlc/tests/` asserts on the literal carve-out sentence text, so the sentence swap will not turn any existing test red by itself. `plugins/os-sdlc/tests/charter_shared_goal_test.rb` does assert other literal charter text (e.g. `refute_charter_text(all_charters, "behavior-verifier owns that")`) across the same charter set named in this ticket, including reviewer and change-auditor — rerun it after editing. `plugins/os-sdlc/tests/pipeline/hook_context_cap_wiring_test.rb` only checks wiring.md's frontmatter `tools:` line today; it does not cover the other six charters. No charter-conformance lint exists under `plugins/os-sdlc/lib` or `plugins/os-sdlc/bin`. ## Non-goals - The amending ADR naming all seven charters in ADR-0206 item 3: written once for #630, #662, #670 after all three land, outside this run. - Any change to verdict:error routing behavior (resolved as no-change, see Decided design item 3). - #630 - #670 --- ## Origin Observed 2026-09-23 on #639 implementation 14, dispatch 172: the behavior-verifier brief exceeded the ADR-0206 hook cap, the hook replaced it with the 'Run: os-sdlc-runner brief --dispatch-id 172' instruction, and the charter forbade every command except subagent-stop, so the verifier settled error and the run terminated as implementation_failed with no re-entry. Session 007cbccc hot-fixed behavior-verifier.md to allow the brief fetch (same carve-out ADR-0206 item 3 gave wiring). Required work: 1. audit every read-only judgment charter (test-reviewer, contract-auditor, reviewer, seam-designer, change-auditor) for the same gap and add the carve-out where the brief can exceed the cap; 2. amend ADR-0206 so item 3 names every charter that may run the fetch, not only wiring; 3. decide whether verdict:error on a verifier should terminate the implementation or route to a retry of the same node.
Author
Owner

Work started on branch ticket-662 (worktree).

Work started on branch ticket-662 (worktree).
Author
Owner

Resolution

Done: All seven charters that can receive the hook-cap fallback (behavior-verifier, contract-auditor, seam-designer, test-reviewer, wiring, reviewer, change-auditor) carry one carve-out sentence allowing the brief fetch; reviewer and change-auditor carry no command restriction. verdict:error from a verifier stays routed to implementation-failed (decision recorded, option A).

Evidence: main 75280149; hook_context_cap_wiring_test.rb asserts the sentence in all seven and the absence of 'only other command' in reviewer/change-auditor; suite 1386 runs 0 failures; bin/refresh-plugins run by worktree finish.

Follow-ups: Amending ADR naming all seven charters in ADR-0206 item 3, written once for #630/#662/#670 after #670 lands; tracked in #670 body. No other follow-ups.

## Resolution **Done:** All seven charters that can receive the hook-cap fallback (behavior-verifier, contract-auditor, seam-designer, test-reviewer, wiring, reviewer, change-auditor) carry one carve-out sentence allowing the brief fetch; reviewer and change-auditor carry no command restriction. verdict:error from a verifier stays routed to implementation-failed (decision recorded, option A). **Evidence:** main 75280149; hook_context_cap_wiring_test.rb asserts the sentence in all seven and the absence of 'only other command' in reviewer/change-auditor; suite 1386 runs 0 failures; bin/refresh-plugins run by worktree finish. **Follow-ups:** Amending ADR naming all seven charters in ADR-0206 item 3, written once for #630/#662/#670 after #670 lands; tracked in #670 body. No other follow-ups.
jared closed this issue 2026-09-24 16:18:51 +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#662
No description provided.