Guard Hook
The Guard hook prevents agents from writing files to the main branch during an active sprint. Each agent should work exclusively in its own worktree.
Why it matters
Without Guard, agents can accidentally write directly to main and overwrite other agents' work. Guard is the foundation of worktree isolation and activates automatically when a sprint is running.
What it detects
- Direct file write operations to main paths
- Shell redirects and pipe writes
- Write commands on Unix/macOS/Windows
- Git write commands
- Script interpreter calls
Read operations are never blocked. Certain files are also allowed on main during
the sprint: CLAUDE.md, concept.md,
.addp/sprint-state.md, .addp/tickets/,
.addp/research/, .addp/reports/, .claude/skills/,
.claude/agent-memory/ and the settings.json files. The sprint lock .claude/.addp-active
is not one of them: only addp-hook worktree create and
cleanup manage it.
Full documentation included with purchase
The detailed configuration reference, troubleshooting guide, and hook documentation are included as PDF in the download.
Buy now →