← All craftbooks

Ebook Compile

Documents and decksevalv1.0.0released 2026-06-05workflow: build-loop

Compile a collection of notes, articles, or chapter drafts into a coherent, readable ebook — with a title page, table of contents, consistently formatted chapters, and front/back matter — output as a single navigable HTML book. Outlines the chapter structure and through-line FIRST (so disparate notes become a real book, not a pile), writes/edits each chapter to a consistent voice and adds connective tissue, then builds the compiled HTML with a linked TOC and chapter navigation. Use for turning a blog backlog, course notes, or drafts into a downloadable ebook.

Steps

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

  1. Outline the bookplannerentry

    chapter order, through-line, and front/back matter

    Show working prompt
    Turn the raw material into a book structure. Step 1: survey the source notes/articles and identify the central through-line or argument that will make them cohere. Step 2: group and order the material into chapters/parts that build logically; cut or merge redundant pieces. Step 3: plan the front matter (title page, optional preface/intro, table of contents) and back matter (conclusion, about, resources). Step 4: for each chapter note its title, the source pieces it draws from, and the transition that links it to the next. Step 5: write an acceptance-criteria checklist ('has a title page + linked table of contents', 'chapters are ordered to a clear through-line', 'each chapter opens and closes cleanly with transitions', 'consistent heading levels throughout', 'front and back matter present'). Write the chapter map + checklist via write_task_note AND to notes/outline.md. No chapter prose or HTML yet.
  2. Write and edit chapterscopywriter

    edit each chapter to one voice + add connective transitions

    Show working prompt
    Write/edit the chapters so the book reads as one work. Step 1: for each chapter in order, shape the source material into clean prose with a consistent voice, tense, and terminology (disparate notes often clash — unify them). Step 2: give each chapter a clear opening that orients the reader and a close that lands the point and transitions to the next chapter. Step 3: write the preface/intro that sets up the through-line and the conclusion that ties it together. Step 4: standardize formatting decisions — heading levels, how lists/quotes/code appear — so they are uniform across chapters. Step 5: keep the reader's journey in mind: no chapter should feel like an orphaned blog post. Write the per-chapter edited text + front/back matter via write_task_note AND to notes/write.md.
  3. Build the ebookdeveloper

    compile index.html: title page, linked TOC, chapter nav

    Show working prompt
    Compile the book as a single self-contained index.html (inline CSS, no external assets). Step 1: build a title page (title, subtitle, author) as the opening screen. Step 2: build a Table of Contents with in-page anchor links to every chapter. Step 3: render each chapter in order with a stable id, consistent heading hierarchy, comfortable reading width and line-height, and the unified formatting from the edit phase. Step 4: add chapter navigation — previous/next links and a back-to-TOC link at each chapter boundary — and use page-break-before per chapter so it also prints/exports as a clean book. Step 5: include the front matter (preface) and back matter (conclusion, about/resources). Drop in the edited prose verbatim; do not re-edit the voice here. On a loop-back, fix ONLY the named gaps. Write the path + chapter count via write_task_note.
  4. Evaluatereviewer

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

    Show working prompt
    QA the ebook against the locked criteria. Step 1: open/render index.html and click through the TOC links and chapter navigation. Step 2: check EACH acceptance criterion: title page present, a linked table of contents whose links all resolve to the right chapters, chapters ordered to the through-line, each chapter opens/closes with transitions, heading levels and formatting are consistent across chapters, and front + back matter are present. Step 3: read two non-adjacent chapters and confirm the voice is unified (not obviously stitched from clashing sources). Step 4: confirm chapter page-breaks work for print/export. Write PASS/FAIL per criterion with the offending chapter on any FAIL.
    
    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