@thedecipherist/mdd 1.6.1 → 1.6.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.
@@ -232,6 +232,12 @@ Read ONLY `audits/notes-<date>.md` (NOT source code again). Produce `audits/repo
232
232
  5. Fix plan with effort estimates and affected files per finding
233
233
  6. Root Cause Analysis — for each cluster of findings, explain WHY the code writer made the mistake (not just what is wrong). Common root causes: "security module built in isolation without integration contracts," "immutability described in spec but not enforced at the code level," "MCP tool written without a threat model," "node type added after transformation function was written."
234
234
  7. Prevention Rules — derive concrete, actionable rules that would have prevented each finding cluster. Format: "When implementing X, always Y. Never Z. Reasoning: [which finding caused this]." These rules are proposed for addition to CLAUDE.md at the end of the audit.
235
+ 8. MDD Workflow Self-Improvement — for each finding, ask: "Could the MDD audit criteria, build phase requirements, or doc field definitions have caught or prevented this?" Only flag patterns that would recur across different projects — skip purely project-specific issues (business logic, naming, one-off mistakes). Classify each as:
236
+ - `[criteria-gap]` — not covered by current audit criteria; suggest exact wording for a new P1/P2/P3/P4 rule
237
+ - `[criteria-ambiguous]` — covered in criteria but wording too vague to reliably catch; suggest sharper wording or a concrete example
238
+ - `[build-gap]` — the build phase doc or test requirements should have forced something that would have prevented this; suggest the exact addition to mdd-build.md
239
+ - `[doc-field-gap]` — a new feature doc frontmatter field would have surfaced this earlier; suggest the field name and schema
240
+ For each item, name the exact MDD file and section that needs changing.
235
241
 
236
242
  **Integration contract cross-check (in addition to per-file analysis):**
237
243
  After per-file analysis is complete, read all `.mdd/docs/*.md` and:
@@ -297,6 +303,70 @@ Report progress per finding. Update documentation `known_issues` to remove fixed
297
303
 
298
304
  ---
299
305
 
306
+ ### Phase A8 — MDD Self-Review
307
+
308
+ Runs at the end of every audit, after fixes (or immediately after A7 if user chose not to fix now).
309
+
310
+ **Step 1 — Extract self-improvement items**
311
+
312
+ Read the "MDD Workflow Self-Improvement" section from `audits/report-<date>.md`. If there are zero items, skip to Step 3 with a one-line note.
313
+
314
+ **Step 2 — Append to persistent learnings log**
315
+
316
+ Append to `.mdd/audits/mdd-learnings.md` (create if it does not exist):
317
+
318
+ ```markdown
319
+ ## <date> — <audit-scope> (<N> workflow items)
320
+
321
+ ### [<classification>] <short title>
322
+ - **Finding**: <what was found in the project>
323
+ - **Severity**: <P1/P2/P3/P4> — <N> instance(s)
324
+ - **Why MDD missed it**: <one sentence>
325
+ - **Suggested MDD change**: <exact rule wording or field name to add>
326
+ - **Affects**: `<mdd-file.md>` — <section name>
327
+ - **Status**: pending
328
+ ```
329
+
330
+ Classifications: `criteria-gap` | `criteria-ambiguous` | `build-gap` | `doc-field-gap`
331
+
332
+ Never overwrite existing entries. Each audit appends its own dated block. Entries with `Status: pending` are unactioned improvements waiting for a GitHub issue or patch.
333
+
334
+ **Step 3 — Present to user**
335
+
336
+ ```
337
+ 🔧 MDD Workflow Self-Review
338
+
339
+ <N> patterns found that MDD could prevent in future projects:
340
+
341
+ 1. [criteria-gap] <short title> — add P2 rule to mdd-audit.md
342
+ 2. [build-gap] <short title> — update Phase 3 docs in mdd-build.md
343
+ 3. [criteria-ambiguous] <short title> — sharpen P1 wording in mdd-audit.md
344
+ ...
345
+
346
+ Logged to: .mdd/audits/mdd-learnings.md
347
+
348
+ Open a GitHub issue for these improvements?
349
+ [Y] Yes — open issue at https://github.com/TheDecipherist/mdd/issues
350
+ [D] Draft — show me the issue text first
351
+ [N] No — skip for now
352
+ ```
353
+
354
+ **If user selects [Y] or [D]:**
355
+
356
+ Compose a GitHub issue with:
357
+ - **Title**: `Audit self-review: <N> workflow gaps found (<date>)`
358
+ - **Body**:
359
+ - One paragraph summary of the audit context (project type, scope)
360
+ - Numbered list of each improvement item with classification, the exact MDD file/section, and the suggested fix
361
+ - A "Proposed changes" section with ready-to-apply rule wording for each `criteria-gap` and `criteria-ambiguous` item
362
+
363
+ If [D]: display the draft and ask "Open this issue? (yes / edit / cancel)".
364
+ If [Y]: open the issue immediately using `gh issue create`.
365
+
366
+ After the issue is opened, update the `Status` field of each logged entry in `mdd-learnings.md` from `pending` to `issue: #<number>`.
367
+
368
+ ---
369
+
300
370
  ### Single-Feature Audit Mode
301
371
 
302
372
  When running `/mdd audit <section>` with fewer than 10 resolved files, skip the shard/config/agent system. Main conversation runs the per-file loop directly — context clear between each file, writing to a single `agent-1-notes.md` in the job folder. The job folder structure and completion sequence are otherwise identical.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thedecipherist/mdd",
3
- "version": "1.6.1",
3
+ "version": "1.6.2",
4
4
  "description": "MDD — Manual-Driven Development workflow for Claude Code",
5
5
  "type": "module",
6
6
  "bin": {