# The Chain Template (Chapter 9)

**Use when:** you regenerate the same report by hand more than twice.

Name the chain in three lines before anything else: where the data comes from, what changes get computed, what the artifact looks like. The chain is the whole factory; the rest of the template is the discipline around it.

```
Pull: [WHERE THE DATA COMES FROM. One folder, named, and the only input.]
Analyze: [WHAT CHANGES GET COMPUTED. The delta logic, in plain words.]
Artifact: [THE OUTPUT. Format, home, who reads it.]
```

## The factory record

```
Input folder: [PATH]
Delta logic: [WHAT CHANGES SINCE LAST RUN GET COMPUTED, EXPLAINED SO YOU
COULD REPEAT IT WITHOUT NOTES]
Artifact: [FORMAT AND LOCATION]
Style file: [ATTACHED, IF YOU HAVE ONE]
Review gate: [DRAFTS ONLY. HUMAN REVIEW IS THE SHIPPING GATE, EVERY
CYCLE, INCLUDING THE ONE YOU HAVE RUN FOR A YEAR.]
Run mode: [ON DEMAND UNTIL TWO DRAFTS PASS YOUR REVIEW, THEN SCHEDULED]
Failure alert: [WHERE A BROKEN RUN ALERTS YOU]
Last-run timestamp: [ONE FIELD YOU ACTUALLY LOOK AT]
```

## What done looks like

- Three consecutive cycles with zero hand-rebuilds.
- A last-run timestamp you actually look at.
- You can explain the chain to a skeptic without notes.
- A colleague could review your draft and reach the same call.

## The drift warning

Everything the factory produces arrives as a draft. Not sometimes. Not for the important ones. The factory's job is to make review cheap, not to make review unnecessary. Five minutes of your attention is the price of the report. The day you stop paying it is the day the report stops being yours. The factory drafts. You ship. The monthly drift audit (checklists/drift-audit-checklist.md) keeps the chain honest.