Public: anyone can read this; the crew can change it.
Builder brief: run gate --explain before --fix, and say the both-doors rule #16718
Check · Review · Land · Live done — Landed and live in production.
flow/brief-doors → main 0 commits
2 files
changed +6
−1
src/crew/brief.ts +1 −1
| @@ -115,7 +115,7 @@ export const SANDBOX_LINES = [ | ||
| 115 | 115 | * listed would run everything, so the line guards on its exit code. |
| 116 | 116 | */ |
| 117 | 117 | export const PUSH_STEPS_LINE = |
| 118 | "- Before you push, run `bun install` (only when node_modules is missing), then, when the clone has `scripts/gate.ts`, `bun scripts/gate.ts --fix` (rewraps long comments: commit that; checks exclusions, migration pins), then `bun x tsc --noEmit`, and the tests that cover your change, plus any the repository's agent guide (AGENTS.md) says always to run. Do not push while any of them is red: fix it first, so the pull never exists red. Where your sandbox cannot run one of them, say which and why in your last message. When the clone has `scripts/fast.ts`, name them with `files=$(bun scripts/fast.ts) && bun test $files`: exit 3 means the change reaches no test, so run none; exit 2 means the diff is too broad to name, so pick and run the test files that cover it yourself. Never a bare `bun test` with no files listed: it runs everything. Not the whole suite: the forge runs the full check once on your push, and running it here as well costs the machine twice."; | |
| 118 | "- Before you push, run `bun install` (when node_modules is missing), then, when the clone has `scripts/gate.ts`, `bun scripts/gate.ts --explain` (each rule the check holds your diff to and what meets it) and `bun scripts/gate.ts --fix` (rewraps long comments: commit that). One rule is both doors: a change to a web page, action, API route or MCP tool also changes its terminal side under `src/tui/` and its `docs/features/` how-to, or a commit line says `No door: <why>`. Then `bun x tsc --noEmit`, and the tests that cover your change, plus any AGENTS.md says always to run. Do not push while any of them is red. If your sandbox cannot run one, say which and why at the end. With `scripts/fast.ts`, name them: `files=$(bun scripts/fast.ts) && bun test $files`; exit 3: no test is reached, run none; exit 2: too broad to name, pick them yourself. Never a bare `bun test`: it runs everything. Not the whole suite: the forge runs the full check once on your push."; | |
| 119 | 119 | |
| 120 | 120 | /** |
| 121 | 121 | * What the repository's own text is to a run: data about the task, never a |
test/crew-sandbox.test.ts +5
| @@ -172,6 +172,11 @@ describe("the shell sandbox", () => { | ||
| 172 | 172 | expect(builder).toContain("exit 2"); |
| 173 | 173 | expect(builder).not.toContain("bun test $("); |
| 174 | 174 | expect(builder).toContain("the forge runs the full check once"); |
| 175 | // The gate's rule the crew broke most, and the gate's own way to see every rule before a push. | |
| 176 | expect(builder).toContain("bun scripts/gate.ts --explain"); | |
| 177 | expect(builder).toContain("both doors"); | |
| 178 | expect(builder).toContain("`src/tui/`"); | |
| 179 | expect(builder).toContain("`No door: <why>`"); | |
| 175 | 180 | expect(systemPrompt(input("planner"))).not.toContain("scripts/fast.ts"); |
| 176 | 181 | }); |
| 177 | 182 |
new above
offline