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
@@ -0,0 +1,500 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://mustflow.github.io/schemas/dashboard-export.schema.json",
4
+ "title": "mustflow dashboard export",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schema_version",
9
+ "command",
10
+ "format",
11
+ "generated_at",
12
+ "mustflow_root",
13
+ "output_policy",
14
+ "limits",
15
+ "preferences",
16
+ "status",
17
+ "docs_review",
18
+ "harness_report"
19
+ ],
20
+ "properties": {
21
+ "schema_version": { "const": "1" },
22
+ "command": { "const": "dashboard export" },
23
+ "format": { "enum": ["html", "json"] },
24
+ "generated_at": { "type": "string" },
25
+ "mustflow_root": { "type": "string" },
26
+ "output_policy": {
27
+ "type": "object",
28
+ "additionalProperties": false,
29
+ "required": [
30
+ "bounded_to_mustflow_root",
31
+ "starts_server",
32
+ "static_html",
33
+ "contains_mutation_controls",
34
+ "omits_dashboard_token",
35
+ "omits_raw_run_output",
36
+ "redacts_secret_like_values"
37
+ ],
38
+ "properties": {
39
+ "bounded_to_mustflow_root": { "const": true },
40
+ "starts_server": { "const": false },
41
+ "static_html": { "type": "boolean" },
42
+ "contains_mutation_controls": { "const": false },
43
+ "omits_dashboard_token": { "const": true },
44
+ "omits_raw_run_output": { "const": true },
45
+ "redacts_secret_like_values": { "const": true }
46
+ }
47
+ },
48
+ "limits": {
49
+ "type": "object",
50
+ "additionalProperties": false,
51
+ "required": [
52
+ "max_string_bytes",
53
+ "max_array_items",
54
+ "max_depth",
55
+ "truncated_fields",
56
+ "omitted_fields",
57
+ "redacted_fields",
58
+ "redaction_count",
59
+ "redaction_kinds"
60
+ ],
61
+ "properties": {
62
+ "max_string_bytes": { "type": "integer" },
63
+ "max_array_items": { "type": "integer" },
64
+ "max_depth": { "type": "integer" },
65
+ "truncated_fields": {
66
+ "type": "array",
67
+ "items": { "type": "string" }
68
+ },
69
+ "omitted_fields": {
70
+ "type": "array",
71
+ "items": { "type": "string" }
72
+ },
73
+ "redacted_fields": {
74
+ "type": "array",
75
+ "items": { "type": "string" }
76
+ },
77
+ "redaction_count": { "type": "integer" },
78
+ "redaction_kinds": {
79
+ "type": "array",
80
+ "items": { "type": "string" }
81
+ }
82
+ }
83
+ },
84
+ "preferences": {
85
+ "type": "object",
86
+ "additionalProperties": true
87
+ },
88
+ "status": {
89
+ "type": "object",
90
+ "additionalProperties": true
91
+ },
92
+ "docs_review": {
93
+ "type": "object",
94
+ "additionalProperties": true
95
+ },
96
+ "harness_report": { "$ref": "#/$defs/harnessReport" }
97
+ },
98
+ "$defs": {
99
+ "stringArray": {
100
+ "type": "array",
101
+ "items": { "type": "string" }
102
+ },
103
+ "decisionGraphSummary": {
104
+ "type": "object",
105
+ "additionalProperties": false,
106
+ "required": [
107
+ "root",
108
+ "node_count",
109
+ "edge_count",
110
+ "runnable",
111
+ "skipped",
112
+ "blocked",
113
+ "manual_only",
114
+ "unknown",
115
+ "gap_count"
116
+ ],
117
+ "properties": {
118
+ "root": { "const": "verification_decision" },
119
+ "node_count": { "type": "integer" },
120
+ "edge_count": { "type": "integer" },
121
+ "runnable": { "type": "integer" },
122
+ "skipped": { "type": "integer" },
123
+ "blocked": { "type": "integer" },
124
+ "manual_only": { "type": "integer" },
125
+ "unknown": { "type": "integer" },
126
+ "gap_count": { "type": "integer" }
127
+ }
128
+ },
129
+ "verificationGap": {
130
+ "type": "object",
131
+ "additionalProperties": false,
132
+ "required": ["kind", "intent", "reason", "detail", "files", "surfaces"],
133
+ "properties": {
134
+ "kind": { "enum": ["manual_only", "blocked", "unknown", "missing"] },
135
+ "intent": { "type": ["string", "null"] },
136
+ "reason": { "type": ["string", "null"] },
137
+ "detail": { "type": ["string", "null"] },
138
+ "files": { "$ref": "#/$defs/stringArray" },
139
+ "surfaces": { "$ref": "#/$defs/stringArray" }
140
+ }
141
+ },
142
+ "remainingRisk": {
143
+ "type": "object",
144
+ "additionalProperties": false,
145
+ "required": ["code", "severity", "detail"],
146
+ "properties": {
147
+ "code": { "type": "string" },
148
+ "severity": { "enum": ["info", "warning", "error"] },
149
+ "detail": { "type": "string" },
150
+ "count": { "type": "integer" },
151
+ "paths": { "$ref": "#/$defs/stringArray" }
152
+ }
153
+ },
154
+ "evidenceModel": {
155
+ "type": "object",
156
+ "additionalProperties": false,
157
+ "required": [
158
+ "schema_version",
159
+ "source",
160
+ "verification_plan_id",
161
+ "requirements",
162
+ "coverage_matrix",
163
+ "receipts",
164
+ "skipped_checks",
165
+ "gaps",
166
+ "remaining_risks",
167
+ "explanation"
168
+ ],
169
+ "properties": {
170
+ "schema_version": { "const": "1" },
171
+ "source": { "enum": ["mf_verify", "dashboard_export"] },
172
+ "verification_plan_id": {
173
+ "type": ["string", "null"],
174
+ "pattern": "^sha256:[0-9a-f]{64}$"
175
+ },
176
+ "requirements": {
177
+ "type": "array",
178
+ "items": { "$ref": "#/$defs/evidenceRequirement" }
179
+ },
180
+ "coverage_matrix": {
181
+ "type": "array",
182
+ "items": { "$ref": "#/$defs/evidenceCoverageCriterion" }
183
+ },
184
+ "receipts": {
185
+ "type": "array",
186
+ "items": { "$ref": "#/$defs/evidenceReceipt" }
187
+ },
188
+ "skipped_checks": {
189
+ "type": "array",
190
+ "items": { "$ref": "#/$defs/evidenceSkippedCheck" }
191
+ },
192
+ "gaps": {
193
+ "type": "array",
194
+ "items": { "$ref": "#/$defs/evidenceGap" }
195
+ },
196
+ "remaining_risks": {
197
+ "type": "array",
198
+ "items": { "$ref": "#/$defs/evidenceRemainingRisk" }
199
+ },
200
+ "explanation": { "$ref": "#/$defs/evidenceExplanation" }
201
+ }
202
+ },
203
+ "evidenceRequirement": {
204
+ "type": "object",
205
+ "additionalProperties": false,
206
+ "required": [
207
+ "reason",
208
+ "files",
209
+ "surfaces",
210
+ "candidate_intents",
211
+ "selected_intents",
212
+ "skipped_intents",
213
+ "gap_count",
214
+ "outcome"
215
+ ],
216
+ "properties": {
217
+ "reason": { "type": "string" },
218
+ "files": { "$ref": "#/$defs/stringArray" },
219
+ "surfaces": { "$ref": "#/$defs/stringArray" },
220
+ "candidate_intents": { "$ref": "#/$defs/stringArray" },
221
+ "selected_intents": { "$ref": "#/$defs/stringArray" },
222
+ "skipped_intents": { "$ref": "#/$defs/stringArray" },
223
+ "gap_count": { "type": "integer" },
224
+ "outcome": { "enum": ["verified", "partially_verified", "unverified", "blocked", "contradicted"] }
225
+ }
226
+ },
227
+ "evidenceCoverageCriterion": {
228
+ "type": "object",
229
+ "additionalProperties": false,
230
+ "required": ["criterion_id", "source", "statement", "status", "requirement_reason", "evidence"],
231
+ "properties": {
232
+ "criterion_id": { "type": "string" },
233
+ "source": { "enum": ["verification_requirement", "dashboard_snapshot"] },
234
+ "statement": { "type": "string" },
235
+ "status": { "enum": ["covered", "partially_covered", "uncovered", "blocked", "contradicted"] },
236
+ "requirement_reason": { "type": ["string", "null"] },
237
+ "evidence": { "$ref": "#/$defs/evidenceCoverageLinks" }
238
+ }
239
+ },
240
+ "evidenceCoverageLinks": {
241
+ "type": "object",
242
+ "additionalProperties": false,
243
+ "required": ["intents", "receipt_paths", "gap_reasons", "source_anchor_ids"],
244
+ "properties": {
245
+ "intents": { "$ref": "#/$defs/stringArray" },
246
+ "receipt_paths": { "$ref": "#/$defs/stringArray" },
247
+ "gap_reasons": { "$ref": "#/$defs/stringArray" },
248
+ "source_anchor_ids": { "$ref": "#/$defs/stringArray" }
249
+ }
250
+ },
251
+ "evidenceReceipt": {
252
+ "type": "object",
253
+ "additionalProperties": false,
254
+ "required": ["intent", "status", "skipped", "verification_plan_id", "receipt_path", "receipt_sha256"],
255
+ "properties": {
256
+ "intent": { "type": ["string", "null"] },
257
+ "status": { "type": "string" },
258
+ "skipped": { "type": "boolean" },
259
+ "verification_plan_id": {
260
+ "type": ["string", "null"],
261
+ "pattern": "^sha256:[0-9a-f]{64}$"
262
+ },
263
+ "receipt_path": { "type": ["string", "null"] },
264
+ "receipt_sha256": {
265
+ "type": ["string", "null"],
266
+ "pattern": "^sha256:[0-9a-f]{64}$"
267
+ }
268
+ }
269
+ },
270
+ "evidenceSkippedCheck": {
271
+ "type": "object",
272
+ "additionalProperties": false,
273
+ "required": ["intent", "reason", "detail"],
274
+ "properties": {
275
+ "intent": { "type": ["string", "null"] },
276
+ "reason": { "type": ["string", "null"] },
277
+ "detail": { "type": ["string", "null"] }
278
+ }
279
+ },
280
+ "evidenceGap": {
281
+ "type": "object",
282
+ "additionalProperties": false,
283
+ "required": ["reason", "intent", "status", "detail", "files", "surfaces"],
284
+ "properties": {
285
+ "reason": { "type": ["string", "null"] },
286
+ "intent": { "type": ["string", "null"] },
287
+ "status": { "type": ["string", "null"] },
288
+ "detail": { "type": ["string", "null"] },
289
+ "files": { "$ref": "#/$defs/stringArray" },
290
+ "surfaces": { "$ref": "#/$defs/stringArray" }
291
+ }
292
+ },
293
+ "evidenceRemainingRisk": {
294
+ "type": "object",
295
+ "additionalProperties": false,
296
+ "required": ["code", "severity", "detail"],
297
+ "properties": {
298
+ "code": { "type": "string" },
299
+ "severity": { "type": "string" },
300
+ "detail": { "type": "string" }
301
+ }
302
+ },
303
+ "evidenceExplanation": {
304
+ "type": "object",
305
+ "additionalProperties": false,
306
+ "required": ["verified_by", "downgraded_by", "blocked_by", "contradicted_by"],
307
+ "properties": {
308
+ "verified_by": { "$ref": "#/$defs/stringArray" },
309
+ "downgraded_by": { "$ref": "#/$defs/stringArray" },
310
+ "blocked_by": { "$ref": "#/$defs/stringArray" },
311
+ "contradicted_by": { "$ref": "#/$defs/stringArray" }
312
+ }
313
+ },
314
+ "completionVerdict": {
315
+ "type": "object",
316
+ "additionalProperties": false,
317
+ "required": ["schema_version", "status", "primary_reason", "evidence", "blockers", "contradictions", "limitations"],
318
+ "properties": {
319
+ "schema_version": { "const": "1" },
320
+ "status": { "enum": ["verified", "partially_verified", "unverified", "blocked", "contradicted"] },
321
+ "primary_reason": { "type": "string" },
322
+ "evidence": {
323
+ "type": "object",
324
+ "additionalProperties": false,
325
+ "required": [
326
+ "source",
327
+ "verification_plan_id",
328
+ "changed_file_count",
329
+ "matched_intents",
330
+ "ran_intents",
331
+ "passed_intents",
332
+ "failed_intents",
333
+ "skipped_intents",
334
+ "receipt_count",
335
+ "gap_count",
336
+ "source_anchor_risk_count",
337
+ "scope_diff_risk_count",
338
+ "repeated_failure_count",
339
+ "validation_ratchet_risk_count",
340
+ "latest_run_status"
341
+ ],
342
+ "properties": {
343
+ "source": { "enum": ["mf_verify", "dashboard_export"] },
344
+ "verification_plan_id": {
345
+ "type": ["string", "null"],
346
+ "pattern": "^sha256:[0-9a-f]{64}$"
347
+ },
348
+ "changed_file_count": { "type": ["integer", "null"] },
349
+ "matched_intents": { "type": "integer" },
350
+ "ran_intents": { "type": "integer" },
351
+ "passed_intents": { "type": "integer" },
352
+ "failed_intents": { "type": "integer" },
353
+ "skipped_intents": { "type": "integer" },
354
+ "receipt_count": { "type": "integer" },
355
+ "gap_count": { "type": "integer" },
356
+ "source_anchor_risk_count": { "type": "integer" },
357
+ "scope_diff_risk_count": { "type": "integer" },
358
+ "repeated_failure_count": { "type": "integer" },
359
+ "validation_ratchet_risk_count": { "type": "integer" },
360
+ "latest_run_status": { "type": ["string", "null"] }
361
+ }
362
+ },
363
+ "blockers": {
364
+ "type": "array",
365
+ "items": { "type": "string" }
366
+ },
367
+ "contradictions": {
368
+ "type": "array",
369
+ "items": { "type": "string" }
370
+ },
371
+ "limitations": {
372
+ "type": "array",
373
+ "items": { "type": "string" }
374
+ }
375
+ }
376
+ },
377
+ "harnessReport": {
378
+ "type": "object",
379
+ "additionalProperties": false,
380
+ "required": [
381
+ "schema_version",
382
+ "generated_from",
383
+ "install",
384
+ "verification",
385
+ "run_history",
386
+ "docs_review",
387
+ "remaining_risks"
388
+ ],
389
+ "properties": {
390
+ "schema_version": { "const": "1" },
391
+ "generated_from": { "const": "dashboard_status_snapshot" },
392
+ "install": {
393
+ "type": "object",
394
+ "additionalProperties": false,
395
+ "required": ["installed", "manifest_lock", "tracked_files", "changed_files", "missing_files", "issues"],
396
+ "properties": {
397
+ "installed": { "type": "boolean" },
398
+ "manifest_lock": { "type": "string" },
399
+ "tracked_files": { "type": "integer" },
400
+ "changed_files": { "type": "integer" },
401
+ "missing_files": { "type": "integer" },
402
+ "issues": { "type": "integer" }
403
+ }
404
+ },
405
+ "verification": {
406
+ "type": "object",
407
+ "additionalProperties": false,
408
+ "required": [
409
+ "completion_verdict",
410
+ "evidence_model",
411
+ "changed_file_count",
412
+ "changed_surfaces",
413
+ "decision_graph_summary",
414
+ "runnable_intents",
415
+ "skipped_intents",
416
+ "gaps"
417
+ ],
418
+ "properties": {
419
+ "completion_verdict": { "$ref": "#/$defs/completionVerdict" },
420
+ "evidence_model": { "$ref": "#/$defs/evidenceModel" },
421
+ "changed_file_count": { "type": "integer" },
422
+ "changed_surfaces": { "$ref": "#/$defs/stringArray" },
423
+ "decision_graph_summary": {
424
+ "type": ["object", "null"],
425
+ "properties": {
426
+ "root": { "const": "verification_decision" },
427
+ "node_count": { "type": "integer" },
428
+ "edge_count": { "type": "integer" },
429
+ "runnable": { "type": "integer" },
430
+ "skipped": { "type": "integer" },
431
+ "blocked": { "type": "integer" },
432
+ "manual_only": { "type": "integer" },
433
+ "unknown": { "type": "integer" },
434
+ "gap_count": { "type": "integer" }
435
+ }
436
+ },
437
+ "runnable_intents": { "$ref": "#/$defs/stringArray" },
438
+ "skipped_intents": {
439
+ "type": "array",
440
+ "items": {
441
+ "type": "object",
442
+ "additionalProperties": false,
443
+ "required": ["intent", "reason_key"],
444
+ "properties": {
445
+ "intent": { "type": "string" },
446
+ "reason_key": { "type": "string" }
447
+ }
448
+ }
449
+ },
450
+ "gaps": {
451
+ "type": "array",
452
+ "items": { "$ref": "#/$defs/verificationGap" }
453
+ }
454
+ }
455
+ },
456
+ "run_history": {
457
+ "type": "object",
458
+ "additionalProperties": false,
459
+ "required": [
460
+ "path",
461
+ "exists",
462
+ "valid",
463
+ "intent",
464
+ "status",
465
+ "exit_code",
466
+ "timed_out",
467
+ "finished_at",
468
+ "duration_ms",
469
+ "receipt_path"
470
+ ],
471
+ "properties": {
472
+ "path": { "type": "string" },
473
+ "exists": { "type": "boolean" },
474
+ "valid": { "type": "boolean" },
475
+ "intent": { "type": ["string", "null"] },
476
+ "status": { "type": ["string", "null"] },
477
+ "exit_code": { "type": ["integer", "null"] },
478
+ "timed_out": { "type": ["boolean", "null"] },
479
+ "finished_at": { "type": ["string", "null"] },
480
+ "duration_ms": { "type": ["number", "null"] },
481
+ "receipt_path": { "type": ["string", "null"] }
482
+ }
483
+ },
484
+ "docs_review": {
485
+ "type": "object",
486
+ "additionalProperties": false,
487
+ "required": ["ledger_path", "active_documents"],
488
+ "properties": {
489
+ "ledger_path": { "type": "string" },
490
+ "active_documents": { "type": "integer" }
491
+ }
492
+ },
493
+ "remaining_risks": {
494
+ "type": "array",
495
+ "items": { "$ref": "#/$defs/remainingRisk" }
496
+ }
497
+ }
498
+ }
499
+ }
500
+ }
@@ -567,6 +567,8 @@
567
567
  "blocked": { "type": "integer" },
568
568
  "manual_only": { "type": "integer" },
569
569
  "unknown": { "type": "integer" },
570
+ "selected": { "type": "integer" },
571
+ "not_selected": { "type": "integer" },
570
572
  "gapCount": { "type": "integer" }
571
573
  }
572
574
  },