AI Slop Code Risk Monitor

yarnpkg/berry

SlopCodeMonitor badge for yarnpkg/berry Adjusted legacy signal; badge bands: 25 / 50 / 75 (different from dashboard bands).

📦🐈 Active development trunk for Yarn ⚒

1.1 Low pattern signal View on GitHub

Open-Source Code Quality, Security and Technical Debt Review

This report summarizes scanner evidence for yarnpkg/berry, a TypeScript project with 8,122 GitHub stars. SynthScan examined 134,763 lines of code across 1206 source files, recording 123 pattern matches distributed across 10 syntactic categories. The legacy adjusted pattern signal is 1.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.

1.1
Adjusted Signal
1.1
Raw Pattern Score
100%
Time Factor
2026-10-27
Last Push
8.1K
Stars
TypeScript
Language
134.8K
Lines of Code
1.2K
Files
123
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 5.0/100 · LOW

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

Hallucinated Dependency & Supply Chain Risk 0.4/100 · LOW

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

Agent Over-Engineering Ratio 2.2/100 · LOW

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

PR Review Velocity Impact 5.4/100 · LOW

Which changes need focused human review? 123 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 1HIGH 0MEDIUM 9LOW 113

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 123 distinct pattern matches across 10 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 Identifiers61 hits · 61 pts
SeverityFileLineSnippetContext
LOWpackages/plugin-npm-cli/sources/commands/npm/login.ts202async function loginOrRegisterViaPassword({registry, configuration, report, stdin, stdout}: CredentialOptions): Promise<CODE
LOW…g-tests-specs/sources/commands/workspaces/list.test.js421function makeWorkspacesListSinceEnv(cb) {CODE
LOW…ests-specs/sources/commands/workspaces/foreach.test.js949function makeWorkspacesForeachSinceEnv(cb) {CODE
LOWpackages/yarnpkg-shell/sources/pipe.ts342export function createOutputStreamsWithPrefix(state: ShellState, {prefix}: {prefix: string | null}) {CODE
LOWpackages/yarnpkg-shell/sources/index.ts931function locateArgsVariableInSegment(segment: ArgumentSegment | ArithmeticPrimary): boolean {CODE
LOWpackages/yarnpkg-shell/sources/index.ts948function locateArgsVariableInArgument(arg: Argument): boolean {CODE
LOWpackages/yarnpkg-shell/sources/index.ts961function locateArgsVariableInArithmetic(arg: ArithmeticExpression): boolean {CODE
LOWpackages/yarnpkg-pnp/sources/generateSerializedState.ts36function generateFallbackExclusionList(settings: PnpSettings): Array<[string, Array<string>]> {CODE
LOWpackages/yarnpkg-pnp/sources/generateSerializedState.ts62function generatePackageRegistryData(settings: PnpSettings): PackageRegistryData {CODE
LOWpackages/yarnpkg-pnp/sources/loader/nodeUtils.ts58export function reportRequiredFilesToWatchMode(paths: Array<PortablePath>) {CODE
LOWpackages/yarnpkg-pnp/sources/loader/makeApi.ts169 function getPackageInformationSafe(packageLocator: PackageLocator): PackageInformation<PortablePath> {CODE
LOWpackages/yarnpkg-pnp/sources/loader/makeApi.ts207 function applyNodeExportsResolution(unqualifiedPath: PortablePath, conditions: Set<string> = defaultExportsConditions,CODE
LOWpackages/yarnpkg-pnp/sources/loader/makeApi.ts264 function applyNodeExtensionResolution(unqualifiedPath: PortablePath, candidates: Array<PortablePath>, {extensions}: {eCODE
LOWpackages/yarnpkg-pnp/sources/loader/makeApi.ts458 function findBrokenPeerDependencies(dependency: string, initialPackage: PhysicalPackageLocator): Array<PhysicalPackageCODE
LOWpackages/yarnpkg-pnp/sources/node/resolve.js68function throwInvalidPackageTarget(CODE
LOWpackages/yarnpkg-pnp/sources/node/resolve.js93function resolvePackageTargetString(CODE
LOWpackages/yarnpkg-pnp/sources/node/resolve.js285function isConditionalExportsMainSugar(exports, packageJSONUrl, base) {CODE
LOWpackages/yarnpkg-pnp/sources/node/resolve.js320function emitTrailingSlashPatternDeprecation(match, pjsonUrl, base) {CODE
LOWpackages/plugin-npm/sources/npmHttpUtils.ts39export async function handleInvalidAuthenticationError(error: any, {attemptedAs, registry, headers, configuration}: {attCODE
LOWpackages/plugin-npm/sources/npmHttpUtils.ts87async function loadPackageMetadataInfoFromDisk(identPath: PortablePath) {CODE
LOWpackages/plugin-npm/sources/npmHttpUtils.ts107async function loadPackageMetadataInfoFromNetwork(identPath: PortablePath, ident: Ident, {configuration, cached, registrCODE
LOWpackages/plugin-pnp/sources/jsInstallUtils.ts4export function checkManifestCompatibility(pkg: Package) {CODE
LOWpackages/plugin-version/sources/versionUtils.ts313export function getUndecidedDependentWorkspaces(versionFile: Pick<VersionFile, `project` | `releases`>, {include = new SCODE
LOWpackages/plugin-patch/sources/patchUtils.ts65export function ensureUnpatchedDescriptor(descriptor: Descriptor) {CODE
LOWpackages/plugin-nm/sources/NodeModulesLinker.ts954function syncPreinstallStateWithDisk(locationTree: LocationTree, binSymlinks: BinSymlinkMap, stateMtimeMs: number, projeCODE
LOWpackages/yarnpkg-libzip/sources/libzipAsync.js275 function updateGlobalBufferAndViews(buf) {CODE
LOWpackages/yarnpkg-libzip/sources/libzipAsync.js427 function receiveInstantiationResult(result) {CODE
LOWpackages/yarnpkg-libzip/sources/libzipSync.js274 function updateGlobalBufferAndViews(buf) {CODE
LOWpackages/yarnpkg-core/tests/httpUtils.test.ts38 function getPluginsWithMockWrapNetworkRequestPlugin() {CODE
LOWpackages/yarnpkg-core/sources/Project.ts2160function applyVirtualResolutionMutations({CODE
LOWpackages/yarnpkg-core/sources/Project.ts2686function emitPeerDependencyWarnings(project: Project, report: Report) {CODE
LOWpackages/yarnpkg-core/sources/tgzUtils.ts45export function getTaskPoolForConfiguration(configuration: Configuration | void): ZipWorkerPool {CODE
LOWpackages/yarnpkg-core/sources/formatUtils.ts492export function prettyTruncatedLocatorList(configuration: Configuration, locators: Array<Locator>, recommendedLength: nuCODE
LOWpackages/yarnpkg-core/sources/scriptUtils.ts488async function initializeWorkspaceEnvironment(workspace: Workspace, {binFolder, cwd, lifecycleScript}: {binFolder: PortaCODE
LOWpackages/yarnpkg-core/sources/scriptUtils.ts517async function initializePackageEnvironment(locator: Locator, {project, binFolder, cwd, lifecycleScript}: {project: ProjCODE
LOWpackages/yarnpkg-core/sources/scriptUtils.ts571export async function executeWorkspaceLifecycleScript(workspace: Workspace, lifecycleScriptName: string, {cwd, report}: CODE
LOWpackages/yarnpkg-core/sources/scriptUtils.ts601export async function maybeExecuteWorkspaceLifecycleScript(workspace: Workspace, lifecycleScriptName: string, opts: ExecCODE
LOWpackages/yarnpkg-core/sources/scriptUtils.ts655export async function getPackageAccessibleBinaries(locator: Locator, {project}: GetPackageAccessibleBinariesOptions): PrCODE
LOWpackages/yarnpkg-core/sources/scriptUtils.ts727export async function getWorkspaceAccessibleBinaries(workspace: Workspace) {CODE
LOWpackages/yarnpkg-core/sources/scriptUtils.ts763export async function executePackageAccessibleBinary(locator: Locator, binaryName: string, args: Array<string>, {cwd, prCODE
LOWpackages/yarnpkg-core/sources/scriptUtils.ts807export async function executeWorkspaceAccessibleBinary(workspace: Workspace, binaryName: string, args: Array<string>, {cCODE
LOWpackages/yarnpkg-core/sources/structUtils.ts79export function convertDescriptorToLocator(descriptor: Descriptor): Locator {CODE
LOWpackages/yarnpkg-core/sources/structUtils.ts91export function convertLocatorToDescriptor(locator: Locator): Descriptor {CODE
LOWpackages/yarnpkg-core/sources/structUtils.ts216export function ensureDevirtualizedDescriptor(descriptor: Descriptor): Descriptor {CODE
LOWpackages/yarnpkg-core/sources/structUtils.ts227export function ensureDevirtualizedLocator(locator: Locator): Locator {CODE
LOWpackages/yarnpkg-core/sources/structUtils.ts303export function areVirtualPackagesEquivalent(a: Package, b: Package) {CODE
LOWpackages/yarnpkg-cli/sources/lib.ts189 function unexpectedTerminationHandler() {CODE
LOWpackages/yarnpkg-parsers/sources/shell.ts37export function stringifyCommandChainThen(commandChainThen: CommandChainThen): string {CODE
LOWpackages/yarnpkg-parsers/sources/shell.ts77export function stringifyRedirectArgument(argument: RedirectArgument): string {CODE
LOWpackages/yarnpkg-parsers/sources/shell.ts165export function stringifyArithmeticExpression(argument: ArithmeticExpression): string {CODE
LOWpackages/plugin-jsr/sources/helpers.ts4export function convertDescriptorFromJsrToNpm(dependency: Descriptor) {CODE
LOWpackages/plugin-jsr/sources/helpers.ts17export function convertLocatorFromJsrToNpm(locator: Locator) {CODE
LOWpackages/plugin-jsr/sources/helpers.ts21export function convertLocatorFromNpmToJsr(locator: Locator) {CODE
LOWpackages/docusaurus/src/components/StarrySky.tsx44function resizeRendererToDisplaySize(renderer: THREE.Renderer) {CODE
LOWpackages/yarnpkg-doctor/sources/cli.ts80function checkForUndeclaredDependency(workspace: Workspace, referenceNode: ts.Node, moduleName: string, {configuration, CODE
LOWpackages/yarnpkg-doctor/sources/cli.ts95function checkForUnsafeWebpackLoaderAccess(workspace: Workspace, initializerNode: ts.Node, {configuration, report}: {conCODE
LOWpackages/yarnpkg-doctor/sources/cli.ts105function checkForNodeModuleStrings(stringishNode: ts.StringLiteral | ts.NoSubstitutionTemplateLiteral | ts.TemplateExpreCODE
LOWpackages/yarnpkg-doctor/sources/cli.ts223async function checkForUnmetPeerDependency(workspace: Workspace, dependencyType: HardDependencies, via: Descriptor, peerCODE
LOWpackages/vscode-zipfs/sources/TerminalLinkProvider.ts28export function registerTerminalLinkProvider() {CODE
LOWpackages/plugin-essentials/sources/suggestUtils.ts177export async function extractDescriptorFromPath(path: PortablePath, {cwd, workspace}: {cwd: PortablePath, workspace: WorCODE
1 more matches not shown…
Over-Commented Block39 hits · 39 pts
SeverityFileLineSnippetContext
LOW.yarn/sdks/typescript/lib/tsserverlibrary.js81 // VSCode only adds it automatically for supported schemes,COMMENT
LOW.yarn/sdks/typescript/lib/tsserver.js81 // VSCode only adds it automatically for supported schemes,COMMENT
LOW…cceptance-tests/pkg-tests-specs/sources/dragon.test.js21 },COMMENT
LOW…cceptance-tests/pkg-tests-specs/sources/dragon.test.js41 // because its version conflict with the direct dependency of E (soCOMMENT
LOW…cceptance-tests/pkg-tests-specs/sources/dragon.test.js61 makeTemporaryEnv(COMMENT
LOW…cceptance-tests/pkg-tests-specs/sources/dragon.test.js201 // This test is related to the way Yarn is resolving peer dependenciesCOMMENT
LOW…cceptance-tests/pkg-tests-specs/sources/dragon.test.js221 // -> ZCOMMENT
LOW…cceptance-tests/pkg-tests-specs/sources/dragon.test.js361 [`dragon-test-7-b`]: `2.0.0`,COMMENT
LOW…cceptance-tests/pkg-tests-specs/sources/dragon.test.js421 // -> CCOMMENT
LOW…cceptance-tests/pkg-tests-specs/sources/dragon.test.js461 // We should instead preserve the different descriptors andCOMMENT
LOW…cceptance-tests/pkg-tests-specs/sources/dragon.test.js561 {COMMENT
LOW…cceptance-tests/pkg-tests-specs/sources/dragon.test.js621 // │ └── (peer) doesn't matterCOMMENT
LOW…cceptance-tests/pkg-tests-specs/sources/dragon.test.js641 // deduping it *while still referencing the package that got dedupedCOMMENT
LOW…cceptance-tests/pkg-tests-specs/sources/dragon.test.js741 },COMMENT
LOW…cceptance-tests/pkg-tests-specs/sources/dragon.test.js801 // ├── pkg-a/COMMENT
LOWpackages/yarnpkg-shell/tests/shell.test.ts1421 // await expectResult(bufferResult(COMMENT
LOWpackages/yarnpkg-pnp/sources/hydratePnpApi.ts1import {FakeFS, PortablePath} from '@yarnpkg/fslib';COMMENT
LOWpackages/yarnpkg-pnp/sources/generatePrettyJson.ts101 // [..., [COMMENT
LOWpackages/yarnpkg-pnp/sources/loader/makeApi.ts41 // Used for compatibility purposes - cf setupCompatibilityLayerCOMMENT
LOWpackages/plugin-git/sources/hosted-git-info-parse.ts41COMMENT
LOW…ges/plugin-compat/typescript-tests/similar-basename.ts1// Test for https://github.com/yarnpkg/berry/issues/3058COMMENT
LOWpackages/yarnpkg-sdks/sources/sdks/base.ts61 return \`\${locator.name}@\${locator.reference}\`;COMMENT
LOWpackages/yarnpkg-sdks/sources/sdks/base.ts101 // Before | ^zip:/c:/foo/bar.zip/package.jsonCOMMENT
LOWpackages/yarnpkg-nm/tests/hoist.test.ts61 // -> D -> ECOMMENT
LOWpackages/yarnpkg-nm/tests/hoist.test.ts81 // // Ideally should be hoisted to:COMMENT
LOWpackages/yarnpkg-nm/tests/hoist.test.ts121 it(`should keep require promise`, () => {COMMENT
LOWpackages/yarnpkg-nm/tests/hoist.test.ts221 C: {dependencies: [`B@Y`]},COMMENT
LOWpackages/yarnpkg-nm/tests/hoist.test.ts261 '.': {dependencies: [`A`, `D@Y`]},COMMENT
LOWpackages/yarnpkg-nm/tests/hoist.test.ts321 // . -> A --> B@XCOMMENT
LOWpackages/yarnpkg-nm/tests/hoist.test.ts341 // . -> A -> BCOMMENT
LOWpackages/yarnpkg-nm/tests/hoist.test.ts381 // -> C@ZCOMMENT
LOWpackages/yarnpkg-nm/tests/hoist.test.ts421 const [A] = Array.from(hoistedTree.dependencies).filter(x => x.name === `A`);COMMENT
LOWpackages/yarnpkg-nm/tests/hoist.test.ts521 // -> D@YCOMMENT
LOWpackages/yarnpkg-core/tests/Project.test.ts181 }COMMENT
LOWpackages/yarnpkg-core/sources/Project.ts781 const addedPackages: Array<Locator> = [];COMMENT
LOWpackages/yarnpkg-core/sources/scriptUtils.ts501 // case is still a bit fuzzy to me (something about Flow notCOMMENT
LOWpackages/plugin-pnpm/sources/PnpmLinker.ts441 dependencies: serializeDependencies(packageDependencies),COMMENT
LOWpackages/plugin-jsr/sources/JsrResolver.ts41 // recode the whole fetcher, we just convert our jsr locator into a npm one and recursively call theCOMMENT
LOWpackages/plugin-essentials/sources/commands/install.ts161 // for all installs inside a project, so through the .yarnrc.yml file. NoteCOMMENT
Self-Referential Comments8 hits · 18 pts
SeverityFileLineSnippetContext
MEDIUMplugins.yml1# This file contains the list of officially endorsed plugins.COMMENT
MEDIUM.yarn/sdks/integrations.yml1# This file is automatically generated by @yarnpkg/sdks.COMMENT
MEDIUM…pkg-tests-specs/sources/features/berryLockfile.test.ts9 `# This file is generated by running "yarn install" inside your project.\n`,CODE
MEDIUMpackages/plugin-exec/sources/ExecFetcher.ts154 header: `# This file contains the result of Yarn generating a package (${structUtils.stringifyLocator(locator)CODE
MEDIUMpackages/yarnpkg-sdks/sources/generateSdk.ts100 let content = `# This file is automatically generated by @yarnpkg/sdks.\n# Manual changes might be lost!\n\n`;CODE
MEDIUMpackages/yarnpkg-core/sources/Project.ts1626 let header = `# This file contains the result of Yarn building a package (${structUtils.stringifyLocator(pkgCODE
MEDIUMpackages/yarnpkg-core/sources/Project.ts2005 `# This file is generated by running "yarn install" inside your project.\n`,CODE
MEDIUMpackages/yarnpkg-core/sources/scriptUtils.ts578 const header = `# This file contains the result of Yarn calling the "${lifecycleScriptName}" lifecycle script insideCODE
Hallucination Indicators1 hit · 10 pts
SeverityFileLineSnippetContext
CRITICALpackages/plugin-pnp/sources/PnpLinker.ts300 if (this.opts.project.configuration.sources.has(`pnpEnableEsmLoader`))CODE
Verbosity Indicators4 hits · 6 pts
SeverityFileLineSnippetContext
LOWpackages/yarnpkg-core/sources/Project.ts1253 // Step 1: Installing the packages on the diskCOMMENT
LOWpackages/yarnpkg-core/sources/Project.ts1348 // Step 2: Link packages togetherCOMMENT
LOWpackages/yarnpkg-core/sources/Project.ts1434 // Step 3: Inform our linkers that they should have all the info neededCOMMENT
LOWpackages/yarnpkg-core/sources/Project.ts1464 // Step 4: Build the packages in multiple stepsCOMMENT
Structural Annotation Overuse4 hits · 6 pts
SeverityFileLineSnippetContext
LOWpackages/yarnpkg-core/sources/Project.ts1253 // Step 1: Installing the packages on the diskCOMMENT
LOWpackages/yarnpkg-core/sources/Project.ts1348 // Step 2: Link packages togetherCOMMENT
LOWpackages/yarnpkg-core/sources/Project.ts1434 // Step 3: Inform our linkers that they should have all the info neededCOMMENT
LOWpackages/yarnpkg-core/sources/Project.ts1464 // Step 4: Build the packages in multiple stepsCOMMENT
Slop Phrases3 hits · 4 pts
SeverityFileLineSnippetContext
LOW…tests/pkg-tests-specs/sources/commands/install.test.ts570 // Don't forget to rename the archive to match the name the real 1.0.0 would haveCOMMENT
LOWpackages/plugin-init/sources/commands/init.ts191 `# In that case, don't forget to run \`yarn config set enableGlobalCache false\`!`,CODE
LOWpackages/plugin-init/sources/commands/init.ts191 `# In that case, don't forget to run \`yarn config set enableGlobalCache false\`!`,CODE
AI Slop Vocabulary1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMpackages/yarnpkg-core/sources/scriptUtils.ts321 // so we leverage that. We also don't need the "set version" call sinceCOMMENT
TODO Padding1 hit · 2 pts
SeverityFileLineSnippetContext
LOWpackages/plugin-stage/sources/commands/stage.ts49 // TODO: implement it. Its purpose is, quoting @arcanis:COMMENT
Fake / Example Data1 hit · 1 pts
SeverityFileLineSnippetContext
LOWscripts/e2e-setup-ci.sh33git config --global user.name "John Doe"CODE