feat(evolution): three-layer defense against doc-codebase drift#16
Merged
Conversation
Add automated documentation consistency validation with enforcement hooks. When the 17th agent (Research Scout) was added, 10+ files had stale counts, version numbers, and model tiers. Root cause: CLAUDE.md cascade protocol existed as text but had zero enforcement. Layer 1 — scripts/validate-docs.sh: 7 programmatic checks (agent count, names, commands, version, tiers, tests, setup.sh literal). Runs in <2s. Exits non-zero on failure. Layer 2 — Claude Code hooks (.claude/settings.json): PreToolUse on git commit: blocks if validation fails PostToolUse on Write|Edit: cascade reminders for trigger files Stop: checks for uncommitted changes in trigger paths Layer 3 — Documentation: CLAUDE.md cascade protocol replaced with file-to-file mappings PR-005 added to PRIORS.md (missing_rule → enforcement) commit command updated with validation step Also fixes: - Agent count 16→17 across 10 files (Research Scout was undocumented) - Version 1.0.0→1.0.1 in pyproject.toml and __init__.py - Test badge 295→298, setup checks 11→10 - Command count 23→24 in STATE.md - Model Builder and Backend Engineer tiers: "Sonnet/Opus"→"Opus" - Research Scout added to specs/agents.md roster (#7), phase-in renumbered - PRD.md: 6 launch→7 launch, 10→11 project delivery agents Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
SamPlvs
added a commit
that referenced
this pull request
Apr 30, 2026
feat(evolution): three-layer defense against doc-codebase drift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add automated documentation consistency validation with enforcement hooks. When the 17th agent (Research Scout) was added, 10+ files had stale counts, version numbers, and model tiers. Root cause: CLAUDE.md cascade protocol existed as text but had zero enforcement.
Layer 1 — scripts/validate-docs.sh:
7 programmatic checks (agent count, names, commands, version, tiers,
tests, setup.sh literal). Runs in <2s. Exits non-zero on failure.
Layer 2 — Claude Code hooks (.claude/settings.json):
PreToolUse on git commit: blocks if validation fails
PostToolUse on Write|Edit: cascade reminders for trigger files
Stop: checks for uncommitted changes in trigger paths
Layer 3 — Documentation:
CLAUDE.md cascade protocol replaced with file-to-file mappings
PR-005 added to PRIORS.md (missing_rule → enforcement)
commit command updated with validation step
Also fixes: