Files
suaveplan/openspec/archive/2026-04-19-enterprise-fsm/tasks.md
2026-05-27 23:29:53 +01:00

1.2 KiB

Tasks: enterprise-fsm

1. Scaffold

  • 1.1 universal/control-flow/fsm/; 100/100/100/100; guard tests; CLAUDE/README/FOLDERS.

2. Errors + schemas

  • 2.1 src/fsm-utils.ts — createFsmError, validation helpers.
  • 2.2 Zod schemas for MachineConfig, StateConfig, TransitionDefinition.

3. Core FSM

  • 3.1 src/fsm.types.ts — full type surface.
  • 3.2 src/fsm.ts — createMachine, StateMachine with listener API, sync/async guards + actions, snapshot/restore.
  • 3.3 src/fsm-hooks.ts — hook map + handler signatures.
  • 3.4 OTel histogram + counter.

4. Hierarchical

  • 4.1 src/hierarchy/hierarchical-fsm.ts.

5. Parallel regions

  • 5.1 src/parallel/parallel-fsm.ts with sync points.

6. History states

  • 6.1 src/history/history-state.ts — shallow + deep history.

7. Deferred events

  • 7.1 src/deferred/deferred-queue.ts — bounded queue with drop-oldest/drop-newest policy.

8. Visualisation

  • 8.1 src/visualization/fsm-visualizer.ts — DOT + Mermaid.

9. Docs / barrel / subpath exports / README

10. Benchmarks

  • 10.1 transition.bench.ts at 10 / 100 / 1 000 state configurations.

11. Ship gate

  • 11.1 Verification sequence; fold + archive.