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,384 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://mustflow.github.io/schemas/latest-run-pointer.schema.json",
4
+ "title": "mustflow latest run pointer",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schema_version",
9
+ "command",
10
+ "kind",
11
+ "reason",
12
+ "reasons",
13
+ "plan_source",
14
+ "verification_plan_id",
15
+ "status",
16
+ "completion_verdict",
17
+ "evidence_model",
18
+ "summary",
19
+ "run_dir",
20
+ "manifest_path"
21
+ ],
22
+ "properties": {
23
+ "schema_version": { "const": "1" },
24
+ "command": { "const": "verify" },
25
+ "kind": { "const": "verify_run_summary" },
26
+ "reason": { "type": "string" },
27
+ "reasons": {
28
+ "type": "array",
29
+ "items": { "type": "string" }
30
+ },
31
+ "plan_source": { "type": ["string", "null"] },
32
+ "verification_plan_id": {
33
+ "type": "string",
34
+ "pattern": "^sha256:[0-9a-f]{64}$"
35
+ },
36
+ "status": { "enum": ["passed", "partial", "failed", "blocked"] },
37
+ "completion_verdict": { "$ref": "#/$defs/completionVerdict" },
38
+ "evidence_model": { "$ref": "#/$defs/evidenceModel" },
39
+ "summary": {
40
+ "type": "object",
41
+ "additionalProperties": false,
42
+ "required": ["matched", "ran", "passed", "failed", "skipped"],
43
+ "properties": {
44
+ "matched": { "type": "integer" },
45
+ "ran": { "type": "integer" },
46
+ "passed": { "type": "integer" },
47
+ "failed": { "type": "integer" },
48
+ "skipped": { "type": "integer" }
49
+ }
50
+ },
51
+ "repro_evidence": { "$ref": "#/$defs/reproEvidence" },
52
+ "external_checks": {
53
+ "type": "array",
54
+ "items": { "$ref": "#/$defs/externalCheck" }
55
+ },
56
+ "run_dir": { "type": "string" },
57
+ "manifest_path": { "type": "string" }
58
+ },
59
+ "$defs": {
60
+ "completionVerdict": {
61
+ "type": "object",
62
+ "additionalProperties": false,
63
+ "required": ["schema_version", "status", "primary_reason", "evidence", "blockers", "contradictions", "limitations"],
64
+ "properties": {
65
+ "schema_version": { "const": "1" },
66
+ "status": { "enum": ["verified", "partially_verified", "unverified", "blocked", "contradicted"] },
67
+ "primary_reason": { "type": "string" },
68
+ "evidence": {
69
+ "type": "object",
70
+ "additionalProperties": false,
71
+ "required": [
72
+ "source",
73
+ "verification_plan_id",
74
+ "changed_file_count",
75
+ "matched_intents",
76
+ "ran_intents",
77
+ "passed_intents",
78
+ "failed_intents",
79
+ "skipped_intents",
80
+ "receipt_count",
81
+ "gap_count",
82
+ "source_anchor_risk_count",
83
+ "scope_diff_risk_count",
84
+ "repeated_failure_count",
85
+ "validation_ratchet_risk_count",
86
+ "latest_run_status"
87
+ ],
88
+ "properties": {
89
+ "source": { "enum": ["mf_verify", "dashboard_export"] },
90
+ "verification_plan_id": {
91
+ "type": ["string", "null"],
92
+ "pattern": "^sha256:[0-9a-f]{64}$"
93
+ },
94
+ "changed_file_count": { "type": ["integer", "null"] },
95
+ "matched_intents": { "type": "integer" },
96
+ "ran_intents": { "type": "integer" },
97
+ "passed_intents": { "type": "integer" },
98
+ "failed_intents": { "type": "integer" },
99
+ "skipped_intents": { "type": "integer" },
100
+ "receipt_count": { "type": "integer" },
101
+ "gap_count": { "type": "integer" },
102
+ "source_anchor_risk_count": { "type": "integer" },
103
+ "scope_diff_risk_count": { "type": "integer" },
104
+ "repeated_failure_count": { "type": "integer" },
105
+ "validation_ratchet_risk_count": { "type": "integer" },
106
+ "latest_run_status": { "type": ["string", "null"] }
107
+ }
108
+ },
109
+ "blockers": {
110
+ "type": "array",
111
+ "items": { "type": "string" }
112
+ },
113
+ "contradictions": {
114
+ "type": "array",
115
+ "items": { "type": "string" }
116
+ },
117
+ "limitations": {
118
+ "type": "array",
119
+ "items": { "type": "string" }
120
+ }
121
+ }
122
+ },
123
+ "evidenceModel": {
124
+ "type": "object",
125
+ "additionalProperties": false,
126
+ "required": [
127
+ "schema_version",
128
+ "source",
129
+ "verification_plan_id",
130
+ "requirements",
131
+ "coverage_matrix",
132
+ "receipts",
133
+ "skipped_checks",
134
+ "gaps",
135
+ "remaining_risks",
136
+ "explanation"
137
+ ],
138
+ "properties": {
139
+ "schema_version": { "const": "1" },
140
+ "source": { "enum": ["mf_verify", "dashboard_export"] },
141
+ "verification_plan_id": {
142
+ "type": ["string", "null"],
143
+ "pattern": "^sha256:[0-9a-f]{64}$"
144
+ },
145
+ "requirements": {
146
+ "type": "array",
147
+ "items": { "$ref": "#/$defs/evidenceRequirement" }
148
+ },
149
+ "coverage_matrix": {
150
+ "type": "array",
151
+ "items": { "$ref": "#/$defs/evidenceCoverageCriterion" }
152
+ },
153
+ "receipts": {
154
+ "type": "array",
155
+ "items": { "$ref": "#/$defs/evidenceReceipt" }
156
+ },
157
+ "skipped_checks": {
158
+ "type": "array",
159
+ "items": { "$ref": "#/$defs/evidenceSkippedCheck" }
160
+ },
161
+ "gaps": {
162
+ "type": "array",
163
+ "items": { "$ref": "#/$defs/evidenceGap" }
164
+ },
165
+ "remaining_risks": {
166
+ "type": "array",
167
+ "items": { "$ref": "#/$defs/evidenceRemainingRisk" }
168
+ },
169
+ "repro_evidence": { "$ref": "#/$defs/reproEvidence" },
170
+ "external_checks": {
171
+ "type": "array",
172
+ "items": { "$ref": "#/$defs/externalCheck" }
173
+ },
174
+ "explanation": { "$ref": "#/$defs/evidenceExplanation" }
175
+ }
176
+ },
177
+ "evidenceRequirement": {
178
+ "type": "object",
179
+ "additionalProperties": false,
180
+ "required": [
181
+ "reason",
182
+ "files",
183
+ "surfaces",
184
+ "candidate_intents",
185
+ "selected_intents",
186
+ "skipped_intents",
187
+ "gap_count",
188
+ "outcome"
189
+ ],
190
+ "properties": {
191
+ "reason": { "type": "string" },
192
+ "files": {
193
+ "type": "array",
194
+ "items": { "type": "string" }
195
+ },
196
+ "surfaces": {
197
+ "type": "array",
198
+ "items": { "type": "string" }
199
+ },
200
+ "candidate_intents": {
201
+ "type": "array",
202
+ "items": { "type": "string" }
203
+ },
204
+ "selected_intents": {
205
+ "type": "array",
206
+ "items": { "type": "string" }
207
+ },
208
+ "skipped_intents": {
209
+ "type": "array",
210
+ "items": { "type": "string" }
211
+ },
212
+ "gap_count": { "type": "integer" },
213
+ "outcome": { "enum": ["verified", "partially_verified", "unverified", "blocked", "contradicted"] }
214
+ }
215
+ },
216
+ "evidenceCoverageCriterion": {
217
+ "type": "object",
218
+ "additionalProperties": false,
219
+ "required": ["criterion_id", "source", "statement", "status", "requirement_reason", "evidence"],
220
+ "properties": {
221
+ "criterion_id": { "type": "string" },
222
+ "source": { "enum": ["verification_requirement", "dashboard_snapshot"] },
223
+ "statement": { "type": "string" },
224
+ "status": { "enum": ["covered", "partially_covered", "uncovered", "blocked", "contradicted"] },
225
+ "requirement_reason": { "type": ["string", "null"] },
226
+ "evidence": { "$ref": "#/$defs/evidenceCoverageLinks" }
227
+ }
228
+ },
229
+ "evidenceCoverageLinks": {
230
+ "type": "object",
231
+ "additionalProperties": false,
232
+ "required": ["intents", "receipt_paths", "gap_reasons", "source_anchor_ids"],
233
+ "properties": {
234
+ "intents": {
235
+ "type": "array",
236
+ "items": { "type": "string" }
237
+ },
238
+ "receipt_paths": {
239
+ "type": "array",
240
+ "items": { "type": "string" }
241
+ },
242
+ "gap_reasons": {
243
+ "type": "array",
244
+ "items": { "type": "string" }
245
+ },
246
+ "source_anchor_ids": {
247
+ "type": "array",
248
+ "items": { "type": "string" }
249
+ }
250
+ }
251
+ },
252
+ "evidenceReceipt": {
253
+ "type": "object",
254
+ "additionalProperties": false,
255
+ "required": ["intent", "status", "skipped", "verification_plan_id", "receipt_path", "receipt_sha256"],
256
+ "properties": {
257
+ "intent": { "type": ["string", "null"] },
258
+ "status": { "type": "string" },
259
+ "skipped": { "type": "boolean" },
260
+ "verification_plan_id": {
261
+ "type": ["string", "null"],
262
+ "pattern": "^sha256:[0-9a-f]{64}$"
263
+ },
264
+ "receipt_path": { "type": ["string", "null"] },
265
+ "receipt_sha256": {
266
+ "type": ["string", "null"],
267
+ "pattern": "^sha256:[0-9a-f]{64}$"
268
+ }
269
+ }
270
+ },
271
+ "evidenceSkippedCheck": {
272
+ "type": "object",
273
+ "additionalProperties": false,
274
+ "required": ["intent", "reason", "detail"],
275
+ "properties": {
276
+ "intent": { "type": ["string", "null"] },
277
+ "reason": { "type": ["string", "null"] },
278
+ "detail": { "type": ["string", "null"] }
279
+ }
280
+ },
281
+ "evidenceGap": {
282
+ "type": "object",
283
+ "additionalProperties": false,
284
+ "required": ["reason", "intent", "status", "detail", "files", "surfaces"],
285
+ "properties": {
286
+ "reason": { "type": ["string", "null"] },
287
+ "intent": { "type": ["string", "null"] },
288
+ "status": { "type": ["string", "null"] },
289
+ "detail": { "type": ["string", "null"] },
290
+ "files": {
291
+ "type": "array",
292
+ "items": { "type": "string" }
293
+ },
294
+ "surfaces": {
295
+ "type": "array",
296
+ "items": { "type": "string" }
297
+ }
298
+ }
299
+ },
300
+ "evidenceRemainingRisk": {
301
+ "type": "object",
302
+ "additionalProperties": false,
303
+ "required": ["code", "severity", "detail"],
304
+ "properties": {
305
+ "code": { "type": "string" },
306
+ "severity": { "type": "string" },
307
+ "detail": { "type": "string" }
308
+ }
309
+ },
310
+ "reproEvidence": {
311
+ "type": "object",
312
+ "additionalProperties": false,
313
+ "required": [
314
+ "source",
315
+ "authority",
316
+ "reported_symptom",
317
+ "expected_behavior",
318
+ "observed_behavior",
319
+ "original_reproduction",
320
+ "evidence_before_fix",
321
+ "evidence_after_fix",
322
+ "regression_guard"
323
+ ],
324
+ "properties": {
325
+ "source": { "const": "repro_first_debug" },
326
+ "authority": { "const": "claim_evidence" },
327
+ "reported_symptom": { "type": ["string", "null"] },
328
+ "expected_behavior": { "type": ["string", "null"] },
329
+ "observed_behavior": { "type": ["string", "null"] },
330
+ "original_reproduction": { "$ref": "#/$defs/reproEvidenceItem" },
331
+ "evidence_before_fix": { "$ref": "#/$defs/reproEvidenceItem" },
332
+ "evidence_after_fix": { "$ref": "#/$defs/reproEvidenceItem" },
333
+ "regression_guard": { "$ref": "#/$defs/reproEvidenceItem" }
334
+ }
335
+ },
336
+ "reproEvidenceItem": {
337
+ "type": "object",
338
+ "additionalProperties": false,
339
+ "required": ["status", "summary", "reason"],
340
+ "properties": {
341
+ "status": { "enum": ["present", "unavailable", "missing"] },
342
+ "summary": { "type": ["string", "null"] },
343
+ "reason": { "type": ["string", "null"] }
344
+ }
345
+ },
346
+ "externalCheck": {
347
+ "type": "object",
348
+ "additionalProperties": false,
349
+ "required": ["source", "authority", "provider", "name", "status", "url", "summary"],
350
+ "properties": {
351
+ "source": { "const": "external_ci" },
352
+ "authority": { "const": "supporting_only" },
353
+ "provider": { "type": "string", "minLength": 1 },
354
+ "name": { "type": "string", "minLength": 1 },
355
+ "status": { "enum": ["passed", "failed", "cancelled", "unknown"] },
356
+ "url": { "type": ["string", "null"] },
357
+ "summary": { "type": ["string", "null"] }
358
+ }
359
+ },
360
+ "evidenceExplanation": {
361
+ "type": "object",
362
+ "additionalProperties": false,
363
+ "required": ["verified_by", "downgraded_by", "blocked_by", "contradicted_by"],
364
+ "properties": {
365
+ "verified_by": {
366
+ "type": "array",
367
+ "items": { "type": "string" }
368
+ },
369
+ "downgraded_by": {
370
+ "type": "array",
371
+ "items": { "type": "string" }
372
+ },
373
+ "blocked_by": {
374
+ "type": "array",
375
+ "items": { "type": "string" }
376
+ },
377
+ "contradicted_by": {
378
+ "type": "array",
379
+ "items": { "type": "string" }
380
+ }
381
+ }
382
+ }
383
+ }
384
+ }
@@ -67,7 +67,12 @@
67
67
  "stdout": { "$ref": "#/$defs/output" },
68
68
  "stderr": { "$ref": "#/$defs/output" },
69
69
  "write_drift": { "$ref": "#/$defs/writeDrift" },
70
+ "performance": { "$ref": "#/$defs/performance" },
70
71
  "redaction": { "$ref": "#/$defs/redaction" },
72
+ "verification_plan_id": {
73
+ "type": "string",
74
+ "pattern": "^sha256:[0-9a-f]{64}$"
75
+ },
71
76
  "receipt_path": { "type": "string" }
72
77
  },
73
78
  "$defs": {
@@ -87,6 +92,114 @@
87
92
  }
88
93
  }
89
94
  },
95
+ "performance": {
96
+ "type": "object",
97
+ "additionalProperties": false,
98
+ "required": [
99
+ "schema_version",
100
+ "measurement",
101
+ "duration_ms",
102
+ "timeout_ratio",
103
+ "command_fingerprint",
104
+ "intent_fingerprint",
105
+ "contract_fingerprint",
106
+ "runner",
107
+ "output_summary",
108
+ "result_summary",
109
+ "quality"
110
+ ],
111
+ "properties": {
112
+ "schema_version": { "const": "1" },
113
+ "measurement": { "const": "wall_clock" },
114
+ "duration_ms": { "type": "integer", "minimum": 0 },
115
+ "executor_overhead_ms": { "type": "number", "minimum": 0 },
116
+ "phases": {
117
+ "type": "array",
118
+ "items": {
119
+ "type": "object",
120
+ "additionalProperties": false,
121
+ "required": ["name", "duration_ms"],
122
+ "properties": {
123
+ "name": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$" },
124
+ "duration_ms": { "type": "number", "minimum": 0 }
125
+ }
126
+ }
127
+ },
128
+ "selection": {
129
+ "type": "object",
130
+ "additionalProperties": false,
131
+ "required": [
132
+ "strategy",
133
+ "changed_file_count",
134
+ "changed_surface_counts",
135
+ "selected_target_count",
136
+ "fallback_used"
137
+ ],
138
+ "properties": {
139
+ "strategy": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$" },
140
+ "changed_file_count": { "type": "integer", "minimum": 0 },
141
+ "changed_surface_counts": {
142
+ "type": "object",
143
+ "additionalProperties": {
144
+ "type": "integer",
145
+ "minimum": 0
146
+ },
147
+ "propertyNames": { "pattern": "^[a-z][a-z0-9_]*$" }
148
+ },
149
+ "selected_target_count": { "type": "integer", "minimum": 0 },
150
+ "fallback_used": { "type": "boolean" }
151
+ }
152
+ },
153
+ "timeout_ratio": { "type": "number", "minimum": 0 },
154
+ "command_fingerprint": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
155
+ "intent_fingerprint": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
156
+ "contract_fingerprint": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
157
+ "runner": {
158
+ "type": "object",
159
+ "additionalProperties": false,
160
+ "required": ["kind", "platform_family", "arch_family", "runtime", "runtime_major"],
161
+ "properties": {
162
+ "kind": { "const": "local" },
163
+ "platform_family": { "type": "string" },
164
+ "arch_family": { "type": "string" },
165
+ "runtime": { "enum": ["node", "bun"] },
166
+ "runtime_major": { "type": "integer", "minimum": 0 }
167
+ }
168
+ },
169
+ "output_summary": {
170
+ "type": "object",
171
+ "additionalProperties": false,
172
+ "required": ["stdout_bytes", "stderr_bytes", "stdout_truncated", "stderr_truncated"],
173
+ "properties": {
174
+ "stdout_bytes": { "type": "integer", "minimum": 0 },
175
+ "stderr_bytes": { "type": "integer", "minimum": 0 },
176
+ "stdout_truncated": { "type": "boolean" },
177
+ "stderr_truncated": { "type": "boolean" }
178
+ }
179
+ },
180
+ "result_summary": {
181
+ "type": "object",
182
+ "additionalProperties": false,
183
+ "required": ["status", "exit_code_class", "timed_out", "error_kind"],
184
+ "properties": {
185
+ "status": { "enum": ["passed", "failed", "timed_out", "start_failed"] },
186
+ "exit_code_class": { "enum": ["success", "failure", "no_exit_code"] },
187
+ "timed_out": { "type": "boolean" },
188
+ "error_kind": { "enum": ["timeout", "start_failed", "exit_code", null] }
189
+ }
190
+ },
191
+ "quality": {
192
+ "type": "object",
193
+ "additionalProperties": false,
194
+ "required": ["phase_timings_source", "target_timings_source", "usable_for_history"],
195
+ "properties": {
196
+ "phase_timings_source": { "enum": ["none", "structured_report"] },
197
+ "target_timings_source": { "const": "none" },
198
+ "usable_for_history": { "type": "boolean" }
199
+ }
200
+ }
201
+ }
202
+ },
90
203
  "redaction": {
91
204
  "type": "object",
92
205
  "additionalProperties": false,
@@ -0,0 +1,81 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://mustflow.dev/schemas/test-selection.schema.json",
4
+ "title": "mustflow test selection contract",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schema_version", "rules"],
8
+ "properties": {
9
+ "schema_version": {
10
+ "const": "1"
11
+ },
12
+ "rules": {
13
+ "type": "array",
14
+ "items": {
15
+ "$ref": "#/$defs/rule"
16
+ }
17
+ }
18
+ },
19
+ "$defs": {
20
+ "stringArray": {
21
+ "type": "array",
22
+ "items": {
23
+ "type": "string"
24
+ }
25
+ },
26
+ "risk": {
27
+ "enum": ["low", "medium", "high", "release_sensitive", "security_sensitive"]
28
+ },
29
+ "rule": {
30
+ "type": "object",
31
+ "additionalProperties": false,
32
+ "required": ["id", "reason", "risk", "match", "select"],
33
+ "properties": {
34
+ "id": {
35
+ "type": "string"
36
+ },
37
+ "reason": {
38
+ "type": "string"
39
+ },
40
+ "risk": {
41
+ "$ref": "#/$defs/risk"
42
+ },
43
+ "match": {
44
+ "$ref": "#/$defs/match"
45
+ },
46
+ "select": {
47
+ "$ref": "#/$defs/select"
48
+ }
49
+ }
50
+ },
51
+ "match": {
52
+ "type": "object",
53
+ "additionalProperties": false,
54
+ "required": ["paths", "surfaces"],
55
+ "properties": {
56
+ "paths": {
57
+ "$ref": "#/$defs/stringArray"
58
+ },
59
+ "surfaces": {
60
+ "$ref": "#/$defs/stringArray"
61
+ }
62
+ }
63
+ },
64
+ "select": {
65
+ "type": "object",
66
+ "additionalProperties": false,
67
+ "required": ["intent", "fallback_intent"],
68
+ "properties": {
69
+ "intent": {
70
+ "type": "string"
71
+ },
72
+ "fallback_intent": {
73
+ "type": "string"
74
+ },
75
+ "test_targets": {
76
+ "$ref": "#/$defs/stringArray"
77
+ }
78
+ }
79
+ }
80
+ }
81
+ }