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.
- package/.ccw/workflows/cli-tools-usage.md +123 -521
- package/.claude/CLAUDE.md +20 -0
- package/.claude/agents/action-planning-agent.md +6 -0
- package/.claude/agents/cli-explore-agent.md +63 -77
- package/.claude/agents/cli-lite-planning-agent.md +10 -11
- package/.claude/agents/issue-plan-agent.md +7 -2
- package/.claude/commands/workflow/spec/setup.md +1 -1
- package/.claude/skills/brainstorm/SKILL.md +408 -408
- package/.claude/skills/review-cycle/SKILL.md +132 -132
- package/.claude/skills/review-cycle/phases/review-module.md +4 -4
- package/.claude/skills/review-cycle/phases/review-session.md +4 -4
- package/.claude/skills/spec-generator/SKILL.md +1 -1
- package/.claude/skills/team-designer/phases/02-scaffold-generation.md +1 -1
- package/.claude/skills/team-lifecycle-v4/SKILL.md +1 -1
- package/.claude/skills/team-review/SKILL.md +1 -1
- package/.claude/skills/team-ultra-analyze/SKILL.md +1 -1
- package/.claude/skills/workflow-multi-cli-plan/SKILL.md +3 -3
- package/.claude/skills/workflow-plan/SKILL.md +1 -1
- package/.claude/skills/workflow-plan/phases/03-conflict-resolution.md +2 -2
- package/.claude/skills/workflow-plan/phases/05-plan-verify.md +2 -2
- package/.claude/skills/workflow-tdd-plan/phases/02-context-gathering.md +3 -3
- package/.claude/skills/workflow-tdd-plan/phases/04-conflict-resolution.md +2 -2
- package/.claude/skills/workflow-test-fix/SKILL.md +1 -1
- package/.claude/skills/workflow-test-fix/phases/02-test-context-gather.md +2 -2
- package/.codex/AGENTS.md +16 -0
- package/.codex/skills/analyze-with-file/SKILL.md +966 -966
- package/.codex/skills/issue-discover/SKILL.md +361 -361
- package/.codex/skills/review-cycle/SKILL.md +1 -1
- package/.codex/skills/roadmap-with-file/SKILL.md +901 -901
- package/.codex/skills/spec-generator/SKILL.md +425 -425
- package/.codex/skills/spec-setup/SKILL.md +669 -669
- package/.codex/skills/team-designer/phases/02-scaffold-generation.md +1 -1
- package/.codex/skills/workflow-test-fix-cycle/SKILL.md +402 -402
- package/ccw/dist/tools/index.d.ts.map +1 -1
- package/ccw/dist/tools/index.js +2 -0
- package/ccw/dist/tools/index.js.map +1 -1
- package/ccw/dist/tools/json-builder.d.ts +17 -0
- package/ccw/dist/tools/json-builder.d.ts.map +1 -0
- package/ccw/dist/tools/json-builder.js +746 -0
- package/ccw/dist/tools/json-builder.js.map +1 -0
- package/ccw/dist/tools/schema-registry.d.ts +71 -0
- package/ccw/dist/tools/schema-registry.d.ts.map +1 -0
- package/ccw/dist/tools/schema-registry.js +136 -0
- package/ccw/dist/tools/schema-registry.js.map +1 -0
- package/package.json +1 -1
- package/.claude/skills/team-iterdev/SKILL.md +0 -127
- package/.claude/skills/team-iterdev/roles/architect/role.md +0 -65
- package/.claude/skills/team-iterdev/roles/coordinator/commands/analyze.md +0 -62
- package/.claude/skills/team-iterdev/roles/coordinator/commands/dispatch.md +0 -234
- package/.claude/skills/team-iterdev/roles/coordinator/commands/monitor.md +0 -182
- package/.claude/skills/team-iterdev/roles/coordinator/role.md +0 -153
- package/.claude/skills/team-iterdev/roles/developer/role.md +0 -74
- package/.claude/skills/team-iterdev/roles/reviewer/role.md +0 -66
- package/.claude/skills/team-iterdev/roles/tester/role.md +0 -88
- package/.claude/skills/team-iterdev/specs/pipelines.md +0 -94
- package/.claude/skills/team-iterdev/specs/team-config.json +0 -172
- package/.codex/prompts/prep-cycle.md +0 -416
- package/.codex/prompts/prep-plan.md +0 -371
- package/.codex/skills/team-iterdev/SKILL.md +0 -219
- package/.codex/skills/team-iterdev/roles/architect/role.md +0 -65
- package/.codex/skills/team-iterdev/roles/coordinator/commands/analyze.md +0 -62
- package/.codex/skills/team-iterdev/roles/coordinator/commands/dispatch.md +0 -187
- package/.codex/skills/team-iterdev/roles/coordinator/commands/monitor.md +0 -227
- package/.codex/skills/team-iterdev/roles/coordinator/role.md +0 -193
- package/.codex/skills/team-iterdev/roles/developer/role.md +0 -74
- package/.codex/skills/team-iterdev/roles/reviewer/role.md +0 -66
- package/.codex/skills/team-iterdev/roles/tester/role.md +0 -88
- package/.codex/skills/team-iterdev/specs/pipelines.md +0 -94
- package/.codex/skills/team-iterdev/specs/team-config.json +0 -172
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
# Command: Dispatch
|
|
2
|
-
|
|
3
|
-
Create the iterative development task chain with correct dependencies and structured task descriptions.
|
|
4
|
-
|
|
5
|
-
## Phase 2: Context Loading
|
|
6
|
-
|
|
7
|
-
| Input | Source | Required |
|
|
8
|
-
|-------|--------|----------|
|
|
9
|
-
| User requirement | From coordinator Phase 1 | Yes |
|
|
10
|
-
| Session folder | From coordinator Phase 2 | Yes |
|
|
11
|
-
| Pipeline definition | From SKILL.md Pipeline Definitions | Yes |
|
|
12
|
-
| Pipeline mode | From session.json `pipeline` | Yes |
|
|
13
|
-
|
|
14
|
-
1. Load user requirement and scope from session.json
|
|
15
|
-
2. Load pipeline stage definitions from SKILL.md Task Metadata Registry
|
|
16
|
-
3. Read `pipeline` mode from session.json (patch / sprint / multi-sprint)
|
|
17
|
-
|
|
18
|
-
## Phase 3: Task Chain Creation
|
|
19
|
-
|
|
20
|
-
### Task Description Template
|
|
21
|
-
|
|
22
|
-
Every task description uses structured format for clarity:
|
|
23
|
-
|
|
24
|
-
```
|
|
25
|
-
TaskCreate({
|
|
26
|
-
subject: "<TASK-ID>",
|
|
27
|
-
description: "PURPOSE: <what this task achieves> | Success: <measurable completion criteria>
|
|
28
|
-
TASK:
|
|
29
|
-
- <step 1: specific action>
|
|
30
|
-
- <step 2: specific action>
|
|
31
|
-
- <step 3: specific action>
|
|
32
|
-
CONTEXT:
|
|
33
|
-
- Session: <session-folder>
|
|
34
|
-
- Scope: <task-scope>
|
|
35
|
-
- Upstream artifacts: <artifact-1>, <artifact-2>
|
|
36
|
-
- Shared memory: <session>/.msg/meta.json
|
|
37
|
-
EXPECTED: <deliverable path> + <quality criteria>
|
|
38
|
-
CONSTRAINTS: <scope limits, focus areas>
|
|
39
|
-
---
|
|
40
|
-
InnerLoop: <true|false>"
|
|
41
|
-
})
|
|
42
|
-
TaskUpdate({ taskId: "<TASK-ID>", addBlockedBy: [<dependency-list>], owner: "<role>" })
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
### Mode Router
|
|
46
|
-
|
|
47
|
-
| Mode | Action |
|
|
48
|
-
|------|--------|
|
|
49
|
-
| `patch` | Create DEV-001 + VERIFY-001 |
|
|
50
|
-
| `sprint` | Create DESIGN-001 + DEV-001 + VERIFY-001 + REVIEW-001 |
|
|
51
|
-
| `multi-sprint` | Create Sprint 1 chain, subsequent sprints created dynamically |
|
|
52
|
-
|
|
53
|
-
---
|
|
54
|
-
|
|
55
|
-
### Patch Pipeline
|
|
56
|
-
|
|
57
|
-
**DEV-001** (developer):
|
|
58
|
-
```
|
|
59
|
-
TaskCreate({
|
|
60
|
-
subject: "DEV-001",
|
|
61
|
-
description: "PURPOSE: Implement fix | Success: Fix applied, syntax clean
|
|
62
|
-
TASK:
|
|
63
|
-
- Load target files and understand context
|
|
64
|
-
- Apply fix changes
|
|
65
|
-
- Validate syntax
|
|
66
|
-
CONTEXT:
|
|
67
|
-
- Session: <session-folder>
|
|
68
|
-
- Scope: <task-scope>
|
|
69
|
-
- Shared memory: <session>/.msg/meta.json
|
|
70
|
-
EXPECTED: Modified source files + <session>/code/dev-log.md | Syntax clean
|
|
71
|
-
CONSTRAINTS: Minimal changes | Preserve existing behavior
|
|
72
|
-
---
|
|
73
|
-
InnerLoop: true"
|
|
74
|
-
})
|
|
75
|
-
TaskUpdate({ taskId: "DEV-001", owner: "developer" })
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
**VERIFY-001** (tester):
|
|
79
|
-
```
|
|
80
|
-
TaskCreate({
|
|
81
|
-
subject: "VERIFY-001",
|
|
82
|
-
description: "PURPOSE: Verify fix correctness | Success: Tests pass, no regressions
|
|
83
|
-
TASK:
|
|
84
|
-
- Detect test framework
|
|
85
|
-
- Run targeted tests for changed files
|
|
86
|
-
- Run regression test suite
|
|
87
|
-
CONTEXT:
|
|
88
|
-
- Session: <session-folder>
|
|
89
|
-
- Scope: <task-scope>
|
|
90
|
-
- Upstream artifacts: code/dev-log.md
|
|
91
|
-
- Shared memory: <session>/.msg/meta.json
|
|
92
|
-
EXPECTED: <session>/verify/verify-001.json | Pass rate >= 95%
|
|
93
|
-
CONSTRAINTS: Focus on changed files | Report any regressions
|
|
94
|
-
---
|
|
95
|
-
InnerLoop: false"
|
|
96
|
-
})
|
|
97
|
-
TaskUpdate({ taskId: "VERIFY-001", addBlockedBy: ["DEV-001"], owner: "tester" })
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
---
|
|
101
|
-
|
|
102
|
-
### Sprint Pipeline
|
|
103
|
-
|
|
104
|
-
**DESIGN-001** (architect):
|
|
105
|
-
```
|
|
106
|
-
TaskCreate({
|
|
107
|
-
subject: "DESIGN-001",
|
|
108
|
-
description: "PURPOSE: Technical design and task breakdown | Success: Design document + task breakdown ready
|
|
109
|
-
TASK:
|
|
110
|
-
- Explore codebase for patterns and dependencies
|
|
111
|
-
- Create component design with integration points
|
|
112
|
-
- Break down into implementable tasks with acceptance criteria
|
|
113
|
-
CONTEXT:
|
|
114
|
-
- Session: <session-folder>
|
|
115
|
-
- Scope: <task-scope>
|
|
116
|
-
- Shared memory: <session>/.msg/meta.json
|
|
117
|
-
EXPECTED: <session>/design/design-001.md + <session>/design/task-breakdown.json | Components defined, tasks actionable
|
|
118
|
-
CONSTRAINTS: Focus on <task-scope> | Risk assessment required
|
|
119
|
-
---
|
|
120
|
-
InnerLoop: false"
|
|
121
|
-
})
|
|
122
|
-
TaskUpdate({ taskId: "DESIGN-001", owner: "architect" })
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
**DEV-001** (developer):
|
|
126
|
-
```
|
|
127
|
-
TaskCreate({
|
|
128
|
-
subject: "DEV-001",
|
|
129
|
-
description: "PURPOSE: Implement design | Success: All design tasks implemented, syntax clean
|
|
130
|
-
TASK:
|
|
131
|
-
- Load design and task breakdown
|
|
132
|
-
- Implement tasks in execution order
|
|
133
|
-
- Validate syntax after changes
|
|
134
|
-
CONTEXT:
|
|
135
|
-
- Session: <session-folder>
|
|
136
|
-
- Scope: <task-scope>
|
|
137
|
-
- Upstream artifacts: design/design-001.md, design/task-breakdown.json
|
|
138
|
-
- Shared memory: <session>/.msg/meta.json
|
|
139
|
-
EXPECTED: Modified source files + <session>/code/dev-log.md | Syntax clean, all tasks done
|
|
140
|
-
CONSTRAINTS: Follow design | Preserve existing behavior | Follow code conventions
|
|
141
|
-
---
|
|
142
|
-
InnerLoop: true"
|
|
143
|
-
})
|
|
144
|
-
TaskUpdate({ taskId: "DEV-001", addBlockedBy: ["DESIGN-001"], owner: "developer" })
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
**VERIFY-001** (tester, parallel with REVIEW-001):
|
|
148
|
-
```
|
|
149
|
-
TaskCreate({
|
|
150
|
-
subject: "VERIFY-001",
|
|
151
|
-
description: "PURPOSE: Verify implementation | Success: Tests pass, no regressions
|
|
152
|
-
TASK:
|
|
153
|
-
- Detect test framework
|
|
154
|
-
- Run tests for changed files
|
|
155
|
-
- Run regression test suite
|
|
156
|
-
CONTEXT:
|
|
157
|
-
- Session: <session-folder>
|
|
158
|
-
- Scope: <task-scope>
|
|
159
|
-
- Upstream artifacts: code/dev-log.md
|
|
160
|
-
- Shared memory: <session>/.msg/meta.json
|
|
161
|
-
EXPECTED: <session>/verify/verify-001.json | Pass rate >= 95%
|
|
162
|
-
CONSTRAINTS: Focus on changed files | Report regressions
|
|
163
|
-
---
|
|
164
|
-
InnerLoop: false"
|
|
165
|
-
})
|
|
166
|
-
TaskUpdate({ taskId: "VERIFY-001", addBlockedBy: ["DEV-001"], owner: "tester" })
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
**REVIEW-001** (reviewer, parallel with VERIFY-001):
|
|
170
|
-
```
|
|
171
|
-
TaskCreate({
|
|
172
|
-
subject: "REVIEW-001",
|
|
173
|
-
description: "PURPOSE: Code review for correctness and quality | Success: All dimensions reviewed, verdict issued
|
|
174
|
-
TASK:
|
|
175
|
-
- Load changed files and design document
|
|
176
|
-
- Review across 4 dimensions: correctness, completeness, maintainability, security
|
|
177
|
-
- Score quality (1-10) and issue verdict
|
|
178
|
-
CONTEXT:
|
|
179
|
-
- Session: <session-folder>
|
|
180
|
-
- Scope: <task-scope>
|
|
181
|
-
- Upstream artifacts: design/design-001.md, code/dev-log.md
|
|
182
|
-
- Shared memory: <session>/.msg/meta.json
|
|
183
|
-
EXPECTED: <session>/review/review-001.md | Per-dimension findings with severity
|
|
184
|
-
CONSTRAINTS: Focus on implementation changes | Provide file:line references
|
|
185
|
-
---
|
|
186
|
-
InnerLoop: false"
|
|
187
|
-
})
|
|
188
|
-
TaskUpdate({ taskId: "REVIEW-001", addBlockedBy: ["DEV-001"], owner: "reviewer" })
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
---
|
|
192
|
-
|
|
193
|
-
### Multi-Sprint Pipeline
|
|
194
|
-
|
|
195
|
-
Sprint 1: DESIGN-001 -> DEV-001 -> DEV-002(incremental) -> VERIFY-001 -> DEV-fix -> REVIEW-001
|
|
196
|
-
|
|
197
|
-
Create Sprint 1 tasks using sprint templates above, plus:
|
|
198
|
-
|
|
199
|
-
**DEV-002** (developer, incremental):
|
|
200
|
-
```
|
|
201
|
-
TaskCreate({
|
|
202
|
-
subject: "DEV-002",
|
|
203
|
-
description: "PURPOSE: Incremental implementation | Success: Remaining tasks implemented
|
|
204
|
-
TASK:
|
|
205
|
-
- Load remaining tasks from breakdown
|
|
206
|
-
- Implement incrementally
|
|
207
|
-
- Validate syntax
|
|
208
|
-
CONTEXT:
|
|
209
|
-
- Session: <session-folder>
|
|
210
|
-
- Scope: <task-scope>
|
|
211
|
-
- Upstream artifacts: design/task-breakdown.json, code/dev-log.md
|
|
212
|
-
- Shared memory: <session>/.msg/meta.json
|
|
213
|
-
EXPECTED: Modified source files + updated dev-log.md
|
|
214
|
-
CONSTRAINTS: Incremental delivery | Follow existing patterns
|
|
215
|
-
---
|
|
216
|
-
InnerLoop: true"
|
|
217
|
-
})
|
|
218
|
-
TaskUpdate({ taskId: "DEV-002", addBlockedBy: ["DEV-001"], owner: "developer" })
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
Subsequent sprints created dynamically after Sprint N completes.
|
|
222
|
-
|
|
223
|
-
## Phase 4: Validation
|
|
224
|
-
|
|
225
|
-
Verify task chain integrity:
|
|
226
|
-
|
|
227
|
-
| Check | Method | Expected |
|
|
228
|
-
|-------|--------|----------|
|
|
229
|
-
| Task count correct | TaskList count | patch: 2, sprint: 4, multi: 5+ |
|
|
230
|
-
| Dependencies correct | Trace addBlockedBy graph | Acyclic, correct ordering |
|
|
231
|
-
| No circular dependencies | Trace full graph | Acyclic |
|
|
232
|
-
| Structured descriptions | Each has PURPOSE/TASK/CONTEXT/EXPECTED | All present |
|
|
233
|
-
|
|
234
|
-
If validation fails, fix the specific task and re-validate.
|
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
# Command: Monitor
|
|
2
|
-
|
|
3
|
-
Event-driven pipeline coordination. Beat model: coordinator wake -> process -> spawn -> STOP.
|
|
4
|
-
|
|
5
|
-
## Constants
|
|
6
|
-
|
|
7
|
-
- SPAWN_MODE: background
|
|
8
|
-
- ONE_STEP_PER_INVOCATION: true
|
|
9
|
-
- FAST_ADVANCE_AWARE: true
|
|
10
|
-
- WORKER_AGENT: team-worker
|
|
11
|
-
- MAX_GC_ROUNDS: 3
|
|
12
|
-
|
|
13
|
-
## Handler Router
|
|
14
|
-
|
|
15
|
-
| Source | Handler |
|
|
16
|
-
|--------|---------|
|
|
17
|
-
| Message contains [architect], [developer], [tester], [reviewer] | handleCallback |
|
|
18
|
-
| "capability_gap" | handleAdapt |
|
|
19
|
-
| "check" or "status" | handleCheck |
|
|
20
|
-
| "resume" or "continue" | handleResume |
|
|
21
|
-
| All tasks completed | handleComplete |
|
|
22
|
-
| Default | handleSpawnNext |
|
|
23
|
-
|
|
24
|
-
## Phase 2: Context Loading
|
|
25
|
-
|
|
26
|
-
| Input | Source | Required |
|
|
27
|
-
|-------|--------|----------|
|
|
28
|
-
| Session state | <session>/session.json | Yes |
|
|
29
|
-
| Task list | TaskList() | Yes |
|
|
30
|
-
| Trigger event | From Entry Router detection | Yes |
|
|
31
|
-
| Meta state | <session>/.msg/meta.json | Yes |
|
|
32
|
-
| Task ledger | <session>/task-ledger.json | No |
|
|
33
|
-
|
|
34
|
-
1. Load session.json for current state, pipeline mode, gc_round, max_gc_rounds
|
|
35
|
-
2. Run TaskList() to get current task statuses
|
|
36
|
-
3. Identify trigger event type from Entry Router
|
|
37
|
-
|
|
38
|
-
## Phase 3: Event Handlers
|
|
39
|
-
|
|
40
|
-
### handleCallback
|
|
41
|
-
|
|
42
|
-
Triggered when a worker sends completion message.
|
|
43
|
-
|
|
44
|
-
1. Parse message to identify role and task ID:
|
|
45
|
-
|
|
46
|
-
| Message Pattern | Role Detection |
|
|
47
|
-
|----------------|---------------|
|
|
48
|
-
| `[architect]` or task ID `DESIGN-*` | architect |
|
|
49
|
-
| `[developer]` or task ID `DEV-*` | developer |
|
|
50
|
-
| `[tester]` or task ID `VERIFY-*` | tester |
|
|
51
|
-
| `[reviewer]` or task ID `REVIEW-*` | reviewer |
|
|
52
|
-
|
|
53
|
-
2. Mark task as completed:
|
|
54
|
-
|
|
55
|
-
```
|
|
56
|
-
TaskUpdate({ taskId: "<task-id>", status: "completed" })
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
3. Record completion in session state and update task-ledger.json metrics
|
|
60
|
-
|
|
61
|
-
4. **Generator-Critic check** (when reviewer completes):
|
|
62
|
-
- If completed task is REVIEW-* AND pipeline is sprint or multi-sprint:
|
|
63
|
-
- Read review report for GC signal (critical_count, score)
|
|
64
|
-
- Read session.json for gc_round
|
|
65
|
-
|
|
66
|
-
| GC Signal | gc_round < max | Action |
|
|
67
|
-
|-----------|----------------|--------|
|
|
68
|
-
| review.critical_count > 0 OR review.score < 7 | Yes | Increment gc_round, create DEV-fix task blocked by this REVIEW, log `gc_loop_trigger` |
|
|
69
|
-
| review.critical_count > 0 OR review.score < 7 | No (>= max) | Force convergence, accept with warning, log to wisdom/issues.md |
|
|
70
|
-
| review.critical_count == 0 AND review.score >= 7 | - | Review passed, proceed to handleComplete check |
|
|
71
|
-
|
|
72
|
-
- Log team_msg with type "gc_loop_trigger" or "task_unblocked"
|
|
73
|
-
|
|
74
|
-
5. Proceed to handleSpawnNext
|
|
75
|
-
|
|
76
|
-
### handleSpawnNext
|
|
77
|
-
|
|
78
|
-
Find and spawn the next ready tasks.
|
|
79
|
-
|
|
80
|
-
1. Scan task list for tasks where:
|
|
81
|
-
- Status is "pending"
|
|
82
|
-
- All blockedBy tasks have status "completed"
|
|
83
|
-
|
|
84
|
-
2. For each ready task, determine role from task prefix:
|
|
85
|
-
|
|
86
|
-
| Task Prefix | Role | Inner Loop |
|
|
87
|
-
|-------------|------|------------|
|
|
88
|
-
| DESIGN-* | architect | false |
|
|
89
|
-
| DEV-* | developer | true |
|
|
90
|
-
| VERIFY-* | tester | false |
|
|
91
|
-
| REVIEW-* | reviewer | false |
|
|
92
|
-
|
|
93
|
-
3. Spawn team-worker:
|
|
94
|
-
|
|
95
|
-
```
|
|
96
|
-
Agent({
|
|
97
|
-
subagent_type: "team-worker",
|
|
98
|
-
description: "Spawn <role> worker for <task-id>",
|
|
99
|
-
team_name: "iterdev",
|
|
100
|
-
name: "<role>",
|
|
101
|
-
run_in_background: true,
|
|
102
|
-
prompt: `## Role Assignment
|
|
103
|
-
role: <role>
|
|
104
|
-
role_spec: ~ or <project>/.claude/skills/team-iterdev/roles/<role>/role.md
|
|
105
|
-
session: <session-folder>
|
|
106
|
-
session_id: <session-id>
|
|
107
|
-
team_name: iterdev
|
|
108
|
-
requirement: <task-description>
|
|
109
|
-
inner_loop: <true|false>
|
|
110
|
-
|
|
111
|
-
Read role_spec file to load Phase 2-4 domain instructions.
|
|
112
|
-
Execute built-in Phase 1 -> role-spec Phase 2-4 -> built-in Phase 5.`
|
|
113
|
-
})
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
4. **Parallel spawn rules**:
|
|
117
|
-
|
|
118
|
-
| Pipeline | Scenario | Spawn Behavior |
|
|
119
|
-
|----------|----------|---------------|
|
|
120
|
-
| Patch | DEV -> VERIFY | One worker at a time |
|
|
121
|
-
| Sprint | VERIFY + REVIEW both unblocked | Spawn BOTH in parallel |
|
|
122
|
-
| Sprint | Other stages | One worker at a time |
|
|
123
|
-
| Multi-Sprint | VERIFY + DEV-fix both unblocked | Spawn BOTH in parallel |
|
|
124
|
-
| Multi-Sprint | Other stages | One worker at a time |
|
|
125
|
-
|
|
126
|
-
5. STOP after spawning -- wait for next callback
|
|
127
|
-
|
|
128
|
-
### handleCheck
|
|
129
|
-
|
|
130
|
-
Output current pipeline status. Do NOT advance pipeline.
|
|
131
|
-
|
|
132
|
-
```
|
|
133
|
-
Pipeline Status (<pipeline-mode>):
|
|
134
|
-
[DONE] DESIGN-001 (architect) -> design/design-001.md
|
|
135
|
-
[DONE] DEV-001 (developer) -> code/dev-log.md
|
|
136
|
-
[RUN] VERIFY-001 (tester) -> verifying...
|
|
137
|
-
[RUN] REVIEW-001 (reviewer) -> reviewing...
|
|
138
|
-
[WAIT] DEV-fix (developer) -> blocked by REVIEW-001
|
|
139
|
-
|
|
140
|
-
GC Rounds: <gc_round>/<max_gc_rounds>
|
|
141
|
-
Sprint: <sprint_id>
|
|
142
|
-
Session: <session-id>
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
### handleResume
|
|
146
|
-
|
|
147
|
-
Resume pipeline after user pause or interruption.
|
|
148
|
-
|
|
149
|
-
1. Audit task list for inconsistencies:
|
|
150
|
-
- Tasks stuck in "in_progress" -> reset to "pending"
|
|
151
|
-
- Tasks with completed blockers but still "pending" -> include in spawn list
|
|
152
|
-
2. Proceed to handleSpawnNext
|
|
153
|
-
|
|
154
|
-
### handleComplete
|
|
155
|
-
|
|
156
|
-
Triggered when all pipeline tasks are completed.
|
|
157
|
-
|
|
158
|
-
**Completion check by mode**:
|
|
159
|
-
|
|
160
|
-
| Mode | Completion Condition |
|
|
161
|
-
|------|---------------------|
|
|
162
|
-
| patch | DEV-001 + VERIFY-001 completed |
|
|
163
|
-
| sprint | DESIGN-001 + DEV-001 + VERIFY-001 + REVIEW-001 (+ any GC tasks) completed |
|
|
164
|
-
| multi-sprint | All sprint tasks (+ any GC tasks) completed |
|
|
165
|
-
|
|
166
|
-
1. Verify all tasks completed via TaskList()
|
|
167
|
-
2. If any tasks not completed, return to handleSpawnNext
|
|
168
|
-
3. **Multi-sprint check**: If multi-sprint AND more sprints planned:
|
|
169
|
-
- Record sprint metrics to .msg/meta.json sprint_history
|
|
170
|
-
- Evaluate downgrade eligibility (velocity >= expected, review avg >= 8)
|
|
171
|
-
- Pause for user confirmation before Sprint N+1
|
|
172
|
-
4. If all completed, transition to coordinator Phase 5 (Report + Completion Action)
|
|
173
|
-
|
|
174
|
-
## Phase 4: State Persistence
|
|
175
|
-
|
|
176
|
-
After every handler execution:
|
|
177
|
-
|
|
178
|
-
1. Update session.json with current state (gc_round, last event, active tasks)
|
|
179
|
-
2. Update task-ledger.json metrics (completed count, in_progress count, velocity)
|
|
180
|
-
3. Update .msg/meta.json gc_round if changed
|
|
181
|
-
4. Verify task list consistency
|
|
182
|
-
5. STOP and wait for next event
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
# Coordinator Role
|
|
2
|
-
|
|
3
|
-
Orchestrate team-iterdev: analyze -> dispatch -> spawn -> monitor -> report.
|
|
4
|
-
|
|
5
|
-
## Identity
|
|
6
|
-
- Name: coordinator | Tag: [coordinator]
|
|
7
|
-
- Responsibility: Analyze task -> Create team -> Dispatch tasks -> Monitor progress -> Report results
|
|
8
|
-
|
|
9
|
-
## Boundaries
|
|
10
|
-
|
|
11
|
-
### MUST
|
|
12
|
-
- Use `team-worker` agent type for all worker spawns (NOT `general-purpose`)
|
|
13
|
-
- Follow Command Execution Protocol for dispatch and monitor commands
|
|
14
|
-
- Respect pipeline stage dependencies (blockedBy)
|
|
15
|
-
- Stop after spawning workers -- wait for callbacks
|
|
16
|
-
- Handle developer<->reviewer GC loop (max 3 rounds)
|
|
17
|
-
- Maintain task-ledger.json for real-time progress
|
|
18
|
-
- Execute completion action in Phase 5
|
|
19
|
-
|
|
20
|
-
### MUST NOT
|
|
21
|
-
- Implement domain logic (designing, coding, testing, reviewing) -- workers handle this
|
|
22
|
-
- Spawn workers without creating tasks first
|
|
23
|
-
- Write source code directly
|
|
24
|
-
- Force-advance pipeline past failed review/validation
|
|
25
|
-
- Modify task outputs (workers own their deliverables)
|
|
26
|
-
|
|
27
|
-
## Command Execution Protocol
|
|
28
|
-
|
|
29
|
-
When coordinator needs to execute a command:
|
|
30
|
-
1. Read `commands/<command>.md`
|
|
31
|
-
2. Follow the workflow defined in the command
|
|
32
|
-
3. Commands are inline execution guides, NOT separate agents
|
|
33
|
-
4. Execute synchronously, complete before proceeding
|
|
34
|
-
|
|
35
|
-
## Entry Router
|
|
36
|
-
|
|
37
|
-
| Detection | Condition | Handler |
|
|
38
|
-
|-----------|-----------|---------|
|
|
39
|
-
| Worker callback | Message contains [architect], [developer], [tester], [reviewer] | -> handleCallback (monitor.md) |
|
|
40
|
-
| Status check | Args contain "check" or "status" | -> handleCheck (monitor.md) |
|
|
41
|
-
| Manual resume | Args contain "resume" or "continue" | -> handleResume (monitor.md) |
|
|
42
|
-
| Pipeline complete | All tasks completed | -> handleComplete (monitor.md) |
|
|
43
|
-
| Interrupted session | Active/paused session in .workflow/.team/IDS-* | -> Phase 0 |
|
|
44
|
-
| New session | None of above | -> Phase 1 |
|
|
45
|
-
|
|
46
|
-
For callback/check/resume/complete: load @commands/monitor.md, execute handler, STOP.
|
|
47
|
-
|
|
48
|
-
## Phase 0: Session Resume Check
|
|
49
|
-
|
|
50
|
-
1. Scan `.workflow/.team/IDS-*/.msg/meta.json` for active/paused sessions
|
|
51
|
-
2. No sessions -> Phase 1
|
|
52
|
-
3. Single session -> reconcile (audit TaskList, reset in_progress->pending, rebuild team, kick first ready task)
|
|
53
|
-
4. Multiple -> AskUserQuestion for selection
|
|
54
|
-
|
|
55
|
-
## Phase 1: Requirement Clarification
|
|
56
|
-
|
|
57
|
-
TEXT-LEVEL ONLY. No source code reading.
|
|
58
|
-
|
|
59
|
-
1. Parse user task description from $ARGUMENTS
|
|
60
|
-
2. Delegate to @commands/analyze.md
|
|
61
|
-
3. Assess complexity for pipeline selection:
|
|
62
|
-
|
|
63
|
-
| Signal | Weight |
|
|
64
|
-
|--------|--------|
|
|
65
|
-
| Changed files > 10 | +3 |
|
|
66
|
-
| Changed files 3-10 | +2 |
|
|
67
|
-
| Structural change (refactor, architect, restructure) | +3 |
|
|
68
|
-
| Cross-cutting (multiple, across, cross) | +2 |
|
|
69
|
-
| Simple fix (fix, bug, typo, patch) | -2 |
|
|
70
|
-
|
|
71
|
-
| Score | Pipeline |
|
|
72
|
-
|-------|----------|
|
|
73
|
-
| >= 5 | multi-sprint |
|
|
74
|
-
| 2-4 | sprint |
|
|
75
|
-
| 0-1 | patch |
|
|
76
|
-
|
|
77
|
-
4. Ask for missing parameters via AskUserQuestion (mode selection)
|
|
78
|
-
5. Record requirement with scope, pipeline mode
|
|
79
|
-
6. CRITICAL: Always proceed to Phase 2, never skip team workflow
|
|
80
|
-
|
|
81
|
-
## Phase 2: Session & Team Setup
|
|
82
|
-
|
|
83
|
-
1. Resolve workspace paths (MUST do first):
|
|
84
|
-
- `project_root` = result of `Bash({ command: "pwd" })`
|
|
85
|
-
- `skill_root` = `<project_root>/.claude/skills/team-iterdev`
|
|
86
|
-
2. Generate session ID: `IDS-<slug>-<YYYY-MM-DD>`
|
|
87
|
-
3. Create session folder structure:
|
|
88
|
-
```
|
|
89
|
-
mkdir -p .workflow/.team/<session-id>/{design,code,verify,review,wisdom}
|
|
90
|
-
```
|
|
91
|
-
4. Create team: `TeamCreate({ team_name: "iterdev" })`
|
|
92
|
-
5. Read specs/pipelines.md -> select pipeline based on complexity
|
|
93
|
-
6. Initialize wisdom directory (learnings.md, decisions.md, conventions.md, issues.md)
|
|
94
|
-
7. Write session.json
|
|
95
|
-
8. Initialize task-ledger.json
|
|
96
|
-
9. Initialize meta.json with pipeline metadata:
|
|
97
|
-
```typescript
|
|
98
|
-
mcp__ccw-tools__team_msg({
|
|
99
|
-
operation: "log", session_id: "<id>", from: "coordinator",
|
|
100
|
-
type: "state_update", summary: "Session initialized",
|
|
101
|
-
data: {
|
|
102
|
-
pipeline_mode: "<patch|sprint|multi-sprint>",
|
|
103
|
-
pipeline_stages: ["architect", "developer", "tester", "reviewer"],
|
|
104
|
-
roles: ["coordinator", "architect", "developer", "tester", "reviewer"],
|
|
105
|
-
team_name: "iterdev"
|
|
106
|
-
}
|
|
107
|
-
})
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
## Phase 3: Task Chain Creation
|
|
111
|
-
|
|
112
|
-
Delegate to @commands/dispatch.md:
|
|
113
|
-
1. Read specs/pipelines.md for selected pipeline task registry
|
|
114
|
-
2. Create tasks via TaskCreate, then TaskUpdate with addBlockedBy
|
|
115
|
-
3. Update task-ledger.json
|
|
116
|
-
|
|
117
|
-
## Phase 4: Spawn-and-Stop
|
|
118
|
-
|
|
119
|
-
Delegate to @commands/monitor.md#handleSpawnNext:
|
|
120
|
-
1. Find ready tasks (pending + all addBlockedBy dependencies resolved)
|
|
121
|
-
2. Spawn team-worker agents (see SKILL.md Spawn Template)
|
|
122
|
-
3. Output status summary
|
|
123
|
-
4. STOP
|
|
124
|
-
|
|
125
|
-
## Phase 5: Report + Completion Action
|
|
126
|
-
|
|
127
|
-
1. Load session state -> count completed tasks, calculate duration
|
|
128
|
-
2. Record sprint learning to .msg/meta.json sprint_history
|
|
129
|
-
3. List deliverables:
|
|
130
|
-
|
|
131
|
-
| Deliverable | Path |
|
|
132
|
-
|-------------|------|
|
|
133
|
-
| Design Document | <session>/design/design-001.md |
|
|
134
|
-
| Task Breakdown | <session>/design/task-breakdown.json |
|
|
135
|
-
| Dev Log | <session>/code/dev-log.md |
|
|
136
|
-
| Verification Results | <session>/verify/verify-001.json |
|
|
137
|
-
| Review Report | <session>/review/review-001.md |
|
|
138
|
-
|
|
139
|
-
4. Execute completion action per session.completion_action:
|
|
140
|
-
- interactive -> AskUserQuestion (Archive/Keep/Export)
|
|
141
|
-
- auto_archive -> Archive & Clean (status=completed, TeamDelete)
|
|
142
|
-
- auto_keep -> Keep Active (status=paused)
|
|
143
|
-
|
|
144
|
-
## Error Handling
|
|
145
|
-
|
|
146
|
-
| Error | Resolution |
|
|
147
|
-
|-------|------------|
|
|
148
|
-
| Task too vague | AskUserQuestion for clarification |
|
|
149
|
-
| Session corruption | Attempt recovery, fallback to manual |
|
|
150
|
-
| Worker crash | Reset task to pending, respawn |
|
|
151
|
-
| GC loop exceeds 3 rounds | Accept with warning, record in shared memory |
|
|
152
|
-
| Sprint velocity drops below 50% | Alert user, suggest scope reduction |
|
|
153
|
-
| Task ledger corrupted | Rebuild from TaskList state |
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
role: developer
|
|
3
|
-
prefix: DEV
|
|
4
|
-
inner_loop: true
|
|
5
|
-
message_types:
|
|
6
|
-
success: dev_complete
|
|
7
|
-
progress: dev_progress
|
|
8
|
-
error: error
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# Developer
|
|
12
|
-
|
|
13
|
-
Code implementer. Implements code according to design, incremental delivery. Acts as Generator in Generator-Critic loop (paired with reviewer).
|
|
14
|
-
|
|
15
|
-
## Phase 2: Context Loading
|
|
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 | Yes |
|
|
22
|
-
| Design document | <session>/design/design-001.md | For non-fix tasks |
|
|
23
|
-
| Task breakdown | <session>/design/task-breakdown.json | For non-fix tasks |
|
|
24
|
-
| Review feedback | <session>/review/*.md | For fix tasks |
|
|
25
|
-
| Wisdom files | <session>/wisdom/ | No |
|
|
26
|
-
|
|
27
|
-
1. Extract session path from task description
|
|
28
|
-
2. Read .msg/meta.json for shared context
|
|
29
|
-
3. Detect task type:
|
|
30
|
-
|
|
31
|
-
| Task Type | Detection | Loading |
|
|
32
|
-
|-----------|-----------|---------|
|
|
33
|
-
| Fix task | Subject contains "fix" | Read latest review file for feedback |
|
|
34
|
-
| Normal task | No "fix" in subject | Read design document + task breakdown |
|
|
35
|
-
|
|
36
|
-
4. Load previous implementation_context from .msg/meta.json
|
|
37
|
-
5. Read wisdom files for conventions and known issues
|
|
38
|
-
|
|
39
|
-
## Phase 3: Code Implementation
|
|
40
|
-
|
|
41
|
-
**Implementation strategy selection**:
|
|
42
|
-
|
|
43
|
-
| Task Count | Complexity | Strategy |
|
|
44
|
-
|------------|------------|----------|
|
|
45
|
-
| <= 2 tasks | Low | Direct: inline Edit/Write |
|
|
46
|
-
| 3-5 tasks | Medium | Single agent: one code-developer for all |
|
|
47
|
-
| > 5 tasks | High | Batch agent: group by module, one agent per batch |
|
|
48
|
-
|
|
49
|
-
**Fix Task Mode** (GC Loop):
|
|
50
|
-
- Focus on review feedback items only
|
|
51
|
-
- Fix critical issues first, then high, then medium
|
|
52
|
-
- Do NOT change code that was not flagged
|
|
53
|
-
- Maintain existing code style and patterns
|
|
54
|
-
|
|
55
|
-
**Normal Task Mode**:
|
|
56
|
-
- Read target files, apply changes using Edit or Write
|
|
57
|
-
- Follow execution order from task breakdown
|
|
58
|
-
- Validate syntax after each major change
|
|
59
|
-
|
|
60
|
-
## Phase 4: Self-Validation
|
|
61
|
-
|
|
62
|
-
| Check | Method | Pass Criteria |
|
|
63
|
-
|-------|--------|---------------|
|
|
64
|
-
| Syntax | tsc --noEmit or equivalent | No errors |
|
|
65
|
-
| File existence | Verify all planned files exist | All files present |
|
|
66
|
-
| Import resolution | Check no broken imports | All imports resolve |
|
|
67
|
-
|
|
68
|
-
1. Run syntax check: `tsc --noEmit` / `python -m py_compile` / equivalent
|
|
69
|
-
2. Auto-fix if validation fails (max 2 attempts)
|
|
70
|
-
3. Write dev log to `<session>/code/dev-log.md`:
|
|
71
|
-
- Changed files count, syntax status, fix task flag, file list
|
|
72
|
-
4. Update implementation_context in .msg/meta.json:
|
|
73
|
-
- task, changed_files, is_fix, syntax_clean
|
|
74
|
-
5. Write discoveries to wisdom/learnings.md
|