Repository Analysis

typst/typst

A markup-based typesetting system that is powerful and easy to learn.

7.3 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of typst/typst, a Rust project with 54,893 GitHub stars. SynthScan v2.0 examined 170,475 lines of code across 596 source files, recording 1251 pattern matches distributed across 6 syntactic categories. The overall adjusted score of 7.3 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).

7.3
Adjusted Score
7.3
Raw Score
100%
Time Factor
2026-07-13
Last Push
54.9K
Stars
Rust
Language
170.5K
Lines of Code
596
Files
1.3K
Pattern Hits
2026-07-14
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

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 2HIGH 0MEDIUM 4LOW 1245

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 1251 distinct pattern matches across 6 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 Block1235 hits · 1192 pts
SeverityFileLineSnippetContext
LOWcrates/typst-render/src/lib.rs81COMMENT
LOWcrates/typst-library/translations/gu.txt1# figure =COMMENT
LOWcrates/typst-library/translations/ta.txt1figure = படம்COMMENT
LOWcrates/typst-library/translations/ml.txt1figure = ചിത്രംCOMMENT
LOWcrates/typst-library/translations/alt.txt1figure = ЈурукCOMMENT
LOWcrates/typst-library/src/lib.rs1//! Typst's standard library.COMMENT
LOWcrates/typst-library/src/lib.rs41use crate::text::{Font, FontBook};COMMENT
LOWcrates/typst-library/src/lib.rs61 /// The standard library.COMMENT
LOWcrates/typst-library/src/lib.rs81COMMENT
LOWcrates/typst-library/src/lib.rs161/// and callCOMMENT
LOWcrates/typst-library/src/routines.rs121///COMMENT
LOWcrates/typst-library/src/routines.rs141 id: FileId,COMMENT
LOWcrates/typst-library/src/routines.rs161 /// A nested realization in a container (e.g. a `block` or an `html.div`).COMMENT
LOWcrates/typst-library/src/diag.rs21 DiagSpan, Lines, RealizeError, Span, Spanned, SyntaxDiagnostic, VirtualRoot,COMMENT
LOWcrates/typst-library/src/diag.rs41/// bail!("returning a {} error with no span", "formatted"); // StrResult (no span)COMMENT
LOWcrates/typst-library/src/diag.rs81/// If you just want to quickly return an error, consider the `bail!` macro.COMMENT
LOWcrates/typst-library/src/diag.rs141 $err.spanned_hint($crate::diag::eco_format!($hint $(, $hint_arg)*), $hint_span)COMMENT
LOWcrates/typst-library/src/diag.rs181 }};COMMENT
LOWcrates/typst-library/src/diag.rs301/// were detached.COMMENT
LOWcrates/typst-library/src/diag.rs501{COMMENT
LOWcrates/typst-library/src/diag.rs601/// A result type with a file-related error.COMMENT
LOWcrates/typst-library/src/engine.rs21 /// Definition of Typst's standard library.COMMENT
LOWcrates/typst-library/src/engine.rs141 if self.0.and_then(Span::id) == Some(id) { self.0 } else { None }COMMENT
LOWcrates/typst-library/src/engine.rs261 /// This is used when an engine is created from another engine.COMMENT
LOWcrates/typst-library/src/loading/xml.rs1use roxmltree::ParsingOptions;COMMENT
LOWcrates/typst-library/src/loading/xml.rs21/// `content` tag contains one or more paragraphs, which are represented as `p`COMMENT
LOWcrates/typst-library/src/loading/xml.rs41///COMMENT
LOWcrates/typst-library/src/loading/json.rs1use ecow::eco_format;COMMENT
LOWcrates/typst-library/src/loading/json.rs21/// = Example <example>COMMENT
LOWcrates/typst-library/src/loading/json.rs41///COMMENT
LOWcrates/typst-library/src/loading/json.rs61///COMMENT
LOWcrates/typst-library/src/loading/json.rs81/// [@content],COMMENT
LOWcrates/typst-library/src/loading/read.rs1use typst_syntax::Spanned;COMMENT
LOWcrates/typst-library/src/loading/toml.rs1use ecow::eco_format;COMMENT
LOWcrates/typst-library/src/loading/toml.rs21/// ```exampleCOMMENT
LOWcrates/typst-library/src/loading/toml.rs41/// [@int],COMMENT
LOWcrates/typst-library/src/loading/toml.rs61///COMMENT
LOWcrates/typst-library/src/loading/toml.rs81/// == Notes <notes>COMMENT
LOWcrates/typst-library/src/loading/cbor.rs1use ciborium::de::Error;COMMENT
LOWcrates/typst-library/src/loading/cbor.rs21/// table.header[CBOR value][Converted into Typst],COMMENT
LOWcrates/typst-library/src/loading/cbor.rs41/// [array],COMMENT
LOWcrates/typst-library/src/loading/cbor.rs61/// [text via @repr],COMMENT
LOWcrates/typst-library/src/loading/csv.rs1use az::SaturatingAs;COMMENT
LOWcrates/typst-library/src/loading/csv.rs21/// columns: 2,COMMENT
LOWcrates/typst-library/src/loading/yaml.rs1use ecow::eco_format;COMMENT
LOWcrates/typst-library/src/loading/yaml.rs21///COMMENT
LOWcrates/typst-library/src/loading/yaml.rs41///COMMENT
LOWcrates/typst-library/src/loading/yaml.rs61/// #docs-table(COMMENT
LOWcrates/typst-library/src/loading/yaml.rs81/// - In most cases, YAML numbers will be converted to floats or integersCOMMENT
LOWcrates/typst-library/src/layout/page.rs21/// Layouts its child onto one or multiple pages.COMMENT
LOWcrates/typst-library/src/layout/page.rs41/// = Accessibility <accessibility>COMMENT
LOWcrates/typst-library/src/layout/page.rs61 pub paper: Paper,COMMENT
LOWcrates/typst-library/src/layout/page.rs81 #[parse(COMMENT
LOWcrates/typst-library/src/layout/page.rs101 #[default(Smart::Custom(Paper::A4.height().into()))]COMMENT
LOWcrates/typst-library/src/layout/page.rs121 /// +1 (212) 555-0155COMMENT
LOWcrates/typst-library/src/layout/page.rs141 /// - `outside`: The margin at the outer side of the page (opposite to theCOMMENT
LOWcrates/typst-library/src/layout/page.rs161 /// width: 100%,COMMENT
LOWcrates/typst-library/src/layout/page.rs181 /// order of precedence:COMMENT
LOWcrates/typst-library/src/layout/page.rs201 /// page.COMMENT
LOWcrates/typst-library/src/layout/page.rs221 /// On which side the pages will be bound.COMMENT
1175 more matches not shown…
Hallucination Indicators2 hits · 20 pts
SeverityFileLineSnippetContext
CRITICALcrates/typst-library/src/visualize/tiling.rs242 if !offset.v.x.abs.em.is_zero() || !offset.v.y.abs.em.is_zero() {CODE
CRITICALcrates/typst-pdf/src/tags/resolve/mod.rs63 let root = gc.tags.tree.groups.list.get(GroupId::ROOT);CODE
AI Slop Vocabulary4 hits · 12 pts
SeverityFileLineSnippetContext
MEDIUMcrates/typst-library/src/introspection/locator.rs74/// - To make things more robust, we can incorporate some stable knowledge aboutCOMMENT
MEDIUMcrates/typst-library/src/text/mod.rs594 /// default of `{100%}`, prevents them. More nuanced cost specification forCOMMENT
MEDIUMcrates/typst-layout/src/inline/line.rs184 // Use the trimmed range for robust boundary checks.COMMENT
MEDIUMcrates/typst-layout/src/grid/lines.rs522 // FIXME: Make this check more robust when footers at arbitraryCOMMENT
Fake / Example Data5 hits · 7 pts
SeverityFileLineSnippetContext
LOWcrates/typst-library/src/model/par.rs777/// Lorem ipsum \COMMENT
LOWcrates/typst-library/src/model/par.rs778/// dolor sit ametCOMMENT
LOWcrates/typst-library/src/text/lorem.rs10/// This function yields a Latin-like _Lorem Ipsum_ blind text with the givenCOMMENT
LOWcrates/typst-library/src/text/lorem.rs31/// Generates `n` words of Lorem Ipsum text, treating `--` as a non-wordCOMMENT
LOWcrates/typst-html/src/attr.rs150pub const placeholder: HtmlAttr = HtmlAttr::constant("placeholder");CODE
Verbosity Indicators3 hits · 4 pts
SeverityFileLineSnippetContext
LOWcrates/typst-layout/src/math/table.rs64 // This variable stores the maximum ascent and descent for each row.COMMENT
LOWcrates/typst-layout/src/grid/lines.rs281 // When the vline isn't at the border, we need to check if a colspan wouldCOMMENT
LOWcrates/typst-layout/src/grid/lines.rs406 // When the hline isn't at the border, we need to check if a rowspanCOMMENT
Hyper-Verbose Identifiers2 hits · 2 pts
SeverityFileLineSnippetContext
LOWtests/src/report/report.js291function changeGlobalSourceVisibility(visible) {CODE
LOWtests/src/report/report.js418function onViewportIntersectionChanged(element, callback) {CODE