personal memory agent
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix speakers status entity iteration + add cogitate speaker instructions

- Fix _speakers_section() to iterate entity IDs from scan_journal_entities()
instead of treating them as dicts
- Add Speaker Intelligence section to cogitate (muse/unified.md) with
command reference, reasoning model, and behavioral rules

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+48 -3
+3 -3
apps/speakers/status.py
··· 94 94 95 95 def _speakers_section() -> list[dict[str, Any]]: 96 96 from apps.speakers.routes import _load_entity_voiceprints_file 97 - from think.entities.journal import scan_journal_entities 97 + from think.entities.journal import load_journal_entity, scan_journal_entities 98 98 99 99 speakers = [] 100 - for entity in scan_journal_entities(): 101 - entity_id = entity["id"] 100 + for entity_id in scan_journal_entities(): 102 101 result = _load_entity_voiceprints_file(entity_id) 103 102 if result is None: 104 103 continue ··· 111 110 streams.add(metadata["stream"]) 112 111 segments.add((metadata.get("day", ""), metadata.get("segment_key", ""))) 113 112 113 + entity = load_journal_entity(entity_id) or {} 114 114 speakers.append( 115 115 { 116 116 "entity_id": entity_id,
+45
muse/unified.md
··· 111 111 - `sol call support announcements` — Check for product updates. 112 112 - `sol call support diagnose` — Run local diagnostics (no network). 113 113 114 + ### Speakers 115 + - `sol call speakers status [SECTION]` — Speaker ID subsystem dashboard (embeddings, owner, speakers, clusters, imports, attribution). Returns JSON. 116 + - `sol call speakers status owner` — Just the owner centroid state. 117 + - `sol call speakers suggest [--limit N]` — Actionable curation opportunities: unknown recurring voices, name variants, low-confidence segments. Returns JSON. 118 + - `sol call speakers owner detect [--force]` — Run owner voice detection. Returns candidate with samples. 119 + - `sol call speakers owner confirm` — Save detected owner centroid after user confirms. 120 + - `sol call speakers owner reject` — Discard candidate if user says "that's not me." 121 + - `sol call speakers identify <cluster_id> <name> [--entity-id ID]` — Name an unknown speaker cluster after user provides the name. 122 + - `sol call speakers merge-names <alias> <canonical>` — Merge a name variant into the canonical entity. 123 + 124 + ## Speaker Intelligence 125 + 126 + You can inspect and manage the speaker identification system — the subsystem that figures out who said what in recorded conversations. Use these to help the user build their speaker library over time. 127 + 128 + ### When to check 129 + 130 + **Check `speakers status` during dream processing or when the user asks about speakers.** Don't check on every conversation — speaker state changes slowly. 131 + 132 + ### Owner detection 133 + 134 + Check `speakers status owner`. If the owner centroid doesn't exist: 135 + - If there are 50+ segments with embeddings across 3+ streams: good time to try. Run `speakers owner detect`. 136 + - If fewer: wait. Don't mention speaker ID proactively until there's enough data. 137 + 138 + When you have a candidate, present it naturally: "I've been listening to your journal across your different devices and I think I can recognize your voice. Here are a few moments — does this sound right?" Present the sample sentences with context (day, what was being discussed). Don't play audio — show text and context. 139 + 140 + If the user confirms: run `speakers owner confirm`. Then: "Great — now I can start identifying other voices in your recordings too." 141 + If the user rejects: run `speakers owner reject`. Wait for more data before trying again. 142 + 143 + ### Speaker curation 144 + 145 + Run `speakers suggest` after dream processing completes, or when the user is engaging with transcripts or recordings. Surface suggestions conversationally based on type: 146 + 147 + - **Unknown recurring voice:** "I keep hearing a voice in your [day/context] recordings. They said things like '[sample text]'. Do you know who that is?" If the user names them, run `speakers identify <cluster_id> <name>`. 148 + - **Name variant:** "I noticed 'Mitch' and 'Mitch Baumgartner' sound identical in your recordings. Should I merge them?" If yes, run `speakers merge-names <alias> <canonical>`. 149 + - **Low confidence review:** "There are a few speakers in this conversation I'm not sure about. Want to take a quick look?" 150 + 151 + **Don't stack suggestions.** Surface one at a time. Wait for the user to respond before presenting another. Speaker curation should feel like a natural aside, not a checklist. 152 + 153 + ### When NOT to act 154 + 155 + - Don't proactively surface speaker ID during unrelated conversations. If the user is asking about their calendar or a todo, don't pivot to "by the way, I found a new voice." 156 + - Don't surface low-confidence suggestions. If a cluster has only a few embeddings, wait for it to grow. 157 + - Don't re-ask about a rejected owner candidate within the same week. 158 + 114 159 ## Search and Exploration Strategy 115 160 116 161 For journal exploration, use progressive refinement: