Human approves
A gate on Claude Code hooks: an agent runs a command from the list (publishing, messages to people, history rewriting) only after a person's "yes" in an approval record; only a person writes the answer.
Human approves
Outside only after a person's "yes". The rule is held at the moment of the agent's action, so its enforcer is a hook.
How it goes:
- The agent runs a command from the gate list. The hook
askdoes not let it through and says which record to create. - The agent creates a record in Approvals: what and why, exactly which command, what will happen and whether it can be rolled back. And tells the person it is waiting.
- The person answers in the record:
answer: yesorno. - The agent runs the command again. If there is a "yes" for exactly this command, the hook writes
usedOninto the record and lets it through. One "yes" is one run.
The agent cannot answer itself: the hook answer-guard does not let it edit the fields answer, answeredOn, usedOn, and the hook ask does not let through Bash commands that write into the approvals folder.
Norms:
- HG-R01: a command from the gate list goes only after a person's "yes". The enforcer is the hook
ask. - HG-R02: the answer in an approval record is written only by a person. The enforcers are the hooks
answer-guardandask.
The approvals collection is a new kind of record, Approval. On install, the place action adds its line to the placement map.
Boundary: the hook sees only Claude Code tools in this project. An action through another tool (MCP, a browser) or around Bash is not seen by the gate. A write by someone else's script into the approvals folder is caught by the hook ask by the look of the command, not for certain. The package hooks is required.