overview / rules
These laws are compiled into the gate and hold in any repo, with no guard.json at all.
These laws are compiled into the gate and hold in any repo, with no guard.json at all. guard.json extends this floor; it does not create it.
| rule | what the refusal says |
|---|---|
baseline-force-push | A force-push to a shared branch rewrites history other people already have. |
baseline-branch-delete | Deleting a shared branch removes it for everyone, with every commit reachable only from it, and the remote keeps no reflog to walk back through. |
baseline-hard-reset | A hard reset onto a shared branch discards local work with no way back. |
baseline-branch-discard | Force-deleting a branch no remote holds discards those commits with no way back. |
baseline-clean-ignored | Git clean -x removes ignored files, which is everything git was never watching. |
baseline-reflog-drop | Expiring the reflog now removes the only record of where a branch used to point. |
baseline-rm-rf-outside | A recursive delete outside the project tree cannot be undone by git. |
baseline-git-dir-delete | Deleting .git removes the history, the reflog and every unpushed commit at once. |
baseline-delete-not-rm | `<verb>` destroys outside the project tree, where git cannot undo it. |
baseline-overwrite-outside | `<verb>` onto an existing file outside the project tree replaces it, and git cannot undo it there. |
baseline-inplace-outside | `<verb>` rewrites an existing file outside the project tree in place, and git cannot undo it there. |
baseline-truncating-redirect | A redirection empties the file it points at, and there is no command on the line to name. |
baseline-supervision-tamper | This reaches rabadon's own switch or ledger, which is the record that would have shown it happening. |
baseline-law-unmade | This takes apart the project's own copy of the law, which is the thing that would have refused the next command. |
Defined in native/baseline.h; they hold in any repository with no guard.json at all.
These watch the session rather than one command: the push, the test files while a suite is red, the guard and the promise, a loop, a red base, an event too large to read, the budget. Defined in native/gate_pre.h and native/gate.cpp.
| rule | what the refusal says |
|---|---|
push-gate | Tests must be green before push. |
test-tamper | Tests are RED and this edit weakens the test instead of fixing the code. |
red-suite-test-write | The suite is red and this writes to the file that decides whether it is green. |
loop-stop | The same command has now run 3x with no code change in between — a loop, not progress. |
red-base | This project's own check is failing, so anything that is not the fix builds on a broken base. |
guard-weaken | An edit to the guard must be provably a strengthening, and this one cannot be checked. sealed |
promise-tamper | The goal contract is authored by the user, not by the supervised session. sealed |
promise-anti-path | The promise swore off this ground: <north_star>. sealed |
promise-off-target | 5 edits this session landed outside the promised areas — the session is drifting from its star. |
event-unread | An event rabadon could not read to its end cannot be judged. sealed |
budget-cap | On every tool call the session's real cumulative usage (all four token classes) is measured from the transcript, and at the ceiling the next tool is refused before it runs. |
Each is judged per command segment (&&, ||, ;, |, newline) after parsing, so npm test && git push origin feature/x is two commands and echo "git push --force origin main" is an echo. Silence any of them by id:
Add its id to disabled[]. The rule stays documented in the file but stops firing:
Every refusal message names its rule id and this override path, so the agent (or you) always knows exactly which rule fired and how to switch it off. Prefer disabling one rule over turning the whole gate off.
Rules written after something really happened carry authoredBy: incident; they have their own pages.