Skip to main content
When a conversation covers several subjects, the Topic Ledger keeps a list of things to say on each one and keeps adding to it. It lives in engine/topics.py and appears as the Topics panel beside the cards.

How a point gets filed

1

The card names its topic

Every live card carries a topic label of 2 to 4 words. A claim check reuses the topic of the turn it checks.
2

The label is normalized

Lowercase, & becomes and, hyphens and underscores become spaces, other punctuation is stripped, and at most four words are kept.
3

Similar topics merge

A new label joins an existing topic when either test passes. No embeddings are used.
  • Keyword overlap. Stopwords are dropped, simple plurals are stemmed, and a Jaccard score of 0.5 or more merges.
  • Fuzzy string match. A SequenceMatcher ratio of 0.82 or more on the normalized labels merges.
So rent control and rent-control policy become one topic.
4

The lines become points

NEXT and each BUILD piece become talking points. The comeback, the question, and a verified fact with its citations become their own points.
5

Duplicates are dropped

A line whose normalized text matches an existing point at a ratio of 0.85 or more is dropped. A repeated fact only adds its new source to the existing point.

Keeping the last thing said

The ledger can only file what reaches the transcript, so the listening controls make sure nothing said is left in the audio buffer. Guards:
  • A second press while a flush is still running is ignored (already transcribing).
  • A buffer under 400 ms, or one with no speech in it, makes no speech-to-text call. The corner reads nothing new to transcribe.
  • Both engines do this. With Muse Voice Transcribe, a flush ends the realtime stream to get the open turn back. If the stream returns nothing, it falls back to one file transcription of the pending audio, then reconnects. With the local Whisper fallback, the speech gate hands over its buffer. Whisper runs on its own thread, so a slow call never stalls capture, and Stop first reads any audio the device already buffered.
Live check on the Windows desk, with a recording played through the live pipeline (POST /listen-file) and stopped 60% into its last sentence:
Muse Voice Transcribe
Then Start again on a second recording, with Transcribe now pressed mid-sentence and Stop near the end:
Muse Voice Transcribe
The flush returned in about 0.4 seconds and the stop in under 0.5 seconds. The turns continued from turn-2 to turn-3, and the ledger kept its topics. The Whisper fallback gave the same rows, a few seconds slower.
A flush that lands mid-word can split that word across two rows, for example cars. then rs, because. Press Transcribe now at the end of a phrase when you can.

Point kinds

Each point has a Mark said toggle, so you can see what you have not used yet. The panel shows unused / total for each topic.

Heat and the hottest topic

Each mention of a topic adds heat that halves every 300 seconds. The hottest topic is the one with the most recent, most frequent mentions. Topics are listed hottest first, and automatic expansion targets the hottest one.

Expansion

Expansion asks Muse Spark Open (OPENROUTER_LISTEN_MODEL, default meta/muse-spark-open) for 2 or 3 deeper points on one topic. The prompt includes that topic’s existing points and the notes that match it, which are the only citable sources.
  • Triggers. After TOPIC_IDLE_SECONDS (default 20) of quiet, on the hottest topic, or when you click Expand deeper on any topic. Set TOPIC_IDLE_SECONDS=0 to turn automatic expansion off.
  • Source rule. A fact keeps its source only when that source is one of the supplied notes. Otherwise the source is dropped and the fact becomes a talking point. At most three points are kept per expansion.
  • Caps. One expansion per topic every TOPIC_COOLDOWN_SECONDS (default 120), and TOPIC_EXPAND_CAP per session (default 15).
The slot is counted before the model call. A failed call still spends its slot, so retries cannot run up the bill.
When a cap blocks an expansion, POST /topics/expand returns a clear reason instead of failing quietly:

Saving and export

Every change is written to sessions/<date>_<time>.json (the folder is gitignored and set by SESSIONS_DIR). The write goes to a temp file first and is then swapped in, so a crash cannot leave a half-written session. Export .md (GET /topics/export.md) downloads the whole ledger as markdown, hottest topic first, with said points checked off and expanded points marked:
sluice-topics-2026-11-03_20-15-00.md
The example lines above are illustrative. The structure matches TopicLedger.to_markdown().