| name | verifier |
| description | Verify-stage โ
bundle. Executes parsed_scope.json completion bash and emits deterministic exit-code verdict. Sub-agents own all reads/writes/Bash; main Claude orchestrates only. |
| stages | ["verify"] |
Mode gate (V4 Spike XIV โ paradigm enforcement)
โ
๋ฒ๋ค ์ง์
์งํ (Step 0 ์ง์ ), ๋ฉ์ธ์ ๋ค์ AskUserQuestion ์ ๋ฌด์กฐ๊ฑด ๋ฐ์ฌ:
"์ด๋ฒ stage ๋ชจ๋ โ ์ด๋ป๊ฒ ์งํํ ๊น?"
์ต์
:
1. full mode (์ถ์ฒ) โ spec ๋ช
์ N-step pipeline ๊ทธ๋๋ก. ์ ํยท์์ฑ๋ ์ฐ์ .
์์ ์๊ฐ: 10~15๋ถ. dispatch ์: 4ํ.
2. quick mode โ ํตํฉ 1 dispatch ๋ก ์์ถ. ์๊ฐ ๋ถ์กฑ ์๋ง ์ ํ.
precision ์์ค + iteration ๊ถ์ฅ๋ ๋ฏธ๋ฌ ์ํ. KEEPER_REPORT ์ ์นด์ดํธ ๊ธฐ๋ก.
full ์ ํ ์ โ ์๋ Step 0~N ์์๋๋ก spec ๊ทธ๋๋ก ์งํ.
quick ์ ํ ์ โ ยง"Quick mode flow" ๋จ์ถ ๋ถ๊ธฐ๋ก ์ง์
.
๋ฉ์ธ ์๊ฐ ํ๋จ ๊ธ์ง โ ์๊ฐ ๋ถ์กฑ ์ถ์ธกยทbudget ์ถ์ธกยท๋งฅ๋ฝ ์ถ์ธก ๋ชจ๋ ์ฌ์ฉ์
์ง๋ฌธ ๊ฐ์ trigger. 4์์น #1 ("๋ถํ์คํ๋ฉด ์ถ์ธก ๊ธ์ง, ์ฌ์ฉ์ ์ง๋ฌธ ์ฐ์ ") ์์คํ
์
๊ฐ์ .
verifier โ
โ completion criterion runner
When to invoke
Use after parsed_scope.json exists in the run_dir (built by reviewer โ
Step 1 or builder โ
Step 2 or hand-authored after running server.scope_parser.parse_scope_md) when an independent, deterministic verdict on the SCOPE author's completion criterion is needed. verifier โ
is the orthogonal sibling of reviewer โ
โ same parsed_scope.json input contract, but executes the bash one-liner and emits exit-code-driven pass/fail rather than diff/scope auditing.
Inputs
run_id โ resolves run_dir to ~/.claude/channels/assemble/runs/<run_id>/.
<run_dir>/parsed_scope.json โ must exist with non-empty completion field.
- (No
<base>..<tip> git range โ verifier is purely a completion-criterion runner.)
Artifacts
run_dir = ~/.claude/channels/assemble/runs/<rid>/. One primary artifact:
VERIFY_REPORT.md โ 7 canonical sections (Summary, Completion command, Execution result, Stdout sample, Stderr sample, Verdict reasoning, Recommendations) with verdict line in Section 1.
Plus 3 intermediate JSONs for audit trail: extracted_completion.json, execution_result.json, verify_result.json.
Verdict logic (deterministic)
verdict = "pass" if (
execution_result.exit_code == 0
AND not execution_result.skipped
AND not execution_result.timed_out
) else "fail"
Reason text:
pass โ "completion command exited 0"
skipped โ "skipped: "
timed_out โ "timed out (30s budget)"
exit_code != 0 โ "exited "
Truncated stdout/stderr does NOT auto-fail โ truncated: true is metadata for VERIFY_REPORT, not a verdict input.
CRITICAL โ orchestrator-only enforcement
Main Claude does NOT read parsed_scope.json content, execution_result.json content, or call Bash directly. Main only:
- Resolves run_dir from
run_id.
- Verifies
parsed_scope.json exists + has non-empty completion field via server.run_dir.read_run_artifact if needed (sanity check ONLY โ full validation lives in Step 1).
- Dispatches sub-agents in sequence (Step 1 โ Step 2 โ Step 3 โ Step 4).
- Records each dispatch via
server.harness.record_dispatch (writes to dispatches.jsonl).
All reads, parsing, execution, classification, and report rendering happen in sub-agents. The 4 sub-agent prompts are exactly:
verifier_extract_step1.md โ parsed_scope.json โ extracted_completion.json
verifier_execute_step2.md โ bash execution + capture (Bash tool GRANTED for this step ONLY)
verifier_classify_step3.md โ execution_result.json โ verify_result.json (deterministic verdict)
verifier_report_step4.md โ VERIFY_REPORT.md render from 3 prior JSONs + template
If any prompt is invoked outside this allowlist, harness raises and halts. See server.harness.ALLOWED_PROMPT_FILES.
Step-by-step workflow
์ฌ์ฉ์ ๋ช
์ ๋์ ์์ด ๋จ์ถ ๊ธ์ง โ N-step pipeline ์ ๊ฐ step ์ ๋ณ๋ sub-agent dispatch ๋ก ์งํ. ๋ฉ์ธ์ด ๋จ์ถ ๊ฒฐ์ ์ 4์์น #1 ์๋ฐ. Mode-gate ๊ฐ quick ์ผ๋ก ๋ตํ ๊ฒฝ์ฐ๋ง ยง"Quick mode flow" ๋ถ๊ธฐ ํ์ฉ.
Step 0 โ orchestrator setup
Main resolves run_dir via server.run_dir.run_dir_path(run_id). Verifies parsed_scope.json exists at <run_dir>/parsed_scope.json. If missing, halts with the user-facing error "parsed_scope.json not found in run_dir; run reviewer โ
Step 1 first or hand-author after server.scope_parser.parse_scope_md".
Step 1 โ extract completion bash
Dispatch verifier_extract_step1.md with RUN_ID. Sub-agent reads parsed_scope.json, validates completion field (non-empty after strip, len โค 500, single line, plus input-robustness errors for missing/malformed JSON / non-string completion), writes extracted_completion.json.
Step 2 โ execute completion bash
Dispatch verifier_execute_step2.md with RUN_ID. Bash tool access GRANTED for this step ONLY (Steps 1, 3, 4 do NOT receive Bash). Sub-agent:
- skips execution if
extracted_completion.json["errors"] is non-empty (records skipped: true + skip_reasons array + skip_reason scalar)
- otherwise runs
subprocess.run(["bash", "-c", completion], timeout=30, capture_output=True, text=True) with 100KB stdout/stderr cap each
- writes
execution_result.json (skipped/skip_reasons/skip_reason/exit_code/stdout/stderr/duration_ms/timed_out/truncated)
See SECURITY.md for the full threat model + mitigation surface.
Step 3 โ classify execution result
Dispatch verifier_classify_step3.md with RUN_ID. Sub-agent reads execution_result.json, applies the deterministic verdict rule above (NO LLM judgment), writes verify_result.json (verdict/reason/exit_code/duration_ms/truncated/timed_out/skipped).
Step 4 โ render VERIFY_REPORT.md
Dispatch verifier_report_step4.md with RUN_ID. Sub-agent reads all 3 prior JSONs + the template at bundled/verifier/templates/VERIFY_REPORT.md.template, substitutes 14 placeholders via str.replace, writes VERIFY_REPORT.md with all 7 canonical sections.
Step 5 โ iteration round-trip (optional)
If user revises parsed_scope.json (e.g. amends completion command) and asks for re-verification, load verifier_iter_revisit.md (orchestrator helper) and re-run Steps 2~4 (Step 1 only re-runs if parsed_scope changed). Each iteration appends ## Iteration N to VERIFY_REPORT.md without overwriting prior trail.
Iteration audit invariant
Every iteration produces exactly 4 rows in dispatches.jsonl with step names step1.iter{N}.extract, step2.iter{N}.execute, step3.iter{N}.classify, step4.iter{N}.report. Step 1 is skipped on subsequent iterations unless parsed_scope.json changed; in that case the row count is 4, otherwise 3.
Sub-agent matrix
See ## CRITICAL โ orchestrator-only enforcement above for the canonical 4-file allowlist. Roles use general-purpose as the default sub-agent type for all 4 steps.
| Step | Prompt file | Sub-agent type | Tools granted |
|---|
| 1 | verifier_extract_step1.md | general-purpose | Read, Write |
| 2 | verifier_execute_step2.md | general-purpose | Read, Write, Bash |
| 3 | verifier_classify_step3.md | general-purpose | Read, Write |
| 4 | verifier_report_step4.md | general-purpose | Read, Write |
Iteration helper verifier_iter_revisit.md is loaded by main directly (NOT in subagent allowlist).
Security
See SECURITY.md for threat model + mitigation surface. Key mitigations:
- Length cap 500 (Step 1)
- Timeout 30s (Step 2)
- Output cap 100KB stdout/stderr each (Step 2)
- Bash scoped to Step 2 only
- Skip-if-errors (Step 2 honors Step 1's error labels)
The Bash tool access GRANTED substring marker in verifier_execute_step2.md is the canonical grep target for security audits.
Identity guards
- โ
orchestrator-only: main Claude does NOT read parsed_scope content, execution result content, or call Bash directly during the dispatch chain.
- โ
harness preamble v3 prepended on every dispatch (canonical sha
858e9ff1cdc05ca73bb4009aab3acfc841169b30873d2fb00f2dfd546b86e159).
- โ
record_dispatch mandatory โ minimum 4 rows in dispatches.jsonl per run.
- โ
Bash tool scoped to Step 2 sub-agent ONLY (allowlist + harness preamble v3).
- โ
Deterministic verdict โ no LLM-judged pass/fail.
Quick mode flow
Mode-gate ๊ฐ quick ์ผ๋ก ๋ตํ ๊ฒฝ์ฐ๋ง ์ง์
(full ์ด๋ฉด ์ด section ๋ฏธ์ฌ์ฉ).
๋จ์ผ dispatch ๋จ์ถ
server.dispatch_prompt('verifier_quick.md') ๋ก ๋จ์ผ sub-agent dispatch:
prompt = server.dispatch_and_record(
run_id,
prompt_file="verifier_quick.md",
step="verifier.quick",
description="verifier quick mode โ single-dispatch fallback",
)
dispatches.jsonl audit row ์ description ํ๋์ mode=quick ๋ฉํ ๋ช
์
(KEEPER_REPORT ๊ฐ ์นด์ดํธ ์ง๊ณ ์ ์ฌ์ฉ).
์ฐ์ถ๋ฌผ schema ๋ณด์กด
Quick mode ๋ผ๋ ์ฐ์ถ๋ฌผ (์: PRD.md / IMPL_REPORT.md / DEBUGGER_LOG.md ๋ฑ) ์
sections schema ๋ full mode ์ ๋์ผ. precision ๋ง ๋จ์ด์ง ๋ฟ schema ๋ฏธ์ค์ X.
์ฌ์ฉ์ ๊ฐ์ํ
KEEPER_REPORT ยง "Mode usage" ๊ฐ quick ์นด์ดํธ ํ์. ๋ค์ run ์์ ์๊ฐ ํ๋ณด ๊ถ์ฅ.