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.
- package/README.md +5 -6
- package/agents/ms-designer.md +5 -2
- package/agents/ms-mockup-designer.md +1 -1
- package/agents/ms-plan-writer.md +8 -1
- package/agents/ms-product-researcher.md +69 -0
- package/agents/ms-research-synthesizer.md +1 -1
- package/agents/ms-researcher.md +8 -8
- package/agents/ms-roadmapper.md +9 -13
- package/bin/install.js +68 -5
- package/commands/ms/add-phase.md +30 -18
- package/commands/ms/adhoc.md +1 -1
- package/commands/ms/audit-milestone.md +12 -12
- package/commands/ms/complete-milestone.md +25 -22
- package/commands/ms/config.md +202 -0
- package/commands/ms/design-phase.md +34 -29
- package/commands/ms/discuss-phase.md +26 -22
- package/commands/ms/doctor.md +22 -202
- package/commands/ms/execute-phase.md +18 -7
- package/commands/ms/help.md +46 -39
- package/commands/ms/insert-phase.md +29 -17
- package/commands/ms/new-milestone.md +42 -19
- package/commands/ms/new-project.md +88 -103
- package/commands/ms/plan-milestone-gaps.md +4 -5
- package/commands/ms/plan-phase.md +5 -3
- package/commands/ms/progress.md +2 -4
- package/commands/ms/research-phase.md +7 -12
- package/commands/ms/research-project.md +12 -12
- package/mindsystem/references/continuation-format.md +3 -3
- package/mindsystem/references/plan-format.md +11 -1
- package/mindsystem/references/principles.md +1 -1
- package/mindsystem/references/questioning.md +50 -8
- package/mindsystem/references/routing/audit-result-routing.md +12 -11
- package/mindsystem/references/routing/between-milestones-routing.md +2 -2
- package/mindsystem/references/routing/milestone-complete-routing.md +1 -1
- package/mindsystem/references/routing/next-phase-routing.md +4 -2
- package/mindsystem/templates/context.md +7 -6
- package/mindsystem/templates/milestone-archive.md +5 -5
- package/mindsystem/templates/milestone-context.md +1 -1
- package/mindsystem/templates/milestone.md +9 -9
- package/mindsystem/templates/project.md +70 -64
- package/mindsystem/templates/research-subagent-prompt.md +3 -3
- package/mindsystem/templates/roadmap-milestone.md +14 -14
- package/mindsystem/templates/roadmap.md +9 -7
- package/mindsystem/workflows/adhoc.md +1 -1
- package/mindsystem/workflows/complete-milestone.md +66 -107
- package/mindsystem/workflows/discuss-phase.md +137 -65
- package/mindsystem/workflows/doctor-fixes.md +273 -0
- package/mindsystem/workflows/execute-phase.md +7 -3
- package/mindsystem/workflows/execute-plan.md +6 -5
- package/mindsystem/workflows/map-codebase.md +2 -2
- package/mindsystem/workflows/mockup-generation.md +1 -1
- package/mindsystem/workflows/plan-phase.md +28 -3
- package/mindsystem/workflows/transition.md +20 -25
- package/mindsystem/workflows/verify-work.md +1 -1
- package/package.json +1 -1
- 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 +16 -0
- package/scripts/fixtures/scan-context/.planning/adhoc/20260220-fix-token-SUMMARY.md +12 -0
- package/scripts/fixtures/scan-context/.planning/config.json +3 -0
- package/scripts/fixtures/scan-context/.planning/debug/resolved/token-bug.md +11 -0
- package/scripts/fixtures/scan-context/.planning/knowledge/auth.md +11 -0
- package/scripts/fixtures/scan-context/.planning/phases/02-infra/02-1-SUMMARY.md +20 -0
- package/scripts/fixtures/scan-context/.planning/phases/04-setup/04-1-SUMMARY.md +21 -0
- package/scripts/fixtures/scan-context/.planning/phases/05-auth/05-1-SUMMARY.md +28 -0
- package/scripts/fixtures/scan-context/.planning/todos/done/setup-db.md +10 -0
- package/scripts/fixtures/scan-context/.planning/todos/pending/add-logout.md +10 -0
- package/scripts/fixtures/scan-context/expected-output.json +257 -0
- package/scripts/ms-tools.py +2139 -0
- package/scripts/test_ms_tools.py +836 -0
- package/commands/ms/list-phase-assumptions.md +0 -56
- package/mindsystem/workflows/list-phase-assumptions.md +0 -178
- package/scripts/__pycache__/compare_mockups.cpython-314.pyc +0 -0
- package/scripts/archive-milestone-files.sh +0 -68
- package/scripts/archive-milestone-phases.sh +0 -138
- package/scripts/doctor-scan.sh +0 -379
- package/scripts/gather-milestone-stats.sh +0 -179
- package/scripts/generate-adhoc-patch.sh +0 -79
- package/scripts/generate-phase-patch.sh +0 -169
- package/scripts/scan-artifact-subsystems.sh +0 -55
- package/scripts/scan-planning-context.py +0 -839
- package/scripts/update-state.sh +0 -59
- package/scripts/validate-execution-order.sh +0 -104
package/README.md
CHANGED
|
@@ -262,14 +262,14 @@ Replace `<N>` with the phase number you're working on.
|
|
|
262
262
|
**Run:**
|
|
263
263
|
|
|
264
264
|
```
|
|
265
|
-
/ms:audit-milestone
|
|
266
|
-
/ms:complete-milestone
|
|
267
|
-
/ms:new-milestone
|
|
265
|
+
/ms:audit-milestone
|
|
266
|
+
/ms:complete-milestone
|
|
267
|
+
/ms:new-milestone
|
|
268
268
|
```
|
|
269
269
|
|
|
270
270
|
**What you'll get:**
|
|
271
271
|
|
|
272
|
-
- `.planning/milestones/
|
|
272
|
+
- `.planning/milestones/mvp/` — archived milestone (ROADMAP, REQUIREMENTS, DECISIONS, research)
|
|
273
273
|
- Active docs stay lean; full detail lives in the version folder
|
|
274
274
|
|
|
275
275
|
**Tip:** Milestone review can be **report-only** (e.g., Flutter structural review) so you stay in control. Create a quality phase, or accept tech debt explicitly — your call.
|
|
@@ -338,11 +338,10 @@ Full docs live in `/ms:help` (same content as `commands/ms/help.md`).
|
|
|
338
338
|
| `/ms:map-codebase` | Document existing repo's stack, structure, and conventions |
|
|
339
339
|
| `/ms:research-project` | Do domain research and save findings to `.planning/research/` |
|
|
340
340
|
| `/ms:create-roadmap` | Define requirements and create phases mapped to them |
|
|
341
|
-
| `/ms:discuss-phase <number>` |
|
|
341
|
+
| `/ms:discuss-phase <number>` | Product-informed collaborative thinking before planning |
|
|
342
342
|
| `/ms:design-phase <number>` | Generate UI/UX spec for UI-heavy work |
|
|
343
343
|
| `/ms:review-design [scope]` | Audit and improve existing UI quality |
|
|
344
344
|
| `/ms:research-phase <number>` | Do deep research for niche phase domains |
|
|
345
|
-
| `/ms:list-phase-assumptions <number>` | Show what Mindsystem assumes before planning |
|
|
346
345
|
| `/ms:plan-phase [number] [--gaps]` | Create small, verifiable plans with optional risk-based verification |
|
|
347
346
|
| `/ms:check-phase <number>` | Sanity-check plans before execution |
|
|
348
347
|
| `/ms:execute-phase <phase-number>` | Run all unexecuted plans in fresh subagents |
|
package/agents/ms-designer.md
CHANGED
|
@@ -29,9 +29,12 @@ Your job: Transform user vision into concrete, implementable design specificatio
|
|
|
29
29
|
|
|
30
30
|
| Section | How You Use It |
|
|
31
31
|
|---------|----------------|
|
|
32
|
-
| `## What This Is` | Product
|
|
32
|
+
| `## What This Is` | Product identity — informs design conventions |
|
|
33
33
|
| `## Core Value` | The ONE thing design must serve |
|
|
34
|
-
| `##
|
|
34
|
+
| `## Who It's For` | Target audience — shapes UX complexity, language, navigation priorities |
|
|
35
|
+
| `## Core Problem` | Problem being solved — clarifies what UI must address first |
|
|
36
|
+
| `## How It's Different` | Competitive context — prevents generic design |
|
|
37
|
+
| `## Key User Flows` | Primary interactions — drives screen hierarchy and navigation |
|
|
35
38
|
| `## Constraints` | Technical limits, platform requirements |
|
|
36
39
|
|
|
37
40
|
**ROADMAP.md** — Phase-specific requirements
|
package/agents/ms-plan-writer.md
CHANGED
|
@@ -16,6 +16,7 @@ Your job: Transform task lists into PLAN.md files following the orchestrator's p
|
|
|
16
16
|
**What you receive:**
|
|
17
17
|
- Task list with needs/creates/tdd_candidate flags
|
|
18
18
|
- Proposed grouping from orchestrator (plan boundaries, wave assignments, budget estimates)
|
|
19
|
+
- Confirmed skills from user (skill names to embed in plan metadata)
|
|
19
20
|
- Phase context (number, name, goal, directory, requirements)
|
|
20
21
|
- Project references (paths to STATE, ROADMAP, CONTEXT, prior summaries)
|
|
21
22
|
- Relevant learnings from past work (debug resolutions, adhoc insights, established patterns, prior decisions, curated cross-milestone learnings)
|
|
@@ -89,6 +90,10 @@ The orchestrator provides structured XML:
|
|
|
89
90
|
</plan>
|
|
90
91
|
</proposed_grouping>
|
|
91
92
|
|
|
93
|
+
<confirmed_skills>
|
|
94
|
+
flutter-code-quality, flutter-code-simplification
|
|
95
|
+
</confirmed_skills>
|
|
96
|
+
|
|
92
97
|
<learnings>
|
|
93
98
|
<learning type="debug" source=".planning/debug/resolved/n-plus-one-queries.md">Missing eager loading on association chains — fix: Added includes() for all relationship traversals</learning>
|
|
94
99
|
<learning type="pattern" source=".planning/phases/02-foundation/02-01-SUMMARY.md">All API endpoints use Zod validation on input</learning>
|
|
@@ -227,7 +232,7 @@ For each plan, create `.planning/phases/{phase_dir}/{phase}-{plan}-PLAN.md`:
|
|
|
227
232
|
```markdown
|
|
228
233
|
# Plan {NN}: {Descriptive Title}
|
|
229
234
|
|
|
230
|
-
**Subsystem:** {subsystem_hint} | **Type:** tdd
|
|
235
|
+
**Subsystem:** {subsystem_hint} | **Type:** tdd | **Skills:** {skill_names}
|
|
231
236
|
|
|
232
237
|
## Context
|
|
233
238
|
{Why this work exists. Approach chosen and WHY.}
|
|
@@ -255,6 +260,8 @@ For each plan, create `.planning/phases/{phase_dir}/{phase}-{plan}-PLAN.md`:
|
|
|
255
260
|
|
|
256
261
|
**Format rules:**
|
|
257
262
|
- Omit `| **Type:** tdd` when type is execute (type defaults to execute)
|
|
263
|
+
- Omit `| **Skills:** ...` when no skills were confirmed (confirmed_skills is "none" or empty)
|
|
264
|
+
- Include `| **Skills:** skill-a, skill-b` when skills were confirmed — apply to ALL plans in the phase
|
|
258
265
|
- Plans carry no `<execution_context>`, `<context>`, or @-references — the executor loads its own workflow and project files via its agent definition
|
|
259
266
|
- No `<tasks>`, `<verification>`, `<success_criteria>`, `<output>` XML containers
|
|
260
267
|
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ms-product-researcher
|
|
3
|
+
description: Researches competitor products, UX patterns, and industry best practices for phase-level product decisions. Spawned by /ms:discuss-phase.
|
|
4
|
+
model: sonnet
|
|
5
|
+
tools: WebSearch, WebFetch
|
|
6
|
+
color: cyan
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<input>
|
|
10
|
+
You receive: `<product_context>` (Who It's For, Core Value, How It's Different), `<phase_requirements>` (phase goal + mapped requirements), `<research_focus>` (specific product questions to investigate).
|
|
11
|
+
</input>
|
|
12
|
+
|
|
13
|
+
<role>
|
|
14
|
+
You are a Mindsystem product researcher. Deliver prescriptive, audience-grounded product intelligence — "Users expect X" beats "Consider whether X."
|
|
15
|
+
|
|
16
|
+
**Prescriptive, not exploratory.** "Users expect inline editing for this type of content" beats "You could consider inline editing or modal editing or page-based editing." Make a recommendation, explain why, let the user override.
|
|
17
|
+
|
|
18
|
+
**Audience-grounded.** Every recommendation ties back to the target audience from `<product_context>`. "Enterprise users expect X" is different from "Consumer app users expect Y." Never give generic advice.
|
|
19
|
+
|
|
20
|
+
**Competitor-aware, not competitor-driven.** Know what exists. Recommend what fits THIS product's positioning. "Competitors do X, but given your differentiation of Y, consider Z" is the ideal output shape.
|
|
21
|
+
|
|
22
|
+
**Concise and structured.** Target 2000-3000 tokens max. The orchestrator weaves your findings into a briefing — dense signal beats comprehensive coverage.
|
|
23
|
+
</role>
|
|
24
|
+
|
|
25
|
+
<tool_strategy>
|
|
26
|
+
|
|
27
|
+
| Need | Tool | Why |
|
|
28
|
+
|------|------|-----|
|
|
29
|
+
| Competitor features | WebSearch | Discover what exists |
|
|
30
|
+
| UX pattern details | WebFetch | Read specific articles/docs |
|
|
31
|
+
| Industry best practices | WebSearch | Current standards |
|
|
32
|
+
| Product comparisons | WebSearch | Side-by-side analysis |
|
|
33
|
+
|
|
34
|
+
**Include current year** in search queries for freshness.
|
|
35
|
+
|
|
36
|
+
**Budget:** 5-8 searches max. Prioritize breadth over depth — the user needs a landscape, not a dissertation.
|
|
37
|
+
</tool_strategy>
|
|
38
|
+
|
|
39
|
+
<output>
|
|
40
|
+
Return structured text (do NOT write files). Use this format:
|
|
41
|
+
|
|
42
|
+
```markdown
|
|
43
|
+
## PRODUCT RESEARCH COMPLETE
|
|
44
|
+
|
|
45
|
+
### Competitor Landscape
|
|
46
|
+
[How 3-5 relevant competitors handle this. Specific features, not vague descriptions.]
|
|
47
|
+
|
|
48
|
+
### UX Patterns Users Expect
|
|
49
|
+
[Industry conventions for this type of feature. What feels "right" to the target audience.]
|
|
50
|
+
|
|
51
|
+
### Audience Expectations
|
|
52
|
+
[What the target audience specifically expects, grounded in Who It's For from `<product_context>`.]
|
|
53
|
+
|
|
54
|
+
### Key Tradeoffs
|
|
55
|
+
[2-3 decision points with pros/cons and recommendation for each.]
|
|
56
|
+
|
|
57
|
+
### Recommendations
|
|
58
|
+
[Prescriptive recommendations tied to this product's positioning. "Do X because Y."]
|
|
59
|
+
```
|
|
60
|
+
</output>
|
|
61
|
+
|
|
62
|
+
<success_criteria>
|
|
63
|
+
- Findings grounded in target audience, not generic
|
|
64
|
+
- Competitor analysis names specific products and features
|
|
65
|
+
- Recommendations are prescriptive with reasoning
|
|
66
|
+
- Total output 2000-3000 tokens
|
|
67
|
+
- No technical implementation details
|
|
68
|
+
- Every recommendation connects to product positioning
|
|
69
|
+
</success_criteria>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ms-research-synthesizer
|
|
3
3
|
description: Synthesizes research outputs from parallel researcher agents into SUMMARY.md. Spawned by /ms:research-project after 4 researcher agents complete.
|
|
4
|
-
model:
|
|
4
|
+
model: sonnet
|
|
5
5
|
tools: Read, Write, Bash
|
|
6
6
|
color: purple
|
|
7
7
|
---
|
package/agents/ms-researcher.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ms-researcher
|
|
3
3
|
description: Conducts comprehensive research using systematic methodology, source verification, and structured output. Spawned by /ms:research-phase and /ms:research-project orchestrators.
|
|
4
|
-
model:
|
|
4
|
+
model: opus
|
|
5
5
|
tools: Read, Write, Bash, Grep, Glob, WebSearch, WebFetch
|
|
6
6
|
color: cyan
|
|
7
7
|
---
|
|
@@ -195,18 +195,18 @@ When researching "best library for X":
|
|
|
195
195
|
|
|
196
196
|
## ms-lookup CLI
|
|
197
197
|
|
|
198
|
-
The CLI is
|
|
198
|
+
The CLI is available as `ms-lookup`.
|
|
199
199
|
|
|
200
200
|
### Library Documentation
|
|
201
201
|
|
|
202
202
|
```bash
|
|
203
|
-
|
|
203
|
+
ms-lookup docs <library> "<query>"
|
|
204
204
|
```
|
|
205
205
|
|
|
206
206
|
Example:
|
|
207
207
|
```bash
|
|
208
|
-
|
|
209
|
-
|
|
208
|
+
ms-lookup docs nextjs "app router file conventions"
|
|
209
|
+
ms-lookup docs "react-three-fiber" "physics setup"
|
|
210
210
|
```
|
|
211
211
|
|
|
212
212
|
**When to use:** Library APIs, framework features, configuration options, version-specific behavior. This is your PRIMARY source for library-specific questions — most authoritative.
|
|
@@ -216,13 +216,13 @@ Example:
|
|
|
216
216
|
### Deep Research
|
|
217
217
|
|
|
218
218
|
```bash
|
|
219
|
-
|
|
219
|
+
ms-lookup deep "<query>"
|
|
220
220
|
```
|
|
221
221
|
|
|
222
222
|
Example:
|
|
223
223
|
```bash
|
|
224
|
-
|
|
225
|
-
|
|
224
|
+
ms-lookup deep "authentication patterns for SaaS applications"
|
|
225
|
+
ms-lookup deep "WebGPU browser support and production readiness 2026"
|
|
226
226
|
```
|
|
227
227
|
|
|
228
228
|
**When to use:** Architecture decisions, technology comparisons, comprehensive ecosystem surveys, best practices synthesis. Use for HIGH-VALUE research questions — this costs money.
|
package/agents/ms-roadmapper.md
CHANGED
|
@@ -222,20 +222,16 @@ All use binary Likely/Unlikely with parenthetical reason. These are hints to use
|
|
|
222
222
|
|
|
223
223
|
### Discussion Indicators
|
|
224
224
|
|
|
225
|
-
**Problem it solves:**
|
|
225
|
+
**Problem it solves:** Claude plans based on assumptions about user intent. Discussion surfaces those assumptions before they become embedded in plans.
|
|
226
226
|
|
|
227
|
-
**Likely
|
|
228
|
-
- Phase goal mentions "user can [verb]" without specifying HOW
|
|
229
|
-
- Success criteria have multiple valid interpretations
|
|
230
|
-
- Phase involves UX decisions (not just backend)
|
|
231
|
-
- Requirements mention experiential qualities ("should feel", "intuitive")
|
|
232
|
-
- Novel feature not based on existing patterns
|
|
227
|
+
**Default: Likely.** Every phase benefits from surfacing Claude's assumptions before planning. Discussion now provides deep artifact loading, assumptions surfacing, and product-informed questions — valuable even for seemingly "clear" phases.
|
|
233
228
|
|
|
234
|
-
**
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
-
|
|
238
|
-
-
|
|
229
|
+
**When Likely**, the rationale enumerates 2-4 phase-specific assumptions or open questions (not generic labels like "ambiguous user flow"). Example: "Likely (assumes password reset uses email not SMS, unclear if social login needed, session duration unspecified)"
|
|
230
|
+
|
|
231
|
+
**Unlikely only when ALL of:**
|
|
232
|
+
- Fully mechanical (zero design decisions)
|
|
233
|
+
- Zero ambiguity in scope or approach
|
|
234
|
+
- Examples: version bump, rename-only refactor, config-only change, pure deletion/cleanup
|
|
239
235
|
|
|
240
236
|
### Design Indicators
|
|
241
237
|
|
|
@@ -273,7 +269,7 @@ All use binary Likely/Unlikely with parenthetical reason. These are hints to use
|
|
|
273
269
|
For each phase in ROADMAP.md:
|
|
274
270
|
|
|
275
271
|
```markdown
|
|
276
|
-
**Discuss**: Likely (
|
|
272
|
+
**Discuss**: Likely (assumes X, unclear if Y, Z unspecified) | Unlikely (mechanical change, zero decisions)
|
|
277
273
|
**Discuss topics**: [What to clarify] (only if Likely)
|
|
278
274
|
**Design**: Likely (significant new UI) | Unlikely (backend only)
|
|
279
275
|
**Design focus**: [What to design] (only if Likely)
|
package/bin/install.js
CHANGED
|
@@ -404,6 +404,65 @@ function cleanupOrphanedFiles(claudeDir, filesToRemove) {
|
|
|
404
404
|
}
|
|
405
405
|
}
|
|
406
406
|
|
|
407
|
+
/**
|
|
408
|
+
* Generate CLI wrapper scripts and configure PATH hook
|
|
409
|
+
*/
|
|
410
|
+
function generateWrappers(claudeDir) {
|
|
411
|
+
const binDir = path.join(claudeDir, 'bin');
|
|
412
|
+
fs.mkdirSync(binDir, { recursive: true });
|
|
413
|
+
|
|
414
|
+
const wrappers = {
|
|
415
|
+
'ms-tools': '#!/usr/bin/env bash\nexec uv run "$(dirname "$0")/../mindsystem/scripts/ms-tools.py" "$@"\n',
|
|
416
|
+
'ms-lookup': '#!/usr/bin/env bash\nexec "$(dirname "$0")/../mindsystem/scripts/ms-lookup-wrapper.sh" "$@"\n',
|
|
417
|
+
'ms-compare-mockups': '#!/usr/bin/env bash\nexec uv run "$(dirname "$0")/../mindsystem/scripts/compare_mockups.py" "$@"\n',
|
|
418
|
+
};
|
|
419
|
+
|
|
420
|
+
for (const [name, content] of Object.entries(wrappers)) {
|
|
421
|
+
fs.writeFileSync(path.join(binDir, name), content);
|
|
422
|
+
fs.chmodSync(path.join(binDir, name), '755');
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
console.log(` ${green}✓${reset} Generated CLI wrappers (${Object.keys(wrappers).join(', ')})`);
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
function ensurePathHook(claudeDir, isGlobal, configDir) {
|
|
429
|
+
const settingsPath = path.join(claudeDir, 'settings.json');
|
|
430
|
+
let settings = {};
|
|
431
|
+
if (fs.existsSync(settingsPath)) {
|
|
432
|
+
settings = JSON.parse(fs.readFileSync(settingsPath, 'utf8'));
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
if (!settings.hooks) settings.hooks = {};
|
|
436
|
+
if (!Array.isArray(settings.hooks.SessionStart))
|
|
437
|
+
settings.hooks.SessionStart = [];
|
|
438
|
+
|
|
439
|
+
// Idempotent — skip if already present
|
|
440
|
+
const marker = 'mindsystem/bin';
|
|
441
|
+
if (settings.hooks.SessionStart.some(e => JSON.stringify(e).includes(marker)))
|
|
442
|
+
return;
|
|
443
|
+
|
|
444
|
+
// Build PATH expression
|
|
445
|
+
let binExpr;
|
|
446
|
+
if (isGlobal) {
|
|
447
|
+
binExpr = configDir
|
|
448
|
+
? `${claudeDir}/bin`
|
|
449
|
+
: '$HOME/.claude/bin';
|
|
450
|
+
} else {
|
|
451
|
+
binExpr = '$CLAUDE_PROJECT_DIR/.claude/bin';
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
settings.hooks.SessionStart.push({
|
|
455
|
+
matcher: '',
|
|
456
|
+
hooks: [{
|
|
457
|
+
type: 'command',
|
|
458
|
+
command: `echo 'export PATH="${binExpr}:$PATH"' >> "$CLAUDE_ENV_FILE"`
|
|
459
|
+
}]
|
|
460
|
+
});
|
|
461
|
+
|
|
462
|
+
fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2));
|
|
463
|
+
console.log(` ${green}✓${reset} Configured PATH hook`);
|
|
464
|
+
}
|
|
465
|
+
|
|
407
466
|
/**
|
|
408
467
|
* Recursively copy directory, replacing paths in .md files
|
|
409
468
|
*/
|
|
@@ -466,8 +525,8 @@ function installFile(srcPath, destPath, pathPrefix) {
|
|
|
466
525
|
fs.copyFileSync(srcPath, destPath);
|
|
467
526
|
}
|
|
468
527
|
|
|
469
|
-
// Make
|
|
470
|
-
if (srcPath.endsWith('.sh')) {
|
|
528
|
+
// Make scripts executable
|
|
529
|
+
if (srcPath.endsWith('.sh') || srcPath.endsWith('.py')) {
|
|
471
530
|
fs.chmodSync(destPath, '755');
|
|
472
531
|
}
|
|
473
532
|
}
|
|
@@ -563,7 +622,11 @@ async function install(isGlobal) {
|
|
|
563
622
|
fs.writeFileSync(versionDest, pkg.version);
|
|
564
623
|
console.log(` ${green}✓${reset} Wrote VERSION (${pkg.version})`);
|
|
565
624
|
|
|
566
|
-
// Phase 7:
|
|
625
|
+
// Phase 7: Generate CLI wrappers and PATH hook
|
|
626
|
+
generateWrappers(claudeDir);
|
|
627
|
+
ensurePathHook(claudeDir, isGlobal, configDir);
|
|
628
|
+
|
|
629
|
+
// Phase 8: Check Python for ms-lookup
|
|
567
630
|
const msLookupPath = path.join(claudeDir, 'mindsystem', 'scripts', 'ms-lookup');
|
|
568
631
|
if (fs.existsSync(msLookupPath)) {
|
|
569
632
|
try {
|
|
@@ -583,13 +646,13 @@ async function install(isGlobal) {
|
|
|
583
646
|
}
|
|
584
647
|
}
|
|
585
648
|
|
|
586
|
-
// Phase
|
|
649
|
+
// Phase 9: Cleanup orphaned files
|
|
587
650
|
if (orphans.length > 0) {
|
|
588
651
|
console.log('');
|
|
589
652
|
cleanupOrphanedFiles(claudeDir, orphans);
|
|
590
653
|
}
|
|
591
654
|
|
|
592
|
-
// Phase
|
|
655
|
+
// Phase 10: Write new manifest
|
|
593
656
|
const newManifest = {
|
|
594
657
|
version: pkg.version,
|
|
595
658
|
installedAt: new Date().toISOString(),
|
package/commands/ms/add-phase.md
CHANGED
|
@@ -66,7 +66,7 @@ Parse the roadmap to find the current milestone section:
|
|
|
66
66
|
Example structure:
|
|
67
67
|
|
|
68
68
|
```
|
|
69
|
-
## Current Milestone:
|
|
69
|
+
## Current Milestone: Foundation
|
|
70
70
|
|
|
71
71
|
### Phase 4: Focused Command System
|
|
72
72
|
### Phase 5: Path Routing & Validation
|
|
@@ -118,13 +118,36 @@ Confirm: "Created directory: $phase_dir"
|
|
|
118
118
|
Add the new phase entry to the roadmap:
|
|
119
119
|
|
|
120
120
|
1. Find the insertion point (after last phase in current milestone, before "---" separator)
|
|
121
|
-
|
|
121
|
+
|
|
122
|
+
2. Before writing the phase entry, analyze the description to determine pre-work flags:
|
|
123
|
+
|
|
124
|
+
**Discuss**: Default Likely — enumerate 2-4 assumptions or open questions specific
|
|
125
|
+
to the phase. Unlikely only for fully mechanical zero-decision work (version bump,
|
|
126
|
+
rename-only refactor, config-only change, pure deletion/cleanup).
|
|
127
|
+
|
|
128
|
+
**Design**: Likely when description involves UI work, visual elements, forms,
|
|
129
|
+
dashboards, or multi-screen flows. Unlikely for backend-only, API, infrastructure,
|
|
130
|
+
or established UI patterns.
|
|
131
|
+
|
|
132
|
+
**Research**: Likely when description mentions external APIs/services, new
|
|
133
|
+
libraries/frameworks, or unclear technical approach. Unlikely for established
|
|
134
|
+
internal patterns or well-documented conventions.
|
|
135
|
+
|
|
136
|
+
Use binary Likely/Unlikely with parenthetical reason. Include topics/focus only when Likely.
|
|
137
|
+
|
|
138
|
+
3. Insert new phase heading with pre-work flags:
|
|
122
139
|
|
|
123
140
|
```
|
|
124
141
|
### Phase {N}: {Description}
|
|
125
142
|
|
|
126
143
|
**Goal:** [To be planned]
|
|
127
144
|
**Depends on:** Phase {N-1}
|
|
145
|
+
**Discuss**: {Likely (reason) | Unlikely (reason)}
|
|
146
|
+
**Discuss topics**: {topics} ← only if Likely
|
|
147
|
+
**Design**: {Likely (reason) | Unlikely (reason)}
|
|
148
|
+
**Design focus**: {focus} ← only if Likely
|
|
149
|
+
**Research**: {Likely (reason) | Unlikely (reason)}
|
|
150
|
+
**Research topics**: {topics} ← only if Likely
|
|
128
151
|
**Plans:** 0 plans
|
|
129
152
|
|
|
130
153
|
Plans:
|
|
@@ -134,7 +157,7 @@ Add the new phase entry to the roadmap:
|
|
|
134
157
|
[To be added during planning]
|
|
135
158
|
```
|
|
136
159
|
|
|
137
|
-
|
|
160
|
+
4. Write updated roadmap back to file
|
|
138
161
|
|
|
139
162
|
Preserve all other content exactly (formatting, spacing, other phases).
|
|
140
163
|
</step>
|
|
@@ -164,24 +187,13 @@ Phase {N} added to current milestone:
|
|
|
164
187
|
Roadmap updated: {roadmap-path}
|
|
165
188
|
Project state updated: .planning/STATE.md
|
|
166
189
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
## ▶ Next Up
|
|
170
|
-
|
|
171
|
-
**Phase {N}: {description}**
|
|
172
|
-
|
|
173
|
-
`/ms:plan-phase {N}`
|
|
174
|
-
|
|
175
|
-
<sub>`/clear` first → fresh context window</sub>
|
|
190
|
+
```
|
|
176
191
|
|
|
177
|
-
|
|
192
|
+
Read `~/.claude/mindsystem/references/routing/next-phase-routing.md` and follow its instructions
|
|
193
|
+
to present "Next Up" with pre-work context for Phase {N}.
|
|
178
194
|
|
|
179
|
-
|
|
195
|
+
After the "Next Up" section, add:
|
|
180
196
|
- `/ms:add-phase <description>` — add another phase
|
|
181
|
-
- Review roadmap
|
|
182
|
-
|
|
183
|
-
---
|
|
184
|
-
```
|
|
185
197
|
</step>
|
|
186
198
|
|
|
187
199
|
<step name="update_last_command">
|
package/commands/ms/adhoc.md
CHANGED
|
@@ -71,7 +71,7 @@ Single git commit with all changes (code + code review changes + PLAN.md + SUMMA
|
|
|
71
71
|
|
|
72
72
|
<step name="generate_patch">
|
|
73
73
|
Generate patch file from adhoc commit.
|
|
74
|
-
Run generate-adhoc-patch
|
|
74
|
+
Run `ms-tools generate-adhoc-patch` with commit hash and output path.
|
|
75
75
|
</step>
|
|
76
76
|
|
|
77
77
|
<step name="completion">
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ms:audit-milestone
|
|
3
3
|
description: Audit milestone completion against original intent before archiving
|
|
4
|
-
argument-hint: "[
|
|
4
|
+
argument-hint: "[name]"
|
|
5
5
|
allowed-tools:
|
|
6
6
|
- Read
|
|
7
7
|
- Glob
|
|
@@ -22,7 +22,7 @@ Verify milestone achieved its definition of done. Check requirements coverage, c
|
|
|
22
22
|
</execution_context>
|
|
23
23
|
|
|
24
24
|
<context>
|
|
25
|
-
|
|
25
|
+
Milestone: $ARGUMENTS (optional — defaults to current milestone from PROJECT.md)
|
|
26
26
|
|
|
27
27
|
**Original Intent:**
|
|
28
28
|
@.planning/PROJECT.md
|
|
@@ -130,13 +130,13 @@ For each requirement in REQUIREMENTS.md mapped to this milestone:
|
|
|
130
130
|
- Check phase verification status
|
|
131
131
|
- Determine: satisfied | partial | unsatisfied
|
|
132
132
|
|
|
133
|
-
## 6. Aggregate into
|
|
133
|
+
## 6. Aggregate into MILESTONE-AUDIT.md
|
|
134
134
|
|
|
135
|
-
Create `.planning/
|
|
135
|
+
Create `.planning/MILESTONE-AUDIT.md` with:
|
|
136
136
|
|
|
137
137
|
```yaml
|
|
138
138
|
---
|
|
139
|
-
milestone: {
|
|
139
|
+
milestone: {name}
|
|
140
140
|
audited: {timestamp}
|
|
141
141
|
status: passed | gaps_found | tech_debt
|
|
142
142
|
scores:
|
|
@@ -231,7 +231,7 @@ For agents with `mode: analyze-only` (e.g., `ms-flutter-reviewer`):
|
|
|
231
231
|
Task(
|
|
232
232
|
prompt="
|
|
233
233
|
<objective>
|
|
234
|
-
Analyze code from milestone {
|
|
234
|
+
Analyze code from milestone {name} for structural issues.
|
|
235
235
|
Report findings only — do NOT make changes.
|
|
236
236
|
</objective>
|
|
237
237
|
|
|
@@ -341,7 +341,7 @@ Findings are already tracked in `.planning/TECH-DEBT.md` via Step 8.5. Continue
|
|
|
341
341
|
|
|
342
342
|
### Path B: Simplifier Agents (default)
|
|
343
343
|
|
|
344
|
-
For agents without `mode: analyze-only` (e.g., `ms-code-simplifier`, `ms-flutter-
|
|
344
|
+
For agents without `mode: analyze-only` (e.g., `ms-code-simplifier`, `ms-flutter-code-quality`):
|
|
345
345
|
|
|
346
346
|
**B1. Spawn code review agent:**
|
|
347
347
|
|
|
@@ -349,7 +349,7 @@ For agents without `mode: analyze-only` (e.g., `ms-code-simplifier`, `ms-flutter
|
|
|
349
349
|
Task(
|
|
350
350
|
prompt="
|
|
351
351
|
<objective>
|
|
352
|
-
Review code from milestone {
|
|
352
|
+
Review code from milestone {name}.
|
|
353
353
|
Focus on architectural patterns, cross-phase consistency, and structural improvements.
|
|
354
354
|
Preserve all functionality. Make changes that improve clarity and maintainability.
|
|
355
355
|
</objective>
|
|
@@ -402,9 +402,9 @@ After code review (all sources now available), generate or update `.planning/TEC
|
|
|
402
402
|
## 9. Commit Audit Report
|
|
403
403
|
|
|
404
404
|
```bash
|
|
405
|
-
git add .planning/
|
|
405
|
+
git add .planning/MILESTONE-AUDIT.md .planning/TECH-DEBT.md
|
|
406
406
|
git commit -m "$(cat <<'EOF'
|
|
407
|
-
docs(milestone): complete
|
|
407
|
+
docs(milestone): complete {name} audit
|
|
408
408
|
|
|
409
409
|
Status: {status}
|
|
410
410
|
Scores: Requirements {N}/{M} | Phases {N}/{M} | Integration {N}/{M} | Flows {N}/{M}
|
|
@@ -425,11 +425,11 @@ Read `~/.claude/mindsystem/references/routing/audit-result-routing.md` and follo
|
|
|
425
425
|
- [ ] Tech debt collected into .planning/TECH-DEBT.md (de-duplicated, TD-{N} IDs assigned)
|
|
426
426
|
- [ ] Assumptions aggregated by phase
|
|
427
427
|
- [ ] Integration checker spawned for cross-phase wiring
|
|
428
|
-
- [ ]
|
|
428
|
+
- [ ] MILESTONE-AUDIT.md created with assumptions section
|
|
429
429
|
- [ ] Code review completed (or skipped if config says "skip")
|
|
430
430
|
- [ ] If analyze-only reviewer: YAML findings parsed and added to report
|
|
431
431
|
- [ ] If analyze-only reviewer: Binary decision presented (quality phase vs tech debt)
|
|
432
432
|
- [ ] If quality phase chosen: Phase directory created, ROADMAP updated with TECH-DEBT.md scope
|
|
433
|
-
- [ ] MILESTONE-AUDIT.md committed to git
|
|
433
|
+
- [ ] MILESTONE-AUDIT.md and TECH-DEBT.md committed to git
|
|
434
434
|
- [ ] Results presented with actionable next steps
|
|
435
435
|
</success_criteria>
|