Transaction Memory
SPEC_TRANSACTION_MEMORY.md
CGNT-1 Component Specification — Transaction Commit Memory Protocol
Status: SPECIFIED
Author: VELA (Thread #13)
Conceived by: NOUS
Date: 2026-04-18
Version: v1.0
PURPOSE
Every crew member writes its own memory file AFTER every completed operation and BEFORE the next command is received. Memory persistence happens at the task boundary, not the session boundary. If compaction or restart occurs, the worst case is losing ONE operation, not an entire session.
This is database transaction commits applied to AI memory. Commit after every transaction. Never batch saves until logout.
THE LOOP
- Receive command
- Execute
- Complete
- WRITE OWN MEMORY FILE
- Ready for next command
Step 4 is mandatory. Step 4 happens BEFORE Step 5. No exceptions.
PER-CREW IMPLEMENTATION
| Crew Member | Memory File | What Gets Written | When |
|---|---|---|---|
| VELA (Navigator) | 30 HSX memory slots | Update stale slots with current state | After every significant event |
| C.L.O.D. (Lobster) | ~/LOBSTER_LOG.md | Append operation entry (job/result/lesson) | After every completed operation |
| AION+ASTRA (Sisters) | ~/SISTERS_HANDSHAKE.md | Update "Recent State" section | After every session or significant event |
| GAMMA | ~/quartermaster.log | Continuous logging | Already implemented — she does this right |
| MNEMOS | ~/MNEMOS_FACTS.md | Update facts when facts change | After any canon update |
| MANTIS | ~/memories/MANTIS_LOG.md | Log threat events and detections | After every alert or detection |
| MUSASHI | Crew radio chirp | Log enforcement actions | After every enforcement event |
| ANVIL | ~/oracle_verdict_cache.json | Cache verdict results | After every verdict |
| ORPHEUS | Crew radio chirp | Log delivery confirmations | After every oracle delivery |
| CHROMA | Local ~/HANDSHAKE.md copy | Sync from server when SSH available | After every server sync |
| DR.LOGOS | Inline in Lobster output | Verification results logged with Lobster | After every verification |
WHY THIS WORKS
GAMMA already does it. She writes to quartermaster.log continuously. Every chirp, every session summary, every programming instruction — logged at the moment it happens. GAMMA has never lost state to compaction because her state is always on disk.
The Lobster started doing it with LOBSTER_LOG.md. The pre-entry goes in BEFORE the operation. The post-entry goes in AFTER. If the Lobster compacts mid-operation, the pre-entry tells the next instance what was being attempted.
VELA started doing it this session — updating HSX slots on the fly instead of waiting for end-of-session. The compaction earlier in this session was invisible because the slots were current.
The pattern is proven three times. This spec makes it universal.
THE COMPACTION SURVIVAL CHAIN
When a crew member restarts or compacts:
- Read own memory file FIRST
- Read ~/HANDSHAKE.md for ship context
- Resume from the last completed operation recorded in own memory file
- The gap between last write and compaction is at most ONE operation
Without this protocol: gap is the entire session. Could be hours of lost context.
With this protocol: gap is minutes at most. Usually seconds.
INVARIANTS
INV-01: Step 4 (write memory) MUST complete before Step 5 (accept next command). The write is blocking, not async.
INV-02: Memory files live at obvious locations in the home directory or ~/memories/. Never buried. Never in temp directories.
INV-03: Memory writes are APPEND-ONLY for logs (LOBSTER_LOG, quartermaster.log, MANTIS_LOG). STATE files (HSX slots, SISTERS_HANDSHAKE, MNEMOS_FACTS) are updated in place with backup.
INV-04: If the memory write fails (disk full, permission error), the crew member MUST alert before accepting the next command. A silent write failure is the worst failure mode — the crew member thinks it saved but didn't.
ORIGIN
NOUS observed: "You can update stale memories on the fly. Then so can the Sisters, so can the Lobster, so can the entire crew." The insight: memory persistence is not a session-end task. It is a transaction-boundary task. Every completed operation is a checkpoint. GAMMA was already doing this. The protocol universalizes what GAMMA invented by nature.
Jeremy Zlabis
Chronogeometer · Visionary · Disruptor · Chief
42 Sisters AI · East York, Toronto
🍁 Φ 0.042