← ClaudeAtlas

workmachinelisted

Run work as an explicit event-driven state machine executed by subagents. The orchestrator is the runtime from the canonical loop — `state, effects = init(machine); execute(effects); while state is active: event = nextEvent(); state, effects = transition(machine, state, event); execute(effects); return state.output`. All routing judgment is authored ONCE, at plan time, into a machine file (states, event alphabet, transition table, budgets, final states); at runtime the orchestrator does pure table lookups and dispatches effects — it never decides, never authors, never ingests artifacts. Subagent/sync protocol is the timeboxed-iterating one: role prompts scaffolded once to disk and dispatched BY PATH, an initialiser preamble every subagent reads first, a self-populating cheatsheet, per-unit files, tiny structured returns, independent measurement gate. Use when the user says "workmachine", "run this as a state machine", "state-machine this", or when a goal has a small number of clearly named phases with explici
av/skills · ★ 13 · AI & Automation · score 80
Install: claude install-skill av/skills
# Workmachine — An Explicit State Machine, Executed by Subagents ``` state, effects = init(machine) execute(effects) while state is active: event = nextEvent() state, effects = transition(machine, state, event) execute(effects) return state.output ``` That is the whole orchestrator. Everything else in this skill exists to make each of those five names concrete: | Runtime name | What it is in a workmachine run | |---|---| | `machine` | `machine.md` — states, event alphabet, transition table, budgets, final states. Authored once in Phase 1. Never edited at runtime except through the ESCALATE protocol. | | `state` | one line in `state.md` — the current state name plus its visit count; and the `output` slot once a final state is reached. | | `init` | run the scaffold, author the machine, enter the initial state, and evaluate that state's **entry effects**. | | `effects` | a list of side-effects a state emits on entry: subagent dispatches (by role-prompt path), `state.md`/`events.md` writes, git spot-checks. Effects **never decide anything**. | | `execute` | dispatch the effect's subagents **in parallel**, read their TINY statuses, spot-check commits. | | `nextEvent()` | pop ONE event token from the queue in `state.md`. Tokens come only from the alphabet; they are produced by collapsing tiny statuses with the machine's **event rules**, or by the clock / the user. | | `transition` | a **pure table lookup**: `(state, event) → (next state, effects)`. Table miss → `ESCALATE