Memory Management (3-Layer Filesystem Engine)
Zero-dependency memory system providing high-speed cognitive continuity across agent sessions without external vector databases or daemon processes.
The 3 Filesystem Layers
Layer 1: Runtime Context (Lean Procedural Core)
- Lean
SKILL.mdfiles (target <= 100 lines). - Loaded strictly on-demand.
- Inference Restriction: Historical raw execution traces and multi-page wiki dossiers are barred during active task execution to eliminate context window bloat.
- Lean
Layer 2: Compounding Wiki Layer (Permanent Knowledge)
- Permanent Markdown documents stored in
wiki/and pluginreferences/. - Contains: domain playbooks, known edge cases, negative constraints,
map-debt.md, andevolution-log.md. - Knowledge Status Taxonomy: Entries are tagged with explicit confidence (
OBSERVED,HYPOTHESIS,CONFIRMED,REJECTED,OPEN). - Confidence Decay: Knowledge not re-verified within 30 days decays from
CONFIRMEDtoOBSERVED. - Asymmetric Persistence Rule: When an evolution attempt fails, code mutations are rolled back, but wiki insights, edge-case discoveries, and failure logs are NEVER rolled back.
- Permanent Markdown documents stored in
Layer 3: Safe Audit Layer (Append-Only Manifests)
- Stored in
.agent/learning/traces/cycle_manifests.jsonl. - Tracked audit log capturing event sequences, hashes, exit codes, and affected paths (zero raw terminal text or credentials).
- Audited exclusively via
verify_evolution_receipt.py.
- Stored in
Standardized Retrieval Protocol
All memory lookups use native filesystem tools:
- Targeted Exact Match:
rg "<symbol-or-pattern>" <dir>orgrep_search. - Playbook Inspection: Direct file read of
references/<topic>-playbook.mdorwiki/<topic>.md. - Map Debt Audit: Scan
references/map-debt.mdfor existing open friction items before starting tasks.