-
Notifications
You must be signed in to change notification settings - Fork 16
Evaluator Workflow
guanxinyi edited this page Jun 5, 2025
·
1 revision

- Get Initial Codes: optional step, get initial codes from agent.
- Iterate Tasks: from task-1 to task-20.
- Call Agent: see data format.
- Rewrite files: update files or create new files.
- Init Env: optional step,init files running environment.
- Build Files: optional step, check files errors, such as reference errors.
- Test: end-to-end (E2E) test with Playwright.
- Retry: with error context from Build or Test
- Report.
export interface AgentRequest {
type: "normal" | "init"
task: string
// Code files, key is filePath, value is fileContent
files?: Record<string, string>
// Error context
error?: string
}
export interface AgentResponse {
// Code files, key is filePath, value is fileContent
files: Record<string, string>
// [filePath:string]: string Poor Extension
}
- request
{
"type": "init",
"task": " generate a calculator in a single HTML file. the first row should be an input element with id 'display'; the next 4 rows should contain buttons with digits from '0' to '9' and operators including '+-*/=.'; the last row should have a 'Clear' button. display 'Error' when catching exception or getting undefined value during calculating. And add the html file filename after code block. The filename should be on the next line as the language specifier in your code block. the filename is \"index.html\""
}
- response
{
"files":{
"index.html": "...file content"
}
}
- request
{
"type": "normal",
"task": "add button sqrt with text '√' at the right of button clear; click it to calculate result using display content directly",
"files": {
"index.html": "...file content...",
},
"error": "...error message..."
}
- response
{
"files": {
"index.html": "...file content...",
"index.css": "...file content...",
"index.js": "...file content...",
}
}