You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**Memory bridge automation** (shipped): Hook-driven refresh on `session.end` and `tasks.complete` with 30-second debounce; context-aware generation via `hybridSearch()` within configurable token budget (T138, T139)
153
+
-**Brain maintenance** (shipped): `cleo brain maintenance` combines temporal decay + consolidation + embedding backfill into a single governed command (T143)
154
+
-**Cross-provider transcript extraction** (shipped): Optional `getTranscript()` on `AdapterHookProvider`; Claude Code adapter implementation auto-extracts observation candidates from session transcripts (T144)
151
155
-**Knowledge graph** (planned): relationship-based discovery (updates/extends/derives) with temporal reasoning
152
156
-**Active circulation** (planned): Living BRAIN reinforces useful memories, detects contradictions, and surfaces relevant context proactively
153
157
@@ -240,6 +244,7 @@ The kernel is shipped and operational:
240
244
- Task work on facade: `tasks.start/stop/current` — no direct barrel imports needed (T126)
The T134 epic (12 tasks, T135–T146) delivers the first full automation layer for BRAIN memory: local embeddings, lifecycle-driven bridge refresh, session summarization, cross-provider transcript extraction, and a combined maintenance command.
| Config types |`CleoConfig`, `HierarchyConfig`, `SessionConfig`, `LifecycleConfig`, `BackupConfig`. Note: `enforcement.*` and `verification.*` sections are live at runtime but not yet declared in `CleoConfig` — they are read via untyped dot-path. The T101 config audit reduced the declared schema from ~283 to ~113 fields. |
408
+
| Config types |`CleoConfig`, `HierarchyConfig`, `SessionConfig`, `LifecycleConfig`, `BackupConfig`, `BrainConfig`, `BrainEmbeddingConfig`, `BrainMemoryBridgeConfig`, `BrainSummarizationConfig`. Note: `enforcement.*` and `verification.*` sections are live at runtime but not yet declared in `CleoConfig` — they are read via untyped dot-path. The T101 config audit reduced the declared schema from ~283 to ~113 fields. The T135 task added the `brain` section as a fully typed block in `CleoConfig` with four sub-interfaces. |
409
409
| Status registry |`TASK_STATUSES`, `SESSION_STATUSES`, `STATUS_REGISTRY`, `isValidStatus`|
`LocalEmbeddingProvider` in `memory/embedding-local.ts` provides all-MiniLM-L6-v2 embeddings via `@xenova/transformers`. The dependency is dynamically imported — zero overhead unless `brain.embedding.enabled: true`. Exposed via internal barrel as `initDefaultProvider`.
898
+
899
+
#### T137 — Async Embedding Queue
900
+
901
+
`EmbeddingQueue` in `memory/embedding-queue.ts` provides a non-blocking worker-thread queue for background embedding generation. Observations written to brain.db are queued for embedding without blocking the write path.
902
+
903
+
#### T138 — Memory Bridge Lifecycle Hooks
904
+
905
+
Bridge refresh is now wired to `session.end` and `tasks.complete` lifecycle hooks with a 30-second debounce to prevent thrashing during rapid completions.
906
+
907
+
#### T139 — Context-Aware Bridge Generation
908
+
909
+
`generateContextAwareContent` in `memory/memory-bridge.ts` uses `hybridSearch()` scoped to the current session and focused task to generate bridge content within the `brain.memoryBridge.maxTokens` budget. Activated when `brain.memoryBridge.contextAware: true`.
910
+
911
+
#### T140 — Session Summarization
912
+
913
+
`buildSummarizationPrompt` and `ingestStructuredSummary` in `memory/session-memory.ts` deliver dual-mode summarization:
914
+
915
+
- **Prompt mode**: Returns a `memoryPrompt` string on `SessionEndResult` for agent-side summarization
916
+
- **Ingestion mode**: Accepts a structured `SessionSummaryInput` via `sessionSummary` on `SessionEndParams` and auto-ingests to brain.db
917
+
918
+
#### T141 — Auto-Link to Focused Task
919
+
920
+
Observations written during a focused-task session are automatically linked to that task via `brain_memory_links`, enabling task-scoped brain retrieval.
921
+
922
+
#### T142 — Embedding Backfill CLI
923
+
924
+
`cleobackfill--embeddings` retroactively generates embeddings for existing brain entries with progress reporting. Dispatches to `runEmbeddingBackfill()` in the memory module.
925
+
926
+
#### T143 — Brain Maintenance Command
927
+
928
+
`cleobrainmaintenance` runs combined maintenance in order: temporal decay → consolidation → embedding backfill. Individual steps can be skipped via `--skip-decay`, `--skip-consolidation`, `--skip-embeddings`. The `runBrainMaintenance()` function is exported from the internal barrel.
929
+
930
+
#### T144 — Cross-Provider Transcript Extraction
931
+
932
+
`AdapterHookProvider` gains an optional `getTranscript()` method. The Claude Code adapter implements this to expose session transcript content. `extractFromTranscript()` in `memory/auto-extract.ts` processes the transcript and emits observation candidates.
933
+
934
+
#### T145 — Updated Injection Templates
935
+
936
+
`CLEO-INJECTION.md` templates updated with a Memory Automation section documenting `brain.embedding`, `brain.memoryBridge`, and `brain.summarization` config keys for agent awareness.
937
+
938
+
#### T146 — CLEO-BRAIN-SPECIFICATION.md v2.0.0
939
+
940
+
Updated brain specification to v2.0.0 reflecting the full automation layer: embedding pipeline, lifecycle hooks, summarization protocol, and maintenance command.
0 commit comments