gentle-pi 1.2.0 → 2.0.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 (107) hide show
  1. package/README.md +40 -9
  2. package/assets/agents/review-readability.md +0 -1
  3. package/assets/agents/review-reliability.md +0 -1
  4. package/assets/agents/review-resilience.md +0 -1
  5. package/assets/agents/review-risk.md +0 -1
  6. package/contracts/review-integration/v1/fixtures/binding-revision-conflict.fixture.json +25 -0
  7. package/contracts/review-integration/v1/fixtures/capabilities-v1.2.fixture.json +263 -0
  8. package/contracts/review-integration/v1/fixtures/capabilities-v1.3.fixture.json +301 -0
  9. package/contracts/review-integration/v1/fixtures/capabilities-v1.4.fixture.json +312 -0
  10. package/contracts/review-integration/v1/fixtures/capabilities-v1.5.fixture.json +321 -0
  11. package/contracts/review-integration/v1/fixtures/consent.fixture.json +36 -0
  12. package/contracts/review-integration/v1/fixtures/final-verification-incident.fixture.json +1 -0
  13. package/contracts/review-integration/v1/fixtures/operation.fixture.json +4 -0
  14. package/contracts/review-integration/v1/fixtures/repair-preflight.fixture.json +54 -0
  15. package/contracts/review-integration/v1/fixtures/start-v2.fixture.json +97 -0
  16. package/contracts/review-integration/v1/fixtures/start.fixture.json +25 -1
  17. package/contracts/review-integration/v1/fixtures/status-ambiguous.fixture.json +4 -0
  18. package/contracts/review-integration/v1/fixtures/status-corrupted.fixture.json +4 -0
  19. package/contracts/review-integration/v1/fixtures/status-recover.fixture.json +4 -0
  20. package/contracts/review-integration/v1/fixtures/status-unrelated.fixture.json +4 -0
  21. package/contracts/review-integration/v1/fixtures/status-v2-ambiguous.fixture.json +110 -0
  22. package/contracts/review-integration/v1/fixtures/status-v2-corrupted.fixture.json +107 -0
  23. package/contracts/review-integration/v1/fixtures/status-v2-final-verification-retry.fixture.json +192 -0
  24. package/contracts/review-integration/v1/fixtures/status-v2-recover.fixture.json +130 -0
  25. package/contracts/review-integration/v1/fixtures/status-v2-repair.fixture.json +161 -0
  26. package/contracts/review-integration/v1/fixtures/status-v2-unrelated.fixture.json +103 -0
  27. package/contracts/review-integration/v1/fixtures/status-v2.fixture.json +193 -0
  28. package/contracts/review-integration/v1/fixtures/status.fixture.json +19 -5
  29. package/contracts/review-integration/v1/fixtures/verification-evidence.fixture.json +1 -0
  30. package/contracts/review-integration/v1/schemas/admitted-result.schema.json +35 -0
  31. package/contracts/review-integration/v1/schemas/artifact-subject.schema.json +33 -0
  32. package/contracts/review-integration/v1/schemas/authority-repair-assessment.schema.json +247 -0
  33. package/contracts/review-integration/v1/schemas/capabilities-v1.2.schema.json +249 -0
  34. package/contracts/review-integration/v1/schemas/capabilities-v1.3.schema.json +429 -0
  35. package/contracts/review-integration/v1/schemas/capabilities-v1.4.schema.json +432 -0
  36. package/contracts/review-integration/v1/schemas/capabilities-v1.5.schema.json +154 -0
  37. package/contracts/review-integration/v1/schemas/consent.schema.json +86 -0
  38. package/contracts/review-integration/v1/schemas/failure.schema.json +54 -8
  39. package/contracts/review-integration/v1/schemas/final-verification-incident.schema.json +51 -0
  40. package/contracts/review-integration/v1/schemas/operation.schema.json +204 -31
  41. package/contracts/review-integration/v1/schemas/repair.schema.json +251 -0
  42. package/contracts/review-integration/v1/schemas/result-artifact-v2.schema.json +38 -0
  43. package/contracts/review-integration/v1/schemas/start-v2.schema.json +216 -0
  44. package/contracts/review-integration/v1/schemas/start.schema.json +79 -3
  45. package/contracts/review-integration/v1/schemas/status-v2.schema.json +313 -0
  46. package/contracts/review-integration/v1/schemas/status.schema.json +37 -10
  47. package/contracts/review-integration/v1/schemas/targeted-validation-request.schema.json +46 -0
  48. package/contracts/review-integration/v1/schemas/verification-evidence.schema.json +64 -0
  49. package/contracts/review-integration/v2/fixtures/capabilities.fixture.json +111 -0
  50. package/contracts/review-integration/v2/fixtures/consent.fixture.json +36 -0
  51. package/contracts/review-integration/v2/fixtures/start.fixture.json +93 -0
  52. package/contracts/review-integration/v2/fixtures/status.fixture.json +113 -0
  53. package/contracts/review-integration/v2/schemas/admitted-result.schema.json +14 -0
  54. package/contracts/review-integration/v2/schemas/artifact-subject.schema.json +36 -0
  55. package/contracts/review-integration/v2/schemas/capabilities.schema.json +111 -0
  56. package/contracts/review-integration/v2/schemas/consent.schema.json +70 -0
  57. package/contracts/review-integration/v2/schemas/failure.schema.json +35 -0
  58. package/contracts/review-integration/v2/schemas/operation.schema.json +46 -0
  59. package/contracts/review-integration/v2/schemas/repair.schema.json +22 -0
  60. package/contracts/review-integration/v2/schemas/start.schema.json +106 -0
  61. package/contracts/review-integration/v2/schemas/status.schema.json +104 -0
  62. package/docs/native-authority-architecture.md +18 -3
  63. package/docs/review-integration.md +175 -27
  64. package/extensions/gentle-ai.ts +414 -19
  65. package/lib/gentle-ai-binary.ts +1 -1
  66. package/lib/native-review-cli.ts +679 -57
  67. package/lib/review-candidate-view.ts +131 -1
  68. package/lib/review-compact-contract.ts +12 -3
  69. package/lib/review-consent-latch.ts +51 -0
  70. package/lib/review-correction-lifecycle.ts +170 -0
  71. package/lib/review-integration-v2.ts +1563 -0
  72. package/package.json +15 -11
  73. package/runtime/gentle-ai-binary.mjs +1 -1
  74. package/runtime/native-review-cli.mjs +663 -41
  75. package/runtime/review-integration-v2.mjs +1564 -0
  76. package/scripts/build-git-commit-transaction-runner.mjs +1 -1
  77. package/scripts/gentle-ai-installer.mjs +16 -11
  78. package/scripts/install-gentle-ai.mjs +7 -3
  79. package/scripts/test-packed-runner.mjs +2 -2
  80. package/scripts/verify-package-files.mjs +216 -64
  81. package/skills/release/SKILL.md +38 -11
  82. package/tests/devbinary/native-review-parity.devtest.ts +348 -0
  83. package/tests/gentle-ai-binary.test.ts +8 -1
  84. package/tests/gentle-ai-installer.test.ts +24 -21
  85. package/tests/native-binary-gate.test.ts +145 -0
  86. package/tests/native-review-capability-contract.test.ts +87 -0
  87. package/tests/native-review-cli.test.ts +44 -1
  88. package/tests/native-review-parity-runtime.test.ts +70 -23
  89. package/tests/native-review-parity.test.ts +673 -0
  90. package/tests/native-risk-evidence-parity.test.ts +91 -0
  91. package/tests/package-manifest.test.ts +72 -7
  92. package/tests/review-actor-tool-deny.test.ts +20 -5
  93. package/tests/review-candidate-view.test.ts +331 -1
  94. package/tests/review-compact-contract.test.ts +5 -0
  95. package/tests/review-consent-latch.test.ts +67 -0
  96. package/tests/review-controller-native-recovery.test.ts +180 -5
  97. package/tests/review-controller-native-routing.test.ts +385 -12
  98. package/tests/review-controller-workspace-root.test.ts +26 -6
  99. package/tests/review-correction-lifecycle.test.ts +174 -0
  100. package/tests/review-integration-v2.test.ts +539 -0
  101. package/tests/runtime-harness.mjs +187 -0
  102. package/tests/support/native-binary-gate.ts +86 -0
  103. package/tests/verify-package-files.test.ts +119 -0
  104. package/lib/review-integration-v1.ts +0 -795
  105. package/runtime/review-integration-v1.mjs +0 -796
  106. package/tests/native-review-integration-v1.test.ts +0 -102
  107. package/tests/review-integration-v1.test.ts +0 -530
@@ -0,0 +1,432 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://gentle-ai.dev/contracts/review-integration/v1/schemas/capabilities-v1.4.schema.json",
4
+ "title": "Gentle AI review integration capabilities protocol 1.4",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schema",
9
+ "contract",
10
+ "protocol",
11
+ "package",
12
+ "build",
13
+ "executable",
14
+ "operations",
15
+ "gates",
16
+ "projections",
17
+ "schemas",
18
+ "features",
19
+ "compatibility"
20
+ ],
21
+ "properties": {
22
+ "schema": {
23
+ "const": "gentle-ai.review-integration.capabilities/v1.4"
24
+ },
25
+ "contract": {
26
+ "const": "gentle-ai.review-integration/v1"
27
+ },
28
+ "protocol": {
29
+ "type": "object",
30
+ "additionalProperties": false,
31
+ "required": [
32
+ "major",
33
+ "minor"
34
+ ],
35
+ "properties": {
36
+ "major": {
37
+ "const": 1
38
+ },
39
+ "minor": {
40
+ "const": 4
41
+ }
42
+ }
43
+ },
44
+ "package": {
45
+ "type": "object",
46
+ "additionalProperties": false,
47
+ "required": [
48
+ "name",
49
+ "version",
50
+ "release_channel"
51
+ ],
52
+ "properties": {
53
+ "name": {
54
+ "const": "gentle-ai"
55
+ },
56
+ "version": {
57
+ "type": "string",
58
+ "minLength": 1
59
+ },
60
+ "release_channel": {
61
+ "enum": [
62
+ "development",
63
+ "prerelease",
64
+ "stable"
65
+ ]
66
+ }
67
+ }
68
+ },
69
+ "build": {
70
+ "type": "object",
71
+ "additionalProperties": false,
72
+ "required": [
73
+ "id",
74
+ "go_version",
75
+ "module_version",
76
+ "vcs",
77
+ "vcs_revision",
78
+ "vcs_time",
79
+ "vcs_modified"
80
+ ],
81
+ "properties": {
82
+ "id": {
83
+ "$ref": "#/$defs/sha256"
84
+ },
85
+ "go_version": {
86
+ "type": "string",
87
+ "minLength": 1
88
+ },
89
+ "module_version": {
90
+ "type": "string"
91
+ },
92
+ "vcs": {
93
+ "type": "string"
94
+ },
95
+ "vcs_revision": {
96
+ "type": "string"
97
+ },
98
+ "vcs_time": {
99
+ "type": "string"
100
+ },
101
+ "vcs_modified": {
102
+ "enum": [
103
+ "true",
104
+ "false",
105
+ "unknown"
106
+ ]
107
+ }
108
+ }
109
+ },
110
+ "executable": {
111
+ "type": "object",
112
+ "additionalProperties": false,
113
+ "required": [
114
+ "sha256",
115
+ "evidence",
116
+ "verification"
117
+ ],
118
+ "properties": {
119
+ "sha256": {
120
+ "$ref": "#/$defs/sha256"
121
+ },
122
+ "evidence": {
123
+ "const": "self-reported"
124
+ },
125
+ "verification": {
126
+ "const": "compare-with-published-manifest"
127
+ }
128
+ }
129
+ },
130
+ "operations": {
131
+ "type": "array",
132
+ "minItems": 8,
133
+ "maxItems": 8,
134
+ "uniqueItems": true,
135
+ "items": {
136
+ "enum": [
137
+ "review.bind_sdd",
138
+ "review.capabilities",
139
+ "review.finalize",
140
+ "review.repair",
141
+ "review.retry_final_verification",
142
+ "review.start",
143
+ "review.status",
144
+ "review.validate"
145
+ ]
146
+ }
147
+ },
148
+ "gates": {
149
+ "type": "array",
150
+ "minItems": 5,
151
+ "maxItems": 5,
152
+ "uniqueItems": true,
153
+ "items": {
154
+ "enum": [
155
+ "post-apply",
156
+ "pre-commit",
157
+ "pre-push",
158
+ "pre-pr",
159
+ "release"
160
+ ]
161
+ }
162
+ },
163
+ "projections": {
164
+ "type": "array",
165
+ "minItems": 2,
166
+ "maxItems": 2,
167
+ "uniqueItems": true,
168
+ "items": {
169
+ "enum": [
170
+ "staged",
171
+ "workspace"
172
+ ]
173
+ }
174
+ },
175
+ "schemas": {
176
+ "type": "array",
177
+ "minItems": 20,
178
+ "maxItems": 20,
179
+ "uniqueItems": true,
180
+ "items": {
181
+ "enum": [
182
+ "gentle-ai.review-admitted-result/v1",
183
+ "gentle-ai.review-artifact-subject/v1",
184
+ "gentle-ai.review-authority-repair-assessment/v1",
185
+ "gentle-ai.review-authority-status/v1",
186
+ "gentle-ai.review-gate-request/v1",
187
+ "gentle-ai.review-integration.capabilities/v1.4",
188
+ "gentle-ai.review-integration.failure/v1",
189
+ "gentle-ai.review-final-verification-incident/v1",
190
+ "gentle-ai.review-integration.operation/v1",
191
+ "gentle-ai.review-integration.projection/v1",
192
+ "gentle-ai.review-integration.repair/v1",
193
+ "gentle-ai.review-integration.start/v2",
194
+ "gentle-ai.review-integration.status/v2",
195
+ "gentle-ai.review-receipt/v1",
196
+ "gentle-ai.review-receipt/v2",
197
+ "gentle-ai.review-result-artifact/v2",
198
+ "gentle-ai.review-targeted-validation-request/v1",
199
+ "https://gentle-ai.dev/schema/review/refuter/v1",
200
+ "https://gentle-ai.dev/schema/review/reviewer/v1",
201
+ "https://gentle-ai.dev/schema/review/validator/v1"
202
+ ]
203
+ }
204
+ },
205
+ "features": {
206
+ "type": "object",
207
+ "additionalProperties": false,
208
+ "required": [
209
+ "mandatory",
210
+ "optional"
211
+ ],
212
+ "properties": {
213
+ "mandatory": {
214
+ "type": "array",
215
+ "minItems": 10,
216
+ "maxItems": 10,
217
+ "items": {
218
+ "$ref": "#/$defs/feature"
219
+ }
220
+ },
221
+ "optional": {
222
+ "type": "array",
223
+ "minItems": 15,
224
+ "maxItems": 15,
225
+ "items": {
226
+ "$ref": "#/$defs/feature"
227
+ }
228
+ }
229
+ }
230
+ },
231
+ "bootstrap": {
232
+ "$ref": "#/$defs/bootstrap"
233
+ },
234
+ "compatibility": {
235
+ "type": "object",
236
+ "additionalProperties": false,
237
+ "required": [
238
+ "minimum_protocol_major",
239
+ "maximum_protocol_major",
240
+ "additive_minor_policy",
241
+ "unknown_mandatory",
242
+ "unknown_optional",
243
+ "modes",
244
+ "legacy_window"
245
+ ],
246
+ "properties": {
247
+ "minimum_protocol_major": {
248
+ "const": 1
249
+ },
250
+ "maximum_protocol_major": {
251
+ "const": 1
252
+ },
253
+ "additive_minor_policy": {
254
+ "const": "optional-fields-only"
255
+ },
256
+ "unknown_mandatory": {
257
+ "const": "reject"
258
+ },
259
+ "unknown_optional": {
260
+ "const": "ignore"
261
+ },
262
+ "modes": {
263
+ "type": "array",
264
+ "prefixItems": [
265
+ {
266
+ "const": "compact-v2"
267
+ },
268
+ {
269
+ "const": "legacy-v1"
270
+ }
271
+ ],
272
+ "items": false
273
+ },
274
+ "legacy_window": {
275
+ "type": "object",
276
+ "additionalProperties": false,
277
+ "required": [
278
+ "mode",
279
+ "state",
280
+ "read_only",
281
+ "deprecation_started",
282
+ "removal",
283
+ "minimum_compatibility_releases"
284
+ ],
285
+ "properties": {
286
+ "mode": {
287
+ "const": "legacy-v1"
288
+ },
289
+ "state": {
290
+ "enum": [
291
+ "pre-fence",
292
+ "active",
293
+ "deprecated",
294
+ "expired"
295
+ ]
296
+ },
297
+ "read_only": {
298
+ "type": "boolean"
299
+ },
300
+ "deprecation_started": {
301
+ "type": "boolean"
302
+ },
303
+ "removal": {
304
+ "type": "string",
305
+ "minLength": 1
306
+ },
307
+ "minimum_compatibility_releases": {
308
+ "type": "integer",
309
+ "minimum": 1
310
+ }
311
+ }
312
+ }
313
+ }
314
+ }
315
+ },
316
+ "$defs": {
317
+ "sha256": {
318
+ "type": "string",
319
+ "pattern": "^sha256:[0-9a-f]{64}$"
320
+ },
321
+ "feature": {
322
+ "type": "object",
323
+ "additionalProperties": false,
324
+ "required": [
325
+ "name",
326
+ "supported",
327
+ "requires"
328
+ ],
329
+ "properties": {
330
+ "name": {
331
+ "enum": [
332
+ "base_ref_workspace_overlay",
333
+ "bounded_process_waits",
334
+ "classified_authority_repair",
335
+ "compact_v2_authority",
336
+ "exact_gate_receipt_discovery",
337
+ "exact_receipt_replay",
338
+ "five_delivery_gates",
339
+ "immutable_snapshot",
340
+ "legacy_v1_target_scoped_read_only",
341
+ "native_frozen_candidate_context",
342
+ "native_low_risk_verification",
343
+ "native_next_transition",
344
+ "one_shot_final_verification_retry",
345
+ "opaque_repository_context",
346
+ "provider_artifact_admission",
347
+ "provider_targeted_validation_request",
348
+ "recovered_correction_evidence",
349
+ "repository_independent_capabilities",
350
+ "restart_safe_projection",
351
+ "risk_reasons",
352
+ "scope_change_diagnostics",
353
+ "sdd_receipt_binding",
354
+ "target_scoped_status",
355
+ "uniform_failure_envelope",
356
+ "validating_result_reopen"
357
+ ]
358
+ },
359
+ "supported": {
360
+ "type": "boolean"
361
+ },
362
+ "requires": {
363
+ "type": "array",
364
+ "uniqueItems": true,
365
+ "items": {
366
+ "type": "string",
367
+ "minLength": 1
368
+ }
369
+ }
370
+ }
371
+ },
372
+ "bootstrap": {
373
+ "type": "object",
374
+ "additionalProperties": false,
375
+ "required": [
376
+ "command",
377
+ "target_selector_variants",
378
+ "required_feature",
379
+ "unsupported_outcome",
380
+ "parent_only"
381
+ ],
382
+ "properties": {
383
+ "command": {
384
+ "const": "gentle-ai review status --cwd <repo> --contract gentle-ai.review-integration/v1 --next-transition"
385
+ },
386
+ "target_selector_variants": {
387
+ "type": "array",
388
+ "minItems": 4,
389
+ "maxItems": 4,
390
+ "items": {
391
+ "$ref": "#/$defs/target_selector"
392
+ }
393
+ },
394
+ "required_feature": {
395
+ "const": "native_next_transition"
396
+ },
397
+ "unsupported_outcome": {
398
+ "const": "unsupported-capability"
399
+ },
400
+ "parent_only": {
401
+ "const": true
402
+ }
403
+ }
404
+ },
405
+ "target_selector": {
406
+ "type": "object",
407
+ "additionalProperties": false,
408
+ "required": [
409
+ "target_type",
410
+ "arguments"
411
+ ],
412
+ "properties": {
413
+ "target_type": {
414
+ "enum": [
415
+ "staged",
416
+ "base_ref",
417
+ "workspace_overlay_base_ref",
418
+ "workspace_overlay_base_tree"
419
+ ]
420
+ },
421
+ "arguments": {
422
+ "type": "array",
423
+ "minItems": 2,
424
+ "items": {
425
+ "type": "string",
426
+ "minLength": 1
427
+ }
428
+ }
429
+ }
430
+ }
431
+ }
432
+ }
@@ -0,0 +1,154 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://gentle-ai.dev/contracts/review-integration/v1/schemas/capabilities-v1.5.schema.json",
4
+ "title": "Gentle AI review integration capabilities protocol 1.5",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schema",
9
+ "contract",
10
+ "protocol",
11
+ "package",
12
+ "build",
13
+ "executable",
14
+ "operations",
15
+ "gates",
16
+ "projections",
17
+ "schemas",
18
+ "features",
19
+ "compatibility"
20
+ ],
21
+ "properties": {
22
+ "schema": {
23
+ "const": "gentle-ai.review-integration.capabilities/v1.5"
24
+ },
25
+ "contract": {
26
+ "$ref": "capabilities-v1.4.schema.json#/properties/contract"
27
+ },
28
+ "protocol": {
29
+ "type": "object",
30
+ "additionalProperties": false,
31
+ "required": ["major", "minor"],
32
+ "properties": {
33
+ "major": {"const": 1},
34
+ "minor": {"const": 5}
35
+ }
36
+ },
37
+ "package": {
38
+ "$ref": "capabilities-v1.4.schema.json#/properties/package"
39
+ },
40
+ "build": {
41
+ "$ref": "capabilities-v1.4.schema.json#/properties/build"
42
+ },
43
+ "executable": {
44
+ "$ref": "capabilities-v1.4.schema.json#/properties/executable"
45
+ },
46
+ "operations": {
47
+ "$ref": "capabilities-v1.4.schema.json#/properties/operations"
48
+ },
49
+ "gates": {
50
+ "$ref": "capabilities-v1.4.schema.json#/properties/gates"
51
+ },
52
+ "projections": {
53
+ "$ref": "capabilities-v1.4.schema.json#/properties/projections"
54
+ },
55
+ "schemas": {
56
+ "type": "array",
57
+ "minItems": 21,
58
+ "maxItems": 21,
59
+ "uniqueItems": true,
60
+ "items": {
61
+ "enum": [
62
+ "gentle-ai.review-admitted-result/v1",
63
+ "gentle-ai.review-artifact-subject/v1",
64
+ "gentle-ai.review-authority-repair-assessment/v1",
65
+ "gentle-ai.review-authority-status/v1",
66
+ "gentle-ai.review-gate-request/v1",
67
+ "gentle-ai.review-integration.capabilities/v1.5",
68
+ "gentle-ai.review-integration.failure/v1",
69
+ "gentle-ai.review-final-verification-incident/v1",
70
+ "gentle-ai.review-integration.operation/v1",
71
+ "gentle-ai.review-integration.projection/v1",
72
+ "gentle-ai.review-integration.repair/v1",
73
+ "gentle-ai.review-integration.start/v2",
74
+ "gentle-ai.review-integration.status/v2",
75
+ "gentle-ai.review-receipt/v1",
76
+ "gentle-ai.review-receipt/v2",
77
+ "gentle-ai.review-result-artifact/v2",
78
+ "gentle-ai.review-targeted-validation-request/v1",
79
+ "gentle-ai.review-verification-evidence/v2",
80
+ "https://gentle-ai.dev/schema/review/refuter/v1",
81
+ "https://gentle-ai.dev/schema/review/reviewer/v1",
82
+ "https://gentle-ai.dev/schema/review/validator/v1"
83
+ ]
84
+ }
85
+ },
86
+ "features": {
87
+ "type": "object",
88
+ "additionalProperties": false,
89
+ "required": ["mandatory", "optional"],
90
+ "properties": {
91
+ "mandatory": {
92
+ "$ref": "capabilities-v1.4.schema.json#/properties/features/properties/mandatory"
93
+ },
94
+ "optional": {
95
+ "type": "array",
96
+ "minItems": 16,
97
+ "maxItems": 16,
98
+ "items": {"$ref": "#/$defs/feature"}
99
+ }
100
+ }
101
+ },
102
+ "bootstrap": {
103
+ "$ref": "capabilities-v1.4.schema.json#/properties/bootstrap"
104
+ },
105
+ "compatibility": {
106
+ "$ref": "capabilities-v1.4.schema.json#/properties/compatibility"
107
+ }
108
+ },
109
+ "$defs": {
110
+ "feature": {
111
+ "type": "object",
112
+ "additionalProperties": false,
113
+ "required": ["name", "supported", "requires"],
114
+ "properties": {
115
+ "name": {
116
+ "enum": [
117
+ "base_ref_workspace_overlay",
118
+ "bounded_process_waits",
119
+ "classified_authority_repair",
120
+ "compact_v2_authority",
121
+ "exact_gate_receipt_discovery",
122
+ "exact_receipt_replay",
123
+ "five_delivery_gates",
124
+ "immutable_snapshot",
125
+ "legacy_v1_target_scoped_read_only",
126
+ "native_frozen_candidate_context",
127
+ "native_low_risk_verification",
128
+ "native_next_transition",
129
+ "one_shot_final_verification_retry",
130
+ "opaque_repository_context",
131
+ "outcome_bound_verification_evidence",
132
+ "provider_artifact_admission",
133
+ "provider_targeted_validation_request",
134
+ "recovered_correction_evidence",
135
+ "repository_independent_capabilities",
136
+ "restart_safe_projection",
137
+ "risk_reasons",
138
+ "scope_change_diagnostics",
139
+ "sdd_receipt_binding",
140
+ "target_scoped_status",
141
+ "uniform_failure_envelope",
142
+ "validating_result_reopen"
143
+ ]
144
+ },
145
+ "supported": {"type": "boolean"},
146
+ "requires": {
147
+ "type": "array",
148
+ "uniqueItems": true,
149
+ "items": {"type": "string", "minLength": 1}
150
+ }
151
+ }
152
+ }
153
+ }
154
+ }
@@ -0,0 +1,86 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://gentle-ai.dev/contracts/review-integration/v1/schemas/consent.schema.json",
4
+ "title": "Gentle AI negotiated review consent question",
5
+ "description": "The typed per-candidate blocking consent question a negotiated START answers with instead of proceeding, emitted only when the caller declared --consent relay. It carries why input is required, the complete choice set, and the exact runnable follow-up invocations scoped to the one frozen candidate. A decline is scoped to that candidate and is deliberately not the kill switch; the permanent disable stays a documented off path outside the choice set.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "schema",
10
+ "contract",
11
+ "operation",
12
+ "action",
13
+ "blocking",
14
+ "target_identity",
15
+ "projection",
16
+ "risk_level",
17
+ "changed_files",
18
+ "changed_lines",
19
+ "headline",
20
+ "reason",
21
+ "value",
22
+ "risk_evidence",
23
+ "choices",
24
+ "off_path"
25
+ ],
26
+ "properties": {
27
+ "schema": {"const": "gentle-ai.review-integration.consent/v1"},
28
+ "contract": {"const": "gentle-ai.review-integration/v1"},
29
+ "operation": {"const": "review.start"},
30
+ "action": {"const": "consent_required"},
31
+ "blocking": {"const": true},
32
+ "target_identity": {"$ref": "#/$defs/sha256"},
33
+ "projection": {"enum": ["workspace", "staged"]},
34
+ "risk_level": {"enum": ["medium", "high"]},
35
+ "changed_files": {"type": "integer", "minimum": 0},
36
+ "changed_lines": {"type": "integer", "minimum": 0},
37
+ "headline": {"type": "string", "minLength": 1},
38
+ "reason": {"type": "string", "minLength": 1},
39
+ "value": {"type": "string", "minLength": 1},
40
+ "risk_evidence": {
41
+ "type": "array",
42
+ "items": {"type": "string", "minLength": 1}
43
+ },
44
+ "choices": {
45
+ "type": "array",
46
+ "minItems": 2,
47
+ "maxItems": 2,
48
+ "prefixItems": [
49
+ {"$ref": "#/$defs/choice_granted"},
50
+ {"$ref": "#/$defs/choice_declined"}
51
+ ],
52
+ "items": false
53
+ },
54
+ "off_path": {
55
+ "type": "object",
56
+ "additionalProperties": false,
57
+ "required": ["note", "command"],
58
+ "properties": {
59
+ "note": {"type": "string", "minLength": 1},
60
+ "command": {"const": "gentle-ai review mode disable"}
61
+ }
62
+ }
63
+ },
64
+ "$defs": {
65
+ "sha256": {"type": "string", "pattern": "^sha256:[0-9a-f]{64}$"},
66
+ "choice": {
67
+ "type": "object",
68
+ "additionalProperties": false,
69
+ "required": ["answer", "label", "effect", "invocation"],
70
+ "properties": {
71
+ "answer": {"enum": ["granted", "declined"]},
72
+ "label": {"type": "string", "minLength": 1},
73
+ "effect": {"type": "string", "minLength": 1},
74
+ "invocation": {"type": "string", "pattern": "^gentle-ai review start .* --consent (granted|declined)$"}
75
+ }
76
+ },
77
+ "choice_granted": {
78
+ "allOf": [{"$ref": "#/$defs/choice"}],
79
+ "properties": {"answer": {"const": "granted"}}
80
+ },
81
+ "choice_declined": {
82
+ "allOf": [{"$ref": "#/$defs/choice"}],
83
+ "properties": {"answer": {"const": "declined"}}
84
+ }
85
+ }
86
+ }