← ClaudeAtlas

persistent-memory-stacklisted

Five-layer Willow memory model — flat-file boot, intake, KB, SOIL, handoff — with write rules and promotion paths.
rudi193-cmd/willow-2.0 · ★ 4 · AI & Automation · score 70
Install: claude install-skill rudi193-cmd/willow-2.0
@markdownai v1.0 # Persistent memory stack Five layers, innermost to outermost. Each layer has a distinct write rule and lifecycle. --- ## Layer 1 — Flat-file boot context **Where:** `$WILLOW_HOME/session_anchor_<agent>.json`, `willow.md` (`~/github/.willow`; `~/.willow` alias OK) **Purpose:** Cold-start baseline. Readable without MCP, Postgres, or network. **Write rule:** Written by session close hooks and `handoff_rebuild`. Do not write ad-hoc. **Lifecycle:** Overwritten each session. Authoritative only when nothing else is reachable. --- ## Layer 2 — Intake **Where:** `$WILLOW_HOME/intake/<agent>/YYYY-MM-DD.jsonl` **Purpose:** Annotated staging area. Every agent, tool, and script writes here first. **Write rule:** Use `intake_write` (MCP) or `core/intake.py` (direct). Never write directly to `knowledge` or `jeles_atoms` from ad-hoc code. **Lifecycle:** Records sit here until norn-pass promotes them. Promoted records are marked `promoted=true`. Staging files are not deleted — they are the audit trail. Schema: `{id, content, title, source, agent, tier, confidence, keywords, tags, created_at, promoted, promote_tier}` Intake tiers: | Tier | Meaning | |------|---------| | `observed` | Raw session fact, unverified | | `fetched` | Retrieved from an external source | | `verified` | Checked against trusted source (Jeles or human) | | `ratified` | Human-confirmed via Binder | --- ## Layer 3 — KB (Knowledge Base) **Where:** Postgres — `knowledge`, `jeles_ato