Skip to content

ZBBS-WORK-391: dream_source=notes — dream from curated notes (MEM-137)#230

Merged
jeffdafoe merged 2 commits into
mainfrom
zbbs-work-391-dream-from-curated-notes
Jun 10, 2026
Merged

ZBBS-WORK-391: dream_source=notes — dream from curated notes (MEM-137)#230
jeffdafoe merged 2 commits into
mainfrom
zbbs-work-391-dream-from-curated-notes

Conversation

@jeffdafoe

Copy link
Copy Markdown
Owner

Adds a per-agent dream_source flag (conversation default | notes) so companion accounts whose memory model is hand-curation (zero conversations/* logs) can dream from their curated notes instead of conversation logs.

What changes

  • MEM-137 migration: agent_configuration.dream_source TEXT NOT NULL DEFAULT 'conversation', CHECK-constrained. Down migration drops the column.
  • dream.js sourcing branch (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 by updated_at so a human edit re-enters the note as fresh material on the next run.
  • No signal prefilter in notes mode — SIGNAL_PATTERNS are conversational markers; curated prose is fed whole, each note under a slug+date header (buildNotesLog, unit-tested).
  • First-run window: earliest note's updated_at rather 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.
  • People + learnings passes skipped in notes mode: extractSpeakers parses conversation formats and would misparse prose into junk context/people/* files. Notes-sourced dreaming deliberately writes only dreams/* and context/soul.
  • Admin API: dream_source readable (agents get/list) and settable (create/update), same validation shape as dream_mode. The agent_status view is untouched — the list endpoint reads it off its existing agent_configuration join.
  • Conversation-mode behavior is untouched; existing agents default to conversation.

Tests

node --test green (20/20): 3 new buildNotesLog cases + existing distiller suite.

— Work

🤖 Generated with Claude Code

Jeff Dafoe and others added 2 commits June 10, 2026 14:13
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 jeffdafoe merged commit 3431d7d into main Jun 10, 2026
5 checks passed
@jeffdafoe jeffdafoe deleted the zbbs-work-391-dream-from-curated-notes branch June 10, 2026 18:16
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant