arifos-recursive-audit v2.0 (O_Ω Constitutional Layer)
v2.0 Upgrade (2026-08-08)
Cross-surface methodology added. Now audits ALL 10 agent surfaces (AAA canonical, kimi, opencode, grok, claude, codex, hermes, hermes-asi, openclaw-ws, openclaw-bundled), not just one directory.
Contrast template: /root/AAA/skills/CONTRAST_ANALYSIS_2026-08-08.md
Cross-Surface Inventory (NEW)
# 1. Dump each surface (example for AAA vs kimi)
comm -23 <(ls /root/AAA/skills/ | sort) <(ls /root/.kimi-code/skills/ | sort) # orphans: AAA has, kimi lacks
comm -13 <(ls /root/AAA/skills/ | sort) <(ls /root/.kimi-code/skills/ | sort) # drift: kimi has, AAA lacks
10 Surfaces
| # |
Surface |
Path |
Type |
| 1 |
AAA canonical |
/root/AAA/skills/ |
SOT |
| 2 |
kimi |
/root/.kimi-code/skills/ |
copy |
| 3 |
opencode |
/root/.arifos/agents/opencode/skills/ |
symlink |
| 4 |
grok |
/root/.grok/skills/ |
symlink |
| 5 |
claude |
/root/.claude/skills/ |
symlink |
| 6 |
codex |
/root/.codex/skills/ |
symlink |
| 7 |
hermes |
/root/.hermes/skills/ |
copy |
| 8 |
hermes-asi |
/usr/local/lib/hermes-agent/skills/ |
copy |
| 9 |
openclaw-ws |
/root/.openclaw/workspace/skills/ |
copy |
| 10 |
openclaw-bundled |
bundled |
built-in |
Classification Matrix (NEW)
| Verdict |
Condition |
Action |
| ✅ PROMOTE |
kimi/agent has it, AAA lacks, universal |
Copy to AAA, register V3, add alias |
| 📦 ARCHIVE |
agent has it, AAA has better version |
Move to _retired/<date>/ |
| 🔧 HARNESS-NATIVE |
agent-specific (claude-xml, copilot, grok-profile) |
OK — don't promote |
| 🔲 NEED MIRROR |
AAA has it, agent lacks |
Copy/symlink to agent |
| ⚠️ DUAL-NAME |
Same skill, different names across surfaces |
Alias table entry or symlink |
| ☠️ VOID |
Zero invocations, zero evidence |
SKILL.md → SKILL.md.VOID |
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.
Purpose
Audit all installed skills for overlap, stale docs, prompt bloat, trigger ambiguity, and broken references.
Use When
- Reviewing the overall capabilities, naming conventions, and performance of the active skill portfolio.
- A new skill is drafted or proposed for installation into any workspace or global directory.
- An existing skill's
SKILL.md is updated or modified.
- Executing portfolio maintenance checks to clean up outdated APIs, dead links, or legacy documentation.
- Tuning the triggering accuracy of skills when experiencing trigger drift.
Do Not Use When
- Creating a single new skill from scratch (use
skill-creator for capture and bootstrapping instead).
- Linting individual skill trigger statements (use
skill-trigger-linter instead).
- The task is a general system performance audit unrelated to L2 Skills.
Inputs
- Skill Directories: Path to
/root/.agents/skills/ or individual skill directories.
- Dependency Files: package.json, pyproject.toml, wrangler.jsonc configurations.
- Audit Manifest: List of currently configured tools and their execution limits.
Operational Age Thresholds
- Freshness Threshold: Any skill whose
SKILL.md has not been modified for >30 days MUST be cross-checked against its dependent packages/APIs to verify compatibility.
- De-activation Candidate: Any skill that has not been active in the last 90 days must be classified as
unused-rot and flagged for graceful de-activation or archive.
Rot Classification Schema
Each checked skill must receive a specific Rot Rating in the audit report:
doc-rot: The skill references external URLs, guidelines, or paths that are no longer accessible or have been superseded.
api-rot: The SDK or CLI packages that the skill coordinates (e.g. Wrangler, Agents SDK) have moved past the compatibility versions listed in the skill.
trigger-rot: The skill's triggering criteria overlap semantically with other skills, leading to multiple activations or trigger failures.
unused-rot: The skill is structurally valid but has not registered a telemetry execution record within the threshold window.
archive-void-rot: (Added 2026-08-04) The skill has been physically moved to .archive-20260804/ but remains discoverable by the skill loader. Physical archive without deactivation (SKILL.md → SKILL.md.VOID) creates drift between filesystem and registry. This is a new rot class discovered during the first autonomous VOID audit.
drift-rot: (Added 2026-08-08) Skill exists on agent surface but NOT in AAA canonical, or vice versa. Classify per matrix: PROMOTE / ARCHIVE / HARNESS-NATIVE / MIRROR.
dual-name-rot: (Added 2026-08-08) Same skill has different names on different surfaces (e.g. FORGE-act-federation-ingress vs FORGE-sct-federation-ingress). Fix via alias table or symlink.
Procedure
- Portfolio Scan: Map all active
SKILL.md files and resolve their frontmatter definitions. Include .archive-* directories in the scan — archived skills still discoverable by the loader are archive-void-rot.
- Staleness Analysis: Apply Age Threshold rules. Check all embedded documentation URLs and reference scripts against the latest system files and packages.
- Prompt Bloat Check: Calculate the token density of each skill. Flag files where instruction length exceeds 500 lines.
- Collision Auditing: Run semantic cross-checks on skill descriptions to flag potential trigger overlaps.
- Rot Classification tagging: Assign rot ratings (
doc-rot, api-rot, trigger-rot, unused-rot, archive-void-rot) to flagged skills.
- VOID Candidate Surfacing: Rank candidates by: zero invocations + zero outcome_delta + archive-void-rot. Surface top 3. The VOID pattern: rename SKILL.md → SKILL.md.VOID (F1-reversible), ingest as VERIFY into arifFlow, seal to VAULT999. This is the FQ predator feed — VOIDing dead skills is a VERIFY act that breaks execute-heavy skew.
- Report Generation: Write a structured markdown analysis identifying critical flaws, warnings, and remediation paths.
Postconditions
- All skills are checked for age thresholds and direct system dependency freshness.
- A complete rot matrix mapping overlap risk and prompt size is successfully outputted.
- Any identified broken file reference is cataloged in the telemetry report.
Failure Modes & Escalation
- Infinite Loop Detect: Circular references between skills (e.g. Skill A loads Skill B, which loads Skill A). Action: Immediately break recursion, output a warning block, and log the path loop.
- Workspace Access Error: Missing permissions on global or shared folders. Action: Degrade gracefully and audit only local workspace skills, raising a warning flag in the report.
Telemetry per Run
{
"skill_name": "arifos-recursive-audit",
"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": false,
"hold_code": "{{hold_code}}"
}
Recursive Scorecard
- Activation Precision: [0.0 - 1.0] (Target: >0.90)
- Task Completion Rate: [0.0 - 1.0] (Target: >0.95)
- Rollback Safety: [0.0 - 1.0] (Target: 1.00)
- Context Efficiency: [0.0 - 1.0] (Target: >0.95)
- Doc Freshness: [0.0 - 1.0] (Target: 1.00)
- Cross-Skill Collision Rate: [0.0 - 1.0] (Target: 0.00)
- Human Trust Score: [0.0 - 1.0] (Target: >0.95)
Independent Verification Lane (WAJIB 2 — added 2026-07-19)
A-FORGE planning, execution, AND verification in the same trust chain is the primary substrate defect identified in the readiness audit (ARIFOS-READINESS-2026-07-20). This skill documents the required separation so the next agent can implement it.
The defect (current state)
Hermes/A-FORGE plans
↓
A-FORGE executes
↓
A-FORGE verifies ← same chain → cannot self-attest
↓
A-FORGE summarizes success
"Completed and verified" is currently too easy to self-attest. A deployment that returns exit code 0 but leaves the public service broken is reported as success.
The required separation
A-FORGE executes mutation
↓
Independent observe-lane verifier reads resulting reality
↓
Kernel checks evidence against original success criteria
↓
Only then may completion be recorded to VAULT999
Verifier contract (minimum)
verification_request:
original_intent_hash: <sha256>
success_criteria: <structured>
mutation_receipt: <VAULT999 entry id>
executor_identity: <actor_id>
target_state: <expected world state after mutation>
permitted_observation_tools: [<list>] # read-only
freshness_requirement: <max staleness in ms>
verification_result:
state: VERIFIED | MISMATCH | INCONCLUSIVE | STALE
raw_evidence_refs: [<list>]
method: <how evidence was obtained>
verifier_identity: <actor_id>
verifier_independence_proof: <signed assertion>
observed_at: <unix_ms>
residual_uncertainty: <OBS/DER/INT/SPEC label + confidence>
Verifier hard rules
The verifier MUST:
- NOT have performed the mutation
- Use independently obtained state (its own MCP reads, not the executor's claim)
- Receive the original success criteria, NOT the executor's rewritten summary
- Be unable to modify the state it is checking
- Record raw evidence and method (not just a verdict)
- Distinguish command success (exit code 0) from outcome success (real world matches criteria)
- Return one of: VERIFIED, MISMATCH, INCONCLUSIVE, STALE
- NEVER issue constitutional approval — only the kernel may SEAL
Kernel rejection rules
The kernel MUST reject "completion" when:
- Verifier identity == executor identity
- Evidence originated ONLY from the executor (no independent observation)
- Verifier had mutation permission over the target
- Evidence is older than freshness_requirement
- Original success criteria are missing from the request
- Results cannot be independently reproduced (no second source)
Audit-discoverable evidence
This skill, when loaded, MUST trigger the audit checklist:
Authority scope
WAJIB 2 is T3 (F13 ratification required). This skill section documents the protocol only. Implementation requires the verification lane to be a new constitutional role, not a mode of A-FORGE.
1---2name: audit-recursive-audit3description: v2.0: Multi-surface skill audit (10 agent homes) with cross-surface contrast, drift/orphan/dual-name detection. Load when reviewing the skill portfolio, after modifying skills, or after adding/removing agent harnesses.4---56# arifos-recursive-audit v2.0 (O_Ω Constitutional Layer)78## v2.0 Upgrade (2026-08-08)910> Cross-surface methodology added. Now audits ALL 10 agent surfaces (AAA canonical, kimi, opencode, grok, claude, codex, hermes, hermes-asi, openclaw-ws, openclaw-bundled), not just one directory.11> **Contrast template:** `/root/AAA/skills/CONTRAST_ANALYSIS_2026-08-08.md`1213## Cross-Surface Inventory (NEW)1415```bash16# 1. Dump each surface (example for AAA vs kimi)17comm -23 <(ls /root/AAA/skills/ | sort) <(ls /root/.kimi-code/skills/ | sort) # orphans: AAA has, kimi lacks18comm -13 <(ls /root/AAA/skills/ | sort) <(ls /root/.kimi-code/skills/ | sort) # drift: kimi has, AAA lacks19```2021### 10 Surfaces2223| # | Surface | Path | Type |24|---|---------|------|------|25| 1 | AAA canonical | `/root/AAA/skills/` | SOT |26| 2 | kimi | `/root/.kimi-code/skills/` | copy |27| 3 | opencode | `/root/.arifos/agents/opencode/skills/` | symlink |28| 4 | grok | `/root/.grok/skills/` | symlink |29| 5 | claude | `/root/.claude/skills/` | symlink |30| 6 | codex | `/root/.codex/skills/` | symlink |31| 7 | hermes | `/root/.hermes/skills/` | copy |32| 8 | hermes-asi | `/usr/local/lib/hermes-agent/skills/` | copy |33| 9 | openclaw-ws | `/root/.openclaw/workspace/skills/` | copy |34| 10 | openclaw-bundled | bundled | built-in |3536### Classification Matrix (NEW)3738| Verdict | Condition | Action |39|---------|-----------|--------|40| ✅ PROMOTE | kimi/agent has it, AAA lacks, universal | Copy to AAA, register V3, add alias |41| 📦 ARCHIVE | agent has it, AAA has better version | Move to `_retired/<date>/` |42| 🔧 HARNESS-NATIVE | agent-specific (claude-xml, copilot, grok-profile) | OK — don't promote |43| 🔲 NEED MIRROR | AAA has it, agent lacks | Copy/symlink to agent |44| ⚠️ DUAL-NAME | Same skill, different names across surfaces | Alias table entry or symlink |45| ☠️ VOID | Zero invocations, zero evidence | SKILL.md → SKILL.md.VOID |464748## arifOS-ACT Embedding4950Before using this skill on any mutating, irreversible, or high-blast-radius task:511. **ART** — Attune (what is the real task?), Recognize (what class of power?), Test (fit · authority · evidence · blast · reversible).522. **Kernel** — Route to arifOS for F1–F13 judgment if action class is Maker/Messenger/Mutator/Destroyer/Sovereign.533. **ACT** — Apply narrow, Constrain scope, Trace witness, STOP before corruption.544. **Receipt** — Leave evidence of what changed, why, and under whose authority.555657## Purpose58Audit all installed skills for overlap, stale docs, prompt bloat, trigger ambiguity, and broken references.5960## Use When611. Reviewing the overall capabilities, naming conventions, and performance of the active skill portfolio.622. A new skill is drafted or proposed for installation into any workspace or global directory.633. An existing skill's `SKILL.md` is updated or modified.644. Executing portfolio maintenance checks to clean up outdated APIs, dead links, or legacy documentation.655. Tuning the triggering accuracy of skills when experiencing trigger drift.6667## Do Not Use When681. Creating a single new skill from scratch (use `skill-creator` for capture and bootstrapping instead).692. Linting individual skill trigger statements (use `skill-trigger-linter` instead).703. The task is a general system performance audit unrelated to L2 Skills.7172## Inputs73* **Skill Directories:** Path to `/root/.agents/skills/` or individual skill directories.74* **Dependency Files:** package.json, pyproject.toml, wrangler.jsonc configurations.75* **Audit Manifest:** List of currently configured tools and their execution limits.7677## Operational Age Thresholds78* **Freshness Threshold:** Any skill whose `SKILL.md` has not been modified for **>30 days** MUST be cross-checked against its dependent packages/APIs to verify compatibility.79* **De-activation Candidate:** Any skill that has not been active in the last **90 days** must be classified as `unused-rot` and flagged for graceful de-activation or archive.8081## Rot Classification Schema82Each checked skill must receive a specific Rot Rating in the audit report:83* **`doc-rot`:** The skill references external URLs, guidelines, or paths that are no longer accessible or have been superseded.84* **`api-rot`:** The SDK or CLI packages that the skill coordinates (e.g. Wrangler, Agents SDK) have moved past the compatibility versions listed in the skill.85* **`trigger-rot`:** The skill's triggering criteria overlap semantically with other skills, leading to multiple activations or trigger failures.86* **`unused-rot`:** The skill is structurally valid but has not registered a telemetry execution record within the threshold window.87* **`archive-void-rot`:** (Added 2026-08-04) The skill has been physically moved to `.archive-20260804/` but remains discoverable by the skill loader. Physical archive without deactivation (SKILL.md → SKILL.md.VOID) creates drift between filesystem and registry. This is a new rot class discovered during the first autonomous VOID audit.88* **`drift-rot`:** (Added 2026-08-08) Skill exists on agent surface but NOT in AAA canonical, or vice versa. Classify per matrix: PROMOTE / ARCHIVE / HARNESS-NATIVE / MIRROR.89* **`dual-name-rot`:** (Added 2026-08-08) Same skill has different names on different surfaces (e.g. FORGE-act-federation-ingress vs FORGE-sct-federation-ingress). Fix via alias table or symlink.9091## Procedure921. **Portfolio Scan:** Map all active `SKILL.md` files and resolve their frontmatter definitions. Include `.archive-*` directories in the scan — archived skills still discoverable by the loader are `archive-void-rot`.932. **Staleness Analysis:** Apply **Age Threshold** rules. Check all embedded documentation URLs and reference scripts against the latest system files and packages.943. **Prompt Bloat Check:** Calculate the token density of each skill. Flag files where instruction length exceeds 500 lines.954. **Collision Auditing:** Run semantic cross-checks on skill descriptions to flag potential trigger overlaps.965. **Rot Classification tagging:** Assign rot ratings (`doc-rot`, `api-rot`, `trigger-rot`, `unused-rot`, `archive-void-rot`) to flagged skills.976. **VOID Candidate Surfacing:** Rank candidates by: zero invocations + zero outcome_delta + archive-void-rot. Surface top 3. The VOID pattern: rename SKILL.md → SKILL.md.VOID (F1-reversible), ingest as VERIFY into arifFlow, seal to VAULT999. This is the FQ predator feed — VOIDing dead skills is a VERIFY act that breaks execute-heavy skew.987. **Report Generation:** Write a structured markdown analysis identifying critical flaws, warnings, and remediation paths.99100## Postconditions1011. All skills are checked for age thresholds and direct system dependency freshness.1022. A complete rot matrix mapping overlap risk and prompt size is successfully outputted.1033. Any identified broken file reference is cataloged in the telemetry report.104105## Failure Modes & Escalation106* **Infinite Loop Detect:** Circular references between skills (e.g. Skill A loads Skill B, which loads Skill A). *Action:* Immediately break recursion, output a warning block, and log the path loop.107* **Workspace Access Error:** Missing permissions on global or shared folders. *Action:* Degrade gracefully and audit only local workspace skills, raising a warning flag in the report.108109## Telemetry per Run110```json111{112 "skill_name": "arifos-recursive-audit",113 "version": "1.1.0",114 "trigger_phrase": "{{trigger_phrase}}",115 "selected_reason": "{{selected_reason}}",116 "latency_ms": 0,117 "token_in": 0,118 "token_out": 0,119 "commands_run": 0,120 "artifacts_written": 0,121 "postcondition_pass": false,122 "human_approval_required": false,123 "hold_code": "{{hold_code}}"124}125```126127## Recursive Scorecard128* **Activation Precision:** [0.0 - 1.0] (Target: >0.90)129* **Task Completion Rate:** [0.0 - 1.0] (Target: >0.95)130* **Rollback Safety:** [0.0 - 1.0] (Target: 1.00)131* **Context Efficiency:** [0.0 - 1.0] (Target: >0.95)132* **Doc Freshness:** [0.0 - 1.0] (Target: 1.00)133* **Cross-Skill Collision Rate:** [0.0 - 1.0] (Target: 0.00)134* **Human Trust Score:** [0.0 - 1.0] (Target: >0.95)135136---137138## Independent Verification Lane (WAJIB 2 — added 2026-07-19)139140A-FORGE planning, execution, AND verification in the same trust chain is the **primary substrate defect** identified in the readiness audit (ARIFOS-READINESS-2026-07-20). This skill documents the required separation so the next agent can implement it.141142### The defect (current state)143144```145Hermes/A-FORGE plans146 ↓147A-FORGE executes148 ↓149A-FORGE verifies ← same chain → cannot self-attest150 ↓151A-FORGE summarizes success152```153154"Completed and verified" is currently too easy to self-attest. A deployment that returns exit code 0 but leaves the public service broken is reported as success.155156### The required separation157158```159A-FORGE executes mutation160 ↓161Independent observe-lane verifier reads resulting reality162 ↓163Kernel checks evidence against original success criteria164 ↓165Only then may completion be recorded to VAULT999166```167168### Verifier contract (minimum)169170```yaml171verification_request:172 original_intent_hash: <sha256>173 success_criteria: <structured>174 mutation_receipt: <VAULT999 entry id>175 executor_identity: <actor_id>176 target_state: <expected world state after mutation>177 permitted_observation_tools: [<list>] # read-only178 freshness_requirement: <max staleness in ms>179180verification_result:181 state: VERIFIED | MISMATCH | INCONCLUSIVE | STALE182 raw_evidence_refs: [<list>]183 method: <how evidence was obtained>184 verifier_identity: <actor_id>185 verifier_independence_proof: <signed assertion>186 observed_at: <unix_ms>187 residual_uncertainty: <OBS/DER/INT/SPEC label + confidence>188```189190### Verifier hard rules191192The verifier MUST:193- NOT have performed the mutation194- Use independently obtained state (its own MCP reads, not the executor's claim)195- Receive the original success criteria, NOT the executor's rewritten summary196- Be unable to modify the state it is checking197- Record raw evidence and method (not just a verdict)198- Distinguish **command success** (exit code 0) from **outcome success** (real world matches criteria)199- Return one of: VERIFIED, MISMATCH, INCONCLUSIVE, STALE200- NEVER issue constitutional approval — only the kernel may SEAL201202### Kernel rejection rules203204The kernel MUST reject "completion" when:205- Verifier identity == executor identity206- Evidence originated ONLY from the executor (no independent observation)207- Verifier had mutation permission over the target208- Evidence is older than freshness_requirement209- Original success criteria are missing from the request210- Results cannot be independently reproduced (no second source)211212### Audit-discoverable evidence213214This skill, when loaded, MUST trigger the audit checklist:215- [ ] Does the proposed verification lane have a distinct identity (not just a flag)?216- [ ] Does the kernel reject self-verification at the contract layer?217- [ ] Are original success criteria preserved through the receipt chain?218- [ ] Can the verifier be invoked without executor cooperation?219220### Authority scope221222WAJIB 2 is **T3 (F13 ratification required)**. This skill section documents the protocol only. Implementation requires the verification lane to be a new constitutional role, not a mode of A-FORGE.