Skip to content

Commit 5240d28

Browse files
committed
Include user prompt again in reviewer
1 parent 4581dfd commit 5240d28

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

.agents/reviewer/reviewer.ts

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
import { publisher } from '../constants'
2-
import type { SecretAgentDefinition } from '../types/secret-agent-definition'
2+
import {
3+
PLACEHOLDER,
4+
type SecretAgentDefinition,
5+
} from '../types/secret-agent-definition'
36
import type { Model } from '@codebuff/common/old-constants'
47

5-
export const createReviewer = (model: Model): Omit<SecretAgentDefinition, 'id'> => ({
8+
export const createReviewer = (
9+
model: Model,
10+
): Omit<SecretAgentDefinition, 'id'> => ({
611
model,
712
displayName: 'Nit Pick Nick',
813
spawnerPrompt:
@@ -20,7 +25,12 @@ export const createReviewer = (model: Model): Omit<SecretAgentDefinition, 'id'>
2025
inheritParentSystemPrompt: true,
2126
includeMessageHistory: true,
2227

23-
instructionsPrompt: `Your task is to provide helpful feedback on the last file changes made by the assistant.
28+
instructionsPrompt: `For reference, here is the original user request:
29+
<user_message>
30+
${PLACEHOLDER.USER_INPUT_PROMPT}
31+
</user_message>
32+
33+
Your task is to provide helpful feedback on the last file changes made by the assistant.
2434
2535
IMPORTANT: Before analyzing the file changes, you should first:
2636
1. Run file change hooks to validate the changes using the run_file_change_hooks tool
@@ -33,6 +43,7 @@ NOTE: You cannot make any changes directly! You can only suggest changes.
3343
Next, you should critique the code changes made recently in the above conversation. Provide specific feedback on the file changes made by the assistant, file-by-file.
3444
3545
- Focus on getting to a complete and correct solution as the top priority.
46+
- Make sure all the requirements in the user's message are addressed. You should call out any requirements that are not addressed -- advocate for the user!
3647
- Try to keep any changes to the codebase as minimal as possible.
3748
- Simplify any logic that can be simplified.
3849
- Where a function can be reused, reuse it and do not create a new one.

0 commit comments

Comments
 (0)