@thedecipherist/mdd 1.3.9 → 1.4.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 +46 -3
- package/commands/mdd-build.md +3 -0
- package/commands/mdd-import-spec.md +205 -0
- package/commands/mdd-lifecycle.md +22 -8
- package/commands/mdd-manage.md +4 -0
- package/commands/mdd.md +3 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# MDD - Manual-Driven Development for Claude Code
|
|
6
6
|
|
|
7
|
-
> **One command. Twenty-
|
|
7
|
+
> **One command. Twenty-three modes. Complete feature lifecycle from documentation to verified deployment.**
|
|
8
8
|
|
|
9
9
|
<p align="center">
|
|
10
10
|
<a href="https://thedecipherist.github.io/mdd">
|
|
@@ -249,6 +249,7 @@ Every feature doc and ops runbook has a `tags:` field (4–8 domain-concept keyw
|
|
|
249
249
|
/mdd note list Print the Notes section
|
|
250
250
|
/mdd note clear Wipe all notes (asks for confirmation)
|
|
251
251
|
/mdd deprecate <feature-id> Archive a feature and flag all dependents
|
|
252
|
+
/mdd import-spec <file> [file...] Convert a spec doc into MDD feature docs
|
|
252
253
|
/mdd reverse-engineer [path|feature-id] Generate MDD docs from existing source code
|
|
253
254
|
/mdd graph Render the full cross-feature dependency map
|
|
254
255
|
/mdd upgrade Batch-patch missing frontmatter across all docs
|
|
@@ -624,6 +625,39 @@ Re-syncs a feature doc after its code has changed:
|
|
|
624
625
|
|
|
625
626
|
---
|
|
626
627
|
|
|
628
|
+
## Import Spec Mode
|
|
629
|
+
|
|
630
|
+
### `/mdd import-spec <file> [file...]`
|
|
631
|
+
|
|
632
|
+
Converts one or more large spec or prompt documents — the kind produced by extended brainstorming sessions — into properly structured MDD feature docs. Nothing from the original spec is lost.
|
|
633
|
+
|
|
634
|
+
```bash
|
|
635
|
+
/mdd import-spec ~/specs/my-app-prompt.md
|
|
636
|
+
/mdd import-spec spec-v1.md spec-v2.md spec-notes.md
|
|
637
|
+
```
|
|
638
|
+
|
|
639
|
+
**How it works:**
|
|
640
|
+
|
|
641
|
+
1. **Read** — loads all spec files, merges content if multiple are provided
|
|
642
|
+
2. **Extract + Group** — identifies distinct features and assigns each a `path` value (e.g. `Auth/Login`, `E-commerce/Cart`) before anything else
|
|
643
|
+
3. **Auto-detect structure** — decides whether to create initiatives + waves + docs, waves + docs, or flat feature docs, based on path diversity and feature count:
|
|
644
|
+
|
|
645
|
+
| Signal | Output |
|
|
646
|
+
|--------|--------|
|
|
647
|
+
| 3+ distinct root path areas AND 8+ features | Initiative → Waves → Feature docs |
|
|
648
|
+
| 4–7 features in a coherent domain | Waves → Feature docs |
|
|
649
|
+
| 1–3 focused features | Flat feature docs only |
|
|
650
|
+
|
|
651
|
+
4. **Dry-run preview** — shows the complete proposed tree (paths, slugs, titles, content mapping, merge summary) before writing a single file. You can adjust or abort.
|
|
652
|
+
5. **Write docs** — creates all feature docs with full frontmatter, populated sections, tags, and `path` fields
|
|
653
|
+
6. **Rebuild** — updates `.mdd/.startup.md` to reflect the new docs
|
|
654
|
+
|
|
655
|
+
**Content preservation:** Every decision, constraint, and edge case in the spec maps somewhere in the output. If something doesn't fit cleanly into a standard section, it goes into Business Rules or a Known Constraints note.
|
|
656
|
+
|
|
657
|
+
**Duplicate handling:** Specs often revisit the same topic multiple times. Import-spec detects overlapping sections semantically, merges them into the best doc, and shows you exactly what was merged and why in the dry-run summary.
|
|
658
|
+
|
|
659
|
+
---
|
|
660
|
+
|
|
627
661
|
## Feature Lifecycle
|
|
628
662
|
|
|
629
663
|
### `/mdd deprecate <feature-id>`
|
|
@@ -677,9 +711,9 @@ Saved to `.mdd/audits/graph-<date>.md`.
|
|
|
677
711
|
|
|
678
712
|
### `/mdd upgrade`
|
|
679
713
|
|
|
680
|
-
Batch-patches missing frontmatter fields (`last_synced`, `status`, `phase`) across all `.mdd/docs/*.md` files. Safe to run multiple times
|
|
714
|
+
Batch-patches missing frontmatter fields (`last_synced`, `status`, `phase`, `tags`, `path`) across all `.mdd/docs/*.md` files. Safe to run multiple times — already-present fields are never overwritten.
|
|
681
715
|
|
|
682
|
-
Infers sensible defaults from git history, existing field values, and archive status.
|
|
716
|
+
Infers sensible defaults from git history, existing field values, and archive status. For the `path` field, Claude reads each doc's title and purpose to propose a value — always shows a plan for confirmation before writing. After upgrade, run `/mdd rebuild-tags` to populate any empty `tags` fields.
|
|
683
717
|
|
|
684
718
|
---
|
|
685
719
|
|
|
@@ -793,6 +827,7 @@ Every `.mdd/docs/<NN>-<feature-name>.md` file uses this YAML frontmatter:
|
|
|
793
827
|
| `phase` | Last completed phase name |
|
|
794
828
|
| `mdd_version` | Version of MDD that created/last updated this doc |
|
|
795
829
|
| `tags` | 4–8 domain-concept keywords surfaced in `.startup.md` so Claude can detect when a prompt relates to this feature (e.g. `[auth, jwt, login, sessions]`) |
|
|
830
|
+
| `path` | Slash-delimited breadcrumb showing where this feature lives in the product (e.g. `Auth/Login`, `E-commerce/Cart/Checkout`). Used by dashboards and listing tools to group docs into a human-readable tree. Distinct from `depends_on` — this is for navigation, not build order. |
|
|
796
831
|
| `known_issues` | Issues discovered during audits or implementation |
|
|
797
832
|
|
|
798
833
|
**`depends_on` rules:**
|
|
@@ -800,6 +835,14 @@ Every `.mdd/docs/<NN>-<feature-name>.md` file uses this YAML frontmatter:
|
|
|
800
835
|
- IDs must reference existing docs - `/mdd graph` detects broken references
|
|
801
836
|
- Only add, never remove without discussion - removing breaks the dependency chain
|
|
802
837
|
|
|
838
|
+
**`path` rules:**
|
|
839
|
+
- Format: `Area/Section` or `Area/Section/Detail` — Title Case, slash-separated, 1–3 levels
|
|
840
|
+
- Use product vocabulary, not code paths: `Auth/Login` not `src/handlers/auth`
|
|
841
|
+
- Siblings must use identical parent spelling: if `Auth/Login` exists, new auth docs use `Auth` not `Authentication`
|
|
842
|
+
- Set automatically by Claude in Build Mode Phase 3 (inferred from context, confirmed by user if ambiguous)
|
|
843
|
+
- Missing `path` fields are detected by `/mdd scan` and batch-fixed by `/mdd upgrade`
|
|
844
|
+
- Dashboards and listing tools use `path` to group docs into a human-readable tree view
|
|
845
|
+
|
|
803
846
|
---
|
|
804
847
|
|
|
805
848
|
## The `.mdd/` Directory
|
package/commands/mdd-build.md
CHANGED
|
@@ -192,6 +192,7 @@ status: draft
|
|
|
192
192
|
phase: <last completed phase name, or "all" when fully built>
|
|
193
193
|
mdd_version: <read from mdd.md frontmatter mdd_version field>
|
|
194
194
|
tags: [<4-8 domain-concept keywords — systems touched, technology, feature names. NOT file paths>]
|
|
195
|
+
path: <Area/Section>
|
|
195
196
|
known_issues: []
|
|
196
197
|
---
|
|
197
198
|
|
|
@@ -234,6 +235,8 @@ known_issues: []
|
|
|
234
235
|
|
|
235
236
|
**Always set `last_synced` to today's date** when writing or updating a feature doc. This is what SCAN MODE uses to detect drift. Set `status: draft` for new docs; update to `in_progress` when implementation begins, `complete` when Phase 7 is done.
|
|
236
237
|
|
|
238
|
+
**Determine the `path` field** before writing the doc. Read the `path` values of all existing docs in `.mdd/docs/` to understand established product vocabulary and category names. Then ask: "What would a user navigate to in order to reach this feature?" — answer in their mental model of the product, not the code structure. Use 1–3 segments, Title Case, product vocabulary (e.g. `Auth/Login`, `E-commerce/Cart`, `Dashboard/Analytics`). Siblings must use identical parent spelling — if `Auth/Login` exists, use `Auth` not `Authentication`. If you can infer the path from context with confidence, set it and show the user. If genuinely ambiguous (feature could belong in 2+ places), ask: "Where does this feature live in the product? (e.g. `Auth/Login` or `Dashboard/Reports`)"
|
|
239
|
+
|
|
237
240
|
**After writing the feature doc**, trigger the `.mdd/.startup.md` rebuild (same logic as in Status Mode — rebuild auto-generated zone, preserve Notes zone) so the Features list stays current.
|
|
238
241
|
|
|
239
242
|
Show the completed doc to the user and ask: **"Does this accurately describe what you want to build? Anything to add or change?"**
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
## IMPORT SPEC MODE — `/mdd import-spec`
|
|
2
|
+
|
|
3
|
+
Triggered when arguments start with `import-spec`.
|
|
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. Path grouping determines whether to create initiative/waves or flat docs.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
### Phase IS1 — Read Spec Files
|
|
10
|
+
|
|
11
|
+
Parse file path(s) from the arguments following `import-spec`. Multiple files may be space-separated or specified as a glob.
|
|
12
|
+
|
|
13
|
+
For each file path:
|
|
14
|
+
1. Verify the file exists. If a path does not exist, stop and report clearly: "File not found: `<path>`"
|
|
15
|
+
2. Read the full content.
|
|
16
|
+
|
|
17
|
+
If multiple files are provided, merge all content into a single working document. Tag each section internally with its source filename (e.g. `<!-- source: rawpg-prompt-driver.md -->`) for traceability — these tags are used in the merge summary and content mapping display but are never written to output docs.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
### Phase IS2 — Feature Extraction + Path Grouping
|
|
22
|
+
|
|
23
|
+
This phase runs in two steps. Path grouping always runs before complexity determination because the number of distinct top-level path areas is the primary signal for initiative-scale scope.
|
|
24
|
+
|
|
25
|
+
#### Step IS2a — Extract features
|
|
26
|
+
|
|
27
|
+
Read the entire merged spec. 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
|
+
|
|
29
|
+
For each identified feature:
|
|
30
|
+
- Name / title
|
|
31
|
+
- Core purpose (1–2 sentences distilled from the spec)
|
|
32
|
+
- All key decisions, constraints, business rules, and edge cases mentioned in the spec
|
|
33
|
+
- Dependencies on other features identified in the same spec
|
|
34
|
+
|
|
35
|
+
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
|
+
|
|
37
|
+
#### Step IS2b — Assign paths
|
|
38
|
+
|
|
39
|
+
Read all existing `.mdd/docs/*.md` `path` fields (if any exist) to learn the project's established vocabulary and casing conventions.
|
|
40
|
+
|
|
41
|
+
For each identified feature, determine its `path` value:
|
|
42
|
+
- Use the user's product vocabulary, not code module names
|
|
43
|
+
- Title Case, 1–3 levels, `/`-separated
|
|
44
|
+
- Siblings must use identical parent spelling (if `Auth/Login` exists, new auth docs use `Auth`, not `Authentication`)
|
|
45
|
+
|
|
46
|
+
#### Step IS2c — Determine output structure
|
|
47
|
+
|
|
48
|
+
Count distinct root-level path segments (top-level areas):
|
|
49
|
+
|
|
50
|
+
| Signal | Structure |
|
|
51
|
+
|--------|-----------|
|
|
52
|
+
| 3+ distinct root areas AND 8+ features | Initiative + Waves + Feature docs |
|
|
53
|
+
| 1–2 root areas AND 4–7 features | Waves + Feature docs (no initiative wrapper) |
|
|
54
|
+
| Any root area count AND 1–3 features | Flat feature docs only |
|
|
55
|
+
|
|
56
|
+
These thresholds are guidelines — apply judgment. A 3-feature spec spanning radically different domains can still warrant waves.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
### Phase IS3 — Dry-Run Preview (mandatory gate)
|
|
61
|
+
|
|
62
|
+
Before writing any files, display the complete proposed structure and wait for explicit user approval.
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
📋 Import Spec — Dry Run
|
|
66
|
+
|
|
67
|
+
Source: <filename(s)>
|
|
68
|
+
Features identified: <N> Merged: <N> duplicate/overlapping topics
|
|
69
|
+
|
|
70
|
+
Proposed structure: <Flat docs | Waves | Initiative: "<name>" → Waves>
|
|
71
|
+
|
|
72
|
+
Path Tree:
|
|
73
|
+
<Root Area 1>
|
|
74
|
+
├── <Section> → <NN>-<slug> (draft)
|
|
75
|
+
└── <Section>
|
|
76
|
+
└── <Sub-section> → <NN>-<slug> (draft)
|
|
77
|
+
<Root Area 2>
|
|
78
|
+
└── <Section> → <NN>-<slug> (draft)
|
|
79
|
+
|
|
80
|
+
IDs assigned: <NN>–<NN> (continuing from existing <prev>)
|
|
81
|
+
|
|
82
|
+
Merge summary:
|
|
83
|
+
"<path>" ← merged from: §<Spec Section A>, §<Spec Section B>
|
|
84
|
+
(one line per merged feature — omit if no merges)
|
|
85
|
+
|
|
86
|
+
Content mapping:
|
|
87
|
+
<NN>-<slug>: §<Spec Section> + §<Spec Section>
|
|
88
|
+
<NN>-<slug>: §<Spec Section>
|
|
89
|
+
|
|
90
|
+
Adjust paths, titles, or grouping? (approve / adjust / abort)
|
|
91
|
+
```
|
|
92
|
+
|
|
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.
|
|
94
|
+
|
|
95
|
+
**If the user says "abort":** stop. Write nothing.
|
|
96
|
+
|
|
97
|
+
**Do not proceed to IS4 until the user explicitly approves.**
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
### Phase IS4 — Write Files
|
|
102
|
+
|
|
103
|
+
**If initiative-scale was detected:** Create `.mdd/initiative.md` with:
|
|
104
|
+
- `id`, `title`, `status: planning`, `created: <today>`
|
|
105
|
+
- A brief initiative description derived from the spec's overall theme
|
|
106
|
+
- Wave breakdown: one wave per major root path area or logical phase, each listing its feature doc slugs
|
|
107
|
+
|
|
108
|
+
**For each feature doc in the approved plan:**
|
|
109
|
+
|
|
110
|
+
1. Auto-number continuing from the highest existing doc number in `.mdd/docs/`
|
|
111
|
+
2. Write a complete MDD feature doc at `.mdd/docs/<NN>-<slug>.md` using the canonical frontmatter structure:
|
|
112
|
+
|
|
113
|
+
```markdown
|
|
114
|
+
---
|
|
115
|
+
id: <NN>-<slug>
|
|
116
|
+
title: <Feature Title>
|
|
117
|
+
edition: <project name or "Both">
|
|
118
|
+
depends_on: [<IDs of other imported features this one depends on>]
|
|
119
|
+
source_files: []
|
|
120
|
+
routes: []
|
|
121
|
+
models: []
|
|
122
|
+
test_files: []
|
|
123
|
+
data_flow: greenfield
|
|
124
|
+
last_synced: <today YYYY-MM-DD>
|
|
125
|
+
status: draft
|
|
126
|
+
phase: documentation
|
|
127
|
+
mdd_version: <read from mdd.md frontmatter>
|
|
128
|
+
tags: [<4–8 domain-concept keywords>]
|
|
129
|
+
path: <Area/Section>
|
|
130
|
+
known_issues: []
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
# <NN> — <Feature Title>
|
|
134
|
+
|
|
135
|
+
## Purpose
|
|
136
|
+
|
|
137
|
+
<2–3 sentences from the merged spec content>
|
|
138
|
+
|
|
139
|
+
## Architecture
|
|
140
|
+
|
|
141
|
+
<How this feature fits into the system, derived from spec decisions>
|
|
142
|
+
|
|
143
|
+
## Data Model
|
|
144
|
+
|
|
145
|
+
<If the spec describes data structures — omit section if truly not applicable>
|
|
146
|
+
|
|
147
|
+
## API Endpoints
|
|
148
|
+
|
|
149
|
+
<If the spec describes endpoints — omit section if truly not applicable>
|
|
150
|
+
|
|
151
|
+
## Business Rules
|
|
152
|
+
|
|
153
|
+
<All decisions, constraints, validation rules, edge cases from the spec>
|
|
154
|
+
|
|
155
|
+
## Dependencies
|
|
156
|
+
|
|
157
|
+
<Other features this one requires, by doc ID>
|
|
158
|
+
|
|
159
|
+
## Known Issues
|
|
160
|
+
|
|
161
|
+
(none — imported from spec)
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
3. Tags: 4–8 domain-concept keywords. NOT file paths or spec section names.
|
|
165
|
+
4. `depends_on`: if feature A was described in the spec as depending on feature B (also imported), use the IDs assigned in this run.
|
|
166
|
+
|
|
167
|
+
**Progress report as you write:**
|
|
168
|
+
```
|
|
169
|
+
Writing docs...
|
|
170
|
+
✅ <NN>-<slug>.md (<path>)
|
|
171
|
+
✅ <NN>-<slug>.md (<path>)
|
|
172
|
+
...
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
### Phase IS5 — Rebuild .startup.md
|
|
178
|
+
|
|
179
|
+
Trigger the `.mdd/.startup.md` rebuild:
|
|
180
|
+
- Rebuild the auto-generated zone (Project Snapshot, Features Documented list with IDs, status, and tags)
|
|
181
|
+
- Preserve the Notes zone exactly as-is
|
|
182
|
+
- Update the generated date and current branch
|
|
183
|
+
|
|
184
|
+
Then report:
|
|
185
|
+
|
|
186
|
+
```
|
|
187
|
+
✅ Import Spec Complete
|
|
188
|
+
|
|
189
|
+
Source: <filename(s)>
|
|
190
|
+
Created: <N> feature docs
|
|
191
|
+
Structure: <Flat | Waves | Initiative + Waves>
|
|
192
|
+
|
|
193
|
+
Docs created:
|
|
194
|
+
<NN>-<slug> <path> draft
|
|
195
|
+
<NN>-<slug> <path> draft
|
|
196
|
+
...
|
|
197
|
+
|
|
198
|
+
Startup: .mdd/.startup.md rebuilt
|
|
199
|
+
|
|
200
|
+
Next steps:
|
|
201
|
+
/mdd <NN> — start building any imported feature
|
|
202
|
+
/mdd audit — run a full audit across all imported docs
|
|
203
|
+
/mdd upgrade — add path fields to any pre-existing docs that are missing them
|
|
204
|
+
/mdd rebuild-tags — regenerate tags if any look thin
|
|
205
|
+
```
|
|
@@ -181,7 +181,7 @@ Save the graph to `.mdd/audits/graph-<date>.md`.
|
|
|
181
181
|
|
|
182
182
|
Triggered when arguments start with `upgrade`.
|
|
183
183
|
|
|
184
|
-
Batch-patches missing frontmatter fields (`last_synced`, `status`, `phase`) across ALL `.mdd/docs/*.md` files without touching doc content. Safe to run multiple times — already-present fields are never overwritten.
|
|
184
|
+
Batch-patches missing frontmatter fields (`last_synced`, `status`, `phase`, `tags`, `path`) across ALL `.mdd/docs/*.md` files without touching doc content. Safe to run multiple times — already-present fields are never overwritten.
|
|
185
185
|
|
|
186
186
|
**Use case:** projects that used MDD before these fields were introduced, or after importing docs from another project. Running `/mdd upgrade` converts all UNTRACKED docs to IN SYNC in one pass.
|
|
187
187
|
|
|
@@ -196,11 +196,11 @@ Batch-patches missing frontmatter fields (`last_synced`, `status`, `phase`) acro
|
|
|
196
196
|
```
|
|
197
197
|
📋 Upgrade Inventory
|
|
198
198
|
|
|
199
|
-
Doc | last_synced | status | phase | tags
|
|
200
|
-
|
|
201
|
-
01-project-scaffolding | ❌ missing | ❌ | ❌ | ❌
|
|
202
|
-
02-profile-system | ❌ missing | ✅ | ❌ | ✅
|
|
203
|
-
03-database-layer | ✅ present | ✅ | ✅ | ❌
|
|
199
|
+
Doc | last_synced | status | phase | tags | path
|
|
200
|
+
─────────────────────────────────|─────────────|────────|───────|──────|──────
|
|
201
|
+
01-project-scaffolding | ❌ missing | ❌ | ❌ | ❌ | ❌
|
|
202
|
+
02-profile-system | ❌ missing | ✅ | ❌ | ✅ | ❌
|
|
203
|
+
03-database-layer | ✅ present | ✅ | ✅ | ❌ | ✅
|
|
204
204
|
...
|
|
205
205
|
|
|
206
206
|
Docs needing upgrade: <N> of <total>
|
|
@@ -209,6 +209,7 @@ Fields to add:
|
|
|
209
209
|
status — <N> docs
|
|
210
210
|
phase — <N> docs
|
|
211
211
|
tags — <N> docs (run /mdd rebuild-tags after upgrade to populate)
|
|
212
|
+
path — <N> docs (Claude reads each doc's title + purpose to infer the value)
|
|
212
213
|
```
|
|
213
214
|
|
|
214
215
|
4. If 0 docs need upgrade → report "All docs are up to date. Nothing to patch." and stop.
|
|
@@ -247,6 +248,17 @@ The goal is the date the doc was last meaningfully worked on. Try in order:
|
|
|
247
248
|
3. If `status` resolved to `draft` → `documentation`
|
|
248
249
|
4. If `status` resolved to `deprecated` → `deprecated`
|
|
249
250
|
|
|
251
|
+
**`path` inference:**
|
|
252
|
+
|
|
253
|
+
Unlike other fields, `path` cannot be inferred from git history or status — it requires reading the doc's content.
|
|
254
|
+
|
|
255
|
+
For each doc missing `path`:
|
|
256
|
+
1. Read its `title` frontmatter field and `## Purpose` section body
|
|
257
|
+
2. Read all other docs' existing `path` fields to understand the project's established vocabulary and casing conventions
|
|
258
|
+
3. Propose a `path` value (`Area/Section`, Title Case, 1–3 levels) that reflects where this feature lives in the product — use product terminology, not code module names
|
|
259
|
+
|
|
260
|
+
**Do not silently write `path` values** — always include the proposed values in the Phase UP3 plan for user review. The user may adjust any proposed path before writing.
|
|
261
|
+
|
|
250
262
|
---
|
|
251
263
|
|
|
252
264
|
### Phase UP3 — Show Plan + Confirm
|
|
@@ -271,6 +283,7 @@ Present the inferred patches to the user before writing anything:
|
|
|
271
283
|
+ last_synced: 2026-01-17 (from git: last commit on this doc)
|
|
272
284
|
+ status: complete
|
|
273
285
|
+ phase: all
|
|
286
|
+
+ path: Auth/Login (inferred from purpose: "handles user login flow")
|
|
274
287
|
|
|
275
288
|
... (<N> more)
|
|
276
289
|
|
|
@@ -311,11 +324,12 @@ status: <new> ← insert here if missing
|
|
|
311
324
|
phase: <new> ← insert here if missing
|
|
312
325
|
mdd_version: <new> ← insert here if missing
|
|
313
326
|
tags: <new> ← insert here if missing (do not generate tags in upgrade — run /mdd rebuild-tags after)
|
|
327
|
+
path: <new> ← insert here if missing (value inferred from doc content in UP2, confirmed by user in UP3)
|
|
314
328
|
known_issues: []
|
|
315
329
|
---
|
|
316
330
|
```
|
|
317
331
|
|
|
318
|
-
Insert new fields **before** `known_issues` to keep the canonical order. **Do not attempt to generate tag values during upgrade** — tags require reading doc content to produce meaningful keywords
|
|
332
|
+
Insert new fields **before** `known_issues` to keep the canonical order. **Do not attempt to generate tag values during upgrade** — tags require reading doc content to produce meaningful keywords; after running upgrade, run `/mdd rebuild-tags` to populate them. **For `path` values**: these ARE inferred by reading doc content during UP2 and confirmed in UP3 — write the user-confirmed values directly.
|
|
319
333
|
|
|
320
334
|
Report progress as you go:
|
|
321
335
|
```
|
|
@@ -332,7 +346,7 @@ Patching...
|
|
|
332
346
|
|
|
333
347
|
After all patches are applied:
|
|
334
348
|
|
|
335
|
-
1. Re-scan `.mdd/docs/*.md` — confirm 0 docs have missing `last_synced`
|
|
349
|
+
1. Re-scan `.mdd/docs/*.md` — confirm 0 docs have missing `last_synced` or `path`
|
|
336
350
|
2. Trigger the `.mdd/.startup.md` rebuild (same logic as Status Mode)
|
|
337
351
|
3. Report:
|
|
338
352
|
|
package/commands/mdd-manage.md
CHANGED
|
@@ -153,6 +153,7 @@ A classification table — one row per feature:
|
|
|
153
153
|
|
|
154
154
|
**Classifications:**
|
|
155
155
|
- **untracked** — `last_synced` missing from frontmatter
|
|
156
|
+
- **no-path** — `path` field missing from frontmatter (run `/mdd upgrade` to add)
|
|
156
157
|
- **broken** — one or more `source_files` not found on disk
|
|
157
158
|
- **drifted** — `last_synced` exists, files exist, commits found after `last_synced`
|
|
158
159
|
- **in_sync** — `last_synced` exists, all files exist, no commits after `last_synced`
|
|
@@ -176,11 +177,13 @@ Generated: <YYYY-MM-DD>
|
|
|
176
177
|
❓ 09-integrations — untracked (no last_synced field)
|
|
177
178
|
|
|
178
179
|
Summary: 1 in sync · 1 drifted · 1 broken · 1 untracked
|
|
180
|
+
Missing path: <N> docs — run /mdd upgrade to populate ← omit this line when N = 0
|
|
179
181
|
|
|
180
182
|
Recommended actions:
|
|
181
183
|
/mdd update 04 — re-sync content-builder doc with code
|
|
182
184
|
/mdd update 07 — fix broken file reference
|
|
183
185
|
/mdd update 09 — add last_synced by running update mode
|
|
186
|
+
/mdd upgrade — add path field to <N> docs missing it ← omit this line when there are no docs missing path
|
|
184
187
|
```
|
|
185
188
|
|
|
186
189
|
**Initiative/wave drift check** (only shown if `.mdd/initiatives/` exists):
|
|
@@ -266,6 +269,7 @@ After rewriting, update frontmatter:
|
|
|
266
269
|
- `last_synced: <today's date>`
|
|
267
270
|
- `status:` — ask the user if they want to update the status (e.g., draft → complete)
|
|
268
271
|
- `phase:` — update to reflect current state
|
|
272
|
+
- `path:` — if the doc is missing a `path` field, offer to add it: "This doc is missing a `path` field. Where does this feature live in the product? (e.g. `Auth/Login`)" — if the user provides a value, write it between `tags` and `known_issues` in the frontmatter.
|
|
269
273
|
|
|
270
274
|
### Phase U6 — Regenerate test skeletons for new behaviors
|
|
271
275
|
|
package/commands/mdd.md
CHANGED
|
@@ -118,6 +118,9 @@ Use whichever path contains `mdd-audit.md`. Store it as `$MDD_DIR` and use it fo
|
|
|
118
118
|
- If arguments start with `status`, `note`, `scan`, `update`, `deprecate`, or `rebuild-tags` →
|
|
119
119
|
**Read `$MDD_DIR/mdd-manage.md` then follow the relevant mode instructions.**
|
|
120
120
|
|
|
121
|
+
- If arguments start with `import-spec` →
|
|
122
|
+
**Read `$MDD_DIR/mdd-import-spec.md` then follow its IMPORT SPEC MODE instructions.**
|
|
123
|
+
|
|
121
124
|
- If arguments start with `reverse-engineer`, `reverse`, `graph`, or `upgrade` →
|
|
122
125
|
**Read `$MDD_DIR/mdd-lifecycle.md` then follow the relevant mode instructions.**
|
|
123
126
|
|