gentle-pi 2.3.0 → 2.4.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 +30 -4
- package/assets/agents/sdd-explore.md +1 -0
- package/assets/orchestrator-delegation.md +2 -1
- package/assets/orchestrator.md +6 -10
- package/contracts/review-provider-contract-mirror/provider-contract.lock.json +8 -7
- package/contracts/review-provider-contract-mirror/{v1.1.0 → v1.2.0}/bundle/README.md +10 -0
- package/contracts/review-provider-contract-mirror/v1.2.0/bundle/manifest.json +74 -0
- package/contracts/review-provider-contract-mirror/v1.2.0/bundle/orchestration/pi.md +53 -0
- package/contracts/review-provider-contract-mirror/v1.2.0/bundle/schemas/targeted-validator.schema.json +1 -0
- package/contracts/review-provider-contract-mirror/{v1.1.0 → v1.2.0}/generated/provider-capabilities.baseline.json +9 -2
- package/contracts/review-provider-contract-mirror/{v1.1.0 → v1.2.0}/generated/provider-roles.baseline.json +2 -2
- package/docs/review-integration.md +1 -1
- package/extensions/gentle-ai.ts +530 -71
- package/lib/agent-home.ts +8 -0
- package/lib/native-review-cli.ts +15 -0
- package/lib/provider-contract-bundle.ts +88 -6
- package/lib/review-host-relay.ts +146 -60
- package/lib/review-integration-v2.ts +34 -5
- package/lib/sdd-preflight.ts +2 -2
- package/package.json +1 -1
- package/runtime/native-review-cli.mjs +15 -0
- package/runtime/review-integration-v2.mjs +34 -5
- package/scripts/gentle-ai-installer.mjs +10 -10
- package/scripts/verify-package-files.mjs +14 -13
- package/skills/_shared/review-ledger-contract.md +6 -0
- package/skills/issue-creation/SKILL.md +53 -93
- package/tests/fixtures/provider-contract-bundle/v1.2.0/README.md +22 -0
- package/{contracts/review-provider-contract-mirror/v1.1.0/bundle → tests/fixtures/provider-contract-bundle/v1.2.0}/manifest.json +11 -2
- package/tests/fixtures/provider-contract-bundle/v1.2.0/orchestration/pi.md +97 -0
- package/tests/fixtures/provider-contract-bundle/v1.2.0/schemas/lens.schema.json +16 -0
- package/tests/fixtures/provider-contract-bundle/v1.2.0/schemas/refuter.schema.json +1 -0
- package/tests/fixtures/provider-contract-bundle/v1.2.0/vectors/lens.json +1 -0
- package/tests/fixtures/provider-contract-bundle/v1.2.0/vectors/refuter.json +1 -0
- package/tests/fixtures/provider-contract-bundle/v1.2.0/vectors/targeted-validator.json +1 -0
- package/tests/gentle-ai-binary.test.ts +1 -1
- package/tests/gentle-ai-installer.test.ts +46 -46
- package/tests/gentle-ai.test.ts +3 -2
- package/tests/issue-creation-skill.test.ts +103 -0
- package/tests/native-review-capability-contract.test.ts +18 -1
- package/tests/orchestrator-budget.test.ts +2 -2
- package/tests/orchestrator-rdd-ownership.test.ts +1 -1
- package/tests/package-manifest.test.ts +123 -9
- package/tests/provider-contract-bundle.test.ts +76 -0
- package/tests/provider-contract-mirror.test.ts +19 -0
- package/tests/review-agent-end-preflight.test.ts +408 -0
- package/tests/review-contract-prompt.test.ts +139 -0
- package/tests/review-controller.test.ts +1 -1
- package/tests/review-host-relay-routing.test.ts +211 -9
- package/tests/review-host-relay.test.ts +195 -7
- package/tests/review-integration-v2-forward.test.ts +47 -0
- package/tests/review-ledger-contract.test.ts +1 -1
- package/tests/runtime-harness.mjs +1 -0
- package/tests/writer-edit-surface-scope.test.ts +153 -17
- /package/contracts/review-provider-contract-mirror/{v1.1.0 → v1.2.0}/bundle/schemas/lens.schema.json +0 -0
- /package/contracts/review-provider-contract-mirror/{v1.1.0 → v1.2.0}/bundle/schemas/refuter.schema.json +0 -0
- /package/contracts/review-provider-contract-mirror/{v1.1.0 → v1.2.0}/bundle/vectors/lens.json +0 -0
- /package/contracts/review-provider-contract-mirror/{v1.1.0 → v1.2.0}/bundle/vectors/refuter.json +0 -0
- /package/contracts/review-provider-contract-mirror/{v1.1.0 → v1.2.0}/bundle/vectors/targeted-validator.json +0 -0
- /package/{contracts/review-provider-contract-mirror/v1.1.0/bundle → tests/fixtures/provider-contract-bundle/v1.2.0}/schemas/targeted-validator.schema.json +0 -0
package/README.md
CHANGED
|
@@ -11,6 +11,28 @@
|
|
|
11
11
|
[](#sddopenspec-flow)
|
|
12
12
|
[](#what-it-adds)
|
|
13
13
|
|
|
14
|
+
**[Gentle-AI website](https://gentle-ai.gentlemanprogramming.com/)** • **[Gentle-AI wiki](https://gentle-ai-wiki.gentlemanprogramming.com/)** • **[Engram](https://engram.gentlemanprogramming.com/)**
|
|
15
|
+
|
|
16
|
+
<div align="center">
|
|
17
|
+
|
|
18
|
+
<!--
|
|
19
|
+
sealed_token is a GitHub fine-grained token encrypted against Star History's
|
|
20
|
+
public key, so only the encrypted value is published here. It is required
|
|
21
|
+
because GitHub restricted the stargazers API to a repository's admins and
|
|
22
|
+
collaborators on 2026-06-30; without it the chart renders an error placeholder.
|
|
23
|
+
Regenerate it at https://www.star-history.com/?repos=Gentleman-Programming%2Fgentle-pi&type=date&legend=top-left
|
|
24
|
+
-->
|
|
25
|
+
|
|
26
|
+
<a href="https://www.star-history.com/?repos=Gentleman-Programming%2Fgentle-pi&type=date&legend=top-left">
|
|
27
|
+
<picture>
|
|
28
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=Gentleman-Programming%2Fgentle-pi&type=date&theme=dark&legend=top-left&sealed_token=zwrd_DfwYZeJU7nhGYNtREEheKWYEslW_uzrqORlZ36v-JSMepdqGLkKExp1M-xbNq6t-ebVS5iM3WoPDO26tXbSGkjXC2Jo3kHQ3uNzlRkCrWoqRHkPVQXvosKciY109ObiwGV1z8aajyedcloppmekCGrvVKJb6KWxGLXW_mHcRAVIBZUOa4SzW75D" />
|
|
29
|
+
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=Gentleman-Programming%2Fgentle-pi&type=date&legend=top-left&sealed_token=zwrd_DfwYZeJU7nhGYNtREEheKWYEslW_uzrqORlZ36v-JSMepdqGLkKExp1M-xbNq6t-ebVS5iM3WoPDO26tXbSGkjXC2Jo3kHQ3uNzlRkCrWoqRHkPVQXvosKciY109ObiwGV1z8aajyedcloppmekCGrvVKJb6KWxGLXW_mHcRAVIBZUOa4SzW75D" />
|
|
30
|
+
<img alt="Star History Chart" src="https://api.star-history.com/chart?repos=Gentleman-Programming%2Fgentle-pi&type=date&legend=top-left&sealed_token=zwrd_DfwYZeJU7nhGYNtREEheKWYEslW_uzrqORlZ36v-JSMepdqGLkKExp1M-xbNq6t-ebVS5iM3WoPDO26tXbSGkjXC2Jo3kHQ3uNzlRkCrWoqRHkPVQXvosKciY109ObiwGV1z8aajyedcloppmekCGrvVKJb6KWxGLXW_mHcRAVIBZUOa4SzW75D" />
|
|
31
|
+
</picture>
|
|
32
|
+
</a>
|
|
33
|
+
|
|
34
|
+
</div>
|
|
35
|
+
|
|
14
36
|
**Turn Pi from a powerful coding agent into a controlled development harness.**
|
|
15
37
|
|
|
16
38
|
`gentle-pi` installs **el Gentleman** in Pi: a senior-architect operating layer for Spec-Driven Development, focused subagents, strict TDD evidence, reviewable work units, safety guards, project/user skill discovery, and bounded native review.
|
|
@@ -60,7 +82,7 @@ Most coding-agent sessions fail for operational reasons, not model reasons:
|
|
|
60
82
|
| **Skill creation workflow** | Provides the `gentle-ai-skill-creator`/`gentle-ai-skill-improver` skills, `/skill-creation` prompt, and packaged style guide for LLM-first skills. |
|
|
61
83
|
| **Delivery skills** | Includes issue-first PRs, chained PRs, work-unit commits, cognitive docs, comment writing, and Judgment Day review. |
|
|
62
84
|
| **Bounded native review** | Freezes one candidate, dispatches only controller-selected lenses, and records native authority. Review outcomes are informational; delivery follows ordinary repository policy. |
|
|
63
|
-
| **Verified native runtime** | Provisions the exact package-local Gentle AI v2.
|
|
85
|
+
| **Verified native runtime** | Provisions the exact package-local Gentle AI v2.6.0 runtime: signed, SHA-256-pinned release archives on Darwin/Linux and a Go SumDB-verified source build on Windows x64/arm64. It validates package-local integrity and rejects PATH, global, sibling, symlink, and mode fallbacks. |
|
|
64
86
|
| **Runtime safety** | Blocks destructive shell commands, asks for confirmation for sensitive operations, and blocks direct read/write/edit access to sensitive paths. |
|
|
65
87
|
|
|
66
88
|
**Migration note:** Do not enable `pi-tool-cards` and `quiet-tools` together: Pi rejects duplicate `bash`, `read`, `edit`, and `write` registrations. Disable or remove the standalone package during migration; gentle-pi does not alter user configuration or delete that repository.
|
|
@@ -83,7 +105,7 @@ pi install npm:gentle-pi@0.14.0
|
|
|
83
105
|
pi install npm:gentle-pi@latest
|
|
84
106
|
```
|
|
85
107
|
|
|
86
|
-
The latest RDD package installs Gentle AI only into its private `.gentle-ai/` directory. Darwin and Linux use pinned release assets with asset and executable SHA-256 verification (signed archives for stable pins such as the current v2.
|
|
108
|
+
The latest RDD package installs Gentle AI only into its private `.gentle-ai/` directory. Darwin and Linux use pinned release assets with asset and executable SHA-256 verification (signed archives for stable pins such as the current v2.6.0; raw prerelease binaries only under a prerelease pin). Windows x64 and arm64 build the exact `v2.6.0` source tag with a local Go 1.25.10+ toolchain, a sealed Go environment, `GOTOOLCHAIN=local`, and `GOSUMDB=sum.golang.org`; it does not download Go automatically. Windows provenance is Go-toolchain plus SumDB evidence and postinstall tamper detection, **not** Authenticode or protection against a malicious joint binary-and-manifest replacement. Package-private locks coordinate cooperative concurrent or crashed installers; their tombstones fail closed. A malicious same-user process with write access to package-private `node_modules` is outside that protocol because it can already replace package code, binary, or manifest, and portable Node has no pathname-delete CAS. It never uses `PATH` or a global `gentle-ai` installation. For development or offline installs only, set `GENTLE_PI_SKIP_GENTLE_AI_INSTALL=1`; native review operations then fail closed with an actionable `package-local-binary-missing` error until the package is reinstalled normally.
|
|
87
109
|
|
|
88
110
|
Recommended companion packages:
|
|
89
111
|
|
|
@@ -204,6 +226,8 @@ The former compact controller classified documentation/comment/formatting-only c
|
|
|
204
226
|
|
|
205
227
|
Gentle AI dynamically supplies runtime-specific RDD instructions. `gentle-pi` does not define an RDD lifecycle, command route, approval path, recovery sequence, or fallback. The historical compact-controller material below documents architecture and compatibility boundaries only; it is not an operator instruction.
|
|
206
228
|
|
|
229
|
+
Concretely: `gentle-pi` mirrors the Gentle AI provider contract bundle's `orchestration/pi.md` locally (`contracts/review-provider-contract-mirror/`, verified against the mirror lock's recorded SHA-256 before injection) and injects that mirrored text into the primary session's system prompt at session start. Gentle AI does not write anything into Pi's system prompt; when the mirrored contract is absent, unreadable, or fails digest verification, `gentle-pi` invents no fallback lifecycle.
|
|
230
|
+
|
|
207
231
|
```mermaid
|
|
208
232
|
flowchart TD
|
|
209
233
|
A["Clarify scope and acceptance criteria"] --> B{"Choose the smallest safe workflow"}
|
|
@@ -237,13 +261,13 @@ flowchart TD
|
|
|
237
261
|
|
|
238
262
|
VALIDATE is informational. Commit, push, PR, and release commands follow ordinary repository policy; RDD never authorizes, rewrites, consumes review state for, or blocks them. Dangerous-command safety and destructive-review consent remain independent.
|
|
239
263
|
|
|
240
|
-
Native contract pairing is exact: this adapter resolves only the integrity-verified package-local Gentle AI v2.
|
|
264
|
+
Native contract pairing is exact: this adapter resolves only the integrity-verified package-local Gentle AI v2.6.0 executable, independently hashes it, then negotiates `gentle-ai.review-integration/v2` outside the repository. Capabilities are cached by that executable digest. Every START, target status, FINALIZE, validate, and BIND-SDD request passes the same contract identifier. Negotiated envelopes decode exactly against the vendored schemas; `recover` routes only the provider-selected `action_disposition`, and optional additions require a future compatible schema/minor that the provider explicitly advertises and the consumer negotiates.
|
|
241
265
|
|
|
242
266
|
Contract `/v2` replaces the Base64 `candidate_diff` reviewer transport of `/v1` with immutable `base_tree`/`candidate_tree` plus an ordered `changed_path_manifest` and never an inline patch. `gentle-pi` negotiates `/v2` only, with no dual-lane fallback; the cutover landed as one atomic commit against gentle-ai v2.2.2 (tracked by the `migrate-review-integration-v2` change), and the `/v1` schemas stay packaged because the `/v2` schemas `$ref` into their fragments. This provider contract version is unrelated to Pi's own internal "compact-v2" review-authority naming used below — the shared digit is coincidental, not a version pairing.
|
|
243
267
|
|
|
244
268
|
Target status owns `current_target`, `unrelated`, `ambiguous`, and `corrupted` applicability and returns one native action. Pi does not reconstruct ordinary authority from provider-private files or choose a lineage from repository-wide history. Restart recovery rebuilds only the derived candidate view from the native Git/content projection, including intended-untracked paths, symlinks, and immutable gitlink identities. Native failure envelopes retain their exact mutation outcome, replayability, required inputs, request digest, and next action. After an unknown or lost mutating result, Pi calls target status before any replay decision and returns only the provider-declared action.
|
|
245
269
|
|
|
246
|
-
Once the pinned gentle-ai runtime (currently v2.
|
|
270
|
+
Once the pinned gentle-ai runtime (currently v2.6.0) has written review authority, rollback MUST preserve every native store and receipt and MUST NOT run a downgraded binary against that repository. Disable the Pi route or roll forward to a compatible authority-aware release instead; deleting authority data or reinstalling an older binary is not a rollback path.
|
|
247
271
|
|
|
248
272
|
### FINALIZE wrapper input
|
|
249
273
|
|
|
@@ -303,6 +327,8 @@ Findings surviving round two escalate; no third-round transition exists.
|
|
|
303
327
|
|
|
304
328
|
Native review mode and candidate-scoped consent remain provider-owned lifecycle semantics. Pi relays the exact provider-owned lifecycle inputs and outputs; it does not create a clone-local consent latch or infer a delivery decision.
|
|
305
329
|
|
|
330
|
+
When RDD is on and an agent loop ends with an unreviewed candidate, `gentle-pi` sends one read-only reminder pointing the agent back to `gentle_review {"operation":"inspect"}` before it reports completion. This nudge is idempotent (at most once per target identity per session), never fires for a headless session or a subagent's own loop, and never runs START or answers consent itself. At session start, `gentle-pi` records the current target identity as a baseline, so a candidate that already existed before the session began (the user's own prior work, not this session's output) never draws the reminder.
|
|
331
|
+
|
|
306
332
|
Review outcomes and receipt state are informational; commit, push, pull-request, and release delivery follow ordinary repository policy. No one-shot command authorization, publication-target revalidation, or receipt gate is required for delivery, and Pi does not inspect RDD mode or native authority to decide a Bash delivery command.
|
|
307
333
|
|
|
308
334
|
Dangerous-command safety remains independent and authoritative. Destructive-review-maintenance consent remains separate from delivery. Review operations, informational VALIDATE, and SDD perform no commit, push, pull-request, release, or publication operation.
|
|
@@ -159,7 +159,8 @@ The bounded writer refuses to write outside the exact allowed edit surfaces and
|
|
|
159
159
|
|
|
160
160
|
Before launching a bounded writer (`gentle-ai-worker`, a user-configured `worker`, or the native `Agent` fallback), derive the allowed edit surface from the task being delegated — the files the planned change must touch, plus the directories where the task authorizes new files — and pass it in the delegated prompt under an `## Allowed edit surfaces` heading, in the same exact-path form as `## Skills to load before work`:
|
|
161
161
|
|
|
162
|
-
- exact repository-relative paths or narrow globs, one per line; never `.` and never a bare repository root;
|
|
162
|
+
- exact repository-relative paths or narrow globs, one per line; never `.` and never a bare repository root; paths containing whitespace require whole-entry backticks (for example, `` `Directory With Spaces/note.md` `` or ``- `Directory With Spaces/note.md` ``); a list marker alone does not permit whitespace;
|
|
163
|
+
- the section ends only at the next canonical ATX Markdown heading of any level (zero to three leading ASCII spaces, one to six `#`, then an ASCII space); every non-empty line before that heading must be a valid surface entry, so put explanatory prose under a following heading;
|
|
163
164
|
- pre-existing untracked targets the writer may write, listed explicitly;
|
|
164
165
|
- the directories where new files are authorized, when the task requires new files;
|
|
165
166
|
- nothing beyond the delegated task — a surface wider than the task is the same defect as no surface at all.
|
package/assets/orchestrator.md
CHANGED
|
@@ -47,8 +47,6 @@ Route work through the smallest harness that is safe. Three tiers:
|
|
|
47
47
|
|
|
48
48
|
Core question: does this inflate parent context without need?
|
|
49
49
|
|
|
50
|
-
The canonical per-action table is the mirrored gentle-ai canon Delegation Rules table in `orchestrator-delegation.md`.
|
|
51
|
-
|
|
52
50
|
Before launching bounded writer (`gentle-ai-worker` or `worker`), task/context needs nonempty `## Allowed edit surfaces`: narrow repository-relative paths/globs; never `.`, bare repo root, or absolute. Parent derives surfaces, maps unknown targets read-only, shows derived candidates only for genuine scope choices. Do not ask the human to author paths or globs.
|
|
53
51
|
|
|
54
52
|
Mandatory Delegation Triggers — stop rules; once fired, delegate through the best available subagent runtime (prefer `subagent_run`, else Pi's native `Agent`):
|
|
@@ -61,7 +59,7 @@ Mandatory Delegation Triggers — stop rules; once fired, delegate through the b
|
|
|
61
59
|
|
|
62
60
|
{{GENTLE_PI_BACKGROUND_POLICY}}; rules: the background-subagents block in the delegation contract.
|
|
63
61
|
|
|
64
|
-
Full table, Work Routing Ladder examples/model-routing detail, Cost and Context Balance, Canonical Workflows, and the mirrored gentle-ai canon (blocking-prompt relays, language, and delegation): `orchestrator-delegation.md`.
|
|
62
|
+
Full per-action table, Work Routing Ladder examples/model-routing detail, Cost and Context Balance, Canonical Workflows, and the mirrored gentle-ai canon (blocking-prompt relays, language, and delegation): `orchestrator-delegation.md`.
|
|
65
63
|
|
|
66
64
|
## SDD Workflow (lazy-loaded)
|
|
67
65
|
|
|
@@ -75,25 +73,23 @@ Hard preflight invariant: `openspec/config.yaml`, existing SDD changes, installe
|
|
|
75
73
|
|
|
76
74
|
## Memory Contract
|
|
77
75
|
|
|
78
|
-
When memory is available, the parent selects context and subagents save
|
|
76
|
+
When memory is available, the parent selects context and subagents save discoveries before returning. Phase table, artifact keys, persistence: `orchestrator-memory.md`.
|
|
79
77
|
|
|
80
78
|
## Skill Registry Protocol
|
|
81
79
|
|
|
82
|
-
The parent resolves
|
|
83
|
-
|
|
84
|
-
Fallback-report semantics (`paths-injected`/`fallback-registry`/`fallback-path`/`none`) and the SDD-executor skill distinction: `orchestrator-skills.md`.
|
|
80
|
+
The parent resolves skill paths once per session under `## Skills to load before work`; subagents read those `SKILL.md` files first, or report unavailable paths. Fallback semantics (`paths-injected`/`fallback-registry`/`fallback-path`/`none`) and the SDD-executor distinction: `orchestrator-skills.md`.
|
|
85
81
|
|
|
86
82
|
## Intent-Driven Skill Discovery
|
|
87
83
|
|
|
88
|
-
For skill-shaped requests,
|
|
84
|
+
For skill-shaped requests, treat `<available_skills>` as a discovery aid only, never overriding a concrete ask. Discovery order and intent hints: `orchestrator-skills.md`.
|
|
89
85
|
|
|
90
86
|
## Gentle AI RDD ownership
|
|
91
87
|
|
|
92
|
-
|
|
88
|
+
This package injects the mirrored provider-bundle review execution contract into this session's system prompt at start; Gentle AI writes nothing into the Pi system prompt, and this package owns everything else here. Absent that mirrored contract, this package invents no lifecycle instructions.
|
|
93
89
|
|
|
94
90
|
## Safety
|
|
95
91
|
|
|
96
|
-
-
|
|
92
|
+
- For a strictly closed single-select envelope (e.g. `gentle-ai.review-integration.consent/v3`), use `ask_user_choice` when the interactive TUI offers it, passing each label/description with the envelope-owned answer token as `value`, then run the exact provider-owned invocation for the selected answer; otherwise emit the complete envelope as plain chat and stop.
|
|
97
93
|
- Never commit unless the user explicitly asks.
|
|
98
94
|
- Ask before destructive git operations, publishing, or irreversible file changes.
|
|
99
95
|
- Keep writes single-threaded unless isolated worktrees are explicitly approved.
|
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": "gentle-pi.review-provider-contract-mirror-lock/v1",
|
|
3
3
|
"acquisition": "field-test-local",
|
|
4
|
-
"contract_semver": "1.
|
|
4
|
+
"contract_semver": "1.2.0",
|
|
5
5
|
"source": {
|
|
6
6
|
"kind": "tree"
|
|
7
7
|
},
|
|
8
|
-
"tree_sha256": "
|
|
8
|
+
"tree_sha256": "9cc05e9f0cbfd22734f1a112dc6120230b22de5318401db19652b4287b7382b8",
|
|
9
9
|
"entries": {
|
|
10
|
-
"README.md": "
|
|
11
|
-
"manifest.json": "
|
|
10
|
+
"README.md": "18baab5ee79aefd0bc62a28da0dadcf2162544f57a940c5b859cd6bc4932a085",
|
|
11
|
+
"manifest.json": "042a8925ac71929c33de2cad630bac26192ff61e255145649b3c34ba4048e923",
|
|
12
|
+
"orchestration/pi.md": "69c51944081ccff09d1cee5e24eb3a14b7b911a2e734cef8f8ea94a15b9f9d4c",
|
|
12
13
|
"schemas/lens.schema.json": "ffef79cfb763333282285ff5c795a32b5a88d840b4a8d125ce012188b04cffe1",
|
|
13
14
|
"schemas/refuter.schema.json": "36f8267c6c3f04600b8f1cb77df70d90858611af822cc81922efd6b3502fb646",
|
|
14
|
-
"schemas/targeted-validator.schema.json": "
|
|
15
|
+
"schemas/targeted-validator.schema.json": "6a8d7b331ec6f000366017e39e0476511c3b032649c42abfe865c1e9c956510e",
|
|
15
16
|
"vectors/lens.json": "7ef0b08404645eeb5dba92aba5f8e4780667b6ec775f43ed8547ff9f2a7148c8",
|
|
16
17
|
"vectors/refuter.json": "f42d71906e49c4191660b2da7e70f01f1778b23d32089005bd2d7ae9cbb73039",
|
|
17
18
|
"vectors/targeted-validator.json": "7b5a5165e3a913863fb98d2ba5387811860c21333b5c37e6ed3b4e0d121cf2fa"
|
|
18
19
|
},
|
|
19
20
|
"generated": {
|
|
20
|
-
"generated/provider-capabilities.baseline.json": "
|
|
21
|
-
"generated/provider-roles.baseline.json": "
|
|
21
|
+
"generated/provider-capabilities.baseline.json": "0c3847e7449f095a44b92653effb68b8c8e09b8f1593b4fc6365f7a78ae99767",
|
|
22
|
+
"generated/provider-roles.baseline.json": "7a1c5ef7688f7dadef0b2c1f2a50af0a8d1fd1d58cce089ababd6e5bb7ccaefc"
|
|
22
23
|
},
|
|
23
24
|
"runtimes": [
|
|
24
25
|
"claude-code",
|
|
@@ -9,4 +9,14 @@ This data-only bundle describes the provider result contracts admitted by Gentle
|
|
|
9
9
|
3. Confirm your runtime identity appears in the manifest's registered runtimes before trusting the layout.
|
|
10
10
|
4. Pass the Go-materialized opaque prompt to the provider and return only raw output or an error.
|
|
11
11
|
|
|
12
|
+
## Orchestration
|
|
13
|
+
|
|
14
|
+
manifest.json's orchestration array lists, for closed runtimes only, one
|
|
15
|
+
orchestration/<runtime>.md file: the exact review execution contract text
|
|
16
|
+
Gentle AI's own installer would have spliced into that runtime's system
|
|
17
|
+
prompt, for a runtime whose adapter has no system prompt to splice it into.
|
|
18
|
+
It carries no executable content, same as every other file in this bundle: a
|
|
19
|
+
runtime mirrors and delivers the text as-is and still relies on Go for every
|
|
20
|
+
review decision, prompt, receipt, and delivery gate.
|
|
21
|
+
|
|
12
22
|
Go remains the admission authority for prompts, results, receipts, and delivery gates.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "gentle-ai.review-provider-contract-bundle/v1",
|
|
3
|
+
"contract_semver": "1.2.0",
|
|
4
|
+
"transport_capability": "gentle-ai.provider-transport/v1",
|
|
5
|
+
"runtimes": [
|
|
6
|
+
"claude-code",
|
|
7
|
+
"codex",
|
|
8
|
+
"opencode",
|
|
9
|
+
"pi"
|
|
10
|
+
],
|
|
11
|
+
"readme": {
|
|
12
|
+
"path": "README.md",
|
|
13
|
+
"sha256": "18baab5ee79aefd0bc62a28da0dadcf2162544f57a940c5b859cd6bc4932a085"
|
|
14
|
+
},
|
|
15
|
+
"roles": [
|
|
16
|
+
{
|
|
17
|
+
"id": "lens",
|
|
18
|
+
"request_schema_id": "gentle-ai.review-lens-context/v1",
|
|
19
|
+
"result_schema_id": "https://gentle-ai.dev/schema/review/reviewer/v1",
|
|
20
|
+
"required_capabilities": [
|
|
21
|
+
"gentle-ai.provider-transport/v1"
|
|
22
|
+
],
|
|
23
|
+
"schema": {
|
|
24
|
+
"path": "schemas/lens.schema.json",
|
|
25
|
+
"sha256": "ffef79cfb763333282285ff5c795a32b5a88d840b4a8d125ce012188b04cffe1"
|
|
26
|
+
},
|
|
27
|
+
"vector": {
|
|
28
|
+
"path": "vectors/lens.json",
|
|
29
|
+
"sha256": "7ef0b08404645eeb5dba92aba5f8e4780667b6ec775f43ed8547ff9f2a7148c8"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id": "refuter",
|
|
34
|
+
"request_schema_id": "gentle-ai.review-provider-refuter-request/v1",
|
|
35
|
+
"result_schema_id": "https://gentle-ai.dev/schema/review/refuter/v1",
|
|
36
|
+
"required_capabilities": [
|
|
37
|
+
"gentle-ai.provider-transport/v1"
|
|
38
|
+
],
|
|
39
|
+
"schema": {
|
|
40
|
+
"path": "schemas/refuter.schema.json",
|
|
41
|
+
"sha256": "36f8267c6c3f04600b8f1cb77df70d90858611af822cc81922efd6b3502fb646"
|
|
42
|
+
},
|
|
43
|
+
"vector": {
|
|
44
|
+
"path": "vectors/refuter.json",
|
|
45
|
+
"sha256": "f42d71906e49c4191660b2da7e70f01f1778b23d32089005bd2d7ae9cbb73039"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"id": "targeted-validator",
|
|
50
|
+
"request_schema_id": "gentle-ai.review-targeted-validation-request/v1",
|
|
51
|
+
"result_schema_id": "https://gentle-ai.dev/schema/review/validator/v1",
|
|
52
|
+
"required_capabilities": [
|
|
53
|
+
"gentle-ai.provider-transport/v1"
|
|
54
|
+
],
|
|
55
|
+
"schema": {
|
|
56
|
+
"path": "schemas/targeted-validator.schema.json",
|
|
57
|
+
"sha256": "6a8d7b331ec6f000366017e39e0476511c3b032649c42abfe865c1e9c956510e"
|
|
58
|
+
},
|
|
59
|
+
"vector": {
|
|
60
|
+
"path": "vectors/targeted-validator.json",
|
|
61
|
+
"sha256": "7b5a5165e3a913863fb98d2ba5387811860c21333b5c37e6ed3b4e0d121cf2fa"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"orchestration": [
|
|
66
|
+
{
|
|
67
|
+
"runtime": "pi",
|
|
68
|
+
"file": {
|
|
69
|
+
"path": "orchestration/pi.md",
|
|
70
|
+
"sha256": "69c51944081ccff09d1cee5e24eb3a14b7b911a2e734cef8f8ea94a15b9f9d4c"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Native Compact Review Orchestration
|
|
2
|
+
|
|
3
|
+
Pi uses the compact gentle-pi facade for this lifecycle: `gentle_review` for inspect, START, consent, bound STATUS, and acknowledgement; `gentle_review_capture` and `gentle_review_capture_group` for collection. Provider-issued authority and every opaque binding are authoritative; prompt prose never creates authority or decides delivery.
|
|
4
|
+
|
|
5
|
+
## Entry rule
|
|
6
|
+
|
|
7
|
+
After authorized source-mutating implementation is complete and normalized, and before reporting it complete, call `gentle_review` with {"operation":"inspect"}. Do this once per candidate whenever the user-owned review switch is enabled (`gentle-ai review mode status` reads it without changing it). The facade returns the only offered START route; do not infer, reconstruct, or replace it. Never skip the preflight because the user did not ask for a review: the START consent envelope lets the human decide this candidate. Skip it only for a trivial passive documentation-only edit, when the user explicitly left this candidate unreviewed, or while a transaction is already bound to it.
|
|
8
|
+
|
|
9
|
+
## Atomic lifecycle
|
|
10
|
+
|
|
11
|
+
1. **Inspect before START.** Call `gentle_review` with {"operation":"inspect"} before START. Retain only the provider-issued authority and opaque bindings returned by the facade.
|
|
12
|
+
2. **Freeze once.** Invoke only the START route inspect offered: `gentle_review` with operation `start`, a fresh `idempotencyKey`, and the `input` the facade documents (ordinary START is {"mode":"ordinary"}; an explicit `baseRef` requires `committedOnly: true`). Retain the returned `lineageId`, revision, target, and `workspaceRoot` as opaque values. An exact replay of an active START may return `replayed`; a genuinely new START is independent. Do not start another lineage, reuse burned authority, or perform ambient recovery.
|
|
13
|
+
3. **Stay bound.** For later routing, call `gentle_review` with operation `status`, the exact retained `lineageId`, and `workspaceRoot` only when needed. Never run raw shell STATUS. Route only from the returned transition; for `execute`, invoke its offered facade operation with its exact opaque binding; for `collect`, satisfy only the named slots through the capture tools below; for `stop`, run no lifecycle operation.
|
|
14
|
+
4. **Collect exactly.** Use `gentle_review_capture` for one current returned slot or `gentle_review_capture_group` for the complete current reviewer group. Submit only the returned opaque binding and result. After collection, use bound facade STATUS again only when the returned transition requires it.
|
|
15
|
+
5. **Acknowledge exactly.** Only the exact provider-issued acknowledgement continuation burns approved authority. Report the burn from its returned envelope, never from a later STATUS.
|
|
16
|
+
|
|
17
|
+
Pi never reconstructs lineage, target, revision, repository context, lens, order, or commands. It never appends, removes, parses, or rebuilds provider-issued opaque bindings. Go owns repository binding, frozen evidence, provider context, validation, admission, correction scope, and closure.
|
|
18
|
+
|
|
19
|
+
## Consent and forecast
|
|
20
|
+
|
|
21
|
+
If START returns the typed `gentle-ai.review-integration.consent/v3` envelope, relay it as a Lossless Blocking Prompt. Global RDD enabled permits review; it never grants consent for this candidate. For medium/high candidates, faithfully translate the headline, reason, `value`, risk evidence, choice labels, every choice `effect`, and the off-path note while preserving original groups/order, selection mode, allowed-answer domain, answer tokens, and the `consentBinding`. Project `value` as benefits and every `effect` as consequences. Do not translate machine answer tokens (`granted`, `declined`). Submit exactly the human's choice through `gentle_review` with operation `answer-consent` and the exact `consentBinding`; a decline is candidate-scoped and is not the kill switch.
|
|
22
|
+
|
|
23
|
+
A four-lens review is long work. The first capture of a materialize slot or group returns a `forecast` and runs nothing: relay it losslessly in the user's language, preserving every step's order and fields (`step`, `kind`, `reason_code`, `description`) and the horizon, then resubmit the same exact binding with `reviewerRunAcknowledged: true`. Forecast is informational; route only from the returned transition.
|
|
24
|
+
|
|
25
|
+
## Capture and correction
|
|
26
|
+
|
|
27
|
+
Reviewers inspect only the provider-bound immutable trees, and the gentle-pi relay owns the reviewer prompt. Never hand candidate bytes through `/tmp`, an external file, a repository scratch file, or `GENTLE_AI_FROZEN_CANDIDATE_CONTEXT`, and never substitute the live worktree, index, or `HEAD`.
|
|
28
|
+
|
|
29
|
+
Only candidate-caused severe findings block. Pre-existing/base-only findings are follow-ups; unknown causality escalates. A deterministic blocker needs no refuter; inferential blockers share one read-only refuter batch. The final reviewer, refuter, or targeted-validator capture owns closure.
|
|
30
|
+
|
|
31
|
+
A malformed, incomplete, or unavailable capture never reaches acknowledgement. Use bound facade STATUS once, and relaunch only when it reoffers the same bound slot. An approved capture awaits acknowledgement; it is not burned. On `approved`, use bound facade STATUS to obtain or replay the exact provider-issued `acknowledge-approved` continuation, then execute it unchanged. Only its successful returned envelope burns authority; do not issue STATUS after that burn. On `correction_required`, continue only through exact bound facade STATUS and the provider-issued correction route. Native Go maps edits only to corroborated frozen findings and permits at most one bounded correction. A validator that cannot inspect the immutable trees produced no verdict: surface one blocked human decision and submit nothing.
|
|
32
|
+
|
|
33
|
+
### Cross-repository lifecycle root
|
|
34
|
+
|
|
35
|
+
A session in repository A may review an explicitly selected nested target in unrelated repository B only after explicit user authorization. Pass the selected path as `workspaceRoot`; Go resolves it to the canonical B worktree root, and the facade retains it. Keep that `workspaceRoot` on every later facade call for the lineage, from inspect through acknowledgement, and do not fall back to A. The same lineage text in A and B is independent; exact acknowledgement burns B only.
|
|
36
|
+
|
|
37
|
+
### Continue after a stop reason code
|
|
38
|
+
|
|
39
|
+
A `stop` ends its transition, never approves delivery. `D` means the human disables the review switch for this clone with `gentle-ai review mode disable --scope clone`; ordinary policy then decides delivery. `S` means re-query bound facade STATUS with the retained `lineageId` and `workspaceRoot`.
|
|
40
|
+
|
|
41
|
+
| Reason codes | Continuation |
|
|
42
|
+
| --- | --- |
|
|
43
|
+
| `captured_artifacts_unverifiable`, `captured_result_selection_unavailable`, `missing_authority_binding`, `corrupted_or_unverifiable_authority`, `manual_intervention_required`, `native_stop_required` | Terminal: the maintainer inspects authority/lineage, or `D`. |
|
|
44
|
+
| `empty_base_diff_bootstrap_required` | Terminal: authorized empty-root bootstrap for a new target, or `D`. |
|
|
45
|
+
| `lens_context_budget_exceeded` | Terminal: reduce the candidate scope and start a new transaction, or `D`. |
|
|
46
|
+
| `staged_workspace_overlay_recovery_unavailable` | Call facade `recover` with the retained `lineageId`, or start a fresh transaction; otherwise `D`. |
|
|
47
|
+
| `corrected_candidate_unavailable` | Change the correction candidate, then `S`; do not reuse the pre-correction target. |
|
|
48
|
+
| `recovery_scope_unchanged` | Change the target identity, then retry the facade `recover` route the stop returned. |
|
|
49
|
+
| `rdd_disabled` | `--scope clone` only clears a clone-local off; the human runs `gentle-ai review mode enable --scope global`, then `S`. |
|
|
50
|
+
|
|
51
|
+
## Delivery follows ordinary repository policy
|
|
52
|
+
|
|
53
|
+
After exact acknowledgement burns terminal `approved` authority, the review lifecycle stops. Commit, push, PR, and release remain separate human decisions under ordinary repository policy. A review outcome is informational and never authorizes delivery.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://gentle-ai.dev/schema/review/validator/v1","title":"Gentle AI targeted validator result","type":"object","additionalProperties":false,"required":["targeted_validation_request_hash","correction_target_identity","original_criteria","correction_regression","follow_ups"],"properties":{"targeted_validation_request_hash":{"$ref":"#/$defs/sha256"},"correction_target_identity":{"$ref":"#/$defs/sha256"},"original_criteria":{"$ref":"#/$defs/check"},"correction_regression":{"$ref":"#/$defs/check"},"follow_ups":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["observation","proof_refs"],"properties":{"observation":{"type":"string"},"proof_refs":{"type":"array","minItems":1,"items":{"type":"string","pattern":"\\S"}}}}}},"$defs":{"sha256":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"},"check":{"type":"object","additionalProperties":false,"required":["passed","evidence"],"properties":{"passed":{"type":"boolean","description":"true means the named check passed; false means the named check failed."},"evidence":{"type":"array","minItems":1,"items":{"type":"string"}}}}},"examples":[{"targeted_validation_request_hash":"sha256:0000000000000000000000000000000000000000000000000000000000000000","correction_target_identity":"sha256:1111111111111111111111111111111111111111111111111111111111111111","original_criteria":{"passed":true,"evidence":["acceptance test passed"]},"correction_regression":{"passed":true,"evidence":["regression test passed"]},"follow_ups":[]}]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": "gentle-pi.provider-contract-capabilities-baseline/v1",
|
|
3
|
-
"contract_semver": "1.
|
|
3
|
+
"contract_semver": "1.2.0",
|
|
4
4
|
"transport_capability": "gentle-ai.provider-transport/v1",
|
|
5
5
|
"mandatory_capabilities": [
|
|
6
6
|
"gentle-ai.provider-transport/v1"
|
|
@@ -11,5 +11,12 @@
|
|
|
11
11
|
"opencode",
|
|
12
12
|
"pi"
|
|
13
13
|
],
|
|
14
|
-
"pi_registered": true
|
|
14
|
+
"pi_registered": true,
|
|
15
|
+
"orchestration": [
|
|
16
|
+
{
|
|
17
|
+
"runtime": "pi",
|
|
18
|
+
"path": "orchestration/pi.md",
|
|
19
|
+
"sha256": "69c51944081ccff09d1cee5e24eb3a14b7b911a2e734cef8f8ea94a15b9f9d4c"
|
|
20
|
+
}
|
|
21
|
+
]
|
|
15
22
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": "gentle-pi.provider-contract-roles-baseline/v1",
|
|
3
|
-
"contract_semver": "1.
|
|
3
|
+
"contract_semver": "1.2.0",
|
|
4
4
|
"roles": [
|
|
5
5
|
{
|
|
6
6
|
"id": "lens",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"gentle-ai.provider-transport/v1"
|
|
35
35
|
],
|
|
36
36
|
"schema_path": "schemas/targeted-validator.schema.json",
|
|
37
|
-
"schema_sha256": "
|
|
37
|
+
"schema_sha256": "6a8d7b331ec6f000366017e39e0476511c3b032649c42abfe865c1e9c956510e",
|
|
38
38
|
"vector_path": "vectors/targeted-validator.json",
|
|
39
39
|
"vector_sha256": "7b5a5165e3a913863fb98d2ba5387811860c21333b5c37e6ed3b4e0d121cf2fa"
|
|
40
40
|
}
|
|
@@ -25,7 +25,7 @@ A typed Pi transport refusal fails closed. The coordinator reports the refusal w
|
|
|
25
25
|
|
|
26
26
|
## Dynamic contract delivery
|
|
27
27
|
|
|
28
|
-
Package static assets intentionally omit lifecycle instructions, candidate routing, recovery procedures, receipt semantics, and any delivery-gate or delivery-authorization behavior. Gentle AI
|
|
28
|
+
Package static assets intentionally omit lifecycle instructions, candidate routing, recovery procedures, receipt semantics, and any delivery-gate or delivery-authorization behavior. Since Gentle AI stopped generating Pi APPEND_SYSTEM composition, Gentle Pi mirrors the provider contract bundle's `orchestration/pi.md` review execution contract locally (`contracts/review-provider-contract-mirror/`) and injects that verified, mirrored text into the primary session's system prompt at session start. Gentle AI writes nothing into the Pi system prompt; the host follows only that mirrored contract. When the mirrored contract is absent or unreadable, Gentle Pi does not invent a fallback; delivery remains ordinary repository policy.
|
|
29
29
|
|
|
30
30
|
## Integration constraints
|
|
31
31
|
|