@thedecipherist/mdd 1.5.0 → 1.5.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/commands/mdd-import-spec.md +282 -58
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Triggered when arguments start with `import-spec`.
|
|
4
4
|
|
|
5
|
-
Reads one or more large spec or prompt documents — the kind produced by extended brainstorming sessions with Claude — and converts them into properly structured MDD feature docs. Every decision in the spec is preserved. Duplicate or overlapping topics are merged intelligently.
|
|
5
|
+
Reads one or more large spec or prompt documents — the kind produced by extended brainstorming sessions with Claude — and converts them into properly structured MDD initiatives, waves, and feature docs. Every decision in the spec is preserved. Duplicate or overlapping topics are merged intelligently. Features are numbered and waved in **build dependency order**, not spec-reading order.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -12,28 +12,56 @@ Parse file path(s) from the arguments following `import-spec`. Multiple files ma
|
|
|
12
12
|
|
|
13
13
|
For each file path:
|
|
14
14
|
1. Verify the file exists. If a path does not exist, stop and report clearly: "File not found: `<path>`"
|
|
15
|
-
2.
|
|
15
|
+
2. Count the file's lines: `wc -l <path>`
|
|
16
|
+
3. Read the full content using the strategy below.
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
**Reading strategy — always read the full file, never stop early:**
|
|
19
|
+
|
|
20
|
+
Files under 2,000 lines: read in a single call.
|
|
21
|
+
|
|
22
|
+
Files over 2,000 lines: read in sequential chunks of 2,000 lines each.
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
chunk 1: offset 0, limit 2000
|
|
26
|
+
chunk 2: offset 2000, limit 2000
|
|
27
|
+
chunk 3: offset 4000, limit 2000
|
|
28
|
+
... continue until offset >= total line count
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
After each chunk, append its headings and content to a running working document. Do not begin IS2 analysis until the final chunk has been read and the full working document is assembled. Report progress as you read:
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
Reading <filename> (<N> lines)...
|
|
35
|
+
chunk 1/N (lines 1–2000) ✓
|
|
36
|
+
chunk 2/N (lines 2001–4000) ✓
|
|
37
|
+
...
|
|
38
|
+
chunk N/N (lines <X>–<end>) ✓
|
|
39
|
+
Full file read. Proceeding to feature extraction.
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
If multiple files are provided, merge all content into a single working document after all files are fully read. Tag each section internally with its source filename (e.g. `<!-- source: spec.md -->`) for traceability — these tags are used in the merge summary and content mapping display but are never written to output docs.
|
|
18
43
|
|
|
19
44
|
---
|
|
20
45
|
|
|
21
|
-
### Phase IS2 — Feature Extraction + Path Grouping
|
|
46
|
+
### Phase IS2 — Feature Extraction, Classification + Path Grouping
|
|
22
47
|
|
|
23
|
-
This phase runs in
|
|
48
|
+
This phase runs in four steps. Build-order classification (IS2c) always precedes structure determination (IS2d) because the correct numbering depends on understanding what you build vs. what you reference.
|
|
24
49
|
|
|
25
50
|
#### Step IS2a — Extract features
|
|
26
51
|
|
|
27
|
-
Read the entire merged
|
|
52
|
+
Read the entire merged working document. Identify every distinct feature, system, subsystem, or bounded capability described. A "feature" is any topic that could become a standalone MDD doc — something with a purpose, decisions, constraints, and a clear scope.
|
|
28
53
|
|
|
29
|
-
For each identified feature:
|
|
54
|
+
For each identified feature, capture:
|
|
30
55
|
- Name / title
|
|
31
|
-
- Core purpose
|
|
32
|
-
- All key decisions, constraints, business rules,
|
|
56
|
+
- Core purpose — full description, as detailed as needed. Do NOT artificially limit this to a sentence count. Capture everything the spec says about what this feature is and does.
|
|
57
|
+
- All key decisions, constraints, business rules, edge cases, and design rationale mentioned anywhere in the spec for this feature
|
|
58
|
+
- AST types, data structures, config schemas, error formats, and TypeScript interfaces if described
|
|
33
59
|
- Dependencies on other features identified in the same spec
|
|
34
60
|
|
|
35
61
|
Track which spec sections contribute to each feature. When multiple spec sections cover the same concept (same feature re-discussed with refinements), **merge them** — do not create duplicate docs. When versions of the same decision conflict, keep the most specific or most recent version and note the discarded variant.
|
|
36
62
|
|
|
63
|
+
**Changelog and review-pass sections** (sections titled "v1.0 Review", "Changelog", "Decision Log", or similar retrospective formats) are not features — they are design decision records. For each decision in such a section, identify which feature it belongs to and add it to that feature's content. Do not create a standalone "Changelog" feature doc.
|
|
64
|
+
|
|
37
65
|
#### Step IS2b — Assign paths
|
|
38
66
|
|
|
39
67
|
Read all existing `.mdd/docs/*.md` `path` fields (if any exist) to learn the project's established vocabulary and casing conventions.
|
|
@@ -43,7 +71,47 @@ For each identified feature, determine its `path` value:
|
|
|
43
71
|
- Title Case, 1–3 levels, `/`-separated
|
|
44
72
|
- Siblings must use identical parent spelling (if `Auth/Login` exists, new auth docs use `Auth`, not `Authentication`)
|
|
45
73
|
|
|
46
|
-
#### Step IS2c —
|
|
74
|
+
#### Step IS2c — Build-order classification
|
|
75
|
+
|
|
76
|
+
This is the most important step. Features are numbered in the order a developer would actually build them — not the order they appear in the spec.
|
|
77
|
+
|
|
78
|
+
**Classify every feature as one of two types:**
|
|
79
|
+
|
|
80
|
+
**COMPONENT** — Something that results in code: a module, class, package, service, server, or runtime. The thing you sit down and write. Examples: Parser, Template Engine, Renderer, MCP Server, CLI.
|
|
81
|
+
|
|
82
|
+
**SPEC** — Something that describes behaviour a COMPONENT must implement: a directive definition, an API contract, a security rule, a caching rule, a language feature. You consult a SPEC doc while building the COMPONENT that implements it. Examples: `@include` directive spec, Security Config spec, Cache Modes spec.
|
|
83
|
+
|
|
84
|
+
**Order COMPONENT features by build dependency:**
|
|
85
|
+
|
|
86
|
+
Start from the foundation (the component everything else depends on) and work outward. Ask: "What must exist before I can build this?" The component with no dependencies comes first. The component that depends on everything comes last.
|
|
87
|
+
|
|
88
|
+
Example for a language toolchain:
|
|
89
|
+
```
|
|
90
|
+
Parser — foundation, no deps, must exist first
|
|
91
|
+
Stripper — depends on Parser AST
|
|
92
|
+
Renderer — depends on Parser AST, no connection deps
|
|
93
|
+
Template Engine — depends on Parser + Renderer
|
|
94
|
+
MCP Server — depends on Template Engine
|
|
95
|
+
Hook — depends on MCP Server
|
|
96
|
+
CLI — depends on all of the above
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
**Assign SPEC features to waves:** A SPEC feature belongs in the wave of the COMPONENT that implements it. The SPEC doc gets created alongside its implementing COMPONENT's wave so that both exist when building begins. The COMPONENT doc lists SPEC docs in its `depends_on`.
|
|
100
|
+
|
|
101
|
+
**Determine wave breakdown:** Group COMPONENTs (and their associated SPECs) into waves by build phase. Each wave should have a clear demo-state — a thing you can actually demonstrate when the wave is done.
|
|
102
|
+
|
|
103
|
+
Example wave structure for a language toolchain:
|
|
104
|
+
```
|
|
105
|
+
Wave 1 — Foundation: Parser + all language directive SPECs
|
|
106
|
+
Wave 2 — Static Output: Stripper + Renderer
|
|
107
|
+
Wave 3 — Engine: Template Engine + Caching SPECs
|
|
108
|
+
Wave 4 — Live Data: MCP Server + Hook + Security SPECs
|
|
109
|
+
Wave 5 — CLI: CLI + Distribution
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
**If no COMPONENT/SPEC distinction applies** (e.g. a feature-extension spec for an existing product), order features by: user-facing value first, infrastructure last. Earlier features should be shippable without later features.
|
|
113
|
+
|
|
114
|
+
#### Step IS2d — Determine output structure
|
|
47
115
|
|
|
48
116
|
Count distinct root-level path segments (top-level areas):
|
|
49
117
|
|
|
@@ -53,7 +121,64 @@ Count distinct root-level path segments (top-level areas):
|
|
|
53
121
|
| 1–2 root areas AND 4–7 features | Waves + Feature docs (no initiative wrapper) |
|
|
54
122
|
| Any root area count AND 1–3 features | Flat feature docs only |
|
|
55
123
|
|
|
56
|
-
These thresholds are guidelines — apply judgment.
|
|
124
|
+
These thresholds are guidelines — apply judgment.
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
### Phase IS2.5 — CLAUDE.md Check
|
|
129
|
+
|
|
130
|
+
Before showing the dry-run preview, check the project's CLAUDE.md.
|
|
131
|
+
|
|
132
|
+
Run: `[ -f CLAUDE.md ] && wc -l CLAUDE.md || echo "missing"`
|
|
133
|
+
|
|
134
|
+
**If CLAUDE.md is missing or under 10 lines:**
|
|
135
|
+
|
|
136
|
+
Ask the user via AskUserQuestion:
|
|
137
|
+
|
|
138
|
+
> "This looks like a new project. Want me to create a CLAUDE.md with a description of what `<product name>` is, its architecture, and how the MDD docs map to the codebase? This gives Claude the context it needs to build from the docs correctly."
|
|
139
|
+
|
|
140
|
+
Options:
|
|
141
|
+
- **"Yes, create CLAUDE.md"** — proceed to draft it from the spec, include in IS4 write step
|
|
142
|
+
- **"No, skip"** — continue without creating CLAUDE.md
|
|
143
|
+
|
|
144
|
+
**If CLAUDE.md already exists and is substantial:** skip this check entirely.
|
|
145
|
+
|
|
146
|
+
**CLAUDE.md content to draft (if approved):**
|
|
147
|
+
|
|
148
|
+
Derive from the spec:
|
|
149
|
+
|
|
150
|
+
```markdown
|
|
151
|
+
# CLAUDE.md
|
|
152
|
+
|
|
153
|
+
## What This Project Is
|
|
154
|
+
|
|
155
|
+
<Product name> — <one paragraph elevator pitch. What does it do, who is it for, what problem does it solve. Write this in plain terms, not marketing language.>
|
|
156
|
+
|
|
157
|
+
## Core Philosophy
|
|
158
|
+
|
|
159
|
+
<The fundamental design principles that drive all decisions. Extract from the spec's philosophy/principles sections. These are the "why" behind architecture choices.>
|
|
160
|
+
|
|
161
|
+
## Architecture Overview
|
|
162
|
+
|
|
163
|
+
<The major components and how they relate. For a toolchain: list each component, one line description, what it depends on. For an API: list major subsystems. Make it concrete.>
|
|
164
|
+
|
|
165
|
+
## Tech Stack
|
|
166
|
+
|
|
167
|
+
<Language, frameworks, package manager, test runner — derive from spec if stated, leave blank if not.>
|
|
168
|
+
|
|
169
|
+
## What the MDD Docs Represent
|
|
170
|
+
|
|
171
|
+
This project uses MDD (Manual-Driven Development). The `.mdd/` directory contains:
|
|
172
|
+
- `.mdd/initiatives/` — the top-level initiative(s) defining the full scope
|
|
173
|
+
- `.mdd/waves/` — waves within each initiative, each with a concrete demo-state
|
|
174
|
+
- `.mdd/docs/` — individual feature docs, one per buildable unit or behavioural spec
|
|
175
|
+
|
|
176
|
+
**The docs are numbered in build dependency order.** `/mdd 01` is always the first thing to build. Read the wave file before starting a wave to understand what "done" looks like.
|
|
177
|
+
|
|
178
|
+
## Key Constraints
|
|
179
|
+
|
|
180
|
+
<Any hard rules derived from the spec: immutable rules, security constraints, "never do X", platform requirements. These are the lines that cannot be crossed.>
|
|
181
|
+
```
|
|
57
182
|
|
|
58
183
|
---
|
|
59
184
|
|
|
@@ -66,16 +191,23 @@ Before writing any files, display the complete proposed structure and wait for e
|
|
|
66
191
|
|
|
67
192
|
Source: <filename(s)>
|
|
68
193
|
Features identified: <N> Merged: <N> duplicate/overlapping topics
|
|
194
|
+
CLAUDE.md: <"will be created" | "already exists, skipping" | "skipping (user declined)">
|
|
195
|
+
|
|
196
|
+
Proposed structure: Initiative "<name>" → <N> Waves → <N> Feature docs
|
|
69
197
|
|
|
70
|
-
|
|
198
|
+
Initiative: .mdd/initiatives/<slug>.md
|
|
71
199
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
200
|
+
Waves (in build order):
|
|
201
|
+
Wave 1 — <name> (.mdd/waves/<slug>-wave-1.md)
|
|
202
|
+
Demo-state: <what you can demonstrate when this wave is done>
|
|
203
|
+
Features:
|
|
204
|
+
<NN> <slug> [COMPONENT] <path>
|
|
205
|
+
<NN> <slug> [SPEC] <path>
|
|
206
|
+
Wave 2 — <name> (.mdd/waves/<slug>-wave-2.md)
|
|
207
|
+
Demo-state: <demo-state>
|
|
208
|
+
Features:
|
|
209
|
+
<NN> <slug> [COMPONENT] <path>
|
|
210
|
+
...
|
|
79
211
|
|
|
80
212
|
IDs assigned: <NN>–<NN> (continuing from existing <prev>)
|
|
81
213
|
|
|
@@ -87,10 +219,11 @@ Content mapping:
|
|
|
87
219
|
<NN>-<slug>: §<Spec Section> + §<Spec Section>
|
|
88
220
|
<NN>-<slug>: §<Spec Section>
|
|
89
221
|
|
|
90
|
-
|
|
222
|
+
Is the build order correct? Does each wave's demo-state make sense?
|
|
223
|
+
(approve / adjust / abort)
|
|
91
224
|
```
|
|
92
225
|
|
|
93
|
-
**If the user says "adjust":** accept their description of changes, re-run IS2 with that feedback applied, then show the preview again. Repeat until the user approves.
|
|
226
|
+
**If the user says "adjust":** accept their description of changes — reordering waves, reclassifying features, changing demo-states, renaming — re-run IS2 with that feedback applied, then show the preview again. Repeat until the user approves.
|
|
94
227
|
|
|
95
228
|
**If the user says "abort":** stop. Write nothing.
|
|
96
229
|
|
|
@@ -100,22 +233,106 @@ Adjust paths, titles, or grouping? (approve / adjust / abort)
|
|
|
100
233
|
|
|
101
234
|
### Phase IS4 — Write Files
|
|
102
235
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
236
|
+
Write in this order: CLAUDE.md (if approved) → initiative → waves → feature docs.
|
|
237
|
+
|
|
238
|
+
#### CLAUDE.md (if approved in IS2.5)
|
|
239
|
+
|
|
240
|
+
Write the drafted CLAUDE.md to the project root. Report: `✅ CLAUDE.md created`
|
|
241
|
+
|
|
242
|
+
#### Initiative file
|
|
243
|
+
|
|
244
|
+
Create `.mdd/initiatives/<slug>.md`:
|
|
245
|
+
|
|
246
|
+
```markdown
|
|
247
|
+
---
|
|
248
|
+
id: <slug>
|
|
249
|
+
title: <Full Initiative Title>
|
|
250
|
+
status: active
|
|
251
|
+
version: 1
|
|
252
|
+
hash:
|
|
253
|
+
created: <today YYYY-MM-DD>
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
# <Full Initiative Title>
|
|
257
|
+
|
|
258
|
+
## Overview
|
|
259
|
+
|
|
260
|
+
<Comprehensive description of what this initiative delivers. This should be 3-6 paragraphs:
|
|
261
|
+
- What the product/system is and what it does
|
|
262
|
+
- Why it exists and what problem it solves
|
|
263
|
+
- The core design philosophy and principles that drive all decisions
|
|
264
|
+
- The major components or areas being built
|
|
265
|
+
- What "done" looks like for the full initiative
|
|
266
|
+
Do NOT write "brief" — write enough that a developer reading only this file understands what they are building and why.>
|
|
267
|
+
|
|
268
|
+
## Open Product Questions
|
|
269
|
+
(none — imported from spec)
|
|
270
|
+
|
|
271
|
+
## Waves
|
|
272
|
+
| Wave | File | Demo-state | Status |
|
|
273
|
+
|------|------|------------|--------|
|
|
274
|
+
<one row per wave>
|
|
275
|
+
| Wave 1 | waves/<slug>-wave-1.md | <demo-state> | planned |
|
|
276
|
+
| Wave 2 | waves/<slug>-wave-2.md | <demo-state> | planned |
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
Compute and write the `hash:` field after writing (hash of file content excluding the hash line).
|
|
280
|
+
|
|
281
|
+
#### Wave files
|
|
282
|
+
|
|
283
|
+
For each wave, create `.mdd/waves/<slug>-wave-N.md`:
|
|
284
|
+
|
|
285
|
+
```markdown
|
|
286
|
+
---
|
|
287
|
+
id: <slug>-wave-N
|
|
288
|
+
title: "Wave N: <Wave Title>"
|
|
289
|
+
initiative: <initiative-slug>
|
|
290
|
+
initiative_version: 1
|
|
291
|
+
status: planned
|
|
292
|
+
depends_on: <none | slug of previous wave>
|
|
293
|
+
demo_state: "<concrete thing you can demonstrate when this wave is complete>"
|
|
294
|
+
created: <today YYYY-MM-DD>
|
|
295
|
+
hash:
|
|
296
|
+
---
|
|
297
|
+
|
|
298
|
+
# Wave N: <Wave Title>
|
|
299
|
+
|
|
300
|
+
## Demo-State
|
|
107
301
|
|
|
108
|
-
|
|
302
|
+
<demo-state>
|
|
303
|
+
*(This wave is not complete until this can be manually demonstrated.)*
|
|
304
|
+
|
|
305
|
+
## Features
|
|
306
|
+
|
|
307
|
+
| # | Feature | Doc | Type | Status | Depends on |
|
|
308
|
+
|---|---------|-----|------|--------|------------|
|
|
309
|
+
| 1 | <slug> | docs/<NN>-<slug>.md | COMPONENT | planned | — |
|
|
310
|
+
| 2 | <slug> | docs/<NN>-<slug>.md | SPEC | planned | <dep or —> |
|
|
311
|
+
|
|
312
|
+
## Open Research
|
|
313
|
+
|
|
314
|
+
(none — imported from spec)
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
Compute and write the `hash:` field after writing.
|
|
318
|
+
|
|
319
|
+
#### Feature docs
|
|
320
|
+
|
|
321
|
+
For each feature in the approved plan, in wave order:
|
|
109
322
|
|
|
110
323
|
1. Auto-number continuing from the highest existing doc number in `.mdd/docs/`
|
|
111
|
-
2. Write
|
|
324
|
+
2. Write `.mdd/docs/<NN>-<slug>.md`:
|
|
112
325
|
|
|
113
326
|
```markdown
|
|
114
327
|
---
|
|
115
328
|
id: <NN>-<slug>
|
|
116
329
|
title: <Feature Title>
|
|
330
|
+
type: <COMPONENT | SPEC>
|
|
331
|
+
initiative: <initiative-slug>
|
|
332
|
+
wave: <wave-slug>
|
|
333
|
+
wave_status: planned
|
|
117
334
|
edition: <project name or "Both">
|
|
118
|
-
depends_on: [<IDs of
|
|
335
|
+
depends_on: [<IDs of docs this one depends on>]
|
|
119
336
|
source_files: []
|
|
120
337
|
routes: []
|
|
121
338
|
models: []
|
|
@@ -134,27 +351,27 @@ known_issues: []
|
|
|
134
351
|
|
|
135
352
|
## Purpose
|
|
136
353
|
|
|
137
|
-
<
|
|
354
|
+
<Full description of what this feature is and does. Include the core design rationale — the "why" behind the decisions. Do not limit this to a sentence count. If the spec says a lot about this feature, capture it all here. A developer reading only this doc should fully understand what they are building.>
|
|
138
355
|
|
|
139
356
|
## Architecture
|
|
140
357
|
|
|
141
|
-
<How this feature fits into the system,
|
|
358
|
+
<How this feature fits into the system. For a COMPONENT: describe its responsibilities, inputs, outputs, and what it must never do. For a SPEC: describe the behaviour contract the implementing COMPONENT must satisfy. Include TypeScript interfaces, AST node types, and data structures if the spec defines them.>
|
|
142
359
|
|
|
143
360
|
## Data Model
|
|
144
361
|
|
|
145
|
-
<
|
|
362
|
+
<Data structures, schemas, config formats described in the spec. Include the exact field names, types, and constraints. Omit section only if the spec truly defines no data structures for this feature.>
|
|
146
363
|
|
|
147
|
-
## API
|
|
364
|
+
## API / Interface
|
|
148
365
|
|
|
149
|
-
<
|
|
366
|
+
<Public interface this feature exposes: function signatures, tool names, command syntax, config keys. Omit if not applicable.>
|
|
150
367
|
|
|
151
368
|
## Business Rules
|
|
152
369
|
|
|
153
|
-
<
|
|
370
|
+
<Every decision, constraint, validation rule, edge case, error behaviour, and "never do X" described in the spec for this feature. This section should be exhaustive — if it is in the spec, it is here. Use bullet points or numbered lists for clarity.>
|
|
154
371
|
|
|
155
372
|
## Dependencies
|
|
156
373
|
|
|
157
|
-
<Other
|
|
374
|
+
<Other feature docs this one requires. List by ID and title. For SPECs, name the COMPONENT that implements this spec.>
|
|
158
375
|
|
|
159
376
|
## Known Issues
|
|
160
377
|
|
|
@@ -162,30 +379,35 @@ known_issues: []
|
|
|
162
379
|
```
|
|
163
380
|
|
|
164
381
|
3. Tags: 4–8 domain-concept keywords. NOT file paths or spec section names.
|
|
165
|
-
4. `depends_on`:
|
|
382
|
+
4. `depends_on`: populate from the build order analysis. COMPONENT docs list the SPEC docs they implement. SPEC docs list other SPECs they depend on (e.g. the expression system spec is depended on by the filter spec).
|
|
166
383
|
|
|
167
384
|
**Progress report as you write:**
|
|
168
385
|
```
|
|
169
|
-
Writing
|
|
170
|
-
✅
|
|
171
|
-
✅
|
|
386
|
+
Writing files...
|
|
387
|
+
✅ CLAUDE.md
|
|
388
|
+
✅ initiatives/markdownai.md
|
|
389
|
+
✅ waves/markdownai-wave-1.md (Wave 1 — Foundation)
|
|
390
|
+
✅ waves/markdownai-wave-2.md (Wave 2 — Static Pipeline)
|
|
391
|
+
...
|
|
392
|
+
✅ docs/01-<slug>.md [COMPONENT] <path>
|
|
393
|
+
✅ docs/02-<slug>.md [SPEC] <path>
|
|
172
394
|
...
|
|
173
395
|
```
|
|
174
396
|
|
|
175
397
|
---
|
|
176
398
|
|
|
177
|
-
### Phase IS5 — Rebuild .startup.md
|
|
399
|
+
### Phase IS5 — Rebuild .startup.md + Connections
|
|
178
400
|
|
|
179
|
-
|
|
180
|
-
- Rebuild the auto-generated zone (Project Snapshot, Features Documented list with IDs, status, and tags)
|
|
401
|
+
Rebuild `.mdd/.startup.md`:
|
|
402
|
+
- Rebuild the auto-generated zone (Project Snapshot, Features Documented list with IDs, status, and tags; Ops Runbooks)
|
|
403
|
+
- Add initiative and wave summary to the Features section: show initiative title, each wave with status, feature count
|
|
181
404
|
- Preserve the Notes zone exactly as-is
|
|
182
405
|
- Update the generated date and current branch
|
|
183
406
|
|
|
184
|
-
Then regenerate connections.md
|
|
407
|
+
Then regenerate `.mdd/connections.md`:
|
|
185
408
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
- **Path tree:** sort docs by path alphabetically, then by id within the same path. Render as indented tree using `├──` / `└──` characters. Each leaf: `<path-leaf-segment> <id> <status>`.
|
|
409
|
+
Read all `.mdd/docs/*.md` (excluding `archive/`) — frontmatter only (id, title, type, status, path, depends_on, wave, source_files). Never read doc bodies. Then:
|
|
410
|
+
- **Path tree:** sort docs by path alphabetically, then by id within the same path. Render as indented tree using `├──` / `└──` characters. Each leaf: `<path-leaf-segment> <id> <type> <status>`.
|
|
189
411
|
- **Mermaid graph:** one node per doc (short node ID), one `-->` edge per `depends_on` entry, `:::<status>` suffix on each node. Include `classDef complete fill:#00e5cc,color:#000`, `in_progress fill:#ffaa00,color:#000`, `draft fill:#888,color:#fff`, `deprecated fill:#555,color:#aaa`.
|
|
190
412
|
- **Source overlap:** build map of source_file → docs that reference it. Include only files with 2+ docs.
|
|
191
413
|
- **Warnings:** broken `depends_on` refs (target doesn't exist), circular dependencies, docs missing `path`.
|
|
@@ -196,21 +418,23 @@ Then report:
|
|
|
196
418
|
```
|
|
197
419
|
✅ Import Spec Complete
|
|
198
420
|
|
|
199
|
-
Source:
|
|
200
|
-
|
|
201
|
-
|
|
421
|
+
Source: <filename(s)>
|
|
422
|
+
CLAUDE.md: <created | skipped>
|
|
423
|
+
Initiative: .mdd/initiatives/<slug>.md
|
|
424
|
+
Waves: <N> wave files created
|
|
425
|
+
Docs: <N> feature docs created (<N> COMPONENT, <N> SPEC)
|
|
202
426
|
|
|
203
|
-
|
|
204
|
-
<
|
|
205
|
-
|
|
206
|
-
|
|
427
|
+
Structure:
|
|
428
|
+
<initiative title>
|
|
429
|
+
Wave 1 — <name> (<N> features)
|
|
430
|
+
Wave 2 — <name> (<N> features)
|
|
431
|
+
...
|
|
207
432
|
|
|
208
|
-
Startup:
|
|
433
|
+
Startup: .mdd/.startup.md rebuilt
|
|
209
434
|
Connections: .mdd/connections.md updated
|
|
210
435
|
|
|
211
436
|
Next steps:
|
|
212
|
-
/mdd <
|
|
213
|
-
/mdd audit
|
|
214
|
-
/mdd
|
|
215
|
-
/mdd rebuild-tags — regenerate tags if any look thin
|
|
437
|
+
/mdd plan-execute <slug>-wave-1 — start building Wave 1
|
|
438
|
+
/mdd audit — run a full audit across all imported docs
|
|
439
|
+
/mdd <NN> — jump directly to any feature doc
|
|
216
440
|
```
|