Agent skill
memory-archivist
Cross-reference and synthesise daily memory files into patterns, insights, and carry-forward items. Use when asked to review memory, generate weekly synthesis, find forgotten tasks, detect decision patterns, or audit what was carried forward vs dropped. Also triggers on "what did I decide about X", "what's still pending", "weekly review", "memory synthesis", "what patterns do you see".
Install this agent skill to your Project
npx add-skill https://github.com/ariffazil/arifOS/tree/main/openclaw-workspace/skills/memory-archivist
SKILL.md
Memory Archivist
Memory is sacred. This skill turns raw daily journals into structured wisdom.
What This Skill Does
- Cross-reference — Read all
memory/*.mdfiles and find connections between days - Pattern detection — Surface recurring themes, repeated decisions, persistent blockers
- Carry-forward audit — Find items marked "carry forward" that were never resolved
- Weekly synthesis — Generate a weekly summary from daily files
- Scar-to-decision mapping — Track how USER.md scars influence actual decisions over time
Trigger Patterns
- "review my memory", "memory synthesis", "weekly review"
- "what's still pending", "what did I forget"
- "what patterns do you see", "recurring themes"
- "what did I decide about [topic]"
- "carry forward audit", "dropped items"
- "synthesise this week"
On Trigger — Execute in Order
Step 1: Gather Memory Files
# List all memory files sorted by date
ls -1 ~/.openclaw/workspace/memory/*.md 2>/dev/null | sort
Read the most recent 7 files (or all if fewer than 7 exist). Use the read tool, not exec.
Step 2: Extract Structured Data
From each daily file, extract:
| Field | Section to scan |
|---|---|
| Decisions | "Key Decisions Made Today" |
| Carry-forward | "Carry Forward" |
| 888_HOLD | "888_HOLD Items Pending" |
| Floors active | "Floors Active This Session" |
| Context | "Session Context" |
Step 3: Cross-Reference
For each carry-forward item, check if it appears as resolved in any later day's decisions.
Build a table:
| Carry-Forward Item | First Mentioned | Resolved? | Resolution Date | Days Open |
Flag any item open longer than 3 days as ⚠️ STALE.
Step 4: Detect Patterns
Scan across all files for:
- Repeated topics — same subject appearing in 3+ daily files
- Recurring blockers — carry-forward items that keep reappearing
- Floor patterns — which floors are consistently active vs rarely active
- Decision velocity — how many decisions per day (trending up/down?)
Step 5: Generate Synthesis
Output format depends on the request:
Weekly synthesis → Write to memory/weekly-YYYY-WXX.md:
# Weekly Synthesis — YYYY-WXX (arifOS_bot)
## Period
YYYY-MM-DD to YYYY-MM-DD
## Key Decisions This Week
1. ...
## Carry-Forward Audit
| Item | Status | Days Open |
|------|--------|-----------|
## Patterns Detected
- ...
## 888_HOLD Items (Active)
- ...
## Floor Activity
F1: X sessions | F2: X sessions | ...
## Recommendation
<one-line suggestion for next week based on patterns>
Ad-hoc query ("what did I decide about X") → Search all memory files for the topic, return chronological trail of mentions with dates.
Carry-forward audit → Return the open items table only.
Step 6: Seal to VAULT999
After generating synthesis, seal via arifOS MCP:
arifos seal
Or via HTTP:
curl -sf -X POST http://arifosmcp:8080/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"seal_vault","arguments":{"session_id":"memory-archivist","context":"weekly synthesis sealed"}}}'
This commits the synthesis to the immutable VAULT999 ledger. Memory is sacred — sealed memory is permanent.
Step 7: Log the Synthesis
Append to logs/audit.jsonl:
{"ts":"<ISO>","event":"memory_synthesis","source":"memory-archivist","files_scanned":<n>,"patterns_found":<n>,"stale_items":<n>,"sealed":true,"agent":"arifOS_bot"}
Scheduling (Cron)
Run the archivist nightly at 00:30 MYT (16:30 UTC), after the git-sync backup at 00:00 MYT:
# Add to host crontab (not container — container restarts clear cron)
30 16 * * * cd /opt/arifos/data/openclaw/workspace && bash skills/memory-archivist/scripts/scan-carry-forward.sh memory/ >> logs/archivist.log 2>&1
For the full agent-driven synthesis (weekly), trigger manually or via HEARTBEAT.md on every 8th heartbeat (~4 hours):
- "Run memory archivist" or "weekly review"
Constraints
- Read-only on memory files. Never edit existing
memory/*.mdfiles. Only create new synthesis files. - F1 Amanah. All synthesis is additive. Nothing is deleted or overwritten.
- F7 Humility. If a pattern has low confidence (appears only twice), mark it as tentative.
- F4 Clarity. Output must reduce confusion. Tables over prose. One insight per line.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
mcp-config-separation
drift-watcher
Periodic knowledge freshness checker: detects when local configs, runbooks, or agent knowledge have drifted from the latest official docs. Reduces the stale-knowledge paradox over time. Use when: (1) periodic health checks or heartbeat runs, (2) before major operations, (3) user asks 'am I up to date', 'check for updates', 'is anything outdated', (4) after a software upgrade to verify configs still match new docs.
MCP_CONFIG
config-guardian
Universal governed config co-pilot. Before ANY change to ANY system: (1) check latest docs and running version (docs-first), (2) propose as diff with risk analysis, never apply directly (propose-only), (3) log every change with evidence and rollback (change ledger). Works for OpenClaw, Docker, PostgreSQL, Nginx, arifOS, or any software. Triggers on: 'change config', 'fix settings', 'update', 'propose patch', 'explain config', 'validate config', 'why did we change X'. Enforces propose-only workflow — human applies via git.
drift-watcher
Periodic knowledge freshness checker: detects when local configs, runbooks, or agent knowledge have drifted from the latest official docs. Reduces the stale-knowledge paradox over time. Use when: (1) periodic health checks or heartbeat runs, (2) before major operations, (3) user asks 'am I up to date', 'check for updates', 'is anything outdated', (4) after a software upgrade to verify configs still match new docs.
config-guardian
Universal governed config co-pilot. Before ANY change to ANY system: (1) check latest docs and running version (docs-first), (2) propose as diff with risk analysis, never apply directly (propose-only), (3) log every change with evidence and rollback (change ledger). Works for OpenClaw, Docker, PostgreSQL, Nginx, arifOS, or any software. Triggers on: 'change config', 'fix settings', 'update', 'propose patch', 'explain config', 'validate config', 'why did we change X'. Enforces propose-only workflow — human applies via git.
Didn't find tool you were looking for?