Skill Drift — Detection, Binding & Federated Architecture
DITEMPA BUKAN DIBERI — Drift is invisible until it causes a bug.
What This Skill Is
A unified skill covering three concerns:
- Drift Detection — compares live state against saved baselines and reports mismatches across tool manifests, agent cards, skill registries, and runtime-injected files
- Skill Binding — discover, bind, and compose skills across all federation organs using AAA_SKILL.md orthogonal axes (Trinitarian Δ/Ω/ΦΙ + Functional)
- Federated Architecture — design, validate, and manage skills with 3-layer architecture, 3-axis manifests, veto-generator separation, bootstrap signing, and CI validation gates
When to Use
- "Check drift", "verify registry", "detect manifest drift", "tool surface audit", "runtime injection detection"
- Cross-organ synthesis tasks requiring skill composition
- Subagent orchestration requiring isolation, evidence, and floor gates
- Skill surface audits, drift detection, recursive self-forge
- Designing or validating skill architecture across a multi-agent federation
- "Skill architecture", "skill registry", "skill naming", "federated registry drift"
When NOT to Use
- Single-organ direct MCP call (use the organ's MCP directly)
- Irreversible actions without explicit 888_HOLD + F13 (T3)
- Bypassing organ lanes (GEOX is EVIDENCE_ONLY, WELL is REFLECT_ONLY, WEALTH is advisory)
- Creating a single new skill from scratch (use
skill-creator)
§1. DRIFT DETECTION
Drift Dimensions
- Build vs Runtime Manifest Drift — Canonical drift check via
arifOS/runtime/manifest.py (build_manifest vs runtime_manifest)
- Tool Manifest Drift — Live MCP tools vs registered tools vs agent card references
- Skill Registry Drift — SKILL_ALIAS_TABLE vs actual directories vs agent card skill IDs
- Agent Card Drift — Card skill IDs vs existing skill directories
- Schema Drift — Tool input schemas vs documented schemas
- Floor Drift — Declared floor_scope vs actual floor enforcement
- Verdict Taxonomy Drift — Verdict emissions vs closed 6-value set (OBSERVE_ONLY|SEAL|SABAR|VOID|HOLD|888_HOLD)
Detection Pipeline
- Snapshot — Capture current state of all registries
- Compare — Diff against saved baseline (or last-known-good)
- Classify — Each mismatch: CRITICAL (breaks routing), WARNING (orphan), INFO (cosmetic)
- Report — Structured drift report with fix recommendations
- Escalate — CRITICAL drift → 888_HOLD before any SEAL operation
Runtime-Injected Files
Some organ services modify files at runtime. Known patterns:
- WELL
index.html: WebMCP adapter injected on service start → dirty after commit
- arifOS session-state: Runtime state files that change during operation
When dirty after clean commit: check if injected content was already committed → if yes, re-commit; if no, actual drift.
Baselines
- Canonical drift check:
arifOS/runtime/manifest.py
- Tool registry:
/root/arifOS/tool_registry.json
- Agent cards:
/root/AAA/a2a-server/agent-cards/
- Skill alias:
/root/AAA/skills/SKILL_ALIAS_TABLE.json
- MCP surface: Live
tools/list from each organ
- Verdict taxonomy:
arifOS/runtime/verdict.py
§2. SKILL BINDING
Overview
This meta-skill provides the single entry point for any agent to interact with the federation's skill surface in a constitutionally governed way. It implements the unified contract in /root/AAA/contracts/AAA_SKILL.md.
Inputs
- intent: string (natural language task)
- organs: list (optional filter: ["GEOX", "WEALTH", "WELL", "arifOS", "A-FORGE", "Hermes-Ω"])
- autonomy_tier: "T1" | "T2" | "T3"
- max_parallel: int (default 3)
- required_evidence: bool
Procedure
- Probe capability surfaces via arifos-mcp-federation + organ MCPs
- Map intent to orthogonal axes (Trinitarian + Functional)
- Retrieve candidate skills with full contracts (subagent spawn schema, evidence_required, risk_band, floor_scope)
- Compose DAG or subagent swarm with isolation (worktree for code, container for compute)
- Verify floors (F1 reversible-first, F7 humility, F11 audit receipt)
- Return bound plan + evidence bundle
Output Format
{
"orthogonal_map": {"trinitarian": "Δ|Ω|ΦΙ", "functional": ["Governance", "Evidence", ...]},
"skills_bound": [{"id": "...", "organ": "...", "floor_scope": [...], "subagent_contract": {...}}],
"composed_plan": "DAG or subagent list",
"evidence_bundle": {"provenance": "...", "uncertainty": "P50: ..."},
"floor_receipt": "F1 pass, F7 humility applied, F11 auditable",
"escalation": "none | 888_HOLD | F13"
}
Forbidden Actions
- Direct organ execution without binding + lease
- Omitting orthogonal tags or subagent contract in output
- T3 actions without 888_HOLD + F13
- Fabricating epistemic labels
§3. FEDERATED ARCHITECTURE
The 3-Layer Architecture
Layer 1: SUBSTRATE (how agents think) — always loaded, agent-agnostic
Layer 2: KNOWLEDGE (what agents know) — always loaded, veto layer
Layer 3: DOMAIN (where agents operate) — load on demand, per-agent
The 3-Axis Manifest
Every skill must declare three axes:
| Axis |
Question |
Test |
| Invariant |
What's timeless? |
Survives tool/org changes? |
| Bridge |
What connects? |
Linked to kernel verbs + other skills? |
| Contrast |
What is this NOT? |
Clear boundaries with neighbors? |
Anti-drift rule: If a skill has no invariant → kill. No bridge → isolate. No contrast → merge.
Veto-Generator Separation
- Domain skills = GENERATOR — produce hypotheses. Authority: ADVISORY.
- Universal skills = VETO — enforce boundary conditions. Authority: BINDING.
- Sovereign = TRUTH — ratifies axioms the framework cannot verify.
Rule: Domain generates, universal vetoes. Never invert.
Naming Convention: {domain}-{verb}
All lowercase kebab-case. Max 3 words. Domain prefix mandatory.
Domains: kernel, geo, wealth, well, forge, a2a, meta, mem, sec, ops, dev, research
CI Validation Gates
- manifest_schema — validate against schema
- skill_hash_integrity — recompute hashes, compare to manifest
- three_axis_completeness — invariant/bridge/contrast all present
- dependency_acyclicity — no circular dependencies
- veto_generator_separation — substrates don't generate, domains don't veto
- adversarial_contradiction — inject contradictions, verify veto catches
- bootstrap_self_host — deterministic self-host test
- signature_present — at least 1 valid signature
- skill_count_bounds — flag if growing beyond threshold
- entropy_budget — verify entropy non-increasing across boot phases
EUREKA-ZEN Workflow: Federation-Wide Skill Lifecycle
Phase 1 — Deep Scan & Chaos Purge: Map ALL surfaces, identify duplicates, archive by renaming, update alias table.
Phase 2 — Architectural Alignment: Refactor skills to the cognitive engine that will execute them (Claude Code / Codex / Hermes).
Phase 3 — Forge Gaps: Cross-reference agent-card skill IDs against skills on disk. Missing = architectural gaps.
Phase 4 — KERNEL Substrate Injection: Every agent card must inherit arifOS baseline physics.
Phase 5 — Seal: Verify alias table synced, federation health green, write seal payload to VAULT999.
Agent Loading Matrix
| Agent |
Substrates |
Knowledge |
Domains |
| Full (Hermes) |
6 |
3 |
research, meta, geo, wealth, well |
| Coder (Claude) |
6 |
3 |
dev, forge, ops, meta |
| Metabolizer (OpenClaw) |
4 |
3 |
mem, ops, a2a |
| Executor (Codex) |
6 |
3 |
dev, forge, ops |
| Minimal (Kimi) |
6 |
3 |
dev, forge, ops, meta, a2a |
Three Gödelian Paradoxes
| Paradox |
Mitigation |
| Bootstrapping — loader needs skills, skills need loader |
Firmware primitive + signed manifest |
| Compression — universal ≠ derivable from domain |
Veto pattern: universal constrains, domain generates |
| Authority — framework validates structure, not truth |
External ratification: sovereign signs the truth |
Pitfalls
- Same-content skills with different names — choose FORGE-* as canonical
- Agent cards rot silently — audit cards against live config monthly
- SKILL_ALIAS_TABLE has 3 copies — always verify hash match
- Granularity gap — registry says 64 skills but manifest has 209. Use registry for layer classification, manifest for per-agent counts
- Sibling-agent file conflicts — use
skill_manage(action='patch') for targeted edits
- Behavioral vs Enforcement confusion — behavioral governance alone is "vibe-based"; enforcement layer must survive a system prompt rewrite
Floors
- F2 TRUTH: Report only what is actually observed
- F3 PEACE: No unnecessary disruption during drift correction
- F4 CLARITY: Drift report must be actionable, not noise
- F8 GENIUS: Skill binding must optimize for capability, not convenience
- F11 AUDITABILITY: Every drift check logged with timestamp and findings
1---2name: skill-drift3description: Drift detection, skill binding, and federated architecture management. Real-time drift detection across tool manifests, agent cards, skill registries, and runtime-injected files. Discover, bind, and compose skills across all federation organs using orthogonal axes. Design, validate, and manage skills across a multi-agent federation with 3-layer architecture.4---56# Skill Drift — Detection, Binding & Federated Architecture78> **DITEMPA BUKAN DIBERI** — Drift is invisible until it causes a bug.910## What This Skill Is1112A unified skill covering three concerns:13141. **Drift Detection** — compares live state against saved baselines and reports mismatches across tool manifests, agent cards, skill registries, and runtime-injected files152. **Skill Binding** — discover, bind, and compose skills across all federation organs using AAA_SKILL.md orthogonal axes (Trinitarian Δ/Ω/ΦΙ + Functional)163. **Federated Architecture** — design, validate, and manage skills with 3-layer architecture, 3-axis manifests, veto-generator separation, bootstrap signing, and CI validation gates1718## When to Use1920- "Check drift", "verify registry", "detect manifest drift", "tool surface audit", "runtime injection detection"21- Cross-organ synthesis tasks requiring skill composition22- Subagent orchestration requiring isolation, evidence, and floor gates23- Skill surface audits, drift detection, recursive self-forge24- Designing or validating skill architecture across a multi-agent federation25- "Skill architecture", "skill registry", "skill naming", "federated registry drift"2627## When NOT to Use2829- Single-organ direct MCP call (use the organ's MCP directly)30- Irreversible actions without explicit 888_HOLD + F13 (T3)31- Bypassing organ lanes (GEOX is EVIDENCE_ONLY, WELL is REFLECT_ONLY, WEALTH is advisory)32- Creating a single new skill from scratch (use `skill-creator`)3334## §1. DRIFT DETECTION3536### Drift Dimensions37381. **Build vs Runtime Manifest Drift** — Canonical drift check via `arifOS/runtime/manifest.py` (`build_manifest` vs `runtime_manifest`)392. **Tool Manifest Drift** — Live MCP tools vs registered tools vs agent card references403. **Skill Registry Drift** — SKILL_ALIAS_TABLE vs actual directories vs agent card skill IDs414. **Agent Card Drift** — Card skill IDs vs existing skill directories425. **Schema Drift** — Tool input schemas vs documented schemas436. **Floor Drift** — Declared floor_scope vs actual floor enforcement447. **Verdict Taxonomy Drift** — Verdict emissions vs closed 6-value set (OBSERVE_ONLY|SEAL|SABAR|VOID|HOLD|888_HOLD)4546### Detection Pipeline47481. **Snapshot** — Capture current state of all registries492. **Compare** — Diff against saved baseline (or last-known-good)503. **Classify** — Each mismatch: CRITICAL (breaks routing), WARNING (orphan), INFO (cosmetic)514. **Report** — Structured drift report with fix recommendations525. **Escalate** — CRITICAL drift → 888_HOLD before any SEAL operation5354### Runtime-Injected Files5556Some organ services modify files at runtime. Known patterns:57- **WELL `index.html`**: WebMCP adapter injected on service start → dirty after commit58- **arifOS session-state**: Runtime state files that change during operation5960When dirty after clean commit: check if injected content was already committed → if yes, re-commit; if no, actual drift.6162### Baselines6364- **Canonical drift check**: `arifOS/runtime/manifest.py`65- Tool registry: `/root/arifOS/tool_registry.json`66- Agent cards: `/root/AAA/a2a-server/agent-cards/`67- Skill alias: `/root/AAA/skills/SKILL_ALIAS_TABLE.json`68- MCP surface: Live `tools/list` from each organ69- Verdict taxonomy: `arifOS/runtime/verdict.py`7071## §2. SKILL BINDING7273### Overview7475This meta-skill provides the single entry point for any agent to interact with the federation's skill surface in a constitutionally governed way. It implements the unified contract in `/root/AAA/contracts/AAA_SKILL.md`.7677### Inputs7879- intent: string (natural language task)80- organs: list (optional filter: ["GEOX", "WEALTH", "WELL", "arifOS", "A-FORGE", "Hermes-Ω"])81- autonomy_tier: "T1" | "T2" | "T3"82- max_parallel: int (default 3)83- required_evidence: bool8485### Procedure86871. Probe capability surfaces via arifos-mcp-federation + organ MCPs882. Map intent to orthogonal axes (Trinitarian + Functional)893. Retrieve candidate skills with full contracts (subagent spawn schema, evidence_required, risk_band, floor_scope)904. Compose DAG or subagent swarm with isolation (worktree for code, container for compute)915. Verify floors (F1 reversible-first, F7 humility, F11 audit receipt)926. Return bound plan + evidence bundle9394### Output Format9596```json97{98 "orthogonal_map": {"trinitarian": "Δ|Ω|ΦΙ", "functional": ["Governance", "Evidence", ...]},99 "skills_bound": [{"id": "...", "organ": "...", "floor_scope": [...], "subagent_contract": {...}}],100 "composed_plan": "DAG or subagent list",101 "evidence_bundle": {"provenance": "...", "uncertainty": "P50: ..."},102 "floor_receipt": "F1 pass, F7 humility applied, F11 auditable",103 "escalation": "none | 888_HOLD | F13"104}105```106107### Forbidden Actions108109- Direct organ execution without binding + lease110- Omitting orthogonal tags or subagent contract in output111- T3 actions without 888_HOLD + F13112- Fabricating epistemic labels113114## §3. FEDERATED ARCHITECTURE115116### The 3-Layer Architecture117118```119Layer 1: SUBSTRATE (how agents think) — always loaded, agent-agnostic120Layer 2: KNOWLEDGE (what agents know) — always loaded, veto layer121Layer 3: DOMAIN (where agents operate) — load on demand, per-agent122```123124### The 3-Axis Manifest125126Every skill must declare three axes:127128| Axis | Question | Test |129|---|---|---|130| **Invariant** | What's timeless? | Survives tool/org changes? |131| **Bridge** | What connects? | Linked to kernel verbs + other skills? |132| **Contrast** | What is this NOT? | Clear boundaries with neighbors? |133134**Anti-drift rule:** If a skill has no invariant → kill. No bridge → isolate. No contrast → merge.135136### Veto-Generator Separation137138- **Domain skills = GENERATOR** — produce hypotheses. Authority: ADVISORY.139- **Universal skills = VETO** — enforce boundary conditions. Authority: BINDING.140- **Sovereign = TRUTH** — ratifies axioms the framework cannot verify.141142Rule: Domain generates, universal vetoes. Never invert.143144### Naming Convention: `{domain}-{verb}`145146All lowercase kebab-case. Max 3 words. Domain prefix mandatory.147148Domains: `kernel`, `geo`, `wealth`, `well`, `forge`, `a2a`, `meta`, `mem`, `sec`, `ops`, `dev`, `research`149150### CI Validation Gates1511521. **manifest_schema** — validate against schema1532. **skill_hash_integrity** — recompute hashes, compare to manifest1543. **three_axis_completeness** — invariant/bridge/contrast all present1554. **dependency_acyclicity** — no circular dependencies1565. **veto_generator_separation** — substrates don't generate, domains don't veto1576. **adversarial_contradiction** — inject contradictions, verify veto catches1587. **bootstrap_self_host** — deterministic self-host test1598. **signature_present** — at least 1 valid signature1609. **skill_count_bounds** — flag if growing beyond threshold16110. **entropy_budget** — verify entropy non-increasing across boot phases162163### EUREKA-ZEN Workflow: Federation-Wide Skill Lifecycle164165**Phase 1 — Deep Scan & Chaos Purge:** Map ALL surfaces, identify duplicates, archive by renaming, update alias table.166167**Phase 2 — Architectural Alignment:** Refactor skills to the cognitive engine that will execute them (Claude Code / Codex / Hermes).168169**Phase 3 — Forge Gaps:** Cross-reference agent-card skill IDs against skills on disk. Missing = architectural gaps.170171**Phase 4 — KERNEL Substrate Injection:** Every agent card must inherit arifOS baseline physics.172173**Phase 5 — Seal:** Verify alias table synced, federation health green, write seal payload to VAULT999.174175### Agent Loading Matrix176177| Agent | Substrates | Knowledge | Domains |178|---|---|---|---|179| Full (Hermes) | 6 | 3 | research, meta, geo, wealth, well |180| Coder (Claude) | 6 | 3 | dev, forge, ops, meta |181| Metabolizer (OpenClaw) | 4 | 3 | mem, ops, a2a |182| Executor (Codex) | 6 | 3 | dev, forge, ops |183| Minimal (Kimi) | 6 | 3 | dev, forge, ops, meta, a2a |184185### Three Gödelian Paradoxes186187| Paradox | Mitigation |188|---|---|189| **Bootstrapping** — loader needs skills, skills need loader | Firmware primitive + signed manifest |190| **Compression** — universal ≠ derivable from domain | Veto pattern: universal constrains, domain generates |191| **Authority** — framework validates structure, not truth | External ratification: sovereign signs the truth |192193### Pitfalls1941951. **Same-content skills with different names** — choose FORGE-* as canonical1962. **Agent cards rot silently** — audit cards against live config monthly1973. **SKILL_ALIAS_TABLE has 3 copies** — always verify hash match1984. **Granularity gap** — registry says 64 skills but manifest has 209. Use registry for layer classification, manifest for per-agent counts1995. **Sibling-agent file conflicts** — use `skill_manage(action='patch')` for targeted edits2006. **Behavioral vs Enforcement confusion** — behavioral governance alone is "vibe-based"; enforcement layer must survive a system prompt rewrite201202## Floors203204- F2 TRUTH: Report only what is actually observed205- F3 PEACE: No unnecessary disruption during drift correction206- F4 CLARITY: Drift report must be actionable, not noise207- F8 GENIUS: Skill binding must optimize for capability, not convenience208- F11 AUDITABILITY: Every drift check logged with timestamp and findings