gocardless/statesman
A statesmanlike state machine library. observed · 2026-08-28
Health v2 · maintenance only
93/100
- Activity 96
- Release rhythm 84
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: 40
- age_days: 4745
- days_rel: 29
- days_push: 29
- n_releases_24m: 4
Adoption not part of the score
1906 stars · 158 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
Statesman is an opinionated Ruby state machine library that decouples state machine logic from models by defining machines in separate classes. It persists transitions to the database for a full audit history with JSON metadata and uses database indices to prevent duplicate transitions under race conditions.
Use cases
- model order lifecycles like pending, purchased, shipped, refunded in a Rails app
- persist a full audit trail of state transitions with metadata
- prevent duplicate state transitions across multiple app servers
- define state machines as separate classes composable with any Ruby object
- add guard conditions and callbacks around state transitions
When to choose
- you need database-level integrity and race-condition protection for state changes
- you need a persisted, queryable audit history of every transition
- you want state machine logic decoupled from your ActiveRecord models
- you're building Rails applications with complex object lifecycles
When to avoid
- you want a lightweight in-memory state machine without persistence
- you prefer state machine behavior defined directly on your models
- you're not using Ruby or Rails
Facets
library · maturity stable
developer-tools developer-tools backend web-development ruby jvm state-machine audit-trail rails transitions data-integrity
10 sources
- readme: https://github.com/gocardless/statesman · fetched 2026-08-28 · f76f79ea2378
- homepage: https://gocardless.com/blog/statesman/ · fetched 2026-08-29 · 03b20a9841ce
- site_page: https://gocardless.com/features/variable-recurring-payments · fetched 2026-08-29 · c6ff4bb5d9b5
- site_page: https://gocardless.com/features/invoicing · fetched 2026-08-29 · d117ed5c9284
- site_page: https://gocardless.com/about/jobs · fetched 2026-08-29 · 51eaa19728d9
- site_page: https://gocardless.com/guides/posts/gc-changelog · fetched 2026-08-29 · 95064c7e0f78
- site_page: https://gocardless.com/features/recurring-payments · fetched 2026-08-29 · 711de9d37dad
- site_page: https://gocardless.com/pricing · fetched 2026-08-29 · 30f8a16039a6
- site_page: https://gocardless.com/partners · fetched 2026-08-29 · 12087b77b1fa
- site_page: https://gocardless.com/developers · fetched 2026-08-29 · 0f6945e5d567
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| gocardless/statesman | main | 93 |
For agents
markdown · JSON · MCP: product_card(name="gocardless/statesman")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem