AI Slop Code Risk Monitor

dsherret/ts-morph

SlopCodeMonitor badge for dsherret/ts-morph Adjusted legacy signal; badge bands: 25 / 50 / 75 (different from dashboard bands).

TypeScript Compiler API wrapper for static analysis and programmatic code changes.

2.1 Low pattern signal View on GitHub

Open-Source Code Quality, Security and Technical Debt Review

This report summarizes scanner evidence for dsherret/ts-morph, a TypeScript project with 6,220 GitHub stars. SynthScan examined 133,182 lines of code across 1270 source files, recording 279 pattern matches distributed across 3 syntactic categories. The legacy adjusted pattern signal is 2.1 (Low pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

2.1
Adjusted Signal
2.1
Raw Pattern Score
100%
Time Factor
2026-09-29
Last Push
6.2K
Stars
TypeScript
Language
133.2K
Lines of Code
1.3K
Files
279
Pattern Hits
2026-10-31
Scan Date
0.00
HC Hit Rate

Risk Review · Payload v1

Use each vector to guide manual verification of the underlying findings.

Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.

Cognitive Ownership Risk 9.4/100 · LOW

Can maintainers explain intent, assumptions, and trade-offs? 274 finding(s).

Hallucinated Dependency & Supply Chain Risk 0.6/100 · LOW

Are imports declared and package/API names verified? 5 finding(s).

Agent Over-Engineering Ratio 9.4/100 · LOW

Are wrappers, guards, and repeated structures necessary? 274 finding(s).

PR Review Velocity Impact 10.3/100 · LOW

Which changes need focused human review? 279 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 0HIGH 2MEDIUM 0LOW 277

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 279 distinct pattern matches across 3 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. 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 configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Hyper-Verbose Identifiers274 hits · 264 pts
SeverityFileLineSnippetContext
LOWdocs/emitting.md104function numericLiteralToStringLiteral(node: ts.Node, context: ts.TransformationContext) {CODE
LOW…/ts-morph/scripts/config/isAllowedMixinForStructure.ts1export function isAllowedMixinForStructure(mixinName: string, structureName: string) {CODE
LOW…orph/scripts/verification/ensureArrayInputsReadonly.ts13export function ensureArrayInputsReadonly(inspector: TsMorphInspector, addProblem: (problem: Problem) => void) {CODE
LOW…ipts/verification/validatePublicApiClassMemberNames.ts13export function validatePublicApiClassMemberNames(inspector: TsMorphInspector, addProblem: (problem: Problem) => void) {CODE
LOW…ipts/verification/validateCompilerNodeToWrappedType.ts13export function validateCompilerNodeToWrappedType(inspector: TsMorphInspector, addProblem: (problem: Problem) => void) {CODE
LOW…verification/ensureClassesImplementStructureMethods.ts11export function ensureClassesImplementStructureMethods(inspector: TsMorphInspector, addProblem: (problem: Problem) => voCODE
LOW…pts/verification/ensureMixinNotAppliedMultipleTimes.ts15export function ensureMixinNotAppliedMultipleTimes(inspector: TsMorphInspector, addProblem: (problem: Problem) => void) CODE
LOW…/scripts/verification/ensureOverloadStructuresMatch.ts13export function ensureOverloadStructuresMatch(inspector: TsMorphInspector, addProblem: (problem: Problem) => void) {CODE
LOW…h/scripts/verification/ensureStructuresMatchClasses.ts14export function ensureStructuresMatchClasses(inspector: TsMorphInspector, addProblem: (problem: Problem) => void) {CODE
LOW…es/ts-morph/scripts/verification/validateCodeFences.ts30 function getDisallowedReferenceNodes() {CODE
LOW…s/ts-morph/scripts/verification/ensureOrThrowExists.ts49function doesReturnTypeRequireOrThrow(returnType: tsMorph.Type) {CODE
LOW…orph/scripts/generation/createGetStructureFunctions.ts15export function createGetStructureFunctions(structures: Structure[]) {CODE
LOW…s-morph/scripts/generation/createKindToNodeMappings.ts89 function withDefaultIndexSignature(interfaceStructure: tsMorph.InterfaceDeclarationStructure) {CODE
LOW…s/ts-morph/scripts/generation/createDeclarationFile.ts86 function makeJsDocsOneLineIfPossible() {CODE
LOW⚡…orph/scripts/generation/createForEachStructureChild.ts28export function createForEachStructureChild(inspector: TsMorphInspector) {CODE
LOW⚡…orph/scripts/generation/createForEachStructureChild.ts37function clearPreviouslyGeneratedFunctions(sourceFile: tsMorph.SourceFile) {CODE
LOW⚡…orph/scripts/generation/createForEachStructureChild.ts45function updateForEachStructureChild(sourceFile: tsMorph.SourceFile, structureInfos: StructureInfo[]) {CODE
LOW…orph/scripts/generation/createForEachStructureChild.ts209 function getTypeOrUnionElementTypes(type: tsMorph.Type) {CODE
LOW…-morph/scripts/generation/createStructureTypeGuards.ts11export function createStructureTypeGuards(inspector: TsMorphInspector) {CODE
LOW…-morph/scripts/generation/createStructureTypeGuards.ts26function clearPreviouslyGeneratedMethods(typeGuardsExpr: tsMorph.ObjectLiteralExpression) {CODE
LOW…ph/scripts/generation/createStructurePrinterFactory.ts10export function createStructurePrinterFactory(inspector: TsMorphInspector) {CODE
LOW…ph/scripts/generation/createStructurePrinterFactory.ts94 function isAllowedStructurePrinter(name: string) {CODE
LOW…ration/declarationFile/getCodeBlockWriterStatements.ts9export function getCodeBlockWriterStatements(project: tsMorph.Project): tsMorph.StatementStructures[] {CODE
LOW…ration/declarationFile/getDeclarationFileStatements.ts3export function getDeclarationFileStatements(mainFile: tsMorph.SourceFile) {CODE
LOWpackages/ts-morph/lib/ts-morph.d.ts859export declare function getCompilerOptionsFromTsConfig(filePath: string, options?: CompilerOptionsFromTsConfigOptions): CODE
LOWpackages/ts-morph/src/Project.ts149 function getTsConfigCompilerOptions() {CODE
LOWpackages/ts-morph/src/Project.ts442 function getFilePathOrSearchFunction(fileSystemWrapper: TransactionalFileSystem): StandardizedFilePath | ((file: SouCODE
LOWpackages/ts-morph/src/Project.ts703function normalizeAmbientModuleName(moduleName: string) {CODE
LOW…/textManipulators/ChangingChildOrderTextManipulator.ts95 function fillSpacingBeforeInsertion() {CODE
LOW…/textManipulators/ChangingChildOrderTextManipulator.ts105 function fillSpacingAfterInsertion() {CODE
LOW…ges/ts-morph/src/manipulation/code/getNewInsertCode.ts32 function getFormattingKindTextWithIndent(formattingKind: FormattingKind) {CODE
LOW…s/ts-morph/src/manipulation/manipulations/insertion.ts31export function insertIntoParentTextRange(opts: InsertIntoParentTextRangeOptions) {CODE
LOW…s/ts-morph/src/manipulation/manipulations/insertion.ts88export function insertIntoCommaSeparatedNodes(opts: InsertIntoCommaSeparatedNodesOptions) {CODE
LOW…s/ts-morph/src/manipulation/manipulations/insertion.ts188 function appendNodeTrailingCommentRanges(node: Node) {CODE
LOW…s/ts-morph/src/manipulation/manipulations/insertion.ts202 function getPreviousNonCommentNode() {CODE
LOW…s/ts-morph/src/manipulation/manipulations/insertion.ts260export function insertIntoBracesOrSourceFile(opts: InsertIntoBracesOrSourceFileOptions) {CODE
LOW…s/ts-morph/src/manipulation/manipulations/insertion.ts370export function insertIntoBracesOrSourceFileWithGetChildrenWithComments(opts: InsertIntoBracesOrSourceFileWithGetChildreCODE
LOW…/ts-morph/src/manipulation/manipulations/replaction.ts34export function replaceSourceFileTextForFormatting(opts: { sourceFile: SourceFile; newText: string }) {CODE
LOW…/ts-morph/src/manipulation/manipulations/replaction.ts41export function replaceSourceFileTextStraight(opts: { sourceFile: SourceFile; newText: string }) {CODE
LOW…/ts-morph/src/manipulation/manipulations/replaction.ts53export function replaceSourceFileTextForRename(opts: { sourceFile: SourceFile; renameLocations: RenameLocation[]; newNamCODE
LOW…/ts-morph/src/manipulation/manipulations/replaction.ts74export function replaceTextPossiblyCreatingChildNodes(opts: ReplaceTextPossiblyCreatingChildNodesOptions) {CODE
LOW…/ts-morph/src/manipulation/manipulations/replaction.ts100export function replaceSourceFileForFilePathMove(opts: ReplaceSourceFileForFilePathMoveOptions) {CODE
LOW…/ts-morph/src/manipulation/manipulations/replaction.ts115export function replaceSourceFileForCacheUpdate(sourceFile: SourceFile) {CODE
LOW…ges/ts-morph/src/manipulation/manipulations/removal.ts115export function removeCommaSeparatedChild(child: Node) {CODE
LOW⚡…ges/ts-morph/src/manipulation/manipulations/removal.ts148export function removeOverloadableStatementedNodeChild(node: Node & OverloadableNode) {CODE
LOW⚡…ges/ts-morph/src/manipulation/manipulations/removal.ts155export function removeStatementedNodeChild(node: Node) {CODE
LOW⚡…ges/ts-morph/src/manipulation/manipulations/removal.ts159export function removeStatementedNodeChildren(nodes: Node[]) {CODE
LOW…ges/ts-morph/src/manipulation/manipulations/removal.ts170export function removeClausedNodeChildren(nodes: Node[]) {CODE
LOW…rph/src/manipulation/nodeHandlers/RenameNodeHandler.ts41 function handleImportOrExportSpecifier(compilerFactory: CompilerFactory) {CODE
LOW…h/src/manipulation/textSeek/getNextNonWhitespacePos.ts9export function getPreviousNonWhitespacePos(text: string, pos: number) {CODE
LOW…ulation/textSeek/getPosAtStartOfLineOrNonWhitespace.ts1export function getPosAtStartOfLineOrNonWhitespace(fullText: string, pos: number) {CODE
LOW…src/manipulation/textSeek/getPosAtEndOfPreviousLine.ts1export function getPosAtEndOfPreviousLine(fullText: string, pos: number) {CODE
LOW…n/textSeek/getPosAtEndOfPreviousLineOrNonWhitespace.ts1export function getPosAtEndOfPreviousLineOrNonWhitespace(fullText: string, pos: number) {CODE
LOW…nipulation/textSeek/getPosAfterPreviousNonBlankLine.ts1export function getPosAfterPreviousNonBlankLine(text: string, pos: number) {CODE
LOW…anipulation/formatting/getInterfaceMemberFormatting.ts4export function getInterfaceMemberFormatting(parent: InterfaceDeclaration, member: Node) {CODE
LOW…lation/formatting/getStatementedNodeChildFormatting.ts5export function getStatementedNodeChildFormatting(parent: Node, member: Node) {CODE
LOW…lation/formatting/getStatementedNodeChildFormatting.ts12export function getClausedNodeChildFormatting(parent: Node, member: Node) {CODE
LOW…src/manipulation/helpers/getMixinStructureFunctions.ts67export function fromExtendsClauseableNode(node: compiler.ExtendsClauseableNode): MakeRequired<structures.ExtendsClauseabCODE
LOW…src/manipulation/helpers/getMixinStructureFunctions.ts74export function fromImplementsClauseableNode(node: compiler.ImplementsClauseableNode): MakeRequired<structures.ImplementCODE
LOW…src/manipulation/helpers/getMixinStructureFunctions.ts87export function fromQuestionTokenableNode(node: compiler.QuestionTokenableNode): MakeRequired<structures.QuestionTokenabCODE
214 more matches not shown…
Cross-Language Confusion (JS/TS)2 hits · 10 pts
SeverityFileLineSnippetContext
HIGHpackages/ts-morph/lib/ts-morph.d.ts3493 print(options?: PrintNodeOptions): string;CODE
HIGHpackages/ts-morph/src/compiler/ast/common/Node.ts231 print(options: PrintNodeOptions = {}): string {CODE
Fake / Example Data3 hits · 5 pts
SeverityFileLineSnippetContext
LOW⚡…morph/src/tests/compiler/ast/module/sourceFileTests.ts1677 * Lorem ipsumCOMMENT
LOW⚡…morph/src/tests/compiler/ast/module/sourceFileTests.ts1685 doTest(code, code.indexOf("Lorem ipsum") - 3, { line: 3, column: 1 });CODE
LOW⚡…morph/src/tests/compiler/ast/module/sourceFileTests.ts1686 doTest(code, code.indexOf("Lorem ipsum") + "Lorem ipsum".length, { line: 3, column: " * Lorem ipsum".length + 1 })CODE