Skip to content

Commit 484c187

Browse files
committed
Client now logs structured output from main agent
1 parent a278d45 commit 484c187

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

.agents/codebase-commands-explorer.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ const definition: AgentDefinition = {
1414
spawnerPrompt: `Analyzes any project's codebase to comprehensively discover all commands needed to build, test, and run the project. Provides detailed analysis of project structure, tech stack, and working commands with confidence scores.`,
1515

1616
toolNames: ['spawn_agents', 'set_output'],
17-
spawnableAgents: ['codebuff/file-explorer@0.0.4', 'codebuff/read-only-commander-lite@0.0.1'],
17+
spawnableAgents: [
18+
'codebuff/file-explorer@0.0.4',
19+
'codebuff/read-only-commander-lite@0.0.1',
20+
],
1821

1922
inputSchema: {
2023
prompt: {
@@ -175,10 +178,9 @@ const definition: AgentDefinition = {
175178
## Analysis Strategy:
176179
177180
1. **Project Structure Exploration**: First spawn file-explorer to understand the project layout, key files, and technology stack.
181+
In parallel, spawn a second file-explorer to learn about the build, lint, and testing processes across the codebase.
178182
179-
2. **Build and Testing Exploration**: Spawn a second file-explorer to learn about the build, lint, and testing processes across the codebase.
180-
181-
3. **Massive Parallel Command Testing**: Only after completing steps 1 and 2, spawn MANY (10-15) read-only-commander agents simultaneously to test different command combinations, including for any relevant sub-directories if this is a monorepo.
183+
2. **Massive Parallel Command Testing**: Only after fully completing step 1 and getting back the results, spawn MANY (10-15) read-only-commander agents simultaneously to test different command combinations, including for any relevant sub-directories if this is a monorepo.
182184
Look for commands for the following project types:
183185
- Web apps: next.js, react, vue, etc. commands (build, test, start, dev, lint, etc.)
184186
- Node.js projects: npm/yarn/pnpm commands (build, test, start, dev, lint, etc.)
@@ -188,7 +190,7 @@ const definition: AgentDefinition = {
188190
189191
Include CI/CD Analysis: Have agents examine CI/CD files (.github/workflows, .gitlab-ci.yml, etc.) to discover official build processes
190192
191-
4. **Final Analysis**: Use the set_output tool to output the results of the analysis. Rate each working command based on:
193+
3. **Final Analysis**: Use the set_output tool to output the results of the analysis. Rate each working command based on:
192194
- Success rate of execution
193195
- Presence in official documentation/CI
194196
- Standard conventions for the project type

npm-app/src/client.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1391,6 +1391,11 @@ Go to https://www.codebuff.com/config for more information.`) +
13911391
)
13921392
}
13931393

1394+
// Print structured output as JSON if available
1395+
if (a.output?.type === 'structuredOutput') {
1396+
console.log('\n' + JSON.stringify(a.output.value, null, 2))
1397+
}
1398+
13941399
if (DiffManager.getChanges().length > 0) {
13951400
let checkpointAddendum = ''
13961401
try {

0 commit comments

Comments
 (0)