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:
catlog22
2026-02-24 00:05:29 +08:00
parent 695045787f
commit e92c6ce0b1
17 changed files with 616 additions and 445 deletions

View File

@@ -112,7 +112,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 + Update Ledger
@@ -161,6 +163,13 @@ TaskUpdate({ taskId: reviewId, owner: "reviewer", addBlockedBy: [devId] })
### Phase 4: Coordination Loop + GC Control + Ledger Updates
> **设计原则Stop-Wait**: 模型执行没有时间概念,禁止任何形式的轮询等待。
> - ❌ 禁止: `while` 循环 + `sleep` + 检查状态
> - ✅ 采用: 同步 `Task(run_in_background: false)` 调用Worker 返回 = 阶段完成信号
>
> 按 Phase 3 创建的任务链顺序,逐阶段 spawn worker 同步执行。
> Worker prompt 使用 SKILL.md Coordinator Spawn Template。
| Received Message | Action |
|-----------------|--------|
| architect: design_ready | Read design → update ledger → unblock DEV |