mindsystem-cc 3.0.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/LICENSE +21 -0
- package/README.md +501 -0
- package/agents/ms-codebase-mapper.md +739 -0
- package/agents/ms-debugger.md +1184 -0
- package/agents/ms-designer.md +414 -0
- package/agents/ms-executor.md +760 -0
- package/agents/ms-integration-checker.md +423 -0
- package/agents/ms-milestone-auditor.md +448 -0
- package/agents/ms-mock-generator.md +182 -0
- package/agents/ms-plan-checker.md +746 -0
- package/agents/ms-research-synthesizer.md +248 -0
- package/agents/ms-researcher.md +962 -0
- package/agents/ms-roadmapper.md +606 -0
- package/agents/ms-verifier.md +779 -0
- package/agents/ms-verify-fixer.md +124 -0
- package/bin/install.js +296 -0
- package/commands/ms/add-phase.md +207 -0
- package/commands/ms/add-todo.md +182 -0
- package/commands/ms/audit-milestone.md +318 -0
- package/commands/ms/check-phase.md +162 -0
- package/commands/ms/check-todos.md +217 -0
- package/commands/ms/complete-milestone.md +137 -0
- package/commands/ms/create-roadmap.md +273 -0
- package/commands/ms/debug.md +149 -0
- package/commands/ms/define-requirements.md +121 -0
- package/commands/ms/design-phase.md +341 -0
- package/commands/ms/discuss-milestone.md +48 -0
- package/commands/ms/discuss-phase.md +60 -0
- package/commands/ms/do-work.md +90 -0
- package/commands/ms/execute-phase.md +289 -0
- package/commands/ms/help.md +623 -0
- package/commands/ms/insert-phase.md +227 -0
- package/commands/ms/list-phase-assumptions.md +50 -0
- package/commands/ms/map-codebase.md +71 -0
- package/commands/ms/new-milestone.md +193 -0
- package/commands/ms/new-project.md +338 -0
- package/commands/ms/pause-work.md +123 -0
- package/commands/ms/plan-milestone-gaps.md +285 -0
- package/commands/ms/plan-phase.md +105 -0
- package/commands/ms/progress.md +370 -0
- package/commands/ms/remove-phase.md +338 -0
- package/commands/ms/research-phase.md +175 -0
- package/commands/ms/research-project.md +339 -0
- package/commands/ms/resume-work.md +40 -0
- package/commands/ms/review-design.md +484 -0
- package/commands/ms/simplify-flutter.md +193 -0
- package/commands/ms/update.md +159 -0
- package/commands/ms/verify-work.md +92 -0
- package/commands/ms/whats-new.md +124 -0
- package/mindsystem/references/checkpoints.md +788 -0
- package/mindsystem/references/continuation-format.md +255 -0
- package/mindsystem/references/debugging/debugging-mindset.md +11 -0
- package/mindsystem/references/debugging/hypothesis-testing.md +11 -0
- package/mindsystem/references/debugging/investigation-techniques.md +11 -0
- package/mindsystem/references/debugging/verification-patterns.md +11 -0
- package/mindsystem/references/debugging/when-to-research.md +11 -0
- package/mindsystem/references/git-integration.md +254 -0
- package/mindsystem/references/goal-backward.md +286 -0
- package/mindsystem/references/mock-patterns.md +294 -0
- package/mindsystem/references/plan-format.md +473 -0
- package/mindsystem/references/principles.md +73 -0
- package/mindsystem/references/questioning.md +140 -0
- package/mindsystem/references/research-pitfalls.md +233 -0
- package/mindsystem/references/scope-estimation.md +256 -0
- package/mindsystem/references/tdd.md +263 -0
- package/mindsystem/references/verification-patterns.md +595 -0
- package/mindsystem/templates/DEBUG.md +159 -0
- package/mindsystem/templates/UAT.md +403 -0
- package/mindsystem/templates/adhoc-summary.md +153 -0
- package/mindsystem/templates/codebase/architecture.md +255 -0
- package/mindsystem/templates/codebase/concerns.md +310 -0
- package/mindsystem/templates/codebase/conventions.md +307 -0
- package/mindsystem/templates/codebase/integrations.md +280 -0
- package/mindsystem/templates/codebase/stack.md +186 -0
- package/mindsystem/templates/codebase/structure.md +285 -0
- package/mindsystem/templates/codebase/testing.md +480 -0
- package/mindsystem/templates/config.json +26 -0
- package/mindsystem/templates/context.md +140 -0
- package/mindsystem/templates/continue-here.md +78 -0
- package/mindsystem/templates/debug-subagent-prompt.md +91 -0
- package/mindsystem/templates/design-iteration.md +208 -0
- package/mindsystem/templates/design.md +417 -0
- package/mindsystem/templates/discovery.md +146 -0
- package/mindsystem/templates/milestone-archive.md +123 -0
- package/mindsystem/templates/milestone-context.md +93 -0
- package/mindsystem/templates/milestone.md +115 -0
- package/mindsystem/templates/phase-prompt.md +574 -0
- package/mindsystem/templates/project.md +184 -0
- package/mindsystem/templates/requirements.md +231 -0
- package/mindsystem/templates/research-project/ARCHITECTURE.md +204 -0
- package/mindsystem/templates/research-project/FEATURES.md +147 -0
- package/mindsystem/templates/research-project/PITFALLS.md +200 -0
- package/mindsystem/templates/research-project/STACK.md +120 -0
- package/mindsystem/templates/research-project/SUMMARY.md +170 -0
- package/mindsystem/templates/research-subagent-prompt.md +92 -0
- package/mindsystem/templates/research.md +529 -0
- package/mindsystem/templates/roadmap.md +214 -0
- package/mindsystem/templates/state.md +224 -0
- package/mindsystem/templates/summary.md +269 -0
- package/mindsystem/templates/user-setup.md +323 -0
- package/mindsystem/templates/verification-report.md +322 -0
- package/mindsystem/workflows/complete-milestone.md +759 -0
- package/mindsystem/workflows/create-milestone.md +203 -0
- package/mindsystem/workflows/debug.md +14 -0
- package/mindsystem/workflows/define-requirements.md +330 -0
- package/mindsystem/workflows/diagnose-issues.md +241 -0
- package/mindsystem/workflows/discovery-phase.md +293 -0
- package/mindsystem/workflows/discuss-milestone.md +310 -0
- package/mindsystem/workflows/discuss-phase.md +237 -0
- package/mindsystem/workflows/do-work.md +359 -0
- package/mindsystem/workflows/execute-phase.md +644 -0
- package/mindsystem/workflows/execute-plan.md +1828 -0
- package/mindsystem/workflows/generate-mocks.md +187 -0
- package/mindsystem/workflows/list-phase-assumptions.md +178 -0
- package/mindsystem/workflows/map-codebase.md +289 -0
- package/mindsystem/workflows/plan-phase.md +876 -0
- package/mindsystem/workflows/research-phase.md +17 -0
- package/mindsystem/workflows/research-project.md +23 -0
- package/mindsystem/workflows/resume-project.md +311 -0
- package/mindsystem/workflows/transition.md +564 -0
- package/mindsystem/workflows/verify-phase.md +629 -0
- package/mindsystem/workflows/verify-work.md +823 -0
- package/package.json +32 -0
- package/scripts/generate-phase-patch.sh +169 -0
- package/scripts/ms-lookup/README.md +112 -0
- package/scripts/ms-lookup/ms_lookup/__init__.py +3 -0
- package/scripts/ms-lookup/ms_lookup/__main__.py +6 -0
- package/scripts/ms-lookup/ms_lookup/backends/__init__.py +6 -0
- package/scripts/ms-lookup/ms_lookup/backends/context7.py +219 -0
- package/scripts/ms-lookup/ms_lookup/backends/perplexity.py +145 -0
- package/scripts/ms-lookup/ms_lookup/cache.py +48 -0
- package/scripts/ms-lookup/ms_lookup/cli.py +219 -0
- package/scripts/ms-lookup/ms_lookup/config.py +23 -0
- package/scripts/ms-lookup/ms_lookup/errors.py +24 -0
- package/scripts/ms-lookup/ms_lookup/output.py +49 -0
- package/scripts/ms-lookup/ms_lookup/tokens.py +56 -0
- package/scripts/ms-lookup/pyproject.toml +17 -0
- package/scripts/ms-lookup/uv.lock +207 -0
- package/scripts/ms-lookup-wrapper.sh +21 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ms:discuss-phase
|
|
3
|
+
description: Gather phase context through adaptive questioning before planning
|
|
4
|
+
argument-hint: "[phase]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<objective>
|
|
8
|
+
Help the user articulate their vision for a phase through collaborative thinking.
|
|
9
|
+
|
|
10
|
+
Purpose: Understand HOW the user imagines this phase working — what it looks like, what's essential. You're a thinking partner helping them crystallize their vision, not an interviewer gathering technical requirements.
|
|
11
|
+
|
|
12
|
+
Output: {phase}-CONTEXT.md capturing the user's vision for the phase
|
|
13
|
+
</objective>
|
|
14
|
+
|
|
15
|
+
<execution_context>
|
|
16
|
+
@~/.claude/mindsystem/references/principles.md
|
|
17
|
+
@~/.claude/mindsystem/workflows/discuss-phase.md
|
|
18
|
+
@~/.claude/mindsystem/templates/context.md
|
|
19
|
+
</execution_context>
|
|
20
|
+
|
|
21
|
+
<context>
|
|
22
|
+
Phase number: $ARGUMENTS (required)
|
|
23
|
+
|
|
24
|
+
**Load project state first:**
|
|
25
|
+
@.planning/STATE.md
|
|
26
|
+
|
|
27
|
+
**Load roadmap:**
|
|
28
|
+
@.planning/ROADMAP.md
|
|
29
|
+
</context>
|
|
30
|
+
|
|
31
|
+
<process>
|
|
32
|
+
1. Validate phase number argument (error if missing or invalid)
|
|
33
|
+
2. Check if phase exists in roadmap
|
|
34
|
+
3. Check if CONTEXT.md already exists (offer to update if yes)
|
|
35
|
+
4. Follow discuss-phase.md workflow with **ALL questions using AskUserQuestion**:
|
|
36
|
+
- Present phase from roadmap
|
|
37
|
+
- Use AskUserQuestion: "How do you imagine this working?" with interpretation options
|
|
38
|
+
- Use AskUserQuestion to follow their thread — probe what excites them
|
|
39
|
+
- Use AskUserQuestion to sharpen the core — what's essential for THIS phase
|
|
40
|
+
- Use AskUserQuestion for decision gate (ready / ask more / let me add context)
|
|
41
|
+
- Create CONTEXT.md capturing their vision
|
|
42
|
+
5. Offer next steps (research or plan the phase)
|
|
43
|
+
|
|
44
|
+
**CRITICAL: ALL questions use AskUserQuestion. Never ask inline text questions.**
|
|
45
|
+
|
|
46
|
+
User is the visionary, you are the builder:
|
|
47
|
+
- Ask about vision, feel, essential outcomes
|
|
48
|
+
- DON'T ask about technical risks (you figure those out)
|
|
49
|
+
- DON'T ask about codebase patterns (you read the code)
|
|
50
|
+
- DON'T ask about success metrics (too corporate)
|
|
51
|
+
- DON'T interrogate about constraints they didn't mention
|
|
52
|
+
</process>
|
|
53
|
+
|
|
54
|
+
<success_criteria>
|
|
55
|
+
|
|
56
|
+
- Phase validated against roadmap
|
|
57
|
+
- Vision gathered through collaborative thinking (not interrogation)
|
|
58
|
+
- CONTEXT.md captures: how it works, what's essential
|
|
59
|
+
- User knows next steps (research or plan the phase)
|
|
60
|
+
</success_criteria>
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ms:do-work
|
|
3
|
+
description: Execute small discovered work without phase overhead (max 2 tasks)
|
|
4
|
+
argument-hint: <description>
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Edit
|
|
9
|
+
- Bash
|
|
10
|
+
- Glob
|
|
11
|
+
- Grep
|
|
12
|
+
- Task
|
|
13
|
+
- AskUserQuestion
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
<objective>
|
|
17
|
+
Execute small work items discovered during verification or debugging without the overhead of phase insertion or todos.
|
|
18
|
+
|
|
19
|
+
Bridges the gap between "capture for later" (/ms:add-todo) and "full phase workflow" (/ms:insert-phase).
|
|
20
|
+
|
|
21
|
+
Use when:
|
|
22
|
+
- Work is small (1-2 tasks maximum)
|
|
23
|
+
- Work is discovered mid-session (not pre-planned)
|
|
24
|
+
- Work can be completed quickly
|
|
25
|
+
- Work doesn't require architectural changes
|
|
26
|
+
</objective>
|
|
27
|
+
|
|
28
|
+
<execution_context>
|
|
29
|
+
@~/.claude/mindsystem/workflows/do-work.md
|
|
30
|
+
@.planning/STATE.md
|
|
31
|
+
</execution_context>
|
|
32
|
+
|
|
33
|
+
<process>
|
|
34
|
+
|
|
35
|
+
<step name="parse_and_validate">
|
|
36
|
+
Parse the work description from $ARGUMENTS.
|
|
37
|
+
Validate project has .planning/STATE.md (active Mindsystem project required).
|
|
38
|
+
</step>
|
|
39
|
+
|
|
40
|
+
<step name="analyze_scope">
|
|
41
|
+
Quick analysis of what tasks are needed.
|
|
42
|
+
If >2 tasks or architectural changes required: REFUSE with suggestion to use /ms:insert-phase.
|
|
43
|
+
</step>
|
|
44
|
+
|
|
45
|
+
<step name="create_lightweight_plan">
|
|
46
|
+
Create .planning/adhoc/{timestamp}-{slug}-PLAN.md with minimal structure.
|
|
47
|
+
</step>
|
|
48
|
+
|
|
49
|
+
<step name="execute_tasks">
|
|
50
|
+
Execute tasks inline (no subagent for small work).
|
|
51
|
+
Apply deviation rules 1-3 (auto-fix bugs, critical, blocking).
|
|
52
|
+
If Rule 4 triggered (architectural): STOP, suggest /ms:insert-phase.
|
|
53
|
+
</step>
|
|
54
|
+
|
|
55
|
+
<step name="verify_and_summarize">
|
|
56
|
+
Run verify commands from tasks.
|
|
57
|
+
Create .planning/adhoc/{timestamp}-{slug}-SUMMARY.md.
|
|
58
|
+
</step>
|
|
59
|
+
|
|
60
|
+
<step name="update_state_and_commit">
|
|
61
|
+
Add entry to STATE.md "Recent Adhoc Work" section.
|
|
62
|
+
Single git commit with all changes (code + PLAN.md + SUMMARY.md + STATE.md).
|
|
63
|
+
</step>
|
|
64
|
+
|
|
65
|
+
<step name="completion">
|
|
66
|
+
Report what was done, show commit hash and file paths.
|
|
67
|
+
</step>
|
|
68
|
+
|
|
69
|
+
</process>
|
|
70
|
+
|
|
71
|
+
<anti_patterns>
|
|
72
|
+
- Don't use for work requiring >2 tasks (use /ms:insert-phase)
|
|
73
|
+
- Don't use for work requiring architectural changes
|
|
74
|
+
- Don't use outside active Mindsystem projects (needs STATE.md)
|
|
75
|
+
- Don't create elaborate plans — this is for quick fixes
|
|
76
|
+
- Don't run full goal-backward verification — lightweight checks only
|
|
77
|
+
</anti_patterns>
|
|
78
|
+
|
|
79
|
+
<success_criteria>
|
|
80
|
+
Adhoc work is complete when:
|
|
81
|
+
|
|
82
|
+
- [ ] Work analyzed and confirmed ≤2 tasks
|
|
83
|
+
- [ ] .planning/adhoc/ directory exists
|
|
84
|
+
- [ ] PLAN.md created with tasks
|
|
85
|
+
- [ ] All tasks executed and verified
|
|
86
|
+
- [ ] SUMMARY.md created with outcomes
|
|
87
|
+
- [ ] STATE.md updated with adhoc entry
|
|
88
|
+
- [ ] Single git commit with all changes
|
|
89
|
+
- [ ] User informed of completion and commit hash
|
|
90
|
+
</success_criteria>
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ms:execute-phase
|
|
3
|
+
description: Execute all plans in a phase with wave-based parallelization
|
|
4
|
+
argument-hint: "<phase-number>"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Edit
|
|
9
|
+
- Glob
|
|
10
|
+
- Grep
|
|
11
|
+
- Bash
|
|
12
|
+
- Task
|
|
13
|
+
- TodoWrite
|
|
14
|
+
- AskUserQuestion
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
<objective>
|
|
18
|
+
Execute all plans in a phase using wave-based parallel execution.
|
|
19
|
+
|
|
20
|
+
Orchestrator stays lean: discover plans, analyze dependencies, group into waves, spawn subagents, collect results. Each subagent loads the full execute-plan context and handles its own plan.
|
|
21
|
+
|
|
22
|
+
Context budget: ~15% orchestrator, 100% fresh per subagent.
|
|
23
|
+
</objective>
|
|
24
|
+
|
|
25
|
+
<execution_context>
|
|
26
|
+
@~/.claude/mindsystem/references/principles.md
|
|
27
|
+
@~/.claude/mindsystem/workflows/execute-phase.md
|
|
28
|
+
</execution_context>
|
|
29
|
+
|
|
30
|
+
<context>
|
|
31
|
+
Phase: $ARGUMENTS
|
|
32
|
+
|
|
33
|
+
@.planning/ROADMAP.md
|
|
34
|
+
@.planning/STATE.md
|
|
35
|
+
</context>
|
|
36
|
+
|
|
37
|
+
<process>
|
|
38
|
+
1. **Validate phase exists**
|
|
39
|
+
- Find phase directory matching argument
|
|
40
|
+
- Count PLAN.md files
|
|
41
|
+
- Error if no plans found
|
|
42
|
+
|
|
43
|
+
2. **Discover plans**
|
|
44
|
+
- List all *-PLAN.md files in phase directory
|
|
45
|
+
- Check which have *-SUMMARY.md (already complete)
|
|
46
|
+
- Build list of incomplete plans
|
|
47
|
+
|
|
48
|
+
3. **Group by wave**
|
|
49
|
+
- Read `wave` from each plan's frontmatter
|
|
50
|
+
- Group plans by wave number
|
|
51
|
+
- Report wave structure to user
|
|
52
|
+
|
|
53
|
+
4. **Execute waves**
|
|
54
|
+
For each wave in order:
|
|
55
|
+
- Spawn `ms-executor` for each plan in wave (parallel Task calls)
|
|
56
|
+
- Wait for completion (Task blocks)
|
|
57
|
+
- Verify SUMMARYs created
|
|
58
|
+
- Proceed to next wave
|
|
59
|
+
|
|
60
|
+
5. **Aggregate results**
|
|
61
|
+
- Collect summaries from all plans
|
|
62
|
+
- Report phase completion status
|
|
63
|
+
|
|
64
|
+
6. **Verify phase goal**
|
|
65
|
+
- Spawn `ms-verifier` subagent with phase directory and goal
|
|
66
|
+
- Verifier checks must_haves against actual codebase (not SUMMARY claims)
|
|
67
|
+
- Creates VERIFICATION.md with detailed report
|
|
68
|
+
- Route by status:
|
|
69
|
+
- `passed` → continue to step 7
|
|
70
|
+
- `human_needed` → present items, get approval or feedback
|
|
71
|
+
- `gaps_found` → present gaps, offer `/ms:plan-phase {X} --gaps`
|
|
72
|
+
|
|
73
|
+
7. **Generate phase patch**
|
|
74
|
+
- Run: `~/.claude/mindsystem/scripts/generate-phase-patch.sh ${PHASE_NUMBER}`
|
|
75
|
+
- Outputs to `.planning/phases/{phase_dir}/{phase}-changes.patch`
|
|
76
|
+
- Verify: patch file exists OR skip message logged
|
|
77
|
+
|
|
78
|
+
8. **Update roadmap and state**
|
|
79
|
+
- Update ROADMAP.md, STATE.md
|
|
80
|
+
|
|
81
|
+
9. **Update requirements**
|
|
82
|
+
Mark phase requirements as Complete:
|
|
83
|
+
- Read ROADMAP.md, find this phase's `Requirements:` line (e.g., "AUTH-01, AUTH-02")
|
|
84
|
+
- Read REQUIREMENTS.md traceability table
|
|
85
|
+
- For each REQ-ID in this phase: change Status from "Pending" to "Complete"
|
|
86
|
+
- Write updated REQUIREMENTS.md
|
|
87
|
+
- Skip if: REQUIREMENTS.md doesn't exist, or phase has no Requirements line
|
|
88
|
+
|
|
89
|
+
10. **Commit phase completion**
|
|
90
|
+
Bundle all phase metadata updates in one commit:
|
|
91
|
+
- Stage: `git add .planning/ROADMAP.md .planning/STATE.md`
|
|
92
|
+
- Stage REQUIREMENTS.md if updated: `git add .planning/REQUIREMENTS.md`
|
|
93
|
+
- Commit: `docs({phase}): complete {phase-name} phase`
|
|
94
|
+
|
|
95
|
+
11. **Offer next steps**
|
|
96
|
+
- Route to next action (see `<offer_next>`)
|
|
97
|
+
</process>
|
|
98
|
+
|
|
99
|
+
<offer_next>
|
|
100
|
+
**MANDATORY: Present copy/paste-ready next command.**
|
|
101
|
+
|
|
102
|
+
After verification completes, route based on status:
|
|
103
|
+
|
|
104
|
+
| Status | Route |
|
|
105
|
+
|--------|-------|
|
|
106
|
+
| `gaps_found` | Route C (gap closure) |
|
|
107
|
+
| `human_needed` | Present checklist, then re-route based on approval |
|
|
108
|
+
| `passed` + more phases | Route A (next phase) |
|
|
109
|
+
| `passed` + last phase | Route B (milestone complete) |
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
**Route A: Phase verified, more phases remain**
|
|
114
|
+
|
|
115
|
+
```
|
|
116
|
+
## ✓ Phase {Z}: {Name} Complete
|
|
117
|
+
|
|
118
|
+
All {Y} plans finished. Phase goal verified.
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## â–¶ Next Up
|
|
123
|
+
|
|
124
|
+
**Phase {Z+1}: {Name}** — {Goal from ROADMAP.md}
|
|
125
|
+
|
|
126
|
+
`/ms:plan-phase {Z+1}`
|
|
127
|
+
|
|
128
|
+
<sub>`/clear` first → fresh context window</sub>
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
**Also available:**
|
|
133
|
+
- `/ms:verify-work {Z}` — manual acceptance testing before continuing
|
|
134
|
+
- `/ms:discuss-phase {Z+1}` — gather context first
|
|
135
|
+
- `/ms:research-phase {Z+1}` — investigate unknowns
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
**Route B: Phase verified, milestone complete**
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
🎉 ALL PHASES COMPLETE!
|
|
146
|
+
|
|
147
|
+
## ✓ Phase {Z}: {Name} Complete
|
|
148
|
+
|
|
149
|
+
All {N} phases finished. Phase goals verified.
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
## â–¶ Next Up
|
|
154
|
+
|
|
155
|
+
**Audit milestone** — verify requirements, cross-phase integration, E2E flows
|
|
156
|
+
|
|
157
|
+
`/ms:audit-milestone`
|
|
158
|
+
|
|
159
|
+
<sub>`/clear` first → fresh context window</sub>
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
**Also available:**
|
|
164
|
+
- `/ms:verify-work` — manual acceptance testing
|
|
165
|
+
- `/ms:complete-milestone` — skip audit, archive directly
|
|
166
|
+
- `/ms:add-phase <description>` — add another phase first
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
**Route C: Gaps found — need additional planning**
|
|
174
|
+
|
|
175
|
+
```
|
|
176
|
+
## ⚠Phase {Z}: {Name} — Gaps Found
|
|
177
|
+
|
|
178
|
+
**Score:** {N}/{M} must-haves verified
|
|
179
|
+
**Report:** .planning/phases/{phase_dir}/{phase}-VERIFICATION.md
|
|
180
|
+
|
|
181
|
+
### What's Missing
|
|
182
|
+
|
|
183
|
+
{Extract gap summaries from VERIFICATION.md}
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## â–¶ Next Up
|
|
188
|
+
|
|
189
|
+
**Plan gap closure** — create additional plans to complete the phase
|
|
190
|
+
|
|
191
|
+
`/ms:plan-phase {Z} --gaps`
|
|
192
|
+
|
|
193
|
+
<sub>`/clear` first → fresh context window</sub>
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
**Also available:**
|
|
198
|
+
- `cat .planning/phases/{phase_dir}/{phase}-VERIFICATION.md` — see full report
|
|
199
|
+
- `/ms:verify-work {Z}` — manual testing before planning
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
After user runs `/ms:plan-phase {Z} --gaps`:
|
|
205
|
+
1. Planner reads VERIFICATION.md gaps
|
|
206
|
+
2. Creates plans 04, 05, etc. to close gaps
|
|
207
|
+
3. User runs `/ms:execute-phase {Z}` again
|
|
208
|
+
4. Execute-phase runs incomplete plans (04, 05...)
|
|
209
|
+
5. Verifier runs again → loop until passed
|
|
210
|
+
</offer_next>
|
|
211
|
+
|
|
212
|
+
<wave_execution>
|
|
213
|
+
**Parallel spawning:**
|
|
214
|
+
|
|
215
|
+
Spawn all plans in a wave with a single message containing multiple Task calls:
|
|
216
|
+
|
|
217
|
+
```
|
|
218
|
+
Task(prompt="Execute plan at {plan_01_path}\n\nPlan: @{plan_01_path}\nProject state: @.planning/STATE.md", subagent_type="ms-executor")
|
|
219
|
+
Task(prompt="Execute plan at {plan_02_path}\n\nPlan: @{plan_02_path}\nProject state: @.planning/STATE.md", subagent_type="ms-executor")
|
|
220
|
+
Task(prompt="Execute plan at {plan_03_path}\n\nPlan: @{plan_03_path}\nProject state: @.planning/STATE.md", subagent_type="ms-executor")
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
All three run in parallel. Task tool blocks until all complete.
|
|
224
|
+
|
|
225
|
+
**No polling.** No background agents. No TaskOutput loops.
|
|
226
|
+
</wave_execution>
|
|
227
|
+
|
|
228
|
+
<checkpoint_handling>
|
|
229
|
+
Plans with `autonomous: false` have checkpoints. The execute-phase.md workflow handles the full checkpoint flow:
|
|
230
|
+
- Subagent pauses at checkpoint, returns structured state
|
|
231
|
+
- Orchestrator presents to user, collects response
|
|
232
|
+
- Spawns fresh continuation agent (not resume)
|
|
233
|
+
|
|
234
|
+
See `@~/.claude/mindsystem/workflows/execute-phase.md` step `checkpoint_handling` for complete details.
|
|
235
|
+
</checkpoint_handling>
|
|
236
|
+
|
|
237
|
+
<deviation_rules>
|
|
238
|
+
During execution, handle discoveries automatically:
|
|
239
|
+
|
|
240
|
+
1. **Auto-fix bugs** - Fix immediately, document in Summary
|
|
241
|
+
2. **Auto-add critical** - Security/correctness gaps, add and document
|
|
242
|
+
3. **Auto-fix blockers** - Can't proceed without fix, do it and document
|
|
243
|
+
4. **Ask about architectural** - Major structural changes, stop and ask user
|
|
244
|
+
|
|
245
|
+
Only rule 4 requires user intervention.
|
|
246
|
+
</deviation_rules>
|
|
247
|
+
|
|
248
|
+
<commit_rules>
|
|
249
|
+
**Per-Task Commits:**
|
|
250
|
+
|
|
251
|
+
After each task completes:
|
|
252
|
+
1. Stage only files modified by that task
|
|
253
|
+
2. Commit with format: `{type}({phase}-{plan}): {task-name}`
|
|
254
|
+
3. Types: feat, fix, test, refactor, perf, chore
|
|
255
|
+
4. Record commit hash for SUMMARY.md
|
|
256
|
+
|
|
257
|
+
**Plan Metadata Commit:**
|
|
258
|
+
|
|
259
|
+
After all tasks in a plan complete:
|
|
260
|
+
1. Stage plan artifacts only: PLAN.md, SUMMARY.md
|
|
261
|
+
2. Commit with format: `docs({phase}-{plan}): complete [plan-name] plan`
|
|
262
|
+
3. NO code files (already committed per-task)
|
|
263
|
+
|
|
264
|
+
**Phase Completion Commit:**
|
|
265
|
+
|
|
266
|
+
After all plans in phase complete (step 7):
|
|
267
|
+
1. Stage: ROADMAP.md, STATE.md, REQUIREMENTS.md (if updated), VERIFICATION.md
|
|
268
|
+
2. Commit with format: `docs({phase}): complete {phase-name} phase`
|
|
269
|
+
3. Bundles all phase-level state updates in one commit
|
|
270
|
+
|
|
271
|
+
**NEVER use:**
|
|
272
|
+
- `git add .`
|
|
273
|
+
- `git add -A`
|
|
274
|
+
- `git add src/` or any broad directory
|
|
275
|
+
|
|
276
|
+
**Always stage files individually.**
|
|
277
|
+
</commit_rules>
|
|
278
|
+
|
|
279
|
+
<success_criteria>
|
|
280
|
+
- [ ] All incomplete plans in phase executed
|
|
281
|
+
- [ ] Each plan has SUMMARY.md
|
|
282
|
+
- [ ] Phase goal verified (must_haves checked against codebase)
|
|
283
|
+
- [ ] VERIFICATION.md created in phase directory
|
|
284
|
+
- [ ] Patch file generated OR explicitly skipped with message
|
|
285
|
+
- [ ] STATE.md reflects phase completion
|
|
286
|
+
- [ ] ROADMAP.md updated
|
|
287
|
+
- [ ] REQUIREMENTS.md updated (phase requirements marked Complete)
|
|
288
|
+
- [ ] User informed of next steps
|
|
289
|
+
</success_criteria>
|