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,46 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://gentle-ai.dev/contracts/review-integration/v2/schemas/operation.schema.json",
4
+ "title": "Gentle AI negotiated review v2 operation result",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schema", "contract", "operation", "result"],
8
+ "properties": {
9
+ "schema": {"const": "gentle-ai.review-integration.operation/v2"},
10
+ "contract": {"const": "gentle-ai.review-integration/v2"},
11
+ "operation": {"$ref": "../../v1/schemas/operation.schema.json#/properties/operation"},
12
+ "result": {
13
+ "oneOf": [
14
+ {"$ref": "#/$defs/finalize"},
15
+ {"$ref": "../../v1/schemas/operation.schema.json#/$defs/validate"},
16
+ {"$ref": "../../v1/schemas/operation.schema.json#/$defs/bind_sdd"},
17
+ {"$ref": "../../v1/schemas/operation.schema.json#/$defs/retry_final_verification"}
18
+ ]
19
+ }
20
+ },
21
+ "$defs": {
22
+ "sha256": {"type": "string", "pattern": "^sha256:[0-9a-f]{64}$"},
23
+ "finalize": {
24
+ "type": "object",
25
+ "additionalProperties": false,
26
+ "required": ["operation", "lineage_id", "state", "action", "store_revision"],
27
+ "properties": {
28
+ "operation": {"const": "review/finalize"},
29
+ "lineage_id": {"type": "string", "minLength": 1},
30
+ "state": {"type": "string", "minLength": 1},
31
+ "action": {"type": "string", "minLength": 1},
32
+ "store_revision": {"$ref": "#/$defs/sha256"},
33
+ "eligibility": {"$ref": "status.schema.json#/properties/eligibility"},
34
+ "next_transition": {"$ref": "status.schema.json#/$defs/next_transition"},
35
+ "validation_request": {"$ref": "../../v1/schemas/targeted-validation-request.schema.json"},
36
+ "escalation": {"type": "string", "minLength": 1}
37
+ },
38
+ "allOf": [
39
+ {
40
+ "if": {"required": ["validation_request"]},
41
+ "then": {"properties": {"state": {"const": "correction_required"}}}
42
+ }
43
+ ]
44
+ }
45
+ }
46
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://gentle-ai.dev/contracts/review-integration/v2/schemas/repair.schema.json",
4
+ "title": "Gentle AI negotiated review v2 repair result",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schema", "contract", "operation", "mode", "assessment", "required_inputs"],
8
+ "properties": {
9
+ "schema": {"const": "gentle-ai.review-integration.repair/v2"},
10
+ "contract": {"const": "gentle-ai.review-integration/v2"},
11
+ "operation": {"$ref": "../../v1/schemas/repair.schema.json#/properties/operation"},
12
+ "mode": {"$ref": "../../v1/schemas/repair.schema.json#/properties/mode"},
13
+ "assessment": {"$ref": "../../v1/schemas/repair.schema.json#/properties/assessment"},
14
+ "provider_inputs": {"$ref": "../../v1/schemas/repair.schema.json#/properties/provider_inputs"},
15
+ "required_inputs": {"$ref": "../../v1/schemas/repair.schema.json#/properties/required_inputs"},
16
+ "execution": {"$ref": "../../v1/schemas/repair.schema.json#/properties/execution"}
17
+ },
18
+ "allOf": [
19
+ {"$ref": "../../v1/schemas/repair.schema.json#/allOf/0"},
20
+ {"$ref": "../../v1/schemas/repair.schema.json#/allOf/1"}
21
+ ]
22
+ }
@@ -0,0 +1,106 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://gentle-ai.dev/contracts/review-integration/v2/schemas/start.schema.json",
4
+ "title": "Gentle AI negotiated native Git review START response v3",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "dependentRequired": {
8
+ "target_mode": ["target_identity", "base_tree", "candidate_tree"],
9
+ "target_identity": ["target_mode", "base_tree", "candidate_tree"],
10
+ "base_tree": ["candidate_tree"],
11
+ "candidate_tree": ["base_tree"],
12
+ "changed_path_manifest": ["base_tree", "candidate_tree"]
13
+ },
14
+ "allOf": [
15
+ {
16
+ "if": {"properties": {"selected_lenses": {"minItems": 1}}, "required": ["selected_lenses"]},
17
+ "then": {"required": ["base_tree", "candidate_tree", "changed_path_manifest"]}
18
+ },
19
+ {
20
+ "if": {
21
+ "properties": {"action": {"enum": ["created", "resumed"]}, "state": {"const": "reviewing"}},
22
+ "required": ["action", "state"]
23
+ },
24
+ "then": {"required": ["repository_context"]},
25
+ "else": {"not": {"required": ["repository_context"]}}
26
+ }
27
+ ],
28
+ "required": [
29
+ "schema", "contract", "operation", "action", "lenses_required", "lineage_id", "state", "risk_level",
30
+ "selected_lenses", "projection", "changed_files", "changed_lines", "correction_budget", "risk_reasons", "artifact_subjects"
31
+ ],
32
+ "properties": {
33
+ "schema": {"const": "gentle-ai.review-integration.start/v3"},
34
+ "contract": {"const": "gentle-ai.review-integration/v2"},
35
+ "operation": {"const": "review.start"},
36
+ "action": {"enum": ["created", "resumed", "reuse-receipt", "blocked-scope-action"]},
37
+ "lenses_required": {"type": "boolean"},
38
+ "lineage_id": {"type": "string", "minLength": 1},
39
+ "state": {
40
+ "enum": [
41
+ "unreviewed", "reviewing", "judges_confirmed", "findings_frozen", "evidence_classified", "fix_required",
42
+ "fixing", "fix_validating", "correction_required", "validating", "ready_final_verification", "final_verifying",
43
+ "approved", "escalated", "invalidated"
44
+ ]
45
+ },
46
+ "risk_level": {"enum": ["low", "medium", "high"]},
47
+ "selected_lenses": {
48
+ "type": "array", "maxItems": 4, "uniqueItems": true,
49
+ "items": {"enum": ["review-risk", "review-resilience", "review-readability", "review-reliability"]}
50
+ },
51
+ "projection": {"enum": ["workspace", "staged"]},
52
+ "target_mode": {"const": "base-workspace-overlay"},
53
+ "target_identity": {"$ref": "#/$defs/sha256"},
54
+ "base_tree": {"$ref": "#/$defs/git_tree"},
55
+ "candidate_tree": {"$ref": "#/$defs/git_tree"},
56
+ "changed_files": {"type": "integer", "minimum": 0},
57
+ "changed_lines": {"type": "integer", "minimum": 0},
58
+ "correction_budget": {"type": "integer", "minimum": 0, "maximum": 200},
59
+ "risk_reasons": {"type": "array", "minItems": 1, "uniqueItems": true, "items": {"$ref": "#/$defs/risk_reason"}},
60
+ "artifact_subjects": {"type": "array", "maxItems": 4, "items": {"$ref": "artifact-subject.schema.json"}},
61
+ "changed_path_manifest": {"type": "array", "uniqueItems": true, "items": {"$ref": "#/$defs/changed_path"}},
62
+ "repository_context": {
63
+ "type": "object", "additionalProperties": false,
64
+ "required": ["capability", "handle", "revision", "target_identity"],
65
+ "properties": {
66
+ "capability": {"const": "review.opaque_repository_context"},
67
+ "handle": {"type": "string", "pattern": "^rctx1_[0-9a-f]{64}$"},
68
+ "revision": {"$ref": "#/$defs/sha256"},
69
+ "target_identity": {"$ref": "#/$defs/sha256"}
70
+ }
71
+ }
72
+ },
73
+ "$defs": {
74
+ "sha256": {"type": "string", "pattern": "^sha256:[0-9a-f]{64}$"},
75
+ "git_tree": {"type": "string", "pattern": "^[0-9a-f]{40}([0-9a-f]{24})?$"},
76
+ "changed_path": {
77
+ "type": "object", "additionalProperties": false,
78
+ "required": ["path", "status", "old_mode", "new_mode", "deleted", "type_changed", "mode_only", "intended_untracked"],
79
+ "properties": {
80
+ "path": {"type": "string", "minLength": 1},
81
+ "status": {"enum": ["A", "D", "M", "T"]},
82
+ "old_mode": {"type": "string", "pattern": "^[0-7]{6}$"},
83
+ "new_mode": {"type": "string", "pattern": "^[0-7]{6}$"},
84
+ "deleted": {"type": "boolean"},
85
+ "type_changed": {"type": "boolean"},
86
+ "mode_only": {"type": "boolean"},
87
+ "intended_untracked": {"type": "boolean"}
88
+ }
89
+ },
90
+ "risk_reason": {
91
+ "type": "object", "additionalProperties": false, "required": ["code"],
92
+ "properties": {
93
+ "code": {
94
+ "enum": [
95
+ "configuration_change", "empty_content", "executable_change", "executable_mode", "hot_path", "large_change",
96
+ "non_executable_only", "process_boundary", "process_scan_limit", "service_token", "shell_source"
97
+ ]
98
+ },
99
+ "signal": {"enum": ["auth", "update", "security", "payments", "permissions", "shell_process"]},
100
+ "path": {"type": "string", "minLength": 1},
101
+ "old_mode": {"type": "string", "pattern": "^[0-7]{6}$"},
102
+ "new_mode": {"type": "string", "pattern": "^[0-7]{6}$"}
103
+ }
104
+ }
105
+ }
106
+ }
@@ -0,0 +1,104 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://gentle-ai.dev/contracts/review-integration/v2/schemas/status.schema.json",
4
+ "title": "Gentle AI Review Integration native Git target status v3",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schema", "contract", "operation", "applicability", "receipt", "action", "replayability",
9
+ "target_identity", "projection", "repair", "candidates"
10
+ ],
11
+ "properties": {
12
+ "schema": {"const": "gentle-ai.review-integration.status/v3"},
13
+ "contract": {"const": "gentle-ai.review-integration/v2"},
14
+ "operation": {"const": "review.status"},
15
+ "applicability": {"$ref": "../../v1/schemas/status-v2.schema.json#/properties/applicability"},
16
+ "authority": {"$ref": "../../v1/schemas/status-v2.schema.json#/properties/authority"},
17
+ "receipt": {"$ref": "../../v1/schemas/status-v2.schema.json#/properties/receipt"},
18
+ "action": {"$ref": "../../v1/schemas/status-v2.schema.json#/properties/action"},
19
+ "action_disposition": {"$ref": "../../v1/schemas/status-v2.schema.json#/properties/action_disposition"},
20
+ "replayability": {"$ref": "../../v1/schemas/status-v2.schema.json#/properties/replayability"},
21
+ "frozen": {"$ref": "../../v1/schemas/status-v2.schema.json#/properties/frozen"},
22
+ "target_identity": {"$ref": "#/$defs/sha256"},
23
+ "authority_target_identity": {"$ref": "#/$defs/sha256"},
24
+ "projection": {"$ref": "../../v1/schemas/projection.schema.json"},
25
+ "repair": {"$ref": "../../v1/schemas/authority-repair-assessment.schema.json"},
26
+ "candidates": {"$ref": "../../v1/schemas/status-v2.schema.json#/properties/candidates"},
27
+ "reconciliation": {"$ref": "../../v1/schemas/status-v2.schema.json#/properties/reconciliation"},
28
+ "eligibility": {"$ref": "../../v1/schemas/status-v2.schema.json#/$defs/action_eligibility"},
29
+ "next_transition": {"$ref": "#/$defs/next_transition"},
30
+ "validation_request": {"$ref": "../../v1/schemas/targeted-validation-request.schema.json"},
31
+ "final_verification_retry": {"$ref": "../../v1/schemas/status-v2.schema.json#/properties/final_verification_retry"}
32
+ },
33
+ "$defs": {
34
+ "sha256": {"type": "string", "pattern": "^sha256:[0-9a-f]{64}$"},
35
+ "next_transition": {
36
+ "type": "object", "additionalProperties": false, "required": ["kind", "reason_code"],
37
+ "properties": {
38
+ "kind": {"enum": ["execute", "collect", "stop"]},
39
+ "reason_code": {"type": "string", "pattern": "^[a-z0-9_]+$"},
40
+ "execute": {"$ref": "../../v1/schemas/status-v2.schema.json#/$defs/transition_execution"},
41
+ "collect": {"$ref": "#/$defs/transition_collection"}
42
+ },
43
+ "allOf": [
44
+ {"if": {"properties": {"kind": {"const": "execute"}}, "required": ["kind"]}, "then": {"required": ["execute"], "not": {"required": ["collect"]}}},
45
+ {"if": {"properties": {"kind": {"const": "collect"}}, "required": ["kind"]}, "then": {"required": ["collect"], "not": {"required": ["execute"]}}},
46
+ {"if": {"properties": {"kind": {"const": "stop"}}, "required": ["kind"]}, "then": {"not": {"anyOf": [{"required": ["execute"]}, {"required": ["collect"]}]}}}
47
+ ]
48
+ },
49
+ "transition_collection": {
50
+ "type": "object", "additionalProperties": false, "required": ["inputs"],
51
+ "properties": {"inputs": {"type": "array", "minItems": 1, "items": {"$ref": "#/$defs/transition_input"}}}
52
+ },
53
+ "transition_input": {
54
+ "type": "object", "additionalProperties": false,
55
+ "required": ["name", "schema", "capture_operation", "arguments"],
56
+ "properties": {
57
+ "name": {"type": "string", "pattern": "^[a-z0-9_]+$"},
58
+ "schema": {"type": "string", "minLength": 1},
59
+ "capture_operation": {"type": "string", "minLength": 1},
60
+ "arguments": {
61
+ "type": "array", "minItems": 1,
62
+ "items": {"$ref": "../../v1/schemas/status-v2.schema.json#/$defs/transition_argument"}
63
+ },
64
+ "artifact_subject": {"$ref": "artifact-subject.schema.json"},
65
+ "base_tree": {"$ref": "#/$defs/git_tree"},
66
+ "candidate_tree": {"$ref": "#/$defs/git_tree"},
67
+ "changed_path_manifest": {"type": "array", "uniqueItems": true, "items": {"$ref": "start.schema.json#/$defs/changed_path"}},
68
+ "validation_request": {"$ref": "../../v1/schemas/targeted-validation-request.schema.json"}
69
+ },
70
+ "allOf": [
71
+ {
72
+ "if": {"properties": {"capture_operation": {"const": "external.run_targeted_validation"}}, "required": ["capture_operation"]},
73
+ "then": {"required": ["validation_request"], "properties": {"schema": {"const": "gentle-ai.review-targeted-validation-request/v1"}}},
74
+ "else": {"not": {"required": ["validation_request"]}}
75
+ },
76
+ {
77
+ "if": {"properties": {"capture_operation": {"const": "review.capture-result"}}, "required": ["capture_operation"]},
78
+ "then": {
79
+ "required": ["artifact_subject", "base_tree", "candidate_tree", "changed_path_manifest"],
80
+ "properties": {"schema": {"const": "https://gentle-ai.dev/schema/review/reviewer/v1"}}
81
+ },
82
+ "else": {
83
+ "allOf": [
84
+ {"not": {"required": ["artifact_subject"]}},
85
+ {"not": {"required": ["base_tree"]}},
86
+ {"not": {"required": ["candidate_tree"]}},
87
+ {"not": {"required": ["changed_path_manifest"]}}
88
+ ]
89
+ }
90
+ }
91
+ ]
92
+ },
93
+ "git_tree": {"type": "string", "pattern": "^[0-9a-f]{40}([0-9a-f]{24})?$"}
94
+ },
95
+ "allOf": [
96
+ {"$ref": "../../v1/schemas/status-v2.schema.json#/allOf/0"},
97
+ {"$ref": "../../v1/schemas/status-v2.schema.json#/allOf/1"},
98
+ {"$ref": "../../v1/schemas/status-v2.schema.json#/allOf/2"},
99
+ {"$ref": "../../v1/schemas/status-v2.schema.json#/allOf/3"},
100
+ {"$ref": "../../v1/schemas/status-v2.schema.json#/allOf/4"},
101
+ {"$ref": "../../v1/schemas/status-v2.schema.json#/allOf/5"},
102
+ {"$ref": "../../v1/schemas/status-v2.schema.json#/allOf/6"}
103
+ ]
104
+ }
@@ -8,7 +8,7 @@ U8 closed the U1-U7 slimming work. Issue [#191](https://github.com/Gentleman-Pro
8
8
 
9
9
  | Surface | Owner after #191 |
10
10
  | --- | --- |
11
- | Ordinary START, FINALIZE, target status, validation, SDD binding, recovery, and reconciliation | Package-local Gentle AI v2.1.11 through `gentle-ai.review-integration/v1` |
11
+ | Ordinary START, FINALIZE, target status, validation, SDD binding, recovery, and reconciliation | Package-local Gentle AI v2.2.1 through `gentle-ai.review-integration/v1` (migrating to `/v2`, see below) |
12
12
  | Canonical consumer identities | Permanent Pi module `lib/review-canonical.ts` |
13
13
  | Git common-directory and repository identity | Permanent Pi module `lib/review-repository.ts` |
14
14
  | Immutable reviewer candidate views | Permanent Pi module `lib/review-candidate-view.ts` |
@@ -19,6 +19,21 @@ U8 closed the U1-U7 slimming work. Issue [#191](https://github.com/Gentleman-Pro
19
19
 
20
20
  Pi no longer owns an ordinary compact store, compact gate, compatibility facade, supersession writer, graph bundle transport, mirror, checkpoint, reset writer, graph reducer mirror, or standalone revision/HEAD transaction backend.
21
21
 
22
+ ## Naming note: "compact-v2" is not contract v2
23
+
24
+ This document and `gentle_review`'s recovery/maintenance commands use "compact-v2" to name Pi's own internal review-authority storage generation (`lib/review-compact.ts`, `lib/review-compact-contract.ts`), predating and unrelated to gentle-ai's negotiated protocol contract `gentle-ai.review-integration/v2`. The two share a digit and nothing else: "compact-v2" is Pi-internal authority-state vocabulary; `review-integration/v2` is gentle-ai's wire contract replacing the Base64 `candidate_diff` transport with immutable `base_tree`/`candidate_tree` and an ordered `changed_path_manifest`. Do not conflate them when reading the maintenance-boundary section below.
25
+
26
+ ## Contract migration status: `review-integration/v1` → `/v2` (complete)
27
+
28
+ gentle-ai publishes two negotiated contracts side by side: `gentle-ai.review-integration/v1` (the Base64 candidate-diff transport Pi used to speak) and `gentle-ai.review-integration/v2` (immutable `base_tree`/`candidate_tree`, an ordered `changed_path_manifest`, mandatory `artifact_subjects`, and an evidence-first correction lifecycle). gentle-pi negotiates `/v2` only, with no dual-lane fallback — the pinned binary always answers exactly one exact version, so negotiating a version range would buy nothing and double the decoder surface permanently.
29
+
30
+ The migration (tracked as the `migrate-review-integration-v2` OpenSpec change) landed in two stages:
31
+
32
+ - **Stage 1 (authorable without an external dependency):** the `lib/review-integration-v2.ts` decoder module, a pure evidence-first correction-lifecycle module, and a field-wise candidate-view manifest check were authored and unit-tested against the mirrored `contracts/review-integration/v2/` fixtures while `lib/native-review-cli.ts` still negotiated `/v1`.
33
+ - **Stage 2 (gated on the pinned gentle-ai release advertising contract v2, landed against v2.2.2):** one atomic commit flipped the import, added the net-new negotiated `review repair` and `review capture-evidence` call sites, deleted `lib/review-integration-v1.ts` and its generated runtime and tests, and regenerated `runtime/*.mjs`. `contracts/review-integration/v1/**` stays on disk permanently because the `/v2` JSON schemas `$ref` into its fragments.
34
+
35
+ Under `/v2`, reviewers inspect the frozen candidate through read-only Git against the exact frozen trees; a runtime that cannot enforce a per-command shell boundary exposes no shell and reports incomplete inspection rather than substituting live files. Pi already satisfies this by materializing a chmod-read-only worktree scoped to the manifest and pointing lens agents at it through `Read` — they get no Git shell at all.
36
+
22
37
  ## Dependency Boundary
23
38
 
24
39
  The permanent modules have direct production consumers after #191:
@@ -75,11 +90,11 @@ U1-U8 retire nine review modules present on `origin/main`:
75
90
 
76
91
  U8 found no additional zero-consumer code module. Remaining graph, ordinary-policy, compact-contract, runtime-contract, snapshot, trigger, risk, and refuter modules retain production, contract, or semantic-replay consumers.
77
92
 
78
- The packaged `contracts/review-integration/v1/` schemas and fixtures plus `docs/review-integration.md` are byte-identical v2.1.11 provider artifacts, not dead Pi compatibility documentation. Package verification proves their hashes.
93
+ The packaged `contracts/review-integration/v1/` schemas and fixtures plus `docs/review-integration.md` are byte-identical provider artifacts for negotiated contract `review-integration/v1`, not dead Pi compatibility documentation; the newer `contracts/review-integration/v2/` schemas and fixtures are a second byte-identical mirror, for contract `review-integration/v2`, whose schemas `$ref` into the `/v1` fragments — which is why the `/v1` directory stays packaged even after Pi migrates its active decoder. Package verification proves both directories' hashes.
79
94
 
80
95
  ## Published Maintenance Boundary
81
96
 
82
- Gentle AI v2.1.11 exposes explicit, audited maintenance commands outside negotiated ordinary review. Pi invokes `review abandon`, `review quarantine-legacy`, and `review reconcile-authority` only after fresh interactive approval of exact LF-only authorization text; headless execution and absent, malformed, or stale bindings fail closed.
97
+ Gentle AI has exposed explicit, audited maintenance commands outside negotiated ordinary review since v2.1.11; the currently pinned v2.2.1 keeps them available under the same legacy version table. Pi invokes `review abandon`, `review quarantine-legacy`, and `review reconcile-authority` only after fresh interactive approval of exact LF-only authorization text; headless execution and absent, malformed, or stale bindings fail closed.
83
98
 
84
99
  `abandon` is restricted by native re-derivation to a caller-named pristine compact-v2 reviewing or invalidated lineage. `quarantine-legacy` accepts only the published malformed freeze-findings diagnostic and disposition. Reconciliation accepts the exact dual anomaly suffix `anomalies=unchanged_target,malformed_recovery_authorization` only in that order. `repair-legacy-alias` derives repository, revision, diagnostic, and disposition from freshly read native inventory before its own approval and can only quarantine one qualified historical alias chain. `review dispose-result` remains unexposed pending design. Recovery routes only the provider-selected negotiated `action_disposition`.
85
100