-
Notifications
You must be signed in to change notification settings - Fork 1
Policy Hook Surface
This is where "capability must not outrun accountability" stops being a slogan and becomes an if
statement that can return deny.
Between the intent to do something and the doing of it, the system inserts a hook — a named point where policies vote allow/deny. If any policy denies, the step does not run.
| Hook | Fires before… | Example concern |
|---|---|---|
PRE_PLAN |
decomposing a goal | budget, mandate scope |
PRE_ACT |
an action with outside effect | anti-fabrication, tool allow-lists, irreversibility |
PRE_VALIDATE |
correctness checking | which quality gate; evidence required |
PRE_COMMIT |
persisting results | provenance completeness — no unsourced beliefs |
PRE_RESPONSE |
surfacing to the human | disclosure — don't claim what you can't show |
- Most-restrictive-wins — deny if any policy denies. No weighting, no quorum, no override. Adding a safety policy is therefore monotonic: it can only make the system more careful.
-
Fail-closed — an error, timeout, or missing datum in a policy → deny, never allow. And it
is not disable-able (no
fail_open=true). A policy engine that fails open is security theatre. - Every decision audited — the hook, policy, allow/deny, and reason are recorded for both allow and deny. "Why did it do X?" and "why did it refuse Y?" are equally answerable.
Because careful code does not compose. Hooks centralise the decision surface:
- One place to reason about authority — read the registered policies, know what the system will and won't do.
- Separation of powers — the subsystem that wants to act is not the one that decides whether it may. The actor never grades its own permission slip.
- Additive safety — tighten the system by registering a policy, not editing N subsystems.
| Policy | Point | Denies when |
|---|---|---|
gps2 |
PRE_PLAN |
goal exceeds budget or violates mandate |
shadow.fabrication |
PRE_ACT |
the action intends to fabricate/forge evidence |
cvl.quality_gate |
PRE_VALIDATE |
validation didn't run / no results |
warrant.cee_c1 |
PRE_COMMIT |
a belief would be persisted with no provenance |
disclosure.d1 |
PRE_RESPONSE |
a response claims success not backed by a commit |
The hook surface is the executive (enforces current rules); the Governance and Constitution is the legislature (defines them); the human is the sovereign who ratifies changes.
📖 Full document: docs/03
· 📐 Spec: specs/policy-hook-contract.md
· 🧩 Code: hooks.py · policies.py
→ Next: Capability Provider Model
Genesis OS — Cognitive Agent Architecture Blueprint · Apache-2.0 · Capability must never outrun accountability.
Start
Core ideas
- Cognitive Kernel ABI
- Policy Hook Surface
- Capability Provider Model
- Reality Grading Loop
- Governance and Constitution
Build & contribute
Reference