CtrlK
BlogDocsLog inGet started
Tessl Logo

igmarin/rails-agent-skills

Curated library of 39 AI agent skills for Ruby on Rails development. Organized by category: planning, testing, code-quality, ddd, engines, infrastructure, api, patterns, context, orchestration, and workflows. Includes 5 callable workflow skills (rails-tdd-loop, rails-review-flow, rails-setup-flow, rails-quality-flow, rails-engines-flow) for complete development cycles. Covers code review, architecture, security, testing (RSpec), engines, service objects, DDD patterns, and TDD automation.

95

1.20x
Quality

98%

Does it follow best practices?

Impact

95%

1.20x

Average score across 35 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

criteria.jsonevals/scenario-21/

{
  "context": "Tests whether the agent implements the Strategy + Factory + Null Object calculator pattern: a frozen SERVICE_MAP dispatch table in the Factory, a NullService that returns safely for all unknown variants, the prescribed file structure, the single-call public API, and concrete services that override the correct methods.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "SERVICE_MAP constant",
      "description": "The Factory class defines a SERVICE_MAP constant (frozen hash) that maps variant keys to service classes — not a case statement or if/elsif chain",
      "max_score": 12
    },
    {
      "name": "Factory NullService fallback",
      "description": "The Factory's .for method returns a NullService instance (or NullService.new) when the variant is not found in SERVICE_MAP or when the qualifying context is nil/inactive",
      "max_score": 10
    },
    {
      "name": "NullService never raises",
      "description": "The NullService class does NOT raise any exception under any input — its calculate (or equivalent public) method returns nil or a safe value for all inputs",
      "max_score": 12
    },
    {
      "name": "Correct file structure",
      "description": "The module contains at least factory.rb, base_service.rb, null_service.rb, and one concrete service file — all under app/services/<module_name>/",
      "max_score": 10
    },
    {
      "name": "Single entry point API",
      "description": "The client-facing usage demonstrated (in code, specs, or documentation) is Factory.for(entity).calculate — a single chained method call, not a multi-step instantiation",
      "max_score": 8
    },
    {
      "name": "Concrete overrides should_calculate?",
      "description": "At least one concrete service class overrides a should_calculate? (or equivalent guard) method that adds a variant-specific check on top of calling super",
      "max_score": 8
    },
    {
      "name": "Concrete overrides compute_result",
      "description": "At least one concrete service class overrides compute_result (or equivalent calculation) method containing the variant-specific business logic",
      "max_score": 8
    },
    {
      "name": "NullService spec context",
      "description": "The spec file contains a context or describe block that explicitly tests the NullService path — e.g. unknown variant, nil entity, or inactive qualifier returns the null object",
      "max_score": 12
    },
    {
      "name": "Variant spec coverage",
      "description": "The spec file includes at least one example per concrete variant (e.g. standard tier, express tier) verifying the factory dispatches to the correct service class",
      "max_score": 8
    },
    {
      "name": "Frozen string literal",
      "description": "Every Ruby file in the module begins with # frozen_string_literal: true",
      "max_score": 6
    },
    {
      "name": "SERVICE_MAP key type consistency",
      "description": "The SERVICE_MAP keys are the same type (all strings or all symbols) as what would be retrieved from the entity attribute — not a mix that would cause silent NullService fallbacks",
      "max_score": 6
    }
  ]
}

README.md

tile.json