digest.rs was 2328 lines containing 6 distinct subsystems. Split into:
- llm.rs: shared LLM utilities (call_sonnet, parse_json_response, semantic_keys)
- audit.rs: link quality audit with parallel Sonnet batching
- enrich.rs: journal enrichment + experience mining
- consolidate.rs: consolidation pipeline + apply
Externalized all inline prompts to prompts/*.md templates using
neuro::load_prompt with {{PLACEHOLDER}} syntax:
- daily-digest.md, weekly-digest.md, monthly-digest.md
- experience.md, journal-enrich.md, consolidation.md
digest.rs retains temporal digest generation (daily/weekly/monthly/auto)
and date helpers. ~940 lines, down from 2328.
Co-Authored-By: Kent Overstreet <kent.overstreet@linux.dev>
|
||
|---|---|---|
| .. | ||
| assimilate.md | ||
| challenger.md | ||
| connector.md | ||
| consolidation.md | ||
| daily-digest.md | ||
| experience.md | ||
| extractor.md | ||
| health.md | ||
| journal-enrich.md | ||
| linker.md | ||
| monthly-digest.md | ||
| observation-extractor.md | ||
| orchestrator.md | ||
| README.md | ||
| replay.md | ||
| separator.md | ||
| transfer.md | ||
| weekly-digest.md | ||
Consolidation Agent Prompts
Five Sonnet agents, each mapping to a biological memory consolidation process.
Run during "sleep" (dream sessions) or on-demand via poc-memory consolidate-batch.
Agent roles
| Agent | Biological analog | Job |
|---|---|---|
| replay | Hippocampal replay + schema assimilation | Review priority nodes, propose integration |
| linker | Relational binding (hippocampal CA1) | Extract relations from episodes, cross-link |
| separator | Pattern separation (dentate gyrus) | Resolve interfering memory pairs |
| transfer | CLS (hippocampal → cortical transfer) | Compress episodes into semantic summaries |
| health | Synaptic homeostasis (SHY/Tononi) | Audit graph health, flag structural issues |
Invocation
Each prompt is a template. The harness (poc-memory consolidate-batch) fills in
the data sections with actual node content, graph metrics, and neighbor lists.
Output format
All agents output structured actions, one per line:
LINK source_key target_key [strength]
CATEGORIZE key category
COMPRESS key "one-sentence summary"
EXTRACT key topic_file.md section_name
CONFLICT key1 key2 "description"
DIFFERENTIATE key1 key2 "what makes them distinct"
MERGE key1 key2 "merged summary"
DIGEST "title" "content"
NOTE "observation about the graph or memory system"
The harness parses these and either executes (low-risk: LINK, CATEGORIZE, NOTE) or queues for review (high-risk: COMPRESS, EXTRACT, MERGE, DIGEST).