name: spec-consistency-audit description: Audit ChronosRefine specification documents for consistency, requirement-ID drift, phase misalignment, and stale references. Use when updating docs/specs, reviewing requirement changes, reconciling implementation plan vs coverage matrix, or before closing documentation-heavy work.
Spec Consistency Audit
Overview
Run deterministic checks against docs/specs and produce a concise findings report with exact file/line references and minimal patch recommendations.
When to use
- Before merging spec/documentation-heavy changes.
- When requirement IDs, phase mapping, or canonical references changed.
- When implementation plan and coverage matrix may have drifted.
Workflow
- Run
scripts/audit_specs.sh <repo-root>to collect baseline findings. - Classify findings by severity.
- Propose minimal edits that preserve canonical precedence from
AGENTS.md. - Re-run
scripts/audit_specs.shafter edits. - Report final status with unresolved risks.
When not to use
- Do not use for code-level bug triage or runtime failures.
- Do not use when the request is to implement product behavior; use implementation-focused skills instead.
Multi-agent Orchestration
Use read-heavy fan-out with one consolidation pass.
- Spawn
exploreragents in parallel by scope:- Canonical docs presence and stale reference scan.
- Coverage matrix phase header and count checks.
- Implementation plan phase/count alignment checks.
- Optionally spawn one
revieweragent to validate severity labels (P1/P2/P3) before final report. - Parent agent aggregates all findings, deduplicates evidence, and produces one prioritized report.
- If edits are required, execute edits with a single
workeragent only after aggregation.
Severity Rules
P1: Canonical conflicts, broken requirement IDs, or phase misalignment between matrix and implementation plan.P2: Stale references that can mislead implementation, including deprecated internal paths.P3: Hygiene issues (wording drift, weak anchors) that do not change requirement meaning.
Required Checks
- Canonical docs exist in
docs/specs. - No deprecated assistant-workspace path references in specs.
- No legacy
chronosrefine_prd_finalreferences. - Coverage matrix phase headers present and complete.
- Implementation plan phase requirement counts match matrix counts.
- Requirement IDs are discoverable in canonical docs.
See references/checklist.md for the full checklist and output contract.
Output Contract
Return findings in this format:
Priority:P1|P2|P3Issue: short statementEvidence: absolute file path with line numberFix: minimal exact change
If no findings remain, state: No consistency findings detected.
For multi-agent runs, each sub-agent must return:
scope: scan slice handledfindings: list of issuesevidence: absolute path + line numbers or exact command outputopen_risks: uncertainty or possible false positivesrecommended_next_action: merge, escalate, or ignore with reason
Scripts
- Use
scripts/audit_specs.shfor deterministic scan output. - If a script check fails due missing tools, fall back to equivalent
rg/sedcommands and note the fallback.