AGENTS.ctx: Memory System
Level 2 (Topic) — Flat archive memory workspace, root file roles, archive cycle.
Concept
The memory system (AGENTS.ctx/memory/) maintains a persistent operational memory for TazLab. It preserves full historical traceability through flat date-based archives while keeping the active context compact and usable.
Root Files
| File | Purpose | Append-only? |
|---|---|---|
chronicle.md | Active-cycle chronology | Yes — never rewritten |
system-state.md | Current verified state / doctrine | No — surgical edits only |
debts.md | Active structured debt register | No — closed debts removed by script |
past-summary.md | Compressed historical orientation | No — rewritten by LM after each archive |
reports-index.md | Stable index for milestone reports | No — updated over time |
Archive Structure
Archives live flat in past/:
past/
├── 2026-06-05_cluster-one-shot/
├── 2026-05-31_vso-migration/
├── 2026-04-08_archive-regeneration/
└── ...
Each directory contains all 4 memory files from that cycle. The LM provides a short description slug; the script prepends the date.
Archive Cycle
Triggered when at least one condition is true:
chronicle.mdexceeds 3,000 words- A major architectural milestone is completed
- User explicitly requests archive
Script (scripts/archive-memory.sh)
scripts/archive-memory.sh --force "description-slug"
Phase A: Creates past/YYYY-MM-DD_slug/, moves root files into it.
Phase B (script): Copies system-state.md, filters debts.md (excludes closed), creates minimal chronicle.md header.
Phase B (LM): Writes past-summary.md, appends chronicle entries.
Logs
Structured logs at archive-logs/archive-<timestamp>.log with [INFO], [OK], [WARN], [ERROR] levels.
Reports
Milestone-oriented reports live in memory/reports/. These are NOT part of archive rotation. Reports older than 30 days should be reviewed for Mnemosyne archival.
See Also
- Detail: Archive Flow Detail
- Detail: Memory Files Detail
- Hub: AGENTS.ctx