
Daily Email Digest from a Corpus
Produce an email-ready digest that summarizes a corpus of content (docs, feeds, notes) for a recurring send. Scopes what matters and the format first, drafts the digest in a consistent voice, then builds the email-ready output and evaluates for accuracy and scannability.
Steps
Entry step: scope. Each step names the specialist role it wants; the full working prompt is expandable.
- Scope the digestplannerentry
what to include, sections, format, length
Show working prompt
List and read every supplied corpus file with workspace tools before scoping. Decide the digest window, included sources, section structure (headline, top items, one line each), target length, tone, citation format, and subject-line convention. Write an **acceptance-criteria checklist** ("≤ N items per section", "every item cites its source", "scannable in under a minute", "no item outside the window", "no invented facts"). Save the scope + checklist to artifact `{{workPath}}/scope.md` with `write_artifact`; note the path in task notes. - Draft the digestcopywriter
write the digest from the corpus, with citations
Show working prompt
Read artifact `{{workPath}}/scope.md` with `read_artifact`, then re-read every included corpus source with workspace `read_file`. Write the digest to the scoped structure: a subject line, one tight line per item, and an adjacent source filename/citation for every item. Lead with what matters, keep a consistent voice, and do not invent or merge unsupported facts. Save the complete draft to artifact `{{workPath}}/draft.md` with `write_artifact`; note the path in task notes. - Build the email outputdeveloper
render to an email-ready format
Show working prompt
Read artifacts `{{workPath}}/scope.md` and `{{workPath}}/draft.md` with `read_artifact`. Render the approved draft to workspace `digest.html` with `write_file`. Include the subject line in visible/preheader content, preserve every adjacent source citation, use semantic email-safe tables or blocks, and keep styles inline or in a small embedded style block with no external CSS, scripts, or network assets. On a loop-back, fix only the named gaps. `write_task_note` the workspace output path and item/source counts. - Evaluatereviewer
Grade the deliverable against every acceptance criterion. All pass → finish; any fail → loop back and fix the gap.
Show working prompt
Read workspace `digest.html` with `read_file`, artifacts `{{workPath}}/scope.md` and `{{workPath}}/draft.md` with `read_artifact`, and the original corpus files with workspace tools. Check accuracy (every item traces to a corpus fact, nothing invented), citations (each item names its source), scannability, section/item limits, and freshness window. Confirm the HTML preserves the approved draft and has no external dependencies. Write PASS/FAIL per criterion. Then route — this is the whole point of the loop: - **Every criterion PASSES →** call `advance_task_step({ ref, stepId: "evaluate", next: "finish" })`. - **Any criterion FAILS →** write the specific gaps to notes, then call `advance_task_step({ ref, stepId: "evaluate", next: "build" })` to loop back. The builder fixes exactly those gaps. Never route to `finish` while any criterion is unmet. The build phase's completion gate already blocked a grossly-incomplete deliverable; your job is the judgment an automated check cannot make (does it actually work, read well, look right). After ~3 unproductive loops, stop and report DONE_WITH_CONCERNS so the user can step in. - Finishdeveloper
All acceptance criteria met. Stamp a short summary and report DONE.
Show working prompt
Every acceptance criterion passed. Write a one-paragraph DONE summary to task notes via `write_task_note`: what was built, the deliverable path(s), and a one-line confirmation that each criterion is met. Then report DONE.
Triggers
Phrases that suggest this craftbook to a crew.
- daily summary
- email digest
- summarize this corpus
- briefing
Source
View this craftbook on GitHub · MIT license