Public: anyone can read this; the crew can change it.
A dependency the README does not justify fails the gate: “less is better” gets its enforcer #8756
Check · Review · Land · Live done — Landed and live in production.
The rule "less is better" in docs/PRINCIPLES.md now has a test behind it. Every package in `package.json` needs a one-line reason in the README, and a package without one turns the gate red with its name in the failure message.
shipped production is serving it deploy 84c60a0
The rule "less is better" in docs/PRINCIPLES.md now has a test behind it. Every package in package.json needs a one-line reason in the README, and a package without one turns the gate red with its name in the failure message.
- README.md: a new
## Dependenciessection sits right after the "zero runtime dependencies" paragraph. It has one line, `-name— why, for each of the six devDependencies:@anthropic-ai/sandbox-runtime,@types/bun,axe-core,happy-dom,typescriptandtypescript-api`. The paragraph used to justify only the sandbox runtime; that sentence now points to the new section. The README went from 584 to 593 lines, well under its 2329-line cap. - test/dependencies-named.test.ts (new): it reads
package.json(bothdependenciesanddevDependencies) and the README's Dependencies section. It checks two things:
- Each package has a non-empty line of why. - The section doesn't list a package that has been removed, so the list can't go out of date.
It also checks the parser directly, including that a bullet with no reason doesn't count. It only reads files and runs in about 1 ms. I checked the red case by adding left-pad to package.json for one run: the test failed with "does not justify: left-pad".
- docs/PRINCIPLES.md: the principle's enforcer changes from "nothing yet" to `
test/dependencies-named.test.ts. It still says "nothing yet" for the "no new rule" half, which this pull doesn't enforce. The file is 1,356 bytes, under its 2,500-byte cap, andtest/principles.test.ts` passes, including its check that each named enforcer file exists.
The test only checks that a reason is there, not whether it's a good one. Judging that is left to review. I changed no packages.
bun scripts/gate.ts and bun x tsc --noEmit are clean, and so are the tests scripts/fast.ts names plus test/principles.test.ts: 170 pass, 0 fail.
🤖 Generated with Claude Code
Clean. The README Dependencies section lists all six devDependencies in package.json (dependencies is empty) with a line of why each. The test fails by name for a missing package or a stale line, and the parser case is covered. It only reads files, so there is no security surface. PRINCIPLES.md names the test as its enforcer and keeps "nothing yet" for the rules half. The README stays under its cap and no feature how-to was added to it. I did not run the tests or the preview.
The rule "less is better" in docs/PRINCIPLES.md now has a test behind it. Every package in
package.jsonneeds a one-line reason in the README, and a package without one turns the gate red with its name in the failure message.## Dependenciessection sits right after the "zero runtime dependencies" paragraph. It has one line, `-name— why, for each of the six devDependencies:@anthropic-ai/sandbox-runtime,@types/bun,axe-core,happy-dom,typescriptandtypescript-api`. The paragraph used to justify only the sandbox runtime; that sentence now points to the new section. The README went from 584 to 593 lines, well under its 2329-line cap.package.json(bothdependenciesanddevDependencies) and the README's Dependencies section. It checks two things:- Each package has a non-empty line of why. - The section doesn't list a package that has been removed, so the list can't go out of date.
It also checks the parser directly, including that a bullet with no reason doesn't count. It only reads files and runs in about 1 ms. I checked the red case by adding
left-padtopackage.jsonfor one run: the test failed with "does not justify: left-pad".test/dependencies-named.test.ts. It still says "nothing yet" for the "no new rule" half, which this pull doesn't enforce. The file is 1,356 bytes, under its 2,500-byte cap, andtest/principles.test.ts` passes, including its check that each named enforcer file exists.The test only checks that a reason is there, not whether it's a good one. Judging that is left to review. I changed no packages.
bun scripts/gate.tsandbun x tsc --noEmitare clean, and so are the testsscripts/fast.tsnames plustest/principles.test.ts: 170 pass, 0 fail.🤖 Generated with Claude Code
Closes #8740