Project Memory Autopilot
Implement external memory as first-class project infrastructure, not ad-hoc notes.
Workflow
- Determine runtime target.
codex->.codex/memory/claude->.claude/memory/opencode->.opencode/memory/- fallback ->
.ai/memory/
- Inspect existing routing/protocol files.
- Common locations:
AGENTS.md,docs/guides/protocol-*.md, local collaboration skill files.
- Common locations:
- Bootstrap memory storage.
- Prefer script:
python scripts/bootstrap_memory.py --root <repo> --runtime <codex|claude|opencode|generic> - Use
--dry-runfirst, then run without it.
- Prefer script:
- Wire memory rules into protocol docs.
- Read memory files at non-trivial task start.
- Define hard/soft write triggers.
- Require final report line:
Memory Update: written|skipped + files + trigger
- Seed initial memory entries.
- User preferences and communication constraints.
- Active context and next priorities.
- Decision log entry for the current change.
- Validate before completion.
- Memory files exist.
- Protocol docs reference the memory path and trigger behavior.
- Final report format includes the memory update line.
Trigger Matrix
Read references/memory-trigger-matrix.md and apply:
- hard trigger: any 1 -> write memory
- soft trigger: any 2 -> write memory
Templates
Use assets as copy-ready templates:
assets/user-profile.template.mdassets/active-context.template.mdassets/decision-log.template.jsonlassets/agents-memory-block.template.mdassets/protocol-memory-block.template.md
Implementation Notes
- Keep memory updates minimal and append-only where possible.
- Store durable preferences in
user-profile.md. - Store short-lived execution state in
active-context.md. - Append key decisions to
decision-log.jsonl; do not rewrite history.
Scan to join WeChat group