A markup-based typesetting system that is powerful and easy to learn.
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).
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.
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.
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.
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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | crates/typst-render/src/lib.rs | 81 | COMMENT | |
| LOW | crates/typst-library/translations/gu.txt | 1 | # figure = | COMMENT |
| LOW | crates/typst-library/translations/ta.txt | 1 | figure = படம் | COMMENT |
| LOW | crates/typst-library/translations/ml.txt | 1 | figure = ചിത്രം | COMMENT |
| LOW | crates/typst-library/translations/alt.txt | 1 | figure = Јурук | COMMENT |
| LOW | crates/typst-library/src/lib.rs | 1 | //! Typst's standard library. | COMMENT |
| LOW | crates/typst-library/src/lib.rs | 41 | use crate::text::{Font, FontBook}; | COMMENT |
| LOW | crates/typst-library/src/lib.rs | 61 | /// The standard library. | COMMENT |
| LOW | crates/typst-library/src/lib.rs | 81 | COMMENT | |
| LOW | crates/typst-library/src/lib.rs | 161 | /// and call | COMMENT |
| LOW | crates/typst-library/src/routines.rs | 121 | /// | COMMENT |
| LOW | crates/typst-library/src/routines.rs | 141 | id: FileId, | COMMENT |
| LOW | crates/typst-library/src/routines.rs | 161 | /// A nested realization in a container (e.g. a `block` or an `html.div`). | COMMENT |
| LOW | crates/typst-library/src/diag.rs | 21 | DiagSpan, Lines, RealizeError, Span, Spanned, SyntaxDiagnostic, VirtualRoot, | COMMENT |
| LOW | crates/typst-library/src/diag.rs | 41 | /// bail!("returning a {} error with no span", "formatted"); // StrResult (no span) | COMMENT |
| LOW | crates/typst-library/src/diag.rs | 81 | /// If you just want to quickly return an error, consider the `bail!` macro. | COMMENT |
| LOW | crates/typst-library/src/diag.rs | 141 | $err.spanned_hint($crate::diag::eco_format!($hint $(, $hint_arg)*), $hint_span) | COMMENT |
| LOW | crates/typst-library/src/diag.rs | 181 | }}; | COMMENT |
| LOW | crates/typst-library/src/diag.rs | 301 | /// were detached. | COMMENT |
| LOW | crates/typst-library/src/diag.rs | 501 | { | COMMENT |
| LOW | crates/typst-library/src/diag.rs | 601 | /// A result type with a file-related error. | COMMENT |
| LOW | crates/typst-library/src/engine.rs | 21 | /// Definition of Typst's standard library. | COMMENT |
| LOW | crates/typst-library/src/engine.rs | 141 | if self.0.and_then(Span::id) == Some(id) { self.0 } else { None } | COMMENT |
| LOW | crates/typst-library/src/engine.rs | 261 | /// This is used when an engine is created from another engine. | COMMENT |
| LOW | crates/typst-library/src/loading/xml.rs | 1 | use roxmltree::ParsingOptions; | COMMENT |
| LOW | crates/typst-library/src/loading/xml.rs | 21 | /// `content` tag contains one or more paragraphs, which are represented as `p` | COMMENT |
| LOW | crates/typst-library/src/loading/xml.rs | 41 | /// | COMMENT |
| LOW | crates/typst-library/src/loading/json.rs | 1 | use ecow::eco_format; | COMMENT |
| LOW | crates/typst-library/src/loading/json.rs | 21 | /// = Example <example> | COMMENT |
| LOW | crates/typst-library/src/loading/json.rs | 41 | /// | COMMENT |
| LOW | crates/typst-library/src/loading/json.rs | 61 | /// | COMMENT |
| LOW | crates/typst-library/src/loading/json.rs | 81 | /// [@content], | COMMENT |
| LOW | crates/typst-library/src/loading/read.rs | 1 | use typst_syntax::Spanned; | COMMENT |
| LOW | crates/typst-library/src/loading/toml.rs | 1 | use ecow::eco_format; | COMMENT |
| LOW | crates/typst-library/src/loading/toml.rs | 21 | /// ```example | COMMENT |
| LOW | crates/typst-library/src/loading/toml.rs | 41 | /// [@int], | COMMENT |
| LOW | crates/typst-library/src/loading/toml.rs | 61 | /// | COMMENT |
| LOW | crates/typst-library/src/loading/toml.rs | 81 | /// == Notes <notes> | COMMENT |
| LOW | crates/typst-library/src/loading/cbor.rs | 1 | use ciborium::de::Error; | COMMENT |
| LOW | crates/typst-library/src/loading/cbor.rs | 21 | /// table.header[CBOR value][Converted into Typst], | COMMENT |
| LOW | crates/typst-library/src/loading/cbor.rs | 41 | /// [array], | COMMENT |
| LOW | crates/typst-library/src/loading/cbor.rs | 61 | /// [text via @repr], | COMMENT |
| LOW | crates/typst-library/src/loading/csv.rs | 1 | use az::SaturatingAs; | COMMENT |
| LOW | crates/typst-library/src/loading/csv.rs | 21 | /// columns: 2, | COMMENT |
| LOW | crates/typst-library/src/loading/yaml.rs | 1 | use ecow::eco_format; | COMMENT |
| LOW | crates/typst-library/src/loading/yaml.rs | 21 | /// | COMMENT |
| LOW | crates/typst-library/src/loading/yaml.rs | 41 | /// | COMMENT |
| LOW | crates/typst-library/src/loading/yaml.rs | 61 | /// #docs-table( | COMMENT |
| LOW | crates/typst-library/src/loading/yaml.rs | 81 | /// - In most cases, YAML numbers will be converted to floats or integers | COMMENT |
| LOW | crates/typst-library/src/layout/page.rs | 21 | /// Layouts its child onto one or multiple pages. | COMMENT |
| LOW | crates/typst-library/src/layout/page.rs | 41 | /// = Accessibility <accessibility> | COMMENT |
| LOW | crates/typst-library/src/layout/page.rs | 61 | pub paper: Paper, | COMMENT |
| LOW | crates/typst-library/src/layout/page.rs | 81 | #[parse( | COMMENT |
| LOW | crates/typst-library/src/layout/page.rs | 101 | #[default(Smart::Custom(Paper::A4.height().into()))] | COMMENT |
| LOW | crates/typst-library/src/layout/page.rs | 121 | /// +1 (212) 555-0155 | COMMENT |
| LOW | crates/typst-library/src/layout/page.rs | 141 | /// - `outside`: The margin at the outer side of the page (opposite to the | COMMENT |
| LOW | crates/typst-library/src/layout/page.rs | 161 | /// width: 100%, | COMMENT |
| LOW | crates/typst-library/src/layout/page.rs | 181 | /// order of precedence: | COMMENT |
| LOW | crates/typst-library/src/layout/page.rs | 201 | /// page. | COMMENT |
| LOW | crates/typst-library/src/layout/page.rs | 221 | /// On which side the pages will be bound. | COMMENT |
| 1175 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | crates/typst-library/src/visualize/tiling.rs | 242 | if !offset.v.x.abs.em.is_zero() || !offset.v.y.abs.em.is_zero() { | CODE |
| CRITICAL | crates/typst-pdf/src/tags/resolve/mod.rs | 63 | let root = gc.tags.tree.groups.list.get(GroupId::ROOT); | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | crates/typst-library/src/introspection/locator.rs | 74 | /// - To make things more robust, we can incorporate some stable knowledge about | COMMENT |
| MEDIUM | crates/typst-library/src/text/mod.rs | 594 | /// default of `{100%}`, prevents them. More nuanced cost specification for | COMMENT |
| MEDIUM | crates/typst-layout/src/inline/line.rs | 184 | // Use the trimmed range for robust boundary checks. | COMMENT |
| MEDIUM | crates/typst-layout/src/grid/lines.rs | 522 | // FIXME: Make this check more robust when footers at arbitrary | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | crates/typst-library/src/model/par.rs | 777 | /// Lorem ipsum \ | COMMENT |
| LOW | crates/typst-library/src/model/par.rs | 778 | /// dolor sit amet | COMMENT |
| LOW | crates/typst-library/src/text/lorem.rs | 10 | /// This function yields a Latin-like _Lorem Ipsum_ blind text with the given | COMMENT |
| LOW | crates/typst-library/src/text/lorem.rs | 31 | /// Generates `n` words of Lorem Ipsum text, treating `--` as a non-word | COMMENT |
| LOW | crates/typst-html/src/attr.rs | 150 | pub const placeholder: HtmlAttr = HtmlAttr::constant("placeholder"); | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | crates/typst-layout/src/math/table.rs | 64 | // This variable stores the maximum ascent and descent for each row. | COMMENT |
| LOW | crates/typst-layout/src/grid/lines.rs | 281 | // When the vline isn't at the border, we need to check if a colspan would | COMMENT |
| LOW | crates/typst-layout/src/grid/lines.rs | 406 | // When the hline isn't at the border, we need to check if a rowspan | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/src/report/report.js | 291 | function changeGlobalSourceVisibility(visible) { | CODE |
| LOW | tests/src/report/report.js | 418 | function onViewportIntersectionChanged(element, callback) { | CODE |