gentle-pi 1.1.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +58 -15
- package/assets/agents/review-readability.md +0 -1
- package/assets/agents/review-reliability.md +0 -1
- package/assets/agents/review-resilience.md +0 -1
- package/assets/agents/review-risk.md +0 -1
- package/assets/orchestrator-delegation.md +3 -3
- package/contracts/review-integration/v1/fixtures/binding-revision-conflict.fixture.json +25 -0
- package/contracts/review-integration/v1/fixtures/capabilities-v1.1.fixture.json +45 -0
- package/contracts/review-integration/v1/fixtures/capabilities-v1.2.fixture.json +263 -0
- package/contracts/review-integration/v1/fixtures/capabilities-v1.3.fixture.json +301 -0
- package/contracts/review-integration/v1/fixtures/capabilities-v1.4.fixture.json +312 -0
- package/contracts/review-integration/v1/fixtures/capabilities-v1.5.fixture.json +321 -0
- package/contracts/review-integration/v1/fixtures/consent.fixture.json +36 -0
- package/contracts/review-integration/v1/fixtures/final-verification-incident.fixture.json +1 -0
- package/contracts/review-integration/v1/fixtures/operation.fixture.json +54 -1
- package/contracts/review-integration/v1/fixtures/repair-preflight.fixture.json +54 -0
- package/contracts/review-integration/v1/fixtures/start-v2.fixture.json +97 -0
- package/contracts/review-integration/v1/fixtures/start.fixture.json +25 -1
- package/contracts/review-integration/v1/fixtures/status-ambiguous.fixture.json +52 -1
- package/contracts/review-integration/v1/fixtures/status-corrupted.fixture.json +52 -1
- package/contracts/review-integration/v1/fixtures/status-recover.fixture.json +103 -0
- package/contracts/review-integration/v1/fixtures/status-unrelated.fixture.json +48 -1
- package/contracts/review-integration/v1/fixtures/status-v2-ambiguous.fixture.json +110 -0
- package/contracts/review-integration/v1/fixtures/status-v2-corrupted.fixture.json +107 -0
- package/contracts/review-integration/v1/fixtures/status-v2-final-verification-retry.fixture.json +192 -0
- package/contracts/review-integration/v1/fixtures/status-v2-recover.fixture.json +130 -0
- package/contracts/review-integration/v1/fixtures/status-v2-repair.fixture.json +161 -0
- package/contracts/review-integration/v1/fixtures/status-v2-unrelated.fixture.json +103 -0
- package/contracts/review-integration/v1/fixtures/status-v2.fixture.json +193 -0
- package/contracts/review-integration/v1/fixtures/status.fixture.json +97 -1
- package/contracts/review-integration/v1/fixtures/verification-evidence.fixture.json +1 -0
- package/contracts/review-integration/v1/schemas/admitted-result.schema.json +35 -0
- package/contracts/review-integration/v1/schemas/artifact-subject.schema.json +33 -0
- package/contracts/review-integration/v1/schemas/authority-repair-assessment.schema.json +247 -0
- package/contracts/review-integration/v1/schemas/capabilities-v1.1.schema.json +25 -2
- package/contracts/review-integration/v1/schemas/capabilities-v1.2.schema.json +249 -0
- package/contracts/review-integration/v1/schemas/capabilities-v1.3.schema.json +429 -0
- package/contracts/review-integration/v1/schemas/capabilities-v1.4.schema.json +432 -0
- package/contracts/review-integration/v1/schemas/capabilities-v1.5.schema.json +154 -0
- package/contracts/review-integration/v1/schemas/consent.schema.json +86 -0
- package/contracts/review-integration/v1/schemas/failure.schema.json +54 -8
- package/contracts/review-integration/v1/schemas/final-verification-incident.schema.json +51 -0
- package/contracts/review-integration/v1/schemas/operation.schema.json +204 -29
- package/contracts/review-integration/v1/schemas/repair.schema.json +251 -0
- package/contracts/review-integration/v1/schemas/result-artifact-v2.schema.json +38 -0
- package/contracts/review-integration/v1/schemas/start-v2.schema.json +216 -0
- package/contracts/review-integration/v1/schemas/start.schema.json +79 -1
- package/contracts/review-integration/v1/schemas/status-v2.schema.json +313 -0
- package/contracts/review-integration/v1/schemas/status.schema.json +141 -2
- package/contracts/review-integration/v1/schemas/targeted-validation-request.schema.json +46 -0
- package/contracts/review-integration/v1/schemas/verification-evidence.schema.json +64 -0
- package/contracts/review-integration/v2/fixtures/capabilities.fixture.json +111 -0
- package/contracts/review-integration/v2/fixtures/consent.fixture.json +36 -0
- package/contracts/review-integration/v2/fixtures/start.fixture.json +93 -0
- package/contracts/review-integration/v2/fixtures/status.fixture.json +113 -0
- package/contracts/review-integration/v2/schemas/admitted-result.schema.json +14 -0
- package/contracts/review-integration/v2/schemas/artifact-subject.schema.json +36 -0
- package/contracts/review-integration/v2/schemas/capabilities.schema.json +111 -0
- package/contracts/review-integration/v2/schemas/consent.schema.json +70 -0
- package/contracts/review-integration/v2/schemas/failure.schema.json +35 -0
- package/contracts/review-integration/v2/schemas/operation.schema.json +46 -0
- package/contracts/review-integration/v2/schemas/repair.schema.json +22 -0
- package/contracts/review-integration/v2/schemas/start.schema.json +106 -0
- package/contracts/review-integration/v2/schemas/status.schema.json +104 -0
- package/docs/native-authority-architecture.md +123 -0
- package/docs/review-integration.md +185 -25
- package/extensions/gentle-ai.ts +761 -960
- package/lib/gentle-ai-binary.ts +1 -1
- package/lib/git-commit-transaction.ts +5 -0
- package/lib/native-review-cli.ts +1047 -61
- package/lib/review-candidate-view.ts +131 -1
- package/lib/review-compact-contract.ts +22 -4
- package/lib/review-consent-latch.ts +51 -0
- package/lib/review-correction-lifecycle.ts +170 -0
- package/lib/review-integration-v2.ts +1563 -0
- package/lib/review-publication-gate.ts +513 -0
- package/lib/review-repository.ts +12 -14
- package/lib/review-snapshot.ts +0 -59
- package/lib/review-transaction.ts +40 -834
- package/package.json +15 -11
- package/runtime/gentle-ai-binary.mjs +1 -1
- package/runtime/git-commit-transaction.mjs +5 -0
- package/runtime/native-review-cli.mjs +1031 -45
- package/runtime/review-integration-v2.mjs +1564 -0
- package/scripts/build-git-commit-transaction-runner.mjs +1 -1
- package/scripts/gentle-ai-installer.mjs +16 -11
- package/scripts/install-gentle-ai.mjs +7 -3
- package/scripts/measure-native-authority-slimming.mjs +111 -0
- package/scripts/test-packed-runner.mjs +2 -2
- package/scripts/verify-package-files.mjs +218 -65
- package/skills/_shared/review-ledger-contract.md +6 -6
- package/skills/gentle-ai/SKILL.md +4 -2
- package/skills/release/SKILL.md +38 -11
- package/tests/devbinary/native-review-parity.devtest.ts +348 -0
- package/tests/gentle-ai-binary.test.ts +8 -1
- package/tests/gentle-ai-installer.test.ts +25 -22
- package/tests/gentle-ai.test.ts +1 -1
- package/tests/git-commit-transaction.test.ts +128 -5
- package/tests/native-binary-gate.test.ts +145 -0
- package/tests/native-review-capability-contract.test.ts +87 -0
- package/tests/native-review-cli.test.ts +102 -0
- package/tests/native-review-parity-runtime.test.ts +78 -25
- package/tests/native-review-parity.test.ts +673 -0
- package/tests/native-risk-evidence-parity.test.ts +91 -0
- package/tests/package-manifest.test.ts +90 -4
- package/tests/review-actor-tool-deny.test.ts +20 -5
- package/tests/review-authority-recovery-docs.test.ts +16 -11
- package/tests/review-candidate-view.test.ts +331 -1
- package/tests/review-compact-contract.test.ts +58 -0
- package/tests/review-consent-latch.test.ts +67 -0
- package/tests/review-controller-lock-status.test.ts +145 -0
- package/tests/review-controller-native-recovery.test.ts +961 -0
- package/tests/review-controller-native-routing.test.ts +792 -462
- package/tests/review-controller-retired-ops.test.ts +54 -0
- package/tests/review-controller-workspace-root.test.ts +29 -6
- package/tests/review-controller.test.ts +19 -794
- package/tests/review-correction-lifecycle.test.ts +174 -0
- package/tests/review-gate.test.ts +16 -7
- package/tests/review-integration-v2.test.ts +539 -0
- package/tests/review-ledger-contract.test.ts +4 -2
- package/tests/review-snapshot.test.ts +2 -15
- package/tests/review-transaction.test.ts +27 -51
- package/tests/runtime-harness.mjs +193 -6
- package/tests/support/native-binary-gate.ts +86 -0
- package/tests/verify-package-files.test.ts +119 -0
- package/lib/review-authority-supersession.ts +0 -1056
- package/lib/review-bundle.ts +0 -286
- package/lib/review-checkpoint.ts +0 -127
- package/lib/review-compact-gate.ts +0 -219
- package/lib/review-compact-store.ts +0 -724
- package/lib/review-facade.ts +0 -508
- package/lib/review-graph-reducer.ts +0 -55
- package/lib/review-integration-v1.ts +0 -713
- package/lib/review-mirror.ts +0 -46
- package/lib/review-reset.ts +0 -262
- package/runtime/review-integration-v1.mjs +0 -714
- package/tests/native-review-integration-v1.test.ts +0 -102
- package/tests/review-authority-supersession.test.ts +0 -581
- package/tests/review-bundle.test.ts +0 -253
- package/tests/review-checkpoint.test.ts +0 -61
- package/tests/review-compact-gate.test.ts +0 -376
- package/tests/review-compact-store.test.ts +0 -124
- package/tests/review-facade.test.ts +0 -382
- package/tests/review-graph.test.ts +0 -27
- package/tests/review-integration-v1.test.ts +0 -510
- package/tests/review-mirror.test.ts +0 -20
- package/tests/review-reset.test.ts +0 -456
- package/tests/review-runtime-contract.test.ts +0 -70
package/README.md
CHANGED
|
@@ -11,6 +11,15 @@
|
|
|
11
11
|
[](#sddopenspec-flow)
|
|
12
12
|
[](#what-it-adds)
|
|
13
13
|
|
|
14
|
+
> [!IMPORTANT]
|
|
15
|
+
> **RDD is unstable.** Native Receipt-Driven Development started in `gentle-pi` `v0.15.0`. Every release from `v0.15.0` onward is part of the RDD development line and may change while remaining issues are fixed.
|
|
16
|
+
>
|
|
17
|
+
> For a stable installation without RDD, use the last version before native RDD, `v0.14.0`:
|
|
18
|
+
> ```bash
|
|
19
|
+
> pi install npm:gentle-pi@0.14.0
|
|
20
|
+
> ```
|
|
21
|
+
> To test the latest released RDD build, use `@latest`.
|
|
22
|
+
|
|
14
23
|
**Turn Pi from a powerful coding agent into a controlled development harness.**
|
|
15
24
|
|
|
16
25
|
`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.
|
|
@@ -58,16 +67,28 @@ Most coding-agent sessions fail for operational reasons, not model reasons:
|
|
|
58
67
|
| **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. |
|
|
59
68
|
| **Delivery skills** | Includes issue-first PRs, chained PRs, work-unit commits, cognitive docs, comment writing, and Judgment Day review. |
|
|
60
69
|
| **Bounded native review** | Freezes one candidate, dispatches only controller-selected lenses, records native authority, and reuses the same content-bound receipt at delivery gates. |
|
|
61
|
-
| **Verified native runtime** | Provisions the exact package-local Gentle AI v2.1
|
|
70
|
+
| **Verified native runtime** | Provisions the exact package-local Gentle AI v2.2.1 binary, verifies pinned archive/binary integrity, negotiates `review-integration/v1` today, and rejects PATH, global, sibling, symlink, and mode fallbacks. `review-integration/v2`'s immutable `base_tree`/`candidate_tree` transport is staged for a separate release-gated cutover (see [Native Authority Architecture](docs/native-authority-architecture.md)). |
|
|
62
71
|
| **Runtime safety** | Blocks destructive shell commands, asks for confirmation for sensitive operations, and blocks direct read/write/edit access to sensitive paths. |
|
|
63
72
|
|
|
64
73
|
## Install
|
|
65
74
|
|
|
66
75
|
```bash
|
|
67
|
-
pi install npm:gentle-pi
|
|
76
|
+
pi install npm:gentle-pi@0.14.0
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### RDD version policy
|
|
80
|
+
|
|
81
|
+
Native RDD started in `gentle-pi` `v0.15.0` on 2026-07-10 with bounded review transactions. Every release from `v0.15.0` onward is part of the unstable RDD development line. New releases will continue improving RDD until the project declares the line stable. The stable version for normal use without native RDD is the last preceding release, `v0.14.0`.
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
# Stable version without native RDD
|
|
85
|
+
pi install npm:gentle-pi@0.14.0
|
|
86
|
+
|
|
87
|
+
# Latest released RDD build (unstable)
|
|
88
|
+
pi install npm:gentle-pi@latest
|
|
68
89
|
```
|
|
69
90
|
|
|
70
|
-
The
|
|
91
|
+
The latest RDD package downloads its pinned platform-specific Gentle AI binary into the package's private `.gentle-ai/` directory and verifies archive and executable SHA-256 values before extraction. 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.
|
|
71
92
|
|
|
72
93
|
Recommended companion packages:
|
|
73
94
|
|
|
@@ -157,13 +178,21 @@ Review actors are dispatched only through parent `subagent_run` calls in `mode:
|
|
|
157
178
|
|
|
158
179
|
### Review authority recovery and reset safety
|
|
159
180
|
|
|
160
|
-
Legacy pre-graph authority is never migrated. `gentle_review inspect` reports an exact repository-bound destructive reset challenge;
|
|
181
|
+
Legacy pre-graph authority is never migrated. `gentle_review inspect` reports an exact repository-bound destructive reset challenge for legacy corruption; after that fresh interactive authorization, RESET and RECOVER_LOCK route to the audited native `gentle-ai review reclaim` operation and RECOVER routes to native `gentle-ai review recover`, so every destructive transition is executed and audited by the native authority store. Native inputs the request did not carry return a `native-input-required` envelope instead of being invented. Existing graph-v1 ordinary lineages remain readable and gate-validatable but are read-only; Judgment Day remains mutable on graph-v1.
|
|
182
|
+
|
|
183
|
+
`gentle_review abandon`, `quarantine-legacy`, and `reconcile-authority` remain explicit v2.1.11 maintenance routes. Pi derives and displays the published six-line abandon binding only for a caller-specified compact lineage, revision, and snapshot identity; the native CLI re-derives pristine compact-v2 eligibility. Legacy quarantine accepts only `historical findings freeze changed unrelated transaction state` with disposition `quarantine-malformed-freeze-event` and uses its exact eight-line binding. Both require fresh interactive approval and fail closed headlessly.
|
|
184
|
+
|
|
185
|
+
`gentle_review reconcile-authority` accepts one predecessor lineage and revision, one successor lineage and revision, an actor, and a reason. Pi derives the exact seven-line `gentle-ai.review-reconcile-authorization/v1` binding, or appends exactly `anomalies=unchanged_target,malformed_recovery_authorization` for the published dual anomaly in that order. Native code re-derives every anomaly; malformed bindings, changed revisions, unavailable native support, cancellation, and native refusal fail closed through typed envelopes.
|
|
161
186
|
|
|
162
|
-
|
|
187
|
+
Reconciliation is intentionally narrow: native code may quarantine only the bound invalid compact-v2 recovery successor and persists the returned audit record; the predecessor stays untouched. Pi never recreates the retired `prepare-supersession`/`supersede` authority writer and never falls back to RESET or RECOVER.
|
|
163
188
|
|
|
164
|
-
|
|
189
|
+
`gentle_review repair-legacy-alias` is the sole v2.1.11 route for `unsupported historical v1 operation alias`. The model supplies only lineage, actor, and reason. Pi freshly reads the native inventory, derives the canonical repository, exact legacy revision, fixed diagnostic, and fixed `quarantine-approved-historical-alias` disposition, displays the LF-only eight-line binding, and requires a new interactive approval. Native re-derives eligibility and quarantines rather than rewriting or validating the historical chain.
|
|
165
190
|
|
|
166
|
-
|
|
191
|
+
`review dispose-result` is deliberately unsupported by Pi pending a separate design; it has no controller operation or fallback. All maintenance routes fail closed headlessly and never auto-run against legacy history.
|
|
192
|
+
|
|
193
|
+
Native ordinary gates revalidate provider-selected authority, receipt, scope, intended-untracked proof, and the live target. Pi preserves a graph-v1 gate path only for explicit Judgment Day and historical graph receipt validation. Recovery grants no new budget and cannot bypass dangerous-command or publication checks. Legacy graph bundle export/import is retired.
|
|
194
|
+
|
|
195
|
+
This is the post-U8 boundary, not the final architecture. [Issue #191](https://github.com/Gentleman-Programming/gentle-pi/issues/191) is the immediate final unit in this same delivery: extract the remaining Pi command-projection and lifecycle-gate surface from `review-transaction.ts`, repoint runtime enforcement, then delete only dependencies proven unreachable without weakening graph-v1 Judgment Day. The branch-wide High-tier 4R runs after that extraction, before the single size-exception PR.
|
|
167
196
|
|
|
168
197
|
`reviewer` is not an installed subagent name. It is a routing intent. Select the concrete lens by risk profile:
|
|
169
198
|
|
|
@@ -233,13 +262,15 @@ flowchart TD
|
|
|
233
262
|
|
|
234
263
|
Lifecycle gates never launch review actors. They rederive Git and publication targets, validate the existing receipt, and authorize one exact command. Any target drift, stale evidence, malformed authority, or unprovable state blocks delivery instead of silently reopening review.
|
|
235
264
|
|
|
236
|
-
Native contract pairing is exact: this adapter resolves only the integrity-verified package-local Gentle AI v2.1.
|
|
265
|
+
Native contract pairing is exact: this adapter resolves only the integrity-verified package-local Gentle AI v2.1.11 executable, independently hashes it, then negotiates `gentle-ai.review-integration/v1` 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. Current protocol 1.0 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.
|
|
266
|
+
|
|
267
|
+
Gentle AI also publishes a second negotiated contract, `gentle-ai.review-integration/v2`, which replaces the Base64 `candidate_diff` reviewer transport with immutable `base_tree`/`candidate_tree` plus an ordered `changed_path_manifest` and never an inline patch. `gentle-pi` is migrating to `/v2` only, with no dual-lane fallback; the cutover is release-gated on the pinned runtime confirming it serves contract v2 (already true for the currently pinned v2.2.1) and lands as one atomic commit, tracked by the `migrate-review-integration-v2` change. 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.
|
|
237
268
|
|
|
238
269
|
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.
|
|
239
270
|
|
|
240
271
|
Direct authorized `git commit` commands use a durable recovery record under the Git common directory. The package runs the effective pre-commit hook once, captures the post-hook index, performs final native validation against that tree, suppresses only the already-completed pre-commit hook while preserving message/post hooks through proxies, and proves `HEAD^{tree}` before the tool result succeeds. Any unresolved, interrupted, failed, or mismatched transaction blocks push, PR, and release. Recovery never resets HEAD or the index automatically.
|
|
241
272
|
|
|
242
|
-
Once v2.1
|
|
273
|
+
Once the pinned gentle-ai runtime (currently v2.2.1) 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.
|
|
243
274
|
|
|
244
275
|
### FINALIZE wrapper input
|
|
245
276
|
|
|
@@ -297,9 +328,9 @@ Judgment Day alone may iterate discovery and scoped re-judgment, for at most two
|
|
|
297
328
|
|
|
298
329
|
Findings surviving round two escalate; no third-round transition exists.
|
|
299
330
|
|
|
300
|
-
|
|
331
|
+
Native compact gate validation is read-only. It loads authority and receipt, derives the live target, then reloads authority and rederives target/publication evidence immediately before allow.
|
|
301
332
|
|
|
302
|
-
Pi also registers one one-shot authorization for the exact command and rederives its full publication target before registration, before bash-time native validation, and again after that validation before allowing the command. For `gh pr create`, the effective repository follows GitHub CLI precedence (`--repo`, then `GH_REPO`, then local inference), and both that source/value and the exact advertised remote head commit are bound and rechecked against reviewed local `HEAD`. Publication `ls-remote` probes are shell-free, output-bounded, time-bounded, and cancellation-aware. The complete bash-time publication/native revalidation uses one aggregate bounded deadline combined with Pi's cancellation signal when available. First-push, push destination, exact PR base/head, repository identity, release, and dangerous-command protections remain fail closed.
|
|
333
|
+
Pi also registers one one-shot authorization for the exact command and rederives its full publication target before registration, before bash-time native validation, and again after that validation before allowing the command. The Pi-owned `lib/review-publication-gate.ts` module owns typed publication targets, configured push-destination binding, release projection, release fast-path evaluation, and publication rechecks without depending on graph-v1 authority storage. For `gh pr create`, the effective repository follows GitHub CLI precedence (`--repo`, then `GH_REPO`, then local inference), and both that source/value and the exact advertised remote head commit are bound and rechecked against reviewed local `HEAD`. Publication `ls-remote` probes are shell-free, output-bounded, time-bounded, and cancellation-aware. The complete bash-time publication/native revalidation uses one aggregate bounded deadline combined with Pi's cancellation signal when available. First-push, push destination, exact PR base/head, repository identity, release, and dangerous-command protections remain fail closed.
|
|
303
334
|
Native pre-push to an existing branch is supported only when the effective push URL and repository identity equal the fetch URL and identity used by the exact `<remote>/<destination-branch>` selector, and its advertised commit equals the command update's old object. Split fetch/push topology is unsupported because PR #1216 introduced the upstream v2.1.1 `--base-ref` contract that v2.1.3 inherits unchanged: that contract resolves the selector through fetch-side remote-tracking state, and probing `pushurl` does not change selector resolution. Pi fails closed before native validation with `native-split-fetch-push-unsupported-until-upstream-supports-explicit-push-base`. Native pre-PR remains fetch-side and may use advertised remote selectors. Residual gap (separate follow-up): native first-push authorization remains unsupported until Pi has a persisted explicit advertised-base source. A missing destination fails closed with `native-first-push-unsupported-until-persisted-advertised-base-exists`; Pi never guesses a base from an upstream, default branch, or nearest ancestor.
|
|
304
335
|
|
|
305
336
|
Native SDD readiness is true only for `verify` or `archive` with empty blockers and a published `reviewGate.result: "allow"`; review/resolve-review, missing gate evidence, and every non-allow or stale result remain blocked.
|
|
@@ -632,12 +663,15 @@ Memory contract for SDD delegation:
|
|
|
632
663
|
| ------------------------------ | ---------------------------------------------------------------------------------------------------------- |
|
|
633
664
|
| `extensions/gentle-ai.ts` | Injects identity, orchestrates native review authority and lifecycle gates, refreshes global SDD assets, registers commands, applies model/persona config, and enforces runtime safety. |
|
|
634
665
|
| `lib/native-review-cli.ts` | Strict package-local adapter for Gentle AI START, FINALIZE, VALIDATE, SDD binding, and status contracts. |
|
|
635
|
-
| `lib/review-integration-
|
|
666
|
+
| `lib/review-integration-v2.ts` | Strict consumer decoder for negotiated capabilities, operations, target status, projections, repair, and failures against contract `review-integration/v2` (active today). |
|
|
636
667
|
| `lib/git-commit-transaction.ts` | Durable hook/native-validation/commit/recovery transaction with publication blocking and HEAD proof. |
|
|
637
668
|
| `lib/review-candidate-view.ts` | Builds immutable changed-scope actor views while preserving full-tree, path, mode, symlink, and index integrity. |
|
|
669
|
+
| `lib/review-canonical.ts` | Permanent Pi-owned canonical JSON and domain-hash primitives for consumer-side identities. |
|
|
670
|
+
| `lib/review-repository.ts` | Permanent Pi-owned Git common-directory identity, safe Git environment, and authority-root binding. |
|
|
638
671
|
| `lib/gentle-ai-binary.ts` | Resolves and verifies the confined package-local Gentle AI runtime without global or PATH fallback. |
|
|
639
672
|
| `scripts/gentle-ai-installer.mjs` | Downloads, verifies, extracts, and atomically promotes the pinned native runtime for six platform targets. |
|
|
640
|
-
| `contracts/review-integration/v1/` |
|
|
673
|
+
| `contracts/review-integration/v1/` | Byte-identical provider schemas and conformance fixtures for contract `review-integration/v1`, hash-checked before packaging; retained on disk permanently because `/v2`'s schemas `$ref` into these fragments. |
|
|
674
|
+
| `contracts/review-integration/v2/` | Byte-identical provider schemas and conformance fixtures for contract `review-integration/v2` (immutable `base_tree`/`candidate_tree`, ordered `changed_path_manifest`, no inline candidate diff), hash-checked before packaging. |
|
|
641
675
|
| `extensions/startup-banner.ts` | Shows and configures the startup intro, color presets, compact runtime panel, and collaboration credit. |
|
|
642
676
|
| `extensions/sdd-init.ts` | Registers `/sdd-init` for OpenSpec initialization. |
|
|
643
677
|
| `extensions/skill-registry.ts` | Maintains `.atl/skill-registry.md` from project/user skills and closes file watchers on shutdown. |
|
|
@@ -648,6 +682,8 @@ Memory contract for SDD delegation:
|
|
|
648
682
|
| `skills/` | Gentle AI delivery and collaboration skills. |
|
|
649
683
|
| `prompts/` | Gentle-prefixed prompt templates, including `/skill-creation`. |
|
|
650
684
|
| `docs/skill-style-guide.md` | Normative style guide used by the packaged skill creation/improvement skills. |
|
|
685
|
+
| `docs/native-authority-architecture.md` | Post-U8 ownership boundary, reproducible slimming metrics, Windows evidence, exact #191 seam, and the `review-integration/v1`→`v2` migration status, including the "compact-v2" naming disambiguation. |
|
|
686
|
+
| `docs/review-integration.md` | Negotiated provider/consumer contract and the current Gentle Pi adoption boundary. |
|
|
651
687
|
|
|
652
688
|
## Development
|
|
653
689
|
|
|
@@ -671,13 +707,20 @@ npm pack --dry-run
|
|
|
671
707
|
Publish npm through GitHub Actions only:
|
|
672
708
|
|
|
673
709
|
```bash
|
|
674
|
-
|
|
710
|
+
version="$(node -p "require('./package.json').version")"
|
|
711
|
+
tag="v${version}"
|
|
712
|
+
git fetch --no-tags origin "refs/tags/${tag}"
|
|
713
|
+
test "$(git rev-parse 'FETCH_HEAD^{commit}')" = "$(git rev-parse "${tag}^{commit}")"
|
|
714
|
+
gh workflow run publish.yml \
|
|
715
|
+
--repo Gentleman-Programming/gentle-pi \
|
|
716
|
+
--ref main \
|
|
717
|
+
-f tag="${tag}"
|
|
675
718
|
gh run watch <run-id> --repo Gentleman-Programming/gentle-pi --exit-status
|
|
676
719
|
npm view gentle-pi@<version> version --registry=https://registry.npmjs.org/
|
|
677
720
|
npm dist-tag ls gentle-pi --registry=https://registry.npmjs.org/
|
|
678
721
|
```
|
|
679
722
|
|
|
680
|
-
Do not run `npm publish` locally for `gentle-pi
|
|
723
|
+
Do not run `npm publish` locally for `gentle-pi`. Dispatch the trusted workflow definition only from protected default `main` and provide its sole `tag` input. The workflow requires an exact annotated `vSemVer` tag whose peeled commit, current remote `main`, dispatch/main workflow commit, checkout, and `package.json` version are identical. It rechecks remote tag and `main` immediately before publishing through OIDC with provenance and environment protection; an advanced `main` requires a new release version, never a moved tag.
|
|
681
724
|
|
|
682
725
|
## Principles
|
|
683
726
|
|
|
@@ -191,7 +191,7 @@ When target status is `current_target`, follow its single native action. `ambigu
|
|
|
191
191
|
|
|
192
192
|
Preserve the negotiated failure envelope exactly. `mutation_outcome: not_started` proves no mutation. 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. Never choose a lineage merely because output was lost.
|
|
193
193
|
|
|
194
|
-
Before authority access, `mutation_outcome: not_started` means no lineage was created. In the historical lane only, RESET and RECOVER
|
|
194
|
+
Before authority access, `mutation_outcome: not_started` means no lineage was created. In the historical lane only, authorized RESET and RECOVER route to the audited native `gentle-ai review reclaim` and `gentle-ai review recover` operations; missing native inputs return `native-input-required` and are never invented, and INSPECT follows every committed native recovery record.
|
|
195
195
|
|
|
196
196
|
Ordinary review runs the selected zero, one, or four lenses exactly once against `initial_review_tree`.
|
|
197
197
|
|
|
@@ -227,9 +227,9 @@ Judgment Day alone may iterate discovery and scoped re-judgment, for at most two
|
|
|
227
227
|
|
|
228
228
|
Findings surviving round two escalate; no third-round transition exists.
|
|
229
229
|
|
|
230
|
-
Graph-v1 ordinary authority remains readable
|
|
230
|
+
Graph-v1 ordinary authority remains readable and gate-valid but read-only. Legacy graph bundle export/import is retired. Judgment Day remains mutable on graph-v1, and native target status owns mixed-authority ambiguity and maintainer action.
|
|
231
231
|
|
|
232
|
-
|
|
232
|
+
Native compact gate validation is read-only and double-checks authority, target, publication refs, and evidence immediately before allow. Pi then registers one exact one-shot command authorization and rederives the target at bash time. The Pi-owned publication-gate module isolates typed targets, remote binding, release projection, and publication rechecks from graph-v1 authority storage; graph receipt validation remains reachable only for historical graph authority and explicit Judgment Day.
|
|
233
233
|
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.
|
|
234
234
|
Major and post-incident releases require explicit extraordinary review even when fast-path checks pass.
|
|
235
235
|
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "gentle-ai.review-integration.failure/v1",
|
|
3
|
+
"contract": "gentle-ai.review-integration/v1",
|
|
4
|
+
"operation": "review.bind_sdd",
|
|
5
|
+
"phase": "pre_native",
|
|
6
|
+
"code": "binding_revision_conflict",
|
|
7
|
+
"message": "The expected SDD review binding revision does not match the current native binding.",
|
|
8
|
+
"mutation_outcome": "not_started",
|
|
9
|
+
"authority_applicability": "current_target",
|
|
10
|
+
"retry_safe": true,
|
|
11
|
+
"replayability": "not_replayable",
|
|
12
|
+
"lineage_id": "review-binding-conflict-fixture",
|
|
13
|
+
"required_inputs": [
|
|
14
|
+
"change",
|
|
15
|
+
"lineage_id",
|
|
16
|
+
"expected_binding_revision"
|
|
17
|
+
],
|
|
18
|
+
"next_action": "review.bind_sdd",
|
|
19
|
+
"context": {
|
|
20
|
+
"binding_revision": {
|
|
21
|
+
"expected": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
22
|
+
"current": ""
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -156,6 +156,13 @@
|
|
|
156
156
|
"compact_v2_authority"
|
|
157
157
|
]
|
|
158
158
|
},
|
|
159
|
+
{
|
|
160
|
+
"name": "native_next_transition",
|
|
161
|
+
"supported": true,
|
|
162
|
+
"requires": [
|
|
163
|
+
"target_scoped_status"
|
|
164
|
+
]
|
|
165
|
+
},
|
|
159
166
|
{
|
|
160
167
|
"name": "risk_reasons",
|
|
161
168
|
"supported": true,
|
|
@@ -172,6 +179,44 @@
|
|
|
172
179
|
}
|
|
173
180
|
]
|
|
174
181
|
},
|
|
182
|
+
"bootstrap": {
|
|
183
|
+
"command": "gentle-ai review status --cwd \u003crepo\u003e --contract gentle-ai.review-integration/v1 --next-transition",
|
|
184
|
+
"target_selector_variants": [
|
|
185
|
+
{
|
|
186
|
+
"target_type": "staged",
|
|
187
|
+
"arguments": [
|
|
188
|
+
"--projection",
|
|
189
|
+
"staged"
|
|
190
|
+
]
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"target_type": "base_ref",
|
|
194
|
+
"arguments": [
|
|
195
|
+
"--base-ref",
|
|
196
|
+
"\u003cref\u003e"
|
|
197
|
+
]
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"target_type": "workspace_overlay_base_ref",
|
|
201
|
+
"arguments": [
|
|
202
|
+
"--workspace-overlay",
|
|
203
|
+
"--base-ref",
|
|
204
|
+
"\u003cref\u003e"
|
|
205
|
+
]
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"target_type": "workspace_overlay_base_tree",
|
|
209
|
+
"arguments": [
|
|
210
|
+
"--workspace-overlay",
|
|
211
|
+
"--base-tree",
|
|
212
|
+
"\u003ctree\u003e"
|
|
213
|
+
]
|
|
214
|
+
}
|
|
215
|
+
],
|
|
216
|
+
"required_feature": "native_next_transition",
|
|
217
|
+
"unsupported_outcome": "unsupported-capability",
|
|
218
|
+
"parent_only": true
|
|
219
|
+
},
|
|
175
220
|
"compatibility": {
|
|
176
221
|
"minimum_protocol_major": 1,
|
|
177
222
|
"maximum_protocol_major": 1,
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "gentle-ai.review-integration.capabilities/v1.2",
|
|
3
|
+
"contract": "gentle-ai.review-integration/v1",
|
|
4
|
+
"protocol": {
|
|
5
|
+
"major": 1,
|
|
6
|
+
"minor": 2
|
|
7
|
+
},
|
|
8
|
+
"package": {
|
|
9
|
+
"name": "gentle-ai",
|
|
10
|
+
"version": "2.1.7-test",
|
|
11
|
+
"release_channel": "prerelease"
|
|
12
|
+
},
|
|
13
|
+
"build": {
|
|
14
|
+
"id": "sha256:444a9f0608eb22c4697fd2092f3afcfab040c0918343e7e04087730fd33fd5e1",
|
|
15
|
+
"go_version": "go1.25.10",
|
|
16
|
+
"module_version": "v2.1.7",
|
|
17
|
+
"vcs": "git",
|
|
18
|
+
"vcs_revision": "0123456789abcdef0123456789abcdef01234567",
|
|
19
|
+
"vcs_time": "2026-07-15T18:00:00Z",
|
|
20
|
+
"vcs_modified": "false"
|
|
21
|
+
},
|
|
22
|
+
"executable": {
|
|
23
|
+
"sha256": "sha256:dcc846103b16d365eaeeb9d7f289c23fc4f2897f23def1cb3fe7f05557b64705",
|
|
24
|
+
"evidence": "self-reported",
|
|
25
|
+
"verification": "compare-with-published-manifest"
|
|
26
|
+
},
|
|
27
|
+
"operations": [
|
|
28
|
+
"review.bind_sdd",
|
|
29
|
+
"review.capabilities",
|
|
30
|
+
"review.finalize",
|
|
31
|
+
"review.start",
|
|
32
|
+
"review.status",
|
|
33
|
+
"review.validate"
|
|
34
|
+
],
|
|
35
|
+
"gates": [
|
|
36
|
+
"post-apply",
|
|
37
|
+
"pre-commit",
|
|
38
|
+
"pre-push",
|
|
39
|
+
"pre-pr",
|
|
40
|
+
"release"
|
|
41
|
+
],
|
|
42
|
+
"projections": [
|
|
43
|
+
"staged",
|
|
44
|
+
"workspace"
|
|
45
|
+
],
|
|
46
|
+
"schemas": [
|
|
47
|
+
"gentle-ai.review-authority-status/v1",
|
|
48
|
+
"gentle-ai.review-gate-request/v1",
|
|
49
|
+
"gentle-ai.review-integration.capabilities/v1.2",
|
|
50
|
+
"gentle-ai.review-integration.failure/v1",
|
|
51
|
+
"gentle-ai.review-integration.operation/v1",
|
|
52
|
+
"gentle-ai.review-integration.projection/v1",
|
|
53
|
+
"gentle-ai.review-integration.start/v1",
|
|
54
|
+
"gentle-ai.review-integration.status/v1",
|
|
55
|
+
"gentle-ai.review-receipt/v1",
|
|
56
|
+
"gentle-ai.review-receipt/v2",
|
|
57
|
+
"gentle-ai.review-result-artifact/v1",
|
|
58
|
+
"gentle-ai.review-targeted-validation-request/v1",
|
|
59
|
+
"https://gentle-ai.dev/schema/review/refuter/v1",
|
|
60
|
+
"https://gentle-ai.dev/schema/review/reviewer/v1",
|
|
61
|
+
"https://gentle-ai.dev/schema/review/validator/v1"
|
|
62
|
+
],
|
|
63
|
+
"features": {
|
|
64
|
+
"mandatory": [
|
|
65
|
+
{
|
|
66
|
+
"name": "compact_v2_authority",
|
|
67
|
+
"supported": true,
|
|
68
|
+
"requires": []
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "exact_receipt_replay",
|
|
72
|
+
"supported": true,
|
|
73
|
+
"requires": [
|
|
74
|
+
"compact_v2_authority"
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "five_delivery_gates",
|
|
79
|
+
"supported": true,
|
|
80
|
+
"requires": [
|
|
81
|
+
"compact_v2_authority"
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"name": "immutable_snapshot",
|
|
86
|
+
"supported": true,
|
|
87
|
+
"requires": []
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"name": "legacy_v1_target_scoped_read_only",
|
|
91
|
+
"supported": true,
|
|
92
|
+
"requires": [
|
|
93
|
+
"target_scoped_status"
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"name": "repository_independent_capabilities",
|
|
98
|
+
"supported": true,
|
|
99
|
+
"requires": []
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"name": "restart_safe_projection",
|
|
103
|
+
"supported": true,
|
|
104
|
+
"requires": [
|
|
105
|
+
"target_scoped_status"
|
|
106
|
+
]
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"name": "sdd_receipt_binding",
|
|
110
|
+
"supported": true,
|
|
111
|
+
"requires": [
|
|
112
|
+
"compact_v2_authority"
|
|
113
|
+
]
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"name": "target_scoped_status",
|
|
117
|
+
"supported": true,
|
|
118
|
+
"requires": [
|
|
119
|
+
"repository_independent_capabilities"
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"name": "uniform_failure_envelope",
|
|
124
|
+
"supported": true,
|
|
125
|
+
"requires": [
|
|
126
|
+
"repository_independent_capabilities"
|
|
127
|
+
]
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
"optional": [
|
|
131
|
+
{
|
|
132
|
+
"name": "base_ref_workspace_overlay",
|
|
133
|
+
"supported": true,
|
|
134
|
+
"requires": [
|
|
135
|
+
"immutable_snapshot",
|
|
136
|
+
"restart_safe_projection"
|
|
137
|
+
]
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"name": "bounded_process_waits",
|
|
141
|
+
"supported": true,
|
|
142
|
+
"requires": [
|
|
143
|
+
"uniform_failure_envelope"
|
|
144
|
+
]
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"name": "exact_gate_receipt_discovery",
|
|
148
|
+
"supported": true,
|
|
149
|
+
"requires": [
|
|
150
|
+
"five_delivery_gates"
|
|
151
|
+
]
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"name": "native_frozen_candidate_context",
|
|
155
|
+
"supported": true,
|
|
156
|
+
"requires": [
|
|
157
|
+
"immutable_snapshot"
|
|
158
|
+
]
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"name": "native_low_risk_verification",
|
|
162
|
+
"supported": true,
|
|
163
|
+
"requires": [
|
|
164
|
+
"compact_v2_authority"
|
|
165
|
+
]
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"name": "native_next_transition",
|
|
169
|
+
"supported": true,
|
|
170
|
+
"requires": [
|
|
171
|
+
"target_scoped_status"
|
|
172
|
+
]
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"name": "opaque_repository_context",
|
|
176
|
+
"supported": true,
|
|
177
|
+
"requires": [
|
|
178
|
+
"compact_v2_authority",
|
|
179
|
+
"native_next_transition"
|
|
180
|
+
]
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"name": "provider_targeted_validation_request",
|
|
184
|
+
"supported": true,
|
|
185
|
+
"requires": [
|
|
186
|
+
"compact_v2_authority",
|
|
187
|
+
"native_next_transition"
|
|
188
|
+
]
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"name": "risk_reasons",
|
|
192
|
+
"supported": true,
|
|
193
|
+
"requires": [
|
|
194
|
+
"repository_independent_capabilities"
|
|
195
|
+
]
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"name": "scope_change_diagnostics",
|
|
199
|
+
"supported": true,
|
|
200
|
+
"requires": [
|
|
201
|
+
"uniform_failure_envelope"
|
|
202
|
+
]
|
|
203
|
+
}
|
|
204
|
+
]
|
|
205
|
+
},
|
|
206
|
+
"bootstrap": {
|
|
207
|
+
"command": "gentle-ai review status --cwd \u003crepo\u003e --contract gentle-ai.review-integration/v1 --next-transition",
|
|
208
|
+
"target_selector_variants": [
|
|
209
|
+
{
|
|
210
|
+
"target_type": "staged",
|
|
211
|
+
"arguments": [
|
|
212
|
+
"--projection",
|
|
213
|
+
"staged"
|
|
214
|
+
]
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"target_type": "base_ref",
|
|
218
|
+
"arguments": [
|
|
219
|
+
"--base-ref",
|
|
220
|
+
"\u003cref\u003e"
|
|
221
|
+
]
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"target_type": "workspace_overlay_base_ref",
|
|
225
|
+
"arguments": [
|
|
226
|
+
"--workspace-overlay",
|
|
227
|
+
"--base-ref",
|
|
228
|
+
"\u003cref\u003e"
|
|
229
|
+
]
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"target_type": "workspace_overlay_base_tree",
|
|
233
|
+
"arguments": [
|
|
234
|
+
"--workspace-overlay",
|
|
235
|
+
"--base-tree",
|
|
236
|
+
"\u003ctree\u003e"
|
|
237
|
+
]
|
|
238
|
+
}
|
|
239
|
+
],
|
|
240
|
+
"required_feature": "native_next_transition",
|
|
241
|
+
"unsupported_outcome": "unsupported-capability",
|
|
242
|
+
"parent_only": true
|
|
243
|
+
},
|
|
244
|
+
"compatibility": {
|
|
245
|
+
"minimum_protocol_major": 1,
|
|
246
|
+
"maximum_protocol_major": 1,
|
|
247
|
+
"additive_minor_policy": "optional-fields-only",
|
|
248
|
+
"unknown_mandatory": "reject",
|
|
249
|
+
"unknown_optional": "ignore",
|
|
250
|
+
"modes": [
|
|
251
|
+
"compact-v2",
|
|
252
|
+
"legacy-v1"
|
|
253
|
+
],
|
|
254
|
+
"legacy_window": {
|
|
255
|
+
"mode": "legacy-v1",
|
|
256
|
+
"state": "active",
|
|
257
|
+
"read_only": true,
|
|
258
|
+
"deprecation_started": true,
|
|
259
|
+
"removal": "not-scheduled",
|
|
260
|
+
"minimum_compatibility_releases": 1
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|