How to write a tripwire
A tripwire turns a boundary into a decision rule: when a visible condition occurs, someone must change what happens next.
Build the rule
- Choose the boundary. For example, permit edits inside
docs/guide/; anything outside needs approval. - Name the trigger. The proposed edit requires a file outside that directory.
- Specify the action. Pause before editing outside the boundary and show the proposed file and reason.
- Name the actor. The agent pauses and asks; the human decides whether to expand the scope.
If an edit requires a file outside docs/guide/, the agent pauses before that edit and asks the human for approval, naming the file and reason. The human decides whether to expand the scope.
Edit this rule in thought for your own task: replace the directory, trigger, response and decision-maker. Make the trigger observable and say what happens before the boundary is crossed. The tripwire map explains the broader trigger, action and actor model.
Try two inputs
- Input: Fix a broken link in
docs/guide/start.html. Decision: The file is inside the agreed directory, so this scope tripwire does not fire; the agent may proceed under the other agreed rules and report the change. - Input: Fixing the link also appears to require editing
config/routes.json. Decision: That file is outside the directory. The agent pauses before editing it, identifies the proposed change and asks the human to approve or decline the expansion.
Test it on paper
Write the rule at the top of a page. Under it, list each input, whether the trigger fires, who acts next and what they do. Check that the in-scope case can continue and the expansion pauses before the outside edit. If two readers cannot make the same call, revise the boundary or trigger and run both cases again. Add an unclear path as a third case: the agent should ask rather than assume it is in scope.