Let’s talk

Curriculum workbook pipeline

A Claude Code pipeline that turns the Turkish national curriculum into print-ready English exercise books for an international school in İzmir.

Category
Education, content pipeline
Status
In production
Period
May to Sep 2026
Role
Design, build, operate
Stack
Node.jsAnthropic SDKClaude Sonnet & OpusPuppeteerExpressmathjssharpPyMuPDFAnthropic Batch APIGit
Two facing pages from a Year 5 Mathematics exercise book, a unit introduction beside a lesson page on the tools of geometry, rendered from the pipeline.

Context

An international school in İzmir teaches the Turkish national curriculum (MEB) in English, and could not buy the exercise books it needed, because nobody prints MEB-aligned workbooks in English. Each book has to cover the official learning outcomes for its subject and year, read naturally for children learning in a second language, and be correct the first time. There is no second edition for a printed book.

What I built

A pipeline that starts from the official MEB programme PDFs and ends with a bound, print-ready A4 volume. Claude parses and translates the outcomes, including the process notes that quietly define what must not be taught at that year, so a unit that teaches an out-of-scope concept is blocked even when the maths is right. Sonnet drafts each unit as structured JSON; code then enforces the rules the model forgets, such as overwriting outcome codes from the cache because MEB does not number them the way a model expects.

The book itself is rendered by headless Chrome against a frozen design specification: fixed page geometry at 144 pixels per inch, 7 mm writing lines, fifteen implemented question types, and a hard rule that an unimplemented type is a change request, never a silent blank box. Every report is bound by SHA-256 to the exact bytes it describes. Re-render the PDF or edit the JSON and the sign-off is invalidated automatically.

Workbook pipelineOfficial MEB PDFs are parsed into an outcomes cache, a unit is drafted and corrected, then passes static checks, a Puppeteer render against a frozen template, an Opus content gate keyed on defect category, render fidelity checks, and hash binding before human and teacher sign-off.pdf + jsonany hash mismatch blocksMEB programme PDFTurkish, officialOutcome parserClaude · scope notes keptOutcomes cacheJSON per subject & yearUnit generatorSonnet draft + code fixesUnit JSONcontent schemaStatic checksschema · arithmetic · scopeRender harnessPuppeteer → PDF + manifestFrozen template v1sha256 of every file fetchedContent verifierOpus · category-keyed gateRender checkstext fidelity · vision passHash bindingunit sha + render shaHuman reviewbundle out, sha echoed backTeacher sign-offhandover packPrint-ready PDFFinal/
Free deterministic checks run first. Paid model review runs once, and its verdict is bound to the file hash.
  • Data store
  • Model or agent
  • Check or gate
  • Person
  • External service

The print gate keys on the category of a defect rather than its severity, because severity drifted between runs while a real answer-key contradiction sat behind a green light for seven weeks. Scope violations, factual errors and answer contradictions block at any severity.

Outcome

Thirty-two units generated across Mathematics, Science and Social Studies for Years 2 to 8, twenty-six rendered to PDF at 25 to 61 pages each, two bound Year 5 volumes, and four books issued to teachers. A unit costs roughly a dollar in model calls, most of it verification. The school has since asked for a costed twelve-course programme.

What I’d do differently

Put the repository under version control on day one instead of ten weeks in, which is how three Year 6 units were lost. Scope units from the books the school actually issues, not the programme document, because a teacher’s book opened with geometry and mine did not. And build the render-fidelity check before shipping anything, not after. The first four books reached classrooms correct, sparse and unillustrated because the brief only asked whether the arithmetic was right.

Screens