From 93e5fff279bd9449feaaf431a5765c8e6f2cb400 Mon Sep 17 00:00:00 2001 From: Sawyer Cutler Date: Sat, 12 Sep 2026 13:24:05 -0700 Subject: [PATCH] Restore Critic verify-by-temporary-test workflow --- src/agent/directors/critic/package.test.ts | 17 +++++++++++++++++ src/agent/directors/critic/package.ts | 11 +++++++++++ 2 files changed, 28 insertions(+) diff --git a/src/agent/directors/critic/package.test.ts b/src/agent/directors/critic/package.test.ts index c36052d40..7927d0749 100644 --- a/src/agent/directors/critic/package.test.ts +++ b/src/agent/directors/critic/package.test.ts @@ -73,6 +73,23 @@ describe("criticPackage", () => { ); }); + test("systemPrompt restores verify-by-temporary-test workflow", () => { + const p = criticPackage.systemPrompt; + expect(p).toMatch(/Verify by temporary test/i); + expect(p).toMatch(/Form hypotheses/i); + expect(p).toContain("tmp/critique-tests/"); + expect(p).toMatch(/report only verified issues/i); + expect(p).toMatch(/keepers for permanent inclusion/i); + expect(p).toMatch(/clean up/i); + }); + + test("systemPrompt owns no report envelope", () => { + const p = criticPackage.systemPrompt; + expect(p).not.toMatch(/## Summary/); + expect(p).not.toMatch(/## Findings/); + expect(p).not.toMatch(/Recommended Tests for Permanent Inclusion/); + }); + test("systemPrompt has no tool-schema restatement or fake caps", () => { const p = criticPackage.systemPrompt; expect(p).not.toMatch(/parameters?:/i); diff --git a/src/agent/directors/critic/package.ts b/src/agent/directors/critic/package.ts index 2be1dd7a8..b99060580 100644 --- a/src/agent/directors/critic/package.ts +++ b/src/agent/directors/critic/package.ts @@ -4,6 +4,11 @@ import { REVIEW_TOOLS } from "../tool-sets.js"; /** * Critic worker (CL-5819 / CL-7021 / CL-7015 rename from critique). * Critic identity — defects with evidence; never fix product code. + * Verify-by-temporary-test workflow restored from the GaaS critique.md + * original (CL-7655) — pin 6e16b6c does not resolve in the local agents + * checkout, so the wording was verified against critique.md as present at + * local HEAD c0efce7 (imported from alexanderguy/skills at e33fe00, last + * synced at 3743b7d) rather than copied 1:1. */ export const criticPackage: DirectorPackage = { id: "critic", @@ -36,6 +41,12 @@ Evidence rules: - Call out gaps: what you did not cover so the parent does not assume closed. - Recommend permanent tests the suite should keep (name the scenario; do not implement them here — route to testsmith/builder). +Verify by temporary test — hypotheses need evidence, not vibes: +- Form hypotheses first: name each suspected defect before testing it. +- Write focused temp tests under 'tmp/critique-tests/' with the repo's own framework, and run them with the existing suite. +- A test that disproves a hypothesis discards the finding — report only verified issues. +- Recommend keepers for permanent inclusion (uncovered critical paths, edge cases, regression guards); clean up the rest — route keepers to testsmith/builder, never commit them from here. + Correctness and this-diff hygiene: - Flag gaps that affect correctness or the stated requirements/success_criteria. - Also flag hygiene this diff introduced: dead code, duplication, needless abstraction. Cite path. Do not fix.