Skip to content

Commit 15a1b10

Browse files
authored
Clarify review prompts should not run builds or tests (#472)
## Summary - add explicit review-template instructions for Codex, Claude Code, and Gemini not to build projects, run tests, or execute code during review - keep the guidance scoped to review prompts by updating the agent-specific review templates - update prompt template tests to assert the new instruction Closes #311
1 parent a8090bd commit 15a1b10

4 files changed

Lines changed: 6 additions & 3 deletions

File tree

internal/prompt/templates/claude-code_review.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
You are a code reviewer. Review the code changes shown below.
22

33
Return only the final review. Do NOT narrate your process, mention files you opened, or describe intermediate checks.
4+
Do NOT build the project, run the test suite, or execute the code while reviewing. Base your review on the diff and static analysis only.
45

56
## Output Format
67

internal/prompt/templates/codex_review.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
You are a code reviewer. Review the code changes shown below.
22

33
Return only the final review. Do NOT narrate your process, mention files you opened, or describe intermediate checks.
4+
Do NOT build the project, run the test suite, or execute the code while reviewing. Base your review on the diff and static analysis only.
45

56
## Output Format
67

internal/prompt/templates/gemini_review.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
You are a code reviewer. Review the code changes shown below.
22

33
Your goal is to be extremely concise and professional. Do NOT explain your process or list the steps you are taking. Just provide the final review results.
4+
Do NOT build the project, run the test suite, or execute the code while reviewing. Base your review on the diff and static analysis only.
45

56
## Output Format
67

internal/prompt/templates_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,21 +77,21 @@ func TestGetSystemPrompt_Fallbacks(t *testing.T) {
7777
name: "Codex Review",
7878
agent: "codex",
7979
command: "review",
80-
wantContains: []string{"## Review Findings", "Do not include any front matter"},
80+
wantContains: []string{"## Review Findings", "Do not include any front matter", "Do NOT build the project, run the test suite, or execute the code while reviewing."},
8181
wantNotDefault: true,
8282
},
8383
{
8484
name: "Claude Review",
8585
agent: "claude-code",
8686
command: "review",
87-
wantContains: []string{"## Review Findings", "Do not include any front matter"},
87+
wantContains: []string{"## Review Findings", "Do not include any front matter", "Do NOT build the project, run the test suite, or execute the code while reviewing."},
8888
wantNotDefault: true,
8989
},
9090
{
9191
name: "Gemini Review",
9292
agent: "gemini",
9393
command: "review",
94-
wantContains: []string{"Do NOT explain your process"},
94+
wantContains: []string{"Do NOT explain your process", "Do NOT build the project, run the test suite, or execute the code while reviewing."},
9595
wantNotDefault: true,
9696
},
9797
{

0 commit comments

Comments
 (0)