← All craftbooks

Dataset to Narrative Report

Data and analysisevalv1.0.0released 2026-06-05workflow: build-loop

Turn a dataset into a written, evidence-backed analytical report that a non-technical reader can act on. Analyzes the data FIRST to surface the real findings (key metrics, segments, trends, surprises) with supporting numbers, then writes a narrative that leads with the takeaway and traces every claim to a figure, then builds the polished report document with sections, a summary table, and an explicit limitations note. Use this for turning raw numbers into an insights report, executive summary, data storytelling, or a findings write-up stakeholders will read.

Steps

Entry step: analyze. Each step names the specialist role it wants; the full working prompt is expandable.

  1. Analyze the datadata-analystentry

    extract the real findings with supporting numbers

    Show working prompt
    Interrogate the dataset to find what actually matters — do not write prose yet. Step 1: state the 3-5 questions the report should answer (totals, trends over time, top/bottom segments, notable correlations or anomalies). Step 2: compute the answer to each with concrete numbers (counts, means, %, deltas, top-N) and record the exact figure plus how you derived it. Step 3: identify the single most important takeaway and 2-3 supporting findings, each tied to a number. Step 4: note data caveats (sample size, missing periods, definitions). Step 5: write an acceptance-criteria checklist for the report ('leads with the headline finding', 'every claim cites a number', 'includes a summary table', 'states limitations'). Call write_task_note and write the findings + figures + checklist to notes/analyze.md. No narrative prose yet.
  2. Write the narrativecopywriter

    draft a takeaway-led narrative grounded in the figures

    Show working prompt
    Write the report narrative using ONLY the figures from the analysis note — invent no numbers. Step 1: open with a 2-3 sentence executive summary that states the headline finding and its 'so what'. Step 2: write one short section per supporting finding; each paragraph states the insight, then the number that proves it, then the implication. Step 3: keep it scannable — short paragraphs, plain language, no jargon a manager wouldn't use. Step 4: end with a clearly labeled 'Limitations' paragraph from the caveats. Call write_task_note with the draft keyed by section so the build phase drops it straight in.
  3. Build the reportdeveloper

    assemble the polished report.md with sections and a summary table

    Show working prompt
    Assemble the final report as report.md. Step 1: add a title, a date, and an Executive Summary section from the approved narrative. Step 2: add one ## section per finding with the prose and inline figures. Step 3: include a Markdown summary table of the key metrics (metric, value, change). Step 4: add a Methodology / Data notes section and a Limitations section. Step 5: ensure every numeric claim in the prose matches the analysis note. On a loop-back, fix only the named gaps. Call write_task_note with the report path and section list.
  4. Evaluatereviewer

    Grade the deliverable against every acceptance criterion. All pass → finish; any fail → loop back and fix the gap.

    Show working prompt
    Read report.md as a stakeholder would. Verify: it opens with a takeaway-led executive summary; every numeric claim matches a figure in the analysis note (re-check at least three); it contains a summary table of key metrics; section headers organize it; and a Limitations section is present and honest. Confirm no fabricated numbers and no claim without a supporting figure. Write PASS/FAIL per acceptance criterion; any FAIL loops back to build.
    
    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.
  5. 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.

Source

View this craftbook on GitHub · MIT license