Skip to content

Commit 210d41d

Browse files
committed
Add decomposing reviewer + tweaks
1 parent b17ad19 commit 210d41d

File tree

4 files changed

+65
-5
lines changed

4 files changed

+65
-5
lines changed

.agents/base2/base-layer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const definition: SecretAgentDefinition = {
3737
'read-only-commander',
3838
'decomposing-thinker',
3939
'editor',
40-
'reviewer',
40+
'decomposing-reviewer',
4141
'context-pruner',
4242
],
4343

@@ -47,7 +47,7 @@ const definition: SecretAgentDefinition = {
4747
4848
- **Tone:** Adopt a professional, direct, and concise tone suitable for a CLI environment.
4949
- **Orchestrate only:** Coordinate between agents but do not implement code yourself.
50-
- **Understand first, act second:** Always gather context and read relevant files BEFORE spawning code-drafters or editors.
50+
- **Understand first, act second:** Always gather context and read relevant files BEFORE spawning editors.
5151
- **Quality over speed:** Prioritize correctness over appearing productive. Fewer, well-informed agents are better than many rushed ones.
5252
- **Spawn mentioned agents:** If the user uses "@AgentName" in their message, you must spawn that agent.
5353
- **No final summary:** When the task is complete, inform the user in one sentence.

.agents/file-explorer/find-all-referencer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const definition: SecretAgentDefinition = {
1212
publisher,
1313
outputMode: 'last_message',
1414
includeMessageHistory: false,
15-
toolNames: ['spawn_agents', 'read_files'],
15+
toolNames: ['spawn_agents', 'find_files', 'read_files'],
1616
spawnableAgents: [
1717
'file-picker',
1818
'code-searcher',
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
import { publisher } from '../constants'
2+
3+
import type { SecretAgentDefinition } from '../types/secret-agent-definition'
4+
5+
const definition: SecretAgentDefinition = {
6+
id: 'decomposing-reviewer',
7+
publisher,
8+
model: 'anthropic/claude-sonnet-4.5',
9+
displayName: 'Decomposing Reviewer',
10+
spawnerPrompt:
11+
'Creates comprehensive code review by decomposing the review into multiple focused review aspects and synthesizing insights from parallel reviewer agents.',
12+
inputSchema: {
13+
params: {
14+
type: 'object',
15+
properties: {
16+
prompts: {
17+
type: 'array',
18+
items: {
19+
type: 'string',
20+
description: 'A specific review aspect or concern to analyze',
21+
},
22+
description: 'A list of 2-8 specific review aspects to analyze',
23+
},
24+
},
25+
required: ['prompts'],
26+
},
27+
},
28+
inheritParentSystemPrompt: true,
29+
includeMessageHistory: true,
30+
outputMode: 'structured_output',
31+
toolNames: ['spawn_agents', 'set_output'],
32+
spawnableAgents: ['reviewer'],
33+
34+
handleSteps: function* ({ params }) {
35+
const prompts: string[] = params?.prompts ?? []
36+
const { toolResult } = yield {
37+
toolName: 'spawn_agents',
38+
input: {
39+
agents: prompts.map((promptText) => ({
40+
agent_type: 'reviewer',
41+
prompt: promptText,
42+
})),
43+
},
44+
}
45+
46+
const reviews = toolResult
47+
? toolResult.map((result) =>
48+
result.type === 'json' ? result.value : '',
49+
)[0]
50+
: []
51+
yield {
52+
toolName: 'set_output',
53+
input: { reviews },
54+
}
55+
},
56+
}
57+
58+
export default definition

.agents/thinker/decomposing-thinker.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,13 @@ const definition: SecretAgentDefinition = {
4444
}
4545

4646
const thoughts = toolResult
47-
? toolResult.map((result) => (result.type === 'json' ? result.value : ''))
47+
? toolResult.map((result) =>
48+
result.type === 'json' ? result.value : '',
49+
)[0]
4850
: []
4951
yield {
5052
toolName: 'set_output',
51-
input: { results: thoughts },
53+
input: { thoughts },
5254
}
5355
},
5456
}

0 commit comments

Comments
 (0)