geekq/workflow
58.5
Adequate · 6 November 2026
473
lines of production code
Ruby
primary language
4
measurements over time
What this system is
This system is a Ruby gem that provides a modular workflow engine for defining and executing state machines with support for dynamic JSON-based definitions. It manages state transitions through a structured lifecycle of hooks, allowing event conditions to react to specific arguments for greater flexibility. The library includes built-in error handling, graph visualization capabilities via GraphViz, and comprehensive test coverage for core features like persistence and conditional firing.
Features
Version 3.1.0 release with event arguments, partial workflows, and JSON definition examples
This release introduces three key capabilities: event arguments can now influence event selection, partial workflow definitions can be included for composability, and an example demonstrates defining workflows dynamically from JSON. The release also includes updated documentation in README.adoc, a new CHANGELOG.md, and standard project files like .gitignore, MIT-LICENSE, and Rakefile.
(repo-wide) · high confidence
Behavioural changes
Workflow engine restructured with new event argument support and graph visualization
The workflow library has been reorganized into distinct components (specification, state, event, event\_collection) to improve modularity. A key behavioral change allows event conditionals (defined via \:if\) to receive the transition's event arguments, enabling more dynamic decision-making based on action parameters, while maintaining backward compatibility for conditions that do not accept arguments. Additionally, a new \Workflow::Draw\ module has been added to generate PNG workflow diagrams using GraphViz, and the error hierarchy has been standardized so all workflow errors inherit from \Workflow::Error\ (which inherits from \StandardError\).
lib/workflow · high confidence
Workflow state transition execution order and error handling
The library now executes workflow transitions in a specific, documented order: before\_transition, action, on\_transition, on\_exit, persist state, on\_entry, and after\_transition. This change ensures that state persistence occurs before entry callbacks, allowing entry hooks to rely on the updated state. Additionally, an on\_error hook is introduced to handle exceptions during the action phase, and the halt! method now raises a TransitionHalted exception to immediately abort transitions.
lib · high confidence
Test coverage
Added test suite for workflow features and examples
Added a comprehensive set of tests covering core workflow capabilities, including state transitions, conditional event firing, inheritance, error handling, and dynamic workflow definitions from JSON. The test suite also includes integration examples for CouchDB persistence and verifies the correct execution order of transition hooks (before, on, after) and entry/exit callbacks.
test · high confidence
Dependencies
Update Ruby version requirement and development dependencies
The gem now requires Ruby 2.7 or higher, dropping support for older versions. Development dependencies have been updated to specific versions: rdoc (\~\> 6.4), bundler (\~\> 2.3), mocha (\~\> 2.2), rake (\~\> 13.1), minitest (\~\> 5.21), and ruby-graphviz (\~\> 1.2). A Gemfile was added to support bundler, including simplecov for test coverage.
(dependencies) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 58 → 58 (+0.0)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 75 → 75 (+0.0)
- Architecture 69 → 69 (+0.0)
- Maturity 44 → 44 (+0.0)
- Readiness 67 → 67 (+0.0)
- Security 100 → 100 (+0.0)
Resolved (1)
- Redundant methods with ambiguous distinction. Both methods accept a reason and likely result in a halted state. The '!' suffix conventionally implies a side effect or exception raising, but without documentation, it is unclear if one is a no-op or if they differ in error handling. This creates confusion for API consumers.
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
geekq/workflow was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 6 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 24212f4ad2036d0378b14c830f454261fdf7c977 — the exact code this score is about.
- Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.2+preprod-5c4e66d9318b.