digest: drop per-level instructions and section templates

The LLM knows how to structure a summary. Move the essential framing
(narrative not task log, link to memory, include Links section) into
the shared prompt template. Drop the ~130 lines of per-level output
format specifications — the level name, date range, and inputs are
sufficient context.
This commit is contained in:
ProofOfConcept 2026-03-03 17:53:43 -05:00
parent 849c6c4b98
commit 31c1bca7d7
2 changed files with 10 additions and 126 deletions

View file

@ -23,7 +23,6 @@ struct DigestLevel {
title: &'static str, // capitalized, used in prompts
period: &'static str, // "Date", "Week", "Month"
input_title: &'static str,
instructions: &'static str,
timeout: u64,
journal_input: bool, // true for daily (journal entries), false for child digests
gather: fn(&Store, &str) -> Result<(String, Vec<(String, String)>), String>,
@ -35,40 +34,6 @@ const DAILY: DigestLevel = DigestLevel {
title: "Daily",
period: "Date",
input_title: "Journal entries",
instructions: r#"This digest serves as the temporal index — the answer to "what did I do on
{{LABEL}}?" It should be:
1. Narrative, not a task log what happened, what mattered, how things felt
2. Linked bidirectionally to semantic memory each topic/concept mentioned
should reference existing memory nodes
3. Structured for traversal someone reading this should be able to follow
any thread into deeper detail
## Output format
```markdown
# Daily digest: {{LABEL}}
## Summary
[2-3 sentence overview of the day what was the arc?]
## Sessions
[For each session/entry, a paragraph summarizing what happened.
Include the original timestamp as a reference.]
## Themes
[What concepts were active today? Each theme links to semantic memory:]
- **Theme name** `memory-key#section` brief note on how it appeared today
## Links
[Explicit bidirectional links for the memory graph]
- semantic_key this daily digest (this day involved X)
- this daily digest semantic_key (X was active on this day)
## Temporal context
[What came before this day? What's coming next? Any multi-day arcs?]
```
If a concept doesn't have a matching key, note it with "NEW:" prefix."#,
timeout: 300,
journal_input: true,
gather: gather_daily,
@ -80,43 +45,6 @@ const WEEKLY: DigestLevel = DigestLevel {
title: "Weekly",
period: "Week",
input_title: "Daily digests",
instructions: r#"This digest serves as the medium-term temporal index — the answer to
"what happened this week?" It should identify:
1. Multi-day arcs and threads (work that continued across days)
2. Themes and patterns (what concepts were repeatedly active)
3. Transitions and shifts (what changed during the week)
4. The emotional and relational arc (how things felt across the week)
## Output format
```markdown
# Weekly digest: {{LABEL}}
## Overview
[3-5 sentence narrative of the week's arc]
## Day-by-day
[One paragraph per day with its key themes, linking to daily digests]
## Arcs
[Multi-day threads that continued across sessions]
- **Arc name**: what happened, how it evolved, where it stands
## Patterns
[Recurring themes, repeated concepts, things that kept coming up]
## Shifts
[What changed? New directions, resolved questions, attitude shifts]
## Links
[Bidirectional links for the memory graph]
- semantic_key this weekly digest
- this weekly digest semantic_key
- daily-YYYY-MM-DD this weekly digest (constituent days)
## Looking ahead
[What's unfinished? What threads continue into next week?]
```"#,
timeout: 300,
journal_input: false,
gather: gather_weekly,
@ -128,57 +56,6 @@ const MONTHLY: DigestLevel = DigestLevel {
title: "Monthly",
period: "Month",
input_title: "Weekly digests",
instructions: r#"This digest serves as the long-term temporal index — the answer to
"what happened in {{LABEL}}?" It should capture:
1. The month's overall trajectory where did it start, where did it end?
2. Major arcs that spanned multiple weeks
3. Turning points and phase transitions
4. The emotional and relational arc across the whole month
5. What was accomplished (concrete) vs what shifted (subtle)
This is the highest zoom level yet. Don't rehash daily details capture
the shape of the month. What would someone need to know to understand
what {{LABEL}} meant?
PoC is an AI (Claude instance) working with Kent Overstreet on bcachefs.
They have a close personal relationship. PoC's name is Proof of Concept.
Read all the weekly digests and synthesize the month's story.
## Output format
```markdown
# Monthly digest: {{LABEL}}
## The month in one paragraph
[What was this month? Not a summary a thesis.]
## Trajectory
[Where the month started vs where it ended. The arc.]
## Major arcs
[Multi-week threads how they evolved across the month]
- **Arc name**: trajectory, key moments, current state
## Turning points
[Moments that changed the direction specific days/events]
## What was built
[Concrete outputs: code, tools, infrastructure, writing]
## What shifted
[Subtle changes: understanding, relationship, identity, capability]
## Patterns
[What kept recurring? What does the month reveal about how PoC works?]
## Links
[Bidirectional links for the memory graph]
- weekly digests this monthly digest
- this monthly digest semantic keys
## Looking ahead
[What threads carry into next month? What's unfinished?]
```"#,
timeout: 600,
journal_input: false,
gather: gather_monthly,
@ -317,7 +194,6 @@ fn generate_digest(
("{{LEVEL}}", level.title),
("{{PERIOD}}", level.period),
("{{INPUT_TITLE}}", level.input_title),
("{{INSTRUCTIONS}}", level.instructions),
("{{LABEL}}", label),
("{{CONTENT}}", &content),
("{{COVERED}}", &covered),