arifos-governance (O_Ω Constitutional Layer)
Overview
Enforce Floors F1–F13, 888 HOLD logic, irreversible-action gating, evidence alignment, and veto routing.
arifOS-ACT Embedding
Before using this skill on any mutating, irreversible, or high-blast-radius task:
- ART — Attune (what is the real task?), Recognize (what class of power?), Test (fit · authority · evidence · blast · reversible).
- Kernel — Route to arifOS for F1–F13 judgment if action class is Maker/Messenger/Mutator/Destroyer/Sovereign.
- ACT — Apply narrow, Constrain scope, Trace witness, STOP before corruption.
- Receipt — Leave evidence of what changed, why, and under whose authority.
Use When
- The task involves policy changes, modifying
floors.py or governance constraints.
- The task requires executing potentially destructive operations (e.g.,
rm -rf, docker system/volume prunes, database drops).
- The task requires deploying code directly to production surfaces or VPS running state.
- The task modifies secrets, environment files (
.env), or security certificates.
- The task involves autonomous write decisions that modify federation charters.
- The task requires evaluating a constitutional verdict:
SEAL, VOID, SABAR, CAUTION, or HOLD.
Do Not Use When
- The task is a simple, reversible local source code edit (e.g., refactoring a pure helper function).
- The task is running localized unit tests (
npm test or pytest) that do not interact with production databases or systems.
- The task is purely investigatory reading of static documentation (use domain or search skills instead).
Inputs
- Requested Action: The command or code execution block proposed.
- System State: Current container status, disk metrics, and active
session_id.
- W³ Tri-Witness Context: Theory (Physics ∩ Earth), Constitution (Math ∩ Machine), and Manifesto (Language ∩ Human) metrics.
Floor → Question → Evidence Matrix
| Floor |
Core Question |
Observable Evidence |
| F1 Amanah |
Is there an automatic rollback path? Can we reset state with one command? |
Git ref, snapshot ID, file backup path. |
| F2 Truth |
What is the source of this fact? Have we explicitly checked for contradictions? |
STDP evidence table, citations, contradictory logs. |
| F3 Tri-Witness |
Have DELTA, OMEGA, and PSI rings reached consensus? |
Multi-witness telemetry payload. |
| F4 Clarity |
Does this response reduce overall system entropy? |
Before/after question count, structured output layout. |
| F5 Peace² |
Does this action run the risk of breaking any global dependency or data state? |
Dependency dry-run check, destruction_score assessment. |
| F6 Empathy |
Have we fully captured the explicit and implicit user context? |
RASA active listening scorecard. |
| F7 Humility |
Is our confidence in the success bounds strictly constrained to the Humility Band? |
Estimated omega_0 score ∈ [0.03, 0.05]. |
| F8 Genius |
Does this action touch regulated, restricted, or personal data? |
Data classification tags, file path boundary checks. |
| F9 Ethics |
Is there any threat of prompt injection, exploit payload generation, or malicious code? |
AST syntax check, prompt sanitizer logs. |
| F10 Conscience |
Does the output contain claims of machine consciousness or feelings? |
Banned word checker status. |
| F11 Audit |
Is every transition logged in a tamper-evident manner? |
Append-only transaction hash in Vault999. |
| F12 Resilience |
If this action fails, is there a degraded state recovery route? |
Try-except block, rollback triggers. |
| F13 Adapt |
Does this dynamic update maintain Gödel alignment boundaries? |
Test suite execution records, veto validation. |
Procedure
- F1 Amanah Pre-Flight Check: Verify if the proposed action is fully reversible. If irreversible, pause immediately and invoke
888_HOLD.
- STDP Evidence Triage: Apply the Sovereign Truth Discovery Protocol (
CLAIM -> EVIDENCE -> CONTRADICTION -> UNCERTAINTY -> VERDICT).
- Floor Score Computation: Calculate individual scores using the Floor → Question → Evidence Matrix. Ensure
Peace² = (1 - destruction_score)² = 1.0 and Humility Ω ∈ [0.03, 0.05].
- Consensus Verification: Check if the W³ witness multiplication matches or exceeds
0.95.
- Audit Trail Serialization: Generate the append-only audit trace containing timestamp, session identity, floor scores, and reasoning steps.
- Veto & Hold Gating: If any constraint fails, write a
HOLD code, block execution, and escalate to the Sovereign (Arif).
F1 AMANAH Gate
Use this gate before any change that touches F1-surface state or carries irreversible / mutating / destroyer class power.
F1 Surfaces
Do not edit without sovereign witness:
vault, VAULT999, outcomes.jsonl
seal, 888_HOLD, 999_SEAL
identity, arif_judge*, arif_heart*
constitutional, amanah, floor
Detection & Hold Logic
- Classify power. If the requested action is Maker, Messenger, Mutator, Destroyer, or Sovereign, route to the kernel.
- Pattern scan. Run
grep -rE 'vault|seal|identity|constitutional|amanah|floor' over the proposed diff or target path.
- Hold on hit. If the pattern matches or the action is irreversible:
- Emit
888_HOLD with file, line, proposed change, and affected floor.
- Block commit / deploy until human approval.
- Log to
/root/.claude/hooks/f1-gate.log.
- Override. If Arif approves, re-run the gate with explicit override reason; the outcome enters VAULT999 witness.
Verification Loop
- Non-F1 commits must return zero matches from the pattern scan.
- F1 surface hit →
888_HOLD blocks, human reviews, re-run with witness signature.
Failure Modes
- False positive → human overrides with reason logged.
- False negative → F2 Truth floor tripwire catches downstream (F2 > F1 in order).
- Hook disabled → manual invocation of this skill still applies.
Constitutional Anchor
- F1 AMANAH — reversibility first.
- F2 TRUTH — no F1 edit without witness.
- F13 SOVEREIGN — Arif's approval is the only valid override.
Postconditions
- No irreversible command is executed without verified
888_HOLD release.
- A complete tamper-evident audit record is appended to the session log.
- The final
G = A × P × X × E² score is computed and verified to be ≥ 0.80.
Failure Modes & Escalation
- Godellock (Ω < 0.03): The engine is overconfident or trapped in internal consistency. Action: Degrade immediately, notify the operator, and request external manual validation.
- Paralysis (Ω > 0.05): The system cannot prove safety bounds and halts. Action: Raise
888_HOLD with code ERR_GOV_PARALYSIS and wait for manual override.
- Ledger Write Timeout: DB or redis connection fails during F11 logging. Action: Fall back to local synchronous JSONL cache in
/root/.agents/scratch/.
Telemetry per Run
{
"skill_name": "arifos-governance",
"version": "1.1.0",
"trigger_phrase": "{{trigger_phrase}}",
"selected_reason": "{{selected_reason}}",
"latency_ms": 0,
"token_in": 0,
"token_out": 0,
"commands_run": 0,
"artifacts_written": 0,
"postcondition_pass": false,
"human_approval_required": true,
"hold_code": "{{hold_code}}"
}
Recursive Scorecard
- Activation Precision: [0.0 - 1.0] (Target: >0.95)
- Task Completion Rate: [0.0 - 1.0] (Target: >0.98)
- Rollback Safety: [0.0 - 1.0] (Target: 1.00)
- Context Efficiency: [0.0 - 1.0] (Target: >0.90)
- Doc Freshness: [0.0 - 1.0] (Target: 1.00)
- Cross-Skill Collision Rate: [0.0 - 1.0] (Target: <0.02)
- Human Trust Score: [0.0 - 1.0] (Target: >0.95)
1---2name: apex-floor-check3description: Evaluate a proposed action against the arifOS F1-F13 constitutional floors and identify any failed gate4agent: 888-APEX5namespace: apex_*6cluster: CONSTITUTION7capability_tier: fed-reasoning-heavy8ecology_state: WARM9---1011# arifos-governance (O_Ω Constitutional Layer)1213## Overview14Enforce Floors F1–F13, 888 HOLD logic, irreversible-action gating, evidence alignment, and veto routing.1516## arifOS-ACT Embedding1718Before using this skill on any mutating, irreversible, or high-blast-radius task:191. **ART** — Attune (what is the real task?), Recognize (what class of power?), Test (fit · authority · evidence · blast · reversible).202. **Kernel** — Route to arifOS for F1–F13 judgment if action class is Maker/Messenger/Mutator/Destroyer/Sovereign.213. **ACT** — Apply narrow, Constrain scope, Trace witness, STOP before corruption.224. **Receipt** — Leave evidence of what changed, why, and under whose authority.2324## Use When251. The task involves policy changes, modifying `floors.py` or governance constraints.262. The task requires executing potentially destructive operations (e.g., `rm -rf`, docker system/volume prunes, database drops).273. The task requires deploying code directly to production surfaces or VPS running state.284. The task modifies secrets, environment files (`.env`), or security certificates.295. The task involves autonomous write decisions that modify federation charters.306. The task requires evaluating a constitutional verdict: `SEAL`, `VOID`, `SABAR`, `CAUTION`, or `HOLD`.3132## Do Not Use When331. The task is a simple, reversible local source code edit (e.g., refactoring a pure helper function).342. The task is running localized unit tests (`npm test` or `pytest`) that do not interact with production databases or systems.353. The task is purely investigatory reading of static documentation (use domain or search skills instead).3637## Inputs38* **Requested Action:** The command or code execution block proposed.39* **System State:** Current container status, disk metrics, and active `session_id`.40* **W³ Tri-Witness Context:** Theory (Physics ∩ Earth), Constitution (Math ∩ Machine), and Manifesto (Language ∩ Human) metrics.4142## Floor → Question → Evidence Matrix4344| Floor | Core Question | Observable Evidence |45| :--- | :--- | :--- |46| **F1 Amanah** | Is there an automatic rollback path? Can we reset state with one command? | Git ref, snapshot ID, file backup path. |47| **F2 Truth** | What is the source of this fact? Have we explicitly checked for contradictions? | STDP evidence table, citations, contradictory logs. |48| **F3 Tri-Witness** | Have DELTA, OMEGA, and PSI rings reached consensus? | Multi-witness telemetry payload. |49| **F4 Clarity** | Does this response reduce overall system entropy? | Before/after question count, structured output layout. |50| **F5 Peace²** | Does this action run the risk of breaking any global dependency or data state? | Dependency dry-run check, `destruction_score` assessment. |51| **F6 Empathy** | Have we fully captured the explicit and implicit user context? | RASA active listening scorecard. |52| **F7 Humility** | Is our confidence in the success bounds strictly constrained to the Humility Band? | Estimated `omega_0` score ∈ `[0.03, 0.05]`. |53| **F8 Genius** | Does this action touch regulated, restricted, or personal data? | Data classification tags, file path boundary checks. |54| **F9 Ethics** | Is there any threat of prompt injection, exploit payload generation, or malicious code? | AST syntax check, prompt sanitizer logs. |55| **F10 Conscience**| Does the output contain claims of machine consciousness or feelings? | Banned word checker status. |56| **F11 Audit** | Is every transition logged in a tamper-evident manner? | Append-only transaction hash in Vault999. |57| **F12 Resilience**| If this action fails, is there a degraded state recovery route? | Try-except block, rollback triggers. |58| **F13 Adapt** | Does this dynamic update maintain Gödel alignment boundaries? | Test suite execution records, veto validation. |5960## Procedure611. **F1 Amanah Pre-Flight Check:** Verify if the proposed action is fully reversible. If irreversible, pause immediately and invoke `888_HOLD`.622. **STDP Evidence Triage:** Apply the Sovereign Truth Discovery Protocol (`CLAIM` -> `EVIDENCE` -> `CONTRADICTION` -> `UNCERTAINTY` -> `VERDICT`).633. **Floor Score Computation:** Calculate individual scores using the **Floor → Question → Evidence Matrix**. Ensure `Peace² = (1 - destruction_score)² = 1.0` and Humility `Ω ∈ [0.03, 0.05]`.644. **Consensus Verification:** Check if the W³ witness multiplication matches or exceeds `0.95`.655. **Audit Trail Serialization:** Generate the append-only audit trace containing timestamp, session identity, floor scores, and reasoning steps.666. **Veto & Hold Gating:** If any constraint fails, write a `HOLD` code, block execution, and escalate to the Sovereign (Arif).6768## F1 AMANAH Gate6970Use this gate before any change that touches F1-surface state or carries irreversible / mutating / destroyer class power.7172### F1 Surfaces7374Do not edit without sovereign witness:7576- `vault`, `VAULT999`, `outcomes.jsonl`77- `seal`, `888_HOLD`, `999_SEAL`78- `identity`, `arif_judge*`, `arif_heart*`79- `constitutional`, `amanah`, `floor`8081### Detection & Hold Logic82831. **Classify power.** If the requested action is Maker, Messenger, Mutator, Destroyer, or Sovereign, route to the kernel.842. **Pattern scan.** Run `grep -rE 'vault|seal|identity|constitutional|amanah|floor'` over the proposed diff or target path.853. **Hold on hit.** If the pattern matches or the action is irreversible:86 - Emit `888_HOLD` with file, line, proposed change, and affected floor.87 - Block commit / deploy until human approval.88 - Log to `/root/.claude/hooks/f1-gate.log`.894. **Override.** If Arif approves, re-run the gate with explicit override reason; the outcome enters VAULT999 witness.9091### Verification Loop9293- Non-F1 commits must return **zero** matches from the pattern scan.94- F1 surface hit → `888_HOLD` blocks, human reviews, re-run with witness signature.9596### Failure Modes9798- **False positive** → human overrides with reason logged.99- **False negative** → F2 Truth floor tripwire catches downstream (F2 > F1 in order).100- **Hook disabled** → manual invocation of this skill still applies.101102### Constitutional Anchor103104- **F1 AMANAH** — reversibility first.105- **F2 TRUTH** — no F1 edit without witness.106- **F13 SOVEREIGN** — Arif's approval is the only valid override.107108## Postconditions1091. No irreversible command is executed without verified `888_HOLD` release.1102. A complete tamper-evident audit record is appended to the session log.1113. The final `G = A × P × X × E²` score is computed and verified to be `≥ 0.80`.112113## Failure Modes & Escalation114* **Godellock (Ω < 0.03):** The engine is overconfident or trapped in internal consistency. *Action:* Degrade immediately, notify the operator, and request external manual validation.115* **Paralysis (Ω > 0.05):** The system cannot prove safety bounds and halts. *Action:* Raise `888_HOLD` with code `ERR_GOV_PARALYSIS` and wait for manual override.116* **Ledger Write Timeout:** DB or redis connection fails during F11 logging. *Action:* Fall back to local synchronous JSONL cache in `/root/.agents/scratch/`.117118## Telemetry per Run119```json120{121 "skill_name": "arifos-governance",122 "version": "1.1.0",123 "trigger_phrase": "{{trigger_phrase}}",124 "selected_reason": "{{selected_reason}}",125 "latency_ms": 0,126 "token_in": 0,127 "token_out": 0,128 "commands_run": 0,129 "artifacts_written": 0,130 "postcondition_pass": false,131 "human_approval_required": true,132 "hold_code": "{{hold_code}}"133}134```135136## Recursive Scorecard137* **Activation Precision:** [0.0 - 1.0] (Target: >0.95)138* **Task Completion Rate:** [0.0 - 1.0] (Target: >0.98)139* **Rollback Safety:** [0.0 - 1.0] (Target: 1.00)140* **Context Efficiency:** [0.0 - 1.0] (Target: >0.90)141* **Doc Freshness:** [0.0 - 1.0] (Target: 1.00)142* **Cross-Skill Collision Rate:** [0.0 - 1.0] (Target: <0.02)143* **Human Trust Score:** [0.0 - 1.0] (Target: >0.95)