# Akal Cognitive Invariants

> SUPERSEDED by governance/akal-cognitive-invariants. CLAP v2 — Bloom's Taxonomy as constitutional physics. Renamed to AKAL (عقل)

- Skill: `ariffazil/akal-cognitive-invariants` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add ariffazil/akal-cognitive-invariants`
- Raw SKILL.md: https://api.skillmd.com/api/skills/ariffazil/akal-cognitive-invariants/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: ariffazil (https://skillmd.com/u/ariffazil)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/ariffazil/akal-cognitive-invariants

---


# Cognitive Level Assertion Protocol (CLAP v2)

> **Bloom's Taxonomy as constitutional physics for governed cognition.**
> Three layers. Seven levels. One sovereign. No skipping.

---

## The Three-Layer Architecture

CLAP v2 models cognition not as a linear staircase but as a **three-layer sovereignty stack** where the sovereign participates above and within the loop — not only at the final verdict.

```
┌─────────────────────────────────────────────┐
│  LAYER 0 — SOVEREIGN METACOGNITION (L0)     │  ← Sovereign only
│  Observe the observer. Catch bias. Maintain  │
│  agency. Prevent cognitive outsourcing.       │
├─────────────────────────────────────────────┤
│  LAYER 1 — SOVEREIGN JUDGMENT (L5b)         │  ← Sovereign only
│  Ethics. Values. Worth. Responsibility.      │
│  Should this exist? Is this good?            │
├─────────────────────────────────────────────┤
│  LAYER 2 — AGENT COGNITION (L1–L4, L5a)    │  ← Agent-executed
│  L5a VERIFY  — Did reasoning hold up?        │
│  L4 ANALYZE  — Decompose, contradict, test   │
│  L3 APPLY    — Execute procedure             │
│  L2 UNDERSTAND — Bind, label, mean           │
│  L1 REMEMBER — Recall substrate              │
└─────────────────────────────────────────────┘
```

**The critical boundary:**
- Agent can **prove** something is correct (L5a VERIFY)
- Only sovereign can **decide** if it is good (L5b JUDGE)
- Agent can **observe** patterns (L1-L4)
- Only sovereign can **observe the observer** (L0)

---

## The Seven Levels

### L0: METACOGNITION — Sovereign Only
- **Actor:** Sovereign exclusively. Agent cannot perform L0.
- **What fires:** Observe the observer. Catch rationalization. Detect when "understanding" is being performed rather than achieved. See the agent's cognitive posture. Maintain intentionality.
- **Why agent cannot do this:** Even `arif_critique(mode=shadow)` is an agent critiquing itself — it cannot escape its own frame. Only the sovereign can see the frame.
- **Checkpoint:** L0 is continuous — it runs in parallel with all other levels, not as a step in the chain.
- **Receipt:** `metacognition_receipt` — sovereign's observation of the loop's cognitive posture. Optional but always available.
- **Key principle:** This is the "shadow witness" — the ability to notice when you're outsourcing cognition vs. leveraging it.

### L1: REMEMBER — Agent
- **Kernel verb:** `arif_memory(mode=recall)` + `arif_observe`
- **What fires:** Load receipts, invariants, prior state, VAULT999 seals
- **NO reasoning allowed at this level**
- **Checkpoint:** Cannot proceed to Understand without emitting a memory-recall receipt
- **Receipt:** `memory_recall_receipt` — what was loaded, from where, staleness
- **Sovereign engagement:** Sovereign sees the receipts. Not passive — active confirmation that the right substrate was loaded.

### L2: UNDERSTAND — Agent
- **Kernel verb:** `arif_think(mode=reason)`
- **What fires:** Semantic binding, schema alignment, OBS/DER/INT/SPEC labeling, meaning construction
- **Checkpoint:** Cannot Apply without producing a semantic-binding trace
- **Receipt:** `semantic_binding_trace` — what the signals mean, evidence labels, confidence
- **Sovereign engagement:** Sovereign confirms the schema. Does the binding match the sovereign's intent? If the agent misunderstands the frame, correction happens here — not at L5.

### L3: APPLY — Agent
- **Kernel verb:** `arif_forge(mode=dry_run)` + skill invocation
- **What fires:** Execute known procedures, run skills, run MCP endpoints, perform workflows
- **Checkpoint:** Cannot Analyze without a dry-run execution receipt
- **Receipt:** `dry_run_receipt` — what was executed, inputs, outputs, success/fail
- **Sovereign engagement:** Sovereign approves the procedure. Not micromanaging execution — confirming the approach before the machine commits resources.

### L4: ANALYZE — Agent
- **Kernel verb:** `arif_think(mode=verify)` + `arif_critique(mode=redteam)`
- **What fires:** Decomposition, contradiction detection, boundary testing, blindspot activation
- **Checkpoint:** Cannot Evaluate without verification + redteam trace
- **Receipt:** `verification_trace` — contradictions found, boundaries tested, blindspots flagged
- **Sovereign engagement:** Sovereign reviews contradictions. The agent surfaces; the sovereign interprets. A contradiction the sovereign dismisses is different from one the sovereign acts on.

### L5a: VERIFY — Agent
- **Kernel verb:** `arif_think(mode=verify)` + `arif_critique(mode=redteam)`
- **What fires:** Technical evaluation — evidence validation, logic consistency, statistical soundness, reasoning chain integrity
- **Checkpoint:** Cannot proceed to L5b without a verification receipt
- **Receipt:** `verification_receipt` — did the reasoning hold up? What failed? What passed?
- **Key distinction:** L5a answers "Is this correct?" — a technical question agents can answer.

### L5b: JUDGE — Sovereign
- **Kernel verb:** `arif_judge` + `arif_critique(mode=critique)`
- **What fires:** Constitutional verdict (SEAL/HOLD/SABAR/VOID), ΔΩΨ enforcement, floor compliance, ethical evaluation
- **Checkpoint:** Cannot Create without a verdict receipt
- **Receipt:** `verdict_receipt` — verdict class, floors checked, cooling ledger entry
- **Key distinction:** L5b answers "Should this exist?" — an ethical question only the sovereign can answer.
- **Sovereign engagement:** This IS sovereign engagement. The judge is the sovereign. No delegation.

### L6: CREATE — Agent under sovereign authority
- **Kernel verb:** `arif_forge(mode=generate)` + `arif_seal`
- **What fires:** Forge new artifact, generate new geometry, produce irreversible lineage, seal to VAULT999
- **Checkpoint:** Cannot seal without full Bloom-level ascent evidence (receipts L1-L5b)
- **Receipt:** `seal_lineage_receipt` — complete ascent chain, all prior receipts attached
- **Sovereign engagement:** Sovereign ack required for irreversible mutations (T3). The machine forges; the human intends.

---

## Sovereign Engagement Floor (Anti-Atrophy Rule)

**The sovereign must participate at every level, even when the agent performs the heavy lifting.**

This prevents sovereign cognitive decay — the rubber-stamp ethics problem where the sovereign signs L5b verdicts without understanding L1-L4 context.

| Level | Agent does | Sovereign does |
|---|---|---|
| L0 | Nothing (cannot) | Observes the loop. Catches bias. Maintains agency. |
| L1 | Loads receipts, invariants, state | Sees receipts. Confirms right substrate loaded. |
| L2 | Binds, labels, constructs meaning | Confirms schema matches intent. Corrects frame. |
| L3 | Executes procedure (dry run) | Approves approach before commit. |
| L4 | Decomposes, redteams, tests | Reviews contradictions. Interprets findings. |
| L5a | Verifies reasoning chain | Receives verification. Notes failures. |
| L5b | Nothing (cannot) | Judges. Decides. Takes responsibility. |
| L6 | Forges artifact, seals to VAULT999 | Acks irreversible. Owns the artifact. |

**The atrophy risk:** If the sovereign skips L1-L4 and only engages at L5b, judgment becomes disconnected from evidence. The sovereign is signing verdicts they don't understand. CLAP v2 prevents this by requiring sovereign participation signals at every level.

**Fast-path exception:** For T1 AUTO-DO (low-risk, read-only), sovereign engagement is reduced to L0 + L5b. The agent handles L1-L4/L5a autonomously. Full sovereign engagement required for T2+ actions.

---

## Enforcement Rules

### Rule 1: No Level Skipping
```
L1 REMEMBER → L2 UNDERSTAND → L3 APPLY → L4 ANALYZE → L5a VERIFY → L5b JUDGE → L6 CREATE
```
Each level MUST complete before the next begins. The kernel rejects out-of-order calls:
- `arif_judge` without prior `arif_think(mode=verify)` → **VOID**
- `arif_forge(mode=generate)` without prior `arif_judge` → **SABAR**
- `arif_think(mode=reason)` without prior `arif_memory(mode=recall)` → **HOLD**
- L5a without prior L4 → **HOLD** (cannot verify what hasn't been analyzed)

### Rule 2: L5 Split is Mandatory
L5a (VERIFY) and L5b (JUDGE) are NEVER merged. The agent verifies; the sovereign judges. Even when the same verb (`arif_think`) is used, the Bloom level declaration distinguishes them:
```
arif_think(level="L5a", mode="verify")   ← agent
arif_judge(level="L5b")                   ← sovereign
```

### Rule 3: L0 is Continuous, Not Sequential
L0 (Metacognition) runs in parallel. It is not a step in the chain — it is a layer above the chain. The sovereign can invoke L0 at any point. If L0 detects cognitive outsourcing (sovereign not engaging), it can pause the loop.

### Rule 4: Receipt Chain Required
Every level produces a receipt. The Create level (VAULT999 seal) requires all prior receipts attached as evidence:
- L1: memory_recall_receipt
- L2: semantic_binding_trace
- L3: dry_run_receipt
- L4: verification_trace
- L5a: verification_receipt
- L5b: verdict_receipt
- L6: seal_lineage_receipt (aggregates L1-L5b)
- L0: metacognition_receipt (optional, sovereign-generated)

### Rule 5: Short-Circuit Allowed Downward Only
If analysis reveals the action should be VOIDed, the agent can halt at any level and return to a prior level. Example — Analysis finds contradiction → return to Understand for re-binding. This is not skipping — it's governed regression.

### Rule 6: Bloom Level Must Be Declared
Every kernel verb invocation must declare its Bloom level:
```
arif_memory(level="L1", mode="recall")
arif_think(level="L2", mode="reason")
arif_forge(level="L3", mode="dry_run")
arif_think(level="L4", mode="verify")
arif_think(level="L5a", mode="verify")
arif_judge(level="L5b")
arif_forge(level="L6", mode="generate")
```

### Rule 7: Fast-Path for Low-Risk Actions
For T1 AUTO-DO (read-only, low-blast-radius), levels can be collapsed:
- `L1 + L2` merge into `arif_observe(mode=hybrid_discovery)`
- `L3 + L4` merge into `arif_forge(mode=query)`
- Sovereign engagement reduces to L0 + L5b
- Full 7-level ascent required for T2+ actions, irreversible mutations, VAULT999 seals, constitutional amendments

---

## Anti-Patterns (What CLAP v2 Prevents)

| Anti-Pattern | What Happens | CLAP Gate |
|---|---|---|
| **Premature Judgment** | Agent judges without analyzing | L4 blocks L5a/L5b |
| **Premature Creation** | Agent builds without evaluating | L5b blocks L6 |
| **Ungoverned Action** | Agent acts without understanding | L2 blocks L3 |
| **Context-Free Reasoning** | Agent reasons without recall | L1 blocks L2 |
| **Seal Without Ascent** | Agent seals without full chain | L6 requires L1-L5b receipts |
| **Rubber-Stamp Ethics** | Sovereign signs L5b without L1-L4 engagement | Sovereign Engagement Floor requires participation at every level |
| **Sovereign Atrophy** | Sovereign outsources all lower levels | L0 detects and pauses |
| **Merged Evaluation** | Agent self-judges (L5a = L5b) | L5 split is mandatory — agent verifies, sovereign judges |
| **Agent Metacognition** | Agent claims to observe its own bias | L0 is sovereign-only — agent cannot escape its own frame |

---

## Integration Points

### With Hermes-Prime Reflex v2
CLAP v2 wraps around the existing reflex protocol. The reflex pre-action checklist becomes L4 (Analyze). CLAP adds L1-L3 before it and L5a-L6 after. L0 runs continuously above.

### With AAA Skills
Every skill invocation should declare which Bloom level it operates at. Skills that span multiple levels must internally enforce the sub-level ordering.

### With Governance Floors (F1-F13)
Floor compliance is checked at L5b (Judge) via `arif_judge`. But floor-awareness begins at L2 (Understand) when binding context — the agent must know WHICH floors apply before reasoning. L0 (Metacognition) catches when floor compliance is being performed as theater rather than genuine constraint.

### With VAULT999
The seal chain grows only when L6 fires with full L1-L5b ascent evidence. This makes every VAULT999 entry traceable to its complete cognitive lineage — including the sovereign's engagement at every level.

### With Sovereign Atrophy Prevention
L0 is the structural answer to "if you outsource L1-L4, your L5b judgment becomes rubber-stamp." The sovereign must demonstrate engagement at L1-L4 or the loop holds. This is not about the sovereign doing the work — it's about the sovereign staying connected to the work being done.

---

## Five Kernel Invariants (Load-Bearing — See `references/clap-v2-invariants.md`)

| # | Invariant | Kernel Invariant | What It Prevents |
|---|---|---|---|
| 1 | **Cognitive Friction** | Difficulty-as-signal | Shallow completion on hard problems |
| 2 | **Metacognitive Debugging** | Self-audit trace | Unexamined thinking, hidden assumptions |
| 3 | **Synthesis over Consumption** | Novelty requirement | Regurgitation, rearranged inputs |
| 4 | **Values-Pass** | Dual evaluation (L5a/L5b) | Correctness without ethics |
| 5 | **Deliberate Latency** | Multi-phase + cooling | Rushed irreversible decisions |

**Combined refusal posture:**
- Don't trust easy answers (Friction)
- Don't trust unexamined thinking (Metacognition)
- Don't settle for rearranged inputs (Synthesis)
- Don't optimize without values (Ethics)
- Don't rush irreversible moves (Latency)

These invariants are not guidelines — they are physics. Full spec with kernel verb integration, refusal conditions, and implementation hooks in `references/clap-v2-invariants.md`.

---

## Sovereign Preference (2026-07-11)

> "90% of what we built today hasn't made your life easier yet. Stop building fences. Start building roads."

AKAL is architecturally complete. But governance without output is theatre. **Productivity over completeness. Roads over fences.** When building for the sovereign: prioritize things he uses daily (news, analysis, file organization) over things that make the system "complete." The fences are built. Now build the roads.

## Live Wiring Status (2026-07-11)

All five hooks wired into live MCP tools via `akal_wiring.py`:
- `arif_think()` → `akal_pre_think()` (friction + PRESENT)
- `arif_critique()` → `akal_post_critique()` (shadow validation)
- `arif_forge()` → `akal_pre_forge()` (novelty + AMANAH)
- `arif_judge()` → `akal_pre_judge()` (L5a/L5b dual-eval)
- `arif_seal()` → `akal_pre_seal()` (latency + ENERGY-ENTROPY)

All hooks advisory (try/except, never block). Results augment `result.meta`.

Ed25519: keypair generated at `/root/A-FORGE/IDENTITY/keys/arif/`, registry updated, crypto verified. `arif_init` nonce+signature wiring pending — see `references/ed25519-identity-setup.md` in governance/akal-cognitive-invariants.

## Quick Reference Card

```
L0 METACOGNITION  → sovereign-only, continuous  → receipt: metacognition (optional)
L1 REMEMBER       → arif_memory(recall)         → receipt: memory_recall
L2 UNDERSTAND     → arif_think(reason)           → receipt: semantic_binding
L3 APPLY          → arif_forge(dry_run)          → receipt: dry_run_execution
L4 ANALYZE        → arif_think(verify) + redteam → receipt: verification_trace
L5a VERIFY        → arif_think(verify)           → receipt: verification
L5b JUDGE         → arif_judge                   → receipt: verdict
L6 CREATE         → arif_forge(generate) + seal  → receipt: seal_lineage
```

**Agent does the work. Sovereign does the meaning.**
**Agent verifies. Sovereign judges.**
**Agent observes. Sovereign observes the observer.**
**No ascent without receipts. No seal without ascent. No skipping. Ever.**

---

*v2.0.0 — 2026-07-11. Three-layer sovereignty stack. L0 metacognition. L5a/L5b split. Sovereign engagement floor. Constitutional amendment candidate after 10-interaction stress test.*
*DITEMPA BUKAN DIBERI*

