Section 03 ยท Automation
๐Ÿšœ Tractor ยท Automation

The heavy work, done for you.

Every alert, node and change drafts its own wiki page behind a pull request โ€” AI drafts, humans merge.

6
Pipeline stages
11
Source adapters
PR-gated
Nothing auto-publishes
5
LLM providers
The auto-docs flow

The auto-docs flow

An event in one of the source systems becomes a drafted, cited wiki page โ€” normalized, routed, written by an LLM, and opened as a pull request for a human owner to review.

Pipeline

event โ†’ normalizer (Service Bus docs.changes) โ†’ n8n router โ†’ AI drafter (+front-matter +citation) โ†’ pull request โ†’ owner review โ†’ publish

  • PR-gated โ€” nothing publishes on its own; git revert rolls any generated page back.
  • Restricted / confidential content is link-only, never mirrored into the wiki.
  • Every generated page carries a source citation and lives only under /_generated โ€” a CI hand-edit guard keeps humans out of that tree.
  • Alert โ†’ runbook naming is preserved end to end, so the page you expect is the page you get.
Drive it live โ€” the flow API

Drive it live โ€” the flow API

The whole pipeline is exposed as a dependency-free HTTP API. It runs offline against a mock provider by default, so you can drive it end to end on your laptop before pointing it at a live model.

Run it

# from automation/ โ€” no new deps, offline by default make serve # console โ†’ /wiki/setup/end-to-end// # POST an event, get a drafted page back: curl -s localhost:8099/example | curl -s -X POST localhost:8099/draft -d @- # go live against Claude instead of the mock: LLM_PROVIDER=anthropic make serve

Endpoints: GET /health ยท GET /example ยท POST /draft ยท POST /pipeline

The ServiceNow fix

The ServiceNow fix

Change automation now branches on the state model, not on free text โ€” so it fires exactly once, on the right transition, keyed on a value that never changes.

The rule

if approval == "approved" and state == -1 (Implement): -> draft/update /30-runbooks/change/<number>.md # keyed on immutable sys_id

The old check parsed the typed status string ("Implementing", and its typos) and keyed on the record name, so it missed changes when the wording drifted and made duplicate pages when a record was renamed. Branching on the numeric state and keying on the immutable sys_id removes both failure modes.

๐Ÿ”ง
ServiceNow change automation
The integration doc โ€” state model, mapping and the runbook target.
70-integrations/servicenow-change-automation.md
The moving parts

The moving parts

Three layers do the work: adapters turn source systems into normalized events, the core routes and drafts them into a PR, and a pluggable LLM layer writes the prose.

Adapters
Core
LLM providers
Docs & where to go next

Docs & where to go next

Read the design behind the pipeline, walk the full setup, or step across into the neighbouring sections.