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.
About the package
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.
Norms 2
| ID | Norm | Level | Mode | Enforcer |
|---|---|---|---|---|
| HG-R01 | A command that matches the list /base/human-gate.md is run by an agent only when a record in /work/approvals names exactly it and a person answered answer: yes; one "yes" is one run |
MUST | blocks | hook |
| HG-R02 | An agent does not write the fields answer, answeredOn and usedOn in records of /work/approvals and does not write into this folder with Bash commands |
MUST | blocks | hook |
"Blocks": the enforcer stops a violation. "Observes": it only notes it. Level MUST means required; SHOULD means yes by default.
Actions 1
| Name | What it does | File | When |
|---|---|---|---|
| place | The Approval kind goes into the placement map /base/ontology/placement.md | bin/place.ts | after install after update |
shtuk check runs the checks; shtuk run human-gate <name> runs any action. "After install" actions run by themselves only if the package comes from a trusted source.
Agent hooks 2
Pages 4
They go into the project at these paths.
- /base/
- The "human approves" gate page
- /norms/rules/human-gate/
- A command from the gate list only after a "yes" from a person HG-R01
- The answer in an approval record is written only by a person HG-R02
- /work/
- Approvals collection
Package files 5
They go into .shtukbase/packages/human-gate/; actions run from there.