maestro-flow 0.3.9 → 0.3.10

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 (125) hide show
  1. package/.claude/commands/maestro-analyze.md +46 -3
  2. package/.claude/commands/maestro-execute.md +14 -0
  3. package/.claude/commands/maestro-plan.md +16 -0
  4. package/.claude/commands/manage-harvest.md +1 -1
  5. package/.claude/commands/manage-issue-discover.md +2 -2
  6. package/.claude/commands/manage-issue.md +3 -3
  7. package/.codex/skills/maestro/SKILL.md +463 -0
  8. package/.codex/skills/maestro-analyze/SKILL.md +28 -7
  9. package/.codex/skills/maestro-chain/SKILL.md +248 -0
  10. package/.codex/skills/maestro-coordinate/SKILL.md +279 -224
  11. package/.codex/skills/maestro-execute/SKILL.md +8 -0
  12. package/.codex/skills/maestro-plan/SKILL.md +9 -1
  13. package/README.md +7 -7
  14. package/README.zh-CN.md +7 -7
  15. package/chains/issue-lifecycle.json +13 -13
  16. package/chains/singles/issue-analyze.json +3 -3
  17. package/chains/singles/issue-execute.json +3 -3
  18. package/chains/singles/issue-plan.json +3 -3
  19. package/dashboard/dist-server/dashboard/src/server/commander/commander-agent.js +2 -2
  20. package/dashboard/dist-server/dashboard/src/server/commander/commander-agent.js.map +1 -1
  21. package/dashboard/dist-server/dashboard/src/server/coordinator/chain-map.js +3 -3
  22. package/dashboard/dist-server/dashboard/src/server/coordinator/chain-map.js.map +1 -1
  23. package/dashboard/dist-server/dashboard/src/server/routes/issues.js +34 -0
  24. package/dashboard/dist-server/dashboard/src/server/routes/issues.js.map +1 -1
  25. package/dashboard/dist-server/dashboard/src/server/ws/handlers/execution-handler.js +2 -3
  26. package/dashboard/dist-server/dashboard/src/server/ws/handlers/execution-handler.js.map +1 -1
  27. package/dashboard/dist-server/dashboard/src/shared/issue-types.d.ts +5 -0
  28. package/dashboard/dist-server/dashboard/src/shared/issue-types.js.map +1 -1
  29. package/dashboard/dist-server/dashboard/src/shared/normalize-task.d.ts +2 -0
  30. package/dashboard/dist-server/dashboard/src/shared/normalize-task.js +75 -0
  31. package/dashboard/dist-server/dashboard/src/shared/normalize-task.js.map +1 -0
  32. package/dashboard/dist-server/src/hooks/constants.d.ts +90 -12
  33. package/dashboard/dist-server/src/hooks/constants.js +149 -16
  34. package/dashboard/dist-server/src/hooks/constants.js.map +1 -1
  35. package/dashboard/dist-server/src/types/index.d.ts +5 -0
  36. package/dist/src/commands/collab.d.ts +1 -34
  37. package/dist/src/commands/collab.d.ts.map +1 -1
  38. package/dist/src/commands/collab.js +4 -72
  39. package/dist/src/commands/collab.js.map +1 -1
  40. package/dist/src/commands/hooks.d.ts +5 -1
  41. package/dist/src/commands/hooks.d.ts.map +1 -1
  42. package/dist/src/commands/hooks.js +50 -10
  43. package/dist/src/commands/hooks.js.map +1 -1
  44. package/dist/src/commands/install-ui/InstallConfirm.d.ts +3 -1
  45. package/dist/src/commands/install-ui/InstallConfirm.d.ts.map +1 -1
  46. package/dist/src/commands/install-ui/InstallConfirm.js +3 -1
  47. package/dist/src/commands/install-ui/InstallConfirm.js.map +1 -1
  48. package/dist/src/commands/install-ui/InstallExecution.d.ts.map +1 -1
  49. package/dist/src/commands/install-ui/InstallExecution.js +5 -1
  50. package/dist/src/commands/install-ui/InstallExecution.js.map +1 -1
  51. package/dist/src/commands/install-ui/InstallFlow.d.ts.map +1 -1
  52. package/dist/src/commands/install-ui/InstallFlow.js +7 -3
  53. package/dist/src/commands/install-ui/InstallFlow.js.map +1 -1
  54. package/dist/src/commands/install-ui/StatuslineConfig.d.ts +6 -1
  55. package/dist/src/commands/install-ui/StatuslineConfig.d.ts.map +1 -1
  56. package/dist/src/commands/install-ui/StatuslineConfig.js +27 -5
  57. package/dist/src/commands/install-ui/StatuslineConfig.js.map +1 -1
  58. package/dist/src/hooks/__tests__/statusline-visual-test.d.ts +7 -0
  59. package/dist/src/hooks/__tests__/statusline-visual-test.d.ts.map +1 -0
  60. package/dist/src/hooks/__tests__/statusline-visual-test.js +236 -0
  61. package/dist/src/hooks/__tests__/statusline-visual-test.js.map +1 -0
  62. package/dist/src/hooks/constants.d.ts +90 -12
  63. package/dist/src/hooks/constants.d.ts.map +1 -1
  64. package/dist/src/hooks/constants.js +149 -16
  65. package/dist/src/hooks/constants.js.map +1 -1
  66. package/dist/src/hooks/guards/index.d.ts +1 -0
  67. package/dist/src/hooks/guards/index.d.ts.map +1 -1
  68. package/dist/src/hooks/guards/index.js +1 -0
  69. package/dist/src/hooks/guards/index.js.map +1 -1
  70. package/dist/src/hooks/guards/preflight-guard.d.ts +29 -0
  71. package/dist/src/hooks/guards/preflight-guard.d.ts.map +1 -0
  72. package/dist/src/hooks/guards/preflight-guard.js +95 -0
  73. package/dist/src/hooks/guards/preflight-guard.js.map +1 -0
  74. package/dist/src/hooks/index.d.ts +1 -0
  75. package/dist/src/hooks/index.d.ts.map +1 -1
  76. package/dist/src/hooks/index.js +1 -0
  77. package/dist/src/hooks/index.js.map +1 -1
  78. package/dist/src/hooks/preflight-core.d.ts +37 -0
  79. package/dist/src/hooks/preflight-core.d.ts.map +1 -0
  80. package/dist/src/hooks/preflight-core.js +86 -0
  81. package/dist/src/hooks/preflight-core.js.map +1 -0
  82. package/dist/src/hooks/statusline.d.ts +8 -17
  83. package/dist/src/hooks/statusline.d.ts.map +1 -1
  84. package/dist/src/hooks/statusline.js +269 -112
  85. package/dist/src/hooks/statusline.js.map +1 -1
  86. package/dist/src/i18n/locales/en.d.ts.map +1 -1
  87. package/dist/src/i18n/locales/en.js +5 -0
  88. package/dist/src/i18n/locales/en.js.map +1 -1
  89. package/dist/src/i18n/locales/zh.d.ts.map +1 -1
  90. package/dist/src/i18n/locales/zh.js +5 -0
  91. package/dist/src/i18n/locales/zh.js.map +1 -1
  92. package/dist/src/i18n/types.d.ts +5 -0
  93. package/dist/src/i18n/types.d.ts.map +1 -1
  94. package/dist/src/tools/collab-adapter.d.ts +17 -0
  95. package/dist/src/tools/collab-adapter.d.ts.map +1 -1
  96. package/dist/src/tools/collab-adapter.js +138 -0
  97. package/dist/src/tools/collab-adapter.js.map +1 -1
  98. package/dist/src/tools/merge-validator.d.ts +24 -0
  99. package/dist/src/tools/merge-validator.d.ts.map +1 -0
  100. package/dist/src/tools/merge-validator.js +220 -0
  101. package/dist/src/tools/merge-validator.js.map +1 -0
  102. package/dist/src/types/index.d.ts +5 -0
  103. package/dist/src/types/index.d.ts.map +1 -1
  104. package/package.json +1 -1
  105. package/templates/cli/prompts/workflow-skill-conflict-patterns.txt +3 -3
  106. package/templates/cli/prompts/workflow-skill-lessons-learned.txt +3 -3
  107. package/templates/search-tools.md +1 -1
  108. package/workflows/cli-tools-usage.md +44 -27
  109. package/workflows/delegate-usage.md +3 -3
  110. package/workflows/issue-analyze.md +6 -2
  111. package/workflows/issue-discover.md +4 -4
  112. package/workflows/issue-execute.md +6 -3
  113. package/workflows/issue-plan.md +5 -2
  114. package/workflows/maestro-coordinate.codex.md +281 -470
  115. package/workflows/maestro-coordinate.md +14 -14
  116. package/workflows/maestro-link-coordinate.md +2 -2
  117. package/workflows/maestro.codex.md +710 -0
  118. package/workflows/maestro.md +10 -11
  119. package/workflows/retrospective.md +1 -1
  120. package/.claude/commands/manage-issue-analyze.md +0 -62
  121. package/.claude/commands/manage-issue-execute.md +0 -73
  122. package/.claude/commands/manage-issue-plan.md +0 -62
  123. package/.codex/skills/manage-issue-analyze/SKILL.md +0 -207
  124. package/.codex/skills/manage-issue-execute/SKILL.md +0 -200
  125. package/.codex/skills/manage-issue-plan/SKILL.md +0 -186
@@ -1,186 +0,0 @@
1
- ---
2
- name: manage-issue-plan
3
- description: Solution planning for a specific issue. Auto-detects analysis context, runs maestro delegate planning, and attaches a structured solution record with ordered steps and verification criteria to the issue in issues.jsonl.
4
- argument-hint: "<ISS-ID> [--tool gemini|qwen] [--from-analysis]"
5
- allowed-tools: Read, Write, Bash, Glob, Grep
6
- ---
7
-
8
- # Issue Plan
9
-
10
- ## Usage
11
-
12
- ```bash
13
- $manage-issue-plan "ISS-20260401-001"
14
- $manage-issue-plan "ISS-20260401-001 --from-analysis"
15
- $manage-issue-plan "ISS-20260401-001 --tool qwen"
16
- ```
17
-
18
- **Flags**:
19
- - `<ISS-ID>` — Issue ID in `ISS-XXXXXXXX-NNN` format (required)
20
- - `--tool gemini|qwen` — CLI tool for planning (default: gemini)
21
- - `--from-analysis` — Explicitly include analysis context. Auto-detected when `issue.analysis` exists.
22
-
23
- **State files**: `.workflow/issues/issues.jsonl` (read + write)
24
-
25
- ---
26
-
27
- ## Overview
28
-
29
- Sequential 4-step pipeline: load issue → build planning prompt → run CLI planning → attach solution record. When an analysis record exists (from `manage-issue-analyze`), it is automatically included in the planning prompt to ground the solution in known root cause and affected files. This is the second step in the issue resolution workflow: **analyze → plan → execute**.
30
-
31
- ```
32
- Load Issue → Build Prompt → CLI Planning → Attach Solution
33
- (+ analysis (auto-detect (gemini/qwen) (apply_patch)
34
- context) analysis)
35
- ```
36
-
37
- ---
38
-
39
- ## Implementation
40
-
41
- ### Step 1: Load Issue and Detect Analysis Context
42
-
43
- ```javascript
44
- functions.update_plan({
45
- explanation: "Starting issue planning",
46
- plan: [
47
- { step: "Load issue and detect analysis", status: "in_progress" },
48
- { step: "Build planning prompt", status: "pending" },
49
- { step: "Run CLI planning", status: "pending" },
50
- { step: "Attach solution record", status: "pending" }
51
- ]
52
- })
53
- ```
54
-
55
- Read `.workflow/issues/issues.jsonl`, find the row where `id == <ISS-ID>`. Validate format and existence.
56
-
57
- Check analysis context:
58
- - `issue.analysis` non-null → `hasAnalysis = true` (auto-detect, no flag needed)
59
- - `--from-analysis` present AND `issue.analysis` is null → emit W001, proceed without context
60
-
61
- ### Step 2: Build Planning Prompt
62
-
63
- ```
64
- PURPOSE: Create a concrete, codebase-aware solution plan for '${issue.title}';
65
- success = ordered steps with exact file paths, function names, and verification criteria.
66
- TASK: Define solution approach | Break into ordered steps | Identify files to change | Define verification
67
- MODE: analysis
68
- CONTEXT: @src/**/* | Memory: Issue: ${issue.description}
69
- ${hasAnalysis ? `Root cause: ${analysis.root_cause}
70
- Affected files: ${analysis.affected_files.join(', ')}
71
- Fix direction: ${analysis.fix_direction}` : ''}
72
- EXPECTED: JSON: approach (string), steps [{order, description, file, action}],
73
- verification (string[]), estimated_risk (low|medium|high)
74
- CONSTRAINTS: Concrete steps only | File:line references required | No speculative changes
75
- ```
76
-
77
- ### Step 3: Run CLI Planning
78
-
79
- > **Prompt safety**: `issue.title`, `issue.description`, and analysis fields may contain quotes or shell-special characters. Write the assembled prompt to a temp file before passing to exec_command.
80
-
81
- ```javascript
82
- // Write prompt to temp file to avoid shell injection
83
- Write(`/tmp/iss-plan-${issueId}.txt`, prompt)
84
- functions.exec_command({
85
- cmd: `maestro delegate "$(cat /tmp/iss-plan-${issueId}.txt)" --to ${tool} --mode analysis`,
86
- workdir: "."
87
- })
88
- ```
89
-
90
- Parse CLI output into `solution` object:
91
- ```json
92
- {
93
- "approach": "...",
94
- "steps": [
95
- { "order": 1, "description": "...", "file": "src/foo.ts", "action": "modify" },
96
- { "order": 2, "description": "...", "file": "src/bar.ts", "action": "add" }
97
- ],
98
- "verification": ["Run unit tests for X", "Verify Y behavior"],
99
- "estimated_risk": "medium",
100
- "planned_at": "<ISO>",
101
- "tool": "<tool>"
102
- }
103
- ```
104
-
105
- ```javascript
106
- functions.update_plan({
107
- explanation: "Planning complete",
108
- plan: [
109
- { step: "Load issue and detect analysis", status: "completed" },
110
- { step: "Build planning prompt", status: "completed" },
111
- { step: "Run CLI planning", status: "completed" },
112
- { step: "Attach solution record", status: "in_progress" }
113
- ]
114
- })
115
- ```
116
-
117
- ### Step 4: Attach Solution Record and Report
118
-
119
- ```javascript
120
- // Read issues.jsonl, update the matching line in-place
121
- const historyEntry = { action: "planned", at: new Date().toISOString(), by: "manage-issue-plan", summary: `Approach: ${solution.approach} — ${solution.steps.length} steps` }
122
- const raw = Read('.workflow/issues/issues.jsonl')
123
- const updated = raw.split('\n')
124
- .filter(l => l.trim())
125
- .map(l => {
126
- const row = JSON.parse(l)
127
- if (row.id !== issueId) return l
128
- row.solution = solution
129
- row.issue_history = [...(row.issue_history || []), historyEntry]
130
- return JSON.stringify(row)
131
- })
132
- .join('\n') + '\n'
133
- Write('.workflow/issues/issues.jsonl', updated)
134
- ```
135
-
136
- ```javascript
137
- functions.update_plan({
138
- explanation: "Solution attached",
139
- plan: [
140
- { step: "Load issue and detect analysis", status: "completed" },
141
- { step: "Build planning prompt", status: "completed" },
142
- { step: "Run CLI planning", status: "completed" },
143
- { step: "Attach solution record", status: "completed" }
144
- ]
145
- })
146
- ```
147
-
148
- Display:
149
- ```
150
- === SOLUTION PLAN ===
151
- Issue: <ISS-ID>: <title>
152
- Approach: <approach>
153
- Risk: <estimated_risk>
154
- Steps: <N>
155
-
156
- Steps:
157
- 1. <description> → <file> (<action>)
158
- 2. <description> → <file> (<action>)
159
-
160
- Verification:
161
- - <verification 1>
162
-
163
- Next: $manage-issue-execute "<ISS-ID>"
164
- ```
165
-
166
- ---
167
-
168
- ## Error Handling
169
-
170
- | Code | Severity | Condition | Recovery |
171
- |------|----------|-----------|----------|
172
- | E001 | error | No ISS-ID provided | Display usage hint |
173
- | E002 | error | ISS-ID not found in issues.jsonl | Suggest `$manage-issue "list"` |
174
- | E003 | error | CLI planning returned no parseable result | Retry with different `--tool` |
175
- | W001 | warning | `--from-analysis` but no analysis record exists | Proceed without context; suggest `$manage-issue-analyze` |
176
-
177
- ---
178
-
179
- ## Core Rules
180
-
181
- 1. **Load before plan**: Validate issue existence before any CLI call
182
- 2. **Auto-detect analysis**: Check `issue.analysis` — never require explicit `--from-analysis` if data is present
183
- 3. **Concrete steps only**: Each step must have a file reference — no "investigate further" placeholders
184
- 4. **Preserve existing fields**: Patch only `solution` + `issue_history` — all other issue fields unchanged
185
- 5. **Append-only history**: Append to `issue_history`, never overwrite existing entries
186
- 6. **Next-step routing**: Always display `$manage-issue-execute "<ISS-ID>"` at the end