Repository navigation
v0.5 closes the gap v0.4 revealed: Cortex captured conversations but didn't capture learnings. The digest told me what topic a chat was about; it rarely told me what was concluded. v0.5 adds atomic-learning extraction (the high-signal layer), a daily journal (the user's own thinking, first-class), and
cortex add(capture from anywhere a shell reaches). Seedocs/V05-THINKING.mdfor the reasoning.
Privacy-first desktop app: captures AI conversations from Claude, ChatGPT, and Gemini into a local knowledge graph. Nothing leaves your machine.
What changed
- Atomic-learning extraction. After every capture, a local Ollama pass (
llama3.2:3bin JSON mode, orCORTEX_EXTRACT_MODEL) extracts up to five short sentences capturing what was concluded, decided, or worth remembering. Each learning becomes a first-class memory (source='derived',derived_from=<parent.id>) — searchable, taggable, exportable like any other memory. The digest reads from learnings instead of parent chats; the parent stays as substrate.- Tolerant JSON parser handles common Ollama failure modes: markdown code fences, leading prose, trailing commas,
{"learnings": [...]}envelopes. - Dedupe-against-existing logic so re-extracting a re-captured conversation doesn't duplicate.
- Single-flight per parent id; null-safe when Ollama is down.
- Tolerant JSON parser handles common Ollama failure modes: markdown code fences, leading prose, trailing commas,
- Daily journal — first-class memory type. New
source='journal'memories, one per day. In-app Journal view (Ctrl+5): debounced autosave, recent-entries sidebar, paired-with-digest hint. CLI:cortex journal "what you've been thinking"for one-liners;cortex journal --editopens$EDITORon the day's entry; barecortex journalprints today's entry. The user's own thinking lives alongside captured chats. cortex addfor terminal quick-capture.cortex add "scheduler-by-priority idea from podcast" --tag idea. Stdin-aware (echo "thought" | cortex add). Source defaults tocli. Bridges meetings, walks, podcasts to Cortex via voice-to-text or any shell pipe.- MCP server v0.5 — two new tools (
cortex_extract,cortex_journal), totals 11.cortex_journalreads today's entry by default or upserts whencontentis supplied;cortex_extractreturns derived learnings (or triggers extraction in the in-app context). - In-app Learnings panel on every memory's detail panel. Shows derived learnings as clickable cards; "extract" button kicks Ollama on demand. Derived memories show a "↑ Parent conversation" link back.
- Schema v8 —
memories.derived_fromcolumn +idx_memories_derived_frompartial index (only indexes the derived rows) +idx_memories_journal_dayfor the hot "today's entry" lookup. Forward-only, idempotent.
What slipped (deliberately)
- Local read-only web companion (
cortex.localon the LAN). Smaller win than expected; deferred to v0.6 where it can be paired with mobile-friendly capture. - Encrypted P2P sync. Pushed to v0.6+ — single-machine is the common case and the engineering cost (key management, conflict resolution, NAT traversal) is enormous.
Verified this release
- 453/453 tests green (434 → 453, +19 across extract / journal / MCP).
- MCP smoke harness: 14/14 checks on the 11-tool surface.
- CLI smoke:
cortex add,cortex journal(write + read + edit + stdin),cortex recent --source cliall correct. - The CLI is pre-v7-DB tolerant — INSERTs don't reference v7/v8 columns, so it works against unmigrated DBs (the Electron app handles migration on its next launch).
npm run buildclean across all three processes + worker chunk.
Stack
Electron 31 · React 18 · TypeScript 5 · Tailwind 3 · better-sqlite3 12 · sqlite-vec 0.1 · Fastify 5 · D3 7 · Zustand 4 · Vitest 4 · local Ollama (all-minilm for embeddings, llama3.2:3b for summarization + extraction, both optional with graceful degradation). 453/453 tests passing.