Install
openclaw skills install @wroadd/memory-fortressComplete memory management system for OpenClaw agents. Combines compaction-aware saving, a formal boot sequence, domain organization, memory scoring, structured learnings, and documentation-first project continuity.
openclaw skills install @wroadd/memory-fortressA unified memory system that prevents agents from forgetting what they did yesterday and ensures work survives session boundaries in written form.
Built from five proven patterns:
MEMORY.md small and useful┌─────────────────────────────────────────────────────┐
│ MEMORY FORTRESS │
├─────────────────────────────────────────────────────┤
│ 🔴 SESSION RAM → temporary, lost on compaction │
│ 🟡 STATE/ → active task, blockers, decisions│
│ 🟢 DAILY LOG → memory/YYYY-MM-DD.md │
│ 🔵 MEMORY.md → curated durable knowledge │
│ ⚪ DOMAINS/ → topic-specific detail │
│ 📦 ARCHIVE/ → older logs │
│ 🧱 PROJECT FILES → task_plan.md + notes.md + output│
└─────────────────────────────────────────────────────┘
Core principle: session memory is temporary, files are truth.
Order matters.
1. state/HOLD.md — what is blocked? do not do these
2. state/ACTIVE.md — is there an active task?
3. state/DECISIONS.md — recent decisions, last 48h
4. state/CLOSED.md — durable closed decisions, not to be reopened casually
5. IDENTITY.md — who the agent is
6. SOUL.md — learned style and operating principles
7. USER.md — who the agent serves
8. memory/YYYY-MM-DD.md — today + yesterday
9. MEMORY.md — long-term knowledge, main session only
Post-boot status line:
🏰 Boot: ACTIVE=[task|none] | HOLD=[n] | DECISIONS=[n last 48h]
memory_searchWhen the user gives you a task:
state/ACTIVE.mdstate/ACTIVE.md format## Active task
**User said:** "[exact quote]"
**Interpretation:** [what you believe it means]
**Status:**
- [ ] Step 1
- [ ] Step 2
**Updated:** YYYY-MM-DD HH:MM
state/HOLD.md format[YYYY-MM-DD HH:MM | session] Item — reason for blocking
state/DECISIONS.md format[YYYY-MM-DD HH:MM | session] Decision — context / rationale
state/CLOSED.md format[YYYY-MM-DD | decider] Topic keyword — short final decision
Use CLOSED.md for issues that were definitively settled and should not keep resurfacing as open questions.
Session RAM can disappear. Save important things before that happens.
| Event | Where to write |
|---|---|
| Decision made | state/DECISIONS.md + daily log |
| Preference discovered | MEMORY.md or daily log |
| Task received | state/ACTIVE.md |
| Something blocked | state/HOLD.md |
| Error + lesson | daily log + .learnings/ |
| Important fact discovered | daily log, later promote if durable |
| Work completed | state/ACTIVE.md + daily log |
Rule: if it matters, write it immediately.
MEMORY.md?Score each candidate on 4 axes from 0 to 3.
| Axis | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| Durability | Gone tomorrow | Weeks | Months | Years+ |
| Reuse | One-time | Occasional | Frequent | Every session |
| Impact | Trivial | Helpful | Changes output | Changes decisions |
| Uniqueness | Obvious | Mildly useful | Hard to re-derive | Irreplaceable |
Put it in MEMORY.md if:
Everything else belongs in the daily log or a domain file.
MEMORY.md ≤10KBmemory/
├── domains/
│ ├── projects.md
│ ├── infrastructure.md
│ ├── people.md
│ ├── skills-tools.md
│ ├── lessons.md
│ └── policies.md
├── .learnings/
├── archive/
└── YYYY-MM-DD.md
MEMORY.md stores summaries, references, and the most important durable knowledgememory/domains/*.md stores detailed topic-specific materialmemory/archive/ stores old logsmemory/.learnings/ stores structured mistakes, corrections, and requests| Prefix | Type |
|---|---|
DEC | Decision |
PREF | Preference |
FACT | Durable fact |
POLICY | Rule |
LESSON | Lesson learned |
ERR | Known error |
Use priority 1 to 10. Reserve 9 to 10 for truly critical items.
[STALE]Always use:
memory_searchmemory_getSearch order:
state/MEMORY.mdmemory/domains/*.mdmemory/YYYY-MM-DD.mdmemory/archive/Do not read entire memory trees "just in case."
| Rule | Details |
|---|---|
| Own workspace | Each agent writes in its own workspace |
| No cross-read | Do not read another agent's memory by default |
| Communication | Use direct agent messaging, not memory files |
| Shared state | Only explicitly shared folders |
| Private context | Keep private conversations private |
| Don't | Do instead |
|---|---|
| "I'll remember this mentally" | Write it to a file immediately |
Paste chat logs into MEMORY.md | Use daily log + summary |
Let MEMORY.md bloat | Split into domain files |
| Answer past-context questions from memory alone | Search first |
Keep many tasks in ACTIVE.md | One active task, rest in project files |
| Paraphrase the user's task | Keep the exact quote |
| Store secret values | Record only that they exist |
.learnings/ — mistakes, corrections, and growthRecommended files:
memory/.learnings/LEARNINGS.mdmemory/.learnings/ERRORS.mdmemory/.learnings/FEATURE_REQUESTS.mdLEARNINGS.md / correctionLEARNINGS.md / knowledge_gapLEARNINGS.md / best_practiceERRORS.mdFEATURE_REQUESTS.mdTYPE-YYYYMMDD-XXX
Memory is not enough. The work itself must also exist in files.
If it's not written down, it doesn't exist.
| What | Where |
|---|---|
| Incoming task | state/ACTIVE.md, exact user words |
| Decision | state/DECISIONS.md + daily log |
| Blocker | state/HOLD.md |
| Permanently closed decision | state/CLOSED.md |
| Reorientation snapshot | state/ORIENT.md |
| Research notes | notes.md |
| Project progress | task_plan.md |
| Final output | a dedicated deliverable file |
| General lesson | .learnings/ or a domain file |
Treat work as a project immediately if any of these are true:
For any non-trivial task, create:
projects/<project-slug>/
├── task_plan.md
├── notes.md
└── deliverable.md or another suitable output file
task_plan.md# Task Plan: [name]
## Goal
[one-sentence end state]
## Phases
- [ ] Phase 1: setup
- [ ] Phase 2: discovery / research
- [ ] Phase 3: execution
- [ ] Phase 4: review / deliver
## Decisions Made
- [decision]: [why]
## Errors Encountered
- [error]: [resolution]
## Status
**Currently in Phase X** - [current focus]
notes.mdUse it for sources, raw findings, analysis, and anything too large for the live context window.
If you write a cron or automation prompt, include a dedicated section like this:
### Documentation (MANDATORY)
- Append a short run summary to: [exact file path]
- Format: YYYY-MM-DD | type | slug | summary
- This must be the last step before finishing
Because project files are memory too. task_plan.md, notes.md, and state/ORIENT.md together form the operational memory of ongoing work.
When an agent suddenly loses the thread, starts following the wrong branch of work, or needs to recover the real task from a long conversation, it should create a focused reorientation summary before doing more execution.
Read back the full thread content and summarize what we have done so far, where the task is documented, and what the next step is. Do not go further, only produce this detailed summary.
state/HOLD.md, state/ACTIVE.md, state/DECISIONS.md, state/CLOSED.mdtask_plan.md and notes.mdstate/ORIENT.mdstate/ORIENT.md format## Reorientation snapshot
**Thread / Context:** [which thread or task this is]
**What we did so far:**
- ...
- ...
**Where it is documented:**
- `state/ACTIVE.md`
- `projects/<slug>/task_plan.md`
- `projects/<slug>/notes.md`
**Actual next step:**
- ...
**Do not do instead:**
- ...
- ...
**Closure criteria:**
- ...
- ...
**Last updated:** YYYY-MM-DD HH:MM
Because they create noise, duplicate the file-based source of truth, and consume context themselves. The correct model is: file-first summary, chat-only when useful.
If the recurring task is thread readback + summary + documented next-step recovery, use a dedicated context-rescue mini-skill.
| Frequency | Task |
|---|---|
| Every session | run boot sequence |
| Every task | update ACTIVE |
| Important event | write immediately |
| Daily | review daily log and clean state |
| Weekly | size-check MEMORY.md and update domains |
| Biweekly | archive old logs |
| Monthly | demote stale memories and resolve contradictions |
| On error | write to .learnings/ERRORS.md |
| On correction | write to .learnings/LEARNINGS.md |
mkdir -p state
touch state/ACTIVE.md state/HOLD.md state/DECISIONS.md state/CLOSED.md
touch state/ORIENT.md
mkdir -p memory/domains memory/archive memory/.learnings
mkdir -p projects
Add the boot sequence, the write-before-lose rule, the documentation-first project pattern, and the failsafe ORIENT.md reorientation layer.
"Memory is what separates a tool from an ally."