Checks `status.py --can-edit --project {project}`. If DENIED (exit code 1), the commit is blocked with instructions to create or transition a task.
### Bypass
`git commit --no-verify` bypasses the hook. Use only when intentionally committing framework documentation or config changes that don't require a task.
## Layer 3: Prompt-Based Rules
Each phase prompt includes ALLOWED/FORBIDDEN sections. These are advisory — they rely on the agent choosing to follow them. The harness pre-edit hook and pre-commit hook provide computational enforcement that these rules describe.
The plugin intercepts `edit` and `write` tool calls, runs `status.py --can-edit --project {dir} --file {path} --json`, and blocks the edit if DENIED. The agent receives a message explaining why the edit was blocked and how to proceed.
### aider
Aider supports pre-edit hooks via its command system. Before each editing session:
These tools do not currently support pre-edit hooks. For these, the git pre-commit hook is the primary enforcement mechanism. Configure your project's `.git/hooks/pre-commit` as described above.
### Generic (any harness)
Any tool that can execute shell commands before file edits should:
1. Before session start: `--can-edit --project {p}` — verify at least one task allows edits
2. Before each file edit: `--can-edit --project {p} --file {path} --json` — verify the specific file is in scope
3. On DENIED: block the edit and show the denial message to the user