一键导入
review-loop
Agent-driven peer review loop: structured findings, dispositions, circuit breakers, commit strategies, sandbox isolation, and plan-phase advisory mode.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Agent-driven peer review loop: structured findings, dispositions, circuit breakers, commit strategies, sandbox isolation, and plan-phase advisory mode.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Multi-agent delegation rules, three-phase workflow (Plan/Build/Review), model selection, collaboration gates, and Ralph Loop integration.
Autonomous build driver after SDD spec approval: phase-scoped headless build sessions, driver-owned commits, cross-provider review gates, milestone pauses, and fail-closed escalation — under explicit opt-in autonomy profiles.
When and how to ask clarifying questions before implementing. Data model review gate and ambiguity resolution rules.
Quality gates, prohibited patterns, verification discipline, and self-audit rules for all code generation and review sessions.
Cross-copilot portable conventions: read before write, minimal changes, git discipline, project structure, and priority rules.
Copyright header rules for generated source files. Applies the company name from providers.toml to new files.
| name | review-loop |
| description | Agent-driven peer review loop: structured findings, dispositions, circuit breakers, commit strategies, sandbox isolation, and plan-phase advisory mode. |
Agent-driven peer review loop for Build and Plan phases. The Build agent drives the loop; the reviewer is a separate, read-only LLM.
The review loop is agent-driven: the Build agent calls /review-submit, which invokes review-round-runner.sh as a synchronous subprocess. The runner executes one round and returns. The agent reads the result and decides the next action. There is no long-running orchestrator.
Driver-as-submitter mode: under the auto-build loop (auto-build-loop.md), scripts/auto-build-loop.sh plays the /review-submit role — it initializes .cct/review/state.json, invokes the runner with CCT_REVIEW_BASE_REF=<phase-base> so the whole multi-commit phase diff is reviewed (the default remains HEAD~1), commits review fixes itself, and injects commit_ref into fixed dispositions. The runner's contract (exit codes, file formats, breakers, sandbox) is unchanged.
Agent completes work → /review-submit → review-round-runner.sh (one round)
↓
EXIT 0 (PASS) → loop-summary.json → /phase-complete
EXIT 1 (FAIL) → findings-round-N.json → agent fixes → /review-submit
EXIT 2 (BREAKER) → breaker-tripped.json → agent stops → /review-decide
All review-loop artifacts live under .cct/review/ during the active loop.
| File | Written By | Purpose |
|---|---|---|
state.json | /review-submit (init), runner (update) | Loop state: round, attempt, findings, breaker counters |
findings-round-N.json | Runner | Structured findings for round N |
resolution-round-N.json | Build agent | Builder's response to each finding |
breaker-tripped.json | Runner | Breaker context, awaiting /review-decide |
decision.json | /review-decide | Human's decision: approve, reject, or retry |
loop-summary.json | Runner (PASS) or agent (bypass) | Final record of all rounds |
On loop completion, the completing actor copies loop-summary.json and writes a build-review.md artifact to specs/<feature-id>/collaboration/.
Each finding has a stable ID computed from SHA-256(file + category + normalized_description) truncated to 8 hex chars, prefixed with f-. Line numbers are excluded from the ID to remain stable across edits.
{
"id": "f-a1b2c3d4",
"severity": "blocking|warning|note",
"category": "correctness|security|style|performance|design|testing|documentation",
"file": "path/relative/to/project",
"line_hint": "semantic anchor (display only)",
"description": "clear description",
"suggested_fix": "actionable fix",
"first_seen_round": 1,
"disposition": null
}
| Severity | Blocks PASS? | Builder must respond? |
|---|---|---|
blocking | Yes | Yes — must set disposition |
warning | No | Optional |
note | No | No — informational |
The builder responds to each blocking finding with a disposition in resolution-round-N.json:
| Disposition | Meaning | Required fields |
|---|---|---|
fixed | Builder addressed the finding | commit_ref (SHA of fix commit) |
disputed | Builder disagrees | detail (explanation) |
deferred | Acknowledged, fix later | detail (optional) |
not-applicable | Finding doesn't apply | detail (optional) |
All breakers escalate to human — there is no path to automatic acceptance of unresolved work.
| Breaker | Default | Env Var | Behavior |
|---|---|---|---|
| Max rounds | 5 | CCT_REVIEW_MAX_ROUNDS | Escalate to /review-decide |
| Wall-clock timeout | 900s | CCT_REVIEW_TIMEOUT_SEC | Escalate to /review-decide |
| Stale findings | 2 consecutive | CCT_REVIEW_STALE_THRESHOLD | Escalate to /review-decide |
| Provider unavailable | — | — | Escalate to /review-decide |
A stale finding is one that appears in N consecutive rounds with disposition fixed each time (builder thinks they fixed it, reviewer disagrees). Stale findings remain blocking — they do not auto-downgrade.
When a breaker fires, the agent stops and the human runs /review-decide:
| Decision | Effect |
|---|---|
approve | Agent writes loop-summary.json with bypass: true. Proceeds to /phase-complete. |
reject | Agent logs rejection. No merge. |
retry | Reset breaker state. Round numbering continues monotonically (next round is N+1, not 1). |
| Mode | Flag | Behavior |
|---|---|---|
single | --review-commits single | Amend same commit each round |
per-round | --review-commits per-round | New commit per fix round: fix(review): round N — <summary> |
squash | --review-commits squash (default) | Per-round during loop; git reset --soft to pre-review commit on PASS |
phase-workflow.md commit-gate rules./review-submit, the worktree must be clean (all fixes committed).git reset --soft fails, fall back to a merge commit — never force-reset or lose work.Product decision: Plan review is advisory and single-round.
/review-submit roundplan-consult.md with mode: consultThis is deliberately narrower than Build-phase review. Plan artifacts are already approved by the human via the Plan Approval Gate before Build begins.
The reviewer runs in a snapshot copy of the working tree:
cp -R to temp dir.git directory (reviewer cannot create commits)SSH_AUTH_SOCK and GPG_AGENT_INFO unsetCCT_READ_ONLY=true set in environment