claude-code-workflow 7.2.24 → 7.2.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/.ccw/workflows/cli-tools-usage.md +123 -521
  2. package/.claude/CLAUDE.md +20 -0
  3. package/.claude/agents/action-planning-agent.md +6 -0
  4. package/.claude/agents/cli-explore-agent.md +63 -77
  5. package/.claude/agents/cli-lite-planning-agent.md +10 -11
  6. package/.claude/agents/issue-plan-agent.md +7 -2
  7. package/.claude/commands/workflow/spec/setup.md +1 -1
  8. package/.claude/skills/brainstorm/SKILL.md +408 -408
  9. package/.claude/skills/review-cycle/SKILL.md +132 -132
  10. package/.claude/skills/review-cycle/phases/review-module.md +4 -4
  11. package/.claude/skills/review-cycle/phases/review-session.md +4 -4
  12. package/.claude/skills/spec-generator/SKILL.md +1 -1
  13. package/.claude/skills/team-designer/phases/02-scaffold-generation.md +1 -1
  14. package/.claude/skills/team-lifecycle-v4/SKILL.md +1 -1
  15. package/.claude/skills/team-review/SKILL.md +1 -1
  16. package/.claude/skills/team-ultra-analyze/SKILL.md +1 -1
  17. package/.claude/skills/workflow-multi-cli-plan/SKILL.md +3 -3
  18. package/.claude/skills/workflow-plan/SKILL.md +1 -1
  19. package/.claude/skills/workflow-plan/phases/03-conflict-resolution.md +2 -2
  20. package/.claude/skills/workflow-plan/phases/05-plan-verify.md +2 -2
  21. package/.claude/skills/workflow-tdd-plan/phases/02-context-gathering.md +3 -3
  22. package/.claude/skills/workflow-tdd-plan/phases/04-conflict-resolution.md +2 -2
  23. package/.claude/skills/workflow-test-fix/SKILL.md +1 -1
  24. package/.claude/skills/workflow-test-fix/phases/02-test-context-gather.md +2 -2
  25. package/.codex/AGENTS.md +16 -0
  26. package/.codex/skills/analyze-with-file/SKILL.md +966 -966
  27. package/.codex/skills/issue-discover/SKILL.md +361 -361
  28. package/.codex/skills/review-cycle/SKILL.md +1 -1
  29. package/.codex/skills/roadmap-with-file/SKILL.md +901 -901
  30. package/.codex/skills/spec-generator/SKILL.md +425 -425
  31. package/.codex/skills/spec-setup/SKILL.md +669 -669
  32. package/.codex/skills/team-designer/phases/02-scaffold-generation.md +1 -1
  33. package/.codex/skills/workflow-test-fix-cycle/SKILL.md +402 -402
  34. package/ccw/dist/tools/index.d.ts.map +1 -1
  35. package/ccw/dist/tools/index.js +2 -0
  36. package/ccw/dist/tools/index.js.map +1 -1
  37. package/ccw/dist/tools/json-builder.d.ts +17 -0
  38. package/ccw/dist/tools/json-builder.d.ts.map +1 -0
  39. package/ccw/dist/tools/json-builder.js +746 -0
  40. package/ccw/dist/tools/json-builder.js.map +1 -0
  41. package/ccw/dist/tools/schema-registry.d.ts +71 -0
  42. package/ccw/dist/tools/schema-registry.d.ts.map +1 -0
  43. package/ccw/dist/tools/schema-registry.js +136 -0
  44. package/ccw/dist/tools/schema-registry.js.map +1 -0
  45. package/package.json +1 -1
  46. package/.claude/skills/team-iterdev/SKILL.md +0 -127
  47. package/.claude/skills/team-iterdev/roles/architect/role.md +0 -65
  48. package/.claude/skills/team-iterdev/roles/coordinator/commands/analyze.md +0 -62
  49. package/.claude/skills/team-iterdev/roles/coordinator/commands/dispatch.md +0 -234
  50. package/.claude/skills/team-iterdev/roles/coordinator/commands/monitor.md +0 -182
  51. package/.claude/skills/team-iterdev/roles/coordinator/role.md +0 -153
  52. package/.claude/skills/team-iterdev/roles/developer/role.md +0 -74
  53. package/.claude/skills/team-iterdev/roles/reviewer/role.md +0 -66
  54. package/.claude/skills/team-iterdev/roles/tester/role.md +0 -88
  55. package/.claude/skills/team-iterdev/specs/pipelines.md +0 -94
  56. package/.claude/skills/team-iterdev/specs/team-config.json +0 -172
  57. package/.codex/prompts/prep-cycle.md +0 -416
  58. package/.codex/prompts/prep-plan.md +0 -371
  59. package/.codex/skills/team-iterdev/SKILL.md +0 -219
  60. package/.codex/skills/team-iterdev/roles/architect/role.md +0 -65
  61. package/.codex/skills/team-iterdev/roles/coordinator/commands/analyze.md +0 -62
  62. package/.codex/skills/team-iterdev/roles/coordinator/commands/dispatch.md +0 -187
  63. package/.codex/skills/team-iterdev/roles/coordinator/commands/monitor.md +0 -227
  64. package/.codex/skills/team-iterdev/roles/coordinator/role.md +0 -193
  65. package/.codex/skills/team-iterdev/roles/developer/role.md +0 -74
  66. package/.codex/skills/team-iterdev/roles/reviewer/role.md +0 -66
  67. package/.codex/skills/team-iterdev/roles/tester/role.md +0 -88
  68. package/.codex/skills/team-iterdev/specs/pipelines.md +0 -94
  69. package/.codex/skills/team-iterdev/specs/team-config.json +0 -172
@@ -1,371 +0,0 @@
1
- ---
2
- description: "Interactive pre-flight checklist for workflow-plan. Validates environment, refines task to GOAL/SCOPE/CONTEXT, collects source docs, configures execution preferences, writes prep-package.json, then launches the workflow."
3
- argument-hint: TASK="<task description>" [EXEC_METHOD=agent|cli|hybrid] [CLI_TOOL=codex|gemini|qwen]
4
- ---
5
-
6
- # Pre-Flight Checklist for Workflow Plan
7
-
8
- You are an interactive preparation assistant. Your job is to ensure everything is ready for an **unattended** `workflow-plan` run with `--yes` mode. Follow each step sequentially. **Ask the user questions when information is missing.** At the end, write `prep-package.json` and invoke the skill.
9
-
10
- ---
11
-
12
- ## Step 1: Environment Prerequisites
13
-
14
- Check these items. Report results as a checklist.
15
-
16
- ### 1.1 Required (block if any fail)
17
-
18
- - **Project root**: Confirm current working directory is a valid project (has package.json, Cargo.toml, pyproject.toml, go.mod, or similar)
19
- - **Writable workspace**: Ensure `.workflow/` directory exists or can be created
20
- - **Git status**: Run `git status --short`. If working tree is dirty, WARN but don't block
21
-
22
- ### 1.2 Strongly Recommended (warn if missing)
23
-
24
- - **Project specs**: Run `ccw spec load --category planning` to load project context
25
- - If spec system unavailable: WARN — Phase 1 will call `workflow:init` to initialize. Ask user: "检测到项目使用 [tech stack from package.json], 是否正确?需要补充什么?"
26
- - **Test framework**: Detect from config files (jest.config, vitest.config, pytest.ini, etc.)
27
- - If missing: Ask: "未检测到测试框架,请指定测试命令(如 `npm test`),或输入 'skip' 跳过"
28
-
29
- ### 1.3 Output
30
-
31
- Print formatted checklist:
32
-
33
- ```
34
- 环境检查
35
- ════════
36
- ✓ 项目根目录: D:\myproject
37
- ✓ .workflow/ 目录就绪
38
- ⚠ Git: 3 个未提交变更
39
- ✓ Project specs: 已加载 (ccw spec load --category planning)
40
- ⚠ specs: 未找到 (Phase 1 将初始化)
41
- ✓ 测试框架: jest (npm test)
42
- ```
43
-
44
- ---
45
-
46
- ## Step 2: Task Quality Assessment
47
-
48
- ### 2.0 Requirement Source Tracking
49
-
50
- **在评估任务质量之前,先追踪需求的原始来源。** 这些引用会写入 prep-package.json,供 Phase 2 context-gather 和 Phase 3 task-generation 使用。
51
-
52
- Ask the user:
53
- > "任务需求的来源是什么?可以提供以下一种或多种:
54
- > 1. 本地文档路径 (如 docs/prd.md, requirements/feature-spec.md)
55
- > 2. GitHub Issue URL (如 https://github.com/org/repo/issues/123)
56
- > 3. 设计文档 / 原型链接
57
- > 4. 会话中直接描述 (无外部文档)
58
- >
59
- > 请输入来源路径/URL(多个用逗号分隔),或输入 'none' 表示无外部来源"
60
-
61
- **Processing logic**:
62
-
63
- ```javascript
64
- const sourceRefs = []
65
-
66
- for (const input of userInputs) {
67
- if (input === 'none') break
68
-
69
- const ref = { path: input, type: 'unknown', status: 'unverified' }
70
-
71
- if (input.startsWith('http')) {
72
- ref.type = 'url'
73
- ref.status = 'linked'
74
- } else if (fs.existsSync(input) || fs.existsSync(`${projectRoot}/${input}`)) {
75
- ref.type = 'local_file'
76
- ref.path = fs.existsSync(input) ? input : `${projectRoot}/${input}`
77
- ref.status = 'verified'
78
- ref.preview = Read(ref.path, { limit: 20 })
79
- } else {
80
- ref.type = 'local_file'
81
- ref.status = 'not_found'
82
- console.warn(`⚠ 文件未找到: ${input}`)
83
- }
84
-
85
- sourceRefs.push(ref)
86
- }
87
-
88
- // Auto-detect common requirement docs
89
- const autoDetectPaths = [
90
- 'docs/prd.md', 'docs/PRD.md', 'docs/requirements.md',
91
- 'docs/design.md', 'docs/spec.md', 'requirements/*.md', 'specs/*.md'
92
- ]
93
- for (const pattern of autoDetectPaths) {
94
- const found = Glob(pattern)
95
- found.forEach(f => {
96
- if (!sourceRefs.some(r => r.path === f)) {
97
- sourceRefs.push({ path: f, type: 'auto_detected', status: 'verified' })
98
- }
99
- })
100
- }
101
- ```
102
-
103
- Display detected sources:
104
-
105
- ```
106
- 需求来源
107
- ════════
108
- ✓ docs/prd.md (本地文档, 已验证)
109
- ✓ https://github.com/.../issues/42 (URL, 已链接)
110
- ~ requirements/api-spec.md (自动检测)
111
- ```
112
-
113
- ### 2.1 Scoring
114
-
115
- Score the user's TASK against 5 dimensions, mapped to workflow-plan's GOAL/SCOPE/CONTEXT format.
116
- Each dimension scores 0-2 (0=missing, 1=vague, 2=clear). **Total minimum: 6/10 to proceed.**
117
-
118
- | # | 维度 | 映射 | 评分标准 |
119
- |---|------|------|----------|
120
- | 1 | **目标** (Objective) | → GOAL | 0=无具体内容 / 1=有方向无细节 / 2=具体可执行 |
121
- | 2 | **成功标准** (Success Criteria) | → GOAL 补充 | 0=无 / 1=不可度量 / 2=可测试可验证 |
122
- | 3 | **范围** (Scope) | → SCOPE | 0=无 / 1=笼统区域 / 2=具体文件/模块 |
123
- | 4 | **约束** (Constraints) | → CONTEXT | 0=无 / 1=泛泛"别破坏" / 2=具体限制条件 |
124
- | 5 | **技术上下文** (Tech Context) | → CONTEXT | 0=无 / 1=最少 / 2=丰富 |
125
-
126
- ### 2.2 Display Score
127
-
128
- ```
129
- 任务质量评估
130
- ════════════
131
- 目标(GOAL): ██████████ 2/2 "Add Google OAuth login with JWT session"
132
- 成功标准: █████░░░░░ 1/2 "Should work" → 需要细化
133
- 范围(SCOPE): ██████████ 2/2 "src/auth/*, src/strategies/*"
134
- 约束(CTX): ░░░░░░░░░░ 0/2 未指定 → 必须补充
135
- 技术上下文: █████░░░░░ 1/2 "TypeScript" → 可自动增强
136
-
137
- 总分: 6/10 (可接受,需交互补充)
138
- ```
139
-
140
- ### 2.3 Interactive Refinement
141
-
142
- **For each dimension scoring < 2**, ask a targeted question:
143
-
144
- **目标不清 (score 0-1)**:
145
- > "请更具体地描述要实现什么功能?例如:'为现有 Express API 添加 Google OAuth 登录,生成 JWT token,支持 /api/auth/google 和 /api/auth/callback 两个端点'"
146
-
147
- **成功标准缺失 (score 0-1)**:
148
- > "完成后如何验证?请描述至少 2 个可测试的验收条件。例如:'1. 用户能通过 Google 账号登录 2. 登录后返回有效 JWT 3. 受保护路由能正确验证 token'"
149
-
150
- **范围不明 (score 0-1)**:
151
- > "这个任务涉及哪些文件或模块?我检测到以下可能相关的目录: [列出扫描到的相关目录],请确认或补充"
152
-
153
- **约束缺失 (score 0-1)**:
154
- > "有哪些限制条件?常见约束:不破坏现有 API / 使用现有数据库 / 不引入新依赖 / 保持现有模式。请选择或自定义"
155
-
156
- **上下文不足 (score 0-1)**:
157
- > "我从项目中检测到: [tech stack from loaded specs]。还有需要知道的技术细节吗?"
158
-
159
- ### 2.4 Auto-Enhancement
160
-
161
- For dimensions still at score 1 after Q&A, auto-enhance from codebase:
162
- - **Scope**: Use `Glob` and `Grep` to find related files
163
- - **Context**: Run `ccw spec load --category planning` to load project context
164
- - **Constraints**: Infer from `specs/*.md`
165
-
166
- ### 2.5 Assemble Structured Description
167
-
168
- Map to workflow-plan's GOAL/SCOPE/CONTEXT format:
169
-
170
- ```
171
- GOAL: {objective + success criteria}
172
- SCOPE: {scope boundaries}
173
- CONTEXT: {constraints + technical context}
174
- ```
175
-
176
- ---
177
-
178
- ## Step 3: Execution Preferences
179
-
180
- ### 3.1 Present Configuration & Ask for Overrides
181
-
182
- ```
183
- 执行配置
184
- ════════
185
-
186
- 自动模式: --yes (跳过所有确认)
187
- 自动提交: --with-commit (每个任务完成后自动 git commit)
188
-
189
- 执行方式: $EXEC_METHOD (默认 agent)
190
- agent — Claude agent 直接实现
191
- hybrid — Agent 编排 + CLI 处理复杂步骤 (推荐)
192
- cli — 全部通过 CLI 工具执行
193
-
194
- CLI 工具: $CLI_TOOL (默认 codex)
195
- codex / gemini / qwen / auto
196
-
197
- 补充材料: 无 (可后续在 Phase 3 Phase 0 中添加)
198
-
199
- 需要调整任何参数吗?(直接回车使用默认值)
200
- ```
201
-
202
- If user wants to customize, ask:
203
-
204
- > "请选择要调整的项目:
205
- > 1. 执行方式 (当前: agent)
206
- > 2. CLI 工具 (当前: codex)
207
- > 3. 是否自动提交 (当前: 是)
208
- > 4. 补充材料路径
209
- > 5. 全部使用默认值"
210
-
211
- ### 3.2 Build Execution Config
212
-
213
- ```javascript
214
- const executionConfig = {
215
- auto_yes: true,
216
- with_commit: true,
217
- execution_method: userChoice.executionMethod || 'agent',
218
- preferred_cli_tool: userChoice.preferredCliTool || 'codex',
219
- supplementary_materials: {
220
- type: 'none',
221
- content: []
222
- }
223
- }
224
- ```
225
-
226
- ---
227
-
228
- ## Step 4: Final Confirmation Summary
229
-
230
- ```
231
- ══════════════════════════════════════════════
232
- Pre-Flight 检查完成
233
- ══════════════════════════════════════════════
234
-
235
- 环境: ✓ 就绪 (3/3 必需, 2/3 推荐)
236
- 任务质量: 9/10 (优秀)
237
- 自动模式: ON (--yes --with-commit)
238
- 执行方式: hybrid (codex)
239
- 需求来源: 2 个文档 (docs/prd.md, issue #42)
240
-
241
- 结构化任务:
242
- GOAL: Add Google OAuth login with JWT session management;
243
- 验收: 用户可 Google 登录, 返回 JWT, 受保护路由验证
244
- SCOPE: src/auth/*, src/strategies/*, src/models/User.ts
245
- CONTEXT: Express.js + TypeORM + PostgreSQL;
246
- 约束: 不破坏 /api/login, 使用现有 User 表
247
-
248
- ══════════════════════════════════════════════
249
- ```
250
-
251
- Ask: "确认启动?(Y/n)"
252
- - If **Y** or Enter → proceed to Step 5
253
- - If **n** → ask which part to revise, loop back
254
-
255
- ---
256
-
257
- ## Step 5: Write prep-package.json
258
-
259
- Write to `{projectRoot}/.workflow/.prep/plan-prep-package.json`:
260
-
261
- ```json
262
- {
263
- "version": "1.0.0",
264
- "generated_at": "{ISO8601_UTC+8}",
265
- "prep_status": "ready",
266
- "target_skill": "workflow-plan-execute",
267
-
268
- "environment": {
269
- "project_root": "{projectRoot}",
270
- "prerequisites": {
271
- "required_passed": true,
272
- "recommended_passed": true,
273
- "warnings": ["{list of warnings}"]
274
- },
275
- "tech_stack": "{detected tech stack}",
276
- "test_framework": "{detected test framework}",
277
- "has_project_tech": true,
278
- "has_project_guidelines": false
279
- },
280
-
281
- "task": {
282
- "original": "{$TASK raw input}",
283
- "structured": {
284
- "goal": "{GOAL string}",
285
- "scope": "{SCOPE string}",
286
- "context": "{CONTEXT string}"
287
- },
288
- "quality_score": 9,
289
- "dimensions": {
290
- "objective": { "score": 2, "value": "..." },
291
- "success_criteria": { "score": 2, "value": "..." },
292
- "scope": { "score": 2, "value": "..." },
293
- "constraints": { "score": 2, "value": "..." },
294
- "context": { "score": 1, "value": "..." }
295
- },
296
- "source_refs": [
297
- {
298
- "path": "docs/prd.md",
299
- "type": "local_file",
300
- "status": "verified",
301
- "preview": "# Product Requirements - OAuth Integration\n..."
302
- },
303
- {
304
- "path": "https://github.com/org/repo/issues/42",
305
- "type": "url",
306
- "status": "linked"
307
- }
308
- ]
309
- },
310
-
311
- "execution": {
312
- "auto_yes": true,
313
- "with_commit": true,
314
- "execution_method": "agent",
315
- "preferred_cli_tool": "codex",
316
- "supplementary_materials": {
317
- "type": "none",
318
- "content": []
319
- }
320
- }
321
- }
322
- ```
323
-
324
- Confirm:
325
- ```
326
- ✓ prep-package.json 已写入 .workflow/.prep/plan-prep-package.json
327
- ```
328
-
329
- ---
330
-
331
- ## Step 6: Launch Workflow
332
-
333
- Invoke the skill using `$ARGUMENTS` pass-through:
334
-
335
- ```
336
- $workflow-plan-execute --yes --with-commit TASK="$TASK_STRUCTURED"
337
- ```
338
-
339
- 其中:
340
- - `$workflow-plan-execute` — 展开为 skill 调用
341
- - `$TASK_STRUCTURED` — Step 2 组装的 GOAL/SCOPE/CONTEXT 格式任务
342
- - `--yes` — 全自动模式
343
- - `--with-commit` — 每任务自动提交(根据 Step 3 配置)
344
-
345
- **Skill 端会做以下检查**(见 Phase 1 消费逻辑):
346
- 1. 检测 `.workflow/.prep/plan-prep-package.json` 是否存在
347
- 2. 验证 `prep_status === "ready"` 且 `target_skill === "workflow-plan-execute"`
348
- 3. 校验 `project_root` 与当前项目一致
349
- 4. 校验 `quality_score >= 6`
350
- 5. 校验文件时效(24h 内生成)
351
- 6. 校验必需字段完整性
352
- 7. 全部通过 → 加载配置;任一失败 → 回退默认行为 + 打印警告
353
-
354
- Print:
355
- ```
356
- 启动 workflow-plan (自动模式)...
357
- prep-package.json → Phase 1 自动加载并校验
358
- 执行方式: hybrid (codex) + auto-commit
359
- ```
360
-
361
- ---
362
-
363
- ## Error Handling
364
-
365
- | 情况 | 处理 |
366
- |------|------|
367
- | 必需项检查失败 | 报告缺失项,给出修复建议,**不启动 workflow** |
368
- | 任务质量 < 6/10 且用户拒绝补充 | 报告各维度得分,建议重写任务描述,**不启动 workflow** |
369
- | 用户取消确认 | 保存 prep-package.json (prep_status="needs_refinement"),提示可修改后重新运行 |
370
- | 环境检查有警告但非阻塞 | 记录警告到 prep-package.json,继续执行 |
371
- | Skill 端 prep-package 校验失败 | Skill 打印警告,回退到无 prep 的默认行为(不阻塞执行) |
@@ -1,219 +0,0 @@
1
- ---
2
- name: team-iterdev
3
- description: Unified team skill for iterative development team. Pure router — all roles read this file. Beat model is coordinator-only in monitor.md. Generator-Critic loops (developer<->reviewer, max 3 rounds). Triggers on "team iterdev".
4
- allowed-tools: spawn_agent(*), wait_agent(*), send_message(*), assign_task(*), close_agent(*), list_agents(*), report_agent_job_result(*), request_user_input(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*)
5
- ---
6
-
7
- # Team IterDev
8
-
9
- Iterative development team skill. Generator-Critic loops (developer<->reviewer, max 3 rounds), task ledger (task-ledger.json) for real-time progress, shared memory (cross-sprint learning), and dynamic pipeline selection for incremental delivery.
10
-
11
- ## Architecture
12
-
13
- ```
14
- Skill(skill="team-iterdev", args="task description")
15
- |
16
- SKILL.md (this file) = Router
17
- |
18
- +--------------+--------------+
19
- | |
20
- no --role flag --role <name>
21
- | |
22
- Coordinator Worker
23
- roles/coordinator/role.md roles/<name>/role.md
24
- |
25
- +-- analyze -> dispatch -> spawn workers -> STOP
26
- |
27
- +-------+-------+-------+
28
- v v v v
29
- [architect] [developer] [tester] [reviewer]
30
- (team-worker agents, each loads roles/<role>/role.md)
31
- ```
32
-
33
- ## Role Registry
34
-
35
- | Role | Path | Prefix | Inner Loop |
36
- |------|------|--------|------------|
37
- | coordinator | [roles/coordinator/role.md](roles/coordinator/role.md) | — | — |
38
- | architect | [roles/architect/role.md](roles/architect/role.md) | DESIGN-* | false |
39
- | developer | [roles/developer/role.md](roles/developer/role.md) | DEV-* | true |
40
- | tester | [roles/tester/role.md](roles/tester/role.md) | VERIFY-* | false |
41
- | reviewer | [roles/reviewer/role.md](roles/reviewer/role.md) | REVIEW-* | false |
42
-
43
- ## Role Router
44
-
45
- Parse `$ARGUMENTS`:
46
- - Has `--role <name>` → Read `roles/<name>/role.md`, execute Phase 2-4
47
- - No `--role` → `roles/coordinator/role.md`, execute entry router
48
-
49
- ## Delegation Lock
50
-
51
- **Coordinator is a PURE ORCHESTRATOR. It coordinates, it does NOT do.**
52
-
53
- Before calling ANY tool, apply this check:
54
-
55
- | Tool Call | Verdict | Reason |
56
- |-----------|---------|--------|
57
- | `spawn_agent`, `wait_agent`, `close_agent`, `send_message`, `assign_task` | ALLOWED | Orchestration |
58
- | `list_agents` | ALLOWED | Agent health check |
59
- | `request_user_input` | ALLOWED | User interaction |
60
- | `mcp__ccw-tools__team_msg` | ALLOWED | Message bus |
61
- | `Read/Write` on `.workflow/.team/` files | ALLOWED | Session state |
62
- | `Read` on `roles/`, `commands/`, `specs/` | ALLOWED | Loading own instructions |
63
- | `Read/Grep/Glob` on project source code | BLOCKED | Delegate to worker |
64
- | `Edit` on any file outside `.workflow/` | BLOCKED | Delegate to worker |
65
- | `Bash("ccw cli ...")` | BLOCKED | Only workers call CLI |
66
- | `Bash` running build/test/lint commands | BLOCKED | Delegate to worker |
67
-
68
- **If a tool call is BLOCKED**: STOP. Create a task, spawn a worker.
69
-
70
- **No exceptions for "simple" tasks.** Even a single-file read-and-report MUST go through spawn_agent.
71
-
72
- ---
73
-
74
- ## Shared Constants
75
-
76
- - **Session prefix**: `IDS`
77
- - **Session path**: `.workflow/.team/IDS-<slug>-<date>/`
78
- - **CLI tools**: `ccw cli --mode analysis` (read-only), `ccw cli --mode write` (modifications)
79
- - **Message bus**: `mcp__ccw-tools__team_msg(session_id=<session-id>, ...)`
80
-
81
- ## Worker Spawn Template
82
-
83
- Coordinator spawns workers using this template:
84
-
85
- ```
86
- spawn_agent({
87
- agent_type: "team_worker",
88
- task_name: "<task-id>",
89
- fork_context: false,
90
- items: [
91
- { type: "text", text: `## Role Assignment
92
- role: <role>
93
- role_spec: <skill_root>/roles/<role>/role.md
94
- session: <session-folder>
95
- session_id: <session-id>
96
- requirement: <task-description>
97
- inner_loop: <true|false>
98
-
99
- Read role_spec file (<skill_root>/roles/<role>/role.md) to load Phase 2-4 domain instructions.` },
100
-
101
- { type: "text", text: `## Task Context
102
- task_id: <task-id>
103
- title: <task-title>
104
- description: <task-description>
105
- pipeline_phase: <pipeline-phase>` },
106
-
107
- { type: "text", text: `## Upstream Context
108
- <prev_context>` }
109
- ]
110
- })
111
- ```
112
-
113
- After spawning, use `wait_agent({ targets: [...], timeout_ms: 900000 })` to collect results, then `close_agent({ target })` each worker.
114
-
115
-
116
- ### Model Selection Guide
117
-
118
- Iterative development uses Generator-Critic loops. Developer and reviewer need high reasoning for code generation and review quality.
119
-
120
- | Role | reasoning_effort | Rationale |
121
- |------|-------------------|-----------|
122
- | architect | high | Design decisions require careful tradeoff analysis |
123
- | developer | high | Code generation needs precision, inner loop role |
124
- | tester | medium | Test execution follows defined verification plan |
125
- | reviewer | high | Critical review quality drives GC loop effectiveness |
126
-
127
- ## User Commands
128
-
129
- | Command | Action |
130
- |---------|--------|
131
- | `check` / `status` | View execution status graph |
132
- | `resume` / `continue` | Advance to next step |
133
-
134
- ## Session Directory
135
-
136
- ```
137
- .workflow/.team/IDS-<slug>-<YYYY-MM-DD>/
138
- ├── .msg/
139
- │ ├── messages.jsonl # Team message bus
140
- │ └── meta.json # Session state
141
- ├── task-analysis.json # Coordinator analyze output
142
- ├── task-ledger.json # Real-time task progress ledger
143
- ├── wisdom/ # Cross-task knowledge accumulation
144
- │ ├── learnings.md
145
- │ ├── decisions.md
146
- │ ├── conventions.md
147
- │ └── issues.md
148
- ├── design/ # Architect output
149
- │ ├── design-001.md
150
- │ └── task-breakdown.json
151
- ├── code/ # Developer tracking
152
- │ └── dev-log.md
153
- ├── verify/ # Tester output
154
- │ └── verify-001.json
155
- └── review/ # Reviewer output
156
- └── review-001.md
157
- ```
158
-
159
- ## Specs Reference
160
-
161
- - [specs/pipelines.md](specs/pipelines.md) — Pipeline definitions and task registry
162
-
163
- ## v4 Agent Coordination
164
-
165
- ### Message Semantics
166
-
167
- | Intent | API | Example |
168
- |--------|-----|---------|
169
- | Queue supplementary info (don't interrupt) | `send_message` | Send design context to running developer |
170
- | Assign GC iteration round | `assign_task` | Assign revision to developer after reviewer feedback |
171
- | Check running agents | `list_agents` | Verify agent health during resume |
172
-
173
- ### Agent Health Check
174
-
175
- Use `list_agents({})` in handleResume and handleComplete:
176
-
177
- ```
178
- // Reconcile session state with actual running agents
179
- const running = list_agents({})
180
- // Compare with task-ledger.json active tasks
181
- // Reset orphaned tasks (in_progress but agent gone) to pending
182
- ```
183
-
184
- ### Named Agent Targeting
185
-
186
- Workers are spawned with `task_name: "<task-id>"` enabling direct addressing:
187
- - `send_message({ target: "DEV-001", items: [...] })` -- send design context to developer
188
- - `assign_task({ target: "DEV-001", items: [...] })` -- assign revision after reviewer feedback
189
- - `close_agent({ target: "REVIEW-001" })` -- cleanup after GC loop completes
190
-
191
- ### Generator-Critic Loop via assign_task (Deep Interaction Pattern)
192
-
193
- The developer-reviewer GC loop uses `assign_task` for iteration rounds:
194
- ```
195
- // Round N: Reviewer found issues -> coordinator assigns revision to developer
196
- assign_task({
197
- target: "DEV-001",
198
- items: [
199
- { type: "text", text: `## GC Revision Round ${N}
200
- review_feedback: <reviewer findings from REVIEW-001>
201
- iteration: ${N}/3
202
- instruction: Address reviewer feedback. Focus on: <specific issues>.` }
203
- ]
204
- })
205
- ```
206
-
207
- After developer completes revision, coordinator spawns/assigns reviewer for next round. Max 3 rounds per GC cycle.
208
-
209
- ## Error Handling
210
-
211
- | Scenario | Resolution |
212
- |----------|------------|
213
- | Unknown command | Error with available command list |
214
- | Role not found | Error with role registry |
215
- | GC loop exceeds 3 rounds | Accept with warning, record in shared memory |
216
- | Sprint velocity drops below 50% | Coordinator alerts user, suggests scope reduction |
217
- | Task ledger corrupted | Rebuild from TaskList state |
218
- | Conflict detected | Update conflict_info, notify coordinator, create DEV-fix task |
219
- | Pipeline deadlock | Check blockedBy chain, report blocking point |
@@ -1,65 +0,0 @@
1
- ---
2
- role: architect
3
- prefix: DESIGN
4
- inner_loop: false
5
- message_types:
6
- success: design_ready
7
- revision: design_revision
8
- error: error
9
- ---
10
-
11
- # Architect
12
-
13
- Technical design, task decomposition, and architecture decision records for iterative development.
14
-
15
- ## Phase 2: Context Loading + Codebase Exploration
16
-
17
- | Input | Source | Required |
18
- |-------|--------|----------|
19
- | Task description | From task subject/description | Yes |
20
- | Session path | Extracted from task description | Yes |
21
- | .msg/meta.json | <session>/.msg/meta.json | No |
22
- | Wisdom files | <session>/wisdom/ | No |
23
-
24
- 1. Extract session path and requirement from task description
25
- 2. Read .msg/meta.json for shared context (architecture_decisions, implementation_context)
26
- 3. Read wisdom files if available (learnings.md, decisions.md, conventions.md)
27
- 4. Explore codebase for existing patterns, module structure, dependencies:
28
- - Use mcp__ace-tool__search_context for semantic discovery
29
- - Identify similar implementations and integration points
30
-
31
- ## Phase 3: Technical Design + Task Decomposition
32
-
33
- **Design strategy selection**:
34
-
35
- | Condition | Strategy |
36
- |-----------|----------|
37
- | Single module change | Direct inline design |
38
- | Cross-module change | Multi-component design with integration points |
39
- | Large refactoring | Phased approach with milestones |
40
-
41
- **Outputs**:
42
-
43
- 1. **Design Document** (`<session>/design/design-<num>.md`):
44
- - Architecture decision: approach, rationale, alternatives
45
- - Component design: responsibility, dependencies, files, complexity
46
- - Task breakdown: files, estimated complexity, dependencies, acceptance criteria
47
- - Integration points and risks with mitigations
48
-
49
- 2. **Task Breakdown JSON** (`<session>/design/task-breakdown.json`):
50
- - Array of tasks with id, title, files, complexity, dependencies, acceptance_criteria
51
- - Execution order for developer to follow
52
-
53
- ## Phase 4: Design Validation
54
-
55
- | Check | Method | Pass Criteria |
56
- |-------|--------|---------------|
57
- | Components defined | Verify component list | At least 1 component |
58
- | Task breakdown exists | Verify task list | At least 1 task |
59
- | Dependencies mapped | All components have dependencies field | All present (can be empty) |
60
- | Integration points | Verify integration section | Key integrations documented |
61
-
62
- 1. Run validation checks above
63
- 2. Write architecture_decisions entry to .msg/meta.json:
64
- - design_id, approach, rationale, components, task_count
65
- 3. Write discoveries to wisdom/decisions.md and wisdom/conventions.md