Free, simple, fast interactive diagrams for any GitHub repository
This report presents the forensic synthetic code analysis of ahmedkhaleel2004/gitdiagram, a TypeScript project with 15,811 GitHub stars. SynthScan v2.0 examined 19,642 lines of code across 162 source files, recording 56 pattern matches distributed across 1 syntactic category. The overall adjusted score of 3.1 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 56 distinct pattern matches across 1 syntactic category. 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 | src/app/api/generate/stream/route.ts | 123 | function isOpenAiQuotaExhaustedError(message: string): boolean { | CODE |
| LOW | src/app/browse/data.ts | 86 | export async function getCachedDefaultBrowsePreviewDiagrams(): Promise< | CODE |
| LOW | src/app/browse/data.ts | 92 | export function revalidateBrowseIndexCache() { | CODE |
| LOW | src/app/[username]/[repo]/page.tsx | 19 | async function getCachedPublicDiagramState(username: string, repo: string) { | CODE |
| LOW | src/features/diagram/api.ts | 49 | function sendGenerationCancellation( | CODE |
| LOW | src/features/diagram/graph.ts | 24 | function renderableDiagramTextSchema(maxLength: number) { | CODE |
| LOW | src/features/diagram/mermaid-security.ts | 4 | export function sanitizeMermaidSourceForRender(source: string): string { | CODE |
| LOW | src/features/browse/catalog.ts | 45 | function compareIsoDatesDescending(left: string, right: string) { | CODE |
| LOW | src/features/browse/catalog.ts | 201 | export function parseBrowseQueryFromSearchParams( | CODE |
| LOW | src/features/browse/index-client.ts | 77 | export function clearBrowsePageCacheForTest() { | CODE |
| LOW | src/server/github-auth.ts | 83 | async function requestGitHubAppInstallationToken() { | CODE |
| LOW | src/server/github-auth.ts | 135 | export async function getGitHubAppInstallationToken() { | CODE |
| LOW | src/server/storage/quota-store.ts | 78 | export async function commitQuotaUsageInUpstash(params: { | CODE |
| LOW | src/server/storage/repo-page-cache.ts | 9 | export function getPublicDiagramStateCacheTag( | CODE |
| LOW | src/server/storage/artifact-store.ts | 64 | function shouldReplaceSessionSummary( | CODE |
| LOW | src/server/storage/artifact-store.ts | 214 | export async function updateArtifactLatestSessionSummary(params: { | CODE |
| LOW | src/server/storage/diagram-state.ts | 66 | export async function persistTerminalSessionAudit(params: { | CODE |
| LOW | src/server/storage/diagram-state.ts | 108 | export async function saveSuccessfulDiagramState(params: { | CODE |
| LOW | src/server/storage/diagram-state.ts | 151 | export async function updatePublicBrowseIndexForSuccessfulDiagram(params: { | CODE |
| LOW | src/server/storage/config.ts | 6 | export function assertLiveStorageAllowedForTests(service: string): void { | CODE |
| LOW | src/server/storage/browse-diagrams.ts | 44 | function compareIsoDatesDescending(left: string, right: string) { | CODE |
| LOW | src/server/storage/browse-diagrams.ts | 48 | function normalizeBrowseIndexEntry(entry: BrowseIndexEntry): BrowseIndexEntry { | CODE |
| LOW | src/server/storage/browse-diagrams.ts | 84 | function normalizeBrowseIndexEntries( | CODE |
| LOW | src/server/storage/browse-diagrams.ts | 108 | async function readStoredBrowseIndexWith( | CODE |
| LOW⚡ | src/server/generate/complimentary-gate.ts | 66 | export function isComplimentaryGateEnabled(): boolean { | CODE |
| LOW⚡ | src/server/generate/complimentary-gate.ts | 70 | export function getComplimentaryDailyLimitTokens(): number { | CODE |
| LOW⚡ | src/server/generate/complimentary-gate.ts | 77 | export function getComplimentaryModelFamily(): string { | CODE |
| LOW⚡ | src/server/generate/complimentary-gate.ts | 83 | export function getComplimentaryQuotaDateUtc(now = new Date()): string { | CODE |
| LOW⚡ | src/server/generate/complimentary-gate.ts | 87 | export function getComplimentaryQuotaResetAt(now = new Date()): string { | CODE |
| LOW | src/server/generate/complimentary-gate.ts | 101 | export function shouldApplyComplimentaryGate(params: { | CODE |
| LOW⚡ | src/server/generate/complimentary-gate.ts | 117 | export function modelMatchesComplimentaryFamily(model: string): boolean { | CODE |
| LOW⚡ | src/server/generate/complimentary-gate.ts | 121 | export function getComplimentaryQuotaBucket(_model?: string): string { | CODE |
| LOW⚡ | src/server/generate/complimentary-gate.ts | 125 | export function buildComplimentaryAdmissionTokens( | CODE |
| LOW | src/server/generate/complimentary-gate.ts | 152 | export function buildComplimentaryStageTokenBound( | CODE |
| LOW⚡ | src/server/generate/complimentary-gate.ts | 177 | export function getComplimentaryDenialMessage(): string { | CODE |
| LOW⚡ | src/server/generate/complimentary-gate.ts | 181 | export function getComplimentaryProviderMismatchMessage(): string { | CODE |
| LOW⚡ | src/server/generate/complimentary-gate.ts | 185 | export function getComplimentaryModelMismatchMessage(): string { | CODE |
| LOW | src/server/generate/complimentary-gate.ts | 226 | export async function finalizeComplimentaryQuota(params: { | CODE |
| LOW | src/server/generate/pricing.ts | 201 | export function createEstimateCostSummary(params: { | CODE |
| LOW | src/server/generate/openai.ts | 116 | function extractChatCompletionText( | CODE |
| LOW | src/server/generate/openai.ts | 138 | function normalizeChatCompletionUsage( | CODE |
| LOW | src/server/generate/openai.ts | 163 | function buildAtlasStructuredOutputPrompt(params: { | CODE |
| LOW | src/server/generate/openai.ts | 231 | function getResponseFailureMessage(response: { | CODE |
| LOW | src/server/generate/openai.ts | 246 | async function retrieveUsageFromResponseId( | CODE |
| LOW | src/server/generate/mermaid-validator.ts | 86 | function cleanStaleServerDomGlobals() { | CODE |
| LOW | src/server/generate/session-audit.ts | 15 | export function createGenerationSessionAudit(params: { | CODE |
| LOW | src/server/generate/graph.ts | 135 | export function formatGraphValidationFeedback( | CODE |
| LOW | src/server/generate/cancellation.ts | 59 | export async function unregisterActiveGeneration( | CODE |
| LOW | src/server/generate/cancellation.ts | 80 | export function startGenerationCancellationPolling(params: { | CODE |
| LOW | src/server/generate/model-config.ts | 38 | export function supportsExactInputTokenCount(provider: AIProvider): boolean { | CODE |
| LOW | src/server/generate/model-config.ts | 49 | export function shouldUseExactInputTokenCount(params: { | CODE |
| LOW | src/components/browse-catalog-shared.ts | 111 | export function isHistoryTraversalNavigation() { | CODE |
| LOW | src/components/mermaid-diagram-helpers.ts | 34 | export function ensureDomNodesSerializeSafely() { | CODE |
| LOW | src/components/mermaid-diagram-helpers.ts | 130 | export function getDistanceBetweenPointers( | CODE |
| LOW | src/components/browse-diagram-preview.tsx | 18 | export function preloadBrowseDiagramPreviewChart() { | CODE |
| LOW | src/components/browse-catalog-loading-state.tsx | 10 | export function BrowseCatalogLoadingState(props: BrowseCatalogControlsProps) { | CODE |