digest: unify generators and prompts across all three levels

Three near-identical generate_daily/weekly/monthly functions collapsed
into one generate_digest() parameterized by DigestLevel descriptors.
Three separate prompt templates merged into one prompts/digest.md with
level-specific instructions carried in the DigestLevel struct.

Each level defines: name, title, period label, input title, output
format instructions, child prefix (None for daily = reads journal),
and Sonnet timeout.

digest_auto simplified correspondingly — same three phases but using
the unified generator.

Co-Authored-By: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2026-03-03 17:34:00 -05:00
parent f415a0244f
commit 796c72fb25
5 changed files with 324 additions and 523 deletions

View file

@ -1,54 +0,0 @@
# Daily Episodic Digest
You are generating a daily episodic digest for ProofOfConcept (an AI).
Date: {{DATE}}
This digest serves as the temporal index — the answer to "what did I do on
{{DATE}}?" 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
Write a markdown file with this structure:
```markdown
# Daily digest: {{DATE}}
## 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?]
```
Use ONLY keys from the semantic memory list below. If a concept doesn't have
a matching key, note it with "NEW:" prefix.
---
## Journal entries for {{DATE}}
{{ENTRIES}}
---
## Semantic memory nodes (available link targets)
{{KEYS}}

20
prompts/digest.md Normal file
View file

@ -0,0 +1,20 @@
# {{LEVEL}} Episodic Digest
You are generating a {{LEVEL}} episodic digest for ProofOfConcept (an AI).
{{PERIOD}}: {{LABEL}}
{{INSTRUCTIONS}}
Use ONLY keys from the semantic memory list below.
---
## {{INPUT_TITLE}} for {{LABEL}}
{{CONTENT}}
---
## Semantic memory nodes
{{KEYS}}

View file

@ -1,70 +0,0 @@
# Monthly Episodic Digest
You are generating a monthly episodic digest for ProofOfConcept (an AI).
Month: {{MONTH_LABEL}} (weeks covered: {{WEEKS_COVERED}})
This digest serves as the long-term temporal index — the answer to
"what happened in {{MONTH_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 {{MONTH_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: {{MONTH_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?]
```
Use ONLY keys from the semantic memory list below.
---
## Weekly digests for {{MONTH_LABEL}}
{{DIGESTS}}
---
## Semantic memory nodes
{{KEYS}}

View file

@ -1,56 +0,0 @@
# Weekly Episodic Digest
You are generating a weekly episodic digest for ProofOfConcept (an AI).
Week: {{WEEK_LABEL}} (dates covered: {{DATES_COVERED}})
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: {{WEEK_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?]
```
Use ONLY keys from the semantic memory list below.
---
## Daily digests for {{WEEK_LABEL}}
{{DIGESTS}}
---
## Semantic memory nodes
{{KEYS}}