# Next Steps ## Immediate: Test Gap Analysis The engine is done. The next layer uses the extracted chain as input to find uncovered callbacks and validators. ### How it works 1. Run the host app's test suite with SimpleCov to get line coverage data 2. For each `CallbackEntry` in the `ModelChain`, check whether `source_file:source_line` is covered in the SimpleCov report 3. For each `ValidatorEntry`, check whether the validation path is exercised 4. Report: "these 3 callbacks have no test coverage" The `ModelChain` data structure is already the right shape — each `CallbackEntry` has `source_file` and `source_line`, ready to cross-reference against SimpleCov output. ### Integration point Surface this in the engine UI: add a "Coverage" column to each callback row, showing green/red/unknown based on whether SimpleCov data is available and whether the line is covered. SimpleCov writes JSON to `coverage/.resultset.json` after a test run. Parse that file directly — no need to instrument the test suite beyond what SimpleCov already does. ## After gap analysis: distribution - Publish to RubyGems.org - The gem should be dev/test-only (add under `group :development`) - Pricing model TBD — could be open source with a paid cloud version, or MIT with a commercial license for teams ## Environment notes - Ruby 3.3.6 installed via rbenv (`~/.rbenv/versions/3.3.6`) - rbenv init added to `~/.zshrc` - Rails 8.1.3 - Dev database: SQLite at `storage/development.sqlite3` - Gitea running in Docker on localhost:3000 (container name: `gitea`) - Gitea API token for `bill`: `c2948775b80bcaa0ba65c6359658d0d48c340c4e` - Dev server runs on port 3100 (`bin/rails server -p 3100`) - Visit `http://localhost:3100/whetrails` to see the engine UI