Skip to content

Commit 724c2f4

Browse files
committed
fix: added explicit nudge on issues array
1 parent 9f2745a commit 724c2f4

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

api/src/review/review.prompts.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ describe('buildReviewPrompt parseRetry guidance', () => {
2424
expect(p).toContain('"PASS" or "FAIL"');
2525
expect(p).toContain('NOT a boolean');
2626
expect(p).toContain('`confidence` MUST be present');
27-
expect(p).toContain('issues');
2827
expect(p).toContain('rationale'); // explicitly warns against this stray key
28+
// `issues` is emphasised as the critical field — it is the only thing the fix stage receives.
29+
expect(p).toContain('MOST IMPORTANT');
30+
expect(p).toContain('ONLY thing passed to the engineer who fixes the code');
2931
});
3032
});

api/src/review/review.prompts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ If the server fails to start, skip the browser step and note it in your summary
9393
`- \`verdict\` MUST be the string "PASS" or "FAIL" (uppercase) — NOT a boolean (\`true\`/\`false\`), number, or any other word.\n` +
9494
`- \`confidence\` MUST be present, as an integer 0–100.\n` +
9595
`- \`dimensions\` MUST contain all four boolean keys: \`correctness\`, \`tests\`, \`planCoverage\`, \`security\`.\n` +
96-
`- Put every finding inside the \`issues\` array using the exact \`{severity,title,detail,file?}\` shape — do NOT invent other keys (e.g. \`rationale\`, \`findings\`) for them. Free-form reasoning, if any, goes AFTER the closing \`\`\`.`,
96+
`- MOST IMPORTANT — \`issues\`: every concrete problem MUST be a structured object in the \`issues\` array with the exact \`{severity,title,detail,file?}\` shape. This array is the ONLY thing passed to the engineer who fixes the code — any finding left out, written as prose, or placed under a stray key (\`rationale\`, \`findings\`, \`explanation\`, …) is INVISIBLE to the fix stage and WILL NOT be fixed. Each \`detail\` must say both what is wrong and how to fix it. Put a FAIL's full reasoning here, not after the block.`,
9797
);
9898
}
9999

0 commit comments

Comments
 (0)