How the article writing framework works
The problem: LLM article generation degrades into entropy when every step can touch every concern — five different steps “improving” tone produce a sixth voice nobody chose. The framework’s answer is a charter: one concern, one owner — and everything else is plumbing between owners.
Layer 1 — the charter
Section titled “Layer 1 — the charter”The pipeline is ~18 steps, but five of them own the article:
Everything before PLAN is preparation (fetch, summarize, ontology alignment, author selection); everything between owners is mechanical (images, references, layout). No step outside WRITE may generate prose; no step outside GATE may pass a verdict. The practical payoff: when tone regresses, exactly one step is suspect.
Layer 2 — grounded drafting
Section titled “Layer 2 — grounded drafting”Drafting retrieves from the contract’s research corpus at three points (planning, writing, gating), and the references section is built cited-first: only sources the text actually used, not a wall of retrieved-but-ignored links. A cross-encoder reranker re-orders retrieved facts before they reach the prompt — a measured quality lever that fails open (a reranker outage degrades ranking, never blocks generation).
The author is selected from the contract’s roster by weighted random draw, and the author’s bio feeds the VOICE owner as raw material — voice is a per-author property, not a global constant.
Layer 3 — schema-controlled LLM output
Section titled “Layer 3 — schema-controlled LLM output”Structured steps demand structured output — literally. LLM calls that must return JSON use provider-enforced JSON-schema decoding (the grammar constrains generation), after live probes showed that two plausible-looking alternatives were silent no-ops on the provider. The old “repair truncated JSON” patch was deleted; a parse failure now takes a measured fallback path instead of a silent one, and a guard test pins the provider facts so a regression cannot sneak back.
Section generation runs concurrently under a semaphore — sections are independent by construction once the PLAN owner has fixed the structure and fact contract, so parallelism costs nothing in coherence.
Layer 4 — one gate, growing teeth
Section titled “Layer 4 — one gate, growing teeth”The GATE step is the pipeline’s single verdict point: mechanical sanitize, the scoring battery, brand-safety signals, grounding checks — accumulated over successive spec generations into one place. It is the largest step in the pipeline by far, and that is the design: gates are supposed to accrete here, rather than scatter.
The trade-offs, honestly
Section titled “The trade-offs, honestly”The charter’s numeric goals are not all met — the gate step has grown well past the size target as new checks landed, and one planned step consolidation hasn’t happened. Section parallelism shipped alongside a version promotion without its own dedicated A/B protocol (the design doc still lists that as open). Both are visible, tracked deviations — the charter is a direction the pipeline is held against, not a myth of perfection.
See it in two minutes
Section titled “See it in two minutes”Any article’s run record lists every step with its timing and outcome; the Version lifecycle page explains why each change to this framework is a new immutable carve.
Specs: SPEC-066 (charter), SPEC-115 (cited-first references), SPEC-119 (schema-controlled output + provider probes), SPEC-094 (section parallelism), SPEC-069 (frozen inputs).