gentle-pi 2.1.2 → 2.3.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 (228) hide show
  1. package/README.md +108 -79
  2. package/assets/agents/gentle-ai-worker.md +7 -3
  3. package/assets/agents/jd-fix-agent.md +1 -1
  4. package/assets/agents/jd-judge-a.md +3 -1
  5. package/assets/agents/jd-judge-b.md +3 -1
  6. package/assets/agents/review-readability.md +4 -3
  7. package/assets/agents/review-reliability.md +4 -3
  8. package/assets/agents/review-resilience.md +4 -3
  9. package/assets/agents/review-risk.md +4 -3
  10. package/assets/agents/sdd-apply.md +11 -4
  11. package/assets/agents/sdd-archive.md +6 -1
  12. package/assets/agents/sdd-design.md +6 -1
  13. package/assets/agents/sdd-explore.md +6 -2
  14. package/assets/agents/sdd-init.md +10 -2
  15. package/assets/agents/sdd-onboard.md +6 -1
  16. package/assets/agents/sdd-proposal.md +8 -1
  17. package/assets/agents/sdd-research.md +54 -0
  18. package/assets/agents/sdd-spec.md +6 -1
  19. package/assets/agents/sdd-status.md +10 -5
  20. package/assets/agents/sdd-sync.md +6 -1
  21. package/assets/agents/sdd-tasks.md +8 -4
  22. package/assets/agents/sdd-verify.md +27 -2
  23. package/assets/chains/4r-review.chain.md +2 -0
  24. package/assets/chains/sdd-full.chain.md +2 -2
  25. package/assets/chains/sdd-plan.chain.md +1 -1
  26. package/assets/chains/sdd-verify.chain.md +2 -2
  27. package/assets/orchestrator-delegation.md +145 -160
  28. package/assets/orchestrator-memory.md +2 -0
  29. package/assets/orchestrator.md +25 -48
  30. package/assets/sdd-orchestrator-workflow.md +163 -25
  31. package/assets/support/sdd-status-contract.md +24 -6
  32. package/contracts/review-integration/v1/fixtures/consent.fixture.json +3 -3
  33. package/contracts/review-integration/v1/fixtures/start-v2.fixture.json +19 -28
  34. package/contracts/review-integration/v1/fixtures/start.fixture.json +1 -10
  35. package/contracts/review-integration/v1/fixtures/status-v2.fixture.json +12 -21
  36. package/contracts/review-integration/v1/schemas/correction-plan-request.schema.json +49 -0
  37. package/contracts/review-integration/v1/schemas/operation.schema.json +76 -0
  38. package/contracts/review-integration/v1/schemas/repair.schema.json +39 -0
  39. package/contracts/review-integration/v1/schemas/status-v2.schema.json +4 -2
  40. package/contracts/review-integration/v1/schemas/status.schema.json +4 -2
  41. package/contracts/review-integration/v1/schemas/transition-execution.schema.json +42 -0
  42. package/contracts/review-integration/v2/fixtures/consent.fixture.json +1 -1
  43. package/contracts/review-integration/v2/fixtures/start.fixture.json +1 -10
  44. package/contracts/review-integration/v2/fixtures/status.fixture.json +1 -10
  45. package/contracts/review-integration/v2/schemas/failure.schema.json +5 -1
  46. package/contracts/review-integration/v2/schemas/last-event-closure.schema.json +66 -0
  47. package/contracts/review-integration/v2/schemas/opencode-provider-role.schema.json +14 -0
  48. package/contracts/review-integration/v2/schemas/operation.schema.json +6 -1
  49. package/contracts/review-integration/v2/schemas/repair.schema.json +4 -2
  50. package/contracts/review-integration/v2/schemas/start.schema.json +5 -2
  51. package/contracts/review-integration/v2/schemas/status.schema.json +4 -2
  52. package/contracts/review-provider-contract-mirror/provider-contract.lock.json +30 -0
  53. package/contracts/review-provider-contract-mirror/v1.1.0/bundle/README.md +12 -0
  54. package/contracts/review-provider-contract-mirror/v1.1.0/bundle/manifest.json +65 -0
  55. package/contracts/review-provider-contract-mirror/v1.1.0/bundle/schemas/lens.schema.json +16 -0
  56. package/contracts/review-provider-contract-mirror/v1.1.0/bundle/schemas/refuter.schema.json +1 -0
  57. package/contracts/review-provider-contract-mirror/v1.1.0/bundle/schemas/targeted-validator.schema.json +1 -0
  58. package/contracts/review-provider-contract-mirror/v1.1.0/bundle/vectors/lens.json +1 -0
  59. package/contracts/review-provider-contract-mirror/v1.1.0/bundle/vectors/refuter.json +1 -0
  60. package/contracts/review-provider-contract-mirror/v1.1.0/bundle/vectors/targeted-validator.json +1 -0
  61. package/contracts/review-provider-contract-mirror/v1.1.0/generated/provider-capabilities.baseline.json +15 -0
  62. package/contracts/review-provider-contract-mirror/v1.1.0/generated/provider-roles.baseline.json +42 -0
  63. package/docs/native-authority-architecture.md +14 -16
  64. package/docs/review-integration.md +27 -353
  65. package/extensions/ask-user-choice.ts +151 -0
  66. package/extensions/gentle-ai.ts +2710 -3211
  67. package/extensions/quiet-tools.ts +515 -32
  68. package/extensions/sdd-init.ts +21 -12
  69. package/extensions/skill-registry.ts +10 -2
  70. package/extensions/startup-banner.ts +10 -4
  71. package/lib/gentle-ai-binary.ts +173 -2
  72. package/lib/gentle-ai-renderer.ts +70 -0
  73. package/lib/model-routing-authority.ts +133 -0
  74. package/lib/native-review-cli.ts +676 -781
  75. package/lib/opaque-pi-reviewer-adapter.ts +284 -0
  76. package/lib/provider-contract-bundle.ts +704 -0
  77. package/lib/review-candidate-view.ts +836 -118
  78. package/lib/review-compact-contract.ts +59 -248
  79. package/lib/review-host-relay.ts +578 -0
  80. package/lib/review-integration-v2.ts +1254 -221
  81. package/lib/review-last-event-controller.ts +35 -0
  82. package/lib/review-relay-contract.ts +16 -0
  83. package/lib/sdd-preflight.ts +230 -67
  84. package/lib/sdd-status.ts +66 -111
  85. package/lib/terminal-theme.ts +1 -1
  86. package/package.json +83 -79
  87. package/runtime/gentle-ai-binary.mjs +174 -3
  88. package/runtime/native-review-cli.mjs +610 -715
  89. package/runtime/review-integration-v2.mjs +1223 -190
  90. package/runtime/review-relay-contract.mjs +17 -0
  91. package/scripts/{build-git-commit-transaction-runner.mjs → build-runtime-modules.mjs} +5 -5
  92. package/scripts/check-provider-contract.mjs +138 -0
  93. package/scripts/gentle-ai-installer.mjs +85 -22
  94. package/scripts/maintainer/provider-relay-matrix.mjs +403 -0
  95. package/scripts/mirror-provider-contract.mjs +143 -0
  96. package/scripts/test-packed-runner.mjs +20 -9
  97. package/scripts/verify-package-files.mjs +119 -43
  98. package/skills/_shared/review-ledger-contract.md +11 -19
  99. package/skills/chained-pr/SKILL.md +3 -0
  100. package/skills/cognitive-doc-design/SKILL.md +1 -1
  101. package/skills/comment-writer/SKILL.md +1 -1
  102. package/skills/gentle-ai/SKILL.md +7 -74
  103. package/skills/issue-creation/SKILL.md +94 -168
  104. package/skills/judgment-day/SKILL.md +9 -5
  105. package/skills/judgment-day/references/prompts-and-formats.md +2 -0
  106. package/skills/rdd-defect-workflow/SKILL.md +54 -0
  107. package/skills/release/SKILL.md +3 -3
  108. package/skills/skill-registry/SKILL.md +1 -1
  109. package/skills/work-unit-commits/SKILL.md +3 -1
  110. package/tests/artifact-language.test.ts +24 -11
  111. package/tests/ask-user-choice.test.ts +264 -0
  112. package/tests/background-subagents.test.ts +771 -0
  113. package/tests/codegraph-tools.test.ts +3 -3
  114. package/tests/crosslane/cross-lane.mjs +16 -0
  115. package/tests/delegated-key-learnings-contract.test.ts +240 -0
  116. package/tests/devbinary/native-review-parity.devtest.ts +167 -250
  117. package/tests/devbinary/pi-host-relay.devtest.ts +867 -0
  118. package/tests/fixtures/devbinary/capabilities-v2.1.derived.json +331 -0
  119. package/tests/fixtures/devbinary/capabilities-v2.2.captured.json +340 -0
  120. package/tests/fixtures/devbinary/consent-v3.captured.json +37 -0
  121. package/tests/fixtures/devbinary/failure-v2-capture-evidence.captured.json +16 -0
  122. package/tests/fixtures/devbinary/last-event-capture-correction-plan.captured.json +10 -0
  123. package/tests/fixtures/devbinary/last-event-capture-refuter-approved.captured.json +20 -0
  124. package/tests/fixtures/devbinary/last-event-capture-refuter-correction-required.captured.json +26 -0
  125. package/tests/fixtures/devbinary/last-event-capture-result-approved.captured.json +8 -0
  126. package/tests/fixtures/devbinary/last-event-capture-result-correction-required.captured.json +26 -0
  127. package/tests/fixtures/devbinary/last-event-capture-validation-approved.captured.json +8 -0
  128. package/tests/fixtures/devbinary/last-event-closure.provenance.md +13 -0
  129. package/tests/fixtures/devbinary/result-artifact-v2-path.captured.json +12 -0
  130. package/tests/fixtures/devbinary/result-artifact-v2.captured.json +12 -0
  131. package/tests/fixtures/devbinary/review-acknowledged-v1.captured.json +9 -0
  132. package/tests/fixtures/devbinary/review-acknowledged.provenance.md +31 -0
  133. package/tests/fixtures/devbinary/start-v3-consent-declined.captured.json +19 -0
  134. package/tests/fixtures/devbinary/start-v3-consent-granted.captured.json +109 -0
  135. package/tests/fixtures/devbinary/start-v3-zero-lens-closed.captured.json +21 -0
  136. package/tests/fixtures/devbinary/status-v5-capture-result-submission.captured.json +184 -0
  137. package/tests/fixtures/devbinary/status-v5-repository-context.captured.json +138 -0
  138. package/tests/fixtures/devbinary/status-v5.captured.json +88 -0
  139. package/tests/fixtures/native-review-cli/v2.5.0-rc.1/PROVENANCE.txt +15 -0
  140. package/tests/fixtures/provider-contract-bundle/v1.1.0/README.md +12 -0
  141. package/tests/fixtures/provider-contract-bundle/v1.1.0/manifest.json +65 -0
  142. package/tests/fixtures/provider-contract-bundle/v1.1.0/schemas/lens.schema.json +16 -0
  143. package/tests/fixtures/provider-contract-bundle/v1.1.0/schemas/refuter.schema.json +1 -0
  144. package/tests/fixtures/provider-contract-bundle/v1.1.0/schemas/targeted-validator.schema.json +1 -0
  145. package/tests/fixtures/provider-contract-bundle/v1.1.0/vectors/lens.json +1 -0
  146. package/tests/fixtures/provider-contract-bundle/v1.1.0/vectors/refuter.json +1 -0
  147. package/tests/fixtures/provider-contract-bundle/v1.1.0/vectors/targeted-validator.json +1 -0
  148. package/tests/gentle-ai-binary.test.ts +83 -13
  149. package/tests/gentle-ai-dev-binary-surfacing.test.ts +195 -0
  150. package/tests/gentle-ai-dev-binary.test.ts +159 -0
  151. package/tests/gentle-ai-installer.test.ts +138 -48
  152. package/tests/gentle-ai.test.ts +820 -131
  153. package/tests/gentle-theme.test.ts +133 -0
  154. package/tests/maintainer/provider-relay.maintest.ts +601 -0
  155. package/tests/model-routing-authority.test.ts +257 -0
  156. package/tests/native-review-capability-contract.test.ts +75 -2
  157. package/tests/native-review-cli.test.ts +588 -908
  158. package/tests/native-review-consent.test.ts +283 -38
  159. package/tests/native-review-parity-runtime.test.ts +108 -350
  160. package/tests/native-review-parity.test.ts +684 -732
  161. package/tests/native-sdd-attempt-authority.test.ts +235 -0
  162. package/tests/opaque-pi-reviewer-adapter.test.ts +266 -0
  163. package/tests/orchestrator-budget.test.ts +158 -89
  164. package/tests/orchestrator-rdd-ownership.test.ts +103 -0
  165. package/tests/package-manifest.test.ts +128 -100
  166. package/tests/provider-contract-bundle.test.ts +385 -0
  167. package/tests/provider-contract-mirror.test.ts +206 -0
  168. package/tests/provider-defect-handoff.test.ts +252 -0
  169. package/tests/quiet-tool-rendering.test.ts +1055 -28
  170. package/tests/review-actor-tool-deny.test.ts +12 -13
  171. package/tests/review-authority-recovery-docs.test.ts +1 -2
  172. package/tests/review-candidate-view.test.ts +898 -12
  173. package/tests/review-compact-contract.test.ts +29 -122
  174. package/tests/review-controller-lock-status.test.ts +2 -2
  175. package/tests/review-controller-native-recovery.test.ts +366 -857
  176. package/tests/review-controller-native-routing.test.ts +1253 -4199
  177. package/tests/review-controller-retired-ops.test.ts +1 -1
  178. package/tests/review-controller-workspace-root.test.ts +236 -70
  179. package/tests/review-controller.test.ts +26 -816
  180. package/tests/review-corrected-finalize-binding.test.ts +134 -0
  181. package/tests/review-dispatch-hydration-gap.test.ts +145 -0
  182. package/tests/review-gate.test.ts +0 -45
  183. package/tests/review-host-relay-restart-parity.test.ts +360 -0
  184. package/tests/review-host-relay-routing.test.ts +352 -0
  185. package/tests/review-host-relay.test.ts +754 -0
  186. package/tests/review-integration-v2-forward.test.ts +654 -0
  187. package/tests/review-integration-v2.test.ts +317 -129
  188. package/tests/review-last-event-closure.test.ts +408 -0
  189. package/tests/review-ledger-contract.test.ts +106 -60
  190. package/tests/review-recovered-lineage-routing.test.ts +199 -0
  191. package/tests/review-relay-transport-agent.test.ts +322 -0
  192. package/tests/review-snapshot.test.ts +3 -2
  193. package/tests/runtime-harness.mjs +573 -180
  194. package/tests/sdd-agent-tools.test.ts +53 -32
  195. package/tests/sdd-preflight.test.ts +81 -15
  196. package/tests/sdd-status.test.ts +109 -110
  197. package/tests/skill-collision-prefixes.test.ts +6 -8
  198. package/tests/skill-registry.test.ts +50 -1
  199. package/tests/verify-package-files.test.ts +62 -0
  200. package/tests/writer-edit-surface-scope.test.ts +230 -0
  201. package/themes/Gentleman-Cute.json +94 -0
  202. package/themes/Gentleman-Sexy.json +92 -0
  203. package/assets/agents/review-refuter.md +0 -40
  204. package/assets/agents/review-validator.md +0 -23
  205. package/lib/git-commit-transaction.ts +0 -801
  206. package/lib/native-review-remediation.ts +0 -49
  207. package/lib/review-compact.ts +0 -947
  208. package/lib/review-refuter-adapter.ts +0 -129
  209. package/lib/review-runtime-contract.ts +0 -68
  210. package/prompts/gcl.md +0 -54
  211. package/prompts/gis.md +0 -25
  212. package/prompts/gpr.md +0 -41
  213. package/prompts/gwr.md +0 -31
  214. package/runtime/git-commit-transaction.mjs +0 -802
  215. package/scripts/run-git-commit-transaction.mjs +0 -35
  216. package/tests/fixtures/native-review-cli/v2.1.2/bind-sdd.json +0 -25
  217. package/tests/fixtures/native-review-cli/v2.1.2/finalize.json +0 -8
  218. package/tests/fixtures/native-review-cli/v2.1.2/sdd-status-engram.json +0 -139
  219. package/tests/fixtures/native-review-cli/v2.1.2/sdd-status.json +0 -200
  220. package/tests/fixtures/native-review-cli/v2.1.2/start.json +0 -12
  221. package/tests/fixtures/native-review-cli/v2.1.2/validate-allow.json +0 -24
  222. package/tests/fixtures/native-review-cli/v2.1.2/validate-deny-empty-context.json +0 -20
  223. package/tests/fixtures/native-review-cli/v2.1.2/validate-deny.json +0 -28
  224. package/tests/fixtures/native-review-cli/v2.1.3/sdd-status-engram.json +0 -139
  225. package/tests/fixtures/native-review-cli/v2.1.3/sdd-status.json +0 -200
  226. package/tests/git-commit-transaction.test.ts +0 -302
  227. package/tests/review-compact.test.ts +0 -243
  228. package/tests/review-refuter-adapter.test.ts +0 -89
@@ -27,45 +27,45 @@
27
27
  "artifact_subjects": [
28
28
  {
29
29
  "schema": "gentle-ai.review-artifact-subject/v1",
30
- "subject_hash": "sha256:38a55988f6b3ae6f520690d52fd29255f425a4048b0f8694de3a80c5daf265cd",
30
+ "subject_hash": "sha256:462591bc0cfab672cdf741536c5f1d8122a1f31b1773b9f1d12c5f2b72c76d23",
31
31
  "lineage_id": "review-start-fixture",
32
- "authority_revision": "sha256:3411d049f39e891b50adfc76473199b473927d10245a227a3bc967eae0caf68c",
33
- "target_identity": "sha256:136dc6556e3bac8c2e7f7af7cc5ec361f449e383a997638128729059fefa06a5",
32
+ "authority_revision": "sha256:e10bced7198e3c817c5ff6d1172d6aa8ce3321d45ec4d68834e0b5f03a4246d9",
33
+ "target_identity": "sha256:04c970c2b0f7c128751ed2b0f7e672a2fe26dc267f018bf10e612096d19cfa04",
34
34
  "candidate_diff_sha256": "sha256:c18ffcaf6f41a8cd5f3399a10355eb8de3e5eb561cb65cb551ea93bdf4df921b",
35
- "changed_path_manifest_sha256": "sha256:049219ea30e21c409608ea8527e65bcc6774d764363031a6cf0cb05e35c734ef",
35
+ "changed_path_manifest_sha256": "sha256:dc754e73f2d661e2f914fdc5dd8d2a399be18567481137f43ae9d8d45aae3397",
36
36
  "lens": "review-risk",
37
37
  "selected_order": 0
38
38
  },
39
39
  {
40
40
  "schema": "gentle-ai.review-artifact-subject/v1",
41
- "subject_hash": "sha256:06d86f981a8c0b16c2179696d467c8157580214ad72c952adee423fe596d2c21",
41
+ "subject_hash": "sha256:6374e313d6524b832afa399bdd205d4e852e1a19ea8d87000804789df6117e3b",
42
42
  "lineage_id": "review-start-fixture",
43
- "authority_revision": "sha256:3411d049f39e891b50adfc76473199b473927d10245a227a3bc967eae0caf68c",
44
- "target_identity": "sha256:136dc6556e3bac8c2e7f7af7cc5ec361f449e383a997638128729059fefa06a5",
43
+ "authority_revision": "sha256:e10bced7198e3c817c5ff6d1172d6aa8ce3321d45ec4d68834e0b5f03a4246d9",
44
+ "target_identity": "sha256:04c970c2b0f7c128751ed2b0f7e672a2fe26dc267f018bf10e612096d19cfa04",
45
45
  "candidate_diff_sha256": "sha256:c18ffcaf6f41a8cd5f3399a10355eb8de3e5eb561cb65cb551ea93bdf4df921b",
46
- "changed_path_manifest_sha256": "sha256:049219ea30e21c409608ea8527e65bcc6774d764363031a6cf0cb05e35c734ef",
46
+ "changed_path_manifest_sha256": "sha256:dc754e73f2d661e2f914fdc5dd8d2a399be18567481137f43ae9d8d45aae3397",
47
47
  "lens": "review-resilience",
48
48
  "selected_order": 1
49
49
  },
50
50
  {
51
51
  "schema": "gentle-ai.review-artifact-subject/v1",
52
- "subject_hash": "sha256:beacbf1eed52620ef7686087f8944cbc2304d71abf13281267efe9e4de20fb1e",
52
+ "subject_hash": "sha256:56924c7ad539c596fd584905c9be7a82765e551154375a8022fb1e820bc2f61a",
53
53
  "lineage_id": "review-start-fixture",
54
- "authority_revision": "sha256:3411d049f39e891b50adfc76473199b473927d10245a227a3bc967eae0caf68c",
55
- "target_identity": "sha256:136dc6556e3bac8c2e7f7af7cc5ec361f449e383a997638128729059fefa06a5",
54
+ "authority_revision": "sha256:e10bced7198e3c817c5ff6d1172d6aa8ce3321d45ec4d68834e0b5f03a4246d9",
55
+ "target_identity": "sha256:04c970c2b0f7c128751ed2b0f7e672a2fe26dc267f018bf10e612096d19cfa04",
56
56
  "candidate_diff_sha256": "sha256:c18ffcaf6f41a8cd5f3399a10355eb8de3e5eb561cb65cb551ea93bdf4df921b",
57
- "changed_path_manifest_sha256": "sha256:049219ea30e21c409608ea8527e65bcc6774d764363031a6cf0cb05e35c734ef",
57
+ "changed_path_manifest_sha256": "sha256:dc754e73f2d661e2f914fdc5dd8d2a399be18567481137f43ae9d8d45aae3397",
58
58
  "lens": "review-readability",
59
59
  "selected_order": 2
60
60
  },
61
61
  {
62
62
  "schema": "gentle-ai.review-artifact-subject/v1",
63
- "subject_hash": "sha256:61a10b133e3f7a8ccad1d0f1d58989df75d2330ad530690137de625bfd10eec8",
63
+ "subject_hash": "sha256:0e15bc61702fd815c7140592e02d752143a0ac10a5fd59b4f8e8a8c0e8ea103b",
64
64
  "lineage_id": "review-start-fixture",
65
- "authority_revision": "sha256:3411d049f39e891b50adfc76473199b473927d10245a227a3bc967eae0caf68c",
66
- "target_identity": "sha256:136dc6556e3bac8c2e7f7af7cc5ec361f449e383a997638128729059fefa06a5",
65
+ "authority_revision": "sha256:e10bced7198e3c817c5ff6d1172d6aa8ce3321d45ec4d68834e0b5f03a4246d9",
66
+ "target_identity": "sha256:04c970c2b0f7c128751ed2b0f7e672a2fe26dc267f018bf10e612096d19cfa04",
67
67
  "candidate_diff_sha256": "sha256:c18ffcaf6f41a8cd5f3399a10355eb8de3e5eb561cb65cb551ea93bdf4df921b",
68
- "changed_path_manifest_sha256": "sha256:049219ea30e21c409608ea8527e65bcc6774d764363031a6cf0cb05e35c734ef",
68
+ "changed_path_manifest_sha256": "sha256:dc754e73f2d661e2f914fdc5dd8d2a399be18567481137f43ae9d8d45aae3397",
69
69
  "lens": "review-reliability",
70
70
  "selected_order": 3
71
71
  }
@@ -77,21 +77,12 @@
77
77
  "byte_size": 226
78
78
  },
79
79
  "changed_path_manifest": [
80
- {
81
- "path": "scripts/deploy.sh",
82
- "status": "A",
83
- "old_mode": "000000",
84
- "new_mode": "100644",
85
- "deleted": false,
86
- "type_changed": false,
87
- "mode_only": false,
88
- "intended_untracked": true
89
- }
80
+ {"path":"scripts/deploy.sh","status":"A","old_mode":"000000","new_mode":"100644","deleted":false,"type_changed":false,"mode_only":false,"intended_untracked":false}
90
81
  ],
91
82
  "repository_context": {
92
83
  "capability": "review.opaque_repository_context",
93
84
  "handle": "rctx1_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
94
- "revision": "sha256:3411d049f39e891b50adfc76473199b473927d10245a227a3bc967eae0caf68c",
95
- "target_identity": "sha256:136dc6556e3bac8c2e7f7af7cc5ec361f449e383a997638128729059fefa06a5"
85
+ "revision": "sha256:e10bced7198e3c817c5ff6d1172d6aa8ce3321d45ec4d68834e0b5f03a4246d9",
86
+ "target_identity": "sha256:04c970c2b0f7c128751ed2b0f7e672a2fe26dc267f018bf10e612096d19cfa04"
96
87
  }
97
88
  }
@@ -31,16 +31,7 @@
31
31
  "byte_size": 226
32
32
  },
33
33
  "changed_path_manifest": [
34
- {
35
- "path": "scripts/deploy.sh",
36
- "status": "A",
37
- "old_mode": "000000",
38
- "new_mode": "100644",
39
- "deleted": false,
40
- "type_changed": false,
41
- "mode_only": false,
42
- "intended_untracked": true
43
- }
34
+ {"path":"scripts/deploy.sh","status":"A","old_mode":"000000","new_mode":"100644","deleted":false,"type_changed":false,"mode_only":false,"intended_untracked":true}
44
35
  ],
45
36
  "repository_context": {
46
37
  "capability": "review.opaque_repository_context",
@@ -8,7 +8,7 @@
8
8
  "lineage_id": "review-status-fixture",
9
9
  "state": "reviewing",
10
10
  "generation": 1,
11
- "revision": "sha256:81cdad8f3182d4919147d3c4fe8f614814068e5ef68417e3dcbd5e326dd3e390"
11
+ "revision": "sha256:c978e5383ae788a963c5e80c4f887d3b65ca415767398d57de827a9f0905f423"
12
12
  },
13
13
  "receipt": {
14
14
  "status": "expected_missing"
@@ -20,7 +20,7 @@
20
20
  "original_changed_lines": 2,
21
21
  "correction_budget": 1
22
22
  },
23
- "target_identity": "sha256:e6faad1cb9ceb2db170e0ec9ea5394b44c3991dff6cbd02fb6787539715968f6",
23
+ "target_identity": "sha256:00c0d796b4136e365d0130886f300c954ecf9431c45d96d8031155c415507d49",
24
24
  "projection": {
25
25
  "schema": "gentle-ai.review-integration.projection/v1",
26
26
  "kind": "current-changes",
@@ -34,8 +34,8 @@
34
34
  ],
35
35
  "intended_untracked": [],
36
36
  "intended_untracked_proof": "sha256:b97229718d4c7fe50a8892eb474ae5aa6491697bccb400e3e31dbaca4894d2f3",
37
- "initial_snapshot_identity": "sha256:e6faad1cb9ceb2db170e0ec9ea5394b44c3991dff6cbd02fb6787539715968f6",
38
- "current_snapshot_identity": "sha256:e6faad1cb9ceb2db170e0ec9ea5394b44c3991dff6cbd02fb6787539715968f6"
37
+ "initial_snapshot_identity": "sha256:00c0d796b4136e365d0130886f300c954ecf9431c45d96d8031155c415507d49",
38
+ "current_snapshot_identity": "sha256:00c0d796b4136e365d0130886f300c954ecf9431c45d96d8031155c415507d49"
39
39
  },
40
40
  "repair": {
41
41
  "schema": "gentle-ai.review-authority-repair-assessment/v1",
@@ -133,13 +133,13 @@
133
133
  },
134
134
  {
135
135
  "name": "expected-revision",
136
- "value": "sha256:81cdad8f3182d4919147d3c4fe8f614814068e5ef68417e3dcbd5e326dd3e390",
137
- "token": "--expected-revision=sha256:81cdad8f3182d4919147d3c4fe8f614814068e5ef68417e3dcbd5e326dd3e390"
136
+ "value": "sha256:c978e5383ae788a963c5e80c4f887d3b65ca415767398d57de827a9f0905f423",
137
+ "token": "--expected-revision=sha256:c978e5383ae788a963c5e80c4f887d3b65ca415767398d57de827a9f0905f423"
138
138
  },
139
139
  {
140
140
  "name": "target",
141
- "value": "sha256:e6faad1cb9ceb2db170e0ec9ea5394b44c3991dff6cbd02fb6787539715968f6",
142
- "token": "--target=sha256:e6faad1cb9ceb2db170e0ec9ea5394b44c3991dff6cbd02fb6787539715968f6"
141
+ "value": "sha256:00c0d796b4136e365d0130886f300c954ecf9431c45d96d8031155c415507d49",
142
+ "token": "--target=sha256:00c0d796b4136e365d0130886f300c954ecf9431c45d96d8031155c415507d49"
143
143
  },
144
144
  {
145
145
  "name": "repository-context",
@@ -159,10 +159,10 @@
159
159
  ],
160
160
  "artifact_subject": {
161
161
  "schema": "gentle-ai.review-artifact-subject/v1",
162
- "subject_hash": "sha256:fe57db2ea45a33c7e852d039e8af3291c3bc31911f0c92a710b5fef547b1999d",
162
+ "subject_hash": "sha256:d8f46ff5cdcd86385033ce73f18cbfd61651c81deba1340b743e034cdf9dce48",
163
163
  "lineage_id": "review-status-fixture",
164
- "authority_revision": "sha256:81cdad8f3182d4919147d3c4fe8f614814068e5ef68417e3dcbd5e326dd3e390",
165
- "target_identity": "sha256:e6faad1cb9ceb2db170e0ec9ea5394b44c3991dff6cbd02fb6787539715968f6",
164
+ "authority_revision": "sha256:c978e5383ae788a963c5e80c4f887d3b65ca415767398d57de827a9f0905f423",
165
+ "target_identity": "sha256:00c0d796b4136e365d0130886f300c954ecf9431c45d96d8031155c415507d49",
166
166
  "candidate_diff_sha256": "sha256:8ed4bd24d5beb3f73f6026355f6755f5aef7feebcd76447be820860c22bc47c6",
167
167
  "changed_path_manifest_sha256": "sha256:64d028ff676fb4ef10f2d4a3488d568854b364b4cc4399578b5932d144d2347b",
168
168
  "lens": "review-reliability",
@@ -175,16 +175,7 @@
175
175
  "byte_size": 209
176
176
  },
177
177
  "changed_path_manifest": [
178
- {
179
- "path": "tracked.txt",
180
- "status": "M",
181
- "old_mode": "100644",
182
- "new_mode": "100644",
183
- "deleted": false,
184
- "type_changed": false,
185
- "mode_only": false,
186
- "intended_untracked": false
187
- }
178
+ {"path":"tracked.txt","status":"M","old_mode":"100644","new_mode":"100644","deleted":false,"type_changed":false,"mode_only":false,"intended_untracked":false}
188
179
  ]
189
180
  }
190
181
  ]
@@ -0,0 +1,49 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://gentle-ai.dev/contracts/review-integration/v1/schemas/correction-plan-request.schema.json",
4
+ "title": "Gentle AI provider-owned bounded correction plan request",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schema", "request_hash", "lineage_id", "expected_revision", "target_identity",
9
+ "correction_budget", "fix_finding_ids", "findings"
10
+ ],
11
+ "properties": {
12
+ "schema": {"const": "gentle-ai.review-correction-plan-request/v1"},
13
+ "request_hash": {"$ref": "#/$defs/sha256"},
14
+ "lineage_id": {"type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"},
15
+ "expected_revision": {"$ref": "#/$defs/sha256"},
16
+ "target_identity": {"$ref": "#/$defs/sha256"},
17
+ "correction_budget": {"type": "integer", "minimum": 1, "maximum": 200},
18
+ "fix_finding_ids": {
19
+ "type": "array", "minItems": 1, "uniqueItems": true,
20
+ "items": {"type": "string", "minLength": 1}
21
+ },
22
+ "findings": {
23
+ "type": "array", "minItems": 1, "uniqueItems": true,
24
+ "items": {"$ref": "#/$defs/finding"}
25
+ }
26
+ },
27
+ "$defs": {
28
+ "sha256": {"type": "string", "pattern": "^sha256:[0-9a-f]{64}$"},
29
+ "finding": {
30
+ "type": "object",
31
+ "additionalProperties": false,
32
+ "required": [
33
+ "id", "lens", "location", "severity", "claim", "proof_refs", "evidence",
34
+ "evidence_class", "causal_disposition"
35
+ ],
36
+ "properties": {
37
+ "id": {"type": "string", "minLength": 1},
38
+ "lens": {"enum": ["risk", "resilience", "readability", "reliability"]},
39
+ "location": {"type": "string", "minLength": 1},
40
+ "severity": {"enum": ["BLOCKER", "CRITICAL"]},
41
+ "claim": {"type": "string", "minLength": 1},
42
+ "proof_refs": {"type": "array", "minItems": 1, "items": {"type": "string", "minLength": 1}},
43
+ "evidence": {"type": "string", "minLength": 1},
44
+ "evidence_class": {"enum": ["deterministic", "inferential"]},
45
+ "causal_disposition": {"enum": ["introduced", "behavior-activated", "worsened"]}
46
+ }
47
+ }
48
+ }
49
+ }
@@ -89,6 +89,9 @@
89
89
  "$comment": "Present only when the authority is escalated. Carries the accounting sentence with spent, remaining and total correction lines, so a caller learns the numbers without a second call.",
90
90
  "type": "string",
91
91
  "minLength": 1
92
+ },
93
+ "advisory_findings": {
94
+ "$ref": "#/$defs/advisory_findings"
92
95
  }
93
96
  },
94
97
  "allOf": [
@@ -105,9 +108,82 @@
105
108
  }
106
109
  }
107
110
  }
111
+ },
112
+ {
113
+ "if": {
114
+ "required": [
115
+ "advisory_findings"
116
+ ]
117
+ },
118
+ "then": {
119
+ "properties": {
120
+ "state": {
121
+ "const": "approved"
122
+ }
123
+ }
124
+ }
108
125
  }
109
126
  ]
110
127
  },
128
+ "advisory_findings": {
129
+ "$comment": "Additive and optional. Present only on an approved lineage that froze at least one non-blocking finding, it names the disposition that lineage's routing already decided (outcome plus absence from the correction ledger) instead of leaving a consumer to infer it from a bare severity string. It changes nothing about which findings block: a corrected blocker is excluded rather than relabelled, and the statement says the approval stands and that no correction transition is offered.",
130
+ "type": "object",
131
+ "additionalProperties": false,
132
+ "required": [
133
+ "statement",
134
+ "findings"
135
+ ],
136
+ "properties": {
137
+ "statement": {
138
+ "type": "string",
139
+ "minLength": 1
140
+ },
141
+ "findings": {
142
+ "type": "array",
143
+ "minItems": 1,
144
+ "items": {
145
+ "type": "object",
146
+ "additionalProperties": false,
147
+ "required": [
148
+ "id",
149
+ "severity",
150
+ "disposition"
151
+ ],
152
+ "properties": {
153
+ "id": {
154
+ "type": "string",
155
+ "minLength": 1
156
+ },
157
+ "lens": {
158
+ "type": "string",
159
+ "minLength": 1
160
+ },
161
+ "location": {
162
+ "type": "string",
163
+ "minLength": 1
164
+ },
165
+ "severity": {
166
+ "type": "string",
167
+ "enum": [
168
+ "BLOCKER",
169
+ "CRITICAL",
170
+ "WARNING",
171
+ "SUGGESTION"
172
+ ]
173
+ },
174
+ "disposition": {
175
+ "$comment": "informational: a non-severe finding that never entered classification and requires no action. follow_up: a severe finding proved to originate outside the frozen candidate, recorded for separate later work. refuted: a severe inferential finding the refuter knocked down.",
176
+ "enum": [
177
+ "informational",
178
+ "follow_up",
179
+ "refuted"
180
+ ]
181
+ }
182
+ }
183
+ }
184
+ }
185
+ }
186
+ },
111
187
  "validate": {
112
188
  "type": "object",
113
189
  "additionalProperties": false,
@@ -48,6 +48,10 @@
48
48
  },
49
49
  "execution": {
50
50
  "$ref": "#/$defs/execution"
51
+ },
52
+ "continuation": {
53
+ "type": "string",
54
+ "minLength": 1
51
55
  }
52
56
  },
53
57
  "allOf": [
@@ -154,6 +158,41 @@
154
158
  }
155
159
  }
156
160
  }
161
+ },
162
+ {
163
+ "if": {
164
+ "properties": {
165
+ "mode": {
166
+ "const": "preflight"
167
+ },
168
+ "assessment": {
169
+ "properties": {
170
+ "status": {
171
+ "const": "truncated"
172
+ }
173
+ },
174
+ "required": [
175
+ "status"
176
+ ]
177
+ }
178
+ },
179
+ "required": [
180
+ "mode",
181
+ "assessment"
182
+ ]
183
+ },
184
+ "then": {
185
+ "required": [
186
+ "continuation"
187
+ ]
188
+ },
189
+ "else": {
190
+ "not": {
191
+ "required": [
192
+ "continuation"
193
+ ]
194
+ }
195
+ }
157
196
  }
158
197
  ],
159
198
  "$defs": {
@@ -99,12 +99,14 @@
99
99
  "kind": { "enum": ["execute", "collect", "stop"] },
100
100
  "reason_code": { "type": "string", "pattern": "^[a-z0-9_]+$" },
101
101
  "execute": { "$ref": "#/$defs/transition_execution" },
102
- "collect": { "$ref": "#/$defs/transition_collection" }
102
+ "collect": { "$ref": "#/$defs/transition_collection" },
103
+ "correction_request": { "$ref": "correction-plan-request.schema.json" }
103
104
  },
104
105
  "allOf": [
105
106
  { "if": { "properties": { "kind": { "const": "execute" } }, "required": ["kind"] }, "then": { "required": ["execute"], "not": { "required": ["collect"] } } },
106
107
  { "if": { "properties": { "kind": { "const": "collect" } }, "required": ["kind"] }, "then": { "required": ["collect"], "not": { "required": ["execute"] } } },
107
- { "if": { "properties": { "kind": { "const": "stop" } }, "required": ["kind"] }, "then": { "not": { "anyOf": [{ "required": ["execute"] }, { "required": ["collect"] }] } } }
108
+ { "if": { "properties": { "kind": { "const": "stop" } }, "required": ["kind"] }, "then": { "not": { "anyOf": [{ "required": ["execute"] }, { "required": ["collect"] }] } } },
109
+ { "if": { "properties": { "reason_code": { "enum": ["correction_plan_required", "corrected_candidate_unavailable"] } }, "required": ["reason_code"] }, "then": { "required": ["correction_request"] }, "else": { "not": { "required": ["correction_request"] } } }
108
110
  ]
109
111
  },
110
112
  "transition_argument": {
@@ -82,12 +82,14 @@
82
82
  "kind": { "enum": ["execute", "collect", "stop"] },
83
83
  "reason_code": { "type": "string", "pattern": "^[a-z0-9_]+$" },
84
84
  "execute": { "$ref": "#/$defs/transition_execution" },
85
- "collect": { "$ref": "#/$defs/transition_collection" }
85
+ "collect": { "$ref": "#/$defs/transition_collection" },
86
+ "correction_request": { "$ref": "correction-plan-request.schema.json" }
86
87
  },
87
88
  "allOf": [
88
89
  { "if": { "properties": { "kind": { "const": "execute" } }, "required": ["kind"] }, "then": { "required": ["execute"], "not": { "required": ["collect"] } } },
89
90
  { "if": { "properties": { "kind": { "const": "collect" } }, "required": ["kind"] }, "then": { "required": ["collect"], "not": { "required": ["execute"] } } },
90
- { "if": { "properties": { "kind": { "const": "stop" } }, "required": ["kind"] }, "then": { "not": { "anyOf": [{ "required": ["execute"] }, { "required": ["collect"] }] } } }
91
+ { "if": { "properties": { "kind": { "const": "stop" } }, "required": ["kind"] }, "then": { "not": { "anyOf": [{ "required": ["execute"] }, { "required": ["collect"] }] } } },
92
+ { "if": { "properties": { "reason_code": { "enum": ["correction_plan_required", "corrected_candidate_unavailable"] } }, "required": ["reason_code"] }, "then": { "required": ["correction_request"] }, "else": { "not": { "required": ["correction_request"] } } }
91
93
  ]
92
94
  },
93
95
  "transition_argument": {
@@ -0,0 +1,42 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://gentle-ai.dev/contracts/review-integration/v1/schemas/transition-execution.schema.json",
4
+ "title": "Gentle AI Review Transition Execution",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["operation", "arguments", "preconditions", "binding"],
8
+ "properties": {
9
+ "operation": { "enum": ["review.start", "review.status", "review.recover", "review.repair", "review.validate"] },
10
+ "command": { "$comment": "The complete, literally runnable command line for this transition, e.g. \"gentle-ai review start --contract=... --target=...\". Operation alone is a dotted logical name; command is what a caller can paste. Argument words are the execute arguments' own tokens, in order, POSIX-shell-quoted only when a value would otherwise be word-split.", "type": "string", "minLength": 1, "pattern": "^gentle-ai review [a-z][a-z-]*" },
11
+ "arguments": { "type": "array", "items": { "$ref": "#/$defs/executable_transition_argument" } },
12
+ "selector_arguments": { "type": "array", "items": { "$ref": "#/$defs/transition_argument" } },
13
+ "preconditions": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/transition_argument" } },
14
+ "binding": { "$ref": "#/$defs/transition_binding" },
15
+ "artifacts": { "type": "array", "items": { "$ref": "#/$defs/transition_artifact" } }
16
+ },
17
+ "$defs": {
18
+ "sha256": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
19
+ "transition_argument": {
20
+ "$comment": "One argument of a transition. \"token\", when present, is the exact argv token rendering this argument for a command this product runs, e.g. \"--lineage=review-abc\". It is required on an execute argument (see executable_transition_argument) and present on the arguments of a collect input whose capture_operation names an operation this product performs, because those arguments are literally that command's flags. It is absent on preconditions, on selector_arguments, and on the arguments of an \"external.*\" capture operation, which are assertions, a normalized echo, and values to hand elsewhere rather than argv.",
21
+ "type": "object", "additionalProperties": false, "required": ["name", "value"],
22
+ "properties": { "name": { "type": "string", "pattern": "^[a-z0-9_-]+$" }, "value": { "type": "string", "minLength": 1 }, "token": { "type": "string", "minLength": 1 } }
23
+ },
24
+ "executable_transition_argument": {
25
+ "$comment": "One argv entry of an execute transition. Unlike preconditions and selector_arguments -- which are assertions and a normalized echo the product never tokenizes -- an execute argument is always literally executed, so its exact runnable token is required rather than optional.",
26
+ "allOf": [{ "$ref": "#/$defs/transition_argument" }],
27
+ "type": "object", "required": ["name", "value", "token"]
28
+ },
29
+ "transition_binding": {
30
+ "type": "object", "additionalProperties": false, "required": ["target_identity"],
31
+ "properties": { "lineage_id": { "type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" }, "revision": { "$ref": "#/$defs/sha256" }, "target_identity": { "$ref": "#/$defs/sha256" }, "repository_context": { "type": "string", "pattern": "^rctx1_[0-9a-f]{64}$" } }
32
+ },
33
+ "transition_artifact": {
34
+ "type": "object", "additionalProperties": false, "required": ["schema", "capability", "sha256", "lineage_id", "target_identity", "lens", "selected_order", "subject_hash", "admission_decision"],
35
+ "properties": {
36
+ "schema": { "const": "gentle-ai.review-result-artifact/v2" }, "capability": { "const": "review.native_result_artifact" }, "sha256": { "$ref": "#/$defs/sha256" },
37
+ "lineage_id": { "type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" }, "target_identity": { "$ref": "#/$defs/sha256" }, "lens": { "type": "string", "minLength": 1 }, "selected_order": { "type": "integer", "minimum": 0 },
38
+ "subject_hash": { "$ref": "#/$defs/sha256" }, "admission_decision": { "const": "completed" }
39
+ }
40
+ }
41
+ }
42
+ }
@@ -25,7 +25,7 @@
25
25
  {
26
26
  "answer": "declined",
27
27
  "label": "Not now, just this once",
28
- "effect": "Skips the review for this candidate only; nothing is persisted and the next candidate is asked again. This is not the kill switch.",
28
+ "effect": "Skips the review for this exact candidate only; no review lineage or receipt is created, and ordinary delivery is unmanaged by candidate choice. The next candidate is asked again. This is not the kill switch.",
29
29
  "invocation": "gentle-ai review start --contract gentle-ai.review-integration/v2 --cwd /repo --target sha256:136dc6556e3bac8c2e7f7af7cc5ec361f449e383a997638128729059fefa06a5 --projection workspace --lineage review-consent-fixture --consent declined"
30
30
  }
31
31
  ],
@@ -73,16 +73,7 @@
73
73
  }
74
74
  ],
75
75
  "changed_path_manifest": [
76
- {
77
- "path": "scripts/deploy.sh",
78
- "status": "A",
79
- "old_mode": "000000",
80
- "new_mode": "100644",
81
- "deleted": false,
82
- "type_changed": false,
83
- "mode_only": false,
84
- "intended_untracked": true
85
- }
76
+ {"path":"scripts/deploy.sh","status":"A","old_mode":"000000","new_mode":"100644","deleted":false,"type_changed":false,"mode_only":false,"intended_untracked":true}
86
77
  ],
87
78
  "repository_context": {
88
79
  "capability": "review.opaque_repository_context",
@@ -95,16 +95,7 @@
95
95
  "base_tree": "3e21a205dd9b55021aeae87965092623807e455f",
96
96
  "candidate_tree": "1c3325617279b38743f073302ba190fc421b5a09",
97
97
  "changed_path_manifest": [
98
- {
99
- "path": "tracked.txt",
100
- "status": "M",
101
- "old_mode": "100644",
102
- "new_mode": "100644",
103
- "deleted": false,
104
- "type_changed": false,
105
- "mode_only": false,
106
- "intended_untracked": false
107
- }
98
+ {"path":"tracked.txt","status":"M","old_mode":"100644","new_mode":"100644","deleted":false,"type_changed":false,"mode_only":false,"intended_untracked":false}
108
99
  ]
109
100
  }
110
101
  ]
@@ -11,7 +11,11 @@
11
11
  "properties": {
12
12
  "schema": {"const": "gentle-ai.review-integration.failure/v2"},
13
13
  "contract": {"const": "gentle-ai.review-integration/v2"},
14
- "operation": {"$ref": "../../v1/schemas/failure.schema.json#/properties/operation"},
14
+ "operation": {"enum": [
15
+ "review.capabilities", "review.start", "review.status", "review.finalize", "review.repair",
16
+ "review.retry_final_verification", "review.validate", "review.bind_sdd",
17
+ "review.capture-result", "review.capture-evidence", "review.capture-refuter", "review.capture-validation"
18
+ ]},
15
19
  "phase": {"$ref": "../../v1/schemas/failure.schema.json#/properties/phase"},
16
20
  "code": {"$ref": "../../v1/schemas/failure.schema.json#/properties/code"},
17
21
  "message": {"$ref": "../../v1/schemas/failure.schema.json#/properties/message"},
@@ -0,0 +1,66 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://gentle-ai.dev/contracts/review-integration/v2/schemas/last-event-closure.schema.json",
4
+ "title": "Gentle AI review terminal last-event capture response v1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schema", "operation", "lineage_id", "state", "store_revision"],
8
+ "allOf": [
9
+ {
10
+ "if": {"properties": {"operation": {"const": "review.capture-correction-plan"}}, "required": ["operation"]},
11
+ "then": {
12
+ "required": ["target_identity", "request_hash", "correction_lines"],
13
+ "not": {"required": ["action"]}
14
+ },
15
+ "else": {"required": ["action"]}
16
+ },
17
+ {
18
+ "if": {"properties": {"operation": {"enum": ["review/capture-result", "review.capture-refuter"]}, "state": {"const": "correction_required"}}, "required": ["operation", "state"]},
19
+ "then": {
20
+ "required": ["status_continuation"],
21
+ "properties": {
22
+ "status_continuation": {
23
+ "required": ["operation"],
24
+ "properties": {"operation": {"const": "review.status"}}
25
+ }
26
+ }
27
+ },
28
+ "else": {"not": {"required": ["status_continuation"]}}
29
+ }
30
+ ],
31
+ "properties": {
32
+ "schema": {"const": "gentle-ai.review-last-event-closure/v1"},
33
+ "operation": {"enum": ["review/capture-result", "review.capture-correction-plan", "review.capture-refuter", "review/capture-validation"]},
34
+ "lineage_id": {"type": "string", "minLength": 1},
35
+ "target_identity": {"type": "string", "pattern": "^sha256:[0-9a-f]{64}$"},
36
+ "request_hash": {"type": "string", "pattern": "^sha256:[0-9a-f]{64}$"},
37
+ "correction_lines": {"type": "integer", "minimum": 1},
38
+ "state": {"enum": ["approved", "correction_required", "escalated"]},
39
+ "action": {"type": "string", "minLength": 1},
40
+ "status_continuation": {"$ref": "../../v1/schemas/transition-execution.schema.json"},
41
+ "store_revision": {"type": "string", "pattern": "^sha256:[0-9a-f]{64}$"},
42
+ "advisory_findings": {
43
+ "type": "object",
44
+ "additionalProperties": false,
45
+ "required": ["statement", "findings"],
46
+ "properties": {
47
+ "statement": {"type": "string", "minLength": 1},
48
+ "findings": {
49
+ "type": "array",
50
+ "items": {
51
+ "type": "object",
52
+ "additionalProperties": false,
53
+ "required": ["id", "severity", "disposition"],
54
+ "properties": {
55
+ "id": {"type": "string", "minLength": 1},
56
+ "lens": {"type": "string", "minLength": 1},
57
+ "location": {"type": "string", "minLength": 1},
58
+ "severity": {"type": "string", "minLength": 1},
59
+ "disposition": {"enum": ["informational", "follow_up", "refuted"]}
60
+ }
61
+ }
62
+ }
63
+ }
64
+ }
65
+ }
66
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://gentle-ai.dev/contracts/review-integration/v2/schemas/opencode-provider-role.schema.json",
4
+ "title": "Gentle AI OpenCode transport provider-role capture acknowledgement",
5
+ "description": "The gentle-ai.opencode-review-provider-role/v1 envelope the OpenCode review transport returns after natively capturing one provider role result (refuter or targeted-validator). Derived from internal/cli/review_opencode_transport.go's openCodeProviderRoleResultEnvelope.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["schema", "role", "captured"],
9
+ "properties": {
10
+ "schema": {"const": "gentle-ai.opencode-review-provider-role/v1"},
11
+ "role": {"enum": ["refuter", "targeted-validator"]},
12
+ "captured": {"const": true}
13
+ }
14
+ }
@@ -33,12 +33,17 @@
33
33
  "eligibility": {"$ref": "status.schema.json#/properties/eligibility"},
34
34
  "next_transition": {"$ref": "status.schema.json#/$defs/next_transition"},
35
35
  "validation_request": {"$ref": "../../v1/schemas/targeted-validation-request.schema.json"},
36
- "escalation": {"type": "string", "minLength": 1}
36
+ "escalation": {"type": "string", "minLength": 1},
37
+ "advisory_findings": {"$ref": "../../v1/schemas/operation.schema.json#/$defs/advisory_findings"}
37
38
  },
38
39
  "allOf": [
39
40
  {
40
41
  "if": {"required": ["validation_request"]},
41
42
  "then": {"properties": {"state": {"const": "correction_required"}}}
43
+ },
44
+ {
45
+ "if": {"required": ["advisory_findings"]},
46
+ "then": {"properties": {"state": {"const": "approved"}}}
42
47
  }
43
48
  ]
44
49
  }