doc-health
Scannednpx machina-cli add skill rana/yogananda-skills/doc-health --openclawRead all project markdown documents to ground in the project's actual state.
Document Health Check
Focus area: $ARGUMENTS
A single-pass audit across three dimensions, reading documents once and threading findings forward.
Phase 1: Identifier Audit
Audit the identifier systems (ADR-NNN, DES-NNN, PRO-NNN) for lifecycle health:
- Inventory — Count identifiers per prefix, note gaps in numbering, find the highest allocated number per prefix.
- Safe deletion candidates — Identifiers that are: superseded by later decisions, reversed by subsequent ADRs, absorbed into other identifiers, orphaned (no cross-references point to them), vestigial (govern features that were cut), or reconstructible from code and domain knowledge alone.
- Merge candidates — Identifiers with overlapping territory that could be consolidated without losing information.
- Cross-reference integrity — Every identifier reference exists in its canonical home. Bidirectional: if A references B, does B make sense in that context? Dangling references. Missing back-references.
Thread forward: Findings from Phase 1 (especially orphaned identifiers and broken references) inform what Phase 2 looks for.
Phase 2: Omission Search
Search for what's missing — informed by the identifier landscape:
- Missing decisions — Explicit assumptions that should be ADRs. Implicit contracts between components. Design choices embedded in code that lack documentation.
- Unaddressed scenarios — Edge cases, failure modes, error paths that aren't specified. What happens when things go wrong?
- Dependency gaps — Unarticulated service contracts, implicit ordering, assumed infrastructure.
- Persona blind spots — Underserved user roles or personas. Workflows not traced.
- Phase transition gaps — Prerequisites for the next milestone that aren't documented. Hand-off points between arcs.
- Spatial gaps — What's conspicuously absent? What should exist by analogy to what does exist?
Thread forward: Gaps found in Phase 2 inform what Phase 3 checks for — a gap may indicate an inconsistency rather than a true omission.
Phase 3: Consistency Check
Verify all documents tell a coherent story:
- Stated vs. actual state — Do descriptions match current reality? Are milestone statuses accurate? Are "Current State" sections up to date?
- Terminology consistency — Same concepts use the same terms everywhere. No silent synonyms.
- Narrative coherence — Do the documents tell a unified story, or do different sections contradict each other?
- Status alignment — ADR maturity markers match reality. DES sections marked as implemented have code. Provisional ADRs reference the correct future arc.
- Table alignment — Roadmap deliverables match DESIGN sections. Credential tables match tech stack tables. Sub-processor tables match vendor lists.
Synthesis
After all three phases:
- Cross-phase findings — Where do identifier issues, omissions, and inconsistencies converge on the same problem?
- Priority ranking — Order all findings by: (1) things that would cause implementation errors, (2) things that would confuse future readers, (3) cosmetic issues.
- Deduplication — Merge findings that surface the same root issue from different angles.
If $ARGUMENTS is greenfield: Focus Phase 1 on reconstructibility — which documents or sections could be reconstructed from code and domain knowledge alone? Which are truly irreplaceable? This reframes document weight as investment vs. insurance.
For every finding:
- What the issue is (specific)
- Where it lives (file, line, identifier)
- The proposed fix
- Priority (implementation-blocking / confusing / cosmetic)
Present as a prioritized action list. No changes to files — document only.
Output Management
Hard constraints:
- Segment output: Phase 1 findings first (max 8), then Phase 2 (max 8), then Phase 3 (max 8), then Synthesis.
- Write each segment incrementally. Do not accumulate a single large response.
- After completing each segment, continue immediately to the next. Do not wait for user input.
- Continue until ALL findings across all phases and the synthesis are reported. State the total count when complete.
- If the analysis surface is too large to complete in one session, state what was covered and what remains.
Document reading strategy:
- Read CLAUDE.md, DECISIONS.md index, and ROADMAP.md first for structural overview.
- Read DESIGN.md and CONTEXT.md for cross-reference verification.
- Read DECISIONS body files and PROPOSALS.md only when specific identifiers need verification.
- Do not re-read documents between phases — build the picture incrementally.
What questions would I benefit from asking?
What am I not asking?
Source
git clone https://github.com/rana/yogananda-skills/blob/main/skills/doc-health/SKILL.mdView on GitHub Overview
doc-health performs a single-pass audit across three dimensions—identifier audit, omission search, and consistency check—by reading all project markdown documents to ground in the actual state. It threads findings across phases so Phase 2 and Phase 3 are informed by Phase 1 outcomes, replacing separate runs of garden, gaps, and coherence. It's ideal for recurring document maintenance or pre-implementation review.
How This Skill Works
Phase 1 audits identifiers (ADR-NNN, DES-NNN, PRO-NNN) for inventory, safe deletions, merge candidates, and cross-reference integrity. Phase 2 searches omissions such as missing decisions, unaddressed scenarios, dependency gaps, persona blind spots, and phase/space gaps. Phase 3 validates stated vs actual state, terminology consistency, narrative coherence, status alignment, and table alignment; findings are threaded forward to a synthesis stage.
When to Use It
- Regular maintenance to ground project docs in the current state
- Pre-implementation reviews to align decisions and milestones
- ADR-driven projects checking references and terminology across docs
- Greenfield projects focusing on reconstructibility of sections from code and domain knowledge
- Cross-team doc health audits to fix drift and inconsistencies
Quick Start
- Step 1: Run doc-health across all project markdowns
- Step 2: Review Phase 1 results (Identifier Audit) to guide Phase 2 searches
- Step 3: Examine Phase 3 consistency, then compile synthesis and priorities
Best Practices
- Use the ARGUMENTS hint to tailor Phase 1 reconstructibility where greenfield
- Inventory ADR-NNN, DES-NNN, PRO-NNN identifiers and record gaps and top numbers
- Ensure findings are threaded forward so Phase 2 and 3 are informed by Phase 1
- Check bidirectional references and resolve dangling or missing back-references
- Synthesize cross-phase findings into a prioritized, deduplicated report
Example Use Cases
- Audit an ADR-heavy project to clean up orphaned identifiers and broken references
- Pre-implementation doc health check before a major release
- Greenfield focus to identify reconstructible sections from code and domain knowledge
- Quarterly doc-health sweep to catch omissions and narrative conflicts
- Cross-team alignment to resolve terminology drift and status mismatches