mindsystem-cc 3.19.0 → 3.21.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 (83) hide show
  1. package/README.md +5 -6
  2. package/agents/ms-designer.md +5 -2
  3. package/agents/ms-mockup-designer.md +1 -1
  4. package/agents/ms-plan-writer.md +8 -1
  5. package/agents/ms-product-researcher.md +69 -0
  6. package/agents/ms-research-synthesizer.md +1 -1
  7. package/agents/ms-researcher.md +8 -8
  8. package/agents/ms-roadmapper.md +9 -13
  9. package/bin/install.js +68 -5
  10. package/commands/ms/add-phase.md +30 -18
  11. package/commands/ms/adhoc.md +1 -1
  12. package/commands/ms/audit-milestone.md +12 -12
  13. package/commands/ms/complete-milestone.md +25 -22
  14. package/commands/ms/config.md +202 -0
  15. package/commands/ms/design-phase.md +34 -29
  16. package/commands/ms/discuss-phase.md +26 -22
  17. package/commands/ms/doctor.md +22 -202
  18. package/commands/ms/execute-phase.md +18 -7
  19. package/commands/ms/help.md +46 -39
  20. package/commands/ms/insert-phase.md +29 -17
  21. package/commands/ms/new-milestone.md +42 -19
  22. package/commands/ms/new-project.md +88 -103
  23. package/commands/ms/plan-milestone-gaps.md +4 -5
  24. package/commands/ms/plan-phase.md +5 -3
  25. package/commands/ms/progress.md +2 -4
  26. package/commands/ms/research-phase.md +7 -12
  27. package/commands/ms/research-project.md +12 -12
  28. package/mindsystem/references/continuation-format.md +3 -3
  29. package/mindsystem/references/plan-format.md +11 -1
  30. package/mindsystem/references/principles.md +1 -1
  31. package/mindsystem/references/questioning.md +50 -8
  32. package/mindsystem/references/routing/audit-result-routing.md +12 -11
  33. package/mindsystem/references/routing/between-milestones-routing.md +2 -2
  34. package/mindsystem/references/routing/milestone-complete-routing.md +1 -1
  35. package/mindsystem/references/routing/next-phase-routing.md +4 -2
  36. package/mindsystem/templates/context.md +7 -6
  37. package/mindsystem/templates/milestone-archive.md +5 -5
  38. package/mindsystem/templates/milestone-context.md +1 -1
  39. package/mindsystem/templates/milestone.md +9 -9
  40. package/mindsystem/templates/project.md +70 -64
  41. package/mindsystem/templates/research-subagent-prompt.md +3 -3
  42. package/mindsystem/templates/roadmap-milestone.md +14 -14
  43. package/mindsystem/templates/roadmap.md +9 -7
  44. package/mindsystem/workflows/adhoc.md +1 -1
  45. package/mindsystem/workflows/complete-milestone.md +66 -107
  46. package/mindsystem/workflows/discuss-phase.md +137 -65
  47. package/mindsystem/workflows/doctor-fixes.md +273 -0
  48. package/mindsystem/workflows/execute-phase.md +7 -3
  49. package/mindsystem/workflows/execute-plan.md +6 -5
  50. package/mindsystem/workflows/map-codebase.md +2 -2
  51. package/mindsystem/workflows/mockup-generation.md +1 -1
  52. package/mindsystem/workflows/plan-phase.md +28 -3
  53. package/mindsystem/workflows/transition.md +20 -25
  54. package/mindsystem/workflows/verify-work.md +1 -1
  55. package/package.json +1 -1
  56. package/scripts/__pycache__/ms-tools.cpython-314.pyc +0 -0
  57. package/scripts/__pycache__/test_ms_tools.cpython-314-pytest-9.0.2.pyc +0 -0
  58. package/scripts/fixtures/scan-context/.planning/ROADMAP.md +16 -0
  59. package/scripts/fixtures/scan-context/.planning/adhoc/20260220-fix-token-SUMMARY.md +12 -0
  60. package/scripts/fixtures/scan-context/.planning/config.json +3 -0
  61. package/scripts/fixtures/scan-context/.planning/debug/resolved/token-bug.md +11 -0
  62. package/scripts/fixtures/scan-context/.planning/knowledge/auth.md +11 -0
  63. package/scripts/fixtures/scan-context/.planning/phases/02-infra/02-1-SUMMARY.md +20 -0
  64. package/scripts/fixtures/scan-context/.planning/phases/04-setup/04-1-SUMMARY.md +21 -0
  65. package/scripts/fixtures/scan-context/.planning/phases/05-auth/05-1-SUMMARY.md +28 -0
  66. package/scripts/fixtures/scan-context/.planning/todos/done/setup-db.md +10 -0
  67. package/scripts/fixtures/scan-context/.planning/todos/pending/add-logout.md +10 -0
  68. package/scripts/fixtures/scan-context/expected-output.json +257 -0
  69. package/scripts/ms-tools.py +2139 -0
  70. package/scripts/test_ms_tools.py +836 -0
  71. package/commands/ms/list-phase-assumptions.md +0 -56
  72. package/mindsystem/workflows/list-phase-assumptions.md +0 -178
  73. package/scripts/__pycache__/compare_mockups.cpython-314.pyc +0 -0
  74. package/scripts/archive-milestone-files.sh +0 -68
  75. package/scripts/archive-milestone-phases.sh +0 -138
  76. package/scripts/doctor-scan.sh +0 -379
  77. package/scripts/gather-milestone-stats.sh +0 -179
  78. package/scripts/generate-adhoc-patch.sh +0 -79
  79. package/scripts/generate-phase-patch.sh +0 -169
  80. package/scripts/scan-artifact-subsystems.sh +0 -55
  81. package/scripts/scan-planning-context.py +0 -839
  82. package/scripts/update-state.sh +0 -59
  83. package/scripts/validate-execution-order.sh +0 -104
@@ -8,60 +8,50 @@ Template for `.planning/PROJECT.md` — the living project context document.
8
8
  # [Project Name]
9
9
 
10
10
  ## What This Is
11
-
12
- [Current accurate description — 2-3 sentences. What does this product do and who is it for?
13
- Use the user's language and framing. Update whenever reality drifts from this description.]
11
+ [2-3 sentences. Product identity in plain language.]
14
12
 
15
13
  ## Core Value
14
+ [Single sentence: the ONE thing that cannot fail.]
16
15
 
17
- [The ONE thing that matters most. If everything else fails, this must work.
18
- One sentence that drives prioritization when tradeoffs arise.]
19
-
20
- ## Requirements
21
-
22
- ### Validated
23
-
24
- <!-- Shipped and confirmed valuable. -->
25
-
26
- (None yet — ship to validate)
27
-
28
- ### Active
16
+ ## Who It's For
17
+ [Target audience who they are, their context, how they work today. 2-4 sentences.]
29
18
 
30
- <!-- Current scope. Building toward these. -->
19
+ ## Core Problem
20
+ [Why this exists — what pain or desire drives it. 1-2 sentences.]
31
21
 
32
- - [ ] [Requirement 1]
33
- - [ ] [Requirement 2]
34
- - [ ] [Requirement 3]
22
+ ## How It's Different
23
+ [What makes this not another [category]. Include competitive context if relevant.]
24
+ - [Differentiator 1]
25
+ - [Differentiator 2]
26
+ - [Differentiator 3]
35
27
 
36
- ### Out of Scope
37
-
38
- <!-- Explicit boundaries. Includes reasoning to prevent re-adding. -->
28
+ ## Key User Flows
29
+ [The 2-3 core interactions users perform.]
30
+ - [Flow 1]
31
+ - [Flow 2]
32
+ - [Flow 3]
39
33
 
34
+ ## Out of Scope
40
35
  - [Exclusion 1] — [why]
41
36
  - [Exclusion 2] — [why]
42
37
 
43
- ## Context
44
-
45
- [Background information that informs implementation:
46
- - Technical environment or ecosystem
47
- - Relevant prior work or experience
48
- - User research or feedback themes
49
- - Known issues to address]
50
-
51
38
  ## Constraints
52
-
53
39
  - **[Type]**: [What] — [Why]
54
40
  - **[Type]**: [What] — [Why]
55
41
 
56
42
  Common types: Tech stack, Timeline, Budget, Dependencies, Compatibility, Performance, Security
57
43
 
58
- ## Key Decisions
44
+ ## Technical Context
45
+ [Tech stack, integrations, prior work, known issues/debt.]
59
46
 
60
- <!-- Decisions that constrain future work. Add throughout project lifecycle. -->
47
+ ## Validated
48
+ (None yet — ship to validate)
49
+
50
+ ## Key Decisions
61
51
 
62
52
  | Decision | Rationale | Outcome |
63
53
  |----------|-----------|---------|
64
- | [Choice] | [Why] | [✓ Good / ⚠️ Revisit / — Pending] |
54
+ | [Choice] | [Why] | — Pending |
65
55
 
66
56
  ---
67
57
  *Last updated: [date] after [trigger]*
@@ -83,32 +73,51 @@ Common types: Tech stack, Timeline, Budget, Dependencies, Compatibility, Perform
83
73
  - Drives prioritization when tradeoffs arise
84
74
  - Rarely changes; if it does, it's a significant pivot
85
75
 
86
- **Requirements Validated:**
87
- - Requirements that shipped and proved valuable
88
- - Format: `- [Requirement] [version/phase]`
89
- - These are lockedchanging them requires explicit discussion
90
-
91
- **Requirements — Active:**
92
- - Current scope being built toward
93
- - These are hypotheses until shipped and validated
94
- - Move to Validated when shipped, Out of Scope if invalidated
95
-
96
- **Requirements Out of Scope:**
76
+ **Who It's For:**
77
+ - Specific enough to find 10 of these people
78
+ - Include their context: what they do today, what tools they use, what frustrates them
79
+ - Avoid broad categories ("developers", "small businesses") narrow to who needs this MOST
80
+ - Update as real user data replaces assumptions
81
+
82
+ **Core Problem:**
83
+ - The pain or desire that makes this product necessary
84
+ - Should explain why existing alternatives don't suffice
85
+ - One sentence is better than two — forces precision
86
+ - If you can't articulate the problem, the product isn't ready to build
87
+
88
+ **How It's Different:**
89
+ - 2-3 concrete differentiators, not marketing language
90
+ - Include what people use today instead (even manual workarounds)
91
+ - "Nothing else does this" is almost always wrong — probe alternatives
92
+ - Competitive context folds in here — no standalone section needed
93
+
94
+ **Key User Flows:**
95
+ - The 2-3 core interactions that make the product valuable
96
+ - One line each — verb-driven ("Log workout → view history → track progress")
97
+ - Bridges abstract identity and concrete architecture
98
+ - Update as flows are validated or new ones emerge
99
+
100
+ **Out of Scope:**
97
101
  - Explicit boundaries on what we're not building
98
102
  - Always include reasoning (prevents re-adding later)
99
103
  - Includes: considered and rejected, deferred to future, explicitly excluded
100
104
 
101
- **Context:**
102
- - Background that informs implementation decisions
103
- - Technical environment, prior work, user feedback
104
- - Known issues or technical debt to address
105
- - Update as new context emerges
106
-
107
105
  **Constraints:**
108
106
  - Hard limits on implementation choices
109
107
  - Tech stack, timeline, budget, compatibility, dependencies
110
108
  - Include the "why" — constraints without rationale get questioned
111
109
 
110
+ **Technical Context:**
111
+ - Background that informs implementation decisions
112
+ - Tech stack, integrations, prior work, known issues/debt
113
+ - Update as new technical context emerges
114
+ - Purely technical — business context lives in Layer 1 sections
115
+
116
+ **Validated:**
117
+ - Requirements that shipped and proved valuable
118
+ - Format: `- ✓ [Requirement] — [Milestone Name]`
119
+ - These are locked — changing them requires explicit discussion
120
+
112
121
  **Key Decisions:**
113
122
  - Significant choices that affect future work
114
123
  - Add decisions as they're made throughout the project
@@ -119,7 +128,7 @@ Common types: Tech stack, Timeline, Budget, Dependencies, Compatibility, Perform
119
128
 
120
129
  **Last Updated:**
121
130
  - Always note when and why the document was updated
122
- - Format: `after Phase 2` or `after v1.0 milestone`
131
+ - Format: `after Phase 2` or `after [Name] milestone`
123
132
  - Triggers review of whether content is still accurate
124
133
 
125
134
  </guidelines>
@@ -131,15 +140,17 @@ PROJECT.md evolves throughout the project lifecycle.
131
140
  **After each phase transition:**
132
141
  1. Requirements invalidated? → Move to Out of Scope with reason
133
142
  2. Requirements validated? → Move to Validated with phase reference
134
- 3. New requirements emerged? → Add to Active
135
- 4. Decisions to log? → Add to Key Decisions
136
- 5. "What This Is" still accurate? → Update if drifted
143
+ 3. Decisions to log? → Add to Key Decisions
144
+ 4. "What This Is" still accurate? → Update if drifted
145
+ 5. Has understanding of audience, problem, or differentiation evolved? → Update Who It's For, Core Problem, or How It's Different
146
+ 6. New key flows emerged? → Update Key User Flows
137
147
 
138
148
  **After each milestone:**
139
- 1. Full review of all sections
149
+ 1. Full review of all sections including business context (Who It's For, Core Problem, How It's Different)
140
150
  2. Core Value check — still the right priority?
141
151
  3. Audit Out of Scope — reasons still valid?
142
- 4. Update Context with current state (users, feedback, metrics)
152
+ 4. Update Technical Context with current state (users, feedback, metrics)
153
+ 5. Key User Flows — validated against what users actually do?
143
154
 
144
155
  </evolution>
145
156
 
@@ -154,15 +165,10 @@ For existing codebases:
154
165
  - What patterns are established?
155
166
  - What's clearly working and relied upon?
156
167
 
157
- 3. **Gather Active requirements** from user:
158
- - Present inferred current state
159
- - Ask what they want to build next
160
-
161
- 4. **Initialize:**
168
+ 3. **Initialize:**
162
169
  - Validated = inferred from existing code
163
- - Active = user's goals for this work
164
170
  - Out of Scope = boundaries user specifies
165
- - Context = includes current codebase state
171
+ - Technical Context = populated from codebase map
166
172
 
167
173
  </brownfield>
168
174
 
@@ -33,8 +33,8 @@ Phase Research — External Documentation focus.
33
33
  <focus>
34
34
  Library documentation, APIs, version-specific behavior, verified code examples.
35
35
  Use the ms-lookup CLI for library docs and deep research:
36
- ~/.claude/mindsystem/scripts/ms-lookup-wrapper.sh docs <library> '<query>'
37
- ~/.claude/mindsystem/scripts/ms-lookup-wrapper.sh deep '<query>'
36
+ ms-lookup docs <library> '<query>'
37
+ ms-lookup deep '<query>'
38
38
  Use WebSearch for ecosystem discovery.
39
39
  Focus on finding authoritative, current documentation for the libraries and tools
40
40
  needed to implement this phase.
@@ -129,7 +129,7 @@ Phase Research — Best Practices & Community Consensus focus.
129
129
  <focus>
130
130
  Community consensus, common pitfalls, proven approaches, state of the art.
131
131
  Use the ms-lookup CLI for deep research on high-value questions:
132
- ~/.claude/mindsystem/scripts/ms-lookup-wrapper.sh deep '<query>'
132
+ ms-lookup deep '<query>'
133
133
  Use WebSearch for community articles, blog posts, Stack Overflow patterns.
134
134
  Focus on what practitioners recommend and what mistakes to avoid.
135
135
  </focus>
@@ -7,14 +7,14 @@ Template for reorganizing `ROADMAP.md` after first milestone ships. Collapse com
7
7
 
8
8
  ## Milestones
9
9
 
10
- - ✅ **v1.0 MVP** - Phases 1-4 (shipped YYYY-MM-DD)
11
- - 🚧 **v1.1 [Name]** - Phases 5-6 (in progress)
12
- - 📋 **v2.0 [Name]** - Phases 7-10 (planned)
10
+ - ✅ **MVP** - Phases 1-4 (shipped YYYY-MM-DD)
11
+ - 🚧 **[Name]** - Phases 5-6 (in progress)
12
+ - 📋 **[Name]** - Phases 7-10 (planned)
13
13
 
14
14
  ## Phases
15
15
 
16
16
  <details>
17
- <summary>✅ v1.0 MVP (Phases 1-4) - SHIPPED YYYY-MM-DD</summary>
17
+ <summary>✅ MVP (Phases 1-4) - SHIPPED YYYY-MM-DD</summary>
18
18
 
19
19
  ### Phase 1: [Name]
20
20
  **Goal**: [What this phase delivers]
@@ -25,13 +25,13 @@ Plans:
25
25
  - [x] 01-02: [Brief description]
26
26
  - [x] 01-03: [Brief description]
27
27
 
28
- [... remaining v1.0 phases ...]
28
+ [... remaining phases ...]
29
29
 
30
30
  </details>
31
31
 
32
- ### 🚧 v1.1 [Name] (In Progress)
32
+ ### 🚧 [Name] (In Progress)
33
33
 
34
- **Milestone Goal:** [What v1.1 delivers]
34
+ **Milestone Goal:** [What this milestone delivers]
35
35
 
36
36
  #### Phase 5: [Name]
37
37
  **Goal**: [What this phase delivers]
@@ -42,21 +42,21 @@ Plans:
42
42
  - [ ] 05-01: [Brief description]
43
43
  - [ ] 05-02: [Brief description]
44
44
 
45
- [... remaining v1.1 phases ...]
45
+ [... remaining phases ...]
46
46
 
47
- ### 📋 v2.0 [Name] (Planned)
47
+ ### 📋 [Name] (Planned)
48
48
 
49
- **Milestone Goal:** [What v2.0 delivers]
49
+ **Milestone Goal:** [What this milestone delivers]
50
50
 
51
- [... v2.0 phases ...]
51
+ [... phases ...]
52
52
 
53
53
  ## Progress
54
54
 
55
55
  | Phase | Milestone | Plans Complete | Status | Completed |
56
56
  |-------|-----------|----------------|--------|-----------|
57
- | 1. Foundation | v1.0 | 3/3 | Complete | YYYY-MM-DD |
58
- | 2. Features | v1.0 | 2/2 | Complete | YYYY-MM-DD |
59
- | 5. Security | v1.1 | 0/2 | Not started | - |
57
+ | 1. Foundation | MVP | 3/3 | Complete | YYYY-MM-DD |
58
+ | 2. Features | MVP | 2/2 | Complete | YYYY-MM-DD |
59
+ | 5. Security | Security & Polish | 0/2 | Not started | - |
60
60
  ```
61
61
 
62
62
  **Notes:**
@@ -2,7 +2,7 @@
2
2
 
3
3
  Template for `.planning/ROADMAP.md`.
4
4
 
5
- ## Initial Roadmap (v1.0 Greenfield)
5
+ ## Initial Roadmap (Greenfield)
6
6
 
7
7
  ```markdown
8
8
  # Roadmap: [Project Name]
@@ -34,7 +34,7 @@ Decimal phases appear between their surrounding integers in numeric order.
34
34
  1. [Observable behavior from user perspective]
35
35
  2. [Observable behavior from user perspective]
36
36
  3. [Observable behavior from user perspective]
37
- **Discuss**: Unlikely (clear requirements)
37
+ **Discuss**: Unlikely (mechanical setup, zero design decisions)
38
38
  **Design**: Unlikely (backend only)
39
39
  **Research**: Unlikely (established patterns)
40
40
  **Plans**: [Number of plans, e.g., "3 plans" or "TBD"]
@@ -51,7 +51,7 @@ Plans:
51
51
  **Success Criteria** (what must be TRUE):
52
52
  1. [Observable behavior from user perspective]
53
53
  2. [Observable behavior from user perspective]
54
- **Discuss**: Likely (ambiguous user flow)
54
+ **Discuss**: Likely (assumes email/password only, unclear if social login needed, session duration unspecified)
55
55
  **Discuss topics**: [What to clarify]
56
56
  **Design**: Likely (significant new UI)
57
57
  **Design focus**: [What to design]
@@ -81,7 +81,8 @@ Plans:
81
81
  1. [Observable behavior from user perspective]
82
82
  2. [Observable behavior from user perspective]
83
83
  3. [Observable behavior from user perspective]
84
- **Discuss**: Unlikely (established patterns)
84
+ **Discuss**: Likely (assumes standard REST patterns, error handling strategy unspecified, rate limiting approach unclear)
85
+ **Discuss topics**: [Integration scope, error UX, retry behavior]
85
86
  **Design**: Unlikely (API only)
86
87
  **Research**: Likely (external API)
87
88
  **Research topics**: [What needs investigating]
@@ -98,7 +99,8 @@ Plans:
98
99
  **Success Criteria** (what must be TRUE):
99
100
  1. [Observable behavior from user perspective]
100
101
  2. [Observable behavior from user perspective]
101
- **Discuss**: Unlikely (clear requirements)
102
+ **Discuss**: Likely (assumes priority ordering of requirements, unclear if batch processing needed, edge case handling unspecified)
103
+ **Discuss topics**: [Priority rules, batch vs individual, error recovery]
102
104
  **Design**: Unlikely (backend only)
103
105
  **Research**: Unlikely (internal patterns)
104
106
  **Plans**: [Number of plans]
@@ -120,7 +122,7 @@ Phases execute in numeric order: 2 → 2.1 → 2.2 → 3 → 3.1 → 4
120
122
  ```
121
123
 
122
124
  <guidelines>
123
- **Initial planning (v1.0):**
125
+ **Initial planning:**
124
126
  - Phase count derived from actual work (not a target number)
125
127
  - Each phase delivers something coherent
126
128
  - Phases can have 1+ plans (split by orchestrator judgment — multiple subsystems, context budget, vertical slices)
@@ -137,7 +139,7 @@ Phases execute in numeric order: 2 → 2.1 → 2.2 → 3 → 3.1 → 4
137
139
  - Format: "User can [action]" or "[Thing] works/exists"
138
140
 
139
141
  **Pre-work indicators** (all use Likely/Unlikely with parenthetical reason):
140
- - `Discuss` - Vision unknowns: ambiguous requirements, UX decisions, novel features
142
+ - `Discuss` - Default Likely. Surfaces Claude's assumptions before planning. Unlikely only for fully mechanical zero-decision work (version bump, rename-only refactor, config-only change, pure deletion/cleanup). When Likely, rationale enumerates 2-4 phase-specific assumptions or open questions.
141
143
  - `Design` - Visual unknowns: significant new UI, novel interactions, multi-screen flows
142
144
  - `Research` - Technical unknowns: external APIs, new libraries, architectural decisions
143
145
  - Include topic/focus fields only when Likely
@@ -381,7 +381,7 @@ Generate patch file from the adhoc commit:
381
381
  ```bash
382
382
  patch_file=".planning/adhoc/${timestamp}-${slug}.patch"
383
383
 
384
- ~/.claude/mindsystem/scripts/generate-adhoc-patch.sh "$commit_hash" "$patch_file"
384
+ ms-tools generate-adhoc-patch "$commit_hash" "$patch_file"
385
385
  ```
386
386
 
387
387
  If patch generated (file exists and non-empty):