Repository Analysis

ghostty-org/ghostty

👻 Ghostty is a fast, feature-rich, and cross-platform terminal emulator that uses platform-native UI and GPU acceleration.

2.9 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of ghostty-org/ghostty, a Zig project with 58,138 GitHub stars. SynthScan v2.0 examined 90,471 lines of code across 432 source files, recording 213 pattern matches distributed across 14 syntactic categories. The overall adjusted score of 2.9 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).

2.9
Adjusted Score
2.9
Raw Score
100%
Time Factor
2026-07-13
Last Push
58.1K
Stars
Zig
Language
90.5K
Lines of Code
432
Files
213
Pattern Hits
2026-07-14
Scan Date
0.01
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 4MEDIUM 14LOW 195

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 213 distinct pattern matches across 14 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 Block179 hits · 168 pts
SeverityFileLineSnippetContext
LOWCMakeLists.txt1# CMake wrapper for libghostty-vtCOMMENT
LOWCMakeLists.txt21#COMMENT
LOWCMakeLists.txt41# Option 2 — find_package (after installing to a prefix):COMMENT
LOWCMakeLists.txt61#COMMENT
LOWCMakeLists.txt261# Zig target triple. For native builds, use the IMPORTED targets aboveCOMMENT
LOWmacos/GhosttyUITests/GhosttyCustomConfigCase.swift1//COMMENT
LOWmacos/Tests/NSPasteboardTests.swift21 /// Test text/html MIME type converts to .htmlCOMMENT
LOWmacos/Tests/BenchmarkTests.swift1//COMMENT
LOWmacos/Tests/Terminal/TerminalRestorableTests.swift41 @MainActorCOMMENT
LOWmacos/Tests/Terminal/TerminalRestorableTests.swift61 #expect(v5.surfaceTree.contains(where: { $0.id.uuidString == "926F3F2A-824C-40C9-87CA-2CDCA4E11049" }))COMMENT
LOWmacos/Tests/Terminal/TerminalRestorableTests.swift81 #expect(v7.effectiveFullscreenMode == .native)COMMENT
LOWmacos/Sources/App/macOS/ghostty-bridging-header.h1// C imports here are exposed to Swift.COMMENT
LOWmacos/Sources/App/macOS/AppDelegate.swift181 ifCOMMENT
LOWmacos/Sources/App/macOS/AppDelegate.swift381 }COMMENT
LOWmacos/Sources/App/macOS/AppDelegate.swift421 // more selective and only remove surface-targeted notifications.COMMENT
LOWmacos/Sources/App/macOS/AppDelegate.swift461 var config = Ghostty.SurfaceConfiguration()COMMENT
LOWmacos/Sources/Features/AppleScript/ScriptTerminal.swift1import AppKitCOMMENT
LOWmacos/Sources/Features/AppleScript/ScriptTab.swift1import AppKitCOMMENT
LOWmacos/Sources/Features/AppleScript/ScriptWindow.swift1import AppKitCOMMENT
LOWmacos/Sources/Features/AppleScript/ScriptWindow.swift21 /// Canonical representative for this scripting window's tab group.COMMENT
LOW…ces/Features/AppleScript/AppDelegate+AppleScript.swift1import AppKitCOMMENT
LOW…ces/Features/AppleScript/AppDelegate+AppleScript.swift21 /// Backing collection for `application.windows`.COMMENT
LOW…cos/Sources/Features/Terminal/TerminalController.swift441 // If our parent tab group already has this window, macOS added it andCOMMENT
LOW…cos/Sources/Features/Terminal/TerminalController.swift1101 }COMMENT
LOW…Sources/Features/Terminal/BaseTerminalController.swift1import CocoaCOMMENT
LOW…Sources/Features/Terminal/BaseTerminalController.swift1021COMMENT
LOW…al/Window Styles/TitlebarTabsTahoeTerminalWindow.swift141 /// is removed from the view hierarchy.COMMENT
LOW…os/Sources/Features/App Intents/IntentPermission.swift1import AppKitCOMMENT
LOWmacos/Sources/Features/Splits/SplitView.swift1import SwiftUICOMMENT
LOWmacos/Sources/Features/Splits/SplitTree.swift241COMMENT
LOWmacos/Sources/Features/Splits/SplitTree.swift501 ///COMMENT
LOWmacos/Sources/Features/Splits/SplitTree.swift821 /// to 2D coordinate space. The coordinate system uses (0,0) as the top-left corner withCOMMENT
LOWmacos/Sources/Features/Splits/SplitTree.swift841 /// //COMMENT
LOWmacos/Sources/Features/Splits/SplitTree.swift861 height = Double(h)COMMENT
LOWmacos/Sources/Features/Splits/SplitTree.swift881 /// - **Vertical splits**: Width = max of children widths, Height = sum of children heightsCOMMENT
LOWmacos/Sources/Features/Splits/SplitTree.swift921 /// This method recursively traverses the split tree and calculates the precise boundsCOMMENT
LOWmacos/Sources/Features/Splits/SplitTree.swift1001COMMENT
LOWmacos/Sources/Features/Splits/SplitTree.swift1361 /// - The tree's hierarchical structure (splits and their directions)COMMENT
LOWmacos/Sources/Helpers/ExpiringUndoManager.swift1/// An UndoManager subclass that supports registering undo operations that automatically expire after a specified duratiCOMMENT
LOWmacos/Sources/Helpers/ExpiringUndoManager.swift81 // but we want to make sure it happens right now.COMMENT
LOWmacos/Sources/Helpers/NonDraggableHostingView.swift1import SwiftUICOMMENT
LOWmacos/Sources/Helpers/Extensions/NSMenu+Extension.swift1import AppKitCOMMENT
LOWmacos/Sources/Ghostty/Ghostty.App.swift681COMMENT
LOW…/Sources/Ghostty/Surface View/SurfaceView_AppKit.swift841 }COMMENT
LOW…/Sources/Ghostty/Surface View/SurfaceView_AppKit.swift1161 returnCOMMENT
LOW…/Sources/Ghostty/Surface View/SurfaceView_AppKit.swift1261 /// event dispatch system and use this timestamp as an identity to know to actually send it to keyDown.COMMENT
LOW…/Sources/Ghostty/Surface View/SurfaceView_AppKit.swift1941 // selection range or contains it but a lot of macOS system behaviors requestCOMMENT
LOW…/Sources/Ghostty/Surface View/SurfaceView_AppKit.swift2121extension Ghostty.SurfaceView: NSServicesMenuRequestor {COMMENT
LOW…s/Sources/Ghostty/Surface View/SurfaceScrollView.swift1import SwiftUICOMMENT
LOW…s/Sources/Ghostty/Surface View/SurfaceScrollView.swift281 guard row != lastSentRow else { return }COMMENT
LOW…s/Sources/Ghostty/Surface View/SurfaceScrollView.swift301 returnCOMMENT
LOW…s/Sources/Ghostty/Surface View/SurfaceScrollView.swift321 ///COMMENT
LOWmacos/Sources/Ghostty/Surface View/SurfaceView.swift581 }COMMENT
LOWnix/build-support/check-zig-cache.sh1#!/usr/bin/env bashCOMMENT
LOWinclude/ghostty.h1// Ghostty embedding API. The documentation for the embedding API isCOMMENT
LOWinclude/ghostty.h21typedef SSIZE_T ssize_t;COMMENT
LOWinclude/ghostty.h41 #ifdef GHOSTTY_BUILD_SHAREDCOMMENT
LOWinclude/ghostty/vt.h121 * PNG decoder callback and send a Kitty Graphics Protocol image.COMMENT
LOWinclude/ghostty/vt.h141#include <ghostty/vt/grid_ref.h>COMMENT
LOWinclude/ghostty/vt/device.h21#define GHOSTTY_DA_CONFORMANCE_VT220 62COMMENT
119 more matches not shown…
Self-Referential Comments8 hits · 30 pts
SeverityFileLineSnippetContext
MEDIUMinclude/ghostty/vt/terminal.h98 * ### Defining a write_pty callbackCOMMENT
MEDIUMinclude/ghostty/vt/terminal.h101 * ### Defining a bell callbackCOMMENT
MEDIUMinclude/ghostty/vt/terminal.h104 * ### Defining a title_changed callbackCOMMENT
MEDIUMinclude/ghostty/vt/terminal.h107 * ### Defining a clipboard_write callbackCOMMENT
MEDIUMinclude/ghostty/vt/sys.h33 * ### Defining a PNG decode callbackCOMMENT
MEDIUMsrc/shell-integration/bash/bash-preexec.sh135# This function is installed as part of the PROMPT_COMMAND;COMMENT
MEDIUMsrc/shell-integration/bash/bash-preexec.sh143# This function is installed as part of the PROMPT_COMMAND.COMMENT
MEDIUMsrc/shell-integration/bash/bash-preexec.sh203# This function is installed as the DEBUG trap. It is invoked before eachCOMMENT
Synthetic Comment Markers2 hits · 15 pts
SeverityFileLineSnippetContext
HIGH…cos/Sources/Features/Terminal/TerminalController.swift1703 // Initial size as requested by the configuration (e.g. `window-width`)COMMENT
HIGH…os/Sources/Helpers/Extensions/NSScreen+Extension.swift57 /// - Returns: CGPoint suitable for setFrameOrigin that positions the window as requestedCOMMENT
Decorative Section Separators3 hits · 9 pts
SeverityFileLineSnippetContext
MEDIUMCMakeLists.txt12# ---------------------------------COMMENT
MEDIUMCMakeLists.txt23# ---------------------------------------------COMMENT
MEDIUMCMakeLists.txt48# -------------------COMMENT
AI Response Leakage1 hit · 8 pts
SeverityFileLineSnippetContext
HIGHCONTRIBUTING.md132### I've implemented a featureCOMMENT
AI Slop Vocabulary3 hits · 8 pts
SeverityFileLineSnippetContext
MEDIUM…cos/Sources/Features/Terminal/TerminalController.swift493 // is used in the tab bar. This fixes that. If we can find a more robustCOMMENT
MEDIUMmacos/Sources/Features/Splits/SplitTree.swift617 // be robust against it.COMMENT
LOWnix/build-support/fetch-zig-cache.sh8# at all and packagers can just use `zig build --fetch`.COMMENT
Fake / Example Data4 hits · 4 pts
SeverityFileLineSnippetContext
LOWmacos/GhosttyUITests/GhosttyMouseStateTests.swift16 let lines = (1...200).map { "Line \($0): The quick brown fox jumps over the lazy dog. Lorem ipsum dolor sit ametCODE
LOWmacos/GhosttyUITests/GhosttyMouseStateTests.swift16 let lines = (1...200).map { "Line \($0): The quick brown fox jumps over the lazy dog. Lorem ipsum dolor sit ametCODE
LOWsrc/cli/lorem_ipsum.txt1Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras hendrerit aliquetCODE
LOWsrc/cli/lorem_ipsum.txt1Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras hendrerit aliquetCODE
Deep Nesting4 hits · 4 pts
SeverityFileLineSnippetContext
LOWsrc/font/nerd_font_codegen.py304CODE
LOWsrc/font/nerd_font_codegen.py414CODE
LOWsrc/font/nerd_font_codegen.py95CODE
LOWsrc/font/nerd_font_codegen.py156CODE
Example Usage Blocks2 hits · 3 pts
SeverityFileLineSnippetContext
LOWmacos/Sources/Features/Splits/SplitTree.swift1369 /// Example usage:COMMENT
LOWmacos/Sources/Helpers/ExpiringUndoManager.swift6/// Example usage:COMMENT
Slop Phrases1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMinclude/ghostty/vt/wasm.h33 * Here's a simple example of using the Wasm utilities with the key encoder:COMMENT
Redundant / Tautological Comments2 hits · 3 pts
SeverityFileLineSnippetContext
LOWsrc/shell-integration/bash/ghostty.bash99 # Check if argument is '-e' or '--edit' (sudoedit flags)COMMENT
LOWsrc/shell-integration/bash/ghostty.bash104 # Check if argument is neither an option nor a key-value pairCOMMENT
Cross-Language Confusion1 hit · 2 pts
SeverityFileLineSnippetContext
HIGHsrc/font/nerd_font_codegen.py576 f.write("\n else => null,\n };\n}\n")STRING
Hyper-Verbose Identifiers2 hits · 2 pts
SeverityFileLineSnippetContext
LOWsrc/font/nerd_font_codegen.py203def coalesce_codepoints_to_ranges(codepoints: list[int]) -> list[tuple[int, int]]:CODE
LOWsrc/font/nerd_font_codegen.py304def generate_codepoint_tables(CODE
Structural Annotation Overuse1 hit · 2 pts
SeverityFileLineSnippetContext
LOWsrc/shell-integration/bash/bash-preexec.sh56# WARNING: This variable is no longer used and should not be relied upon.COMMENT