mindsystem-cc 3.2.2 → 3.3.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 +2 -2
- package/agents/ms-code-simplifier.md +215 -0
- package/agents/ms-consolidator.md +377 -0
- package/agents/ms-executor.md +32 -261
- package/{commands/ms/simplify-flutter.md → agents/ms-flutter-simplifier.md} +41 -49
- package/agents/ms-researcher.md +2 -2
- package/commands/ms/complete-milestone.md +24 -3
- package/commands/ms/do-work.md +17 -3
- package/commands/ms/execute-phase.md +29 -14
- package/commands/ms/help.md +4 -23
- package/commands/ms/new-milestone.md +42 -30
- package/commands/ms/new-project.md +5 -14
- package/commands/ms/progress.md +1 -1
- package/commands/ms/research-project.md +8 -0
- package/commands/ms/review-design.md +1 -1
- package/commands/ms/whats-new.md +3 -3
- package/mindsystem/references/git-integration.md +2 -2
- package/mindsystem/references/goal-backward.md +2 -2
- package/mindsystem/references/principles.md +1 -1
- package/mindsystem/templates/adhoc-summary.md +3 -0
- package/mindsystem/templates/codebase/architecture.md +2 -2
- package/mindsystem/templates/codebase/structure.md +1 -1
- package/mindsystem/templates/config.json +2 -12
- package/mindsystem/templates/decisions.md +145 -0
- package/mindsystem/workflows/complete-milestone.md +58 -25
- package/mindsystem/workflows/create-milestone.md +60 -20
- package/mindsystem/workflows/do-work.md +81 -4
- package/mindsystem/workflows/execute-phase.md +66 -0
- package/mindsystem/workflows/execute-plan.md +1 -53
- package/mindsystem/workflows/map-codebase.md +9 -1
- package/mindsystem/workflows/plan-phase.md +0 -39
- package/mindsystem/workflows/transition.md +0 -74
- package/mindsystem/workflows/verify-work.md +1 -1
- package/package.json +1 -1
- package/scripts/generate-adhoc-patch.sh +79 -0
- package/scripts/ms-lookup/uv.lock +17 -17
- package/commands/ms/discuss-milestone.md +0 -48
- package/commands/ms/linear.md +0 -195
- package/mindsystem/templates/milestone-context.md +0 -93
- package/scripts/ms-linear/ms_linear/__init__.py +0 -3
- package/scripts/ms-linear/ms_linear/__main__.py +0 -6
- package/scripts/ms-linear/ms_linear/__pycache__/__init__.cpython-314.pyc +0 -0
- package/scripts/ms-linear/ms_linear/__pycache__/__main__.cpython-314.pyc +0 -0
- package/scripts/ms-linear/ms_linear/__pycache__/cli.cpython-314.pyc +0 -0
- package/scripts/ms-linear/ms_linear/__pycache__/client.cpython-314.pyc +0 -0
- package/scripts/ms-linear/ms_linear/__pycache__/config.cpython-314.pyc +0 -0
- package/scripts/ms-linear/ms_linear/__pycache__/errors.cpython-314.pyc +0 -0
- package/scripts/ms-linear/ms_linear/__pycache__/output.cpython-314.pyc +0 -0
- package/scripts/ms-linear/ms_linear/cli.py +0 -604
- package/scripts/ms-linear/ms_linear/client.py +0 -503
- package/scripts/ms-linear/ms_linear/config.py +0 -104
- package/scripts/ms-linear/ms_linear/errors.py +0 -29
- package/scripts/ms-linear/ms_linear/output.py +0 -45
- package/scripts/ms-linear/pyproject.toml +0 -16
- package/scripts/ms-linear/uv.lock +0 -196
- package/scripts/ms-linear-wrapper.sh +0 -22
|
@@ -22,12 +22,14 @@ This is the ritual that separates "development" from "shipped."
|
|
|
22
22
|
|
|
23
23
|
When a milestone completes, this workflow:
|
|
24
24
|
|
|
25
|
-
1.
|
|
26
|
-
2.
|
|
27
|
-
3.
|
|
28
|
-
4.
|
|
29
|
-
5.
|
|
30
|
-
6.
|
|
25
|
+
1. Consolidates phase decisions into `.planning/milestones/v[X.Y]-DECISIONS.md`
|
|
26
|
+
2. Cleans up phase artifacts (PLAN, CONTEXT, RESEARCH, DESIGN files deleted)
|
|
27
|
+
3. Extracts full milestone details to `.planning/milestones/v[X.Y]-ROADMAP.md`
|
|
28
|
+
4. Archives requirements to `.planning/milestones/v[X.Y]-REQUIREMENTS.md`
|
|
29
|
+
5. Updates ROADMAP.md to replace milestone details with one-line summary
|
|
30
|
+
6. Deletes REQUIREMENTS.md (fresh one created for next milestone)
|
|
31
|
+
7. Performs full PROJECT.md evolution review
|
|
32
|
+
8. Routes to `/ms:new-milestone` for next milestone
|
|
31
33
|
|
|
32
34
|
**Context Efficiency:**
|
|
33
35
|
|
|
@@ -90,8 +92,6 @@ cat .planning/config.json 2>/dev/null
|
|
|
90
92
|
|
|
91
93
|
</config-check>
|
|
92
94
|
|
|
93
|
-
<if mode="yolo">
|
|
94
|
-
|
|
95
95
|
```
|
|
96
96
|
⚡ Auto-approved: Milestone scope verification
|
|
97
97
|
|
|
@@ -100,23 +100,50 @@ cat .planning/config.json 2>/dev/null
|
|
|
100
100
|
Proceeding to stats gathering...
|
|
101
101
|
```
|
|
102
102
|
|
|
103
|
-
Proceed directly to
|
|
103
|
+
Proceed directly to consolidate_decisions step.
|
|
104
|
+
|
|
105
|
+
</step>
|
|
106
|
+
|
|
107
|
+
<step name="consolidate_decisions">
|
|
104
108
|
|
|
105
|
-
|
|
109
|
+
Consolidate phase decisions before archiving.
|
|
106
110
|
|
|
107
|
-
|
|
111
|
+
**Spawn ms-consolidator agent:**
|
|
108
112
|
|
|
109
113
|
```
|
|
110
|
-
|
|
111
|
-
|
|
114
|
+
Task(
|
|
115
|
+
prompt="Consolidate decisions from milestone v[X.Y] [Name].
|
|
116
|
+
|
|
117
|
+
Phase range: [PHASE_START]-[PHASE_END]
|
|
118
|
+
Phase directories:
|
|
119
|
+
- .planning/phases/01-foundation
|
|
120
|
+
- .planning/phases/02-auth
|
|
121
|
+
- [etc. for all phases in milestone]
|
|
122
|
+
|
|
123
|
+
Extract decisions from PLAN, CONTEXT, RESEARCH, DESIGN files.
|
|
124
|
+
Create v[X.Y]-DECISIONS.md in .planning/milestones/.
|
|
125
|
+
Delete source files (preserve SUMMARY, VERIFICATION, UAT).",
|
|
126
|
+
subagent_type="ms-consolidator"
|
|
127
|
+
)
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**Wait for completion and verify:**
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
ls .planning/milestones/v[X.Y]-DECISIONS.md
|
|
112
134
|
```
|
|
113
135
|
|
|
114
|
-
|
|
136
|
+
**Present consolidation summary:**
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
✓ Decisions consolidated: [N] decisions in [M] categories
|
|
140
|
+
✓ Source files cleaned: PLAN, CONTEXT, RESEARCH, DESIGN deleted
|
|
141
|
+
✓ Preserved: SUMMARY, VERIFICATION, UAT files
|
|
115
142
|
|
|
116
|
-
|
|
117
|
-
|
|
143
|
+
Report: .planning/milestones/v[X.Y]-DECISIONS.md
|
|
144
|
+
```
|
|
118
145
|
|
|
119
|
-
|
|
146
|
+
Continue to gather_stats step.
|
|
120
147
|
|
|
121
148
|
</step>
|
|
122
149
|
|
|
@@ -622,6 +649,7 @@ Commit milestone completion including archive files and deletions.
|
|
|
622
649
|
|
|
623
650
|
```bash
|
|
624
651
|
# Stage archive files (new)
|
|
652
|
+
git add .planning/milestones/v[X.Y]-DECISIONS.md
|
|
625
653
|
git add .planning/milestones/v[X.Y]-ROADMAP.md
|
|
626
654
|
git add .planning/milestones/v[X.Y]-REQUIREMENTS.md
|
|
627
655
|
git add .planning/milestones/v[X.Y]-MILESTONE-AUDIT.md 2>/dev/null || true
|
|
@@ -639,10 +667,14 @@ git commit -m "$(cat <<'EOF'
|
|
|
639
667
|
chore: complete v[X.Y] milestone
|
|
640
668
|
|
|
641
669
|
Archived:
|
|
670
|
+
- milestones/v[X.Y]-DECISIONS.md (consolidated decisions)
|
|
642
671
|
- milestones/v[X.Y]-ROADMAP.md
|
|
643
672
|
- milestones/v[X.Y]-REQUIREMENTS.md
|
|
644
673
|
- milestones/v[X.Y]-MILESTONE-AUDIT.md (if audit was run)
|
|
645
674
|
|
|
675
|
+
Cleaned:
|
|
676
|
+
- Phase PLAN, CONTEXT, RESEARCH, DESIGN files (consolidated into DECISIONS.md)
|
|
677
|
+
|
|
646
678
|
Deleted (fresh for next milestone):
|
|
647
679
|
- ROADMAP.md
|
|
648
680
|
- REQUIREMENTS.md
|
|
@@ -681,20 +713,19 @@ Tag: v[X.Y]
|
|
|
681
713
|
|
|
682
714
|
## ▶ Next Up
|
|
683
715
|
|
|
684
|
-
**
|
|
716
|
+
**Start Next Milestone** — define goals and requirements
|
|
685
717
|
|
|
686
|
-
`/ms:
|
|
718
|
+
`/ms:new-milestone`
|
|
687
719
|
|
|
688
720
|
<sub>`/clear` first → fresh context window</sub>
|
|
689
721
|
|
|
690
722
|
---
|
|
691
723
|
|
|
692
724
|
**Next milestone flow:**
|
|
693
|
-
1. `/ms:
|
|
694
|
-
2. `/ms:
|
|
695
|
-
3. `/ms:
|
|
696
|
-
4. `/ms:
|
|
697
|
-
5. `/ms:create-roadmap` — plan how to build it
|
|
725
|
+
1. `/ms:new-milestone` — discover what to build, update PROJECT.md with goals
|
|
726
|
+
2. `/ms:research-project` — (optional) research ecosystem
|
|
727
|
+
3. `/ms:define-requirements` — scope what to build
|
|
728
|
+
4. `/ms:create-roadmap` — plan how to build it
|
|
698
729
|
|
|
699
730
|
---
|
|
700
731
|
```
|
|
@@ -743,6 +774,8 @@ If yes → milestone. If no → keep working.
|
|
|
743
774
|
|
|
744
775
|
Milestone completion is successful when:
|
|
745
776
|
|
|
777
|
+
- [ ] Decisions consolidated (milestones/v[X.Y]-DECISIONS.md created)
|
|
778
|
+
- [ ] Phase artifacts cleaned (PLAN, CONTEXT, RESEARCH, DESIGN deleted)
|
|
746
779
|
- [ ] MILESTONES.md entry created with stats and accomplishments
|
|
747
780
|
- [ ] PROJECT.md full evolution review completed
|
|
748
781
|
- [ ] All shipped requirements moved to Validated in PROJECT.md
|
|
@@ -754,6 +787,6 @@ Milestone completion is successful when:
|
|
|
754
787
|
- [ ] STATE.md updated with fresh project reference
|
|
755
788
|
- [ ] Git tag created (v[X.Y])
|
|
756
789
|
- [ ] Milestone commit made (includes archive files and deletion)
|
|
757
|
-
- [ ] User knows next steps (starting with /ms:
|
|
790
|
+
- [ ] User knows next steps (starting with /ms:new-milestone)
|
|
758
791
|
|
|
759
792
|
</success_criteria>
|
|
@@ -25,7 +25,6 @@ Load project context:
|
|
|
25
25
|
cat .planning/PROJECT.md
|
|
26
26
|
cat .planning/MILESTONES.md 2>/dev/null || echo "No milestones file yet"
|
|
27
27
|
cat .planning/STATE.md
|
|
28
|
-
cat .planning/MILESTONE-CONTEXT.md 2>/dev/null || echo "No milestone context file"
|
|
29
28
|
cat .planning/config.json 2>/dev/null
|
|
30
29
|
```
|
|
31
30
|
|
|
@@ -33,22 +32,21 @@ Extract:
|
|
|
33
32
|
- What shipped previously (from MILESTONES.md)
|
|
34
33
|
- Current Validated requirements (from PROJECT.md)
|
|
35
34
|
- Pending todos and blockers (from STATE.md)
|
|
36
|
-
- Any context from discuss-milestone (MILESTONE-CONTEXT.md)
|
|
37
35
|
|
|
38
36
|
**Calculate next milestone version:**
|
|
39
37
|
- Parse last version from MILESTONES.md
|
|
40
38
|
- If v1.0 → suggest v1.1 (minor) or v2.0 (major)
|
|
41
39
|
- If v1.3 → suggest v1.4 or v2.0
|
|
42
|
-
</step>
|
|
43
40
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
- Skip to confirm_goals step
|
|
41
|
+
**Calculate previous milestone for context:**
|
|
42
|
+
- If v1.1 starting → previous is v1.0
|
|
43
|
+
- Store previous version number for use in gather_goals step
|
|
44
|
+
- Context files (DECISIONS.md, AUDIT.md) will be loaded on-demand based on user's choice
|
|
49
45
|
|
|
50
|
-
**
|
|
46
|
+
**Why only the last milestone?** Older decisions that remain important should already be in PROJECT.md or visible in the codebase. Older untested assumptions that weren't addressed are intentionally skipped. Loading all previous milestones would bloat context for diminishing returns.
|
|
47
|
+
</step>
|
|
51
48
|
|
|
49
|
+
<step name="gather_goals">
|
|
52
50
|
Present what shipped:
|
|
53
51
|
```
|
|
54
52
|
Last milestone: v[X.Y] [Name]
|
|
@@ -62,15 +60,65 @@ Pending todos:
|
|
|
62
60
|
- [From STATE.md if any]
|
|
63
61
|
```
|
|
64
62
|
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
**Decision gate:**
|
|
64
|
+
|
|
65
|
+
Use AskUserQuestion:
|
|
66
|
+
```
|
|
67
|
+
header: "New Milestone"
|
|
68
|
+
question: "How do you want to start v[X.Y]?"
|
|
69
|
+
options:
|
|
70
|
+
- "I know what to build" — proceed to goal gathering
|
|
71
|
+
- "Help me figure it out" — enter discovery mode with previous context
|
|
72
|
+
- "Show previous decisions first" — view DECISIONS.md and AUDIT.md, then decide
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**If "I know what to build":**
|
|
76
|
+
- Ask directly: "What do you want to build in the next milestone?"
|
|
77
|
+
- Wait for response
|
|
78
|
+
- Proceed to confirm_goals
|
|
79
|
+
|
|
80
|
+
**If "Show previous decisions first":**
|
|
81
|
+
- Using the previous version from load_context (e.g., "1.0"):
|
|
82
|
+
- Check for and read `.planning/milestones/v1.0-DECISIONS.md` if exists
|
|
83
|
+
- Check for and read `.planning/milestones/v1.0-MILESTONE-AUDIT.md` if exists
|
|
84
|
+
- Present relevant context from these files
|
|
85
|
+
- Then present decision gate again (without this option)
|
|
86
|
+
|
|
87
|
+
**If "Help me figure it out" (Discovery Mode):**
|
|
88
|
+
- Using the previous version from load_context:
|
|
89
|
+
- Check for and read `.planning/milestones/v{VERSION}-DECISIONS.md` if exists
|
|
90
|
+
- Check for and read `.planning/milestones/v{VERSION}-MILESTONE-AUDIT.md` if exists
|
|
91
|
+
|
|
92
|
+
Surface untested assumptions (from AUDIT.md):
|
|
93
|
+
```
|
|
94
|
+
📋 Untested from v[previous]:
|
|
95
|
+
- Error state displays (couldn't mock API errors)
|
|
96
|
+
- Empty state handling (couldn't clear test data)
|
|
97
|
+
- [etc. from assumptions section]
|
|
98
|
+
|
|
99
|
+
These were skipped during UAT. Address them in this milestone?
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Run AskUserQuestion-based feature discovery:
|
|
103
|
+
```
|
|
104
|
+
header: "What to build"
|
|
105
|
+
question: "What do you want to add, improve, or fix?"
|
|
106
|
+
options:
|
|
107
|
+
- "Address untested assumptions" — add test infrastructure or fix gaps
|
|
108
|
+
- "New features" — build something new
|
|
109
|
+
- "Improvements" — enhance existing features
|
|
110
|
+
- "Bug fixes" — fix known issues
|
|
111
|
+
- "Let me describe" — freeform input
|
|
112
|
+
```
|
|
67
113
|
|
|
68
|
-
|
|
114
|
+
Continue with follow-up questions:
|
|
69
115
|
- Probe specific features mentioned
|
|
70
116
|
- Ask about priorities
|
|
71
117
|
- Surface constraints or dependencies
|
|
72
118
|
- Clarify scope boundaries
|
|
73
119
|
|
|
120
|
+
Follow questioning.md patterns for AskUserQuestion-based discovery.
|
|
121
|
+
|
|
74
122
|
Continue until you have clear milestone goals.
|
|
75
123
|
</step>
|
|
76
124
|
|
|
@@ -138,13 +186,6 @@ Progress: ░░░░░░░░░░ 0%
|
|
|
138
186
|
Keep Accumulated Context (decisions, blockers) from previous milestone.
|
|
139
187
|
</step>
|
|
140
188
|
|
|
141
|
-
<step name="cleanup">
|
|
142
|
-
Delete temporary context file if it exists:
|
|
143
|
-
|
|
144
|
-
```bash
|
|
145
|
-
rm -f .planning/MILESTONE-CONTEXT.md
|
|
146
|
-
```
|
|
147
|
-
</step>
|
|
148
189
|
|
|
149
190
|
<step name="git_commit">
|
|
150
191
|
```bash
|
|
@@ -197,7 +238,6 @@ PROJECT.md updated with:
|
|
|
197
238
|
- PROJECT.md updated with Current Milestone section
|
|
198
239
|
- Active requirements reflect new milestone goals
|
|
199
240
|
- STATE.md reset for new milestone (keeps accumulated context)
|
|
200
|
-
- MILESTONE-CONTEXT.md consumed and deleted (if existed)
|
|
201
241
|
- Git commit made
|
|
202
242
|
- User routed to define-requirements (or research-project)
|
|
203
243
|
</success_criteria>
|
|
@@ -48,11 +48,11 @@ Validate description is actionable (not vague like "fix stuff" or "make it work"
|
|
|
48
48
|
</step>
|
|
49
49
|
|
|
50
50
|
<step name="validate_project">
|
|
51
|
-
Verify active
|
|
51
|
+
Verify active Mindsystem project:
|
|
52
52
|
|
|
53
53
|
```bash
|
|
54
54
|
if [ ! -f .planning/STATE.md ]; then
|
|
55
|
-
echo "ERROR: No active
|
|
55
|
+
echo "ERROR: No active Mindsystem project found (.planning/STATE.md missing)"
|
|
56
56
|
echo ""
|
|
57
57
|
echo "Options:"
|
|
58
58
|
echo "- Initialize project: /ms:new-project"
|
|
@@ -217,6 +217,56 @@ Verify the work is complete:
|
|
|
217
217
|
Keep verification focused on the specific changes made.
|
|
218
218
|
</step>
|
|
219
219
|
|
|
220
|
+
<step name="simplify_code">
|
|
221
|
+
Read simplifier from config:
|
|
222
|
+
|
|
223
|
+
```bash
|
|
224
|
+
SIMPLIFIER=$(cat .planning/config.json 2>/dev/null | jq -r '.simplifier // empty')
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
**If SIMPLIFIER = "skip":**
|
|
228
|
+
Skip to create_adhoc_summary.
|
|
229
|
+
|
|
230
|
+
**If SIMPLIFIER = empty/null:**
|
|
231
|
+
Use default: `SIMPLIFIER="ms-code-simplifier"`
|
|
232
|
+
|
|
233
|
+
**Otherwise:**
|
|
234
|
+
Use SIMPLIFIER value directly as agent name.
|
|
235
|
+
|
|
236
|
+
1. **Get modified files:**
|
|
237
|
+
```bash
|
|
238
|
+
git diff --name-only HEAD | grep -E '\.(dart|ts|tsx|js|jsx|swift|kt|py|go|rs)$'
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
2. **Spawn simplifier with adhoc scope:**
|
|
242
|
+
```
|
|
243
|
+
Task(
|
|
244
|
+
prompt="
|
|
245
|
+
<objective>
|
|
246
|
+
Simplify code modified in adhoc work.
|
|
247
|
+
Preserve all functionality. Improve clarity and consistency.
|
|
248
|
+
</objective>
|
|
249
|
+
|
|
250
|
+
<scope>
|
|
251
|
+
Files to analyze:
|
|
252
|
+
{MODIFIED_FILES}
|
|
253
|
+
</scope>
|
|
254
|
+
|
|
255
|
+
<output>
|
|
256
|
+
After simplifications, run static analysis and tests.
|
|
257
|
+
Report what was simplified and verification results.
|
|
258
|
+
</output>
|
|
259
|
+
",
|
|
260
|
+
subagent_type="{SIMPLIFIER}"
|
|
261
|
+
)
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
3. **Track simplification changes:**
|
|
265
|
+
- If changes made: Set `SIMPLIFICATION_APPLIED=true`
|
|
266
|
+
- Simplified files will be included in the adhoc commit
|
|
267
|
+
- Note in SUMMARY.md that simplification was applied
|
|
268
|
+
</step>
|
|
269
|
+
|
|
220
270
|
<step name="create_adhoc_summary">
|
|
221
271
|
Create SUMMARY.md (see @~/.claude/mindsystem/templates/adhoc-summary.md for full template):
|
|
222
272
|
|
|
@@ -286,11 +336,12 @@ If section doesn't exist, add after "### Pending Todos" section:
|
|
|
286
336
|
</step>
|
|
287
337
|
|
|
288
338
|
<step name="git_commit">
|
|
289
|
-
Single commit for all changes:
|
|
339
|
+
Single commit for all changes (including simplifications if applied):
|
|
290
340
|
|
|
291
341
|
```bash
|
|
292
|
-
# Add all modified files
|
|
342
|
+
# Add all modified files (code + simplified files)
|
|
293
343
|
git add [code files modified]
|
|
344
|
+
git add [simplified files if SIMPLIFICATION_APPLIED]
|
|
294
345
|
git add "$plan_file"
|
|
295
346
|
git add "$summary_file"
|
|
296
347
|
git add .planning/STATE.md
|
|
@@ -300,10 +351,18 @@ git add .planning/STATE.md
|
|
|
300
351
|
# fix: bug fix, correction
|
|
301
352
|
commit_type="fix" # or "feat" based on nature of work
|
|
302
353
|
|
|
354
|
+
# Include simplification note if applied
|
|
355
|
+
if [ "$SIMPLIFICATION_APPLIED" = "true" ]; then
|
|
356
|
+
simplification_note="Includes code simplification pass."
|
|
357
|
+
else
|
|
358
|
+
simplification_note=""
|
|
359
|
+
fi
|
|
360
|
+
|
|
303
361
|
git commit -m "$(cat <<'EOF'
|
|
304
362
|
${commit_type}(adhoc): [description]
|
|
305
363
|
|
|
306
364
|
Files: [count] modified
|
|
365
|
+
${simplification_note}
|
|
307
366
|
EOF
|
|
308
367
|
)"
|
|
309
368
|
|
|
@@ -314,6 +373,22 @@ commit_hash=$(git rev-parse --short HEAD)
|
|
|
314
373
|
Update SUMMARY.md with commit hash in frontmatter.
|
|
315
374
|
</step>
|
|
316
375
|
|
|
376
|
+
<step name="generate_adhoc_patch">
|
|
377
|
+
Generate patch file from the adhoc commit:
|
|
378
|
+
|
|
379
|
+
```bash
|
|
380
|
+
patch_file=".planning/adhoc/${timestamp}-${slug}.patch"
|
|
381
|
+
|
|
382
|
+
~/.claude/mindsystem/scripts/generate-adhoc-patch.sh "$commit_hash" "$patch_file"
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
If patch generated (file exists and non-empty):
|
|
386
|
+
- Update SUMMARY.md frontmatter to include `patch_file: [path]`
|
|
387
|
+
|
|
388
|
+
If skipped (no implementation changes outside exclusions):
|
|
389
|
+
- Leave patch_file field empty or omit from SUMMARY.md
|
|
390
|
+
</step>
|
|
391
|
+
|
|
317
392
|
<step name="completion">
|
|
318
393
|
Report completion:
|
|
319
394
|
|
|
@@ -327,6 +402,7 @@ Adhoc work complete: [description]
|
|
|
327
402
|
Artifacts:
|
|
328
403
|
- Plan: .planning/adhoc/[timestamp]-[slug]-PLAN.md
|
|
329
404
|
- Summary: .planning/adhoc/[timestamp]-[slug]-SUMMARY.md
|
|
405
|
+
- Patch: .planning/adhoc/[timestamp]-[slug].patch (if generated)
|
|
330
406
|
|
|
331
407
|
STATE.md updated with adhoc entry.
|
|
332
408
|
|
|
@@ -354,6 +430,7 @@ Rule 4 is strict for adhoc work — architectural changes exceed adhoc scope by
|
|
|
354
430
|
<output_artifacts>
|
|
355
431
|
- `.planning/adhoc/{timestamp}-{slug}-PLAN.md` — lightweight plan
|
|
356
432
|
- `.planning/adhoc/{timestamp}-{slug}-SUMMARY.md` — completion summary
|
|
433
|
+
- `.planning/adhoc/{timestamp}-{slug}.patch` — implementation changes (if any)
|
|
357
434
|
- Updated `.planning/STATE.md` — adhoc entry in accumulated context
|
|
358
435
|
- Git commit with all changes
|
|
359
436
|
</output_artifacts>
|
|
@@ -341,6 +341,72 @@ After all waves complete, aggregate results:
|
|
|
341
341
|
```
|
|
342
342
|
</step>
|
|
343
343
|
|
|
344
|
+
<step name="simplify_code">
|
|
345
|
+
Read simplifier agent name from config:
|
|
346
|
+
|
|
347
|
+
```bash
|
|
348
|
+
SIMPLIFIER=$(cat .planning/config.json 2>/dev/null | jq -r '.simplifier // empty')
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
**If SIMPLIFIER = "skip":**
|
|
352
|
+
Report: "Code simplification skipped (config: skip)"
|
|
353
|
+
Proceed to verify_phase_goal.
|
|
354
|
+
|
|
355
|
+
**If SIMPLIFIER = empty/null:**
|
|
356
|
+
Use default: `SIMPLIFIER="ms-code-simplifier"`
|
|
357
|
+
|
|
358
|
+
**Otherwise:**
|
|
359
|
+
Use SIMPLIFIER value directly as agent name.
|
|
360
|
+
|
|
361
|
+
1. **Gather changed files:**
|
|
362
|
+
```bash
|
|
363
|
+
# Get all files changed in this phase's commits
|
|
364
|
+
PHASE_COMMITS=$(git log --oneline --grep="(${PHASE_NUMBER}-" --format="%H")
|
|
365
|
+
CHANGED_FILES=$(git diff --name-only $(echo "$PHASE_COMMITS" | tail -1)^..HEAD | grep -E '\.(dart|ts|tsx|js|jsx|swift|kt|py|go|rs)$')
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
2. **Spawn simplifier (agent name from config):**
|
|
369
|
+
```
|
|
370
|
+
Task(
|
|
371
|
+
prompt="
|
|
372
|
+
<objective>
|
|
373
|
+
Simplify code modified in phase {phase_number}.
|
|
374
|
+
Preserve all functionality. Improve clarity and consistency.
|
|
375
|
+
</objective>
|
|
376
|
+
|
|
377
|
+
<scope>
|
|
378
|
+
Files to analyze:
|
|
379
|
+
{CHANGED_FILES}
|
|
380
|
+
</scope>
|
|
381
|
+
|
|
382
|
+
<output>
|
|
383
|
+
After simplifications, run static analysis and tests.
|
|
384
|
+
Report what was simplified and verification results.
|
|
385
|
+
</output>
|
|
386
|
+
",
|
|
387
|
+
subagent_type="{SIMPLIFIER}"
|
|
388
|
+
)
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
3. **Handle result:**
|
|
392
|
+
- If changes made: Stage and commit
|
|
393
|
+
- If no changes: Report "No simplifications needed"
|
|
394
|
+
|
|
395
|
+
4. **Commit simplifications (if any):**
|
|
396
|
+
```bash
|
|
397
|
+
git add [simplified files]
|
|
398
|
+
git commit -m "$(cat <<'EOF'
|
|
399
|
+
refactor({phase}): simplify phase code
|
|
400
|
+
|
|
401
|
+
Simplifier: {agent_type}
|
|
402
|
+
Files simplified: {count}
|
|
403
|
+
EOF
|
|
404
|
+
)"
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
Report: "Code simplified. Proceeding to verification."
|
|
408
|
+
</step>
|
|
409
|
+
|
|
344
410
|
<step name="verify_phase_goal">
|
|
345
411
|
Verify phase achieved its GOAL, not just completed its TASKS.
|
|
346
412
|
|
|
@@ -83,7 +83,6 @@ cat .planning/config.json 2>/dev/null
|
|
|
83
83
|
```
|
|
84
84
|
</config-check>
|
|
85
85
|
|
|
86
|
-
<if mode="yolo">
|
|
87
86
|
```
|
|
88
87
|
⚡ Auto-approved: Execute {phase}-{plan}-PLAN.md
|
|
89
88
|
[Plan X of Y for Phase Z]
|
|
@@ -92,20 +91,6 @@ Starting execution...
|
|
|
92
91
|
```
|
|
93
92
|
|
|
94
93
|
Proceed directly to parse_segments step.
|
|
95
|
-
</if>
|
|
96
|
-
|
|
97
|
-
<if mode="interactive" OR="custom with gates.execute_next_plan true">
|
|
98
|
-
Present:
|
|
99
|
-
|
|
100
|
-
```
|
|
101
|
-
Found plan to execute: {phase}-{plan}-PLAN.md
|
|
102
|
-
[Plan X of Y for Phase Z]
|
|
103
|
-
|
|
104
|
-
Proceed with execution?
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
Wait for confirmation before proceeding.
|
|
108
|
-
</if>
|
|
109
94
|
</step>
|
|
110
95
|
|
|
111
96
|
<step name="record_start_time">
|
|
@@ -1465,21 +1450,15 @@ Before proceeding, check SUMMARY.md content.
|
|
|
1465
1450
|
|
|
1466
1451
|
If "Issues Encountered" is NOT "None":
|
|
1467
1452
|
|
|
1468
|
-
<if mode="yolo">
|
|
1469
1453
|
```
|
|
1470
1454
|
⚡ Auto-approved: Issues acknowledgment
|
|
1471
1455
|
⚠️ Note: Issues were encountered during execution:
|
|
1472
1456
|
- [Issue 1]
|
|
1473
1457
|
- [Issue 2]
|
|
1474
|
-
(Logged - continuing
|
|
1458
|
+
(Logged - continuing)
|
|
1475
1459
|
```
|
|
1476
1460
|
|
|
1477
1461
|
Continue without waiting.
|
|
1478
|
-
</if>
|
|
1479
|
-
|
|
1480
|
-
<if mode="interactive" OR="custom with gates.issues_review true">
|
|
1481
|
-
Present issues and wait for acknowledgment before proceeding.
|
|
1482
|
-
</if>
|
|
1483
1462
|
</step>
|
|
1484
1463
|
|
|
1485
1464
|
<step name="update_roadmap">
|
|
@@ -1670,7 +1649,6 @@ Identify the next unexecuted plan:
|
|
|
1670
1649
|
- Find the first PLAN.md file that has no matching SUMMARY.md
|
|
1671
1650
|
- Read its `<objective>` section
|
|
1672
1651
|
|
|
1673
|
-
<if mode="yolo">
|
|
1674
1652
|
```
|
|
1675
1653
|
Plan {phase}-{plan} complete.
|
|
1676
1654
|
Summary: .planning/phases/{phase-dir}/{phase}-{plan}-SUMMARY.md
|
|
@@ -1681,36 +1659,6 @@ Summary: .planning/phases/{phase-dir}/{phase}-{plan}-SUMMARY.md
|
|
|
1681
1659
|
```
|
|
1682
1660
|
|
|
1683
1661
|
Loop back to identify_plan step automatically.
|
|
1684
|
-
</if>
|
|
1685
|
-
|
|
1686
|
-
<if mode="interactive" OR="custom with gates.execute_next_plan true">
|
|
1687
|
-
```
|
|
1688
|
-
Plan {phase}-{plan} complete.
|
|
1689
|
-
Summary: .planning/phases/{phase-dir}/{phase}-{plan}-SUMMARY.md
|
|
1690
|
-
|
|
1691
|
-
{Y} of {X} plans complete for Phase {Z}.
|
|
1692
|
-
|
|
1693
|
-
---
|
|
1694
|
-
|
|
1695
|
-
## ▶ Next Up
|
|
1696
|
-
|
|
1697
|
-
**Phase {X}: [Phase Name]** — [goal from ROADMAP.md]
|
|
1698
|
-
|
|
1699
|
-
`/ms:execute-phase {phase-number}`
|
|
1700
|
-
|
|
1701
|
-
<sub>`/clear` first → fresh context window</sub>
|
|
1702
|
-
|
|
1703
|
-
---
|
|
1704
|
-
|
|
1705
|
-
**Also available:**
|
|
1706
|
-
- `/ms:verify-work {phase}` — manual acceptance testing before continuing
|
|
1707
|
-
- Review what was built before continuing
|
|
1708
|
-
|
|
1709
|
-
---
|
|
1710
|
-
```
|
|
1711
|
-
|
|
1712
|
-
Wait for user to clear and run next command.
|
|
1713
|
-
</if>
|
|
1714
1662
|
|
|
1715
1663
|
**STOP here if Route A applies. Do not continue to Step 3.**
|
|
1716
1664
|
|
|
@@ -96,6 +96,14 @@ Write these documents to .planning/codebase/:
|
|
|
96
96
|
- STACK.md - Languages, runtime, frameworks, dependencies, configuration
|
|
97
97
|
- INTEGRATIONS.md - External APIs, databases, auth providers, webhooks
|
|
98
98
|
|
|
99
|
+
After writing STACK.md, update config.json simplifier field with the appropriate agent name:
|
|
100
|
+
1. Read STACK.md to detect primary framework
|
|
101
|
+
2. Map framework to simplifier agent name:
|
|
102
|
+
- Flutter/Dart → "ms-flutter-simplifier"
|
|
103
|
+
- All others (React, Next.js, Node, Swift, Kotlin, etc.) → "ms-code-simplifier"
|
|
104
|
+
3. If .planning/config.json exists: update the simplifier field
|
|
105
|
+
If not: note the recommended simplifier for later config creation
|
|
106
|
+
|
|
99
107
|
Explore thoroughly. Write documents directly using templates. Return confirmation only.
|
|
100
108
|
```
|
|
101
109
|
|
|
@@ -285,5 +293,5 @@ End workflow.
|
|
|
285
293
|
- TaskOutput used to collect confirmations only
|
|
286
294
|
- All 7 codebase documents exist
|
|
287
295
|
- Clear completion summary with line counts
|
|
288
|
-
- User offered clear next steps in
|
|
296
|
+
- User offered clear next steps in Mindsystem style
|
|
289
297
|
</success_criteria>
|
|
@@ -629,46 +629,7 @@ See ~/.claude/mindsystem/references/scope-estimation.md for complete guidance.
|
|
|
629
629
|
</step>
|
|
630
630
|
|
|
631
631
|
<step name="confirm_breakdown">
|
|
632
|
-
<if mode="yolo">
|
|
633
632
|
Auto-approve and proceed to write_phase_prompt.
|
|
634
|
-
</if>
|
|
635
|
-
|
|
636
|
-
<if mode="interactive">
|
|
637
|
-
Present breakdown with wave structure:
|
|
638
|
-
|
|
639
|
-
```
|
|
640
|
-
Phase [X] breakdown:
|
|
641
|
-
|
|
642
|
-
## Execution Waves
|
|
643
|
-
|
|
644
|
-
**Wave 1 (parallel):**
|
|
645
|
-
{phase}-01: [Plan Name] [autonomous]
|
|
646
|
-
- Task: [brief]
|
|
647
|
-
- Task: [brief]
|
|
648
|
-
|
|
649
|
-
{phase}-02: [Plan Name] [autonomous]
|
|
650
|
-
- Task: [brief]
|
|
651
|
-
- Task: [brief]
|
|
652
|
-
|
|
653
|
-
**Wave 2 (parallel):**
|
|
654
|
-
{phase}-03: [Plan Name] (depends: 01, 02) [autonomous]
|
|
655
|
-
- Task: [brief]
|
|
656
|
-
|
|
657
|
-
**Wave 3:**
|
|
658
|
-
{phase}-04: [Plan Name] (depends: 03) [has checkpoint]
|
|
659
|
-
- Task: [brief]
|
|
660
|
-
- Checkpoint: [type]
|
|
661
|
-
|
|
662
|
-
---
|
|
663
|
-
Total: [N] plans in [M] waves
|
|
664
|
-
Parallel plans: [X]
|
|
665
|
-
Sequential plans: [Y]
|
|
666
|
-
|
|
667
|
-
Does this look right? (yes / adjust / start over)
|
|
668
|
-
```
|
|
669
|
-
|
|
670
|
-
Wait for confirmation. If "adjust": revise. If "start over": return to gather_phase_context.
|
|
671
|
-
</if>
|
|
672
633
|
</step>
|
|
673
634
|
|
|
674
635
|
<step name="write_phase_prompt">
|