agentic-loop/SKILL.md
8-step recursive self-improvement discipline for OPENCLAW. Detect drift, score outputs, propose forges, ratify, apply, audit. Closes the loop.
npx skillsauth add ariffazil/openclaw-workspace agentic-loopInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
The agent that doesn't improve itself is a script with extra steps.
This is the OPENCLAW-side counterpart to ~/.hermes/skills/agentic/recursive-improve/.
Where Hermes improves the conversation (SOUL.md phrasing, tone, verdict discipline),
OPENCLAW improves the runtime (cron cadence, routing bindings, skill freshness,
plugin load order, MCP surface health).
1. DETECT 2. INVENTORY 3. SCORE 4. PROPOSE
drift signal → what we have → against floors → forge candidate
↓
8. SEAL 7. AUDIT 6. APPLY 5. RATIFY
VAULT999 ← F1-F13 check ← edit + restart ← sovereign sign
Sources of drift signal:
journalctl -u openclaw-gateway --since "1h ago" — errors, warnings, stalled sessionsopenclaw health --json — non-ok:true responsesopenclaw doctor — risky config flags/root/.openclaw/memory/watchers/*.jsonl — watcher events (essay changes, rating events)~/.hermes/memory/forge-queue/*.yaml — sibling Hermes proposalscrontab -l | diff - <(echo "expected: <list>") — what we expect vs what runsnpm view openclaw version vs openclaw --versioncurl -s :8088/health | jq .runtime_drift~/.openclaw/
├── openclaw.json # main config (agents, channels, bindings, plugins, mcp, etc.)
├── plugins/ # loaded plugin code
├── skills/ # bundled skills (~50+)
├── workspace/
│ ├── skills/ # sovereign-curated skills
│ ├── MEMORY.md # long-term memory
│ ├── SUBSTRATE.md # VPS + services map
│ ├── CHECKPOINT.md # warm-wake context
│ ├── HEARTBEAT.md # heartbeat prompt
│ └── cron/jobs.json # agent-managed cron jobs
└── SYSTEM_MD.md # system prompt
| Floor | What it checks at the runtime layer |
|---|---|
| F1 AMANAH | Any proposed forge respects reversibility; irreversible ops require sovereign ack. |
| F2 TRUTH | Drift claims are backed by a curl or openclaw doctor receipt, not a guess. |
| F4 CLARITY | Forge proposals are 1-2 sentences + a diff. No walls of text. |
| F6 MARUAH | No "I noticed" / "I'd be happy to" — direct verdict + way-forward. |
| F7 STEWARDSHIP | One forge per loop run, not five. No spam. |
| F9 ANTIHANTU | Forge descriptions say what the change DOES, not what the agent "feels" about it. |
| F11 AUTH | OpenClaw writes to its own config only; never to ~/.hermes/* or /root/arifOS/*. |
| F13 SOVEREIGN | Default mode: HOLD on Tier-2+ forges. AUTO on Tier-1 (cron timing, plugin reordering, skill comments). |
A forge must pass all 8 floors to leave step 3. A floor failure stops the loop and surfaces the receipt to the sovereign.
proposal_id: forge-2026-06-06-001
generated_at: 2026-06-06T17:50:00Z
generated_by: [email protected]
target_file: ~/.openclaw/openclaw.json | ~/.openclaw/workspace/MEMORY.md | <path>
target_section: <specific section>
diagnosis: |
<1-2 sentences on what drift was detected, with curl/doctor receipt inline>
proposed_change: |
<the exact diff or new content>
expected_impact: |
<how this changes runtime behavior; cite signal id>
f1_f13_check: |
F1: reversible (config flip, no data loss) ✓
F2: cited `openclaw doctor` + `journalctl` ✓
F4: 2 sentences + diff ✓
F6: no persona ✓
F7: one forge, not five ✓
F9: describes what changes, not feelings ✓
F11: writes only to ~/.openclaw/* ✓
F13: Tier-1 (auto) | Tier-2 (HOLD) ✓
reversibility: full | partial | irreversible
tier: 1 | 2
ratification: PENDING | AUTO-APPLIED
Writes to ~/.openclaw/workspace/forge-queue/forge-YYYY-MM-DD-NNN.yaml. The queue is the only artifact at this step.
tier=1, ratification=auto./ratify N / /reject N / /show N commands. No edit lands until sovereign replies.The agent NEVER ratifies its own proposals. Even if the agent later gets the ratification capability, escalation is mandatory.
For a Tier-1 forge:
openclaw config set for known keys)systemctl restart openclaw-gateway (one shot, with health check)openclaw mcp reload <name> (per-plugin, no full restart)curl -s :18789/health, openclaw health --json, journalctl -n 30cp of the pre-forge backup + restartFor Tier-2: skip step 6 entirely. Wait for sovereign.
After the forge applies, re-run the floor check. The receipt includes the post-forge health probe. If any floor fails post-apply:
revertedEvery applied forge (Tier-1 auto or Tier-2 ratified) writes a VAULT999 entry:
{
"kind": "OPENCLAW_FORGE_APPLIED",
"proposal_id": "forge-2026-06-06-001",
"actor": "[email protected]",
"target": "~/.openclaw/openclaw.json",
"diff_hash": "sha256:...",
"tier": 1,
"ratification": "auto" | "sovereign:<arif-fazil>",
"pre_health": "ok",
"post_health": "ok",
"f1_f13_post_check": "PASS",
"ts": "2026-06-06T17:55:00Z"
}
OPENCLAW_LOOP_OK).~/.openclaw/memory/watchers/*.jsonl gets a new entry, the loop wakes and re-scores the relevant forge.~/.hermes/skills/agentic/recursive-improve/ — sibling for SOUL/MEMORY/USER edits~/.hermes/skills/agentic/response-rating/ — the user signal that drives Tier-1 vs Tier-2 routingarifOS L6 VAULT999 — every applied forge seals here for auditOPENCLAW_LOOP_OK to VAULT999 and exits. No Telegram ping.reverted receipt, no further action that day./reject N: the queue entry is marked rejected, no edit lands, no VAULT999 entry beyond the rejection receipt.expired-no-ratification.openclaw skill test agentic-loop
# Verifies:
# - forge-queue/ is writable
# - VAULT999 seal endpoint is reachable (via arifOS MCP)
# - ratify ping to Telegram works (dry-run)
# - 8-step loop is well-formed (smoke test on a sample drift)
recursive-improve skill — same protocol, different substrateDITEMPA BUKAN DIBERI — the loop ratchets when the human ratifies, never before.
development
Federation-wide gold (XAUUSD) trading capability. Python stack, OANDA broker, backtesting, macro signals, RSI strategy. Every organ has a role.
development
Capital claim state management — tracks claim lifecycle across WEALTH organ.
development
Archived constitutional warga placeholder retained only for audit provenance. Do not use for active work; use the live arifOS governance and constitutional skills instead.
testing
Warga (citizen) agent skills for AAA federation members. See subdirectories for specialized warga skills.