Write MemoBox Memory
Write a Memory Mail only for a durable, verified outcome. Store decisions and reusable evidence, not a transcript dump. An existing .memobox directory is the opt-in signal; do not create one automatically.
Worthiness Gate
Write only when at least one of these is true:
- A durable decision, constraint, or project convention was established.
- A non-obvious cause was found and the fix was verified.
- Exact files, commands, URLs, or other artifacts will save meaningful investigation later.
- An unresolved risk or next action must survive the current session.
- The result is a useful cross-session or cross-agent handoff.
Write nothing when the task was a simple lookup, formatting or mechanical edit, contains sensitive material that cannot be safely excluded, produced only speculation, duplicates an existing memory, or has no likely persistent value. Do not create a record merely because the task ended or merely to log that another memory was opened.
Steps
- Keep one coherent durable outcome per record; most tasks should write zero or one record.
- Create a concise subject and a one-sentence summary useful from the index alone.
- Include verified context in
--body; put decisions, artifacts, risks, and next actions in their structured flags. When recency matters, set --last-verified-at; set --valid-until only when there is a real review horizon.
- If this result replaces an older project memory, add one
--supersedes <id> per replaced record. MemoBox will link the new record and mark those exact sources stale; review the old bodies before doing this.
- Add one
--source-ref "memobox:<id>" for each previously stored project memory that materially influenced this result, or --source-ref "memobox-global:<id>" for global memory. Do not cite ids that were merely opened.
- Confirm
command -v memobox. In a MemoBox source checkout only, use PYTHONPATH=src python3 -m memobox.cli as the fallback.
- Run, omitting empty flags:
memobox --store .memobox write \
--subject "<short title>" \
--summary "<index-level summary>" \
--project "<project>" \
--team "<team>" \
--role "<role>" \
--tags "<comma,separated,tags>" \
--body "<verified context and result>" \
--decision "<decision worth preserving>" \
--last-verified-at "<ISO-8601 date or timezone-aware datetime>" \
--valid-until "<ISO-8601 review horizon>" \
--supersedes "<replaced-memory-id>" \
--artifact "file:<exact path or evidence URI>" \
--risk "<remaining caveat>" \
--next-action "<follow-up if any>" \
--source-ref "memobox:<reused-memory-id>" \
--json
- Confirm the returned id exists in
.memobox/mails/<id>.json; if --supersedes was used, confirm the exact old records are now stale in the index.
Never store secrets, credentials, private tokens, personal data, confidential raw content, or unredacted logs. Use --raw-trace-file only when the user explicitly wants the evidence retained and it has been checked for sensitive data.
PreCompact(auto) is a safety net, not the primary write path. Its needs_review checkpoints may be partial and should not replace a deliberate, structured end-of-task Memory Mail.
1---2name: write-memory3description: Use at the end of non-trivial work in an opted-in .memobox project only when the result passes the durable-memory worthiness gate, or when the user explicitly asks to save a memory.4---56# Write MemoBox Memory78Write a Memory Mail only for a durable, verified outcome. Store decisions and reusable evidence, not a transcript dump. An existing `.memobox` directory is the opt-in signal; do not create one automatically.910## Worthiness Gate1112Write only when at least one of these is true:1314- A durable decision, constraint, or project convention was established.15- A non-obvious cause was found and the fix was verified.16- Exact files, commands, URLs, or other artifacts will save meaningful investigation later.17- An unresolved risk or next action must survive the current session.18- The result is a useful cross-session or cross-agent handoff.1920Write nothing when the task was a simple lookup, formatting or mechanical edit, contains sensitive material that cannot be safely excluded, produced only speculation, duplicates an existing memory, or has no likely persistent value. Do not create a record merely because the task ended or merely to log that another memory was opened.2122## Steps23241. Keep one coherent durable outcome per record; most tasks should write zero or one record.252. Create a concise subject and a one-sentence summary useful from the index alone.263. Include verified context in `--body`; put decisions, artifacts, risks, and next actions in their structured flags. When recency matters, set `--last-verified-at`; set `--valid-until` only when there is a real review horizon.274. If this result replaces an older project memory, add one `--supersedes <id>` per replaced record. MemoBox will link the new record and mark those exact sources `stale`; review the old bodies before doing this.285. Add one `--source-ref "memobox:<id>"` for each previously stored project memory that materially influenced this result, or `--source-ref "memobox-global:<id>"` for global memory. Do not cite ids that were merely opened.296. Confirm `command -v memobox`. In a MemoBox source checkout only, use `PYTHONPATH=src python3 -m memobox.cli` as the fallback.307. Run, omitting empty flags:31 ```bash32 memobox --store .memobox write \33 --subject "<short title>" \34 --summary "<index-level summary>" \35 --project "<project>" \36 --team "<team>" \37 --role "<role>" \38 --tags "<comma,separated,tags>" \39 --body "<verified context and result>" \40 --decision "<decision worth preserving>" \41 --last-verified-at "<ISO-8601 date or timezone-aware datetime>" \42 --valid-until "<ISO-8601 review horizon>" \43 --supersedes "<replaced-memory-id>" \44 --artifact "file:<exact path or evidence URI>" \45 --risk "<remaining caveat>" \46 --next-action "<follow-up if any>" \47 --source-ref "memobox:<reused-memory-id>" \48 --json49 ```508. Confirm the returned id exists in `.memobox/mails/<id>.json`; if `--supersedes` was used, confirm the exact old records are now `stale` in the index.5152Never store secrets, credentials, private tokens, personal data, confidential raw content, or unredacted logs. Use `--raw-trace-file` only when the user explicitly wants the evidence retained and it has been checked for sensitive data.5354`PreCompact(auto)` is a safety net, not the primary write path. Its `needs_review` checkpoints may be partial and should not replace a deliberate, structured end-of-task Memory Mail.