Repository Analysis

nix-community/home-manager

Manage a user environment using Nix [maintainer=@khaneliman, @rycee]

4.5 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of nix-community/home-manager, a Nix project with 10,090 GitHub stars. SynthScan v2.0 examined 18,650 lines of code across 590 source files, recording 50 pattern matches distributed across 10 syntactic categories. The overall adjusted score of 4.5 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).

4.5
Adjusted Score
4.5
Raw Score
100%
Time Factor
2026-07-14
Last Push
10.1K
Stars
Nix
Language
18.6K
Lines of Code
590
Files
50
Pattern Hits
2026-07-14
Scan Date
0.01
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 3MEDIUM 7LOW 40

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 50 distinct pattern matches across 10 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.

Cross-Language Confusion3 hits · 15 pts
SeverityFileLineSnippetContext
HIGHtests/tests.py116 f'(builtins.filter (name: builtins.match "{test_prefix}.*" name != null) 'CODE
HIGHdocs/mdbook/legacy-redirects.py35 return null;CODE
HIGHdocs/mdbook/legacy-redirects.py38 if (t === null) return;CODE
Self-Referential Comments4 hits · 15 pts
SeverityFileLineSnippetContext
MEDIUMtests/modules/programs/abook/with-settings.cfg4# Defining a new custom fieldCOMMENT
MEDIUMtests/modules/programs/abook/with-settings.cfg11# Defining a view/tabCOMMENT
MEDIUMlib/python/generate-all-maintainers.py101 # This file is automatically generated using meta.maintainers from Home Manager evaluationCOMMENT
MEDIUMlib/bash/home-manager.sh4# This file contains a number of utilities for use by the home-manager tool andCOMMENT
Over-Commented Block10 hits · 10 pts
SeverityFileLineSnippetContext
LOWhome-manager/completion.bash1#!/bin/env bashCOMMENT
LOWhome-manager/completion.bash21#COMMENT
LOWhome-manager/completion.bash41# * run: « bash --noprofile --norc ./share/bash-completion/completions/home-manager »COMMENT
LOWhome-manager/completion.bash61# expire-generationsCOMMENT
LOWhome-manager/completion.bash81# 203COMMENT
LOWhome-manager/completion.bash101#COMMENT
LOWhome-manager/completion.bash121# Default is '~/.config/nixpkgs/home.nix'.COMMENT
LOWhome-manager/completion.bash141# switch Build and activate configurationCOMMENT
LOWhome-manager/completion.bash181#COMMENT
LOWlib/bash/home-manager.sh1#!/usr/bin/env bashCOMMENT
Fake / Example Data9 hits · 9 pts
SeverityFileLineSnippetContext
LOWtests/modules/programs/pandoc/defaults-expected.json4 "author": "John Doe"CODE
LOW…rams/thunderbird/thunderbird-expected-second-darwin.js31user_pref("mail.identity.id_bcd3ace52bed41febb6cdc2fb1303aebaa573e0d993872da503950901bb6c6fc.useremail", "hm@example.orgCODE
LOW…grams/thunderbird/thunderbird-expected-second-linux.js31user_pref("mail.identity.id_bcd3ace52bed41febb6cdc2fb1303aebaa573e0d993872da503950901bb6c6fc.useremail", "hm@example.orgCODE
LOW…grams/thunderbird/thunderbird-expected-first-darwin.js68user_pref("mail.identity.id_bcd3ace52bed41febb6cdc2fb1303aebaa573e0d993872da503950901bb6c6fc.useremail", "hm@example.orgCODE
LOW…ograms/thunderbird/thunderbird-expected-first-linux.js68user_pref("mail.identity.id_bcd3ace52bed41febb6cdc2fb1303aebaa573e0d993872da503950901bb6c6fc.useremail", "hm@example.orgCODE
LOWdocs/manual/introduction.md10 userEmail = "joe@example.org";CODE
LOWdocs/manual/introduction.md19 email = "joe@example.org"CODE
LOWdocs/manual/usage/dotfiles.md19 userName = "Jane Doe";CODE
LOWdocs/manual/usage/dotfiles.md20 userEmail = "jane.doe@example.org";CODE
Decorative Section Separators2 hits · 9 pts
SeverityFileLineSnippetContext
MEDIUMtests/modules/programs/abook/with-settings.cfg5# -----------------------------COMMENT
MEDIUMtests/modules/programs/abook/with-settings.cfg12# ---------------------COMMENT
Excessive Try-Catch Wrapping6 hits · 7 pts
SeverityFileLineSnippetContext
LOWtests/tests.py222 except Exception:CODE
LOWtests/tests.py294 except Exception:CODE
LOWlib/python/generate-all-maintainers.py76 except Exception as e:CODE
LOWlib/python/generate-all-maintainers.py135 except Exception as e:CODE
MEDIUMlib/python/generate-all-maintainers.py178 print(f"Error: Could not find maintainers.nix in {hm_root}")CODE
LOWlib/python/generate-all-maintainers.py193 except Exception as e:CODE
Structural Annotation Overuse4 hits · 6 pts
SeverityFileLineSnippetContext
LOWMAINTAINING.md53#### Step 1: On master - Mark Current as StableCOMMENT
LOWMAINTAINING.md104#### Step 2: Cut the release branchCOMMENT
LOWMAINTAINING.md112#### Step 3: On the release branch - Mark as Release BranchCOMMENT
LOWMAINTAINING.md203#### Step 4: On master - Prepare for Next ReleaseCOMMENT
Hyper-Verbose Identifiers5 hits · 5 pts
SeverityFileLineSnippetContext
LOWtests/tests.py55def _read_flake_override_paths(overrides_path: str | None) -> dict[str, str]:CODE
LOWtests/tests.py80def _format_flake_override_args(overrides: dict[str, str]) -> list[str]:CODE
LOWlib/python/manage-reviewers.py89def get_manual_reviewer_actions(CODE
LOWlib/python/generate-all-maintainers.py53 def extract_maintainers_from_meta(self) -> dict:CODE
LOWlib/python/generate-all-maintainers.py80 def generate_maintainers_file(self) -> None:CODE
Deep Nesting4 hits · 4 pts
SeverityFileLineSnippetContext
LOWtests/tests.py226CODE
LOWlib/python/validate-maintainer-entries.py14CODE
LOWlib/python/manage-reviewers.py89CODE
LOWlib/python/check-duplicate-maintainers.py16CODE
Unused Imports3 hits · 3 pts
SeverityFileLineSnippetContext
LOWdocs/mdbook/render-options.py2CODE
LOWdocs/mdbook/substitute-summary.py2CODE
LOWdocs/mdbook/convert-markup.py2CODE