Skip to content

Commit 411e6c9

Browse files
committed
Require production-code verification
1 parent bfa34a5 commit 411e6c9

3 files changed

Lines changed: 10 additions & 0 deletions

File tree

src/agent/system-prompt.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ describe("buildSystemPrompt", () => {
4646
const out = buildSystemPrompt();
4747
expect(out).toContain("# Verifying your work");
4848
expect(out).toMatch(/never characterize unverified work as complete/i);
49+
expect(out).toMatch(/execute the production code/i);
50+
expect(out).toMatch(/audit the changed implementation against every requested behavior/i);
4951
});
5052

5153
it("explains system-reminder semantics so the model knows they're from the runtime", () => {

src/agent/system-prompt.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@ export function buildSystemPrompt(opts: BuildSystemPromptOptions = {}): string {
9191
lines.push(
9292
"- If a check fails, fix the underlying cause rather than working around it (no --no-verify, no skipping tests, no commenting out asserts).",
9393
);
94+
lines.push(
95+
"- Tests must execute the production code they claim to verify. Never copy or reimplement application logic inside a test just to produce a green check.",
96+
);
97+
lines.push(
98+
"- After checks pass, audit the changed implementation against every requested behavior. A passing command is evidence, not proof that the tests covered the request; add a focused negative or interaction check when a requirement is otherwise untested.",
99+
);
94100
lines.push("");
95101
lines.push("# Conversation conventions");
96102
lines.push(

src/headless/reliable.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ Rules:
2020
- Do not make verification commands pass by masking failures with fallbacks like "|| true", "|| echo", "|| :", or by appending "; echo $?".
2121
- If proving something is absent, use an unmasked negated check such as "! grep ..." in an "&&" chain, or write a tiny verify script that exits non-zero on failure.
2222
- If verification fails, fix the underlying issue and run verification again.
23+
- Verification must execute the changed production code. Do not duplicate implementation logic inside a test or verify only a test-side copy of the behavior.
24+
- After verification passes, inspect the changed implementation and audit every requested behavior against direct evidence. Add a focused negative, edge, or interaction check for requirements the existing command did not exercise.
2325
- For code or file changes, name the fresh passing verification command in the final answer.
2426
- For read-only or memory-only work, keep the task lifecycle auditable and state that no file-change verification was needed.`;
2527

0 commit comments

Comments
 (0)