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.
- package/README.md +108 -79
- package/assets/agents/gentle-ai-worker.md +7 -3
- package/assets/agents/jd-fix-agent.md +1 -1
- package/assets/agents/jd-judge-a.md +3 -1
- package/assets/agents/jd-judge-b.md +3 -1
- package/assets/agents/review-readability.md +4 -3
- package/assets/agents/review-reliability.md +4 -3
- package/assets/agents/review-resilience.md +4 -3
- package/assets/agents/review-risk.md +4 -3
- package/assets/agents/sdd-apply.md +11 -4
- package/assets/agents/sdd-archive.md +6 -1
- package/assets/agents/sdd-design.md +6 -1
- package/assets/agents/sdd-explore.md +6 -2
- package/assets/agents/sdd-init.md +10 -2
- package/assets/agents/sdd-onboard.md +6 -1
- package/assets/agents/sdd-proposal.md +8 -1
- package/assets/agents/sdd-research.md +54 -0
- package/assets/agents/sdd-spec.md +6 -1
- package/assets/agents/sdd-status.md +10 -5
- package/assets/agents/sdd-sync.md +6 -1
- package/assets/agents/sdd-tasks.md +8 -4
- package/assets/agents/sdd-verify.md +27 -2
- package/assets/chains/4r-review.chain.md +2 -0
- package/assets/chains/sdd-full.chain.md +2 -2
- package/assets/chains/sdd-plan.chain.md +1 -1
- package/assets/chains/sdd-verify.chain.md +2 -2
- package/assets/orchestrator-delegation.md +145 -160
- package/assets/orchestrator-memory.md +2 -0
- package/assets/orchestrator.md +25 -48
- package/assets/sdd-orchestrator-workflow.md +163 -25
- package/assets/support/sdd-status-contract.md +24 -6
- package/contracts/review-integration/v1/fixtures/consent.fixture.json +3 -3
- package/contracts/review-integration/v1/fixtures/start-v2.fixture.json +19 -28
- package/contracts/review-integration/v1/fixtures/start.fixture.json +1 -10
- package/contracts/review-integration/v1/fixtures/status-v2.fixture.json +12 -21
- package/contracts/review-integration/v1/schemas/correction-plan-request.schema.json +49 -0
- package/contracts/review-integration/v1/schemas/operation.schema.json +76 -0
- package/contracts/review-integration/v1/schemas/repair.schema.json +39 -0
- package/contracts/review-integration/v1/schemas/status-v2.schema.json +4 -2
- package/contracts/review-integration/v1/schemas/status.schema.json +4 -2
- package/contracts/review-integration/v1/schemas/transition-execution.schema.json +42 -0
- package/contracts/review-integration/v2/fixtures/consent.fixture.json +1 -1
- package/contracts/review-integration/v2/fixtures/start.fixture.json +1 -10
- package/contracts/review-integration/v2/fixtures/status.fixture.json +1 -10
- package/contracts/review-integration/v2/schemas/failure.schema.json +5 -1
- package/contracts/review-integration/v2/schemas/last-event-closure.schema.json +66 -0
- package/contracts/review-integration/v2/schemas/opencode-provider-role.schema.json +14 -0
- package/contracts/review-integration/v2/schemas/operation.schema.json +6 -1
- package/contracts/review-integration/v2/schemas/repair.schema.json +4 -2
- package/contracts/review-integration/v2/schemas/start.schema.json +5 -2
- package/contracts/review-integration/v2/schemas/status.schema.json +4 -2
- package/contracts/review-provider-contract-mirror/provider-contract.lock.json +30 -0
- package/contracts/review-provider-contract-mirror/v1.1.0/bundle/README.md +12 -0
- package/contracts/review-provider-contract-mirror/v1.1.0/bundle/manifest.json +65 -0
- package/contracts/review-provider-contract-mirror/v1.1.0/bundle/schemas/lens.schema.json +16 -0
- package/contracts/review-provider-contract-mirror/v1.1.0/bundle/schemas/refuter.schema.json +1 -0
- package/contracts/review-provider-contract-mirror/v1.1.0/bundle/schemas/targeted-validator.schema.json +1 -0
- package/contracts/review-provider-contract-mirror/v1.1.0/bundle/vectors/lens.json +1 -0
- package/contracts/review-provider-contract-mirror/v1.1.0/bundle/vectors/refuter.json +1 -0
- package/contracts/review-provider-contract-mirror/v1.1.0/bundle/vectors/targeted-validator.json +1 -0
- package/contracts/review-provider-contract-mirror/v1.1.0/generated/provider-capabilities.baseline.json +15 -0
- package/contracts/review-provider-contract-mirror/v1.1.0/generated/provider-roles.baseline.json +42 -0
- package/docs/native-authority-architecture.md +14 -16
- package/docs/review-integration.md +27 -353
- package/extensions/ask-user-choice.ts +151 -0
- package/extensions/gentle-ai.ts +2710 -3211
- package/extensions/quiet-tools.ts +515 -32
- package/extensions/sdd-init.ts +21 -12
- package/extensions/skill-registry.ts +10 -2
- package/extensions/startup-banner.ts +10 -4
- package/lib/gentle-ai-binary.ts +173 -2
- package/lib/gentle-ai-renderer.ts +70 -0
- package/lib/model-routing-authority.ts +133 -0
- package/lib/native-review-cli.ts +676 -781
- package/lib/opaque-pi-reviewer-adapter.ts +284 -0
- package/lib/provider-contract-bundle.ts +704 -0
- package/lib/review-candidate-view.ts +836 -118
- package/lib/review-compact-contract.ts +59 -248
- package/lib/review-host-relay.ts +578 -0
- package/lib/review-integration-v2.ts +1254 -221
- package/lib/review-last-event-controller.ts +35 -0
- package/lib/review-relay-contract.ts +16 -0
- package/lib/sdd-preflight.ts +230 -67
- package/lib/sdd-status.ts +66 -111
- package/lib/terminal-theme.ts +1 -1
- package/package.json +83 -79
- package/runtime/gentle-ai-binary.mjs +174 -3
- package/runtime/native-review-cli.mjs +610 -715
- package/runtime/review-integration-v2.mjs +1223 -190
- package/runtime/review-relay-contract.mjs +17 -0
- package/scripts/{build-git-commit-transaction-runner.mjs → build-runtime-modules.mjs} +5 -5
- package/scripts/check-provider-contract.mjs +138 -0
- package/scripts/gentle-ai-installer.mjs +85 -22
- package/scripts/maintainer/provider-relay-matrix.mjs +403 -0
- package/scripts/mirror-provider-contract.mjs +143 -0
- package/scripts/test-packed-runner.mjs +20 -9
- package/scripts/verify-package-files.mjs +119 -43
- package/skills/_shared/review-ledger-contract.md +11 -19
- package/skills/chained-pr/SKILL.md +3 -0
- package/skills/cognitive-doc-design/SKILL.md +1 -1
- package/skills/comment-writer/SKILL.md +1 -1
- package/skills/gentle-ai/SKILL.md +7 -74
- package/skills/issue-creation/SKILL.md +94 -168
- package/skills/judgment-day/SKILL.md +9 -5
- package/skills/judgment-day/references/prompts-and-formats.md +2 -0
- package/skills/rdd-defect-workflow/SKILL.md +54 -0
- package/skills/release/SKILL.md +3 -3
- package/skills/skill-registry/SKILL.md +1 -1
- package/skills/work-unit-commits/SKILL.md +3 -1
- package/tests/artifact-language.test.ts +24 -11
- package/tests/ask-user-choice.test.ts +264 -0
- package/tests/background-subagents.test.ts +771 -0
- package/tests/codegraph-tools.test.ts +3 -3
- package/tests/crosslane/cross-lane.mjs +16 -0
- package/tests/delegated-key-learnings-contract.test.ts +240 -0
- package/tests/devbinary/native-review-parity.devtest.ts +167 -250
- package/tests/devbinary/pi-host-relay.devtest.ts +867 -0
- package/tests/fixtures/devbinary/capabilities-v2.1.derived.json +331 -0
- package/tests/fixtures/devbinary/capabilities-v2.2.captured.json +340 -0
- package/tests/fixtures/devbinary/consent-v3.captured.json +37 -0
- package/tests/fixtures/devbinary/failure-v2-capture-evidence.captured.json +16 -0
- package/tests/fixtures/devbinary/last-event-capture-correction-plan.captured.json +10 -0
- package/tests/fixtures/devbinary/last-event-capture-refuter-approved.captured.json +20 -0
- package/tests/fixtures/devbinary/last-event-capture-refuter-correction-required.captured.json +26 -0
- package/tests/fixtures/devbinary/last-event-capture-result-approved.captured.json +8 -0
- package/tests/fixtures/devbinary/last-event-capture-result-correction-required.captured.json +26 -0
- package/tests/fixtures/devbinary/last-event-capture-validation-approved.captured.json +8 -0
- package/tests/fixtures/devbinary/last-event-closure.provenance.md +13 -0
- package/tests/fixtures/devbinary/result-artifact-v2-path.captured.json +12 -0
- package/tests/fixtures/devbinary/result-artifact-v2.captured.json +12 -0
- package/tests/fixtures/devbinary/review-acknowledged-v1.captured.json +9 -0
- package/tests/fixtures/devbinary/review-acknowledged.provenance.md +31 -0
- package/tests/fixtures/devbinary/start-v3-consent-declined.captured.json +19 -0
- package/tests/fixtures/devbinary/start-v3-consent-granted.captured.json +109 -0
- package/tests/fixtures/devbinary/start-v3-zero-lens-closed.captured.json +21 -0
- package/tests/fixtures/devbinary/status-v5-capture-result-submission.captured.json +184 -0
- package/tests/fixtures/devbinary/status-v5-repository-context.captured.json +138 -0
- package/tests/fixtures/devbinary/status-v5.captured.json +88 -0
- package/tests/fixtures/native-review-cli/v2.5.0-rc.1/PROVENANCE.txt +15 -0
- package/tests/fixtures/provider-contract-bundle/v1.1.0/README.md +12 -0
- package/tests/fixtures/provider-contract-bundle/v1.1.0/manifest.json +65 -0
- package/tests/fixtures/provider-contract-bundle/v1.1.0/schemas/lens.schema.json +16 -0
- package/tests/fixtures/provider-contract-bundle/v1.1.0/schemas/refuter.schema.json +1 -0
- package/tests/fixtures/provider-contract-bundle/v1.1.0/schemas/targeted-validator.schema.json +1 -0
- package/tests/fixtures/provider-contract-bundle/v1.1.0/vectors/lens.json +1 -0
- package/tests/fixtures/provider-contract-bundle/v1.1.0/vectors/refuter.json +1 -0
- package/tests/fixtures/provider-contract-bundle/v1.1.0/vectors/targeted-validator.json +1 -0
- package/tests/gentle-ai-binary.test.ts +83 -13
- package/tests/gentle-ai-dev-binary-surfacing.test.ts +195 -0
- package/tests/gentle-ai-dev-binary.test.ts +159 -0
- package/tests/gentle-ai-installer.test.ts +138 -48
- package/tests/gentle-ai.test.ts +820 -131
- package/tests/gentle-theme.test.ts +133 -0
- package/tests/maintainer/provider-relay.maintest.ts +601 -0
- package/tests/model-routing-authority.test.ts +257 -0
- package/tests/native-review-capability-contract.test.ts +75 -2
- package/tests/native-review-cli.test.ts +588 -908
- package/tests/native-review-consent.test.ts +283 -38
- package/tests/native-review-parity-runtime.test.ts +108 -350
- package/tests/native-review-parity.test.ts +684 -732
- package/tests/native-sdd-attempt-authority.test.ts +235 -0
- package/tests/opaque-pi-reviewer-adapter.test.ts +266 -0
- package/tests/orchestrator-budget.test.ts +158 -89
- package/tests/orchestrator-rdd-ownership.test.ts +103 -0
- package/tests/package-manifest.test.ts +128 -100
- package/tests/provider-contract-bundle.test.ts +385 -0
- package/tests/provider-contract-mirror.test.ts +206 -0
- package/tests/provider-defect-handoff.test.ts +252 -0
- package/tests/quiet-tool-rendering.test.ts +1055 -28
- package/tests/review-actor-tool-deny.test.ts +12 -13
- package/tests/review-authority-recovery-docs.test.ts +1 -2
- package/tests/review-candidate-view.test.ts +898 -12
- package/tests/review-compact-contract.test.ts +29 -122
- package/tests/review-controller-lock-status.test.ts +2 -2
- package/tests/review-controller-native-recovery.test.ts +366 -857
- package/tests/review-controller-native-routing.test.ts +1253 -4199
- package/tests/review-controller-retired-ops.test.ts +1 -1
- package/tests/review-controller-workspace-root.test.ts +236 -70
- package/tests/review-controller.test.ts +26 -816
- package/tests/review-corrected-finalize-binding.test.ts +134 -0
- package/tests/review-dispatch-hydration-gap.test.ts +145 -0
- package/tests/review-gate.test.ts +0 -45
- package/tests/review-host-relay-restart-parity.test.ts +360 -0
- package/tests/review-host-relay-routing.test.ts +352 -0
- package/tests/review-host-relay.test.ts +754 -0
- package/tests/review-integration-v2-forward.test.ts +654 -0
- package/tests/review-integration-v2.test.ts +317 -129
- package/tests/review-last-event-closure.test.ts +408 -0
- package/tests/review-ledger-contract.test.ts +106 -60
- package/tests/review-recovered-lineage-routing.test.ts +199 -0
- package/tests/review-relay-transport-agent.test.ts +322 -0
- package/tests/review-snapshot.test.ts +3 -2
- package/tests/runtime-harness.mjs +573 -180
- package/tests/sdd-agent-tools.test.ts +53 -32
- package/tests/sdd-preflight.test.ts +81 -15
- package/tests/sdd-status.test.ts +109 -110
- package/tests/skill-collision-prefixes.test.ts +6 -8
- package/tests/skill-registry.test.ts +50 -1
- package/tests/verify-package-files.test.ts +62 -0
- package/tests/writer-edit-surface-scope.test.ts +230 -0
- package/themes/Gentleman-Cute.json +94 -0
- package/themes/Gentleman-Sexy.json +92 -0
- package/assets/agents/review-refuter.md +0 -40
- package/assets/agents/review-validator.md +0 -23
- package/lib/git-commit-transaction.ts +0 -801
- package/lib/native-review-remediation.ts +0 -49
- package/lib/review-compact.ts +0 -947
- package/lib/review-refuter-adapter.ts +0 -129
- package/lib/review-runtime-contract.ts +0 -68
- package/prompts/gcl.md +0 -54
- package/prompts/gis.md +0 -25
- package/prompts/gpr.md +0 -41
- package/prompts/gwr.md +0 -31
- package/runtime/git-commit-transaction.mjs +0 -802
- package/scripts/run-git-commit-transaction.mjs +0 -35
- package/tests/fixtures/native-review-cli/v2.1.2/bind-sdd.json +0 -25
- package/tests/fixtures/native-review-cli/v2.1.2/finalize.json +0 -8
- package/tests/fixtures/native-review-cli/v2.1.2/sdd-status-engram.json +0 -139
- package/tests/fixtures/native-review-cli/v2.1.2/sdd-status.json +0 -200
- package/tests/fixtures/native-review-cli/v2.1.2/start.json +0 -12
- package/tests/fixtures/native-review-cli/v2.1.2/validate-allow.json +0 -24
- package/tests/fixtures/native-review-cli/v2.1.2/validate-deny-empty-context.json +0 -20
- package/tests/fixtures/native-review-cli/v2.1.2/validate-deny.json +0 -28
- package/tests/fixtures/native-review-cli/v2.1.3/sdd-status-engram.json +0 -139
- package/tests/fixtures/native-review-cli/v2.1.3/sdd-status.json +0 -200
- package/tests/git-commit-transaction.test.ts +0 -302
- package/tests/review-compact.test.ts +0 -243
- package/tests/review-refuter-adapter.test.ts +0 -89
|
@@ -12,6 +12,17 @@ const requiredPaths = [
|
|
|
12
12
|
"assets/orchestrator-delegation.md",
|
|
13
13
|
"assets/orchestrator-memory.md",
|
|
14
14
|
"assets/orchestrator-skills.md",
|
|
15
|
+
"assets/sdd-orchestrator-workflow.md",
|
|
16
|
+
"assets/agents/gentle-ai-explore.md",
|
|
17
|
+
"assets/agents/gentle-ai-verify.md",
|
|
18
|
+
"assets/agents/gentle-ai-worker.md",
|
|
19
|
+
"assets/agents/jd-fix-agent.md",
|
|
20
|
+
"assets/agents/jd-judge-a.md",
|
|
21
|
+
"assets/agents/jd-judge-b.md",
|
|
22
|
+
"assets/agents/review-readability.md",
|
|
23
|
+
"assets/agents/review-reliability.md",
|
|
24
|
+
"assets/agents/review-resilience.md",
|
|
25
|
+
"assets/agents/review-risk.md",
|
|
15
26
|
"assets/agents/sdd-apply.md",
|
|
16
27
|
"assets/agents/sdd-archive.md",
|
|
17
28
|
"assets/agents/sdd-design.md",
|
|
@@ -19,13 +30,13 @@ const requiredPaths = [
|
|
|
19
30
|
"assets/agents/sdd-init.md",
|
|
20
31
|
"assets/agents/sdd-onboard.md",
|
|
21
32
|
"assets/agents/sdd-proposal.md",
|
|
33
|
+
"assets/agents/sdd-research.md",
|
|
22
34
|
"assets/agents/sdd-spec.md",
|
|
23
35
|
"assets/agents/sdd-status.md",
|
|
24
36
|
"assets/agents/sdd-sync.md",
|
|
25
37
|
"assets/agents/sdd-tasks.md",
|
|
26
38
|
"assets/agents/sdd-verify.md",
|
|
27
|
-
"assets/
|
|
28
|
-
"assets/agents/review-validator.md",
|
|
39
|
+
"assets/chains/4r-review.chain.md",
|
|
29
40
|
"assets/chains/sdd-full.chain.md",
|
|
30
41
|
"assets/chains/sdd-plan.chain.md",
|
|
31
42
|
"assets/chains/sdd-verify.chain.md",
|
|
@@ -35,30 +46,50 @@ const requiredPaths = [
|
|
|
35
46
|
"assets/support/sdd-status-contract.md",
|
|
36
47
|
"assets/support/strict-tdd.md",
|
|
37
48
|
"assets/support/strict-tdd-verify.md",
|
|
49
|
+
"docs/native-authority-architecture.md",
|
|
38
50
|
"docs/skill-style-guide.md",
|
|
39
51
|
"docs/review-integration.md",
|
|
40
52
|
"extensions/gentle-ai.ts",
|
|
41
53
|
"extensions/sdd-init.ts",
|
|
42
54
|
"extensions/skill-registry.ts",
|
|
43
55
|
"lib/gentle-ai-binary.ts",
|
|
44
|
-
"lib/git-commit-transaction.ts",
|
|
45
56
|
"lib/native-review-cli.ts",
|
|
57
|
+
"lib/provider-contract-bundle.ts",
|
|
58
|
+
"lib/review-host-relay.ts",
|
|
46
59
|
"lib/review-integration-v2.ts",
|
|
60
|
+
"lib/review-relay-contract.ts",
|
|
47
61
|
"lib/sdd-preflight.ts",
|
|
48
62
|
"runtime/gentle-ai-binary.mjs",
|
|
49
|
-
"runtime/git-commit-transaction.mjs",
|
|
50
63
|
"runtime/native-review-cli.mjs",
|
|
51
64
|
"runtime/review-integration-v2.mjs",
|
|
52
|
-
"
|
|
65
|
+
"runtime/review-relay-contract.mjs",
|
|
66
|
+
"scripts/check-provider-contract.mjs",
|
|
53
67
|
"scripts/gentle-ai-installer.mjs",
|
|
54
68
|
"scripts/install-gentle-ai.mjs",
|
|
55
|
-
"scripts/
|
|
56
|
-
"scripts/test-packed-runner.mjs",
|
|
69
|
+
"scripts/mirror-provider-contract.mjs",
|
|
57
70
|
"tests/fixtures/native-review-cli/v2.1.3/start.json",
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
71
|
+
"tests/fixtures/provider-contract-bundle/v1.1.0/README.md",
|
|
72
|
+
"tests/fixtures/provider-contract-bundle/v1.1.0/manifest.json",
|
|
73
|
+
"tests/fixtures/provider-contract-bundle/v1.1.0/schemas/lens.schema.json",
|
|
74
|
+
"tests/fixtures/provider-contract-bundle/v1.1.0/schemas/refuter.schema.json",
|
|
75
|
+
"tests/fixtures/provider-contract-bundle/v1.1.0/schemas/targeted-validator.schema.json",
|
|
76
|
+
"tests/fixtures/provider-contract-bundle/v1.1.0/vectors/lens.json",
|
|
77
|
+
"tests/fixtures/provider-contract-bundle/v1.1.0/vectors/refuter.json",
|
|
78
|
+
"tests/fixtures/provider-contract-bundle/v1.1.0/vectors/targeted-validator.json",
|
|
79
|
+
// Provider contract mirror (gentle-pi#311 P1/P2). Presence is enforced here;
|
|
80
|
+
// exact bytes are pinned by the lock-driven scripts/check-provider-contract.mjs
|
|
81
|
+
// drift check, which runs in the same pnpm test flow.
|
|
82
|
+
"contracts/review-provider-contract-mirror/provider-contract.lock.json",
|
|
83
|
+
"contracts/review-provider-contract-mirror/v1.1.0/bundle/README.md",
|
|
84
|
+
"contracts/review-provider-contract-mirror/v1.1.0/bundle/manifest.json",
|
|
85
|
+
"contracts/review-provider-contract-mirror/v1.1.0/bundle/schemas/lens.schema.json",
|
|
86
|
+
"contracts/review-provider-contract-mirror/v1.1.0/bundle/schemas/refuter.schema.json",
|
|
87
|
+
"contracts/review-provider-contract-mirror/v1.1.0/bundle/schemas/targeted-validator.schema.json",
|
|
88
|
+
"contracts/review-provider-contract-mirror/v1.1.0/bundle/vectors/lens.json",
|
|
89
|
+
"contracts/review-provider-contract-mirror/v1.1.0/bundle/vectors/refuter.json",
|
|
90
|
+
"contracts/review-provider-contract-mirror/v1.1.0/bundle/vectors/targeted-validator.json",
|
|
91
|
+
"contracts/review-provider-contract-mirror/v1.1.0/generated/provider-capabilities.baseline.json",
|
|
92
|
+
"contracts/review-provider-contract-mirror/v1.1.0/generated/provider-roles.baseline.json",
|
|
62
93
|
"prompts/skill-creation.md",
|
|
63
94
|
"skills/_shared/review-ledger-contract.md",
|
|
64
95
|
"skills/branch-pr/SKILL.md",
|
|
@@ -68,6 +99,7 @@ const requiredPaths = [
|
|
|
68
99
|
"skills/gentle-ai/SKILL.md",
|
|
69
100
|
"skills/issue-creation/SKILL.md",
|
|
70
101
|
"skills/judgment-day/SKILL.md",
|
|
102
|
+
"skills/rdd-defect-workflow/SKILL.md",
|
|
71
103
|
"skills/release/SKILL.md",
|
|
72
104
|
"skills/skill-creator/SKILL.md",
|
|
73
105
|
"skills/skill-improver/SKILL.md",
|
|
@@ -83,13 +115,13 @@ const contractHashes = {
|
|
|
83
115
|
"contracts/review-integration/v1/fixtures/capabilities-v1.4.fixture.json": "84e0db457b76b97b35c2be772dfc647f9eab66810ea98f64fed85645c3c266ba",
|
|
84
116
|
"contracts/review-integration/v1/fixtures/capabilities-v1.5.fixture.json": "0cc952af3767c393bde9e4785e4071615a529fd672bc94da4fcc204780524a27",
|
|
85
117
|
"contracts/review-integration/v1/fixtures/capabilities.fixture.json": "b3ca822189a236f2d891628c665ca23e308bf5185a1701e1f07231bd970461bb",
|
|
86
|
-
"contracts/review-integration/v1/fixtures/consent.fixture.json": "
|
|
118
|
+
"contracts/review-integration/v1/fixtures/consent.fixture.json": "28c7c86b55f8c9dbae3a1baa8fe298c4f3a14664aba21cd4051c7f579a61a4e9",
|
|
87
119
|
"contracts/review-integration/v1/fixtures/failure.fixture.json": "e72b6ab5e3c529abac47bd324444f84ca90f67ef0a67189f5fd8d24d199a2759",
|
|
88
120
|
"contracts/review-integration/v1/fixtures/final-verification-incident.fixture.json": "f8bc06549e62b0bee5cf2ecde625e18da178dd18c9d3023b7d7e8fd0ebbba646",
|
|
89
121
|
"contracts/review-integration/v1/fixtures/operation.fixture.json": "3547748a4df57382178064abbdb1cf12f1d58a75c0e9d6452fdd9beb3aaeac3a",
|
|
90
122
|
"contracts/review-integration/v1/fixtures/repair-preflight.fixture.json": "7168cb53ad470066d0b3edc3b7911d1aebff91abd41ecc3d822f8ffa5cea6cb1",
|
|
91
|
-
"contracts/review-integration/v1/fixtures/start-v2.fixture.json": "
|
|
92
|
-
"contracts/review-integration/v1/fixtures/start.fixture.json": "
|
|
123
|
+
"contracts/review-integration/v1/fixtures/start-v2.fixture.json": "2699660832c0d944184d5d314f08774ab9a02f5b8a7a4c2a07983440e0e346ad",
|
|
124
|
+
"contracts/review-integration/v1/fixtures/start.fixture.json": "3b963b221cd1560eb8872cbabbb5407096f593ced2f13eb9cb06eb61e4cca4d1",
|
|
93
125
|
"contracts/review-integration/v1/fixtures/status-ambiguous.fixture.json": "ee695fd58ba72adfb3b51dfd16432a177498173a45bfcb594d6bdc53bfa32e6e",
|
|
94
126
|
"contracts/review-integration/v1/fixtures/status-corrupted.fixture.json": "4cfc0048c28a39cec8a32fecfaad66e56e5c1248263ceb4ce66b6717981880b2",
|
|
95
127
|
"contracts/review-integration/v1/fixtures/status-recover.fixture.json": "714f762f72380ce93d567626cafbaa536ab3aae02af73d3d40ca123f1f30d8b0",
|
|
@@ -100,7 +132,7 @@ const contractHashes = {
|
|
|
100
132
|
"contracts/review-integration/v1/fixtures/status-v2-recover.fixture.json": "178331fc7177d2316fd4f56610ac295f7da2780be96b233b72935d5f476610f2",
|
|
101
133
|
"contracts/review-integration/v1/fixtures/status-v2-repair.fixture.json": "89083cad752fca38da09e919825d0b80641a8a029364ba1869e5b58ef2e59a1d",
|
|
102
134
|
"contracts/review-integration/v1/fixtures/status-v2-unrelated.fixture.json": "c178b338dcd5d30888acef37a9d752bd0932d6dedfffb61b0596a9cceabeb692",
|
|
103
|
-
"contracts/review-integration/v1/fixtures/status-v2.fixture.json": "
|
|
135
|
+
"contracts/review-integration/v1/fixtures/status-v2.fixture.json": "33c5032dcd5d916b4bff73781495640da83893b2f2b334465cbb40c18e1b85f4",
|
|
104
136
|
"contracts/review-integration/v1/fixtures/status.fixture.json": "555054d8046a896162995dcb117752f9cd1ef903fb9ebaad29af1b7e7f319bb3",
|
|
105
137
|
"contracts/review-integration/v1/fixtures/verification-evidence.fixture.json": "b30e3863548845b90e256d92193435d02da458bf8f15a4c33d023cd1f6894a5f",
|
|
106
138
|
"contracts/review-integration/v1/schemas/admitted-result.schema.json": "7796e8dbba331434594108c902dfab7ec46f691fa447a9259a78f2448111b0de",
|
|
@@ -113,33 +145,37 @@ const contractHashes = {
|
|
|
113
145
|
"contracts/review-integration/v1/schemas/capabilities-v1.5.schema.json": "abc783821524dcc33339495284805a85f79b3352efb7358c95016ed164bd7f24",
|
|
114
146
|
"contracts/review-integration/v1/schemas/capabilities.schema.json": "ad333177494a251beac153f74bd751fa77126a9968aad69e64fc2abf15cff0f7",
|
|
115
147
|
"contracts/review-integration/v1/schemas/consent.schema.json": "f8f2edec17568124488482c2aee399909111fe0cce2cba426fb29efd2c7c1cd0",
|
|
148
|
+
"contracts/review-integration/v1/schemas/correction-plan-request.schema.json": "77bf357afc9bee288d64ce64e87b4e13347b1d0ed5e824a9cea6dc0621b40ed1",
|
|
116
149
|
"contracts/review-integration/v1/schemas/failure.schema.json": "0ce29f61408fc21d72640fffdb215a608a820c29f3e5ff62d9cc295ed0451937",
|
|
117
150
|
"contracts/review-integration/v1/schemas/final-verification-incident.schema.json": "39b1ec178b1d3bc8da9a3d92dadd8092385000f2a6930b5bfcb4a84dbc6493ca",
|
|
118
|
-
"contracts/review-integration/v1/schemas/operation.schema.json": "
|
|
151
|
+
"contracts/review-integration/v1/schemas/operation.schema.json": "495d66c6cdb6b2b634bc580b80125073d802226186db9f000456e111315ac0da",
|
|
119
152
|
"contracts/review-integration/v1/schemas/projection.schema.json": "7168a3eba929dde2b8f0b7723ee51d5a5421102bdeefe892578c263debd08db2",
|
|
120
|
-
"contracts/review-integration/v1/schemas/repair.schema.json": "
|
|
153
|
+
"contracts/review-integration/v1/schemas/repair.schema.json": "2939a9f6e68e5b6964db541d7b1a75054113c75a6f836a158ce0f37e1c4ebe32",
|
|
121
154
|
"contracts/review-integration/v1/schemas/result-artifact-v2.schema.json": "38895aae2f6ca4980b1a8e157fee8503920820d5f6be3c757c0fa04e8430cd6b",
|
|
122
155
|
"contracts/review-integration/v1/schemas/result-artifact.schema.json": "91296bd2c261fd2fe03bffd63efe58badd4927e0d0d8480cd4213f651ecacdf6",
|
|
123
156
|
"contracts/review-integration/v1/schemas/start-v2.schema.json": "ec8550cd93bbe84af1ce87dfd7abfa9e24692f42b20f8f0bf9cac1d4b88ea46c",
|
|
124
157
|
"contracts/review-integration/v1/schemas/start.schema.json": "4296aebbd4128ce51945a2f6d3228aa77ac7215c802978d559bff5279ec56229",
|
|
125
|
-
"contracts/review-integration/v1/schemas/status-v2.schema.json": "
|
|
126
|
-
"contracts/review-integration/v1/schemas/status.schema.json": "
|
|
158
|
+
"contracts/review-integration/v1/schemas/status-v2.schema.json": "dd9914b647a1d9edc4ecdcbed4f0c800b39ec290912d5c2a4cc6ba3098d5f21e",
|
|
159
|
+
"contracts/review-integration/v1/schemas/status.schema.json": "250d2c646b8822b38eaefafd2bfdefa1134cc23a00e553a7201f33257573149a",
|
|
127
160
|
"contracts/review-integration/v1/schemas/targeted-validation-request.schema.json": "52b91154693b4dd66983fc91ecf7197503555f2c9e85cac626cffd3035c53d65",
|
|
161
|
+
"contracts/review-integration/v1/schemas/transition-execution.schema.json": "ddee03bd0c1b6e70f21c399bae7fe528aa4ad46cebb5a48ec72b6e6b3694aa2d",
|
|
128
162
|
"contracts/review-integration/v1/schemas/verification-evidence.schema.json": "fd15890bf2ef1db95d771ee7f468e9e64014351d7940f65604eb24f41e68a22f",
|
|
129
163
|
"contracts/review-integration/v2/fixtures/capabilities.fixture.json": "17c150d851c15b3f0c20d18c2e2741eb2232ffa24f35aa71d6d30e90a85e42b7",
|
|
130
|
-
"contracts/review-integration/v2/fixtures/consent.fixture.json": "
|
|
131
|
-
"contracts/review-integration/v2/fixtures/start.fixture.json": "
|
|
132
|
-
"contracts/review-integration/v2/fixtures/status.fixture.json": "
|
|
164
|
+
"contracts/review-integration/v2/fixtures/consent.fixture.json": "203cc96d5c29ba0f27b5c4db04c2e88566e0a923d3a0cdb317f78d9065349075",
|
|
165
|
+
"contracts/review-integration/v2/fixtures/start.fixture.json": "bd82bfb386c01809d8f1c5cb3a4b3b540f7cb23a55209505680daeb43b4e8642",
|
|
166
|
+
"contracts/review-integration/v2/fixtures/status.fixture.json": "4cd77906bacdca35d8f99773de147211d2b05fe34dd1b999011ead09e84be7a5",
|
|
133
167
|
"contracts/review-integration/v2/schemas/admitted-result.schema.json": "c6a9c880191d65c46d9cfc8a0812af16b636573a8f6e57ea34aa16d6f6bb9735",
|
|
134
168
|
"contracts/review-integration/v2/schemas/artifact-subject.schema.json": "3e71a81340ea6149b03afa71530d10ce654c415fa21d4e07f0c9c25b3d2d70a3",
|
|
135
169
|
"contracts/review-integration/v2/schemas/capabilities.schema.json": "7ab061ed27bd3b929d6033cc20f56097e851f4454ca14a815255748b50191248",
|
|
136
170
|
"contracts/review-integration/v2/schemas/consent.schema.json": "b2b4465338497f11927de91cb2e5da12b6cb4a1039afe05aebe1abbf53b21858",
|
|
137
|
-
"contracts/review-integration/v2/schemas/failure.schema.json": "
|
|
138
|
-
"contracts/review-integration/v2/schemas/
|
|
139
|
-
"contracts/review-integration/v2/schemas/
|
|
140
|
-
"contracts/review-integration/v2/schemas/
|
|
141
|
-
"contracts/review-integration/v2/schemas/
|
|
142
|
-
"
|
|
171
|
+
"contracts/review-integration/v2/schemas/failure.schema.json": "a56a2f715c3138d6f2cee37257cd6e758a15d4e0b1215745951d85831d148967",
|
|
172
|
+
"contracts/review-integration/v2/schemas/last-event-closure.schema.json": "612531204afa5941e4927c38e868c720a4519fe4b9a5a4ffd29f021dc053001d",
|
|
173
|
+
"contracts/review-integration/v2/schemas/opencode-provider-role.schema.json": "c6b9f216f89c044f8e844b55e7200114850cfbc16642bca0677f30a399d8aa9b",
|
|
174
|
+
"contracts/review-integration/v2/schemas/operation.schema.json": "1c0128a0576064d4338ee0a1945e9d0d0569c1a7a2140217b2539af5d1a9ed1e",
|
|
175
|
+
"contracts/review-integration/v2/schemas/repair.schema.json": "98a85fd45a8ae7f6211ffeeb3f9c478fa1dd1c17f385751f15f2111e6c3ab167",
|
|
176
|
+
"contracts/review-integration/v2/schemas/start.schema.json": "2991e3fcca672d9257d61b6a336fb34e58b15a8e03f8a09a7adf892cae6a8085",
|
|
177
|
+
"contracts/review-integration/v2/schemas/status.schema.json": "c4dcc736cfc6300560a3c4262d2d982368529d5c49d58d499552a3b0beef9212",
|
|
178
|
+
"docs/review-integration.md": "0a2a415e8bd24be61f5c6090bd0efccde0ed1b4561261be11bba197aa081f336",
|
|
143
179
|
};
|
|
144
180
|
|
|
145
181
|
requiredPaths.push(...Object.keys(contractHashes));
|
|
@@ -157,12 +193,19 @@ function listFilesRecursively(directory) {
|
|
|
157
193
|
// byte-pinned contract artifact but lives outside this walk root). Reports
|
|
158
194
|
// the two drift directions separately so a new unlisted file and a stale
|
|
159
195
|
// hash-map entry are both visible.
|
|
196
|
+
//
|
|
197
|
+
// `contracts/review-provider-contract-mirror/**` is deliberately excluded:
|
|
198
|
+
// that subtree has exactly one byte authority — the mirror's own lock record,
|
|
199
|
+
// enforced by scripts/check-provider-contract.mjs in the same pnpm test flow —
|
|
200
|
+
// so listing it here would create a second, drift-prone pin for the same bytes.
|
|
201
|
+
const PROVIDER_CONTRACT_MIRROR_PREFIX = "contracts/review-provider-contract-mirror/";
|
|
202
|
+
|
|
160
203
|
export function reconcileContractsOnDisk(packageRoot, hashes) {
|
|
161
204
|
const contractsRoot = join(packageRoot, "contracts");
|
|
162
205
|
const walked = existsSync(contractsRoot)
|
|
163
|
-
? listFilesRecursively(contractsRoot)
|
|
164
|
-
relative(packageRoot, absolutePath).split(sep).join("/")
|
|
165
|
-
|
|
206
|
+
? listFilesRecursively(contractsRoot)
|
|
207
|
+
.map((absolutePath) => relative(packageRoot, absolutePath).split(sep).join("/"))
|
|
208
|
+
.filter((relativePath) => !relativePath.startsWith(PROVIDER_CONTRACT_MIRROR_PREFIX))
|
|
166
209
|
: [];
|
|
167
210
|
const listed = Object.keys(hashes).filter((relativePath) => relativePath.startsWith("contracts/"));
|
|
168
211
|
const walkedSet = new Set(walked);
|
|
@@ -174,11 +217,36 @@ export function reconcileContractsOnDisk(packageRoot, hashes) {
|
|
|
174
217
|
};
|
|
175
218
|
}
|
|
176
219
|
|
|
220
|
+
// Compares every location that pins the Gentle AI version against the one
|
|
221
|
+
// authoritative constant (scripts/gentle-ai-installer.mjs INSTALLER_VERSION),
|
|
222
|
+
// returning a mismatch message per drifted location instead of a boolean.
|
|
223
|
+
// This replaces a textual `.includes(...)` grep that could not have caught
|
|
224
|
+
// the documented incident (scripts/install-gentle-ai.mjs header comment):
|
|
225
|
+
// two hardcoded version copies drifted apart, and the installer reported
|
|
226
|
+
// installing one version while writing another to disk. A textual grep only
|
|
227
|
+
// verifies a string appears in a file; it cannot verify that two values
|
|
228
|
+
// agree, which is exactly what this function checks instead.
|
|
229
|
+
export function gentleAiVersionPinMismatches({ installerVersion, releaseBaseUrl, windowsSourceTag, libGentleAiVersion }) {
|
|
230
|
+
const mismatches = [];
|
|
231
|
+
if (libGentleAiVersion !== installerVersion) {
|
|
232
|
+
mismatches.push(
|
|
233
|
+
`lib/gentle-ai-binary.ts GENTLE_AI_VERSION ("${libGentleAiVersion}") does not match the authoritative scripts/gentle-ai-installer.mjs INSTALLER_VERSION ("${installerVersion}")`,
|
|
234
|
+
);
|
|
235
|
+
}
|
|
236
|
+
if (!releaseBaseUrl.includes(`/v${installerVersion}/`)) {
|
|
237
|
+
mismatches.push(`RELEASE_BASE_URL ("${releaseBaseUrl}") does not pin the authoritative v${installerVersion}`);
|
|
238
|
+
}
|
|
239
|
+
if (windowsSourceTag !== `v${installerVersion}`) {
|
|
240
|
+
mismatches.push(`GENTLE_AI_WINDOWS_SOURCE_TAG ("${windowsSourceTag}") does not match the authoritative v${installerVersion}`);
|
|
241
|
+
}
|
|
242
|
+
return mismatches;
|
|
243
|
+
}
|
|
244
|
+
|
|
177
245
|
// Reads the generator's `sources` array by regex rather than importing it,
|
|
178
246
|
// so this script never needs the generator to export anything it doesn't
|
|
179
247
|
// already export for its own `--write`/`--check` CLI use.
|
|
180
248
|
export function extractGeneratedRuntimeSources(packageRoot) {
|
|
181
|
-
const generatorPath = join(packageRoot, "scripts/build-
|
|
249
|
+
const generatorPath = join(packageRoot, "scripts/build-runtime-modules.mjs");
|
|
182
250
|
const generatorSource = readFileSync(generatorPath, "utf8");
|
|
183
251
|
const sourcesMatch = generatorSource.match(/const sources = \[([\s\S]*?)\];/);
|
|
184
252
|
if (!sourcesMatch) {
|
|
@@ -247,7 +315,7 @@ async function main() {
|
|
|
247
315
|
const generatedRuntimeSources = extractGeneratedRuntimeSources(root);
|
|
248
316
|
const { drifted } = reconcileGeneratedRuntimeSources(root, generatedRuntimeSources, requiredPaths);
|
|
249
317
|
if (drifted.length > 0) {
|
|
250
|
-
console.error("gentle-pi generated
|
|
318
|
+
console.error("gentle-pi generated runtime sources, runtime/*.mjs, and requiredPaths have drifted apart:");
|
|
251
319
|
for (const entry of drifted) {
|
|
252
320
|
const where = [];
|
|
253
321
|
if (!entry.inSources) where.push("missing from generator sources");
|
|
@@ -265,14 +333,16 @@ async function main() {
|
|
|
265
333
|
});
|
|
266
334
|
|
|
267
335
|
if (driftedContracts.length > 0) {
|
|
268
|
-
console.error("gentle-pi packaged review-integration/v1 and review-integration/v2 contract bytes drifted from the
|
|
336
|
+
console.error("gentle-pi packaged review-integration/v1 and review-integration/v2 contract bytes drifted from the pinned v2.5.0 runtime's vendored Gentle AI contract artifacts:");
|
|
269
337
|
for (const drift of driftedContracts) console.error(`- ${drift.relativePath}: expected ${drift.expected}, got ${drift.actual}`);
|
|
270
338
|
process.exit(1);
|
|
271
339
|
}
|
|
272
340
|
|
|
273
341
|
// Release guard: refuse to pack/publish while any installer digest is not a real
|
|
274
342
|
// pinned SHA-256 (for example the pre-release pending sentinel).
|
|
275
|
-
const { GENTLE_AI_RELEASE_ASSETS } = await import(
|
|
343
|
+
const { GENTLE_AI_RELEASE_ASSETS, INSTALLER_VERSION, RELEASE_BASE_URL, GENTLE_AI_WINDOWS_SOURCE_TAG } = await import(
|
|
344
|
+
new URL("./gentle-ai-installer.mjs", import.meta.url)
|
|
345
|
+
);
|
|
276
346
|
const unpinnedDigests = Object.entries(GENTLE_AI_RELEASE_ASSETS).flatMap(([target, asset]) =>
|
|
277
347
|
[["sha256", asset.sha256], ["binarySha256", asset.binarySha256]]
|
|
278
348
|
.filter(([, digest]) => !/^[0-9a-f]{64}$/.test(digest))
|
|
@@ -280,29 +350,35 @@ async function main() {
|
|
|
280
350
|
if (unpinnedDigests.length > 0) {
|
|
281
351
|
console.error("gentle-pi Gentle AI release digests are not pinned SHA-256 values:");
|
|
282
352
|
for (const entry of unpinnedDigests) console.error(`- ${entry}`);
|
|
283
|
-
console.error("Refusing to pack/publish until scripts/gentle-ai-installer.mjs pins the published checksums.txt
|
|
353
|
+
console.error("Refusing to pack/publish until scripts/gentle-ai-installer.mjs pins the published release digests (checksums.txt archives for a stable, SHA256SUMS.txt raw binaries for a prerelease).");
|
|
284
354
|
process.exit(1);
|
|
285
355
|
}
|
|
286
356
|
|
|
287
|
-
const generatedRuntimeCheck = spawnSync(process.execPath, [join(root, "scripts/build-
|
|
357
|
+
const generatedRuntimeCheck = spawnSync(process.execPath, [join(root, "scripts/build-runtime-modules.mjs"), "--check"], {
|
|
288
358
|
cwd: root,
|
|
289
359
|
encoding: "utf8",
|
|
290
360
|
env: { ...process.env, NODE_NO_WARNINGS: "1" },
|
|
291
361
|
});
|
|
292
362
|
if (generatedRuntimeCheck.status !== 0) {
|
|
293
|
-
console.error("gentle-pi generated
|
|
363
|
+
console.error("gentle-pi generated runtime does not match its TypeScript sources:");
|
|
294
364
|
console.error((generatedRuntimeCheck.stderr || generatedRuntimeCheck.stdout || "unknown generator failure").trim());
|
|
295
365
|
process.exit(1);
|
|
296
366
|
}
|
|
297
367
|
|
|
298
|
-
const
|
|
299
|
-
const
|
|
300
|
-
|
|
301
|
-
|
|
368
|
+
const { GENTLE_AI_VERSION } = await import(new URL("../lib/gentle-ai-binary.ts", import.meta.url));
|
|
369
|
+
const versionMismatches = gentleAiVersionPinMismatches({
|
|
370
|
+
installerVersion: INSTALLER_VERSION,
|
|
371
|
+
releaseBaseUrl: RELEASE_BASE_URL,
|
|
372
|
+
windowsSourceTag: GENTLE_AI_WINDOWS_SOURCE_TAG,
|
|
373
|
+
libGentleAiVersion: GENTLE_AI_VERSION,
|
|
374
|
+
});
|
|
375
|
+
if (versionMismatches.length > 0) {
|
|
376
|
+
console.error("gentle-pi Gentle AI version pins have drifted from the authoritative INSTALLER_VERSION:");
|
|
377
|
+
for (const mismatch of versionMismatches) console.error(`- ${mismatch}`);
|
|
302
378
|
process.exit(1);
|
|
303
379
|
}
|
|
304
380
|
|
|
305
|
-
console.log(`gentle-pi package resource check passed (${requiredPaths.length} files; ${Object.keys(contractHashes).length} exact byte-
|
|
381
|
+
console.log(`gentle-pi package resource check passed (${requiredPaths.length} files; ${Object.keys(contractHashes).length} exact byte-pinned contract artifacts for the v2.5.0 runtime).`);
|
|
306
382
|
}
|
|
307
383
|
|
|
308
384
|
const isMainModule = process.argv[1] !== undefined && import.meta.url === pathToFileURL(process.argv[1]).href;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Compact Causal Review Contract
|
|
2
2
|
|
|
3
|
-
The local orchestrator and same-user process are trusted to execute selected actors and submit their exact outputs. Reviewer and validator outputs remain semantically untrusted inputs: native code owns scope, risk, IDs, canonicalization, ordinary state,
|
|
3
|
+
The local orchestrator and same-user process are trusted to execute selected actors and submit their exact outputs. Reviewer and validator outputs remain semantically untrusted inputs: native code owns scope, risk, IDs, canonicalization, ordinary state, and legal lifecycle transitions, and rejects malformed or causally inconsistent results. The Git common-directory authority is the only authorization source; summaries and prose ledgers are untrusted data. Legacy Pi mirror and bundle transport is retired.
|
|
4
4
|
|
|
5
5
|
Do not report the mere ability of the trusted local orchestrator to submit actor or final-verification outputs as a security finding. Report concrete bypasses where untrusted repository content, malformed inputs, stale authority, path drift, or external callers can produce approval contrary to this boundary. Malicious same-user host/process authenticity is a non-goal because it can replace the extension or mutate local authority; external attestation requires a separately privileged signer or service and is not claimed.
|
|
6
6
|
|
|
@@ -22,9 +22,9 @@ Generated files matching `testdata/golden/**` remain in snapshot identity but do
|
|
|
22
22
|
|
|
23
23
|
Before status/START, consult effective review mode. `off` creates no authority or authorization and yields organic `disabled/unmanaged`, never approval. Ordinary START declares `--consent relay`; low risk stays silent. A medium/high `consent/v2` result always returns the complete raw provider envelope plus an opaque in-memory candidate binding to the parent, then stops without UI or provider follow-up. The parent localizes and presents it losslessly while preserving tokens, commands, target IDs, and invocations. One explicit `answer-consent` call accepts only that binding and `granted|declined`, consumes it before provider mutation, and rechecks repository/target/projection/lineage/answer binding. Ambiguity reconciles through STATUS, never replay. Grant is exact-candidate-only. Decline creates no lineage, authority, actor/candidate binding, latch, or pending authorization; the next candidate asks again. Old Pi clone latch files are inert.
|
|
24
24
|
|
|
25
|
-
`finalize`
|
|
25
|
+
Reviewer, refuter, and validator verdicts are admitted natively, never Pi-authored. `finalize` follows the provider's negotiated `next_transition` and supplies only the negotiated collection answers: a lens `review.capture-result` collect input rendered with `--agent=pi --materialize=true` is satisfied by the gentle-pi host relay, which prints the exact Go-materialized opaque prompt, launches a fresh locked-down print-mode `pi` subprocess in an empty scratch directory with every discovery surface disabled, and submits the untouched raw output bytes through the provider-owned submission form. The adversarial roles do not go through that relay: `review.capture-refuter` and `review.capture-validation` collect inputs render as self-contained authority-advancing vectors (binding tokens plus `--agent=pi --execute=true`, no submission descriptor); executing the exact rendered invocation makes Go materialize the role prompt, spawn its own locked-down `pi` process, and admit the raw verdict. Native Go owns validation, canonicalization, missing lens/finding ID assignment, persistence, and hashing, and performs only the legal transition from the current compact state. The five states are `reviewing`, `correction_required`, `validating`, `approved`, and `escalated`.
|
|
26
26
|
|
|
27
|
-
`validate`
|
|
27
|
+
`validate` is informational and runs with zero actors. It never mutates compact authority or controls delivery.
|
|
28
28
|
|
|
29
29
|
## Causal findings
|
|
30
30
|
|
|
@@ -37,13 +37,11 @@ Every finding supplies `evidence_class`, `causal_disposition`, and concrete proo
|
|
|
37
37
|
| `causal_disposition` | `introduced` \| `behavior-activated` \| `worsened` \| `pre-existing` \| `base-only` \| `unknown` |
|
|
38
38
|
| `proof_refs` | Prefixed concrete proof references |
|
|
39
39
|
|
|
40
|
-
Only severe `introduced`, `behavior-activated`, or `worsened` findings with valid proof can enter `correction_ids`. Deterministic candidate-caused blockers need no refuter. All inferential candidate-caused blockers
|
|
41
|
-
|
|
42
|
-
If native IDs are assigned to inferential findings, FINALIZE first returns canonical rows plus a content-derived request hash without mutation; completion requires identical lens input, that hash, and one complete refuter batch.
|
|
40
|
+
Only severe `introduced`, `behavior-activated`, or `worsened` findings with valid proof can enter `correction_ids`. Deterministic candidate-caused blockers need no refuter. All inferential candidate-caused blockers share exactly one complete read-only refuter batch, executed through the provider-rendered self-contained `review.capture-refuter` vector: Go materializes the refuter prompt, runs its own locked-down `pi` process, and admits the raw verdict. Pi never authors, edits, batches, or re-scores a refuter row.
|
|
43
41
|
|
|
44
42
|
Refuter rows may cite independent concrete proof and do not need to repeat reviewer `proof_refs`. `pre-existing` and `base-only` findings become non-blocking follow-ups. `unknown`, insufficient evidence, malformed severe claims, empty/malformed proof, missing/duplicate/extra refuter rows, and inconclusive severe outcomes escalate. `WARNING` and `SUGGESTION` remain informational.
|
|
45
43
|
|
|
46
|
-
Actor output cannot authorize transitions, corrections,
|
|
44
|
+
Actor output cannot authorize transitions, corrections, or delivery.
|
|
47
45
|
|
|
48
46
|
## Correction
|
|
49
47
|
|
|
@@ -53,7 +51,7 @@ Before editing, `finalize` requires a positive correction-line forecast. A forec
|
|
|
53
51
|
|
|
54
52
|
Initial lenses never rerun. The correction preserves frozen findings and genesis scope: the original candidate tree, paths, untracked set, and correction IDs. It cannot add scope.
|
|
55
53
|
|
|
56
|
-
The targeted validator checks only the original criteria and one correction regression for the exact correction IDs. It cannot add findings, request another correction, launch actors, persist authority, or request another attempt. Failure escalates. Later observations are inert follow-ups.
|
|
54
|
+
The targeted validator runs through the provider-rendered self-contained `review.capture-validation` vector — Go materializes its prompt, runs its own locked-down `pi` process, and admits the raw verdict — and checks only the original criteria and one correction regression for the exact correction IDs. It cannot add findings, request another correction, launch actors, persist authority, or request another attempt. Failure escalates. Later observations are inert follow-ups.
|
|
57
55
|
|
|
58
56
|
Final verification evidence is supplied and hashed only during finalization. Failure escalates and never reopens review.
|
|
59
57
|
|
|
@@ -61,21 +59,15 @@ Final verification evidence is supplied and hashed only during finalization. Fai
|
|
|
61
59
|
|
|
62
60
|
The negotiated native provider owns compact-v2 storage and its private paths. Pi consumes only typed START, FINALIZE, target status, validation, recovery, reconciliation, and SDD-binding results. Content-derived revisions, compare-and-swap replacement, exact retry idempotency, stale/semantic retry rejection, semantic validation, terminal immutability, atomic publication, and receipt readback remain provider guarantees.
|
|
63
61
|
|
|
64
|
-
Existing graph-v1 ordinary lineages remain readable
|
|
65
|
-
|
|
66
|
-
Permanent Pi-owned consumer infrastructure is limited to canonical identity primitives, repository/common-directory binding, immutable candidate views, and the publication-gate command projection. These modules are not authority mirrors.
|
|
67
|
-
|
|
68
|
-
## Lifecycle gates
|
|
69
|
-
|
|
70
|
-
Pre-commit, pre-push, pre-PR, and release validate an approved receipt against one exact typed command target with zero actors. Native validation uses `gentle-ai.review-integration/v1`, loads authority and receipt, derives live target/publication evidence, then immediately reloads authority and re-derives target/publication evidence before allow. Authorized direct commit uses the durable hook/native-validation transaction and unresolved recovery blocks publication. The Pi-owned `review-publication-gate` module isolates command projection and publication revalidation from graph-v1 authority storage without changing these guarantees.
|
|
62
|
+
Existing graph-v1 ordinary lineages remain readable for compatibility but reject new mutation. Legacy graph bundle export/import is retired. Judgment Day remains mutable on graph-v1. Pre-graph numbered authority remains destructive-reset-only, while native target status owns mixed-authority ambiguity and the required maintainer action.
|
|
71
63
|
|
|
72
|
-
|
|
64
|
+
Permanent Pi-owned consumer infrastructure is limited to canonical identity primitives, repository/common-directory binding, and immutable candidate views. These modules are not authority mirrors.
|
|
73
65
|
|
|
74
|
-
|
|
66
|
+
## Delivery boundary
|
|
75
67
|
|
|
76
|
-
|
|
68
|
+
Commit, push, pull-request creation, and release creation are not RDD gates. Review outcomes and receipt state are informational and never authorize, consume, rewrite, or block a Bash delivery command; ordinary repository policy owns delivery. Pi does not inspect RDD mode or native authority for those commands.
|
|
77
69
|
|
|
78
|
-
Review transactions, validation, and SDD never
|
|
70
|
+
Dangerous-command confirmation/safety and destructive-review-maintenance consent remain independent. Review transactions, validation, and SDD never perform delivery commands themselves.
|
|
79
71
|
|
|
80
72
|
## Judgment Day
|
|
81
73
|
|
|
@@ -14,6 +14,8 @@ Load this skill when a planned PR may exceed **400 changed lines**, SDD forecast
|
|
|
14
14
|
## Hard Rules
|
|
15
15
|
|
|
16
16
|
- Split PRs over **400 changed lines** unless a maintainer explicitly accepts `size:exception`.
|
|
17
|
+
- The budget constrains how work is **sliced**, never the code itself. Never delete comments, blank lines, docs, or tests, and never compress or restyle code, to fit under the budget.
|
|
18
|
+
- Slicing is bounded: make **one** honest slicing pass. If no cohesive split brings every slice within budget, stop iterating, keep the best cohesive split, and report the final line count with a `size:exception` recommendation.
|
|
17
19
|
- Keep each PR reviewable in about **≤60 minutes**.
|
|
18
20
|
- Use one deliverable work unit per PR; keep tests/docs with the unit they verify.
|
|
19
21
|
- State start, end, prior dependencies, follow-up work, and out-of-scope items in every chained PR.
|
|
@@ -30,6 +32,7 @@ Load this skill when a planned PR may exceed **400 changed lines**, SDD forecast
|
|
|
30
32
|
| PR >400, each slice can land independently | Use Stacked PRs to main. |
|
|
31
33
|
| PR >400, feature must integrate before main | Use Feature Branch Chain with tracker. |
|
|
32
34
|
| Generated/vendor/migration diff cannot split cleanly | Ask maintainer for `size:exception`. |
|
|
35
|
+
| No cohesive split fits the budget after one slicing pass | Stop; deliver the best split, report the overage and why it cannot shrink further, and recommend `size:exception`. |
|
|
33
36
|
| SDD provides `delivery_strategy` | Follow it before apply/PR creation. |
|
|
34
37
|
|
|
35
38
|
## Execution Steps
|
|
@@ -17,11 +17,9 @@ When asked who or what you are, answer as el Gentleman: a Pi-specific coding-age
|
|
|
17
17
|
- Use OpenSpec-style artifacts for proposal, specs, design, tasks, apply progress, verify report, and archive notes.
|
|
18
18
|
- If tests exist, follow strict TDD: RED, GREEN, TRIANGULATE, REFACTOR, and record evidence.
|
|
19
19
|
- Keep one parent session responsible for orchestration; child subagents should receive concrete phase work and must not spawn more subagents.
|
|
20
|
-
- Parent-only delegation triggers apply after complexity appears: 4+ files for understanding, 2+ non-trivial files to write,
|
|
21
|
-
- As parent, prefer `scout`/`context-builder` for context-heavy exploration and one forked `worker` for implementation. Review lenses run only when selected by ordinary transaction start; do not call a generic `reviewer` or add lifecycle review actors.
|
|
20
|
+
- Parent-only delegation triggers apply after complexity appears: 4+ files for understanding, 2+ non-trivial files to write, tooling/worktree incidents, or long sessions with accumulating complexity.
|
|
22
21
|
- Keep writes single-threaded unless the user explicitly approves isolated parallel worktrees.
|
|
23
22
|
- Forecast review workload before large changes; ask before producing oversized or multi-area diffs.
|
|
24
|
-
- Start review routing only inside a bound ordinary transaction; lifecycle commands use approved receipts and exact typed targets instead of ambient-diff advice.
|
|
25
23
|
- Keep dangerous-command safety independent and authoritative.
|
|
26
24
|
- Never claim persistent memory is available because of el Gentleman itself; memory is provided by separate packages/tools when active.
|
|
27
25
|
- For skill-shaped requests, check the registry/filesystem for a more specific skill before generic execution; use it only if it improves the immediate task without adding ceremony.
|
|
@@ -46,87 +44,22 @@ clarify → explore → proposal → spec → design → tasks → apply → ver
|
|
|
46
44
|
For bounded implementation with subagents:
|
|
47
45
|
|
|
48
46
|
```text
|
|
49
|
-
clarify → scout/context-builder when context-heavy → one worker →
|
|
47
|
+
clarify → scout/context-builder when context-heavy → one worker → verify
|
|
50
48
|
```
|
|
51
49
|
|
|
52
50
|
Hard delegation triggers:
|
|
53
51
|
|
|
54
52
|
- **4-file rule**: reading 4+ files to understand means delegate exploration.
|
|
55
|
-
- **Multi-file write rule**: touching 2+ non-trivial files means use one worker
|
|
56
|
-
- **
|
|
57
|
-
- **Incident rule**: after wrong cwd, accidental worktree/repo mutation, merge recovery, confusing test command, or environment workaround, diagnose separately without reopening a closed lineage or resetting its budget.
|
|
53
|
+
- **Multi-file write rule**: touching 2+ non-trivial files means use one worker.
|
|
54
|
+
- **Incident rule**: after wrong cwd, accidental worktree/repo mutation, merge recovery, confusing test command, or environment workaround, diagnose separately.
|
|
58
55
|
- **Long-session rule**: after roughly 20 tool calls, 5 exploratory reads, or 2 non-mechanical edits with no delegation and accumulating complexity, pause and choose a non-review subagent or justify not doing so.
|
|
59
56
|
|
|
60
57
|
## Review Lens Selection
|
|
61
58
|
|
|
62
|
-
|
|
59
|
+
`review-risk`, `review-reliability`, `review-resilience`, and `review-readability` are Gentle AI review-lens vocabulary. This injected skill does not select, invoke, sequence, or retry those lenses; any applicable runtime uses only its dynamically supplied instructions.
|
|
63
60
|
|
|
64
|
-
|
|
65
|
-
| --- | --- |
|
|
66
|
-
| Clear naming, structure, maintainability, small refactors | `review-readability` |
|
|
67
|
-
| Behavior, state, tests, determinism, regressions | `review-reliability` |
|
|
68
|
-
| Shell/process integration, partial failures, recovery, degraded dependencies | `review-resilience` |
|
|
69
|
-
| Security, permissions, data exposure/loss, architecture, dependencies | `review-risk` |
|
|
70
|
-
| Large PR, hot path, or >400 changed lines | Full 4R: `review-risk`, `review-resilience`, `review-readability`, `review-reliability` |
|
|
61
|
+
## Gentle AI RDD Ownership
|
|
71
62
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
## Bounded Review Transaction Contract
|
|
75
|
-
|
|
76
|
-
Call `gentle_review` INSPECT before START. The package-local Gentle AI v2.1.11 executable negotiates `gentle-ai.review-integration/v1`; INSPECT is target-scoped status, not a Pi-built authority inventory. New ordinary review uses native compact-v2 `start -> finalize -> validate`. START receives a JSON-serialized ordinary input; an optional repository-local `policyPath` and an explicit `baseRef` paired with `committedOnly: true` are the only selectors. Native code derives Git scope, untracked paths, lineage, risk tier/reasons, lenses, authored lines, and correction budget. `judgment-day` remains explicit and separate.
|
|
77
|
-
|
|
78
|
-
If INSPECT or START reports `blocked-legacy` or `blocked-mixed`, explain that legacy authority cannot be migrated and request explicit user authorization for the exact destructive-reset challenge. RESET and RECOVER each require fresh operation-bound confirmation through the interactive Pi UI and fail closed headlessly. The UI cannot cryptographically attest the human's identity; its residual trust is the operator controlling that Pi session, while exact challenge binding remains runtime-enforced. Only after authorization, the controller routes RESET and RECOVER_LOCK to the audited native `gentle-ai review reclaim` operation and RECOVER to native `gentle-ai review recover`; supply the exact native inputs (`lineage`/`actor`/`reason`, or the predecessor lineage, expected predecessor revision, successor lineage, disposition, actor, and reason bindings). A `native-input-required` envelope is a request for those exact values — never invent them. After a committed native recovery record, INSPECT before any fresh ordinary START. For `reset-in-progress`, INSPECT still surfaces the durable original `reset_request` for the authorized RECOVER challenge.
|
|
79
|
-
|
|
80
|
-
Published v2.1.11 maintenance is explicit only: `abandon` requires the exact six-line pristine compact binding, `quarantine-legacy` accepts only the malformed freeze-findings diagnostic/disposition with its eight-line binding, and dual reconciliation appends exactly `anomalies=unchanged_target,malformed_recovery_authorization`. `repair-legacy-alias` accepts only lineage, actor, and reason; Pi re-derives its repository, exact revision, diagnostic, and disposition from fresh native inventory before displaying its eight-line binding for fresh UI approval. `review dispose-result` remains unsupported pending design. A `recover` route uses only negotiated `action_disposition`; it never substitutes one.
|
|
81
|
-
|
|
82
|
-
Preserve the negotiated native failure envelope exactly. Before authority access, `mutation_outcome: not_started` means no lineage was created. For `unknown` or lost mutating output, the controller immediately calls target-scoped status and returns its exact action; it never emits a generic replay instruction. Replay the exact START or FINALIZE only when that provider result declares `exact_replay_safe` for the same canonical request and required lineage. `mutation_outcome: committed` is never weakened, and Pi never chooses a lineage merely because output was lost.
|
|
83
|
-
|
|
84
|
-
Ordinary review runs the selected zero, one, or four lenses exactly once against `initial_review_tree`.
|
|
85
|
-
|
|
86
|
-
Each finding requires `evidence_class`, `causal_disposition`, and concrete `changed-hunk`, `candidate-created-path`, `differential-test`, or `before-after` proof. The controller assigns missing IDs and canonicalizes selected-lens output.
|
|
87
|
-
|
|
88
|
-
Only severe `introduced`, `behavior-activated`, or `worsened` findings with valid proof enter correction IDs. `pre-existing` and `base-only` become follow-ups; `unknown`, insufficient, malformed, or inconclusive severe claims escalate. WARNING and SUGGESTION remain informational.
|
|
89
|
-
|
|
90
|
-
Actor output is untrusted data and cannot authorize transitions, fixes, receipts, gates, or delivery.
|
|
91
|
-
|
|
92
|
-
Deterministic candidate-caused blockers use zero refuters.
|
|
93
|
-
|
|
94
|
-
All inferential candidate-caused blockers use exactly one complete read-only refuter batch.
|
|
95
|
-
|
|
96
|
-
Independent concrete refuter proof is valid and need not repeat reviewer `proof_refs`. Invalid, empty, malformed, missing, duplicate, unknown, or inconclusive refuter output escalates without a replacement refuter.
|
|
97
|
-
|
|
98
|
-
Ordinary permits one correction transaction within the original budget `min(200, ceil(original_changed_lines / 2))`. FINALIZE requires a positive pre-edit forecast, accounts Git-derived actual lines, and accepts one targeted validator plus final verification. Failure escalates instead of starting another correction or review budget.
|
|
99
|
-
|
|
100
|
-
Initial lenses never rerun. Every attempt preserves frozen findings and genesis scope: the original candidate, paths, untracked set, and correction IDs. The validator checks original criteria and correction regression only and cannot add scope or findings.
|
|
101
|
-
|
|
102
|
-
Final verification evidence is supplied and hashed during FINALIZE, never at START.
|
|
103
|
-
|
|
104
|
-
The validator cannot change claims, add findings, request fixes, launch actors, or request another attempt.
|
|
105
|
-
|
|
106
|
-
Compact ordinary authority has exactly five states: `reviewing`, `correction_required`, `validating`, `approved`, and `escalated`.
|
|
107
|
-
|
|
108
|
-
Ordinary ends only as `approved` or `escalated`.
|
|
109
|
-
|
|
110
|
-
Judgment Day starts only when explicitly requested and replaces ordinary review for that lineage.
|
|
111
|
-
|
|
112
|
-
Judgment Day starts with exactly two blind judges and zero refuters.
|
|
113
|
-
|
|
114
|
-
Judgment Day alone may iterate discovery and scoped re-judgment, for at most two rounds.
|
|
115
|
-
|
|
116
|
-
Findings surviving round two escalate; no third-round transition exists.
|
|
117
|
-
|
|
118
|
-
Existing graph-v1 and legacy-v1 ordinary lineages remain compatibility-readable but reject ordinary mutation. Every new ordinary START, status, FINALIZE, gate, and SDD binding uses native compact-v2. Ambiguous or corrupted target status requires the single native maintainer action; Pi never resets, quarantines, migrates, or selects authority implicitly. Judgment Day remains explicit and separate.
|
|
119
|
-
|
|
120
|
-
PR #1216 introduced the v2.1.1 `<remote>/<branch>` selector contract that v2.1.2 inherits unchanged.
|
|
121
|
-
|
|
122
|
-
Native gates are read-only and always pass `--contract gentle-ai.review-integration/v1`. Pi registers one exact one-shot command authorization and rederives before and after bash-time native validation. Authorized direct `git commit` is rewritten through the package-owned durable transaction: run the effective pre-commit hook once, derive the post-hook index tree, validate that exact tree natively, preserve remaining hooks through proxies, commit without rerunning pre-commit, then prove `HEAD^{tree}`. An unresolved transaction blocks push, PR, and release; recovery never resets Git content automatically. Native pre-PR binds GitHub CLI repository precedence plus the exact advertised remote head equal to reviewed local `HEAD`. Publication probes remain shell-free, bounded, cancellation-aware, and fail closed on unsupported topology.
|
|
123
|
-
Release from protected `main` may bypass receipt validation only when the tag targets the current immutable `origin/main` SHA, required CI for that exact SHA is successful, the remote head is rechecked before tag push, and no fresh risk evidence exists; otherwise release fails closed through native receipt validation.
|
|
124
|
-
Major and post-incident releases require explicit extraordinary review even when fast-path checks pass.
|
|
63
|
+
Gentle AI dynamically supplies runtime-specific RDD instructions at runtime. Treat them as the sole lifecycle authority. This skill never defines a review route, command sequence, state machine, approval or gate policy, recovery path, or fallback; when no native instruction is available, follow ordinary repository policy without inventing one.
|
|
125
64
|
|
|
126
65
|
Dangerous-command safety remains independent and authoritative.
|
|
127
|
-
|
|
128
|
-
SDD completion adds no review or Judgment Day pass.
|
|
129
|
-
|
|
130
|
-
Review operations, validation, and SDD perform no push, PR creation, release, or publication. Only the separate durable commit runner may create one local commit after exact native authorization and HEAD proof.
|
|
131
|
-
|
|
132
|
-
The package ensures SDD agents and chains are available as global Pi runtime assets. Its isolated package-managed `review-refuter` uses exactly `read`, `grep`, and `find`. Project/user agent definitions are overrides and may shadow package assets; never rewrite or claim their effective permissions. Use `/gentle:install-sdd --force` only for recovery or intentional global refresh.
|