maestro-flow 0.3.46 → 0.3.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (241) hide show
  1. package/.claude/agents/ui-design-agent.md +1 -0
  2. package/.claude/agents/workflow-executor.md +3 -0
  3. package/.claude/commands/learn-decompose.md +91 -146
  4. package/.claude/commands/learn-follow.md +102 -137
  5. package/.claude/commands/learn-investigate.md +102 -167
  6. package/.claude/commands/learn-retro.md +100 -243
  7. package/.claude/commands/learn-second-opinion.md +95 -135
  8. package/.claude/commands/maestro-amend.md +95 -232
  9. package/.claude/commands/maestro-analyze.md +1 -6
  10. package/.claude/commands/maestro-collab.md +104 -265
  11. package/.claude/commands/maestro-composer.md +113 -293
  12. package/.claude/commands/maestro-execute.md +10 -17
  13. package/.claude/commands/maestro-impeccable.md +89 -0
  14. package/.claude/commands/maestro-plan.md +1 -6
  15. package/.claude/commands/maestro-player.md +111 -340
  16. package/.claude/commands/maestro-quick.md +9 -0
  17. package/.claude/commands/maestro-ralph-execute.md +167 -210
  18. package/.claude/commands/maestro-ralph.md +245 -426
  19. package/.claude/commands/maestro-ui-codify.md +13 -0
  20. package/.claude/commands/maestro-ui-craft.md +364 -0
  21. package/.claude/commands/maestro-ui-design.md +12 -1
  22. package/.claude/commands/maestro-verify.md +12 -13
  23. package/.claude/commands/maestro.md +142 -72
  24. package/.claude/commands/manage-knowhow-capture.md +45 -170
  25. package/.claude/commands/quality-auto-test.md +9 -0
  26. package/.claude/commands/quality-debug.md +11 -25
  27. package/.claude/commands/quality-refactor.md +9 -0
  28. package/.claude/commands/quality-review.md +5 -14
  29. package/.claude/commands/spec-add.md +1 -1
  30. package/.claude/commands/spec-load.md +3 -2
  31. package/.claude/skills/maestro-impeccable/SKILL.md +169 -0
  32. package/.codex/skills/learn-decompose/SKILL.md +1 -1
  33. package/.codex/skills/learn-investigate/SKILL.md +2 -1
  34. package/.codex/skills/maestro/SKILL.md +420 -313
  35. package/.codex/skills/maestro-analyze/SKILL.md +126 -417
  36. package/.codex/skills/maestro-brainstorm/SKILL.md +129 -451
  37. package/.codex/skills/maestro-collab/SKILL.md +134 -547
  38. package/.codex/skills/maestro-execute/SKILL.md +3 -1
  39. package/.codex/skills/maestro-impeccable/SKILL.md +112 -0
  40. package/.codex/skills/maestro-plan/SKILL.md +88 -437
  41. package/.codex/skills/maestro-player/SKILL.md +191 -333
  42. package/.codex/skills/maestro-quick/SKILL.md +2 -0
  43. package/.codex/skills/maestro-ralph/SKILL.md +327 -710
  44. package/.codex/skills/maestro-roadmap/SKILL.md +201 -518
  45. package/.codex/skills/maestro-ui-codify/SKILL.md +1 -0
  46. package/.codex/skills/maestro-ui-craft/SKILL.md +341 -0
  47. package/.codex/skills/maestro-ui-design/SKILL.md +10 -0
  48. package/.codex/skills/maestro-verify/SKILL.md +116 -409
  49. package/.codex/skills/quality-auto-test/SKILL.md +145 -443
  50. package/.codex/skills/quality-refactor/SKILL.md +1 -1
  51. package/.codex/skills/quality-test/SKILL.md +229 -517
  52. package/.codex/skills/spec-add/SKILL.md +1 -1
  53. package/README.md +4 -1
  54. package/README.zh-CN.md +3 -1
  55. package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js +3 -0
  56. package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js.map +1 -1
  57. package/dashboard/dist-server/dashboard/src/server/routes/install.js +110 -1
  58. package/dashboard/dist-server/dashboard/src/server/routes/install.js.map +1 -1
  59. package/dashboard/dist-server/dashboard/src/server/routes/settings.js +56 -0
  60. package/dashboard/dist-server/dashboard/src/server/routes/settings.js.map +1 -1
  61. package/dashboard/dist-server/dashboard/src/server/routes/wiki.js +2 -0
  62. package/dashboard/dist-server/dashboard/src/server/routes/wiki.js.map +1 -1
  63. package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.js +2 -2
  64. package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.js.map +1 -1
  65. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js +2 -0
  66. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js.map +1 -1
  67. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-types.d.ts +3 -1
  68. package/dashboard/dist-server/dashboard/src/shared/constants.d.ts +2 -0
  69. package/dashboard/dist-server/dashboard/src/shared/constants.js +2 -0
  70. package/dashboard/dist-server/dashboard/src/shared/constants.js.map +1 -1
  71. package/dist/src/agents/cli-agent-runner.d.ts.map +1 -1
  72. package/dist/src/agents/cli-agent-runner.js +1 -3
  73. package/dist/src/agents/cli-agent-runner.js.map +1 -1
  74. package/dist/src/agents/cli-history-store.d.ts +5 -0
  75. package/dist/src/agents/cli-history-store.d.ts.map +1 -1
  76. package/dist/src/agents/cli-history-store.js +65 -13
  77. package/dist/src/agents/cli-history-store.js.map +1 -1
  78. package/dist/src/cli.js +13 -0
  79. package/dist/src/cli.js.map +1 -1
  80. package/dist/src/commands/command-help.d.ts +3 -0
  81. package/dist/src/commands/command-help.d.ts.map +1 -0
  82. package/dist/src/commands/command-help.js +60 -0
  83. package/dist/src/commands/command-help.js.map +1 -0
  84. package/dist/src/commands/config.d.ts.map +1 -1
  85. package/dist/src/commands/config.js +17 -0
  86. package/dist/src/commands/config.js.map +1 -1
  87. package/dist/src/commands/delegate.d.ts.map +1 -1
  88. package/dist/src/commands/delegate.js +12 -2
  89. package/dist/src/commands/delegate.js.map +1 -1
  90. package/dist/src/commands/impeccable.d.ts +10 -0
  91. package/dist/src/commands/impeccable.d.ts.map +1 -0
  92. package/dist/src/commands/impeccable.js +181 -0
  93. package/dist/src/commands/impeccable.js.map +1 -0
  94. package/dist/src/commands/spec.js +1 -1
  95. package/dist/src/commands/spec.js.map +1 -1
  96. package/dist/src/commands/wiki.d.ts.map +1 -1
  97. package/dist/src/commands/wiki.js +5 -1
  98. package/dist/src/commands/wiki.js.map +1 -1
  99. package/dist/src/config/cli-tools-config.d.ts.map +1 -1
  100. package/dist/src/config/cli-tools-config.js +10 -7
  101. package/dist/src/config/cli-tools-config.js.map +1 -1
  102. package/dist/src/core/addon-registry.d.ts +31 -0
  103. package/dist/src/core/addon-registry.d.ts.map +1 -0
  104. package/dist/src/core/addon-registry.js +28 -0
  105. package/dist/src/core/addon-registry.js.map +1 -0
  106. package/dist/src/hooks/plugins/spec-injection-plugin.js +2 -0
  107. package/dist/src/hooks/plugins/spec-injection-plugin.js.map +1 -1
  108. package/dist/src/hooks/spec-injector.js +2 -2
  109. package/dist/src/hooks/spec-injector.js.map +1 -1
  110. package/dist/src/index.d.ts +2 -0
  111. package/dist/src/index.d.ts.map +1 -1
  112. package/dist/src/index.js +1 -0
  113. package/dist/src/index.js.map +1 -1
  114. package/dist/src/tools/impeccable/critique-storage.d.ts +28 -0
  115. package/dist/src/tools/impeccable/critique-storage.d.ts.map +1 -0
  116. package/dist/src/tools/impeccable/critique-storage.js +120 -0
  117. package/dist/src/tools/impeccable/critique-storage.js.map +1 -0
  118. package/dist/src/tools/impeccable/design-parser.d.ts +90 -0
  119. package/dist/src/tools/impeccable/design-parser.d.ts.map +1 -0
  120. package/dist/src/tools/impeccable/design-parser.js +696 -0
  121. package/dist/src/tools/impeccable/design-parser.js.map +1 -0
  122. package/dist/src/tools/impeccable/detect-csp.d.ts +6 -0
  123. package/dist/src/tools/impeccable/detect-csp.d.ts.map +1 -0
  124. package/dist/src/tools/impeccable/detect-csp.js +130 -0
  125. package/dist/src/tools/impeccable/detect-csp.js.map +1 -0
  126. package/dist/src/tools/impeccable/is-generated.d.ts +4 -0
  127. package/dist/src/tools/impeccable/is-generated.d.ts.map +1 -0
  128. package/dist/src/tools/impeccable/is-generated.js +56 -0
  129. package/dist/src/tools/impeccable/is-generated.js.map +1 -0
  130. package/dist/src/tools/impeccable/live/accept.d.ts +50 -0
  131. package/dist/src/tools/impeccable/live/accept.d.ts.map +1 -0
  132. package/dist/src/tools/impeccable/live/accept.js +556 -0
  133. package/dist/src/tools/impeccable/live/accept.js.map +1 -0
  134. package/dist/src/tools/impeccable/live/bootstrap.d.ts +2 -0
  135. package/dist/src/tools/impeccable/live/bootstrap.d.ts.map +1 -0
  136. package/dist/src/tools/impeccable/live/bootstrap.js +244 -0
  137. package/dist/src/tools/impeccable/live/bootstrap.js.map +1 -0
  138. package/dist/src/tools/impeccable/live/complete.d.ts +7 -0
  139. package/dist/src/tools/impeccable/live/complete.d.ts.map +1 -0
  140. package/dist/src/tools/impeccable/live/complete.js +67 -0
  141. package/dist/src/tools/impeccable/live/complete.js.map +1 -0
  142. package/dist/src/tools/impeccable/live/completion.d.ts +24 -0
  143. package/dist/src/tools/impeccable/live/completion.d.ts.map +1 -0
  144. package/dist/src/tools/impeccable/live/completion.js +26 -0
  145. package/dist/src/tools/impeccable/live/completion.js.map +1 -0
  146. package/dist/src/tools/impeccable/live/inject.d.ts +41 -0
  147. package/dist/src/tools/impeccable/live/inject.d.ts.map +1 -0
  148. package/dist/src/tools/impeccable/live/inject.js +394 -0
  149. package/dist/src/tools/impeccable/live/inject.js.map +1 -0
  150. package/dist/src/tools/impeccable/live/poll.d.ts +24 -0
  151. package/dist/src/tools/impeccable/live/poll.d.ts.map +1 -0
  152. package/dist/src/tools/impeccable/live/poll.js +180 -0
  153. package/dist/src/tools/impeccable/live/poll.js.map +1 -0
  154. package/dist/src/tools/impeccable/live/resume.d.ts +5 -0
  155. package/dist/src/tools/impeccable/live/resume.d.ts.map +1 -0
  156. package/dist/src/tools/impeccable/live/resume.js +30 -0
  157. package/dist/src/tools/impeccable/live/resume.js.map +1 -0
  158. package/dist/src/tools/impeccable/live/server.d.ts +6 -0
  159. package/dist/src/tools/impeccable/live/server.d.ts.map +1 -0
  160. package/dist/src/tools/impeccable/live/server.js +867 -0
  161. package/dist/src/tools/impeccable/live/server.js.map +1 -0
  162. package/dist/src/tools/impeccable/live/session-store.d.ts +72 -0
  163. package/dist/src/tools/impeccable/live/session-store.d.ts.map +1 -0
  164. package/dist/src/tools/impeccable/live/session-store.js +281 -0
  165. package/dist/src/tools/impeccable/live/session-store.js.map +1 -0
  166. package/dist/src/tools/impeccable/live/static/live-browser-session.js +123 -0
  167. package/dist/src/tools/impeccable/live/static/live-browser.js +4860 -0
  168. package/dist/src/tools/impeccable/live/static/modern-screenshot.umd.js +14 -0
  169. package/dist/src/tools/impeccable/live/status.d.ts +2 -0
  170. package/dist/src/tools/impeccable/live/status.d.ts.map +1 -0
  171. package/dist/src/tools/impeccable/live/status.js +52 -0
  172. package/dist/src/tools/impeccable/live/status.js.map +1 -0
  173. package/dist/src/tools/impeccable/live/wrap.d.ts +33 -0
  174. package/dist/src/tools/impeccable/live/wrap.d.ts.map +1 -0
  175. package/dist/src/tools/impeccable/live/wrap.js +572 -0
  176. package/dist/src/tools/impeccable/live/wrap.js.map +1 -0
  177. package/dist/src/tools/impeccable/load-context.d.ts +13 -0
  178. package/dist/src/tools/impeccable/load-context.d.ts.map +1 -0
  179. package/dist/src/tools/impeccable/load-context.js +79 -0
  180. package/dist/src/tools/impeccable/load-context.js.map +1 -0
  181. package/dist/src/tools/impeccable/paths.d.ts +34 -0
  182. package/dist/src/tools/impeccable/paths.d.ts.map +1 -0
  183. package/dist/src/tools/impeccable/paths.js +102 -0
  184. package/dist/src/tools/impeccable/paths.js.map +1 -0
  185. package/dist/src/tools/spec-entry-parser.d.ts +1 -1
  186. package/dist/src/tools/spec-entry-parser.d.ts.map +1 -1
  187. package/dist/src/tools/spec-entry-parser.js +1 -1
  188. package/dist/src/tools/spec-entry-parser.js.map +1 -1
  189. package/dist/src/tools/spec-init.d.ts.map +1 -1
  190. package/dist/src/tools/spec-init.js +26 -1
  191. package/dist/src/tools/spec-init.js.map +1 -1
  192. package/dist/src/tools/spec-loader.d.ts +1 -1
  193. package/dist/src/tools/spec-loader.d.ts.map +1 -1
  194. package/dist/src/tools/spec-loader.js +2 -0
  195. package/dist/src/tools/spec-loader.js.map +1 -1
  196. package/package.json +2 -2
  197. package/workflows/claude-instructions.md +17 -5
  198. package/workflows/cli-tools-usage.md +10 -3
  199. package/workflows/delegate-usage.md +3 -2
  200. package/workflows/impeccable/adapt.md +190 -0
  201. package/workflows/impeccable/animate.md +175 -0
  202. package/workflows/impeccable/audit.md +133 -0
  203. package/workflows/impeccable/bolder.md +113 -0
  204. package/workflows/impeccable/brand.md +118 -0
  205. package/workflows/impeccable/clarify.md +174 -0
  206. package/workflows/impeccable/codex.md +105 -0
  207. package/workflows/impeccable/cognitive-load.md +106 -0
  208. package/workflows/impeccable/color-and-contrast.md +105 -0
  209. package/workflows/impeccable/colorize.md +154 -0
  210. package/workflows/impeccable/craft.md +123 -0
  211. package/workflows/impeccable/critique.md +261 -0
  212. package/workflows/impeccable/delight.md +302 -0
  213. package/workflows/impeccable/distill.md +111 -0
  214. package/workflows/impeccable/document.md +439 -0
  215. package/workflows/impeccable/extract.md +69 -0
  216. package/workflows/impeccable/harden.md +347 -0
  217. package/workflows/impeccable/heuristics-scoring.md +234 -0
  218. package/workflows/impeccable/interaction-design.md +195 -0
  219. package/workflows/impeccable/layout.md +141 -0
  220. package/workflows/impeccable/live.md +622 -0
  221. package/workflows/impeccable/motion-design.md +109 -0
  222. package/workflows/impeccable/onboard.md +234 -0
  223. package/workflows/impeccable/optimize.md +258 -0
  224. package/workflows/impeccable/overdrive.md +130 -0
  225. package/workflows/impeccable/personas.md +179 -0
  226. package/workflows/impeccable/polish.md +242 -0
  227. package/workflows/impeccable/product.md +62 -0
  228. package/workflows/impeccable/quieter.md +99 -0
  229. package/workflows/impeccable/responsive-design.md +114 -0
  230. package/workflows/impeccable/shape.md +165 -0
  231. package/workflows/impeccable/spatial-design.md +100 -0
  232. package/workflows/impeccable/teach.md +168 -0
  233. package/workflows/impeccable/typeset.md +124 -0
  234. package/workflows/impeccable/typography.md +159 -0
  235. package/workflows/impeccable/ux-writing.md +107 -0
  236. package/workflows/impeccable.md +164 -0
  237. package/workflows/maestro.md +7 -3
  238. package/workflows/skill-authoring.md +265 -0
  239. package/workflows/specs-add.md +3 -2
  240. package/workflows/specs-load.md +2 -1
  241. package/workflows/specs-setup.md +21 -1
@@ -6,480 +6,131 @@ allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, request
6
6
  ---
7
7
 
8
8
  <purpose>
9
- Wave-based planning using `spawn_agents_on_csv`. Wave 1 explores codebase context in parallel across multiple angles, Wave 2 consumes all exploration findings to generate a verified execution plan.
10
-
11
- **Core workflow**: Resolve Phase -> Determine Explorations -> Parallel Exploration -> Sequential Planning -> Check + Confirm
12
-
13
- ```
14
- +---------------------------------------------------------------------------+
15
- | PLAN CSV WAVE WORKFLOW |
16
- +---------------------------------------------------------------------------+
17
- | |
18
- | Phase 1: Phase Resolution -> CSV |
19
- | +-- Resolve phase directory from arguments (or --dir) |
20
- | +-- Load context.md, index.json, spec-ref, codebase docs |
21
- | +-- Check for upstream analysis (conclusions.json) |
22
- | +-- If --gaps: load gaps from issues/verification/uat |
23
- | +-- Determine exploration angles (architecture, implementation, etc.) |
24
- | +-- Generate tasks.csv with one row per exploration + planning row |
25
- | +-- User validates exploration breakdown (skip if -y) |
26
- | |
27
- | Phase 2: Wave Execution Engine |
28
- | +-- Wave 1: Codebase Exploration (parallel) |
29
- | | +-- Each agent explores one angle of the codebase |
30
- | | +-- Agent reads files, discovers patterns, maps dependencies |
31
- | | +-- Discoveries shared via board (patterns, conventions, risks) |
32
- | | +-- Results: findings per exploration angle |
33
- | +-- Wave 2: Plan Generation (sequential) |
34
- | | +-- Single planning agent consumes all exploration findings |
35
- | | +-- Generates plan.json with waves, dependencies, estimates |
36
- | | +-- Generates .task/TASK-*.json for each task |
37
- | | +-- Applies Deep Work Rules (read_first, convergence.criteria) |
38
- | | +-- Results: plan.json path + task count |
39
- | +-- discoveries.ndjson shared across all waves (append-only) |
40
- | |
41
- | Phase 3: Plan Checking + Confirmation |
42
- | +-- Validate plan quality (coverage, feasibility, deps, criteria) |
43
- | +-- Revision loop (max 3 rounds) if critical issues found |
44
- | +-- Update index.json with plan metadata |
45
- | +-- Display plan summary + options (execute/modify/view) |
46
- | |
47
- +---------------------------------------------------------------------------+
48
- ```
9
+ Wave-based planning via `spawn_agents_on_csv`. Wave 1 explores codebase in parallel across multiple angles, Wave 2 generates verified execution plan consuming all exploration findings.
49
10
 
11
+ Supports: Create (default), Revise (`--revise`), Check (`--check`), Gaps (`--gaps`).
50
12
  </purpose>
51
13
 
52
14
  <context>
53
- ```bash
54
- $maestro-plan "3"
55
- $maestro-plan -y "3"
56
- $maestro-plan -c 4 "3 --spec SPEC-001"
57
- $maestro-plan "3 --gaps"
58
- $maestro-plan "3 --dir .workflow/scratch/quick-nav-fix"
59
- $maestro-plan --continue "20260318-plan-P3-auth"
60
- ```
15
+ $ARGUMENTS — phase number/text and optional flags.
61
16
 
62
- **Flags**:
63
- - `-y, --yes`: Skip all confirmations (auto mode)
64
- - `-c, --concurrency N`: Max concurrent agents within each wave (default: 4)
65
- - `--continue`: Resume existing session
17
+ **Flags**: `-y` (auto), `-c N` (concurrency, default 4), `--continue` (resume), `--dir <path>`, `--gaps` (issue-linked), `--spec SPEC-xxx`, `--collab`, `--revise`, `--check`
66
18
 
67
- When `--yes` or `-y`: Auto-confirm exploration angles, skip interactive clarification (P2), use defaults for complexity detection.
19
+ **Scope routing** (priority): --dir from parent artifact; no args milestone; digit phase; text → adhoc/standalone.
68
20
 
69
- **Output Directory**: `.workflow/.csv-wave/{session-id}/`
70
- **Core Output**: `tasks.csv` (master state) + `results.csv` (final) + `discoveries.ndjson` (shared exploration) + `context.md` (human-readable report) + `plan.json` + `.task/TASK-*.json`
21
+ **Session**: `.workflow/.csv-wave/{YYYYMMDD}-plan-P{N}-{slug}/`
22
+ **Scratch**: `.workflow/scratch/{YYYYMMDD}-plan-P{N}-{slug}/` (.task/ subdir)
23
+
24
+ **Pre-load** (optional): context.md (prior analyze), conclusions.json, codebase ARCHITECTURE.md, `maestro wiki search`, `maestro spec load --category arch`, team preflight `maestro collab preflight`.
71
25
  </context>
72
26
 
73
27
  <csv_schema>
74
-
75
- ### tasks.csv (Master State)
76
-
77
28
  ```csv
78
- id,title,description,exploration_focus,deps,context_from,wave,status,findings,error
79
- "E1","Architecture Exploration","Explore how the target feature fits into existing architecture. Map module boundaries, dependency graph, and integration points. Identify existing patterns that should be followed.","architecture","","","1","","",""
80
- "E2","Implementation Exploration","Explore implementation patterns: libraries in use, coding conventions, error handling patterns, type definitions. Find 3+ similar features as reference.","implementation","","","1","","",""
81
- "E3","Integration Exploration","Explore integration points: what existing code needs modification, API contracts, shared state, event flows. Map all touch points.","integration","","","1","","",""
82
- "E4","Risk Exploration","Explore risks: what could go wrong, backward compatibility concerns, performance implications, security surface changes, test coverage gaps.","risk","","","1","","",""
83
- "P1","Plan Generation","Consume all exploration findings. Decompose phase goal into concrete tasks with waves, dependencies, convergence criteria. Generate plan.json + TASK-*.json files following Deep Work Rules.","planning","E1;E2;E3;E4","E1;E2;E3;E4","2","","",""
84
- ```
85
-
86
- **Columns**:
87
-
88
- | Column | Phase | Description |
89
- |--------|-------|-------------|
90
- | `id` | Input | Unique task identifier: `E{N}` for explorations (wave 1), `P1` for planning (wave 2) |
91
- | `title` | Input | Short exploration or planning title |
92
- | `description` | Input | Detailed exploration/planning instructions |
93
- | `exploration_focus` | Input | Focus area: architecture/implementation/integration/risk/planning |
94
- | `deps` | Input | Semicolon-separated dependency task IDs |
95
- | `context_from` | Input | Semicolon-separated task IDs whose findings this task needs |
96
- | `wave` | Computed | Wave number (1 = exploration, 2 = plan generation) |
97
- | `status` | Output | `pending` -> `completed` / `failed` / `skipped` |
98
- | `findings` | Output | Key findings summary (max 500 chars) |
99
- | `error` | Output | Error message if failed |
100
-
101
- ### Per-Wave CSV (Temporary)
102
-
103
- Each wave generates `wave-{N}.csv` with extra `prev_context` column.
104
-
105
- ### Output Artifacts
106
-
107
- | File | Purpose | Lifecycle |
108
- |------|---------|-----------|
109
- | `tasks.csv` | Master state -- all tasks with status/findings | Updated after each wave |
110
- | `wave-{N}.csv` | Per-wave input (temporary) | Created before wave, deleted after |
111
- | `results.csv` | Final export of all task results | Created in Phase 3 |
112
- | `discoveries.ndjson` | Shared exploration board | Append-only, carries across waves |
113
- | `context.md` | Human-readable planning report | Created in Phase 3 |
114
- | `plan.json` | Execution plan (in phase directory) | Created by wave 2 agent |
115
- | `.task/TASK-*.json` | Individual task definitions (in phase directory) | Created by wave 2 agent |
116
-
117
- ### Session Structure
118
-
119
- ```
120
- .workflow/.csv-wave/{YYYYMMDD}-plan-P{N}-{slug}/
121
- +-- tasks.csv
122
- +-- results.csv
123
- +-- discoveries.ndjson
124
- +-- context.md
125
- +-- wave-{N}.csv (temporary)
29
+ id,title,description,angle,deps,context_from,wave,status,findings,output_path,error
30
+ "1","Explore: Architecture","Map module boundaries and dependencies","architecture","","","1","","","",""
31
+ "2","Explore: Patterns","Find existing similar implementations","patterns","","","1","","","",""
32
+ "3","Explore: Tests","Map test infrastructure and conventions","tests","","","1","","","",""
33
+ "4","Generate Plan","Consume explorations, produce plan.json + TASK files","planning","1;2;3","1;2;3","2","","","",""
126
34
  ```
35
+ Wave 1: N exploration rows (parallel). Wave 2: 1 planning row (sequential).
127
36
  </csv_schema>
128
37
 
129
38
  <invariants>
130
- 1. **Start Immediately**: First action is session initialization, then Phase 1
131
- 2. **Wave Order is Sacred**: Never execute wave 2 before wave 1 completes and results are merged
132
- 3. **CSV is Source of Truth**: Master tasks.csv holds all state
133
- 4. **Context Propagation**: prev_context built from master CSV, not from memory
134
- 5. **Discovery Board is Append-Only**: Never clear, modify, or recreate discoveries.ndjson
135
- 6. **Skip on Failure**: If all exploration agents failed, planning agent proceeds with available context
136
- 7. **Cleanup Temp Files**: Remove wave-{N}.csv after results are merged
137
- 8. **DO NOT STOP**: Continuous execution until all waves complete
39
+ 1. **Wave order sacred**: Explorations (W1) before planning (W2)
40
+ 2. **CSV source of truth**: Master tasks.csv holds all state
41
+ 3. **Discovery board append-only**: Never modify/delete
42
+ 4. **Skip on failure**: If all explorations fail, planner proceeds with available context
43
+ 5. **DO NOT STOP**: Continuous until all waves complete
138
44
  </invariants>
139
45
 
140
- <execution>
141
-
142
- ### Session Initialization
143
-
144
- ```javascript
145
- // Parse from $ARGUMENTS:
146
- // AUTO_YES <- --yes | -y
147
- // continueMode <- --continue
148
- // maxConcurrency <- --concurrency N | -c N (default: 4)
149
- // autoMode <- --auto
150
- // gapsMode <- --gaps
151
- // dirMatch <- --dir <path>
152
- // specMatch <- --spec SPEC-xxx
153
- // collabMode <- --collab
154
- // phaseArg <- remaining text after stripping all flags
155
-
156
- // Auto-bootstrap .workflow/state.json if missing
157
-
158
- // Scope determination from state.json (priority order):
159
- // --dir given → scope from parent artifact or 'standalone'
160
- // phaseArg empty → 'milestone' (requires current_milestone + roadmap.md) or ERROR E001
161
- // phaseArg is digit → 'phase', resolve slug from roadmap, find latest completed analyze artifact
162
- // phaseArg is text → 'adhoc' (if milestone active) or 'standalone', slugify phaseArg
163
-
164
- // Session IDs (UTC+8):
165
- // sessionId = {YYYYMMDD}-plan-P{phaseArg}-{phaseSlug}
166
- // sessionFolder = .workflow/.csv-wave/{sessionId}
167
- // scratchDir = .workflow/scratch/{sessionId}
168
-
169
- // Create: sessionFolder, scratchDir/.task/
170
- ```
171
-
172
- ### Session Resume (`--continue`)
173
-
174
- When `continueMode` is true:
175
- 1. Scan `.workflow/.csv-wave/` for directories matching `*-plan-*`
176
- 2. If `$ARGUMENTS` contains a session ID suffix, match it; otherwise use the most recent session
177
- 3. Read the session's `tasks.csv` to determine resume point:
178
- - If all wave 1 tasks completed → skip to wave 2
179
- - If wave 2 completed → skip to Phase 3 (plan checking)
180
- - If Phase 3 incomplete → re-run plan checking
181
- 4. Re-use existing `sessionFolder` and `scratchDir` (do not create new ones)
182
- 5. Log: "Resuming session {sessionId} — skipping {N} completed tasks"
183
-
184
- If no matching session found, list available sessions and abort.
185
-
186
- ### Phase 1: Phase Resolution -> CSV
187
-
188
- **Objective**: Resolve phase, load context, determine exploration angles, generate tasks.csv.
189
-
190
- **Decomposition Rules**:
191
-
192
- 1. **Scope resolution**: Already determined in Session Initialization (milestone/phase/adhoc/standalone)
193
-
194
- 2. **Context loading** (from upstream analyze artifact or --dir):
195
- - Read `{contextDir}/context.md` (user decisions from analyze) — if contextDir resolved
196
- - Read `.workflow/project.md` — project vision and constraints
197
- - Read `.workflow/roadmap.md` — phase structure and dependencies
198
- - Read spec-ref if `--spec` flag
199
- - Read `.workflow/codebase/doc-index.json` if exists
200
- - Find design artifacts from `state.json.artifacts[]` (type=brainstorm with ui-designer) for MASTER.md
201
- - Load project specs via `maestro spec load --category arch`
202
-
203
- 3. **Upstream analysis check**:
204
- - If `{contextDir}/conclusions.json` exists and has content: reuse as exploration context, skip wave 1
205
- - If `{contextDir}/explorations.json` exists: load as additional context
206
-
207
- 4. **Gap mode** (if `--gaps`):
208
- - Load gaps from `.workflow/issues/issues.jsonl` (primary), `verification.json` (fallback), `uat.md` (additional)
209
- - Enrich with debug diagnosis from `{PHASE_DIR}/.debug/*/understanding.md`
210
- - Skip wave 1 exploration, generate gap-fix tasks directly in wave 2
211
-
212
- 5. **Exploration angle determination** (skip if --gaps or upstream analysis loaded):
213
-
214
- | Angle | Focus | When Included |
215
- |-------|-------|---------------|
216
- | architecture | Module boundaries, dependency graph, integration points | Always |
217
- | implementation | Coding patterns, libraries, conventions, similar features | Always |
218
- | integration | Existing code modifications, API contracts, shared state | When phase touches existing modules |
219
- | risk | Backward compatibility, performance, security, test gaps | When phase is complex or critical |
220
-
221
- 6. **CSV generation**: Exploration rows (wave 1) + one planning row (wave 2).
222
-
223
- **Wave computation**: Simple 2-wave -- all exploration tasks = wave 1, planning task = wave 2.
224
-
225
- **User validation**: Display exploration breakdown (skip if AUTO_YES or `--auto`).
46
+ <state_machine>
226
47
 
227
- ### Pre-flight: Team Conflict Check
48
+ <states>
49
+ S_PARSE — 解析参数、确定 scope PERSIST: —
50
+ S_RESUME — 恢复已有 session(--continue) PERSIST: —
51
+ S_CONTEXT — 加载上下文(context.md, specs, wiki) PERSIST: —
52
+ S_CSV_GEN — 确定探索角度、生成 tasks.csv PERSIST: tasks.csv
53
+ S_WAVE_1 — Parallel Exploration (spawn) PERSIST: discoveries.ndjson
54
+ S_WAVE_2 — Plan Generation (spawn single agent) PERSIST: plan.json + .task/
55
+ S_CHECK — Plan checking (max 3 iterations) PERSIST: plan updates
56
+ S_CONFIRM — 用户确认(-y 跳过) PERSIST: —
57
+ S_REGISTER — 注册 PLN artifact、更新 index.json PERSIST: state.json
58
+ </states>
228
59
 
229
- Before starting the plan pipeline:
230
- ```
231
- Bash("maestro collab preflight --phase <phase-number>")
232
- ```
233
- If exit code is 1, present warnings and ask whether to proceed.
234
-
235
- ### Wiki Knowledge Search
236
-
237
- During context collection, after loading files and before exploration (Wave 1):
238
- ```
239
- phase_keywords = extract key terms from goal/title (2-5 terms)
240
- wiki_result = Bash("maestro wiki search ${phase_keywords} --json 2>/dev/null")
241
-
242
- IF wiki_result exit code != 0 OR empty:
243
- W003: Wiki search unavailable, continue without prior knowledge
244
- ELSE:
245
- entries = JSON.parse(wiki_result).entries (limit to first 10)
246
- Pass wiki_context to Wave 2 planning agent
247
- ```
248
-
249
- ### Mode Routing
250
-
251
- | Mode | Trigger | Behavior |
252
- |------|---------|----------|
253
- | Create | Default (no --revise/--check) | Full pipeline: Phase 1 → Wave 1 → Wave 2 → Phase 3 |
254
- | Revise | `--revise [instructions]` | Load existing plan, apply incremental edits, re-check |
255
- | Check | `--check <plan-dir>` | Skip exploration/planning, run plan-checker only on existing plan |
256
-
257
- **Revise mode**: Load plan.json from target dir, apply user instructions (add/remove/edit tasks, adjust waves), re-run plan-checker, update index.json.
258
-
259
- **Check mode**: Read plan.json + .task/TASK-*.json from `--check` path, validate quality, report issues. No exploration, no generation.
260
-
261
- ### Phase 2: Wave Execution Engine
262
-
263
- **Objective**: Explore codebase then generate plan via spawn_agents_on_csv.
264
-
265
- #### Wave 1: Codebase Exploration (Parallel)
266
-
267
- 1. Read master `tasks.csv`
268
- 2. Filter rows where `wave == 1` AND `status == pending`
269
- 3. No prev_context needed (wave 1 has no predecessors)
270
- 4. Write `wave-1.csv`
271
- 5. Execute:
272
-
273
- ```javascript
274
- spawn_agents_on_csv({
275
- csv_path: `${sessionFolder}/wave-1.csv`,
276
- id_column: "id",
277
- instruction: buildExplorationInstruction(sessionFolder, phaseDir), // agent: ~/.codex/agents/cli-explore-agent.toml
278
- max_concurrency: maxConcurrency,
279
- max_runtime_seconds: 3600,
280
- output_csv_path: `${sessionFolder}/wave-1-results.csv`,
281
- output_schema: { // required: id, status, findings
282
- id: "string", status: "completed|failed", findings: "string", error: "string"
283
- }
284
- })
285
- ```
286
-
287
- 6. Merge `wave-1-results.csv` into master `tasks.csv`, delete `wave-1.csv`
288
-
289
- #### Task Count Guard (before Wave 2)
290
-
291
- Before generating the planning instruction, assess scope complexity and embed expected task count ceiling:
292
- - Single feature / simple change → expect **1-2 tasks** max
293
- - Medium feature (multiple files, one module) → expect **2-4 tasks** max
294
- - Large feature (cross-module) → expect **4-8 tasks** max
60
+ <transitions>
61
+ S_PARSE → S_RESUME WHEN: --continue
62
+ S_PARSE S_CONTEXT WHEN: phase/dir resolved
63
+ S_PARSE → ERROR WHEN: no args and no roadmap
295
64
 
296
- Include this ceiling in `buildPlanningInstruction`. If the planning agent outputs more tasks than the threshold, re-prompt with explicit instruction to merge.
65
+ S_RESUME S_WAVE_1 WHEN: W1 incomplete DO: load session, resume
66
+ S_RESUME → S_WAVE_2 WHEN: W1 done, W2 pending
67
+ S_RESUME → S_CHECK WHEN: W2 done, check pending
297
68
 
298
- #### Wave 2: Plan Generation (Sequential)
69
+ S_CONTEXT S_CSV_GEN DO: load context.md, conclusions.json, specs, wiki, codebase docs
299
70
 
300
- 1. Read master `tasks.csv`
301
- 2. Filter rows where `wave == 2` AND `status == pending`
302
- 3. Build `prev_context` from wave 1 findings:
303
- ```
304
- [E1: Architecture Exploration] Module boundaries: auth/ is self-contained, shared/ has...
305
- [E2: Implementation Exploration] Patterns found: Result type for errors, zod for validation...
306
- [E3: Integration Exploration] Touch points: routes/index.ts needs new route, middleware/auth.ts...
307
- [E4: Risk Exploration] Risks: No test coverage for auth refresh flow, potential breaking change...
308
- ```
309
- 4. Write `wave-2.csv` with `prev_context` column
310
- 5. Execute:
71
+ S_CSV_GEN S_WAVE_1 DO: determine exploration angles, generate tasks.csv, user validates (skip -y)
311
72
 
312
- ```javascript
313
- spawn_agents_on_csv({
314
- csv_path: `${sessionFolder}/wave-2.csv`,
315
- id_column: "id",
316
- instruction: buildPlanningInstruction(sessionFolder, phaseDir, { // agent: ~/.codex/agents/workflow-planner.toml
317
- contextMd, indexJson, specRef, docIndex, designRef, gapsContext
318
- }),
319
- max_concurrency: 1, // Single planning agent
320
- max_runtime_seconds: 3600,
321
- output_csv_path: `${sessionFolder}/wave-2-results.csv`,
322
- output_schema: { // required: id, status, findings
323
- id: "string", status: "completed|failed", findings: "string", error: "string"
324
- }
325
- })
326
- ```
327
-
328
- 6. Merge `wave-2-results.csv` into master `tasks.csv`, delete `wave-2.csv`
329
-
330
- **Planning agent responsibilities** (embedded in instruction):
331
- - Group work into feature-level tasks. One feature = one task (even if it touches 3-5 files). Do NOT split a single feature into multiple file-level tasks.
332
- - Apply Deep Work Rules: `read_first[]` includes modified file + source of truth; `convergence.criteria[]` are grep-verifiable; all actions/steps have concrete values
333
- - Write `plan.json` to `{PHASE_DIR}/plan.json` and `.task/TASK-{NNN}.json` to `{PHASE_DIR}/.task/`
334
- - `--gaps`: create fix tasks from gap context, link to issues; `--collab`: pre-allocate ID ranges
335
-
336
- **Task Grouping Rules (MANDATORY)** — pass to planning agent, re-prompt if violated:
337
-
338
- 1. **Group by feature** — All changes for one feature = one task (even if 3-5 files). Never create separate tasks per file.
339
- 2. **Group by context** — Related functional changes belong together. Don't split just because changes touch different files.
340
- 3. **Minimize agent count** — Group simple unrelated changes into a single "batch" task to reduce overhead. Each agent spawn costs significant tokens.
341
- 4. **Substantial tasks only** — Each task should represent 15-60 minutes of real work. If a task takes <5 minutes, merge it into another.
342
- 5. **True dependencies only** — `depends_on` only when Task B genuinely needs Task A's output (e.g., "Task A defines the interface that Task B implements"). Sequential execution wastes time.
343
- 6. **Prefer parallel** — Most tasks should be independent (no depends_on). Default to parallel waves.
344
- 7. **Complexity-based sizing**:
345
- - **Low** (single file, single concern, zero cross-module): **1 task**
346
- - **Medium** (multiple files OR integration point): **1-4 tasks**
347
- - **High** (cross-module, architectural, new subsystem): **4-10 tasks**
348
-
349
- **Anti-splitting rules** (re-prompt if violated):
350
- - One feature = one task (even if 3-5 files); never split a feature into per-file tasks
351
- - Group simple unrelated changes into a batch task to minimize agent spawns
352
- - `depends_on` only for genuine output dependencies; most tasks should be parallel
353
- - Each task must be substantial (15-60 min); sub-5-min changes must be merged
354
-
355
- ### Phase 3: Plan Checking + Confirmation
356
-
357
- **Objective**: Validate plan quality, revise if needed, present to user.
358
-
359
- 1. **Plan checking** (inline, not a separate wave):
360
- Read `plan.json` + all `.task/TASK-*.json`. Validate: requirements coverage, file feasibility, dependency correctness (no cycles, valid wave order), grep-verifiable convergence criteria, read_first completeness, action concreteness, no parallel file conflicts, **task count within complexity threshold** (reject over-split plans), **no per-file splitting** (each task must be feature-level).
361
-
362
- 1b. **Plan confidence scoring**:
73
+ S_WAVE_1 → S_WAVE_2 DO: spawn parallel explorations, merge results, build prev_context
363
74
 
364
- Dimensions (5): requirements_coverage, task_quality, dependency_correctness, estimation_accuracy, collision_safety. Factors (weights): completeness(.30), specificity(.25), structural_validity(.20), user_validation(.15), consistency(.10). Add `confidence` section to `plan.json`.
75
+ S_WAVE_2 S_CHECK DO: spawn planning agent, merge results
365
76
 
366
- **Readiness gate**: Block if requirements_coverage < 40% or any task missing read_first/convergence.criteria.
77
+ S_CHECK S_CONFIRM WHEN: plan passes or max 3 iterations DO: A_PLAN_CHECK
78
+ S_CHECK → S_WAVE_2 WHEN: plan fails check, iterations < 3 DO: feed checker feedback back
367
79
 
368
- 2. **Revision loop** (max 3 rounds): If critical issues found, regenerate affected tasks.
80
+ S_CONFIRM S_REGISTER WHEN: -y OR user confirms
81
+ S_CONFIRM → S_CSV_GEN WHEN: user wants to modify
82
+ S_CONFIRM → END WHEN: user cancels
369
83
 
370
- 2b. **Spec Enrichment**: Persist cross-task reusable design decisions:
371
- - `maestro spec add coding|arch "<decision.title>" "<rationale>" --keywords ... --source plan:{sessionId}`
372
- - Test strategy decisions → `maestro spec add test ...`
373
- - Typical: 0-3 entries per plan session
84
+ S_REGISTER END DO: A_REGISTER
85
+ </transitions>
374
86
 
375
- 3. **Export results**:
376
- - Export `results.csv` from master `tasks.csv`
377
- - Generate `context.md`: summary (phase, task count, wave count, complexity, exploration count), exploration findings per angle, plan overview (approach, task IDs, waves), next steps
87
+ <actions>
378
88
 
379
- 4. **Collision detection**: Scan same-milestone plans for overlapping file targets:
380
- ```
381
- other_plans = state.json.artifacts.filter(a => a.milestone == current && a.type == "plan" && a.id != this)
382
- For each other_plan: read .task/TASK-*.json, collect files[].path
383
- collisions = intersection(this_plan_files, other_plan_files)
384
- If collisions.length > 0: emit W004, display collision table (non-blocking)
385
- ```
89
+ ### Exploration agent responsibilities (W1)
90
+ Each explores one angle: architecture (module boundaries, deps), patterns (similar implementations), tests (framework, conventions), risks (complexity, blockers). Reads files, maps dependencies, shares via discoveries.ndjson.
386
91
 
387
- 5. **Update index.json**: set `status: "planning"`, `plan: { task_ids, task_count, complexity, waves }`, `updated_at`
92
+ ### Planning agent responsibilities (W2)
93
+ Consumes all exploration findings + context.md + specs. Produces:
94
+ - `plan.json`: summary, approach, task_ids, waves (with phase labels), confidence section
95
+ - `.task/TASK-*.json`: each with read_first[], convergence.criteria[] (grep-verifiable), concrete action/implementation
96
+ - Deep Work Rules: every task has read_first with file being modified + source of truth files
388
97
 
389
- 6. **Register PLN artifact** in state.json:
390
- ```json
391
- { "id": "PLN-NNN", "type": "plan", "milestone": "current", "phase": "target_phase",
392
- "scope": "phase", "path": "scratch/{YYYYMMDD}-plan-P{N}-{slug}",
393
- "status": "completed", "depends_on": "anl_art.id || exec_art.id" }
394
- ```
98
+ ### A_PLAN_CHECK
99
+ Run plan-checker: coverage, dependency validity, criteria quality, pressure pass on highest-complexity task.
100
+ Confidence: 5-dimension factor model + readiness gate.
101
+ Collision detection against same-milestone plans.
395
102
 
396
- 7. **Issue linking** (if --gaps):
397
- For each TASK with `issue_id`: update issue in `issues.jsonl` (`task_refs` += TASK-NNN, `task_plan_dir`, `status: "planned"`, `updated_at`) + append history entry. Ensures bidirectional issue-TASK traceability.
103
+ ### A_REGISTER
104
+ 1. Register PLN artifact in state.json (scope, milestone, phase, depends_on)
105
+ 2. Update index.json with plan metadata
106
+ 3. If --gaps: link TASK files back to issues bidirectionally (task_refs[], task_plan_dir in issues.jsonl)
107
+ 4. Display: phase, task count, wave count, check status, confidence, next steps
398
108
 
399
- 8. **Display summary + options** (skip options if AUTO_YES):
400
- ```
401
- === PLAN READY ===
402
- Phase: {phase_name}
403
- Tasks: {task_count} tasks in {wave_count} waves
404
- Check: {checker_status} (iteration {check_count}/{max_checks})
405
- Collision: {collision_status}
406
- Confidence: {overall}% (weakest: {dim})
109
+ </actions>
110
+ </state_machine>
407
111
 
408
- Next steps:
409
- $maestro-execute "{phase}" -- Execute the plan
410
- $maestro-plan "{phase}" -- Re-plan with modifications
411
- ```
412
-
413
- ### Shared Discovery Board Protocol
414
-
415
- #### Standard Discovery Types
416
-
417
- | Type | Dedup Key | Data Schema | Description |
418
- |------|-----------|-------------|-------------|
419
- | `code_pattern` | `data.name` | `{name, file, description}` | Reusable code pattern found |
420
- | `integration_point` | `data.file` | `{file, description, exports[]}` | Module connection point |
421
- | `convention` | singleton | `{naming, imports, formatting}` | Project code conventions |
422
- | `blocker` | `data.issue` | `{issue, severity, impact}` | Blocking issue found |
423
- | `tech_stack` | singleton | `{framework, language, tools[]}` | Technology stack info |
424
-
425
- #### Domain Discovery Types
426
-
427
- | Type | Dedup Key | Data Schema | Description |
428
- |------|-----------|-------------|-------------|
429
- | `existing_pattern` | `data.name` | `{name, file, description, usage}` | Existing feature pattern to follow |
430
- | `dependency_map` | `data.module` | `{module, imports[], exports[], dependents[]}` | Module dependency mapping |
431
- | `risk_factor` | `data.risk` | `{risk, severity, mitigation, affected_files[]}` | Identified risk |
432
- | `test_command` | `data.command` | `{command, scope, framework}` | Test execution command |
433
-
434
- #### Protocol
435
-
436
- 1. **Read** `{session_folder}/discoveries.ndjson` before own exploration
437
- 2. **Skip covered**: If discovery of same type + dedup key exists, skip
438
- 3. **Write immediately**: Append findings as found
439
- 4. **Append-only**: Never modify or delete
440
- 5. **Deduplicate**: Check before writing
441
-
442
- ```bash
443
- echo '{"ts":"<ISO>","worker":"{id}","type":"existing_pattern","data":{"name":"Result error handling","file":"src/utils/result.ts","description":"All functions return Result<T,E> instead of throwing","usage":"Used in auth, payments, validation modules"}}' >> {session_folder}/discoveries.ndjson
444
- ```
445
- </execution>
112
+ <discovery_board>
113
+ | Type | Dedup Key | Data |
114
+ |------|-----------|------|
115
+ | existing_pattern | name | {name, file, description, usage} |
116
+ | dependency_map | module | {module, imports[], exports[], dependents[]} |
117
+ | risk_factor | risk | {risk, severity, mitigation, affected_files[]} |
118
+ | convention | singleton | {naming, imports, formatting} |
119
+ | test_command | command | {command, scope, framework} |
120
+ </discovery_board>
446
121
 
447
122
  <error_codes>
448
-
449
- | Error | Resolution |
450
- |-------|------------|
451
- | Phase argument required | Abort with error: "Phase argument required" |
452
- | Phase directory not found | Abort with error: "Phase {N} not found. Run init first." |
453
- | --gaps requires gaps source | Abort with error: "--gaps requires issues.jsonl, verification.json, or uat.md" |
454
- | No plan found to revise (--revise) | Use --dir to specify plan, or create plan first |
455
- | Plan directory not found (--check) | Check path, use --dir |
456
- | No context.md found | Warn, proceed with exploration only |
457
- | Wiki search unavailable (W003) | Continue without prior knowledge context |
458
- | Collision detected (W004) | Review colliding files, confirm or adjust scope |
459
- | Exploration agent timeout | Mark as failed, continue with available explorations |
460
- | Planning agent fails | Retry once with simplified context, then abort |
461
- | Plan produces invalid JSON | Retry once, then abort with error details |
462
- | Plan-checker exceeds 3 rounds | Accept plan with warnings, note in index.json |
463
- | CSV parse error | Validate format, show line number |
464
- | discoveries.ndjson corrupt | Ignore malformed lines |
465
- | Continue mode: no session found | List available sessions |
123
+ | Condition | Recovery |
124
+ |-----------|----------|
125
+ | No args and no roadmap | Provide phase number or topic |
126
+ | --gaps but no gap source | Run maestro-verify first |
127
+ | Planning agent fails | Retry once with simplified context |
128
+ | Plan-checker exceeds 3 rounds | Accept with warnings |
466
129
  </error_codes>
467
130
 
468
131
  <success_criteria>
469
- - [ ] Session folder created with valid tasks.csv
470
- - [ ] All waves executed in order
471
- - [ ] plan.json produced in phase directory
472
- - [ ] .task/TASK-*.json files produced for all tasks
473
- - [ ] Plan passes quality checks (coverage, deps, criteria)
474
- - [ ] Plan confidence scored with 5-dimension factor model
475
- - [ ] Readiness gate checked before confirmation
476
- - [ ] plan.json includes confidence section
477
- - [ ] Collision detection executed against same-milestone plans
478
- - [ ] PLN artifact registered in state.json
479
- - [ ] context.md produced with exploration findings + plan overview
480
- - [ ] index.json updated with plan metadata
481
- - [ ] Issues linked bidirectionally (if --gaps mode)
482
- - [ ] Wiki knowledge integrated (if available)
483
- - [ ] Team conflict preflight checked
484
- - [ ] discoveries.ndjson append-only throughout
132
+ - [ ] Parallel explorations + sequential planning via spawn_agents_on_csv
133
+ - [ ] plan.json + TASK files with read_first and grep-verifiable convergence criteria
134
+ - [ ] Plan confidence scored, readiness gate checked, collision detected
135
+ - [ ] PLN artifact registered, issues linked if --gaps
485
136
  </success_criteria>