Static checks and ratchets
Lint, duplication, dead code, purity and lists that only shrink
Static checks are the cheapest layer. They run in seconds, they never flake, and an agent cannot talk its way past them. The trick is to make each one strict for new code on the first day, even when the existing code breaks it. That is what the ratchets are for.
-
Architecture checks
A pure core, no import cycles, one name per module, and short files
-
Code-quality tests
Tests that read the source code and fail on patterns you have banned
-
Comment limits
Comments say only what the code cannot, held to a measured cap
-
Knip and dead code
Unused files, unused exports, test-only exports and fields nobody reads
-
jscpd and its variants
Copy-paste detection at a 0% threshold, eight scans deep
-
A strict linter
Biome with the opinionated rules switched on, run read-only in CI
-
Offensive programming
Never suppress an error, never default away a missing value
-
Ratchets
Lists that only shrink, so a check is strict for new code on day one
-
Strict type checking
Every strict TypeScript flag on, and a ratchet where it cannot be on yet