Repository navigation
Description
Problem
Two quality defects in the distill/summary output surface:
-
Report-speak, not human notes. The summary-family prompt templates (
apps/engine/src/distill/defaults.ts) instruct the model to write "a tight, factual summary of what just happened" with no voice rules. Generic small models fill that vacuum with meeting-minutes register — narrating the act of transcription ("The speaker expressed a goal to…", "The transcript indicates…") instead of jotting the substance a sharp human notetaker would ("Feedback to QA — due soon"). -
No silence over noise. The distiller only skips a fully empty batch (
distiller.tsfilters zero-text). Every non-empty window always persists a distillate, so a near-empty window of filler/fragments/garble still emits a note ("a brief moment of confusion regarding whether the meeting or work is proceeding, but no further action was recorded"). A human notetaker writes nothing when nothing happened. Contrast the fast-fields, which already carrytrigger.minCharsrelevance gates.
Scope
- Rewrite the summary-family template bodies (distill window notes + rolling/episode/five-minute/session/project) to a human note-taking register: lead with the substance, ban transcription-narration framings, keep the existing invent-nothing honesty rules, stay terse. Consistent with the hud-voice surface-language rules.
- Add two suppression layers so an empty window produces silence:
- a deterministic pre-gate: a minimum meaningful-character floor on the merged window's observed material (consistent with the fast-fields minChars precedent);
- a model-level escape: the distill template emits an exact sentinel token when there is nothing worth noting, and the engine drops the distillate on an exact full-text match.
- Clobber-safe upgrade: follow the existing previous-builtin-bodies refresh so untouched installs auto-upgrade and user-edited bodies are preserved.
- Downstream (summaries producer) must tolerate the resulting gaps.
Out of scope
- Extraction templates (moments/entities) and extraction logic.
- Client/pad UI.
- Contract changes (none expected).
Activity
feat(distill): human note-taking voice + silence for empty windows (#245
Ambisphaeric commentedon Jul 18, 2026
Closing evidence — landed via PR #249, merge
0f868f8, main CI greenPer acceptance criterion (relative paths,
file:line+ test names):AC1 — human note-taking register across the summary family; ban transcription-narration; keep invent-nothing.
apps/engine/src/distill/defaults.ts:29–:36— the distill/summary bodies now pin a human note-taking register (lead with the substance), explicitly ban narration framings ("The speaker expressed…", "The transcript indicates/shows…", "it was mentioned/noted/recorded/discussed") at:33, and keep the invent-nothing honesty rule at:34. Applied across the six summary-family templates (window notes + rolling/episode/five-minute/session/project).apps/engine/src/distill/documents.test.ts:165asserts each body leads with a note-taking directive.AC2 — two suppression layers so an empty window produces silence.
apps/engine/src/distill/distiller.ts:85DISTILL_MIN_CHARS = 12;:234–:236a window whose merged observed material falls below the floor persists NO distillate and never calls the model.NOTHING_NOTEWORTHYatapps/engine/src/distill/defaults.ts:10, imported by the distiller (distiller.ts:11);:316–:318an exact (trimmed, case-sensitive, full-text) sentinel match drops the whole window — distillate, moments, and entities. Empty / whitespace-only model responses are dropped by the same guard (summaryText === '').apps/engine/src/distill/suppression.test.ts, 10): pre-gate suppresses + never calls model:74; pre-gate raises no false suppression on a real short utterance:87; exact sentinel drops:99; whitespace around the token still drops:111; token embedded inside a real note does NOT drop:122; a normal note is persisted unchanged:134; suppression is whole-window (no moments, no entities):145; empty/whitespace response dropped:157; sentinel strictness is deliberate — trailing period / lowercase variant KEPT:168; a dropped window does not poison the next:191.AC3 — clobber-safe upgrade; downstream tolerates gaps.
apps/engine/src/distill/documents.ts(untouched installs auto-upgrade, user-edited bodies preserved); coverage extended inapps/engine/src/distill/documents.test.ts.shared/contracts/examples/promptTemplate.distill.json,promptTemplate.summary.json.Rollout note (system): the distill-window template docs sit at version 2 (already refreshed once) and will NOT auto-upgrade on existing installs — those may need a manual template reset to pick up the new body; the summary-ladder templates sit at version 1 and upgrade automatically.
Gates at merge head: engine 1142; main CI green.