Repository Analysis

norman/friendly_id

FriendlyId is the “Swiss Army bulldozer” of slugging and permalink plugins for ActiveRecord. It allows you to create pretty URL’s and work with human-friendly strings as if they were numeric ids for ActiveRecord models.

17.4 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of norman/friendly_id, a Ruby project with 6,226 GitHub stars. SynthScan v2.0 examined 5,993 lines of code across 58 source files, recording 83 pattern matches distributed across 7 syntactic categories. The overall adjusted score of 17.4 places this repository in the Moderate 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).

17.4
Adjusted Score
17.4
Raw Score
100%
Time Factor
2026-08-12
Last Push
6.2K
Stars
Ruby
Language
6.0K
Lines of Code
58
Files
83
Pattern Hits
2026-08-13
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 9LOW 74

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 83 distinct pattern matches across 7 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 Block61 hits · 61 pts
SeverityFileLineSnippetContext
LOWtest/benchmarks/object_utils.rb1require File.expand_path("../../helper", __FILE__)COMMENT
LOWlib/friendly_id.rb1require "active_record"COMMENT
LOWlib/friendly_id.rb21# performance and a well-documented codebase.COMMENT
LOWlib/friendly_id.rb61 # instance variable +@friendly_id_config+ is added. This variable is anCOMMENT
LOWlib/friendly_id/base.rb1module FriendlyIdCOMMENT
LOWlib/friendly_id/base.rb21 # *A note about single table inheritance (STI): you must extend FriendlyId inCOMMENT
LOWlib/friendly_id/base.rb41 # In this case, FriendlyId assumes you want to use the column as-is; it will neverCOMMENT
LOWlib/friendly_id/base.rb61 # class Post < ActiveRecord::BaseCOMMENT
LOWlib/friendly_id/base.rb81 # endCOMMENT
LOWlib/friendly_id/base.rb101 # friendly_id :titleCOMMENT
LOWlib/friendly_id/base.rb121 # friendly_id do |config|COMMENT
LOWlib/friendly_id/base.rb141 # on-the-fly. For example, let's say you want to makeCOMMENT
LOWlib/friendly_id/base.rb161 # {FriendlyId::Reserved :finders}, {FriendlyId::History :history},COMMENT
LOWlib/friendly_id/base.rb181 # @option options [Integer] :slug_limit Available when using `:slugged`.COMMENT
LOWlib/friendly_id/base.rb201 # `/team/1` instead of `/team/number-one`. You can still generate pathsCOMMENT
LOWlib/friendly_id/history.rb1module FriendlyIdCOMMENT
LOWlib/friendly_id/history.rb21 # model.COMMENT
LOWlib/friendly_id/history.rb41 #COMMENT
LOWlib/friendly_id/reserved.rb1module FriendlyIdCOMMENT
LOWlib/friendly_id/reserved.rb21 # friendly_id :name, use: :sluggedCOMMENT
LOWlib/friendly_id/slugged.rb1require "friendly_id/slug_generator"COMMENT
LOWlib/friendly_id/slugged.rb21 # endCOMMENT
LOWlib/friendly_id/slugged.rb41 # class Post < ActiveRecord::BaseCOMMENT
LOWlib/friendly_id/slugged.rb61 # endCOMMENT
LOWlib/friendly_id/slugged.rb81 # FriendlyId uses.COMMENT
LOWlib/friendly_id/slugged.rb101 # When you try to insert a record that would generate a duplicate friendly id,COMMENT
LOWlib/friendly_id/slugged.rb121 # friendly_id :slug_candidates, use: :sluggedCOMMENT
LOWlib/friendly_id/slugged.rb141 # To use candidates, make your FriendlyId base method return an array. TheCOMMENT
LOWlib/friendly_id/slugged.rb161 # be interpreted as either a friendly slug or a database ID. To prevent this, you canCOMMENT
LOWlib/friendly_id/slugged.rb181 #COMMENT
LOWlib/friendly_id/slugged.rb201 # friendly_id :title, :use => :sluggedCOMMENT
LOWlib/friendly_id/slugged.rb221 #COMMENT
LOWlib/friendly_id/slugged.rb241 # #### Gotchas: Common ProblemsCOMMENT
LOWlib/friendly_id/slugged.rb281 #COMMENT
LOWlib/friendly_id/slugged.rb321 # Public: Resolve conflicts.COMMENT
LOWlib/friendly_id/slugged.rb401COMMENT
LOWlib/friendly_id/initializer.rb1# FriendlyId Global ConfigurationCOMMENT
LOWlib/friendly_id/initializer.rb21COMMENT
LOWlib/friendly_id/initializer.rb41 # always also configure it on a per-model basis if you prefer.COMMENT
LOWlib/friendly_id/initializer.rb61 # By default, slug has no size limit, but you can change it if you wish.COMMENT
LOWlib/friendly_id/initializer.rb81 # nil, but if you're using a column as your base method can change thisCOMMENT
LOWlib/friendly_id/initializer.rb101 #COMMENT
LOWlib/friendly_id/scoped.rb1require "friendly_id/slugged"COMMENT
LOWlib/friendly_id/scoped.rb21 # extend FriendlyIdCOMMENT
LOWlib/friendly_id/scoped.rb41 # endCOMMENT
LOWlib/friendly_id/scoped.rb61 #COMMENT
LOWlib/friendly_id/scoped.rb81 #COMMENT
LOWlib/friendly_id/scoped.rb141 (changed & friendly_id_config.scope_columns).any? || superCOMMENT
LOWlib/friendly_id/object_utils.rb21 module ObjectUtilsCOMMENT
LOWlib/friendly_id/simple_i18n.rb1require "i18n"COMMENT
LOWlib/friendly_id/simple_i18n.rb21 # ### Example migrationCOMMENT
LOWlib/friendly_id/simple_i18n.rb41 # Post.friendly.find("la-guerra-de-las-galaxias")COMMENT
LOWlib/friendly_id/simple_i18n.rb61 # {FriendlyId::SimpleI18n::Model#set_friendly_id}. This will ensure that the slugCOMMENT
LOWlib/friendly_id/finders.rb1module FriendlyIdCOMMENT
LOWlib/friendly_id/finders.rb21 # not have a public API, which was harder to maintain and at times causedCOMMENT
LOWlib/friendly_id/finders.rb41 # Unless you've chosen to use the `:finders` addon, be sure to modify the findersCOMMENT
LOWlib/friendly_id/finder_methods.rb1module FriendlyIdCOMMENT
LOWlib/friendly_id/finder_methods.rb81 # Parse the given value to make it suitable for use as a slug according toCOMMENT
LOWlib/friendly_id/configuration.rb41 #COMMENT
LOWlib/friendly_id/configuration.rb61 def uses?(mod)COMMENT
1 more matches not shown…
Self-Referential Comments6 hits · 18 pts
SeverityFileLineSnippetContext
MEDIUMlib/friendly_id/candidates.rb4 # This class provides the slug candidate functionality.COMMENT
MEDIUMlib/friendly_id/slugged.rb273 # This method is not intended to be invoked directly; FriendlyId uses itCOMMENT
MEDIUMlib/friendly_id/simple_i18n.rb17 # This module is most suitable to applications that need to support few locales.COMMENT
MEDIUMlib/friendly_id/finder_methods.rb84 # This method is not intended to be invoked directly; FriendlyId uses itCOMMENT
MEDIUMlib/friendly_id/configuration.rb38 # This method is invoked by {FriendlyId::Base#friendly_id friendly_id} whenCOMMENT
MEDIUMlib/friendly_id/configuration.rb68 # This method is generally only used internally by FriendlyId.COMMENT
Slop Phrases6 hits · 12 pts
SeverityFileLineSnippetContext
LOWlib/friendly_id/slugged.rb209 # don't forget to invoke `super` from your implementation:COMMENT
LOWlib/friendly_id/slugged.rb209 # don't forget to invoke `super` from your implementation:COMMENT
MEDIUMlib/friendly_id/initializer.rb57 # 'slug', but you can change it if you wish.COMMENT
MEDIUMlib/friendly_id/initializer.rb61 # By default, slug has no size limit, but you can change it if you wish.COMMENT
LOWlib/friendly_id/initializer.rb100 # ASCII. If you use this, don't forget to add "babosa" to your Gemfile.COMMENT
LOWlib/friendly_id/initializer.rb100 # ASCII. If you use this, don't forget to add "babosa" to your Gemfile.COMMENT
Fake / Example Data4 hits · 4 pts
SeverityFileLineSnippetContext
LOWtest/simple_i18n_test.rb16 journalist = Journalist.new(name: "John Doe")CODE
LOWtest/simple_i18n_test.rb33 journalist = Journalist.new(name: "John Doe")CODE
LOWtest/simple_i18n_test.rb39 journalist = Journalist.new(name: "John Doe")CODE
LOWtest/simple_i18n_test.rb74 journalist.set_friendly_id("John Doe")CODE
Hyper-Verbose Identifiers3 hits · 3 pts
SeverityFileLineSnippetContext
LOWlib/friendly_id/sequentially_slugged.rb9 def resolve_friendly_id_conflict(candidate_slugs)CODE
LOWlib/friendly_id/slugged.rb337 def resolve_friendly_id_conflict(candidates)CODE
LOWlib/friendly_id/finder_methods.rb114 def raise_not_found_exception(id)CODE
Modern AI Meta-Vocabulary1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMlib/friendly_id/reserved.rb16 # scaffolding works as expected, one way to accomplish this is to move the errorCOMMENT
AI Slop Vocabulary2 hits · 3 pts
SeverityFileLineSnippetContext
LOWlib/friendly_id/simple_i18n.rb67 # If you don't pass in a locale argument, FriendlyId::SimpleI18n will just use theCOMMENT
LOWlib/generators/friendly_id_generator.rb8 # new table name. Our generator always uses 'friendly_id_slugs', so we just set a random name here.COMMENT