@thedecipherist/mdd 1.7.0 → 1.7.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.
@@ -2,20 +2,12 @@
2
2
 
3
3
  Triggered when arguments start with `audit`.
4
4
 
5
- ## Phase Logging
6
-
7
- At the **start** of every phase (before any action) and the **end** of every phase (after all actions), run the command below. Substitute `PHASE` with the phase identifier (e.g., `Phase A1`, `Phase A2`) and `EVENT` with `start` or `end`:
5
+ ### Phase A1 — Scope
8
6
 
9
7
  ```bash
10
- bash -c 'D=$(date +%Y-%m-%d); T=$(date +%H:%M:%S); K=$(compressmcp --status 2>/dev/null | grep -oE "[0-9]+K/[0-9]+K" | head -1 || echo "-"); mkdir -p ~/.claude/mdd; printf "| %s | mdd-audit | PHASE | EVENT | %s | %s |\n" "$D" "$T" "$K" >> ~/.claude/mdd/log.md' 2>/dev/null || true
8
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-audit" "Phase A1" start "$AUDIT_TARGET"
11
9
  ```
12
10
 
13
- Log file: `~/.claude/mdd/log.md`
14
-
15
- ---
16
-
17
- ### Phase A1 — Scope
18
-
19
11
  **Stale job detection (runs first):** Check `.mdd/jobs/` for any existing `audit-*/` folder.
20
12
  - If found: check whether a corresponding `audits/report-<date>.md` exists.
21
13
  - If yes: job completed but cleanup failed — delete the stale jobs folder and proceed normally.
@@ -106,8 +98,16 @@ Create `.mdd/jobs/audit-<date>/` and write `MANIFEST.md`:
106
98
 
107
99
  ---
108
100
 
101
+
102
+ ```bash
103
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-audit" "Phase A1" end "$AUDIT_TARGET"
104
+ ```
109
105
  ### Phase A2 — Per-Agent Config Setup
110
106
 
107
+ ```bash
108
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-audit" "Phase A2" start "$AUDIT_TARGET"
109
+ ```
110
+
111
111
  Main writes a shard file and config file for each agent into the job folder **before spawning anything**.
112
112
 
113
113
  **`shard-N.md`** — flat list of files assigned to this agent, extracted from the manifest. The agent uses this to know its scope without parsing the full manifest.
@@ -217,8 +217,16 @@ This config file contains no source code or findings — only paths and instruct
217
217
 
218
218
  ---
219
219
 
220
+
221
+ ```bash
222
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-audit" "Phase A2" end "$AUDIT_TARGET"
223
+ ```
220
224
  ### Phase A3 — Parallel Agent Execution
221
225
 
226
+ ```bash
227
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-audit" "Phase A3" start "$AUDIT_TARGET"
228
+ ```
229
+
222
230
  Main spawns all agents simultaneously. Each agent receives only the path to its config file.
223
231
 
224
232
  **Per-file loop (each agent follows exactly):**
@@ -264,8 +272,16 @@ shows no contracts apply to this file, write "(none)" — never omit the line en
264
272
 
265
273
  ---
266
274
 
275
+
276
+ ```bash
277
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-audit" "Phase A3" end "$AUDIT_TARGET"
278
+ ```
267
279
  ### Phase A4 — Convergence Check
268
280
 
281
+ ```bash
282
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-audit" "Phase A4" start "$AUDIT_TARGET"
283
+ ```
284
+
269
285
  After all agents signal completion, main reads `MANIFEST.md` and checks for any `[ ]` or `[~]` entries.
270
286
 
271
287
  - **`[ ]` entries:** agent never reached this file — re-run that agent's shard for remaining files
@@ -276,8 +292,16 @@ Audit does not advance to Phase A5 until every file is `[x]`, `[!]`, or `[e]`.
276
292
 
277
293
  ---
278
294
 
295
+
296
+ ```bash
297
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-audit" "Phase A4" end "$AUDIT_TARGET"
298
+ ```
279
299
  ### Phase A5 — Merge
280
300
 
301
+ ```bash
302
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-audit" "Phase A5" start "$AUDIT_TARGET"
303
+ ```
304
+
281
305
  Main merges all agent notes into the canonical output file:
282
306
 
283
307
  1. Read `MANIFEST.md` to get canonical file order
@@ -290,8 +314,16 @@ Merge is in manifest order, not agent completion order. The job folder is not to
290
314
 
291
315
  ---
292
316
 
317
+
318
+ ```bash
319
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-audit" "Phase A5" end "$AUDIT_TARGET"
320
+ ```
293
321
  ### Phase A6 — Analyze
294
322
 
323
+ ```bash
324
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-audit" "Phase A6" start "$AUDIT_TARGET"
325
+ ```
326
+
295
327
  Read `audits/notes-<date>.md` as the primary source. Produce `audits/report-<date>.md` — include `mdd_version: <current from mdd.md frontmatter>` as the first line of frontmatter.
296
328
 
297
329
  **Source code access in this phase:** Standard synthesis (items 1-8 below) uses only the notes file. The integration contract verification step that follows may re-read specific source files — that is the only exception, and it is mandatory.
@@ -338,8 +370,16 @@ The manifest is kept permanently in `audits/` — `[x]` vs `[!]` per file shows
338
370
 
339
371
  ---
340
372
 
373
+
374
+ ```bash
375
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-audit" "Phase A6" end "$AUDIT_TARGET"
376
+ ```
341
377
  ### Phase A7 — Present Findings + Fix
342
378
 
379
+ ```bash
380
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-audit" "Phase A7" start "$AUDIT_TARGET"
381
+ ```
382
+
343
383
  Show the user:
344
384
  ```
345
385
  🔍 MDD Audit Complete
@@ -385,8 +425,16 @@ Report progress per finding. Update documentation `known_issues` to remove fixed
385
425
 
386
426
  ---
387
427
 
428
+
429
+ ```bash
430
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-audit" "Phase A7" end "$AUDIT_TARGET"
431
+ ```
388
432
  ### Phase A8 — MDD Self-Review
389
433
 
434
+ ```bash
435
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-audit" "Phase A8" start "$AUDIT_TARGET"
436
+ ```
437
+
390
438
  Runs at the end of every audit, after fixes (or immediately after A7 if user chose not to fix now).
391
439
 
392
440
  **Opt-in gate — check before doing anything else:**
@@ -461,3 +509,12 @@ When running `/mdd audit <section>` with fewer than 10 resolved files, skip the
461
509
  **Integration context still applies in this mode.** Before starting the per-file loop, build `integration-context.md` into the job folder using the same logic as Phase A2 (read all `.mdd/docs/*.md`, extract contracts and feature-to-file mappings). Read `integration-context.md` at the start of the per-file loop and after every context clear — identical to the multi-agent startup sequence. The mandatory `Contracts:` line in notes applies here too.
462
510
 
463
511
  ---
512
+
513
+
514
+ ```bash
515
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-audit" "Phase A8" end "$AUDIT_TARGET"
516
+ ```
517
+
518
+ ```bash
519
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-audit" "-" "complete" "$AUDIT_TARGET"
520
+ ```
@@ -4,22 +4,12 @@
4
4
 
5
5
  The user is reporting a bug in an existing feature. Do NOT create a new feature doc.
6
6
 
7
- ## Phase Logging
8
-
9
- At the **start** of every phase (before any action) and the **end** of every phase (after all actions), run the command below. Substitute `PHASE` with the phase identifier (e.g., `Phase B0`, `Phase B1`) and `EVENT` with `start` or `end`:
7
+ ### Phase B0 — Parse
10
8
 
11
9
  ```bash
12
- bash -c 'D=$(date +%Y-%m-%d); T=$(date +%H:%M:%S); K=$(compressmcp --status 2>/dev/null | grep -oE "[0-9]+K/[0-9]+K" | head -1 || echo "-"); mkdir -p ~/.claude/mdd; printf "| %s | mdd-bug | PHASE | EVENT | %s | %s |\n" "$D" "$T" "$K" >> ~/.claude/mdd/log.md' 2>/dev/null || true
10
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-bug" "Phase B0" start "$BUG_SLUG"
13
11
  ```
14
12
 
15
- Log file: `~/.claude/mdd/log.md`
16
- Instead: scan existing docs to identify which feature(s) own the broken behavior,
17
- document the bug in those docs, fix it, and mark it complete.
18
-
19
- ---
20
-
21
- ### Phase B0 — Parse
22
-
23
13
  Extract the bug description from `$ARGUMENTS` by stripping the leading `bug ` prefix.
24
14
  Store as `$BUG_DESC`.
25
15
 
@@ -28,8 +18,16 @@ If `$BUG_DESC` is empty after stripping, ask the user:
28
18
 
29
19
  ---
30
20
 
21
+
22
+ ```bash
23
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-bug" "Phase B0" end "$BUG_SLUG"
24
+ ```
31
25
  ### Phase B1 — Triage
32
26
 
27
+ ```bash
28
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-bug" "Phase B1" start "$BUG_SLUG"
29
+ ```
30
+
33
31
  Read the frontmatter of every file in `.mdd/docs/` (excluding `archive/` subdirectory).
34
32
  Do **not** read doc bodies during triage — frontmatter only. You need: `id`, `title`, `tags`, `source_files`.
35
33
 
@@ -65,8 +63,16 @@ Run /mdd status to see the full project overview.
65
63
 
66
64
  ---
67
65
 
66
+
67
+ ```bash
68
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-bug" "Phase B1" end "$BUG_SLUG"
69
+ ```
68
70
  ### Phase B2 — Confirm Related Docs
69
71
 
72
+ ```bash
73
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-bug" "Phase B2" start "$BUG_SLUG"
74
+ ```
75
+
70
76
  Present the triage results and ask the user to confirm which docs the bug relates to.
71
77
  Always show the full doc list so the user can add docs that scored below the threshold.
72
78
 
@@ -88,8 +94,16 @@ Store the confirmed list as `$RELATED_DOCS`.
88
94
 
89
95
  ---
90
96
 
97
+
98
+ ```bash
99
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-bug" "Phase B2" end "$BUG_SLUG"
100
+ ```
91
101
  ### Phase B3 — Document the Bug
92
102
 
103
+ ```bash
104
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-bug" "Phase B3" start "$BUG_SLUG"
105
+ ```
106
+
93
107
  For each doc in `$RELATED_DOCS`:
94
108
 
95
109
  1. Read the full doc file
@@ -135,8 +149,16 @@ Store the bug IDs per doc as `$BUG_IDS` (map of doc-id → B-number) for use in
135
149
 
136
150
  ---
137
151
 
152
+
153
+ ```bash
154
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-bug" "Phase B3" end "$BUG_SLUG"
155
+ ```
138
156
  ### Phase B4 — Fix
139
157
 
158
+ ```bash
159
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-bug" "Phase B4" start "$BUG_SLUG"
160
+ ```
161
+
140
162
  Ask the user via AskUserQuestion how to proceed with the fix:
141
163
 
142
164
  ```
@@ -202,8 +224,16 @@ At the end of Phase 7, return here to Phase B5 to mark the bug complete in the d
202
224
 
203
225
  ---
204
226
 
227
+
228
+ ```bash
229
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-bug" "Phase B4" end "$BUG_SLUG"
230
+ ```
205
231
  ### Phase B5 — Mark Complete
206
232
 
233
+ ```bash
234
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-bug" "Phase B5" start "$BUG_SLUG"
235
+ ```
236
+
207
237
  After the fix is verified (via either Path A or Path B), update every doc in `$RELATED_DOCS`:
208
238
 
209
239
  For each doc, find the bug entry created in Phase B3 (use `$BUG_IDS` to find the right B-number):
@@ -258,3 +288,12 @@ Options:
258
288
  ```
259
289
 
260
290
  Follow the same commit/merge logic as BUILD MODE Phase 7d.
291
+
292
+
293
+ ```bash
294
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-bug" "Phase B5" end "$BUG_SLUG"
295
+ ```
296
+
297
+ ```bash
298
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-bug" "-" "complete" "$BUG_SLUG"
299
+ ```
@@ -1,19 +1,11 @@
1
1
  ## BUILD MODE — New Feature Development
2
2
 
3
- ## Phase Logging
4
-
5
- At the **start** of every phase (before any action) and the **end** of every phase (after all actions), run the command below. Substitute `PHASE` with the phase identifier (e.g., `Phase 0`, `Phase 1`) and `EVENT` with `start` or `end`:
3
+ ### Phase 0 — Branch Safety Check
6
4
 
7
5
  ```bash
8
- bash -c 'D=$(date +%Y-%m-%d); T=$(date +%H:%M:%S); K=$(compressmcp --status 2>/dev/null | grep -oE "[0-9]+K/[0-9]+K" | head -1 || echo "-"); mkdir -p ~/.claude/mdd; printf "| %s | mdd-build | PHASE | EVENT | %s | %s |\n" "$D" "$T" "$K" >> ~/.claude/mdd/log.md' 2>/dev/null || true
6
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-build" "Phase 0" start "$FEATURE_SLUG"
9
7
  ```
10
8
 
11
- Log file: `~/.claude/mdd/log.md`
12
-
13
- ---
14
-
15
- ### Phase 0 — Branch Safety Check
16
-
17
9
  Before gathering any context, verify the current branch is compatible with the requested feature.
18
10
 
19
11
  ```bash
@@ -75,8 +67,16 @@ What would you like to do?
75
67
  - Report: "Aborted. Commit your current work, merge `<branch-name>` to main, then re-run `/mdd $ARGUMENTS` on a fresh branch."
76
68
  - Stop.
77
69
 
70
+
71
+ ```bash
72
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-build" "Phase 0" end "$FEATURE_SLUG"
73
+ ```
78
74
  ### Phase 1 — Understand the Feature
79
75
 
76
+ ```bash
77
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-build" "Phase 1" start "$FEATURE_SLUG"
78
+ ```
79
+
80
80
  Read the user's description: **$ARGUMENTS**
81
81
 
82
82
  Before writing anything, gather context using **3 parallel Explore agents**. Launch all three simultaneously — do not wait for one before starting the others:
@@ -111,8 +111,16 @@ Then ask the user targeted questions using AskUserQuestion. Ask ALL relevant que
111
111
 
112
112
  Wait for all answers before proceeding.
113
113
 
114
+
115
+ ```bash
116
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-build" "Phase 1" end "$FEATURE_SLUG"
117
+ ```
114
118
  ### Phase 2 — Data Flow & Impact Analysis
115
119
 
120
+ ```bash
121
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-build" "Phase 2" start "$FEATURE_SLUG"
122
+ ```
123
+
116
124
  **Skip condition:** If `.mdd/docs/` has no existing files AND `src/` has fewer than 5 source files, skip this phase entirely and note: "Greenfield detected — skipping data flow analysis." Then jump to Phase 3.
117
125
 
118
126
  Otherwise, use the answers from Phase 1 (depends_on, endpoints, models) to identify which existing files to read. Do NOT scan blindly — read only what the feature will touch or extend.
@@ -176,8 +184,16 @@ Ask the user: **"Proceed with documentation? (yes / adjust scope based on findin
176
184
 
177
185
  **This gate is mandatory.** Do not proceed to Phase 3 until the user confirms. If consistency issues were found, discuss whether to fix them as part of this feature or track them as pre-existing known issues first.
178
186
 
187
+
188
+ ```bash
189
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-build" "Phase 2" end "$FEATURE_SLUG"
190
+ ```
179
191
  ### Phase 3 — Write the MDD Documentation
180
192
 
193
+ ```bash
194
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-build" "Phase 3" start "$FEATURE_SLUG"
195
+ ```
196
+
181
197
  Create the feature documentation file at `.mdd/docs/<NN>-<feature-name>.md`.
182
198
 
183
199
  **Auto-number:** Read `.mdd/docs/` directory, find the highest existing number, increment by 1.
@@ -318,8 +334,16 @@ Show the completed doc to the user and ask: **"Does this accurately describe wha
318
334
 
319
335
  Wait for confirmation before proceeding.
320
336
 
337
+
338
+ ```bash
339
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-build" "Phase 3" end "$FEATURE_SLUG"
340
+ ```
321
341
  ### Phase 4 — Generate Test Skeletons
322
342
 
343
+ ```bash
344
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-build" "Phase 4" start "$FEATURE_SLUG"
345
+ ```
346
+
323
347
  Read the documentation file created in Phase 3. From the endpoints, business rules, and edge cases documented, generate test skeletons.
324
348
 
325
349
  **Skeleton template (unit):**
@@ -382,8 +406,16 @@ That's the point — they're the finish line.
382
406
 
383
407
  ---
384
408
 
409
+
410
+ ```bash
411
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-build" "Phase 4" end "$FEATURE_SLUG"
412
+ ```
385
413
  ### Phase 4b — Red Gate (mandatory)
386
414
 
415
+ ```bash
416
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-build" "Phase 4b" start "$FEATURE_SLUG"
417
+ ```
418
+
387
419
  **No skip condition.** This phase runs after every skeleton generation, every time.
388
420
 
389
421
  Run ONLY the new test file(s) — not the full suite:
@@ -422,8 +454,16 @@ If any test passes unexpectedly and the fix isn't trivial, ask the user:
422
454
  Proceed with fix? (yes / adjust differently / stop)
423
455
  ```
424
456
 
457
+
458
+ ```bash
459
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-build" "Phase 4b" end "$FEATURE_SLUG"
460
+ ```
425
461
  ### Phase 5 — Present the Build Plan
426
462
 
463
+ ```bash
464
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-build" "Phase 5" start "$FEATURE_SLUG"
465
+ ```
466
+
427
467
  **Auto-detect feature size** before choosing plan format:
428
468
 
429
469
  - **Simple** — fewer than 3 new files, no API routes, no database: use flat steps (block overhead not warranted)
@@ -525,8 +565,16 @@ Ready to build? (yes / modify plan / stop here)
525
565
 
526
566
  Wait for user confirmation.
527
567
 
568
+
569
+ ```bash
570
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-build" "Phase 5" end "$FEATURE_SLUG"
571
+ ```
528
572
  ### Phase 6 — Implement (Test-Driven)
529
573
 
574
+ ```bash
575
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-build" "Phase 6" start "$FEATURE_SLUG"
576
+ ```
577
+
530
578
  #### Step 6a — Layered execution
531
579
 
532
580
  Execute blocks in dependency layer order (Layer 1 → 2 → 3 → 4). Within the same layer, blocks marked `Runs in: parallel agents (2)` run simultaneously. Blocks marked `Runs in: main conversation` run sequentially.
@@ -606,8 +654,16 @@ Block 2 (Services): ✅ — 8/8 tests passing, no regressions
606
654
  Block 3 (Wiring): 🔄 in progress...
607
655
  ```
608
656
 
657
+
658
+ ```bash
659
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-build" "Phase 6" end "$FEATURE_SLUG"
660
+ ```
609
661
  ### Phase 7 — Verify + Report
610
662
 
663
+ ```bash
664
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-build" "Phase 7" start "$FEATURE_SLUG"
665
+ ```
666
+
611
667
  #### Phase 7a — Quality Gates
612
668
 
613
669
  ```bash
@@ -802,3 +858,12 @@ Changes: <N files changed, N insertions, N deletions> (from git diff --stat)
802
858
  Report: "Skipped. Branch `feat/<feature-name>` — run `/commit` and then merge when ready."
803
859
 
804
860
  ---
861
+
862
+
863
+ ```bash
864
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-build" "Phase 7" end "$FEATURE_SLUG"
865
+ ```
866
+
867
+ ```bash
868
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-build" "-" "complete" "$FEATURE_SLUG"
869
+ ```
@@ -2,24 +2,16 @@
2
2
 
3
3
  Routes to one of three sub-modes based on the command used.
4
4
 
5
- ## Phase Logging
6
-
7
- At the **start** of every step (before any action) and the **end** of every step (after all actions), run the command below. Substitute `PHASE` with the step identifier (e.g., `Step 1`, `Step 3`) and `EVENT` with `start` or `end`:
8
-
9
- ```bash
10
- bash -c 'D=$(date +%Y-%m-%d); T=$(date +%H:%M:%S); K=$(compressmcp --status 2>/dev/null | grep -oE "[0-9]+K/[0-9]+K" | head -1 || echo "-"); mkdir -p ~/.claude/mdd; printf "| %s | mdd-framework | PHASE | EVENT | %s | %s |\n" "$D" "$T" "$K" >> ~/.claude/mdd/log.md' 2>/dev/null || true
11
- ```
12
-
13
- Log file: `~/.claude/mdd/log.md`
14
-
15
- ---
16
-
17
5
  ## `framework <feature>` — Add a Module to mdd-ecommerce
18
6
 
19
7
  **$ARGUMENTS** is the feature description.
20
8
 
21
9
  ### Step 1 - Run normal BUILD MODE
22
10
 
11
+ ```bash
12
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-framework" "fw-Step 1" start "$FEATURE_SLUG"
13
+ ```
14
+
23
15
  Read `$MDD_DIR/mdd-build.md` and follow every phase (branch check, context gather, questions, doc, implementation, tests). All standard MDD rules apply.
24
16
 
25
17
  Apply these additional constraints throughout:
@@ -63,14 +55,34 @@ Use `skeleton-ready` when the module compiles but is not yet connected to real d
63
55
 
64
56
  **$ARGUMENTS** is the path to a completed proposal markdown file.
65
57
 
58
+
59
+ ```bash
60
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-framework" "fw-Step 1" end "$FEATURE_SLUG"
61
+ ```
62
+
63
+ ```bash
64
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-framework" "-" "complete" "$FEATURE_SLUG"
65
+ ```
66
66
  ### Step 1 - Read the proposal
67
67
 
68
+ ```bash
69
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-framework" "ic-Step 1" start "$FEATURE_SLUG"
70
+ ```
71
+
68
72
  Read the file at `$ARGUMENTS`. If `$ARGUMENTS` is empty, ask: "What is the path to the proposal file?"
69
73
 
70
74
  Stop if the file does not exist. Report the path and ask the user to check it.
71
75
 
76
+
77
+ ```bash
78
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-framework" "ic-Step 1" end "$FEATURE_SLUG"
79
+ ```
72
80
  ### Step 2 - Extract config values
73
81
 
82
+ ```bash
83
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-framework" "ic-Step 2" start "$FEATURE_SLUG"
84
+ ```
85
+
74
86
  Parse the proposal for these values:
75
87
 
76
88
  | Config key | Where to find it |
@@ -87,16 +99,32 @@ Parse the proposal for these values:
87
99
 
88
100
  If any required value is missing, list the gaps and ask the user to supply them before continuing.
89
101
 
102
+
103
+ ```bash
104
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-framework" "ic-Step 2" end "$FEATURE_SLUG"
105
+ ```
90
106
  ### Step 3 - Parse the product catalog
91
107
 
108
+ ```bash
109
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-framework" "ic-Step 3" start "$FEATURE_SLUG"
110
+ ```
111
+
92
112
  The proposal contains a markdown table with columns: `sku`, `mfr`, `name`, `description`, `brand`, `price`, `stock`.
93
113
 
94
114
  Extract every row. Convert `price` to integers (cents/öre - multiply by 100 and round). Build TypeScript seed data from this table.
95
115
 
96
116
  If the table is missing or empty, ask: "No products found in the catalog table. Add products to the proposal and re-run, or continue with an empty seed?"
97
117
 
118
+
119
+ ```bash
120
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-framework" "ic-Step 3" end "$FEATURE_SLUG"
121
+ ```
98
122
  ### Step 4 - Determine module wiring
99
123
 
124
+ ```bash
125
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-framework" "ic-Step 4" start "$FEATURE_SLUG"
126
+ ```
127
+
100
128
  Based on the feature flags extracted in Step 2, decide which `@thedecipherist/mdd-ecommerce-*` packages to import and wire into `site.config.ts`:
101
129
 
102
130
  - `newsletter: true` → include `@thedecipherist/mdd-ecommerce-newsletter`
@@ -105,8 +133,16 @@ Based on the feature flags extracted in Step 2, decide which `@thedecipherist/md
105
133
 
106
134
  Always include `@thedecipherist/mdd-ecommerce-core`.
107
135
 
136
+
137
+ ```bash
138
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-framework" "ic-Step 4" end "$FEATURE_SLUG"
139
+ ```
108
140
  ### Step 5 - Generate files
109
141
 
142
+ ```bash
143
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-framework" "ic-Step 5" start "$FEATURE_SLUG"
144
+ ```
145
+
110
146
  Write all files to the current working directory.
111
147
 
112
148
  **`site.config.ts`:**
@@ -162,8 +198,16 @@ NEXT_PUBLIC_RYBBIT_URL=https://app.rybbit.io
162
198
  # add any other vars from the main mdd-ecommerce .env.example
163
199
  ```
164
200
 
201
+
202
+ ```bash
203
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-framework" "ic-Step 5" end "$FEATURE_SLUG"
204
+ ```
165
205
  ### Step 6 - Report
166
206
 
207
+ ```bash
208
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-framework" "ic-Step 6" start "$FEATURE_SLUG"
209
+ ```
210
+
167
211
  List every file written with its path. Then output:
168
212
 
169
213
  ```
@@ -179,24 +223,60 @@ Next steps:
179
223
 
180
224
  Run this from the root of a client project directory.
181
225
 
226
+
227
+ ```bash
228
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-framework" "ic-Step 6" end "$FEATURE_SLUG"
229
+ ```
230
+
231
+ ```bash
232
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-framework" "-" "complete" "$FEATURE_SLUG"
233
+ ```
182
234
  ### Step 1 - Read package.json
183
235
 
236
+ ```bash
237
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-framework" "cs-Step 1" start "$FEATURE_SLUG"
238
+ ```
239
+
184
240
  Read `package.json` in the current directory. Find all dependencies and devDependencies whose names start with `@thedecipherist/mdd-ecommerce-`. List each with its pinned version.
185
241
 
186
242
  If no such dependencies exist, report: "No mdd-ecommerce packages found in package.json. Is this the right directory?"
187
243
 
244
+
245
+ ```bash
246
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-framework" "cs-Step 1" end "$FEATURE_SLUG"
247
+ ```
188
248
  ### Step 2 - Read site.config.ts
189
249
 
250
+ ```bash
251
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-framework" "cs-Step 2" start "$FEATURE_SLUG"
252
+ ```
253
+
190
254
  Read `site.config.ts`. Extract:
191
255
  - Which slots have modules wired (non-null slot values)
192
256
  - Which feature flags are `true`
193
257
 
258
+
259
+ ```bash
260
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-framework" "cs-Step 2" end "$FEATURE_SLUG"
261
+ ```
194
262
  ### Step 3 - Check MDD docs
195
263
 
264
+ ```bash
265
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-framework" "cs-Step 3" start "$FEATURE_SLUG"
266
+ ```
267
+
196
268
  Check if `.mdd/docs/` exists. If yes, count the `.md` files inside.
197
269
 
270
+
271
+ ```bash
272
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-framework" "cs-Step 3" end "$FEATURE_SLUG"
273
+ ```
198
274
  ### Step 4 - Output status table
199
275
 
276
+ ```bash
277
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-framework" "cs-Step 4" start "$FEATURE_SLUG"
278
+ ```
279
+
200
280
  ```
201
281
  mdd-ecommerce Client Status
202
282
  ============================
@@ -213,3 +293,12 @@ MDD docs: <N> files in .mdd/docs/ (or "directory not found")
213
293
  ```
214
294
 
215
295
  If `site.config.ts` does not exist, report that and skip slots/features rows.
296
+
297
+
298
+ ```bash
299
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-framework" "cs-Step 4" end "$FEATURE_SLUG"
300
+ ```
301
+
302
+ ```bash
303
+ bash ~/.claude/hooks/mdd-log-phase.sh "mdd-framework" "-" "complete" "$FEATURE_SLUG"
304
+ ```