maxsimcli 5.0.6 → 5.1.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/README.md +316 -288
- package/dist/assets/CHANGELOG.md +14 -0
- package/dist/assets/hooks/maxsim-capture-learnings.cjs +128 -0
- package/dist/assets/hooks/maxsim-capture-learnings.cjs.map +1 -0
- package/dist/assets/hooks/maxsim-check-update.cjs +126 -88
- package/dist/assets/hooks/maxsim-check-update.cjs.map +1 -1
- package/dist/assets/hooks/maxsim-notification-sound.cjs +87 -43
- package/dist/assets/hooks/maxsim-notification-sound.cjs.map +1 -1
- package/dist/assets/hooks/maxsim-statusline.cjs +45 -171
- package/dist/assets/hooks/maxsim-statusline.cjs.map +1 -1
- package/dist/assets/hooks/maxsim-stop-sound.cjs +86 -43
- package/dist/assets/hooks/maxsim-stop-sound.cjs.map +1 -1
- package/dist/assets/hooks/maxsim-sync-reminder.cjs +72 -21
- package/dist/assets/hooks/maxsim-sync-reminder.cjs.map +1 -1
- package/dist/assets/templates/agents/AGENTS.md +62 -51
- package/dist/assets/templates/agents/executor.md +44 -59
- package/dist/assets/templates/agents/planner.md +36 -31
- package/dist/assets/templates/agents/researcher.md +35 -43
- package/dist/assets/templates/agents/verifier.md +29 -31
- package/dist/assets/templates/commands/maxsim/debug.md +20 -154
- package/dist/assets/templates/commands/maxsim/execute.md +19 -33
- package/dist/assets/templates/commands/maxsim/go.md +21 -20
- package/dist/assets/templates/commands/maxsim/help.md +5 -14
- package/dist/assets/templates/commands/maxsim/init.md +18 -40
- package/dist/assets/templates/commands/maxsim/plan.md +22 -37
- package/dist/assets/templates/commands/maxsim/progress.md +15 -16
- package/dist/assets/templates/commands/maxsim/quick.md +18 -29
- package/dist/assets/templates/commands/maxsim/settings.md +18 -26
- package/dist/assets/templates/references/continuation-format.md +2 -4
- package/dist/assets/templates/references/model-profiles.md +2 -2
- package/dist/assets/templates/references/planning-config.md +10 -11
- package/dist/assets/templates/references/self-improvement.md +120 -0
- package/dist/assets/templates/rules/conventions.md +1 -1
- package/dist/assets/templates/rules/verification-protocol.md +1 -1
- package/dist/assets/templates/skills/brainstorming/SKILL.md +35 -26
- package/dist/assets/templates/skills/code-review/SKILL.md +78 -55
- package/dist/assets/templates/skills/commit-conventions/SKILL.md +70 -36
- package/dist/assets/templates/skills/github-operations/SKILL.md +142 -0
- package/dist/assets/templates/skills/handoff-contract/SKILL.md +62 -28
- package/dist/assets/templates/skills/maxsim-batch/SKILL.md +68 -42
- package/dist/assets/templates/skills/maxsim-simplify/SKILL.md +65 -40
- package/dist/assets/templates/skills/project-memory/SKILL.md +121 -0
- package/dist/assets/templates/skills/research/SKILL.md +126 -0
- package/dist/assets/templates/skills/roadmap-writing/SKILL.md +71 -68
- package/dist/assets/templates/skills/systematic-debugging/SKILL.md +37 -25
- package/dist/assets/templates/skills/tdd/SKILL.md +36 -39
- package/dist/assets/templates/skills/using-maxsim/SKILL.md +69 -55
- package/dist/assets/templates/skills/verification/SKILL.md +167 -0
- package/dist/assets/templates/workflows/batch.md +249 -268
- package/dist/assets/templates/workflows/diagnose-issues.md +225 -151
- package/dist/assets/templates/workflows/execute-plan.md +191 -981
- package/dist/assets/templates/workflows/execute.md +350 -309
- package/dist/assets/templates/workflows/go.md +119 -138
- package/dist/assets/templates/workflows/health.md +71 -114
- package/dist/assets/templates/workflows/help.md +85 -147
- package/dist/assets/templates/workflows/init-existing.md +180 -1373
- package/dist/assets/templates/workflows/init.md +53 -165
- package/dist/assets/templates/workflows/new-milestone.md +91 -334
- package/dist/assets/templates/workflows/new-project.md +165 -1384
- package/dist/assets/templates/workflows/plan-create.md +182 -73
- package/dist/assets/templates/workflows/plan-discuss.md +89 -82
- package/dist/assets/templates/workflows/plan-research.md +191 -85
- package/dist/assets/templates/workflows/plan.md +122 -58
- package/dist/assets/templates/workflows/progress.md +76 -310
- package/dist/assets/templates/workflows/quick.md +70 -495
- package/dist/assets/templates/workflows/sdd.md +231 -221
- package/dist/assets/templates/workflows/settings.md +90 -120
- package/dist/assets/templates/workflows/verify-phase.md +296 -258
- package/dist/cli.cjs +17 -23465
- package/dist/cli.cjs.map +1 -1
- package/dist/install.cjs +356 -8358
- package/dist/install.cjs.map +1 -1
- package/package.json +16 -22
- package/dist/assets/templates/skills/agent-system-map/SKILL.md +0 -92
- package/dist/assets/templates/skills/evidence-collection/SKILL.md +0 -87
- package/dist/assets/templates/skills/github-artifact-protocol/SKILL.md +0 -67
- package/dist/assets/templates/skills/github-tools-guide/SKILL.md +0 -89
- package/dist/assets/templates/skills/input-validation/SKILL.md +0 -51
- package/dist/assets/templates/skills/memory-management/SKILL.md +0 -75
- package/dist/assets/templates/skills/research-methodology/SKILL.md +0 -137
- package/dist/assets/templates/skills/sdd/SKILL.md +0 -91
- package/dist/assets/templates/skills/tool-priority-guide/SKILL.md +0 -80
- package/dist/assets/templates/skills/verification-before-completion/SKILL.md +0 -71
- package/dist/assets/templates/skills/verification-gates/SKILL.md +0 -169
- package/dist/assets/templates/workflows/discuss-phase.md +0 -683
- package/dist/assets/templates/workflows/research-phase.md +0 -73
- package/dist/assets/templates/workflows/verify-work.md +0 -572
- package/dist/core-D5zUr9cb.cjs +0 -4305
- package/dist/core-D5zUr9cb.cjs.map +0 -1
- package/dist/skills-CjFWZIGM.cjs +0 -6824
- package/dist/skills-CjFWZIGM.cjs.map +0 -1
|
@@ -1,9 +1,25 @@
|
|
|
1
1
|
<purpose>
|
|
2
|
-
Planning stage sub-workflow for /maxsim:plan. Spawns
|
|
2
|
+
Planning stage sub-workflow for /maxsim:plan. Spawns a Planner agent (using Agent tool) to
|
|
3
|
+
create the task breakdown plan, optionally spawns a Checker agent for verification with a
|
|
4
|
+
revision loop, posts plans to GitHub as comments on the phase issue, creates task sub-issues,
|
|
5
|
+
and moves the phase board card to "In Progress".
|
|
3
6
|
|
|
4
|
-
This file is loaded by the plan.md orchestrator. It does NOT handle gate confirmations or
|
|
7
|
+
This file is loaded by the plan.md orchestrator. It does NOT handle gate confirmations or
|
|
8
|
+
stage routing -- the orchestrator handles that. This sub-workflow focuses ONLY on creating,
|
|
9
|
+
verifying, and publishing plans to GitHub.
|
|
10
|
+
|
|
11
|
+
GitHub Issues is the sole source of truth. No local PLAN.md files are written.
|
|
5
12
|
</purpose>
|
|
6
13
|
|
|
14
|
+
<critical_rules>
|
|
15
|
+
- Tool name is `Agent` (NOT `Task`)
|
|
16
|
+
- Agent spawning: Agent(prompt, model, isolation, run_in_background)
|
|
17
|
+
- Plans are posted to GitHub with <!-- maxsim:type=plan -->
|
|
18
|
+
- Use `node ~/.claude/maxsim/bin/maxsim-tools.cjs` for all CLI operations
|
|
19
|
+
- No local PLAN.md files are written -- GitHub is the sole source of truth
|
|
20
|
+
- Do NOT show gate confirmation or next steps -- the orchestrator handles those
|
|
21
|
+
</critical_rules>
|
|
22
|
+
|
|
7
23
|
<process>
|
|
8
24
|
|
|
9
25
|
## Step 1: Check Prerequisites
|
|
@@ -13,7 +29,7 @@ The orchestrator provides phase context. Verify we have what we need:
|
|
|
13
29
|
- `phase_number`, `phase_name`, `phase_dir`, `padded_phase`, `phase_slug`
|
|
14
30
|
- `planner_model`, `checker_model`, `plan_checker_enabled`
|
|
15
31
|
- `commit_docs`
|
|
16
|
-
- `state_path`, `roadmap_path`, `requirements_path
|
|
32
|
+
- `state_path`, `roadmap_path`, `requirements_path`
|
|
17
33
|
- `phase_req_ids` (requirement IDs that this phase must address)
|
|
18
34
|
- `phase_issue_number` (GitHub Issue number for the phase)
|
|
19
35
|
- `--skip-verify` flag presence
|
|
@@ -29,7 +45,8 @@ CHECKER_MODEL=$(node ~/.claude/maxsim/bin/maxsim-tools.cjs resolve-model planner
|
|
|
29
45
|
|
|
30
46
|
Query the phase GitHub Issue for existing plan comments:
|
|
31
47
|
```bash
|
|
32
|
-
node ~/.claude/maxsim/bin/maxsim-tools.cjs github get-issue
|
|
48
|
+
ISSUE_DATA=$(node ~/.claude/maxsim/bin/maxsim-tools.cjs github get-issue \
|
|
49
|
+
--issue-number $PHASE_ISSUE_NUMBER --include-comments)
|
|
33
50
|
```
|
|
34
51
|
|
|
35
52
|
Look for comments that contain `<!-- maxsim:type=plan -->`.
|
|
@@ -40,48 +57,67 @@ Phase {phase_number} already has plan(s) on GitHub Issue #{phase_issue_number}.
|
|
|
40
57
|
|
|
41
58
|
1. Add more plans (keep existing)
|
|
42
59
|
2. View existing plans
|
|
43
|
-
3. Re-plan from scratch (
|
|
60
|
+
3. Re-plan from scratch (removes existing plan comments)
|
|
44
61
|
```
|
|
45
62
|
|
|
46
63
|
- If "Add more": Continue to Step 4 with existing plans preserved.
|
|
47
64
|
- If "View": Display plan comment contents, then re-offer options.
|
|
48
|
-
- If "Re-plan": Delete existing plan comments from the issue
|
|
65
|
+
- If "Re-plan": Delete existing plan comments from the issue:
|
|
66
|
+
```bash
|
|
67
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github delete-comments \
|
|
68
|
+
--issue-number $PHASE_ISSUE_NUMBER --type plan
|
|
69
|
+
```
|
|
70
|
+
Then continue to Step 4.
|
|
49
71
|
|
|
50
72
|
**If no plan comments exist:** Continue to Step 4.
|
|
51
73
|
|
|
52
|
-
## Step 4:
|
|
74
|
+
## Step 4: Read Context and Research from GitHub
|
|
53
75
|
|
|
54
|
-
|
|
76
|
+
Fetch the phase issue with all comments to supply the planner with context and research:
|
|
55
77
|
|
|
56
78
|
```bash
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
REQUIREMENTS_PATH=$(echo "$INIT" | jq -r '.requirements_path // empty')
|
|
79
|
+
ISSUE_DATA=$(node ~/.claude/maxsim/bin/maxsim-tools.cjs github get-issue \
|
|
80
|
+
--issue-number $PHASE_ISSUE_NUMBER --include-comments)
|
|
60
81
|
```
|
|
61
82
|
|
|
62
|
-
|
|
83
|
+
Extract:
|
|
84
|
+
- Context comment content (from `<!-- maxsim:type=context -->` comment)
|
|
85
|
+
- Research comment content (from `<!-- maxsim:type=research -->` comment)
|
|
86
|
+
- Issue body (phase goal, description, success criteria)
|
|
63
87
|
|
|
64
|
-
|
|
88
|
+
These are passed directly into the planner prompt. No local files are read for context or research.
|
|
89
|
+
|
|
90
|
+
## Step 5: Spawn Planner Agent
|
|
65
91
|
|
|
66
92
|
Display:
|
|
67
93
|
```
|
|
68
94
|
Planning Phase {phase_number}: {phase_name}...
|
|
69
95
|
```
|
|
70
96
|
|
|
71
|
-
Construct the planner prompt. The planner must return plan content as structured markdown
|
|
97
|
+
Construct the planner prompt. The planner must return plan content as structured markdown
|
|
98
|
+
in its response (not write local files):
|
|
72
99
|
|
|
73
100
|
```markdown
|
|
74
101
|
<planning_context>
|
|
75
|
-
**Phase:** {phase_number}
|
|
102
|
+
**Phase:** {phase_number} -- {phase_name}
|
|
76
103
|
**Mode:** standard
|
|
77
104
|
|
|
78
|
-
<
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
105
|
+
<github_context>
|
|
106
|
+
**Phase Issue:** #{phase_issue_number}
|
|
107
|
+
**Phase Goal:** {phase_goal from issue body}
|
|
108
|
+
|
|
109
|
+
**User Decisions (from context comment):**
|
|
110
|
+
{content of the <!-- maxsim:type=context --> comment}
|
|
111
|
+
|
|
112
|
+
**Research Findings (from research comment):**
|
|
113
|
+
{content of the <!-- maxsim:type=research --> comment}
|
|
114
|
+
</github_context>
|
|
115
|
+
|
|
116
|
+
<local_context>
|
|
117
|
+
**Roadmap:** {roadmap_path}
|
|
118
|
+
**Requirements:** {requirements_path}
|
|
119
|
+
**State:** {state_path}
|
|
120
|
+
</local_context>
|
|
85
121
|
|
|
86
122
|
**Phase requirement IDs (every ID MUST appear in a plan's `requirements` field):** {phase_req_ids}
|
|
87
123
|
|
|
@@ -89,6 +125,41 @@ Construct the planner prompt. The planner must return plan content as structured
|
|
|
89
125
|
**Project skills:** Check .skills/ directory (if exists) -- read SKILL.md files, plans should account for project skill rules
|
|
90
126
|
</planning_context>
|
|
91
127
|
|
|
128
|
+
<task_format>
|
|
129
|
+
Every task must include:
|
|
130
|
+
- `id` and `type` (auto or checkpoint)
|
|
131
|
+
- `<files>` -- list of files created or modified with CREATE/MODIFY/DELETE
|
|
132
|
+
- `<action>` -- detailed implementation instructions the executor can follow without ambiguity
|
|
133
|
+
- `<verify>` -- automated verification command (must be runnable via Bash)
|
|
134
|
+
- `<done>` -- bullet list of completion criteria (each independently verifiable)
|
|
135
|
+
</task_format>
|
|
136
|
+
|
|
137
|
+
<plan_frontmatter>
|
|
138
|
+
Every plan must have valid YAML frontmatter:
|
|
139
|
+
---
|
|
140
|
+
phase: {phase-name}
|
|
141
|
+
plan: {number}
|
|
142
|
+
type: execute
|
|
143
|
+
wave: {wave-number}
|
|
144
|
+
depends_on: [{prior-plan-ids}]
|
|
145
|
+
files_modified: [{key-files}]
|
|
146
|
+
autonomous: true|false
|
|
147
|
+
requirements: [{req-ids}]
|
|
148
|
+
must_haves:
|
|
149
|
+
truths: [{invariant-statements}]
|
|
150
|
+
artifacts: [{path, provides, min_lines}]
|
|
151
|
+
key_links: [{from, to, via, pattern}]
|
|
152
|
+
---
|
|
153
|
+
</plan_frontmatter>
|
|
154
|
+
|
|
155
|
+
<wave_design>
|
|
156
|
+
Break the phase into atomic tasks (2-5 minutes each for an AI agent).
|
|
157
|
+
Group independent tasks into the same wave for parallel execution.
|
|
158
|
+
Tasks that depend on prior task outputs go in later waves.
|
|
159
|
+
Each plan covers one logical deliverable.
|
|
160
|
+
Plans within the same wave can execute in parallel.
|
|
161
|
+
</wave_design>
|
|
162
|
+
|
|
92
163
|
<downstream_consumer>
|
|
93
164
|
Output consumed by /maxsim:execute via GitHub Issue comments. Plans need:
|
|
94
165
|
- Frontmatter (wave, depends_on, files_modified, autonomous)
|
|
@@ -98,38 +169,46 @@ Output consumed by /maxsim:execute via GitHub Issue comments. Plans need:
|
|
|
98
169
|
</downstream_consumer>
|
|
99
170
|
|
|
100
171
|
<output_format>
|
|
101
|
-
Return each plan as a separate
|
|
172
|
+
Return each plan as a separate section with a plan number header.
|
|
102
173
|
Do NOT write local PLAN.md files -- plans will be posted to GitHub by the orchestrator.
|
|
103
174
|
|
|
104
175
|
Example structure:
|
|
105
176
|
## Plan 01
|
|
106
177
|
|
|
107
178
|
```yaml
|
|
108
|
-
|
|
179
|
+
{frontmatter}
|
|
109
180
|
```
|
|
110
181
|
|
|
111
182
|
<tasks>
|
|
112
|
-
|
|
183
|
+
<task id="1.1" type="auto">
|
|
184
|
+
<files>...</files>
|
|
185
|
+
<action>...</action>
|
|
186
|
+
<verify>...</verify>
|
|
187
|
+
<done>...</done>
|
|
188
|
+
</task>
|
|
113
189
|
</tasks>
|
|
114
190
|
</output_format>
|
|
115
191
|
|
|
116
192
|
<quality_gate>
|
|
193
|
+
Before returning:
|
|
117
194
|
- [ ] Each plan returned in response with valid frontmatter
|
|
118
|
-
- [ ] Tasks are specific and actionable
|
|
195
|
+
- [ ] Tasks are specific and actionable (2-5 min each)
|
|
119
196
|
- [ ] Dependencies correctly identified
|
|
120
197
|
- [ ] Waves assigned for parallel execution
|
|
121
198
|
- [ ] must_haves derived from phase goal
|
|
199
|
+
- [ ] Every phase_req_id appears in at least one plan's requirements field
|
|
200
|
+
- [ ] Goal-backward verification passes (completing all tasks achieves the phase goal)
|
|
122
201
|
</quality_gate>
|
|
123
202
|
```
|
|
124
203
|
|
|
125
204
|
Spawn the planner:
|
|
126
205
|
|
|
127
206
|
```
|
|
128
|
-
|
|
207
|
+
Agent(
|
|
129
208
|
prompt=planner_prompt,
|
|
130
|
-
subagent_type="planner",
|
|
131
209
|
model="{planner_model}",
|
|
132
|
-
|
|
210
|
+
isolation=true,
|
|
211
|
+
run_in_background=false
|
|
133
212
|
)
|
|
134
213
|
```
|
|
135
214
|
|
|
@@ -138,7 +217,8 @@ Task(
|
|
|
138
217
|
Parse the planner's return message:
|
|
139
218
|
|
|
140
219
|
- **`## PLANNING COMPLETE`:**
|
|
141
|
-
Extract the plan content from the planner's response. Parse out individual plans
|
|
220
|
+
Extract the plan content from the planner's response. Parse out individual plans
|
|
221
|
+
(each is a separate section with a plan number header).
|
|
142
222
|
|
|
143
223
|
If plans found in response:
|
|
144
224
|
- Display plan count.
|
|
@@ -151,7 +231,8 @@ Parse the planner's return message:
|
|
|
151
231
|
- Offer: retry or abort.
|
|
152
232
|
|
|
153
233
|
- **`## CHECKPOINT REACHED`:**
|
|
154
|
-
Present checkpoint to user, get response, spawn continuation
|
|
234
|
+
Present checkpoint to user, get response, spawn continuation Agent with checkpoint context.
|
|
235
|
+
If planner needs a decision, relay it to the user.
|
|
155
236
|
|
|
156
237
|
- **`## PLANNING INCONCLUSIVE`:**
|
|
157
238
|
Display what was attempted. Offer:
|
|
@@ -177,19 +258,25 @@ Construct the checker prompt. Pass the in-memory `plans_content` directly:
|
|
|
177
258
|
|
|
178
259
|
```markdown
|
|
179
260
|
<verification_context>
|
|
180
|
-
**Phase:** {phase_number}
|
|
181
|
-
**Phase Goal:** {goal from
|
|
261
|
+
**Phase:** {phase_number} -- {phase_name}
|
|
262
|
+
**Phase Goal:** {goal from GitHub Issue}
|
|
182
263
|
|
|
183
264
|
<plans_to_verify>
|
|
184
|
-
{plans_content -- the plan(s) returned by the planner in
|
|
265
|
+
{plans_content -- the plan(s) returned by the planner in Step 5}
|
|
185
266
|
</plans_to_verify>
|
|
186
267
|
|
|
187
|
-
<
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
268
|
+
<github_context>
|
|
269
|
+
**User Decisions (from context comment):**
|
|
270
|
+
{content of the <!-- maxsim:type=context --> comment}
|
|
271
|
+
|
|
272
|
+
**Research Findings (from research comment):**
|
|
273
|
+
{content of the <!-- maxsim:type=research --> comment}
|
|
274
|
+
</github_context>
|
|
275
|
+
|
|
276
|
+
<local_context>
|
|
277
|
+
**Roadmap:** {roadmap_path}
|
|
278
|
+
**Requirements:** {requirements_path}
|
|
279
|
+
</local_context>
|
|
193
280
|
|
|
194
281
|
**Phase requirement IDs (MUST ALL be covered):** {phase_req_ids}
|
|
195
282
|
|
|
@@ -199,18 +286,18 @@ Construct the checker prompt. Pass the in-memory `plans_content` directly:
|
|
|
199
286
|
|
|
200
287
|
<expected_output>
|
|
201
288
|
- ## VERIFICATION PASSED -- all checks pass
|
|
202
|
-
- ## ISSUES FOUND -- structured issue list
|
|
289
|
+
- ## ISSUES FOUND -- structured issue list with specific problems and which plan/task they affect
|
|
203
290
|
</expected_output>
|
|
204
291
|
```
|
|
205
292
|
|
|
206
293
|
Spawn the checker:
|
|
207
294
|
|
|
208
295
|
```
|
|
209
|
-
|
|
296
|
+
Agent(
|
|
210
297
|
prompt="## Task: Verify plans achieve phase goal\n\n## Suggested Skills: verification-gates\n\n" + checker_prompt,
|
|
211
|
-
subagent_type="planner",
|
|
212
298
|
model="{checker_model}",
|
|
213
|
-
|
|
299
|
+
isolation=true,
|
|
300
|
+
run_in_background=false
|
|
214
301
|
)
|
|
215
302
|
```
|
|
216
303
|
|
|
@@ -244,9 +331,10 @@ Task(
|
|
|
244
331
|
{plans_content -- current in-memory plan content}
|
|
245
332
|
</existing_plans>
|
|
246
333
|
|
|
247
|
-
<
|
|
248
|
-
|
|
249
|
-
|
|
334
|
+
<github_context>
|
|
335
|
+
**User Decisions (from context comment):**
|
|
336
|
+
{content of the <!-- maxsim:type=context --> comment}
|
|
337
|
+
</github_context>
|
|
250
338
|
|
|
251
339
|
**Checker issues:** {structured_issues_from_checker}
|
|
252
340
|
</revision_context>
|
|
@@ -254,22 +342,23 @@ Task(
|
|
|
254
342
|
<instructions>
|
|
255
343
|
Make targeted updates to address checker issues.
|
|
256
344
|
Do NOT replan from scratch unless issues are fundamental.
|
|
257
|
-
Return the full revised plan content (same format as original -- one
|
|
345
|
+
Return the full revised plan content (same format as original -- one section per plan).
|
|
258
346
|
</instructions>
|
|
259
347
|
```
|
|
260
348
|
|
|
261
349
|
Spawn planner for revision:
|
|
262
350
|
|
|
263
351
|
```
|
|
264
|
-
|
|
352
|
+
Agent(
|
|
265
353
|
prompt=revision_prompt,
|
|
266
|
-
subagent_type="planner",
|
|
267
354
|
model="{planner_model}",
|
|
268
|
-
|
|
355
|
+
isolation=true,
|
|
356
|
+
run_in_background=false
|
|
269
357
|
)
|
|
270
358
|
```
|
|
271
359
|
|
|
272
|
-
After planner returns: increment `iteration_count`,
|
|
360
|
+
After planner returns: increment `iteration_count`, update `plans_content` with revised content,
|
|
361
|
+
re-spawn checker (go back to Step 7).
|
|
273
362
|
|
|
274
363
|
**If iteration_count >= 3:**
|
|
275
364
|
|
|
@@ -286,12 +375,14 @@ Task(
|
|
|
286
375
|
Wait for user choice.
|
|
287
376
|
|
|
288
377
|
- If "Force proceed": Continue to Step 9.
|
|
289
|
-
- If "Provide guidance": Get user input, re-spawn planner with user guidance
|
|
378
|
+
- If "Provide guidance": Get user input, re-spawn planner with user guidance appended to
|
|
379
|
+
revision prompt, reset `iteration_count` to 1, go to Step 7.
|
|
290
380
|
- If "Abort": Exit workflow.
|
|
291
381
|
|
|
292
382
|
## Step 9: Post Plans to GitHub
|
|
293
383
|
|
|
294
|
-
After verification passes (or is skipped), post each plan as a separate comment on the phase
|
|
384
|
+
After verification passes (or is skipped), post each plan as a separate comment on the phase
|
|
385
|
+
GitHub Issue.
|
|
295
386
|
|
|
296
387
|
For each plan in `plans_content`:
|
|
297
388
|
|
|
@@ -301,7 +392,10 @@ cat > "$TMPFILE" << 'BODY_EOF'
|
|
|
301
392
|
<!-- maxsim:type=plan -->
|
|
302
393
|
{plan_content}
|
|
303
394
|
BODY_EOF
|
|
304
|
-
node ~/.claude/maxsim/bin/maxsim-tools.cjs github post-plan-comment
|
|
395
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github post-plan-comment \
|
|
396
|
+
--phase-issue-number $PHASE_ISSUE_NUMBER \
|
|
397
|
+
--plan-number "{plan_number}" \
|
|
398
|
+
--plan-content-file "$TMPFILE"
|
|
305
399
|
```
|
|
306
400
|
|
|
307
401
|
If posting any plan comment fails:
|
|
@@ -318,16 +412,24 @@ Plans posted to GitHub Issue #{phase_issue_number}: {plan_count} plan(s).
|
|
|
318
412
|
|
|
319
413
|
Parse tasks from the posted plans. For each `<task>` element in the plan XML, extract:
|
|
320
414
|
- `id` (e.g. "1.1", "1.2")
|
|
321
|
-
- `title`
|
|
322
|
-
- `
|
|
415
|
+
- `title` (from action summary or first line of action)
|
|
416
|
+
- `body` content (full task details: action, verify, done criteria)
|
|
323
417
|
|
|
324
418
|
Run `github batch-create-tasks` with the full tasks array and the phase issue number:
|
|
325
419
|
|
|
326
420
|
```bash
|
|
327
|
-
node ~/.claude/maxsim/bin/maxsim-tools.cjs github batch-create-tasks
|
|
421
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github batch-create-tasks \
|
|
422
|
+
--phase-number "$PHASE_NUMBER" \
|
|
423
|
+
--parent-issue-number $PHASE_ISSUE_NUMBER \
|
|
424
|
+
--tasks '[{"task_id":"1.1","title":"Task title","body":"Task body"}, ...]'
|
|
328
425
|
```
|
|
329
426
|
|
|
330
|
-
Each task becomes a GitHub sub-issue linked to the phase issue.
|
|
427
|
+
Each task becomes a GitHub sub-issue linked to the phase issue. The task body should include:
|
|
428
|
+
- Wave number
|
|
429
|
+
- Dependencies (depends_on)
|
|
430
|
+
- Full action description
|
|
431
|
+
- Verify command
|
|
432
|
+
- Done criteria
|
|
331
433
|
|
|
332
434
|
**If batch creation fails (partial or total):**
|
|
333
435
|
- Report which task IDs failed to create.
|
|
@@ -341,10 +443,12 @@ Task sub-issues created: {task_count} tasks linked to Issue #{phase_issue_number
|
|
|
341
443
|
|
|
342
444
|
## Step 11: Move Phase to In Progress
|
|
343
445
|
|
|
344
|
-
After all plans are posted and task sub-issues are created, move the phase issue to "In Progress"
|
|
446
|
+
After all plans are posted and task sub-issues are created, move the phase issue to "In Progress"
|
|
447
|
+
on the project board:
|
|
345
448
|
|
|
346
449
|
```bash
|
|
347
|
-
node ~/.claude/maxsim/bin/maxsim-tools.cjs github move-issue
|
|
450
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github move-issue \
|
|
451
|
+
--issue-number $PHASE_ISSUE_NUMBER --status "In Progress"
|
|
348
452
|
```
|
|
349
453
|
|
|
350
454
|
Display:
|
|
@@ -354,7 +458,9 @@ Phase #{phase_issue_number} moved to "In Progress" on the board.
|
|
|
354
458
|
|
|
355
459
|
## Step 12: Return to Orchestrator
|
|
356
460
|
|
|
357
|
-
After plans are posted, task sub-issues created, and the phase moved to "In Progress", return
|
|
461
|
+
After plans are posted, task sub-issues created, and the phase moved to "In Progress", return
|
|
462
|
+
control to the plan.md orchestrator. Do NOT show gate confirmation or next steps -- the
|
|
463
|
+
orchestrator handles the final gate.
|
|
358
464
|
|
|
359
465
|
Display a brief completion message:
|
|
360
466
|
```
|
|
@@ -364,15 +470,18 @@ Planning complete. {plan_count} plan(s) posted to GitHub Issue #{phase_issue_num
|
|
|
364
470
|
</process>
|
|
365
471
|
|
|
366
472
|
<success_criteria>
|
|
367
|
-
- Planner and checker models resolved from config
|
|
368
|
-
- Existing plans detected from GitHub Issue comments and handled (add/view/replan options)
|
|
369
|
-
-
|
|
370
|
-
-
|
|
371
|
-
-
|
|
372
|
-
-
|
|
373
|
-
-
|
|
374
|
-
-
|
|
375
|
-
-
|
|
376
|
-
-
|
|
377
|
-
-
|
|
473
|
+
- [ ] Planner and checker models resolved from config
|
|
474
|
+
- [ ] Existing plans detected from GitHub Issue comments and handled (add/view/replan options)
|
|
475
|
+
- [ ] Context and research read from GitHub Issue comments (not local files)
|
|
476
|
+
- [ ] Planner agent spawned with Agent tool (not Task) with isolation=true
|
|
477
|
+
- [ ] Plan content returned from planner as in-memory document (no local PLAN.md files written)
|
|
478
|
+
- [ ] Checker verification loop runs (max 3 iterations) unless --skip-verify
|
|
479
|
+
- [ ] Revision loop passes in-memory plan content to planner for targeted fixes
|
|
480
|
+
- [ ] Agent tool used (not Task) for planner, checker, and revision spawning
|
|
481
|
+
- [ ] Plans posted to GitHub Issue #{phase_issue_number} as comments with <!-- maxsim:type=plan --> markers
|
|
482
|
+
- [ ] Task sub-issues created via `github batch-create-tasks` linked to phase issue
|
|
483
|
+
- Sub-issue bodies include: wave, dependencies, action, verify command, done criteria
|
|
484
|
+
- [ ] Phase issue moved to "In Progress" via `github move-issue`
|
|
485
|
+
- [ ] Failed task creation surfaced with retry option
|
|
486
|
+
- [ ] Control returned to orchestrator without showing gate or next steps
|
|
378
487
|
</success_criteria>
|