| name | reviewer |
| description | Review-stage โ
bundle. External SCOPE.md vs git diff gate. Sub-agents own all reads/writes; main Claude orchestrates only. |
| stages | ["review"] |
Mode gate (V4 Spike XIV โ paradigm enforcement)
โ
๋ฒ๋ค ์ง์
์งํ (Step 0 ์ง์ ), ๋ฉ์ธ์ ๋ค์ AskUserQuestion ์ ๋ฌด์กฐ๊ฑด ๋ฐ์ฌ:
"์ด๋ฒ stage ๋ชจ๋ โ ์ด๋ป๊ฒ ์งํํ ๊น?"
์ต์
:
1. full mode (์ถ์ฒ) โ spec ๋ช
์ N-step pipeline ๊ทธ๋๋ก. ์ ํยท์์ฑ๋ ์ฐ์ .
์์ ์๊ฐ: 10~15๋ถ. dispatch ์: 5ํ.
2. quick mode โ ํตํฉ 1 dispatch ๋ก ์์ถ. ์๊ฐ ๋ถ์กฑ ์๋ง ์ ํ.
precision ์์ค + iteration ๊ถ์ฅ๋ ๋ฏธ๋ฌ ์ํ. KEEPER_REPORT ์ ์นด์ดํธ ๊ธฐ๋ก.
full ์ ํ ์ โ ์๋ Step 0~N ์์๋๋ก spec ๊ทธ๋๋ก ์งํ.
quick ์ ํ ์ โ ยง"Quick mode flow" ๋จ์ถ ๋ถ๊ธฐ๋ก ์ง์
.
๋ฉ์ธ ์๊ฐ ํ๋จ ๊ธ์ง โ ์๊ฐ ๋ถ์กฑ ์ถ์ธกยทbudget ์ถ์ธกยท๋งฅ๋ฝ ์ถ์ธก ๋ชจ๋ ์ฌ์ฉ์
์ง๋ฌธ ๊ฐ์ trigger. 4์์น #1 ("๋ถํ์คํ๋ฉด ์ถ์ธก ๊ธ์ง, ์ฌ์ฉ์ ์ง๋ฌธ ์ฐ์ ") ์์คํ
์
๊ฐ์ .
reviewer โ
โ external diff vs SCOPE.md gate
When to invoke
Use after a code change is complete (working tree dirty or commit range pushed) when an independent verification of scope conformance is needed. reviewer โ
is the external sibling of builder โ
Step 6 self-review โ same diff/scope contract, different session, fresh context.
Inputs
run_id โ resolves run_dir to ~/.claude/channels/assemble/runs/<run_id>/.
runs/<rid>/SCOPE.md โ must exist (built by builder โ
Step 2 or hand-authored).
- Optional
<base>..<tip> git range โ defaults to HEAD (working tree vs HEAD).
Artifacts
run_dir = ~/.claude/channels/assemble/runs/<rid>/. One primary artifact:
REVIEW_REPORT.md โ 7 canonical sections (Summary, Scope baseline, Diff inventory, Allow/Deny classification, Surgical Changes audit, Severity assessment, Recommendations) with verdict line in Section 1.
Plus 5 intermediate JSONs for audit trail: parsed_scope.json, diff_inventory.json (+ raw.diff), classification.json, rule3_audit.json, severity_grid.json.
Verdict logic
verdict = "merge-ready" if (
classification.summary.deny_violation == 0
AND classification.summary.allow_miss == 0
AND rule3_audit.summary.critical == 0
) else "needs-fix"
needs-fix reasons surface in REVIEW_REPORT Section 7 (Recommendations) in priority order: deny-violations โ critical Rule 3 โ allow-misses โ major Rule 3.
CRITICAL โ orchestrator-only enforcement
Main Claude does NOT read SCOPE.md content, raw.diff content, or classification.json content directly. Main only:
- Resolves run_dir from
run_id.
- Captures
<base>..<tip> range arg.
- Dispatches sub-agents in sequence.
- Records each dispatch via
record_dispatch (writes to dispatches.jsonl).
All reads, parsing, and writes happen in sub-agents. The 6 sub-agent prompts are exactly:
parse_scope_step1.md, diff_collect_step2.md,
classify_files_step3.md, rule3_check_step4.md,
severity_assess_step5.md, reviewer_report_step6.md
If any prompt is invoked outside this allowlist, harness raises and halts.
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 SCOPE.md exists at <run_dir>/SCOPE.md. If missing, halts with the user-facing error "SCOPE.md not found in run_dir; create one first or use builder โ
Step 2".
Step 1 โ parse SCOPE.md
Dispatch parse_scope_step1.md with RUN_ID. Sub-agent writes parsed_scope.json.
Step 2 โ capture git diff
Dispatch diff_collect_step2.md with RUN_ID + DIFF_RANGE + REPO_PATH. Sub-agent writes diff_inventory.json + raw.diff.
(Steps 1 and 2 may run in parallel via single-message multi-Agent dispatch.)
Step 3 โ classify diff files
Dispatch classify_files_step3.md. Sub-agent reads parsed_scope.json + diff_inventory.json, writes classification.json.
Step 4 โ Rule 3 audit
Dispatch rule3_check_step4.md. Sub-agent reads raw.diff + classification.json + parsed_scope.json, writes rule3_audit.json.
Step 5 โ severity grid
Dispatch severity_assess_step5.md. Sub-agent reads classification.json + rule3_audit.json + parsed_scope.json, writes severity_grid.json.
Step 6 โ write REVIEW_REPORT.md
Dispatch reviewer_report_step6.md. Sub-agent reads all 5 prior JSONs + the template, writes REVIEW_REPORT.md.
Step 7 โ iteration round-trip (optional)
If user revises SCOPE.md or the diff and asks for re-review, load reviewer_iter_revisit.md (orchestrator helper) and re-run Steps 2~6 (Step 1 only re-runs if SCOPE.md changed). Each iteration appends ## Iteration N to REVIEW_REPORT.md without overwriting prior trail.
Iteration audit invariant
Every iteration produces exactly 6 rows in dispatches.jsonl with step names step1.iter{N}.parse, step2.iter{N}.diff, step3.iter{N}.classify, step4.iter{N}.rule3, step5.iter{N}.severity, step6.iter{N}.report. (Step 1 is skipped on subsequent iterations unless SCOPE.md changed; in that case the row count is 6, otherwise 5.)
Sub-agent matrix
See ## CRITICAL โ orchestrator-only enforcement above for the canonical allowlist. Roles use general-purpose as the default sub-agent type for all six steps.
Identity guards
- โ
orchestrator-only: main Claude does NOT read scoped content.
- โ
harness preamble v3 prepended on every dispatch.
- โ
record_dispatch mandatory โ minimum 6 rows in dispatches.jsonl per run.
Quick mode flow
Mode-gate ๊ฐ quick ์ผ๋ก ๋ตํ ๊ฒฝ์ฐ๋ง ์ง์
(full ์ด๋ฉด ์ด section ๋ฏธ์ฌ์ฉ).
๋จ์ผ dispatch ๋จ์ถ
server.dispatch_prompt('reviewer_quick.md') ๋ก ๋จ์ผ sub-agent dispatch:
prompt = server.dispatch_and_record(
run_id,
prompt_file="reviewer_quick.md",
step="reviewer.quick",
description="reviewer 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 ์์ ์๊ฐ ํ๋ณด ๊ถ์ฅ.