Fix and enrich the orchestrator coordinator system prompt so it matches the current CLI and teaches harness selection + command discovery (#2361)
* Prompt changed for correct agent spawning * Fix formatting issue
This commit is contained in:
parent
e56248759e
commit
fadbdd26cd
|
|
@ -1030,11 +1030,16 @@ func orchestratorPrompt(project domain.ProjectID) string {
|
||||||
You are the human-facing coordinator for project %s. Coordinate work for the human, keep the project moving, and avoid doing implementation yourself unless it is necessary.
|
You are the human-facing coordinator for project %s. Coordinate work for the human, keep the project moving, and avoid doing implementation yourself unless it is necessary.
|
||||||
|
|
||||||
Spawn worker sessions for implementation with:
|
Spawn worker sessions for implementation with:
|
||||||
`+"`ao spawn --project %s --prompt \"<clear worker task>\"`"+`
|
`+"`ao spawn --project %s --name \"<label, max 20 chars>\" --prompt \"<clear worker task>\"`"+`
|
||||||
|
Both --project and --name are required.
|
||||||
|
|
||||||
|
To run a worker on a specific agent, add `+"`--agent <name>`"+` (an alias for `+"`--harness`"+`) — for example `+"`--agent codex`"+` or `+"`--agent claude-code`"+`. If you omit it, the project's default worker agent is used. Run `+"`ao spawn --help`"+` for the full list of agents and every flag.
|
||||||
|
|
||||||
Message workers with `+"`ao send`"+`, for example:
|
Message workers with `+"`ao send`"+`, for example:
|
||||||
`+"`ao send --session <worker-session-id> --message \"<your message>\"`"+`
|
`+"`ao send --session <worker-session-id> --message \"<your message>\"`"+`
|
||||||
|
|
||||||
|
To discover any other AO command, run `+"`ao --help`"+` (and `+"`ao <command> --help`"+` for details on one).
|
||||||
|
|
||||||
Use workers for focused implementation tasks, track their progress, synthesize their results, and only step into implementation directly for true emergencies or small coordination fixes.`, project, project)
|
Use workers for focused implementation tasks, track their progress, synthesize their results, and only step into implementation directly for true emergencies or small coordination fixes.`, project, project)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -833,8 +833,11 @@ func TestSpawnOrchestrator_UsesCoordinatorPrompt(t *testing.T) {
|
||||||
systemPrompt := agent.lastLaunch.SystemPrompt
|
systemPrompt := agent.lastLaunch.SystemPrompt
|
||||||
for _, want := range []string{
|
for _, want := range []string{
|
||||||
"You are the human-facing coordinator for project mer",
|
"You are the human-facing coordinator for project mer",
|
||||||
`ao spawn --project mer --prompt "<clear worker task>"`,
|
`ao spawn --project mer --name "<label, max 20 chars>" --prompt "<clear worker task>"`,
|
||||||
|
"`--agent <name>`",
|
||||||
|
"`ao spawn --help`",
|
||||||
"`ao send`",
|
"`ao send`",
|
||||||
|
"`ao --help`",
|
||||||
"avoid doing implementation yourself unless it is necessary",
|
"avoid doing implementation yourself unless it is necessary",
|
||||||
} {
|
} {
|
||||||
if !strings.Contains(systemPrompt, want) {
|
if !strings.Contains(systemPrompt, want) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue