Skip to content

Workflows and watchdogs ​

Documented against OpenRig 0.5.14. Help text uses "node" where these pages say seat, for a seat's position in the running rig.

What it is for ​

A workflow turns an intended sequence of work into durable state. You write a spec as a plain file, start an instance of it, and the daemon tracks where that instance is: which step is active and who owns it. When a step's owner closes it, the runtime records the closure and projects the next step's queue row in one transaction, so nobody has to carry the work between seats by hand. The owner decides when a step is done; the runtime is the scribe, not the gate.

A watchdog is the alarm you set for yourself, because a seat cannot wake itself. Jobs are persisted in the database and survive daemon restarts. A job can fire a periodic reminder, wait for a pool of artifacts, keep a workflow moving, gate on an idle queue, or watch a seat's context usage and act before the wall.

The three commands you will use first ​

Start an instance from a spec.--rig binds it to a rig so roles resolve to seats there.

bash
rig workflow instantiate workflows/conveyor.workflow.md --root-objective "Ship the search page" --rig my-rig

Close your step and let the next one appear. One daemon transaction: close the current packet, project the next.

bash
rig workflow project --instance <id> --current-packet <qitem-id> --exit handoff --result-note "candidate ready"

Ask what needs you.status answers "what needs me" with counts and one row per failed, stuck or waiting instance, plus the next action; list answers "what exists".

bash
rig workflow status
rig workflow list

Arming a wake ​

rig watchdog register takes a policy: periodic-reminder, artifact-pool-ready, edge-artifact-required, workflow-keepalive, idle-gate-qitem, or context-usage-threshold. A parked queue row can attach a live watchdog id as its wake. list, show and status tell you whether a job fired and whether it is still live; quiet skips are not recorded, so an idle job and a job that never ran can look alike until you read show.

bash
rig watchdog register --policy context-usage-threshold --target-session dev-impl@my-rig
rig watchdog list
rig watchdog status <jobId>

The workflow and watchdog families ​

CommandWhat it does (from help)Help source
rig watchdogCoordination Watchdog , daemon-native scheduler for reminders, artifact gates, workflow health, idle gates, and context usagewatchdog.txt
rig watchdog listList watchdog jobs (default: active + compact + at most 100)watchdog.list.txt
rig watchdog registerRegister a watchdog; queue block --wake-watchdog attaches its job id. Context transcripts measured 113K–153K tokens/MB. The margin is the protection because prompt-bound consumers act only at turn boundarieswatchdog.register.txt
rig watchdog showShow one watchdog jobwatchdog.show.txt
rig watchdog statusShow one watchdog job + recent evaluation historywatchdog.status.txt
rig watchdog stopStop a watchdog job (operator-stopped; scheduler skips it)watchdog.stop.txt
rig workflowDaemon-native Workflow Runtime , declarative spec + transactional-scribe step projection (PL-004 Phase D)workflow.txt
rig workflow abortTransactionally cancel every live packet and abort the whole workflow instanceworkflow.abort.txt
rig workflow compileCompile project.yaml → mission.yaml → slice.yaml into an inspectable lifecycle graph (read-only)workflow.compile.txt
rig workflow continueInspect an instance's current frontier + step trail (read-only; advancing happens via 'rig workflow project')workflow.continue.txt
rig workflow guidanceRead current selected SDLC teaching, original intent and authored/bound provenanceworkflow.guidance.txt
rig workflow instantiateCreate a workflow instance + entry-step qitem from a specworkflow.instantiate.txt
rig workflow instantiate-lifecycleCompile and instantiate an eligible lifecycle; recover a lost response with workflow operation <key>workflow.instantiate-lifecycle.txt
rig workflow listList workflow instances; optionally filter by statusworkflow.list.txt
rig workflow operationRecover a lifecycle creation or revision effect by its stable key, even after a lost response or source editworkflow.operation.txt
rig workflow projectClose a current packet AND project the next-step packet (transactional-scribe; one daemon transaction)workflow.project.txt
rig workflow resumeRedrive a FAILED instance from its failed step (completed steps never re-run; one fresh max_hops window)workflow.resume.txt
rig workflow reviseCompare authored and running lifecycle graphs; deliberately adopt compatible changes without replaying workworkflow.revise.txt
rig workflow routeRe-route the current frontier step to a new owner (same step, honest handoff closure; never advances)workflow.route.txt
rig workflow runInstantiate a workflow AND follow it live to a terminal state (exit 0 completed / 3 failed)workflow.run.txt
rig workflow showShow current work, exception-owner readiness and existing exception obligationsworkflow.show.txt
rig workflow specsList registered workflow specs; built-in starters tagged with (built-in)workflow.specs.txt
rig workflow statusWhich instances need attention: counts + one row per failed/stuck/waiting instance with reason + next action (read-only)workflow.status.txt
rig workflow traceShow one workflow instance + its append-only step trail (audit-only verdict)workflow.trace.txt
rig workflow validateValidate a workflow spec file (returns structured ok/error report)workflow.validate.txt
rig workflow watchAttach to an in-flight instance and follow it live (read-only; exit mirrors the outcome)workflow.watch.txt

What it does not do ​

  • rig workflow continue is read-only despite its name; project is the verb that advances.
  • The runtime does not judge whether a step was done well. Closure authority stays with the queue's closure rules; acceptance stays with the next stage.
  • compile and revise are for lifecycle graphs authored in project, mission and slice files; they inspect and adopt changes without replaying completed work. Editing the source file alone does not change a running instance.
  • A watchdog with a stale message is worse than none. When the thread it refers to closes, stop it or rewrite it.

Where it goes next ​

  • Coordination: the queue rows a workflow projects and the closure reasons it records.
  • The work tree: the project, mission and slice files a lifecycle graph is compiled from.

Read as Markdown

Self-contained SOP. No outbound links. OpenRig 0.5.14.