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.
Files changed (139) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +501 -0
  3. package/agents/ms-codebase-mapper.md +739 -0
  4. package/agents/ms-debugger.md +1184 -0
  5. package/agents/ms-designer.md +414 -0
  6. package/agents/ms-executor.md +760 -0
  7. package/agents/ms-integration-checker.md +423 -0
  8. package/agents/ms-milestone-auditor.md +448 -0
  9. package/agents/ms-mock-generator.md +182 -0
  10. package/agents/ms-plan-checker.md +746 -0
  11. package/agents/ms-research-synthesizer.md +248 -0
  12. package/agents/ms-researcher.md +962 -0
  13. package/agents/ms-roadmapper.md +606 -0
  14. package/agents/ms-verifier.md +779 -0
  15. package/agents/ms-verify-fixer.md +124 -0
  16. package/bin/install.js +296 -0
  17. package/commands/ms/add-phase.md +207 -0
  18. package/commands/ms/add-todo.md +182 -0
  19. package/commands/ms/audit-milestone.md +318 -0
  20. package/commands/ms/check-phase.md +162 -0
  21. package/commands/ms/check-todos.md +217 -0
  22. package/commands/ms/complete-milestone.md +137 -0
  23. package/commands/ms/create-roadmap.md +273 -0
  24. package/commands/ms/debug.md +149 -0
  25. package/commands/ms/define-requirements.md +121 -0
  26. package/commands/ms/design-phase.md +341 -0
  27. package/commands/ms/discuss-milestone.md +48 -0
  28. package/commands/ms/discuss-phase.md +60 -0
  29. package/commands/ms/do-work.md +90 -0
  30. package/commands/ms/execute-phase.md +289 -0
  31. package/commands/ms/help.md +623 -0
  32. package/commands/ms/insert-phase.md +227 -0
  33. package/commands/ms/list-phase-assumptions.md +50 -0
  34. package/commands/ms/map-codebase.md +71 -0
  35. package/commands/ms/new-milestone.md +193 -0
  36. package/commands/ms/new-project.md +338 -0
  37. package/commands/ms/pause-work.md +123 -0
  38. package/commands/ms/plan-milestone-gaps.md +285 -0
  39. package/commands/ms/plan-phase.md +105 -0
  40. package/commands/ms/progress.md +370 -0
  41. package/commands/ms/remove-phase.md +338 -0
  42. package/commands/ms/research-phase.md +175 -0
  43. package/commands/ms/research-project.md +339 -0
  44. package/commands/ms/resume-work.md +40 -0
  45. package/commands/ms/review-design.md +484 -0
  46. package/commands/ms/simplify-flutter.md +193 -0
  47. package/commands/ms/update.md +159 -0
  48. package/commands/ms/verify-work.md +92 -0
  49. package/commands/ms/whats-new.md +124 -0
  50. package/mindsystem/references/checkpoints.md +788 -0
  51. package/mindsystem/references/continuation-format.md +255 -0
  52. package/mindsystem/references/debugging/debugging-mindset.md +11 -0
  53. package/mindsystem/references/debugging/hypothesis-testing.md +11 -0
  54. package/mindsystem/references/debugging/investigation-techniques.md +11 -0
  55. package/mindsystem/references/debugging/verification-patterns.md +11 -0
  56. package/mindsystem/references/debugging/when-to-research.md +11 -0
  57. package/mindsystem/references/git-integration.md +254 -0
  58. package/mindsystem/references/goal-backward.md +286 -0
  59. package/mindsystem/references/mock-patterns.md +294 -0
  60. package/mindsystem/references/plan-format.md +473 -0
  61. package/mindsystem/references/principles.md +73 -0
  62. package/mindsystem/references/questioning.md +140 -0
  63. package/mindsystem/references/research-pitfalls.md +233 -0
  64. package/mindsystem/references/scope-estimation.md +256 -0
  65. package/mindsystem/references/tdd.md +263 -0
  66. package/mindsystem/references/verification-patterns.md +595 -0
  67. package/mindsystem/templates/DEBUG.md +159 -0
  68. package/mindsystem/templates/UAT.md +403 -0
  69. package/mindsystem/templates/adhoc-summary.md +153 -0
  70. package/mindsystem/templates/codebase/architecture.md +255 -0
  71. package/mindsystem/templates/codebase/concerns.md +310 -0
  72. package/mindsystem/templates/codebase/conventions.md +307 -0
  73. package/mindsystem/templates/codebase/integrations.md +280 -0
  74. package/mindsystem/templates/codebase/stack.md +186 -0
  75. package/mindsystem/templates/codebase/structure.md +285 -0
  76. package/mindsystem/templates/codebase/testing.md +480 -0
  77. package/mindsystem/templates/config.json +26 -0
  78. package/mindsystem/templates/context.md +140 -0
  79. package/mindsystem/templates/continue-here.md +78 -0
  80. package/mindsystem/templates/debug-subagent-prompt.md +91 -0
  81. package/mindsystem/templates/design-iteration.md +208 -0
  82. package/mindsystem/templates/design.md +417 -0
  83. package/mindsystem/templates/discovery.md +146 -0
  84. package/mindsystem/templates/milestone-archive.md +123 -0
  85. package/mindsystem/templates/milestone-context.md +93 -0
  86. package/mindsystem/templates/milestone.md +115 -0
  87. package/mindsystem/templates/phase-prompt.md +574 -0
  88. package/mindsystem/templates/project.md +184 -0
  89. package/mindsystem/templates/requirements.md +231 -0
  90. package/mindsystem/templates/research-project/ARCHITECTURE.md +204 -0
  91. package/mindsystem/templates/research-project/FEATURES.md +147 -0
  92. package/mindsystem/templates/research-project/PITFALLS.md +200 -0
  93. package/mindsystem/templates/research-project/STACK.md +120 -0
  94. package/mindsystem/templates/research-project/SUMMARY.md +170 -0
  95. package/mindsystem/templates/research-subagent-prompt.md +92 -0
  96. package/mindsystem/templates/research.md +529 -0
  97. package/mindsystem/templates/roadmap.md +214 -0
  98. package/mindsystem/templates/state.md +224 -0
  99. package/mindsystem/templates/summary.md +269 -0
  100. package/mindsystem/templates/user-setup.md +323 -0
  101. package/mindsystem/templates/verification-report.md +322 -0
  102. package/mindsystem/workflows/complete-milestone.md +759 -0
  103. package/mindsystem/workflows/create-milestone.md +203 -0
  104. package/mindsystem/workflows/debug.md +14 -0
  105. package/mindsystem/workflows/define-requirements.md +330 -0
  106. package/mindsystem/workflows/diagnose-issues.md +241 -0
  107. package/mindsystem/workflows/discovery-phase.md +293 -0
  108. package/mindsystem/workflows/discuss-milestone.md +310 -0
  109. package/mindsystem/workflows/discuss-phase.md +237 -0
  110. package/mindsystem/workflows/do-work.md +359 -0
  111. package/mindsystem/workflows/execute-phase.md +644 -0
  112. package/mindsystem/workflows/execute-plan.md +1828 -0
  113. package/mindsystem/workflows/generate-mocks.md +187 -0
  114. package/mindsystem/workflows/list-phase-assumptions.md +178 -0
  115. package/mindsystem/workflows/map-codebase.md +289 -0
  116. package/mindsystem/workflows/plan-phase.md +876 -0
  117. package/mindsystem/workflows/research-phase.md +17 -0
  118. package/mindsystem/workflows/research-project.md +23 -0
  119. package/mindsystem/workflows/resume-project.md +311 -0
  120. package/mindsystem/workflows/transition.md +564 -0
  121. package/mindsystem/workflows/verify-phase.md +629 -0
  122. package/mindsystem/workflows/verify-work.md +823 -0
  123. package/package.json +32 -0
  124. package/scripts/generate-phase-patch.sh +169 -0
  125. package/scripts/ms-lookup/README.md +112 -0
  126. package/scripts/ms-lookup/ms_lookup/__init__.py +3 -0
  127. package/scripts/ms-lookup/ms_lookup/__main__.py +6 -0
  128. package/scripts/ms-lookup/ms_lookup/backends/__init__.py +6 -0
  129. package/scripts/ms-lookup/ms_lookup/backends/context7.py +219 -0
  130. package/scripts/ms-lookup/ms_lookup/backends/perplexity.py +145 -0
  131. package/scripts/ms-lookup/ms_lookup/cache.py +48 -0
  132. package/scripts/ms-lookup/ms_lookup/cli.py +219 -0
  133. package/scripts/ms-lookup/ms_lookup/config.py +23 -0
  134. package/scripts/ms-lookup/ms_lookup/errors.py +24 -0
  135. package/scripts/ms-lookup/ms_lookup/output.py +49 -0
  136. package/scripts/ms-lookup/ms_lookup/tokens.py +56 -0
  137. package/scripts/ms-lookup/pyproject.toml +17 -0
  138. package/scripts/ms-lookup/uv.lock +207 -0
  139. package/scripts/ms-lookup-wrapper.sh +21 -0
@@ -0,0 +1,175 @@
1
+ ---
2
+ name: ms:research-phase
3
+ description: Research how to implement a phase before planning
4
+ argument-hint: "[phase]"
5
+ allowed-tools:
6
+ - Read
7
+ - Bash
8
+ - Task
9
+ ---
10
+
11
+ <objective>
12
+ Research how to implement a phase. Spawns ms-researcher agent with phase context.
13
+
14
+ **Orchestrator role:** Parse phase, validate against roadmap, check existing research, gather context, spawn researcher agent, present results.
15
+
16
+ **Why subagent:** Research burns context fast (WebSearch, Context7 queries, source verification). Fresh 200k context for investigation. Main context stays lean for user interaction.
17
+ </objective>
18
+
19
+ <context>
20
+ Phase number: $ARGUMENTS (required)
21
+
22
+ Check for existing research:
23
+ ```bash
24
+ ls .planning/phases/${PHASE}-*/*RESEARCH.md 2>/dev/null
25
+ ```
26
+ </context>
27
+
28
+ <process>
29
+
30
+ ## 1. Parse and Validate Phase
31
+
32
+ ```bash
33
+ grep -A5 "Phase ${PHASE}:" .planning/ROADMAP.md 2>/dev/null
34
+ ```
35
+
36
+ **If not found:** Error and exit. **If found:** Extract phase number, name, description.
37
+
38
+ ## 2. Check Existing Research
39
+
40
+ ```bash
41
+ ls .planning/phases/${PHASE}-*/RESEARCH.md 2>/dev/null
42
+ ```
43
+
44
+ **If exists:** Offer: 1) Update research, 2) View existing, 3) Skip. Wait for response.
45
+
46
+ **If doesn't exist:** Continue.
47
+
48
+ ## 3. Gather Phase Context
49
+
50
+ ```bash
51
+ grep -A20 "Phase ${PHASE}:" .planning/ROADMAP.md
52
+ cat .planning/REQUIREMENTS.md 2>/dev/null
53
+ cat .planning/phases/${PHASE}-*/${PHASE}-CONTEXT.md 2>/dev/null
54
+ cat .planning/phases/${PHASE}-*/${PHASE}-DESIGN.md 2>/dev/null
55
+ grep -A30 "### Decisions Made" .planning/STATE.md 2>/dev/null
56
+ ```
57
+
58
+ Present summary with phase description, requirements, prior decisions.
59
+
60
+ **If DESIGN.md exists:** Research should address:
61
+ - Libraries needed for specified interactions (animations, gestures, charts)
62
+ - Technical feasibility of design requirements
63
+ - Platform-specific implementation approaches
64
+ - Component libraries that match the design system
65
+
66
+ ## 4. Spawn ms-researcher Agent
67
+
68
+ Research modes: ecosystem (default), feasibility, implementation, comparison.
69
+
70
+ ```markdown
71
+ <research_type>
72
+ Phase Research — investigating HOW to implement a specific phase well.
73
+ </research_type>
74
+
75
+ <key_insight>
76
+ The question is NOT "which library should I use?"
77
+
78
+ The question is: "What do I not know that I don't know?"
79
+
80
+ For this phase, discover:
81
+ - What's the established architecture pattern?
82
+ - What libraries form the standard stack?
83
+ - What problems do people commonly hit?
84
+ - What's SOTA vs what Claude's training thinks is SOTA?
85
+ - What should NOT be hand-rolled?
86
+ </key_insight>
87
+
88
+ <objective>
89
+ Research implementation approach for Phase {phase_number}: {phase_name}
90
+ Mode: ecosystem
91
+ </objective>
92
+
93
+ <context>
94
+ **Phase description:** {phase_description}
95
+ **Requirements:** {requirements_list}
96
+ **Prior decisions:** {decisions_if_any}
97
+ **Phase context:** {context_md_content}
98
+ **Design specs:** {design_md_content_if_exists}
99
+ </context>
100
+
101
+ <downstream_consumer>
102
+ Your RESEARCH.md will be loaded by `/ms:plan-phase` which uses specific sections:
103
+ - `## Standard Stack` → Plans use these libraries
104
+ - `## Architecture Patterns` → Task structure follows these
105
+ - `## Don't Hand-Roll` → Tasks NEVER build custom solutions for listed problems
106
+ - `## Common Pitfalls` → Verification steps check for these
107
+ - `## Code Examples` → Task actions reference these patterns
108
+
109
+ Be prescriptive, not exploratory. "Use X" not "Consider X or Y."
110
+ </downstream_consumer>
111
+
112
+ <quality_gate>
113
+ Before declaring complete, verify:
114
+ - [ ] All domains investigated (not just some)
115
+ - [ ] Negative claims verified with official docs
116
+ - [ ] Multiple sources for critical claims
117
+ - [ ] Confidence levels assigned honestly
118
+ - [ ] Section names match what plan-phase expects
119
+ </quality_gate>
120
+
121
+ <output>
122
+ Write to: .planning/phases/{phase}-{slug}/{phase}-RESEARCH.md
123
+ </output>
124
+ ```
125
+
126
+ ```
127
+ Task(
128
+ prompt=filled_prompt,
129
+ subagent_type="ms-researcher",
130
+ description="Research Phase {phase}"
131
+ )
132
+ ```
133
+
134
+ ## 5. Handle Agent Return
135
+
136
+ **`## RESEARCH COMPLETE`:** Display summary, offer: Plan phase, Dig deeper, Review full, Done.
137
+
138
+ **`## CHECKPOINT REACHED`:** Present to user, get response, spawn continuation.
139
+
140
+ **`## RESEARCH INCONCLUSIVE`:** Show what was attempted, offer: Add context, Try different mode, Manual.
141
+
142
+ ## 6. Spawn Continuation Agent
143
+
144
+ ```markdown
145
+ <objective>
146
+ Continue research for Phase {phase_number}: {phase_name}
147
+ </objective>
148
+
149
+ <prior_state>
150
+ Research file: @.planning/phases/{phase}-{slug}/{phase}-RESEARCH.md
151
+ </prior_state>
152
+
153
+ <checkpoint_response>
154
+ **Type:** {checkpoint_type}
155
+ **Response:** {user_response}
156
+ </checkpoint_response>
157
+ ```
158
+
159
+ ```
160
+ Task(
161
+ prompt=continuation_prompt,
162
+ subagent_type="ms-researcher",
163
+ description="Continue research Phase {phase}"
164
+ )
165
+ ```
166
+
167
+ </process>
168
+
169
+ <success_criteria>
170
+ - [ ] Phase validated against roadmap
171
+ - [ ] Existing research checked
172
+ - [ ] ms-researcher spawned with context
173
+ - [ ] Checkpoints handled correctly
174
+ - [ ] User knows next steps
175
+ </success_criteria>
@@ -0,0 +1,339 @@
1
+ ---
2
+ name: ms:research-project
3
+ description: Research domain ecosystem before creating roadmap
4
+ allowed-tools:
5
+ - Read
6
+ - Write
7
+ - Bash
8
+ - Task
9
+ - AskUserQuestion
10
+ ---
11
+
12
+ <objective>
13
+ Research domain ecosystem. Spawns 4 parallel ms-researcher agents for comprehensive coverage.
14
+
15
+ **Orchestrator role:** Analyze project, generate research questions, spawn 4 parallel agents, synthesize SUMMARY.md.
16
+
17
+ **Why subagents:** Research burns context fast. Fresh 200k context per domain. Main context stays lean.
18
+ </objective>
19
+
20
+ <context>
21
+ @.planning/PROJECT.md
22
+ @.planning/config.json (if exists)
23
+ </context>
24
+
25
+ <process>
26
+
27
+ ## 1. Validate Prerequisites
28
+
29
+ ```bash
30
+ [ -f .planning/PROJECT.md ] || { echo "ERROR: No PROJECT.md. Run /ms:new-project first."; exit 1; }
31
+ [ -f .planning/ROADMAP.md ] && echo "WARNING: ROADMAP.md exists. Research is typically done before roadmap."
32
+ [ -d .planning/research ] && echo "RESEARCH_EXISTS" || echo "NO_RESEARCH"
33
+ ```
34
+
35
+ ## 2. Handle Existing Research
36
+
37
+ **If RESEARCH_EXISTS:** Use AskUserQuestion (View existing / Replace / Cancel)
38
+
39
+ ## 3. Analyze Project
40
+
41
+ Read PROJECT.md, extract domain/stack/core value/constraints. Present for approval:
42
+ ```
43
+ Domain analysis:
44
+ - Type: [domain]
45
+ - Stack: [stated or TBD]
46
+ - Core: [core value]
47
+ Does this look right? (yes / adjust)
48
+ ```
49
+
50
+ ## 4. Generate Research Questions
51
+
52
+ | Dimension | Question |
53
+ |-----------|----------|
54
+ | Stack | "What's the standard 2026 stack for [domain]?" |
55
+ | Features | "What features do [domain] products have?" |
56
+ | Architecture | "How are [domain] systems structured?" |
57
+ | Pitfalls | "What do [domain] projects get wrong?" |
58
+
59
+ Present for approval.
60
+
61
+ ## 5. Spawn Research Agents
62
+
63
+ ```bash
64
+ mkdir -p .planning/research
65
+ ```
66
+
67
+ **Determine milestone context:**
68
+ - If no "Validated" requirements in REQUIREMENTS.md → Greenfield (v1.0)
69
+ - If "Validated" requirements exist → Subsequent milestone (v1.1+)
70
+
71
+ Spawn all 4 in parallel with rich context:
72
+
73
+ ```
74
+ Task(prompt="
75
+ <research_type>
76
+ Project Research — Stack dimension for [domain].
77
+ </research_type>
78
+
79
+ <milestone_context>
80
+ {greenfield OR subsequent}
81
+
82
+ **Greenfield (v1.0):**
83
+ Research the standard stack for building [domain] from scratch. Full ecosystem investigation.
84
+
85
+ **Subsequent (v1.1+):**
86
+ Research what's needed to add [target features] to an existing [domain] app.
87
+
88
+ IMPORTANT for subsequent milestones:
89
+ - DON'T re-research the existing system (validated requirements already work)
90
+ - DON'T question established stack choices (they're proven)
91
+ - DO research new libraries/patterns needed for [target features] specifically
92
+ - DO investigate how [target features] integrate with the existing architecture
93
+ - DO surface any compatibility concerns with current stack
94
+ </milestone_context>
95
+
96
+ <question>
97
+ [stack question from step 4]
98
+ </question>
99
+
100
+ <project_context>
101
+ [PROJECT.md summary]
102
+ </project_context>
103
+
104
+ <downstream_consumer>
105
+ Your STACK.md feeds into /ms:create-roadmap. Be prescriptive:
106
+ - Specific libraries with versions
107
+ - Clear rationale for each choice
108
+ - What NOT to use and why
109
+ </downstream_consumer>
110
+
111
+ <quality_gate>
112
+ - [ ] Versions are current (not Claude's training data)
113
+ - [ ] Rationale explains WHY, not just WHAT
114
+ - [ ] Confidence levels assigned
115
+ </quality_gate>
116
+
117
+ <output>
118
+ Write to: .planning/research/STACK.md
119
+ Use template: ~/.claude/mindsystem/templates/research-project/STACK.md
120
+ </output>
121
+ ", subagent_type="ms-researcher", description="Stack research")
122
+
123
+ Task(prompt="
124
+ <research_type>
125
+ Project Research — Features dimension for [domain].
126
+ </research_type>
127
+
128
+ <milestone_context>
129
+ {greenfield OR subsequent}
130
+
131
+ **Greenfield (v1.0):**
132
+ What features do [domain] products have? What's table stakes vs differentiating?
133
+
134
+ **Subsequent (v1.1+):**
135
+ How do [target features] typically work? What's expected behavior?
136
+
137
+ IMPORTANT for subsequent milestones:
138
+ - Focus ONLY on [target features] - the new capabilities being added
139
+ - DON'T list features the system already has (see Validated requirements)
140
+ - DO research user expectations for [target features] specifically
141
+ - DO identify table stakes vs differentiators within [target features] scope
142
+ </milestone_context>
143
+
144
+ <question>
145
+ [features question from step 4]
146
+ </question>
147
+
148
+ <project_context>
149
+ [PROJECT.md summary]
150
+ </project_context>
151
+
152
+ <downstream_consumer>
153
+ Your FEATURES.md feeds into /ms:define-requirements. Categorize clearly:
154
+ - Table stakes (must have or users leave)
155
+ - Differentiators (competitive advantage)
156
+ - Anti-features (things to deliberately NOT build)
157
+ </downstream_consumer>
158
+
159
+ <quality_gate>
160
+ - [ ] Categories are clear
161
+ - [ ] Complexity noted for each
162
+ - [ ] Dependencies between features identified
163
+ </quality_gate>
164
+
165
+ <output>
166
+ Write to: .planning/research/FEATURES.md
167
+ Use template: ~/.claude/mindsystem/templates/research-project/FEATURES.md
168
+ </output>
169
+ ", subagent_type="ms-researcher", description="Features research")
170
+
171
+ Task(prompt="
172
+ <research_type>
173
+ Project Research — Architecture dimension for [domain].
174
+ </research_type>
175
+
176
+ <milestone_context>
177
+ {greenfield OR subsequent}
178
+
179
+ **Greenfield (v1.0):**
180
+ How are [domain] systems typically structured? What are major components?
181
+
182
+ **Subsequent (v1.1+):**
183
+ How do [target features] integrate with existing [domain] architecture?
184
+
185
+ IMPORTANT for subsequent milestones:
186
+ - The existing architecture is KNOWN (from previous milestones)
187
+ - Research how [target features] should connect to existing components
188
+ - Identify which existing components need modification vs new components needed
189
+ - Surface any architectural concerns (scaling, coupling, migration)
190
+ </milestone_context>
191
+
192
+ <question>
193
+ [architecture question from step 4]
194
+ </question>
195
+
196
+ <project_context>
197
+ [PROJECT.md summary]
198
+ </project_context>
199
+
200
+ <downstream_consumer>
201
+ Your ARCHITECTURE.md informs phase structure in roadmap. Include:
202
+ - Component boundaries (what talks to what)
203
+ - Data flow (how information moves)
204
+ - Suggested build order (dependencies between components)
205
+ </downstream_consumer>
206
+
207
+ <quality_gate>
208
+ - [ ] Components clearly defined
209
+ - [ ] Boundaries explicit
210
+ - [ ] Build order implications noted
211
+ </quality_gate>
212
+
213
+ <output>
214
+ Write to: .planning/research/ARCHITECTURE.md
215
+ Use template: ~/.claude/mindsystem/templates/research-project/ARCHITECTURE.md
216
+ </output>
217
+ ", subagent_type="ms-researcher", description="Architecture research")
218
+
219
+ Task(prompt="
220
+ <research_type>
221
+ Project Research — Pitfalls dimension for [domain].
222
+ </research_type>
223
+
224
+ <milestone_context>
225
+ {greenfield OR subsequent}
226
+
227
+ **Greenfield (v1.0):**
228
+ What do [domain] projects commonly get wrong? Critical mistakes?
229
+
230
+ **Subsequent (v1.1+):**
231
+ What are common mistakes when adding [target features] to [domain]?
232
+
233
+ IMPORTANT for subsequent milestones:
234
+ - Focus on integration pitfalls, not greenfield mistakes
235
+ - Research upgrade/migration pitfalls (existing users, data migration)
236
+ - Identify feature interaction bugs (new features breaking existing ones)
237
+ - Surface performance concerns when [target features] are added to existing load
238
+ </milestone_context>
239
+
240
+ <question>
241
+ [pitfalls question from step 4]
242
+ </question>
243
+
244
+ <project_context>
245
+ [PROJECT.md summary]
246
+ </project_context>
247
+
248
+ <downstream_consumer>
249
+ Your PITFALLS.md prevents mistakes in roadmap/planning. For each pitfall:
250
+ - Warning signs (how to detect early)
251
+ - Prevention strategy (how to avoid)
252
+ - Which phase should address it
253
+ </downstream_consumer>
254
+
255
+ <quality_gate>
256
+ - [ ] Pitfalls are specific, not generic
257
+ - [ ] Prevention is actionable
258
+ - [ ] Phase mapping included
259
+ </quality_gate>
260
+
261
+ <output>
262
+ Write to: .planning/research/PITFALLS.md
263
+ Use template: ~/.claude/mindsystem/templates/research-project/PITFALLS.md
264
+ </output>
265
+ ", subagent_type="ms-researcher", description="Pitfalls research")
266
+ ```
267
+
268
+ **Announce:** "Spawning 4 research agents... may take 2-3 minutes."
269
+
270
+ ## 6. Wait for Completion and Synthesize
271
+
272
+ After all 4 agents return:
273
+
274
+ ```bash
275
+ # Verify all research files exist
276
+ ls .planning/research/STACK.md .planning/research/FEATURES.md \
277
+ .planning/research/ARCHITECTURE.md .planning/research/PITFALLS.md
278
+ ```
279
+
280
+ **If any missing:** Report which agent failed, offer to retry.
281
+
282
+ **If all present:** Spawn synthesizer:
283
+
284
+ ```
285
+ Task(
286
+ prompt="
287
+ Synthesize research outputs into SUMMARY.md.
288
+
289
+ Read all 4 files in .planning/research/:
290
+ - STACK.md
291
+ - FEATURES.md
292
+ - ARCHITECTURE.md
293
+ - PITFALLS.md
294
+
295
+ Create SUMMARY.md with:
296
+ - Executive summary (2-3 paragraphs)
297
+ - Key findings from each file
298
+ - Roadmap implications (suggested phase structure)
299
+ - Confidence assessment
300
+ - Gaps to address
301
+
302
+ Then commit ALL research files together:
303
+ git add .planning/research/
304
+ git commit -m 'docs: complete [domain] project research'
305
+ ",
306
+ subagent_type="ms-research-synthesizer",
307
+ description="Synthesize research"
308
+ )
309
+ ```
310
+
311
+ ## 7. Present Results
312
+
313
+ ```
314
+ Research complete:
315
+
316
+ Files: SUMMARY.md, STACK.md, FEATURES.md, ARCHITECTURE.md, PITFALLS.md
317
+
318
+ Key findings:
319
+ - Stack: [one-liner]
320
+ - Architecture: [one-liner]
321
+ - Critical pitfall: [one-liner]
322
+
323
+ ---
324
+ ## > Next Up
325
+ **Define requirements** - `/ms:define-requirements`
326
+ <sub>`/clear` first</sub>
327
+ ---
328
+ ```
329
+
330
+ </process>
331
+
332
+ <success_criteria>
333
+ - [ ] PROJECT.md validated
334
+ - [ ] Domain identified and approved
335
+ - [ ] 4 ms-researcher agents spawned in parallel
336
+ - [ ] All 4 research files created (STACK, FEATURES, ARCHITECTURE, PITFALLS)
337
+ - [ ] ms-research-synthesizer spawned to create SUMMARY.md
338
+ - [ ] All research files committed atomically by synthesizer
339
+ </success_criteria>
@@ -0,0 +1,40 @@
1
+ ---
2
+ name: ms:resume-work
3
+ description: Resume work from previous session with full context restoration
4
+ allowed-tools:
5
+ - Read
6
+ - Bash
7
+ - Write
8
+ - AskUserQuestion
9
+ - SlashCommand
10
+ ---
11
+
12
+ <objective>
13
+ Restore complete project context and resume work seamlessly from previous session.
14
+
15
+ Routes to the resume-project workflow which handles:
16
+
17
+ - STATE.md loading (or reconstruction if missing)
18
+ - Checkpoint detection (.continue-here files)
19
+ - Incomplete work detection (PLAN without SUMMARY)
20
+ - Status presentation
21
+ - Context-aware next action routing
22
+ </objective>
23
+
24
+ <execution_context>
25
+ @~/.claude/mindsystem/workflows/resume-project.md
26
+ </execution_context>
27
+
28
+ <process>
29
+ **Follow the resume-project workflow** from `@~/.claude/mindsystem/workflows/resume-project.md`.
30
+
31
+ The workflow handles all resumption logic including:
32
+
33
+ 1. Project existence verification
34
+ 2. STATE.md loading or reconstruction
35
+ 3. Checkpoint and incomplete work detection
36
+ 4. Visual status presentation
37
+ 5. Context-aware option offering (checks CONTEXT.md before suggesting plan vs discuss)
38
+ 6. Routing to appropriate next command
39
+ 7. Session continuity updates
40
+ </process>