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,359 @@
1
+ <purpose>
2
+ Execute small work items discovered during verification or debugging without the overhead of phase insertion.
3
+
4
+ Provides "describe → quick plan → execute → verify → log" flow for work that's too small for a phase but needs tracking.
5
+ </purpose>
6
+
7
+ <scope_guard>
8
+ **Maximum scope: 2 tasks**
9
+
10
+ If work requires more than 2 tasks, REFUSE with:
11
+ ```
12
+ This work requires [N] tasks (max: 2 for adhoc work).
13
+
14
+ Use `/ms:insert-phase [current_phase] [description]` instead.
15
+ ```
16
+
17
+ If work requires architectural changes, REFUSE with:
18
+ ```
19
+ This work requires architectural changes.
20
+
21
+ Use `/ms:insert-phase` for proper planning and context tracking.
22
+ ```
23
+ </scope_guard>
24
+
25
+ <required_reading>
26
+ Read STATE.md before any operation to load project context.
27
+
28
+ @~/.claude/mindsystem/templates/adhoc-summary.md
29
+ </required_reading>
30
+
31
+ <process>
32
+
33
+ <step name="parse_arguments" priority="first">
34
+ Parse the work description from $ARGUMENTS:
35
+
36
+ ```bash
37
+ if [ -z "$ARGUMENTS" ]; then
38
+ echo "ERROR: Work description required"
39
+ echo "Usage: /ms:do-work <description>"
40
+ echo "Example: /ms:do-work Fix auth token not refreshing on 401"
41
+ exit 1
42
+ fi
43
+
44
+ description="$ARGUMENTS"
45
+ ```
46
+
47
+ Validate description is actionable (not vague like "fix stuff" or "make it work").
48
+ </step>
49
+
50
+ <step name="validate_project">
51
+ Verify active GSD project:
52
+
53
+ ```bash
54
+ if [ ! -f .planning/STATE.md ]; then
55
+ echo "ERROR: No active GSD project found (.planning/STATE.md missing)"
56
+ echo ""
57
+ echo "Options:"
58
+ echo "- Initialize project: /ms:new-project"
59
+ echo "- Capture as todo: /ms:add-todo [description]"
60
+ exit 1
61
+ fi
62
+ ```
63
+
64
+ Load project context:
65
+ - Current phase (for related_phase in adhoc artifacts)
66
+ - Accumulated decisions (constraints on this work)
67
+ - Blockers/concerns (things to watch for)
68
+ </step>
69
+
70
+ <step name="analyze_scope">
71
+ Quick analysis of what tasks are needed:
72
+
73
+ 1. Identify files that need modification
74
+ 2. Determine discrete tasks required
75
+ 3. Check for architectural implications
76
+
77
+ **Task estimation:**
78
+ - Single file, simple change → 1 task
79
+ - Multiple files, related change → 1-2 tasks
80
+ - Multiple files, different concerns → likely >2 tasks
81
+
82
+ **Architectural check:**
83
+ - New patterns or abstractions → architectural
84
+ - Changes to core interfaces → architectural
85
+ - Cross-cutting concerns → architectural
86
+
87
+ **Decision point:**
88
+
89
+ If tasks > 2:
90
+ ```
91
+ This work requires approximately [N] tasks:
92
+ 1. [task description]
93
+ 2. [task description]
94
+ 3. [task description]
95
+ ...
96
+
97
+ Adhoc work is limited to 2 tasks maximum.
98
+
99
+ **Suggestion:** `/ms:insert-phase [current_phase] [description]`
100
+ ```
101
+
102
+ If architectural:
103
+ ```
104
+ This work involves architectural changes:
105
+ - [what makes it architectural]
106
+
107
+ Adhoc work handles small, isolated fixes — not structural changes.
108
+
109
+ **Suggestion:** `/ms:insert-phase [current_phase] [description]`
110
+ ```
111
+
112
+ If ≤2 tasks and not architectural: PROCEED
113
+ </step>
114
+
115
+ <step name="create_adhoc_directory">
116
+ Ensure adhoc directory exists:
117
+
118
+ ```bash
119
+ mkdir -p .planning/adhoc
120
+ ```
121
+ </step>
122
+
123
+ <step name="create_lightweight_plan">
124
+ Generate timestamp and slug:
125
+
126
+ ```bash
127
+ timestamp=$(date "+%Y-%m-%d")
128
+ slug=$(echo "$description" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/--*/-/g' | sed 's/^-//;s/-$//' | cut -c1-50)
129
+ plan_file=".planning/adhoc/${timestamp}-${slug}-PLAN.md"
130
+ ```
131
+
132
+ Create minimal PLAN.md:
133
+
134
+ ```markdown
135
+ ---
136
+ type: adhoc
137
+ description: [user description]
138
+ created: [ISO timestamp]
139
+ related_phase: [current phase from STATE.md, or "none"]
140
+ ---
141
+
142
+ <objective>
143
+ [User's description of what needs to be done]
144
+ </objective>
145
+
146
+ <tasks>
147
+
148
+ <task type="auto">
149
+ <name>Task 1: [Action-oriented name]</name>
150
+ <files>[file paths]</files>
151
+ <action>[What to do, what to avoid and WHY]</action>
152
+ <verify>[Command or check to prove completion]</verify>
153
+ </task>
154
+
155
+ [Task 2 if needed, same structure]
156
+
157
+ </tasks>
158
+
159
+ <verification>
160
+ [How to verify the work is complete]
161
+ </verification>
162
+ ```
163
+
164
+ Write to file:
165
+ ```bash
166
+ echo "Plan created: $plan_file"
167
+ ```
168
+ </step>
169
+
170
+ <step name="execute_tasks">
171
+ Execute each task inline (no subagent for small work).
172
+
173
+ For each task:
174
+ 1. Read current file state (use Explore subagent if context gathering needed)
175
+ 2. Make changes
176
+ 3. Run verify command
177
+ 4. Track files modified
178
+
179
+ **Deviation rules apply:**
180
+ - Rule 1 (Bug): Auto-fix bugs found during execution
181
+ - Rule 2 (Critical): Auto-fix security/data issues
182
+ - Rule 3 (Blocking): Auto-fix missing dependencies, typos
183
+
184
+ **Rule 4 (Architectural) triggers STOP:**
185
+ If execution reveals architectural changes needed:
186
+ ```
187
+ STOP: Architectural changes required
188
+
189
+ During execution, discovered:
190
+ - [what architectural change is needed]
191
+
192
+ This exceeds adhoc scope.
193
+
194
+ Work completed so far:
195
+ - [list completed tasks]
196
+
197
+ **Next steps:**
198
+ 1. Commit partial work (if valuable)
199
+ 2. Use `/ms:insert-phase` for remaining work
200
+ ```
201
+
202
+ Use AskUserQuestion to confirm how to proceed.
203
+ </step>
204
+
205
+ <step name="lightweight_verification">
206
+ Verify the work is complete:
207
+
208
+ 1. Run verify commands from each task
209
+ 2. Check files exist/changed as expected
210
+ 3. Run relevant tests if specified in verify
211
+
212
+ **Not required for adhoc:**
213
+ - Full goal-backward verification
214
+ - Cross-system integration checks
215
+ - Regression test suite
216
+
217
+ Keep verification focused on the specific changes made.
218
+ </step>
219
+
220
+ <step name="create_adhoc_summary">
221
+ Create SUMMARY.md (see @~/.claude/mindsystem/templates/adhoc-summary.md for full template):
222
+
223
+ ```bash
224
+ summary_file=".planning/adhoc/${timestamp}-${slug}-SUMMARY.md"
225
+ ```
226
+
227
+ ```markdown
228
+ ---
229
+ type: adhoc
230
+ description: [description]
231
+ completed: [ISO timestamp]
232
+ duration: [X min]
233
+ related_phase: [phase or "none"]
234
+ files_modified:
235
+ - [path/to/file1.ts]
236
+ - [path/to/file2.ts]
237
+ commit: [hash - filled after commit]
238
+ ---
239
+
240
+ # Adhoc: [Description]
241
+
242
+ **[Substantive one-liner describing what was done]**
243
+
244
+ ## What Was Done
245
+
246
+ - [accomplishment 1]
247
+ - [accomplishment 2]
248
+
249
+ ## Files Modified
250
+
251
+ - `[path]`: [what changed]
252
+ - `[path]`: [what changed]
253
+
254
+ ## Verification
255
+
256
+ - [what was verified and result]
257
+ ```
258
+
259
+ Write to file.
260
+ </step>
261
+
262
+ <step name="update_state">
263
+ Update STATE.md with adhoc work entry:
264
+
265
+ 1. Read current STATE.md
266
+ 2. Find or create "### Recent Adhoc Work" under "## Accumulated Context"
267
+ 3. Add entry at top of list
268
+ 4. Keep last 5 entries (remove older ones from list, files remain in .planning/adhoc/)
269
+
270
+ Format:
271
+ ```markdown
272
+ ### Recent Adhoc Work
273
+
274
+ - [YYYY-MM-DD]: [description] (.planning/adhoc/[filename]-SUMMARY.md)
275
+ ```
276
+
277
+ If section doesn't exist, add after "### Pending Todos" section:
278
+
279
+ ```markdown
280
+ ### Recent Adhoc Work
281
+
282
+ - [YYYY-MM-DD]: [description] (.planning/adhoc/[filename]-SUMMARY.md)
283
+
284
+ *See `.planning/adhoc/` for full history*
285
+ ```
286
+ </step>
287
+
288
+ <step name="git_commit">
289
+ Single commit for all changes:
290
+
291
+ ```bash
292
+ # Add all modified files
293
+ git add [code files modified]
294
+ git add "$plan_file"
295
+ git add "$summary_file"
296
+ git add .planning/STATE.md
297
+
298
+ # Determine commit type
299
+ # feat: new functionality
300
+ # fix: bug fix, correction
301
+ commit_type="fix" # or "feat" based on nature of work
302
+
303
+ git commit -m "$(cat <<'EOF'
304
+ ${commit_type}(adhoc): [description]
305
+
306
+ Files: [count] modified
307
+ EOF
308
+ )"
309
+
310
+ # Capture commit hash
311
+ commit_hash=$(git rev-parse --short HEAD)
312
+ ```
313
+
314
+ Update SUMMARY.md with commit hash in frontmatter.
315
+ </step>
316
+
317
+ <step name="completion">
318
+ Report completion:
319
+
320
+ ```
321
+ Adhoc work complete: [description]
322
+
323
+ **Commit:** [hash]
324
+ **Duration:** [X min]
325
+ **Files modified:** [count]
326
+
327
+ Artifacts:
328
+ - Plan: .planning/adhoc/[timestamp]-[slug]-PLAN.md
329
+ - Summary: .planning/adhoc/[timestamp]-[slug]-SUMMARY.md
330
+
331
+ STATE.md updated with adhoc entry.
332
+
333
+ ---
334
+
335
+ Continue with current work or check project status:
336
+ - `/ms:progress` — see project status
337
+ - `/ms:execute-phase` — continue phase execution
338
+ ```
339
+ </step>
340
+
341
+ </process>
342
+
343
+ <deviation_rules>
344
+ Adhoc work uses the same deviation rules as plan execution:
345
+
346
+ **Rule 1 - Bug in plan:** Auto-fix
347
+ **Rule 2 - Missing critical:** Auto-fix
348
+ **Rule 3 - Blocking issue:** Auto-fix
349
+ **Rule 4 - Architectural change:** STOP and suggest /ms:insert-phase
350
+
351
+ Rule 4 is strict for adhoc work — architectural changes exceed adhoc scope by definition.
352
+ </deviation_rules>
353
+
354
+ <output_artifacts>
355
+ - `.planning/adhoc/{timestamp}-{slug}-PLAN.md` — lightweight plan
356
+ - `.planning/adhoc/{timestamp}-{slug}-SUMMARY.md` — completion summary
357
+ - Updated `.planning/STATE.md` — adhoc entry in accumulated context
358
+ - Git commit with all changes
359
+ </output_artifacts>