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.
- package/.claude/commands/maestro-analyze.md +46 -3
- package/.claude/commands/maestro-execute.md +14 -0
- package/.claude/commands/maestro-plan.md +16 -0
- package/.claude/commands/manage-harvest.md +1 -1
- package/.claude/commands/manage-issue-discover.md +2 -2
- package/.claude/commands/manage-issue.md +3 -3
- package/.codex/skills/maestro/SKILL.md +463 -0
- package/.codex/skills/maestro-analyze/SKILL.md +28 -7
- package/.codex/skills/maestro-chain/SKILL.md +248 -0
- package/.codex/skills/maestro-coordinate/SKILL.md +279 -224
- package/.codex/skills/maestro-execute/SKILL.md +8 -0
- package/.codex/skills/maestro-plan/SKILL.md +9 -1
- package/README.md +7 -7
- package/README.zh-CN.md +7 -7
- 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/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/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/src/hooks/constants.d.ts +90 -12
- package/dashboard/dist-server/src/hooks/constants.js +149 -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 +4 -72
- 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 +50 -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/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 +90 -12
- package/dist/src/hooks/constants.d.ts.map +1 -1
- package/dist/src/hooks/constants.js +149 -16
- package/dist/src/hooks/constants.js.map +1 -1
- package/dist/src/hooks/guards/index.d.ts +1 -0
- package/dist/src/hooks/guards/index.d.ts.map +1 -1
- package/dist/src/hooks/guards/index.js +1 -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/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/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/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/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/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/types/index.d.ts +5 -0
- package/dist/src/types/index.d.ts.map +1 -1
- package/package.json +1 -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/cli-tools-usage.md +44 -27
- package/workflows/delegate-usage.md +3 -3
- package/workflows/issue-analyze.md +6 -2
- package/workflows/issue-discover.md +4 -4
- 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/retrospective.md +1 -1
- 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,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
|