/claude-apd:apd-pipeline-guidefrom claude-apd
Mandatory operating manual for the APD pipeline. Defines gate contracts, phase maps, file formats, and BLOCK recovery rules. Must be loaded before every pipeline task to unblock the spec gate.
Ships in claude-apd. 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.
The operating manual for one pipeline cycle. Read it, acknowledge the contract, write the marker, proceed. ~2 minutes; cheaper than any single BLOCK it prevents.
This skill is NOT a clarification dialogue. If the task scope is vague, load
/apd-brainstorm FIRST (interactive, optional), converge on a design, then come
back here. This guide is unconditional either way.
spec → builder → reviewer → adversarial → [supervision] → verifier → commit
| Advance | Gate checks at that point |
|---|---|
apd pipeline spec "<task>" | spec-card.md exists, ≤7 R-criteria, .guide-marker present (this skill) |
apd pipeline builder | implementation-plan.md exists, plan-spec consistency (strict), regression surface (Cover/Evidence), no stale pre-spec dispatch |
apd pipeline reviewer | builder ran post-spec, builder cycle cap (default 2) |
| adversarial dispatch | only AFTER reviewer.done (out-of-order start is not recorded — re-dispatch) |
| supervision dispatch | every profile carries a supervisor row (v7.0 — burn, cruise and eco alike), so this applies on whatever profile is declared, once adversarial ran (Full mode) — see Supervision contract below |
apd pipeline verifier | .adversarial-summary + .adversarial-rationale.md present, rationale gate, supervision gate (profile-coupled), spec-hash immutability |
| commit | guard-git: pipeline complete, commit message prefix, no mass staging |
Two independent spec-card switches, routinely confused:
pipeline_mode: polish — lowers the builder AND reviewer caps 2 → 1. It does
NOT skip adversarial: the full builder → reviewer → adversarial → verifier
sequence still runs, just once through.adversarial: skip — <reason> — the Lean opt-out, and the ONLY way to skip
adversarial. Honoured only at ≤2 R-criteria AND fewer than 5 files in the
reviewed scope (.reviewed-files, measured at the reviewer step — v7.1);
otherwise the opt-out is DENIED (warning + INFO|adversarial-opt-out-denied)
and adversarial stays required at the verifier.Lean vs Full is declared in the spec; this guide applies to BOTH.
Dispatch budget (v7.1, CC). Every Agent() call counts against a per-TASK
budget by role class — builder 12 / reviewer 6 / adversarial 2 by default —
counted from the .agents ledger and refused BEFORE the spawn
(dispatch-budget-exceeded). The cycle caps count advances; measured runs
spent 4–5 builder dispatches per advance and 20 per task, and that is where
the hours went. apd pipeline status shows dispatches: builder N/12 · reviewer M/6 · adversarial K/2. Size at the spec: a plan that needs more
than half the builder budget is two tasks — decompose now, not at dispatch 12.
A different budget belongs in the spec card (dispatch_budget: builder=N reviewer=M adversarial=K, honoured only from the SIGNED card). In flight,
apd pipeline raise-cap dispatch <class> <N|unlimited> "<reason>" is the LAST
resort (raises only, logged INFO|cap-raise). Re-advancing the spec of the
same task is not a way to reset the counters: it wipes them and the .agents
ledger, and is logged dispatch-budget-reset with what it discarded.
Wall-clock nudge (v7.1). Past 90 min in a task, the builder and reviewer
advances and the first dispatch over the line print a NOTE with the elapsed
time and the dispatch counts (INFO|wall-clock-nudge). It never blocks, and
it is not a prompt to raise a cap: finish the declared scope, spin off what
arrived in flight, or decompose. A run that is still growing at minute 90 is
the run this signal exists for.
Write .apd/pipeline/implementation-plan.md BEFORE apd pipeline builder.
EVERY ### Section MUST have an **Implements:** header — NO RESERVED NAMES.
## Implementation Plan: <task-name>
### Files to modify
**Implements:** none ← scaffolding sections use 'none'
- src/...
### Backend
**Implements:** R1, R3 ← every dispatch section maps to R-ids
- src/api/... — endpoint changes
### Agents
**Implements:** none ← Agents needs the header too
- backend-builder
- code-reviewer
### Notes
**Implements:** none ← Notes needs the header too
- relevant context
Bidirectional check (verify-plan-spec, strict by default since v6.8.1):
**Implements:** line must exist in spec-card.md### Section must declare R-ids or noneKnown failure shape: headers written for Files-to-modify/create but forgotten on Agents/Notes (asymmetric learning). Write ALL headers FROM THE START.
A task that reaches into a shared module to do its own job must not regress that
module's surrounding behaviour. The adversarial reviewer is not exhaustive on the
first pass — so declare the must-not-break set in spec-card.md and let the gate
check it (verify-regression-surface, in the builder advance).
**Regression surface:**
- RS1: <neighbouring behaviour touched> — **Cover:** existing <Suite>
- RS2: <another> — **Cover:** new <TestName>
- RS<N>: needs a **Cover:** value (existing test / new <name> / none: <reason>).**Regression surface:** none — <reason>.
Leaving it blank when the spec has a Human gate is a BLOCK; an unjustified bare none is a BLOCK.**Evidence:** (≥40 chars)
attesting the module's tests green before+after. The gate checks presence; you run the tests.regression_gate: strict|warn|off (default warn; off ignored on a Human-gate path).Its value is positional: it judges the diff without knowing the intent, which is
how it finds what the contextual reviewer already rationalised away. Since v7.0
that is mechanically enforced (guard-spec-blind), not just asked for. The
whole of .apd/pipeline/ and the APD memory directory are closed to that role —
spec-card, implementation-plan, any earlier rationale, apd pipeline show,
apd report. One exception: .apd/pipeline/.reviewed-files, which IS its scope.
What this means for the dispatch you write:
spec-blind..reviewed-files for scope and let it find what it finds.The blind guard fires ONLY for that role. Builders, the code reviewer, the supervisor and you all read the spec normally — blinding them would deadlock.
AFTER the adversarial-reviewer dispatch, BEFORE apd pipeline verifier, write
.apd/pipeline/.adversarial-rationale.md (note the .md extension) with one
block per finding:
## Finding 1 — <one-line title>
**Severity:** critical | important | minor
**Status:** accepted | dismissed | reviewer-self-dismissed
**Rationale:** <text ≥40 chars required for dismissed/reviewer-self-dismissed>
adversarial: max_defects=... was REMOVED in v7.0 and is ignored if present.
This gate is its replacement, and always did the stronger job: a count cap could
be satisfied by dismissing fewer findings without justifying any of them.The spec card is hashed at the spec advance and the verifier refuses an edited
card, so a task's scope is fixed the moment it starts. A finding that arrives
later — from the reviewer, the adversarial pass or the supervisor alike — and
is not covered by the R-criteria does not widen the task: it becomes a spinoff
(bash .claude/bin/apd pipeline spinoff-finding <id> "<reason>", below) and the task finishes
what it declared. Re-advancing the spec to absorb it is not a shortcut: it
wipes the dispatch counters and the .agents ledger (dispatch-budget-reset),
and the run starts over on a bigger scope with the clock already spent. The
September runs that grew in flight ran five to eight hours.
Every adversarial finding gets one of three dispositions (the code reviewer's and the supervisor's findings take the same three):
accept — real AND in this task's scope. Critical or Important → fix via builder; an accepted Minor is spun off, not fixed in this run (next section).
dismiss — not a real defect → rationale ≥40 chars.
spinoff — real BUT out of THIS task's declared scope (often the ones that
surface at the cycle cap), or a Minor. Do NOT expand the task, do NOT cram it into this
commit, and NEVER apd toggle off to land it (that disables the whole
enforcement layer). Record it as a follow-up task seed and continue in scope:
bash .claude/bin/apd pipeline spinoff-finding <id> "<why out of scope + the follow-up task>"
bash .claude/bin/apd pipeline show deferred # the follow-up backlog
In .adversarial-rationale.md a spun-off finding is still **Status:** accepted
(it is real — it counts in the summary A). spinoff-finding is the durable
deferral RECORD, not a rationale status — the rationale gate only knows
accepted | dismissed | reviewer-self-dismissed, so do NOT invent a spinoff
status (that BLOCKs at verifier).
The spun-off finding becomes its own APD task next — full spec + fresh adversarial + red-green test. That is exactly the treatment a real (often rule-1) defect deserves; cramming it in under a disabled pipeline skips it.
When you ask the user what to do about an out-of-scope finding at the cap, list spinoff FIRST and recommend it. "Expand this task / raise the cap" is only right when the finding is genuinely in scope and the cap raise is justified.
Orthogonal to all three: does the finding generalize? A disposition settles
this instance; a class outlives it. If the same shape can appear elsewhere,
record it once — builders read .apd/lessons.md before they start, so it
becomes education on every future dispatch instead of knowledge that leaves with
the run:
bash .claude/bin/apd pipeline lesson "<the rule, as a class>" "<what it cost>"
bash .claude/bin/apd pipeline show lessons
Write the rule, not the patch, and not one per finding — a file past ~20 entries
gets skimmed rather than read. /apd-finish asks this again at the end of the run.
Applies to every review in the run: the code reviewer, the adversarial pass and the supervisor.
Fixed in this run: Critical and Important findings. A finding that breaks
an acceptance criterion (R<n>) or a declared regression-surface item
(RS<n>) is Important whatever label it came with.
Minor — not fixed in this run. Record it and move on:
bash .claude/bin/apd pipeline spinoff-finding <id> "<what + the follow-up>"
(accepted once the code review is closed — apd pipeline reviewer — or an
adversarial or supervision pass is on record). "It is cheap to fix now" is not
a reason: the fix is cheap, the review it owes is not, and the fix of a Minor
is where the next Minor comes from.
A verdict with no Critical and no Important ends the code review. If the
reviewer gate is still open, advance it (apd pipeline reviewer) — a gate
already advanced is not advanced again — and go on: no further fix round and
no further reviewer for that verdict. The verdicts mean, here and in the reviewer
template: PASS = nothing above Minor · PASS WITH FIXES = at least one Important, no Critical · FAIL = at least one Critical.
A re-review is owed only by the fix of a Critical or an Important. One code reviewer checks it (fresh, or the continued one — "Re-review after a fix" below); the Minor findings of that pass follow the rule above.
After the adversarial fixes, the supervisor is the check. The collateral
of those fixes is one of its charter questions, and its stop has to be the
last agent activity anyway (supervision-not-final), so a fresh code review
between the adversarial fixes and the supervisor checks the same thing twice.
Dispatch one only when a fix reached a file outside .reviewed-files with
more than a test or a few lines.
A defect in code an earlier run delivered is an escape — record it first.
A finding on lines this task did not write (the reviewer calls it
pre-existing, or git blame names an earlier commit), a failing check traced
to such code, or a defect the user or production reports:
bash .claude/bin/apd pipeline escape <file>[:<line>] "<what was wrong>" <cr|adv|sup|verify|builder|prod|user|other>.
APD finds the commit that wrote the line and the run that committed it, and
appends both to escapes.log in the memory directory. Then handle the
defect by the rules above (fix it if it is Critical or Important and in
scope, otherwise spin it off). It records only — nothing is gated on it; it is
the one number that says how much the pipeline lets through.
Measured on one production project (10 cycles, 2026-11): 27 fresh code reviews, 18 of them with nothing above Minor — and after 6 of those another fix round and another fresh review of 15–30 minutes anyway. One cycle ran six fresh reviews; the last three came after a "PASS — no findings".
Set by the project owner in .apd/config; frozen when the spec is signed
(.apd/pipeline/.review-mode), so a change mid-run applies to the next task.
Neither is set by default, and without them every step below is as described
above.
REVIEW_ORDER=parallel — after apd pipeline builder the adversarial pass
may start at once: dispatch the code reviewer AND the adversarial reviewer in
ONE message. Triage each as it returns by the rules above. Advance the
reviewer gate when the code review ends; record the adversarial outcome as
usual. A fix made after the adversarial pass STARTED (a code-review Important
fixed while it was still reading, or an adversarial finding) is judged by the
supervisor on the final diff. The verifier refuses an adversarial pass that
started before the builder step was last signed (adversarial-before-builder).SUPERVISION_WHEN=after-change — the supervisor is owed only when what the
run can commit changed after the adversarial pass STARTED: the start records
it, the verifier compares. Who ran does not matter; what changed does — a fix
by any agent, an edit by hand, a new, deleted or unstaged file, a staged
change, a commit, a stash, a change inside a nested repository. An agent you
dispatched after the adversarial start and that has not stopped also makes it
owed (it may still write). With nothing changed the verifier records
supervision-not-required and goes on; do not dispatch one. Otherwise it says
why ("Supervision owed under SUPERVISION_WHEN=after-change: …") — dispatch it
as always, and a supervisor that ran is judged as always. Outside a git work
tree there is nothing to compare, so the supervisor is always owed. Works with
REVIEW_ORDER=parallel too: a code review beside the adversarial pass that
changes nothing leaves the state as it was.
Measured before the switch existed (one project, 91 supervisor passes): every
accepted supervisor finding came from a run with a change after the
adversarial pass.Full mode (adversarial ran) expects a supervision pass over the FINAL diff before the verifier, on every profile. Rollout: currently a WARN at the verifier; becomes a hard BLOCK in a future release — treat it as required now.
Supervision is topology, not a price tier (v7.0): burn, cruise and eco all
carry a supervisor row, so the layer runs at every price point and the profiles
stay comparable. Do not read a cheap profile as "supervision does not apply here".
It is inert on one axis only: APD_RUNTIME=codex, where the CC supervisor cannot
be dispatched at all (the gate logs supervision-not-applicable).
Sequence, AFTER all adversarial findings are triaged and fixed — with no code review in between (the supervisor is the check of those fixes; see "When a review ends"):
Agent({ subagent_type: "supervisor", prompt: "Final review per charter" }).
The supervisor judges only: R-criteria still met by the final diff,
fix-of-findings collateral, Regression-surface claims vs the diff, commit
verdict. It does NOT repeat the adversarial bug hunt..apd/pipeline/.supervision-summary (Write/Edit tool):
SUPERVISION:T:A:D + Notes — same shape as the adversarial summary..apd/pipeline/.supervision-rationale.md — the SAME
per-finding contract as the adversarial rationale (Severity/Status/Rationale,
three dispositions incl. spinoff, ≥40-char dismissals) plus, per finding
(v7.1), **Question:** Q1 R<n> | Q2 <path>[:line] | Q3 RS<n> — the
charter question it answers and an anchor the verifier checks. The
supervisor's ### Notes are NOT findings: copy them under the SUPERVISION
line of the summary, no disposition, not counted in T, no builder dispatch.
Accepted findings →
builder fix → ONE supervisor re-check (cap: 2 COMPLETED passes — an
exhausted dispatch doesn't count; the supervisor's stop must also be the
LAST agent activity before the verifier, or the gate flags
supervision-not-final).There is NO spec-card opt-out for this gate — by design. The ways out are
apd pipeline reset or switching profile BEFORE the spec advance.
Off unless the project sets APD_REVIEW_RESUME. When a fix owes a re-review
(the fix of a Critical or an Important — "When a review ends" above), a fresh
code reviewer re-reads the whole diff; the one that already reviewed it needs
only what changed since. With the switch set:
bash .claude/bin/apd pipeline review-delta > <scratchpad>/review-delta.patch
(the newest reviewer snapshot; review-delta <agent-id> for a specific one).SendMessage, addressed by its agent id
(not its name): give it the path of the patch, say which of its findings the
fix was for, and ask for a verdict on the delta — fixed / not fixed per
finding, plus anything the fix itself broke.guard-send-message lets exactly this through and nothing else: the
orchestrator, a code reviewer of this task, stopped, with a snapshot of that
stop. The adversarial reviewer, the supervisor and builders are always
dispatched fresh. A resume takes one slot of the reviewer dispatch budget, and
one reviewer can be continued twice — after that, dispatch a fresh one.
APD reminds you at the moment it matters: when a reviewer can be continued, the dispatch of the fix builder and the dispatch of a fresh code reviewer each come back with a note that names its agent id and these steps. Follow it. The SendMessage to the continued reviewer and the dispatch of ONE fresh code reviewer may go out in the same message; two fresh reviewers may not.
Dispatch a FRESH reviewer instead (the full pass) when the delta shows a file
outside what was reviewed (# NEW since the review, or a file first touched by
the fix) that is more than a test or a few lines, when the delta says
# NOT COMPARED, or when the reviewer belongs to an earlier session.
APD_REVIEW_RESUME=shadow — the resume is allowed and measured, but the
reviewer gate does not count a continued reviewer (the mode is recorded
with the resume; changing the variable afterwards does not change that): after the delta verdict
dispatch a fresh code reviewer as before, and note in the session log what
the fresh pass found that the continued one did not. This is how a project
finds out whether the short pass can be trusted there.APD_REVIEW_RESUME=on — the continued reviewer's stop is the evidence for
the reviewer advance.Use the sanctioned read path — cat/ls on .apd/pipeline/ is guard-blocked:
bash .claude/bin/apd pipeline show # digest: criteria, plan, reviewed count, T:A:D, cycles
bash .claude/bin/apd pipeline show spec # full spec-card.md
bash .claude/bin/apd pipeline show plan # full implementation-plan.md
Writes to allowlisted pipeline files (spec-card.md, implementation-plan.md,
.adversarial-summary, .adversarial-rationale.md, .supervision-summary,
.supervision-rationale.md, .guide-marker) go through the Write/Edit tool — bash
redirects to .apd/pipeline/ are blocked by design.
| BLOCK reason | Quick fix |
|---|---|
guide-marker-missing | Load this skill, write the marker (below), re-run spec advance |
plan-spec-consistency issues=N | Add **Implements:** headers / missing R-ids per the inline template; re-run builder (~10s) |
regression-surface issues=N | Add **Regression surface:** with - RS<N>: ... **Cover:** ... (and **Evidence:** on Human-gate paths), or none — <reason>; re-run builder |
rationale-missing | Write .adversarial-rationale.md with T entries; re-run verifier |
rationale-100pct-orch-dismiss | Accept ≥1 finding OR reclassify dismissed → reviewer-self-dismissed |
rationale-count-mismatch / rationale-accepted-mismatch / rationale-status-mismatch | The rationale must RECONCILE with ADVERSARIAL:T:A:D: one ## Finding block per T, blocks with Status: accepted = A, dismissed + reviewer-self-dismissed = D. Fix the file or fix the summary — whichever is wrong |
rationale-malformed-fields | Every block needs all three of **Severity:** / **Status:** / **Rationale:**, and a dismissal needs ≥40 chars of reasoning |
max_builder_cycles-exceeded / max_reviewer_cycles-exceeded | First ask why: is the plan complete, the spec ambiguous, the same finding coming back? Then either decompose into 2+ tasks, or lift the budget in place: apd pipeline raise-cap builder|reviewer <N> "<reason>". Do NOT edit max_cycles in the signed spec — that forces a spec re-advance, which WIPES .agents and destroys the builder/reviewer evidence already earned |
adversarial-before-reviewer | Dispatch code-reviewer first; advance reviewer; THEN adversarial |
adversarial-before-builder | Parallel review only: the adversarial pass on record started before the builder step was signed (a pass from before a rollback or re-advance) — dispatch it again on the current diff |
adversarial-agent-missing | No adversarial-reviewer definition and no valid opt-out, so the layer cannot run. Restore the agent (/apd-setup) — or, only if the task genuinely qualifies (≤2 R-criteria), declare adversarial: skip — <reason>. A missing agent is a setup fault, never an opt-out |
adversarial-unaccounted | Reached the verifier with no .adversarial-pending and no valid opt-out — the layer was dropped rather than run or waived, usually because the agent definition went missing after the reviewer step. Restore it and re-advance the reviewer |
adversarial-summary-without-dispatch | Summary written with no adversarial start in .agents — dispatch the agent for real. (If it DID run and only its stop is missing, that is a dropped hook: apd pipeline reconstruct-agents) |
max_defects-* | Gone in v7.0 — the field is ignored and no longer blocks. Drop the line from spec-card; the rationale gate replaces it |
adversarial-timestamp-unparseable | The .agents ledger is corrupt or was hand-edited — the gate fails closed rather than guess an ordering. Inspect it; apd pipeline reconstruct-agents rebuilds it from the transcripts |
pipeline-incomplete | Commit attempted before verifier.done — finish the pipeline first |
toggle-off-active-pipeline | Don't disable APD mid-run to cram an out-of-scope fix — use apd pipeline spinoff-finding <id> "<reason>", or apd pipeline reset to end the run |
supervision-missing (warn now, BLOCK later) | Dispatch the supervisor on the FINAL diff, record .supervision-summary (+ rationale if T>0); re-run verifier. Applies on every profile |
supervision-summary-without-dispatch | Summary written but no supervisor in agent log — actually dispatch the agent first |
supervision-not-final | Agent activity after the last supervisor stop — re-dispatch supervisor on the FINAL state |
supervision-cycle-cap | >2 completed supervisor passes — the loop is the problem; reset or finish the fix properly |
supervision-rationale-untagged (v7.1) | A ## Finding block has no **Question:** Q1 R<n> | Q2 <path> | Q3 RS<n> line. Either it answers one of the charter questions — tag it — or it is a Note: move it under the summary line and drop the block |
supervision-question-invalid (v7.1) | The anchor does not hold: the R-id is not a criterion of this spec, the RS-id is not declared, or the Q2 path is not in .reviewed-files. Fix the anchor or reclassify as a Note |
These are not phase gates. They stop the individual call and the run continues.
| BLOCK reason | What it means |
|---|---|
orchestrator-code-write | You tried to write a code file. The orchestrator writes spec, plan, docs and config — production code goes through a builder agent. This is the pipeline's whole premise, not a formality |
out-of-scope-write / out-of-scope-bash-write | An agent wrote outside its declared scope. Give the work to the agent that owns that path, or widen that agent's scope deliberately — routing the same write through bash to dodge it is the bypass the guard exists for. Since v7.1 the bash guard reads the command as the shell does: a quoted >, a generic <T>, ->/=>/>=, a heredoc body are text; $VAR set in the same command, cd, absolute paths inside the scope and the session scratchpad all resolve. A block you still get names the resolved target — it is a real out-of-scope write (mv counts its source too; xargs <writer> is refused because its targets are not visible — name the files; bash -c/eval text is re-parsed). The audit line names the agent |
pipeline-state-write | A shell write reached .apd/pipeline/ — through cd, a variable, rm -rf or truncate as much as through a literal path (v7.1). Pipeline state changes only through apd pipeline <phase>; the files you may write go through the Write/Edit tool; reads go through apd pipeline show |
dispatch-budget-exceeded (v7.1, CC) | This task has dispatched its per-task budget of that role class (builder 12 / reviewer 6 / adversarial 2 by default) — counted per DISPATCH, not per advance. In order: spin off the out-of-scope finding (apd pipeline spinoff-finding) or decompose; lift in place with apd pipeline raise-cap dispatch <class> <N> "<reason>"; or reset. apd pipeline status shows the counters |
secret-access | A call touched .env*, a key, a cert or a keystore. Nothing in the pipeline needs them |
plugin-cache-write | A shell write resolved INTO the Claude Code plugin cache (…/plugins/cache/…) — a redirect, sed -i, rm, mv out of it, a cd into it, or a writing program naming a plugin path. Plugin files are read-only for every caller. Reading them, executing from the cache, or copying OUT of it is fine (v7.1.4 — judged on the resolved target, so 2>/dev/null or a quoted > before a plugin path no longer blocks) |
opaque-shell-body | A shell was fed text the guard cannot read — sh -c "$CMD", eval "$X", bash -c "$(…)" where the variable is not assigned in the same command (v7.1.4). Write the command out; a same-command assignment (CMD="…"; sh -c "$CMD") is expanded and judged normally |
nested-shell-refusal | You (the orchestrator) ran a shell inside a shell — bash -c "…", eval "…", a heredoc fed to bash — and the inner command was refused on its own (it reached .apd/pipeline/, the plugin cache, or fed a shell a variable body). Run the command at top level to see the exact reason, or drop it (v7.1.4) |
spec-blind | The adversarial reviewer reached for the spec / plan / a rationale / the memory dir. Working as intended — see the blind-dispatch section above. Fires for that role only |
portability-<cmd> | A GNU-ism on macOS, or a BSD-ism on Linux. apd env prints the platform and the portable form of each blocked command |
send-message-during-pipeline | SendMessage continues an agent WITHOUT firing SubagentStart/Stop, so the work never reaches .agents and the next gate rejects it as "no agent dispatched". Dispatch with Agent() instead. One exception, only with APD_REVIEW_RESUME=shadow or APD_REVIEW_RESUME=on: continuing a stopped code reviewer by id for a delta re-review (see "Re-review after a fix"); the refusal then names the condition that failed |
parallel-same-agent | Two dispatches of the same agent type inside the window — serialize them; concurrent same-role writes are how scope collisions happen |
pipeline-state-write on a read | You used bash cat/ls on pipeline state — use apd pipeline show |
commit-no-prefix / push-no-prefix | The APD commit prefix is missing. Recurring in practice — check the message shape before every commit. The marker may prefix the whole command or the git commit/git push statement itself (git add a b && APD_ORCHESTRATOR_COMMIT=1 git commit …, v7.2.3) |
forged-done-file | A .done file written by hand. Phase files come from apd pipeline <phase>, never from an editor |
Three of these are new in v7.0 — spec-blind, secret-access and
out-of-scope-write were wired to per-agent frontmatter hooks, which do not
fire; they now run session-level. If a run of yours hits one of them for the
first time, that is the guard finally working, not a regression.
The spec gate reads .apd/pipeline/.guide-marker. Write it as the LAST step of
this skill, with the exact task name you will pass to the spec advance:
printf '%s|%s\n' "<task-name>" "$(date -u +%Y-%m-%dT%H:%M:%SZ)" > .apd/pipeline/.guide-marker
bash .claude/bin/apd pipeline spec "<task-name>"
Name mismatch or missing marker → hard BLOCK. There is no --skip flag — this
gate has no opt-out by design (reading the contract is cheaper than negotiating
about it). The marker is wiped on reset and on task completion.
You're done when:
**Implements:**, rationale .md).guide-marker is written with the exact task nameWhat SKILL.md sets; muted values are Claude Code's defaults
lowOther plugins' skills for the same job
npx claudepluginhub zstevovich/claude-apd --plugin claude-apd11 skills in this plugin
/apd-auditUse when verifying that APD is correctly configured in the current project — qualitative deep audit of agents, hooks, CLAUDE.md, pipeline state, MCP wiring, and guardrails. Goes further than verify-apd. Triggers on "audit APD", "review setup", "is APD configured", "verify framework", "check APD", "APD health", "is everything wired", after any major framework upgrade or version bump./apd-brainstormUse BEFORE writing the APD spec-card.md whenever the task is vague, broad, ambiguous, or has multiple reasonable approaches. Asks ONE question at a time, presents 2-3 options when there are real choices, converges on a design the user explicitly approves. Triggers on "improve X", "what should we", "thinking about", "options", "not sure", "maybe", "vague", "broad", "redesign", any spec-card.md with unclear scope or fewer than 3 R-criteria. For the pipeline gate contract (plan format, rationale format, BLOCKs) load /apd-pipeline-guide — that one is mandatory on every task; this one is for unclear scope./apd-debugMANDATORY before re-dispatching the builder after any APD verifier failure or critical reviewer finding. Use on any bug, test failure, build failure, error, crash, regression, or unexpected behavior during the APD pipeline. Four-phase root-cause analysis — investigate, pattern-match, hypothesize + controlled test, fix with TDD. Triggers on "bug", "fail", "failing", "broken", "doesn't work", "error", "crash", "regression", "verifier blocked", "reviewer rejected"./apd-finishMANDATORY after every successful APD pipeline commit. Use as soon as the pipeline reports commit done — verifies tests from a clean state, shows the pipeline report, presents four options (push, push+PR, keep local, discard), executes the user's choice. Triggers on "after commit", "push", "PR", "pull request", "deploy", "next", "pipeline done", "shipped", commit hash present in pipeline state./apd-githubUse when the project has GitHub Projects configured (GITHUB_PROJECTS_URL in CLAUDE.md) and APD pipeline tasks need to sync with the board. Creates issues for specs, moves cards through columns (todo → in-progress → review → done), closes on commit. Triggers on "GitHub Projects", "issue", "board", "card", "sync", "kanban", "project board", any APD pipeline phase transition when a board URL is configured./apd-miroUse when the project has a Miro board configured (MIRO_BOARD_URL in CLAUDE.md) and the APD pipeline dashboard needs updating. Visualizes current pipeline status, completed tasks, recent metrics, and active spec cards. Triggers on "Miro", "dashboard", "board update", "visualize pipeline", "pipeline view", "metrics", any pipeline phase change when a Miro URL is configured.