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

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}}