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,338 @@
1
+ ---
2
+ name: ms:new-project
3
+ description: Initialize a new project with deep context gathering and PROJECT.md
4
+ allowed-tools:
5
+ - Read
6
+ - Bash
7
+ - Write
8
+ - AskUserQuestion
9
+ ---
10
+
11
+ <objective>
12
+
13
+ Initialize a new project through comprehensive context gathering.
14
+
15
+ This is the most leveraged moment in any project. Deep questioning here means better plans, better execution, better outcomes. The quality of PROJECT.md determines the quality of everything downstream.
16
+
17
+ Creates `.planning/` with PROJECT.md and config.json.
18
+
19
+ </objective>
20
+
21
+ <execution_context>
22
+
23
+ @~/.claude/mindsystem/references/principles.md
24
+ @~/.claude/mindsystem/references/questioning.md
25
+ @~/.claude/mindsystem/templates/project.md
26
+ @~/.claude/mindsystem/templates/config.json
27
+
28
+ </execution_context>
29
+
30
+ <process>
31
+
32
+ <step name="setup">
33
+
34
+ **MANDATORY FIRST STEP — Execute these checks before ANY user interaction:**
35
+
36
+ 1. **Abort if project exists:**
37
+ ```bash
38
+ [ -f .planning/PROJECT.md ] && echo "ERROR: Project already initialized. Use /ms:progress" && exit 1
39
+ ```
40
+
41
+ 2. **Initialize git repo in THIS directory** (required even if inside a parent repo):
42
+ ```bash
43
+ # Check if THIS directory is already a git repo root (handles .git file for worktrees too)
44
+ if [ -d .git ] || [ -f .git ]; then
45
+ echo "Git repo exists in current directory"
46
+ else
47
+ git init
48
+ echo "Initialized new git repo"
49
+ fi
50
+ ```
51
+
52
+ 3. **Detect existing code (brownfield detection):**
53
+ ```bash
54
+ # Check for existing code files
55
+ CODE_FILES=$(find . -name "*.ts" -o -name "*.js" -o -name "*.py" -o -name "*.go" -o -name "*.rs" -o -name "*.swift" -o -name "*.java" 2>/dev/null | grep -v node_modules | grep -v .git | head -20)
56
+ HAS_PACKAGE=$([ -f package.json ] || [ -f requirements.txt ] || [ -f Cargo.toml ] || [ -f go.mod ] || [ -f Package.swift ] && echo "yes")
57
+ HAS_CODEBASE_MAP=$([ -d .planning/codebase ] && echo "yes")
58
+ ```
59
+
60
+ **You MUST run all bash commands above using the Bash tool before proceeding.**
61
+
62
+ </step>
63
+
64
+ <step name="brownfield_offer">
65
+
66
+ **If existing code detected and .planning/codebase/ doesn't exist:**
67
+
68
+ Check the results from setup step:
69
+ - If `CODE_FILES` is non-empty OR `HAS_PACKAGE` is "yes"
70
+ - AND `HAS_CODEBASE_MAP` is NOT "yes"
71
+
72
+ Use AskUserQuestion:
73
+ - header: "Existing Code"
74
+ - question: "I detected existing code in this directory. Would you like to map the codebase first?"
75
+ - options:
76
+ - "Map codebase first" — Run /ms:map-codebase to understand existing architecture (Recommended)
77
+ - "Skip mapping" — Proceed with project initialization
78
+
79
+ **If "Map codebase first":**
80
+ ```
81
+ Run `/ms:map-codebase` first, then return to `/ms:new-project`
82
+ ```
83
+ Exit command.
84
+
85
+ **If "Skip mapping":** Continue to question step.
86
+
87
+ **If no existing code detected OR codebase already mapped:** Continue to question step.
88
+
89
+ </step>
90
+
91
+ <step name="question">
92
+
93
+ **Open the conversation:**
94
+
95
+ Ask inline (freeform, NOT AskUserQuestion):
96
+
97
+ "What do you want to build?"
98
+
99
+ Wait for their response. This gives you the context needed to ask intelligent follow-up questions.
100
+
101
+ **Follow the thread:**
102
+
103
+ Based on what they said, ask follow-up questions that dig into their response. Use AskUserQuestion with options that probe what they mentioned — interpretations, clarifications, concrete examples.
104
+
105
+ Keep following threads. Each answer opens new threads to explore. Ask about:
106
+ - What excited them
107
+ - What problem sparked this
108
+ - What they mean by vague terms
109
+ - What it would actually look like
110
+ - What's already decided
111
+
112
+ Consult `questioning.md` for techniques:
113
+ - Challenge vagueness
114
+ - Make abstract concrete
115
+ - Surface assumptions
116
+ - Find edges
117
+ - Reveal motivation
118
+
119
+ **Check context (background, not out loud):**
120
+
121
+ As you go, mentally check the context checklist from `questioning.md`. If gaps remain, weave questions naturally. Don't suddenly switch to checklist mode.
122
+
123
+ **Decision gate:**
124
+
125
+ When you could write a clear PROJECT.md, use AskUserQuestion:
126
+
127
+ - header: "Ready?"
128
+ - question: "I think I understand what you're after. Ready to create PROJECT.md?"
129
+ - options:
130
+ - "Create PROJECT.md" — Let's move forward
131
+ - "Keep exploring" — I want to share more / ask me more
132
+
133
+ If "Keep exploring" — ask what they want to add, or identify gaps and probe naturally.
134
+
135
+ Loop until "Create PROJECT.md" selected.
136
+
137
+ </step>
138
+
139
+ <step name="project">
140
+
141
+ Synthesize all context into `.planning/PROJECT.md` using the template from `templates/project.md`.
142
+
143
+ **For greenfield projects:**
144
+
145
+ Initialize requirements as hypotheses:
146
+
147
+ ```markdown
148
+ ## Requirements
149
+
150
+ ### Validated
151
+
152
+ (None yet — ship to validate)
153
+
154
+ ### Active
155
+
156
+ - [ ] [Requirement 1]
157
+ - [ ] [Requirement 2]
158
+ - [ ] [Requirement 3]
159
+
160
+ ### Out of Scope
161
+
162
+ - [Exclusion 1] — [why]
163
+ - [Exclusion 2] — [why]
164
+ ```
165
+
166
+ All Active requirements are hypotheses until shipped and validated.
167
+
168
+ **For brownfield projects (codebase map exists):**
169
+
170
+ Infer Validated requirements from existing code:
171
+
172
+ 1. Read `.planning/codebase/ARCHITECTURE.md` and `STACK.md`
173
+ 2. Identify what the codebase already does
174
+ 3. These become the initial Validated set
175
+
176
+ ```markdown
177
+ ## Requirements
178
+
179
+ ### Validated
180
+
181
+ - ✓ [Existing capability 1] — existing
182
+ - ✓ [Existing capability 2] — existing
183
+ - ✓ [Existing capability 3] — existing
184
+
185
+ ### Active
186
+
187
+ - [ ] [New requirement 1]
188
+ - [ ] [New requirement 2]
189
+
190
+ ### Out of Scope
191
+
192
+ - [Exclusion 1] — [why]
193
+ ```
194
+
195
+ **Key Decisions:**
196
+
197
+ Initialize with any decisions made during questioning:
198
+
199
+ ```markdown
200
+ ## Key Decisions
201
+
202
+ | Decision | Rationale | Outcome |
203
+ |----------|-----------|---------|
204
+ | [Choice from questioning] | [Why] | — Pending |
205
+ ```
206
+
207
+ **Last updated footer:**
208
+
209
+ ```markdown
210
+ ---
211
+ *Last updated: [date] after initialization*
212
+ ```
213
+
214
+ Do not compress. Capture everything gathered.
215
+
216
+ </step>
217
+
218
+ <step name="workflow_preferences">
219
+
220
+ Ask all workflow preferences in a single AskUserQuestion call (3 questions):
221
+
222
+ Use AskUserQuestion with questions array:
223
+
224
+ ```
225
+ questions: [
226
+ {
227
+ header: "Mode",
228
+ question: "How do you want to work?",
229
+ multiSelect: false,
230
+ options: [
231
+ { label: "YOLO (Recommended)", description: "Auto-approve, just execute" },
232
+ { label: "Interactive", description: "Confirm at each step" }
233
+ ]
234
+ },
235
+ {
236
+ header: "Depth",
237
+ question: "How thorough should planning be?",
238
+ multiSelect: false,
239
+ options: [
240
+ { label: "Quick", description: "Ship fast (3-5 phases, 1-3 plans each)" },
241
+ { label: "Standard", description: "Balanced scope and speed (5-8 phases, 3-5 plans each)" },
242
+ { label: "Comprehensive", description: "Thorough coverage (8-12 phases, 5-10 plans each)" }
243
+ ]
244
+ },
245
+ {
246
+ header: "Execution",
247
+ question: "Run plans in parallel?",
248
+ multiSelect: false,
249
+ options: [
250
+ { label: "Parallel (Recommended)", description: "Independent plans run simultaneously" },
251
+ { label: "Sequential", description: "One plan at a time" }
252
+ ]
253
+ }
254
+ ]
255
+ ```
256
+
257
+ **Notes:**
258
+ - Depth controls compression tolerance, not artificial inflation
259
+ - Parallelization spawns multiple agents for independent plans
260
+ - All settings can be changed later in config.json
261
+
262
+ </step>
263
+
264
+ <step name="config">
265
+
266
+ Create `.planning/config.json` with chosen mode, depth, and parallelization using `templates/config.json` structure.
267
+
268
+ </step>
269
+
270
+ <step name="commit">
271
+
272
+ ```bash
273
+ git add .planning/PROJECT.md .planning/config.json
274
+ git commit -m "$(cat <<'EOF'
275
+ docs: initialize [project-name]
276
+
277
+ [One-liner from PROJECT.md]
278
+
279
+ Creates PROJECT.md with requirements and constraints.
280
+ EOF
281
+ )"
282
+ ```
283
+
284
+ </step>
285
+
286
+ <step name="done">
287
+
288
+ Present completion with next steps (see ~/.claude/mindsystem/references/continuation-format.md):
289
+
290
+ ```
291
+ Project initialized:
292
+
293
+ - Project: .planning/PROJECT.md
294
+ - Config: .planning/config.json (mode: [chosen mode])
295
+ [If .planning/codebase/ exists:] - Codebase: .planning/codebase/ (7 documents)
296
+
297
+ ---
298
+
299
+ ## ▶ Next Up
300
+
301
+ Choose your path:
302
+
303
+ **Option A: Research first** (recommended)
304
+ Research ecosystem → define requirements → create roadmap. Discovers standard stacks, expected features, architecture patterns.
305
+
306
+ `/ms:research-project`
307
+
308
+ **Option B: Define requirements directly** (familiar domains)
309
+ Skip research, define requirements from what you know, then create roadmap.
310
+
311
+ `/ms:define-requirements`
312
+
313
+ <sub>`/clear` first → fresh context window</sub>
314
+
315
+ ---
316
+ ```
317
+
318
+ </step>
319
+
320
+ </process>
321
+
322
+ <output>
323
+
324
+ - `.planning/PROJECT.md`
325
+ - `.planning/config.json`
326
+
327
+ </output>
328
+
329
+ <success_criteria>
330
+
331
+ - [ ] Deep questioning completed (not rushed, threads followed)
332
+ - [ ] PROJECT.md captures full context with evolutionary structure
333
+ - [ ] Requirements initialized as hypotheses (greenfield) or with inferred Validated (brownfield)
334
+ - [ ] Key Decisions table initialized
335
+ - [ ] config.json has workflow mode, depth, and parallelization
336
+ - [ ] All committed to git
337
+
338
+ </success_criteria>
@@ -0,0 +1,123 @@
1
+ ---
2
+ name: ms:pause-work
3
+ description: Create context handoff when pausing work mid-phase
4
+ allowed-tools:
5
+ - Read
6
+ - Write
7
+ - Bash
8
+ ---
9
+
10
+ <objective>
11
+ Create `.continue-here.md` handoff file to preserve complete work state across sessions.
12
+
13
+ Enables seamless resumption in fresh session with full context restoration.
14
+ </objective>
15
+
16
+ <context>
17
+ @.planning/STATE.md
18
+ </context>
19
+
20
+ <process>
21
+
22
+ <step name="detect">
23
+ Find current phase directory from most recently modified files.
24
+ </step>
25
+
26
+ <step name="gather">
27
+ **Collect complete state for handoff:**
28
+
29
+ 1. **Current position**: Which phase, which plan, which task
30
+ 2. **Work completed**: What got done this session
31
+ 3. **Work remaining**: What's left in current plan/phase
32
+ 4. **Decisions made**: Key decisions and rationale
33
+ 5. **Blockers/issues**: Anything stuck
34
+ 6. **Mental context**: The approach, next steps, "vibe"
35
+ 7. **Files modified**: What's changed but not committed
36
+
37
+ Ask user for clarifications if needed.
38
+ </step>
39
+
40
+ <step name="write">
41
+ **Write handoff to `.planning/phases/XX-name/.continue-here.md`:**
42
+
43
+ ```markdown
44
+ ---
45
+ phase: XX-name
46
+ task: 3
47
+ total_tasks: 7
48
+ status: in_progress
49
+ last_updated: [timestamp]
50
+ ---
51
+
52
+ <current_state>
53
+ [Where exactly are we? Immediate context]
54
+ </current_state>
55
+
56
+ <completed_work>
57
+
58
+ - Task 1: [name] - Done
59
+ - Task 2: [name] - Done
60
+ - Task 3: [name] - In progress, [what's done]
61
+ </completed_work>
62
+
63
+ <remaining_work>
64
+
65
+ - Task 3: [what's left]
66
+ - Task 4: Not started
67
+ - Task 5: Not started
68
+ </remaining_work>
69
+
70
+ <decisions_made>
71
+
72
+ - Decided to use [X] because [reason]
73
+ - Chose [approach] over [alternative] because [reason]
74
+ </decisions_made>
75
+
76
+ <blockers>
77
+ - [Blocker 1]: [status/workaround]
78
+ </blockers>
79
+
80
+ <context>
81
+ [Mental state, what were you thinking, the plan]
82
+ </context>
83
+
84
+ <next_action>
85
+ Start with: [specific first action when resuming]
86
+ </next_action>
87
+ ```
88
+
89
+ Be specific enough for a fresh Claude to understand immediately.
90
+ </step>
91
+
92
+ <step name="commit">
93
+ ```bash
94
+ git add .planning/phases/*/.continue-here.md
95
+ git commit -m "wip: [phase-name] paused at task [X]/[Y]"
96
+ ```
97
+ </step>
98
+
99
+ <step name="confirm">
100
+ ```
101
+ ✓ Handoff created: .planning/phases/[XX-name]/.continue-here.md
102
+
103
+ Current state:
104
+
105
+ - Phase: [XX-name]
106
+ - Task: [X] of [Y]
107
+ - Status: [in_progress/blocked]
108
+ - Committed as WIP
109
+
110
+ To resume: /ms:resume-work
111
+
112
+ ```
113
+ </step>
114
+
115
+ </process>
116
+
117
+ <success_criteria>
118
+ - [ ] .continue-here.md created in correct phase directory
119
+ - [ ] All sections filled with specific content
120
+ - [ ] Committed as WIP
121
+ - [ ] User knows location and how to resume
122
+ </success_criteria>
123
+ ```