mindsystem-cc 3.14.0 → 3.16.1

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 (51) hide show
  1. package/README.md +1 -0
  2. package/agents/ms-codebase-researcher.md +105 -0
  3. package/agents/ms-consolidator.md +137 -286
  4. package/agents/ms-debugger.md +1 -0
  5. package/agents/ms-designer.md +1 -0
  6. package/agents/ms-executor.md +2 -1
  7. package/agents/ms-flutter-code-quality.md +1 -1
  8. package/agents/ms-flutter-reviewer.md +1 -0
  9. package/agents/ms-flutter-simplifier.md +1 -1
  10. package/agents/ms-integration-checker.md +1 -0
  11. package/agents/ms-plan-checker.md +17 -327
  12. package/agents/ms-researcher.md +25 -343
  13. package/agents/ms-roadmapper.md +10 -75
  14. package/agents/ms-verifier.md +33 -309
  15. package/agents/ms-verify-fixer.md +1 -0
  16. package/commands/ms/check-phase.md +24 -55
  17. package/commands/ms/complete-milestone.md +6 -25
  18. package/commands/ms/create-roadmap.md +3 -15
  19. package/commands/ms/design-phase.md +52 -15
  20. package/commands/ms/discuss-phase.md +7 -9
  21. package/commands/ms/doctor.md +224 -0
  22. package/commands/ms/execute-phase.md +22 -12
  23. package/commands/ms/help.md +11 -0
  24. package/commands/ms/new-milestone.md +3 -3
  25. package/commands/ms/plan-phase.md +1 -1
  26. package/commands/ms/research-phase.md +249 -85
  27. package/commands/ms/verify-work.md +1 -0
  28. package/mindsystem/references/plan-risk-assessment.md +1 -2
  29. package/mindsystem/templates/context.md +1 -11
  30. package/mindsystem/templates/discovery.md +2 -3
  31. package/mindsystem/templates/knowledge.md +99 -0
  32. package/mindsystem/templates/requirements.md +3 -61
  33. package/mindsystem/templates/research-comparison-output.md +50 -0
  34. package/mindsystem/templates/research-feasibility-output.md +43 -0
  35. package/mindsystem/templates/research-project-output.md +81 -0
  36. package/mindsystem/templates/research-subagent-prompt.md +164 -48
  37. package/mindsystem/templates/roadmap-milestone.md +67 -0
  38. package/mindsystem/templates/roadmap.md +2 -66
  39. package/mindsystem/workflows/complete-milestone.md +23 -140
  40. package/mindsystem/workflows/define-requirements.md +4 -8
  41. package/mindsystem/workflows/discuss-phase.md +25 -8
  42. package/mindsystem/workflows/execute-phase.md +34 -0
  43. package/mindsystem/workflows/execute-plan.md +8 -0
  44. package/mindsystem/workflows/plan-phase.md +40 -104
  45. package/mindsystem/workflows/verify-work.md +20 -0
  46. package/package.json +1 -1
  47. package/scripts/cleanup-phase-artifacts.sh +68 -0
  48. package/scripts/scan-artifact-subsystems.sh +55 -0
  49. package/scripts/scan-planning-context.py +689 -0
  50. package/mindsystem/templates/decisions.md +0 -145
  51. package/mindsystem/templates/learnings.md +0 -150
@@ -1,145 +0,0 @@
1
- # Decisions Template
2
-
3
- Template for `.planning/milestones/v{X.Y}-DECISIONS.md` — consolidated decisions from a milestone.
4
-
5
- **Purpose:** Preserve decision rationale for future reference. When starting a new milestone, previous DECISIONS.md provides context for "why did we do it this way?"
6
-
7
- **Created by:** `ms-consolidator` agent during `/ms:complete-milestone`
8
-
9
- **Referenced by:** `/ms:new-milestone` during discovery mode
10
-
11
- ---
12
-
13
- <template>
14
-
15
- ```markdown
16
- # Milestone v{{VERSION}} Decisions
17
-
18
- **Milestone:** {{NAME}}
19
- **Phases:** {{PHASE_START}}-{{PHASE_END}}
20
- **Consolidated:** {{DATE}}
21
-
22
- ---
23
-
24
- ## Technical Stack
25
-
26
- | Decision | Rationale | Phase |
27
- |----------|-----------|-------|
28
- | {{DECISION}} | {{RATIONALE}} | {{PHASE}} |
29
-
30
- ## Architecture
31
-
32
- | Decision | Rationale | Phase |
33
- |----------|-----------|-------|
34
- | {{DECISION}} | {{RATIONALE}} | {{PHASE}} |
35
-
36
- ## Data Model
37
-
38
- | Decision | Rationale | Phase |
39
- |----------|-----------|-------|
40
- | {{DECISION}} | {{RATIONALE}} | {{PHASE}} |
41
-
42
- ## API Design
43
-
44
- | Decision | Rationale | Phase |
45
- |----------|-----------|-------|
46
- | {{DECISION}} | {{RATIONALE}} | {{PHASE}} |
47
-
48
- ## UI/UX
49
-
50
- | Decision | Rationale | Phase |
51
- |----------|-----------|-------|
52
- | {{DECISION}} | {{RATIONALE}} | {{PHASE}} |
53
-
54
- ## Security
55
-
56
- | Decision | Rationale | Phase |
57
- |----------|-----------|-------|
58
- | {{DECISION}} | {{RATIONALE}} | {{PHASE}} |
59
-
60
- ## Performance
61
-
62
- | Decision | Rationale | Phase |
63
- |----------|-----------|-------|
64
- | {{DECISION}} | {{RATIONALE}} | {{PHASE}} |
65
-
66
- ---
67
-
68
- ## Sources
69
-
70
- Files consolidated from each phase:
71
-
72
- | Phase | Files Found |
73
- |-------|-------------|
74
- | {{PHASE_NUM}} | {{FILES_LIST}} |
75
-
76
- ---
77
-
78
- *Consolidated: {{DATE}} during v{{VERSION}} milestone completion*
79
- ```
80
-
81
- </template>
82
-
83
- <guidelines>
84
-
85
- ## What This File Captures
86
-
87
- **Decisions = Choices + Rationale**
88
-
89
- This template captures WHY decisions were made, not just WHAT was built. SUMMARY.md captures what was built. DECISIONS.md captures why it was built that way.
90
-
91
- Decisions help future milestones by:
92
- - Explaining why certain approaches were chosen
93
- - Documenting rejected alternatives
94
- - Preserving constraints that influenced choices
95
- - Providing context for "why is it this way?" questions
96
-
97
- ## Categories Explained
98
-
99
- | Category | Content |
100
- |----------|---------|
101
- | **Technical Stack** | Libraries, frameworks, versions, tools |
102
- | **Architecture** | System structure, module boundaries, patterns |
103
- | **Data Model** | Schema, relationships, storage approach |
104
- | **API Design** | Endpoints, auth, errors, response format |
105
- | **UI/UX** | Components, layouts, interactions |
106
- | **Security** | Auth, authorization, data protection |
107
- | **Performance** | Caching, optimization, loading patterns |
108
-
109
- ## Usage Rules
110
-
111
- **Remove empty categories.** If no Security decisions were made, don't include the Security section.
112
-
113
- **Keep entries concise.** Decision in 5-10 words. Rationale in 10-20 words.
114
-
115
- **Include phase number.** Helps trace when decisions were made.
116
-
117
- ## Good vs Bad Entries
118
-
119
- **Good decision entries:**
120
- - "Use jose over jsonwebtoken | Better TypeScript support, actively maintained | 2"
121
- - "Flat folder structure | Avoids premature abstraction, easier navigation | 1"
122
- - "Server actions over API routes | Simpler data mutations for forms | 3"
123
- - "Tailwind over styled-components | Team familiarity, smaller bundle | 1"
124
-
125
- **Bad decision entries:**
126
- - "Use React | — | 1" (no rationale)
127
- - "Implemented authentication | Users can log in | 2" (not a decision, just work done)
128
- - "Added tests | Testing is important | 3" (obvious, no real decision)
129
-
130
- ## Sources Appendix
131
-
132
- The Sources section documents which files were consolidated from each phase:
133
-
134
- ```markdown
135
- | Phase | Files Found |
136
- |-------|-------------|
137
- | 1 | PLAN.md, RESEARCH.md |
138
- | 2 | PLAN.md, CONTEXT.md, DESIGN.md |
139
- | 3 | PLAN.md |
140
- | 4 | PLAN.md, RESEARCH.md, DESIGN.md |
141
- ```
142
-
143
- This helps understand which phases had dedicated research, design, or context discussion.
144
-
145
- </guidelines>
@@ -1,150 +0,0 @@
1
- # Learnings Template
2
-
3
- Template for `.planning/LEARNINGS.md` — curated cross-milestone index of reusable patterns.
4
-
5
- **Purpose:** Persist operational learnings across milestone boundaries. When starting a new milestone, LEARNINGS.md surfaces past patterns that prevent repeated mistakes and reinforce proven approaches.
6
-
7
- **Created by:** `complete-milestone` workflow during `/ms:complete-milestone`
8
-
9
- **Referenced by:** `/ms:plan-phase` step 6e — grep-matched entries injected as `<learning type="curated">` in plan-writer handoff
10
-
11
- ---
12
-
13
- **Distinct from:**
14
-
15
- | File | Contains | Learnings does NOT contain |
16
- |------|----------|---------------------------|
17
- | `PROJECT.md` Key Decisions | Strategic choices with rationale | Decisions (use Key Decisions table) |
18
- | `v{X.Y}-DECISIONS.md` | Milestone-scoped decision archive | Decision rationale or alternatives |
19
- | `STATE.md` | Session restoration context | Status, blockers, current position |
20
- | `SUMMARY.md` | Phase deliverables and outcomes | What was built or delivered |
21
-
22
- **LEARNINGS.md contains:** Prescriptive one-liner patterns extracted from debug resolutions, adhoc discoveries, phase deviations, and recurring issues. Each entry is actionable ("always do X", "never do Y", "when Z, use W").
23
-
24
- ---
25
-
26
- <template>
27
-
28
- ```markdown
29
- # Project Learnings
30
-
31
- Curated patterns from milestone work. Referenced by `/ms:plan-phase` for context-aware planning.
32
-
33
- ---
34
-
35
- ## v{{VERSION}} {{MILESTONE_NAME}}
36
-
37
- ### {{SUBSYSTEM}}
38
-
39
- - **{{Brief title}}**: {{Prescriptive action}} → `{{source_ref}}`
40
-
41
- ---
42
-
43
- *Last updated: {{DATE}} during v{{VERSION}} milestone completion*
44
- ```
45
-
46
- </template>
47
-
48
- <guidelines>
49
-
50
- ## What Belongs
51
-
52
- Reusable patterns that prevent future mistakes or reinforce proven approaches:
53
-
54
- - Root cause patterns from debug sessions
55
- - Prevention rules discovered through investigation
56
- - Non-obvious integration behaviors
57
- - Performance or reliability patterns
58
- - Workarounds for framework/library quirks
59
-
60
- ## What Does NOT Belong
61
-
62
- | Category | Why excluded | Where it goes |
63
- |----------|-------------|---------------|
64
- | Decisions | Strategic choices with rationale | PROJECT.md Key Decisions, v{X.Y}-DECISIONS.md |
65
- | Deliverables | What was built | SUMMARY.md |
66
- | Status | Current project state | STATE.md |
67
- | Trivial fixes | Typos, missing imports, obvious errors | Nowhere (not worth persisting) |
68
- | One-time issues | Environment-specific, won't recur | Debug doc only |
69
-
70
- ## Extraction Sources
71
-
72
- | Source | Path pattern | What to extract |
73
- |--------|-------------|-----------------|
74
- | Debug resolutions | `.planning/debug/resolved/*.md` | `root_cause` + `resolution` + `prevention` from frontmatter |
75
- | Adhoc summaries | `.planning/adhoc/*-SUMMARY.md` | `learnings` array entries from frontmatter |
76
- | Phase summaries | `.planning/phases/*/SUMMARY.md` | Deviations/Issues sections, patterns-established |
77
- | Completed todos | `.planning/todos/done/*.md` | Reusable patterns only (lower priority) |
78
-
79
- ## Curation Rules
80
-
81
- - **4-8 entries per milestone** — ruthlessly curate, not exhaustive
82
- - **Group by subsystem** from `.planning/config.json` vocabulary
83
- - **Deduplicate** — if two sources surface the same pattern, keep the more prescriptive version
84
- - **Prefer prevention framing** — "Always validate X before Y" over "We found a bug in X"
85
- - **Skip trivial fixes** — missing imports, typos, obvious config errors add no value
86
- - **One line per entry** — if it needs a paragraph, it belongs in a debug doc or decision
87
-
88
- ## Entry Format
89
-
90
- ```
91
- - **{Brief title}**: {Prescriptive action} → `{source_ref}`
92
- ```
93
-
94
- - **Brief title**: 2-5 words identifying the pattern
95
- - **Prescriptive action**: Imperative sentence — what to do or avoid
96
- - **source_ref**: Path to the source artifact for full context
97
-
98
- ## Lifecycle
99
-
100
- - **Append-only** — new milestone sections prepend (reverse chronological)
101
- - **Not in STATE.md** — LEARNINGS.md is separate from session restoration
102
- - **Survives milestone boundaries** — unlike ROADMAP.md and REQUIREMENTS.md, never deleted
103
- - **Curated, not automated** — human-quality judgment applied during extraction
104
-
105
- </guidelines>
106
-
107
- <example>
108
-
109
- ```markdown
110
- # Project Learnings
111
-
112
- Curated patterns from milestone work. Referenced by `/ms:plan-phase` for context-aware planning.
113
-
114
- ---
115
-
116
- ## v1.1 Security
117
-
118
- ### auth
119
-
120
- - **Token refresh race condition**: Queue concurrent requests during 401 interceptor refresh — don't fire parallel refresh calls → `.planning/debug/resolved/auth-token-race.md`
121
- - **JWT expiry buffer**: Set token refresh threshold to 30s before expiry, not on-expiry — avoids edge-case 401s on slow connections → `.planning/adhoc/2026-01-20-fix-auth-token-SUMMARY.md`
122
-
123
- ### api
124
-
125
- - **Rate limit headers**: Always read X-RateLimit-Remaining before retry logic — blind retries trigger API bans → `.planning/debug/resolved/api-rate-limit-ban.md`
126
-
127
- ### database
128
-
129
- - **Migration rollback**: Test down-migrations before deploying up-migrations — broken rollbacks cause extended outages → `.planning/phases/06-hardening/06-02-SUMMARY.md`
130
-
131
- ---
132
-
133
- ## v1.0 MVP
134
-
135
- ### ui
136
-
137
- - **Form state on navigation**: Reset form state on route change — stale form data causes phantom validation errors → `.planning/debug/resolved/form-stale-state.md`
138
- - **Optimistic updates**: Always implement rollback UI for optimistic mutations — silent failures erode user trust → `.planning/phases/03-core/03-01-SUMMARY.md`
139
-
140
- ### data-layer
141
-
142
- - **N+1 in list views**: Use dataloader pattern for any list endpoint hitting related records — N+1 queries surface at ~50 records → `.planning/debug/resolved/dashboard-slow-load.md`
143
- - **Cache invalidation scope**: Invalidate by entity type + ID, not by endpoint — endpoint-scoped invalidation misses cross-view staleness → `.planning/phases/04-polish/04-01-SUMMARY.md`
144
-
145
- ---
146
-
147
- *Last updated: 2026-02-01 during v1.1 milestone completion*
148
- ```
149
-
150
- </example>