/claude-apd:apd-auditfrom claude-apd
Performs a qualitative deep audit of APD configuration — agents, hooks, CLAUDE.md, pipeline state, MCP wiring, and guardrails. Goes beyond mechanical checks to assess content quality.
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.
Read when SKILL.md points to them.
Qualitative review of how APD is configured in the project — content quality, not just file existence. Pairs with
verify-apd(mechanical checks).
Use when:
/apd-setup — confirm everything is correctverify-apd passes but something "feels off"Skip when:
verify-apd itself is failing — fix those mechanical issues firstverify-apd is faster| verify-apd | /apd-audit |
|---|---|
| Files exist? | Content correct and complete? |
| JSON valid? | Hook if patterns correct? |
| Agents have model? | Agents have correct model/effort/color? |
| Pipeline runs? | Pipeline output matches expected format? |
| Mechanical ✓/✗ | Qualitative review |
bash ${CLAUDE_PLUGIN_ROOT}/plugins/apd/bin/core/verify-apd --no-e2e
--no-e2e (v7.2.4) skips Section 8. That section drives a synthetic pipeline through the
project's REAL pipeline directory — and through gh-sync when it is wired, which opens a
GitHub issue. An audit reads; run the full form only on an idle project and on the user's go.
If FAIL → fix those first. This skill builds on top of verify-apd, not replaces it.
For each agent in .claude/agents/*.md:
Roles that must EXIST — check presence before quality:
code-reviewer — missing → the reviewer advance BLOCKsadversarial-reviewer — missing → the reviewer advance BLOCKs (adversarial-agent-missing).
Until v7.0 its absence silently disabled the whole adversarial layer, so a project
that has been running "clean" without this file was running without the layer.supervisor — missing → supervision-missing at the verifier (every profile since v7.0)Frontmatter check:
model: — full ids only, never a bare alias. opus/sonnet resolve to whatever
the runtime maps them to today, which is how a corpus moved between model generations
unnoticed. Builders claude-sonnet-5-5, code-reviewer claude-opus-5-5,
adversarial-reviewer claude-sonnet-5-5, supervisor claude-opus-5-5.
Do not "fix" a model a profile owns: apd profile status shows which roles the
declared MODEL_PROFILE manages. A conf with no row for a role means the template pin
stands — flag a mismatch, do not rewrite it.effort: — builders xhigh; code-reviewer, adversarial-reviewer and supervisor maxcolor: — should be set (builders any of blue/green/cyan/purple; orange on code-reviewer, red on adversarial-reviewer, purple on supervisor — the template pins)permissionMode: — builders bypassPermissions, reviewers planmaxTurns: — APD ships none; a project value is a working cap set on purpose: report it, never strip it
(the /apd-setup step 5c rule). CC enforces the field again since 2.1.246 — re-measured 2026-10-01 on
2.1.286: a capped subagent returns partial output and is resumed via SendMessage. The ledger records
every same-id re-start as resume (v7.2), so a capped-and-resumed agent is ONE dispatch for
apd pipeline status and the dispatch budgetomitClaudeMd: — true on adversarial-reviewer (v7.2, CC ≥ 2.1.271): the context-free reviewer
must not load the project's own CLAUDE.md files either; missing → apd-init refreshes the agent
(with a .bak.pre-v<version> backup). Not on the reviewer or the supervisor — they need the contextskills: — builders list apd-tdd (v7.2.2: the TDD procedure workflow.md mandates is PRELOADED into
the dispatch; a subagent can invoke a skill only through the Skill tool, which no APD builder carries —
measured 11 dispatches, 0 skill loads on a project whose builders lacked the line). Missing → IMPORTANT,
/apd-setup step 5c adds it; do not add Skill to tools insteadmemory: — project for builders, but none for adversarial-reviewer and
supervisor. Those two carry the decontextualization contract; flagging them for a
missing memory: project inverts the thing that makes them worth dispatching.supervisor.md body carries the v7.1 contract: the **Question:** Q1 R<n> | Q2 <path> | Q3 RS<n> tagging rule and a ### Notes section. apd-init refreshes a pre-v7.1 copy on
its own (previous copy kept as supervisor.md.bak.pre-v7.1), so a copy without it means
no session has run since the update — run apd-init, do not patch the body by hand.Hook check:
if: field must be inside hook objects, NOT at matcher levelif patterns (e.g., Bash(git *) not Bash(APD_ORCHESTRATOR_COMMIT=1 git *))${CLAUDE_PLUGIN_ROOT}/plugins/apd/bin/adapter/cc/ (the CC shims;
bin/core/ holds the runtime-neutral implementations they call)adversarial-reviewer carries the guard-spec-blind text (v7.0) — a marker, NOT a hook: the guard runs session-level
from hooks/hooks.json and finds the agent by agent_type; the template says it is deliberately not
wired per-agent. A copy without the text is pre-v7.0 — apd-init refreshes it (backup
.bak.pre-v<version>); do not add a hook lineThe per-agent
hooks:block is DATA, not execution. It never fires (measured on CC 2.1.220; on CC 2.1.259–2.1.287 it is attempted and fails to launch — "references ${CLAUDE_PLUGIN_ROOT} but the hook is not associated with a plugin" — which a transcript shows as a hook error, not as a defect of the project) — enforcement runs session-level fromhooks/hooks.json. Butbin/lib/agent-scope.shresolves an agent's writable scope by reading theguard-scopecommand out of that block when no YAMLscope:key exists. So a wrong SCOPE_PATHS list there is a live enforcement defect, and a missing block on a writable agent fails closed.
Body check:
<!-- apd:builder-charter --> (v7.0: how the diff is judged,
where the bar rises, red-green proof, .apd/lessons.md read before starting). apd-init adds it on
session start — a builder without it means no session has run since the update; run init, do not
paste the block by handCheck that CLAUDE.md has all required sections:
## Stack — technology table## APD — orchestrator role description### Pipeline — enforced pipeline reference### Guardrails — guard script list### Agents — the agent table (domain, scope, model, effort)### Model discipline — the role table with full model ids, never a bare alias (the same rule
as §5 for workflow.md; CLAUDE.md.reference ships it since v7.1.3). An older CLAUDE.md with the bare alias opus
here is drift the drift script cannot see — it reads workflow.md, not this table### Mandatory skills — the table must name apd-pipeline-guide (mandatory before
every task since v6.15, hard-gated by .guide-marker); brainstorm is advisory, not the gate### Human gate — approval requirements### Session memory — session-log reference## Anti-patterns — common mistakes## Memory — @.claude/memory/ referencesCheck that CLAUDE.md does NOT contain:
{{PLACEHOLDER}} unreplaced values/apd-init, /github-projects, /miro-dashboard)superpowers:subagent-driven-development references (should use APD pipeline)Read .claude/settings.json and verify:
enabledPlugins.superpowers@claude-plugins-official: falseattribution.commit: "" (empty — no AI signatures)attribution.pr: "" (empty)permissions.allow includes Edit(.claude/memory/**), Bash(bash .claude/bin/apd *) and
every pipeline file the framework mandates writing: spec-card.md, implementation-plan.md,
.adversarial-summary, .adversarial-rationale.md, .supervision-summary,
.supervision-rationale.md, .guide-marker; permissions.deny carries the 8 mkdir .apd/pipeline patterns (drift dimension A checks exactly these)Edit(...) only — never ask for a Write(...) twin. Since CC 2.1.208 Edit(path)
covers every file-editing tool and a Write(path) rule is inert for file-permission
checks; apd-init strips legacy APD Write twins on each run, so demanding them here
would make the audit and init undo each other on every session-startRead .claude/rules/workflow.md and verify:
apd pipeline commands (not apd-pipeline)9. FINISH — /apd-finish, and the numbered sections run 0a–9 where
## 9. Mandatory skills is the skills table (section 9 is not the finish step)MODEL_PROFILE governs agents onlybash .claude/bin/apd pipeline status
bash .claude/bin/apd doctor
bash ${CLAUDE_PLUGIN_ROOT}/plugins/apd/bin/core/apd-init --version
apd doctor runs clean. Read its Model environment section (v7.2): a warn there means
CLAUDE_CODE_SUBAGENT_MODEL_FORCE is set and EVERY subagent runs that one model (CC ≥ 2.1.257) —
the pins and the profile checked in §2 are not what is served. Report it as IMPORTANT.
CLAUDE_CODE_SUBAGENT_MODEL alone is harmless (a default for agents without a model: line; APD
agents are pinned)Check .claude/memory/:
MEMORY.md — not empty, has project contextstatus.md — has current phasesession-log.md — exists (may be empty for new projects)pipeline-skip-log.md — exists (the fourth file templates/memory ships; verify-apd counts all four)[fill in] placeholders in the last session-log entry (blocks new tasks)Run the dedicated drift script — it scans five dimensions where projects typically lag behind the framework baseline:
bash ${CLAUDE_PLUGIN_ROOT}/plugins/apd/bin/core/pipeline-audit-drift
Dimensions checked:
.claude/settings.json deny patterns — compares against current framework baseline (8 mkdir patterns: 4 slash-prefixed + 4 bare-dir). Pre-v6.10 re-inits left projects with only 4 patterns; v6.10 closes the bypass vector by writing all 8 on re-init.
.claude/.apd-config APD_VERSION — compares against the currently loaded plugin version. Stale APD_VERSION means the project was configured under an older minor and may carry stale workflow/agent templates. Patch-only drift is INFO; minor-or-major drift is IMPORTANT.
.claude/rules/workflow.md content — first the presence of five guidance markers (Implements:, rationale gate, unconditional, apd-pipeline-guide, SUPERVISION); missing markers mean workflow.md was last refreshed under an older framework, so the orchestrator never sees plan-spec consistency, the rationale gate, the v6.15 guide gate or the v6.30 supervision layer. When every marker is present, the script byte-compares the copy against the shipped rules/workflow.md (v7.0.3) and reports the changed-line count — that is how a project carrying guidance the framework has since DELETED gets caught (a marker check only sees what was added, never what was retracted). Detection only: the refresh stays marker-based, recovery is /apd-setup step 5c. Read the marker list from the script rather than this page if they disagree — the script is the authority. v7.1.6 — record-aware: apd-init records the shipped copy the project took in .apd/.workflow.md.shipped and merges framework changes into the project's copy with git merge-file (local edits kept; a conflict leaves the copy untouched and init says so at session start). With the record present, dim C distinguishes two IMPORTANT findings: the framework's file changed since the record (the merge has not happened, or conflicted), and a copy that differs while the record equals the shipped file (local edits, or an older text put back — the record cannot tell them apart; byte-equality stays the contract, init keeps local edits through its merge but does not sanction them). Without the record (set up before v7.1.6) the byte comparison stands and the finding names the missing record — /apd-setup step 5c creates it. The marker list is one file, bin/lib/workflow-markers.sh, read by init and this script.
Feature claim drift (v6.12.3+) — scans workflow.md and CLAUDE.md for orchestrator confabulation patterns claiming features the framework does not ship. Specifically: any line that mentions BOTH a contracts command (verify-contracts, apd contracts) AND an unsupported language (PHP/Python/Java/Go/Ruby/Kotlin/Rust). First documented instance: Festico apd-setup (2026-05-28) — orchestrator wrote "apd verify-contracts automatically checks PHP DTO ↔ TS types" which is false; framework supports TS ↔ C# only. Detection prevents silent gaps in cross-layer review coverage where humans rely on a feature that errors at runtime.
Every other file the framework copies into the project (v7.3) — the three review agents (code-reviewer, adversarial-reviewer, supervisor), the builder charter block inside each builder, and on Codex AGENTS.md, .apd/rules/{brainstorm,tdd,debug,finish}.md, the Codex workflow.md and the Codex review agents. Each is compared with the framework's CURRENT text and with its shipped-copy record under .apd/.shipped/: record ≠ framework text = the merge has not happened (IMPORTANT); no record and an older shipped text = init refreshes it (IMPORTANT); no record and an EARLIER shipped text with local edits = init merges from the nearest earlier text the plugin ships (templates/shipped-history.d/) (IMPORTANT); no record and no stored earlier text for that file (the two workflow.md copies) = edited and cut off from updates (IMPORTANT); local edits on the current text = INFO; a file that shares less than half its lines with every text the framework shipped (a hand-written AGENTS.md, a project's own reviewer) is the PROJECT'S OWN — INFO, not tracked, never given a record. principles.md is NOT tracked — init seeds it and /apd-setup rewrites it for the project. A CONFLICT is reported by init with a recipe that names three files on disk: the copy, the record (.apd/.shipped/<key>.md) and the framework's text for this project (.apd/.shipped/<key>.new.md). model:/effort: lines belong to apd profile and are never a difference. This is the dimension that sees what dimension 2 cannot: init raises APD_VERSION on every run, so the version says nothing about which text the agents carry (measured: three agents one release behind, version current, drift CLEAN — before v7.3).
Output buckets: CRITICAL (drift blocks pipeline structurally, rare) / IMPORTANT (drift compromises guard coverage or orchestrator guidance, most common) / INFO (patch-level, non-blocking) / CLEAN (project tracks current baseline).
Recovery: all drift findings point to /apd-setup (v6.10+ auto-fixes settings.json missing patterns + refreshes workflow.md + bumps APD_VERSION in .apd-config); dimension-5 findings are fixed by apd init --quick itself (it merges or refreshes, with a backup) — the agent text takes effect in the next session. Manual fixes are documented per item in the drift script output.
Exit code: drift script exits 1 if any CRITICAL or IMPORTANT finding, 0 if only INFO or CLEAN. Use in CI / pre-commit hooks if desired.
APD Project Audit — {project name}
CRITICAL:
1. [file:line] Description
IMPORTANT:
1. [file:line] Description
CLEAN:
✓ Agents (X builders + code-reviewer + adversarial-reviewer + supervisor)
✓ CLAUDE.md sections complete
✓ Settings configured
✓ Workflow rules current
✓ Pipeline healthy
✓ Memory files present
Result: X findings (Y critical, Z important)
| Excuse | Reality |
|---|---|
| "verify-apd passes so it's fine" | verify-apd checks structure, not content quality |
| "Agents work, no need to audit" | Wrong model or unbounded scope wastes time and money |
| "CLAUDE.md looks ok" | Missing sections mean orchestrator skips important rules |
| "I'll fix it when it breaks" | Broken pipeline produces broken code silently |
Example 1 — Builder agent missing scope.
Input: .claude/agents/backend-api.md frontmatter has model, effort, permissionMode: bypassPermissions, but no scope: line. The builder can write anywhere in the repo.
Output:
IMPORTANT:
1. [.claude/agents/backend-api.md] scope missing — builder writes are unbounded
Effect: out-of-scope edits slip past the guard that keys on declared scope
Fix: declare the builder's scope paths (the `{{SCOPE_PATHS}}` the guard-scope
and guard-bash-scope hooks enforce) so writes outside them are blocked
Example 2 — Stale skill references in CLAUDE.md.
Input: CLAUDE.md ### Mandatory skills table lists /apd-init and /github-projects as required. Both were renamed (/apd-setup, /apd-github).
Output:
CRITICAL:
1. [CLAUDE.md:142] References renamed skill /apd-init
Effect: orchestrator looks for a non-existent skill, falls back to ad-hoc setup
Fix: replace `/apd-init` → `/apd-setup`, `/github-projects` → `/apd-github`
Example 3 — Orphaned scope path on a builder.
Input: .claude/agents/frontend-web.md has scope: src/components/** but the project moved to app/components/. verify-apd passed because the agent file exists; guard-scope blocks every builder write.
Output:
CRITICAL:
1. [.claude/agents/frontend-web.md:8] Scope path src/components/** does not exist
Effect: every builder write blocked by guard-scope — pipeline cannot ship
Fix: update to `scope: app/components/**` (or run /apd-setup gap analysis)
You're done when:
{{PLACEHOLDER}} values.claude/settings.json has all five required keys (env, attribution, enabledPlugins, permissions, hooks)apd pipeline status runs without error/apd-setup to regenerate missing pieces/apd-setup → escalate to user with concrete file:line referencesWhat SKILL.md sets; muted values are Claude Code's defaults
maxThree short reads, in order
apd, configuration-audit, framework-review, setup-verification
npx claudepluginhub zstevovich/claude-apd --plugin claude-apdOther plugins' skills for the same job
11 skills in this plugin
/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.