Skip to content
CAI
Software that uses CAICheck a score

geekq/workflow

60.6

Adequate · 19 September 2026

473

lines of production code

Ruby

primary language

1

measurement over time

CAI band scale
CAI lens gauges

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 watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Baseline

  • First survey — no prior run to compare against. CAI 61.

Lenses

  • Code Health 99
  • Architecture 69
  • Maturity 46
  • Readiness 65
  • Security 100

Changes since last survey

  • 300 commits — 252 feature/other, 48 fixes

By area

  • (root) — 178 commits
  • (repo) — 35 commits
  • lib/workflow.rb — 30 commits
  • lib/workflow — 24 commits
  • test/main_test.rb — 10 commits
  • test/inheritance_test.rb — 4 commits
  • gemfiles/Gemfile.rails-4.0 — 3 commits
  • .github/workflows — 2 commits
  • gemfiles/Gemfile.rails-edge — 2 commits
  • test/advanced_examples_test.rb — 2 commits
  • test/advanced_hooks_and_validation_test.rb — 2 commits
  • test/attr_protected_test.rb — 2 commits
  • gemfiles/Gemfile.rails-2.3.x — 1 commit
  • gemfiles/Gemfile.rails-5.0 — 1 commit
  • test/active_record_scopes_test.rb — 1 commit
  • test/multiple_workflows_test.rb — 1 commit
  • test/new_versions — 1 commit
  • test/without_active_record_test.rb — 1 commit

Notable commits

  • fix: Add minitest gem to fix test runtime error with ruby 2.0
  • fix: Add protected_attributes gem to fix the build for Rails 4
  • fix: Add warning about versions to the README, fix #145
  • fix: Even more test fixes for Ruby 1.8.7
  • fix: Extend documentation to fix #96
  • fix: Fix "cannot load such file -- protected_attributes" in Rails 5
  • fix: Fix "open-ended dependency" warnings
  • fix: Fix #106, inherit TransitionHalted etc. from StandardError instead of Exception
  • fix: Fix #110 graphviz file name handling on Mac OS X
  • fix: Fix #131 - add a more clear note regarding incompatibility to the Changelog.
  • fix: Fix #213. Only require ruby-graphviz if needed
  • fix: Fix #216 - include ActiveAdmin-Workflow in README
  • fix: Fix #98 on_STATE_entry and on_STATE_exit protected callbacks for Ruby 2.0 and newer
  • fix: Fix Gemfile for edge build
  • fix: Fix Minitest compatibility with mocha https://github.com/freerange/mocha/issues/614
  • fix: Fix README for yard documentation generator
  • fix: Fix create_workflow_diagram documentation
  • fix: Fix deprecations, warnings in tests
  • fix: Fix for Ruby 1.9.3
  • fix: Fix inheritance test
  • …and 280 more

Written by watchdog.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 19 September 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.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-13a154b7f5d1.