Repository Analysis

hanami/hanami

A flexible framework for maintainable Ruby apps

8.1 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of hanami/hanami, a Ruby project with 6,407 GitHub stars. SynthScan v2.0 examined 38,640 lines of code across 263 source files, recording 321 pattern matches distributed across 4 syntactic categories. The overall adjusted score of 8.1 places this repository in the Low AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

8.1
Adjusted Score
8.1
Raw Score
100%
Time Factor
2026-08-24
Last Push
6.4K
Stars
Ruby
Language
38.6K
Lines of Code
263
Files
321
Pattern Hits
2026-08-29
Scan Date
0.00
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.

No multi-scan history yet — run the scanner again to build trend data.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 0MEDIUM 12LOW 309

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 321 distinct pattern matches across 4 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. 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 diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Over-Commented Block282 hits · 250 pts
SeverityFileLineSnippetContext
LOWCHANGELOG.md161### AddedCOMMENT
LOWspec/integration/container/prepare_container_spec.rb1# frozen_string_literal: trueCOMMENT
LOWlib/hanami.rb81 path = lib_path.realpath.to_sCOMMENT
LOWlib/hanami.rb161 # - `HANAMI_ENV`COMMENT
LOWlib/hanami.rb181 # Hanami.env # => :developmentCOMMENT
LOWlib/hanami.rb201 # # app/my_component.rbCOMMENT
LOWlib/hanami.rb221 # Prepares the Hanami app.COMMENT
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/slice_registrar.rb161COMMENT
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 # Its message collects all the individual errors that can be raised for each setting.COMMENT
LOWlib/hanami/settings.rb181 # This includes setting names only, not any values, to ensure that sensitive values do notCOMMENT
LOWlib/hanami/settings.rb201COMMENT
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.rb61COMMENT
LOWlib/hanami/config.rb81 setting :slicesCOMMENT
LOWlib/hanami/config.rb101 routesCOMMENT
LOWlib/hanami/config.rb121 ]COMMENT
LOWlib/hanami/config.rb141 #COMMENT
LOWlib/hanami/config.rb161 #COMMENT
LOWlib/hanami/config.rb181 # @!attribute [rw] render_detailed_errorsCOMMENT
LOWlib/hanami/config.rb201 # errors you want handled.COMMENT
LOWlib/hanami/config.rb221 # Returns the app's console configCOMMENT
LOWlib/hanami/config.rb241COMMENT
LOWlib/hanami/config.rb261 # config.actions.default_request_format # => NoMethodErrorCOMMENT
LOWlib/hanami/config.rb281 attr_reader :dbCOMMENT
LOWlib/hanami/config.rb301 # @exampleCOMMENT
LOWlib/hanami/config.rb321 # config.router.resolver # => NoMethodErrorCOMMENT
LOWlib/hanami/config.rb341 attr_reader :viewsCOMMENT
LOWlib/hanami/config.rb441 endCOMMENT
LOWlib/hanami/config.rb461 endCOMMENT
LOWlib/hanami/config.rb481 @loggerCOMMENT
LOWlib/hanami/config.rb501COMMENT
LOWlib/hanami/config.rb521 # logger.info("hello")COMMENT
LOWlib/hanami/env.rb1# frozen_string_literal: trueCOMMENT
LOWlib/hanami/slice.rb1# frozen_string_literal: trueCOMMENT
LOWlib/hanami/slice.rb21 # Slices expect an Hanami app to be defined (which itself is a slice). They will initialize theirCOMMENT
LOWlib/hanami/slice.rb41 subclass.class_eval doCOMMENT
LOWlib/hanami/slice.rb61 # @since 2.0.0COMMENT
LOWlib/hanami/slice.rb81 # In ordinary usage, you shouldn't need direct access the container at all, since the sliceCOMMENT
LOWlib/hanami/slice.rb101 endCOMMENT
LOWlib/hanami/slice.rb121 # @api publicCOMMENT
222 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