mustflow 1.30.0 → 2.11.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.
Files changed (82) hide show
  1. package/README.md +35 -11
  2. package/dist/cli/commands/classify.js +61 -6
  3. package/dist/cli/commands/contract-lint.js +13 -4
  4. package/dist/cli/commands/dashboard.js +6 -0
  5. package/dist/cli/commands/index.js +5 -0
  6. package/dist/cli/commands/run.js +224 -48
  7. package/dist/cli/commands/upgrade.js +65 -0
  8. package/dist/cli/commands/verify.js +550 -33
  9. package/dist/cli/i18n/en.js +73 -10
  10. package/dist/cli/i18n/es.js +73 -10
  11. package/dist/cli/i18n/fr.js +73 -10
  12. package/dist/cli/i18n/hi.js +73 -10
  13. package/dist/cli/i18n/ko.js +73 -10
  14. package/dist/cli/i18n/zh.js +73 -10
  15. package/dist/cli/index.js +27 -46
  16. package/dist/cli/lib/command-registry.js +5 -0
  17. package/dist/cli/lib/dashboard-export.js +62 -12
  18. package/dist/cli/lib/dashboard-html/client-script.js +1936 -0
  19. package/dist/cli/lib/dashboard-html/locale-bootstrap.js +8 -0
  20. package/dist/cli/lib/dashboard-html/styles.js +572 -0
  21. package/dist/cli/lib/dashboard-html/template.js +134 -0
  22. package/dist/cli/lib/dashboard-html/types.js +1 -0
  23. package/dist/cli/lib/dashboard-html.js +1 -1907
  24. package/dist/cli/lib/dashboard-locale.js +37 -0
  25. package/dist/cli/lib/local-index/constants.js +48 -0
  26. package/dist/cli/lib/local-index/index.js +2256 -0
  27. package/dist/cli/lib/local-index/sql.js +15 -0
  28. package/dist/cli/lib/local-index/types.js +1 -0
  29. package/dist/cli/lib/local-index.js +1 -1908
  30. package/dist/cli/lib/reporter.js +6 -0
  31. package/dist/cli/lib/run-plan.js +96 -4
  32. package/dist/cli/lib/templates.js +18 -1
  33. package/dist/cli/lib/validation/command-intents.js +11 -0
  34. package/dist/cli/lib/validation/constants.js +238 -0
  35. package/dist/cli/lib/validation/index.js +1384 -0
  36. package/dist/cli/lib/validation/primitives.js +198 -0
  37. package/dist/cli/lib/validation/test-selection.js +95 -0
  38. package/dist/cli/lib/validation/types.js +1 -0
  39. package/dist/cli/lib/validation.js +1 -1661
  40. package/dist/core/bounded-output.js +38 -0
  41. package/dist/core/change-classification.js +6 -2
  42. package/dist/core/change-verification.js +240 -6
  43. package/dist/core/check-issues.js +12 -0
  44. package/dist/core/command-contract-validation.js +20 -0
  45. package/dist/core/command-effects.js +13 -0
  46. package/dist/core/completion-verdict.js +209 -0
  47. package/dist/core/contract-lint.js +316 -7
  48. package/dist/core/dashboard-verification.js +8 -0
  49. package/dist/core/external-evidence.js +9 -0
  50. package/dist/core/public-json-contracts.js +28 -0
  51. package/dist/core/repeated-failure.js +17 -0
  52. package/dist/core/repro-evidence.js +53 -0
  53. package/dist/core/run-performance-history.js +307 -0
  54. package/dist/core/run-profile.js +87 -0
  55. package/dist/core/run-receipt.js +171 -4
  56. package/dist/core/run-write-drift.js +18 -2
  57. package/dist/core/scope-risk.js +64 -0
  58. package/dist/core/skill-route-alignment.js +110 -0
  59. package/dist/core/source-anchor-status.js +4 -1
  60. package/dist/core/test-selection.js +227 -0
  61. package/dist/core/validation-ratchet.js +52 -0
  62. package/dist/core/verification-decision-graph.js +67 -0
  63. package/dist/core/verification-evidence.js +249 -0
  64. package/dist/core/verification-scheduler.js +96 -2
  65. package/examples/README.md +12 -4
  66. package/package.json +1 -1
  67. package/schemas/README.md +18 -4
  68. package/schemas/change-verification-report.schema.json +169 -5
  69. package/schemas/commands.schema.json +51 -1
  70. package/schemas/contract-lint-report.schema.json +80 -0
  71. package/schemas/dashboard-export.schema.json +500 -0
  72. package/schemas/explain-report.schema.json +2 -0
  73. package/schemas/latest-run-pointer.schema.json +384 -0
  74. package/schemas/run-receipt.schema.json +113 -0
  75. package/schemas/test-selection.schema.json +81 -0
  76. package/schemas/verify-report.schema.json +361 -1
  77. package/schemas/verify-run-manifest.schema.json +410 -0
  78. package/templates/default/common/.mustflow/config/commands.toml +1 -1
  79. package/templates/default/i18n.toml +1 -1
  80. package/templates/default/locales/en/.mustflow/skills/INDEX.md +124 -29
  81. package/templates/default/locales/en/.mustflow/skills/routes.toml +289 -0
  82. package/templates/default/manifest.toml +29 -2
@@ -11,7 +11,12 @@
11
11
  "reason",
12
12
  "reasons",
13
13
  "plan_source",
14
+ "verification_plan_id",
14
15
  "status",
16
+ "completion_verdict",
17
+ "evidence_model",
18
+ "run_dir",
19
+ "manifest_path",
15
20
  "summary",
16
21
  "results"
17
22
  ],
@@ -25,7 +30,15 @@
25
30
  "items": { "type": "string" }
26
31
  },
27
32
  "plan_source": { "type": ["string", "null"] },
33
+ "verification_plan_id": {
34
+ "type": "string",
35
+ "pattern": "^sha256:[0-9a-f]{64}$"
36
+ },
28
37
  "status": { "enum": ["passed", "partial", "failed", "blocked"] },
38
+ "completion_verdict": { "$ref": "#/$defs/completionVerdict" },
39
+ "evidence_model": { "$ref": "#/$defs/evidenceModel" },
40
+ "run_dir": { "type": "string" },
41
+ "manifest_path": { "type": "string" },
29
42
  "summary": {
30
43
  "type": "object",
31
44
  "additionalProperties": false,
@@ -38,6 +51,11 @@
38
51
  "skipped": { "type": "integer" }
39
52
  }
40
53
  },
54
+ "repro_evidence": { "$ref": "#/$defs/reproEvidence" },
55
+ "external_checks": {
56
+ "type": "array",
57
+ "items": { "$ref": "#/$defs/externalCheck" }
58
+ },
41
59
  "results": {
42
60
  "type": "array",
43
61
  "items": {
@@ -50,6 +68,9 @@
50
68
  "reason",
51
69
  "detail",
52
70
  "exit_code",
71
+ "verification_plan_id",
72
+ "receipt_path",
73
+ "receipt_sha256",
53
74
  "receipt"
54
75
  ],
55
76
  "properties": {
@@ -59,7 +80,346 @@
59
80
  "reason": { "type": ["string", "null"] },
60
81
  "detail": { "type": ["string", "null"] },
61
82
  "exit_code": { "type": ["integer", "null"] },
62
- "receipt": { "type": ["object", "null"] }
83
+ "verification_plan_id": {
84
+ "type": ["string", "null"],
85
+ "pattern": "^sha256:[0-9a-f]{64}$"
86
+ },
87
+ "receipt_path": { "type": ["string", "null"] },
88
+ "receipt_sha256": {
89
+ "type": ["string", "null"],
90
+ "pattern": "^sha256:[0-9a-f]{64}$"
91
+ },
92
+ "receipt": {
93
+ "anyOf": [
94
+ { "$ref": "run-receipt.schema.json" },
95
+ { "type": "null" }
96
+ ]
97
+ }
98
+ }
99
+ }
100
+ }
101
+ },
102
+ "$defs": {
103
+ "completionVerdict": {
104
+ "type": "object",
105
+ "additionalProperties": false,
106
+ "required": ["schema_version", "status", "primary_reason", "evidence", "blockers", "contradictions", "limitations"],
107
+ "properties": {
108
+ "schema_version": { "const": "1" },
109
+ "status": { "enum": ["verified", "partially_verified", "unverified", "blocked", "contradicted"] },
110
+ "primary_reason": { "type": "string" },
111
+ "evidence": {
112
+ "type": "object",
113
+ "additionalProperties": false,
114
+ "required": [
115
+ "source",
116
+ "verification_plan_id",
117
+ "changed_file_count",
118
+ "matched_intents",
119
+ "ran_intents",
120
+ "passed_intents",
121
+ "failed_intents",
122
+ "skipped_intents",
123
+ "receipt_count",
124
+ "gap_count",
125
+ "source_anchor_risk_count",
126
+ "scope_diff_risk_count",
127
+ "repeated_failure_count",
128
+ "validation_ratchet_risk_count",
129
+ "latest_run_status"
130
+ ],
131
+ "properties": {
132
+ "source": { "enum": ["mf_verify", "dashboard_export"] },
133
+ "verification_plan_id": {
134
+ "type": ["string", "null"],
135
+ "pattern": "^sha256:[0-9a-f]{64}$"
136
+ },
137
+ "changed_file_count": { "type": ["integer", "null"] },
138
+ "matched_intents": { "type": "integer" },
139
+ "ran_intents": { "type": "integer" },
140
+ "passed_intents": { "type": "integer" },
141
+ "failed_intents": { "type": "integer" },
142
+ "skipped_intents": { "type": "integer" },
143
+ "receipt_count": { "type": "integer" },
144
+ "gap_count": { "type": "integer" },
145
+ "source_anchor_risk_count": { "type": "integer" },
146
+ "scope_diff_risk_count": { "type": "integer" },
147
+ "repeated_failure_count": { "type": "integer" },
148
+ "validation_ratchet_risk_count": { "type": "integer" },
149
+ "latest_run_status": { "type": ["string", "null"] }
150
+ }
151
+ },
152
+ "blockers": {
153
+ "type": "array",
154
+ "items": { "type": "string" }
155
+ },
156
+ "contradictions": {
157
+ "type": "array",
158
+ "items": { "type": "string" }
159
+ },
160
+ "limitations": {
161
+ "type": "array",
162
+ "items": { "type": "string" }
163
+ }
164
+ }
165
+ },
166
+ "evidenceModel": {
167
+ "type": "object",
168
+ "additionalProperties": false,
169
+ "required": [
170
+ "schema_version",
171
+ "source",
172
+ "verification_plan_id",
173
+ "requirements",
174
+ "coverage_matrix",
175
+ "receipts",
176
+ "skipped_checks",
177
+ "gaps",
178
+ "remaining_risks",
179
+ "explanation"
180
+ ],
181
+ "properties": {
182
+ "schema_version": { "const": "1" },
183
+ "source": { "enum": ["mf_verify", "dashboard_export"] },
184
+ "verification_plan_id": {
185
+ "type": ["string", "null"],
186
+ "pattern": "^sha256:[0-9a-f]{64}$"
187
+ },
188
+ "requirements": {
189
+ "type": "array",
190
+ "items": { "$ref": "#/$defs/evidenceRequirement" }
191
+ },
192
+ "coverage_matrix": {
193
+ "type": "array",
194
+ "items": { "$ref": "#/$defs/evidenceCoverageCriterion" }
195
+ },
196
+ "receipts": {
197
+ "type": "array",
198
+ "items": { "$ref": "#/$defs/evidenceReceipt" }
199
+ },
200
+ "skipped_checks": {
201
+ "type": "array",
202
+ "items": { "$ref": "#/$defs/evidenceSkippedCheck" }
203
+ },
204
+ "gaps": {
205
+ "type": "array",
206
+ "items": { "$ref": "#/$defs/evidenceGap" }
207
+ },
208
+ "remaining_risks": {
209
+ "type": "array",
210
+ "items": { "$ref": "#/$defs/evidenceRemainingRisk" }
211
+ },
212
+ "repro_evidence": { "$ref": "#/$defs/reproEvidence" },
213
+ "external_checks": {
214
+ "type": "array",
215
+ "items": { "$ref": "#/$defs/externalCheck" }
216
+ },
217
+ "explanation": { "$ref": "#/$defs/evidenceExplanation" }
218
+ }
219
+ },
220
+ "evidenceRequirement": {
221
+ "type": "object",
222
+ "additionalProperties": false,
223
+ "required": [
224
+ "reason",
225
+ "files",
226
+ "surfaces",
227
+ "candidate_intents",
228
+ "selected_intents",
229
+ "skipped_intents",
230
+ "gap_count",
231
+ "outcome"
232
+ ],
233
+ "properties": {
234
+ "reason": { "type": "string" },
235
+ "files": {
236
+ "type": "array",
237
+ "items": { "type": "string" }
238
+ },
239
+ "surfaces": {
240
+ "type": "array",
241
+ "items": { "type": "string" }
242
+ },
243
+ "candidate_intents": {
244
+ "type": "array",
245
+ "items": { "type": "string" }
246
+ },
247
+ "selected_intents": {
248
+ "type": "array",
249
+ "items": { "type": "string" }
250
+ },
251
+ "skipped_intents": {
252
+ "type": "array",
253
+ "items": { "type": "string" }
254
+ },
255
+ "gap_count": { "type": "integer" },
256
+ "outcome": { "enum": ["verified", "partially_verified", "unverified", "blocked", "contradicted"] }
257
+ }
258
+ },
259
+ "evidenceCoverageCriterion": {
260
+ "type": "object",
261
+ "additionalProperties": false,
262
+ "required": ["criterion_id", "source", "statement", "status", "requirement_reason", "evidence"],
263
+ "properties": {
264
+ "criterion_id": { "type": "string" },
265
+ "source": { "enum": ["verification_requirement", "dashboard_snapshot"] },
266
+ "statement": { "type": "string" },
267
+ "status": { "enum": ["covered", "partially_covered", "uncovered", "blocked", "contradicted"] },
268
+ "requirement_reason": { "type": ["string", "null"] },
269
+ "evidence": { "$ref": "#/$defs/evidenceCoverageLinks" }
270
+ }
271
+ },
272
+ "evidenceCoverageLinks": {
273
+ "type": "object",
274
+ "additionalProperties": false,
275
+ "required": ["intents", "receipt_paths", "gap_reasons", "source_anchor_ids"],
276
+ "properties": {
277
+ "intents": {
278
+ "type": "array",
279
+ "items": { "type": "string" }
280
+ },
281
+ "receipt_paths": {
282
+ "type": "array",
283
+ "items": { "type": "string" }
284
+ },
285
+ "gap_reasons": {
286
+ "type": "array",
287
+ "items": { "type": "string" }
288
+ },
289
+ "source_anchor_ids": {
290
+ "type": "array",
291
+ "items": { "type": "string" }
292
+ }
293
+ }
294
+ },
295
+ "evidenceReceipt": {
296
+ "type": "object",
297
+ "additionalProperties": false,
298
+ "required": ["intent", "status", "skipped", "verification_plan_id", "receipt_path", "receipt_sha256"],
299
+ "properties": {
300
+ "intent": { "type": ["string", "null"] },
301
+ "status": { "type": "string" },
302
+ "skipped": { "type": "boolean" },
303
+ "verification_plan_id": {
304
+ "type": ["string", "null"],
305
+ "pattern": "^sha256:[0-9a-f]{64}$"
306
+ },
307
+ "receipt_path": { "type": ["string", "null"] },
308
+ "receipt_sha256": {
309
+ "type": ["string", "null"],
310
+ "pattern": "^sha256:[0-9a-f]{64}$"
311
+ }
312
+ }
313
+ },
314
+ "evidenceSkippedCheck": {
315
+ "type": "object",
316
+ "additionalProperties": false,
317
+ "required": ["intent", "reason", "detail"],
318
+ "properties": {
319
+ "intent": { "type": ["string", "null"] },
320
+ "reason": { "type": ["string", "null"] },
321
+ "detail": { "type": ["string", "null"] }
322
+ }
323
+ },
324
+ "evidenceGap": {
325
+ "type": "object",
326
+ "additionalProperties": false,
327
+ "required": ["reason", "intent", "status", "detail", "files", "surfaces"],
328
+ "properties": {
329
+ "reason": { "type": ["string", "null"] },
330
+ "intent": { "type": ["string", "null"] },
331
+ "status": { "type": ["string", "null"] },
332
+ "detail": { "type": ["string", "null"] },
333
+ "files": {
334
+ "type": "array",
335
+ "items": { "type": "string" }
336
+ },
337
+ "surfaces": {
338
+ "type": "array",
339
+ "items": { "type": "string" }
340
+ }
341
+ }
342
+ },
343
+ "evidenceRemainingRisk": {
344
+ "type": "object",
345
+ "additionalProperties": false,
346
+ "required": ["code", "severity", "detail"],
347
+ "properties": {
348
+ "code": { "type": "string" },
349
+ "severity": { "type": "string" },
350
+ "detail": { "type": "string" }
351
+ }
352
+ },
353
+ "reproEvidence": {
354
+ "type": "object",
355
+ "additionalProperties": false,
356
+ "required": [
357
+ "source",
358
+ "authority",
359
+ "reported_symptom",
360
+ "expected_behavior",
361
+ "observed_behavior",
362
+ "original_reproduction",
363
+ "evidence_before_fix",
364
+ "evidence_after_fix",
365
+ "regression_guard"
366
+ ],
367
+ "properties": {
368
+ "source": { "const": "repro_first_debug" },
369
+ "authority": { "const": "claim_evidence" },
370
+ "reported_symptom": { "type": ["string", "null"] },
371
+ "expected_behavior": { "type": ["string", "null"] },
372
+ "observed_behavior": { "type": ["string", "null"] },
373
+ "original_reproduction": { "$ref": "#/$defs/reproEvidenceItem" },
374
+ "evidence_before_fix": { "$ref": "#/$defs/reproEvidenceItem" },
375
+ "evidence_after_fix": { "$ref": "#/$defs/reproEvidenceItem" },
376
+ "regression_guard": { "$ref": "#/$defs/reproEvidenceItem" }
377
+ }
378
+ },
379
+ "reproEvidenceItem": {
380
+ "type": "object",
381
+ "additionalProperties": false,
382
+ "required": ["status", "summary", "reason"],
383
+ "properties": {
384
+ "status": { "enum": ["present", "unavailable", "missing"] },
385
+ "summary": { "type": ["string", "null"] },
386
+ "reason": { "type": ["string", "null"] }
387
+ }
388
+ },
389
+ "externalCheck": {
390
+ "type": "object",
391
+ "additionalProperties": false,
392
+ "required": ["source", "authority", "provider", "name", "status", "url", "summary"],
393
+ "properties": {
394
+ "source": { "const": "external_ci" },
395
+ "authority": { "const": "supporting_only" },
396
+ "provider": { "type": "string", "minLength": 1 },
397
+ "name": { "type": "string", "minLength": 1 },
398
+ "status": { "enum": ["passed", "failed", "cancelled", "unknown"] },
399
+ "url": { "type": ["string", "null"] },
400
+ "summary": { "type": ["string", "null"] }
401
+ }
402
+ },
403
+ "evidenceExplanation": {
404
+ "type": "object",
405
+ "additionalProperties": false,
406
+ "required": ["verified_by", "downgraded_by", "blocked_by", "contradicted_by"],
407
+ "properties": {
408
+ "verified_by": {
409
+ "type": "array",
410
+ "items": { "type": "string" }
411
+ },
412
+ "downgraded_by": {
413
+ "type": "array",
414
+ "items": { "type": "string" }
415
+ },
416
+ "blocked_by": {
417
+ "type": "array",
418
+ "items": { "type": "string" }
419
+ },
420
+ "contradicted_by": {
421
+ "type": "array",
422
+ "items": { "type": "string" }
63
423
  }
64
424
  }
65
425
  }