Skip to content
CAI
Software that uses CAICheck a score

leejarvis/slop

56.7

Adequate · 6 November 2026

712

lines of production code

Ruby

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is the Slop library, a command-line argument parser for Ruby. It provides a modular architecture for defining, parsing, and validating command-line options, supporting various data types and structured error handling. The project includes a comprehensive test suite using Minitest to verify parsing logic and option configuration.

Behavioural changes

Slop 4.0 rewrite: new option types, strict validation, and structured error handling

The \lib/slop\ library has been rewritten for version 4.0, introducing a modular architecture with separate files for options, parsing, and result handling. Users now have access to new built-in option types including \Symbol\, \Regexp\, and \Array\ (with configurable delimiters and limits), alongside existing \String\, \Integer\, \Float\, and \Bool\ types. The parser now supports \--no-\ prefixes for inverting boolean options, grouped short flags (e.g., \-abc\), and strict type validation via the \validate\_types\ config option. Error handling is more granular, with distinct exception classes (\MissingArgument\, \UnknownOption\, \MissingRequiredOption\, \InvalidOptionValue\) that can be suppressed globally. The API exposes \Result\#fetch\ for safe option retrieval, \Result\#to\_hash\ for serialization, and tracks option usage counts and tail arguments.

lib/slop · high confidence

Slop library rewritten to version 4.10.1 with modular architecture

The Slop command-line parsing library has been completely rewritten, upgrading the version from 0.1.0 to 4.10.1. The internal structure has shifted from a single monolithic class to a modular design using separate files for options, parsing, results, types, and errors. The public API has changed significantly: \Slop.parse\ now accepts a configuration hash and returns a \Slop::Result\ object instead of the \Slop\ instance itself, and new class methods like \option\_defined?\ and \string\_to\_option\ have been added to support dynamic option handling.

lib · high confidence

Test coverage

Initial test suite for Slop command-line parser; Removed legacy RSpec test suite.

Dependencies

Updated gemspec and added Gemfile for modern Ruby development

The project now uses a Gemfile that loads the gemspec, simplifying dependency management. The gemspec has been updated to read the version from the codebase (Slop::VERSION) instead of hardcoding it, switched the test framework from RSpec to Minitest (version \~\> 5.0.0), added Rake as a development dependency, specified the MIT license, and raised the minimum required Ruby version to 2.0.0.

(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 57 → 57 (+0.0)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 76 → 76 (+0.0)
  • Architecture 69 → 69 (+0.0)
  • Maturity 41 → 41 (+0.0)
  • Readiness 65 → 65 (+0.0)
  • Security 98 → 98 (+0.0)

Resolved (3)

  • Ambiguous naming for value retrieval. value likely returns the parsed/processed value, while default_value returns the static default. However, in the context of BoolOption, value is also defined. It is unclear if Option.value returns the current state or the default if no value was set. This creates inconsistency with how defaults are accessed across different option types.
  • Duplication of state tracking methods. Result and Parser both expose used_options and unused_options. Since Result holds a reference to the Parser, these methods on Result are likely just delegating to the parser, exposing internal implementation details unnecessarily.
  • Redundant accessors for retrieving option values. [], fetch, and option all appear to retrieve the value associated with a flag, creating confusion about which to use (e.g., fetch usually implies raising on missing keys in Ruby, while [] might return nil, but option is ambiguous).

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

leejarvis/slop 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 131616dccd5d559a0b207e6983fe71dc162cb01c — 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.