/code-review:singleton-dispatchfrom code-review
Spawns a single synchronous LLM agent task for PLN-725 pipeline stages 11 (extract signals) and 15 (coverage critic). Reads prepare-stage manifest status and dispatches only when status is 'needs_agent'.
Ships in code-review. 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.
None: SKILL.md is the whole skill.
This skill is the canonical PLN-725 single-agent dispatcher for /code-review. It is split out of commands/start.md so the orchestration spine stays lean; the orchestrator invokes it from walker-contract step 6 immediately after stage_11_extract_signals or stage_15_coverage_critic finishes. The content below is relocated verbatim from start.md.
Walker contract step 6 points here. Two stages (stage_11_extract_signals, stage_15_coverage_critic) emit a manifest whose status field decides whether a singleton LLM agent must be spawned. This section codifies the dispatch — the same protocol applies to both stages with different paths.
After the prepare stage finishes, read its manifest:
| Stage | Manifest location |
|---|---|
stage_11_extract_signals | <CR_DIR>/extract_signals_manifest.json |
stage_15_coverage_critic | <CR_DIR>/coverage.json (critic section) |
Parse status:
status | Action |
|---|---|
"cache_hit" | Skip dispatch. Prepare already wrote the canonical output (extract_signals.json for stage_11; coverage.json.final for stage_15). The downstream sibling consolidate stage will no-op. |
"skipped" | Skip dispatch. Emitted by coverage-critic-prepare for any of three reasons (carried in the manifest's reason field): no-critic (operator passed --no-critic), no-roster (loaded available_reviewers.json is empty — no project agents configured), or no-candidates (roster is non-empty but every reviewer is already in the initial plan — nothing left for the critic to propose). In all three, prepare wrote coverage.json.final with critic_status: "skipped". The downstream sibling consolidate stage will no-op. |
"needs_agent" | Spawn the singleton agent below. |
For status: "needs_agent", the manifest carries the inputs the agent needs:
| Field | Use |
|---|---|
prompt_path | The agent's system prompt path — pass as {PROMPT_PATH} below; the agent reads it itself. |
input_path | The bounded input bundle (plan + signals + AVAILABLE list for stage_15; file list + diff excerpts + intent for stage_11) — pass as {INPUT_PATH}; the agent reads it itself. |
extra_inputs | Every other file the agent reads, as a list of paths (stage_11: the taxonomy snapshot <CR_DIR>/extract_signals_taxonomy.json; stage_15: the diff summary <CR_DIR>/coverage_critic_diff_summary.json) — pass as {EXTRA_INPUTS}; the agent reads them itself. |
model | Model tier for the dispatch (haiku for signal-extraction, sonnet for coverage-critic). |
Every path in a needs_agent manifest is absolute. Pass them through verbatim: the singleton Task runs in the session's checkout, which on a worktree-based run is not the review root, so a relative path would resolve against the wrong tree.
The manifest's output_path / coverage_state field is the canonical sibling consolidate output (extract_signals.json for stage_11; <CR_DIR>/coverage.json — the final section — for stage_15), NOT where the agent writes. The agent's write target is fixed by convention:
| Stage | Agent writes to |
|---|---|
stage_11_extract_signals | <CR_DIR>/pln725_extract_signals.json |
stage_15_coverage_critic | <CR_DIR>/pln725_coverage_critic.json |
These paths match the --agent-output arg the sibling stage's args declare, so the consolidate cmd finds the file with no walker substitution.
Spawn one synchronous Task (do not set run_in_background: true). Unlike the reviewer / verifier fleets — which spawn many background tasks and collect them with TaskOutput — the PLN-725 dispatch is a singleton that the walker waits on inline. A synchronous Task returns after the agent finishes; there is no task handle to pass to TaskOutput and no wait step needed:
subagent_type: "code-review:code-review-worker" (same allowlist as the verifier fleet — Read, Write, Grep, Glob).
model set to the manifest's model field.
Prompt template:
You are the PLN-725 SINGLE-AGENT DISPATCH ({STAGE_LABEL}). Your system
prompt is at:
{PROMPT_PATH}
Read it. Your input bundle is at:
{INPUT_PATH}
Your other inputs are at:
{EXTRA_INPUTS}
Read the bundle for the contract you are validating against. Write
your output JSON to:
{OUTPUT_PATH}
Do not write anywhere else. Do not read source files in the
repository unless the system prompt explicitly says so.
Placeholder substitution map (do NOT substitute every placeholder from the manifest — output_path in the manifest is the consolidate target, not the agent target):
| Placeholder | Source |
|---|---|
{PROMPT_PATH} | manifest.prompt_path |
{INPUT_PATH} | manifest.input_path |
{EXTRA_INPUTS} | manifest.extra_inputs, one path per line, each indented two spaces. Pass every entry and nothing else. If the list is empty or absent, delete the "Your other inputs are at:" line and the {EXTRA_INPUTS} line. |
{OUTPUT_PATH} | The by-convention agent write target from the table above — pln725_extract_signals.json (stage_11) or pln725_coverage_critic.json (stage_15) in the same absolute directory as manifest.input_path (that directory is <CR_DIR>). NOT manifest.output_path. |
{STAGE_LABEL} | "signal-extraction" for stage_11, "coverage-critic" for stage_15. |
After the Task returns, hand control back to the caller. In the default run-prefix flow (the caller is start.md's Deterministic Prefix loop): do NOT advance the walker — return, and start.md re-invokes run-prefix --resume-from <resume_stage>, which runs the sibling consolidate stage. In the per-stage fallback walk (the caller is walking stages one at a time): advance the walker to the sibling consolidate stage yourself. Either way, no TaskOutput call — that's for background tasks; synchronous Tasks complete before control returns.
pln725_*.json output after the Task returns is NOT a fatal error. The sibling consolidate stage detects the missing file and fails closed — extract-signals emits the fail-closed default signal set + a signal-extraction-failed finding; coverage-critic leaves the initial plan as final + a coverage-critic-failed finding.Both "cache_hit" and "skipped" (any of no-critic / no-roster / no-candidates) mean prepare wrote the canonical output file itself. The walker advances to the sibling consolidate stage as normal; the sibling stage's cmd detects the manifest status, writes a one-line no-op JSON to stdout, and returns 0. No orchestrator-side branching needed.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
pln-725, agent-dispatch, pipeline-orchestration, code-review
npx claudepluginhub closedloop-ai/claude-plugins --plugin code-review5 skills in this plugin
/fixVerify and fix BLOCKING/HIGH code review findings from a prior review session via category-dispatch, then run project verification./present-localRender the operator-facing local-mode code review results at stage_29_present. Covers BLOCKING/HIGH/MEDIUM section templates, Justified Findings (PLN-721), Dismissed Findings (PLN-722), Verifier Stats footer (PLN-773), operator-flag descriptions, override precedence rule for stage_22b, Validation Summary, and final Summary. Invoke when MODE=local AND stage_29_present is reached. Do NOT use for GitHub mode — see prompts/github-review.md. Do NOT use for Gate A hygiene-only early-exit — that path is mode-agnostic and remains in start.md alongside the Gate A definition./spawn-reviewersSpawn and collect the reviewer fleet at stage_20_spawn_reviewers. Consumes spawn.json.spec (the authoritative spawn spec from derive-spawn-spec / derive-static-spec), resolves CODE_INTEL_ALLOWED and CODE_INTEL_REQUIRE_ROOT_ARG, builds per-agent prompts from the per-agent template + role suffixes (Bug Hunter A/B, Unified Auditor, Domain Critics, Impact Analyzer), handles the standard, fast-path, all-cached-BHA, and gated-by-verify cases, and runs the spawn/collection contract and agent-failure recovery. Falls back to the static reviewer table when spawn.json marks arbitrate_status:"fallback". Invoke when stage_20_spawn_reviewers is reached (both MODE=local and MODE=github). Do NOT use for the verifier fleet (stage_23 — see the verify-findings skill) or the PLN-725 singletons (stage_11/stage_15 — see the singleton-dispatch skill)./verify-findingsDispatch and collect the finding-verifier fleet at stage_23_verify_findings (PLN-722). Reads verify_manifest.json (written by stage_22b_verify_prepare), spawns one falsify-oriented verifier Task per to_verify[] entry with mode-specific Task scheduling (GitHub mode dispatches verifiers synchronously; local mode uses parallel background + blocking TaskOutput), skips cache_hits[], and collects outputs without retry — missing outputs degrade to pending_verification[] (and, in GitHub mode, a missing BLOCKING/HIGH verifier raises a coverage-gap signal). Invoke when the walker reaches stage_23_verify_findings. Do NOT use for the reviewer fleet (stage_20 — see the spawn-reviewers skill) or the PLN-725 singletons (stage_11/stage_15 — see the singleton-dispatch skill).Other plugins' skills for the same job