/spec-forge:audit runs instead · from spec-forge
Audits project documentation for quality, completeness, consistency, and code alignment. Scans docs against the codebase to find stale references, missing coverage, and contradictions, producing a structured findings report with severity levels and fix recommendations.
This skill never runs in Claude Code
It ships in spec-forge at skills/, but /spec-forge:audit (a command, or a skill Claude Code finds first) has the same name: typing it, or Claude choosing it, runs that one instead.
Systematically review existing project documentation for quality, completeness, consistency with code, and internal coherence. Produce a prioritized findings report.
| Severity | Meaning | Example |
|---|---|---|
| Critical | Documentation is wrong or dangerously misleading | API doc shows deleted endpoint, security guide has incorrect auth flow |
| Major | Significant gap or inconsistency that causes confusion | Feature doc missing for a core module, conflicting architecture descriptions |
| Minor | Quality issue that degrades usefulness but isn't blocking | Typos in API params, outdated version numbers, missing examples |
| Info | Observation or improvement suggestion | Better organization possible, diagram would help clarity |
Parse the arguments to determine what to audit:
/spec-forge:audit ../../other-project), use that as the project rootdocs/, README.md, or markdown files)If no documentation found, inform the user and stop.
Use AskUserQuestion to ask:
Scan the documentation landscape and build a complete inventory.
Fast path (preferred): resolve <sf_scripts> (see @../shared/scripts.md) and run
python3 "<sf_scripts>/sf-scan.py" --root "<project_root>" --docs-only
Use its documents / document_index fields as the starting enumeration — the discovered markdown files plus the requirement IDs each declares — so you do not have to glob and count by hand. The script enumerates; you still judge each document's TYPE (the categories below) and its quality. Fallback: if python3 is unavailable or the script is not found, glob and enumerate by hand as described below.
api — API reference documentationarchitecture — Architecture, design, system overviewfeature — Feature specifications or descriptionsguide — How-to guides, tutorials, getting startedspec — Protocol specs, conformance, standardsdecision — ADRs, decision recordsreference — Data models, type mappings, glossariesmeta — READMEs, indexes, navigation docsother — Doesn't fit above categoriesDisplay the inventory:
Document Inventory: {project-name}
Path: {project-root}
Total documents: {N}
Category | Count | Files
api | 4 | api/README.md, api/executor-api.md, ...
feature | 8 | features/acl-system.md, ...
guide | 7 | guides/creating-modules.md, ...
...
Skip this step if the user opted out in Step 1 (e.g., docs-only repo).
Cross-reference documentation against the actual codebase:
Report findings:
Report findings:
Check documents against each other for contradictions and coherence:
Fast path (preferred) for the structural half of Completeness: resolve <sf_scripts> (see @../shared/scripts.md) and run, per document,
python3 "<sf_scripts>/sf-verify-doc.py" "<file>" --type unknown
Audit runs on arbitrary external doc collections, not spec-forge's own doc types, so pass --type unknown to run only the type-agnostic checks — non-empty + titled, well-formed/unique IDs, and no leftover template placeholders — instead of expecting spec-forge sections. Use its findings for the deterministic part of the Completeness dimension below (TBD/TODO markers, placeholder text, empty sections). Whether a doc is missing sections for its own purpose stays a model judgement. Fallback: if python3 is unavailable or the script is not found, check these by hand.
Evaluate each document (or document category) on quality dimensions:
| Dimension | What to Check |
|---|---|
| Completeness | Missing sections, TBD/TODO markers, placeholder text, empty sections |
| Accuracy | Incorrect information (detected via code alignment or internal contradictions) |
| Clarity | Ambiguous language, undefined terms, unclear instructions |
| Specificity | Vague descriptions vs. concrete details (e.g., "fast" vs. "< 100ms p99") |
| Actionability | Can a developer act on this doc without guessing? Are examples provided? |
| Currency | Signs of staleness — old dates, deprecated references, outdated patterns |
| Navigation | Can readers find what they need? Cross-references, indexes, logical organization |
Write the findings report to {project-docs-path}/audit-report.md (or a user-specified path).
Report format:
# Documentation Audit Report
> Project: {project-name}
> Audited: {date}
> Scope: {full / api-only / feature-only / etc.}
> Documents reviewed: {N}
> Code alignment: {Yes / Skipped}
## Executive Summary
{2-3 paragraph overview: overall documentation health, biggest strengths, most critical gaps}
## Findings Summary
| Severity | Count | Categories |
|----------|-------|------------|
| Critical | {n} | {which areas} |
| Major | {n} | {which areas} |
| Minor | {n} | {which areas} |
| Info | {n} | {which areas} |
## Document Health Matrix (optional)
Grade a document only where the letter grade drives a priority action; otherwise summarize its health in prose. The A–D boundaries are undefined, so do not force a grade onto every document just to fill the table — a clear sentence beats pseudo-precision. Include only the rows worth grading.
| Document | Completeness | Accuracy | Clarity | Currency | Overall |
|----------|-------------|----------|---------|----------|---------|
| {path} | {A/B/C/D} | {A/B/C/D}| {A/B/C/D}| {A/B/C/D}| {A/B/C/D} |
(A = Excellent, B = Good, C = Needs Work, D = Poor)
## Critical Findings
### CRIT-001: {Finding title}
- **Location**: {file path, section/line}
- **Issue**: {What is wrong}
- **Evidence**: {How you know — code reference, conflicting doc, etc.}
- **Impact**: {Why this matters}
- **Fix**: {Concrete recommendation}
### CRIT-002: ...
## Major Findings
### MAJ-001: {Finding title}
...
## Minor Findings
### MIN-001: {Finding title}
...
## Observations & Suggestions
### INFO-001: {Suggestion title}
...
## Coverage Map
{Mermaid diagram showing documentation coverage — which areas are well-documented vs. gaps}
## Recommended Priority Actions
1. **{Action}** — fixes CRIT-001, CRIT-002 — {estimated effort: small/medium/large}
2. **{Action}** — fixes MAJ-001 through MAJ-003 — {effort}
3. ...
Display a summary to the user:
Audit complete: {project-name}
Documents reviewed: {N}
Findings: {critical} critical, {major} major, {minor} minor, {info} info
Report: {path-to-audit-report.md}
Top 3 priority actions:
1. {action} — {severity} — {effort}
2. {action} — {severity} — {effort}
3. {action} — {severity} — {effort}
Use AskUserQuestion to ask:
If the user wants fixes, proceed to Step 8.
For each finding the user wants fixed:
Rules for fixes:
Update the audit report to mark resolved findings:
### CRIT-001: {Finding title} [RESOLVED]
audit-report.md exists, note which findings are new vs. recurringWhat SKILL.md sets; muted values are Claude Code's defaults
spec-forge@tercel-claude-plugins is listed by tercel/tercel-claude-plugins — review the source before installing
npx claudepluginhub tercel/tercel-claude-plugins --plugin spec-forge11 skills in this plugin
/analyzeAnalyze a collection of documents to build a knowledge map, identify themes, find gaps, duplicates, conflicts, and staleness, then produce an organized analysis with improvement recommendations. Designed for document ecosystems (cross-repo docs, research collections, mixed-format doc repos) where the challenge is understanding the landscape, not auditing against code.
/decomposeLightweight project decomposition skill. Analyzes project scope through a brief interview and determines whether the project should be treated as a single feature or split into multiple sub-features. For multi-split projects, generates a project manifest listing sub-features, dependencies, and execution order.
/ideaUse when exploring a new idea before writing formal specifications. Guides users through iterative discovery, research, and critical analysis to crystallize vague ideas into validated requirement drafts. Includes anti-pseudo-requirement checks, competitive research, demand evidence gathering, and "What if we don't build this?" analysis. Supports pause/resume across sessions, stores ideas in the project's ideas/ directory, and graduates validated ideas into the spec-forge auto chain ([idea] → [decompose] → [prd] → srs → tech-design → review).
Other plugins' skills for the same job