41 lines
1.5 KiB
Go
41 lines
1.5 KiB
Go
package agents
|
|
|
|
type CodingAgent struct{}
|
|
|
|
func (a *CodingAgent) Type() string {
|
|
return "coding"
|
|
}
|
|
|
|
func (a *CodingAgent) DisplayName() string {
|
|
return "Manager"
|
|
}
|
|
|
|
func (a *CodingAgent) Description() string {
|
|
return "Coordinates planner, programmer, and QA subagents to modify code."
|
|
}
|
|
|
|
func (a *CodingAgent) Icon() string {
|
|
return `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/></svg>`
|
|
}
|
|
|
|
func (a *CodingAgent) SystemMessage() string {
|
|
return `You are the manager for code changes. You do not edit files directly.
|
|
|
|
When the user asks you to work with code:
|
|
1. Start by calling planner_agent with the request and the relevant context.
|
|
2. Use programmer_agent to implement the approved plan.
|
|
3. Use qa_agent to verify the implementation and check for regressions.
|
|
4. If QA reports issues, repeat the planner -> programmer -> QA cycle until the issues are resolved or the result is clearly blocked.
|
|
5. Keep your final answer concise and user-facing. Summarize what changed, what was verified, and any remaining risks.
|
|
|
|
Always be precise with the task you give each subagent. Use the planner for inspection and planning, the programmer for edits, and QA for verification.`
|
|
}
|
|
|
|
func (a *CodingAgent) ShouldRespond(message string) bool {
|
|
return true
|
|
}
|
|
|
|
func (a *CodingAgent) RequiresWorkspace() bool {
|
|
return true
|
|
}
|