Skip to content

Commit 5e2b737

Browse files
committed
Fold Builder lane discipline into implement-skill voice
Drop the branded DONE GATE, REPORT MAP, and API CONTRACT banners. Keep the implement + test and build-gate spine, and phrase stop-when- done, criteria reporting, and public API shape rules as ordinary Guidelines plus a short Stay in lane section.
1 parent 5511bf6 commit 5e2b737

2 files changed

Lines changed: 37 additions & 22 deletions

File tree

src/agent/directors/builder/package.test.ts

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -99,30 +99,43 @@ describe("builderPackage", () => {
9999
expect(builderPackage.optionalSkills).toEqual(["style", "philosophy", "typescript"]);
100100
});
101101

102-
test("systemPrompt has DONE GATE for success_criteria", () => {
102+
test("primaryIntent and outOfLane reinforce lane discipline", () => {
103+
expect(builderPackage.primaryIntent).toMatch(/nothing more|brief/i);
104+
expect(builderPackage.outOfLane).toEqual(
105+
expect.arrayContaining([
106+
expect.stringMatching(/architecture/i),
107+
expect.stringMatching(/scope/i),
108+
expect.stringMatching(/spawn/i),
109+
]),
110+
);
111+
});
112+
113+
test("systemPrompt stays in lane without branded Corbits banner titles", () => {
103114
const prompt = builderPackage.systemPrompt;
104-
expect(prompt).toContain("DONE GATE");
105-
expect(prompt).toContain("success_criteria");
106-
expect(prompt).toMatch(/[Ss]top when/);
115+
expect(prompt).toContain("Stay in lane");
116+
expect(prompt).not.toContain("DONE GATE");
117+
expect(prompt).not.toContain("REPORT MAP");
118+
expect(prompt).not.toContain("API CONTRACT");
107119
});
108120

109-
test("systemPrompt has VERIFY language", () => {
121+
test("systemPrompt stops when success_criteria are met", () => {
110122
const prompt = builderPackage.systemPrompt;
111-
expect(prompt).toContain("VERIFY");
112-
expect(prompt).toMatch(/build gate/i);
113-
expect(prompt).toContain("Blockers");
123+
expect(prompt).toContain("success_criteria");
124+
expect(prompt).toMatch(/[Ss]top when/);
125+
expect(prompt).toMatch(/do not invent architecture|nothing more/i);
114126
});
115127

116-
test("systemPrompt has REPORT MAP for criteria and Paths", () => {
128+
test("systemPrompt reports criteria status for parent routing", () => {
117129
const prompt = builderPackage.systemPrompt;
118-
expect(prompt).toContain("REPORT MAP");
119-
expect(prompt).toMatch(/success_criteria.*pass|fail|blocked/s);
130+
expect(prompt).toMatch(/Findings/i);
131+
expect(prompt).toMatch(/pass.*fail.*blocked|pass, fail, or blocked/s);
120132
expect(prompt).toMatch(/Paths must list files touched/);
133+
expect(prompt).toMatch(/Summary \/ Findings \/ Blockers \/ Paths/);
121134
});
122135

123-
test("systemPrompt has API CONTRACT for sync/async preservation", () => {
136+
test("systemPrompt preserves public API sync/async under Guidelines", () => {
124137
const prompt = builderPackage.systemPrompt;
125-
expect(prompt).toContain("API CONTRACT");
138+
expect(prompt).toMatch(/Public API shapes/i);
126139
expect(prompt).toMatch(/sync/i);
127140
expect(prompt).toMatch(/Promise|async/);
128141
expect(prompt).toMatch(/public API|return shape/i);

src/agent/directors/builder/package.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,19 @@ import { BUILD_TOOLS } from "../tool-sets.js";
33

44
/**
55
* Builder leaf (CL-7018).
6-
* Raw implement loop against the brief — edit, verify, map success_criteria; never orchestrate or review as primary.
6+
* Implement-skill ship loop (implement + test, build gate) with a fleet lane
7+
* tinker: stay on the brief, report against success_criteria, never orchestrate.
78
*/
89
export const builderPackage: DirectorPackage = {
910
id: "builder",
10-
primaryIntent: "Ship product code with tests to satisfy the brief",
11+
primaryIntent: "Implement the brief in product code — edit, verify, report; nothing more",
1112
outOfLane: [
12-
"architecture gates",
13+
"inventing architecture beyond the brief",
14+
"expanding scope after success criteria are met",
1315
"docs-only work",
1416
"review-only verdicts",
1517
"mechanical command lists without implementing",
16-
"orchestrating other agents",
18+
"orchestrating or spawning other agents",
1719
],
1820
description: "Implementation leaf — edit, verify, report",
1921
optionalSkills: ["style", "philosophy", "typescript"],
@@ -67,13 +69,13 @@ Run the project's full check (\`bun run check\` or the gate the brief / AGENTS.m
6769
6870
**Discovered extra work** belongs under Blockers / Findings for a future unit — finish the current brief first.
6971
70-
DONE GATE: Stop when every success_criteria item from the brief is met OR explicitly blocked under Blockers. Do not invent architecture or expand the brief after criteria are satisfied. If scope or architecture is ambiguous, report Blockers for the parent — do not become greybeard, counsel, Critic, or Explorer.
72+
**Public API shapes.** Preserve existing public API sync/async and return shapes unless the brief explicitly changes them. If the brief or existing code shows a synchronous function returning a plain value (e.g. { status, body }), keep it sync — do not return a Promise / make it async just to use Web Crypto. Prefer sync libraries (node:crypto createHmac, etc.) when the public surface is sync. When the brief states a signature, match parameter order, optionality, and return type exactly. Do not change call sites to await unless the brief requires an async API.
7173
72-
VERIFY: Run the build gate when practical; put failures under Blockers, not silent patches outside scope.
74+
## Stay in lane
7375
74-
REPORT MAP: Findings must map each success_criteria item → pass | fail | blocked. Paths must list files touched.
76+
Do what the brief says — nothing more. Stop when every success_criteria item is met or explicitly blocked under Blockers; do not invent architecture or expand the brief after criteria are satisfied. If scope or architecture is ambiguous, report Blockers for the parent — do not become greybeard, counsel, Critic, or Explorer.
7577
76-
API CONTRACT: Preserve existing public API sync/async and return shapes unless the brief explicitly changes them. If the brief or existing code shows a synchronous function returning a plain value (e.g. { status, body }), keep it sync — do not return a Promise / make it async just to use Web Crypto. Prefer sync libraries (node:crypto createHmac, etc.) when the public surface is sync. When the brief states a signature, match parameter order, optionality, and return type exactly. Do not change call sites to await unless the brief requires an async API.
78+
In Findings, map each success_criteria item to pass, fail, or blocked so the parent can route. Paths must list files touched. Use the Summary / Findings / Blockers / Paths report envelope.
7779
78-
OUT OF LANE: pure exploration maps, architecture essays without code, review-only verdicts, mechanical command lists without implementing, orchestration, spawning specialists (including @greybeard / @critique), becoming Critic / Explorer / greybeard / counsel as primary, full critique amend/rebase loops, Linear/PR review handoff.`,
80+
Out of lane: pure exploration maps, architecture essays without code, review-only verdicts, mechanical command lists without implementing, orchestration, spawning specialists (including @greybeard / @critique), becoming Critic / Explorer / greybeard / counsel as primary, full critique amend/rebase loops, Linear/PR review handoff. Parent owns review loops.`,
7981
};

0 commit comments

Comments
 (0)