What problem does it solve?
Many business domains require strict lifecycle control for record statuses; unchecked or arbitrary status updates lead to data corruption, broken reports, and lost auditability. This Skill enforces explicit transition maps and server-side validation so handlers cannot perform invalid state jumps or trigger side effects before validation.
Core Features & Use Cases
- Explicit transition maps: Keep allowed edges next to handlers so reviewers see permitted flows at a glance.
- Server-side validation and error semantics: Reject invalid transitions with clear 422 responses and preserve the prior state.
- Audit trail integration: Record old and new status and the actor for every accepted mutation to support accountability and debugging.
- Use Cases: Invoices, purchase orders, payments, and shipments where transitions like draft → paid must be guarded and terminal states enforced.
Quick Start
Use the status-machines skill to validate and apply a status change for an invoice, rejecting invalid transitions and writing an audit entry.