mddd-cli 1.0.12 → 1.0.13

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.
Files changed (2) hide show
  1. package/bin/cli.js +3 -2
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -40,7 +40,7 @@ function findClosestMacro(currentDir) {
40
40
  program
41
41
  .name('md')
42
42
  .description('Manager for co-located specifications for Mermaid Diagram Driven Development (MDDD)')
43
- .version('1.0.12');
43
+ .version('1.0.13');
44
44
 
45
45
  // ==========================================
46
46
  // COMMAND: md init
@@ -116,7 +116,8 @@ Operational instructions for reverse engineering and legacy code analysis:
116
116
  - If the code is clean and modular: Write a Mermaid diagram corresponding to the current state of the code (v1.0.0).
117
117
  - If the code is chaotic/coupled: Draw the Mermaid diagram of how the flow SHOULD ideally be restructured for future implementation. Do NOT modify the audited code file.
118
118
  4. WRITE TO SPEC FILE: Write ALL results — the technical analysis report, the generated diagram (in code fences), and any decision tables — directly into the co-located \`.spec.md\` file found at the path printed by the \`md audit\` command. Insert the analysis strictly inside the \`<details><summary>Audit History</summary>\` tag at the end of that file. Never pollute the main scope with drafts. If the spec file has empty sections, fill them with the retroactive content.
119
- 5. CODE IMMUTABILITY: You are FORBIDDEN from changing, refactoring, or editing the audited code file. Only the \`md-impl\` command/skill is authorized to modify production code based on a signed spec file. If the audit reveals the code needs refactoring, document the ideal diagram in the spec file and stop.`,
119
+ 5. CODE IMMUTABILITY: You are FORBIDDEN from changing, refactoring, or editing the audited code file. Only the \`md-impl\` command/skill is authorized to modify production code based on a signed spec file. If the audit reveals the code needs refactoring, document the ideal diagram in the spec file and stop.
120
+ - **Audit auto-repair rule:** Whenever the \`/md-audit\` command identifies a \`.dart\` (or equivalent production file) without a co-located \`[name].spec.md\`, the audit **must generate and write the missing spec file** as part of the audit output, before finalizing the report. The auto-generated spec must include at minimum: (a) \`SPEC_VERSION: v1.0.0\`, (b) a \`stateDiagram-v2\` derived from the code logic, and (c) a Decision Matrix when conditional branches exist.`,
120
121
 
121
122
  'md-impl': `[ROLE: SOFTWARE ENGINEER] [STRICT CONTRACT]
122
123
  Operational instructions for generating production code and unit tests:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mddd-cli",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "description": "Official CLI for modular, co-located, and versioned Mermaid Diagram Driven Development (MDDD).",
5
5
  "main": "bin/cli.js",
6
6
  "type": "module",