Fast, accurate & comprehensive text measurement & layout
This report presents the forensic synthetic code analysis of chenglou/pretext, a TypeScript project with 49,115 GitHub stars. SynthScan v2.0 examined 43,580 lines of code across 117 source files, recording 129 pattern matches distributed across 6 syntactic categories. The overall adjusted score of 4.4 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).
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 129 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 | shared/navigation-state.ts | 23 | export function buildNavigationReportHash(report: unknown): string { | CODE |
| LOW | scripts/browser-automation.ts | 40 | function getFrontmostApplicationName(): string | null { | CODE |
| LOW | scripts/browser-automation.ts | 52 | function restoreFrontmostApplication(name: string | null): void { | CODE |
| LOW | scripts/browser-automation.ts | 167 | export async function acquireBrowserAutomationLock( | CODE |
| LOW | scripts/build-demo-site.ts | 88 | function rewriteDemoLinksForStaticRoot(html: string, targetRelativePath: string): string { | CODE |
| LOW | pages/corpus.ts | 289 | function getEnvironmentFingerprint(): EnvironmentFingerprint { | CODE |
| LOW | pages/accuracy.ts | 99 | function getEnvironmentFingerprint(): EnvironmentFingerprint { | CODE |
| LOW | pages/benchmark.ts | 255 | function buildLongBreakableStressText(repeatCount: number): string { | CODE |
| LOW | pages/benchmark.ts | 273 | function buildRichInlineStressItems(text: string): RichInlineItem[] { | CODE |
| LOW | pages/benchmark.ts | 320 | function buildPreWrapChunkStressText(seed: number, lineCount: number): string { | CODE |
| LOW | pages/benchmark.ts | 406 | function profilePrepareForBenchmark(text: string, font: string): PrepareProfile { | CODE |
| LOW | pages/benchmark.ts | 564 | function buildRichInlineBenchmarks( | CODE |
| LOW | pages/demos/dynamic-layout.ts | 236 | function getPreparedSingleLineWidth(prepared: PreparedTextWithSegments): number { | CODE |
| LOW | pages/demos/dynamic-layout.ts | 892 | requestAnimationFrame(function renderAndMaybeScheduleAnotherRender(now) { | CODE |
| LOW | pages/demos/markdown-chat.model.ts | 243 | export function createPreparedChatMessages(): PreparedChatMessage[] { | CODE |
| LOW | pages/demos/markdown-chat.model.ts | 511 | function buildPreparedInlineBlocks( | CODE |
| LOW | pages/demos/markdown-chat.model.ts | 845 | function resolveListMarkerClassName( | CODE |
| LOW | pages/demos/markdown-chat.model.ts | 906 | function stripSingleTrailingNewline(text: string): string { | CODE |
| LOW | pages/demos/wrap-geometry.ts | 73 | export function getPolygonIntervalForBand( | CODE |
| LOW | pages/demos/editorial-engine.ts | 610 | function isTextSelectionInteractionActive(): boolean { | CODE |
| LOW | pages/demos/editorial-engine.ts | 617 | scheduledRaf = requestAnimationFrame(function renderAndMaybeScheduleEditorialFrame(now) { | CODE |
| LOW | pages/demos/justification-comparison.ts | 73 | requestAnimationFrame(function syncCssOverlayAfterLayout() { | CODE |
| LOW | pages/demos/justification-comparison.model.ts | 233 | function buildMeasuredLineFromLayoutResult( | CODE |
| LOW | pages/demos/justification-comparison.model.ts | 354 | function getLineStatsFromBreakCandidates( | CODE |
| LOW | pages/demos/justification-comparison.model.ts | 436 | function buildMeasuredLineFromCandidateRange( | CODE |
| LOW | pages/demos/bubbles.html | 10 | (function syncInitialBubbleGeometry() { | CODE |
| LOW | pages/demos/bubbles.html | 212 | (function applyInitialBubbleControls() { | CODE |
| LOW | pages/demos/bubbles.html | 285 | (function applyInitialShrinkwrapRender() { | CODE |
| LOW | pages/demos/masonry/index.ts | 101 | function getOrCreateCardNode(cardIndex: number): HTMLDivElement { | CODE |
| LOW | pages/demos/masonry/index.ts | 120 | scheduledRaf = requestAnimationFrame(function renderAndMaybeScheduleAnotherRender() { | CODE |
| LOW | src/line-break.ts | 50 | function normalizeLineStartSegmentIndex( | CODE |
| LOW | src/line-break.ts | 89 | function getTabTrailingLetterSpacing( | CODE |
| LOW | src/line-break.ts | 101 | function getWholeSegmentFitContribution( | CODE |
| LOW | src/line-break.ts | 114 | function getBreakOpportunityFitContribution( | CODE |
| LOW | src/line-break.ts | 124 | function getLineEndPaintContribution( | CODE |
| LOW⚡ | src/line-break.ts | 135 | function getBreakableGraphemeAdvance( | CODE |
| LOW⚡ | src/line-break.ts | 145 | function getBreakableCandidateFitWidth( | CODE |
| LOW⚡ | src/line-break.ts | 154 | function getNextPreferredBreakIndex( | CODE |
| LOW | src/line-break.ts | 234 | function normalizeLineStartInChunk( | CODE |
| LOW | src/line-break.ts | 264 | export function normalizePreparedLineStart( | CODE |
| LOW | src/line-break.ts | 275 | function normalizeLineStartChunkIndexFromHint( | CODE |
| LOW | src/line-break.ts | 370 | function appendBreakableSegmentFrom(segmentIndex: number, startGraphemeIndex: number): void { | CODE |
| LOW | src/line-break.ts | 593 | function updatePendingBreakForWholeSegment( | CODE |
| LOW | src/line-break.ts | 610 | function appendBreakableSegmentFrom(segmentIndex: number, startGraphemeIndex: number): void { | CODE |
| LOW | src/line-break.ts | 778 | function stepPreparedChunkLineGeometry( | CODE |
| LOW | src/line-break.ts | 865 | function updatePendingBreakForWholeSegment( | CODE |
| LOW | src/line-break.ts | 882 | function appendBreakableSegmentFrom(segmentIndex: number, startGraphemeIndex: number): number | null { | CODE |
| LOW | src/line-break.ts | 1019 | function stepPreparedSimpleLineGeometry( | CODE |
| LOW | src/line-break.ts | 1144 | export function stepPreparedLineGeometryFromChunk( | CODE |
| LOW | src/line-break.ts | 1167 | export function measurePreparedLineGeometry( | CODE |
| LOW | src/measurement.ts | 116 | function getSharedGraphemeSegmenter(): Intl.Segmenter { | CODE |
| LOW | src/measurement.ts | 182 | export function getSegmentBreakableFitAdvances( | CODE |
| LOW | src/layout.ts | 78 | function getSharedGraphemeSegmenter(): Intl.Segmenter { | CODE |
| LOW | src/layout.ts | 341 | function countRenderedSpacingGraphemes( | CODE |
| LOW | src/layout.ts | 372 | function getBreakablePreferredBreaks(text: string): number[] | null { | CODE |
| LOW | src/layout.test.ts | 169 | function reconstructFromLineBoundaries( | CODE |
| LOW | src/layout.test.ts | 194 | function collectStreamedLinesWithWidths( | CODE |
| LOW | src/layout.test.ts | 219 | function reconstructFromWalkedRanges( | CODE |
| LOW | src/line-text.ts | 7 | function getSharedGraphemeSegmenter(): Intl.Segmenter { | CODE |
| LOW | src/line-text.ts | 31 | function lineHasDiscretionaryHyphen( | CODE |
| 30 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | scripts/unicode/DerivedBidiClass-17.0.0.txt | 2542 | # ================================================ | COMMENT |
| MEDIUM⚡ | scripts/unicode/DerivedBidiClass-17.0.0.txt | 2550 | # ================================================ | COMMENT |
| MEDIUM⚡ | scripts/unicode/DerivedBidiClass-17.0.0.txt | 2558 | # ================================================ | COMMENT |
| MEDIUM⚡ | scripts/unicode/DerivedBidiClass-17.0.0.txt | 2566 | # ================================================ | COMMENT |
| MEDIUM⚡ | scripts/unicode/DerivedBidiClass-17.0.0.txt | 2574 | # ================================================ | COMMENT |
| MEDIUM⚡ | scripts/unicode/DerivedBidiClass-17.0.0.txt | 2582 | # ================================================ | COMMENT |
| MEDIUM⚡ | scripts/unicode/DerivedBidiClass-17.0.0.txt | 2590 | # ================================================ | COMMENT |
| MEDIUM⚡ | scripts/unicode/DerivedBidiClass-17.0.0.txt | 2598 | # ================================================ | COMMENT |
| MEDIUM⚡ | scripts/unicode/DerivedBidiClass-17.0.0.txt | 2606 | # ================================================ | COMMENT |
| MEDIUM | scripts/unicode/DerivedBidiClass-17.0.0.txt | 10 | # ================================================ | COMMENT |
| MEDIUM | scripts/unicode/DerivedBidiClass-17.0.0.txt | 126 | # ================================================ | COMMENT |
| MEDIUM | scripts/unicode/DerivedBidiClass-17.0.0.txt | 1235 | # ================================================ | COMMENT |
| MEDIUM | scripts/unicode/DerivedBidiClass-17.0.0.txt | 1349 | # ================================================ | COMMENT |
| MEDIUM | scripts/unicode/DerivedBidiClass-17.0.0.txt | 1370 | # ================================================ | COMMENT |
| MEDIUM | scripts/unicode/DerivedBidiClass-17.0.0.txt | 1387 | # ================================================ | COMMENT |
| MEDIUM | scripts/unicode/DerivedBidiClass-17.0.0.txt | 1426 | # ================================================ | COMMENT |
| MEDIUM | scripts/unicode/DerivedBidiClass-17.0.0.txt | 1442 | # ================================================ | COMMENT |
| MEDIUM | scripts/unicode/DerivedBidiClass-17.0.0.txt | 1462 | # ================================================ | COMMENT |
| MEDIUM | scripts/unicode/DerivedBidiClass-17.0.0.txt | 1474 | # ================================================ | COMMENT |
| MEDIUM | scripts/unicode/DerivedBidiClass-17.0.0.txt | 1484 | # ================================================ | COMMENT |
| MEDIUM | scripts/unicode/DerivedBidiClass-17.0.0.txt | 1498 | # ================================================ | COMMENT |
| MEDIUM | scripts/unicode/DerivedBidiClass-17.0.0.txt | 2027 | # ================================================ | COMMENT |
| MEDIUM | scripts/unicode/DerivedBidiClass-17.0.0.txt | 2071 | # ================================================ | COMMENT |
| MEDIUM | scripts/unicode/DerivedBidiClass-17.0.0.txt | 2446 | # ================================================ | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | pages/demos/masonry/shower-thoughts.json | 1 | ["Men's public restrooms are laid out all wrong. It should be urinal, stall, urinal, stall, urinal instead of urinal, ur | CODE |
| MEDIUM⚡ | pages/demos/masonry/shower-thoughts.json | 1 | ["Men's public restrooms are laid out all wrong. It should be urinal, stall, urinal, stall, urinal instead of urinal, ur | CODE |
| LOW⚡ | pages/demos/masonry/shower-thoughts.json | 1 | ["Men's public restrooms are laid out all wrong. It should be urinal, stall, urinal, stall, urinal instead of urinal, ur | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH⚡ | pages/demos/masonry/shower-thoughts.json | 1 | ["Men's public restrooms are laid out all wrong. It should be urinal, stall, urinal, stall, urinal instead of urinal, ur | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/unicode/DerivedBidiClass-17.0.0.txt | 1 | # DerivedBidiClass-17.0.0.txt | COMMENT |
| LOW | scripts/unicode/DerivedBidiClass-17.0.0.txt | 21 | # | COMMENT |
| LOW | scripts/unicode/DerivedBidiClass-17.0.0.txt | 41 | # @missing: 07C0..085F; Right_To_Left | COMMENT |
| LOW | scripts/unicode/DerivedBidiClass-17.0.0.txt | 61 | # @missing: FE70..FEFF; Arabic_Letter | COMMENT |
| LOW | scripts/unicode/DerivedBidiClass-17.0.0.txt | 81 | # 10C00..10C4F Old_Turkic | COMMENT |
| LOW | scripts/unicode/DerivedBidiClass-17.0.0.txt | 101 | COMMENT | |
| LOW | pages/demos/wrap-geometry.ts | 121 | // Given one allowed horizontal interval and a set of blocked intervals, | COMMENT |
| LOW | src/layout.ts | 1 | // Text measurement for browser environments using canvas measureText. | COMMENT |
| LOW | src/layout.ts | 21 | // | COMMENT |
| LOW | src/layout.ts | 681 | // Layout prepared text at a given max width and caller-provided lineHeight. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | pages/demos/masonry/shower-thoughts.json | 1 | ["Men's public restrooms are laid out all wrong. It should be urinal, stall, urinal, stall, urinal instead of urinal, ur | CODE |