You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: api/src/agent/agent.prompts.ts
+17-4Lines changed: 17 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -118,20 +118,32 @@ export function buildPrBodyPrompt(ctx: PrBodyPromptContext): string {
118
118
].join('\n\n');
119
119
}
120
120
121
+
constTEST_OUTPUT_CONTRACT=`Output your verdict as the FIRST thing in your response — a \`\`\`json block before any other text:
122
+
\`\`\`json
123
+
{
124
+
"passed": true | false,
125
+
"summary": "<one-paragraph summary of what ran and the overall outcome>",
126
+
"failures": [
127
+
{ "name": "<test name, command, or category that failed>", "detail": "<what went wrong and any relevant output>" }
128
+
]
129
+
}
130
+
\`\`\`
131
+
Set "passed" to true only if ALL tests pass AND the application starts and runs correctly. Use an empty array for "failures" when passing. You may include detailed output after the JSON block.`;
`You are Hermes, an autonomous engineer working in a clone of \`${ctx.repoFullName}\`. Your task is to ensure the test suite passes for the changes made to resolve: **${ctx.issueTitle}**.`,
135
+
`You are Hermes, an autonomous engineer working in a clone of \`${ctx.repoFullName}\`. Your task is to verify the implementation for: **${ctx.issueTitle}**.`,
124
136
`--- APPROVED PLAN ---\n${ctx.plan}\n--- END PLAN ---`,
125
137
`Instructions:
126
138
1. Discover the test suite by inspecting the project structure (look for \`package.json\` test scripts, \`pytest.ini\`, \`jest.config.*\`, \`vitest.config.*\`, \`go.mod\`, \`Makefile\`, etc.).
127
139
2. Run the tests and capture the full output.
128
140
3. **Try to run the application itself** — start the dev server, CLI, or process and verify it launches without errors. For web/browser applications, open the running app in the browser and exercise the key user flows from the acceptance criteria. For CLI tools, invoke the main commands and check the output.
129
-
4. Report the results. Do NOT modify any source files — if tests fail or the application errors, document what went wrong and stop. Fixes are handled in a separate step.`,
141
+
4. Do NOT modify any source files — if tests fail or the application errors, document what went wrong. Fixes are handled in a separate step.`,
130
142
];
131
143
132
144
if(ctx.hasBrowser){
133
145
parts.push(
134
-
`A Camofox browser is available for step 5. Use it to open the running application and manually verify the acceptance criteria — click through real user flows, not just check that the page loads.`,
146
+
`A Camofox browser is available. Use it to open the running application and manually verify the acceptance criteria — click through real user flows, not just check that the page loads.`,
135
147
);
136
148
}
137
149
@@ -142,7 +154,8 @@ export function buildTestPrompt(ctx: TestPromptContext): string {
142
154
}
143
155
144
156
parts.push(
145
-
`When done, write a brief summary of what ran, what passed, and what failed or errored (if anything). Use \`.olympian/\` as a scratch directory for any temporary files (diffs, logs, etc.) — it is excluded from commits automatically. Do not run git yourself.`,
157
+
`Use \`.olympian/\` as a scratch directory for any temporary files (diffs, logs, etc.) — it is excluded from commits automatically. Do not run git yourself.`,
0 commit comments