> A monitor, an analysis bot, a fact-check bot and a copy-edit bot, then an editor publishes: Distinctive Mark's ruling pipeline, with its procedures linked.

Canonical: https://p.apyr.us/cookbook/decisions-tracker/

::band{id="top" size="hero" eyebrow="Cookbook · Recipe"}
# A decisions tracker.

A monitor finds each new ruling. A chain of bots analyses it, fact-checks it against the opinion and copy-edits it. An editor publishes. [Distinctive Mark](https://distinctive-mark.com) is the open example: a demonstration site about trademark law, with its code and procedures at [github.com/AnthusAI/Distinctive-web](https://github.com/AnthusAI/Distinctive-web).

::band{id="monitor" tone="muted" eyebrow="Step 1 · The monitor" columns="top"}
## Every new decision, once.

A monitor collects TTAB final decisions every day. An automation record binds it to the analysis procedure, with limits and a cost. Matching uses aliases, so a decision is never delivered twice.

```
papyrus automations create --id distinctive.ttab \
  --title "Analyze new TTAB rulings" --monitor ttab \
  --publication distinctive \
  --procedure distinctive.ttab.ruling-analysis
```

::column{panel="card"}
`papyrus automations show --id distinctive.ttab` and `papyrus automations runs --id distinctive.ttab` list the limits, the cost and every run, with the tools each used. See [Automations](/automations.html).

::band{id="bots" eyebrow="Step 2 · Stage Bots" columns="top"}
## A bot at each stage, and an editor at the end.

The analysis creates the story at the reporting stage. Entering reporting fires the fact-checker; entering copywriting fires the copy-editor; typesetting has no bot, and an editor publishes. Each bot saves a version and returns it. The engine moves the story on.

```
papyrus automations create --id distinctive.ruling.fact-check \
  --on-stage reporting --next-stage copywriting \
  --procedure distinctive.ruling.fact-check --max-hops 5
papyrus automations create --id distinctive.ruling.copy-edit \
  --on-stage copywriting --next-stage typesetting \
  --procedure distinctive.ruling.copy-edit
```

::column{panel="card"}
- [ttab_ruling_analysis.tac](https://github.com/AnthusAI/Distinctive-web/blob/main/procedures/ttab_ruling_analysis.tac)
- [ruling_fact_check.tac](https://github.com/AnthusAI/Distinctive-web/blob/main/procedures/ruling_fact_check.tac)
- [ruling_copy_edit.tac](https://github.com/AnthusAI/Distinctive-web/blob/main/procedures/ruling_copy_edit.tac)

In our runs so far, about a cent and a half per ruling. See [Stage Bots](/stage-bots.html).

::band{id="checks" tone="muted" eyebrow="Step 3 · Editorial checks" columns="top"}
## The copy-editor uses the house policies.

The copy-edit bot runs the site's editorial checks with a Tactus tool, fixes what it can, and never changes a legal fact, a holding, a quotation or a citation. If a fix would, it holds the story and a flag asks a person to look.

```
papyrus_check_story_version
```

::column{panel="card"}
Editorial checks never block publishing. See [Editorial Checks](/editorial-checks.html).

::band{id="process" tone="card" eyebrow="The editorial process" columns="top"}
## How it stays honest.

1. **Bots never publish** and never move the story themselves.
2. **Bot actions are labelled** on the version, and the story's trail records each move.
3. **A bot can stop the chain** with a hold and a reason.
4. **An editor publishes,** at the last stage, where no bot waits.

See it at [Distinctive Mark](https://distinctive-mark.com).
