mustflow 2.69.0 → 2.74.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 (48) hide show
  1. package/README.md +19 -5
  2. package/dist/cli/commands/api.js +17 -0
  3. package/dist/cli/commands/evidence.js +71 -0
  4. package/dist/cli/commands/script-pack.js +124 -0
  5. package/dist/cli/commands/verify.js +50 -15
  6. package/dist/cli/commands/workspace.js +2 -0
  7. package/dist/cli/i18n/en.js +38 -0
  8. package/dist/cli/i18n/es.js +38 -0
  9. package/dist/cli/i18n/fr.js +38 -0
  10. package/dist/cli/i18n/hi.js +38 -0
  11. package/dist/cli/i18n/ko.js +38 -0
  12. package/dist/cli/i18n/zh.js +38 -0
  13. package/dist/cli/index.js +1 -0
  14. package/dist/cli/lib/agent-context.js +179 -10
  15. package/dist/cli/lib/command-registry.js +6 -0
  16. package/dist/cli/lib/dashboard-export.js +1 -0
  17. package/dist/cli/lib/script-pack-registry.js +27 -0
  18. package/dist/cli/script-packs/core-text-budget.js +241 -0
  19. package/dist/core/change-verification.js +10 -0
  20. package/dist/core/completion-verdict.js +14 -1
  21. package/dist/core/complexity-budget.js +206 -0
  22. package/dist/core/conflict-ledger.js +122 -0
  23. package/dist/core/failure-replay-capsule.js +213 -0
  24. package/dist/core/public-json-contracts.js +27 -0
  25. package/dist/core/risk-priced-evidence.js +213 -0
  26. package/dist/core/script-check-result.js +1 -0
  27. package/dist/core/text-budget.js +262 -0
  28. package/dist/core/verification-evidence.js +61 -13
  29. package/package.json +1 -1
  30. package/schemas/README.md +23 -11
  31. package/schemas/change-verification-report.schema.json +29 -0
  32. package/schemas/context-report.schema.json +58 -2
  33. package/schemas/dashboard-export.schema.json +42 -1
  34. package/schemas/diff-risk.schema.json +6 -0
  35. package/schemas/evidence-report.schema.json +45 -0
  36. package/schemas/latest-run-pointer.schema.json +50 -1
  37. package/schemas/script-pack-catalog.schema.json +68 -0
  38. package/schemas/text-budget-report.schema.json +131 -0
  39. package/schemas/verification-plan.schema.json +32 -0
  40. package/schemas/verify-report.schema.json +360 -1
  41. package/schemas/verify-run-manifest.schema.json +50 -1
  42. package/schemas/workspace-verification-plan.schema.json +32 -0
  43. package/templates/default/i18n.toml +8 -2
  44. package/templates/default/locales/en/.mustflow/skills/INDEX.md +3 -2
  45. package/templates/default/locales/en/.mustflow/skills/adapter-boundary/SKILL.md +19 -2
  46. package/templates/default/locales/en/.mustflow/skills/design-implementation-handoff/SKILL.md +250 -0
  47. package/templates/default/locales/en/.mustflow/skills/routes.toml +7 -1
  48. package/templates/default/manifest.toml +8 -1
@@ -37,6 +37,12 @@
37
37
  "update_policies": { "$ref": "#/$defs/stringArray" },
38
38
  "drift_checks": { "$ref": "#/$defs/stringArray" },
39
39
  "required_verification": { "$ref": "#/$defs/stringArray" },
40
+ "complexity_budget": {
41
+ "anyOf": [
42
+ { "type": "null" },
43
+ { "$ref": "verify-report.schema.json#/$defs/complexityBudget" }
44
+ ]
45
+ },
40
46
  "residual_corrections": { "$ref": "#/$defs/residualCorrections" },
41
47
  "gap_count": { "type": "integer", "minimum": 0 },
42
48
  "gaps": {
@@ -107,6 +107,7 @@
107
107
  "changed_files": { "$ref": "#/$defs/stringArray" },
108
108
  "validation_reasons": { "$ref": "#/$defs/stringArray" },
109
109
  "selected_intents": { "$ref": "#/$defs/stringArray" },
110
+ "risk_assessment": { "$ref": "#/$defs/riskAssessment" },
110
111
  "requirement_count": { "type": "integer", "minimum": 0 },
111
112
  "gap_count": { "type": "integer", "minimum": 0 },
112
113
  "requirements": {
@@ -199,6 +200,24 @@
199
200
  "receipt_count": { "type": ["integer", "null"], "minimum": 0 },
200
201
  "skipped_check_count": { "type": "integer", "minimum": 0 },
201
202
  "remaining_risk_count": { "type": "integer", "minimum": 0 },
203
+ "risk_assessment": {
204
+ "anyOf": [
205
+ { "type": "null" },
206
+ { "$ref": "#/$defs/riskAssessment" }
207
+ ]
208
+ },
209
+ "failure_replay_capsule": {
210
+ "anyOf": [
211
+ { "type": "null" },
212
+ { "$ref": "verify-report.schema.json#/$defs/failureReplayCapsule" }
213
+ ]
214
+ },
215
+ "conflict_ledger": {
216
+ "anyOf": [
217
+ { "type": "null" },
218
+ { "$ref": "verify-report.schema.json#/$defs/conflictLedger" }
219
+ ]
220
+ },
202
221
  "requirements": {
203
222
  "type": "array",
204
223
  "items": { "$ref": "#/$defs/latestRequirement" }
@@ -255,6 +274,32 @@
255
274
  "detail": { "type": "string" }
256
275
  }
257
276
  },
277
+ "riskAssessment": {
278
+ "type": "object",
279
+ "additionalProperties": false,
280
+ "required": [
281
+ "schema_version",
282
+ "source",
283
+ "level",
284
+ "reasons",
285
+ "required_evidence",
286
+ "blocking_gaps",
287
+ "rollback_required",
288
+ "human_approval_required",
289
+ "manual_review_required"
290
+ ],
291
+ "properties": {
292
+ "schema_version": { "const": "1" },
293
+ "source": { "const": "change_classification_and_command_contract" },
294
+ "level": { "enum": ["low", "medium", "high", "critical"] },
295
+ "reasons": { "$ref": "#/$defs/stringArray" },
296
+ "required_evidence": { "$ref": "#/$defs/stringArray" },
297
+ "blocking_gaps": { "$ref": "#/$defs/stringArray" },
298
+ "rollback_required": { "type": "boolean" },
299
+ "human_approval_required": { "type": "boolean" },
300
+ "manual_review_required": { "type": "boolean" }
301
+ }
302
+ },
258
303
  "coverage": {
259
304
  "type": "object",
260
305
  "additionalProperties": false,
@@ -39,14 +39,22 @@
39
39
  },
40
40
  "execution_status": { "enum": ["passed", "partial", "failed", "blocked"] },
41
41
  "status": { "enum": ["passed", "partial", "failed", "blocked"] },
42
+ "risk_assessment": { "$ref": "#/$defs/riskAssessment" },
42
43
  "completion_verdict": { "$ref": "#/$defs/completionVerdict" },
43
44
  "evidence_model": { "$ref": "#/$defs/evidenceModel" },
45
+ "conflict_ledger": { "$ref": "verify-report.schema.json#/$defs/conflictLedger" },
44
46
  "failure_fingerprint": {
45
47
  "anyOf": [
46
48
  { "$ref": "#/$defs/failureFingerprint" },
47
49
  { "type": "null" }
48
50
  ]
49
51
  },
52
+ "failure_replay_capsule": {
53
+ "anyOf": [
54
+ { "$ref": "verify-report.schema.json#/$defs/failureReplayCapsule" },
55
+ { "type": "null" }
56
+ ]
57
+ },
50
58
  "repeated_failure_summary": {
51
59
  "anyOf": [
52
60
  { "$ref": "#/$defs/repeatedFailureSummary" },
@@ -196,6 +204,7 @@
196
204
  "receipt_binding_risk_count": { "type": "integer" },
197
205
  "stale_receipt_count": { "type": "integer" },
198
206
  "plan_mismatch_count": { "type": "integer" },
207
+ "risk_priced_evidence_risk_count": { "type": "integer" },
199
208
  "risks": { "$ref": "#/$defs/completionVerdictRisks" },
200
209
  "receipt_binding": { "$ref": "#/$defs/completionVerdictReceiptBinding" },
201
210
  "latest_run_status": { "type": ["string", "null"] }
@@ -253,7 +262,8 @@
253
262
  "write_drift": { "type": "integer" },
254
263
  "receipt_binding": { "type": "integer" },
255
264
  "stale_receipt": { "type": "integer" },
256
- "plan_mismatch": { "type": "integer" }
265
+ "plan_mismatch": { "type": "integer" },
266
+ "risk_priced_evidence": { "type": "integer" }
257
267
  }
258
268
  },
259
269
  "completionVerdictReceiptBinding": {
@@ -322,6 +332,10 @@
322
332
  "type": "array",
323
333
  "items": { "$ref": "#/$defs/evidenceGap" }
324
334
  },
335
+ "complexity_budget": { "$ref": "verify-report.schema.json#/$defs/complexityBudget" },
336
+ "risk_assessment": { "$ref": "#/$defs/riskAssessment" },
337
+ "failure_replay_capsule": { "$ref": "verify-report.schema.json#/$defs/failureReplayCapsule" },
338
+ "conflict_ledger": { "$ref": "verify-report.schema.json#/$defs/conflictLedger" },
325
339
  "remaining_risks": {
326
340
  "type": "array",
327
341
  "items": { "$ref": "#/$defs/evidenceRemainingRisk" }
@@ -467,6 +481,41 @@
467
481
  "detail": { "type": "string" }
468
482
  }
469
483
  },
484
+ "riskAssessment": {
485
+ "type": "object",
486
+ "additionalProperties": false,
487
+ "required": [
488
+ "schema_version",
489
+ "source",
490
+ "level",
491
+ "reasons",
492
+ "required_evidence",
493
+ "blocking_gaps",
494
+ "rollback_required",
495
+ "human_approval_required",
496
+ "manual_review_required"
497
+ ],
498
+ "properties": {
499
+ "schema_version": { "const": "1" },
500
+ "source": { "const": "change_classification_and_command_contract" },
501
+ "level": { "enum": ["low", "medium", "high", "critical"] },
502
+ "reasons": {
503
+ "type": "array",
504
+ "items": { "type": "string" }
505
+ },
506
+ "required_evidence": {
507
+ "type": "array",
508
+ "items": { "type": "string" }
509
+ },
510
+ "blocking_gaps": {
511
+ "type": "array",
512
+ "items": { "type": "string" }
513
+ },
514
+ "rollback_required": { "type": "boolean" },
515
+ "human_approval_required": { "type": "boolean" },
516
+ "manual_review_required": { "type": "boolean" }
517
+ }
518
+ },
470
519
  "reproEvidence": {
471
520
  "type": "object",
472
521
  "additionalProperties": false,
@@ -0,0 +1,68 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://mustflow.github.io/schemas/script-pack-catalog.schema.json",
4
+ "title": "mustflow script-pack catalog",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schema_version",
9
+ "command",
10
+ "action",
11
+ "ok",
12
+ "mustflow_root",
13
+ "packs",
14
+ "issues"
15
+ ],
16
+ "properties": {
17
+ "schema_version": { "const": "1" },
18
+ "command": { "const": "script-pack" },
19
+ "action": { "const": "list" },
20
+ "ok": { "type": "boolean" },
21
+ "mustflow_root": { "type": "string" },
22
+ "packs": {
23
+ "type": "array",
24
+ "items": { "$ref": "#/$defs/pack" }
25
+ },
26
+ "issues": {
27
+ "type": "array",
28
+ "items": { "type": "string" }
29
+ }
30
+ },
31
+ "$defs": {
32
+ "pack": {
33
+ "type": "object",
34
+ "additionalProperties": false,
35
+ "required": ["id", "summary_key", "scripts"],
36
+ "properties": {
37
+ "id": { "type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" },
38
+ "summary_key": { "type": "string" },
39
+ "scripts": {
40
+ "type": "array",
41
+ "items": { "$ref": "#/$defs/script" }
42
+ }
43
+ }
44
+ },
45
+ "script": {
46
+ "type": "object",
47
+ "additionalProperties": false,
48
+ "required": ["id", "ref", "usage", "summary_key", "actions", "report_schema_file"],
49
+ "properties": {
50
+ "id": { "type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" },
51
+ "ref": { "type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*/[a-z0-9]+(?:-[a-z0-9]+)*$" },
52
+ "usage": { "type": "string" },
53
+ "summary_key": { "type": "string" },
54
+ "actions": {
55
+ "type": "array",
56
+ "items": { "type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" },
57
+ "minItems": 1
58
+ },
59
+ "report_schema_file": {
60
+ "anyOf": [
61
+ { "type": "string", "pattern": "^[a-z0-9-]+\\.schema\\.json$" },
62
+ { "type": "null" }
63
+ ]
64
+ }
65
+ }
66
+ }
67
+ }
68
+ }
@@ -0,0 +1,131 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://mustflow.github.io/schemas/text-budget-report.schema.json",
4
+ "title": "mustflow text-budget report",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schema_version",
9
+ "command",
10
+ "pack_id",
11
+ "script_id",
12
+ "script_ref",
13
+ "action",
14
+ "status",
15
+ "ok",
16
+ "mustflow_root",
17
+ "policy",
18
+ "input_hash",
19
+ "metrics",
20
+ "findings",
21
+ "artifacts",
22
+ "issues"
23
+ ],
24
+ "properties": {
25
+ "schema_version": { "const": "1" },
26
+ "command": { "const": "script-pack" },
27
+ "pack_id": { "const": "core" },
28
+ "script_id": { "const": "text-budget" },
29
+ "script_ref": { "const": "core/text-budget" },
30
+ "action": { "const": "check" },
31
+ "status": { "enum": ["passed", "failed", "error"] },
32
+ "ok": { "type": "boolean" },
33
+ "mustflow_root": { "type": "string" },
34
+ "policy": { "$ref": "#/$defs/policy" },
35
+ "input_hash": { "$ref": "#/$defs/sha256" },
36
+ "metrics": {
37
+ "type": "array",
38
+ "items": { "$ref": "#/$defs/metric" }
39
+ },
40
+ "findings": {
41
+ "type": "array",
42
+ "items": { "$ref": "#/$defs/finding" }
43
+ },
44
+ "artifacts": {
45
+ "type": "array",
46
+ "items": { "$ref": "#/$defs/artifact" }
47
+ },
48
+ "issues": {
49
+ "type": "array",
50
+ "items": { "type": "string" }
51
+ }
52
+ },
53
+ "$defs": {
54
+ "sha256": {
55
+ "type": "string",
56
+ "pattern": "^sha256:[a-f0-9]{64}$"
57
+ },
58
+ "unit": {
59
+ "description": "Counting unit. The line unit counts line segments after splitting on line breaks, so a trailing line break contributes an empty final line.",
60
+ "enum": ["grapheme", "code-point", "utf16", "utf8-byte", "word", "line"]
61
+ },
62
+ "policy": {
63
+ "type": "object",
64
+ "additionalProperties": false,
65
+ "required": ["min", "max", "exact", "unit", "json_pointer", "max_file_bytes"],
66
+ "properties": {
67
+ "min": { "type": ["integer", "null"], "minimum": 0 },
68
+ "max": { "type": ["integer", "null"], "minimum": 0 },
69
+ "exact": { "type": ["integer", "null"], "minimum": 0 },
70
+ "unit": { "$ref": "#/$defs/unit" },
71
+ "json_pointer": { "type": ["string", "null"] },
72
+ "max_file_bytes": { "type": "integer", "minimum": 1 }
73
+ }
74
+ },
75
+ "metric": {
76
+ "type": "object",
77
+ "additionalProperties": false,
78
+ "required": ["name", "value", "unit", "path", "json_pointer", "content_sha256"],
79
+ "properties": {
80
+ "name": { "const": "text_length" },
81
+ "value": { "type": "integer", "minimum": 0 },
82
+ "unit": { "$ref": "#/$defs/unit" },
83
+ "path": { "type": "string" },
84
+ "json_pointer": { "type": ["string", "null"] },
85
+ "content_sha256": { "$ref": "#/$defs/sha256" }
86
+ }
87
+ },
88
+ "finding": {
89
+ "type": "object",
90
+ "additionalProperties": false,
91
+ "required": ["code", "severity", "message", "path", "json_pointer", "metric", "actual", "expected"],
92
+ "properties": {
93
+ "code": {
94
+ "enum": [
95
+ "text_budget_above_max",
96
+ "text_budget_below_min",
97
+ "text_budget_not_exact",
98
+ "text_budget_unreadable",
99
+ "text_budget_json_parse_failed",
100
+ "text_budget_json_pointer_invalid",
101
+ "text_budget_json_pointer_missing",
102
+ "text_budget_json_pointer_not_string"
103
+ ]
104
+ },
105
+ "severity": { "enum": ["low", "medium", "high", "critical"] },
106
+ "message": { "type": "string" },
107
+ "path": { "type": "string" },
108
+ "json_pointer": { "type": ["string", "null"] },
109
+ "metric": {
110
+ "anyOf": [
111
+ { "const": "text_length" },
112
+ { "type": "null" }
113
+ ]
114
+ },
115
+ "actual": { "type": ["integer", "null"], "minimum": 0 },
116
+ "expected": { "type": ["integer", "null"], "minimum": 0 }
117
+ }
118
+ },
119
+ "artifact": {
120
+ "type": "object",
121
+ "additionalProperties": false,
122
+ "required": ["kind", "path", "sha256", "size_bytes"],
123
+ "properties": {
124
+ "kind": { "const": "input" },
125
+ "path": { "type": "string" },
126
+ "sha256": { "$ref": "#/$defs/sha256" },
127
+ "size_bytes": { "type": "integer", "minimum": 0 }
128
+ }
129
+ }
130
+ }
131
+ }
@@ -48,6 +48,12 @@
48
48
  "type": "array",
49
49
  "items": { "$ref": "#/$defs/gap" }
50
50
  },
51
+ "risk_assessment": {
52
+ "anyOf": [
53
+ { "type": "null" },
54
+ { "$ref": "#/$defs/riskAssessment" }
55
+ ]
56
+ },
51
57
  "schedule": {
52
58
  "anyOf": [
53
59
  { "type": "null" },
@@ -159,6 +165,32 @@
159
165
  "detail": { "type": "string" }
160
166
  }
161
167
  },
168
+ "riskAssessment": {
169
+ "type": "object",
170
+ "additionalProperties": false,
171
+ "required": [
172
+ "schema_version",
173
+ "source",
174
+ "level",
175
+ "reasons",
176
+ "required_evidence",
177
+ "blocking_gaps",
178
+ "rollback_required",
179
+ "human_approval_required",
180
+ "manual_review_required"
181
+ ],
182
+ "properties": {
183
+ "schema_version": { "const": "1" },
184
+ "source": { "const": "change_classification_and_command_contract" },
185
+ "level": { "enum": ["low", "medium", "high", "critical"] },
186
+ "reasons": { "$ref": "#/$defs/stringArray" },
187
+ "required_evidence": { "$ref": "#/$defs/stringArray" },
188
+ "blocking_gaps": { "$ref": "#/$defs/stringArray" },
189
+ "rollback_required": { "type": "boolean" },
190
+ "human_approval_required": { "type": "boolean" },
191
+ "manual_review_required": { "type": "boolean" }
192
+ }
193
+ },
162
194
  "schedule": {
163
195
  "type": "object",
164
196
  "additionalProperties": false,