-
Notifications
You must be signed in to change notification settings - Fork 0
Hooks
A hook is a script crickets runs at a fixed point in an agent session — before a tool call, at session start, when a turn ends — to observe or steer what the agent does. Each plugin declares its hooks in a single hooks.json (Claude Code: <plugin>/hooks/hooks.json; Antigravity: <plugin>/hooks.json), and the host runs them straight from the plugin. Installing the plugin is the whole setup — nothing lands in .claude/hooks/.
| Hook | Plugin | Event | What it does | Details |
|---|---|---|---|---|
harness-context |
developer-workflows |
SessionStart |
surfaces .harness/PLAN.md + progress.md at boot so the agent reads the plan first |
spec |
kill-switch |
developer-safety |
PreToolUse |
halts the next tool call when .harness/STOP exists |
how to use |
steer |
developer-safety |
PreToolUse |
injects .harness/STEER.md into context, then archives it |
how to use |
commit-on-stop |
developer-safety |
Stop |
saves a dirty tree to an auto-save/<ts> branch for crash recovery |
how to use |
evidence-tracker |
code-review |
PreToolUse |
blocks flipping a PLAN.md task to [x] until evidence for it is recorded (default-FAIL /work gate) |
spec |
Hosts: harness-context and evidence-tracker are Claude-only. The developer-safety trio install on both hosts but run observe-only on Antigravity (no veto/inject) — see Compatibility.
The Details links point at how each hook operates. Today the
developer-safetytrio point at Operator-control hooks and the rest at their hook spec; when each plugin gets its own page, these repoint to that page's hooks section.
-
Events. A hook registers on one host event —
SessionStart(session boot),PreToolUse(before every tool call), orStop(end of each turn). The host fires every hook registered on that event. -
Effect. A
PreToolUsehook can block the tool call (a non-zero exit — e.g.kill-switch) or inject text into context (stdout — e.g.steer). AStophook runs as a side effect (e.g.commit-on-stop); aSessionStarthook seeds context. -
Ordering. When several hooks share an event, they run in the order the plugin's
hooks.jsondeclares them —developer-safetyregisterskill-switchbeforesteer, so a halt always pre-empts a steer. - Per-host effectiveness. On Antigravity, plugin hooks run observe/side-effect-only: any hook whose value depends on a veto (exit code) or an inject (stdout) is Claude-only-effective. See Compatibility.
-
Operator-control hooks — how to use the
developer-safetytrio (halt / redirect / recover). - Compatibility — per-host hook effectiveness.
-
Customization Types — what
kind: hookis, and where hook sources live. - Modify a crickets plugin — edit a hook script and dogfood it.
🔧 How-to
- Plugin anatomy
- Repo layout
- Compatibility
- CI gates
- Troubleshooting
- Customization Types
- Manifest Schema
- Per-Host Paths
- Hooks
- Evaluator
- Antigravity Limitations
- Wiki Watch Config
- Style-learning loop
- Modify a plugin
- Add a skill
- Add a plugin
- Named plans
- Coordinator roles (pending)
- Obsidian vault backend (pending)
- GitHub Projects
- Testing Conventions
- Releasing Conventions
- Design Docs