mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-28 09:23:08 +08:00
fix(skills): replace polling/pre-spawning with Stop-Wait pattern across all team coordinators
All team coordinator roles now follow the Stop-Wait design principle: - Phase 2: Remove worker pre-spawning, workers are spawned per-stage in Phase 4 - Phase 4: Add Stop-Wait principle note (synchronous Task calls instead of polling) - monitor.md: Replace while+sleep polling loops with synchronous Task execution Teams updated: team-brainstorm, team-frontend, team-issue, team-iterdev, team-lifecycle, team-lifecycle-v2, team-quality-assurance, team-tech-debt, team-testing, team-uidesign, team-ultra-analyze
This commit is contained in:
@@ -103,7 +103,6 @@ mcp__ccw-tools__team_msg({ summary: `[${role}] ...` })
|
||||
const TEAM_CONFIG = {
|
||||
name: "testing",
|
||||
sessionDir: ".workflow/.team/TST-{slug}-{date}/",
|
||||
msgDir: ".workflow/.team-msg/testing/",
|
||||
sharedMemory: "shared-memory.json",
|
||||
testLayers: {
|
||||
L1: { name: "Unit Tests", coverage_target: 80 },
|
||||
|
||||
@@ -86,7 +86,7 @@ AskUserQuestion({
|
||||
})
|
||||
```
|
||||
|
||||
### Phase 2: Create Team + Spawn Workers
|
||||
### Phase 2: Create Team + Initialize Session
|
||||
|
||||
```javascript
|
||||
TeamCreate({ team_name: teamName })
|
||||
@@ -130,7 +130,9 @@ const teamSession = {
|
||||
Write(`${sessionFolder}/team-session.json`, JSON.stringify(teamSession, null, 2))
|
||||
```
|
||||
|
||||
Spawn workers (see SKILL.md Coordinator Spawn Template).
|
||||
// ⚠️ Workers are NOT pre-spawned here.
|
||||
// Workers are spawned per-stage in Phase 4 via Stop-Wait Task(run_in_background: false).
|
||||
// See SKILL.md Coordinator Spawn Template for worker prompt templates.
|
||||
|
||||
### Phase 3: Create Task Chain
|
||||
|
||||
@@ -178,6 +180,13 @@ TaskUpdate({ taskId: anaId, owner: "analyst", addBlockedBy: [run2Id] })
|
||||
|
||||
### Phase 4: Coordination Loop + Generator-Critic Control
|
||||
|
||||
> **设计原则(Stop-Wait)**: 模型执行没有时间概念,禁止任何形式的轮询等待。
|
||||
> - ❌ 禁止: `while` 循环 + `sleep` + 检查状态
|
||||
> - ✅ 采用: 同步 `Task(run_in_background: false)` 调用,Worker 返回 = 阶段完成信号
|
||||
>
|
||||
> 按 Phase 3 创建的任务链顺序,逐阶段 spawn worker 同步执行。
|
||||
> Worker prompt 使用 SKILL.md Coordinator Spawn Template。
|
||||
|
||||
| Received Message | Action |
|
||||
|-----------------|--------|
|
||||
| strategist: strategy_ready | Read strategy → team_msg log → TaskUpdate completed |
|
||||
|
||||
Reference in New Issue
Block a user