AI Slop Code RIsk Monitor

hanami/hanami

A flexible framework for maintainable Ruby apps

7.8 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for hanami/hanami, a Ruby project with 6,424 GitHub stars. SynthScan examined 40,697 lines of code across 273 source files, recording 326 pattern matches distributed across 4 syntactic categories. The legacy adjusted pattern signal is 7.8 (Moderate pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

7.8
Adjusted Signal
7.8
Raw Pattern Score
100%
Time Factor
2026-10-08
Last Push
6.4K
Stars
Ruby
Language
40.7K
Lines of Code
273
Files
326
Pattern Hits
2026-10-12
Scan Date
0.00
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 30.7/100 · MEDIUM

Can maintainers explain intent, assumptions, and trade-offs? 308 finding(s).

Hallucinated Dependency & Supply Chain Risk 2.2/100 · LOW

Are imports declared and package/API names verified? 18 finding(s).

Agent Over-Engineering Ratio 1.1/100 · LOW

Are wrappers, guards, and repeated structures necessary? 9 finding(s).

PR Review Velocity Impact 35.0/100 · MEDIUM

Which changes need focused human review? 326 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 0HIGH 0MEDIUM 12LOW 314

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 326 distinct pattern matches across 4 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Over-Commented Block287 hits · 253 pts
SeverityFileLineSnippetContext
LOWCHANGELOG.md181COMMENT
LOWspec/integration/container/prepare_container_spec.rb1# frozen_string_literal: trueCOMMENT
LOWlib/hanami.rb81 if lib_path&.directory?COMMENT
LOWlib/hanami.rb161 #COMMENT
LOWlib/hanami.rb181 # @exampleCOMMENT
LOWlib/hanami.rb201 # @exampleCOMMENT
LOWlib/hanami.rb221COMMENT
LOWlib/hanami/slice_configurable.rb1# frozen_string_literal: trueCOMMENT
LOWlib/hanami/routes.rb1# frozen_string_literal: trueCOMMENT
LOWlib/hanami/routes.rb21 # root to: "home.show"COMMENT
LOWlib/hanami/routes.rb61 endCOMMENT
LOWlib/hanami/errors.rb1# frozen_string_literal: trueCOMMENT
LOWlib/hanami/errors.rb21COMMENT
LOWlib/hanami/settings.rb1# frozen_string_literal: trueCOMMENT
LOWlib/hanami/settings.rb21 # # frozen_string_literal: trueCOMMENT
LOWlib/hanami/settings.rb41 # When the settings are initialized, all type errors will be collected and presented together forCOMMENT
LOWlib/hanami/settings.rb61 # [dry-t]: https://dry-rb.org/gems/dry-types/COMMENT
LOWlib/hanami/settings.rb181COMMENT
LOWlib/hanami/settings.rb201 #COMMENT
LOWlib/hanami/app.rb1# frozen_string_literal: trueCOMMENT
LOWlib/hanami/app.rb41 # @return [Hanami::Config]COMMENT
LOWlib/hanami/app.rb61 #COMMENT
LOWlib/hanami/slice_name.rb1# frozen_string_literal: trueCOMMENT
LOWlib/hanami/slice_name.rb21 #COMMENT
LOWlib/hanami/slice_name.rb41 # @since 2.0.0COMMENT
LOWlib/hanami/slice_name.rb61 endCOMMENT
LOWlib/hanami/slice_name.rb81 # @since 2.0.0COMMENT
LOWlib/hanami/rake_tasks.rb1# frozen_string_literal: trueCOMMENT
LOWlib/hanami/rake_tasks.rb21 # ===COMMENT
LOWlib/hanami/config.rb21 # For the app, this defaults to `Dir.pwd`. For slices detected in `slices/` `config/slices/`,COMMENT
LOWlib/hanami/config.rb41 #COMMENT
LOWlib/hanami/config.rb61 # @see Hanami::Settings::EnvStore#fetchCOMMENT
LOWlib/hanami/config.rb81 # config.slices # => ["admin", "search"]COMMENT
LOWlib/hanami/config.rb101 # @since 2.0.0COMMENT
LOWlib/hanami/config.rb121 # @since 2.0.0COMMENT
LOWlib/hanami/config.rb141 # top of their source file.COMMENT
LOWlib/hanami/config.rb161 #COMMENT
LOWlib/hanami/config.rb181 # @return [Boolean]COMMENT
LOWlib/hanami/config.rb201 # Sets whether the app can be reloaded in place via `Hanami::Slice.reload`.COMMENT
LOWlib/hanami/config.rb221 #COMMENT
LOWlib/hanami/config.rb241COMMENT
LOWlib/hanami/config.rb261 # @since 2.0.0COMMENT
LOWlib/hanami/config.rb281 #COMMENT
LOWlib/hanami/config.rb301 # @api publicCOMMENT
LOWlib/hanami/config.rb321 # Use this to configure middleware that should apply to all routes.COMMENT
LOWlib/hanami/config.rb341 #COMMENT
LOWlib/hanami/config.rb361 # @api publicCOMMENT
LOWlib/hanami/config.rb461 logger.finalize!COMMENT
LOWlib/hanami/config.rb481 # @api publicCOMMENT
LOWlib/hanami/config.rb501 #COMMENT
LOWlib/hanami/config.rb521 # @since 2.0.0COMMENT
LOWlib/hanami/config.rb541 # class MyClassCOMMENT
LOWlib/hanami/env.rb1# frozen_string_literal: trueCOMMENT
LOWlib/hanami/slice.rb1# frozen_string_literal: trueCOMMENT
LOWlib/hanami/slice.rb21 #COMMENT
LOWlib/hanami/slice.rb61 # memoizes its registrar upon first access, so registering or configuring any provider fromCOMMENT
LOWlib/hanami/slice.rb81COMMENT
LOWlib/hanami/slice.rb101 # {#register}, {#register_provider}, {#prepare}, {#start}, {#stop}).COMMENT
LOWlib/hanami/slice.rb121 # Returns true if the slice is Hanami.appCOMMENT
LOWlib/hanami/slice.rb141 def configCOMMENT
227 more matches not shown…
Self-Referential Comments12 hits · 36 pts
SeverityFileLineSnippetContext
MEDIUM.rubocop.yml1# This file is synced from hanakai-rb/repo-syncCOMMENT
MEDIUMspec/unit/hanami/universal_logger_spec.rb160 # Create a second independent logger instanceCOMMENT
MEDIUMspec/integration/i18n/i18n_spec.rb343 # Create a custom backendCOMMENT
MEDIUMspec/support/rspec.rb3# This file is synced from hanakai-rb/repo-syncCOMMENT
MEDIUMspec/support/coverage.rb3# This file is synced from hanakai-rb/repo-syncCOMMENT
MEDIUMspec/support/warnings.rb3# This file is synced from hanakai-rb/repo-syncCOMMENT
MEDIUM.github/workflows/rubocop.yml3# This file is synced from hanakai-rb/repo-syncCOMMENT
MEDIUM.github/workflows/pr-comments.yml1# This file is synced from hanakai-rb/repo-syncCOMMENT
MEDIUM.github/workflows/ci.yml1# This file is synced from hanakai-rb/repo-syncCOMMENT
MEDIUMlib/hanami/config/console.rb42 # Define a module extension to be included in the consoleCOMMENT
MEDIUMlib/hanami/providers/db.rb185 # Create a single default gateway if none is configured or detected from database URLsCOMMENT
MEDIUMlib/hanami/helpers/form_helper.rb12 # This module provides one primary method: {#form_for}, yielding an HTML form builder. ThisCOMMENT
Fake / Example Data18 hits · 18 pts
SeverityFileLineSnippetContext
LOWspec/unit/hanami/helpers/form_helper_spec.rb1356 f.email_field "book.publisher_email", value: "publisher@example.org"CODE
LOWspec/unit/hanami/helpers/form_helper_spec.rb1359 expect(html).to include %(<input type="email" name="book[publisher_email]" id="book-publisher-email" value="publisCODE
LOWspec/unit/hanami/helpers/form_helper_spec.rb1392 f.email_field "book.publisher_email", value: "publisher@example.org"CODE
LOWspec/unit/hanami/helpers/form_helper_spec.rb1395 expect(html).to include %(<input type="email" name="book[publisher_email]" id="book-publisher-email" value="publCODE
LOWspec/unit/hanami/helpers/form_helper_spec.rb1413 f.email_field "book.publisher_email", value: "publisher@example.org"CODE
LOWspec/unit/hanami/helpers/form_helper_spec.rb1416 expect(html).to include %(<input type="email" name="book[publisher_email]" id="book-publisher-email" value="publCODE
LOWspec/unit/hanami/helpers/form_helper_spec.rb1561 f.tel_field "book.publisher_telephone", value: "publisher@example.org"CODE
LOWspec/unit/hanami/helpers/form_helper_spec.rb1564 expect(html).to include %(<input type="tel" name="book[publisher_telephone]" id="book-publisher-telephone" value="CODE
LOWspec/unit/hanami/helpers/form_helper_spec.rb1597 f.tel_field "book.publisher_telephone", value: "publisher@example.org"CODE
LOWspec/unit/hanami/helpers/form_helper_spec.rb1600 expect(html).to include %(<input type="tel" name="book[publisher_telephone]" id="book-publisher-telephone" valueCODE
LOWspec/unit/hanami/helpers/form_helper_spec.rb1618 f.tel_field "book.publisher_telephone", value: "publisher@example.org"CODE
LOWspec/unit/hanami/helpers/form_helper_spec.rb1621 expect(html).to include %(<input type="tel" name="book[publisher_telephone]" id="book-publisher-telephone" valueCODE
LOWspec/integration/mailers/mailers_spec.rb115 to "user@example.com"CODE
LOWspec/integration/mailers/mailers_spec.rb143 to "user@example.com"CODE
LOWspec/integration/mailers/mailers_spec.rb196 to "user@example.com"CODE
LOWspec/integration/mailers/mailers_spec.rb273 to "user@example.com"CODE
LOWspec/integration/db/gateways_spec.rb353 extra_gateway.connection.execute("INSERT INTO users (name) VALUES ('Jane Doe')")CODE
LOWspec/integration/db/gateways_spec.rb358 expect(Hanami.app["relations.users"].to_a).to eq [{id: 1, name: "Jane Doe"}]CODE
Hyper-Verbose Identifiers9 hits · 9 pts
SeverityFileLineSnippetContext
LOWspec/integration/view/parts/default_rendering_spec.rb92 def slice_screaming_snake_case(str)CODE
LOWlib/hanami/providers/db.rb207 def apply_parent_gateway_config(key, gw_config)CODE
LOWlib/hanami/providers/i18n/backend.rb330 def handle_missing_translation(missing_translation, options)CODE
LOWlib/hanami/providers/i18n/backend.rb350 def expand_localization_format(locale, object, format)CODE
LOWlib/hanami/helpers/i18n_helper.rb174 def _escape_translation_options(options)CODE
LOWlib/hanami/helpers/i18n_helper.rb185 def _missing_translation_markup(key, error)CODE
LOWlib/hanami/helpers/assets_helper.rb746 def _subresource_integrity_value(source, ext)CODE
LOWlib/hanami/helpers/form_helper/form_builder.rb1306 def _hidden_field_for_check_box(name, attributes)CODE
LOWlib/hanami/helpers/form_helper/form_builder.rb1320 def _attributes_for_check_box(name, attributes)CODE