mindsystem-cc 4.1.0 → 4.1.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.
- package/README.md +52 -22
- package/bin/install.js +2 -2
- package/commands/ms/create-roadmap.md +2 -18
- package/commands/ms/help.md +43 -29
- package/commands/ms/map-codebase.md +1 -1
- package/commands/ms/new-milestone.md +2 -2
- package/commands/ms/new-project.md +6 -2
- package/mindsystem/workflows/doctor-fixes.md +60 -9
- package/mindsystem/workflows/map-codebase.md +27 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
# MINDSYSTEM
|
|
4
4
|
|
|
5
|
-
**
|
|
5
|
+
**The engineer's meta-prompting system for Claude Code.**
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Amplifies every step of the development workflow you already follow — discovery, research, design, planning, execution, verification. Each one refined, parallelized, and compounded into persistent knowledge. Built for engineers who want to multiply their output without giving up control.
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
npx mindsystem-cc
|
|
@@ -19,12 +19,32 @@ npx mindsystem-cc
|
|
|
19
19
|
|
|
20
20
|
<br>
|
|
21
21
|
|
|
22
|
-
[How it works](#how-it-works) · [Walkthrough](#end-to-end-walkthrough) · [Features](#features) · [Quick start](#quick-start) · [.planning](#the-planning-directory) · [Config](#configuration) · [Commands](#command-reference) · [Troubleshooting](#troubleshooting)
|
|
22
|
+
[Why Mindsystem](#why-mindsystem) · [How it works](#how-it-works) · [Walkthrough](#end-to-end-walkthrough) · [Features](#features) · [Quick start](#quick-start) · [.planning](#the-planning-directory) · [Config](#configuration) · [Commands](#command-reference) · [Troubleshooting](#troubleshooting)
|
|
23
23
|
|
|
24
24
|
</div>
|
|
25
25
|
|
|
26
26
|
---
|
|
27
27
|
|
|
28
|
+
## Why Mindsystem
|
|
29
|
+
|
|
30
|
+
Fully autonomous coding tools take a spec and run for hours until a product emerges. That works for prototypes and one-shot projects.
|
|
31
|
+
|
|
32
|
+
Mindsystem takes the opposite approach. It follows the same workflow a thorough engineer already uses — and amplifies each step:
|
|
33
|
+
|
|
34
|
+
| What you'd do manually | What Mindsystem does |
|
|
35
|
+
|---|---|
|
|
36
|
+
| Talk through requirements, catch misalignment early | **Discuss phase** surfaces assumptions with confidence levels, forces tradeoff decisions before any code gets written |
|
|
37
|
+
| Google libraries, read a few docs | **Research phase** runs 3 parallel agents across documentation, your codebase, and community practices — 10x more sources, synthesized in minutes |
|
|
38
|
+
| Try design directions, pick the best one | **Design phase** generates parallel HTML/CSS mockups with side-by-side comparison and exact design tokens |
|
|
39
|
+
| Plan from what you remember about the codebase | **Plan phase** loads knowledge files capturing every decision, pattern, and pitfall from prior phases |
|
|
40
|
+
| Figure out what states to test, mock them manually | **Verify work** determines mock states automatically — you validate visually or programmatically |
|
|
41
|
+
|
|
42
|
+
The workflow stays yours. Each step finishes in minutes instead of hours. Everything learned compounds into knowledge that survives context resets — phase 10 starts with everything the project learned from phases 1–9.
|
|
43
|
+
|
|
44
|
+
This is not an autopilot. It's a force multiplier.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
28
48
|
## How it works
|
|
29
49
|
|
|
30
50
|
```
|
|
@@ -75,6 +95,12 @@ Execution happens in fresh subagent contexts, so each plan gets up to 200k token
|
|
|
75
95
|
|
|
76
96
|
## End-to-end walkthrough
|
|
77
97
|
|
|
98
|
+
### Project setup
|
|
99
|
+
|
|
100
|
+
Before building features, initialize the project once with `/ms:new-project`. For existing codebases, also run `/ms:map-codebase` (analyzes your stack, conventions, and architecture into 7 structured documents) and `/ms:doctor` (validates config and generates per-subsystem knowledge files from source code). See [Quick start](#quick-start) for the exact sequences.
|
|
101
|
+
|
|
102
|
+
Everything below is the feature-building loop, identical for new and existing projects.
|
|
103
|
+
|
|
78
104
|
### 1. New milestone
|
|
79
105
|
|
|
80
106
|
```
|
|
@@ -274,31 +300,37 @@ Requirements you want but haven't shipped yet are tracked in `PROJECT.md` with o
|
|
|
274
300
|
|
|
275
301
|
## Quick start
|
|
276
302
|
|
|
277
|
-
###
|
|
303
|
+
### Project setup (one-time)
|
|
304
|
+
|
|
305
|
+
**New project:**
|
|
278
306
|
|
|
279
307
|
```
|
|
280
308
|
/ms:new-project
|
|
281
|
-
/ms:new-milestone
|
|
282
|
-
/ms:create-roadmap
|
|
283
|
-
/ms:plan-phase 1
|
|
284
|
-
/ms:execute-phase 1
|
|
285
|
-
/ms:verify-work 1
|
|
286
309
|
```
|
|
287
310
|
|
|
288
|
-
|
|
311
|
+
**Existing codebase:**
|
|
312
|
+
|
|
313
|
+
```
|
|
314
|
+
/ms:new-project # Business context and vision
|
|
315
|
+
/ms:map-codebase # Analyze code → 7 structured documents
|
|
316
|
+
/ms:doctor # Validate config, generate knowledge files
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
Optional: `/ms:config` — configure code reviewers, gitignore, and other preferences.
|
|
289
320
|
|
|
290
|
-
###
|
|
321
|
+
### Building features
|
|
322
|
+
|
|
323
|
+
Once the project is set up, the workflow is the same for new and existing codebases:
|
|
291
324
|
|
|
292
325
|
```
|
|
293
|
-
/ms:new-
|
|
294
|
-
/ms:map
|
|
295
|
-
/ms:
|
|
296
|
-
/ms:
|
|
297
|
-
/ms:
|
|
298
|
-
/ms:execute-phase 1
|
|
326
|
+
/ms:new-milestone # Discover what to build next
|
|
327
|
+
/ms:create-roadmap # Define requirements, map to phases
|
|
328
|
+
/ms:plan-phase 1 # Create detailed plan
|
|
329
|
+
/ms:execute-phase 1 # Run in fresh subagents
|
|
330
|
+
/ms:verify-work 1 # Manual acceptance testing
|
|
299
331
|
```
|
|
300
332
|
|
|
301
|
-
|
|
333
|
+
Repeat for each milestone. All downstream planning automatically loads codebase docs and knowledge files.
|
|
302
334
|
|
|
303
335
|
**Returning after a break?** Run `/ms:progress` to see where you left off and what to do next.
|
|
304
336
|
|
|
@@ -315,6 +347,7 @@ Every artifact Mindsystem generates lives in `.planning/` — a markdown knowled
|
|
|
315
347
|
│
|
|
316
348
|
├── STATE.md # Active phase, blockers, recent decisions
|
|
317
349
|
├── MILESTONE-CONTEXT.md # new-milestone → brainstorm that grounds the roadmap
|
|
350
|
+
├── MILESTONE-RESEARCH.md # research-milestone → domain research before roadmapping
|
|
318
351
|
├── ROADMAP.md # Phase breakdown with goals and success criteria
|
|
319
352
|
├── REQUIREMENTS.md # Checkable REQ-IDs mapped to phases
|
|
320
353
|
│
|
|
@@ -359,9 +392,6 @@ Every artifact Mindsystem generates lives in `.planning/` — a markdown knowled
|
|
|
359
392
|
│ ├── CONTEXT.md # discussed, not yet planned
|
|
360
393
|
│ └── 02-01-PLAN.md # planned, not yet executed
|
|
361
394
|
│
|
|
362
|
-
├── MILESTONE-RESEARCH.md # /ms:research-milestone → domain ecosystem
|
|
363
|
-
│ # Technology, product landscape, architecture, risks
|
|
364
|
-
│
|
|
365
395
|
├── adhoc/ # /ms:adhoc → out-of-pipeline work
|
|
366
396
|
│ └── 2026-01-15-fix-token/
|
|
367
397
|
│ ├── adhoc-01-SUMMARY.md # Execution results and learnings
|
|
@@ -523,4 +553,4 @@ MIT License. See [LICENSE](LICENSE) for details.
|
|
|
523
553
|
|
|
524
554
|
---
|
|
525
555
|
|
|
526
|
-
|
|
556
|
+
Originally rooted in [GSD](https://github.com/gsd-build/get-shit-done), now an independent system with its own philosophy. Knowledge compounding inspired by [Compound Engineering](https://github.com/EveryInc/compound-engineering-plugin).
|
package/bin/install.js
CHANGED
|
@@ -471,8 +471,8 @@ function ensurePathHook(claudeDir, isGlobal, configDir) {
|
|
|
471
471
|
});
|
|
472
472
|
|
|
473
473
|
fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2));
|
|
474
|
-
if (removed >
|
|
475
|
-
console.log(` ${green}✓${reset} Configured PATH hook (cleaned ${removed} duplicate(s))`);
|
|
474
|
+
if (removed > 1) {
|
|
475
|
+
console.log(` ${green}✓${reset} Configured PATH hook (cleaned ${removed - 1} duplicate(s))`);
|
|
476
476
|
} else {
|
|
477
477
|
console.log(` ${green}✓${reset} Configured PATH hook`);
|
|
478
478
|
}
|
|
@@ -300,25 +300,9 @@ Requirements and roadmap created:
|
|
|
300
300
|
- Roadmap: .planning/ROADMAP.md
|
|
301
301
|
- State: .planning/STATE.md
|
|
302
302
|
- [X] v1 requirements, [M] phases defined
|
|
303
|
-
|
|
304
|
-
---
|
|
305
|
-
|
|
306
|
-
## ▶ Next Up
|
|
307
|
-
|
|
308
|
-
**Phase 1: [Name]** — [Goal from ROADMAP.md]
|
|
309
|
-
|
|
310
|
-
`/ms:plan-phase 1`
|
|
311
|
-
|
|
312
|
-
<sub>`/clear` first → fresh context window</sub>
|
|
313
|
-
|
|
314
|
-
---
|
|
315
|
-
|
|
316
|
-
**Also available:**
|
|
317
|
-
- `/ms:discuss-phase 1` — gather context first
|
|
318
|
-
- `/ms:research-phase 1` — investigate unknowns
|
|
319
|
-
|
|
320
|
-
---
|
|
321
303
|
```
|
|
304
|
+
|
|
305
|
+
Read `~/.claude/mindsystem/references/routing/next-phase-routing.md` and follow its instructions to present "Next Up" with pre-work context for Phase $START_PHASE.
|
|
322
306
|
</step>
|
|
323
307
|
|
|
324
308
|
<step name="update_last_command">
|
package/commands/ms/help.md
CHANGED
|
@@ -26,21 +26,29 @@ Output ONLY the reference content below. Do NOT add:
|
|
|
26
26
|
|
|
27
27
|
## Quick Start
|
|
28
28
|
|
|
29
|
-
###
|
|
29
|
+
### Project setup (one-time)
|
|
30
|
+
|
|
31
|
+
**New project:**
|
|
30
32
|
|
|
31
33
|
1. `/ms:new-project` — Initialize project with brief
|
|
32
|
-
2. `/ms:config` — (optional) Configure code reviewers and gitignore
|
|
33
|
-
3. `/ms:research-milestone` — (optional) Research domain ecosystem
|
|
34
|
-
4. `/ms:create-roadmap` — Define requirements and create roadmap
|
|
35
|
-
5. `/ms:plan-phase 1` — Create detailed plan for first phase
|
|
36
|
-
6. `/ms:execute-phase 1` — Execute with parallel agents
|
|
37
34
|
|
|
38
|
-
|
|
35
|
+
**Existing codebase:**
|
|
39
36
|
|
|
40
37
|
1. `/ms:new-project` — Questions focus on business context and vision
|
|
41
|
-
2. `/ms:map-codebase` — Analyze existing code
|
|
42
|
-
3. `/ms:
|
|
43
|
-
|
|
38
|
+
2. `/ms:map-codebase` — Analyze existing code for patterns and conventions
|
|
39
|
+
3. `/ms:doctor` — Validate config and generate knowledge files from source code
|
|
40
|
+
|
|
41
|
+
Optional: `/ms:config` — Configure code reviewers, gitignore, and other preferences
|
|
42
|
+
|
|
43
|
+
### Building features (repeat per milestone)
|
|
44
|
+
|
|
45
|
+
1. `/ms:new-milestone` — Discover what to build next
|
|
46
|
+
2. `/ms:research-milestone` — Research domain ecosystem (recommended)
|
|
47
|
+
3. `/ms:create-roadmap` — Define requirements and create roadmap
|
|
48
|
+
4. `/ms:discuss-phase 1` — Gather context before planning (recommended)
|
|
49
|
+
5. `/ms:plan-phase 1` — Create detailed plan for first phase
|
|
50
|
+
6. `/ms:execute-phase 1` — Execute with parallel agents
|
|
51
|
+
7. `/ms:verify-work 1` — (optional) Manual acceptance testing
|
|
44
52
|
|
|
45
53
|
## Staying Updated
|
|
46
54
|
|
|
@@ -56,14 +64,14 @@ Release notes: `/ms:release-notes`
|
|
|
56
64
|
## Core Workflow
|
|
57
65
|
|
|
58
66
|
```
|
|
59
|
-
Initialize →
|
|
67
|
+
Initialize → Research → Roadmap → Discuss → Plan → Execute → Verify → Milestone
|
|
60
68
|
```
|
|
61
69
|
|
|
62
70
|
Common deviations:
|
|
63
71
|
- Existing repo: `/ms:map-codebase` after `/ms:new-project` (or before — either works)
|
|
64
|
-
-
|
|
65
|
-
-
|
|
66
|
-
- Phase prep: `/ms:discuss-phase` → `/ms:design-phase` → `/ms:research-phase` → `/ms:plan-phase` (
|
|
72
|
+
- Skip research-milestone: domain is familiar, no external APIs or new patterns
|
|
73
|
+
- Skip discuss-phase: purely mechanical work (config-only, rename-only, version bump)
|
|
74
|
+
- Phase prep: `/ms:discuss-phase` → `/ms:design-phase` → `/ms:research-phase` → `/ms:plan-phase` (discuss recommended, others when flagged)
|
|
67
75
|
- New urgent work: `/ms:insert-phase <after> "<desc>"`
|
|
68
76
|
- New non-urgent work: `/ms:add-todo "<desc>"`
|
|
69
77
|
|
|
@@ -455,27 +463,32 @@ Usage: `/ms:release-notes`
|
|
|
455
463
|
|
|
456
464
|
## Common Workflows
|
|
457
465
|
|
|
458
|
-
**
|
|
466
|
+
**Project setup — new project:**
|
|
459
467
|
|
|
460
468
|
```
|
|
461
469
|
/ms:new-project # Extract your idea through questions
|
|
462
|
-
/ms:config # (optional) Configure code reviewers and gitignore
|
|
463
|
-
/ms:research-milestone # (recommended) Research domain ecosystem
|
|
464
|
-
/ms:create-roadmap # Define requirements and create phases
|
|
465
|
-
/ms:plan-phase 1 # Create detailed plan
|
|
466
|
-
/ms:execute-phase 1 # Execute with parallel agents
|
|
467
470
|
```
|
|
468
471
|
|
|
469
|
-
**
|
|
472
|
+
**Project setup — existing codebase:**
|
|
470
473
|
|
|
471
474
|
```
|
|
472
|
-
/ms:new-project #
|
|
473
|
-
/ms:map-codebase #
|
|
474
|
-
/ms:
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
475
|
+
/ms:new-project # Business context and vision
|
|
476
|
+
/ms:map-codebase # Analyze code → 7 structured documents
|
|
477
|
+
/ms:doctor # Validate config, generate knowledge files
|
|
478
|
+
```
|
|
479
|
+
|
|
480
|
+
Optional: `/ms:config` — configure code reviewers, gitignore, and other preferences
|
|
481
|
+
|
|
482
|
+
**Building features (repeat per milestone):**
|
|
483
|
+
|
|
484
|
+
```
|
|
485
|
+
/ms:new-milestone # Discover what to build next
|
|
486
|
+
/ms:research-milestone # Research domain ecosystem (recommended)
|
|
487
|
+
/ms:create-roadmap # Define requirements and create phases
|
|
488
|
+
/ms:discuss-phase 1 # Gather context before planning (recommended)
|
|
489
|
+
/ms:plan-phase 1 # Create detailed plan
|
|
490
|
+
/ms:execute-phase 1 # Execute with parallel agents
|
|
491
|
+
/ms:verify-work 1 # (optional) Manual acceptance testing
|
|
479
492
|
```
|
|
480
493
|
|
|
481
494
|
**Not sure what to do next / returning after a break:**
|
|
@@ -526,8 +539,9 @@ Common options:
|
|
|
526
539
|
|
|
527
540
|
```
|
|
528
541
|
/ms:new-milestone # Discover what to build, update PROJECT.md
|
|
529
|
-
/ms:research-milestone
|
|
542
|
+
/ms:research-milestone # Research domain ecosystem (recommended)
|
|
530
543
|
/ms:create-roadmap # New phases mapped to requirements
|
|
544
|
+
/ms:discuss-phase <phase> # Gather context before planning (recommended)
|
|
531
545
|
/ms:plan-phase # Auto-detect next unplanned phase
|
|
532
546
|
/ms:execute-phase <phase>
|
|
533
547
|
```
|
|
@@ -59,7 +59,7 @@ Check for .planning/STATE.md - loads context if project already initialized
|
|
|
59
59
|
4. Wait for agents to complete, collect confirmations (NOT document contents)
|
|
60
60
|
5. Verify all 7 documents exist with line counts
|
|
61
61
|
6. Commit codebase map
|
|
62
|
-
7. Offer next steps (
|
|
62
|
+
7. Offer next steps (adapts: /ms:new-project if no PROJECT.md, /ms:doctor if PROJECT.md exists)
|
|
63
63
|
8. **Update last command:** `ms-tools set-last-command "ms:map-codebase $ARGUMENTS"`
|
|
64
64
|
</process>
|
|
65
65
|
|
|
@@ -278,7 +278,7 @@ Milestone name: $ARGUMENTS (optional — will emerge during discovery if not pro
|
|
|
278
278
|
|
|
279
279
|
19. **Route to next step:**
|
|
280
280
|
|
|
281
|
-
|
|
281
|
+
Default to `/ms:research-milestone` — domain research improves roadmap quality for most milestones. Only recommend `/ms:create-roadmap` directly when the domain is clearly familiar, no open questions surfaced, and there are no external APIs, new libraries, or unfamiliar patterns involved.
|
|
282
282
|
|
|
283
283
|
```
|
|
284
284
|
Milestone [Name] initialized.
|
|
@@ -311,5 +311,5 @@ Milestone name: $ARGUMENTS (optional — will emerge during discovery if not pro
|
|
|
311
311
|
- MILESTONE-CONTEXT.md created with vision, features, scope, priorities
|
|
312
312
|
- STATE.md reset for new milestone
|
|
313
313
|
- Git commit made
|
|
314
|
-
- User routed to
|
|
314
|
+
- User routed to research-milestone (or create-roadmap if domain is clearly familiar)
|
|
315
315
|
</success_criteria>
|
|
@@ -242,13 +242,16 @@ Project updated:
|
|
|
242
242
|
- Config: .planning/config.json
|
|
243
243
|
```
|
|
244
244
|
|
|
245
|
-
**Routing
|
|
245
|
+
**Routing:**
|
|
246
246
|
|
|
247
247
|
```
|
|
248
248
|
---
|
|
249
249
|
|
|
250
250
|
## ▶ Next Up
|
|
251
251
|
|
|
252
|
+
[If brownfield detected and no codebase map:]
|
|
253
|
+
`/ms:map-codebase` — Analyze existing codebase for technical context
|
|
254
|
+
[Otherwise:]
|
|
252
255
|
`/ms:new-milestone` — Discover what to build first, create requirements and roadmap
|
|
253
256
|
|
|
254
257
|
<sub>`/clear` first → fresh context window</sub>
|
|
@@ -257,7 +260,8 @@ Project updated:
|
|
|
257
260
|
|
|
258
261
|
**Also available:**
|
|
259
262
|
- `/ms:config` — Configure code reviewers, gitignore, and other preferences
|
|
260
|
-
|
|
263
|
+
- `/ms:doctor` — Health check and fix project configuration
|
|
264
|
+
[If brownfield detected and no codebase map:] - `/ms:new-milestone` — Discover what to build first, create requirements and roadmap
|
|
261
265
|
|
|
262
266
|
---
|
|
263
267
|
```
|
|
@@ -239,14 +239,63 @@ EOF
|
|
|
239
239
|
<step name="fix_knowledge">
|
|
240
240
|
**Only if Knowledge Files failed.**
|
|
241
241
|
|
|
242
|
-
|
|
242
|
+
### 1. Detect knowledge source
|
|
243
243
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
-
|
|
248
|
-
-
|
|
249
|
-
-
|
|
244
|
+
Run in main context before spawning agent:
|
|
245
|
+
|
|
246
|
+
```bash
|
|
247
|
+
SUMMARIES=$(ls .planning/milestones/*/PHASE-SUMMARIES.md .planning/phases/*/*-SUMMARY.md 2>/dev/null | wc -l | tr -d ' ')
|
|
248
|
+
HAS_CODEBASE_DOCS=$([ -d .planning/codebase ] && echo "yes" || echo "no")
|
|
249
|
+
HAS_PROJECT=$([ -f .planning/PROJECT.md ] && echo "yes" || echo "no")
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
If `SUMMARIES > 0`: **artifact mode**. If `SUMMARIES == 0`: **source code mode**.
|
|
253
|
+
|
|
254
|
+
### 2. Spawn subagent
|
|
255
|
+
|
|
256
|
+
Spawn a `general-purpose` subagent (Task tool) with the following structured prompt. Inject detected mode, subsystem list from config.json, and environment flags into the prompt.
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
**Prompt content for subagent:**
|
|
261
|
+
|
|
262
|
+
> **Task:** Generate `.planning/knowledge/{subsystem}.md` for each subsystem listed below.
|
|
263
|
+
>
|
|
264
|
+
> **Subsystems:** {inject list from config.json}
|
|
265
|
+
>
|
|
266
|
+
> **Knowledge template:** Read `~/.claude/mindsystem/templates/knowledge.md` for format reference.
|
|
267
|
+
>
|
|
268
|
+
> **Mode: {artifact | source code}**
|
|
269
|
+
>
|
|
270
|
+
> **If artifact mode:** Read all PHASE-SUMMARIES.md from `milestones/*/PHASE-SUMMARIES.md` and any remaining `*-SUMMARY.md` in `phases/`. {If HAS_CODEBASE_DOCS=yes: "Also read `.planning/codebase/ARCHITECTURE.md`, `STACK.md`, `STRUCTURE.md` for structural context."} {If HAS_PROJECT=yes: "Read `.planning/PROJECT.md` for product context."}
|
|
271
|
+
>
|
|
272
|
+
> **If source code mode:** No pipeline artifacts exist. {If HAS_CODEBASE_DOCS=yes: "Read `.planning/codebase/ARCHITECTURE.md`, `STACK.md`, `STRUCTURE.md` first for orientation, then dive into source code per subsystem."} {If HAS_CODEBASE_DOCS=no: "Explore from package manifests (package.json, pubspec.yaml, Cargo.toml, etc.) and directory structure to understand the codebase, then analyze source code per subsystem."} {If HAS_PROJECT=yes: "Read `.planning/PROJECT.md` for product context."}
|
|
273
|
+
>
|
|
274
|
+
> **Extraction guide — what to extract per subsystem:**
|
|
275
|
+
>
|
|
276
|
+
> | Source Signal | Target Knowledge Section |
|
|
277
|
+
> |--------------|------------------------|
|
|
278
|
+
> | Library/framework choices, version constraints | Decisions |
|
|
279
|
+
> | Component structure, data flow, API contracts | Architecture |
|
|
280
|
+
> | UI patterns, design tokens, interaction behaviors | Design |
|
|
281
|
+
> | Error handling patterns, edge cases, workarounds | Pitfalls |
|
|
282
|
+
> | Main modules, entry points, config files | Key Files |
|
|
283
|
+
>
|
|
284
|
+
> **Critical rules:**
|
|
285
|
+
> - Extract knowledge, not descriptions. "Has login endpoint" is a description. "POST /auth/login with bcrypt + JWT httpOnly cookie" is architecture knowledge.
|
|
286
|
+
> - Preserve rationale when visible in code comments or config. Do not fabricate reasons.
|
|
287
|
+
> - Do not fabricate specific numbers (limits, thresholds, counts) — read from source or omit.
|
|
288
|
+
> - Omit empty sections. No Design section if subsystem has no UI.
|
|
289
|
+
> - Rewrite semantics — if existing knowledge files exist, merge by producing current state.
|
|
290
|
+
> - Cross-reference between subsystems where relevant: "(see api subsystem)".
|
|
291
|
+
> - Decisions table: 5-10 words per cell. Source column: `"existing"` for source code mode, artifact reference for artifact mode.
|
|
292
|
+
> - Key files must reference actual paths verified to exist.
|
|
293
|
+
> - `mkdir -p .planning/knowledge/` before writing.
|
|
294
|
+
> - No commits.
|
|
295
|
+
|
|
296
|
+
---
|
|
297
|
+
|
|
298
|
+
### 3. Verify and commit
|
|
250
299
|
|
|
251
300
|
After subagent completes, verify files exist:
|
|
252
301
|
|
|
@@ -254,7 +303,7 @@ After subagent completes, verify files exist:
|
|
|
254
303
|
ls .planning/knowledge/*.md
|
|
255
304
|
```
|
|
256
305
|
|
|
257
|
-
Commit:
|
|
306
|
+
Commit (use detected mode in message):
|
|
258
307
|
|
|
259
308
|
```bash
|
|
260
309
|
git add .planning/knowledge/
|
|
@@ -264,10 +313,12 @@ git add .planning/knowledge/
|
|
|
264
313
|
git commit -m "$(cat <<'EOF'
|
|
265
314
|
chore(doctor): generate knowledge files
|
|
266
315
|
|
|
267
|
-
Created per-subsystem knowledge files from phase summaries.
|
|
316
|
+
Created per-subsystem knowledge files from {phase summaries|source code analysis}.
|
|
268
317
|
EOF
|
|
269
318
|
)"
|
|
270
319
|
```
|
|
320
|
+
|
|
321
|
+
Replace `{phase summaries|source code analysis}` with the appropriate phrase based on detected mode.
|
|
271
322
|
</step>
|
|
272
323
|
|
|
273
324
|
</process>
|
|
@@ -246,6 +246,11 @@ Present completion summary and next steps.
|
|
|
246
246
|
wc -l .planning/codebase/*.md
|
|
247
247
|
```
|
|
248
248
|
|
|
249
|
+
**Detect project state:**
|
|
250
|
+
```bash
|
|
251
|
+
[ -f .planning/PROJECT.md ] && echo "HAS_PROJECT=true" || echo "HAS_PROJECT=false"
|
|
252
|
+
```
|
|
253
|
+
|
|
249
254
|
**Output format:**
|
|
250
255
|
|
|
251
256
|
```
|
|
@@ -259,22 +264,40 @@ Created .planning/codebase/:
|
|
|
259
264
|
- TESTING.md ([N] lines) - Test structure and practices
|
|
260
265
|
- INTEGRATIONS.md ([N] lines) - External services and APIs
|
|
261
266
|
- CONCERNS.md ([N] lines) - Technical debt and issues
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
**Routing (based on project state):**
|
|
270
|
+
|
|
271
|
+
**If HAS_PROJECT=false** (map-codebase ran before new-project):
|
|
272
|
+
|
|
273
|
+
```
|
|
274
|
+
---
|
|
262
275
|
|
|
276
|
+
## ▶ Next Up
|
|
277
|
+
|
|
278
|
+
`/ms:new-project` — initialize project with business context (codebase docs load automatically)
|
|
263
279
|
|
|
280
|
+
<sub>`/clear` first → fresh context window</sub>
|
|
281
|
+
|
|
282
|
+
---
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
**If HAS_PROJECT=true** (map-codebase ran after new-project):
|
|
286
|
+
|
|
287
|
+
```
|
|
264
288
|
---
|
|
265
289
|
|
|
266
290
|
## ▶ Next Up
|
|
267
291
|
|
|
268
|
-
`/ms:
|
|
292
|
+
`/ms:doctor` — validate project configuration and generate knowledge files
|
|
269
293
|
|
|
270
294
|
<sub>`/clear` first → fresh context window</sub>
|
|
271
295
|
|
|
272
296
|
---
|
|
273
297
|
|
|
274
298
|
**Also available:**
|
|
275
|
-
-
|
|
276
|
-
-
|
|
277
|
-
- Edit any document before proceeding
|
|
299
|
+
- `/ms:config` — configure code reviewers, gitignore, and other preferences
|
|
300
|
+
- `/ms:new-milestone` — skip doctor, go straight to defining what to build
|
|
278
301
|
|
|
279
302
|
---
|
|
280
303
|
```
|
package/package.json
CHANGED