H–01 · Harness · since 2026·02

agent-harness
kindle-pipeline

An orchestrator that takes a source PDF and walks it through eight single-purpose tools, ending in a Kindle Scribe–ready PDF with annotation margins and a matching Obsidian export.

dev composes · 8 tools last run · 2d ago book #1 of 2
Fig. 01 — Scribe, marked up shot 2026·04·11

What it does

Subprocess-calls each agent-tool-* CLI in sequence per book listed in books.json. Source PDF → Marker OCR → figure scan → strip pipeline (back-matter, marker-artifacts, clean-markdown) → LLM proofread → book-builder PDF + Obsidian export.

The pipeline is boring on purpose. Each tool is a CLI that can run by hand. The harness just lines them up, threads outputs into inputs, and writes a manifest so I can rerun any single stage without redoing the rest.

Pipeline

ocr
─→
figure-scan
─→
strip
─→
proofread
─→
build

Artifacts shipped

Every run drops three artifacts into ./runs/<timestamp>/. Source goes in; reading and writing surfaces come out.

source.pdfin
scribe.pdfout
vault/*.mdout

A run, end to end

Drop a PDF and a books.json entry. The harness writes everything into a timestamped run folder — intermediates, logs, the final PDF + markdown.

~/kindle-pipeline
$ kindle-pipeline run books.json
marker-ocr · 412 pages ok
figure-scanner · 38 figures, 2 missing !
strip pipeline (3 stages)... ok
llm-proofreader · 14 fixes proposed, 12 accepted
book-builder · scribe.pdf + obsidian.md
$ done · 6m 12s · $0.84

Why it's split this way

Every stage that could be deterministic is a non-LLM CLI. Marker handles OCR; strip-marker-artifacts, strip-back-matter, and clean-markdown handle the predictable cleanup. The LLM only sees text that's already been combed.

The proofreader runs with a verifier subagent: every proposed fix is reviewed before it's applied, and a persistent memory of known false positives accumulates between runs. It's the slowest, most expensive stage by design — it earns it.

Books in flight

Book · 01 The Mythical Man-Month 412 pages·shipped
Book · 02 A Pattern Language 1166 pages·proofread stage

Composes

  • agent-tool-scrape-sources — optional ingest from the web
  • agent-tool-figure-scanner — pre-flight figure/table audit
  • agent-tool-marker-cleanup — three-stage strip pipeline
  • agent-tool-llm-proofreader — verified fix proposals
  • agent-tool-prose-quality — readability signals
  • agent-tool-book-builder — final typeset PDF + Obsidian export
  • agent-tool-pdf-builder — library, used by book-builder
"The harness comes first. The model comes last."

What's next

Second book through the pipeline. A pass on the figure scanner so missing references get reported in the final manifest instead of as warnings. And — eventually — a way to run a folder of books overnight, unattended.