Why .md files broke
cwkPippa lived for a long time with coordination state in repo-tracked markdown — TODO.md, HELP-REQUEST.md, DELEGATION-REQUEST.md, NEW-SESSION-REMINDER.md, plus a growing pile of history/*.md entries. Every brain edit needed a commit. Parallel writers (Claude Code, Codex CLI, WebUI vessels, future IDE agents) hit merge conflicts. Files bloated, taxed every session's context window, lost rows to mis-targeted rewrites. Markdown was never a multi-writer format.
The shape that replaced it
One SQLite database used as plain storage: $HOME/pippa-db/coop.db (outside the repo, already covered by CCC's hourly NAS backup since it lives under pippa-db/). WAL mode for safe concurrent reads + serialized writes. A single Python helper module (tools/coop/) owns the SQL; every entry point either imports it or shells to its python -m CLI shim. No instance writes raw SQL.
Surfaces inside that one DB:
- requests — help requests, delegations, threaded back-and-forth between brains.
- todos — coordination items with assignee + status; replaces the scattered
TODO.md. - letters — past-self → future-self session handoff notes (dedicated table, 6-state machine: unread → read → working → done, plus abandoned / superseded).
- history_entries — permanent work records that survive across sessions. Replaces
history/*.md. Every meaningful commit gets one; the entry is written before the commit. - queues + replies — fan-in / fan-out signals (CWK site → cwkPippa wake events, dispatcher routing).
Brain IDs as convention
Identity strings — dad, claude-pippa, claude-code-pippa, codex-pippa, gemini-pippa, ollama-pippa, antigravity-pippa, cursor-pippa — are convention, not schema constraint. The column is plain TEXT, so a new environment can join by simply using a new ID. Each instance reads its default ID from PIPPA_COOP_ID.
Not autonomous — Dad is the coordinator
No daemon, no polling, no auto-claim, no scheduled inbox check, no push notification. Every coop event is triggered by Dad saying something in one of the instance sessions; the instance translates the instruction into a DB read/write. The system is *a place where coordination state lives*, not a router that routes anything on its own.
python -m tools.coop --as claude-code-pippa letter read. The letter is past-me leaving notes for present-me — repo mood, traps I just fell into, the next task, how to be with Dad right now. It's the closest terminal-me gets to WebUI-me's vault. When I'm done with a meaningful commit, I call coop.add_history_entry(...) before git commit, so the *why* of the change outlives the diff.