maxsimcli 5.0.7 → 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 +101 -99
- package/dist/assets/CHANGELOG.md +7 -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,21 +1,44 @@
|
|
|
1
|
-
<sanity_check>
|
|
2
|
-
Before executing any step in this workflow, verify:
|
|
3
|
-
1. The current directory contains a `.planning/` folder -- if not, stop and tell the user to run `/maxsim:init` first.
|
|
4
|
-
2. `.planning/ROADMAP.md` exists -- if not, stop and tell the user to initialize the project.
|
|
5
|
-
</sanity_check>
|
|
6
|
-
|
|
7
1
|
<purpose>
|
|
8
|
-
Thin orchestrator for the /maxsim:plan state machine. Detects the current stage of a phase
|
|
2
|
+
Thin orchestrator for the /maxsim:plan state machine. Detects the current stage of a phase
|
|
3
|
+
(Discussion, Research, Planning) from GitHub Issue comments using HTML markers, delegates to
|
|
4
|
+
stage sub-workflows, shows gate confirmations between stages, and handles re-entry on already-planned phases.
|
|
5
|
+
|
|
6
|
+
GitHub Issues is the sole source of truth. No local PLAN.md, CONTEXT.md, or RESEARCH.md files
|
|
7
|
+
are read or written by this orchestrator. All state is stored as GitHub Issue comments identified
|
|
8
|
+
by HTML markers: <!-- maxsim:type=context -->, <!-- maxsim:type=research -->, <!-- maxsim:type=plan -->.
|
|
9
9
|
|
|
10
10
|
This file is the ORCHESTRATOR ONLY. Stage-specific logic lives in:
|
|
11
|
-
- @~/.claude/maxsim/workflows/plan-discuss.md
|
|
11
|
+
- @~/.claude/maxsim/workflows/plan-discuss.md (Discussion stage)
|
|
12
12
|
- @~/.claude/maxsim/workflows/plan-research.md (Research stage)
|
|
13
|
-
- @~/.claude/maxsim/workflows/plan-create.md
|
|
13
|
+
- @~/.claude/maxsim/workflows/plan-create.md (Planning stage)
|
|
14
14
|
</purpose>
|
|
15
15
|
|
|
16
|
+
<critical_rules>
|
|
17
|
+
- Tool name is `Agent` (NOT `Task`)
|
|
18
|
+
- Agent spawning uses: Agent(prompt, model, isolation, run_in_background)
|
|
19
|
+
- GitHub Issues is the SOLE source of truth -- no local plan/context/research files
|
|
20
|
+
- Plans are posted as GitHub Issue comments with <!-- maxsim:type=plan -->
|
|
21
|
+
- Context is posted as: <!-- maxsim:type=context -->
|
|
22
|
+
- Research is posted as: <!-- maxsim:type=research -->
|
|
23
|
+
- Use `node ~/.claude/maxsim/bin/maxsim-tools.cjs` for all CLI operations
|
|
24
|
+
</critical_rules>
|
|
25
|
+
|
|
16
26
|
<process>
|
|
17
27
|
|
|
18
|
-
## 1.
|
|
28
|
+
## 1. Parse Arguments
|
|
29
|
+
|
|
30
|
+
Extract from $ARGUMENTS:
|
|
31
|
+
- Phase number (integer or decimal like `2.1`) -- **required**
|
|
32
|
+
- Flags: `--force-research`, `--skip-verify`
|
|
33
|
+
|
|
34
|
+
**If no phase number provided:** Error and exit:
|
|
35
|
+
```
|
|
36
|
+
Usage: /maxsim:plan <phase-number> [--force-research] [--skip-verify]
|
|
37
|
+
|
|
38
|
+
Use /maxsim:progress to see available phases.
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## 2. Initialize Phase Context
|
|
19
42
|
|
|
20
43
|
Load phase state in one call:
|
|
21
44
|
|
|
@@ -23,7 +46,10 @@ Load phase state in one call:
|
|
|
23
46
|
INIT=$(node ~/.claude/maxsim/bin/maxsim-tools.cjs init plan-phase "$PHASE")
|
|
24
47
|
```
|
|
25
48
|
|
|
26
|
-
Parse JSON for: `phase_found`, `phase_dir`, `phase_number`, `phase_name`, `phase_slug`,
|
|
49
|
+
Parse JSON for: `phase_found`, `phase_dir`, `phase_number`, `phase_name`, `phase_slug`,
|
|
50
|
+
`padded_phase`, `commit_docs`, `researcher_model`, `planner_model`, `checker_model`,
|
|
51
|
+
`research_enabled`, `plan_checker_enabled`, `state_path`, `roadmap_path`, `requirements_path`,
|
|
52
|
+
`phase_req_ids`, `phase_issue_number`.
|
|
27
53
|
|
|
28
54
|
**If `phase_found` is false:**
|
|
29
55
|
```
|
|
@@ -33,33 +59,52 @@ Use /maxsim:progress to see available phases.
|
|
|
33
59
|
```
|
|
34
60
|
Exit workflow.
|
|
35
61
|
|
|
36
|
-
##
|
|
62
|
+
## 3. Resolve Model Profile
|
|
37
63
|
|
|
38
|
-
|
|
64
|
+
```bash
|
|
65
|
+
MODEL_PROFILE=$(cat .planning/config.json 2>/dev/null | grep -o '"model_profile"[[:space:]]*:[[:space:]]*"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"' || echo "balanced")
|
|
66
|
+
RESEARCHER_MODEL=$(node ~/.claude/maxsim/bin/maxsim-tools.cjs resolve-model researcher --raw)
|
|
67
|
+
PLANNER_MODEL=$(node ~/.claude/maxsim/bin/maxsim-tools.cjs resolve-model planner --raw)
|
|
68
|
+
CHECKER_MODEL=$(node ~/.claude/maxsim/bin/maxsim-tools.cjs resolve-model planner --raw)
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## 4. Stage Detection (GitHub-First)
|
|
72
|
+
|
|
73
|
+
Detect planning stage by querying the phase GitHub Issue.
|
|
74
|
+
|
|
75
|
+
**Step 4a -- Ensure phase issue exists:**
|
|
39
76
|
|
|
40
|
-
|
|
77
|
+
If no `phase_issue_number` in init context (phase not yet on GitHub):
|
|
78
|
+
```bash
|
|
79
|
+
CREATE_RESULT=$(node ~/.claude/maxsim/bin/maxsim-tools.cjs github create-phase \
|
|
80
|
+
--phase-number "$PHASE_NUMBER" \
|
|
81
|
+
--phase-name "$PHASE_NAME" \
|
|
82
|
+
--goal "$GOAL" \
|
|
83
|
+
--requirements "$REQUIREMENTS" \
|
|
84
|
+
--success-criteria "$SUCCESS_CRITERIA")
|
|
85
|
+
PHASE_ISSUE_NUMBER=$(echo "$CREATE_RESULT" | jq -r '.issue_number')
|
|
86
|
+
```
|
|
41
87
|
|
|
42
|
-
|
|
88
|
+
**Step 4b -- Read issue with comments:**
|
|
89
|
+
```bash
|
|
90
|
+
ISSUE_DATA=$(node ~/.claude/maxsim/bin/maxsim-tools.cjs github get-issue \
|
|
91
|
+
--issue-number $PHASE_ISSUE_NUMBER \
|
|
92
|
+
--include-comments)
|
|
93
|
+
```
|
|
43
94
|
|
|
44
|
-
|
|
95
|
+
**Step 4c -- Detect markers in comments:**
|
|
96
|
+
- Has comment containing `<!-- maxsim:type=plan -->`? → `HAS_PLAN=true`
|
|
97
|
+
- Has comment containing `<!-- maxsim:type=research -->`? → `HAS_RESEARCH=true`
|
|
98
|
+
- Has comment containing `<!-- maxsim:type=context -->`? → `HAS_CONTEXT=true`
|
|
45
99
|
|
|
46
|
-
|
|
47
|
-
2. **If no `phase_issue_number` exists:** The phase has not been set up on GitHub yet.
|
|
48
|
-
- Run `node ~/.claude/maxsim/bin/maxsim-tools.cjs github create-phase --phase-number "$PHASE_NUMBER" --phase-name "$PHASE_NAME" --goal "$GOAL" --requirements "$REQUIREMENTS" --success-criteria "$SUCCESS_CRITERIA"` to create the issue (uses roadmap data).
|
|
49
|
-
- Store the returned issue number as `phase_issue_number`.
|
|
50
|
-
3. Run `node ~/.claude/maxsim/bin/maxsim-tools.cjs github get-issue --issue-number $PHASE_ISSUE_NUMBER --include-comments` to read the phase issue body and comments.
|
|
51
|
-
4. Check issue comments for existing artifacts using HTML marker comments:
|
|
52
|
-
- Has a comment containing `<!-- maxsim:type=context -->`? → Discussion stage complete
|
|
53
|
-
- Has a comment containing `<!-- maxsim:type=research -->`? → Research stage complete
|
|
54
|
-
- Has a comment containing `<!-- maxsim:type=plan -->`? → Planning stage complete
|
|
55
|
-
5. Determine next stage from the GitHub state:
|
|
100
|
+
**Step 4d -- Determine stage:**
|
|
56
101
|
|
|
57
|
-
| GitHub
|
|
58
|
-
|
|
59
|
-
| Has `type=plan`
|
|
60
|
-
| Has `type=research`, no `type=plan` | Planning | Start at **Planning stage** (
|
|
61
|
-
| Has `type=context`, no `type=research` | Research | Start at **Research stage** (
|
|
62
|
-
| No marker comments | Discussion | Start at **Discussion stage** (
|
|
102
|
+
| GitHub State | Stage | Next Action |
|
|
103
|
+
|---|---|---|
|
|
104
|
+
| Has `type=plan` | Already planned | Go to **Re-entry flow** (Step 5) |
|
|
105
|
+
| Has `type=research`, no `type=plan` | Planning | Start at **Planning stage** (Step 8) |
|
|
106
|
+
| Has `type=context`, no `type=research` | Research | Start at **Research stage** (Step 7) |
|
|
107
|
+
| No marker comments | Discussion | Start at **Discussion stage** (Step 6) |
|
|
63
108
|
|
|
64
109
|
Display detected stage:
|
|
65
110
|
```
|
|
@@ -68,9 +113,9 @@ GitHub Issue: #{phase_issue_number}
|
|
|
68
113
|
Current stage: {Discussion | Research | Planning | Already planned}
|
|
69
114
|
```
|
|
70
115
|
|
|
71
|
-
##
|
|
116
|
+
## 5. Re-entry Flow (Already Planned)
|
|
72
117
|
|
|
73
|
-
When a `type=plan` comment exists on the phase issue, the phase has been planned.
|
|
118
|
+
When a `type=plan` comment exists on the phase issue, the phase has been planned.
|
|
74
119
|
|
|
75
120
|
Display:
|
|
76
121
|
```
|
|
@@ -81,7 +126,7 @@ Display:
|
|
|
81
126
|
|
|
82
127
|
**Options:**
|
|
83
128
|
1. View existing plans
|
|
84
|
-
2. Re-plan from scratch (
|
|
129
|
+
2. Re-plan from scratch (removes plan comments, restarts from Discussion)
|
|
85
130
|
3. Execute phase -- run /maxsim:execute {phase_number}
|
|
86
131
|
4. Done (exit)
|
|
87
132
|
```
|
|
@@ -89,23 +134,27 @@ Display:
|
|
|
89
134
|
Wait for user choice via natural conversation.
|
|
90
135
|
|
|
91
136
|
- **View:** Display contents of each `type=plan` comment from the issue, then re-show options.
|
|
92
|
-
- **Re-plan:** Delete existing plan/context/research comments from the phase issue
|
|
137
|
+
- **Re-plan:** Delete existing plan/context/research comments from the phase issue (use
|
|
138
|
+
`node ~/.claude/maxsim/bin/maxsim-tools.cjs github delete-comments --issue-number $PHASE_ISSUE_NUMBER --type plan,context,research`),
|
|
139
|
+
reset to Discussion stage (Step 6).
|
|
93
140
|
- **Execute:** Display `/maxsim:execute {phase_number}` and exit.
|
|
94
141
|
- **Done:** Exit workflow.
|
|
95
142
|
|
|
96
|
-
##
|
|
143
|
+
## 6. Discussion Stage
|
|
97
144
|
|
|
98
145
|
Delegate to the discussion sub-workflow for full discussion logic:
|
|
99
146
|
|
|
100
147
|
@~/.claude/maxsim/workflows/plan-discuss.md
|
|
101
148
|
|
|
102
|
-
Pass context: `phase_number`, `phase_name`, `phase_dir`, `padded_phase`, `phase_slug`,
|
|
149
|
+
Pass context: `phase_number`, `phase_name`, `phase_dir`, `padded_phase`, `phase_slug`,
|
|
150
|
+
`commit_docs`, `roadmap_path`, `state_path`, `phase_issue_number`.
|
|
103
151
|
|
|
104
152
|
**After discussion completes (context posted as GitHub comment):**
|
|
105
153
|
|
|
106
154
|
Re-query the phase issue to verify the `type=context` comment now exists:
|
|
107
155
|
```bash
|
|
108
|
-
node ~/.claude/maxsim/bin/maxsim-tools.cjs github get-issue
|
|
156
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github get-issue \
|
|
157
|
+
--issue-number $PHASE_ISSUE_NUMBER --include-comments
|
|
109
158
|
```
|
|
110
159
|
|
|
111
160
|
Show gate:
|
|
@@ -122,25 +171,29 @@ Show gate:
|
|
|
122
171
|
Continue to research? [Yes / Review context / Re-discuss area]
|
|
123
172
|
```
|
|
124
173
|
|
|
125
|
-
Wait for user response via natural conversation
|
|
174
|
+
Wait for user response via natural conversation.
|
|
126
175
|
|
|
127
|
-
- **Yes:** Advance to Research stage (
|
|
176
|
+
- **Yes:** Advance to Research stage (Step 7).
|
|
128
177
|
- **Review context:** Display context comment contents, then re-show gate.
|
|
129
178
|
- **Re-discuss area:** Loop back to discussion sub-workflow with the area to re-discuss.
|
|
130
179
|
|
|
131
|
-
##
|
|
180
|
+
## 7. Research Stage
|
|
132
181
|
|
|
133
182
|
Delegate to the research sub-workflow:
|
|
134
183
|
|
|
135
184
|
@~/.claude/maxsim/workflows/plan-research.md
|
|
136
185
|
|
|
137
|
-
Pass context: `phase_number`, `phase_name`, `phase_dir`, `padded_phase`, `phase_slug`,
|
|
186
|
+
Pass context: `phase_number`, `phase_name`, `phase_dir`, `padded_phase`, `phase_slug`,
|
|
187
|
+
`commit_docs`, `researcher_model`, `research_enabled`, `has_research`, `state_path`,
|
|
188
|
+
`roadmap_path`, `requirements_path`, `phase_req_ids`, `phase_issue_number`.
|
|
189
|
+
Also pass the `--force-research` flag if present in $ARGUMENTS.
|
|
138
190
|
|
|
139
191
|
**After research completes (research posted as GitHub comment or already exists):**
|
|
140
192
|
|
|
141
193
|
Re-query the phase issue to verify the `type=research` comment now exists:
|
|
142
194
|
```bash
|
|
143
|
-
node ~/.claude/maxsim/bin/maxsim-tools.cjs github get-issue
|
|
195
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github get-issue \
|
|
196
|
+
--issue-number $PHASE_ISSUE_NUMBER --include-comments
|
|
144
197
|
```
|
|
145
198
|
|
|
146
199
|
Show gate:
|
|
@@ -156,23 +209,27 @@ Continue to planning? [Yes / Review research / Re-research]
|
|
|
156
209
|
|
|
157
210
|
Wait for user response via natural conversation.
|
|
158
211
|
|
|
159
|
-
- **Yes:** Advance to Planning stage (
|
|
212
|
+
- **Yes:** Advance to Planning stage (Step 8).
|
|
160
213
|
- **Review research:** Display research comment contents, then re-show gate.
|
|
161
214
|
- **Re-research:** Loop back to research sub-workflow with `--force-research`.
|
|
162
215
|
|
|
163
|
-
##
|
|
216
|
+
## 8. Planning Stage
|
|
164
217
|
|
|
165
218
|
Delegate to the planning sub-workflow:
|
|
166
219
|
|
|
167
220
|
@~/.claude/maxsim/workflows/plan-create.md
|
|
168
221
|
|
|
169
|
-
Pass context: `phase_number`, `phase_name`, `phase_dir`, `padded_phase`, `phase_slug`,
|
|
222
|
+
Pass context: `phase_number`, `phase_name`, `phase_dir`, `padded_phase`, `phase_slug`,
|
|
223
|
+
`commit_docs`, `planner_model`, `checker_model`, `plan_checker_enabled`, `state_path`,
|
|
224
|
+
`roadmap_path`, `requirements_path`, `phase_req_ids`, `phase_issue_number`.
|
|
225
|
+
Also pass the `--skip-verify` flag if present in $ARGUMENTS.
|
|
170
226
|
|
|
171
227
|
**After planning completes (plans posted as GitHub comments and task sub-issues created):**
|
|
172
228
|
|
|
173
229
|
Re-query the phase issue to verify `type=plan` comments exist:
|
|
174
230
|
```bash
|
|
175
|
-
node ~/.claude/maxsim/bin/maxsim-tools.cjs github get-issue
|
|
231
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github get-issue \
|
|
232
|
+
--issue-number $PHASE_ISSUE_NUMBER --include-comments
|
|
176
233
|
```
|
|
177
234
|
|
|
178
235
|
Show final gate:
|
|
@@ -192,17 +249,20 @@ Show final gate:
|
|
|
192
249
|
Ready to execute? Run `/maxsim:execute {phase_number}`
|
|
193
250
|
```
|
|
194
251
|
|
|
195
|
-
This is the final gate -- no confirmation needed. The user's next action is to run
|
|
252
|
+
This is the final gate -- no further confirmation needed. The user's next action is to run
|
|
253
|
+
`/maxsim:execute`.
|
|
196
254
|
|
|
197
|
-
##
|
|
255
|
+
## 9. Checkpoint Before /clear
|
|
198
256
|
|
|
199
|
-
At any point during the workflow, if context is getting full (conversation is long, many tool
|
|
257
|
+
At any point during the workflow, if context is getting full (conversation is long, many tool
|
|
258
|
+
calls made), recommend checkpointing before `/clear`.
|
|
200
259
|
|
|
201
260
|
**Checkpoint protocol:**
|
|
202
261
|
1. Post a checkpoint comment to the phase's GitHub Issue:
|
|
203
262
|
```bash
|
|
204
263
|
TMPFILE=$(mktemp)
|
|
205
264
|
cat > "$TMPFILE" << 'BODY_EOF'
|
|
265
|
+
<!-- maxsim:type=checkpoint -->
|
|
206
266
|
## MAXSIM Checkpoint
|
|
207
267
|
|
|
208
268
|
**Command:** /maxsim:plan
|
|
@@ -212,21 +272,25 @@ cat > "$TMPFILE" << 'BODY_EOF'
|
|
|
212
272
|
**Resume from:** {next_stage}
|
|
213
273
|
**Timestamp:** {ISO timestamp}
|
|
214
274
|
BODY_EOF
|
|
215
|
-
node ~/.claude/maxsim/bin/maxsim-tools.cjs github post-comment
|
|
275
|
+
node ~/.claude/maxsim/bin/maxsim-tools.cjs github post-comment \
|
|
276
|
+
--issue-number $PHASE_ISSUE_NUMBER --body-file "$TMPFILE" --type checkpoint
|
|
216
277
|
```
|
|
217
278
|
|
|
218
279
|
2. Display checkpoint recommendation:
|
|
219
280
|
```
|
|
220
281
|
Context is filling up. Recommended: save progress and /clear.
|
|
221
282
|
|
|
222
|
-
Your progress has been checkpointed on GitHub Issue #{phase_issue_number}.
|
|
283
|
+
Your progress has been checkpointed on GitHub Issue #{phase_issue_number}.
|
|
284
|
+
Re-run `/maxsim:plan {phase_number}` after /clear -- it will detect completed stages
|
|
285
|
+
from GitHub and resume from {next_stage}.
|
|
223
286
|
```
|
|
224
287
|
|
|
225
|
-
|
|
288
|
+
Stage detection in Step 4 handles resume automatically -- completed stages produce marker
|
|
289
|
+
comments that are detected on re-entry.
|
|
226
290
|
|
|
227
|
-
##
|
|
291
|
+
## 10. Update State
|
|
228
292
|
|
|
229
|
-
After all stages complete
|
|
293
|
+
After all stages complete:
|
|
230
294
|
|
|
231
295
|
```bash
|
|
232
296
|
node ~/.claude/maxsim/bin/maxsim-tools.cjs state record-session \
|
|
@@ -246,7 +310,7 @@ node ~/.claude/maxsim/bin/maxsim-tools.cjs state record-session \
|
|
|
246
310
|
- [ ] Planning stage delegates to plan-create.md sub-workflow
|
|
247
311
|
- [ ] Gate confirmation shown after each stage transition
|
|
248
312
|
- [ ] User confirms before advancing to next stage
|
|
249
|
-
- [ ] Checkpoint-before-clear posts to GitHub Issue and resumes via GitHub detection
|
|
313
|
+
- [ ] Checkpoint-before-clear posts to GitHub Issue and resumes via GitHub marker detection
|
|
250
314
|
- [ ] No stage-specific logic inline -- all delegated to sub-workflows
|
|
315
|
+
- [ ] Agent tool used (not Task) for all agent spawning
|
|
251
316
|
</success_criteria>
|
|
252
|
-
</output>
|