CtrlK
BlogDocsLog inGet started
Tessl Logo

igmarin/rails-agent-skills

Curated library of AI agent skills for Ruby on Rails development. Covers code review, architecture, security, testing (RSpec), engines, service objects, DDD patterns, and workflow automation.

98

1.38x
Quality

99%

Does it follow best practices?

Impact

98%

1.38x

Average score across 26 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

criteria.jsonevals/scenario-20/

{
  "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