maestro-flow 0.3.9 → 0.3.11
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/agents/workflow-collab-planner.md +1 -1
- package/.claude/agents/workflow-executor.md +1 -1
- package/.claude/agents/workflow-plan-checker.md +1 -1
- package/.claude/agents/workflow-planner.md +1 -1
- package/.claude/commands/learn-decompose.md +176 -176
- package/.claude/commands/learn-follow.md +167 -167
- package/.claude/commands/learn-retro.md +1 -1
- package/.claude/commands/maestro-analyze.md +46 -3
- package/.claude/commands/maestro-coordinate.md +1 -3
- package/.claude/commands/maestro-execute.md +14 -0
- package/.claude/commands/maestro-plan.md +16 -0
- package/.claude/commands/manage-harvest.md +131 -131
- package/.claude/commands/manage-issue-discover.md +2 -2
- package/.claude/commands/manage-issue.md +5 -5
- package/.claude/commands/spec-add.md +67 -56
- package/.claude/commands/spec-load.md +66 -64
- package/.claude/commands/spec-setup.md +5 -9
- package/.codex/skills/learn-decompose/SKILL.md +119 -0
- package/.codex/skills/learn-follow/SKILL.md +83 -0
- package/.codex/skills/learn-investigate/SKILL.md +83 -0
- package/.codex/skills/learn-retro/SKILL.md +83 -0
- package/.codex/skills/learn-second-opinion/SKILL.md +86 -0
- package/.codex/skills/maestro/SKILL.md +335 -0
- package/.codex/skills/maestro-analyze/SKILL.md +84 -75
- package/.codex/skills/maestro-brainstorm/SKILL.md +452 -463
- package/.codex/skills/maestro-chain/SKILL.md +233 -0
- package/.codex/skills/maestro-coordinate/SKILL.md +167 -278
- package/.codex/skills/maestro-execute/SKILL.md +435 -438
- package/.codex/skills/maestro-fork/SKILL.md +68 -0
- package/.codex/skills/maestro-init/SKILL.md +171 -167
- package/.codex/skills/maestro-learn/SKILL.md +80 -0
- package/.codex/skills/maestro-link-coordinate/SKILL.md +224 -220
- package/.codex/skills/maestro-merge/SKILL.md +62 -0
- package/.codex/skills/maestro-milestone-audit/SKILL.md +108 -103
- package/.codex/skills/maestro-milestone-complete/SKILL.md +155 -149
- package/.codex/skills/maestro-milestone-release/SKILL.md +70 -0
- package/.codex/skills/maestro-overlay/SKILL.md +188 -185
- package/.codex/skills/maestro-plan/SKILL.md +66 -69
- package/.codex/skills/maestro-quick/SKILL.md +26 -23
- package/.codex/skills/maestro-roadmap/SKILL.md +65 -73
- package/.codex/skills/maestro-spec-generate/SKILL.md +66 -74
- package/.codex/skills/maestro-ui-design/SKILL.md +34 -31
- package/.codex/skills/maestro-verify/SKILL.md +556 -566
- package/.codex/skills/manage-codebase-rebuild/SKILL.md +397 -405
- package/.codex/skills/manage-codebase-refresh/SKILL.md +93 -82
- package/.codex/skills/manage-harvest/SKILL.md +82 -0
- package/.codex/skills/manage-issue/SKILL.md +80 -65
- package/.codex/skills/manage-issue-discover/SKILL.md +491 -503
- package/.codex/skills/manage-learn/SKILL.md +190 -186
- package/.codex/skills/manage-memory/SKILL.md +95 -72
- package/.codex/skills/manage-memory-capture/SKILL.md +99 -86
- package/.codex/skills/manage-status/SKILL.md +102 -89
- package/.codex/skills/quality-business-test/SKILL.md +228 -223
- package/.codex/skills/quality-debug/SKILL.md +54 -66
- package/.codex/skills/quality-integration-test/SKILL.md +532 -544
- package/.codex/skills/quality-refactor/SKILL.md +197 -191
- package/.codex/skills/quality-retrospective/SKILL.md +512 -505
- package/.codex/skills/quality-review/SKILL.md +93 -105
- package/.codex/skills/quality-sync/SKILL.md +101 -89
- package/.codex/skills/quality-test/SKILL.md +202 -198
- package/.codex/skills/quality-test-gen/SKILL.md +93 -104
- package/.codex/skills/spec-add/SKILL.md +58 -39
- package/.codex/skills/spec-load/SKILL.md +45 -40
- package/.codex/skills/spec-map/SKILL.md +180 -182
- package/.codex/skills/spec-setup/SKILL.md +94 -76
- package/.codex/skills/team-coordinate/SKILL.md +346 -357
- package/.codex/skills/team-executor/SKILL.md +70 -112
- package/.codex/skills/team-lifecycle-v4/SKILL.md +311 -299
- package/.codex/skills/team-quality-assurance/SKILL.md +234 -227
- package/.codex/skills/team-review/SKILL.md +232 -225
- package/.codex/skills/team-tech-debt/SKILL.md +78 -100
- package/.codex/skills/team-testing/SKILL.md +242 -235
- package/.codex/skills/wiki-connect/SKILL.md +75 -0
- package/.codex/skills/wiki-digest/SKILL.md +87 -0
- package/README.md +14 -11
- package/README.zh-CN.md +14 -11
- package/chains/issue-lifecycle.json +13 -13
- package/chains/singles/issue-analyze.json +3 -3
- package/chains/singles/issue-execute.json +3 -3
- package/chains/singles/issue-plan.json +3 -3
- package/dashboard/dist-server/dashboard/src/server/commander/commander-agent.js +2 -2
- package/dashboard/dist-server/dashboard/src/server/commander/commander-agent.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/coordinator/chain-map.js +3 -3
- package/dashboard/dist-server/dashboard/src/server/coordinator/chain-map.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/issues.js +34 -0
- package/dashboard/dist-server/dashboard/src/server/routes/issues.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/specs.d.ts +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/specs.js +75 -30
- package/dashboard/dist-server/dashboard/src/server/routes/specs.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/state/event-bus.d.ts +5 -0
- package/dashboard/dist-server/dashboard/src/server/state/event-bus.js +5 -0
- package/dashboard/dist-server/dashboard/src/server/state/event-bus.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/ws/handlers/execution-handler.js +2 -3
- package/dashboard/dist-server/dashboard/src/server/ws/handlers/execution-handler.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/shared/constants.js +5 -0
- package/dashboard/dist-server/dashboard/src/shared/constants.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/shared/issue-types.d.ts +5 -0
- package/dashboard/dist-server/dashboard/src/shared/issue-types.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/shared/normalize-task.d.ts +2 -0
- package/dashboard/dist-server/dashboard/src/shared/normalize-task.js +75 -0
- package/dashboard/dist-server/dashboard/src/shared/normalize-task.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/shared/team-types.d.ts +21 -0
- package/dashboard/dist-server/dashboard/src/shared/team-types.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/shared/types.d.ts +3 -2
- package/dashboard/dist-server/dashboard/src/shared/ws-protocol.d.ts +1 -1
- package/dashboard/dist-server/dashboard/src/shared/ws-protocol.js.map +1 -1
- package/dashboard/dist-server/src/hooks/constants.d.ts +92 -12
- package/dashboard/dist-server/src/hooks/constants.js +151 -16
- package/dashboard/dist-server/src/hooks/constants.js.map +1 -1
- package/dashboard/dist-server/src/types/index.d.ts +5 -0
- package/dist/src/commands/collab.d.ts +1 -34
- package/dist/src/commands/collab.d.ts.map +1 -1
- package/dist/src/commands/collab.js +8 -76
- package/dist/src/commands/collab.js.map +1 -1
- package/dist/src/commands/hooks.d.ts +5 -1
- package/dist/src/commands/hooks.d.ts.map +1 -1
- package/dist/src/commands/hooks.js +115 -10
- package/dist/src/commands/hooks.js.map +1 -1
- package/dist/src/commands/install-ui/InstallConfirm.d.ts +3 -1
- package/dist/src/commands/install-ui/InstallConfirm.d.ts.map +1 -1
- package/dist/src/commands/install-ui/InstallConfirm.js +3 -1
- package/dist/src/commands/install-ui/InstallConfirm.js.map +1 -1
- package/dist/src/commands/install-ui/InstallExecution.d.ts.map +1 -1
- package/dist/src/commands/install-ui/InstallExecution.js +5 -1
- package/dist/src/commands/install-ui/InstallExecution.js.map +1 -1
- package/dist/src/commands/install-ui/InstallFlow.d.ts.map +1 -1
- package/dist/src/commands/install-ui/InstallFlow.js +7 -3
- package/dist/src/commands/install-ui/InstallFlow.js.map +1 -1
- package/dist/src/commands/install-ui/StatuslineConfig.d.ts +6 -1
- package/dist/src/commands/install-ui/StatuslineConfig.d.ts.map +1 -1
- package/dist/src/commands/install-ui/StatuslineConfig.js +27 -5
- package/dist/src/commands/install-ui/StatuslineConfig.js.map +1 -1
- package/dist/src/commands/spec.d.ts.map +1 -1
- package/dist/src/commands/spec.js +7 -2
- package/dist/src/commands/spec.js.map +1 -1
- package/dist/src/hooks/__tests__/statusline-visual-test.d.ts +7 -0
- package/dist/src/hooks/__tests__/statusline-visual-test.d.ts.map +1 -0
- package/dist/src/hooks/__tests__/statusline-visual-test.js +236 -0
- package/dist/src/hooks/__tests__/statusline-visual-test.js.map +1 -0
- package/dist/src/hooks/constants.d.ts +92 -12
- package/dist/src/hooks/constants.d.ts.map +1 -1
- package/dist/src/hooks/constants.js +151 -16
- package/dist/src/hooks/constants.js.map +1 -1
- package/dist/src/hooks/guards/index.d.ts +2 -0
- package/dist/src/hooks/guards/index.d.ts.map +1 -1
- package/dist/src/hooks/guards/index.js +2 -0
- package/dist/src/hooks/guards/index.js.map +1 -1
- package/dist/src/hooks/guards/preflight-guard.d.ts +29 -0
- package/dist/src/hooks/guards/preflight-guard.d.ts.map +1 -0
- package/dist/src/hooks/guards/preflight-guard.js +95 -0
- package/dist/src/hooks/guards/preflight-guard.js.map +1 -0
- package/dist/src/hooks/guards/spec-validator.d.ts +25 -0
- package/dist/src/hooks/guards/spec-validator.d.ts.map +1 -0
- package/dist/src/hooks/guards/spec-validator.js +66 -0
- package/dist/src/hooks/guards/spec-validator.js.map +1 -0
- package/dist/src/hooks/index.d.ts +1 -0
- package/dist/src/hooks/index.d.ts.map +1 -1
- package/dist/src/hooks/index.js +1 -0
- package/dist/src/hooks/index.js.map +1 -1
- package/dist/src/hooks/keyword-spec-injector.d.ts +21 -0
- package/dist/src/hooks/keyword-spec-injector.d.ts.map +1 -0
- package/dist/src/hooks/keyword-spec-injector.js +96 -0
- package/dist/src/hooks/keyword-spec-injector.js.map +1 -0
- package/dist/src/hooks/plugins/spec-injection-plugin.d.ts +2 -1
- package/dist/src/hooks/plugins/spec-injection-plugin.d.ts.map +1 -1
- package/dist/src/hooks/plugins/spec-injection-plugin.js +21 -12
- package/dist/src/hooks/plugins/spec-injection-plugin.js.map +1 -1
- package/dist/src/hooks/preflight-core.d.ts +37 -0
- package/dist/src/hooks/preflight-core.d.ts.map +1 -0
- package/dist/src/hooks/preflight-core.js +86 -0
- package/dist/src/hooks/preflight-core.js.map +1 -0
- package/dist/src/hooks/spec-bridge.d.ts +40 -0
- package/dist/src/hooks/spec-bridge.d.ts.map +1 -0
- package/dist/src/hooks/spec-bridge.js +97 -0
- package/dist/src/hooks/spec-bridge.js.map +1 -0
- package/dist/src/hooks/spec-injector.d.ts.map +1 -1
- package/dist/src/hooks/spec-injector.js +18 -12
- package/dist/src/hooks/spec-injector.js.map +1 -1
- package/dist/src/hooks/statusline.d.ts +8 -17
- package/dist/src/hooks/statusline.d.ts.map +1 -1
- package/dist/src/hooks/statusline.js +269 -112
- package/dist/src/hooks/statusline.js.map +1 -1
- package/dist/src/i18n/locales/en.d.ts.map +1 -1
- package/dist/src/i18n/locales/en.js +5 -0
- package/dist/src/i18n/locales/en.js.map +1 -1
- package/dist/src/i18n/locales/zh.d.ts.map +1 -1
- package/dist/src/i18n/locales/zh.js +5 -0
- package/dist/src/i18n/locales/zh.js.map +1 -1
- package/dist/src/i18n/types.d.ts +5 -0
- package/dist/src/i18n/types.d.ts.map +1 -1
- package/dist/src/team/phase-orchestrator.d.ts +52 -0
- package/dist/src/team/phase-orchestrator.d.ts.map +1 -0
- package/dist/src/team/phase-orchestrator.js +165 -0
- package/dist/src/team/phase-orchestrator.js.map +1 -0
- package/dist/src/team/phase-types.d.ts +51 -0
- package/dist/src/team/phase-types.d.ts.map +1 -0
- package/dist/src/team/phase-types.js +41 -0
- package/dist/src/team/phase-types.js.map +1 -0
- package/dist/src/tools/collab-adapter.d.ts +17 -0
- package/dist/src/tools/collab-adapter.d.ts.map +1 -1
- package/dist/src/tools/collab-adapter.js +138 -0
- package/dist/src/tools/collab-adapter.js.map +1 -1
- package/dist/src/tools/index.d.ts.map +1 -1
- package/dist/src/tools/index.js +6 -0
- package/dist/src/tools/index.js.map +1 -1
- package/dist/src/tools/merge-validator.d.ts +24 -0
- package/dist/src/tools/merge-validator.d.ts.map +1 -0
- package/dist/src/tools/merge-validator.js +220 -0
- package/dist/src/tools/merge-validator.js.map +1 -0
- package/dist/src/tools/spec-entry-parser.d.ts +56 -0
- package/dist/src/tools/spec-entry-parser.d.ts.map +1 -0
- package/dist/src/tools/spec-entry-parser.js +196 -0
- package/dist/src/tools/spec-entry-parser.js.map +1 -0
- package/dist/src/tools/spec-init.d.ts.map +1 -1
- package/dist/src/tools/spec-init.js +66 -92
- package/dist/src/tools/spec-init.js.map +1 -1
- package/dist/src/tools/spec-keyword-index.d.ts +30 -0
- package/dist/src/tools/spec-keyword-index.d.ts.map +1 -0
- package/dist/src/tools/spec-keyword-index.js +101 -0
- package/dist/src/tools/spec-keyword-index.js.map +1 -0
- package/dist/src/tools/spec-loader.d.ts +3 -3
- package/dist/src/tools/spec-loader.d.ts.map +1 -1
- package/dist/src/tools/spec-loader.js +49 -23
- package/dist/src/tools/spec-loader.js.map +1 -1
- package/dist/src/tools/team-agents.d.ts +27 -0
- package/dist/src/tools/team-agents.d.ts.map +1 -0
- package/dist/src/tools/team-agents.js +362 -0
- package/dist/src/tools/team-agents.js.map +1 -0
- package/dist/src/tools/team-mailbox.d.ts +40 -0
- package/dist/src/tools/team-mailbox.d.ts.map +1 -0
- package/dist/src/tools/team-mailbox.js +384 -0
- package/dist/src/tools/team-mailbox.js.map +1 -0
- package/dist/src/tools/team-msg.d.ts +17 -8
- package/dist/src/tools/team-msg.d.ts.map +1 -1
- package/dist/src/tools/team-msg.js +110 -13
- package/dist/src/tools/team-msg.js.map +1 -1
- package/dist/src/tools/team-tasks-mcp.d.ts +27 -0
- package/dist/src/tools/team-tasks-mcp.d.ts.map +1 -0
- package/dist/src/tools/team-tasks-mcp.js +408 -0
- package/dist/src/tools/team-tasks-mcp.js.map +1 -0
- package/dist/src/types/index.d.ts +5 -0
- package/dist/src/types/index.d.ts.map +1 -1
- package/package.json +2 -1
- package/templates/cli/prompts/workflow-skill-conflict-patterns.txt +3 -3
- package/templates/cli/prompts/workflow-skill-lessons-learned.txt +3 -3
- package/templates/search-tools.md +1 -1
- package/workflows/analyze.md +816 -816
- package/workflows/brainstorm.md +471 -471
- package/workflows/cli-tools-usage.md +44 -27
- package/workflows/codebase-rebuild.md +332 -332
- package/workflows/codebase-refresh.md +240 -240
- package/workflows/delegate-usage.md +3 -3
- package/workflows/execute.md +1 -1
- package/workflows/harvest.md +420 -420
- package/workflows/integration-test.md +343 -343
- package/workflows/issue-analyze.md +6 -2
- package/workflows/issue-discover.md +414 -414
- package/workflows/issue-execute.md +6 -3
- package/workflows/issue-plan.md +5 -2
- package/workflows/maestro-coordinate.codex.md +281 -470
- package/workflows/maestro-coordinate.md +14 -14
- package/workflows/maestro-link-coordinate.md +2 -2
- package/workflows/maestro.codex.md +710 -0
- package/workflows/maestro.md +10 -11
- package/workflows/map.md +111 -111
- package/workflows/milestone-complete.md +176 -176
- package/workflows/plan.md +1 -1
- package/workflows/quick.md +497 -497
- package/workflows/refactor.md +300 -300
- package/workflows/retrospective.md +1 -1
- package/workflows/roadmap.md +335 -335
- package/workflows/spec-generate.md +640 -640
- package/workflows/specs-add.md +46 -81
- package/workflows/specs-load.md +15 -17
- package/workflows/specs-setup.md +40 -161
- package/.claude/commands/manage-issue-analyze.md +0 -62
- package/.claude/commands/manage-issue-execute.md +0 -73
- package/.claude/commands/manage-issue-plan.md +0 -62
- package/.codex/skills/manage-issue-analyze/SKILL.md +0 -207
- package/.codex/skills/manage-issue-execute/SKILL.md +0 -200
- package/.codex/skills/manage-issue-plan/SKILL.md +0 -186
|
@@ -1,544 +1,532 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: quality-integration-test
|
|
3
|
-
description: Self-iterating integration test cycle via CSV wave pipeline. Progressive L0-L3 layers in linear pipeline topology with reflection-driven adaptive strategy engine. Replaces quality-integration-test command.
|
|
4
|
-
argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"<phase> [--max-iterations N] [--target-coverage N]\""
|
|
5
|
-
allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
|
|
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
|
-
### Session Initialization
|
|
164
|
-
|
|
165
|
-
```javascript
|
|
166
|
-
const getUtc8ISOString = () => new Date(Date.now() + 8 * 60 * 60 * 1000).toISOString()
|
|
167
|
-
|
|
168
|
-
// Parse flags
|
|
169
|
-
const AUTO_YES = $ARGUMENTS.includes('--yes') || $ARGUMENTS.includes('-y')
|
|
170
|
-
const continueMode = $ARGUMENTS.includes('--continue')
|
|
171
|
-
const concurrencyMatch = $ARGUMENTS.match(/(?:--concurrency|-c)\s+(\d+)/)
|
|
172
|
-
const maxConcurrency = concurrencyMatch ? parseInt(concurrencyMatch[1]) : 4
|
|
173
|
-
|
|
174
|
-
// Parse integration-test-specific flags
|
|
175
|
-
const maxIterMatch = $ARGUMENTS.match(/--max-iterations\s+(\d+)/)
|
|
176
|
-
const maxIterations = maxIterMatch ? parseInt(maxIterMatch[1]) : 5
|
|
177
|
-
const coverageMatch = $ARGUMENTS.match(/--target-coverage\s+(\d+)/)
|
|
178
|
-
const targetCoverage = coverageMatch ? parseInt(coverageMatch[1]) : 95
|
|
179
|
-
|
|
180
|
-
// Clean phase text
|
|
181
|
-
const phaseArg = $ARGUMENTS
|
|
182
|
-
.replace(/--yes|-y|--continue|--concurrency\s+\d+|-c\s+\d+|--max-iterations\s+\d+|--target-coverage\s+\d+/g, '')
|
|
183
|
-
.trim()
|
|
184
|
-
|
|
185
|
-
const dateStr = getUtc8ISOString().substring(0, 10).replace(/-/g, '')
|
|
186
|
-
const sessionId = `integration-test-phase${phaseArg}-${dateStr}`
|
|
187
|
-
const sessionFolder = `.workflow/.csv-wave/${sessionId}`
|
|
188
|
-
|
|
189
|
-
Bash(`mkdir -p ${sessionFolder}`)
|
|
190
|
-
|
|
191
|
-
// Initialize state.json
|
|
192
|
-
const state = {
|
|
193
|
-
phase: phaseArg,
|
|
194
|
-
started_at: getUtc8ISOString(),
|
|
195
|
-
current_iteration: 0,
|
|
196
|
-
max_iterations: maxIterations,
|
|
197
|
-
strategy: "conservative",
|
|
198
|
-
current_layer: "L0",
|
|
199
|
-
pass_rates: [],
|
|
200
|
-
convergence_threshold: targetCoverage,
|
|
201
|
-
status: "running"
|
|
202
|
-
}
|
|
203
|
-
Write(`${sessionFolder}/state.json`, JSON.stringify(state, null, 2))
|
|
204
|
-
|
|
205
|
-
// Initialize reflection-log.md
|
|
206
|
-
Write(`${sessionFolder}/reflection-log.md`,
|
|
207
|
-
`# Integration Test Reflection Log\nPhase: ${phaseArg}\nStarted: ${getUtc8ISOString()}\n\n## Iterations\n`)
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
**
|
|
215
|
-
|
|
216
|
-
**
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
-
|
|
222
|
-
-
|
|
223
|
-
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
|
238
|
-
|
|
239
|
-
|
|
|
240
|
-
|
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
###
|
|
358
|
-
- {
|
|
359
|
-
|
|
360
|
-
###
|
|
361
|
-
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
```
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
#### Step
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
"
|
|
406
|
-
"
|
|
407
|
-
"
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
"
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
##
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
|
439
|
-
|
|
440
|
-
|
|
|
441
|
-
|
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
##
|
|
451
|
-
{
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
|
484
|
-
|
|
485
|
-
| `
|
|
486
|
-
| `
|
|
487
|
-
| `
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
|
516
|
-
|
|
517
|
-
|
|
|
518
|
-
|
|
|
519
|
-
|
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
1. **Start Immediately**: First action is session initialization, then Phase 1
|
|
535
|
-
2. **Wave Order is Sacred**: Never execute wave N+1 before wave N completes and results are merged
|
|
536
|
-
3. **Progressive Layers**: L0 → L1 → L2 → L3 — each layer gates the next
|
|
537
|
-
4. **CSV is Source of Truth**: Master tasks.csv holds all state
|
|
538
|
-
5. **Context Propagation**: prev_context built from master CSV, not from memory
|
|
539
|
-
6. **Discovery Board is Append-Only**: Never clear, modify, or recreate discoveries.ndjson
|
|
540
|
-
7. **Self-Iterating**: Loop until convergence or max iterations — do not stop after one pass
|
|
541
|
-
8. **Strategy is Adaptive**: Apply the strategy engine rules for transitions, never stay on a failing strategy
|
|
542
|
-
9. **Reflect Before Adjusting**: Always log reflection before changing strategy
|
|
543
|
-
10. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
|
544
|
-
11. **DO NOT STOP**: Continuous execution until convergence or max iterations reached
|
|
1
|
+
---
|
|
2
|
+
name: quality-integration-test
|
|
3
|
+
description: Self-iterating integration test cycle via CSV wave pipeline. Progressive L0-L3 layers in linear pipeline topology with reflection-driven adaptive strategy engine. Replaces quality-integration-test command.
|
|
4
|
+
argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"<phase> [--max-iterations N] [--target-coverage N]\""
|
|
5
|
+
allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<purpose>
|
|
9
|
+
Linear pipeline test execution using `spawn_agents_on_csv`. Progressive L0 -> L1 -> L2 -> L3 layers where each layer depends on the previous passing. Self-iterating 6-phase cycle (Explore -> Design -> Develop -> Test -> Reflect -> Adjust) with adaptive strategy engine.
|
|
10
|
+
|
|
11
|
+
**Core workflow**: Explore Codebase -> Design Test Plan -> Progressive Layer Execution -> Reflect -> Adjust Strategy -> Iterate
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
+-------------------------------------------------------------------------+
|
|
15
|
+
| INTEGRATION TEST CSV WAVE WORKFLOW |
|
|
16
|
+
+-------------------------------------------------------------------------+
|
|
17
|
+
| |
|
|
18
|
+
| Phase 1: Exploration -> CSV |
|
|
19
|
+
| +-- Resolve phase directory from arguments |
|
|
20
|
+
| +-- Explore codebase for integration points |
|
|
21
|
+
| +-- Discover test infrastructure and existing tests |
|
|
22
|
+
| +-- Load pre-generated tests from quality-test-gen |
|
|
23
|
+
| +-- Design L0-L3 test plan |
|
|
24
|
+
| +-- Generate tasks.csv with rows per layer + module |
|
|
25
|
+
| +-- User validates test plan (skip if -y) |
|
|
26
|
+
| |
|
|
27
|
+
| Phase 2: Wave Execution Engine (Linear Pipeline) |
|
|
28
|
+
| +-- Wave 1: L0 Static Analysis |
|
|
29
|
+
| | +-- Type checking (tsc --noEmit) |
|
|
30
|
+
| | +-- Linting (eslint / ruff) |
|
|
31
|
+
| | +-- Results: pass/fail per check |
|
|
32
|
+
| +-- Wave 2: L1 Unit Tests (parallel per module) |
|
|
33
|
+
| | +-- Each module agent runs unit tests independently |
|
|
34
|
+
| | +-- Discoveries shared (test commands, fixtures) |
|
|
35
|
+
| | +-- Results: tests_passed + tests_failed per module |
|
|
36
|
+
| +-- Wave 3: L2 Integration Tests |
|
|
37
|
+
| | +-- Cross-module + API + DB tests |
|
|
38
|
+
| | +-- Uses L1 context for test commands and patterns |
|
|
39
|
+
| | +-- Results: tests_passed + tests_failed + coverage |
|
|
40
|
+
| +-- Wave 4: L3 E2E Tests |
|
|
41
|
+
| | +-- Full user flow tests |
|
|
42
|
+
| | +-- Uses L2 context for integration points |
|
|
43
|
+
| | +-- Results: tests_passed + tests_failed + coverage |
|
|
44
|
+
| +-- discoveries.ndjson shared across all waves (append-only) |
|
|
45
|
+
| |
|
|
46
|
+
| Phase 3: Reflect + Iterate |
|
|
47
|
+
| +-- Calculate overall pass rate |
|
|
48
|
+
| +-- Reflect on results (what worked, what failed, patterns) |
|
|
49
|
+
| +-- Adjust strategy (conservative/aggressive/surgical/reflective) |
|
|
50
|
+
| +-- If pass_rate < target: iterate (back to Phase 2) |
|
|
51
|
+
| +-- If pass_rate >= target OR max_iterations: finalize |
|
|
52
|
+
| +-- Export results.csv + summary.json |
|
|
53
|
+
| +-- Generate context.md + reflection-log.md |
|
|
54
|
+
| +-- Display summary with next steps |
|
|
55
|
+
| |
|
|
56
|
+
+-------------------------------------------------------------------------+
|
|
57
|
+
```
|
|
58
|
+
</purpose>
|
|
59
|
+
|
|
60
|
+
<context>
|
|
61
|
+
```bash
|
|
62
|
+
$quality-integration-test "3"
|
|
63
|
+
$quality-integration-test -c 4 "3 --max-iterations 8"
|
|
64
|
+
$quality-integration-test -y "3 --target-coverage 90"
|
|
65
|
+
$quality-integration-test --continue "integration-test-phase3-20260318"
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**Flags**:
|
|
69
|
+
- `-y, --yes`: Skip all confirmations (auto mode)
|
|
70
|
+
- `-c, --concurrency N`: Max concurrent agents within each wave (default: 4)
|
|
71
|
+
- `--continue`: Resume existing session
|
|
72
|
+
|
|
73
|
+
When `--yes` or `-y`: Auto-confirm test plan, skip interactive validation, use defaults for layer detection.
|
|
74
|
+
|
|
75
|
+
**Output Directory**: `.workflow/.csv-wave/{session-id}/`
|
|
76
|
+
**Core Output**: `tasks.csv` (master state) + `results.csv` (final) + `discoveries.ndjson` (shared exploration) + `context.md` (human-readable report) + `summary.json` (structured output for downstream)
|
|
77
|
+
</context>
|
|
78
|
+
|
|
79
|
+
<csv_schema>
|
|
80
|
+
### tasks.csv (Master State)
|
|
81
|
+
|
|
82
|
+
```csv
|
|
83
|
+
id,title,description,test_layer,test_scope,deps,context_from,wave,status,findings,tests_passed,tests_failed,coverage,error
|
|
84
|
+
"1","L0 Type Check","Run TypeScript type checking with tsc --noEmit. Report all type errors with file:line references.","L0-static","src/**/*.ts","","","1","","","","","",""
|
|
85
|
+
"2","L0 Lint","Run ESLint on all source files. Report errors and warnings with file:line references.","L0-static","src/**/*.ts","","","1","","","","","",""
|
|
86
|
+
"3","L1 Auth Module","Run unit tests for auth module: token verification, session management, password hashing. Isolated tests with mocked dependencies.","L1-unit","src/auth/**/*.ts","1;2","1;2","2","","","","","",""
|
|
87
|
+
"4","L1 API Module","Run unit tests for API module: route handlers, middleware, validators. Isolated tests with mocked DB.","L1-unit","src/api/**/*.ts","1;2","1;2","2","","","","","",""
|
|
88
|
+
"5","L1 Utils Module","Run unit tests for utility functions: validation, formatting, helpers. Pure function tests.","L1-unit","src/utils/**/*.ts","1;2","1;2","2","","","","","",""
|
|
89
|
+
"6","L2 API Integration","Run integration tests: API endpoints with real middleware chain, DB fixtures, cross-module data flow.","L2-integration","src/api/**/*.ts;src/auth/**/*.ts","3;4;5","3;4;5","3","","","","","",""
|
|
90
|
+
"7","L2 DB Integration","Run integration tests: database queries, migrations, transaction handling with test DB.","L2-integration","src/db/**/*.ts","3;4;5","3;4;5","3","","","","","",""
|
|
91
|
+
"8","L3 User Flows","Run E2E tests: login flow, CRUD operations, error handling. Full browser/process execution.","L3-e2e","src/**/*.ts","6;7","6;7","4","","","","","",""
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**Columns**:
|
|
95
|
+
|
|
96
|
+
| Column | Phase | Description |
|
|
97
|
+
|--------|-------|-------------|
|
|
98
|
+
| `id` | Input | Unique task identifier (string) |
|
|
99
|
+
| `title` | Input | Short task title |
|
|
100
|
+
| `description` | Input | Detailed test execution instructions for this layer/scope |
|
|
101
|
+
| `test_layer` | Input | Test layer: L0-static/L1-unit/L2-integration/L3-e2e |
|
|
102
|
+
| `test_scope` | Input | Semicolon-separated file/module globs to test |
|
|
103
|
+
| `deps` | Input | Semicolon-separated dependency task IDs (previous layer tasks) |
|
|
104
|
+
| `context_from` | Input | Semicolon-separated task IDs whose findings this task needs |
|
|
105
|
+
| `wave` | Computed | Wave number: 1=L0, 2=L1, 3=L2, 4=L3 |
|
|
106
|
+
| `status` | Output | `pending` -> `completed` / `failed` / `skipped` |
|
|
107
|
+
| `findings` | Output | Key findings summary: failures, patterns, coverage notes (max 500 chars) |
|
|
108
|
+
| `tests_passed` | Output | Count of passing tests |
|
|
109
|
+
| `tests_failed` | Output | Count of failing tests |
|
|
110
|
+
| `coverage` | Output | Coverage percentage for this scope (e.g., `87.5%`) |
|
|
111
|
+
| `error` | Output | Error message if failed |
|
|
112
|
+
|
|
113
|
+
### Per-Wave CSV (Temporary)
|
|
114
|
+
|
|
115
|
+
Each wave generates `wave-{N}.csv` with extra `prev_context` column populated from predecessor findings.
|
|
116
|
+
|
|
117
|
+
### Output Artifacts
|
|
118
|
+
|
|
119
|
+
| File | Purpose | Lifecycle |
|
|
120
|
+
|------|---------|-----------|
|
|
121
|
+
| `tasks.csv` | Master state -- all tasks with status/findings | Updated after each wave |
|
|
122
|
+
| `wave-{N}.csv` | Per-wave input (temporary) | Created before wave, deleted after |
|
|
123
|
+
| `results.csv` | Final export of all task results | Created in Phase 3 |
|
|
124
|
+
| `discoveries.ndjson` | Shared exploration board | Append-only, carries across waves |
|
|
125
|
+
| `context.md` | Human-readable integration test report | Created in Phase 3 |
|
|
126
|
+
| `summary.json` | Structured output for downstream commands | Created in Phase 3 |
|
|
127
|
+
| `reflection-log.md` | Per-iteration reflection history | Append-only across iterations |
|
|
128
|
+
|
|
129
|
+
### Session Structure
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
.workflow/.csv-wave/integration-test-{phase}-{date}/
|
|
133
|
+
+-- tasks.csv
|
|
134
|
+
+-- results.csv
|
|
135
|
+
+-- discoveries.ndjson
|
|
136
|
+
+-- context.md
|
|
137
|
+
+-- summary.json
|
|
138
|
+
+-- reflection-log.md
|
|
139
|
+
+-- state.json
|
|
140
|
+
+-- iteration-{N}/
|
|
141
|
+
| +-- wave-{N}.csv (temporary)
|
|
142
|
+
| +-- test-results.json
|
|
143
|
+
+-- wave-{N}.csv (temporary)
|
|
144
|
+
```
|
|
145
|
+
</csv_schema>
|
|
146
|
+
|
|
147
|
+
<invariants>
|
|
148
|
+
1. **Start Immediately**: First action is session initialization, then Phase 1
|
|
149
|
+
2. **Wave Order is Sacred**: Never execute wave N+1 before wave N completes and results are merged
|
|
150
|
+
3. **Progressive Layers**: L0 -> L1 -> L2 -> L3 -- each layer gates the next
|
|
151
|
+
4. **CSV is Source of Truth**: Master tasks.csv holds all state
|
|
152
|
+
5. **Context Propagation**: prev_context built from master CSV, not from memory
|
|
153
|
+
6. **Discovery Board is Append-Only**: Never clear, modify, or recreate discoveries.ndjson
|
|
154
|
+
7. **Self-Iterating**: Loop until convergence or max iterations -- do not stop after one pass
|
|
155
|
+
8. **Strategy is Adaptive**: Apply the strategy engine rules for transitions, never stay on a failing strategy
|
|
156
|
+
9. **Reflect Before Adjusting**: Always log reflection before changing strategy
|
|
157
|
+
10. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
|
|
158
|
+
11. **DO NOT STOP**: Continuous execution until convergence or max iterations reached
|
|
159
|
+
</invariants>
|
|
160
|
+
|
|
161
|
+
<execution>
|
|
162
|
+
|
|
163
|
+
### Session Initialization
|
|
164
|
+
|
|
165
|
+
```javascript
|
|
166
|
+
const getUtc8ISOString = () => new Date(Date.now() + 8 * 60 * 60 * 1000).toISOString()
|
|
167
|
+
|
|
168
|
+
// Parse flags
|
|
169
|
+
const AUTO_YES = $ARGUMENTS.includes('--yes') || $ARGUMENTS.includes('-y')
|
|
170
|
+
const continueMode = $ARGUMENTS.includes('--continue')
|
|
171
|
+
const concurrencyMatch = $ARGUMENTS.match(/(?:--concurrency|-c)\s+(\d+)/)
|
|
172
|
+
const maxConcurrency = concurrencyMatch ? parseInt(concurrencyMatch[1]) : 4
|
|
173
|
+
|
|
174
|
+
// Parse integration-test-specific flags
|
|
175
|
+
const maxIterMatch = $ARGUMENTS.match(/--max-iterations\s+(\d+)/)
|
|
176
|
+
const maxIterations = maxIterMatch ? parseInt(maxIterMatch[1]) : 5
|
|
177
|
+
const coverageMatch = $ARGUMENTS.match(/--target-coverage\s+(\d+)/)
|
|
178
|
+
const targetCoverage = coverageMatch ? parseInt(coverageMatch[1]) : 95
|
|
179
|
+
|
|
180
|
+
// Clean phase text
|
|
181
|
+
const phaseArg = $ARGUMENTS
|
|
182
|
+
.replace(/--yes|-y|--continue|--concurrency\s+\d+|-c\s+\d+|--max-iterations\s+\d+|--target-coverage\s+\d+/g, '')
|
|
183
|
+
.trim()
|
|
184
|
+
|
|
185
|
+
const dateStr = getUtc8ISOString().substring(0, 10).replace(/-/g, '')
|
|
186
|
+
const sessionId = `integration-test-phase${phaseArg}-${dateStr}`
|
|
187
|
+
const sessionFolder = `.workflow/.csv-wave/${sessionId}`
|
|
188
|
+
|
|
189
|
+
Bash(`mkdir -p ${sessionFolder}`)
|
|
190
|
+
|
|
191
|
+
// Initialize state.json
|
|
192
|
+
const state = {
|
|
193
|
+
phase: phaseArg,
|
|
194
|
+
started_at: getUtc8ISOString(),
|
|
195
|
+
current_iteration: 0,
|
|
196
|
+
max_iterations: maxIterations,
|
|
197
|
+
strategy: "conservative",
|
|
198
|
+
current_layer: "L0",
|
|
199
|
+
pass_rates: [],
|
|
200
|
+
convergence_threshold: targetCoverage,
|
|
201
|
+
status: "running"
|
|
202
|
+
}
|
|
203
|
+
Write(`${sessionFolder}/state.json`, JSON.stringify(state, null, 2))
|
|
204
|
+
|
|
205
|
+
// Initialize reflection-log.md
|
|
206
|
+
Write(`${sessionFolder}/reflection-log.md`,
|
|
207
|
+
`# Integration Test Reflection Log\nPhase: ${phaseArg}\nStarted: ${getUtc8ISOString()}\n\n## Iterations\n`)
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Phase 1: Exploration -> CSV
|
|
211
|
+
|
|
212
|
+
**Objective**: Explore codebase, discover integration points, design L0-L3 test plan, generate tasks.csv.
|
|
213
|
+
|
|
214
|
+
**Decomposition Rules**:
|
|
215
|
+
|
|
216
|
+
1. **Phase resolution**: Resolve `{phaseArg}` to `.workflow/phases/{NN}-{slug}/`
|
|
217
|
+
|
|
218
|
+
2. **Codebase exploration**:
|
|
219
|
+
- Cross-module imports and dependencies
|
|
220
|
+
- API endpoints and route definitions
|
|
221
|
+
- Database interactions and queries
|
|
222
|
+
- External service integrations
|
|
223
|
+
- Event flows and message passing
|
|
224
|
+
|
|
225
|
+
3. **Test infrastructure discovery**:
|
|
226
|
+
- Detect frameworks (jest/vitest/pytest, playwright/cypress)
|
|
227
|
+
- Find existing integration and E2E tests
|
|
228
|
+
- Identify test utilities, fixtures, DB seed scripts
|
|
229
|
+
|
|
230
|
+
4. **Pre-generated test loading**:
|
|
231
|
+
Check `{phase_dir}/.tests/test-gen-report.json` for tests from `quality-test-gen`. Merge integration/e2e tests into plan (execute but don't re-generate).
|
|
232
|
+
|
|
233
|
+
5. **Layer design**:
|
|
234
|
+
|
|
235
|
+
| Layer | Wave | Tasks | Content |
|
|
236
|
+
|-------|------|-------|---------|
|
|
237
|
+
| L0 | 1 | 1-2 | Type check + lint commands |
|
|
238
|
+
| L1 | 2 | 1 per module | Unit tests per discovered module (parallel) |
|
|
239
|
+
| L2 | 3 | 1-3 | Integration tests (API, DB, cross-module) |
|
|
240
|
+
| L3 | 4 | 1-2 | E2E tests (user flows) |
|
|
241
|
+
|
|
242
|
+
6. **Dependency wiring**: L1 depends on L0, L2 depends on L1, L3 depends on L2.
|
|
243
|
+
|
|
244
|
+
7. **CSV generation**: Rows for all layers with correct wave assignments and deps.
|
|
245
|
+
|
|
246
|
+
**User validation**: Display layer breakdown with test counts (skip if AUTO_YES).
|
|
247
|
+
|
|
248
|
+
### Phase 2: Wave Execution Engine
|
|
249
|
+
|
|
250
|
+
**Objective**: Execute test layers wave-by-wave via spawn_agents_on_csv. Progressive -- each layer requires previous to pass.
|
|
251
|
+
|
|
252
|
+
#### Wave 1: L0 Static Analysis
|
|
253
|
+
|
|
254
|
+
1. Read master `tasks.csv`
|
|
255
|
+
2. Filter rows where `wave == 1` AND `status == pending`
|
|
256
|
+
3. No prev_context needed (first wave)
|
|
257
|
+
4. Write `wave-1.csv`
|
|
258
|
+
5. Execute:
|
|
259
|
+
|
|
260
|
+
```javascript
|
|
261
|
+
spawn_agents_on_csv({
|
|
262
|
+
csv_path: `${sessionFolder}/wave-1.csv`,
|
|
263
|
+
id_column: "id",
|
|
264
|
+
instruction: buildL0Instruction(sessionFolder),
|
|
265
|
+
max_concurrency: maxConcurrency,
|
|
266
|
+
max_runtime_seconds: 300,
|
|
267
|
+
output_csv_path: `${sessionFolder}/wave-1-results.csv`,
|
|
268
|
+
output_schema: {
|
|
269
|
+
type: "object",
|
|
270
|
+
properties: {
|
|
271
|
+
id: { type: "string" },
|
|
272
|
+
status: { type: "string", enum: ["completed", "failed"] },
|
|
273
|
+
findings: { type: "string" },
|
|
274
|
+
tests_passed: { type: "string" },
|
|
275
|
+
tests_failed: { type: "string" },
|
|
276
|
+
coverage: { type: "string" },
|
|
277
|
+
error: { type: "string" }
|
|
278
|
+
},
|
|
279
|
+
required: ["id", "status", "findings"]
|
|
280
|
+
}
|
|
281
|
+
})
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
6. Read `wave-1-results.csv`, merge into master `tasks.csv`
|
|
285
|
+
7. Delete `wave-1.csv`
|
|
286
|
+
8. **Gate check**: If all L0 tasks failed, skip remaining waves for this iteration
|
|
287
|
+
|
|
288
|
+
#### Wave 2: L1 Unit Tests (Parallel per Module)
|
|
289
|
+
|
|
290
|
+
1. Read master `tasks.csv`
|
|
291
|
+
2. Filter rows where `wave == 2` AND `status == pending`
|
|
292
|
+
3. Check deps -- all L0 tasks must be completed (not failed)
|
|
293
|
+
4. Build `prev_context` from L0 findings:
|
|
294
|
+
```
|
|
295
|
+
[Task 1: L0 Type Check] Clean -- 0 type errors
|
|
296
|
+
[Task 2: L0 Lint] 3 warnings in auth module (non-blocking)
|
|
297
|
+
```
|
|
298
|
+
5. Write `wave-2.csv` with `prev_context` column
|
|
299
|
+
6. Execute `spawn_agents_on_csv` for L1 agents (parallel per module)
|
|
300
|
+
7. Merge results into master `tasks.csv`
|
|
301
|
+
8. Delete `wave-2.csv`
|
|
302
|
+
9. **Gate check**: If all L1 tasks failed, skip L2 and L3
|
|
303
|
+
|
|
304
|
+
#### Wave 3: L2 Integration Tests
|
|
305
|
+
|
|
306
|
+
1. Read master `tasks.csv`
|
|
307
|
+
2. Filter rows where `wave == 3` AND `status == pending`
|
|
308
|
+
3. Build `prev_context` from L1 findings (test commands used, failures found, coverage gaps)
|
|
309
|
+
4. Write `wave-3.csv` with `prev_context`
|
|
310
|
+
5. Execute `spawn_agents_on_csv` for L2 agents
|
|
311
|
+
6. Merge results, delete temp CSV
|
|
312
|
+
7. **Gate check**: If all L2 tasks failed, skip L3
|
|
313
|
+
|
|
314
|
+
#### Wave 4: L3 E2E Tests
|
|
315
|
+
|
|
316
|
+
1. Read master `tasks.csv`
|
|
317
|
+
2. Filter rows where `wave == 4` AND `status == pending`
|
|
318
|
+
3. Build `prev_context` from L2 findings (integration points tested, coverage levels)
|
|
319
|
+
4. Write `wave-4.csv` with `prev_context`
|
|
320
|
+
5. Execute `spawn_agents_on_csv` for L3 agents
|
|
321
|
+
6. Merge results, delete temp CSV
|
|
322
|
+
|
|
323
|
+
### Phase 3: Reflect + Iterate
|
|
324
|
+
|
|
325
|
+
**Objective**: Evaluate results, reflect, adjust strategy, iterate or finalize.
|
|
326
|
+
|
|
327
|
+
#### Step 3a: Calculate Pass Rate
|
|
328
|
+
|
|
329
|
+
Aggregate across all layers:
|
|
330
|
+
```
|
|
331
|
+
overall_pass_rate = total_passed / (total_passed + total_failed) * 100
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
Record in `state.json.pass_rates[]`.
|
|
335
|
+
|
|
336
|
+
#### Step 3b: Reflect
|
|
337
|
+
|
|
338
|
+
Analyze iteration results:
|
|
339
|
+
- Which tests failed and why?
|
|
340
|
+
- Is pass rate improving, plateauing, or regressing?
|
|
341
|
+
- Are failures clustered in one layer/module or spread out?
|
|
342
|
+
- Is the current strategy working?
|
|
343
|
+
|
|
344
|
+
Append to `reflection-log.md`:
|
|
345
|
+
```markdown
|
|
346
|
+
## Iteration {N}
|
|
347
|
+
Strategy: {strategy_name}
|
|
348
|
+
Pass rate: {rate}% (previous: {prev_rate}%)
|
|
349
|
+
Delta: {+/-}%
|
|
350
|
+
|
|
351
|
+
### What worked
|
|
352
|
+
- {observation}
|
|
353
|
+
|
|
354
|
+
### What failed
|
|
355
|
+
- {test}: {reason}
|
|
356
|
+
|
|
357
|
+
### Pattern detected
|
|
358
|
+
- {pattern, e.g., "all failures in auth module"}
|
|
359
|
+
|
|
360
|
+
### Strategy assessment
|
|
361
|
+
- Current strategy: {effective|ineffective|partially_effective}
|
|
362
|
+
- Recommendation: {keep|switch_to_X}
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
#### Step 3c: Adjust Strategy (Adaptive Strategy Engine)
|
|
366
|
+
|
|
367
|
+
| Condition | Strategy | Behavior |
|
|
368
|
+
|-----------|----------|----------|
|
|
369
|
+
| Iteration 1-2 | Conservative | Fix obvious failures, don't refactor |
|
|
370
|
+
| Pass rate >80% AND failures similar to previous | Aggressive | Batch-fix related failures together |
|
|
371
|
+
| New regressions appeared | Surgical | Revert last changes, fix regression only |
|
|
372
|
+
| Stuck 3+ iterations (rate not improving) | Reflective | Step back, re-analyze root cause pattern |
|
|
373
|
+
|
|
374
|
+
**Strategy transitions**:
|
|
375
|
+
```
|
|
376
|
+
Conservative -> (pass rate >80%) -> Aggressive
|
|
377
|
+
Aggressive -> (regression) -> Surgical
|
|
378
|
+
Surgical -> (regression fixed) -> Aggressive
|
|
379
|
+
Any -> (stuck 3+ iters) -> Reflective
|
|
380
|
+
Reflective -> (new insight) -> Conservative (restart approach)
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
Update `state.json` with new strategy and iteration count.
|
|
384
|
+
|
|
385
|
+
#### Step 3d: Convergence Check
|
|
386
|
+
|
|
387
|
+
- If `overall_pass_rate >= target_coverage`: **CONVERGED** -> finalize
|
|
388
|
+
- If `iteration >= max_iterations`: **MAX_ITER_REACHED** -> finalize
|
|
389
|
+
- Otherwise: **ITERATE** -> reset pending tasks for failing layers, go back to Phase 2
|
|
390
|
+
|
|
391
|
+
#### Step 3e: Finalize
|
|
392
|
+
|
|
393
|
+
1. Read final master `tasks.csv`
|
|
394
|
+
2. Export as `results.csv`
|
|
395
|
+
3. Build `summary.json`:
|
|
396
|
+
|
|
397
|
+
```json
|
|
398
|
+
{
|
|
399
|
+
"phase": "<phase>",
|
|
400
|
+
"completed_at": "<ISO>",
|
|
401
|
+
"session_id": "<session-id>",
|
|
402
|
+
"iterations": 3,
|
|
403
|
+
"final_pass_rate": 97.5,
|
|
404
|
+
"converged": true,
|
|
405
|
+
"convergence_threshold": 95,
|
|
406
|
+
"strategy_history": ["conservative", "conservative", "aggressive"],
|
|
407
|
+
"layers": {
|
|
408
|
+
"L0": { "status": "pass" },
|
|
409
|
+
"L1": { "total": 15, "passed": 15, "failed": 0, "pass_rate": 100.0 },
|
|
410
|
+
"L2": { "total": 8, "passed": 7, "failed": 1, "pass_rate": 87.5 },
|
|
411
|
+
"L3": { "total": 4, "passed": 4, "failed": 0, "pass_rate": 100.0 }
|
|
412
|
+
},
|
|
413
|
+
"bugs_discovered": [],
|
|
414
|
+
"regressions_fixed": []
|
|
415
|
+
}
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
4. Generate `context.md`:
|
|
419
|
+
|
|
420
|
+
```markdown
|
|
421
|
+
# Integration Test Report -- Phase {phase}
|
|
422
|
+
|
|
423
|
+
## Summary
|
|
424
|
+
- Iterations: {N}/{max_iter}
|
|
425
|
+
- Converged: {yes/no} (threshold: {threshold}%)
|
|
426
|
+
- Final pass rate: {rate}%
|
|
427
|
+
- Strategy: {final_strategy} (transitioned {N} times)
|
|
428
|
+
|
|
429
|
+
## Layer Results
|
|
430
|
+
| Layer | Status | Passed | Failed | Pass Rate | Coverage |
|
|
431
|
+
|-------|--------|--------|--------|-----------|----------|
|
|
432
|
+
| L0 Static | {pass/fail} | -- | -- | -- | -- |
|
|
433
|
+
| L1 Unit | {status} | {P} | {F} | {rate}% | {cov}% |
|
|
434
|
+
| L2 Integration | {status} | {P} | {F} | {rate}% | {cov}% |
|
|
435
|
+
| L3 E2E | {status} | {P} | {F} | {rate}% | {cov}% |
|
|
436
|
+
|
|
437
|
+
## Iteration History
|
|
438
|
+
| Iter | Strategy | Pass Rate | Delta | Action |
|
|
439
|
+
|------|----------|-----------|-------|--------|
|
|
440
|
+
| 1 | conservative | 72.0% | -- | fixed 3 type errors |
|
|
441
|
+
| 2 | conservative | 85.5% | +13.5% | fixed auth test fixtures |
|
|
442
|
+
| 3 | aggressive | 97.5% | +12.0% | batch-fixed API tests |
|
|
443
|
+
|
|
444
|
+
## Reflection Summary
|
|
445
|
+
{key insights from reflection-log.md}
|
|
446
|
+
|
|
447
|
+
## Bugs Discovered
|
|
448
|
+
{list of bugs found during testing}
|
|
449
|
+
|
|
450
|
+
## Next Steps
|
|
451
|
+
{suggested_next_command}
|
|
452
|
+
```
|
|
453
|
+
|
|
454
|
+
5. Copy `summary.json` to phase `.tests/integration/` directory.
|
|
455
|
+
|
|
456
|
+
6. Update `index.json` with integration test status.
|
|
457
|
+
|
|
458
|
+
7. Display summary.
|
|
459
|
+
|
|
460
|
+
**Next step routing**:
|
|
461
|
+
|
|
462
|
+
| Result | Suggestion |
|
|
463
|
+
|--------|------------|
|
|
464
|
+
| Converged (>=target%) | `maestro-verify {phase}` to update validation |
|
|
465
|
+
| Max iter, >80% | `quality-test {phase}` for manual UAT on remaining gaps |
|
|
466
|
+
| Max iter, <80% | `quality-debug` for deep investigation |
|
|
467
|
+
| Bugs discovered | `maestro-plan {phase} --gaps` to plan fixes |
|
|
468
|
+
|
|
469
|
+
### Shared Discovery Board Protocol
|
|
470
|
+
|
|
471
|
+
#### Standard Discovery Types
|
|
472
|
+
|
|
473
|
+
| Type | Dedup Key | Data Schema | Description |
|
|
474
|
+
|------|-----------|-------------|-------------|
|
|
475
|
+
| `code_pattern` | `data.name` | `{name, file, description}` | Reusable code pattern found |
|
|
476
|
+
| `integration_point` | `data.file` | `{file, description, exports[]}` | Module connection point |
|
|
477
|
+
| `convention` | singleton | `{naming, imports, formatting}` | Project code conventions |
|
|
478
|
+
| `blocker` | `data.issue` | `{issue, severity, impact}` | Blocking issue found |
|
|
479
|
+
| `tech_stack` | singleton | `{framework, language, tools[]}` | Technology stack info |
|
|
480
|
+
|
|
481
|
+
#### Domain Discovery Types
|
|
482
|
+
|
|
483
|
+
| Type | Dedup Key | Data Schema | Description |
|
|
484
|
+
|------|-----------|-------------|-------------|
|
|
485
|
+
| `test_command` | `data.layer` | `{layer, command, flags, cwd}` | Working test command for a layer |
|
|
486
|
+
| `test_fixture` | `data.name` | `{name, file, setup, teardown}` | Shared test fixture or DB seed |
|
|
487
|
+
| `coverage_gap` | `data.module` | `{module, layer, uncovered_areas[]}` | Coverage gap in a module |
|
|
488
|
+
| `regression` | `data.test` | `{test, file, previous_status, current_status}` | Test that regressed |
|
|
489
|
+
| `flaky_test` | `data.test` | `{test, file, fail_rate, pattern}` | Intermittently failing test |
|
|
490
|
+
|
|
491
|
+
#### Protocol
|
|
492
|
+
|
|
493
|
+
1. **Read** `{session_folder}/discoveries.ndjson` before own test execution
|
|
494
|
+
2. **Skip covered**: If discovery of same type + dedup key exists, skip
|
|
495
|
+
3. **Write immediately**: Append findings as found
|
|
496
|
+
4. **Append-only**: Never modify or delete
|
|
497
|
+
5. **Deduplicate**: Check before writing
|
|
498
|
+
|
|
499
|
+
```bash
|
|
500
|
+
echo '{"ts":"<ISO>","worker":"{id}","type":"test_command","data":{"layer":"L1","command":"npx vitest run --reporter=verbose","flags":"--testPathPattern=unit","cwd":"."}}' >> {session_folder}/discoveries.ndjson
|
|
501
|
+
```
|
|
502
|
+
</execution>
|
|
503
|
+
|
|
504
|
+
<error_codes>
|
|
505
|
+
|
|
506
|
+
| Error | Resolution |
|
|
507
|
+
|-------|------------|
|
|
508
|
+
| Phase directory not found | Abort with error: "Phase {N} not found" |
|
|
509
|
+
| No test framework detected | Abort with error: "No test framework detected (E003)" |
|
|
510
|
+
| L0 static analysis fails | Record failures, proceed to L1 (type errors are informational) |
|
|
511
|
+
| All tasks in a layer failed | Gate check: skip subsequent layers for this iteration |
|
|
512
|
+
| Agent timeout | Mark as failed, continue with remaining agents in wave |
|
|
513
|
+
| Max iterations without convergence | Finalize with current results, warn (W001) |
|
|
514
|
+
| Regression detected | Switch to Surgical strategy (W002) |
|
|
515
|
+
| Stuck 3+ iterations | Switch to Reflective strategy (W003) |
|
|
516
|
+
| CSV parse error | Validate format, show line number |
|
|
517
|
+
| discoveries.ndjson corrupt | Ignore malformed lines |
|
|
518
|
+
| Continue mode: no session found | List available sessions |
|
|
519
|
+
| state.json missing on resume | Rebuild from tasks.csv status column |
|
|
520
|
+
</error_codes>
|
|
521
|
+
|
|
522
|
+
<success_criteria>
|
|
523
|
+
- [ ] Session initialized with state.json and reflection-log.md
|
|
524
|
+
- [ ] tasks.csv generated with correct layer/wave assignments and dependencies
|
|
525
|
+
- [ ] All waves executed sequentially (L0 -> L1 -> L2 -> L3) with gate checks
|
|
526
|
+
- [ ] Reflection logged after each iteration with strategy assessment
|
|
527
|
+
- [ ] Strategy engine transitions applied correctly based on pass rates
|
|
528
|
+
- [ ] Convergence reached or max iterations exhausted
|
|
529
|
+
- [ ] results.csv, summary.json, and context.md generated
|
|
530
|
+
- [ ] Temporary wave-{N}.csv files cleaned up after merge
|
|
531
|
+
- [ ] discoveries.ndjson maintained as append-only across all waves
|
|
532
|
+
</success_criteria>
|