Repository Analysis

microsoft/terminal

The new Windows Terminal and the original Windows console host, all in the same place!

3.9 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of microsoft/terminal, a C++ project with 103,945 GitHub stars. SynthScan v2.0 examined 354,825 lines of code across 1395 source files, recording 1309 pattern matches distributed across 12 syntactic categories. The overall adjusted score of 3.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).

3.9
Adjusted Score
3.9
Raw Score
100%
Time Factor
2026-07-13
Last Push
103.9K
Stars
C++
Language
354.8K
Lines of Code
1.4K
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 1HIGH 3MEDIUM 23LOW 1282

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 1309 distinct pattern matches across 12 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 Block1236 hits · 1210 pts
SeverityFileLineSnippetContext
LOWtools/WindbgExtension.js1COMMENT
LOW…Y/GUIConsole/GUIConsole.WPF/Properties/AssemblyInfo.cs21// COM, set the ComVisible attribute to true on that type.COMMENT
LOW…Y/GUIConsole/GUIConsole.WPF/Properties/AssemblyInfo.cs41)]COMMENT
LOW…onsole/GUIConsole.WPF/Properties/Resources.Designer.cs1//------------------------------------------------------------------------------COMMENT
LOWsamples/ConPTY/GUIConsole/GUIConsole.ConPTY/Terminal.cs21 /// A stream of VT-100-enabled output from the console.COMMENT
LOWsamples/ConPTY/MiniTerm/MiniTerm/Program.cs1using System;COMMENT
LOW…es/ConPTY/MiniTerm/MiniTerm/Properties/AssemblyInfo.cs21COMMENT
LOWsamples/ConPTY/EchoCon/EchoCon/stdafx.h1// stdafx.h : include file for standard system include files,COMMENT
LOWsamples/ConPTY/EchoCon/EchoCon/targetver.h1#pragma onceCOMMENT
LOWsamples/ConPTY/EchoCon/EchoCon/stdafx.cpp1// stdafx.cpp : source file that includes just the standard includesCOMMENT
LOWscratch/ScratchIslandApp/WindowExe/pch.h21#define WIN32_LEAN_AND_MEANCOMMENT
LOWscratch/ScratchIslandApp/WindowExe/pch.h41COMMENT
LOWscratch/ScratchIslandApp/WindowExe/pch.h61// * Media for ScaleTransformCOMMENT
LOWscratch/ScratchIslandApp/WindowExe/pch.h81#include <WinUser.h>COMMENT
LOWscratch/ScratchIslandApp/WindowExe/SampleMain.cpp1// Copyright (c) Microsoft Corporation.COMMENT
LOWscratch/ScratchIslandApp/WindowExe/SampleMain.cpp81 // cause WT to start with Ctrl-C disabled. This wouldn't matter, because it's a Windows-subsystemCOMMENT
LOWscratch/ScratchIslandApp/WindowExe/pch.cpp1// Copyright (c) Microsoft Corporation.COMMENT
LOWscratch/ScratchIslandApp/WindowExe/SampleAppHost.cpp61COMMENT
LOWscratch/ScratchIslandApp/WindowExe/resource.h1//{{NO_DEPENDENCIES}}COMMENT
LOWscratch/ScratchIslandApp/WindowExe/resource.h21#ifndef APSTUDIO_READONLY_SYMBOLSCOMMENT
LOW…atch/ScratchIslandApp/WindowExe/SampleIslandWindow.cpp201 OnSize(size.cx, size.cy);COMMENT
LOWscratch/ScratchIslandApp/SampleApp/pch.h1// Copyright (c) Microsoft Corporation.COMMENT
LOWscratch/ScratchIslandApp/SampleApp/pch.h21// Windows::UI::Xaml::Media::Animation::IStoryboard::GetCurrentTimeCOMMENT
LOWscratch/ScratchIslandApp/SampleApp/pch.h41#include <winrt/Windows.UI.Xaml.Data.h>COMMENT
LOWscratch/ScratchIslandApp/SampleApp/pch.h61COMMENT
LOWscratch/ScratchIslandApp/SampleApp/pch.cpp1// Copyright (c) Microsoft Corporation.COMMENT
LOWscratch/ScratchIslandApp/SampleApp/dll/pch.h1// Copyright (c) Microsoft Corporation.COMMENT
LOWscratch/ScratchIslandApp/SampleApp/dll/pch.cpp1// Copyright (c) Microsoft Corporation.COMMENT
LOWdep/Console/winconp.h61#define CONSOLE_REGISTRY_FONTFAMILY L"FontFamily"COMMENT
LOWdep/Console/winconp.h81#define CONSOLE_REGISTRY_WORD_DELIM L"WordDelimiters"COMMENT
LOWdep/Console/winconp.h101#define CONSOLE_REGISTRY_COPYCOLOR L"CopyColor"COMMENT
LOWdep/Console/winconp.h461UnregisterConsoleIME(COMMENT
LOWdep/Console/winconp.h481#define CONSOLE_OUTPUT_STRING L"CONOUT$"COMMENT
LOWdep/Console/winconp.h601#define PID_CONSOLE_WRAPTEXT 2COMMENT
LOWdep/Console/winconp.h661//COMMENT
LOWdep/Console/condrv.h21 Kernel and user modes.COMMENT
LOWdep/Console/condrv.h61#define CD_IO_OBJECT_TYPE_CURRENT_OUTPUT 0x02COMMENT
LOWdep/Console/ntcon.h1//COMMENT
LOWdep/Console/ntcon.h21COMMENT
LOWoss/pcg/include/pcg_random.hpp1// PCG Random Number Generation for C++COMMENT
LOWoss/stb/stb_rect_pack.h1// stb_rect_pack.h - v1.01 - public domain - rectangle packingCOMMENT
LOWoss/stb/stb_rect_pack.h21// No memory allocations; uses qsort() and assert() from stdlib.COMMENT
LOWoss/stb/stb_rect_pack.h41//COMMENT
LOWoss/stb/stb_rect_pack.h61//////////////////////////////////////////////////////////////////////////////COMMENT
LOWoss/stb/stb_rect_pack.h81typedef struct stbrp_context stbrp_context;COMMENT
LOWoss/stb/stb_rect_pack.h101// You should not try to access the 'rects' array from another threadCOMMENT
LOWoss/stb/stb_rect_pack.h121 stbrp_coord w, h;COMMENT
LOWoss/stb/stb_rect_pack.h141// Note: to guarantee best results, either:COMMENT
LOWoss/stb/stb_rect_pack.h201//COMMENT
LOWoss/stb/stb_rect_pack.h381 }COMMENT
LOWoss/chromium/base/numerics/safe_math_clang_gcc_impl.h1// Copyright 2017 The Chromium Authors. All rights reserved.COMMENT
LOWoss/chromium/base/numerics/safe_math_arm_impl.h21COMMENT
LOWoss/chromium/base/numerics/clamped_math_impl.h1// Copyright 2017 The Chromium Authors. All rights reserved.COMMENT
LOWoss/chromium/base/numerics/safe_conversions.h1// Copyright 2014 The Chromium Authors. All rights reserved.COMMENT
LOWoss/chromium/base/numerics/safe_conversions.h281 constexpr StrictNumeric(Src value) // NOLINT(runtime/explicit)COMMENT
LOWoss/chromium/base/numerics/checked_math_impl.h1// Copyright 2017 The Chromium Authors. All rights reserved.COMMENT
LOWoss/chromium/base/numerics/safe_math.h1// Copyright 2017 The Chromium Authors. All rights reserved.COMMENT
LOWoss/chromium/base/numerics/safe_conversions_impl.h1// Copyright 2014 The Chromium Authors. All rights reserved.COMMENT
LOWoss/chromium/base/numerics/safe_conversions_impl.h221// truncated to fit the mantissa of the floating point. The direction ofCOMMENT
LOWoss/chromium/base/numerics/safe_math_shared_impl.h1// Copyright 2017 The Chromium Authors. All rights reserved.COMMENT
1176 more matches not shown…
AI Slop Vocabulary16 hits · 45 pts
SeverityFileLineSnippetContext
MEDIUMoss/chromium/base/numerics/clamped_math.h44 // This is not an explicit constructor because we want a seamless conversionCOMMENT
MEDIUMoss/chromium/base/numerics/checked_math.h44 // This is not an explicit constructor because we want a seamless conversionCOMMENT
MEDIUMsrc/renderer/atlas/BackendD3D.cpp308 // it being simple to implement and robust against more peculiar fonts with unusually large/small descenders, etCOMMENT
MEDIUMsrc/renderer/atlas/BackendD2D.cpp678 // it being simple to implement and robust against more peculiar fonts with unusually large/small descenders, etCOMMENT
MEDIUMsrc/renderer/atlas/BackendD2D.cpp693 // color, it is seamless.COMMENT
MEDIUMsrc/inc/til/color.h22 // Here, we leverage the spec-legality of using unions for type conversions and theCOMMENT
LOWsrc/tools/vtpipeterm/main.cpp13#else // Building inside Windows, just use the kernel32 ones.COMMENT
MEDIUMsrc/types/CodepointWidthDetector.cpp22// Fundamentally, the trie is generated by taking all 1114112 codepoints and their assigned values and deduplicatingCOMMENT
MEDIUMsrc/types/UiaTextRangeBase.cpp985 // so leverage size_t(-1) being converted to 0xffff...COMMENT
MEDIUMsrc/host/input.cpp359 // Going back to the Win 7 behavior then should make shutdown a lot more robust.COMMENT
MEDIUMsrc/terminal/parser/base64.cpp47 // Is 4 enough? Certainly not. 6 on the other hand is just way too much. Clearly 5 is just right.COMMENT
MEDIUMsrc/terminal/parser/ft_fuzzer/fuzzing_directed.h370 // is designed to leverage the & operator overload to have CFuzzArrayCOMMENT
MEDIUMsrc/interactivity/win32/windowio.cpp988 // so they can be faithfully represented as a user "typing" into the client application. The vision would bCOMMENT
LOWsrc/cascadia/TerminalApp/TabManagement.cpp611 // GH#11107 - Always just set the item directly first so that ifCOMMENT
MEDIUMsrc/cascadia/TerminalSettingsModel/JsonUtils.h1010 // Cleverly leverage EnumMapper to do the heavy lifting.COMMENT
MEDIUM…erminalSettingsModel/CascadiaSettingsSerialization.cpp1137 // will fail; we can leverage this to detect when they are equivalent and delete the user's duplicate copies.COMMENT
Decorative Section Separators7 hits · 32 pts
SeverityFileLineSnippetContext
MEDIUMdoc/specs/#13000 - In-process ConPTY.md356// ┌──────────────────┐COMMENT
MEDIUMdoc/specs/#13000 - In-process ConPTY.md360// ╭ ├──────────────────┤ ├── VT scrollback (partially addressed)COMMENT
MEDIUMdoc/specs/#13000 - In-process ConPTY.md364// Console Buffer ──┤ ├──────────────────┤ ├──── VT Viewport (top y = 1)COMMENT
MEDIUMdoc/specs/#13000 - In-process ConPTY.md368// ╰ └──────────────────┘COMMENT
MEDIUMdoc/specs/#13000 - In-process ConPTY.md374// ┌──────────────────┐ ╮COMMENT
MEDIUMdoc/specs/#13000 - In-process ConPTY.md378// ╭ ├──────────────────┤ ╮ ╯COMMENT
MEDIUMdoc/specs/#13000 - In-process ConPTY.md382// ╰ └──────────────────┘ ╯COMMENT
Synthetic Comment Markers3 hits · 22 pts
SeverityFileLineSnippetContext
HIGH…Console/GUIConsole.WPF/Properties/Settings.Designer.cs3// This code was generated by a tool.COMMENT
HIGH…onsole/GUIConsole.WPF/Properties/Resources.Designer.cs3// This code was generated by a tool.COMMENT
HIGHsrc/tools/ColorTool/ColorTool/Resources.Designer.cs3// This code was generated by a tool.COMMENT
Structural Annotation Overuse9 hits · 15 pts
SeverityFileLineSnippetContext
LOW…ecs/#885 - Terminal Settings Model/Actions Addendum.md44### Step 1: Consolidating actionsCOMMENT
LOW…ecs/#885 - Terminal Settings Model/Actions Addendum.md100### Step 2: Querying actionsCOMMENT
LOW…ecs/#885 - Terminal Settings Model/Actions Addendum.md142### Step 3: Settings UI needsCOMMENT
LOWsrc/terminal/parser/InputStateMachineEngine.cpp989 // Step 3: check if mouse movedCOMMENT
LOWsrc/terminal/parser/InputStateMachineEngine.cpp995 // Step 4: update internal state before returning, even if we couldn't fully understand thisCOMMENT
LOWsrc/terminal/parser/InputStateMachineEngine.cpp889 // Step 1: Translate which button was affectedCOMMENT
LOWsrc/terminal/parser/InputStateMachineEngine.cpp945 // Step 2: Decide whether to set or clear that button's bitCOMMENT
LOWsrc/server/ObjectHeader.h27 // NOTE: This class must have a virtual method for the stored "this" pointers to match what we're actually looking fCOMMENT
LOWsrc/cascadia/TerminalConnection/AzureConnection.cpp783 //// Step 8: connecting to said terminalCOMMENT
Fake / Example Data10 hits · 15 pts
SeverityFileLineSnippetContext
LOWsrc/tools/ConsoleBench/main.cpp448static constexpr std::string_view s_payload_utf8{ "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmCODE
LOWsrc/tools/ConsoleBench/main.cpp448static constexpr std::string_view s_payload_utf8{ "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmCODE
LOWsrc/tools/ConsoleBench/main.cpp450static constexpr std::wstring_view s_payload_utf16{ L"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiCODE
LOWsrc/tools/ConsoleBench/main.cpp450static constexpr std::wstring_view s_payload_utf16{ L"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiCODE
LOWsrc/terminal/parser/ft_fuzzer/VTCommandFuzzer.cpp117 "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore mCODE
LOWsrc/terminal/parser/ft_fuzzer/VTCommandFuzzer.cpp117 "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore mCODE
LOWsrc/terminal/parser/ft_fuzzer/VTCommandFuzzer.cpp118 "Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem apeCODE
LOWsrc/terminal/parser/ft_fuzzer/VTCommandFuzzer.cpp118 "Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem apeCODE
LOWsrc/terminal/parser/ft_fuzzer/VTCommandFuzzer.cpp119 "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore mCODE
LOWsrc/terminal/parser/ft_fuzzer/VTCommandFuzzer.cpp119 "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore mCODE
Verbosity Indicators9 hits · 15 pts
SeverityFileLineSnippetContext
LOWsrc/terminal/parser/InputStateMachineEngine.cpp989 // Step 3: check if mouse movedCOMMENT
LOWsrc/terminal/parser/InputStateMachineEngine.cpp995 // Step 4: update internal state before returning, even if we couldn't fully understand thisCOMMENT
LOWsrc/terminal/parser/InputStateMachineEngine.cpp889 // Step 1: Translate which button was affectedCOMMENT
LOWsrc/terminal/parser/InputStateMachineEngine.cpp945 // Step 2: Decide whether to set or clear that button's bitCOMMENT
LOWsrc/interactivity/win32/windowio.cpp343 // we need to check if there is an active popup because otherwise they won't be able to receive shift+key eventsCOMMENT
LOWsrc/cascadia/TerminalCore/TerminalSelection.cpp480 // so we need to check if we're pointing to that one before returning it.COMMENT
LOWsrc/cascadia/WindowsTerminal/AppHost.cpp563 // We need to check if the top left point of the titlebar of the window is within any screenCOMMENT
LOW…c/cascadia/TerminalSettingsModel/GlobalAppSettings.cpp437 // so we need to check if they were explicitly setCOMMENT
LOWsrc/cascadia/TerminalConnection/AzureConnection.cpp783 //// Step 8: connecting to said terminalCOMMENT
Slop Phrases9 hits · 14 pts
SeverityFileLineSnippetContext
LOWsrc/inc/til/mutex.h70 // ensures you don't forget to do so, unlike with std::mutex/std::shared_mutex.COMMENT
LOW…olorTool/ConsoleTargets/TerminalSchemeConsoleTarget.cs13 Console.WriteLine("Copy and paste the following text into the schemes array of your Windows Terminal settingCODE
MEDIUMsrc/terminal/adapter/InteractDispatch.cpp77 // It's worth noting that all of this is bad design in either case.COMMENT
LOWsrc/cascadia/WindowsTerminal/NonClientIslandWindow.cpp661 // GH#5209 - make sure to use MONITOR_DEFAULTTONEAREST, so that this willCOMMENT
LOWsrc/cascadia/TerminalApp/AppCommandlineArgs.cpp397 // GH#10070 - make sure to not use the MRU order when switchingCOMMENT
LOWsrc/cascadia/TerminalControl/TermControl.cpp2823 // GH#2061 - make sure to account for the size the padding _will be_ scaled toCOMMENT
LOWsrc/cascadia/TerminalControl/TermControl.cpp2859 // GH#2061 - make sure to account for the size the padding _will be_ scaled toCOMMENT
LOWsrc/cascadia/TerminalConnection/ConptyConnection.cpp484 // GH#11556 - make sure to format the error code to this string as an UNSIGNED intCOMMENT
LOWsrc/cascadia/TerminalConnection/ConptyConnection.cpp521 // GH#11556 - make sure to format the error code to this string as an UNSIGNED intCOMMENT
Hallucination Indicators1 hit · 10 pts
SeverityFileLineSnippetContext
CRITICALtools/WindbgExtension.js24 return host.namespace.Debugger.Utility.Control.ExecuteCommand("dx Microsoft::Console::Interactivity::ServiceLocator:CODE
Unused Imports7 hits · 7 pts
SeverityFileLineSnippetContext
LOWsrc/tools/vttests/test-unicode.py16CODE
LOWsrc/tools/vttests/test-unicode.py17CODE
LOWsrc/tools/vttests/test-unicode.py18CODE
LOWsrc/tools/vttests/burrito.py17CODE
LOWsrc/tools/vttests/template.py8CODE
LOWsrc/tools/vttests/template.py9CODE
LOWsrc/tools/vttests/template.py10CODE
Excessive Try-Catch Wrapping1 hit · 2 pts
SeverityFileLineSnippetContext
MEDIUMdoc/specs/#1595 - Suggestions UI/dump-workflows.py28 print(f"Error parsing {filename}: {e}")CODE
Deep Nesting1 hit · 1 pts
SeverityFileLineSnippetContext
LOWdoc/specs/#1595 - Suggestions UI/dump-workflows.py6CODE