Why it matters
Explicit states beat boolean soup for multi-turn flows.
Practical steps
- Draw the boundary for arch state machines: what belongs in the bot process vs a worker.
- Implement explicit states beat boolean soup for multi-turn flows behind a narrow interface so platforms can share it.
- Make arch state machines idempotent at the message/update id layer.
- Add contract tests between the adapter and the core for arch state machines.
- Document failure modes and ownership of arch state machines for on-call.
Watch out for
- Copy-pasting outdated snippets for arch state machines without re-reading current official docs.
- Shipping arch state machines to production without a staging rehearsal and a documented rollback.