Hermes Preflight Guard — Reference
Hermes Preflight Guard — Reference
v1ss2
What It Is
The preflight guard (_system/hooks/preflight_guard.py) is the blocking enforcement layer for governed writes. Implements ADR-008 Section 3B and DD-014 (query-and-block beats memorize-the-rules).
Three Intent Types
| Intent | Purpose | Blocked When |
|---|---|---|
| allocate | Registry ID allocation | Hand-pick vs. SOP-001 next-free |
| scaffold | New initiative creation | WIP gate at 5 active slots |
| write | Brand-bearing prose | Misspelled brand name |
Guard Exit Codes
| Code | Meaning |
|---|---|
| 0 | Proceed — action permitted |
| 2 | STOP — violation surfaced, action blocked |
Fail-closed: if the guard is unreachable, exit 2 (stalled write beats wrong one).
How to Call
echo '{"intent":"allocate","family":"PLAN","want":"NNN"}' | python3 preflight_guard.py echo '{"intent":"scaffold"}' | python3 preflight_guard.py echo '{"intent":"write","text":"…"}' | python3 preflight_guard.py
Canonical Source
ADR-008 at 00-09 SYS/05 Registries/05.16 ADR/ADR-008-rules-as-api-preflight-guard.md
DD-014 at 00-09 SYS/05 Registries/05.15 Decision Documents/DD-014-governance-query-vs-memorize.md
VIS-local reference. Script at _system/hooks/preflight_guard.py, rules at _system/controllers/rules_api.py.