Channel Scope
This skill audits a committed harness runtime and applies to the copy channel only. On the marketplace channel the runtime ships inside the plugin, so install hygiene is the plugin repository's CI concern, not the consumer project's. Doc-form validation is owned elsewhere: the doctor skill (blocking, deterministic), audit-docs (advisory judgment), and document-writing (review-time form checks).
When to Run
Run this audit after any change to:
- Agent definitions (
.claude/agents/,.github/agents/,.opencode/agents/) - Skills (
.claude/skills/) - Pipeline state files or templates (
.claude/templates/) - CLAUDE.md agent-related sections
.claude/agents/README.md
Audit Checklist
1. Skills Coverage
- [ ] CLAUDE.md skills table lists every shipped skill — no missing, no extras.
- [ ] The agents README skills table (a project-side runtime ships one beside the agent bodies) matches CLAUDE.md.
- [ ] Every skill referenced in an agent file (
Load the X skill) resolves to a shipped skill. One the agent executes on every dispatch is in itsskills:preload; agents hold no Skill tool, so an unpreloaded skill is an on-demand read by path.
2. Agent Thinness
An agent file is the agent's job description; a skill is reusable mechanics. They overlap by design. The audit must distinguish real duplication (drift hazard) from parallel description (different audience, different level of detail) before flagging anything.
Positive shape of a thin agent file. A well-shaped agent body contains, in roughly this order: persona statement, skill/doc references, write scope (which files the agent may modify), a short process overview (≤7 lines naming what the agent does, not how the skill works), and any agent-specific conduct rules. Anything beyond this is a candidate for the drift test.
The drift test. For each candidate finding, run this test before tagging it a violation:
If the skill changes, must the agent file also change to keep the system correct? If yes, it's duplication. If no, it's parallel description — leave it.
Concretely, this means:
- A skill's checklist body, scoring table, output schema, or step-by-step process is reusable mechanics. Copying any of these into an agent body fails the drift test → duplication. Replace with a one-line pointer.
- An agent's list of its own responsibilities, judgement criteria, or the transitions/gates/stages it operates on describes the agent's surface area. The underlying skill may detail how each item works; the agent's list signals what the agent does. This passes the drift test (the skill can evolve its mechanics without changing the agent's job description) → not duplication.
Mandatory false-positive examples — these have been wrongly flagged as duplication; do NOT flag them:
pipeline-coordinator.mdStep 5 enumerating which schema gates which transition (product-requirements-expert→system-design-expert, system-design-expert→implementer, etc.). The list is the coordinator's surface area, not the skill's content.system-design-expert.mdResponsibilities listing architectural validation, security/reliability, understandability, defense in depth, integration analysis. These are the system-design-expert's judgement criteria;design-validation§ Design Principles details how to apply them.- A reviewer agent's brief Review Process overview (≤7 lines) when the matching
*-reviewskill carries a parallel section. The agent overview signals what the reviewer does first; the skill section is the full mechanics.
Real-duplication checklist:
- [ ] No verbatim copy of a skill's checklist body, scoring table, or step list (drift test fails).
- [ ] No agent inlines a process that another agent already follows from the same skill (drift fans out across files).
- [ ] Every reviewer agent has a dedicated domain skill (mechanics live in the skill).
Grep patterns — candidates only, run the drift test before flagging:
| Pattern | Where to Search | Likely violation when… |
|---|---|---|
| - \[ \] (3+ rows) | Agent body | The checkbox list mirrors a skill's checklist body. Single-row reminders are fine. |
| \*\*Red\*\*.*failing test | Agent body | Restates TDD cycle mechanics from tdd-workflow. |
| ## Review Focus with criteria | Agent body | Restates a review skill's checklist. |
| ## PRD Boundary with rules | Agent body | Restates prd-authoring validation rules. |
| ## Output Format with full template | Agent body | Restates a template that exists in .claude/templates/ or a skill's output contract. |
| Numbered process 5+ steps mirroring a skill | Agent body | The agent's process is the skill's process verbatim. |
Patterns that look like duplication but routinely pass the drift test (do not flag without confirming):
- A short
## Responsibilitiesor## Processlist naming what the agent does. - An at-a-glance map of transitions/gates/stages keyed by schema name.
- A pointer phrase like "see
<skill>§ X" followed by a 1-2 sentence summary of why the agent invokes that section.
3. Cross-Tool Parity
For each agent, compare all three tool versions (.claude/, .github/, .opencode/):
- [ ] Same persona text (first paragraph after frontmatter).
- [ ] Same skill references (identical skill names in body).
- [ ] Same document references (same files and sections).
- [ ] Same write scope (if defined in any version, must be in all).
- [ ] Same review process steps (same numbered list).
- [ ] Client-specific tools are expected, not parity gaps: an MCP server or skill wired to only one runtime (declared in that client's
tools:or skill set) is correct by design. Its absence from.opencode/or.github/is not a finding. - [ ] Correct model mapping. Each tier maps across tools as follows; flag only deviations from this table:
| Tier | Claude Code | GitHub Copilot | OpenCode |
|------|-------------|----------------|----------|
| Sonnet | claude-sonnet-5-5 | ['Claude Sonnet 5.5 (copilot)', 'Claude Sonnet 5 (copilot)'] | openrouter/anthropic/claude-sonnet-5.5 |
| Opus | claude-opus-5-5 | ['Claude Opus 5.5 (copilot)', 'Claude Opus 5 (copilot)'] | openrouter/anthropic/claude-opus-5.5 |
Both tiers are symmetric across tools today: Claude Code, GitHub Copilot, and OpenRouter all serve Claude Opus 5.5 and Claude Sonnet 5.5. The Copilot pin is a two-entry fallback chain: Copilot silently substitutes its session default for an unavailable model, so the chain pins the fallback to the prior same-tier release. Pins advance with the harness release that ships them; report upstream drift to the harness maintainer rather than editing pins locally.
- [ ] Tool permissions match intent (reviewers append their record through the handoff script — shell access, not an edit tool, is the load-bearing grant; a write grant serves only
.scratch/tmp/scratch space; OpenCode'sedit: denycovers the write tool too, so scratch output there rides the shell grant). - [ ] Every OpenCode mirror denies
question: a dispatched agent never converses, and a question for the human is aconsultation-request. The battery gates the key; whether a body still routes its questions through the log is judgment. - [ ] Web grants collapse per client capability (Copilot has
fetchbut no search tool), and a collapse may only narrow, never widen. An agent whose Claude dialect holds the search-only posture (WebSearchgranted,WebFetchomitted) carries nofetchin Copilot. - [ ] A tier variant (
variant-of:frontmatter,<base>-routinename) varies the tier and only the tier. Its.claudecopy pins the checklist tier's model and effort; every other frontmatter key matches the base apart fromname,description, andvariant-of. The mirrors carry the model pin, so the saving lands on every tool; Copilot and OpenCode carry no effort knob, by design and not a parity gap.
4. Reference Integrity
The rule is uniform: every path-shaped string in agent and skill files must resolve to an existing file or directory. Path-shaped means a token containing / and ending in a known extension (.md, .yaml, .yml, .json, .jsonl, .sh, or a source-file extension) or referring to a known directory (docs/, .claude/, .github/, .opencode/, .scratch/, schemas/, or a source root declared in scripts/layout.toml).
- [ ] Every path-shaped reference in
.claude/agents/,.claude/skills/,.claude/templates/,.github/agents/,.opencode/agents/,CLAUDE.md, anddocs/resolves to a real file or directory. The check includes — but is not limited to —docs/X.md,docs/X.md#anchor,.claude/templates/X.md,.scratch/*, source files,schemas/scratch/X.schema.json. - [ ] Exemption: a fictional path inside an explicitly illustrative example — a skill's example records, a template placeholder — need not resolve, but it must not collide with a real artifact.
- [ ] Every
docs/X.md#anchorreference points to an existing heading or<a id="...">anchor. - [ ] Self-audit: apply the same check to this skill (
.claude/skills/audit-agents/SKILL.md). Stale references in the audit skill itself propagate into every audit run.
Use grep to find candidates. The alternation below covers the universal doc and config extensions; append your stack's source-file extension(s) — a Go project adds go, a Java project adds java — so source references are caught too:
grep -rohE '[A-Za-z0-9_./-]+\.(md|ya?ml|json|jsonl|sh)' \
.claude/ .github/ .opencode/ CLAUDE.md docs/ | sort -u
Then check each against the filesystem. Same for directory references.
5. Review Output Records
Verify the floor author values match across all locations:
- Reviewer agent files (all three tools — each names its own
authorvalue) review-workflowskill reviewer table.claude/agents/README.mdagent table
The roster is the floor plus any extra_reviewers declared in scripts/layout.toml [harness]. schemas/scratch/review-feedback.schema.json validates author by the *-reviewer shape pattern, not a closed enum — the roster's authority is the floor (harness-owned) plus the declared extras (doctor-enforced), not the schema.
Expected floor author values for review-feedback records:
code-quality-reviewertest-reviewersecurity-reviewerdoc-reviewer
Each reviewer appends one review-feedback record per dispatch to .scratch/handoff.jsonl. There is no per-reviewer markdown file.
6. No Duplication
- [ ] No skill duplicates content from another skill.
- [ ] No agent inlines content that exists in a skill it references.
- [ ] CLAUDE.md does not duplicate skill content (pointers only).
- [ ] Open-closed check. No enforcer or reviewer skill (
design-validation,code-quality-review, …) copies a tactical rule the brief owns as adaptable (Pattern Catalog realizations, persistence/mapping/ACL strategy, naming/suffix conventions). Enforcers carry only the closed-kernel checks and framework wiring. A stack's realization of a kernel property lives in the brief's## Language Realization; an enforcer cites it rather than restating it. The battery's enforcer-pin step holds the uncited checklist lines toharness/enforcer-tactics.expected; judge each pinned line here. Bounded-module structure and the inward-dependency check are kernel, not findings. Language idioms the brief does not own — line length, package-name hygiene, framework wiring — stay with the reviewer. A brief-owned adaptable rule copied verbatim into an enforcer is a finding. The closed kernel is: - the four kernel properties: ubiquitous language, bounded modules, isolated testable core, state-vs-history split;
- the five closed protections: immutability and equality by value, invariants at construction, infra-free core with inward dependencies, aggregate-root entry, anti-corruption at uncontrolled boundaries.
7. State File Consistency
Verify state file references match across:
handoff-routingskill state files table- the
handoff-appendskill'sscratch-contract.mdstructure and record roster .claude/templates/directory (markdown helpers only)schemas/scratch/*.json(record schemas)
Expected state files:
.scratch/handoff.jsonl(append-only; record types:intake-decision,prd-entry,design-block,consultation-request,consultation-response,dispatch-start,build-failure,build-pass,review-feedback,review-plan,design-doc-autofix,prd-autofix,grader-features,grader-verdict).scratch/escalations.md(feature-implementer on escalate-tag findings; root on the router'sblockeddecision for prerequisite-missing aborts, reviewer stalls, and escalate findings on anapprovedverdict; never the coordinator itself)
The change-grader writes no separate state files (both records live in .scratch/handoff.jsonl).
Expected schema files (one per record type):
schemas/scratch/intake-decision.schema.jsonschemas/scratch/prd-entry.schema.jsonschemas/scratch/design-block.schema.jsonschemas/scratch/consultation-request.schema.jsonschemas/scratch/consultation-response.schema.jsonschemas/scratch/dispatch-start.schema.jsonschemas/scratch/review-feedback.schema.jsonschemas/scratch/review-plan.schema.jsonschemas/scratch/build-failure.schema.jsonschemas/scratch/build-pass.schema.jsonschemas/scratch/design-doc-autofix.schema.jsonschemas/scratch/prd-autofix.schema.jsonschemas/scratch/grader-features.schema.jsonschemas/scratch/grader-verdict.schema.json
Expected design-block.verdict enum: covered, minor, new, refactor-first, foundational, conflicting. Flag any occurrence of the retired values needs_changes, revised, or escalated in a design-block context, in this project's docs, skills, agents, or schemas. They are stale and must not leak. approved and blocked stay valid for review-feedback and are flagged only where a design-block verdict is meant.
Expected review-feedback.verdict enum (distinct from design-block): approved, changes_requested, blocked. Do not confuse the two enums when auditing. Other project domains may reuse some of these tokens (e.g. as work-unit outcome values in their PRD or system-design) — those are unrelated to the design-block verdict.
8. Quality Gate Consistency
Verify the quality gate matches across all locations:
- [ ] CLAUDE.md "Quality Gate" section lists all required checks.
- [ ]
.claude/skills/code-quality-gate/SKILL.mdrequired checks table matches CLAUDE.md. - [ ] Code-quality-reviewer agent permitted commands include the gate's format check. Reviewers trust the
build-passrecord as gate verification; a reviewer re-running tests does so as a review instrument (coverage, dynamic analysis), never to re-verify the gate. - [ ] The quality-gate pipeline (see CLAUDE.md) includes all required checks.
- [ ] Gate-command pre-approval stays user-local: the committed
.claude/settings.jsonregisters the hooks; format-command permissions belong in the uncommitted.claude/settings.local.jsonor the tool's allowlist, never a committed file.
9. Pipeline Philosophy Enforcement
Verify the handoff-routing skill contains:
- [ ] Coordinator output format (structured recommendation template).
- [ ] Coordinator rules (no skipping stages, stale state detection, escalation reporting).
- [ ] State detection logic (file existence + status → next agent).
Verify agents do NOT contain:
- [ ] Coordinator output format (belongs in handoff-routing skill).
- [ ] Routing rules or state detection tables (belongs in handoff-routing skill).
- [ ] TDD cycle steps (belongs in tdd-workflow skill).
10. Reviewer Conduct
For each reviewer agent in all three tool directories — the four-reviewer floor (code-quality, test, security, doc) plus any extra_reviewers declared in scripts/layout.toml [harness]:
- [ ] Reviewer Conduct section present.
- [ ] Includes
/tmpprohibition: "Never use system/tmp; use.scratch/tmp/". - [ ] Lists permitted commands explicitly.
- [ ] Names
.scratch/as the only write surface and the singlereview-feedbackrecord as the deliverable.
11. Skill Cross-References
- [ ] Every path in a skill's
reads:frontmatter exists and appears in the doctor manifest (scripts/doctor-expectations.toml) roster — skills may only bind to documents the harness-project API guarantees.
- [ ]
doc-revieweragent referencesdocument-writingskill (for validation categories and review process). - [ ]
doc-revieweragent instructs theboundary-rules.mdread from theprd-authoringskill (PRD boundary enforcement; the full-skill preload is deliberately absent). - [ ]
doc-revieweragent referencesreview-workflowskill (for output format). - [ ]
feature-implementeragent referencestdd-workflowskill. - [ ]
feature-implementeragent referencescode-quality-gateskill. - [ ]
feature-implementeragent referencesreview-workflowskill. - [ ]
pipeline-coordinatoragent referenceshandoff-routingskill. - [ ] Every record-writing agent — all project-defined agents except
pipeline-coordinator— references thehandoff-appendskill. - [ ]
change-graderagent referenceschange-gradingskill. - [ ]
system-design-expertagent referencesdesign-validationskill (for triage modes, verdicts, and consultation handling).
12. Consultation Routing Semantics
The consultation roundtrip is the mechanism by which an in-flight specialist (typically feature-implementer) gets a focused answer from another specialist (typically system-design-expert) or from the human without advancing the pipeline. Verify the semantics are consistently described:
- [ ]
handoff-routingskill: documents Gate 2b for consultation records; states that after aconsultation-responsethe router returns control back to the requesting specialist, not forward to the next pipeline stage. - [ ]
pipeline-coordinatoragent: defers consultation transitions toroute(which executes both hops) and never re-decides them; any consultation prose it keeps follows the back-route semantics above. - [ ]
tdd-workflowskill: the design-check decision tree directs the implementer to append aconsultation-requestrather than block waiting; the inner loop resumes when the matchingconsultation-responsearrives. - [ ]
design-validationskill: describes both triage mode (returns one of the sixdesign-blockverdicts) and consultation mode (returns aconsultation-response); the agent reads the input record type and acts accordingly. - [ ]
system-design-expertagent: write scope includes appendingconsultation-responserecords to.scratch/handoff.jsonl;docs/ubiquitous-language.mdis in scope only during thefoundationaltriage path. - [ ]
feature-implementeragent: write scope includes appendingconsultation-requestrecords; agent does not modifydocs/directly. - [ ]
handoff-routingskill androute-spec.mdGate 2b: aconsultation-requestwithtarget: "human"yieldsblocked(rulehuman-consultation); root appends theconsultation-responsewithauthor: "human";consultation-returnresumes the requester. On a slice whose intake recordsowner_present: falseit yields a dispatch of the requester instead (owner-absent), once. - [ ] The human-response doctrine holds on both sides: root transcribes the human's reply, never composes an answer; the resumed specialist re-raises a response that only restates the request (
product-requirements-expertpushback,system-design-expertfoundational bullet,design-validation§ Foundational resume).
13. system-design-expert Modes and Verdict Coverage
The system-design-expert operates in two demand-driven modes plus the fix dispatch; verify each is documented consistently:
- [ ]
system-design-expertagent (all three tool versions) names triage + consultation as the two modes, the fix dispatch as the third dispatch shape, and lists the six verdicts. - [ ]
design-validationskill enumerates the six verdicts with content guidance per verdict. - [ ]
.claude/skills/handoff-routing/agentic-harness.md§ The system-design-expert role in depth lists the same six verdicts. - [ ]
design-block.schema.jsonenum exactly matches the six verdict names. - [ ] The
foundationalpath covers both greenfield projects and adoption (extracting candidate vocabulary from existing docs and source); same description across the system-design-expert agent,design-validation, andagentic-harness.md.