Repository Analysis

fish-shell/fish-shell

The user-friendly command line shell.

2.9 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of fish-shell/fish-shell, a Rust project with 33,847 GitHub stars. SynthScan v2.0 examined 118,602 lines of code across 356 source files, recording 215 pattern matches distributed across 14 syntactic categories. The overall adjusted score of 2.9 places this repository in the Likely human-written 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).

2.9
Adjusted Score
2.9
Raw Score
100%
Time Factor
2026-07-14
Last Push
33.8K
Stars
Rust
Language
118.6K
Lines of Code
356
Files
215
Pattern Hits
2026-07-14
Scan Date
0.05
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

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

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 17MEDIUM 20LOW 178

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 215 distinct pattern matches across 14 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 Block122 hits · 122 pts
SeverityFileLineSnippetContext
LOWcrates/gettext-mo-file-parser/src/lib.rs21 }COMMENT
LOWcrates/gettext-extraction/src/lib.rs81/// the message ID is written into a new file in this directory,COMMENT
LOWcrates/wgetopt/src/lib.rs41/// regardless of [Ordering].COMMENT
LOWcrates/wgetopt/src/lib.rs61/// Indicates whether an option takes an argument, and whether that argumentCOMMENT
LOWcrates/wgetopt/src/lib.rs121 shortopts: &'opts wstr,COMMENT
LOWcrates/util/src/lib.rs21/// file12.txtCOMMENT
LOWcrates/color/src/lib.rs141 } else {COMMENT
LOWcrates/fluent/src/lib.rs181 }COMMENT
LOWcrates/fluent/src/lib.rs201///COMMENT
LOWcrates/fluent/src/lib.rs221 $(COMMENT
LOWcrates/printf/src/lib.rs21/// let s = sprintf!("%0.5g", 123456.0);COMMENT
LOWcrates/printf/src/lib.rs61 };COMMENT
LOWcrates/printf/src/lib.rs81/// let mut output = String::new();COMMENT
LOWcrates/printf/src/printf_impl.rs321/// Formats a string using the provided format specifiers, arguments, and locale,COMMENT
LOWcrates/printf/src/locale.rs1/// The numeric locale. Note this is a pure value type.COMMENT
LOWcrates/printf/src/fmt_fp/decimal.rs241 // which is given by remainder (that is, remainder = self[digit_idx] % mod_base).COMMENT
LOWcrates/printf/src/fmt_fp/mod.rs101COMMENT
LOWcrates/common/src/lib.rs1201impl<T: Copy> ScopedCell<T> {COMMENT
LOWcrates/common/src/lib.rs1261 ///COMMENT
LOWcrates/common/src/lib.rs1301 ///COMMENT
LOWcrates/common/src/lib.rs1321/// A RAII cleanup object. Unlike in C++ where there is no borrow checker, we can't just provide aCOMMENT
LOWcrates/common/src/lib.rs1381COMMENT
LOWcrates/common/src/lib.rs1401/// ];COMMENT
LOWcrates/widestring/src/lib.rs41//COMMENT
LOWcrates/widestring/src/lib.rs121COMMENT
LOWcrates/widestring/src/lib.rs341 /// PUA-encoded chars into a char iterator where each encoded non-UTF-8 byte is replaced by theCOMMENT
LOWcrates/widestring/src/lib.rs361 /// non-empty. In the [`Self::next`] and [`Self::next_back`] implementations, this logic isCOMMENT
LOWcrates/widestring/src/lib.rs581COMMENT
LOWcrates/xtask/src/gettext.rs21COMMENT
LOWcrates/xtask/src/fluent.rs41 from_source: Option<Option<PathBuf>>,COMMENT
LOWcrates/xtask/src/fluent.rs61 /// If a Fluent variable is renamed or removed, the translations of the message will be deleted.COMMENT
LOWcrates/xtask/src/fluent.rs81 /// The message ID.COMMENT
LOWcrates/xtask/src/fluent.rs101 /// indicate that translators should have a look at it.COMMENT
LOWcrates/xtask/src/main.rs41 /// Run ShellCheck on non-fish shell scriptsCOMMENT
LOWdoc_src/conf.py141COMMENT
LOWdoc_src/conf.py161# -- Options for HTML output -------------------------------------------------COMMENT
LOWdoc_src/conf.py281COMMENT
LOWtests/fish_test_helper.c1// fish_test_helper is a little program with no fish dependencies that acts like certain otherCOMMENT
LOWtests/pexpects/commandline.py121# send(control("u") * 6)COMMENT
LOWtests/pexpects/bind.py141# Delay needed to allow fish to transition to vi "normal" mode.COMMENT
LOWtests/pexpects/history.py1#!/usr/bin/env python3COMMENT
LOWsrc/job_group.rs61pub struct JobGroup {COMMENT
LOWsrc/timer.rs1//! This module houses `TimerSnapshot` which can be used to calculate the elapsed time (system CPUCOMMENT
LOWsrc/exec.rs121 }COMMENT
LOWsrc/exec.rs361 }COMMENT
LOWsrc/exec.rs461//COMMENT
LOWsrc/exec.rs1241/// is the first or last process).COMMENT
LOWsrc/exec.rs1261 // what we want to happen is this:COMMENT
LOWsrc/tty_handoff.rs341COMMENT
LOWsrc/tty_handoff.rs441 // Check who own the tty now. There's four cases of interest:COMMENT
LOWsrc/tty_handoff.rs461 }COMMENT
LOWsrc/parse_util.rs961 // This is a bit of a hack - it indents cases like:COMMENT
LOWsrc/parse_util.rs981 // casCOMMENT
LOWsrc/terminal.rs341COMMENT
LOWsrc/proc.rs341impl fish_printf::ToArg<'static> for Pid {COMMENT
LOWsrc/proc.rs361/// array and `actual_cmd` is the absolute path of the command to execute.COMMENT
LOWsrc/proc.rs1141COMMENT
LOWsrc/screen.rs221COMMENT
LOWsrc/screen.rs1281 }COMMENT
LOWsrc/screen.rs1881 commandline_before_suggestion,COMMENT
62 more matches not shown…
Cross-Language Confusion15 hits · 74 pts
SeverityFileLineSnippetContext
HIGHtests/pexpects/wildcard_tab.py67sendline(r"mkdir benchmarks && mkdir benchmarks/somedir && touch benchmarks/somefile")CODE
HIGHtests/pexpects/pipeline.py28# 'not' because we expect to have no jobs, in which case `jobs` will return falseCOMMENT
HIGHtests/pexpects/isatty.py20test -t 0 && echo stdinSTRING
HIGHtests/pexpects/isatty.py21test -t 1 && echo stdoutSTRING
HIGHtests/pexpects/isatty.py22test -t 2 && echo stderrSTRING
HIGHtests/pexpects/isatty.py60sendline("isatty stdin && echo yes")CODE
HIGHtests/pexpects/isatty.py64sendline("cat </dev/null | isatty stdin || echo no")CODE
HIGHtests/pexpects/autosuggest.py77run("touch configure && chmod +x configure")CODE
HIGHtests/pexpects/status.py28sendline("true 7 && status current-commandline")CODE
HIGHtests/pexpects/status.py29expect_prompt("\r\n.*true 7 && status current-commandline\r\n")CODE
HIGHtests/pexpects/read.py58sendline(r"read -c init_text somevar && echo $somevar")CODE
HIGHtests/pexpects/read.py63sendline(r"read --command='some other text' somevar && echo $somevar")CODE
HIGHshare/tools/web_config/webconfig.py807 + "if set -q __fish_initialized && test $__fish_initialized -lt 4300\n"CODE
HIGHshare/tools/web_config/webconfig.py999 + "funcsave fish_prompt && funcsave fish_right_prompt 2>/dev/null"CODE
HIGHshare/tools/web_config/webconfig.py1019 + '" \n false \n functions -q fish_right_prompt && fish_right_prompt\n'CODE
Decorative Section Separators13 hits · 54 pts
SeverityFileLineSnippetContext
MEDIUMtests/pexpects/read.py126# ==========COMMENT
MEDIUMtests/pexpects/history.py32# ==========COMMENT
MEDIUMtests/pexpects/history.py37# ==========COMMENT
MEDIUMtests/pexpects/history.py39# ==========COMMENT
MEDIUMtests/pexpects/history.py41# ==========COMMENT
MEDIUMtests/pexpects/history.py50# ==========COMMENT
MEDIUMtests/pexpects/history.py52# ==========COMMENT
MEDIUMtests/pexpects/history.py54# ==========COMMENT
MEDIUMtests/pexpects/history.py60# ==========COMMENT
MEDIUMtests/pexpects/history.py65# ==========COMMENT
MEDIUMtests/pexpects/history.py72# ==========COMMENT
MEDIUMtests/pexpects/history.py99# ==========COMMENT
MEDIUMtests/pexpects/history.py106# ==========COMMENT
Deep Nesting25 hits · 25 pts
SeverityFileLineSnippetContext
LOWdoc_src/fish_synopsis.py85CODE
LOWdoc_src/conf.py219CODE
LOWtests/test_driver.py111CODE
LOWtests/test_driver.py306CODE
LOWtests/pexpect_helper.py75CODE
LOWtests/littlecheck.py796CODE
LOWtests/littlecheck.py207CODE
LOWshare/tools/create_manpage_completions.py1251CODE
LOWshare/tools/create_manpage_completions.py1872CODE
LOWshare/tools/create_manpage_completions.py2088CODE
LOWshare/tools/create_manpage_completions.py468CODE
LOWshare/tools/create_manpage_completions.py517CODE
LOWshare/tools/create_manpage_completions.py588CODE
LOWshare/tools/create_manpage_completions.py655CODE
LOWshare/tools/create_manpage_completions.py680CODE
LOWshare/tools/create_manpage_completions.py885CODE
LOWshare/tools/create_manpage_completions.py930CODE
LOWshare/tools/create_manpage_completions.py1092CODE
LOWshare/tools/create_manpage_completions.py1708CODE
LOWshare/tools/web_config/webconfig.py229CODE
LOWshare/tools/web_config/webconfig.py1429CODE
LOWshare/tools/web_config/webconfig.py1125CODE
LOWshare/tools/web_config/webconfig.py1146CODE
LOWshare/tools/web_config/webconfig.py1183CODE
LOWshare/tools/web_config/webconfig.py267CODE
Synthetic Comment Markers2 hits · 15 pts
SeverityFileLineSnippetContext
HIGHsrc/ast.rs2362 // exhausted the stream as requested.COMMENT
HIGHsrc/builtins/read.rs306/// Read from the fd in chunks until we see newline or null, as requested, is seen. This is onlyCOMMENT
Hyper-Verbose Identifiers14 hits · 12 pts
SeverityFileLineSnippetContext
LOWtests/pexpect_helper.py197 def send_cursor_position_report(self, *, y: int, x: int):CODE
LOWtests/pexpect_helper.py202 def send_primary_device_attribute(self):CODE
LOWtests/pexpect_helper.py285 def report_exception_and_exit(self, pat, unmatched, err):CODE
LOWshare/tools/create_manpage_completions.py1851def cleanup_autogenerated_completions_in_directory(dir):STRING
LOWshare/tools/create_manpage_completions.py1864def cleanup_autogenerated_file(path):STRING
LOWshare/tools/create_manpage_completions.py2018def parse_and_output_man_pages(paths, output_directory, show_progress):STRING
LOWshare/tools/create_manpage_completions.py2088def get_paths_from_man_locations():STRING
LOWshare/tools/web_config/webconfig.py356def html_color_for_ansi_color_index(val):CODE
LOWshare/tools/web_config/webconfig.py625def append_html_for_ansi_escape(full_val, result, span_open):CODE
LOWshare/tools/web_config/webconfig.py800class FishConfigHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):CODE
LOWshare/tools/web_config/webconfig.py963 def do_set_color_for_variable(self, name, color):CODE
LOWshare/tools/web_config/webconfig.py1053 def parse_one_sample_prompt_hash(self, line, result_dict):CODE
LOWshare/tools/web_config/webconfig.py1094 def do_get_sample_prompts_list(self):CODE
LOWshare/tools/web_config/webconfig.py1125 def font_size_for_ansi_prompt(self, prompt_demo_ansi):CODE
AI Slop Vocabulary4 hits · 8 pts
SeverityFileLineSnippetContext
MEDIUMtests/littlecheck.py838 # To facilitate integration with testing frameworks, use exit code 125 to indicate that allCOMMENT
MEDIUMtests/pexpects/history.py8# meant to be a comprehensive test of the history subsystem. Those types ofCOMMENT
LOWbuild_tools/make_linux_packages.sh72# just use dpkg-buildpackage directlyCOMMENT
LOWshare/tools/create_manpage_completions.py2104 # If we can't have the OS interpret $MANPATH, just use it as-is (gulp).STRING
Self-Referential Comments4 hits · 8 pts
SeverityFileLineSnippetContext
MEDIUMsrc/env_universal_common.rs634const SAVE_MSG: &[u8] = b"# This file contains fish universal variable definitions.\n";CODE
MEDIUMsrc/env_universal_common.rs930 "# This file contains fish universal variable definitions.\n",CODE
MEDIUMsrc/env_universal_common.rs948 "# This file contains fish universal variable definitions.\n",CODE
MEDIUMsrc/env_universal_common.rs1000 "# This file contains fish universal variable definitions.\n",CODE
Slop Phrases4 hits · 8 pts
SeverityFileLineSnippetContext
LOWCargo.toml10# don't forget to update COPYING and debian/copyright tooCOMMENT
LOWCargo.toml10# don't forget to update COPYING and debian/copyright tooCOMMENT
LOWsrc/parser_keywords.rs40// Don't forget to add any new reserved keywords to the documentationCOMMENT
MEDIUMsrc/builtins/string/shorten.rs155 // This should work for most cases considering the combiners typically have width 0.COMMENT
Unused Imports7 hits · 7 pts
SeverityFileLineSnippetContext
LOWdoc_src/fish_indent_lexer.py7CODE
LOWdoc_src/conf.py19CODE
LOWtests/test_driver.py21CODE
LOWtests/pexpect_helper.py16CODE
LOWtests/littlecheck.py5CODE
LOWtests/littlecheck.py6CODE
LOWshare/tools/web_config/webconfig.py4CODE
AI Structural Patterns2 hits · 2 pts
SeverityFileLineSnippetContext
LOWshare/tools/create_manpage_completions.py1362CODE
LOWshare/tools/web_config/webconfig.py1045CODE
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippetContext
LOWdoc_src/fish_synopsis.py3# Example usage:COMMENT
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippetContext
LOWsrc/fs.rs280/// # Return valueCOMMENT
Excessive Try-Catch Wrapping1 hit · 1 pts
SeverityFileLineSnippetContext
LOWtests/test_driver.py233 except Exception as e:CODE