/agentic-workflow:audit-docs [--fix]from agentic-workflow
Audits cross-document coherence across docs, READMEs, roadmap, code, fix index, and issues. Detects drift, broken links, dependency cycles, naming violations, and reports findings ranked by severity.
Ships in agentic-workflow. 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.
Runner commands below are
runner <subcommand> [args…]— the launcher, its order and the pin are owned by references/RUNNER.md: read it before the first command, then keep it for the whole unit — nowhere else spells either.
A read-first audit answering "do the docs still match reality?" Produces a findings report; it does not silently rewrite docs.
Load and verify the canonical Turn contract (11 boxes) before ending every turn (the --fix path commits and pushes like any editing turn). Skill-specific additions (the → Next: box is canonical-owned and not restated here):
✓ The AUDIT DOCS fixed-format report was printed, ending in `Decision: PASS | FAIL`
✓ No doc was rewritten without explicit --fix / user go-ahead
Missing reference → STOP. About to end the turn with any box unchecked? The turn is NOT done — complete the missing box first (weak models drop end-of-document duties; this list is first on purpose).
Per the agent guide's Workflow conventions + documentation map, then read what THIS skill needs: the roadmap, the fix index + template, and the feature folder layout — the map tells you which links and invariants to check.
Run these and collect findings (cite paths/lines/issue numbers each):
docs/features/<NN>-<slug>/ is in the
roadmap, and every roadmap entry has a folder (or is explicitly "scheduled").Depends on / Branch fields are valid; no
dependency cycles; ordering is consistent with the roadmap.#N aren't
pointing at long-closed issues without note.done rows. Every roadmap row (and fix-index
entry) with status done carries a linked PR reference —
done · [#<pr>](<pr-url>). For each bare done, find its PR in the forge
(gh pr list --state all --head feat/<NN>-<slug> or by title) and propose
the row update; a done with no PR found at all is HIGH severity (the unit
may never have been closed out).Workflow discipline (checks 10–14) — the executor skills enforce these at write time; this audit verifies they actually held. Each check is mechanical: run the command shown, don't infer.
Phase naming — keyed on the carrier, like check 11.
runner phase-lint <unit-doc> (owner
skills/phase-contract/SKILL.md) must print verdict PASS, and
runner ceremony docs check-phase-labels --slug <slug> must
answer valid: true. A S# hit in a lane-era doc is not a phase label:
since #308 S# is the requirement id.grep -rnE '\bS[0-9]+\b|\bStep [0-9]' docs/features/*/{PLAN,TASKS,progress}.md
must return nothing: plans use P1, P2, … ("phases") only. Any hit: LOW
(rename), plus check the executor argument still resolves; a hit quoting only
the required Step 0 — Discover the project section is no phase label, and no
count is restated here — the checker's own output enumerates them.Per-phase doc discipline — keyed on the unit's own carrier. Pick the
carrier mechanically, never by guess: TASKS.md in the unit folder means
legacy carriage; its absence means the unit doc's ## Tasks/## Log.
runner ceremony docs check-tasks-ticks --slug <slug>
and runner ceremony docs check-progress-entry --slug <slug> must
both report valid: true: every - [x] P<n> has its P<n> line in
## Log, and no task lacks one. Cite those two fields, never check-all
(its commit-format/docs-language fields are checks 14 and 7). A doc with
no ## Tasks section answers n/a (no ## Tasks section — legacy carrier),
so the vacuous case routes to the legacy branch, never to a silent pass.TASKS.md, one progress.md entry per completed phase,
the literal close-out tasks in the final phase.P<n> log line, or a log naming a task
never ticked: HIGH on a done unit (the doc claims a receipt its carrier
lacks), LOW on an open one (still settling). A done unit written before
the tick grammar (- P<n> bullets, receipts in E lines) is red on
check-progress-entry by construction — LOW, recorded, never repaired
(MIGRATION.md: a closed unit keeps the shape it was written in).audit-pr's contract (receipt + ordered gates): cite its
verdict, never re-derive the retired literal tasks here.Branch & PR discipline vs the forge. For every done unit: its PR
exists, targets the default branch, has a non-empty body, and carries
Closes #<n> when the unit is issue-born (SPEC references an issue).
Also scan recent default-branch history (git log --first-parent) for
feature/fix-scoped changes committed directly without a PR: HIGH.
Generated-docs provenance (only when the documentation map declares a
Docs site block; otherwise state n/a). Scan the declared content dir
for pages carrying the renderer's own header (Generated by runner docs-generate). For each page that also carries
source-unit/updated: (a) its source-unit exists in the roadmap or fix
index — no match is an orphan (low: propose deletion or
re-attribution); (b) the unit's PR merged after the page's updated
date with commits touching the page's subject paths — that page is
stale (LOW: propose runner docs-generate to re-render it).
A renderer that emits no provenance fields answers
n/a — no provenance fields, never a silent pass. Cite page path + unit
per finding.
Commit format & dependency discipline. Sample the unit branches'
commits: <type>(<scope>): <summary> conventional format (violations:
LOW). Every in-progress/done row's Depends on: closure was merged —
a unit built on unmerged deps is HIGH unless decisions.md records a
user-forced override (--force), which downgrades it to LOW (documented
risk).
README currency against what shipped. Run each README against the
tree: rg -n '<a retired name or stale claim>' README.md packages/*/README.md
and every hit that names a surface the tree no longer carries (a retired
skill in an install/uninstall example, a command count or package count the
tree contradicts, a "none yet" beside shipped subcommands) is HIGH —
the claim misleads a reader who acts on it. Its mirror: a shipped,
consumer-facing surface with no README entry at all is HIGH (the
document-or-don't-coin residue read at README scope — product-audit owns
the product-wide sweep, this check is the docs-tree half). Superseded prose
left standing beside its replacement is LOW. Owners: the rule is
AGENTS.md §Working rules, the step is skills/unit-lane/references/DOCS.md.
Project-charter coverage (issue #435). Applies when the agent guide
declares the charter — a ## Project charter section or a documentation-map
row for the criteria catalogue; an older install that declares neither is
stated n/a (absent structure, never a finding). Mechanical, the
CAPABILITIES pattern — run the commands, never infer:
the declared map row's file exists — a row naming
docs/workflow/VERIFICATION_CRITERIA.md with no such file is HIGH
(the map points at nothing);
the charter section is present when either the section or the row is
declared — a missing ## Project charter section is HIGH (identity
answers with no tier-0 home push agents back to guessing);
no unfilled charter slot survives — a bullet whose entire value is a <…>
placeholder is the raw-template failure. The scan is bounded to the
## Project charter section, because the guide's other honest
placeholders — the Hard-rules stubs init-workspace leaves unfilled by
design — are not the charter's finding, and a guide-wide scan reports them
forever:
awk '/^## Project charter/{f=1; next} f && /^## /{f=0} f && /^- \*\*[^*]+:\*\* `?<[^>]+>`?$/ {print FILENAME":"FNR":"$0}' AGENTS.md → prints nothing
(the template's own file is the positive case — every charter slot prints
with path:line; a legal unresolved — <question> value never matches; an
identity bullet — the five the template names — is HIGH, a domain
bullet LOW);
the catalogue carries no raw placeholder cell — same scan as the
capability seed: rg -n '\| *\?<[^>]+>`? *|' docs/workflow/VERIFICATION_CRITERIA.md must print nothing, and every criterion row's provenance cell is one of the closed set (workflow-generic/project-declared/stamped assumption (dated)`) — a row naming none is LOW (it cannot
be consumed as declared);
Declared-but-unenforced boundaries (issue #564). Applies when the
guide declares a charter or the project carries
docs/architecture/ARCHITECTURAL_INVARIANTS.md; an install that declares
neither is stated n/a (absent structure, never a finding). Mechanical —
run the project's own checker, never infer:
runner materialize check --guide AGENTS.md
boundary-declared-unenforced finding — a
prose-only charter entry with no recorded outcome, or an invariant
section whose Enforcement bullet is missing or outside
machine: <mechanism> / prose-only — is HIGH: a boundary kept in a
reviewer's memory is the state this check exists to end;boundary-artifact-missing (an outcome names a rule file the tree does
not carry) is HIGH — the record claims an enforcement the repository
disproves;feature-map-shape is HIGH when the documentation map declares
docs/workflow/FEATURE_MAP.md, LOW otherwise — a placeholder cell
still misleads; feature-map-missing (declared + absent: --feature-map-declared) is HIGH;evidence-driver-missing / artifact-evidence-missing is LOW here
(the unit's own evidence carrier is verification-contract's finding at
review time), and the finding's route cell says where it resolves.Unowned restatements of an owned rule (issue #646 A6). Always applies:
the corpus and the sweep are one declared pair
(references/RESTATEMENT.md, block
restatement-corpus@1), so the check is run, never re-derived:
runner restatement-sweep # runner restatement-sweep — fallback when bun is absent
unowned-restatement — a scope file restating a
seeded rule without naming its owner — is HIGH (the copy has already
lost whatever nuance the owner adds, which is how the one-PR rule dropped
its inline-batch exception);stale-claim — a file asserting a rule is "never restated" while its
scope restates it, or while the claim sentence is gone — is HIGH: an
assertion the tree disproves;uncovered-claim (a "never restated" sentence naming no resolvable owner)
is HIGH — the assertion is unverifiable by construction — and a
REFUSED verdict (unresolved-owner,
malformed-corpus, empty-corpus) is HIGH — a corpus that cannot be
resolved proves nothing;NOTE <rule> — the seed's phrase matches no file is LOW: a dead seed
describes a tree that no longer exists.Adapt the list to what the project has; skip checks for absent structures and say so.
Discover, then run the checks with grep, file reads, and the forge CLI
(per Workflow conventions; examples use gh).
Produce the findings report — return exactly (fixed output contract):
AUDIT DOCS — scope: <docs tree / roadmap / fix index / issues checked>
| # | Check (1-18) | Finding | Sev | Evidence | Proposed fix |
|---|-------------|---------|-----|----------|--------------|
| 1 | <which> | <what> | high|low | <path:line / #issue> | <smallest action> |
Checks run: <n>/18 (skipped: <which + why — absent structures only>)
Summary: <1-2 sentences>
Decision: PASS | FAIL (FAIL if any high-severity finding is open)
Sev: high = misleading or broken; low = cosmetic.
Only high and low are defined in this legend
Fix only on request. With explicit --fix (or user go-ahead), apply the
low-risk corrections (remove a merged fix-index row, fix a dead link, register
a missing roadmap entry, add a verified PR link to a bare done row). Leave judgment calls to the user.
Preamble + no-slash-menu fallback: owned by skills/orchestration-envelope/references/PORTABILITY.md — this section
keeps only its own fallbacks:
model:/effort: — no skill pins a tier; pick tiers yourself:
these are mostly mechanical cross-document checks — a mid-tier model is
enough; escalate to your strongest only for a deep audit.unit-lane (which creates the docs this audits) and
triage-issue (which keeps the fix index honest).A severity-ranked findings report exists, and any approved low-risk fixes are applied — with genuine deferrals left untouched and labeled as such.
The closing → Next: block is printed:
→ Next: apply the approved low-risk fixes, then re-run /audit-docs to confirm clean
· real drift (not cosmetic) → /triage-issue · a concrete defect → /unit-lane --fix <n>
· already clean → nothing to do
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub gtrabanco/agentic-workflow --plugin agentic-workflow33 skills in this plugin
/agentic-workflow-doctorUser-initiated batch ceremony-failure triage: mine this project's own journal and unit docs for its accumulated ceremony failures, apply a fixed discard/report rubric, render one anonymized bundle, and route it upstream to an existing or new agentic-workflow issue — with consent. Read-only; the user starts it. Triggers: "agentic-workflow-doctor", "aw-doctor", "why do my reviews keep blocking", "triage my ceremony failures", "report a workflow bug upstream".
/audit-prAudit a whole PR against the delivery contract and return MERGE-READY or evidenced blockers with the full URL. Consumes the current review-change REVIEW-PASS receipt instead of re-running review axes; posts a SHA-bound ready comment; never edits or merges. Triggers: "audit-pr", "is this PR ready", "merge gate".
/Other plugins' skills for the same job