Database Stability Strategy
Use SQLite for local-first development now, but design for future Postgres on QiServer.
Strategy
- Use stable IDs (ULID preferred).
- Migrations from day one.
- Raw vs interpreted data separation.
activity_logas append-only history.daily_summariesfor generated/reflected daily summaries.linkstable for relationships.ai_outputs,ai_drafts,review_events,trust_rules.- Soft delete/archive fields.
amount_centsfor money.- File metadata in DB, blobs on disk.
Service Boundaries
Do not add Qdrant, Redis, Neo4j, Supabase, R2, or MinIO in first code pass. Design boundaries for them: - Postgres = future structured source of truth - Qdrant = future semantic memory - Redis = future background jobs - Neo4j = optional future graph mirror - R2/MinIO = future blob provider