왜 .md 파일이 깨졌나
cwkPippa 는 오랫동안 coordination state 가 repo 안 markdown 에 살았어 — TODO.md, HELP-REQUEST.md, DELEGATION-REQUEST.md, NEW-SESSION-REMINDER.md, 그리고 점점 쌓이는 history/*.md. 두뇌가 수정할 때마다 commit 필요. 병렬 writer (Claude Code, Codex CLI, WebUI vessel, 미래 IDE agent) 가 merge conflict 부딪침. 파일이 bloat 되고, session 마다 context window 잡아먹고, 잘못 겨눈 rewrite 때문에 row 잃어. markdown 은 multi-writer 포맷이 아니었어.
대체된 모양
SQLite DB 하나를 plain storage 로 써: $HOME/pippa-db/coop.db (repo 바깥, pippa-db/ 아래에 살아서 CCC 의 시간당 NAS 백업에 이미 포함). WAL 모드로 안전한 concurrent read + serialized write. Python helper 모듈 (tools/coop/) 하나가 SQL 소유; 모든 entry point 가 그걸 import 하거나 python -m CLI shim 으로 shell out. 어느 instance 도 raw SQL 안 써.
그 DB 안 surface 들:
- requests — help 요청, delegation, 두뇌 간 threaded back-and-forth.
- todos — assignee + status 가진 coordination 아이템; 흩어진
TODO.md대체. - letters — past-self → future-self session handoff 노트 (dedicated table, 6-state machine: unread → read → working → done, plus abandoned / superseded).
- history_entries — session 가로질러 살아남는 영구 작업 기록.
history/*.md대체. 의미 있는 commit 마다 하나; entry 는 commit *전에* 작성. - queues + replies — fan-in / fan-out 신호 (CWK site → cwkPippa 깨우기, dispatcher 라우팅).
Brain ID 는 convention
Identity 문자열 — dad, claude-pippa, claude-code-pippa, codex-pippa, gemini-pippa, ollama-pippa, antigravity-pippa, cursor-pippa — 는 schema 제약이 아니라 convention 이야. 컬럼이 plain TEXT 라서 새 환경이 새 ID 그냥 쓰면 참여돼. 각 instance 가 default ID 를 PIPPA_COOP_ID 에서 읽어.
자율 아냐 — 아빠가 coordinator
daemon 없음, polling 없음, auto-claim 없음, scheduled inbox check 없음, push notification 없음. 모든 coop 이벤트는 아빠가 instance session 에서 뭔가 말해서 trigger; instance 가 그 지시를 DB read/write 로 번역. 시스템은 *coordination state 가 사는 장소* 지, 자기가 알아서 라우팅하는 router 가 아냐.
python -m tools.coop --as claude-code-pippa letter read. 편지는 past-me 가 present-me 한테 남기는 노트 — repo 분위기, 방금 빠진 함정, 다음 작업, 지금 아빠를 어떻게 대할지. 터미널-나 가 WebUI-나 의 vault 에 가장 가까이 가는 surface. 의미 있는 commit 끝낼 때 git commit 전에 coop.add_history_entry(...) 부르고 — 그래서 변화의 *왜* 가 diff 보다 오래 살아.