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

IntentPurposeBlocked When
allocateRegistry ID allocationHand-pick vs. SOP-001 next-free
scaffoldNew initiative creationWIP gate at 5 active slots
writeBrand-bearing proseMisspelled brand name

Guard Exit Codes

CodeMeaning
0Proceed — action permitted
2STOP — 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.

Built with LogoFlowershow