- Version
0.1.0 - Purity pure zero-dep (browser-safe; no workspace or external deps, no
node:*, no I/O) - Purpose Declare the seven task statuses and the legal-transition table once, so the durable board, the orchestration engine, and the browser board UI all read the same rulebook instead of hand-maintained copies that can silently drift.
- Workspace deps none
- External deps none
@clawboo/dbre-exports the module and enforcescanTransitioninside the write transaction, against the freshly-read row.@clawboo/team-orchestrationtypes itsBoardClientsurface withTaskStatus.- The board UI (
apps/web/src/features/board) derives its columns and its manual status editor fromTASK_STATUSES+legalTargets, so it only ever offers moves the server will accept.
The module is import-free, and that is load-bearing rather than incidental: it is what lets the same file ship into the Vite SPA without dragging the sqlite/server graph along. Two tests pin it — a source guard in this package asserts
state-machine.ts declares no import at all, and apps/web/src/__tests__/browserBundlePurity.test.ts asserts the built artifact declares zero bare specifiers in either module format.updateStatus is the real gate, and an illegal transition surfaces as a 409.
Public API
Functions
Types & constants
The transition table
done and cancelled are terminal. in_progress → todo is the “release” path orphan reconciliation uses.
Source
packages/board-core/src/state-machine.ts — the whole package, plus a barrel. See Board internals for how the repository enforces it and The board for the concepts.