Bulletproof hooks for autonomous development with Claude Code.
Prevents 6 common failure modes in autonomous development:
- Context rot → Agents must include spec references
- Quality gate skipping → PreToolUse blocks delegation without quality gates
- Git warnings → PostTask checks for uncommitted changes
- Transient artifacts → ArtifactTracker tracks created scripts
- Doc summarization → PreEdit warns before editing VERBATIM sections
- CLAUDE.md rewriting → VERBATIM protection for critical sections
4 hooks that enforce quality:
- PreToolUse - Blocks Task delegation without quality gates + spec + delivery plan path
- PostTask - Prompts for code review after tasks, checks git commits + delivery plan updates
- PreEdit - Warns before editing VERBATIM sections
- ArtifactTracker - Tracks created scripts for wrap-up review
git clone https://github.com/mcj-coder/claude-autonomous-hooks.git
cd claude-autonomous-hooks
./scripts/install.shSee INSTALLATION.md for detailed instructions.
When you delegate a task to a subagent:
-
PreToolUse verifies you included:
- Quality gates (copied VERBATIM from delivery plan)
- Spec reference (full requirements, not summaries)
- Delivery plan path
-
Subagent completes the task with full context
-
PostTask prompts you to review:
- Minimal changes check
- Best practices check
- Quality gate check
- Git status check
- Delivery plan update check
When editing documentation, PreEdit warns you before editing VERBATIM sections:
<!-- VERBATIM: Critical Content -->
This content must be preserved exactly
<!-- END VERBATIM -->- INSTALLATION.md - How to install
- CONFIGURATION.md - Settings and configuration
- CLAUDE-execution-protocol.md - Add to your CLAUDE.md
- delivery-plan-template.md - Example delivery plan
For best results, install:
- QMD:
bun install -g https://github.com/tobi/qmd- Semantic doc search - grepai:
go install github.com/yoanbernabeu/grepai@latest- Semantic code search
See CONFIGURATION.md for details.
MIT
Contributions welcome! Please open an issue or PR.
Created by Martin Jarvis (@mcj-coder)
- Claude Code - Official Claude Code documentation
- Superpowers - Claude Code workflows
- oh-my-claude - Claude Code extensions