maxsimcli 4.11.0 → 4.13.0
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/dist/assets/CHANGELOG.md +14 -0
- package/dist/assets/templates/workflows/go.md +63 -59
- package/dist/assets/templates/workflows/plan-create.md +142 -54
- package/dist/assets/templates/workflows/plan-discuss.md +33 -35
- package/dist/assets/templates/workflows/plan-phase.md +18 -1
- package/dist/assets/templates/workflows/plan-research.md +36 -36
- package/dist/assets/templates/workflows/plan.md +67 -53
- package/dist/assets/templates/workflows/progress.md +100 -133
- package/dist/assets/templates/workflows/verify-phase.md +104 -13
- package/package.json +1 -1
package/dist/assets/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [4.12.0](https://github.com/maystudios/maxsimcli/compare/v4.11.0...v4.12.0) (2026-03-11)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **workflows:** rewrite plan workflows for GitHub-first artifact storage and stage detection ([289fc7e](https://github.com/maystudios/maxsimcli/commit/289fc7e4fbc583e2b182d4a73ebdfc0d85123d2b))
|
|
7
|
+
|
|
8
|
+
# [4.11.0](https://github.com/maystudios/maxsimcli/compare/v4.10.0...v4.11.0) (2026-03-11)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **workflows:** wire mcp_github_setup and phase issue creation into init workflows ([fe30a97](https://github.com/maystudios/maxsimcli/commit/fe30a979957e9a480fc6e98bc9e60d51d2f428e2))
|
|
14
|
+
|
|
1
15
|
# [4.10.0](https://github.com/maystudios/maxsimcli/compare/v4.9.0...v4.10.0) (2026-03-11)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<purpose>
|
|
2
|
-
Auto-detect project state through
|
|
2
|
+
Auto-detect project state through live GitHub queries, surface problems proactively, and dispatch to the appropriate MAXSIM command. Uses the Show + Act pattern: display detection reasoning first, then act immediately.
|
|
3
3
|
</purpose>
|
|
4
4
|
|
|
5
5
|
<required_reading>
|
|
@@ -30,19 +30,24 @@ PLANNING_EXISTS=$(test -d .planning && echo "true" || echo "false")
|
|
|
30
30
|
|
|
31
31
|
If `.planning/` does not exist, skip all other checks and go directly to the decision tree (Rule 1: No project found).
|
|
32
32
|
|
|
33
|
-
**2. Load project
|
|
33
|
+
**2. Load local project context (always from local files per WIRE-02):**
|
|
34
34
|
```bash
|
|
35
|
-
# State snapshot
|
|
35
|
+
# State snapshot (local)
|
|
36
36
|
STATE=$(node ~/.claude/maxsim/bin/maxsim-tools.cjs state-snapshot 2>/dev/null || echo "{}")
|
|
37
|
-
|
|
38
|
-
# Roadmap analysis
|
|
39
|
-
ROADMAP=$(node ~/.claude/maxsim/bin/maxsim-tools.cjs roadmap analyze 2>/dev/null || echo "{}")
|
|
40
37
|
```
|
|
41
38
|
|
|
42
|
-
|
|
43
|
-
- `.planning/
|
|
44
|
-
- `.planning/
|
|
45
|
-
|
|
39
|
+
Read local files for project context:
|
|
40
|
+
- `.planning/STATE.md` — blockers, decisions, session continuity
|
|
41
|
+
- `.planning/ROADMAP.md` — phase structure and phase ordering
|
|
42
|
+
|
|
43
|
+
**3. Live GitHub state (primary source — always-live, no cached state):**
|
|
44
|
+
|
|
45
|
+
Call `mcp_get_all_progress` to get current state of all phases from GitHub. Returns:
|
|
46
|
+
- `phase_number`, `title`, `issue_number`
|
|
47
|
+
- `total_tasks`, `completed_tasks`, `remaining_tasks`
|
|
48
|
+
- `status` (GitHub board column: To Do / In Progress / In Review / Done)
|
|
49
|
+
|
|
50
|
+
Call `mcp_detect_interrupted` to check for any phases that were interrupted mid-execution (e.g., agent was stopped while a task was marked in-flight).
|
|
46
51
|
|
|
47
52
|
**4. Git context:**
|
|
48
53
|
```bash
|
|
@@ -52,20 +57,12 @@ GIT_STATUS=$(git status --porcelain 2>/dev/null | head -20)
|
|
|
52
57
|
# Recent commits
|
|
53
58
|
RECENT_COMMITS=$(git log --oneline -5 2>/dev/null)
|
|
54
59
|
```
|
|
55
|
-
|
|
56
|
-
**5. Phase directory scan:**
|
|
57
|
-
```bash
|
|
58
|
-
# List phase directories and their contents
|
|
59
|
-
ls -1 .planning/phases/ 2>/dev/null
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
For each phase directory, check for PLAN.md, SUMMARY.md, CONTEXT.md, RESEARCH.md files to determine phase state.
|
|
63
60
|
</step>
|
|
64
61
|
|
|
65
62
|
<step name="problem_detection">
|
|
66
63
|
**Phase 2: Problem Detection**
|
|
67
64
|
|
|
68
|
-
Check for problems BEFORE suggesting any action. All problems are blocking
|
|
65
|
+
Check for problems BEFORE suggesting any action. All problems are blocking — no severity tiers.
|
|
69
66
|
|
|
70
67
|
**Check each of these in order:**
|
|
71
68
|
|
|
@@ -78,7 +75,7 @@ If uncommitted changes exist in `.planning/`:
|
|
|
78
75
|
## Problem Detected
|
|
79
76
|
|
|
80
77
|
**Issue:** Uncommitted changes in .planning/ directory
|
|
81
|
-
**Impact:** State drift
|
|
78
|
+
**Impact:** State drift — local planning files may diverge from team or lose work
|
|
82
79
|
**Resolution:** Commit planning changes to preserve state
|
|
83
80
|
|
|
84
81
|
**Files with changes:**
|
|
@@ -110,22 +107,18 @@ Resolve this before continuing. Options:
|
|
|
110
107
|
|
|
111
108
|
Block until user responds.
|
|
112
109
|
|
|
113
|
-
**3. Failed verification**
|
|
114
|
-
Check for
|
|
115
|
-
```bash
|
|
116
|
-
grep -l "FAIL\|status: failed" .planning/phases/*/VERIFICATION.md 2>/dev/null | tail -1
|
|
117
|
-
```
|
|
118
|
-
If found:
|
|
110
|
+
**3. Failed verification on GitHub**
|
|
111
|
+
Check if any phase issue has a verification comment with FAIL status (from live GitHub data via `mcp_get_all_progress` — look for phases stuck in "In Review" with a known failure, or check recent comments via `mcp_get_issue_detail` for the current phase issue):
|
|
119
112
|
```
|
|
120
113
|
## Problem Detected
|
|
121
114
|
|
|
122
115
|
**Issue:** Phase verification failed
|
|
123
|
-
**Phase:** {phase number and name}
|
|
124
|
-
**Impact:** Phase is not verified as complete
|
|
116
|
+
**Phase:** {phase number and name} (GitHub Issue #{issue_number})
|
|
117
|
+
**Impact:** Phase is not verified as complete — may have gaps
|
|
125
118
|
**Resolution:** Re-run verification or fix identified issues
|
|
126
119
|
|
|
127
120
|
Resolve this before continuing. Options:
|
|
128
|
-
1. View verification results
|
|
121
|
+
1. View verification results (check GitHub issue comments)
|
|
129
122
|
2. Re-execute to fix issues
|
|
130
123
|
3. Skip and continue anyway
|
|
131
124
|
```
|
|
@@ -142,6 +135,8 @@ Block until user responds.
|
|
|
142
135
|
|
|
143
136
|
Apply rules in strict precedence order. The FIRST matching rule determines the action.
|
|
144
137
|
|
|
138
|
+
Use live GitHub data from `mcp_get_all_progress` and `mcp_detect_interrupted` (gathered in Phase 1) as the primary source of truth for phase state. Use local ROADMAP.md for phase ordering only.
|
|
139
|
+
|
|
145
140
|
```
|
|
146
141
|
Rule 1: No .planning/ directory?
|
|
147
142
|
-> Action: /maxsim:init
|
|
@@ -151,31 +146,35 @@ Rule 2: Has blockers in STATE.md? (not cleared in problem detection)
|
|
|
151
146
|
-> Action: Surface blocker, suggest resolution
|
|
152
147
|
-> Reasoning: "BLOCKED: {blocker text}"
|
|
153
148
|
|
|
154
|
-
Rule 3:
|
|
155
|
-
->
|
|
149
|
+
Rule 3: Interrupted phase detected (from mcp_detect_interrupted)?
|
|
150
|
+
-> Action: /maxsim:execute {N}
|
|
151
|
+
-> Reasoning: "Phase {N} ({name}) was interrupted. Resuming execution."
|
|
152
|
+
|
|
153
|
+
Rule 4: Phase "In Progress" on GitHub board with incomplete tasks?
|
|
154
|
+
-> Check: mcp_get_all_progress returns a phase with status="In Progress" and remaining_tasks > 0
|
|
156
155
|
-> Action: /maxsim:execute {N}
|
|
157
|
-
-> Reasoning: "Phase {N} ({name}) has {
|
|
156
|
+
-> Reasoning: "Phase {N} ({name}) has {remaining} tasks remaining. Ready to continue."
|
|
158
157
|
|
|
159
|
-
Rule
|
|
160
|
-
-> Check:
|
|
158
|
+
Rule 5: Phase "To Do" on GitHub board (not yet started)?
|
|
159
|
+
-> Check: mcp_get_all_progress returns the next unstarted phase (status="To Do")
|
|
161
160
|
-> Action: /maxsim:plan {N}
|
|
162
161
|
-> Reasoning: "Phase {N} ({name}) needs planning."
|
|
163
162
|
|
|
164
|
-
Sub-check: Does CONTEXT.md exist?
|
|
163
|
+
Sub-check: Does local CONTEXT.md exist?
|
|
165
164
|
-> If yes: "Discussion complete, ready for research + planning."
|
|
166
165
|
-> If no: "Starting from discussion stage."
|
|
167
166
|
|
|
168
|
-
Rule
|
|
169
|
-
-> Check:
|
|
170
|
-
-> Action: /maxsim:
|
|
171
|
-
-> Reasoning: "Phase {N}
|
|
167
|
+
Rule 6: Current phase "In Review" on GitHub board?
|
|
168
|
+
-> Check: mcp_get_all_progress returns a phase with status="In Review"
|
|
169
|
+
-> Action: /maxsim:verify {N}
|
|
170
|
+
-> Reasoning: "Phase {N} ({name}) is awaiting verification."
|
|
172
171
|
|
|
173
|
-
Rule
|
|
174
|
-
-> Check: all phases
|
|
172
|
+
Rule 7: All phases "Done" on GitHub board?
|
|
173
|
+
-> Check: mcp_get_all_progress — all phases have status="Done"
|
|
175
174
|
-> Action: /maxsim:progress
|
|
176
175
|
-> Reasoning: "All phases complete. Milestone ready for review."
|
|
177
176
|
|
|
178
|
-
Rule
|
|
177
|
+
Rule 8: None of the above?
|
|
179
178
|
-> Action: Show interactive menu
|
|
180
179
|
-> Reasoning: "Project state is ambiguous. Here are your options."
|
|
181
180
|
```
|
|
@@ -186,53 +185,55 @@ Rule 7: None of the above?
|
|
|
186
185
|
|
|
187
186
|
Once a rule matches, display detection reasoning FIRST, then act immediately.
|
|
188
187
|
|
|
189
|
-
**Format for auto-dispatch (Rules 1-
|
|
188
|
+
**Format for auto-dispatch (Rules 1-7):**
|
|
190
189
|
|
|
191
190
|
```
|
|
192
191
|
## Detected: {summary of what was found}
|
|
193
192
|
|
|
194
193
|
**Project:** {project name from PROJECT.md, or "New project"}
|
|
195
194
|
**Milestone:** {milestone from ROADMAP.md, or "Not started"}
|
|
196
|
-
**Current phase:** {phase N - name, or "None"}
|
|
197
|
-
**Status:** {
|
|
195
|
+
**Current phase:** {phase N - name, or "None"} (GitHub Issue #{issue_number})
|
|
196
|
+
**GitHub Status:** {board column from live mcp_get_all_progress data}
|
|
197
|
+
**Tasks:** {completed}/{total} complete
|
|
198
198
|
|
|
199
199
|
**Action:** Running /maxsim:{command} {args}...
|
|
200
200
|
```
|
|
201
201
|
|
|
202
202
|
Then immediately dispatch the command using the SlashCommand tool. The user can Ctrl+C if the detection is wrong.
|
|
203
203
|
|
|
204
|
-
**Important:** Show the detection block, then dispatch. Do not ask for confirmation
|
|
204
|
+
**Important:** Show the detection block, then dispatch. Do not ask for confirmation — this is Show + Act, not Show + Ask.
|
|
205
205
|
</step>
|
|
206
206
|
|
|
207
207
|
<step name="interactive_menu">
|
|
208
|
-
**Phase 5: Interactive Menu (Rule
|
|
208
|
+
**Phase 5: Interactive Menu (Rule 8 — no obvious action)**
|
|
209
209
|
|
|
210
|
-
When no clear action is detected, show a contextual menu. The menu items are NOT static
|
|
210
|
+
When no clear action is detected, show a contextual menu. The menu items are NOT static — filter based on what makes sense for the current project state (use live GitHub data from mcp_get_all_progress).
|
|
211
211
|
|
|
212
212
|
```
|
|
213
213
|
## Project Status
|
|
214
214
|
|
|
215
215
|
**Project:** {project name}
|
|
216
216
|
**Milestone:** {milestone}
|
|
217
|
-
**Progress:** {X}/{Y} phases
|
|
217
|
+
**GitHub Progress:** {X}/{Y} phases Done on board
|
|
218
218
|
|
|
219
219
|
What would you like to do?
|
|
220
220
|
|
|
221
|
-
1. /maxsim:plan {next_phase}
|
|
222
|
-
2. /maxsim:quick
|
|
223
|
-
3. /maxsim:progress
|
|
224
|
-
4. /maxsim:debug
|
|
221
|
+
1. /maxsim:plan {next_phase} — Plan next phase
|
|
222
|
+
2. /maxsim:quick — Quick ad-hoc task
|
|
223
|
+
3. /maxsim:progress — View detailed progress
|
|
224
|
+
4. /maxsim:debug — Debug an issue
|
|
225
225
|
|
|
226
226
|
Or describe what you'd like to do:
|
|
227
227
|
```
|
|
228
228
|
|
|
229
229
|
**Contextual filtering rules:**
|
|
230
|
-
- If phases are
|
|
231
|
-
- If all phases are
|
|
230
|
+
- If phases are "In Progress" on GitHub: show execute options prominently
|
|
231
|
+
- If all phases are "Done" on GitHub: show `/maxsim:progress` (offers milestone completion)
|
|
232
232
|
- If recent git activity suggests debugging: show `/maxsim:debug` prominently
|
|
233
|
-
- If no phases exist: show `/maxsim:plan` prominently
|
|
233
|
+
- If no phases exist on board: show `/maxsim:plan` prominently
|
|
234
234
|
- Always include `/maxsim:quick` as it is always relevant
|
|
235
235
|
- Always include an open-ended fallback ("Or describe what you'd like to do")
|
|
236
|
+
- If GitHub not available (mcp calls fail): fall back to local ROADMAP analysis and note degraded mode
|
|
236
237
|
|
|
237
238
|
Wait for user selection, then dispatch the chosen command.
|
|
238
239
|
</step>
|
|
@@ -242,9 +243,12 @@ Wait for user selection, then dispatch the chosen command.
|
|
|
242
243
|
<constraints>
|
|
243
244
|
- Never ask for confirmation before dispatching (Show + Act, not Show + Ask)
|
|
244
245
|
- Always surface problems BEFORE suggesting actions
|
|
245
|
-
- All problems block
|
|
246
|
-
- No arguments accepted
|
|
246
|
+
- All problems block — no severity tiers, no "warnings"
|
|
247
|
+
- No arguments accepted — this is pure auto-detection
|
|
247
248
|
- No mention of old commands (plan-phase, execute-phase, etc.)
|
|
248
|
-
- Keep initial feedback fast
|
|
249
|
+
- Keep initial feedback fast — show "Analyzing..." before heavy operations
|
|
250
|
+
- Primary source for phase state: live GitHub (mcp_get_all_progress, mcp_detect_interrupted)
|
|
251
|
+
- Local reads: STATE.md for blockers/decisions, ROADMAP.md for phase ordering only
|
|
249
252
|
- If context gathering fails (tools not available, etc.), fall back to the interactive menu
|
|
250
253
|
</constraints>
|
|
254
|
+
</output>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<purpose>
|
|
2
|
-
Planning stage sub-workflow for /maxsim:plan. Spawns the planner agent to create
|
|
2
|
+
Planning stage sub-workflow for /maxsim:plan. Spawns the planner agent to create plan content, posts plans to GitHub as comments on the phase issue, creates task sub-issues, and moves the phase board card to "In Progress". Optionally spawns the planner (in plan-checking mode) for verification with a revision loop.
|
|
3
3
|
|
|
4
|
-
This file is loaded by the plan.md orchestrator. It does NOT handle gate confirmations or stage routing -- the orchestrator handles that. This sub-workflow focuses ONLY on creating and
|
|
4
|
+
This file is loaded by the plan.md orchestrator. It does NOT handle gate confirmations or stage routing -- the orchestrator handles that. This sub-workflow focuses ONLY on creating, verifying, and publishing plans to GitHub.
|
|
5
5
|
</purpose>
|
|
6
6
|
|
|
7
7
|
<process>
|
|
@@ -15,6 +15,7 @@ The orchestrator provides phase context. Verify we have what we need:
|
|
|
15
15
|
- `commit_docs`
|
|
16
16
|
- `state_path`, `roadmap_path`, `requirements_path`, `context_path`, `research_path`
|
|
17
17
|
- `phase_req_ids` (requirement IDs that this phase must address)
|
|
18
|
+
- `phase_issue_number` (GitHub Issue number for the phase)
|
|
18
19
|
- `--skip-verify` flag presence
|
|
19
20
|
|
|
20
21
|
## Step 2: Resolve Models
|
|
@@ -26,38 +27,40 @@ CHECKER_MODEL=$(node .claude/maxsim/bin/maxsim-tools.cjs resolve-model planner -
|
|
|
26
27
|
|
|
27
28
|
## Step 3: Check Existing Plans
|
|
28
29
|
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
Query the phase GitHub Issue for existing plan comments:
|
|
31
|
+
```
|
|
32
|
+
mcp_get_issue_detail(issue_number={phase_issue_number})
|
|
31
33
|
```
|
|
32
34
|
|
|
33
|
-
|
|
35
|
+
Look for comments that contain `<!-- maxsim:type=plan -->`.
|
|
36
|
+
|
|
37
|
+
**If plan comment(s) exist:** Offer options via natural conversation:
|
|
34
38
|
```
|
|
35
|
-
Phase {phase_number} already has plan(s)
|
|
36
|
-
{list of existing plan files}
|
|
39
|
+
Phase {phase_number} already has plan(s) on GitHub Issue #{phase_issue_number}.
|
|
37
40
|
|
|
38
41
|
1. Add more plans (keep existing)
|
|
39
42
|
2. View existing plans
|
|
40
|
-
3. Re-plan from scratch (deletes existing
|
|
43
|
+
3. Re-plan from scratch (deletes existing plan comments)
|
|
41
44
|
```
|
|
42
45
|
|
|
43
46
|
- If "Add more": Continue to Step 4 with existing plans preserved.
|
|
44
|
-
- If "View": Display plan
|
|
45
|
-
- If "Re-plan": Delete existing
|
|
47
|
+
- If "View": Display plan comment contents, then re-offer options.
|
|
48
|
+
- If "Re-plan": Delete existing plan comments from the issue, continue to Step 4.
|
|
46
49
|
|
|
47
|
-
**If no
|
|
50
|
+
**If no plan comments exist:** Continue to Step 4.
|
|
48
51
|
|
|
49
52
|
## Step 4: Gather Context Paths
|
|
50
53
|
|
|
51
|
-
Extract file paths from the orchestrator context (provided via init JSON):
|
|
54
|
+
Extract file paths and GitHub context from the orchestrator context (provided via init JSON):
|
|
52
55
|
|
|
53
56
|
```bash
|
|
54
57
|
STATE_PATH=$(echo "$INIT" | jq -r '.state_path // empty')
|
|
55
58
|
ROADMAP_PATH=$(echo "$INIT" | jq -r '.roadmap_path // empty')
|
|
56
59
|
REQUIREMENTS_PATH=$(echo "$INIT" | jq -r '.requirements_path // empty')
|
|
57
|
-
RESEARCH_PATH=$(echo "$INIT" | jq -r '.research_path // empty')
|
|
58
|
-
CONTEXT_PATH=$(echo "$INIT" | jq -r '.context_path // empty')
|
|
59
60
|
```
|
|
60
61
|
|
|
62
|
+
Context and research content will be read from GitHub Issue #{phase_issue_number} comments (identified by `<!-- maxsim:type=context -->` and `<!-- maxsim:type=research -->` markers) rather than from local files.
|
|
63
|
+
|
|
61
64
|
## Step 5: Spawn Planner
|
|
62
65
|
|
|
63
66
|
Display:
|
|
@@ -65,20 +68,20 @@ Display:
|
|
|
65
68
|
Planning Phase {phase_number}: {phase_name}...
|
|
66
69
|
```
|
|
67
70
|
|
|
68
|
-
Construct the planner prompt:
|
|
71
|
+
Construct the planner prompt. The planner must return plan content as structured markdown in its response (not write local files):
|
|
69
72
|
|
|
70
73
|
```markdown
|
|
71
74
|
<planning_context>
|
|
72
75
|
**Phase:** {phase_number}
|
|
73
76
|
**Mode:** standard
|
|
74
77
|
|
|
75
|
-
<
|
|
78
|
+
<context_sources>
|
|
79
|
+
- GitHub Issue #{phase_issue_number} context comment (USER DECISIONS -- locked choices from discussion stage)
|
|
80
|
+
- GitHub Issue #{phase_issue_number} research comment (Technical Research findings)
|
|
76
81
|
- {state_path} (Project State)
|
|
77
82
|
- {roadmap_path} (Roadmap)
|
|
78
83
|
- {requirements_path} (Requirements)
|
|
79
|
-
|
|
80
|
-
- {research_path} (Technical Research)
|
|
81
|
-
</files_to_read>
|
|
84
|
+
</context_sources>
|
|
82
85
|
|
|
83
86
|
**Phase requirement IDs (every ID MUST appear in a plan's `requirements` field):** {phase_req_ids}
|
|
84
87
|
|
|
@@ -87,16 +90,31 @@ Construct the planner prompt:
|
|
|
87
90
|
</planning_context>
|
|
88
91
|
|
|
89
92
|
<downstream_consumer>
|
|
90
|
-
Output consumed by /maxsim:execute. Plans need:
|
|
93
|
+
Output consumed by /maxsim:execute via GitHub Issue comments. Plans need:
|
|
91
94
|
- Frontmatter (wave, depends_on, files_modified, autonomous)
|
|
92
95
|
- Tasks in XML format
|
|
93
96
|
- Verification criteria
|
|
94
97
|
- must_haves for goal-backward verification
|
|
95
98
|
</downstream_consumer>
|
|
96
99
|
|
|
100
|
+
<output_format>
|
|
101
|
+
Return each plan as a separate fenced code block with a plan number header.
|
|
102
|
+
Do NOT write local PLAN.md files -- plans will be posted to GitHub by the orchestrator.
|
|
103
|
+
|
|
104
|
+
Example structure:
|
|
105
|
+
## Plan 01
|
|
106
|
+
|
|
107
|
+
```yaml
|
|
108
|
+
# frontmatter here
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
<tasks>
|
|
112
|
+
...
|
|
113
|
+
</tasks>
|
|
114
|
+
</output_format>
|
|
115
|
+
|
|
97
116
|
<quality_gate>
|
|
98
|
-
- [ ]
|
|
99
|
-
- [ ] Each plan has valid frontmatter
|
|
117
|
+
- [ ] Each plan returned in response with valid frontmatter
|
|
100
118
|
- [ ] Tasks are specific and actionable
|
|
101
119
|
- [ ] Dependencies correctly identified
|
|
102
120
|
- [ ] Waves assigned for parallel execution
|
|
@@ -120,18 +138,16 @@ Task(
|
|
|
120
138
|
Parse the planner's return message:
|
|
121
139
|
|
|
122
140
|
- **`## PLANNING COMPLETE`:**
|
|
123
|
-
|
|
124
|
-
```bash
|
|
125
|
-
ls "${phase_dir}"/*-PLAN.md 2>/dev/null | wc -l
|
|
126
|
-
```
|
|
141
|
+
Extract the plan content from the planner's response. Parse out individual plans (each is a separate fenced block with a plan number header).
|
|
127
142
|
|
|
128
|
-
If plans found:
|
|
129
|
-
- Display plan count
|
|
143
|
+
If plans found in response:
|
|
144
|
+
- Display plan count.
|
|
145
|
+
- Store plans in memory as `plans_content` array.
|
|
130
146
|
- If `--skip-verify` flag is set OR `plan_checker_enabled` is false: skip to Step 9.
|
|
131
147
|
- Otherwise: continue to Step 7 (verification).
|
|
132
148
|
|
|
133
|
-
If no plans
|
|
134
|
-
- Error: "Planner reported complete but no
|
|
149
|
+
If no plans in response:
|
|
150
|
+
- Error: "Planner reported complete but returned no plan content."
|
|
135
151
|
- Offer: retry or abort.
|
|
136
152
|
|
|
137
153
|
- **`## CHECKPOINT REACHED`:**
|
|
@@ -157,20 +173,23 @@ Display:
|
|
|
157
173
|
Verifying plans...
|
|
158
174
|
```
|
|
159
175
|
|
|
160
|
-
Construct the checker prompt:
|
|
176
|
+
Construct the checker prompt. Pass the in-memory `plans_content` directly:
|
|
161
177
|
|
|
162
178
|
```markdown
|
|
163
179
|
<verification_context>
|
|
164
180
|
**Phase:** {phase_number}
|
|
165
181
|
**Phase Goal:** {goal from ROADMAP}
|
|
166
182
|
|
|
167
|
-
<
|
|
168
|
-
|
|
183
|
+
<plans_to_verify>
|
|
184
|
+
{plans_content -- the plan(s) returned by the planner in step 5}
|
|
185
|
+
</plans_to_verify>
|
|
186
|
+
|
|
187
|
+
<context_sources>
|
|
188
|
+
- GitHub Issue #{phase_issue_number} context comment (USER DECISIONS)
|
|
189
|
+
- GitHub Issue #{phase_issue_number} research comment (Technical Research)
|
|
169
190
|
- {roadmap_path} (Roadmap)
|
|
170
191
|
- {requirements_path} (Requirements)
|
|
171
|
-
|
|
172
|
-
- {research_path} (Technical Research)
|
|
173
|
-
</files_to_read>
|
|
192
|
+
</context_sources>
|
|
174
193
|
|
|
175
194
|
**Phase requirement IDs (MUST ALL be covered):** {phase_req_ids}
|
|
176
195
|
|
|
@@ -214,17 +233,20 @@ Task(
|
|
|
214
233
|
Sending plans back for revision... (iteration {iteration_count}/3)
|
|
215
234
|
```
|
|
216
235
|
|
|
217
|
-
Construct revision prompt:
|
|
236
|
+
Construct revision prompt. Pass the current in-memory `plans_content` directly:
|
|
218
237
|
|
|
219
238
|
```markdown
|
|
220
239
|
<revision_context>
|
|
221
240
|
**Phase:** {phase_number}
|
|
222
241
|
**Mode:** revision
|
|
223
242
|
|
|
224
|
-
<
|
|
225
|
-
-
|
|
226
|
-
|
|
227
|
-
|
|
243
|
+
<existing_plans>
|
|
244
|
+
{plans_content -- current in-memory plan content}
|
|
245
|
+
</existing_plans>
|
|
246
|
+
|
|
247
|
+
<context_sources>
|
|
248
|
+
- GitHub Issue #{phase_issue_number} context comment (USER DECISIONS)
|
|
249
|
+
</context_sources>
|
|
228
250
|
|
|
229
251
|
**Checker issues:** {structured_issues_from_checker}
|
|
230
252
|
</revision_context>
|
|
@@ -232,7 +254,7 @@ Task(
|
|
|
232
254
|
<instructions>
|
|
233
255
|
Make targeted updates to address checker issues.
|
|
234
256
|
Do NOT replan from scratch unless issues are fundamental.
|
|
235
|
-
Return
|
|
257
|
+
Return the full revised plan content (same format as original -- one fenced block per plan).
|
|
236
258
|
</instructions>
|
|
237
259
|
```
|
|
238
260
|
|
|
@@ -267,32 +289,98 @@ Task(
|
|
|
267
289
|
- If "Provide guidance": Get user input, re-spawn planner with user guidance, reset iteration_count, go to Step 7.
|
|
268
290
|
- If "Abort": Exit workflow.
|
|
269
291
|
|
|
270
|
-
## Step 9:
|
|
292
|
+
## Step 9: Post Plans to GitHub
|
|
271
293
|
|
|
272
|
-
|
|
294
|
+
After verification passes (or is skipped), post each plan as a separate comment on the phase GitHub Issue.
|
|
273
295
|
|
|
274
|
-
|
|
275
|
-
|
|
296
|
+
For each plan in `plans_content`:
|
|
297
|
+
|
|
298
|
+
```
|
|
299
|
+
mcp_post_plan_comment(
|
|
300
|
+
phase_issue_number={phase_issue_number},
|
|
301
|
+
plan_number={plan_number}, // e.g. "01", "02"
|
|
302
|
+
plan_content="<!-- maxsim:type=plan -->\n" + {plan_content}
|
|
303
|
+
)
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
If posting any plan comment fails:
|
|
307
|
+
- Report which plans failed to post.
|
|
308
|
+
- Offer retry for failed plans.
|
|
309
|
+
- Do not proceed to task creation until all plans are successfully posted.
|
|
310
|
+
|
|
311
|
+
Display:
|
|
312
|
+
```
|
|
313
|
+
Plans posted to GitHub Issue #{phase_issue_number}: {plan_count} plan(s).
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
## Step 10: Create Task Sub-Issues
|
|
317
|
+
|
|
318
|
+
Parse tasks from the posted plans. For each `<task>` element in the plan XML, extract:
|
|
319
|
+
- `id` (e.g. "1.1", "1.2")
|
|
320
|
+
- `title`
|
|
321
|
+
- `description` / body content
|
|
322
|
+
|
|
323
|
+
Call `mcp_batch_create_tasks` with the full tasks array and the phase issue number:
|
|
324
|
+
|
|
325
|
+
```
|
|
326
|
+
mcp_batch_create_tasks(
|
|
327
|
+
phase_issue_number={phase_issue_number},
|
|
328
|
+
tasks=[
|
|
329
|
+
{ id: "1.1", title: "Task title", description: "Task body" },
|
|
330
|
+
...
|
|
331
|
+
]
|
|
332
|
+
)
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
Each task becomes a GitHub sub-issue linked to the phase issue.
|
|
336
|
+
|
|
337
|
+
**If batch creation fails (partial or total):**
|
|
338
|
+
- Report which task IDs failed to create.
|
|
339
|
+
- Offer: retry failed tasks, skip and continue, or abort.
|
|
340
|
+
- Do not proceed to board transition until task creation succeeds or user accepts partial failure.
|
|
341
|
+
|
|
342
|
+
Display:
|
|
343
|
+
```
|
|
344
|
+
Task sub-issues created: {task_count} tasks linked to Issue #{phase_issue_number}.
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
## Step 11: Move Phase to In Progress
|
|
348
|
+
|
|
349
|
+
After all plans are posted and task sub-issues are created, move the phase issue to "In Progress" on the project board:
|
|
350
|
+
|
|
351
|
+
```
|
|
352
|
+
mcp_move_issue(
|
|
353
|
+
issue_number={phase_issue_number},
|
|
354
|
+
status="In Progress"
|
|
355
|
+
)
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
Display:
|
|
359
|
+
```
|
|
360
|
+
Phase #{phase_issue_number} moved to "In Progress" on the board.
|
|
276
361
|
```
|
|
277
362
|
|
|
278
|
-
## Step
|
|
363
|
+
## Step 12: Return to Orchestrator
|
|
279
364
|
|
|
280
|
-
After plans are created and
|
|
365
|
+
After plans are posted, task sub-issues created, and the phase moved to "In Progress", return control to the plan.md orchestrator. Do NOT show gate confirmation or next steps -- the orchestrator handles the final gate.
|
|
281
366
|
|
|
282
367
|
Display a brief completion message:
|
|
283
368
|
```
|
|
284
|
-
Planning complete. {plan_count} plan(s)
|
|
369
|
+
Planning complete. {plan_count} plan(s) posted to GitHub Issue #{phase_issue_number}. {task_count} task sub-issues created.
|
|
285
370
|
```
|
|
286
371
|
|
|
287
372
|
</process>
|
|
288
373
|
|
|
289
374
|
<success_criteria>
|
|
290
375
|
- Planner and checker models resolved from config
|
|
291
|
-
- Existing plans detected and handled (add/view/replan options)
|
|
292
|
-
- Planner agent spawned with
|
|
293
|
-
- PLAN.md files
|
|
376
|
+
- Existing plans detected from GitHub Issue comments and handled (add/view/replan options)
|
|
377
|
+
- Planner agent spawned with context from GitHub Issue comments (context + research) and local files (state, roadmap, requirements)
|
|
378
|
+
- Plan content returned from planner as in-memory document (no local PLAN.md files written)
|
|
294
379
|
- Checker verification loop runs (max 3 iterations) unless --skip-verify
|
|
295
|
-
- Revision loop
|
|
296
|
-
-
|
|
380
|
+
- Revision loop passes in-memory plan content to planner for targeted fixes
|
|
381
|
+
- Plans posted to GitHub Issue #{phase_issue_number} as comments with <!-- maxsim:type=plan --> markers
|
|
382
|
+
- Task sub-issues created via mcp_batch_create_tasks linked to phase issue
|
|
383
|
+
- Phase issue moved to "In Progress" via mcp_move_issue
|
|
384
|
+
- Failed task creation surfaced with retry option (WIRE-07)
|
|
297
385
|
- Control returned to orchestrator without showing gate or next steps
|
|
298
386
|
</success_criteria>
|