skills/agent-wal/SKILL.md
Write-Ahead Log protocol for agent state persistence. Prevents losing corrections, decisions, and context during conversation compaction. Use when: (1) receiving a user correction — log it before responding, (2) making an important decision or analysis — log it before continuing, (3) pre-compaction memory flush — flush the working buffer to WAL, (4) session start — replay unapplied WAL entries to restore lost context, (5) any time you want to ensure something survives compaction.
npx skillsauth add m4d3bug/oh-my-openclaw agent-walInstall 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.
Write important state to disk before responding. Prevents the #1 agent failure mode: losing corrections and context during compaction.
Write before you respond. If something is worth remembering, WAL it first.
| Trigger | Action Type | Example |
|---------|------------|---------|
| User corrects you | correction | "No, use Podman not Docker" |
| You make a key decision | decision | "Using CogVideoX-2B for text-to-video" |
| Important analysis/conclusion | analysis | "WAL/VFM patterns should be core infra not skills" |
| State change | state_change | "GPU server SSH key auth configured" |
| User says "remember this" | correction | Whatever they said |
All commands via scripts/wal.py (relative to this skill directory):
# Write before responding
python3 scripts/wal.py append agent1 correction "Use Podman not Docker for all EvoClaw tooling"
python3 scripts/wal.py append agent1 decision "CogVideoX-5B with multi-GPU via accelerate"
python3 scripts/wal.py append agent1 analysis "Signed constraints prevent genome tampering"
# Working buffer (batch writes during conversation, flush before compaction)
python3 scripts/wal.py buffer-add agent1 decision "Some decision"
python3 scripts/wal.py flush-buffer agent1
# Session start: replay lost context
python3 scripts/wal.py replay agent1
# After applying a replayed entry
python3 scripts/wal.py mark-applied agent1 <entry_id>
# Maintenance
python3 scripts/wal.py status agent1
python3 scripts/wal.py prune agent1 --keep 50
replay to get unapplied entriesappend with action_type correction BEFORE respondingflush-buffer to persist any buffered entriesFor less critical items, use buffer-add to batch writes. Buffer is flushed to WAL on flush-buffer (called during pre-compaction) or manually.
WAL files: ~/clawd/memory/wal/<agent_id>.wal.jsonl
Buffer files: ~/clawd/memory/wal/<agent_id>.buffer.jsonl
Entries are append-only JSONL. Each entry:
{"id": "abc123", "timestamp": "ISO8601", "agent_id": "agent1", "action_type": "correction", "payload": "Use Podman not Docker", "applied": false}
testing
Anticipates needs, keeps work moving, and improves through use so the agent gets more proactive over time.
tools
Implements Manus-style file-based planning to organize and track progress on complex tasks. Creates task_plan.md, findings.md, and progress.md. Use when asked to plan out, break down, or organize a multi-step project, research task, or any work requiring >5 tool calls. Supports automatic session recovery after /clear.
development
Typed knowledge graph for structured agent memory and composable skills. Use when creating/querying entities (Person, Project, Task, Event, Document), linking related objects, enforcing constraints, planning multi-step actions as graph transformations, or when skills need to share state. Trigger on "remember", "what do I know about", "link X to Y", "show dependencies", entity CRUD, or cross-skill data access.
development
Multi search engine integration with 17 engines (8 CN + 9 Global). Supports advanced search operators, time filters, site search, privacy engines, and WolframAlpha knowledge queries. No API keys required.