draft

Open source · Go · Apache-2.0 or MIT

Research papers in.
Publication-ready Markdown out.

Every sentence grounded in a fact it can prove. A claim survives only if its quote appears verbatim in your source and every number in it appears in that quote. The writer arranges facts — it never sources them.

go install github.com/sebastienrousseau/draft/cmd/draft@latest

Local for the bulk, cloud for the part that matters

Claim extraction is a dozen cheap, mechanical calls per paper. Writing is the one call that decides the article’s quality. They do not need the same backend:

DRAFT_EXTRACT_ENGINE=ollama   # a dozen calls, local, free, works on a plane
DRAFT_WRITE_ENGINE=claude     # one call, the best writer you have

draft paper.pdf

Each stage keeps its own fallback chain, so extraction dropping to Ollama does not drag writing down with it.

Look before you leap

A full run is dominated by model latency. --dry-run tells you what it would cost first, in about a tenth of a second and without calling a model:

draft --dry-run 2603.23420.pdf

Plan
  Sources          1  (2603.23420.pdf)
  Sections         12
  Engines          extract: ollama · write: claude · edit: claude
  Model calls      ~13  (12 extract + 1 write, plus up to 2 retries)
  Output           ~/Drop/Drafts/2026-07-30/

And if a run fails after extraction, --resume re-verifies the ledger it already produced and skips straight to writing — seconds instead of minutes.

Grounded by construction

A small local model will invent a plausible number. A cloud API will charge you for the privilege and want a network. draft takes neither risk.

Before a word is written, your sources are mined for claims. A claim survives only if its quote appears verbatim in the source, and every number in it appears inside that quote. That verified ledger is the only factual substrate the writer is given. It arranges facts. It does not source them.

Read how grounding works for the whole gate, check by check.

No API key. No model download. No network required.

Online, draft writes through whichever AI coding-agent CLI you already have — Claude, Codex, Copilot, Cursor, Grok and more — using that tool's own logged-in session. No token is read, stored or logged. Offline, it falls back to a local Ollama model and stays there.

There is no up-front network probe, because a flaky connectivity check must never be what downgrades an online machine to the local model. If a call fails, the chain advances and stays there for the rest of the run.

Three files that stay in step

Finished work lands in ~/Drop/Drafts/YYYY-MM-DD/ as an article body, its frontmatter, and the combined document. Edit the body and regenerate the other two in place: the filename is the article's identity, your curated fields always win, and reprocessing unchanged input rewrites every file byte for byte identically. See the command reference.

Fast where it counts

Measured on Apple silicon, a 62-page book chapter is read and sectioned in about 110 ms by a 10 MB binary — roughly 580 pages per second. Everything after that is model latency, which is exactly the point: the deterministic path is never what makes a run slow.

What it will not do

Honesty here saves you an evening.

  • It is not a general-purpose summariser. A thin source yields a thin ledger and a short draft. That is the design, not a defect.
  • It does not OCR. A PDF with no text layer is reported as such.
  • It does not extract tables, figures or LaTeX maths.
  • There is no direct API mode: you need an agent CLI or Ollama.

Open source

Dual-licensed Apache-2.0 or MIT. Signed releases with a CycloneDX SBOM per archive, an OpenSSF Scorecard, and a test suite gated at 95% statement coverage with fuzzed parsers on every untrusted input.