/agentloop:design-reviewfrom agentloop
Runs iterative clean-context reviews of design docs, plans, or GitHub issues with independent scored reviewers per round, capped at 2 rounds.
Ships in agentloop. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Repo profile — read
.claude/repo-profile.mdfirst. This skill is repo-agnostic; arc is the reference implementation. Where it references repo identity or paths, read the profile (repo_slugetc.). Arc's own provenance for any lessons is not inlined here (fuller case narratives, where they exist, are under.claude/case-law/).
Review a design with clean-context subagents. Each round is a fresh reader: no inherited bias, and the reviewer does not modify files.
/agentloop:design-review <path> [--target <score>] [--max-rounds <n>]
<path> — a design file, or a directory with design.md + tasks.md--target <score> — default 95--max-rounds <n> — default 2. Raise it only when a human asks./agentloop:design-review planning/provider-architecture-rethink/
/agentloop:design-review intent/my-feature/INTENT.md --target 90
/agentloop:design-review planning/my-plan/ --target 95 --max-rounds 2
Run it when it earns its cost. Skip when the human has already recorded the design decisions (a decision list or pinned comment they wrote or approved) — say so where the plan lives. Otherwise run it, capped at 2 rounds. A plan that is not converging after 2 clean-context rounds needs a human decision, not a third reviewer.
planning/ file)When the plan lives in a GitHub issue (the human confirmed it in comments), do not commit a planning/ doc.
design.md / tasks.md into a scratch / gitignored dir and run /agentloop:design-review <scratch-dir> on it.Autonomous escalation — ask via an issue comment, never block in-session.
In the issue-native flow nobody is babysitting the session, so an escalation
that would normally call AskUserQuestion and wait must instead be posted as
a comment on the source issue and the run paused there. If the review loop hits
an unrecoverable point — a genuine design fork, an AskUserQuestion-worthy
ambiguity, a needed architecture change, or an AFS-principle conflict (see the
ESCALATION list under "Step 5: Fix Issues") — do not sit waiting for an
inline answer. A technical fork goes to the review jury (two clean-context reviewers
of other engines, tallied; r2-admission.md) and the
work continues on its result. Only an R2 decision is posted as a self-contained
question comment (first line after the identity line R2: <category>, then options,
recommendation, what's blocked) for a person; stop that item until it is answered. Only
fall back to inline AskUserQuestion when a human is demonstrably present and
interacting in this session.
Carve-out: issue-native rendering is only for transient feature plans. Durable specs (docs/architecture/*, protocol specs, intent/*/INTENT.md, conformance targets) are reviewed in place. (issue-sweep drives the feature/design handoff.)
Step order, do not reorder:
tasks.md is required).
0.5 / 3. tasks.md check — generate, review without it, or skip.When classifying or scoring, read reference/dimensions.md. The loop diagram: reference/review-loop.md.
path is required. target defaults to 95. maxRounds defaults to 2. A directory: collect design.md, tasks.md, plan.md, INTENT.md, README.md, and other planning files in it.
tasks.md beside it; numbered phases with file paths, function names, or test specs; task-level "Add X to Y".Print the classification before continuing: document type, review strategy, test-coverage hard requirement yes/no.
Should have tasks.md when the doc describes future implementation that can be decomposed (待做 / Phase N with concrete changes, unimplemented features with enough detail, proposed fixes). Should not when the work is already done, the doc is only analytical, or it is a decision record / post-mortem.
tasks.md — decide, don't stallUnattended (no human; the hook denies AskUserQuestion): do not ask. Default to option 1 — generate tasks.md from the design with the test-coverage hard requirement ON, then review.
Interactive, when a human is present, ask with three options:
tasks.md, then review (Implementation Plan strategy, hard requirement ON).tasks.md and stop.A document that should not have tasks.md skips this step. Generation rules (6 test categories, ⚠️ NEEDS DECISION, no duplicated rationale): reference/tasks-md.md.
For each round from 1 to maxRounds, launch a clean-context, read-only subagent. The prompt depends on the type from Step 2; {previousScore} is empty on round 1 and — 上一轮 {score}% after that.
Hard requirements (a miss is NOT APPROVED regardless of score):
### E2E Verification (mandatory) section (named session, real afs_* calls, expected JSON, one negative case) — missing or "tests passed" with no call → NOT APPROVED.path:line (code wins over planning docs; mark the doc stale) and every number is measured (command + output) or explicitly an unverified estimate. An ungrounded claim or an invented number → NOT APPROVED. If <lesson_ledger_dir> in .claude/repo-profile.md is not none and <lesson_ledger_dir>/absorbed.yaml exists, scan its status: absorbed / promoted entries matching the problem area and read each matching rule_home (candidates/pending/ is not grounding; if an entry conflicts with shipped code, shipped code wins — flag ledger stale: <id>).Parse the score and the issue list. Then:
NOT APPROVED does not count) → stop, success.When running a review round, read reference/prompts.md.
Fix documentation accuracy and completeness only. Do not change architecture direction.
tasks.md.ESCALATION — stop and ask:
Do not make the architecture decision alone. Interactive: AskUserQuestion. Issue-native: do not block in-session — the review jury decides a technical fork; only an R2 decision is posted for a person. See Autonomous escalation above.
After the fix, commit, so the next round's subagent sees the files.
## Design Review Complete
**Document:** {path}
**Type:** {document type}
**Rounds:** {roundsUsed} / {maxRounds}
**Score progression:** {round1}% → … → {final}%
**Lessons read:** <id → rule_home, or none>
**Status:** APPROVED ✓ / NOT APPROVED (best: {score}%)
If approved, list remaining non-blocking issues from the last round.
tasks.md generation is opt-in when a human is present; unattended mode defaults to generate (Step 3). Never invent architecture to fill a gap.path:line (code wins); a number is measured or labeled an unverified estimate, otherwise delete it. A design on a wrong foundation is not APPROVED.Essays: reference/principles.md.
Every design-review comment posted to an issue ends with:
<!-- sweep-trace: {"ver":1,"issue":N,"step":"design","val":"<val>","run":"<ISO8601>","runner":"<runner>","skills":"<hash>"} -->
This is the machine marker issue-sweep uses. The identity header is not a marker. Without the trace, the comment is treated as unhandled human input and repeated every round.
Field-by-field: reference/sweep-trace.md.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub arcblock/agent-skills --plugin agentloop24 skills in this plugin
/build-phasesExecute a phased implementation plan (tasks.md) autonomously, one phase at a time: implement, then verify (static + dynamic + adversarial) before advancing. Use for a multi-phase build of one issue, attended or unattended./codex-review-backlogScan merged (optionally open) PRs for unhandled Codex / bot review comments, re-validate each against main, fix the easy ones, track the hard ones. Use for "codex backlog", "scan Codex reviews", late bot findings after a merge wave, or a daily routine./epic-conductorAttended end-to-end implementation of a whole epic: decompose into sub-issues, one isolated worker each, package tests, one clean-context review, one batched fix, PR, merge, next wave. Use to build an epic with a reachable human./factory-dispatchStaged factory dispatch (epic #6896, superseding the retired #4289 topology). Stage 1 — current dispatch path — is one local ARC instance scheduling locally installed code-agents via work-board Schedule → /dev/code-agents/.actions/dispatch-work (work + engine only; the host creates the run's worktree under the factoryRepo setting, #6911; the CLI `arc work dispatch` calls the same action, from inside a code-agents run only — a human CLI dispatch fails closed until #8733); no worker clone or :4900 cockpit required. #6596's acceptance item 4 (a real GitHub commit/comment from the run) is still unmet; end-to-end is tracked by #6896 / #6928 (acceptance command). Stages 2-4 (simulated-remote / LAN / cloud workers, contract in #4643) add capacity without blocking stage 1 — use the worker-clone procedure in this file only from stage 2 onward.
/factory-plannerThe factory's own sprint planner (scrum master): wake only the work whose recorded wake condition fired, judge each into a closed verdict set, and advance self-plannable tracks stage by stage (design → build → accept) via the trusted plan-submit entry. State lives in work objects; GitHub issues are synced input. Never codes, merges, approves directly or picks an engine. Live (R1–R8 landed; FACTORY_PLANNER_DRY_RUN=1 falls back to dry-run)./factory-portfolioThe factory's portfolio planner, one layer above factory-planner: daily (full re-rank weekly) it clusters idea / planning / research work into ranked epic plans with value, blast radius, cost, order, release and per-task-type acceptance; cuts trivia with a wakeOn. Reversible calls apply, irreversible or external ones wait on a person. Never codes or dispatches. Dry-run only until reference/prerequisites.md lands.