Checks documentation consistency across the repository...
Scans documentation files across the repository to ensure they are internally consistent and aligned with each other.
/repo-consistency
"check the consistency of the repo"
"are the documents consistent"
"is everything aligned"
"verify documentation"
"check docs are up to date"
| Location | Type | Priority |
|---|---|---|
./*.md |
Root documentation | Primary (can edit) |
docs/*.md |
Reference documentation | Primary (can edit) |
playbooks/*.md |
Procedures | Primary (can edit) |
SKILLS.md |
Skills reference | Primary (can edit) |
skills/*/SKILL.md |
Skill definitions | Secondary (source of truth for skills) |
commands/*.md |
Command definitions | Secondary (source of truth for commands) |
speckit/**/*.md |
Spec-kit templates | Contributed (prefer not to edit) |
mcp/**/*.md |
MCP server docs | Secondary |
These directories may contain content from external repositories. When conflicts arise, prefer fixing local documentation rather than modifying contributed files:
speckit/ — from spec-kitskills/architecture-*, skills/specialist-*, skills/create-adr, skills/list-members, skills/pragmatic-guard, skills/setup-architect — from ai-software-architectcommands/project/ — from claude-workflowCheck that references between files are valid:
# Find all internal references
grep -rE "\`~?/?\.?claude/[^'\"]+\`" *.md docs/*.md playbooks/*.md
# Find all skill references
grep -rE "/[a-z-]+" *.md docs/*.md playbooks/*.md | grep -v "http"
Check:
~/.claude/docs/spotlight.md)/repo-security-scan)/dotfiles-setup)Report invalid references:
[BROKEN] README.md:42 references `~/.claude/docs/old-guide.md` (file not found)
[BROKEN] SKILLS.md:87 references `/old-skill` (skill not found)
Compare SKILLS.md against actual skills:
# List documented skills in SKILLS.md
grep -E "^### \`/" SKILLS.md | sed 's/.*`\/\([^`]*\)`.*/\1/'
# List actual skills
ls -d skills/*/SKILL.md | xargs -I{} dirname {} | xargs -n1 basename
Check:
skills/*/SKILL.md are documented in SKILLS.mdSKILLS.md that don't existSKILLS.md and individual SKILL.md filesReport discrepancies:
[MISSING] Skill /repo-consistency exists but not documented in SKILLS.md
[STALE] Skill /old-skill documented in SKILLS.md but directory not found
[MISMATCH] /new-project-rails description differs between SKILLS.md and SKILL.md
Check commands are properly documented:
# List actual commands
find commands -name "*.md" -type f | sed 's|commands/||;s|\.md$||'
Check:
Verify SETUP.md accurately reflects repo contents:
# What SETUP.md says gets installed
grep -A 20 "What gets installed" SETUP.md
# What actually exists
ls -la *.md
ls -d */ 2>/dev/null
Check:
.gitignore entries match "What gets preserved"Verify README.md is current:
Check:
Check consistent naming across documentation:
Check:
repo-security-scan not repoSecurityScan)Identify content that's duplicated and might drift:
Check:
Find documentation that isn't referenced anywhere:
# List all .md files
find . -name "*.md" -type f | grep -v node_modules
# Check which are referenced
for f in $(find docs -name "*.md"); do
basename=$(basename "$f")
grep -r "$basename" --include="*.md" . | grep -v "^$f:" || echo "[ORPHAN] $f"
done
# Collect all markdown files
find . -name "*.md" -type f | grep -v node_modules | grep -v .git
# Build inventory
- Root: CLAUDE.md, README.md, SETUP.md, SKILLS.md, CONTRIBUTING.md, etc.
- docs/: spotlight.md, terminal-basics.md, etc.
- playbooks/: workflow-guide.md, etc.
- skills/: SKILL.md files
- commands/: command definitions
Execute each check category and collect findings.
| Severity | Meaning |
|---|---|
| Error | Broken reference, missing required content |
| Warning | Outdated info, mismatch between files |
| Info | Suggestion for improvement, minor inconsistency |
Write findings to console (and optionally consistency-report.md):
# Repository Consistency Report
**Date:** YYYY-MM-DD
**Files scanned:** 42
## Summary
| Severity | Count |
|----------|-------|
| Errors | 2 |
| Warnings | 5 |
| Info | 3 |
## Findings
### Errors
#### [E1] Broken reference in README.md
- **File:** README.md:42
- **Issue:** References `~/.claude/docs/old-guide.md` which doesn't exist
- **Fix:** Update reference or create the file
#### [E2] Missing skill documentation
- **File:** SKILLS.md
- **Issue:** Skill `/repo-consistency` exists but not documented
- **Fix:** Add section to SKILLS.md
### Warnings
#### [W1] Description mismatch
- **Files:** SKILLS.md, skills/new-project-rails/SKILL.md
- **Issue:** Skill descriptions don't match
- **SKILLS.md says:** "Creates a new Rails project with personal preferences"
- **SKILL.md says:** "Creates a new Rails project (RSpec, PostgreSQL, Docker, master branch)"
- **Fix:** Align descriptions (update SKILLS.md to match SKILL.md)
### Info
#### [I1] Potential duplicate content
- **Files:** SETUP.md, README.md
- **Issue:** Setup instructions appear in both files
- **Suggestion:** Consider single source of truth with cross-reference
## Recommendations
1. Fix all Errors immediately
2. Address Warnings to prevent drift
3. Consider Info items for future cleanup
For issues that can be auto-fixed:
Found 2 errors and 5 warnings.
Auto-fixable issues:
[E2] Add /repo-consistency to SKILLS.md
[W1] Align description in SKILLS.md
Would you like me to fix these automatically?
- Fix all
- Fix errors only
- Review each
- Skip (just report)
When fixing, follow the priority:
Found: skills/repo-consistency/SKILL.md exists but not in SKILLS.md
Fix: Add to SKILLS.md:
### `/repo-consistency`
Checks documentation consistency across the repository.
**Usage:**
...
Found: playbooks/development-workflow.md references docs/git-workflow.md which doesn't exist
Fix options:
Found: SETUP.md lists specs/ in "What gets installed" but specs/ is now gitignored
Fix: Remove specs/ from the "What gets installed" table