mindsystem-cc 4.0.1 → 4.0.2
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 +127 -90
- package/agents/ms-debugger.md +2 -3
- package/agents/ms-verifier.md +4 -4
- package/bin/install.js +9 -1
- package/commands/ms/add-todo.md +1 -1
- package/commands/ms/audit-milestone.md +1 -1
- package/commands/ms/config.md +8 -10
- package/commands/ms/debug.md +1 -1
- package/commands/ms/design-phase.md +1 -1
- package/commands/ms/execute-phase.md +1 -1
- package/commands/ms/help.md +30 -10
- package/commands/ms/plan-phase.md +3 -17
- package/commands/ms/progress.md +9 -5
- package/commands/ms/research-phase.md +1 -1
- package/mindsystem/references/continuation-format.md +1 -1
- package/mindsystem/references/plan-risk-assessment.md +0 -1
- package/mindsystem/references/routing/gap-closure-routing.md +44 -18
- package/mindsystem/templates/debug-subagent-prompt.md +0 -5
- package/mindsystem/workflows/adhoc.md +5 -4
- package/mindsystem/workflows/compound.md +2 -2
- package/mindsystem/workflows/discuss-phase.md +1 -1
- package/mindsystem/workflows/execute-phase.md +3 -37
- package/mindsystem/workflows/execute-plan.md +1 -1
- package/mindsystem/workflows/mockup-generation.md +1 -1
- package/mindsystem/workflows/plan-phase.md +3 -139
- package/package.json +5 -2
- package/scripts/ms-tools.py +202 -0
- package/mindsystem/workflows/diagnose-issues.md +0 -238
- package/scripts/__pycache__/ms-tools.cpython-314.pyc +0 -0
- package/scripts/__pycache__/test_ms_tools.cpython-314-pytest-9.0.2.pyc +0 -0
- package/scripts/fixtures/scan-context/.planning/ROADMAP.md +0 -16
- package/scripts/fixtures/scan-context/.planning/adhoc/20260220-fix-token-SUMMARY.md +0 -12
- package/scripts/fixtures/scan-context/.planning/adhoc/20260225-refactor-api/adhoc-01-SUMMARY.md +0 -39
- package/scripts/fixtures/scan-context/.planning/config.json +0 -3
- package/scripts/fixtures/scan-context/.planning/debug/resolved/token-bug.md +0 -11
- package/scripts/fixtures/scan-context/.planning/knowledge/auth.md +0 -11
- package/scripts/fixtures/scan-context/.planning/phases/02-infra/02-1-SUMMARY.md +0 -20
- package/scripts/fixtures/scan-context/.planning/phases/04-setup/04-1-SUMMARY.md +0 -21
- package/scripts/fixtures/scan-context/.planning/phases/05-auth/05-1-SUMMARY.md +0 -28
- package/scripts/fixtures/scan-context/.planning/todos/add-logout.md +0 -10
- package/scripts/fixtures/scan-context/.planning/todos/done/setup-db.md +0 -10
- package/scripts/fixtures/scan-context/expected-output.json +0 -271
- package/scripts/test_ms_tools.py +0 -1701
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
**A meta-prompting and context engineering system for Claude Code.**
|
|
6
6
|
|
|
7
|
-
Every piece of work makes the next one better. Mindsystem structures your Claude Code sessions into plannable, executable, verifiable phases
|
|
7
|
+
Every piece of work makes the next one better. Mindsystem structures your Claude Code sessions into plannable, executable, verifiable phases, and compounds what it learns into persistent knowledge files that survive `/clear`. Context rot stops being the bottleneck. Every prompt in the system is tested against research on how LLMs actually follow instructions, so quality stays consistent from phase 1 to phase 20.
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
npx mindsystem-cc
|
|
@@ -19,57 +19,70 @@ npx mindsystem-cc
|
|
|
19
19
|
|
|
20
20
|
<br>
|
|
21
21
|
|
|
22
|
-
[How
|
|
22
|
+
[How it works](#how-it-works) · [Walkthrough](#end-to-end-walkthrough) · [Features](#features) · [Quick start](#quick-start) · [Config](#configuration) · [Commands](#command-reference) · [Troubleshooting](#troubleshooting)
|
|
23
23
|
|
|
24
24
|
</div>
|
|
25
25
|
|
|
26
26
|
---
|
|
27
27
|
|
|
28
|
-
## How
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
28
|
+
## How it works
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
[ new-milestone ] Define what to build next
|
|
32
|
+
│
|
|
33
|
+
▼
|
|
34
|
+
[ create-roadmap ] Derive requirements, map to phases
|
|
35
|
+
│
|
|
36
|
+
▼
|
|
37
|
+
╔══════════════════════════════════════════════════════════════════╗
|
|
38
|
+
║ Per Phase: ║
|
|
39
|
+
║ ║
|
|
40
|
+
║ [ discuss-phase ] (optional) Lock intent, validate context ║
|
|
41
|
+
║ │ ║
|
|
42
|
+
║ ▼ ║
|
|
43
|
+
║ [ design-phase ] (optional) Generate mockups, pick path ║
|
|
44
|
+
║ │ ║
|
|
45
|
+
║ ▼ ║
|
|
46
|
+
║ [ research-phase ] (optional) External docs, code patterns ║
|
|
47
|
+
║ │ ║
|
|
48
|
+
║ ▼ ║
|
|
49
|
+
║ [ plan-phase ] Break into context-budgeted plans ║
|
|
50
|
+
║ │ ║
|
|
51
|
+
║ ▼ ║
|
|
52
|
+
║ [ execute-phase ] Fresh subagents run each plan ║
|
|
53
|
+
║ │ ║
|
|
54
|
+
║ ▼ ║
|
|
55
|
+
║ [ verify-work ] Manual acceptance tests, inline fixes ║
|
|
56
|
+
║ │ ║
|
|
57
|
+
║ └────── repeat for next phase ──────────────────────┐ ║
|
|
58
|
+
╚═════════╦═══════════════════════════════════════════════════╧════╝
|
|
59
|
+
│
|
|
60
|
+
▼
|
|
61
|
+
[ audit-milestone ] Check requirements coverage, surface tech debt
|
|
62
|
+
│
|
|
63
|
+
▼
|
|
64
|
+
[ complete-milestone ] Archive, evolve PROJECT.md, start fresh
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Each phase gets its own preparation depth. A database migration might skip straight to planning. A user-facing feature might need discussion, design mockups, and research first. You pick the depth.
|
|
68
|
+
|
|
69
|
+
Execution happens in fresh subagent contexts, so each plan gets up to 200k tokens of headroom regardless of how much planning happened in the main conversation.
|
|
57
70
|
|
|
58
71
|
---
|
|
59
72
|
|
|
60
|
-
## End-to-
|
|
73
|
+
## End-to-end walkthrough
|
|
61
74
|
|
|
62
|
-
### 1. New
|
|
75
|
+
### 1. New milestone
|
|
63
76
|
|
|
64
77
|
```
|
|
65
78
|
/ms:new-milestone
|
|
66
79
|
```
|
|
67
80
|
|
|
68
|
-
Claude reads your project history
|
|
81
|
+
Claude reads your project history (tech debt, deferred requirements, validated decisions) and surfaces strategic directions. You articulate the vision. The output is a `MILESTONE-CONTEXT.md` that grounds everything downstream.
|
|
69
82
|
|
|
70
|
-
|
|
83
|
+
Think of it as guided brainstorming: Claude asks the right questions rather than prescribing answers, helping you figure out what to build next.
|
|
71
84
|
|
|
72
|
-
### 2. Create
|
|
85
|
+
### 2. Create roadmap
|
|
73
86
|
|
|
74
87
|
```
|
|
75
88
|
/ms:create-roadmap
|
|
@@ -77,23 +90,23 @@ This is dream extraction: Claude acts as product owner, helping you think throug
|
|
|
77
90
|
|
|
78
91
|
Claude derives requirements from your milestone context, assigns each a `REQ-ID`, and maps them to phases with success criteria. You approve scope and phase grouping.
|
|
79
92
|
|
|
80
|
-
Requirements define what must be TRUE when you ship, not what to build. This goal-backward framing means verification
|
|
93
|
+
Requirements define what must be TRUE when you ship, not what to build. This goal-backward framing means verification checks outcomes, not task completion.
|
|
81
94
|
|
|
82
95
|
**Creates:** `REQUIREMENTS.md`, `ROADMAP.md`, `STATE.md`, phase directories.
|
|
83
96
|
|
|
84
|
-
### 3. Discuss
|
|
97
|
+
### 3. Discuss phase (optional, recommended)
|
|
85
98
|
|
|
86
99
|
```
|
|
87
100
|
/ms:discuss-phase 1
|
|
88
101
|
```
|
|
89
102
|
|
|
90
|
-
|
|
103
|
+
This is where you catch misalignment before writing any code. Claude loads milestone context, feature knowledge files, and competitor research, then surfaces its assumptions with confidence levels. You validate intent, make tradeoff decisions, correct misunderstandings.
|
|
91
104
|
|
|
92
|
-
|
|
105
|
+
Worth taking seriously. Decisions here propagate through everything that follows.
|
|
93
106
|
|
|
94
107
|
**Creates:** `CONTEXT.md` with vision, essentials, and reasoning-backed decisions.
|
|
95
108
|
|
|
96
|
-
### 4. Design
|
|
109
|
+
### 4. Design phase (optional)
|
|
97
110
|
|
|
98
111
|
```
|
|
99
112
|
/ms:design-phase 1
|
|
@@ -101,55 +114,55 @@ Everything downstream flows from decisions made here. The assumption-based brief
|
|
|
101
114
|
|
|
102
115
|
Claude generates parallel HTML/CSS mockup variants and a side-by-side comparison page that opens in your browser. You pick a direction, iterate with feedback.
|
|
103
116
|
|
|
104
|
-
The output is a `DESIGN.md` with exact design tokens
|
|
117
|
+
The output is a `DESIGN.md` with exact design tokens (hex colors, px spacing, font weights), not descriptions of what things should look like.
|
|
105
118
|
|
|
106
|
-
### 5. Research
|
|
119
|
+
### 5. Research phase (optional)
|
|
107
120
|
|
|
108
121
|
```
|
|
109
122
|
/ms:research-phase 1
|
|
110
123
|
```
|
|
111
124
|
|
|
112
|
-
Three parallel agents investigate
|
|
125
|
+
Three parallel agents investigate at once: one queries external documentation through Perplexity and Context7, one analyzes your codebase for existing patterns, one surveys community best practices. Claude synthesizes findings into `RESEARCH.md` with confidence levels and source attribution.
|
|
113
126
|
|
|
114
|
-
You resolve library conflicts if any
|
|
127
|
+
You resolve library conflicts if any come up. Otherwise, this runs with minimal input.
|
|
115
128
|
|
|
116
|
-
### 6. Plan
|
|
129
|
+
### 6. Plan phase
|
|
117
130
|
|
|
118
131
|
```
|
|
119
132
|
/ms:plan-phase 1
|
|
120
133
|
```
|
|
121
134
|
|
|
122
|
-
Claude breaks the phase into tasks, groups them into plans targeting 25-45% of the context budget. Plans are pure markdown
|
|
135
|
+
Claude breaks the phase into tasks, groups them into plans targeting 25-45% of the context budget. Plans are pure markdown, no YAML frontmatter, no XML containers. The plan is the executable prompt, roughly 90% actionable content and 10% structure.
|
|
123
136
|
|
|
124
|
-
Independent plans
|
|
137
|
+
Independent plans get grouped into waves for parallel execution. A risk score (0-100) flags complex plans so you can verify them before committing.
|
|
125
138
|
|
|
126
139
|
You approve the plan structure and can adjust granularity.
|
|
127
140
|
|
|
128
141
|
**Creates:** `PLAN.md` files, `EXECUTION-ORDER.md`.
|
|
129
142
|
|
|
130
|
-
### 7. Execute
|
|
143
|
+
### 7. Execute phase
|
|
131
144
|
|
|
132
145
|
```
|
|
133
146
|
/ms:execute-phase 1
|
|
134
147
|
```
|
|
135
148
|
|
|
136
|
-
|
|
149
|
+
Runs without intervention. Each plan runs in a fresh subagent with the full context window available. Goal-backward verification checks that the phase achieved its intended outcome, not just that tasks got marked complete.
|
|
137
150
|
|
|
138
151
|
Configurable code review produces separate commits for review changes. Patch files are generated for manual inspection.
|
|
139
152
|
|
|
140
|
-
After execution, knowledge consolidation updates subsystem-scoped knowledge files. Future phases
|
|
153
|
+
After execution, knowledge consolidation updates subsystem-scoped knowledge files. Future phases touching the same subsystems start with accumulated context: decisions made, patterns established, pitfalls encountered.
|
|
141
154
|
|
|
142
155
|
**Creates:** `SUMMARY.md`, `VERIFICATION.md`, `.patch` files, knowledge file updates.
|
|
143
156
|
|
|
144
|
-
### 8. Verify
|
|
157
|
+
### 8. Verify work
|
|
145
158
|
|
|
146
159
|
```
|
|
147
160
|
/ms:verify-work 1
|
|
148
161
|
```
|
|
149
162
|
|
|
150
|
-
|
|
163
|
+
You run manual acceptance tests presented in batches of 4. Claude fixes issues inline or via subagent, then asks you to re-test until passing.
|
|
151
164
|
|
|
152
|
-
For hard-to-test scenarios
|
|
165
|
+
For hard-to-test scenarios (error states, loading screens, role-based views), mock generation creates temporary inline states without shipping test infrastructure.
|
|
153
166
|
|
|
154
167
|
Fixes compound into knowledge files through automatic consolidation. This is where edge cases, UI tweaks, and small bugs get caught before moving on.
|
|
155
168
|
|
|
@@ -159,7 +172,7 @@ Fixes compound into knowledge files through automatic consolidation. This is whe
|
|
|
159
172
|
|
|
160
173
|
Run steps 3-8 for each phase. Pick the preparation depth each phase needs.
|
|
161
174
|
|
|
162
|
-
### 10. Audit
|
|
175
|
+
### 10. Audit milestone
|
|
163
176
|
|
|
164
177
|
```
|
|
165
178
|
/ms:audit-milestone
|
|
@@ -167,9 +180,9 @@ Run steps 3-8 for each phase. Pick the preparation depth each phase needs.
|
|
|
167
180
|
|
|
168
181
|
Claude checks requirements coverage against `REQ-IDs`, spawns an integration checker for cross-phase wiring, aggregates untested UAT assumptions, and consolidates tech debt into `TECH-DEBT.md` with severity tiers and `TD-IDs`.
|
|
169
182
|
|
|
170
|
-
Optional code review with quality-phase decisions for high-impact findings
|
|
183
|
+
Optional code review with quality-phase decisions for high-impact findings. You decide what gets fixed vs. accepted as debt.
|
|
171
184
|
|
|
172
|
-
### 11. Complete
|
|
185
|
+
### 11. Complete milestone
|
|
173
186
|
|
|
174
187
|
```
|
|
175
188
|
/ms:complete-milestone
|
|
@@ -177,118 +190,138 @@ Optional code review with quality-phase decisions for high-impact findings — y
|
|
|
177
190
|
|
|
178
191
|
Full `PROJECT.md` evolution: validates core value proposition, moves shipped requirements to validated, triages deferred items. Archives the milestone to `.planning/milestones/{name}/` with the roadmap, requirements, and phase summaries.
|
|
179
192
|
|
|
180
|
-
Updates `MILESTONES.md` with stats and accomplishments.
|
|
193
|
+
Updates `MILESTONES.md` with stats and accomplishments. Fresh start for the next `/ms:new-milestone`.
|
|
181
194
|
|
|
182
195
|
---
|
|
183
196
|
|
|
184
197
|
## Features
|
|
185
198
|
|
|
186
|
-
### Knowledge
|
|
199
|
+
### Knowledge compounding
|
|
187
200
|
|
|
188
|
-
|
|
201
|
+
This is the thing that makes the whole system worth using. Subsystem-scoped knowledge files get enriched after every phase. Execute-phase consolidates implementation decisions. Verify-work compounds fixes and edge cases. `/ms:compound` catches out-of-pipeline work like direct Claude sessions, manual edits, or merged branches.
|
|
189
202
|
|
|
190
|
-
|
|
203
|
+
Phase 1 starts from scratch. Phase 10 starts with a knowledge base that knows what works, what failed, and why.
|
|
191
204
|
|
|
192
|
-
### Context
|
|
205
|
+
### Context budget management
|
|
193
206
|
|
|
194
|
-
Plans target 25-45% of the context window. Execution runs in fresh subagents
|
|
207
|
+
Plans target 25-45% of the context window. Execution runs in fresh subagents with no inherited drift from long planning conversations. The 50% rule ensures plans complete before quality degrades.
|
|
195
208
|
|
|
196
209
|
Orchestration metadata (wave grouping, dependencies) lives in `EXECUTION-ORDER.md`, separate from plans. Plans carry only what the executor needs: context, changes, verification, must-haves.
|
|
197
210
|
|
|
198
|
-
###
|
|
211
|
+
### Research-backed prompts
|
|
212
|
+
|
|
213
|
+
Unnecessary instructions aren't wasted space — they interfere with the ones that matter. Each instruction passes a reliability test: does removing this degrade output in the actual runtime context? Every command, workflow, and agent definition gets audited to cut that interference. Audited agents show 35-39% context reduction with no behavioral regression.
|
|
199
214
|
|
|
200
|
-
|
|
215
|
+
### Built-in code review
|
|
201
216
|
|
|
202
|
-
|
|
217
|
+
Configurable per tier: adhoc, phase, or milestone. Runs after execution and produces separate commits for inspection. Ships with structural analysis (`ms-code-reviewer`) and clarity-focused simplification (`ms-code-simplifier`), but you can point any tier at your own custom reviewer agent via `.planning/config.json`.
|
|
218
|
+
|
|
219
|
+
### Structured debugging
|
|
203
220
|
|
|
204
221
|
`/ms:debug` creates investigation state that persists across `/clear`. Scientific method: gather evidence, form hypotheses, test. Resume any debug session by running `/ms:debug` with no arguments. Archives resolved issues to `.planning/debug/resolved/`.
|
|
205
222
|
|
|
206
|
-
### Adhoc
|
|
223
|
+
### Adhoc execution
|
|
207
224
|
|
|
208
|
-
|
|
225
|
+
For work that's too coherent for a todo but too small for a full phase. `/ms:adhoc` reads existing knowledge files, generates a plan, executes, reviews, and consolidates learnings in one context. Accepts Linear ticket IDs, todo file paths, or plain descriptions.
|
|
209
226
|
|
|
210
|
-
### Design
|
|
227
|
+
### Design mockups
|
|
211
228
|
|
|
212
229
|
`/ms:design-phase` generates parallel HTML/CSS variant mockups with a side-by-side comparison page. Design tokens in the output are exact values (hex, px, font-weight), not descriptions. `/ms:review-design` audits existing screens using screenshots for retroactive design improvement.
|
|
213
230
|
|
|
214
|
-
### Project
|
|
231
|
+
### Project health
|
|
215
232
|
|
|
216
233
|
`/ms:doctor` runs 10 health checks: subsystem vocabulary, directory structure, milestone naming, knowledge files, CLI wrappers, API keys, version freshness. Fixes are applied in dependency order with atomic commits. Safe to run repeatedly.
|
|
217
234
|
|
|
218
|
-
### Smart
|
|
235
|
+
### Smart routing
|
|
219
236
|
|
|
220
237
|
`/ms:progress` reads project state and tells you what to run next. Visual progress bar, recent work summary, pending todos, active debug sessions. Reconstructs `STATE.md` from artifacts if it's missing. Also detects available updates.
|
|
221
238
|
|
|
222
|
-
### Deferred
|
|
239
|
+
### Deferred requirements
|
|
223
240
|
|
|
224
|
-
Requirements you want but haven't shipped
|
|
241
|
+
Requirements you want but haven't shipped yet are tracked in `PROJECT.md` with origin milestone and deferral reason. `complete-milestone` triages them before archiving. `create-roadmap` picks them up as candidates for new milestones. They don't get lost.
|
|
225
242
|
|
|
226
|
-
### Task
|
|
243
|
+
### Task capture
|
|
227
244
|
|
|
228
245
|
`/ms:add-todo` with Linear-inspired metadata: priority (1-4), estimate (XS-XL), inferred subsystem. Todos live as flat files in `.planning/todos/`. Address them later via `/ms:adhoc`, which reads the problem description, executes the work, and moves the todo to `done/`.
|
|
229
246
|
|
|
230
|
-
### Codebase
|
|
247
|
+
### Codebase mapping
|
|
231
248
|
|
|
232
249
|
`/ms:map-codebase` spawns 4 parallel agents producing 7 structured documents: stack, architecture, conventions, testing, integrations, directory structure, and concerns. Use on brownfield projects so Mindsystem respects your existing patterns.
|
|
233
250
|
|
|
234
251
|
---
|
|
235
252
|
|
|
236
|
-
## Quick
|
|
253
|
+
## Quick start
|
|
237
254
|
|
|
238
255
|
### New project
|
|
239
256
|
|
|
240
257
|
```
|
|
241
258
|
/ms:new-project
|
|
259
|
+
/ms:new-milestone
|
|
242
260
|
/ms:create-roadmap
|
|
243
261
|
/ms:plan-phase 1
|
|
244
262
|
/ms:execute-phase 1
|
|
245
263
|
/ms:verify-work 1
|
|
246
264
|
```
|
|
247
265
|
|
|
248
|
-
You'll get `.planning/` with your project vision, requirements, roadmap, and the first phase implemented with commits, patch files, and knowledge files.
|
|
266
|
+
You'll get `.planning/` with your project vision, milestone context, requirements, roadmap, and the first phase implemented with commits, patch files, and knowledge files.
|
|
249
267
|
|
|
250
268
|
### Existing project
|
|
251
269
|
|
|
252
270
|
```
|
|
253
271
|
/ms:new-project
|
|
254
272
|
/ms:map-codebase
|
|
273
|
+
/ms:new-milestone
|
|
255
274
|
/ms:create-roadmap
|
|
256
275
|
/ms:plan-phase 1
|
|
257
276
|
/ms:execute-phase 1
|
|
258
277
|
```
|
|
259
278
|
|
|
260
|
-
Codebase mapping produces 7 documents covering your stack, conventions, and architecture.
|
|
279
|
+
Codebase mapping produces 7 documents covering your stack, conventions, and architecture. Then you define what to build, and all downstream planning respects what's already there.
|
|
261
280
|
|
|
262
|
-
**Returning after a break?** Run `/ms:progress`
|
|
281
|
+
**Returning after a break?** Run `/ms:progress` to see where you left off and what to do next.
|
|
263
282
|
|
|
264
283
|
---
|
|
265
284
|
|
|
266
285
|
## Configuration
|
|
267
286
|
|
|
268
|
-
Mindsystem stores project config in `.planning/config.json`. Run `/ms:config` to
|
|
269
|
-
|
|
270
|
-
### Code review tiers
|
|
287
|
+
Mindsystem stores project config in `.planning/config.json`. Run `/ms:config` to change these interactively.
|
|
271
288
|
|
|
272
|
-
```
|
|
289
|
+
```jsonc
|
|
273
290
|
{
|
|
291
|
+
// Canonical subsystem names. Drives knowledge file scoping.
|
|
292
|
+
// Populated by /ms:new-project, refined by /ms:doctor.
|
|
293
|
+
"subsystems": ["auth", "api", "database"],
|
|
294
|
+
|
|
295
|
+
// Code review after execution. One reviewer per tier.
|
|
296
|
+
// null → falls back to "ms-code-simplifier" (default)
|
|
297
|
+
// "ms-code-reviewer" → structural: architecture and design issues
|
|
298
|
+
// "ms-code-simplifier" → clarity: readability and maintainability
|
|
299
|
+
// "skip" → explicitly disable review
|
|
300
|
+
// "<custom-agent>" → your own reviewer agent
|
|
274
301
|
"code_review": {
|
|
275
302
|
"adhoc": null,
|
|
276
303
|
"phase": null,
|
|
277
304
|
"milestone": null
|
|
305
|
+
},
|
|
306
|
+
|
|
307
|
+
// How /ms:design-phase opens the mockup comparison page.
|
|
308
|
+
// "auto" (default) | "ask" | "off"
|
|
309
|
+
"open_mockups": "auto",
|
|
310
|
+
|
|
311
|
+
// External task tracker integration (Linear only for now).
|
|
312
|
+
// null → disabled (default)
|
|
313
|
+
"task_tracker": {
|
|
314
|
+
"type": "linear",
|
|
315
|
+
"cli": "path/to/linear-cli"
|
|
278
316
|
}
|
|
279
317
|
}
|
|
280
318
|
```
|
|
281
319
|
|
|
282
|
-
|
|
283
|
-
| ----- | -------- |
|
|
284
|
-
| `null` | No reviewer (default) |
|
|
285
|
-
| `"ms-code-reviewer"` | Structural analysis — architectural and design issues |
|
|
286
|
-
| `"ms-code-simplifier"` | Clarity-focused — improves readability and maintainability |
|
|
287
|
-
| `"skip"` | Disable review for that tier |
|
|
320
|
+
Linear integration requires the [Linear CLI skill](https://github.com/rolandtolnay/llm-toolkit/tree/main/skills/linear). Point `task_tracker.cli` at the downloaded script.
|
|
288
321
|
|
|
289
322
|
---
|
|
290
323
|
|
|
291
|
-
## Command
|
|
324
|
+
## Command reference
|
|
292
325
|
|
|
293
326
|
Full docs live in `/ms:help`.
|
|
294
327
|
|
|
@@ -373,3 +406,7 @@ npx mindsystem-cc@latest
|
|
|
373
406
|
## License
|
|
374
407
|
|
|
375
408
|
MIT License. See [LICENSE](LICENSE) for details.
|
|
409
|
+
|
|
410
|
+
---
|
|
411
|
+
|
|
412
|
+
Inspired by [GSD](https://github.com/gsd-build/get-shit-done) and [Compound Engineering](https://github.com/EveryInc/compound-engineering-plugin).
|
package/agents/ms-debugger.md
CHANGED
|
@@ -12,7 +12,6 @@ You are a Mindsystem debugger. You investigate bugs using systematic scientific
|
|
|
12
12
|
You are spawned by:
|
|
13
13
|
|
|
14
14
|
- `/ms:debug` command (interactive debugging)
|
|
15
|
-
- `diagnose-issues` workflow (parallel UAT diagnosis)
|
|
16
15
|
|
|
17
16
|
Your job: Find the root cause through hypothesis testing, maintain debug file state, optionally fix and verify (depending on mode).
|
|
18
17
|
|
|
@@ -94,7 +93,7 @@ ls .planning/debug/*.md 2>/dev/null | grep -v resolved
|
|
|
94
93
|
2. `mkdir -p .planning/debug`
|
|
95
94
|
3. Read project context for frontmatter:
|
|
96
95
|
```bash
|
|
97
|
-
|
|
96
|
+
ms-tools config-get subsystems
|
|
98
97
|
grep "^Phase:" .planning/STATE.md 2>/dev/null | head -1
|
|
99
98
|
```
|
|
100
99
|
4. Create file with initial state including all 10 frontmatter fields:
|
|
@@ -368,7 +367,7 @@ Check for mode flags in prompt context:
|
|
|
368
367
|
- Diagnose but don't fix
|
|
369
368
|
- Stop after confirming root cause
|
|
370
369
|
- Skip fix_and_verify step
|
|
371
|
-
- Return root cause to caller
|
|
370
|
+
- Return root cause to caller
|
|
372
371
|
|
|
373
372
|
**goal: find_and_fix** (default)
|
|
374
373
|
- Find root cause, then fix and verify
|
package/agents/ms-verifier.md
CHANGED
|
@@ -257,7 +257,7 @@ score = (verified_truths / total_truths)
|
|
|
257
257
|
|
|
258
258
|
## Step 9: Structure Gap Output (If Gaps Found)
|
|
259
259
|
|
|
260
|
-
When gaps are found, structure them in YAML frontmatter for
|
|
260
|
+
When gaps are found, structure them in YAML frontmatter for gap triage. Use the `gaps:` format shown in the VERIFICATION.md template below.
|
|
261
261
|
|
|
262
262
|
**Gap fields:** `truth` (observable truth that failed), `status` (failed | partial), `reason` (why it failed), `artifacts` (files with issues), `missing` (specific things to add/fix).
|
|
263
263
|
|
|
@@ -383,7 +383,7 @@ Consider `/ms:verify-work {phase}` to validate these through UAT.
|
|
|
383
383
|
2. **{Truth 2}** — {reason}
|
|
384
384
|
- Missing: {what needs to be added}
|
|
385
385
|
|
|
386
|
-
Structured gaps in VERIFICATION.md frontmatter for
|
|
386
|
+
Structured gaps in VERIFICATION.md frontmatter for gap triage.
|
|
387
387
|
```
|
|
388
388
|
|
|
389
389
|
</output>
|
|
@@ -396,7 +396,7 @@ Structured gaps in VERIFICATION.md frontmatter for `/ms:plan-phase --gaps`.
|
|
|
396
396
|
|
|
397
397
|
**DO NOT skip key link verification.** This is where 80% of stubs hide. The pieces exist but aren't connected.
|
|
398
398
|
|
|
399
|
-
**Structure gaps in YAML frontmatter.**
|
|
399
|
+
**Structure gaps in YAML frontmatter.** Gap triage routes gaps to the appropriate primitive based on scope analysis.
|
|
400
400
|
|
|
401
401
|
**DO keep verification fast.** Use grep/file checks, not running the app. Goal is structural verification, not functional testing.
|
|
402
402
|
|
|
@@ -406,7 +406,7 @@ Structured gaps in VERIFICATION.md frontmatter for `/ms:plan-phase --gaps`.
|
|
|
406
406
|
|
|
407
407
|
<success_criteria>
|
|
408
408
|
|
|
409
|
-
- [ ] Gaps structured in YAML frontmatter (if gaps_found) —
|
|
409
|
+
- [ ] Gaps structured in YAML frontmatter (if gaps_found) — gap triage depends on this
|
|
410
410
|
- [ ] Key links verified — not just artifact existence; this is where stubs hide
|
|
411
411
|
- [ ] Artifacts checked at all three levels (exists → substantive → wired)
|
|
412
412
|
- [ ] SUMMARY.md claims verified against actual code, not trusted
|
package/bin/install.js
CHANGED
|
@@ -150,6 +150,10 @@ function isInteractive() {
|
|
|
150
150
|
* @param {string} destPrefix - The destination prefix (e.g., 'commands/ms', 'agents')
|
|
151
151
|
* @returns {Array<{relativePath: string, absolutePath: string}>}
|
|
152
152
|
*/
|
|
153
|
+
// Directories and file patterns excluded from installation
|
|
154
|
+
const EXCLUDED_DIRS = new Set(['.pytest_cache', '__pycache__', 'fixtures', 'node_modules', '.git', '.venv']);
|
|
155
|
+
const EXCLUDED_FILE_PATTERNS = [/^test_/, /\.test\./, /\.spec\./];
|
|
156
|
+
|
|
153
157
|
function collectFiles(baseDir, currentDir, destPrefix) {
|
|
154
158
|
const files = [];
|
|
155
159
|
if (!fs.existsSync(currentDir)) {
|
|
@@ -158,13 +162,17 @@ function collectFiles(baseDir, currentDir, destPrefix) {
|
|
|
158
162
|
|
|
159
163
|
const entries = fs.readdirSync(currentDir, { withFileTypes: true });
|
|
160
164
|
for (const entry of entries) {
|
|
165
|
+
if (EXCLUDED_DIRS.has(entry.name)) {
|
|
166
|
+
continue;
|
|
167
|
+
}
|
|
168
|
+
|
|
161
169
|
const absolutePath = path.join(currentDir, entry.name);
|
|
162
170
|
const relativeToCurrent = path.relative(baseDir, absolutePath);
|
|
163
171
|
const relativePath = path.join(destPrefix, relativeToCurrent);
|
|
164
172
|
|
|
165
173
|
if (entry.isDirectory()) {
|
|
166
174
|
files.push(...collectFiles(baseDir, absolutePath, destPrefix));
|
|
167
|
-
} else {
|
|
175
|
+
} else if (!EXCLUDED_FILE_PATTERNS.some(p => p.test(entry.name))) {
|
|
168
176
|
files.push({ relativePath, absolutePath });
|
|
169
177
|
}
|
|
170
178
|
}
|
package/commands/ms/add-todo.md
CHANGED
|
@@ -58,7 +58,7 @@ Infer priority, estimate, and subsystem from description and conversation contex
|
|
|
58
58
|
| L | 5 | Multi-file feature, new subsystem area |
|
|
59
59
|
| XL | 8 | Cross-cutting concern, architectural change |
|
|
60
60
|
|
|
61
|
-
**Subsystem:** Read `
|
|
61
|
+
**Subsystem:** Read `ms-tools config-get subsystems`. Match against description and conversation context. Must match config.json vocabulary.
|
|
62
62
|
</step>
|
|
63
63
|
|
|
64
64
|
<step name="confirm">
|
|
@@ -191,7 +191,7 @@ Route by status (see `<offer_next>`).
|
|
|
191
191
|
Read code review agent from config:
|
|
192
192
|
|
|
193
193
|
```bash
|
|
194
|
-
CODE_REVIEW=$(
|
|
194
|
+
CODE_REVIEW=$(ms-tools config-get code_review.milestone)
|
|
195
195
|
```
|
|
196
196
|
|
|
197
197
|
**If CODE_REVIEW = "skip":**
|
package/commands/ms/config.md
CHANGED
|
@@ -76,12 +76,10 @@ If "Custom": use AskUserQuestion for each tier (adhoc, phase, milestone) individ
|
|
|
76
76
|
|
|
77
77
|
If "Skip code review": set all three values to `"skip"`.
|
|
78
78
|
|
|
79
|
-
Update config.json
|
|
79
|
+
Update config.json:
|
|
80
80
|
|
|
81
81
|
```bash
|
|
82
|
-
|
|
83
|
-
--arg a "$ADHOC" --arg p "$PHASE" --arg m "$MILESTONE" \
|
|
84
|
-
.planning/config.json > .planning/config.tmp && mv .planning/config.tmp .planning/config.json
|
|
82
|
+
ms-tools config-set code_review --json '{"adhoc": "'"$ADHOC"'", "phase": "'"$PHASE"'", "milestone": "'"$MILESTONE"'"}'
|
|
85
83
|
```
|
|
86
84
|
|
|
87
85
|
</step>
|
|
@@ -119,7 +117,7 @@ If no selections: skip gitignore changes.
|
|
|
119
117
|
Read current value:
|
|
120
118
|
|
|
121
119
|
```bash
|
|
122
|
-
CURRENT=$(
|
|
120
|
+
CURRENT=$(ms-tools config-get open_mockups --default "auto")
|
|
123
121
|
echo "Current open_mockups: $CURRENT"
|
|
124
122
|
```
|
|
125
123
|
|
|
@@ -136,10 +134,10 @@ Map selection to config value:
|
|
|
136
134
|
- "Ask first" → `"ask"`
|
|
137
135
|
- "Don't open" → `"off"`
|
|
138
136
|
|
|
139
|
-
Update config.json
|
|
137
|
+
Update config.json:
|
|
140
138
|
|
|
141
139
|
```bash
|
|
142
|
-
|
|
140
|
+
ms-tools config-set open_mockups "$VALUE"
|
|
143
141
|
```
|
|
144
142
|
|
|
145
143
|
</step>
|
|
@@ -149,7 +147,7 @@ jq --arg v "$VALUE" '.open_mockups = $v' .planning/config.json > .planning/confi
|
|
|
149
147
|
Read current value:
|
|
150
148
|
|
|
151
149
|
```bash
|
|
152
|
-
CURRENT=$(
|
|
150
|
+
CURRENT=$(ms-tools config-get task_tracker.type --default "not configured")
|
|
153
151
|
echo "Current task_tracker: $CURRENT"
|
|
154
152
|
```
|
|
155
153
|
|
|
@@ -175,13 +173,13 @@ If "Custom path": ask user for path via AskUserQuestion.
|
|
|
175
173
|
Write to config.json:
|
|
176
174
|
|
|
177
175
|
```bash
|
|
178
|
-
|
|
176
|
+
ms-tools config-set task_tracker --json '{"type": "linear", "cli": "'"$CLI_PATH"'"}'
|
|
179
177
|
```
|
|
180
178
|
|
|
181
179
|
If "None / not yet":
|
|
182
180
|
|
|
183
181
|
```bash
|
|
184
|
-
|
|
182
|
+
ms-tools config-delete task_tracker
|
|
185
183
|
```
|
|
186
184
|
|
|
187
185
|
</step>
|
package/commands/ms/debug.md
CHANGED
|
@@ -93,7 +93,7 @@ Task(
|
|
|
93
93
|
- Display root cause and evidence summary
|
|
94
94
|
- Offer options:
|
|
95
95
|
- "Fix now" — spawn ms-debugger with `goal: find_and_fix` and the debug file
|
|
96
|
-
- "Plan fix" — suggest
|
|
96
|
+
- "Plan fix" — suggest `/ms:adhoc` for small fixes, `/ms:insert-phase` for larger scope
|
|
97
97
|
- "Done" — leave the diagnosis
|
|
98
98
|
|
|
99
99
|
**If `## CHECKPOINT REACHED`:**
|
|
@@ -132,7 +132,7 @@ If exists, extract:
|
|
|
132
132
|
Match subsystem(s) to this phase by comparing ROADMAP phase description against subsystem names in config.json. Load matching knowledge files:
|
|
133
133
|
|
|
134
134
|
```bash
|
|
135
|
-
|
|
135
|
+
ms-tools config-get subsystems
|
|
136
136
|
cat .planning/knowledge/{matched_subsystem}.md 2>/dev/null
|
|
137
137
|
```
|
|
138
138
|
|
|
@@ -75,7 +75,7 @@ ms-tools find-phase "$ARGUMENTS"
|
|
|
75
75
|
- Creates VERIFICATION.md with detailed report
|
|
76
76
|
- Route by status:
|
|
77
77
|
- `passed` → continue to step 7
|
|
78
|
-
- `gaps_found` → present gaps,
|
|
78
|
+
- `gaps_found` → present gaps, route via gap-closure-routing.md triage
|
|
79
79
|
|
|
80
80
|
7. **Code review (optional)**
|
|
81
81
|
- Read `code_review.phase` from config.json (default: `ms-code-simplifier`)
|