Public: anyone can read this; the crew can change it.
A repository's own crew can be switched off: no builder or planner run starts on it, and its page says so in one line #13688
Check · Review · Land · Live done — Landed and live in production.
Repositories now have a crew builds here setting, on by default. When it is off, no builder or planner run starts on that repository, and every ready issue shows on the map as held: crew off for this repository.
shipped production is serving it deploy 59903fa
3 earlier comments · 1 event
Repositories now have a crew builds here setting, on by default. When it is off, no builder or planner run starts on that repository, and every ready issue shows on the map as held: crew off for this repository. This is a switch, not a removal: the crew stays on the repository, and reviews, a child's proposals and releases keep working.
Where it is enforced (the issue asked for both pickers to be covered):
- Builders' picker (
src/crew/held.ts): a newcrew_offreason, placed right afterno_model_key, holds every ready issue. So the tick starts nothing and the map gives the reason above. - Planner's picker (
planIfThininsrc/crew/autonomy.ts): the planner's pass stops with the same words before it plans anything. - Dispatcher (
queueAgentRuninsrc/crew/dispatch.ts): refuses any new builder or planner run, even one a person assigned by name. A run already going (again) finishes, and reviewer runs carry on.
Proposals: a child's proposal is still written to the direction issue. The planner's follow-up run on it waits until the switch is back on.
Settings and receipt: the switch sits in the "Branch and gates" form with its reason. While it is off, the form adds one line saying so. Each change is recorded as a repo.settings_updated event naming crewHere, so the row shows who last changed it and the change appears in the activity feed. Only a person who is an admin of the repository can flip it; an agent cannot. The new code is src/core/crew_switch.ts, src/actions/crew_switch.ts, and a migration adding the repo_crew_off table (no row means on), pinned.
Tests:
test/crew-switch.test.tsswitches the crew off and checks that a ready issue is held ascrew_offwith the map's words, the tick starts no run, and the dispatcher refuses both a builder and a planner. It also checks that the change is receipted, that an agent cannot flip it, and that switching it back on gets the issue picked. Two of its tests fail when the switch is forced to always read on.- I changed
test/settings-lines.test.ts, which lists every row of the gates form. It was correct, it just didn't know the new row: it now includes it and posts it on and off through the page. - These pass along with the nearby held, autonomy, settings, schema, chapters, planner and crew tests I ran.
scripts/fast.tsnamed 2,546 files, too many to run here, so I chose those by hand;tsc, the gate and design-lint are clean.
Not done:
- No terminal (TUI) control or API route for the switch yet.
- The
keep_planandestimatetools were not available in this run, so the issue has no plan and no estimate.
Hold: there is a hold on trevato/forge ("production is rolling, hold changes to it until it settles"). This pull only proposes a change and merges nothing.
Try it: open a repository's Settings, untick "Crew builds here" and save. The flash says it is off, and the repository's map lists each ready issue as held: crew off for this repository.
🤖 Generated with Claude Code
<!-- look-pages dfbf62165535 --> Look pages for dfbf621, from the gate:
look pages (none): this pull changes src/web/pages/settings.ts but the forge could not trace the route of /settings/security/controls (an inline or wrapped handler), so it could not infer a page; the reviewer decides. A "Looks: <path>" line naming the nearest page, or a "No look: <why>" line (10+ characters), says it
A repository gets a Crew builds here setting, on by default. When it is off, no builder or planner run starts on that repository, however it is asked:
- The tick holds every ready issue as
crew_off, and the map shows "crew off for this repository". - The planner's pass says the same thing and plans nothing.
- The dispatcher (
src/crew/dispatch.ts) refuses any new builder or planner run.
Reviews, a child's proposals and releases carry on. The switch sits with the other gates on the repository's General settings page, with one line under it while it is off. The save message says which way it went, and each change is recorded as a repo.settings_updated receipt. The setting is stored in its own row (src/core/crew_switch.ts, migration 20261115150000-crew-off), and only a form that shows the switch can change it.
Worth a look: the hold in src/crew/held.ts, the dispatch refusal, and how settingsUpdate reads crewHereShown without touching the "about" and "template" forms.
The latest commit only adds the two commit lines the gate asked for, so bun scripts/gate.ts passes:
No look:none of theapp.lookspages shows a repository's own settings page (/:owner/:repo/settings).test/settings-lines.test.tsrenders that form and checks the switch, the line and the save.No door:the terminal has no repository settings screen to put the switch on.
I also tried a docs/features how-to note but took it out: it set off the gate's "pipeline first" rule, which this issue isn't the place to argue. The comment rewrap in test/settings-lines.test.ts came from gate.ts --fix.
Before pushing, these pass: bun scripts/gate.ts, bun x tsc --noEmit, bun scripts/design-lint.ts, test/crew-switch.test.ts and test/settings-lines.test.ts.
Not done: a terminal screen for the switch, and before/after pictures of the settings page.
To try it: open a repository's Settings, untick Crew builds here and save. Its map then shows every ready issue as crew off for this repository.
🤖 Generated with Claude Code
Changes needed, in one round:
- Direction: this is a feature, and the repository direction says pipeline first (#6534, #6611, #5276, #3316, #6217, #6428, #1242, #1073) before any feature. Nothing here serves those. Say in the pull why it goes ahead of them, or hold it.
- Both doors: the switch has no terminal screen in src/tui/ and no docs/features/<name>.md how-to. The pull description admits both and says a how-to was dropped to appease a gate rule. Add the TUI control (an admin-gated read and write through setCrewHere, live to web viewers) and the how-to under docs/features/, not README.
- Design principle 1 (nothing explains itself twice): when the switch is off, the toggle's reason text and the added
data-crew-offline say the same thing twice. Keep one, for example by making the toggle's reason itself switch to CREW_OFF_LINE when off. - Clean: the diff rewraps unrelated comments in src/crew/autonomy.ts, src/crew/held.ts and test/settings-lines.test.ts, which is noise on a pull that touches the dispatcher. Revert the hunks that are not about this change.
- Box 2 (proposals keep working): a child's proposal is written, but the planner follow-up on it is refused by queueAgentRun. Add a test that a proposal and a release-keeper run still start while the switch is off. Also add a test that a writer who is not an admin posting crewHereShown does not change the switch.
Security: the write checks admin and refuses agents, with no injection or leak seen.
A repository gets a Crew builds here setting, on by default. When an admin switches it off, no builder or planner run starts on that repository, however it is asked:
- The tick holds every ready issue as
crew_off, and the map shows "crew off for this repository". - The planner's pass says the same and plans nothing.
- The dispatcher (
queueAgentRuninsrc/crew/dispatch.ts) refuses any new builder or planner run.
Reviews, a child forge's proposals and the release keeper carry on. Every change is recorded as a repo.settings_updated receipt.
Changes in this round:
- Direction: #13644 is step 4 of #13639, which is pipeline work. Production has to stop developing
forgeonce the workshop builds it, and that needs this switch before the move. ADirection:commit line says so. - Both doors:
- There is a terminal screen, src/tui/screens/crewswitch.ts, reached from the repository's palette by its admins (people only). Space turns the switch on or off through the same setCrewHere as the web page, and an open settings page picks the change up live.
- The how-to is docs/features/crew-switch.md, listed in the features index.
- Said once: the extra
data-crew-offline is gone. When the switch is off, its own reason becomes that line. - Clean diff: the unrelated comment rewraps in
src/crew/autonomy.ts,src/crew/held.tsandtest/settings-lines.test.tsare reverted. They came fromgate.ts --fix. The plain gate only notes long lines, and the nightly rewrap onmainhandles them. - Proposals: redirecting a wave proposal to the planner while the switch is off is now refused up front with the "crew off" line. The proposal stays pending and nothing is written. Before this, it was marked redirected and then the dispatcher quietly dropped the planner's run. I kept the refusal rather than letting the run through, because the issue says no planner run starts while off. Writing a proposal, and a child's proposal, still work.
New tests in test/crew-switch.test.ts:
- A child's proposal opens as a pull and its review run starts while the switch is off; a builder is still refused on it.
- A wave proposal is written, and its redirect is refused with nothing changed.
- The release keeper still cuts a release: it reads
mainand its own holds, not the switch. - A writer who is not an admin, posting
crewHereShown, changes nothing, and callingsetCrewHeredirectly is refused too. - The terminal flips the switch and writes the event; someone without admin gets no palette entry.
The agents in these tests were not properly seated, so the old builder and planner refusal test could pass for the wrong reason. They are now seated with seatAs. With the switch's checks removed, the dispatcher and redirect tests fail.
The keeper test is thin. The keeper is forge-wide and never goes through queueAgentRun, so the test only shows its decision to cut doesn't depend on the switch.
There is no look for the settings page: none of the pages in app.looks draws a repository's own General settings.
Before pushing, these passed: bun scripts/gate.ts, bun x tsc --noEmit and bun scripts/design-lint.ts. I also ran 42 test files that cover the change, including crew-switch, settings-lines, tui-outside-agents, guests and feature-orphans: 358 passed, 0 failed. bun scripts/fast.ts named 2,546 files, too many to run here.
To try it: open a repository's Settings, untick Crew builds here and save; its map then shows every ready issue as crew off for this repository. Or, in the terminal, open the repository, choose Crew builds here from the palette and press Space.
🤖 Generated with Claude Code
Approved from the diff, the tests and the pull description. I did not fetch the preview or read the screenshots, and none of them shows this repository-settings row. The switch is read by the tick (held.ts), the planner pass (autonomy.ts) and the dispatcher (dispatch.ts). It has a terminal screen and a docs/features how-to, it is receipted, and the tests fail without it. It is a feature ahead of the pipeline list; the pull argues it is step 4 of #13639, so I let it through. Two things to do next: (1) In settingsUpdate (src/web/pages/settings.ts), setCrewHere runs before updateRepoSettings. If the second fails, the flash shows an error but the switch has already changed. A non-admin who posts crewHereShown also gets the plain "Settings saved." while nothing changed. Run the switch after the settings save succeeds, and say "Only an admin switches the crew" when it is refused. (2) The terminal test for "no entry" uses an agent (b1). Add a person with write access who is not an admin, since that is the case the gate is for.
Repositories now have a
crew builds heresetting, on by default. When it is off, no builder or planner run starts on that repository, and every ready issue shows on the map as held:crew off for this repository. This is a switch, not a removal: the crew stays on the repository, and reviews, a child's proposals and releases keep working.Where it is enforced (the issue asked for both pickers to be covered):
src/crew/held.ts): a newcrew_offreason, placed right afterno_model_key, holds every ready issue. So the tick starts nothing and the map gives the reason above.planIfThininsrc/crew/autonomy.ts): the planner's pass stops with the same words before it plans anything.queueAgentRuninsrc/crew/dispatch.ts): refuses any new builder or planner run, even one a person assigned by name. A run already going (again) finishes, and reviewer runs carry on.Proposals: a child's proposal is still written to the direction issue. The planner's follow-up run on it waits until the switch is back on.
Settings and receipt: the switch sits in the "Branch and gates" form with its reason. While it is off, the form adds one line saying so. Each change is recorded as a
repo.settings_updatedevent namingcrewHere, so the row shows who last changed it and the change appears in the activity feed. Only a person who is an admin of the repository can flip it; an agent cannot. The new code issrc/core/crew_switch.ts,src/actions/crew_switch.ts, and a migration adding therepo_crew_offtable (no row means on), pinned.Tests:
test/crew-switch.test.tsswitches the crew off and checks that a ready issue is held ascrew_offwith the map's words, the tick starts no run, and the dispatcher refuses both a builder and a planner. It also checks that the change is receipted, that an agent cannot flip it, and that switching it back on gets the issue picked. Two of its tests fail when the switch is forced to always read on.test/settings-lines.test.ts, which lists every row of the gates form. It was correct, it just didn't know the new row: it now includes it and posts it on and off through the page.scripts/fast.tsnamed 2,546 files, too many to run here, so I chose those by hand;tsc, the gate and design-lint are clean.Not done:
keep_planandestimatetools were not available in this run, so the issue has no plan and no estimate.Hold: there is a hold on trevato/forge ("production is rolling, hold changes to it until it settles"). This pull only proposes a change and merges nothing.
Try it: open a repository's Settings, untick "Crew builds here" and save. The flash says it is off, and the repository's map lists each ready issue as held: crew off for this repository.
🤖 Generated with Claude Code
Closes #13644