Skip to content

Commit 2d2b2d1

Browse files
committed
Delete reviewer-max. Move reviewerFactory into reviewer.ts.
1 parent 080e406 commit 2d2b2d1

File tree

4 files changed

+47
-61
lines changed

4 files changed

+47
-61
lines changed

.agents/reviewer/reviewer-factory.ts

Lines changed: 0 additions & 44 deletions
This file was deleted.

.agents/reviewer/reviewer-lite.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { publisher } from '../constants'
2-
import { reviewer } from './reviewer-factory'
2+
import { createReviewer } from './reviewer'
33

44
import type { SecretAgentDefinition } from '../types/secret-agent-definition'
55

66
const definition: SecretAgentDefinition = {
77
id: 'reviewer-lite',
88
publisher,
9-
...reviewer('x-ai/grok-4-fast'),
9+
...createReviewer('x-ai/grok-4-fast'),
1010
}
1111

1212
export default definition

.agents/reviewer/reviewer-max.ts

Lines changed: 0 additions & 12 deletions
This file was deleted.

.agents/reviewer/reviewer.ts

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,54 @@
11
import { publisher } from '../constants'
2-
import { reviewer } from './reviewer-factory'
3-
42
import type { SecretAgentDefinition } from '../types/secret-agent-definition'
3+
import type { Model } from '@codebuff/common/old-constants'
4+
5+
export const createReviewer = (model: Model): Omit<SecretAgentDefinition, 'id'> => ({
6+
model,
7+
displayName: 'Nit Pick Nick',
8+
spawnerPrompt:
9+
'Reviews file changes and responds with critical feedback. Use this after making any significant change to the codebase; otherwise, no need to use this agent for minor changes since it takes a second.',
10+
inputSchema: {
11+
prompt: {
12+
type: 'string',
13+
description: 'What should be reviewed. Be brief.',
14+
},
15+
},
16+
outputMode: 'last_message',
17+
toolNames: ['run_file_change_hooks'],
18+
spawnableAgents: [],
19+
20+
inheritParentSystemPrompt: true,
21+
includeMessageHistory: true,
22+
23+
instructionsPrompt: `Your task is to provide helpful feedback on the last file changes made by the assistant.
24+
25+
IMPORTANT: Before analyzing the file changes, you should first:
26+
1. Run file change hooks to validate the changes using the run_file_change_hooks tool
27+
2. Include the hook results in your feedback - if any hooks fail, mention the specific failures and suggest how to fix them
28+
3. If hooks pass and no issues are found, mention that validation was successful
29+
4. Always run hooks for TypeScript/JavaScript changes, test file changes, or when the changes could affect compilation/tests
30+
31+
NOTE: You cannot make any changes directly! You can only suggest changes.
32+
33+
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.
34+
35+
- Focus on getting to a complete and correct solution as the top priority.
36+
- Try to keep any changes to the codebase as minimal as possible.
37+
- Simplify any logic that can be simplified.
38+
- Where a function can be reused, reuse it and do not create a new one.
39+
- Make sure that no new dead code is introduced.
40+
- Make sure there are no missing imports.
41+
- Make sure no sections were deleted that weren't supposed to be deleted.
42+
- Make sure the new code matches the style of the existing code.
43+
- Make sure there are no unnecessary try/catch blocks. Prefer to remove those.
44+
45+
Be concise and to the point.`,
46+
})
547

648
const definition: SecretAgentDefinition = {
749
id: 'reviewer',
850
publisher,
9-
...reviewer('anthropic/claude-sonnet-4.5'),
51+
...createReviewer('anthropic/claude-sonnet-4.5'),
1052
}
1153

1254
export default definition

0 commit comments

Comments
 (0)