updated subagent workflows

This commit is contained in:
Jonas H
2026-04-06 20:05:59 +02:00
parent 90e62b1a51
commit 0982a37e4d
16 changed files with 65 additions and 262 deletions

View File

@@ -13,7 +13,6 @@ description: "Full implementation pipeline: scout → plan → review → code
| planner | Detailed implementation plans |
| plan-reviewer | Reviews plans for correctness and risk |
| coder | Primary implementation |
| coder-parallel | Parallel implementation tasks (fan-out) |
| reviewer | Cross-family code review |
| fixer | Applies review feedback precisely |
@@ -34,14 +33,7 @@ Read `plan-review.md` from the artifact dir. If **NEEDS_REVISION** or **REJECTED
## Phase 2: Implement
```js
// Single coder:
await subagent({ agent: "coder", task: `Read and implement the plan at <chain_dir>/plan.md` })
// Or parallel coders (if plan has independent sections):
await subagent({ tasks: [
{ agent: "coder-parallel", task: `Implement Part A from <chain_dir>/plan.md` },
{ agent: "coder-parallel", task: `Implement Part B from <chain_dir>/plan.md` }
]})
```
Use the chain dir path from Phase 1's result.
@@ -79,22 +71,6 @@ After all phases complete, give the user a brief summary of what is next to take
Be concise — a few lines is enough when things went well. Only expand on problems.
## Parallel Coders Within a Chain
Fan-out/fan-in inside a chain (useful when plan sections are independent):
```js
await subagent({ chain: [
{ agent: "scout", task: "Explore the codebase for: {task}" },
{ agent: "planner", task: "..." },
{ parallel: [
{ agent: "coder-parallel", task: "Read the plan at {chain_dir}/plan.md. Implement Part A" },
{ agent: "coder-parallel", task: "Read the plan at {chain_dir}/plan.md. Implement Part B" }
]},
{ agent: "reviewer", task: "Review all changes from {previous}" }
]})
```
## Step Overrides
Override agent defaults per step:
@@ -133,16 +109,16 @@ When a subagent call returns no output (silent failure), apply cross-family mode
```js
// Example: scout fails silently, retry with fallback
subagent({ agent: "scout", task: "...", model: "anthropic/claude-haiku-4-5" })
subagent({ agent: "scout", task: "...", model: "opencode/big-pickle" })
```
| Agent | Primary | Fallback |
|-------|---------|----------|
| scout | zai/glm-4.7-flash | anthropic/claude-haiku-4-5 |
| planner, coder | zai/glm-5.1 | anthropic/claude-opus-4-6 |
| coder-parallel | zai/glm-4.7 | anthropic/claude-sonnet-4-6 |
| plan-reviewer, reviewer | anthropic/claude-opus-4-6 | zai/glm-5.1 |
| fixer | anthropic/claude-sonnet-4-6 | zai/glm-5.1 |
| scout | opencode-go/mimo-v2-pro | opencode/big-pickle |
| planner | opencode/qwen3.6-plus-free | opencode-go/glm-5 |
| coder | opencode-go/mimo-v2-pro | opencode-go/kimi-k2.5 |
| plan-reviewer, reviewer | opencode-go/kimi-k2.5 | opencode/qwen3.6-plus-free |
| fixer | opencode-go/glm-5 | opencode-go/mimo-v2-pro |
## Adaptive Routing