PB-003 — Run Dispatch Tick · pb-003-run-dispatch
Owner directive (2026-07-10), canonical. "Create a Dispatch, Wake you up every 10 minutes, check if all capability is allocated, check the conclusion of particles and atoms and if the run is moving." [src: wiki/development/prompts-archive/by-topic/knowledge-management-and-concept-modeling.md:646]
Content
The executable form of sop-003-run-dispatch: one tick of the dispatch loop, run every intervalSeconds: 600 against the run's dispatch.json (contract: schema-dispatch-json, modelled on the proven RUN-015 autoloop state [src: runs/RUN-015-autoloop.json:8]). The dispatcher is the neural-engine runtime coordinating squads; each tick is itself a loop and closes with a commit. Rails come with the state file — e.g. RUN-015's rails: "additive build-forward … NEVER enter secrets; CF challenge-resilient" [src: runs/RUN-015-autoloop.json:51] — and the challenge-parking policy: "On CF challenge: park in cf_queue + PushNotify + CONTINUE all other streams." [src: runs/RUN-015-autoloop.json:14].
| step | action | cookbooks | gear-set | verify gate |
|---|---|---|---|---|
| 1 | Wake — read dispatch.json, increment tick, append a heartbeat {tick, at, state} | — | gear.ops | file parses against schema-dispatch-json; tick strictly increases; heartbeat appended |
| 2 | Capability check — every queued playbook in playbooks has an allocated squad with its gear-sets entry resolvable ("check if all capability is allocated") | — | gear.ops | zero queued playbooks without a squad in state active or ready |
| 3 | Particle/atom audit — compare each playbook's step cursor against the last tick ("check the conclusion of particles and atoms") | — | gear.ops | each cursor advanced OR a named blocker is recorded on the squad state |
| 4 | Run-motion check — "if the run is moving": at least one commit landed since the previous tick (every loop has a commit [src: wiki/development/prompts-archive/by-topic/knowledge-management-and-concept-modeling.md:586]) | — | gear.ops | ≥1 commit since last heartbeat, else escalate to step 8 |
| 5 | Rules check — evaluate work against the run rails; accept or refuse ("checking if the rules are being followed and refusing/accepts" [src: wiki/development/prompts-archive/by-topic/knowledge-management-and-concept-modeling.md:620]) | — | gear.ops | no rail violated; refused particles re-queued with reason |
| 6 | Spark — completed particles spark successor loops; queue them on the right playbook ("producing sparks to initiate other Loops" [src: wiki/development/prompts-archive/by-topic/knowledge-management-and-concept-modeling.md:534]) | — | gear.ops | every completed particle either sparks a successor or is marked terminal |
| 7 | Write-back — update playbooks cursors, squads states, done/inflight/pending lists; commit dispatch.json | — | gear.ops | JSON validates against schema-dispatch-json; commit pushed |
| 8 | Escalate — owner-gated items are SURFACED, never entered (credentials, DNS, certificates — pattern per RUN-015 owner_gated [src: runs/RUN-015-autoloop.json:93]); notify and CONTINUE all other streams | — | gear.ops | owner_gated list current; no secret was entered; unblocked streams kept moving |
Self-extension is a run-level option, not a default: RUN-015 ran "self_extending": "At deadline cycle++ +5h, never finalize, until owner stops" [src: runs/RUN-015-autoloop.json:12]; a run that adopts it must declare it in dispatch.json.
Composition
- uses: schema-dispatch-json (state contract) · sop-003-run-dispatch (procedure) · gear-sets · bpmn-neural-engine-run (process diagram)
- used-by: pb-001-spatial-site-loop, pb-002-library-authoring (playbooks it drives) · sc-002-neural-engine-run (run swimlane) · squad-eggtech, squad-schematic, squad-instance
See also
- neural-engine — the runtime that executes the tick
- cognitive-loop — the rule each dispatched loop must clear