Repository Analysis

AnswerDotAI/fasthtml

The fastest way to create an HTML app

9.5 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of AnswerDotAI/fasthtml, a Jupyter Notebook project with 6,962 GitHub stars. SynthScan v2.0 examined 20,512 lines of code across 67 source files, recording 191 pattern matches distributed across 12 syntactic categories. The overall adjusted score of 9.5 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).

9.5
Adjusted Score
9.5
Raw Score
100%
Time Factor
2026-07-11
Last Push
7.0K
Stars
Jupyter Notebook
Language
20.5K
Lines of Code
67
Files
191
Pattern Hits
2026-07-14
Scan Date
0.07
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 5MEDIUM 5LOW 181

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 191 distinct pattern matches across 12 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.

Unused Imports149 hits · 132 pts
SeverityFileLineSnippetContext
LOWdemo/main.py1CODE
LOWtools/mk_pyi.py2CODE
LOWnbs/explains/stripe_otp.py9CODE
LOWnbs/tutorials/01_quickdraw.py1CODE
LOWnbs/tutorials/hello_world.py1CODE
LOWnbs/tutorials/02_quickdraw.py1CODE
LOWnbs/tutorials/03_quickdraw.py1CODE
LOWtests/test_toaster.py1CODE
LOWexamples/todos2.py1CODE
LOWexamples/adv_app_strip.py1CODE
LOWexamples/adv_app_strip.py2CODE
LOWexamples/adv_app_strip.py3CODE
LOWexamples/user_app.py3CODE
LOWexamples/user_app.py4CODE
LOWexamples/basic_ws.py2CODE
LOWexamples/todos3.py2CODE
LOWexamples/adv_app.py6CODE
LOWexamples/adv_app.py7CODE
LOWexamples/adv_app.py8CODE
LOWexamples/chat_ws.py1CODE
LOWexamples/minimal.py2CODE
LOWexamples/minimal.py3CODE
LOWexamples/todos4.py1CODE
LOWexamples/todos4.py2CODE
LOWexamples/todos1.py1CODE
LOWfasthtml/starlette.py1CODE
LOWfasthtml/starlette.py2CODE
LOWfasthtml/starlette.py3CODE
LOWfasthtml/starlette.py4CODE
LOWfasthtml/starlette.py5CODE
LOWfasthtml/starlette.py6CODE
LOWfasthtml/starlette.py6CODE
LOWfasthtml/starlette.py6CODE
LOWfasthtml/starlette.py6CODE
LOWfasthtml/starlette.py6CODE
LOWfasthtml/starlette.py7CODE
LOWfasthtml/starlette.py8CODE
LOWfasthtml/starlette.py9CODE
LOWfasthtml/starlette.py9CODE
LOWfasthtml/starlette.py9CODE
LOWfasthtml/starlette.py9CODE
LOWfasthtml/starlette.py9CODE
LOWfasthtml/starlette.py9CODE
LOWfasthtml/starlette.py10CODE
LOWfasthtml/starlette.py10CODE
LOWfasthtml/starlette.py10CODE
LOWfasthtml/starlette.py10CODE
LOWfasthtml/starlette.py11CODE
LOWfasthtml/starlette.py12CODE
LOWfasthtml/starlette.py13CODE
LOWfasthtml/starlette.py14CODE
LOWfasthtml/starlette.py14CODE
LOWfasthtml/starlette.py14CODE
LOWfasthtml/starlette.py14CODE
LOWfasthtml/starlette.py15CODE
LOWfasthtml/starlette.py15CODE
LOWfasthtml/starlette.py15CODE
LOWfasthtml/starlette.py15CODE
LOWfasthtml/starlette.py15CODE
LOWfasthtml/starlette.py15CODE
89 more matches not shown…
Cross-File Repetition3 hits · 15 pts
SeverityFileLineSnippetContext
HIGHnbs/llms-ctx-full.txt0import { marked } from "https://cdn.jsdelivr.net/npm/marked/lib/marked.esm.js"; proc_htmx('.markdown', e => e.innerhtml STRING
HIGHnbs/llms-ctx.txt0import { marked } from "https://cdn.jsdelivr.net/npm/marked/lib/marked.esm.js"; proc_htmx('.markdown', e => e.innerhtml STRING
HIGHexamples/adv_app.py0import { marked } from "https://cdn.jsdelivr.net/npm/marked/lib/marked.esm.js"; proc_htmx('.markdown', e => e.innerhtml STRING
Modern Structural Boilerplate12 hits · 12 pts
SeverityFileLineSnippetContext
LOWnbs/explains/stripe_otp.py4__all__ = ['DOMAIN_URL', 'app_nm', 'price_list', 'price', 'bware', 'app', 'rt', 'WEBHOOK_SECRET', 'db', 'payments',CODE
LOWfasthtml/live_reload.py5__all__ = ["FastHTMLWithLiveReload"]CODE
LOWfasthtml/js.py8__all__ = ['marked_imp', 'npmcdn', 'light_media', 'dark_media', 'MarkdownJS', 'KatexMarkdownJS', 'HighlightJS', 'SortablCODE
LOWfasthtml/xtend.py8__all__ = ['sid_scr', 'A', 'AX', 'Form', 'Hidden', 'CheckboxX', 'Script', 'Style', 'double_braces', 'undouble_braces',CODE
LOWfasthtml/core.py8__all__ = ['empty', 'htmx_hdrs', 'fh_cfg', 'htmx_resps', 'DEF_MAXPART', 'htmx_exts', 'htmxsrc', 'fhjsscr', 'surrsrc', 'sCODE
LOWfasthtml/fastapp.py8__all__ = ['fast_app']CODE
LOWfasthtml/cli.py4__all__ = ['railway_link', 'railway_deploy']CODE
LOWfasthtml/pico.py8__all__ = ['picocss', 'picolink', 'picocondcss', 'picocondlink', 'set_pico_cls', 'Card', 'Group', 'Search', 'Grid', 'DiaCODE
LOWfasthtml/svg.py8__all__ = ['g', 'svg_inb', 'Svg', 'ft_svg', 'Rect', 'Circle', 'Ellipse', 'transformd', 'Line', 'Polyline', 'Polygon', 'TCODE
LOWfasthtml/components.py8__all__ = ['named', 'html_attrs', 'hx_attrs', 'hx_evts', 'js_evts', 'hx_attrs_annotations', 'hx_evt_attrs', 'js_evt_attrCODE
LOWfasthtml/oauth.py8__all__ = ['log', 'http_patterns', 'GoogleAppClient', 'GitHubAppClient', 'HuggingFaceClient', 'DiscordAppClient',CODE
LOWfasthtml/jupyter.py8__all__ = ['nb_serve', 'nb_serve_async', 'is_port_free', 'wait_port_free', 'wait_port_free_async', 'show', 'render_ft',CODE
Cross-Language Confusion2 hits · 10 pts
SeverityFileLineSnippetContext
HIGHnbs/tutorials/03_quickdraw.py41 if (data && Object.keys(data).length > 0) {{CODE
HIGHfasthtml/xtend.py126 const p = _p ? me(_p) : null;CODE
AI Structural Patterns7 hits · 7 pts
SeverityFileLineSnippetContext
LOWfasthtml/xtend.py90CODE
LOWfasthtml/core.py920CODE
LOWfasthtml/core.py606CODE
LOWfasthtml/fastapp.py27CODE
LOWfasthtml/svg.py105CODE
LOWfasthtml/oauth.py231CODE
LOWfasthtml/jupyter.py146CODE
Slop Phrases3 hits · 5 pts
SeverityFileLineSnippetContext
MEDIUMexamples/pep8_app.py45# The `FastHTML` class is a subclass of `Starlette`, so you can use any parameters that `Starlette` accepts.COMMENT
MEDIUMexamples/adv_app.py41# The `FastHTML` class is a subclass of `Starlette`, so you can use any parameters that `Starlette` accepts. In additionSTRING
MEDIUMexamples/adv_app.py67 # fasttag objects are callable. Calling them adds children and attributes to the tag. Therefore you can use them likSTRING
Over-Commented Block4 hits · 4 pts
SeverityFileLineSnippetContext
LOWCHANGELOG.md321 htmx.process(this.api().table().node());COMMENT
LOWnbs/llms-ctx-full.txt2521 Input(id='pwd', type='password', placeholder='Password'),COMMENT
LOWnbs/llms-ctx.txt2501 # You can also use plain HTML strings in handlers and headers, which will be auto-escaped, unless you use `Safe(...sCOMMENT
LOWexamples/adv_app.py61# This function handles GET and POST requests to the `/login` path, because the name of the function automatically becomCOMMENT
Fake / Example Data4 hits · 3 pts
SeverityFileLineSnippetContext
LOWnbs/llms-ctx-full.txt256user_profile_path = profile.to(email="user@example.com") # '/profile?email=user%40example.com'CODE
LOWnbs/llms-ctx-full.txt3209 username = "John Doe"STRING
LOWnbs/llms-ctx-full.txt3249app.state.ADMIN_EMAIL = 'admin@example.org'STRING
LOWnbs/llms-ctx.txt242user_profile_path = profile.to(email="user@example.com") # '/profile?email=user%40example.com'CODE
Self-Referential Comments2 hits · 3 pts
SeverityFileLineSnippetContext
MEDIUMexamples/adv_app.py61# This function handles GET and POST requests to the `/login` path, because the name of the function automatically becomSTRING
MEDIUMfasthtml/cli.py35 mount:bool_arg=True # Create a mounted volume at /app/data?CODE
Excessive Try-Catch Wrapping2 hits · 2 pts
SeverityFileLineSnippetContext
LOWnbs/explains/stripe_otp.py103 except Exception as e:CODE
LOWnbs/explains/stripe_otp.py179 except Exception as e: return P(f"Refund failed: {str(e)}")CODE
Hyper-Verbose Identifiers2 hits · 2 pts
SeverityFileLineSnippetContext
LOWtests/test_toaster.py48def test_get_toaster_with_typehint():CODE
LOWtests/test_toaster.py55def test_toast_container_in_response():CODE
Deep Nesting1 hit · 1 pts
SeverityFileLineSnippetContext
LOWfasthtml/components.py141CODE