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
package/README.md
CHANGED
|
@@ -15,10 +15,12 @@
|
|
|
15
15
|
|
|
16
16
|
`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.
|
|
17
17
|
|
|
18
|
-
Pi already has strong tools. `gentle-pi` adds the discipline for using them well,
|
|
18
|
+
Pi already has strong tools. `gentle-pi` adds the discipline for using them well, keeps review evidence Git-derived instead of agent narration, and leaves delivery decisions to ordinary repository policy.
|
|
19
19
|
|
|
20
20
|
`gentle-pi` is the Pi-native package from the [Gentle-AI ecosystem](https://github.com/Gentleman-Programming/gentle-ai), built by [Gentleman Programming](https://github.com/Gentleman-Programming): the broader open-source project for turning AI coding agents into disciplined engineering environments with SDD workflows, skills, memory integrations, model routing, and review guardrails across multiple agents.
|
|
21
21
|
|
|
22
|
+
> **Trademark notice:** The gentle-pi name and logo are trademarks of Alan Buscaglia. The MIT License applies to the code; it does not permit implying endorsement or official affiliation. See [TRADEMARKS.md](TRADEMARKS.md).
|
|
23
|
+
|
|
22
24
|
Follow the project and the community around it:
|
|
23
25
|
|
|
24
26
|
- GitHub: [Gentleman-Programming](https://github.com/Gentleman-Programming)
|
|
@@ -49,7 +51,7 @@ Most coding-agent sessions fail for operational reasons, not model reasons:
|
|
|
49
51
|
| **Configurable startup intro** | Adds a rose/text-logo startup intro, compact runtime panel, color presets, and commands to hide or show the decorative parts. |
|
|
50
52
|
| **Work routing discipline** | Small tasks stay inline. Context-heavy exploration can be delegated. Large or risky changes go through SDD/OpenSpec. |
|
|
51
53
|
| **SDD/OpenSpec assets** | Installs phase agents and chains for `init`, `onboard`, `explore`, `proposal`, `spec`, `design`, `tasks`, `apply`, `verify`, `sync`, and `archive`. |
|
|
52
|
-
| **Lazy SDD preflight** |
|
|
54
|
+
| **Lazy SDD preflight** | Resolves SDD mode, artifact store, delivery strategy, and review budget once per session; prompts only when a choice is genuinely unresolved. |
|
|
53
55
|
| **Subagent orchestration** | Keeps one parent session responsible while child agents explore, implement, test, or review with focused context. |
|
|
54
56
|
| **Strict TDD support** | When project config declares a test command, apply/verify phases must record RED → GREEN → TRIANGULATE → REFACTOR evidence. |
|
|
55
57
|
| **Reviewer protection** | Surfaces review workload risk before a task turns into an oversized PR. |
|
|
@@ -57,10 +59,12 @@ Most coding-agent sessions fail for operational reasons, not model reasons:
|
|
|
57
59
|
| **Skill discovery registry** | Maintains `.atl/skill-registry.md` from project and user skills so review/comment/PR workflows do not silently miss the right skill. |
|
|
58
60
|
| **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
61
|
| **Delivery skills** | Includes issue-first PRs, chained PRs, work-unit commits, cognitive docs, comment writing, and Judgment Day review. |
|
|
60
|
-
| **Bounded native review** | Freezes one candidate, dispatches only controller-selected lenses, records native authority
|
|
61
|
-
| **Verified native runtime** | Provisions the exact package-local Gentle AI v2.
|
|
62
|
+
| **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.5.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. |
|
|
62
64
|
| **Runtime safety** | Blocks destructive shell commands, asks for confirmation for sensitive operations, and blocks direct read/write/edit access to sensitive paths. |
|
|
63
65
|
|
|
66
|
+
**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.
|
|
67
|
+
|
|
64
68
|
## Install
|
|
65
69
|
|
|
66
70
|
```bash
|
|
@@ -79,7 +83,7 @@ pi install npm:gentle-pi@0.14.0
|
|
|
79
83
|
pi install npm:gentle-pi@latest
|
|
80
84
|
```
|
|
81
85
|
|
|
82
|
-
The latest RDD package installs Gentle AI only into its private `.gentle-ai/` directory. Darwin and Linux use pinned
|
|
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.5.0; raw prerelease binaries only under a prerelease pin). Windows x64 and arm64 build the exact `v2.5.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.
|
|
83
87
|
|
|
84
88
|
Recommended companion packages:
|
|
85
89
|
|
|
@@ -107,19 +111,18 @@ pi
|
|
|
107
111
|
/gentle:status Check package, SDD assets, OpenSpec, and global model config.
|
|
108
112
|
/gentle:doctor Run read-only diagnostics for SDD assets, config, tools, and guards.
|
|
109
113
|
/gentle:sdd-preflight Run or reuse the session SDD preflight explicitly.
|
|
110
|
-
/sdd-init
|
|
114
|
+
/gentle-sdd-init Create or refresh openspec/config.yaml (openspec/both stores only).
|
|
111
115
|
/gentle:models Assign global model/effort routing to SDD/custom agents.
|
|
112
116
|
/gentle:persona Switch between gentleman and neutral persona modes.
|
|
117
|
+
/gentle:background-subagents Show or set the managed background-subagents policy, with its deciding source.
|
|
113
118
|
/gentle:banner Configure startup rose, text logo, and color preset.
|
|
114
|
-
/gentle:commit-status Inspect an unresolved durable commit transaction.
|
|
115
|
-
/gentle:commit-abort Abandon safe recovery state without changing HEAD or the index.
|
|
116
119
|
```
|
|
117
120
|
|
|
118
121
|
Typical flow:
|
|
119
122
|
|
|
120
123
|
1. Open Pi in your repo.
|
|
121
124
|
2. Run `/gentle:status`.
|
|
122
|
-
3. Run `/sdd-init` once per project, or when test/project capabilities change. This also runs the session SDD preflight.
|
|
125
|
+
3. Run `/gentle-sdd-init` once per project, or when test/project capabilities change. This also runs the session SDD preflight.
|
|
123
126
|
4. For a substantial change, ask Pi to use SDD. Natural-language requests are classified by the parent agent, not by brittle runtime regexes.
|
|
124
127
|
5. Review the phase artifacts instead of trusting floating chat context.
|
|
125
128
|
|
|
@@ -128,10 +131,10 @@ Typical flow:
|
|
|
128
131
|
1. **Install and inspect.** Install `gentle-pi`, open Pi in the target repository, then run `/gentle:status` or `/gentle:doctor`.
|
|
129
132
|
2. **Plan when risk justifies it.** Small work stays direct; substantial work uses SDD with Engram, OpenSpec, or both so requirements and decisions survive compaction.
|
|
130
133
|
3. **Build with evidence.** One focused writer implements the approved scope. When Strict TDD is available, apply and verify preserve RED → GREEN → TRIANGULATE → REFACTOR evidence.
|
|
131
|
-
4. **
|
|
132
|
-
5. **Deliver
|
|
134
|
+
4. **Use runtime-owned RDD when available.** Gentle AI supplies any runtime-specific review instructions; this package does not recreate a lifecycle in documentation or prompts.
|
|
135
|
+
5. **Deliver through ordinary repository policy.** Review and Judgment Day evidence is informational only; Pi never creates a delivery route, authorization, target rederivation, or receipt gate.
|
|
133
136
|
|
|
134
|
-
> **Trust what the system can derive, not what an agent claims.** Agents analyze the candidate. The package-local Gentle AI runtime owns scope, risk, findings,
|
|
137
|
+
> **Trust what the system can derive, not what an agent claims.** Agents analyze the candidate. The package-local Gentle AI runtime owns scope, risk, findings, and review authority. Review outcomes inform delivery; ordinary repository policy decides delivery commands. Dangerous-command safety and destructive-review consent remain independent. See Gentle AI's [review authority threat model](https://github.com/Gentleman-Programming/gentle-ai/blob/main/docs/review-authority-threat-model.md) and [Chapter 21 — Verifiable Trust](https://the-amazing-gentleman-programming-book.vercel.app/en/book/Chapter21_Verifiable-Trust).
|
|
135
138
|
|
|
136
139
|
## How the harness decides what to do
|
|
137
140
|
|
|
@@ -153,25 +156,23 @@ The goal is not ceremony. The goal is to avoid accidental chaos. Once a task sto
|
|
|
153
156
|
| --------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
|
|
154
157
|
| Reading 4+ files to understand a flow | Launch `scout`, `context-builder`, or the closest read-only mapping subagent. |
|
|
155
158
|
| Touching 2+ non-trivial code files | Delegate one writer; do not continue inline unless delegation is unavailable. |
|
|
156
|
-
| Commit, push, or PR after code changes |
|
|
157
|
-
| Wrong cwd, worktree/git accident, merge recovery, confusing test/env issue | Stop, preserve the
|
|
159
|
+
| Commit, push, or PR after code changes | Follow the loaded native instruction, or ordinary repository policy when none is supplied. |
|
|
160
|
+
| Wrong cwd, worktree/git accident, merge recovery, confusing test/env issue | Stop, preserve the affected scope, and investigate separately before resuming. |
|
|
158
161
|
| Long monolithic session with accumulating complexity, roughly 20 tool calls, 5 exploratory reads, or 2 non-mechanical edits | Pause and delegate the remaining work, or stop and explain the exact blocker. |
|
|
159
162
|
|
|
160
163
|
The intended balanced loop for a bounded bugfix is:
|
|
161
164
|
|
|
162
165
|
```text
|
|
163
|
-
parent git/status + clarify →
|
|
166
|
+
parent git/status + clarify → one worker writes authorized fixes → focused verification → parent reports
|
|
164
167
|
```
|
|
165
168
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
Review actors are dispatched only through parent `subagent_run` calls in `mode: "task"`. Before execution, the controller verifies every entry, content hash, mode, root, and index in one selected immutable candidate tree per requested lens, then appends one bounded controller-owned block containing only the Git-derived base-to-candidate changed scope. That compact scope groups present paths by exact candidate mode and lists deletions explicitly; it fails closed when the changed scope itself exceeds the dispatch bound. Mixed batches, unselected/missing/stale views, user-supplied candidate-view text, unsafe paths, and non-task dispatches fail closed; lean resources and actor tool allowlists remain unchanged.
|
|
169
|
+
`scout`/`context-builder` save parent context by compressing broad exploration. `worker` preserves a single writer thread. Any RDD-specific actor behavior belongs to the runtime instruction supplied by Gentle AI, not to this README.
|
|
169
170
|
|
|
170
171
|
### Review authority recovery and reset safety
|
|
171
172
|
|
|
172
173
|
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.
|
|
173
174
|
|
|
174
|
-
`gentle_review abandon`, `quarantine-legacy`, and `reconcile-authority` remain explicit v2.1.11 maintenance routes. Pi derives and displays the published
|
|
175
|
+
`gentle_review abandon`, `quarantine-legacy`, and `reconcile-authority` remain explicit v2.1.11 maintenance routes. Pi derives and displays the published nine-line `gentle-ai.review-abandon-authorization/v2` binding only for a caller-specified compact lineage, revision, snapshot identity, and discarded-work summary (captured lens results, findings presence, evidence-record presence); the native CLI re-derives non-terminal compact-v2 eligibility and the exact discarded work before accepting it. 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.
|
|
175
176
|
|
|
176
177
|
`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.
|
|
177
178
|
|
|
@@ -181,11 +182,13 @@ Reconciliation is intentionally narrow: native code may quarantine only the boun
|
|
|
181
182
|
|
|
182
183
|
`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.
|
|
183
184
|
|
|
184
|
-
Native
|
|
185
|
+
Native lifecycle status remains informational. VALIDATE does not authorize delivery; commit, push, PR, and release commands follow ordinary repository policy. Recovery grants no new budget, and legacy graph bundle export/import is retired.
|
|
185
186
|
|
|
186
187
|
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.
|
|
187
188
|
|
|
188
|
-
|
|
189
|
+
### Review Lens Selection (architecture reference)
|
|
190
|
+
|
|
191
|
+
`reviewer` is not an installed subagent name. It is historical routing vocabulary, not a static instruction. When a runtime-specific Gentle AI instruction applies, it alone determines whether any concrete lens is used:
|
|
189
192
|
|
|
190
193
|
| Context | Review lens |
|
|
191
194
|
| --- | --- |
|
|
@@ -195,11 +198,11 @@ This is the post-U8 boundary, not the final architecture. [Issue #191](https://g
|
|
|
195
198
|
| Security, permissions, data exposure/loss, architecture, dependencies | `review-risk` |
|
|
196
199
|
| Large PR, hot path, or >400 changed lines | Full 4R: `review-risk`, `review-resilience`, `review-readability`, `review-reliability` |
|
|
197
200
|
|
|
198
|
-
|
|
201
|
+
The former compact controller classified documentation/comment/formatting-only changes as zero-lens, standard changes as one dominant lens, and higher-risk paths as full 4R. This describes compatibility architecture only; never derive or run those choices from this README.
|
|
199
202
|
|
|
200
|
-
###
|
|
203
|
+
### Review authority architecture (reference only)
|
|
201
204
|
|
|
202
|
-
|
|
205
|
+
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.
|
|
203
206
|
|
|
204
207
|
```mermaid
|
|
205
208
|
flowchart TD
|
|
@@ -228,44 +231,23 @@ flowchart TD
|
|
|
228
231
|
V -->|Fails, malformed, or out of scope| E1["escalated"]
|
|
229
232
|
end
|
|
230
233
|
|
|
231
|
-
A1 -->
|
|
232
|
-
|
|
233
|
-
PC --> G1{"durable commit transaction"}
|
|
234
|
-
G1 --> HK["Run effective pre-commit hook once"]
|
|
235
|
-
HK --> NV{"validate exact post-hook tree"}
|
|
236
|
-
NV -->|allow| CM["Commit through hook proxies and prove HEAD tree"]
|
|
237
|
-
NV -->|scope changed| N["Review post-hook tree; exact retry skips completed hook"]
|
|
238
|
-
NV -->|invalidated or escalated| X
|
|
239
|
-
CM --> G2{"pre-push validate"}
|
|
240
|
-
G2 -->|allow| PS["Push"]
|
|
241
|
-
G2 -->|deny| X
|
|
242
|
-
PS --> CI["Required CI on exact remote SHA"]
|
|
243
|
-
CI -->|success| RL{"Release gate"}
|
|
244
|
-
CI -->|pending or failed| X
|
|
245
|
-
RL -->|Exact patch tag on protected main; no fresh risk evidence| FP["Zero-actor release fast path"]
|
|
246
|
-
RL -->|Receipt-bound release evidence| RV["Native receipt validation"]
|
|
247
|
-
RL -->|Major, post-incident, stale, or unprovable| X
|
|
248
|
-
FP --> PUB["Publish release"]
|
|
249
|
-
RV -->|allow| PUB
|
|
250
|
-
RV -->|deny| X
|
|
251
|
-
N --> H
|
|
234
|
+
A1 --> O["Review outcome is informational"]
|
|
235
|
+
E1 --> O
|
|
252
236
|
```
|
|
253
237
|
|
|
254
|
-
|
|
238
|
+
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.
|
|
255
239
|
|
|
256
|
-
Native contract pairing is exact: this adapter resolves only the integrity-verified package-local Gentle AI v2.
|
|
240
|
+
Native contract pairing is exact: this adapter resolves only the integrity-verified package-local Gentle AI v2.5.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.
|
|
257
241
|
|
|
258
|
-
|
|
242
|
+
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.
|
|
259
243
|
|
|
260
244
|
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.
|
|
261
245
|
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
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.
|
|
246
|
+
Once the pinned gentle-ai runtime (currently v2.5.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.
|
|
265
247
|
|
|
266
248
|
### FINALIZE wrapper input
|
|
267
249
|
|
|
268
|
-
`gentle_review` accepts `input` as a JSON-serialized object string. For initial results, provide `review_result.lens_results[]`; each selected lens appears exactly once with `lens`, `findings`, and non-empty `evidence`. A clean lens uses `findings: []`. `final_evidence`
|
|
250
|
+
`gentle_review` accepts `input` as a JSON-serialized object string. For initial results, provide `review_result.lens_results[]`; each selected lens appears exactly once with `lens`, `findings`, and non-empty `evidence`. A clean lens uses `findings: []`. Pair `final_evidence` with exactly one of `final_verification_passed` or `final_verification_outcome`.
|
|
269
251
|
|
|
270
252
|
```json
|
|
271
253
|
{
|
|
@@ -319,30 +301,23 @@ Judgment Day alone may iterate discovery and scoped re-judgment, for at most two
|
|
|
319
301
|
|
|
320
302
|
Findings surviving round two escalate; no third-round transition exists.
|
|
321
303
|
|
|
322
|
-
Native
|
|
323
|
-
|
|
324
|
-
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.
|
|
325
|
-
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.
|
|
326
|
-
|
|
327
|
-
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.
|
|
328
|
-
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.
|
|
329
|
-
Major and post-incident releases require explicit extraordinary review even when fast-path checks pass.
|
|
304
|
+
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.
|
|
330
305
|
|
|
331
|
-
|
|
306
|
+
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.
|
|
332
307
|
|
|
333
|
-
|
|
308
|
+
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.
|
|
334
309
|
|
|
335
|
-
|
|
310
|
+
The Pi host relay bounds each locked-down reviewer subprocess by materialized prompt size rather than by one fixed number: a 15-minute floor plus 15 minutes per mebibyte of prompt, clamped to a 2-hour ceiling. Set `GENTLE_PI_REVIEW_RELAY_PI_TIMEOUT_MS` to a positive decimal to replace that derived bound with your own; malformed values are ignored and the same 2-hour ceiling still applies, so no configuration turns a foreground finalize into an unbounded child process. A reviewer killed by the bound reports `pi-host-relay-timeout` with the elapsed time and the limit it was measured against, and it explicitly does not ask you to relaunch the identical slot — that would re-spend the model tokens to reach the same wall. Reviewer results admitted earlier in the same finalize stay admitted and are not re-run.
|
|
336
311
|
|
|
337
|
-
`review-refuter`
|
|
312
|
+
Adversarial review roles (the refuter and the targeted validator) are never Pi-authored: the provider renders self-contained `review.capture-refuter` / `review.capture-validation` vectors and Go runs its own locked-down `pi` process on them. Package agent assets remain a package-managed isolated installation. Project and user overrides may shadow a package asset; `gentle-pi` preserves those definitions and does not claim their effective permissions are package-compliant.
|
|
338
313
|
|
|
339
314
|
## SDD/OpenSpec flow
|
|
340
315
|
|
|
341
316
|
```text
|
|
342
317
|
init
|
|
343
318
|
↓
|
|
344
|
-
explore → proposal → spec ─┬→ design ─┐
|
|
345
|
-
|
|
319
|
+
explore → research (optional) → proposal → spec ─┬→ design ─┐
|
|
320
|
+
└─────────┴→ tasks → apply → verify → sync → archive
|
|
346
321
|
```
|
|
347
322
|
|
|
348
323
|
The main loop is intentionally file-backed when you choose `openspec` or `both`:
|
|
@@ -415,7 +390,7 @@ Engram-only mode is different by design: Engram is working memory and does not m
|
|
|
415
390
|
|
|
416
391
|
## SDD preflight and project files
|
|
417
392
|
|
|
418
|
-
`gentle-pi` does not require SDD agents to be copied into every project. The package ensures global Pi SDD assets exist under the Pi agent home and treats project-local files only as overrides/debug copies. Slash SDD flows such as `/sdd-*`, `/sdd-init`, and the explicit `/gentle:sdd-preflight` command run a lazy preflight and
|
|
393
|
+
`gentle-pi` does not require SDD agents to be copied into every project. The package ensures global Pi SDD assets exist under the Pi agent home and treats project-local files only as overrides/debug copies. Slash SDD flows such as `/sdd-*`, `/gentle-sdd-init`, and the explicit `/gentle:sdd-preflight` command run a lazy preflight and resolve session-scoped SDD preferences. For natural-language requests, the parent agent decides whether the work should use SDD and must run/reuse `/gentle:sdd-preflight` before continuing.
|
|
419
394
|
|
|
420
395
|
```text
|
|
421
396
|
~/.pi/agent/agents/sdd-*.md
|
|
@@ -423,12 +398,9 @@ Engram-only mode is different by design: Engram is working memory and does not m
|
|
|
423
398
|
~/.pi/agent/gentle-ai/support/strict-tdd*.md
|
|
424
399
|
```
|
|
425
400
|
|
|
426
|
-
|
|
401
|
+
Preflight values resolve in this order: explicit current user/session choice, valid persisted preference, capability or already-selected strategy constraint, canonical default, then a prompt only when genuinely unresolved. Resolved values are reused for later SDD flows in the session.
|
|
427
402
|
|
|
428
|
-
|
|
429
|
-
- artifact store: `openspec`, or `engram`/`both` when callable memory tools are available;
|
|
430
|
-
- PR chaining strategy: `auto-forecast`, `ask-always`, `single-pr-default`, or `force-chained`;
|
|
431
|
-
- review budget line threshold.
|
|
403
|
+
Canonical values are `auto` execution mode, `openspec` artifact store, `ask-on-risk` delivery strategy, and a `400` changed-line review threshold. The delivery strategy domain is `ask-on-risk`, `auto-chain`, `single-pr`, or `exception-ok`; `chain_strategy` remains deferred until chaining is selected. `exception-ok` requires explicit `size:exception` acceptance and is never inferred. Consent, authorization, security, destructive/publishing, interactive phase approval, and ambiguous-scope gates remain human-controlled.
|
|
432
404
|
|
|
433
405
|
It does **not** overwrite existing global assets unless you explicitly run:
|
|
434
406
|
|
|
@@ -502,7 +474,7 @@ Skill discovery is a guardrail, not a workflow router: it helps Pi load the righ
|
|
|
502
474
|
|
|
503
475
|
Packaged skills include `cognitive-doc-design`, `comment-writer`, `gentle-ai-judgment-day`, `gentle-ai-skill-creator`, `gentle-ai-skill-improver`, and the other delivery/review skills under `skills/`. SDD init is installed as the packaged `sdd-init` runtime agent under `assets/agents/` and refreshed with the SDD assets.
|
|
504
476
|
|
|
505
|
-
Compatibility: the package keeps the existing skill folders (`skills/branch-pr`, `skills/judgment-day`, `skills/skill-creator`) but their exported frontmatter names are prefixed to avoid collisions with user/global skills. Treat former package names such as `branch-pr`, `judgment-day`,
|
|
477
|
+
Compatibility: the package keeps the existing skill folders (`skills/branch-pr`, `skills/cognitive-doc-design`, `skills/comment-writer`, `skills/judgment-day`, `skills/skill-creator`, `skills/skill-registry`, and `skills/work-unit-commits`) but their exported frontmatter names are prefixed to avoid collisions with user/global skills. Treat former package names such as `branch-pr`, `cognitive-doc-design`, `comment-writer`, `judgment-day`, `skill-creator`, `skill-registry`, and `work-unit-commits` as legacy aliases in prose; runtime skill selection should use `gentle-ai-branch-pr`, `gentle-ai-cognitive-doc-design`, `gentle-ai-comment-writer`, `gentle-ai-judgment-day`, `gentle-ai-skill-creator`, `gentle-ai-skill-registry`, and `gentle-ai-work-unit-commits`.
|
|
506
478
|
|
|
507
479
|
Delegation contract:
|
|
508
480
|
|
|
@@ -594,11 +566,12 @@ Legacy string entries are still accepted and treated as `model`-only config.
|
|
|
594
566
|
| `/gentle:doctor` | Runs read-only diagnostics for SDD assets, model/persona config, memory tools, and safety guards. |
|
|
595
567
|
| `/gentle:models` | Opens global model + effort assignment UI. Press `x` to export and `r` to restore saved routing. |
|
|
596
568
|
| `/gentle:persona` | Switches global persona mode, with project override support. |
|
|
569
|
+
| `/gentle:background-subagents` | Shows or sets the managed background-subagents policy (`status\|enable\|disable`), naming the source that decided it. |
|
|
597
570
|
| `/gentle:banner` | Configures startup banner rose, text logo, and color preset. |
|
|
598
571
|
| `/gentle:toggle-rose` | Toggles the startup rose. |
|
|
599
572
|
| `/gentle:toggle-text-logo` | Toggles the startup text logo. |
|
|
600
573
|
| `/gentle:banner-color` | Selects a startup banner color preset. |
|
|
601
|
-
| `/sdd-init`
|
|
574
|
+
| `/gentle-sdd-init` | Initializes or refreshes `openspec/config.yaml` (openspec/both stores only). |
|
|
602
575
|
| `/gentle:install-sdd` | Repairs missing global SDD runtime assets without overwriting files. |
|
|
603
576
|
| `/gentle:install-sdd --force` | Force-refreshes installed global SDD assets. |
|
|
604
577
|
| `/skill-registry:refresh` | Regenerates `.atl/skill-registry.md`. |
|
|
@@ -606,6 +579,29 @@ Legacy string entries are still accepted and treated as `model`-only config.
|
|
|
606
579
|
|
|
607
580
|
Package-owned global SDD runtime assets are also refreshed automatically on session start when `gentle-pi` changes. Project-local `.pi/agents` and `.pi/chains` remain manual overrides and are never overwritten by startup refresh.
|
|
608
581
|
|
|
582
|
+
### Background subagents policy
|
|
583
|
+
|
|
584
|
+
Background delegation is off unless you turn it on. The policy is user-owned: only an explicit `/gentle:background-subagents enable` or `disable` writes it, and Pi automation never toggles it.
|
|
585
|
+
|
|
586
|
+
```text
|
|
587
|
+
/gentle:background-subagents Report the effective policy, the deciding source, and the resolved capability.
|
|
588
|
+
/gentle:background-subagents enable Write "on" to the global file.
|
|
589
|
+
/gentle:background-subagents disable Write "off" to the global file.
|
|
590
|
+
```
|
|
591
|
+
|
|
592
|
+
Four sources can decide the policy, and the first hit wins:
|
|
593
|
+
|
|
594
|
+
| Priority | Source | Notes |
|
|
595
|
+
| -------- | ------------------------------------------------- | ------------------------------------------------------------ |
|
|
596
|
+
| 1 | `<cwd>/.pi/gentle-ai/background-subagents.json` | Project file. Outranks everything, including a global write. |
|
|
597
|
+
| 2 | `<configHome>/background-subagents.json` | Global file, written by `enable`/`disable`. `configHome` honors `GENTLE_PI_CONFIG_HOME` and defaults to `~/.pi/gentle-ai`. |
|
|
598
|
+
| 3 | `GENTLE_PI_BACKGROUND_SUBAGENTS` | Exactly `on` or `off`. Any other value is ignored. |
|
|
599
|
+
| 4 | Built-in default | `off`. |
|
|
600
|
+
|
|
601
|
+
Both files use the strict shape `{"schema":"gentle-pi.background-subagents/v1","policy":"on"}`. A file that is present but malformed fails closed to `off` and is **not** skipped in favor of a lower-priority source, so a typo in the project file disables background subagents rather than silently handing the decision to the global file. The command reports that case as a warning instead of an ordinary `off`.
|
|
602
|
+
|
|
603
|
+
Because the project file outranks the global one, `enable` still writes the global file but reports plainly when a project file keeps the effective policy unchanged. The resolved capability (`ready` or `absent`) reports whether `subagent_run` is actually callable in this session; a policy of `on` with capability `absent` means the subagents package is not installed.
|
|
604
|
+
|
|
609
605
|
Startup banner settings are global and default to the current pink rose + text logo. Supported color presets are `pink`, `cyan`, `yellow`, and `green`.
|
|
610
606
|
|
|
611
607
|
Startup flag:
|
|
@@ -652,10 +648,9 @@ Memory contract for SDD delegation:
|
|
|
652
648
|
|
|
653
649
|
| Path | Purpose |
|
|
654
650
|
| ------------------------------ | ---------------------------------------------------------------------------------------------------------- |
|
|
655
|
-
| `extensions/gentle-ai.ts` | Injects identity, orchestrates native review authority
|
|
651
|
+
| `extensions/gentle-ai.ts` | Injects identity, orchestrates native review authority, refreshes global SDD assets, registers commands, applies model/persona config, and enforces runtime safety. |
|
|
656
652
|
| `lib/native-review-cli.ts` | Strict package-local adapter for Gentle AI START, FINALIZE, VALIDATE, SDD binding, and status contracts. |
|
|
657
653
|
| `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). |
|
|
658
|
-
| `lib/git-commit-transaction.ts` | Durable hook/native-validation/commit/recovery transaction with publication blocking and HEAD proof. |
|
|
659
654
|
| `lib/review-candidate-view.ts` | Builds immutable changed-scope actor views while preserving full-tree, path, mode, symlink, and index integrity. |
|
|
660
655
|
| `lib/review-canonical.ts` | Permanent Pi-owned canonical JSON and domain-hash primitives for consumer-side identities. |
|
|
661
656
|
| `lib/review-repository.ts` | Permanent Pi-owned Git common-directory identity, safe Git environment, and authority-root binding. |
|
|
@@ -664,14 +659,18 @@ Memory contract for SDD delegation:
|
|
|
664
659
|
| `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. |
|
|
665
660
|
| `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. |
|
|
666
661
|
| `extensions/startup-banner.ts` | Shows and configures the startup intro, color presets, compact runtime panel, and collaboration credit. |
|
|
667
|
-
| `extensions/sdd-init.ts` | Registers `/sdd-init` for OpenSpec initialization. |
|
|
662
|
+
| `extensions/sdd-init.ts` | Registers `/gentle-sdd-init` for OpenSpec initialization. |
|
|
668
663
|
| `extensions/skill-registry.ts` | Maintains `.atl/skill-registry.md` from project/user skills and closes file watchers on shutdown. |
|
|
669
|
-
| `assets/orchestrator.md` | Parent-session orchestration contract.
|
|
664
|
+
| `assets/orchestrator.md` | Parent-session orchestration contract (always-on core). |
|
|
665
|
+
| `assets/orchestrator-delegation.md` | Lazy-loaded delegation/routing/review detail, including the mirrored gentle-ai canon. |
|
|
666
|
+
| `assets/orchestrator-memory.md` | Lazy-loaded SDD memory phase table, artifact keys, and lifecycle rule. |
|
|
667
|
+
| `assets/orchestrator-skills.md` | Lazy-loaded skill registry fallback semantics and intent-driven skill discovery. |
|
|
668
|
+
| `assets/sdd-orchestrator-workflow.md` | Lazy-loaded SDD workflow surface for the parent orchestrator. |
|
|
670
669
|
| `assets/agents/` | SDD agents installed as global Pi runtime assets. |
|
|
671
670
|
| `assets/chains/` | SDD chains installed as global Pi runtime assets. |
|
|
672
671
|
| `assets/support/` | Strict TDD support docs for apply/verify phases. |
|
|
673
672
|
| `skills/` | Gentle AI delivery and collaboration skills. |
|
|
674
|
-
| `prompts/` |
|
|
673
|
+
| `prompts/` | The `/skill-creation` prompt template. |
|
|
675
674
|
| `docs/skill-style-guide.md` | Normative style guide used by the packaged skill creation/improvement skills. |
|
|
676
675
|
| `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. |
|
|
677
676
|
| `docs/review-integration.md` | Negotiated provider/consumer contract and the current Gentle Pi adoption boundary. |
|
|
@@ -695,6 +694,36 @@ node --experimental-strip-types --check extensions/startup-banner.ts
|
|
|
695
694
|
npm pack --dry-run
|
|
696
695
|
```
|
|
697
696
|
|
|
697
|
+
### Running the cross-lane battery
|
|
698
|
+
|
|
699
|
+
The cross-lane battery (`tests/crosslane/cross-lane.mjs`) validates the adapter against a real `gentle-ai` binary, end to end and out of CI on purpose. The pinned decoder lane only ever sees vendored fixtures, so new envelope schemas and full controller sequencing are never driven through a live lifecycle before merge; the battery closes that gap.
|
|
700
|
+
|
|
701
|
+
```bash
|
|
702
|
+
pnpm test:cross-lane # requires the dev-binary override
|
|
703
|
+
pnpm test:cross-lane --with-model # adds the real Go-owned pi reviewer run (model spend)
|
|
704
|
+
```
|
|
705
|
+
|
|
706
|
+
What it checks, against live scratch repositories:
|
|
707
|
+
|
|
708
|
+
- a low-risk lifecycle: START → native-approved FINALIZE → terminal burn; the `pre-commit` gate is informational and unmanaged, not an allow decision or retained receipt;
|
|
709
|
+
- the medium-risk `consent/v3` granted round-trip through the direct decoder lane;
|
|
710
|
+
- controller sequencing: each decoded offered next step equals the native transition; correction evidence precedes Go-owned targeted validation, then native approval and terminal burn leave no retained receipt;
|
|
711
|
+
- the active audited abandon end to end, asserting the adapter builds the exact nine-line `gentle-ai.review-abandon-authorization/v2` discarded-work binding and the native gate commits the quarantine record;
|
|
712
|
+
- after a scope change, a burned approved predecessor exposes no recoverable authority; recovered-successor hydration remains covered at unit level;
|
|
713
|
+
- forward-decoder freshness: every live envelope captured from the binary must decode without unknown-key rejection, the early warning that gentle-ai main grew a field gentle-pi lacks;
|
|
714
|
+
- the default no-model lane: 13 of 14 checks pass while the real-model check is intentionally skipped; Go-owned validation uses a deterministic scratch fake `pi`, and only `--with-model` runs the real locked-down reviewer with model spend.
|
|
715
|
+
|
|
716
|
+
Prerequisites:
|
|
717
|
+
|
|
718
|
+
- A real `gentle-ai` binary selected through the dev-binary override; there is no PATH or pinned-binary fallback, and the battery refuses to run without one. Either export `GENTLE_PI_GENTLE_AI_DEV_BINARY=<absolute path>` for the session, or register a persistent override with `/gentle:dev-binary <absolute path>` (stored at `~/.pi/gentle-ai/dev-binary.json` with schema `gentle-pi.dev-binary/v1`; the environment variable takes precedence over the registration, and the binary is re-validated and re-hashed on every resolution). Any real build works: an installed release binary or a locally built gentle-ai main.
|
|
719
|
+
- A Git checkout or worktree of this repository. The battery is a contributor tool wired to the repository layout and is excluded from `pnpm test` and CI by construction; run it from the repo, not from an installed Pi package.
|
|
720
|
+
|
|
721
|
+
The battery owns one throwaway scratch root under the OS temp directory and never touches the enclosing repository. Before any review lifecycle it creates private `HOME`, XDG config/cache/data/state, temporary, and RDD state directories inside that root; it proves RDD starts `off/default`, explicitly opts in with sandbox-global RDD, and removes the complete root after the run. It never requires or changes the user's ambient RDD mode. The default run spends no model tokens; `--with-model` launches one real reviewer model run and costs model spend.
|
|
722
|
+
|
|
723
|
+
It prints one PASS/FAIL/SKIP row per check plus a note, and exits non-zero when any check fails. A check blocked by a known upstream class is reported with a `known-red` prefix instead of being hidden; it remains a failure, not a success.
|
|
724
|
+
|
|
725
|
+
Running this battery against new gentle-ai builds (release candidates or main) and reporting red checks is a valuable contribution. The sibling provider-side battery lives at `scripts/cross-lane-battery.sh` in [Gentleman-Programming/gentle-ai](https://github.com/Gentleman-Programming/gentle-ai).
|
|
726
|
+
|
|
698
727
|
Publish npm through GitHub Actions only:
|
|
699
728
|
|
|
700
729
|
```bash
|
|
@@ -20,10 +20,10 @@ Use this agent only for scoped implementation work that is too large for the par
|
|
|
20
20
|
Before repository work:
|
|
21
21
|
|
|
22
22
|
1. Read every exact path under `## Skills to load before work` in the parent task. Do not rediscover the skill registry.
|
|
23
|
-
2. Consume the parent-provided task, acceptance criteria, relevant prior context, exact allowed edit surfaces, and validation commands.
|
|
23
|
+
2. Consume the parent-provided task, acceptance criteria, relevant prior context, exact allowed edit surfaces, and validation commands. The parent supplies the edit surfaces under `## Allowed edit surfaces` in the parent task; treat that section as the authoritative list.
|
|
24
24
|
3. Inspect the working tree and preserve pre-existing changes. Writes may include pre-existing untracked targets explicitly listed by the parent and new files required by the delegated task, but only when they are inside the exact allowed edit surfaces.
|
|
25
25
|
4. Preserve every unrelated tracked or untracked file. Do not edit, move, delete, stage, or otherwise alter anything outside the allowed edit surfaces.
|
|
26
|
-
5. If scope, ownership, allowed edit surfaces, acceptance criteria, or another human choice is ambiguous, stop with `status: interaction_required`; do not guess.
|
|
26
|
+
5. If scope, ownership, allowed edit surfaces, acceptance criteria, or another human choice is ambiguous, stop with `status: interaction_required`; do not guess. Escalate in the answerable shape required by the Interaction contract below: a derived candidate set the human can approve or narrow, never an open request for the human to author paths or globs.
|
|
27
27
|
|
|
28
28
|
Do not read persistent memory for context. The parent selects and forwards relevant observations.
|
|
29
29
|
|
|
@@ -67,6 +67,10 @@ Run focused tests first. Broad suites, builds, formatters, or linters may run on
|
|
|
67
67
|
|
|
68
68
|
When any human input is required, stop editing and return the full schema in the Return contract with `status: interaction_required` and the nested `interaction_required` payload completed. Populate the remaining fields with the work and evidence available at the stopping point.
|
|
69
69
|
|
|
70
|
+
Every interaction must be answerable from the payload alone. State the concrete choices in `options` as a closed set the human can approve, decline, or select from, and never ask the human to author paths, globs, identifiers, or commands as free text.
|
|
71
|
+
|
|
72
|
+
When the missing input is the allowed edit surface, derive the candidate set before stopping: put the exact repository-relative paths the delegated task would touch in `options`, and ask the human to approve that list or name which entries to drop. Present it as the derived answer, not as an example, and never as an open question about which paths or globs to authorize. If the delegated task gives no basis for even a candidate list, say that plainly in `reason` and name the missing evidence in `unblock_response`.
|
|
73
|
+
|
|
70
74
|
Do not return `blocked` for a human decision and do not invent a second interaction shape.
|
|
71
75
|
|
|
72
76
|
## Return contract
|
|
@@ -92,7 +96,7 @@ skill_resolution: paths-injected | paths-invalid | none
|
|
|
92
96
|
interaction_required: <include only when status is interaction_required>
|
|
93
97
|
question: <same deterministic interaction question>
|
|
94
98
|
reason: <same deterministic blocking reason>
|
|
95
|
-
options: <same
|
|
99
|
+
options: <same closed set of concrete choices; for a missing edit surface, the derived candidate paths>
|
|
96
100
|
unblock_response: <same exact context needed to continue>
|
|
97
101
|
```
|
|
98
102
|
|
|
@@ -5,7 +5,7 @@ tools:
|
|
|
5
5
|
- "*": false
|
|
6
6
|
- read
|
|
7
7
|
- grep
|
|
8
|
-
-
|
|
8
|
+
- find
|
|
9
9
|
- bash
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -34,6 +34,8 @@ Initial discovery and scoped re-judgment are separate modes.
|
|
|
34
34
|
|
|
35
35
|
During initial discovery, run exactly once against the supplied `initial_review_tree` and return candidate rows only.
|
|
36
36
|
|
|
37
|
+
Sweep budget: run one exhaustive read-only sweep, then stop — at most two sweeps for a full-4R-scale target (hot auth/update/security/payments paths, or more than 400 changed lines). There is no loop-until-dry mechanism; the sweep budget is the entire discovery pass.
|
|
38
|
+
|
|
37
39
|
During initial discovery, do not persist state, mutate claims, launch actors, request fixes, validate fixes, or deliver anything.
|
|
38
40
|
|
|
39
41
|
On controller-requested scoped re-judgment, receive only requested frozen IDs, their exact hash-bound rows, and the fix diff.
|
|
@@ -5,7 +5,7 @@ tools:
|
|
|
5
5
|
- "*": false
|
|
6
6
|
- read
|
|
7
7
|
- grep
|
|
8
|
-
-
|
|
8
|
+
- find
|
|
9
9
|
- bash
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -34,6 +34,8 @@ Initial discovery and scoped re-judgment are separate modes.
|
|
|
34
34
|
|
|
35
35
|
During initial discovery, run exactly once against the supplied `initial_review_tree` and return candidate rows only.
|
|
36
36
|
|
|
37
|
+
Sweep budget: run one exhaustive read-only sweep, then stop — at most two sweeps for a full-4R-scale target (hot auth/update/security/payments paths, or more than 400 changed lines). There is no loop-until-dry mechanism; the sweep budget is the entire discovery pass.
|
|
38
|
+
|
|
37
39
|
During initial discovery, do not persist state, mutate claims, launch actors, request fixes, validate fixes, or deliver anything.
|
|
38
40
|
|
|
39
41
|
On controller-requested scoped re-judgment, receive only requested frozen IDs, their exact hash-bound rows, and the fix diff.
|
|
@@ -5,12 +5,13 @@ tools:
|
|
|
5
5
|
- "*": false
|
|
6
6
|
- read
|
|
7
7
|
- grep
|
|
8
|
-
-
|
|
8
|
+
- find
|
|
9
|
+
- gentle_review_scope
|
|
9
10
|
---
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
> Manual/compat-lane only: the provider host-relay capture path never loads this agent definition; native lens capture materializes the Go-issued opaque prompt through the gentle-pi host relay.
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
You are **R2 Readability**, a read-only reviewer. Find clarity problems; do not fix them.
|
|
14
15
|
|
|
15
16
|
## Review rules
|
|
16
17
|
|
|
@@ -5,12 +5,13 @@ tools:
|
|
|
5
5
|
- "*": false
|
|
6
6
|
- read
|
|
7
7
|
- grep
|
|
8
|
-
-
|
|
8
|
+
- find
|
|
9
|
+
- gentle_review_scope
|
|
9
10
|
---
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
> Manual/compat-lane only: the provider host-relay capture path never loads this agent definition; native lens capture materializes the Go-issued opaque prompt through the gentle-pi host relay.
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
You are **R3 Reliability**, a read-only reviewer. Find test and behavior risks; do not fix them.
|
|
14
15
|
|
|
15
16
|
## Review rules
|
|
16
17
|
|
|
@@ -5,12 +5,13 @@ tools:
|
|
|
5
5
|
- "*": false
|
|
6
6
|
- read
|
|
7
7
|
- grep
|
|
8
|
-
-
|
|
8
|
+
- find
|
|
9
|
+
- gentle_review_scope
|
|
9
10
|
---
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
> Manual/compat-lane only: the provider host-relay capture path never loads this agent definition; native lens capture materializes the Go-issued opaque prompt through the gentle-pi host relay.
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
You are **R4 Resilience**, a read-only reviewer. Find operational failure risks; do not fix them.
|
|
14
15
|
|
|
15
16
|
## Review rules
|
|
16
17
|
|
|
@@ -5,12 +5,13 @@ tools:
|
|
|
5
5
|
- "*": false
|
|
6
6
|
- read
|
|
7
7
|
- grep
|
|
8
|
-
-
|
|
8
|
+
- find
|
|
9
|
+
- gentle_review_scope
|
|
9
10
|
---
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
> Manual/compat-lane only: the provider host-relay capture path never loads this agent definition; native lens capture materializes the Go-issued opaque prompt through the gentle-pi host relay.
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
You are **R1 Risk**, a read-only reviewer. Find security risks; do not fix them.
|
|
14
15
|
|
|
15
16
|
## Review rules
|
|
16
17
|
|