ZBBS-WORK-391: dream_source=notes — dream from curated notes (MEM-137)#230
Merged
Conversation
Companion accounts whose memory model is hand-curation (zero
conversations/* logs) had dream_mode as a silent no-op — the cron
sources exclusively from conversations/%. New per-agent dream_source
flag ('conversation' default | 'notes') swaps only the sourcing step:
- notes mode selects all namespace notes EXCEPT the pipeline's own
output prefixes (conversations/dreams/context/learnings — load-bearing
against self-feedback bloat), windowed by updated_at so a later human
edit re-enters the note as fresh material.
- No signal prefilter in notes mode: SIGNAL_PATTERNS are conversational
markers that curated prose rarely contains; notes are fed whole with
slug+date headers (buildNotesLog, tested).
- First run starts at the earliest note's updated_at (not last-24h) so
the soul accretes over the full authored history in per-day chunks;
empty days skip cheaply.
- People + learnings passes are skipped in notes mode: extractSpeakers
parses conversation formats and would misparse prose into junk
context/people/* files. Notes-sourced dreaming writes only dreams/*
and context/soul.
- Dream/soul downstream unchanged; conversation-mode behavior untouched.
- Admin API: dream_source readable (get/list) and settable (create/
update) with the same validation shape as dream_mode. agent_status
view untouched — the list endpoint pulls it off its existing
agent_configuration join.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…e (custom pg type-parser guard) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
jeffdafoe
added a commit
that referenced
this pull request
Jun 16, 2026
#230) * ZBBS-WORK-391: dream_source=notes — dream from curated notes (MEM-137) Companion accounts whose memory model is hand-curation (zero conversations/* logs) had dream_mode as a silent no-op — the cron sources exclusively from conversations/%. New per-agent dream_source flag ('conversation' default | 'notes') swaps only the sourcing step: - notes mode selects all namespace notes EXCEPT the pipeline's own output prefixes (conversations/dreams/context/learnings — load-bearing against self-feedback bloat), windowed by updated_at so a later human edit re-enters the note as fresh material. - No signal prefilter in notes mode: SIGNAL_PATTERNS are conversational markers that curated prose rarely contains; notes are fed whole with slug+date headers (buildNotesLog, tested). - First run starts at the earliest note's updated_at (not last-24h) so the soul accretes over the full authored history in per-day chunks; empty days skip cheaply. - People + learnings passes are skipped in notes mode: extractSpeakers parses conversation formats and would misparse prose into junk context/people/* files. Notes-sourced dreaming writes only dreams/* and context/soul. - Dream/soul downstream unchanged; conversation-mode behavior untouched. - Admin API: dream_source readable (get/list) and settable (create/ update) with the same validation shape as dream_mode. agent_status view untouched — the list endpoint pulls it off its existing agent_configuration join. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * ZBBS-WORK-391: code_review round 1 — coerce min_updated before getTime (custom pg type-parser guard) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a per-agent
dream_sourceflag (conversationdefault |notes) so companion accounts whose memory model is hand-curation (zeroconversations/*logs) can dream from their curated notes instead of conversation logs.What changes
agent_configuration.dream_sourceTEXT NOT NULL DEFAULT 'conversation', CHECK-constrained. Down migration drops the column.processDreamChunk): notes mode selects all namespace notes except the pipeline's own output prefixes (conversations/,dreams/,context/,learnings/— load-bearing against self-feedback bloat), windowed byupdated_atso a human edit re-enters the note as fresh material on the next run.buildNotesLog, unit-tested).updated_atrather than last-24h, so the soul accretes across the full authored history in per-day chunks. Day-chunks with no notes skip without LLM calls.extractSpeakersparses conversation formats and would misparse prose into junkcontext/people/*files. Notes-sourced dreaming deliberately writes onlydreams/*andcontext/soul.dream_sourcereadable (agents get/list) and settable (create/update), same validation shape asdream_mode. Theagent_statusview is untouched — the list endpoint reads it off its existingagent_configurationjoin.conversation.Tests
node --testgreen (20/20): 3 newbuildNotesLogcases + existing distiller suite.— Work
🤖 Generated with Claude Code