maestro-flow 0.4.6 → 0.4.8
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/.claude/commands/maestro-ralph.md +548 -377
- package/.claude/commands/maestro.md +220 -191
- package/.codex/skills/maestro/SKILL.md +495 -462
- package/.codex/skills/maestro-collab/SKILL.md +218 -117
- package/.codex/skills/maestro-execute/SKILL.md +13 -11
- package/.codex/skills/maestro-milestone-audit/SKILL.md +12 -10
- package/.codex/skills/maestro-ralph/SKILL.md +491 -339
- package/.codex/skills/maestro-ui-codify/SKILL.md +18 -16
- package/.codex/skills/manage-codebase-rebuild/SKILL.md +20 -13
- package/.codex/skills/manage-issue-discover/SKILL.md +19 -17
- package/.codex/skills/quality-debug/SKILL.md +35 -31
- package/.codex/skills/quality-refactor/SKILL.md +20 -12
- package/.codex/skills/quality-review/SKILL.md +21 -17
- package/.codex/skills/team-coordinate/SKILL.md +462 -235
- package/.codex/skills/team-coordinate/specs/role-catalog.md +132 -0
- package/.codex/skills/team-lifecycle-v4/SKILL.md +445 -191
- package/.codex/skills/team-quality-assurance/SKILL.md +205 -161
- package/.codex/skills/team-review/SKILL.md +198 -159
- package/.codex/skills/team-tech-debt/SKILL.md +214 -144
- package/.codex/skills/team-testing/SKILL.md +210 -158
- package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.js +25 -33
- package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.test.js +9 -3
- package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.test.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/codex-app-server-adapter.js +5 -2
- package/dashboard/dist-server/dashboard/src/server/agents/codex-app-server-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js +20 -8
- package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/gemini-a2a-adapter.js +6 -3
- package/dashboard/dist-server/dashboard/src/server/agents/gemini-a2a-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/gemini-a2a-adapter.test.js +7 -1
- package/dashboard/dist-server/dashboard/src/server/agents/gemini-a2a-adapter.test.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/opencode-adapter.d.ts +2 -0
- package/dashboard/dist-server/dashboard/src/server/agents/opencode-adapter.js +40 -15
- package/dashboard/dist-server/dashboard/src/server/agents/opencode-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/process-tree-kill.d.ts +1 -0
- package/dashboard/dist-server/dashboard/src/server/agents/process-tree-kill.js +59 -0
- package/dashboard/dist-server/dashboard/src/server/agents/process-tree-kill.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/server/agents/process-tree-kill.test.d.ts +1 -0
- package/dashboard/dist-server/dashboard/src/server/agents/process-tree-kill.test.js +78 -0
- package/dashboard/dist-server/dashboard/src/server/agents/process-tree-kill.test.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/server/agents/stale-handler.d.ts +25 -0
- package/dashboard/dist-server/dashboard/src/server/agents/stale-handler.js +40 -0
- package/dashboard/dist-server/dashboard/src/server/agents/stale-handler.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/server/agents/stale-handler.test.d.ts +1 -0
- package/dashboard/dist-server/dashboard/src/server/agents/stale-handler.test.js +89 -0
- package/dashboard/dist-server/dashboard/src/server/agents/stale-handler.test.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/server/agents/stream-json-adapter.js +19 -8
- package/dashboard/dist-server/dashboard/src/server/agents/stream-json-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/stream-monitor.d.ts +6 -0
- package/dashboard/dist-server/dashboard/src/server/agents/stream-monitor.js +7 -1
- package/dashboard/dist-server/dashboard/src/server/agents/stream-monitor.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/stream-monitor.test.d.ts +1 -0
- package/dashboard/dist-server/dashboard/src/server/agents/stream-monitor.test.js +46 -0
- package/dashboard/dist-server/dashboard/src/server/agents/stream-monitor.test.js.map +1 -0
- package/dashboard/dist-server/shared/agent-types.d.ts +6 -0
- package/dist/shared/agent-types.d.ts +6 -0
- package/dist/shared/agent-types.d.ts.map +1 -1
- package/dist/src/agents/cli-agent-runner.d.ts +3 -0
- package/dist/src/agents/cli-agent-runner.d.ts.map +1 -1
- package/dist/src/agents/cli-agent-runner.js +1 -0
- package/dist/src/agents/cli-agent-runner.js.map +1 -1
- package/dist/src/commands/delegate.d.ts +2 -0
- package/dist/src/commands/delegate.d.ts.map +1 -1
- package/dist/src/commands/delegate.js +18 -0
- package/dist/src/commands/delegate.js.map +1 -1
- package/dist/src/config/cli-tools-config.d.ts +3 -0
- package/dist/src/config/cli-tools-config.d.ts.map +1 -1
- package/dist/src/config/cli-tools-config.js.map +1 -1
- package/package.json +1 -1
- package/shared/agent-types.ts +237 -231
- package/.codex/skills/team-coordinate/roles/coordinator/commands/analyze-task.md +0 -247
- package/.codex/skills/team-coordinate/roles/coordinator/commands/dispatch.md +0 -126
- package/.codex/skills/team-coordinate/roles/coordinator/commands/monitor.md +0 -265
- package/.codex/skills/team-coordinate/roles/coordinator/role.md +0 -403
- package/.codex/skills/team-coordinate/specs/knowledge-transfer.md +0 -113
- package/.codex/skills/team-coordinate/specs/pipelines.md +0 -97
- package/.codex/skills/team-coordinate/specs/quality-gates.md +0 -112
- package/.codex/skills/team-coordinate/specs/role-spec-template.md +0 -192
- package/.codex/skills/team-executor/SKILL.md +0 -116
- package/.codex/skills/team-executor/roles/executor/commands/monitor.md +0 -213
- package/.codex/skills/team-executor/roles/executor/role.md +0 -173
- package/.codex/skills/team-executor/specs/session-schema.md +0 -230
- package/.codex/skills/team-lifecycle-v4/roles/coordinator/commands/analyze.md +0 -56
- package/.codex/skills/team-lifecycle-v4/roles/coordinator/commands/dispatch.md +0 -61
- package/.codex/skills/team-lifecycle-v4/roles/coordinator/commands/monitor.md +0 -113
- package/.codex/skills/team-lifecycle-v4/roles/coordinator/role.md +0 -189
- package/.codex/skills/team-lifecycle-v4/schemas/tasks-schema.md +0 -100
- package/.codex/skills/team-lifecycle-v4/specs/knowledge-transfer.md +0 -204
- package/.codex/skills/team-quality-assurance/roles/coordinator/commands/analyze.md +0 -72
- package/.codex/skills/team-quality-assurance/roles/coordinator/commands/dispatch.md +0 -108
- package/.codex/skills/team-quality-assurance/roles/coordinator/commands/monitor.md +0 -163
- package/.codex/skills/team-quality-assurance/roles/coordinator/role.md +0 -177
- package/.codex/skills/team-review/roles/coordinator/commands/analyze.md +0 -71
- package/.codex/skills/team-review/roles/coordinator/commands/dispatch.md +0 -90
- package/.codex/skills/team-review/roles/coordinator/commands/monitor.md +0 -135
- package/.codex/skills/team-review/roles/coordinator/role.md +0 -176
- package/.codex/skills/team-tech-debt/roles/coordinator/commands/analyze.md +0 -47
- package/.codex/skills/team-tech-debt/roles/coordinator/commands/dispatch.md +0 -163
- package/.codex/skills/team-tech-debt/roles/coordinator/commands/monitor.md +0 -133
- package/.codex/skills/team-tech-debt/roles/coordinator/role.md +0 -173
- package/.codex/skills/team-testing/roles/coordinator/commands/analyze.md +0 -70
- package/.codex/skills/team-testing/roles/coordinator/commands/dispatch.md +0 -106
- package/.codex/skills/team-testing/roles/coordinator/commands/monitor.md +0 -156
- package/.codex/skills/team-testing/roles/coordinator/role.md +0 -185
|
@@ -1,191 +1,445 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: team-lifecycle-v4
|
|
3
|
-
description: Full lifecycle team -- plan, develop, test, review
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
|
22
|
-
+--
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
|
65
|
-
|
|
66
|
-
|
|
|
67
|
-
|
|
|
68
|
-
|
|
|
69
|
-
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
|
131
|
-
|
|
132
|
-
| `
|
|
133
|
-
| `
|
|
134
|
-
| `
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
|
174
|
-
|
|
175
|
-
|
|
|
176
|
-
|
|
|
177
|
-
|
|
|
178
|
-
|
|
|
179
|
-
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
1
|
+
---
|
|
2
|
+
name: team-lifecycle-v4
|
|
3
|
+
description: Full lifecycle team -- plan, develop, test, review
|
|
4
|
+
argument-hint: "[task description] [-y|--yes] [-c|--concurrency N] [--continue] [--pipeline spec-only|impl-only|full-lifecycle]"
|
|
5
|
+
allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, request_user_input
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<purpose>
|
|
9
|
+
Wave-based lifecycle orchestration via `spawn_agents_on_csv`. Fixed roles with pre-defined pipelines: specification → planning → implementation → testing → review.
|
|
10
|
+
|
|
11
|
+
**Core workflow**: Select Pipeline → Build CSV from Pipeline Definition → Wave-by-Wave Execution → Aggregate Results
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
+-------------------------------------------------------------------+
|
|
15
|
+
| LIFECYCLE V4 CSV WAVE WORKFLOW |
|
|
16
|
+
+-------------------------------------------------------------------+
|
|
17
|
+
| |
|
|
18
|
+
| Phase 1: Pipeline Selection + CSV Generation |
|
|
19
|
+
| +-- Detect pipeline from keywords or --pipeline flag |
|
|
20
|
+
| +-- Load pipeline definition from specs/pipelines.md |
|
|
21
|
+
| +-- Build tasks.csv with wave assignments |
|
|
22
|
+
| +-- User validates (skip if -y) |
|
|
23
|
+
| |
|
|
24
|
+
| Phase 2: Wave Execution Engine |
|
|
25
|
+
| +-- For each wave N (sequential): |
|
|
26
|
+
| | +-- Build prev_context from upstream findings |
|
|
27
|
+
| | +-- spawn_agents_on_csv(wave-N.csv) |
|
|
28
|
+
| | +-- Each agent reads its role.md for domain logic |
|
|
29
|
+
| | +-- Merge results → master tasks.csv |
|
|
30
|
+
| | +-- CHECKPOINT waves: supervisor verifies quality |
|
|
31
|
+
| | +-- User approval at checkpoints (skip if -y) |
|
|
32
|
+
| +-- discoveries.ndjson shared across all waves |
|
|
33
|
+
| |
|
|
34
|
+
| Phase 3: Results Aggregation |
|
|
35
|
+
| +-- Export results.csv |
|
|
36
|
+
| +-- Generate context.md |
|
|
37
|
+
| +-- Display summary with deliverables |
|
|
38
|
+
| |
|
|
39
|
+
+-------------------------------------------------------------------+
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
</purpose>
|
|
43
|
+
|
|
44
|
+
<context>
|
|
45
|
+
```bash
|
|
46
|
+
$team-lifecycle-v4 "build user authentication system"
|
|
47
|
+
$team-lifecycle-v4 -y --pipeline spec-only "design payment module"
|
|
48
|
+
$team-lifecycle-v4 --pipeline impl-only "implement auth from existing spec"
|
|
49
|
+
$team-lifecycle-v4 --continue "20260518-tlv4-auth-system"
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**Flags**:
|
|
53
|
+
- `-y, --yes`: Skip confirmations and checkpoint approvals
|
|
54
|
+
- `-c, --concurrency N`: Max concurrent agents per wave (default: 3)
|
|
55
|
+
- `--continue`: Resume existing session
|
|
56
|
+
- `--pipeline`: Force pipeline (spec-only, impl-only, full-lifecycle)
|
|
57
|
+
- `--no-supervision`: Skip CHECKPOINT tasks (opt-out from supervisor quality gates)
|
|
58
|
+
|
|
59
|
+
### Role Registry (Fixed)
|
|
60
|
+
|
|
61
|
+
| Role | Path | Prefix |
|
|
62
|
+
|------|------|--------|
|
|
63
|
+
| analyst | [roles/analyst/role.md](roles/analyst/role.md) | RESEARCH-* |
|
|
64
|
+
| writer | [roles/writer/role.md](roles/writer/role.md) | DRAFT-* |
|
|
65
|
+
| planner | [roles/planner/role.md](roles/planner/role.md) | PLAN-* |
|
|
66
|
+
| executor | [roles/executor/role.md](roles/executor/role.md) | IMPL-* |
|
|
67
|
+
| tester | [roles/tester/role.md](roles/tester/role.md) | TEST-* |
|
|
68
|
+
| reviewer | [roles/reviewer/role.md](roles/reviewer/role.md) | REVIEW-*, QUALITY-* |
|
|
69
|
+
| supervisor | [roles/supervisor/role.md](roles/supervisor/role.md) | CHECKPOINT-* |
|
|
70
|
+
|
|
71
|
+
### Session Structure
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
.workflow/.csv-wave/{YYYYMMDD}-tlv4-{slug}/
|
|
75
|
+
+-- tasks.csv (master state)
|
|
76
|
+
+-- results.csv (final export)
|
|
77
|
+
+-- discoveries.ndjson (cross-wave shared)
|
|
78
|
+
+-- context.md (human-readable report)
|
|
79
|
+
+-- spec/ (spec phase outputs)
|
|
80
|
+
+-- plan/ (implementation plan)
|
|
81
|
+
+-- artifacts/ (all deliverables)
|
|
82
|
+
+-- wave-{N}.csv (temporary)
|
|
83
|
+
+-- wave-{N}-results.csv (temporary)
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**Output**: tasks.csv, results.csv, discoveries.ndjson, context.md, spec/, plan/, artifacts/
|
|
87
|
+
|
|
88
|
+
### Specs Reference
|
|
89
|
+
|
|
90
|
+
| Spec | Purpose |
|
|
91
|
+
|------|---------|
|
|
92
|
+
| [specs/pipelines.md](specs/pipelines.md) | Pipeline definitions, task registry, wave assignments |
|
|
93
|
+
| [specs/quality-gates.md](specs/quality-gates.md) | Quality thresholds and scoring dimensions |
|
|
94
|
+
|
|
95
|
+
### Templates Reference
|
|
96
|
+
|
|
97
|
+
| Template | Used By |
|
|
98
|
+
|----------|---------|
|
|
99
|
+
| [templates/product-brief.md](templates/product-brief.md) | writer (DRAFT-001) |
|
|
100
|
+
| [templates/requirements.md](templates/requirements.md) | writer (DRAFT-002) |
|
|
101
|
+
| [templates/architecture.md](templates/architecture.md) | writer (DRAFT-003) |
|
|
102
|
+
| [templates/epics.md](templates/epics.md) | writer (DRAFT-004) |
|
|
103
|
+
</context>
|
|
104
|
+
|
|
105
|
+
<csv_schema>
|
|
106
|
+
|
|
107
|
+
### tasks.csv (Master State)
|
|
108
|
+
|
|
109
|
+
```csv
|
|
110
|
+
id,title,description,role,pipeline_phase,deps,context_from,wave
|
|
111
|
+
"RESEARCH-001","Domain research","PURPOSE: Research domain, competitors, constraints | Success: Discovery context packaged\nTASK:\n - Analyze problem space\n - Explore codebase patterns\n - Package context\nEXPECTED: spec/discovery-context.json\nCONSTRAINTS: Read-only","analyst","research","","","1"
|
|
112
|
+
"DRAFT-001","Product brief","PURPOSE: Create product brief | Success: Self-validated document\nTASK:\n - Apply templates/product-brief.md\n - Define vision, problem, users, goals\n - Self-validate against quality-gates.md §3.1\nEXPECTED: spec/product-brief.md\nCONSTRAINTS: Follow template","writer","product-brief","RESEARCH-001","RESEARCH-001","2"
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
**Input columns** (present in initial tasks.csv and wave-N.csv):
|
|
116
|
+
|
|
117
|
+
| Column | Description |
|
|
118
|
+
|--------|-------------|
|
|
119
|
+
| `id` | Task ID: `{PREFIX}-{NNN}` |
|
|
120
|
+
| `title` | Short task title |
|
|
121
|
+
| `description` | Task instructions (PURPOSE/TASK/EXPECTED/CONSTRAINTS) |
|
|
122
|
+
| `role` | Fixed role name from registry |
|
|
123
|
+
| `pipeline_phase` | Phase identifier (research, product-brief, requirements, etc.) |
|
|
124
|
+
| `deps` | Semicolon-separated dependency task IDs |
|
|
125
|
+
| `context_from` | Semicolon-separated task IDs for context |
|
|
126
|
+
| `wave` | Wave number |
|
|
127
|
+
|
|
128
|
+
**Lifecycle columns** (initialized with defaults, updated during execution):
|
|
129
|
+
|
|
130
|
+
| Column | Initial Value | Description |
|
|
131
|
+
|--------|--------------|-------------|
|
|
132
|
+
| `status` | `pending` | Task lifecycle: pending → completed/failed/blocked/skipped |
|
|
133
|
+
| `findings` | `""` | Populated from output_schema merge |
|
|
134
|
+
| `files_modified` | `""` | Populated from output_schema merge |
|
|
135
|
+
| `quality_score` | `""` | Populated from output_schema merge |
|
|
136
|
+
| `error` | `""` | Populated from output_schema merge |
|
|
137
|
+
|
|
138
|
+
**Dynamic column** (added to wave-N.csv only, not in initial tasks.csv):
|
|
139
|
+
|
|
140
|
+
| Column | Description |
|
|
141
|
+
|--------|-------------|
|
|
142
|
+
| `prev_context` | Concatenated findings from context_from tasks, format: `--- TASK-ID: {id} ---\n{findings}` |
|
|
143
|
+
|
|
144
|
+
**Output columns** (via `output_schema` only, NOT in any CSV input):
|
|
145
|
+
|
|
146
|
+
| Column | Description |
|
|
147
|
+
|--------|-------------|
|
|
148
|
+
| `result_status` | completed / failed / blocked (maps to master `status`) |
|
|
149
|
+
| `findings` | Key findings (max 500 chars) |
|
|
150
|
+
| `files_modified` | Semicolon-separated paths |
|
|
151
|
+
| `quality_score` | Numeric quality score (0-100) |
|
|
152
|
+
| `error` | Error message if failed |
|
|
153
|
+
|
|
154
|
+
**Column separation rule**: Input/lifecycle columns and output_schema MUST NOT share names. `result_status` → master `status` during merge.
|
|
155
|
+
|
|
156
|
+
### Pipeline Wave Assignments
|
|
157
|
+
|
|
158
|
+
#### spec-only (8 waves)
|
|
159
|
+
|
|
160
|
+
| Wave | Task | Role | Notes |
|
|
161
|
+
|------|------|------|-------|
|
|
162
|
+
| 1 | RESEARCH-001 | analyst | Domain research |
|
|
163
|
+
| 2 | DRAFT-001 | writer | Product brief |
|
|
164
|
+
| 3 | DRAFT-002 | writer | Requirements PRD |
|
|
165
|
+
| 4 | CHECKPOINT-001 | supervisor | Brief↔PRD consistency |
|
|
166
|
+
| 5 | DRAFT-003 | writer | Architecture |
|
|
167
|
+
| 6 | DRAFT-004 | writer | Epics & stories |
|
|
168
|
+
| 7 | CHECKPOINT-002 | supervisor | Full spec consistency |
|
|
169
|
+
| 8 | QUALITY-001 | reviewer | Readiness gate |
|
|
170
|
+
|
|
171
|
+
#### impl-only (5 waves)
|
|
172
|
+
|
|
173
|
+
| Wave | Task | Role | Notes |
|
|
174
|
+
|------|------|------|-------|
|
|
175
|
+
| 1 | PLAN-001 | planner | Implementation planning |
|
|
176
|
+
| 2 | CHECKPOINT-003 | supervisor | Plan↔input alignment |
|
|
177
|
+
| 3 | IMPL-001(~N) | executor | Implementation (parallel if multiple) |
|
|
178
|
+
| 4 | TEST-001 + REVIEW-001 | tester + reviewer | Validation (parallel) |
|
|
179
|
+
| 5 | (reserved) | — | For IMPROVE tasks if review finds issues |
|
|
180
|
+
|
|
181
|
+
#### full-lifecycle (13 waves)
|
|
182
|
+
|
|
183
|
+
spec-only waves 1-8 + user approval checkpoint + impl-only waves shifted.
|
|
184
|
+
|
|
185
|
+
| Wave | Task | Role |
|
|
186
|
+
|------|------|------|
|
|
187
|
+
| 1-8 | (spec-only pipeline) | (see above) |
|
|
188
|
+
| 9 | PLAN-001 | planner |
|
|
189
|
+
| 10 | CHECKPOINT-003 | supervisor |
|
|
190
|
+
| 11 | IMPL-001(~N) | executor |
|
|
191
|
+
| 12 | TEST-001 + REVIEW-001 | tester + reviewer |
|
|
192
|
+
| 13 | (reserved) | — |
|
|
193
|
+
</csv_schema>
|
|
194
|
+
|
|
195
|
+
<invariants>
|
|
196
|
+
1. **Start Immediately**: First action is session initialization
|
|
197
|
+
2. **Wave Order is Sacred**: Execute waves sequentially
|
|
198
|
+
3. **CSV is Source of Truth**: Master tasks.csv holds all state
|
|
199
|
+
4. **Column Separation Rule**: Input and output_schema columns MUST NOT share names
|
|
200
|
+
5. **Context Propagation**: prev_context from master CSV findings
|
|
201
|
+
6. **Discovery Board is Append-Only**: Never clear/modify discoveries.ndjson
|
|
202
|
+
7. **Cascading Skip on Failure**: Failed tasks cascade to dependents
|
|
203
|
+
8. **Cleanup Temp Files**: Delete wave-N.csv and wave-N-results.csv after merge
|
|
204
|
+
9. **Checkpoint Pause**: After CHECKPOINT waves, pause for user approval (skip if -y)
|
|
205
|
+
10. **DO NOT STOP**: Continuous execution between checkpoints
|
|
206
|
+
11. **Role Files are Authoritative**: Agents read roles/{role}/role.md for domain logic
|
|
207
|
+
</invariants>
|
|
208
|
+
|
|
209
|
+
<state_machine>
|
|
210
|
+
|
|
211
|
+
<states>
|
|
212
|
+
S_PARSE — Parse arguments, detect pipeline PERSIST: —
|
|
213
|
+
S_PIPELINE — Select and validate pipeline PERSIST: —
|
|
214
|
+
S_CSV_GEN — Generate tasks.csv from pipeline definition PERSIST: tasks.csv
|
|
215
|
+
S_WAVE_{N} — Execute wave N PERSIST: findings in master CSV
|
|
216
|
+
S_CHECKPOINT — User approval after checkpoint wave PERSIST: —
|
|
217
|
+
S_AGGREGATE — Generate report, export results PERSIST: context.md, results.csv
|
|
218
|
+
</states>
|
|
219
|
+
|
|
220
|
+
<transitions>
|
|
221
|
+
S_PARSE → S_PIPELINE WHEN: new session
|
|
222
|
+
S_PARSE → S_WAVE_{N} WHEN: --continue (resume at first pending wave)
|
|
223
|
+
S_PIPELINE → S_CSV_GEN
|
|
224
|
+
S_CSV_GEN → S_WAVE_1
|
|
225
|
+
|
|
226
|
+
S_WAVE_{N} → S_CHECKPOINT WHEN: wave N was a CHECKPOINT task
|
|
227
|
+
S_WAVE_{N} → S_WAVE_{N+1} WHEN: wave N not checkpoint, more waves
|
|
228
|
+
S_WAVE_{N} → S_AGGREGATE WHEN: last wave complete
|
|
229
|
+
|
|
230
|
+
S_CHECKPOINT → S_WAVE_{N+1} WHEN: user approves or -y
|
|
231
|
+
S_CHECKPOINT → S_WAVE_{N} WHEN: user requests revision (re-run checkpoint)
|
|
232
|
+
S_CHECKPOINT → S_AGGREGATE WHEN: user aborts
|
|
233
|
+
</transitions>
|
|
234
|
+
|
|
235
|
+
<actions>
|
|
236
|
+
|
|
237
|
+
### Session Initialization (S_PARSE)
|
|
238
|
+
|
|
239
|
+
```
|
|
240
|
+
Parse from $ARGUMENTS:
|
|
241
|
+
AUTO_YES ← --yes | -y
|
|
242
|
+
continueMode ← --continue
|
|
243
|
+
maxConcurrency ← --concurrency | -c N (default: 3)
|
|
244
|
+
pipelineFlag ← --pipeline spec-only|impl-only|full-lifecycle
|
|
245
|
+
noSupervision ← --no-supervision (skip CHECKPOINT tasks)
|
|
246
|
+
taskDescription ← remaining text
|
|
247
|
+
|
|
248
|
+
Derive:
|
|
249
|
+
dateStr ← UTC+8 YYYYMMDD
|
|
250
|
+
slug ← first 3 meaningful words, kebab-case
|
|
251
|
+
sessionId ← "{dateStr}-tlv4-{slug}"
|
|
252
|
+
sessionFolder ← ".workflow/.csv-wave/{sessionId}"
|
|
253
|
+
skillRoot ← resolve path to this skill directory
|
|
254
|
+
|
|
255
|
+
mkdir -p {sessionFolder}/{spec,plan,artifacts}
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
### Pipeline Selection (S_PIPELINE)
|
|
259
|
+
|
|
260
|
+
1. If `--pipeline` flag → use specified pipeline
|
|
261
|
+
2. Else scan task description keywords against [specs/pipelines.md](specs/pipelines.md) §1:
|
|
262
|
+
- spec/design/document/requirements → `spec-only`
|
|
263
|
+
- implement/build/fix/code → `impl-only`
|
|
264
|
+
- full/lifecycle/end-to-end → `full-lifecycle`
|
|
265
|
+
- Ambiguous → `request_user_input`
|
|
266
|
+
3. Validate pipeline selection
|
|
267
|
+
|
|
268
|
+
### CSV Generation (S_CSV_GEN)
|
|
269
|
+
|
|
270
|
+
1. Load pipeline definition from [specs/pipelines.md](specs/pipelines.md)
|
|
271
|
+
2. **Supervision opt-out**: if `--no-supervision`, filter out all CHECKPOINT-* tasks from pipeline. Adjust deps: tasks that depended on CHECKPOINT tasks now depend on the CHECKPOINT's upstream instead.
|
|
272
|
+
3. For each task in pipeline, build CSV row:
|
|
273
|
+
- `id`: from task registry (RESEARCH-001, DRAFT-001, etc.)
|
|
274
|
+
- `description`: PURPOSE/TASK/EXPECTED/CONSTRAINTS with session-specific context
|
|
275
|
+
- `role`: from registry
|
|
276
|
+
- `pipeline_phase`: from registry
|
|
277
|
+
- `deps`: from pipeline dependency chain
|
|
278
|
+
- `context_from`: same as deps (upstream findings needed)
|
|
279
|
+
- `wave`: from pipeline wave assignment table (recalculate if checkpoints removed)
|
|
280
|
+
4. Initialize lifecycle columns: `status=pending`, empty `findings`/`files_modified`/`quality_score`/`error`
|
|
281
|
+
5. Write `tasks.csv`
|
|
282
|
+
6. Write empty `discoveries.ndjson`
|
|
283
|
+
7. User validation (skip if `-y`): display pipeline, task count, wave structure
|
|
284
|
+
|
|
285
|
+
### Wave Execution Engine (S_WAVE_{N})
|
|
286
|
+
|
|
287
|
+
For each wave N:
|
|
288
|
+
|
|
289
|
+
#### Step 1: Skip check
|
|
290
|
+
- If all tasks in wave N are already completed/skipped → skip to next wave
|
|
291
|
+
- If any dep is failed/blocked → cascade skip
|
|
292
|
+
|
|
293
|
+
#### Step 2: Build prev_context
|
|
294
|
+
For each task in wave N:
|
|
295
|
+
- Read `context_from` task IDs → extract their `findings` from master CSV
|
|
296
|
+
- Concatenate as `prev_context`
|
|
297
|
+
|
|
298
|
+
#### Step 3: Write wave-{N}.csv
|
|
299
|
+
Extract wave N rows + add `prev_context` column.
|
|
300
|
+
|
|
301
|
+
#### Step 4: Execute
|
|
302
|
+
|
|
303
|
+
```javascript
|
|
304
|
+
spawn_agents_on_csv({
|
|
305
|
+
csv_path: `${sessionFolder}/wave-${N}.csv`,
|
|
306
|
+
id_column: "id",
|
|
307
|
+
instruction: buildLifecycleInstruction(sessionFolder, skillRoot),
|
|
308
|
+
max_concurrency: maxConcurrency,
|
|
309
|
+
max_runtime_seconds: 3600,
|
|
310
|
+
output_csv_path: `${sessionFolder}/wave-${N}-results.csv`,
|
|
311
|
+
output_schema: {
|
|
312
|
+
id,
|
|
313
|
+
result_status, // completed | failed | blocked
|
|
314
|
+
findings, // key findings (max 500 chars)
|
|
315
|
+
files_modified, // semicolon-separated paths
|
|
316
|
+
quality_score, // 0-100
|
|
317
|
+
error // error message
|
|
318
|
+
}
|
|
319
|
+
})
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
#### Step 5: Merge + Cleanup
|
|
323
|
+
1. Map `result_status` → master `status`
|
|
324
|
+
2. Copy `findings`, `files_modified`, `quality_score`, `error`
|
|
325
|
+
3. Delete `wave-{N}.csv` AND `wave-{N}-results.csv`
|
|
326
|
+
4. Cascade skip failed task dependents
|
|
327
|
+
|
|
328
|
+
#### Step 6: Checkpoint handling
|
|
329
|
+
If wave N was a CHECKPOINT task:
|
|
330
|
+
- Read supervisor's `findings` and `quality_score`
|
|
331
|
+
- If quality_score >= 80 (pass) → continue
|
|
332
|
+
- If 60-79 (review) → display warnings, continue (or pause if not -y)
|
|
333
|
+
- If < 60 (fail) → pause for user: Revise / Override / Abort
|
|
334
|
+
|
|
335
|
+
### Instruction Builder
|
|
336
|
+
|
|
337
|
+
```
|
|
338
|
+
You are a team-lifecycle-v4 agent executing a software development task.
|
|
339
|
+
|
|
340
|
+
## Your Identity
|
|
341
|
+
- Role: read from your CSV row 'role' column
|
|
342
|
+
- Task: read from your CSV row 'description' column (PURPOSE/TASK/EXPECTED/CONSTRAINTS)
|
|
343
|
+
- Phase: read from your CSV row 'pipeline_phase' column
|
|
344
|
+
|
|
345
|
+
## Role Definition
|
|
346
|
+
Read your detailed role instructions from:
|
|
347
|
+
{skillRoot}/roles/{role}/role.md
|
|
348
|
+
|
|
349
|
+
Follow the execution protocol defined in your role.md (Phase 2-4 structure).
|
|
350
|
+
|
|
351
|
+
For roles with commands/ subdirectory, load the relevant command file based on your task type.
|
|
352
|
+
|
|
353
|
+
## Context
|
|
354
|
+
- Session: {sessionFolder}
|
|
355
|
+
- Discovery board: {sessionFolder}/discoveries.ndjson (read before work, append findings)
|
|
356
|
+
- Previous context: read your CSV row 'prev_context' column
|
|
357
|
+
- Templates: {skillRoot}/templates/ (for writer role)
|
|
358
|
+
- Quality gates: {skillRoot}/specs/quality-gates.md
|
|
359
|
+
|
|
360
|
+
## Quality Contract
|
|
361
|
+
1. Verify all outputs exist before reporting completed
|
|
362
|
+
2. Include quality_score (0-100) based on specs/quality-gates.md criteria
|
|
363
|
+
3. Retry on verification failure (max 2 retries)
|
|
364
|
+
4. Report blocked if still failing after retries
|
|
365
|
+
|
|
366
|
+
## Discovery Protocol
|
|
367
|
+
Write task output to {sessionFolder}/discoveries/{task_id}.json:
|
|
368
|
+
{
|
|
369
|
+
"task_id": "<id>", "role": "<role>", "status": "<result_status>",
|
|
370
|
+
"findings": "<summary>", "quality_score": <N>,
|
|
371
|
+
"artifacts_produced": ["<paths>"], "files_modified": ["<paths>"]
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
Append to {sessionFolder}/discoveries.ndjson:
|
|
375
|
+
{"ts":"<ISO>","worker":"<id>","type":"<pipeline_phase>","data":{...}}
|
|
376
|
+
|
|
377
|
+
## Output
|
|
378
|
+
Return via output_schema:
|
|
379
|
+
- result_status: completed | failed | blocked
|
|
380
|
+
- findings: key findings (max 500 chars)
|
|
381
|
+
- files_modified: semicolon-separated paths
|
|
382
|
+
- quality_score: 0-100 per quality-gates.md
|
|
383
|
+
- error: error message if not completed
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
### Results Aggregation (S_AGGREGATE)
|
|
387
|
+
|
|
388
|
+
1. Export `results.csv`
|
|
389
|
+
2. Generate `context.md`:
|
|
390
|
+
- Pipeline type, task count, completed/failed/skipped
|
|
391
|
+
- Per-wave results with quality scores
|
|
392
|
+
- Checkpoint verdicts
|
|
393
|
+
- Files modified
|
|
394
|
+
- Discovery summary
|
|
395
|
+
- Next steps (if spec-only: suggest impl-only; if impl: suggest deploy)
|
|
396
|
+
3. Display completion report
|
|
397
|
+
|
|
398
|
+
</actions>
|
|
399
|
+
</state_machine>
|
|
400
|
+
|
|
401
|
+
<discovery_board>
|
|
402
|
+
|
|
403
|
+
| Type | Dedup Key | Data |
|
|
404
|
+
|------|-----------|------|
|
|
405
|
+
| research_finding | topic | {topic, evidence, implications} |
|
|
406
|
+
| spec_artifact | doc_type | {doc_type, path, summary, quality_score} |
|
|
407
|
+
| architecture_decision | subject | {subject, choice, rationale, alternatives[]} |
|
|
408
|
+
| implementation_note | module | {module, pattern, files[], notes} |
|
|
409
|
+
| test_result | suite | {suite, pass_rate, failures[], coverage} |
|
|
410
|
+
| review_finding | dimension | {dimension, severity, location, recommendation} |
|
|
411
|
+
| checkpoint_verdict | checkpoint_id | {id, score, checks[], verdict} |
|
|
412
|
+
|
|
413
|
+
Protocol: read before work, append-only, dedup by type+key.
|
|
414
|
+
</discovery_board>
|
|
415
|
+
|
|
416
|
+
<error_codes>
|
|
417
|
+
|
|
418
|
+
| Condition | Recovery |
|
|
419
|
+
|-----------|----------|
|
|
420
|
+
| Pipeline detection ambiguous | request_user_input for pipeline selection |
|
|
421
|
+
| RESEARCH-001 failed | Abort spec pipeline (no context for drafting) |
|
|
422
|
+
| DRAFT task failed | Skip subsequent DRAFTs, proceed to checkpoint |
|
|
423
|
+
| CHECKPOINT verdict: block | Pause for user (Revise/Override/Abort) |
|
|
424
|
+
| PLAN-001 failed | Abort impl pipeline |
|
|
425
|
+
| IMPL task failed | Cascade skip to TEST + REVIEW |
|
|
426
|
+
| Session not found (--continue) | Error with available sessions |
|
|
427
|
+
| Role file missing | Error with role registry |
|
|
428
|
+
| Quality score < 60 after revision | Escalate to user |
|
|
429
|
+
</error_codes>
|
|
430
|
+
|
|
431
|
+
<success_criteria>
|
|
432
|
+
- [ ] Pipeline selected and validated
|
|
433
|
+
- [ ] tasks.csv generated with correct wave assignments
|
|
434
|
+
- [ ] Each wave executed via spawn_agents_on_csv
|
|
435
|
+
- [ ] Agents read role.md for domain-specific logic
|
|
436
|
+
- [ ] Column separation rule maintained
|
|
437
|
+
- [ ] wave-N.csv and wave-N-results.csv deleted after merge
|
|
438
|
+
- [ ] Checkpoint waves pause for user approval (unless -y)
|
|
439
|
+
- [ ] Quality scores reported per task
|
|
440
|
+
- [ ] discoveries.ndjson append-only
|
|
441
|
+
- [ ] results.csv and context.md generated
|
|
442
|
+
- [ ] Session resumable via --continue
|
|
443
|
+
- [ ] Spec artifacts written to spec/ directory
|
|
444
|
+
- [ ] Plan artifacts written to plan/ directory
|
|
445
|
+
</success_criteria>
|