prizmkit 1.1.119 → 1.1.121

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 (91) hide show
  1. package/bin/create-prizmkit.js +1 -5
  2. package/bundled/VERSION.json +3 -3
  3. package/bundled/dev-pipeline/README.md +41 -38
  4. package/bundled/dev-pipeline/assets/skill-subagent-integration.md +76 -0
  5. package/bundled/dev-pipeline/prizmkit_runtime/config.py +2 -8
  6. package/bundled/dev-pipeline/prizmkit_runtime/interoperability.py +1 -1
  7. package/bundled/dev-pipeline/prizmkit_runtime/platform_detection.py +3 -3
  8. package/bundled/dev-pipeline/prizmkit_runtime/runner_classification.py +23 -25
  9. package/bundled/dev-pipeline/prizmkit_runtime/runner_models.py +8 -2
  10. package/bundled/dev-pipeline/prizmkit_runtime/runner_prompts.py +10 -1
  11. package/bundled/dev-pipeline/prizmkit_runtime/runners.py +88 -32
  12. package/bundled/dev-pipeline/prizmkit_runtime/sessions.py +28 -6
  13. package/bundled/dev-pipeline/scripts/continuation.py +51 -6
  14. package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +60 -102
  15. package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +1 -19
  16. package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +1 -19
  17. package/bundled/dev-pipeline/scripts/{init-dev-team.py → init-change-artifact.py} +6 -16
  18. package/bundled/dev-pipeline/scripts/parse-stream-progress.py +364 -76
  19. package/bundled/dev-pipeline/scripts/update-bug-status.py +57 -14
  20. package/bundled/dev-pipeline/scripts/update-feature-status.py +54 -5
  21. package/bundled/dev-pipeline/scripts/update-refactor-status.py +57 -14
  22. package/bundled/dev-pipeline/scripts/utils.py +1 -1
  23. package/bundled/dev-pipeline/templates/bootstrap-prompt.md +2 -2
  24. package/bundled/dev-pipeline/templates/bootstrap-tier3.md +9 -11
  25. package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +2 -1
  26. package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +2 -2
  27. package/bundled/dev-pipeline/templates/sections/bugfix-phase-review.md +3 -3
  28. package/bundled/dev-pipeline/templates/sections/context-budget-rules.md +1 -1
  29. package/bundled/dev-pipeline/templates/sections/critical-paths-agent.md +0 -1
  30. package/bundled/dev-pipeline/templates/sections/critical-paths-full.md +0 -2
  31. package/bundled/dev-pipeline/templates/sections/phase-commit-full.md +8 -1
  32. package/bundled/dev-pipeline/templates/sections/phase-implement-agent.md +6 -7
  33. package/bundled/dev-pipeline/templates/sections/phase-implement-full.md +6 -7
  34. package/bundled/dev-pipeline/templates/sections/phase-implement-lite.md +4 -2
  35. package/bundled/dev-pipeline/templates/sections/phase-review-agent.md +3 -3
  36. package/bundled/dev-pipeline/templates/sections/phase-review-full.md +5 -3
  37. package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +20 -0
  38. package/bundled/dev-pipeline/templates/sections/refactor-phase-review.md +3 -3
  39. package/bundled/dev-pipeline/tests/test_auto_skip.py +5 -5
  40. package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +214 -144
  41. package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +25 -12
  42. package/bundled/dev-pipeline/tests/test_generate_refactor_prompt.py +11 -14
  43. package/bundled/dev-pipeline/tests/test_python_runner_parity.py +235 -32
  44. package/bundled/dev-pipeline/tests/test_unified_cli.py +219 -16
  45. package/bundled/skills/_metadata.json +4 -4
  46. package/bundled/skills/app-planner/SKILL.md +2 -2
  47. package/bundled/skills/app-planner/references/architecture-decisions.md +1 -3
  48. package/bundled/skills/prizmkit-code-review/SKILL.md +50 -47
  49. package/bundled/skills/prizmkit-code-review/references/review-report-template.md +13 -8
  50. package/bundled/skills/prizmkit-code-review/references/reviewer-agent-prompt.md +47 -33
  51. package/bundled/skills/prizmkit-code-review/references/reviewer-workspace-protocol.md +90 -0
  52. package/bundled/skills/prizmkit-implement/SKILL.md +21 -1
  53. package/bundled/skills/prizmkit-implement/references/implementation-subagent-procedure.md +67 -0
  54. package/bundled/skills/prizmkit-test/SKILL.md +159 -155
  55. package/bundled/skills/prizmkit-test/assets/authoritative-records.schema.json +420 -0
  56. package/bundled/skills/prizmkit-test/assets/behavior-risk-matrix.schema.json +116 -0
  57. package/bundled/skills/prizmkit-test/assets/evidence-manifest.schema.json +112 -0
  58. package/bundled/skills/prizmkit-test/assets/evidence-package-template.json +97 -0
  59. package/bundled/skills/prizmkit-test/references/boundary-coverage-protocol.md +76 -192
  60. package/bundled/skills/prizmkit-test/references/contract-mock-protocol.md +65 -0
  61. package/bundled/skills/prizmkit-test/references/evidence-protocol.md +194 -0
  62. package/bundled/skills/prizmkit-test/references/evidence-request-protocol.md +78 -0
  63. package/bundled/skills/prizmkit-test/references/examples.md +65 -108
  64. package/bundled/skills/prizmkit-test/references/service-boundary-test-catalog.md +10 -7
  65. package/bundled/skills/prizmkit-test/references/test-generation-steps.md +90 -82
  66. package/bundled/skills/prizmkit-test/references/test-report-template.md +77 -98
  67. package/bundled/skills/prizmkit-test/references/trusted-evidence-execution.md +97 -0
  68. package/bundled/skills/prizmkit-test/scripts/build_test_evidence.py +723 -0
  69. package/bundled/skills/prizmkit-test/scripts/validate_test_evidence.py +1426 -0
  70. package/package.json +1 -1
  71. package/src/clean.js +12 -8
  72. package/src/config.js +24 -42
  73. package/src/index.js +1 -10
  74. package/src/manifest.js +3 -9
  75. package/src/metadata.js +0 -26
  76. package/src/prompts.js +0 -13
  77. package/src/scaffold.js +76 -201
  78. package/src/upgrade.js +16 -33
  79. package/bundled/adapters/claude/agent-adapter.js +0 -96
  80. package/bundled/adapters/claude/team-adapter.js +0 -183
  81. package/bundled/adapters/codebuddy/agent-adapter.js +0 -42
  82. package/bundled/adapters/codebuddy/team-adapter.js +0 -46
  83. package/bundled/adapters/codex/agent-adapter.js +0 -38
  84. package/bundled/adapters/codex/team-adapter.js +0 -37
  85. package/bundled/agents/prizm-dev-team-dev.md +0 -123
  86. package/bundled/agents/prizm-dev-team-reviewer.md +0 -113
  87. package/bundled/dev-pipeline/assets/prizm-dev-team-integration.md +0 -65
  88. package/bundled/dev-pipeline/templates/bootstrap-tier1.md +0 -436
  89. package/bundled/dev-pipeline/templates/bootstrap-tier2.md +0 -510
  90. package/bundled/skills/prizmkit-test/scripts/validate_boundary_report.py +0 -347
  91. package/bundled/team/prizm-dev-team.json +0 -27
@@ -0,0 +1,420 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://prizmkit.dev/schemas/test-evidence-authoritative-records.schema.json",
4
+ "title": "PrizmKit Test Evidence Authoritative Records",
5
+ "$defs": {
6
+ "sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
7
+ "path": { "type": "string", "minLength": 1 },
8
+ "stringArray": { "type": "array", "items": { "type": "string", "minLength": 1 } },
9
+ "fileRef": {
10
+ "type": "object",
11
+ "additionalProperties": false,
12
+ "required": ["path", "sha256"],
13
+ "properties": {
14
+ "path": { "$ref": "#/$defs/path" },
15
+ "sha256": { "$ref": "#/$defs/sha256" }
16
+ }
17
+ },
18
+ "discoveryEvidence": {
19
+ "type": "object",
20
+ "additionalProperties": false,
21
+ "required": ["kind", "source", "observations"],
22
+ "properties": {
23
+ "kind": { "enum": ["manifest", "runner-config", "filesystem", "contract", "lockfile", "import-graph", "caller-analysis", "project-doc", "model-analysis"] },
24
+ "source": { "type": "string", "minLength": 1 },
25
+ "observations": { "$ref": "#/$defs/stringArray" }
26
+ }
27
+ },
28
+ "naDecision": {
29
+ "type": "object",
30
+ "additionalProperties": false,
31
+ "required": ["rationale", "evidence", "considered_signals", "conflicts"],
32
+ "properties": {
33
+ "rationale": { "type": "string", "minLength": 8 },
34
+ "evidence": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/discoveryEvidence" } },
35
+ "considered_signals": { "$ref": "#/$defs/stringArray" },
36
+ "conflicts": {
37
+ "type": "array",
38
+ "items": {
39
+ "type": "object",
40
+ "additionalProperties": false,
41
+ "required": ["signal", "explanation"],
42
+ "properties": {
43
+ "signal": { "type": "string", "minLength": 1 },
44
+ "explanation": { "type": "string", "minLength": 8 }
45
+ }
46
+ }
47
+ }
48
+ }
49
+ },
50
+ "externalTarget": {
51
+ "type": "object",
52
+ "additionalProperties": false,
53
+ "required": ["name", "external", "classification", "endpoint_evidence", "allow_evidence", "deny_evidence"],
54
+ "properties": {
55
+ "name": { "type": "string", "minLength": 1 },
56
+ "external": { "type": "boolean" },
57
+ "classification": { "enum": ["local", "isolated", "test", "staging", "production", "unknown"] },
58
+ "endpoint_evidence": { "$ref": "#/$defs/stringArray" },
59
+ "allow_evidence": { "type": "array", "items": { "type": "string", "minLength": 1 } },
60
+ "deny_evidence": { "type": "array", "items": { "type": "string", "minLength": 1 } }
61
+ }
62
+ },
63
+ "changeClassification": {
64
+ "type": "object",
65
+ "additionalProperties": false,
66
+ "required": ["classification", "full_protocol_required", "reasons", "signals", "evidence"],
67
+ "properties": {
68
+ "classification": { "enum": ["behavior", "lightweight"] },
69
+ "full_protocol_required": { "type": "boolean" },
70
+ "reasons": { "$ref": "#/$defs/stringArray" },
71
+ "signals": { "$ref": "#/$defs/stringArray" },
72
+ "evidence": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/discoveryEvidence" } }
73
+ }
74
+ },
75
+ "scope": {
76
+ "type": "object",
77
+ "additionalProperties": false,
78
+ "required": ["target_hashes", "affected_module", "boundary_source", "changed_files", "module_roots", "primary_scope", "regression_ring", "exclusions", "discovery_evidence", "unresolved_edges"],
79
+ "properties": {
80
+ "target_hashes": { "$ref": "#/$defs/targetHashes" },
81
+ "affected_module": { "type": "string", "minLength": 1 },
82
+ "boundary_source": { "enum": ["explicit", "cohesion-derived"] },
83
+ "changed_files": { "$ref": "#/$defs/stringArray" },
84
+ "module_roots": {
85
+ "type": "array",
86
+ "minItems": 1,
87
+ "items": {
88
+ "type": "object",
89
+ "additionalProperties": false,
90
+ "required": ["path", "files", "discovery_evidence"],
91
+ "properties": {
92
+ "path": { "$ref": "#/$defs/path" },
93
+ "files": { "$ref": "#/$defs/stringArray" },
94
+ "discovery_evidence": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/discoveryEvidence" } }
95
+ }
96
+ }
97
+ },
98
+ "primary_scope": { "$ref": "#/$defs/stringArray" },
99
+ "regression_ring": {
100
+ "type": "array",
101
+ "items": {
102
+ "type": "object",
103
+ "additionalProperties": false,
104
+ "required": ["name", "kind", "files", "planned_test_ids", "discovery_evidence"],
105
+ "properties": {
106
+ "name": { "type": "string", "minLength": 1 },
107
+ "kind": { "enum": ["caller", "consumer", "shared-contract", "state-dependency"] },
108
+ "files": { "$ref": "#/$defs/stringArray" },
109
+ "planned_test_ids": { "$ref": "#/$defs/stringArray" },
110
+ "discovery_evidence": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/discoveryEvidence" } }
111
+ }
112
+ }
113
+ },
114
+ "exclusions": {
115
+ "type": "array",
116
+ "items": {
117
+ "type": "object",
118
+ "additionalProperties": false,
119
+ "required": ["path", "reason", "evidence"],
120
+ "properties": {
121
+ "path": { "$ref": "#/$defs/path" },
122
+ "reason": { "type": "string", "minLength": 8 },
123
+ "evidence": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/discoveryEvidence" } }
124
+ }
125
+ }
126
+ },
127
+ "discovery_evidence": {
128
+ "type": "object",
129
+ "additionalProperties": false,
130
+ "required": ["tests", "contracts", "lockfiles", "module_boundaries"],
131
+ "properties": {
132
+ "tests": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/discoveryEvidence" } },
133
+ "contracts": { "type": "array", "items": { "$ref": "#/$defs/discoveryEvidence" } },
134
+ "lockfiles": { "type": "array", "items": { "$ref": "#/$defs/discoveryEvidence" } },
135
+ "module_boundaries": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/discoveryEvidence" } }
136
+ }
137
+ },
138
+ "unresolved_edges": {
139
+ "type": "array",
140
+ "items": {
141
+ "type": "object",
142
+ "additionalProperties": false,
143
+ "required": ["description", "verdict_capable", "resolved", "resolution_evidence"],
144
+ "properties": {
145
+ "description": { "type": "string", "minLength": 1 },
146
+ "verdict_capable": { "type": "boolean" },
147
+ "resolved": { "type": "boolean" },
148
+ "resolution_evidence": { "type": "array", "items": { "$ref": "#/$defs/discoveryEvidence" } }
149
+ }
150
+ }
151
+ }
152
+ }
153
+ },
154
+ "targetHashes": {
155
+ "type": "object",
156
+ "additionalProperties": false,
157
+ "required": ["source", "tests", "contracts", "lockfiles", "environment", "plan"],
158
+ "properties": {
159
+ "source": { "$ref": "#/$defs/sha256" },
160
+ "tests": { "$ref": "#/$defs/sha256" },
161
+ "contracts": { "$ref": "#/$defs/sha256" },
162
+ "lockfiles": { "$ref": "#/$defs/sha256" },
163
+ "environment": { "$ref": "#/$defs/sha256" },
164
+ "plan": { "$ref": "#/$defs/sha256" }
165
+ }
166
+ },
167
+ "targetInventory": {
168
+ "type": "object",
169
+ "additionalProperties": false,
170
+ "required": ["inventory_request_path", "inventory_request_sha256", "categories", "changed_files", "module_roots", "module_root_files", "exclusions", "discovery_evidence", "plan_inputs"],
171
+ "properties": {
172
+ "inventory_request_path": { "$ref": "#/$defs/path" },
173
+ "inventory_request_sha256": { "$ref": "#/$defs/sha256" },
174
+ "categories": {
175
+ "type": "object",
176
+ "additionalProperties": false,
177
+ "required": ["source", "tests", "contracts", "lockfiles"],
178
+ "properties": {
179
+ "source": { "type": "array", "items": { "$ref": "#/$defs/fileRef" } },
180
+ "tests": { "type": "array", "items": { "$ref": "#/$defs/fileRef" } },
181
+ "contracts": { "type": "array", "items": { "$ref": "#/$defs/fileRef" } },
182
+ "lockfiles": { "type": "array", "items": { "$ref": "#/$defs/fileRef" } }
183
+ }
184
+ },
185
+ "changed_files": { "$ref": "#/$defs/stringArray" },
186
+ "module_roots": { "$ref": "#/$defs/stringArray" },
187
+ "module_root_files": {
188
+ "type": "object",
189
+ "minProperties": 1,
190
+ "additionalProperties": { "$ref": "#/$defs/stringArray" }
191
+ },
192
+ "exclusions": { "type": "array", "items": { "$ref": "#/$defs/path" } },
193
+ "discovery_evidence": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/discoveryEvidence" } },
194
+ "plan_inputs": { "type": "object", "minProperties": 1 }
195
+ }
196
+ },
197
+ "testPlan": {
198
+ "type": "object",
199
+ "additionalProperties": false,
200
+ "required": ["target_hashes", "plan_inputs", "layers", "tests"],
201
+ "properties": {
202
+ "target_hashes": { "$ref": "#/$defs/targetHashes" },
203
+ "plan_inputs": { "type": "object", "minProperties": 1 },
204
+ "layers": {
205
+ "type": "array",
206
+ "minItems": 5,
207
+ "items": {
208
+ "type": "object",
209
+ "additionalProperties": false,
210
+ "required": ["name", "required", "not_applicable"],
211
+ "properties": {
212
+ "name": { "enum": ["focused", "module-component", "contract-integration", "affected-module-regression", "regression-ring"] },
213
+ "required": { "type": "boolean" },
214
+ "not_applicable": { "type": ["object", "null"] }
215
+ }
216
+ }
217
+ },
218
+ "tests": {
219
+ "type": "array",
220
+ "minItems": 1,
221
+ "items": {
222
+ "type": "object",
223
+ "additionalProperties": false,
224
+ "required": ["id", "behavior_ids", "project_path", "snapshot_path", "inventory_path", "layers"],
225
+ "properties": {
226
+ "id": { "type": "string", "minLength": 1 },
227
+ "behavior_ids": { "$ref": "#/$defs/stringArray" },
228
+ "project_path": { "$ref": "#/$defs/path" },
229
+ "snapshot_path": { "$ref": "#/$defs/path" },
230
+ "inventory_path": { "$ref": "#/$defs/path" },
231
+ "layers": { "$ref": "#/$defs/stringArray" }
232
+ }
233
+ }
234
+ }
235
+ }
236
+ },
237
+ "executionRequest": {
238
+ "type": "object",
239
+ "additionalProperties": false,
240
+ "required": ["request_version", "purpose", "command", "cwd", "environment", "tool_version_commands", "layer", "test_ids", "external_targets"],
241
+ "properties": {
242
+ "request_version": { "const": "1.0" },
243
+ "purpose": { "type": "string", "minLength": 1 },
244
+ "command": { "type": "array", "minItems": 1, "items": { "type": "string" } },
245
+ "cwd": { "type": "string" },
246
+ "environment": { "type": "object" },
247
+ "tool_version_commands": { "type": "object" },
248
+ "layer": { "enum": ["focused", "module-component", "contract-integration", "affected-module-regression", "regression-ring", "lightweight"] },
249
+ "test_ids": { "type": "array", "items": { "type": "string", "minLength": 1 } },
250
+ "external_targets": { "type": "array", "items": { "$ref": "#/$defs/externalTarget" } },
251
+ "timeout_seconds": { "type": "number", "exclusiveMinimum": 0 },
252
+ "attempt_policy": { "type": "object" },
253
+ "concurrency": { "type": "object" }
254
+ }
255
+ },
256
+ "executionReceipt": {
257
+ "type": "object",
258
+ "additionalProperties": false,
259
+ "required": ["receipt_format", "runner_path", "runner_sha256", "execution_id", "attempt_index", "request_path", "request_sha256", "purpose", "command", "cwd", "environment", "tool_versions", "layer", "test_ids", "external_targets", "exit_code", "stdout_path", "stderr_path", "stdout_sha256", "stderr_sha256", "selected_execution", "reliable", "started_at", "finished_at", "previous_receipt_sha256"],
260
+ "properties": {
261
+ "receipt_format": { "const": "prizmkit-runner-generated-v1" },
262
+ "runner_path": { "$ref": "#/$defs/path" },
263
+ "runner_sha256": { "$ref": "#/$defs/sha256" },
264
+ "execution_id": { "type": "string", "pattern": "^[a-f0-9-]{36}$" },
265
+ "attempt_index": { "type": "integer", "minimum": 1 },
266
+ "request_path": { "$ref": "#/$defs/path" },
267
+ "request_sha256": { "$ref": "#/$defs/sha256" },
268
+ "purpose": { "type": "string", "minLength": 1 },
269
+ "command": { "type": "array", "minItems": 1, "items": { "type": "string" } },
270
+ "cwd": { "type": "string" },
271
+ "environment": { "type": "object" },
272
+ "tool_versions": { "type": "object" },
273
+ "layer": { "enum": ["focused", "module-component", "contract-integration", "affected-module-regression", "regression-ring", "lightweight"] },
274
+ "test_ids": { "type": "array", "items": { "type": "string", "minLength": 1 } },
275
+ "external_targets": { "type": "array", "items": { "$ref": "#/$defs/externalTarget" } },
276
+ "exit_code": { "type": "integer" },
277
+ "stdout_path": { "$ref": "#/$defs/path" },
278
+ "stderr_path": { "$ref": "#/$defs/path" },
279
+ "stdout_sha256": { "$ref": "#/$defs/sha256" },
280
+ "stderr_sha256": { "$ref": "#/$defs/sha256" },
281
+ "selected_execution": { "type": "boolean" },
282
+ "reliable": { "type": "boolean" },
283
+ "started_at": { "type": "string", "minLength": 1 },
284
+ "finished_at": { "type": "string", "minLength": 1 },
285
+ "previous_receipt_sha256": { "type": ["string", "null"] },
286
+ "replay_of": { "type": ["string", "null"] },
287
+ "isolation": { "type": ["object", "null"] }
288
+ }
289
+ },
290
+ "executionLog": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/executionReceipt" } },
291
+ "differentialRequest": {
292
+ "type": "object",
293
+ "additionalProperties": false,
294
+ "required": ["request_version", "behavior_id", "method", "execution_request", "baseline_commit", "current_tree_sha256", "mutation_patch_path", "test_overlay_paths", "expected_failure_signals"],
295
+ "properties": {
296
+ "request_version": { "const": "1.0" },
297
+ "behavior_id": { "type": "string", "minLength": 1 },
298
+ "method": { "enum": ["baseline", "controlled-mutation"] },
299
+ "execution_request": { "$ref": "#/$defs/executionRequest" },
300
+ "baseline_commit": { "type": "string", "minLength": 1 },
301
+ "current_tree_sha256": { "$ref": "#/$defs/sha256" },
302
+ "mutation_patch_path": { "type": ["string", "null"] },
303
+ "test_overlay_paths": { "$ref": "#/$defs/stringArray" },
304
+ "expected_failure_signals": { "$ref": "#/$defs/stringArray" }
305
+ }
306
+ },
307
+ "differentialProof": {
308
+ "type": "object",
309
+ "additionalProperties": false,
310
+ "required": ["proofs"],
311
+ "properties": {
312
+ "proofs": {
313
+ "type": "array",
314
+ "minItems": 1,
315
+ "items": {
316
+ "type": "object",
317
+ "additionalProperties": false,
318
+ "required": ["behavior_id", "classification", "method", "differential_request_path", "differential_request_sha256", "baseline_commit", "current_tree_sha256", "baseline_execution_id", "mutation_execution_id", "current_execution_id", "failure_reason_matched", "cleanup_succeeded", "project_tree_before_sha256", "project_tree_after_sha256", "isolation_tree_sha256", "mutation_apply_sha256", "mutation_restore_sha256", "not_applicable"],
319
+ "properties": {
320
+ "behavior_id": { "type": "string", "minLength": 1 },
321
+ "classification": { "enum": ["PROVEN", "NOT_APPLICABLE", "UNPROVEN"] },
322
+ "method": { "type": ["string", "null"] },
323
+ "differential_request_path": { "type": ["string", "null"] },
324
+ "differential_request_sha256": { "type": ["string", "null"] },
325
+ "baseline_commit": { "type": ["string", "null"] },
326
+ "current_tree_sha256": { "type": ["string", "null"] },
327
+ "baseline_execution_id": { "type": ["string", "null"] },
328
+ "mutation_execution_id": { "type": ["string", "null"] },
329
+ "current_execution_id": { "type": ["string", "null"] },
330
+ "failure_reason_matched": { "type": "boolean" },
331
+ "cleanup_succeeded": { "type": "boolean" },
332
+ "project_tree_before_sha256": { "type": ["string", "null"] },
333
+ "project_tree_after_sha256": { "type": ["string", "null"] },
334
+ "isolation_tree_sha256": { "type": ["string", "null"] },
335
+ "mutation_apply_sha256": { "type": ["string", "null"] },
336
+ "mutation_restore_sha256": { "type": ["string", "null"] },
337
+ "not_applicable": { "type": ["object", "null"] }
338
+ }
339
+ }
340
+ }
341
+ }
342
+ },
343
+ "infrastructureChanges": {
344
+ "type": "object",
345
+ "additionalProperties": false,
346
+ "required": ["native_runner", "changes", "cleanup_succeeded", "external_targets", "contract_snapshots"],
347
+ "properties": {
348
+ "native_runner": { "type": "string", "minLength": 1 },
349
+ "changes": { "type": "array", "items": { "type": "object" } },
350
+ "cleanup_succeeded": { "type": "boolean" },
351
+ "external_targets": { "type": "array", "items": { "$ref": "#/$defs/externalTarget" } },
352
+ "contract_snapshots": {
353
+ "type": "array",
354
+ "items": {
355
+ "type": "object",
356
+ "additionalProperties": false,
357
+ "required": ["path", "derivation_source", "sha256"],
358
+ "properties": {
359
+ "path": { "$ref": "#/$defs/path" },
360
+ "derivation_source": { "type": "string", "minLength": 1 },
361
+ "sha256": { "$ref": "#/$defs/sha256" }
362
+ }
363
+ }
364
+ }
365
+ }
366
+ },
367
+ "verdict": {
368
+ "type": "object",
369
+ "additionalProperties": false,
370
+ "required": ["verdict", "testing_domain_only", "authorizes_commit_or_release", "real_environment_validated", "repairs_business_defects", "code_evidence_replayable", "blockers", "reproduced_failures"],
371
+ "properties": {
372
+ "verdict": { "enum": ["TEST_PASS", "TEST_FAIL", "TEST_BLOCKED"] },
373
+ "testing_domain_only": { "const": true },
374
+ "authorizes_commit_or_release": { "const": false },
375
+ "real_environment_validated": { "const": false },
376
+ "repairs_business_defects": { "const": false },
377
+ "code_evidence_replayable": { "type": "boolean" },
378
+ "blockers": { "type": "array", "items": { "type": "string", "minLength": 1 } },
379
+ "reproduced_failures": { "type": "array", "items": { "type": "string", "minLength": 1 } }
380
+ }
381
+ },
382
+ "validation": {
383
+ "type": "object",
384
+ "additionalProperties": false,
385
+ "required": ["validator", "validator_sha256", "payload_sha256", "result", "verdict", "semantics", "replay_receipt_ids"],
386
+ "properties": {
387
+ "validator": { "const": "validate_test_evidence.py" },
388
+ "validator_sha256": { "$ref": "#/$defs/sha256" },
389
+ "payload_sha256": { "$ref": "#/$defs/sha256" },
390
+ "result": { "const": "passed" },
391
+ "verdict": { "enum": ["TEST_PASS", "TEST_FAIL", "TEST_BLOCKED"] },
392
+ "semantics": { "const": "integrity-and-protocol-validation-not-hostile-producer-proof" },
393
+ "replay_receipt_ids": { "type": "array", "items": { "type": "string", "minLength": 1 } }
394
+ }
395
+ },
396
+ "lightweightVerification": {
397
+ "type": "object",
398
+ "additionalProperties": false,
399
+ "required": ["claim", "runtime_behavior_claimed", "checks"],
400
+ "properties": {
401
+ "claim": { "const": "non_behavior_change" },
402
+ "runtime_behavior_claimed": { "const": false },
403
+ "checks": {
404
+ "type": "array",
405
+ "minItems": 1,
406
+ "items": {
407
+ "type": "object",
408
+ "additionalProperties": false,
409
+ "required": ["name", "execution_id", "evidence"],
410
+ "properties": {
411
+ "name": { "type": "string", "minLength": 1 },
412
+ "execution_id": { "type": "string", "minLength": 1 },
413
+ "evidence": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/discoveryEvidence" } }
414
+ }
415
+ }
416
+ }
417
+ }
418
+ }
419
+ }
420
+ }
@@ -0,0 +1,116 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://prizmkit.dev/schemas/behavior-risk-matrix.schema.json",
4
+ "title": "PrizmKit Behavior Risk Matrix",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["affected_module", "primary_scope", "regression_ring", "unresolved_edges", "behaviors"],
8
+ "properties": {
9
+ "affected_module": {
10
+ "type": "object",
11
+ "additionalProperties": false,
12
+ "required": ["name", "boundary_source", "files"],
13
+ "properties": {
14
+ "name": { "type": "string", "minLength": 1 },
15
+ "boundary_source": { "enum": ["explicit", "cohesion-derived"] },
16
+ "files": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } }
17
+ }
18
+ },
19
+ "primary_scope": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } },
20
+ "regression_ring": {
21
+ "type": "array",
22
+ "items": {
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "required": ["name", "kind", "verification"],
26
+ "properties": {
27
+ "name": { "type": "string", "minLength": 1 },
28
+ "kind": { "enum": ["caller", "consumer", "shared-contract", "state-dependency"] },
29
+ "verification": { "type": "string", "minLength": 1 }
30
+ }
31
+ }
32
+ },
33
+ "unresolved_edges": {
34
+ "type": "array",
35
+ "items": {
36
+ "type": "object",
37
+ "additionalProperties": false,
38
+ "required": ["description", "verdict_capable", "resolution"],
39
+ "properties": {
40
+ "description": { "type": "string", "minLength": 1 },
41
+ "verdict_capable": { "type": "boolean" },
42
+ "resolution": { "type": "string" }
43
+ }
44
+ }
45
+ },
46
+ "behaviors": {
47
+ "type": "array",
48
+ "minItems": 1,
49
+ "items": { "$ref": "#/$defs/behavior" }
50
+ }
51
+ },
52
+ "$defs": {
53
+ "riskCell": {
54
+ "type": "object",
55
+ "additionalProperties": false,
56
+ "required": ["status", "test_ids", "execution_ids", "not_applicable"],
57
+ "properties": {
58
+ "status": { "enum": ["applicable", "not_applicable", "unresolved"] },
59
+ "test_ids": { "type": "array", "items": { "type": "string", "minLength": 1 } },
60
+ "execution_ids": { "type": "array", "items": { "type": "string", "minLength": 1 } },
61
+ "not_applicable": {
62
+ "type": ["object", "null"],
63
+ "properties": {
64
+ "rationale": { "type": "string", "minLength": 8 },
65
+ "evidence": { "type": "array", "minItems": 1, "items": { "type": "object" } },
66
+ "considered_signals": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } },
67
+ "conflicts": { "type": "array", "items": { "type": "object" } }
68
+ },
69
+ "required": ["rationale", "evidence", "considered_signals", "conflicts"],
70
+ "additionalProperties": false
71
+ }
72
+ }
73
+ },
74
+ "behavior": {
75
+ "type": "object",
76
+ "additionalProperties": false,
77
+ "required": [
78
+ "id", "public_behavior", "contract_source", "truth_precedence", "preconditions",
79
+ "input_classes", "boundary_values", "outputs", "side_effects", "state_transitions",
80
+ "error_behavior", "risks"
81
+ ],
82
+ "properties": {
83
+ "id": { "type": "string", "minLength": 1 },
84
+ "public_behavior": { "type": "string", "minLength": 1 },
85
+ "contract_source": { "type": "string", "minLength": 1 },
86
+ "truth_precedence": {
87
+ "type": "array",
88
+ "minItems": 1,
89
+ "items": { "enum": ["specification", "machine-readable-contract", "acceptance-condition", "trusted-test", "caller", "current-implementation"] }
90
+ },
91
+ "preconditions": { "type": "array", "items": { "type": "string" } },
92
+ "input_classes": { "type": "array", "items": { "type": "string" } },
93
+ "boundary_values": { "type": "array", "items": { "type": "string" } },
94
+ "outputs": { "type": "array", "items": { "type": "string" } },
95
+ "side_effects": { "type": "array", "items": { "type": "string" } },
96
+ "state_transitions": { "type": "array", "items": { "type": "string" } },
97
+ "error_behavior": { "type": "array", "items": { "type": "string" } },
98
+ "risks": {
99
+ "type": "object",
100
+ "additionalProperties": false,
101
+ "required": ["functional", "boundary", "permission", "concurrency", "idempotency", "time", "dependency", "consumer"],
102
+ "properties": {
103
+ "functional": { "$ref": "#/$defs/riskCell" },
104
+ "boundary": { "$ref": "#/$defs/riskCell" },
105
+ "permission": { "$ref": "#/$defs/riskCell" },
106
+ "concurrency": { "$ref": "#/$defs/riskCell" },
107
+ "idempotency": { "$ref": "#/$defs/riskCell" },
108
+ "time": { "$ref": "#/$defs/riskCell" },
109
+ "dependency": { "$ref": "#/$defs/riskCell" },
110
+ "consumer": { "$ref": "#/$defs/riskCell" }
111
+ }
112
+ }
113
+ }
114
+ }
115
+ }
116
+ }
@@ -0,0 +1,112 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://prizmkit.dev/schemas/test-evidence-manifest.schema.json",
4
+ "title": "PrizmKit Test Evidence Manifest",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "protocol_version",
9
+ "evidence_id",
10
+ "evidence_id_inputs",
11
+ "sensitivity",
12
+ "environment_claim",
13
+ "change_class",
14
+ "baseline_commit",
15
+ "working_diff_sha256",
16
+ "target_hashes",
17
+ "stages",
18
+ "files",
19
+ "final_verdict"
20
+ ],
21
+ "properties": {
22
+ "protocol_version": { "const": "1.0" },
23
+ "evidence_id": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
24
+ "evidence_id_inputs": {
25
+ "type": "object",
26
+ "additionalProperties": false,
27
+ "required": ["baseline_commit", "working_diff_sha256", "scope_sha256"],
28
+ "properties": {
29
+ "baseline_commit": { "type": "string", "minLength": 1 },
30
+ "working_diff_sha256": { "$ref": "#/$defs/sha256" },
31
+ "scope_sha256": { "$ref": "#/$defs/sha256" }
32
+ }
33
+ },
34
+ "sensitivity": { "const": "project-controlled" },
35
+ "environment_claim": { "const": "mocked-code-level-only" },
36
+ "change_class": { "enum": ["behavior", "lightweight"] },
37
+ "baseline_commit": { "type": "string", "minLength": 1 },
38
+ "working_diff_sha256": { "$ref": "#/$defs/sha256" },
39
+ "target_hashes": {
40
+ "type": "object",
41
+ "additionalProperties": false,
42
+ "required": ["source", "tests", "contracts", "lockfiles", "environment", "plan"],
43
+ "properties": {
44
+ "source": { "$ref": "#/$defs/sha256" },
45
+ "tests": { "$ref": "#/$defs/sha256" },
46
+ "contracts": { "$ref": "#/$defs/sha256" },
47
+ "lockfiles": { "$ref": "#/$defs/sha256" },
48
+ "environment": { "$ref": "#/$defs/sha256" },
49
+ "plan": { "$ref": "#/$defs/sha256" }
50
+ }
51
+ },
52
+ "stages": {
53
+ "type": "array",
54
+ "minItems": 9,
55
+ "items": { "$ref": "#/$defs/stage" }
56
+ },
57
+ "files": {
58
+ "type": "array",
59
+ "minItems": 10,
60
+ "items": { "$ref": "#/$defs/file" }
61
+ },
62
+ "final_verdict": { "enum": ["TEST_PASS", "TEST_FAIL", "TEST_BLOCKED"] },
63
+ "compatibility": { "const": "legacy-test-report-interface-not-supported" }
64
+ },
65
+ "$defs": {
66
+ "sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
67
+ "stage": {
68
+ "type": "object",
69
+ "additionalProperties": false,
70
+ "required": ["name", "status", "input_sha256", "outputs"],
71
+ "properties": {
72
+ "name": {
73
+ "enum": [
74
+ "CHANGE_CLASSIFY",
75
+ "SCOPE_DISCOVER",
76
+ "CONTRACT_MODEL",
77
+ "TEST_PLAN",
78
+ "INFRA_READY",
79
+ "TEST_BUILD",
80
+ "EXECUTE_PROVE",
81
+ "EVIDENCE_PACKAGE",
82
+ "EVIDENCE_VALIDATE"
83
+ ]
84
+ },
85
+ "status": { "enum": ["complete", "not_applicable"] },
86
+ "input_sha256": { "$ref": "#/$defs/sha256" },
87
+ "outputs": { "type": "array", "items": { "type": "string", "minLength": 1 } },
88
+ "not_applicable": {
89
+ "type": ["object", "null"],
90
+ "properties": {
91
+ "rationale": { "type": "string", "minLength": 8 },
92
+ "evidence": { "type": "array", "minItems": 1, "items": { "type": "object" } },
93
+ "considered_signals": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } },
94
+ "conflicts": { "type": "array", "items": { "type": "object" } }
95
+ },
96
+ "required": ["rationale", "evidence", "considered_signals", "conflicts"],
97
+ "additionalProperties": false
98
+ }
99
+ }
100
+ },
101
+ "file": {
102
+ "type": "object",
103
+ "additionalProperties": false,
104
+ "required": ["path", "sha256", "produced_by"],
105
+ "properties": {
106
+ "path": { "type": "string", "minLength": 1 },
107
+ "sha256": { "$ref": "#/$defs/sha256" },
108
+ "produced_by": { "type": "string", "minLength": 1 }
109
+ }
110
+ }
111
+ }
112
+ }