Skip to content

Commit bc207d7

Browse files
Overhaul tester director prompt for suite/repro evidence (#646)
Align the tester leaf with other directors: named Tester identity, blinders-on verify lane, DONE GATE / REPORT MAP, and explicit never-fix / never-design boundaries. CL-7026
1 parent cb795e1 commit bc207d7

2 files changed

Lines changed: 63 additions & 19 deletions

File tree

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

Lines changed: 45 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,49 @@ describe("testerPackage", () => {
1111
expect(testerPackage.systemPrompt.startsWith("Placeholder")).toBe(false);
1212
});
1313

14-
test("systemPrompt states PRIMARY INTENT to verify not fix", () => {
15-
expect(testerPackage.systemPrompt).toContain("PRIMARY INTENT");
16-
expect(testerPackage.systemPrompt).toMatch(/run|verify/i);
17-
expect(testerPackage.systemPrompt).toMatch(/never fix|do not.*fix|Never fix/i);
18-
expect(testerPackage.systemPrompt).toContain("re-dispatch to build or testsmith");
14+
test("systemPrompt identity is Tester / TesterDirector (named entity)", () => {
15+
const p = testerPackage.systemPrompt;
16+
expect(p).toMatch(/TesterDirector \(Tester\)/);
17+
expect(p).toMatch(/runtime-verify lane only/i);
18+
expect(p).not.toMatch(/test director/i);
19+
});
20+
21+
test("systemPrompt states PRIMARY INTENT to run suite/repro and never fix", () => {
22+
const p = testerPackage.systemPrompt;
23+
expect(p).toContain("PRIMARY INTENT");
24+
expect(p).toMatch(/suite\s*\/\s*repro|suite \/ repro/i);
25+
expect(p).toMatch(/pass\/fail evidence|evidence/i);
26+
expect(p).toMatch(/never fix|Never fix|do not patch/i);
27+
expect(p).toContain("re-dispatch to build or testsmith");
28+
});
29+
30+
test("systemPrompt is blinders-on verify lane (not Build / Testsmith / orchestrator)", () => {
31+
const p = testerPackage.systemPrompt;
32+
expect(p).toMatch(/Blinders on/i);
33+
expect(p).toMatch(/not Build/i);
34+
expect(p).toMatch(/not Testsmith/i);
35+
expect(p).toMatch(/not an orchestrator/i);
36+
expect(p).toMatch(/Do not design permanent test cases/i);
37+
expect(p).toMatch(/Do not spawn specialists/i);
38+
});
39+
40+
test("systemPrompt has DONE GATE and REPORT MAP for evidence", () => {
41+
const p = testerPackage.systemPrompt;
42+
expect(p).toContain("DONE GATE");
43+
expect(p).toContain("REPORT MAP");
44+
expect(p).toMatch(/pass \| fail \| blocked/);
45+
expect(p).toMatch(/commands run|failure excerpts/i);
46+
});
47+
48+
test("systemPrompt has no tool-schema restatement or fake caps", () => {
49+
const p = testerPackage.systemPrompt;
50+
expect(p).not.toMatch(/parameters?:/i);
51+
expect(p).not.toMatch(/fan-out/i);
52+
expect(p).not.toMatch(/at most \d+/i);
53+
expect(p).not.toMatch(/turn budget/i);
54+
expect(p).not.toMatch(/scheduler/i);
55+
expect(p).not.toMatch(/no product-mutation tools/i);
56+
expect(p).not.toMatch(/harness-allowed tools/i);
1957
});
2058

2159
test("spawn.maySpawn is false (leaf)", () => {
@@ -35,8 +73,8 @@ describe("testerPackage", () => {
3573
expect(testerPackage.modelRole).toBe("test");
3674
});
3775

38-
test("primaryIntent is runtime verify never fix", () => {
39-
expect(testerPackage.primaryIntent).toMatch(/run|verify/i);
76+
test("primaryIntent is suite/repro evidence never fix", () => {
77+
expect(testerPackage.primaryIntent).toMatch(/suite\/repro|evidence/i);
4078
expect(testerPackage.primaryIntent).toMatch(/never fix/i);
4179
});
4280
});

src/agent/directors/tester/package.ts

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,38 @@ import type { DirectorPackage } from "../types.js";
22
import { READ_TOOLS } from "../tool-sets.js";
33

44
/**
5-
* Tester: runtime verification specialist — run tests and report; never fix product code.
5+
* Tester leaf (CL-7026).
6+
* Runtime verification — run suite/repro and report evidence; never fix product code.
67
*/
78
export const testerPackage: DirectorPackage = {
89
id: "tester",
9-
primaryIntent: "Run and verify tests; report results; never fix product code",
10+
primaryIntent: "Run suite/repro and report evidence; never fix product code",
1011
outOfLane: [
1112
"fixing product code",
1213
"implementing features",
1314
"designing test strategy as primary author (testsmith)",
1415
"orchestration",
1516
"docs-only work",
1617
],
17-
description: "Runtime verify specialist — run tests, report, never fix",
18-
systemPrompt: `You are TesterDirector, a specialist in Corbits Code.
18+
description: "Runtime verify specialist — run suite/repro, report evidence, never fix",
19+
systemPrompt: `You are TesterDirector (Tester), a specialist in Corbits Code.
1920
20-
PRIMARY INTENT: run and verify tests for the brief, then report pass/fail evidence. Never fix product code. Never become the implementer.
21+
PRIMARY INTENT: run the suite / repro for the brief and report pass/fail evidence. Never fix product code. Never become the implementer.
2122
22-
Workflow:
23-
1. Identify the commands or suites the brief specifies (or project defaults when clear).
24-
2. Run them via shell / harness-allowed tools.
25-
3. Capture exit codes, key failures, and paths.
26-
4. Report honestly — you have no product-mutation tools, so there is no way to patch source to make green.
23+
You are the runtime-verify lane only — not Build, not Testsmith, not an orchestrator. Do not spawn specialists. Do not design permanent test cases. Do not patch source to make green.
2724
28-
If tests fail: document failures, suspected area, and blockers. Suggest a re-dispatch to build or testsmith when design gaps appear.
25+
Blinders on — stay on the verify ask:
26+
1. Identify the commands, suites, or repro steps the brief specifies (or clear project defaults).
27+
2. Run them and capture exit codes, failing assertions, and paths.
28+
3. Report evidence honestly. Leave product fixes to build and permanent case design to testsmith.
2929
30-
OUT OF LANE: fixing product code, "just quickly" fixing, redesigning the whole suite as Testsmith's primary job, fleet orchestration.`,
30+
If tests fail: document failures, suspected area, and Blockers. Suggest a re-dispatch to build or testsmith when design gaps appear — do not fix or invent coverage yourself.
31+
32+
DONE GATE: Stop when the brief's verify ask is answered with evidence OR explicitly blocked under Blockers. Do not expand into exploration, review, or implementation.
33+
34+
REPORT MAP: Findings must map each requested check → pass | fail | blocked, with commands run and key failure excerpts. Paths list suites/files exercised.
35+
36+
OUT OF LANE: fixing product code, "just quickly" fixing, redesigning the suite as Testsmith's primary job, fleet orchestration, architecture essays, exploration maps as primary.`,
3137
tools: { allow: READ_TOOLS },
3238
spawn: { maySpawn: false },
3339
tier: "leaf",

0 commit comments

Comments
 (0)