diff --git a/src/agent/directors/tester/package.test.ts b/src/agent/directors/tester/package.test.ts index a6bff51e8..42cc41d38 100644 --- a/src/agent/directors/tester/package.test.ts +++ b/src/agent/directors/tester/package.test.ts @@ -11,11 +11,49 @@ describe("testerPackage", () => { expect(testerPackage.systemPrompt.startsWith("Placeholder")).toBe(false); }); - test("systemPrompt states PRIMARY INTENT to verify not fix", () => { - expect(testerPackage.systemPrompt).toContain("PRIMARY INTENT"); - expect(testerPackage.systemPrompt).toMatch(/run|verify/i); - expect(testerPackage.systemPrompt).toMatch(/never fix|do not.*fix|Never fix/i); - expect(testerPackage.systemPrompt).toContain("re-dispatch to build or testsmith"); + test("systemPrompt identity is Tester / TesterDirector (named entity)", () => { + const p = testerPackage.systemPrompt; + expect(p).toMatch(/TesterDirector \(Tester\)/); + expect(p).toMatch(/runtime-verify lane only/i); + expect(p).not.toMatch(/test director/i); + }); + + test("systemPrompt states PRIMARY INTENT to run suite/repro and never fix", () => { + const p = testerPackage.systemPrompt; + expect(p).toContain("PRIMARY INTENT"); + expect(p).toMatch(/suite\s*\/\s*repro|suite \/ repro/i); + expect(p).toMatch(/pass\/fail evidence|evidence/i); + expect(p).toMatch(/never fix|Never fix|do not patch/i); + expect(p).toContain("re-dispatch to build or testsmith"); + }); + + test("systemPrompt is blinders-on verify lane (not Build / Testsmith / orchestrator)", () => { + const p = testerPackage.systemPrompt; + expect(p).toMatch(/Blinders on/i); + expect(p).toMatch(/not Build/i); + expect(p).toMatch(/not Testsmith/i); + expect(p).toMatch(/not an orchestrator/i); + expect(p).toMatch(/Do not design permanent test cases/i); + expect(p).toMatch(/Do not spawn specialists/i); + }); + + test("systemPrompt has DONE GATE and REPORT MAP for evidence", () => { + const p = testerPackage.systemPrompt; + expect(p).toContain("DONE GATE"); + expect(p).toContain("REPORT MAP"); + expect(p).toMatch(/pass \| fail \| blocked/); + expect(p).toMatch(/commands run|failure excerpts/i); + }); + + test("systemPrompt has no tool-schema restatement or fake caps", () => { + const p = testerPackage.systemPrompt; + expect(p).not.toMatch(/parameters?:/i); + expect(p).not.toMatch(/fan-out/i); + expect(p).not.toMatch(/at most \d+/i); + expect(p).not.toMatch(/turn budget/i); + expect(p).not.toMatch(/scheduler/i); + expect(p).not.toMatch(/no product-mutation tools/i); + expect(p).not.toMatch(/harness-allowed tools/i); }); test("spawn.maySpawn is false (leaf)", () => { @@ -35,8 +73,8 @@ describe("testerPackage", () => { expect(testerPackage.modelRole).toBe("test"); }); - test("primaryIntent is runtime verify never fix", () => { - expect(testerPackage.primaryIntent).toMatch(/run|verify/i); + test("primaryIntent is suite/repro evidence never fix", () => { + expect(testerPackage.primaryIntent).toMatch(/suite\/repro|evidence/i); expect(testerPackage.primaryIntent).toMatch(/never fix/i); }); }); diff --git a/src/agent/directors/tester/package.ts b/src/agent/directors/tester/package.ts index b07de7c55..8cc8c07af 100644 --- a/src/agent/directors/tester/package.ts +++ b/src/agent/directors/tester/package.ts @@ -2,11 +2,12 @@ import type { DirectorPackage } from "../types.js"; import { READ_TOOLS } from "../tool-sets.js"; /** - * Tester: runtime verification specialist — run tests and report; never fix product code. + * Tester leaf (CL-7026). + * Runtime verification — run suite/repro and report evidence; never fix product code. */ export const testerPackage: DirectorPackage = { id: "tester", - primaryIntent: "Run and verify tests; report results; never fix product code", + primaryIntent: "Run suite/repro and report evidence; never fix product code", outOfLane: [ "fixing product code", "implementing features", @@ -14,20 +15,25 @@ export const testerPackage: DirectorPackage = { "orchestration", "docs-only work", ], - description: "Runtime verify specialist — run tests, report, never fix", - systemPrompt: `You are TesterDirector, a specialist in Corbits Code. + description: "Runtime verify specialist — run suite/repro, report evidence, never fix", + systemPrompt: `You are TesterDirector (Tester), a specialist in Corbits Code. -PRIMARY INTENT: run and verify tests for the brief, then report pass/fail evidence. Never fix product code. Never become the implementer. +PRIMARY INTENT: run the suite / repro for the brief and report pass/fail evidence. Never fix product code. Never become the implementer. -Workflow: -1. Identify the commands or suites the brief specifies (or project defaults when clear). -2. Run them via shell / harness-allowed tools. -3. Capture exit codes, key failures, and paths. -4. Report honestly — you have no product-mutation tools, so there is no way to patch source to make green. +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. -If tests fail: document failures, suspected area, and blockers. Suggest a re-dispatch to build or testsmith when design gaps appear. +Blinders on — stay on the verify ask: +1. Identify the commands, suites, or repro steps the brief specifies (or clear project defaults). +2. Run them and capture exit codes, failing assertions, and paths. +3. Report evidence honestly. Leave product fixes to build and permanent case design to testsmith. -OUT OF LANE: fixing product code, "just quickly" fixing, redesigning the whole suite as Testsmith's primary job, fleet orchestration.`, +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. + +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. + +REPORT MAP: Findings must map each requested check → pass | fail | blocked, with commands run and key failure excerpts. Paths list suites/files exercised. + +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.`, tools: { allow: READ_TOOLS }, spawn: { maySpawn: false }, tier: "leaf",