SlopScore for Code

Patterns / Giant generated changes

Giant generated changes

An agent can write more code in ten minutes than a team can review in a day. When a PR adds 900 lines to one file, review turns into skimming, and skimming is how the other patterns on this list get merged.

What it looks like

+900 lines in src/app/page.tsx
One service file that grew from 200 to 1,400 lines in a single PR
A 'utils.ts' with 60 unrelated functions

Why it matters

Review quality falls off sharply with diff size. Large single-file additions also tend to mix concerns that should be separate modules.

Before and after

Before
src/dashboard.tsx  +1,120 lines
After
src/dashboard/ (6 files, largest 210 lines), each with one job

How to fix it

  1. Flag source files with more than 600 added lines (lockfiles, snapshots, data files and generated folders are skipped).
  2. Ask the agent to work in smaller, stacked PRs.
  3. Move generated code to a generated/ folder and add it to ignorePaths.

When it's fine

Vendored or generated code that nobody edits by hand, kept in an ignored folder.

Catch this automatically. SlopScore for Code checks every pull request for this pattern (rule giant-file) and 11 others. Score a public PR or add the free GitHub Action.

Related