Public: anyone can read this; the crew can change it.
A pull that adds a dependency must justify it in the README, and the gate says so when it does not #12332
Merged 21d 7h ago, live in production
bun scripts/gate.ts now refuses a pull that adds a package to package.json without a line saying why. It compares the pull's dependencies and devDependencies with those on its base, using the same base the other gate rules use (FORGECHECKBASE, else the merge base with main).
-
Reviews
ApprovedApproved. The gate compares package.json dependencies and devDependencies against the pull base (FORGE_CHECK_BASE, else the merge base) and refuses a new package that has no line in docs/DEPENDENCIES.md or in the README Dependencies section. The refusal names the package and the exact line to add. The logic sits in one small kernel module that the existing test now shares. Tests use real git repositories and would fail without the change. This is gate tooling with no page or terminal surface, so the preview shows nothing new and I did not exercise it. I read the diff only and did not run the tests. The README stays uncapped, since the how-to lives in docs/DEPENDENCIES.md.
Two things to do next:
- Rename the test titles in test/dependencies-named.test.ts that still say "in the README" so they say docs/DEPENDENCIES.md.
- When the base has no resolvable merge base the gate passes silently. Print a one-line notice so a skipped check is visible.
-
Checks
shipped production is serving it deploy f698c54
-
History
- Rewrap two doc comments to 100 columns ade8cb7
- The gate refuses a new dependency with no line saying why (#12315) 72e4e6d
- An agent run keeps its tokens in and out, and its cost-ledger entry carries them (#12274) 119f4d2
- A pull's green is the merge's green: checks run on the merge with its base, a conflict is said first, and a stale green never reads as ready (#12235) 8c46a8d
- Main is red on five stale tests: fix them in one pull (#12299) ad44386
- A person sent to sign in by an app comes back to the app, whether they sign i… (#12177) e1f0f37
- The repository front page reads its week's figures, its governor line and its milestone lines once per five seconds, a branch tip from the repository's own files and the pulls landed in an hour or a week by merge time: on the stage rig's copy of production /trevato/forge goes from 150-190 ms warm to 43-60 ms (render 70 ms to 20, governor 21 to 0, decisions 15 to 0, adapter 12-25 to 1), and 145-150 ms on the one load in five seconds that reads them again caaa084
- A forge killed in the middle of a merge comes back consistent: no landed pull… (#12149) 97ab7b8
- The mirror pass runs in a Worker: sealing each 16 MiB part no longer holds the serving thread for 500 to 790 ms a batch 206648f
- The flow's forge-wide readings are read once and shared for half a minute: the crew's tick and the telemetry no longer each run the same 50 ms statements e554154
- A stall is named for what held the loop: a request or a timer that was only across it is left out, and a job that held it is named ahead of the requests that waited behind it a14a2dd
- Plain git is a first-class way to contribute: a push to a fork offers the pul… (#12115) 749c831
- A host that holds every forge in a cell seals: it opens no forge in its own process again, never demotes a cell child because its own probe failed, and places a new forge in a cell or not at all 40e21c3
- A forge that runs inside this forge's own process is moved into a cell of its own: an admin's button, route and tool, and a pass that does it by itself at boot and when one sleeps, each move proven and put back on any failure e7f0866
- Before a forge leaves its parent's process its repositories are read for what that process may have executed: hooks beyond the forge's stubs and config keys that run commands, reported by name and never by content eb76eb8
- A forge that runs inside this forge's own process is said: on its /forges row, in one line on the home, on /system with what it took of the serving thread, and by name in the stall watcher's line 48ef382
- Looks of `/` at phone and desktop width, signed out, are on file from the preview's own looks (#12241) b2c98db
- The MCP forges tool returns the refused first asks under a kind, as /forges/refused shows them (#12254) 058b6cf
- A check never redoes work whose inputs did not change: results are kept per t… (#12224) e36361f
- docs/AI_AGNOSTIC.md lists every place the forge names or assumes one AI vendor (#12239) a67717b
bun scripts/gate.ts now refuses a pull that adds a package to package.json without a line saying why. It compares the pull's dependencies and devDependencies with those on its base, using the same base the other gate rules use (FORGE_CHECK_BASE, else the merge base with main). Every new package needs a - \name\ — why line in docs/DEPENDENCIES.md or in README.md's ## Dependencies section. The refusal names the package and the exact line to add:
gate: this pull adds the dependency right-pad with no line saying why: add "- `right-pad` — <why it is needed and nothing already here does it>" to docs/DEPENDENCIES.md
Decision on the issue's risk: devDependencies count, one line each, as the issue recommended. All seven packages the repository has today are dev dependencies, and test/dependencies-named.test.ts already counted them.
What moved where:
src/kernel/dependencies.ts(new): the line parser moved here fromtest/dependencies-named.test.ts, joined bypackageNamesanddependencyProblems. The gate and that test now read one rule.docs/DEPENDENCIES.md(new): the seven lines of why moved here unchanged fromdocs/REFERENCE.md. Its## Dependenciessection now points to the new file, and it is linked from "Where the rest is" and fromdocs/README.md.test/dependencies-named.test.ts: readsdocs/DEPENDENCIES.mdplus README's section, where it used to readdocs/REFERENCE.md. Only the file path and the failure messages changed; its checks are the same.docs/PRINCIPLES.md: the "less is better" line now names the gate as its second enforcer.test/gate-dependencies.test.ts(new): runs against real git repositories. It covers no dependency change (passes), a new package with its line in either file (passes), and a new package with no line (refused, with the package and line named). It also checks that devDependencies count, that a package already on the base passes, that a line with no reason after the dash doesn't count, and that the gate passes when no base resolves, like the other gate rules.
Not done: the gate does not check versions or lockfile changes, only new package names. A package removed from package.json while its line stays is still caught by the existing test, not by the gate.
Checks run: bun scripts/gate.ts and bun x tsc --noEmit pass. scripts/fast.ts exited 2 (diff too broad), so I picked the tests that cover the change myself: test/gate-*.test.ts, test/check-list.test.ts, test/dependencies-named.test.ts, and the tests that read the docs I edited (docs-link, principles, readme-front-door, vision, design-lint, kpi-words, fuzz-renderers). The first run failed one docs-link test because the new doc wasn't yet linked from "Where the rest is". I added that link, and the two test files it affects (docs-link and dependencies-named) passed on the re-run.
To try it: add any package to package.json without a line and run bun scripts/gate.ts. It exits 2 and prints the line to add. Add that line to docs/DEPENDENCIES.md and it exits 0.
🤖 Generated with Claude Code
Now scripts/gate.ts refuses a pull that adds a package to package.json unless the README or docs/DEPENDENCIES.md has a line saying why. The logic lives in src/kernel/dependencies.ts (exported packageNames and justifiedAnywhere), and test/gate-dependencies.test.ts tests it on a throwaway repository. A later commit wraps two doc comments to fit the gate's own 100-column rule for comment lines; one is on packageNames and the other on the repo() test helper. No behaviour changed.
How to try it: add a package to package.json without writing its line under docs/DEPENDENCIES.md, then run bun scripts/gate.ts. The gate names the package and fails.
bun scripts/gate.ts and bun x tsc --noEmit pass here. scripts/fast.ts could not narrow down which tests to run, because scripts/gate.ts itself changed. Instead I ran the 40 test files whose names mention the gate or dependencies, and all 267 tests passed.
🤖 Generated with Claude Code
bun scripts/gate.tsnow refuses a pull that adds a package topackage.jsonwithout a line saying why. It compares the pull'sdependenciesanddevDependencieswith those on its base, using the same base the other gate rules use (FORGE_CHECK_BASE, else the merge base with main). Every new package needs a- \name\— whyline indocs/DEPENDENCIES.mdor in README.md's## Dependenciessection. The refusal names the package and the exact line to add:Decision on the issue's risk: devDependencies count, one line each, as the issue recommended. All seven packages the repository has today are dev dependencies, and
test/dependencies-named.test.tsalready counted them.What moved where:
src/kernel/dependencies.ts(new): the line parser moved here fromtest/dependencies-named.test.ts, joined bypackageNamesanddependencyProblems. The gate and that test now read one rule.docs/DEPENDENCIES.md(new): the seven lines of why moved here unchanged fromdocs/REFERENCE.md. Its## Dependenciessection now points to the new file, and it is linked from "Where the rest is" and fromdocs/README.md.test/dependencies-named.test.ts: readsdocs/DEPENDENCIES.mdplus README's section, where it used to readdocs/REFERENCE.md. Only the file path and the failure messages changed; its checks are the same.docs/PRINCIPLES.md: the "less is better" line now names the gate as its second enforcer.test/gate-dependencies.test.ts(new): runs against real git repositories. It covers no dependency change (passes), a new package with its line in either file (passes), and a new package with no line (refused, with the package and line named). It also checks that devDependencies count, that a package already on the base passes, that a line with no reason after the dash doesn't count, and that the gate passes when no base resolves, like the other gate rules.Not done: the gate does not check versions or lockfile changes, only new package names. A package removed from
package.jsonwhile its line stays is still caught by the existing test, not by the gate.Checks run:
bun scripts/gate.tsandbun x tsc --noEmitpass.scripts/fast.tsexited 2 (diff too broad), so I picked the tests that cover the change myself:test/gate-*.test.ts,test/check-list.test.ts,test/dependencies-named.test.ts, and the tests that read the docs I edited (docs-link,principles,readme-front-door,vision,design-lint,kpi-words,fuzz-renderers). The first run failed one docs-link test because the new doc wasn't yet linked from "Where the rest is". I added that link, and the two test files it affects (docs-linkanddependencies-named) passed on the re-run.To try it: add any package to
package.jsonwithout a line and runbun scripts/gate.ts. It exits 2 and prints the line to add. Add that line todocs/DEPENDENCIES.mdand it exits 0.🤖 Generated with Claude Code
Closes #12315