mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-29 20:11:04 +08:00
refactor: deep Codex v4 API conversion for all 20 team skills
Upgrade all team-* skills from mechanical v3→v4 API renames to deep v4 tool integration with skill-adaptive patterns: - list_agents: health checks in handleResume, cleanup verification in handleComplete, added to allowed-tools and coordinator toolbox - Named targeting: task_name uses task-id (e.g. EXPLORE-001) instead of generic <role>-worker, enabling send_message/assign_task by name - Message semantics: send_message for supplementary cross-agent context vs assign_task for triggering work, with skill-specific examples - Model selection: per-role reasoning_effort guidance matching each skill's actual roles (not generic boilerplate) - timeout_ms: added to all wait_agent calls, timed_out handling in all 18 monitor.md files - Skill-adaptive v4 sections: ultra-analyze N-parallel coordination, lifecycle-v4 supervisor assign_task/send_message distinction, brainstorm ideator parallel patterns, iterdev generator-critic loops, frontend-debug iterative debug assign_task, perf-opt benchmark context sharing, executor lightweight trimmed v4, etc. 60 files changed across 20 team skills (SKILL.md, monitor.md, role.md) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
| Worker spawn | `Agent({ subagent_type: "team-worker", prompt })` | `spawn_agent({ agent_type: "tlv4_worker", items })` |
|
||||
| Supervisor spawn | `Agent({ subagent_type: "team-supervisor", prompt })` | `spawn_agent({ agent_type: "tlv4_supervisor", items })` |
|
||||
| Supervisor wake | `SendMessage({ recipient: "supervisor", content })` | `send_input({ id: supervisorId, items })` |
|
||||
| Supervisor shutdown | `SendMessage({ type: "shutdown_request" })` | `close_agent({ id: supervisorId })` |
|
||||
| Supervisor shutdown | `SendMessage({ type: "shutdown_request" })` | `close_agent({ target: supervisorId })` |
|
||||
| 等待完成 | 后台回调 -> monitor.md | `wait_agent({ ids, timeout_ms })` |
|
||||
| 任务状态 | `TaskCreate` / `TaskUpdate` | `tasks.json` 文件读写 |
|
||||
| 团队管理 | `TeamCreate` / `TeamDelete` | session folder init / cleanup |
|
||||
@@ -222,14 +222,14 @@ scope: [${task.deps}]
|
||||
pipeline_progress: ${done}/${total} tasks completed` }
|
||||
]
|
||||
})
|
||||
wait_agent({ ids: [supervisorId], timeout_ms: 300000 })
|
||||
wait_agent({ targets: [supervisorId], timeout_ms: 300000 })
|
||||
```
|
||||
|
||||
### Supervisor Shutdown
|
||||
|
||||
```javascript
|
||||
// 对齐 Claude Code SendMessage({ type: "shutdown_request" })
|
||||
close_agent({ id: supervisorId })
|
||||
close_agent({ target: supervisorId })
|
||||
```
|
||||
|
||||
### Wave 执行引擎
|
||||
@@ -300,7 +300,7 @@ pipeline_phase: ${task.pipeline_phase}` },
|
||||
|
||||
// 2) 批量等待
|
||||
if (agentMap.length > 0) {
|
||||
wait_agent({ ids: agentMap.map(a => a.agentId), timeout_ms: 900000 })
|
||||
wait_agent({ targets: agentMap.map(a => a.agentId), timeout_ms: 900000 })
|
||||
}
|
||||
|
||||
// 3) 收集结果,合并到 tasks.json
|
||||
@@ -315,7 +315,7 @@ pipeline_phase: ${task.pipeline_phase}` },
|
||||
state.tasks[taskId].status = 'failed'
|
||||
state.tasks[taskId].error = 'No discovery file produced'
|
||||
}
|
||||
close_agent({ id: agentId })
|
||||
close_agent({ target: agentId })
|
||||
}
|
||||
|
||||
// 4) 执行 CHECKPOINT 任务 (send_input 唤醒 supervisor)
|
||||
@@ -329,7 +329,7 @@ scope: [${task.deps.join(', ')}]
|
||||
pipeline_progress: ${completedCount}/${totalCount} tasks completed` }
|
||||
]
|
||||
})
|
||||
wait_agent({ ids: [supervisorId], timeout_ms: 300000 })
|
||||
wait_agent({ targets: [supervisorId], timeout_ms: 300000 })
|
||||
|
||||
// 读取 checkpoint 报告
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user