@thedecipherist/mdd 1.4.0 → 1.5.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 +44 -5
- package/commands/mdd-build.md +10 -1
- package/commands/mdd-import-spec.md +38 -2
- package/commands/mdd-lifecycle.md +9 -1
- package/commands/mdd-manage.md +71 -0
- package/commands/mdd-plan.md +10 -0
- package/commands/mdd.md +1 -1
- 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-four 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">
|
|
@@ -42,7 +42,7 @@ Then in Claude Code:
|
|
|
42
42
|
- [How It Works](#how-it-works)
|
|
43
43
|
- [Installation](#installation)
|
|
44
44
|
- [Quick Start](#quick-start)
|
|
45
|
-
- [All
|
|
45
|
+
- [All 24 Modes at a Glance](#all-24-modes-at-a-glance)
|
|
46
46
|
- [Build Mode - Feature Development](#build-mode--feature-development)
|
|
47
47
|
- [Audit Mode - Code Review](#audit-mode--code-review)
|
|
48
48
|
- [Status & Notes](#status--notes)
|
|
@@ -236,7 +236,7 @@ Every feature doc and ops runbook has a `tags:` field (4–8 domain-concept keyw
|
|
|
236
236
|
|
|
237
237
|
---
|
|
238
238
|
|
|
239
|
-
## All
|
|
239
|
+
## All 24 Modes at a Glance
|
|
240
240
|
|
|
241
241
|
```
|
|
242
242
|
/mdd <feature description> Build Mode - Document, plan, and implement
|
|
@@ -245,6 +245,7 @@ Every feature doc and ops runbook has a `tags:` field (4–8 domain-concept keyw
|
|
|
245
245
|
/mdd scan Detect features whose source files changed
|
|
246
246
|
/mdd update <feature-id> Re-sync a feature doc after code changes
|
|
247
247
|
/mdd rebuild-tags [--force] Generate tags for all docs and rebuild .startup.md
|
|
248
|
+
/mdd connect Rebuild the connections map from all docs
|
|
248
249
|
/mdd note "text" Append a timestamped note to .mdd/.startup.md
|
|
249
250
|
/mdd note list Print the Notes section
|
|
250
251
|
/mdd note clear Wipe all notes (asks for confirmation)
|
|
@@ -585,7 +586,7 @@ Notes are timestamped and survive session resets.
|
|
|
585
586
|
|
|
586
587
|
### `/mdd scan`
|
|
587
588
|
|
|
588
|
-
Detects which features have drifted since their last MDD session. Uses a single Explore agent to run all git checks in parallel, then classifies each feature:
|
|
589
|
+
Detects which features have drifted since their last MDD session, and checks whether `connections.md` is stale. Uses a single Explore agent to run all git checks in parallel, then classifies each feature:
|
|
589
590
|
|
|
590
591
|
| Classification | Meaning |
|
|
591
592
|
|---|---|
|
|
@@ -845,6 +846,43 @@ Every `.mdd/docs/<NN>-<feature-name>.md` file uses this YAML frontmatter:
|
|
|
845
846
|
|
|
846
847
|
---
|
|
847
848
|
|
|
849
|
+
## Connections Map
|
|
850
|
+
|
|
851
|
+
Every MDD project maintains a committed `.mdd/connections.md` file — a pre-computed relationship map that gives Claude and the dashboard instant access to the full project graph without reading every doc.
|
|
852
|
+
|
|
853
|
+
```bash
|
|
854
|
+
/mdd connect # regenerate manually at any time
|
|
855
|
+
```
|
|
856
|
+
|
|
857
|
+
It contains three sections:
|
|
858
|
+
|
|
859
|
+
**Path Tree** — all feature docs grouped by their `path` field, sorted alphabetically, ready for dashboard rendering:
|
|
860
|
+
```
|
|
861
|
+
Auth
|
|
862
|
+
├── Login 02-auth-login complete
|
|
863
|
+
└── OAuth 03-oauth-google draft
|
|
864
|
+
E-commerce
|
|
865
|
+
└── Cart 07-cart in_progress
|
|
866
|
+
```
|
|
867
|
+
|
|
868
|
+
**Dependency Graph** — a Mermaid diagram of all `depends_on` relationships with status-coded nodes:
|
|
869
|
+
```mermaid
|
|
870
|
+
graph TD
|
|
871
|
+
A["07-cart"]:::in_progress --> B["02-auth-login"]:::complete
|
|
872
|
+
classDef complete fill:#00e5cc,color:#000
|
|
873
|
+
classDef in_progress fill:#ffaa00,color:#000
|
|
874
|
+
classDef draft fill:#888,color:#fff
|
|
875
|
+
```
|
|
876
|
+
|
|
877
|
+
**Source File Overlap** — files referenced by 2+ docs (co-change risk):
|
|
878
|
+
```
|
|
879
|
+
src/handlers/auth.ts → 02-auth-login, 03-oauth-google
|
|
880
|
+
```
|
|
881
|
+
|
|
882
|
+
**Kept in sync automatically** — every MDD operation that creates, modifies, archives, or upgrades a doc regenerates `connections.md` as its final step. `/mdd status` and `/mdd scan` detect and flag staleness. The file is committed to git (not gitignored) so it's always available without re-running any command.
|
|
883
|
+
|
|
884
|
+
---
|
|
885
|
+
|
|
848
886
|
## The `.mdd/` Directory
|
|
849
887
|
|
|
850
888
|
All MDD artifacts live in one place:
|
|
@@ -870,7 +908,8 @@ All MDD artifacts live in one place:
|
|
|
870
908
|
│ ├── shard-N.md
|
|
871
909
|
│ ├── agent-N-config.md
|
|
872
910
|
│ └── agent-N-notes.md
|
|
873
|
-
|
|
911
|
+
├── .startup.md # Auto-generated session context (read by Claude on start)
|
|
912
|
+
└── connections.md # Pre-computed relationship map (path tree + Mermaid graph)
|
|
874
913
|
```
|
|
875
914
|
|
|
876
915
|
`.mdd/audits/` and `.mdd/jobs/` are automatically added to `.gitignore` on first run. Everything else in `.mdd/` is committed - it's your project's knowledge base.
|
package/commands/mdd-build.md
CHANGED
|
@@ -610,7 +610,15 @@ where the agent patches the wrong thing because it accepted an external excuse t
|
|
|
610
610
|
- `last_synced: <today>`
|
|
611
611
|
- `mdd_version: <current from mdd.md frontmatter>`
|
|
612
612
|
|
|
613
|
-
2.
|
|
613
|
+
2. **Regenerate `.mdd/connections.md`:**
|
|
614
|
+
Read all `.mdd/docs/*.md` (excluding `archive/`) — frontmatter only (id, title, status, path, depends_on, source_files). Never read doc bodies. Then:
|
|
615
|
+
- **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>`.
|
|
616
|
+
- **Mermaid graph:** one node per doc (short node ID), one `-->` edge per `depends_on` entry, `:::<status>` suffix on each node. Include `classDef` block for complete/in_progress/draft/deprecated.
|
|
617
|
+
- **Source overlap:** map source_file → docs that reference it. Include only files with 2+ docs.
|
|
618
|
+
- **Warnings:** broken `depends_on` refs, circular deps, docs missing `path`.
|
|
619
|
+
- **Write** `.mdd/connections.md` with YAML frontmatter (`generated: <today>`, `doc_count`, `connection_count`, `overlap_count`) and four sections: Path Tree, Dependency Graph, Source File Overlap, Warnings.
|
|
620
|
+
|
|
621
|
+
3. Display the completion signal:
|
|
614
622
|
```
|
|
615
623
|
✅ MDD Complete: <Feature Name>
|
|
616
624
|
|
|
@@ -621,6 +629,7 @@ Blocks: <N>/<N> complete
|
|
|
621
629
|
Tests: <N>/<N> passing
|
|
622
630
|
Integration: verified (<feature type> — real environment)
|
|
623
631
|
Typecheck: clean
|
|
632
|
+
Connections: .mdd/connections.md updated
|
|
624
633
|
|
|
625
634
|
New patterns established: <any new rules worth adding to CLAUDE.md>
|
|
626
635
|
|
|
@@ -12,9 +12,34 @@ 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: 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
43
|
|
|
19
44
|
---
|
|
20
45
|
|
|
@@ -181,6 +206,16 @@ Trigger the `.mdd/.startup.md` rebuild:
|
|
|
181
206
|
- Preserve the Notes zone exactly as-is
|
|
182
207
|
- Update the generated date and current branch
|
|
183
208
|
|
|
209
|
+
Then regenerate connections.md:
|
|
210
|
+
|
|
211
|
+
**Regenerate `.mdd/connections.md`:**
|
|
212
|
+
Read all `.mdd/docs/*.md` (excluding `archive/`) — frontmatter only (id, title, status, path, depends_on, source_files). Never read doc bodies. Then:
|
|
213
|
+
- **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>`.
|
|
214
|
+
- **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`.
|
|
215
|
+
- **Source overlap:** build map of source_file → docs that reference it. Include only files with 2+ docs.
|
|
216
|
+
- **Warnings:** broken `depends_on` refs (target doesn't exist), circular dependencies, docs missing `path`.
|
|
217
|
+
- **Write** `.mdd/connections.md` with YAML frontmatter (`generated: <today>`, `doc_count: <N>`, `connection_count: <N>`, `overlap_count: <N>`) and four sections: Path Tree, Dependency Graph (Mermaid), Source File Overlap, Warnings.
|
|
218
|
+
|
|
184
219
|
Then report:
|
|
185
220
|
|
|
186
221
|
```
|
|
@@ -196,6 +231,7 @@ Docs created:
|
|
|
196
231
|
...
|
|
197
232
|
|
|
198
233
|
Startup: .mdd/.startup.md rebuilt
|
|
234
|
+
Connections: .mdd/connections.md updated
|
|
199
235
|
|
|
200
236
|
Next steps:
|
|
201
237
|
/mdd <NN> — start building any imported feature
|
|
@@ -348,7 +348,14 @@ After all patches are applied:
|
|
|
348
348
|
|
|
349
349
|
1. Re-scan `.mdd/docs/*.md` — confirm 0 docs have missing `last_synced` or `path`
|
|
350
350
|
2. Trigger the `.mdd/.startup.md` rebuild (same logic as Status Mode)
|
|
351
|
-
3.
|
|
351
|
+
3. **Regenerate `.mdd/connections.md`:**
|
|
352
|
+
Read all `.mdd/docs/*.md` (excluding `archive/`) — frontmatter only (id, title, status, path, depends_on, source_files). Never read doc bodies. Then:
|
|
353
|
+
- **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>`.
|
|
354
|
+
- **Mermaid graph:** one node per doc (short node ID), one `-->` edge per `depends_on` entry, `:::<status>` suffix on each node. Include `classDef` block for complete/in_progress/draft/deprecated.
|
|
355
|
+
- **Source overlap:** map source_file → docs that reference it. Include only files with 2+ docs.
|
|
356
|
+
- **Warnings:** broken `depends_on` refs, circular deps, docs missing `path`.
|
|
357
|
+
- **Write** `.mdd/connections.md` with YAML frontmatter (`generated: <today>`, `doc_count`, `connection_count`, `overlap_count`) and four sections: Path Tree, Dependency Graph, Source File Overlap, Warnings.
|
|
358
|
+
4. Report:
|
|
352
359
|
|
|
353
360
|
```
|
|
354
361
|
✅ MDD Upgrade Complete
|
|
@@ -359,6 +366,7 @@ Fields added:
|
|
|
359
366
|
status — <N> docs
|
|
360
367
|
phase — <N> docs
|
|
361
368
|
Docs skipped: <N> (all fields already present)
|
|
369
|
+
connections.md: updated (<N> docs, <N> edges)
|
|
362
370
|
|
|
363
371
|
Run `/mdd scan` to see current drift status across all docs.
|
|
364
372
|
```
|
package/commands/mdd-manage.md
CHANGED
|
@@ -70,6 +70,15 @@ After collecting status, rebuild the auto-generated zone of `.mdd/.startup.md`:
|
|
|
70
70
|
3. Write the rebuilt auto-generated section + `---` divider + preserved Notes section back to `.mdd/.startup.md`. Update `mdd_version` in the file's frontmatter to current.
|
|
71
71
|
4. If no `.mdd/.startup.md` exists yet, create it fresh using the template with an empty Notes section, stamped with current `mdd_version`.
|
|
72
72
|
|
|
73
|
+
### Check `.mdd/connections.md` Freshness
|
|
74
|
+
|
|
75
|
+
After rebuilding `.startup.md`, check connections.md:
|
|
76
|
+
|
|
77
|
+
1. If `.mdd/connections.md` does not exist → report: `⚠️ connections.md missing — run /mdd connect to generate`
|
|
78
|
+
2. Read `generated:` date from connections.md frontmatter. Find the most recent `last_synced` date across all docs.
|
|
79
|
+
- If `generated` < most recent `last_synced` → report: `⚠️ connections.md stale (generated: <X>, newest doc synced: <Y>) — run /mdd connect`
|
|
80
|
+
- If up to date → report: `✅ connections.md current (generated: <X>, <N> docs, <N> edges)`
|
|
81
|
+
|
|
73
82
|
---
|
|
74
83
|
|
|
75
84
|
## NOTE MODE — `/mdd note`
|
|
@@ -184,6 +193,7 @@ Recommended actions:
|
|
|
184
193
|
/mdd update 07 — fix broken file reference
|
|
185
194
|
/mdd update 09 — add last_synced by running update mode
|
|
186
195
|
/mdd upgrade — add path field to <N> docs missing it ← omit this line when there are no docs missing path
|
|
196
|
+
/mdd connect — rebuild connections.md if stale or missing
|
|
187
197
|
```
|
|
188
198
|
|
|
189
199
|
**Initiative/wave drift check** (only shown if `.mdd/initiatives/` exists):
|
|
@@ -210,6 +220,13 @@ Ops Runbooks:
|
|
|
210
220
|
⚠️ rulecatch-dokploy — runbook edited 3 days ago but no runop since → run /mdd runop rulecatch-dokploy
|
|
211
221
|
```
|
|
212
222
|
|
|
223
|
+
**Connections map check:**
|
|
224
|
+
|
|
225
|
+
Check `.mdd/connections.md`:
|
|
226
|
+
- Missing → classify as `broken` and include in findings: `❌ connections.md — missing (run /mdd connect)`
|
|
227
|
+
- `generated:` older than most recent `last_synced` → classify as `drifted`: `⚠️ connections.md — stale (run /mdd connect)`
|
|
228
|
+
- Up to date → `✅ connections.md — current`
|
|
229
|
+
|
|
213
230
|
Save the full report to `.mdd/audits/scan-<date>.md`.
|
|
214
231
|
|
|
215
232
|
---
|
|
@@ -287,6 +304,16 @@ New test skeletons: <N> appended to tests/unit/<feature-name>.test.ts
|
|
|
287
304
|
Branch: <current branch>
|
|
288
305
|
```
|
|
289
306
|
|
|
307
|
+
After updating the doc, regenerate connections.md:
|
|
308
|
+
|
|
309
|
+
**Regenerate `.mdd/connections.md`:**
|
|
310
|
+
Read all `.mdd/docs/*.md` (excluding `archive/`) — frontmatter only (id, title, status, path, depends_on, source_files). Never read doc bodies. Then:
|
|
311
|
+
1. **Path tree:** sort docs by path alphabetically, then by id within the same path. Render as an indented tree using `├──` / `└──` characters. Each leaf line: `<path-leaf-segment> <id> <status>`.
|
|
312
|
+
2. **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`.
|
|
313
|
+
3. **Source overlap:** build a map of source_file → docs that reference it. Include only files with 2+ docs.
|
|
314
|
+
4. **Warnings:** flag broken `depends_on` references (target does not exist), circular dependencies, docs missing `path` field.
|
|
315
|
+
5. **Write** `.mdd/connections.md` with YAML frontmatter (`generated: <today>`, `doc_count: <N>`, `connection_count: <N edges>`, `overlap_count: <N overlap files>`) followed by four sections: Path Tree, Dependency Graph (Mermaid), Source File Overlap, Warnings.
|
|
316
|
+
|
|
290
317
|
---
|
|
291
318
|
|
|
292
319
|
## DEPRECATE MODE — `/mdd deprecate <feature-id>`
|
|
@@ -331,6 +358,16 @@ If user says yes:
|
|
|
331
358
|
5. Ask the user separately: "Delete source files? (yes / no)" and "Delete test files? (yes / no)" — never auto-delete.
|
|
332
359
|
6. Rebuild `.mdd/.startup.md`.
|
|
333
360
|
|
|
361
|
+
Then regenerate connections.md:
|
|
362
|
+
|
|
363
|
+
**Regenerate `.mdd/connections.md`:**
|
|
364
|
+
Read all `.mdd/docs/*.md` (excluding `archive/`) — frontmatter only (id, title, status, path, depends_on, source_files). Never read doc bodies. Then:
|
|
365
|
+
1. **Path tree:** sort docs by path alphabetically, then by id within the same path. Render as an indented tree using `├──` / `└──` characters. Each leaf line: `<path-leaf-segment> <id> <status>`.
|
|
366
|
+
2. **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`.
|
|
367
|
+
3. **Source overlap:** build a map of source_file → docs that reference it. Include only files with 2+ docs.
|
|
368
|
+
4. **Warnings:** flag broken `depends_on` references (target does not exist), circular dependencies, docs missing `path` field.
|
|
369
|
+
5. **Write** `.mdd/connections.md` with YAML frontmatter (`generated: <today>`, `doc_count: <N>`, `connection_count: <N edges>`, `overlap_count: <N overlap files>`) followed by four sections: Path Tree, Dependency Graph (Mermaid), Source File Overlap, Warnings.
|
|
370
|
+
|
|
334
371
|
Report:
|
|
335
372
|
```
|
|
336
373
|
✅ Deprecated: <NN>-<feature-name>
|
|
@@ -389,6 +426,16 @@ For each doc missing `tags:` (or all docs if `--force`):
|
|
|
389
426
|
|
|
390
427
|
Trigger the `.mdd/.startup.md` rebuild (same logic as Status Mode — rebuild auto-generated zone, preserve Notes zone). The rebuilt startup now reflects tags on every feature and ops line.
|
|
391
428
|
|
|
429
|
+
Then regenerate connections.md:
|
|
430
|
+
|
|
431
|
+
**Regenerate `.mdd/connections.md`:**
|
|
432
|
+
Read all `.mdd/docs/*.md` (excluding `archive/`) — frontmatter only (id, title, status, path, depends_on, source_files). Never read doc bodies. Then:
|
|
433
|
+
1. **Path tree:** sort docs by path alphabetically, then by id within the same path. Render as an indented tree using `├──` / `└──` characters. Each leaf line: `<path-leaf-segment> <id> <status>`.
|
|
434
|
+
2. **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`.
|
|
435
|
+
3. **Source overlap:** build a map of source_file → docs that reference it. Include only files with 2+ docs.
|
|
436
|
+
4. **Warnings:** flag broken `depends_on` references (target does not exist), circular dependencies, docs missing `path` field.
|
|
437
|
+
5. **Write** `.mdd/connections.md` with YAML frontmatter (`generated: <today>`, `doc_count: <N>`, `connection_count: <N edges>`, `overlap_count: <N overlap files>`) followed by four sections: Path Tree, Dependency Graph (Mermaid), Source File Overlap, Warnings.
|
|
438
|
+
|
|
392
439
|
### Phase RT4 — Report
|
|
393
440
|
|
|
394
441
|
```
|
|
@@ -408,3 +455,27 @@ Run /mdd status to see the full updated startup snapshot.
|
|
|
408
455
|
```
|
|
409
456
|
|
|
410
457
|
---
|
|
458
|
+
|
|
459
|
+
## CONNECT MODE — `/mdd connect`
|
|
460
|
+
|
|
461
|
+
Triggered when arguments start with `connect`. Performs a full rebuild of `.mdd/connections.md` unconditionally — no staleness check, always regenerates from scratch.
|
|
462
|
+
|
|
463
|
+
**Regenerate `.mdd/connections.md`:**
|
|
464
|
+
Read all `.mdd/docs/*.md` (excluding `archive/`) — frontmatter only (id, title, status, path, depends_on, source_files). Never read doc bodies. Then:
|
|
465
|
+
1. **Path tree:** sort docs by path alphabetically, then by id within the same path. Render as an indented tree using `├──` / `└──` characters. Each leaf line: `<path-leaf-segment> <id> <status>`.
|
|
466
|
+
2. **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`.
|
|
467
|
+
3. **Source overlap:** build a map of source_file → docs that reference it. Include only files with 2+ docs.
|
|
468
|
+
4. **Warnings:** flag broken `depends_on` references (target does not exist), circular dependencies, docs missing `path` field.
|
|
469
|
+
5. **Write** `.mdd/connections.md` with YAML frontmatter (`generated: <today>`, `doc_count: <N>`, `connection_count: <N edges>`, `overlap_count: <N overlap files>`) followed by four sections: Path Tree, Dependency Graph (Mermaid), Source File Overlap, Warnings.
|
|
470
|
+
|
|
471
|
+
Report when done:
|
|
472
|
+
```
|
|
473
|
+
🔗 connections.md rebuilt
|
|
474
|
+
|
|
475
|
+
Docs: <N>
|
|
476
|
+
Dependency edges: <N>
|
|
477
|
+
Source overlaps: <N files referenced by 2+ docs>
|
|
478
|
+
Warnings: <N> (or "none")
|
|
479
|
+
|
|
480
|
+
✅ .mdd/connections.md updated (<today>)
|
|
481
|
+
```
|
package/commands/mdd-plan.md
CHANGED
|
@@ -262,6 +262,16 @@ When all features are `complete`:
|
|
|
262
262
|
- `mdd_version: <current from mdd.md frontmatter>`
|
|
263
263
|
6. Rebuild `.mdd/.startup.md`.
|
|
264
264
|
|
|
265
|
+
Then regenerate connections.md:
|
|
266
|
+
|
|
267
|
+
**Regenerate `.mdd/connections.md`:**
|
|
268
|
+
Read all `.mdd/docs/*.md` (excluding `archive/`) — frontmatter only (id, title, status, path, depends_on, source_files). Never read doc bodies. Then:
|
|
269
|
+
- **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>`.
|
|
270
|
+
- **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`.
|
|
271
|
+
- **Source overlap:** build map of source_file → docs that reference it. Include only files with 2+ docs.
|
|
272
|
+
- **Warnings:** broken `depends_on` refs (target doesn't exist), circular dependencies, docs missing `path`.
|
|
273
|
+
- **Write** `.mdd/connections.md` with YAML frontmatter (`generated: <today>`, `doc_count: <N>`, `connection_count: <N>`, `overlap_count: <N>`) and four sections: Path Tree, Dependency Graph (Mermaid), Source File Overlap, Warnings.
|
|
274
|
+
|
|
265
275
|
---
|
|
266
276
|
|
|
267
277
|
## PLAN-SYNC MODE — `/mdd plan-sync`
|
package/commands/mdd.md
CHANGED
|
@@ -115,7 +115,7 @@ Use whichever path contains `mdd-audit.md`. Store it as `$MDD_DIR` and use it fo
|
|
|
115
115
|
- If arguments start with `audit` →
|
|
116
116
|
**Read `$MDD_DIR/mdd-audit.md` then follow its AUDIT MODE instructions.**
|
|
117
117
|
|
|
118
|
-
- If arguments start with `status`, `note`, `scan`, `update`, `deprecate`,
|
|
118
|
+
- If arguments start with `status`, `note`, `scan`, `update`, `deprecate`, `rebuild-tags`, or `connect` →
|
|
119
119
|
**Read `$MDD_DIR/mdd-manage.md` then follow the relevant mode instructions.**
|
|
120
120
|
|
|
121
121
|
- If arguments start with `import-spec` →
|