gentle-pi 2.1.2 → 2.2.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 +70 -12
- 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 -1
- package/assets/agents/review-reliability.md +4 -1
- package/assets/agents/review-resilience.md +4 -1
- package/assets/agents/review-risk.md +4 -1
- package/assets/agents/sdd-apply.md +6 -1
- 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 +6 -1
- package/assets/agents/sdd-spec.md +6 -1
- package/assets/agents/sdd-status.md +6 -1
- package/assets/agents/sdd-sync.md +6 -1
- package/assets/agents/sdd-tasks.md +6 -1
- package/assets/agents/sdd-verify.md +6 -1
- package/assets/chains/4r-review.chain.md +2 -0
- package/assets/chains/sdd-full.chain.md +1 -1
- package/assets/chains/sdd-plan.chain.md +1 -1
- package/assets/chains/sdd-verify.chain.md +1 -1
- package/assets/orchestrator-delegation.md +246 -67
- package/assets/orchestrator.md +7 -14
- package/assets/sdd-orchestrator-workflow.md +154 -9
- package/assets/support/sdd-status-contract.md +19 -1
- 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/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/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 +5 -5
- package/docs/review-integration.md +22 -2
- package/extensions/gentle-ai.ts +1595 -201
- package/extensions/sdd-init.ts +19 -6
- package/extensions/skill-registry.ts +10 -2
- package/extensions/startup-banner.ts +10 -4
- package/lib/gentle-ai-binary.ts +173 -2
- package/lib/git-commit-transaction.ts +77 -17
- package/lib/native-review-cli.ts +528 -65
- package/lib/provider-contract-bundle.ts +704 -0
- package/lib/review-candidate-view.ts +527 -18
- package/lib/review-compact-contract.ts +59 -248
- package/lib/review-host-relay.ts +436 -0
- package/lib/review-integration-v2.ts +537 -36
- package/lib/review-relay-contract.ts +16 -0
- package/lib/sdd-preflight.ts +53 -1
- package/package.json +5 -2
- package/runtime/gentle-ai-binary.mjs +173 -2
- package/runtime/git-commit-transaction.mjs +75 -15
- package/runtime/native-review-cli.mjs +524 -61
- package/runtime/review-integration-v2.mjs +536 -35
- package/runtime/review-relay-contract.mjs +17 -0
- package/scripts/build-git-commit-transaction-runner.mjs +1 -0
- package/scripts/check-provider-contract.mjs +138 -0
- package/scripts/gentle-ai-installer.mjs +23 -13
- package/scripts/maintainer/provider-relay-matrix.mjs +219 -0
- package/scripts/mirror-provider-contract.mjs +143 -0
- package/scripts/test-packed-runner.mjs +16 -2
- package/scripts/verify-package-files.mjs +110 -33
- package/skills/_shared/review-ledger-contract.md +4 -6
- package/skills/gentle-ai/SKILL.md +4 -4
- package/skills/issue-creation/SKILL.md +94 -168
- package/skills/judgment-day/SKILL.md +7 -1
- package/skills/judgment-day/references/prompts-and-formats.md +2 -0
- package/skills/rdd-defect-workflow/SKILL.md +54 -0
- package/tests/background-subagents.test.ts +771 -0
- package/tests/crosslane/cross-lane.mjs +1169 -0
- package/tests/delegated-key-learnings-contract.test.ts +238 -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/result-artifact-v2-path.captured.json +12 -0
- package/tests/fixtures/devbinary/result-artifact-v2.captured.json +12 -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/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/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 +1 -1
- package/tests/gentle-ai-dev-binary-surfacing.test.ts +195 -0
- package/tests/gentle-ai-dev-binary.test.ts +336 -0
- package/tests/gentle-ai-installer.test.ts +46 -46
- package/tests/git-commit-transaction.test.ts +229 -1
- package/tests/maintainer/provider-relay.maintest.ts +265 -0
- package/tests/native-review-capability-contract.test.ts +48 -2
- package/tests/native-review-cli.test.ts +56 -0
- package/tests/native-review-consent.test.ts +164 -3
- package/tests/native-review-parity-runtime.test.ts +37 -0
- package/tests/native-review-parity.test.ts +218 -15
- package/tests/native-sdd-attempt-authority.test.ts +235 -0
- package/tests/orchestrator-budget.test.ts +30 -5
- package/tests/package-manifest.test.ts +98 -72
- 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 +355 -0
- package/tests/review-actor-tool-deny.test.ts +12 -13
- package/tests/review-candidate-view.test.ts +489 -9
- package/tests/review-compact-contract.test.ts +52 -119
- package/tests/review-controller-native-recovery.test.ts +643 -47
- package/tests/review-controller-native-routing.test.ts +1667 -222
- package/tests/review-controller-workspace-root.test.ts +17 -2
- package/tests/review-corrected-finalize-binding.test.ts +175 -0
- package/tests/review-dispatch-hydration-gap.test.ts +197 -0
- package/tests/review-host-relay-routing.test.ts +317 -0
- package/tests/review-host-relay.test.ts +520 -0
- package/tests/review-integration-v2-forward.test.ts +631 -0
- package/tests/review-integration-v2.test.ts +114 -0
- package/tests/review-ledger-contract.test.ts +12 -28
- package/tests/review-recovered-lineage-routing.test.ts +246 -0
- package/tests/review-relay-transport-agent.test.ts +249 -0
- package/tests/runtime-harness.mjs +242 -14
- package/tests/sdd-agent-tools.test.ts +18 -33
- package/tests/skill-collision-prefixes.test.ts +1 -0
- package/tests/skill-registry.test.ts +50 -1
- package/tests/verify-package-files.test.ts +62 -0
- package/assets/agents/review-refuter.md +0 -40
- package/assets/agents/review-validator.md +0 -23
- 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/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/review-compact.test.ts +0 -243
- package/tests/review-refuter-adapter.test.ts +0 -89
|
@@ -68,9 +68,11 @@ The preflight captures:
|
|
|
68
68
|
|
|
69
69
|
- execution mode: `interactive` or `auto`;
|
|
70
70
|
- artifact store: `openspec`, `engram`, or `both` when callable memory tools are available;
|
|
71
|
-
- chained PR strategy: `
|
|
71
|
+
- chained PR strategy: the canonical `delivery_strategy` — `ask-on-risk`, `auto-chain`, `single-pr`, or `exception-ok`. The preflight menu offers the first three; `exception-ok` is reachable only when the user explicitly accepts `size:exception`, either up front or when `ask-on-risk` stops to ask;
|
|
72
72
|
- review budget in changed lines.
|
|
73
73
|
|
|
74
|
+
Those four PR values are exactly the `delivery_strategy` domain `sdd-tasks` and `sdd-apply` accept; never emit a value outside it. The preflight offers no separate chained option because `delivery_strategy` is only consulted once the tasks forecast flags review-budget risk: below that line there is nothing to chain, and above it `auto-chain` already resolves without asking again.
|
|
75
|
+
|
|
74
76
|
The package should ensure SDD assets are present as global Pi runtime assets without the user needing to remember per-project setup commands. If assets are missing, install them non-destructively into:
|
|
75
77
|
|
|
76
78
|
```text
|
|
@@ -82,15 +84,19 @@ Manual install commands are recovery/debug paths, not the happy path. `/gentle:s
|
|
|
82
84
|
|
|
83
85
|
## Init Guard
|
|
84
86
|
|
|
85
|
-
Before any SDD flow, make sure project context exists.
|
|
87
|
+
Before any SDD flow, make sure project context exists. Where that context lives depends on the session's artifact store, so qualify the check by store before acting on it.
|
|
86
88
|
|
|
87
|
-
|
|
89
|
+
When the store is `openspec` or `both`, the local artifact is:
|
|
88
90
|
|
|
89
91
|
```text
|
|
90
92
|
openspec/config.yaml
|
|
91
93
|
```
|
|
92
94
|
|
|
93
|
-
If it is missing, ask the user for the minimal information needed or run `/sdd-init` if available.
|
|
95
|
+
If it is missing, ask the user for the minimal information needed or run `/sdd-init` if available.
|
|
96
|
+
|
|
97
|
+
When the store is `engram` or `none`, `/sdd-init` never writes that file, so its absence is expected and is not a missing init. Never re-trigger `/sdd-init` over it. Resolve project context from the Engram `sdd-init/{project}` topic for `engram`, or inline from the session for `none`, and ask the user only when that context is genuinely absent.
|
|
98
|
+
|
|
99
|
+
This init guard runs after the session preflight gate above; project config presence or absence never substitutes for session preflight choices. Do not proceed with a substantial SDD flow while pretending project context, testing capability, or session preflight choices are known.
|
|
94
100
|
|
|
95
101
|
## Artifact Store Policy
|
|
96
102
|
|
|
@@ -104,8 +110,10 @@ This package does not provide persistent memory by itself.
|
|
|
104
110
|
|
|
105
111
|
Use the session's SDD preflight choice:
|
|
106
112
|
|
|
107
|
-
- `
|
|
108
|
-
- `
|
|
113
|
+
- `auto`: phases run back-to-back without pausing, but the orchestrator gatekeeper validates after each phase before launching the next.
|
|
114
|
+
- `interactive`: after each phase, show a concise summary and ask whether to adjust or continue.
|
|
115
|
+
|
|
116
|
+
If the user doesn't specify, default to `auto`. After scope approval, expect zero further prompts on the happy path and at most one actionable prompt per recoverable failure; the gatekeeper summarizes phase progress instead of interrupting except on a second consecutive gate failure or a genuine scope/product decision.
|
|
109
117
|
|
|
110
118
|
In interactive mode, between phases:
|
|
111
119
|
|
|
@@ -117,6 +125,28 @@ Interactive approval is phase-scoped. A user response such as "continue", "dale"
|
|
|
117
125
|
|
|
118
126
|
Before `sdd-proposal` in interactive mode, offer the user a proposal question round instead of silently deciding whether the proposal is clear enough. Explain that the questions are meant to improve the PRD/proposal by uncovering business understanding, business rules, implications, impact, edge cases, and product tradeoffs. Prefer 3–5 concrete product questions per round, then summarize the resulting assumptions and ask whether the user wants to correct anything or run a second question round. Cover business/product/PRD decisions: business problem, target users and situations, business rules, product outcome, current-state gap, implications and impact, edge cases, decision gaps, first-slice scope boundaries, non-goals, product constraints, and business tradeoffs. Do not ask about test commands, PR shape, changed-line budget, or other harness mechanics at proposal time unless the user explicitly asks to discuss delivery.
|
|
119
127
|
|
|
128
|
+
## Delivery Strategy
|
|
129
|
+
|
|
130
|
+
On the first SDD chain request in a session, resolve the delivery strategy from preflight (or ask once) and cache it:
|
|
131
|
+
|
|
132
|
+
- `ask-on-risk` — default; ask only when the tasks forecast detects review-budget risk.
|
|
133
|
+
- `auto-chain` — automatically split into chained/stacked PR slices when needed.
|
|
134
|
+
- `single-pr` — proceed as one PR only if the size is within budget.
|
|
135
|
+
- `exception-ok` — user accepts `size:exception` when over budget. The preflight menu cannot select this; it is reached only when the user explicitly accepts `size:exception`, either up front or when `ask-on-risk` stops to ask.
|
|
136
|
+
|
|
137
|
+
These four are the whole domain. Pass `delivery_strategy` to `sdd-tasks` and `sdd-apply`.
|
|
138
|
+
|
|
139
|
+
## Chain Strategy
|
|
140
|
+
|
|
141
|
+
When delivery planning yields chained PRs, ask once for chain strategy and cache it:
|
|
142
|
+
|
|
143
|
+
- `stacked-to-main` — each PR targets the previous PR branch or main in sequence.
|
|
144
|
+
- `feature-branch-chain` — PR #1 targets the tracker branch; child PRs target the immediate previous PR branch; only the tracker merges to main.
|
|
145
|
+
|
|
146
|
+
When chained PRs are selected, treat the registry skill `gentle-ai-chained-pr` as a required skill match. Resolve and forward it by registry path to `sdd-tasks` and `sdd-apply`; do not hardcode its path.
|
|
147
|
+
|
|
148
|
+
Pass it as `chain_strategy` to `sdd-tasks` and `sdd-apply` prompts alongside `delivery_strategy`.
|
|
149
|
+
|
|
120
150
|
## Result Contract
|
|
121
151
|
|
|
122
152
|
Every phase result should include:
|
|
@@ -132,6 +162,10 @@ skill_resolution
|
|
|
132
162
|
|
|
133
163
|
The parent should synthesize these envelopes, not paste long raw reports unless needed.
|
|
134
164
|
|
|
165
|
+
### Key Learnings closing block (routing)
|
|
166
|
+
|
|
167
|
+
Every installed SDD phase executor agent (`assets/agents/sdd-*.md`) carries the effective `## Key Learnings Closing` contract in its own loaded prompt; this workflow file documents routing only and is not the executor authority. Each phase executor closes its final report text with a `## Key Learnings` block that the Engram memory provider passively extracts. Generic delegated workers receive the same closing instruction via `assets/orchestrator-delegation.md`.
|
|
168
|
+
|
|
135
169
|
## Automatic Mode Gatekeeper
|
|
136
170
|
|
|
137
171
|
In `auto` execution mode, the parent/orchestrator is the quality gate between SDD phases. After a delegated phase returns and before launching the next phase, validate that the phase actually reached its objective. This validation is autonomous: do not ask the user on the happy path, but stop and report if the gate catches a real problem.
|
|
@@ -154,9 +188,82 @@ On gate pass, continue automatically to the next phase. On gate fail, rerun the
|
|
|
154
188
|
|
|
155
189
|
The gatekeeper is additive: it does not relax the Review Workload Guard, Strict TDD Forwarding, native status dependency checks, or mandatory delegation rules. It never creates a post-SDD review pass.
|
|
156
190
|
|
|
191
|
+
## Native Runtime Attempt Authority
|
|
192
|
+
|
|
193
|
+
The package-local Gentle AI runtime owns the Git-common-dir compact SDD attempt ledger. It is the sole attempt and changed-line budget authority for both OpenSpec and Engram flows on Pi. Pi must not implement a local attempt mirror, counter, token store, state machine, or extension interception layer; such code would duplicate provider authority and could not truthfully settle all runs.
|
|
194
|
+
|
|
195
|
+
Before every runtime-bearing `sdd-apply`, `sdd-verify`, or remediation actor/harness launch, the orchestrator MUST call the compact acquire:
|
|
196
|
+
|
|
197
|
+
```text
|
|
198
|
+
gentle-ai sdd-attempt acquire --cwd <repo> --change <change> --request-id <id> --work-unit <label> --evidence-goal <goal> --max-attempts <count> --max-changed-lines <count>
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
Pass `--token` only to continue an active attempt; pass `--remediates-evidence-revision` only for an unmanaged remediation. Do not invent continuation or remediation state the provider has not returned.
|
|
202
|
+
|
|
203
|
+
The provider returns exactly one routing state from `proceed|blocked|complete`:
|
|
204
|
+
|
|
205
|
+
- `proceed`: launch only on `proceed`; retain the opaque token for settle.
|
|
206
|
+
- `blocked`: do not launch; stop and report.
|
|
207
|
+
- `complete`: do not launch; the objective is settled.
|
|
208
|
+
|
|
209
|
+
Never persist caller-authored attempt counters, tokens, or state in OpenSpec artifacts, Engram memory, prompts, or any Pi-owned state.
|
|
210
|
+
|
|
211
|
+
After the external run completes, call the compact settle with a request ID distinct from acquire, reusing an operation's own ID only for idempotent replay of that exact operation:
|
|
212
|
+
|
|
213
|
+
```text
|
|
214
|
+
gentle-ai sdd-attempt settle --cwd <repo> --change <change> --token <token> --request-id <id> --outcome <failed|interrupted|passed> --evidence-revision <sha256:...> --diagnosis <text> --harness-disposition <reused|invalidated> --cleanup-evidence <text> --process-evidence <text>
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
Every settle field is required: `cwd`, `change`, `token`, `request-id`, `outcome`, `evidence-revision`, `diagnosis`, `harness-disposition`, `cleanup-evidence`, and `process-evidence`. `evidence-revision` is never `none`. Pass `--successor-lineage` only for a distinct approved successor; the current/bound lineage remains itself otherwise. Pass `--remediates-evidence-revision` only when repairing a specific failed evidence revision. Settle derives binding and remediation inputs; the orchestrator never invents them.
|
|
218
|
+
|
|
219
|
+
`status`, `begin`, `finish`, and `reset` are diagnostic/compatibility surfaces, not the normal runtime route. Route continuation only from the provider-returned `proceed|blocked|complete`. `reset` is never automatic and requires an explicit maintainer scope decision.
|
|
220
|
+
|
|
221
|
+
### Gatekeeper Reconciliation
|
|
222
|
+
|
|
223
|
+
The Automatic Mode Gatekeeper one-rerun rule above is a quality gate, not a launch authorization. A rerun never bypasses native attempt authority: every rerun still requires a fresh compact acquire, and the rerun must stop immediately if the provider returns `blocked` or `complete`. The gatekeeper quality rule is preserved and remains subordinate to this authority.
|
|
224
|
+
|
|
157
225
|
## SDD Phase Delegation Mode
|
|
158
226
|
|
|
159
|
-
Launch SDD phase subagents with `subagent_run` `mode: "task"` when the parent needs the phase result to route the next step.
|
|
227
|
+
Launch SDD phase subagents with `subagent_run` `mode: "task"` when the parent needs the phase result to route the next step. SDD phases, writers, dependent verify evidence, and archive are foreground-mandatory under the background subagent policy block in the delegation contract; background completion is a notification/history mechanism, not an orchestration resume guarantee.
|
|
228
|
+
|
|
229
|
+
## Model Assignments
|
|
230
|
+
|
|
231
|
+
Read this table before the first SDD/Judgment-Day phase delegation in a session, cache it, and use it only for SDD/Judgment-Day phase agents. If a phase is missing, use the `default` row. If the assigned tier is unavailable, use the runtime's default model and continue.
|
|
232
|
+
|
|
233
|
+
On Pi, phase model routing is user-owned and persisted, not prompt-passed: `/gentle:models` writes `.pi/gentle-ai/models.json`, and the package applies each saved assignment to the installed phase agent definitions (frontmatter `model:`/`thinking:`) or `.pi/settings.json` overrides. The table below is the default capability tier per phase when the user has saved no assignment.
|
|
234
|
+
|
|
235
|
+
**Mandatory phase model gate:** before launching an SDD/Judgment-Day phase agent, confirm the phase resolves through the saved model config or these defaults. Never pass an ad-hoc `model` parameter for SDD/Judgment-Day phases, and never apply this table to generic Pi delegation — generic subagents resolve model/thinking through `pi-subagents` config, and `model` is passed there only on an explicit user override.
|
|
236
|
+
|
|
237
|
+
| Phase | Default tier | Reason |
|
|
238
|
+
| ------------ | -------------- | ------------------------------------------ |
|
|
239
|
+
| sdd-explore | balanced | Reads code, structural - not architectural |
|
|
240
|
+
| sdd-proposal | deep-reasoning | Architectural decisions |
|
|
241
|
+
| sdd-spec | balanced | Structured writing |
|
|
242
|
+
| sdd-design | deep-reasoning | Architecture decisions |
|
|
243
|
+
| sdd-tasks | balanced | Mechanical breakdown |
|
|
244
|
+
| sdd-apply | balanced | Implementation |
|
|
245
|
+
| sdd-verify | balanced | Validation against spec |
|
|
246
|
+
| sdd-sync | fast | Reflect verified state |
|
|
247
|
+
| sdd-archive | fast | Copy and close |
|
|
248
|
+
| jd-judge-a | deep-reasoning | Adversarial review |
|
|
249
|
+
| jd-judge-b | deep-reasoning | Adversarial review |
|
|
250
|
+
| jd-fix-agent | balanced | Surgical confirmed fixes |
|
|
251
|
+
| default | balanced | SDD/JD phase fallback |
|
|
252
|
+
|
|
253
|
+
## Sub-Agent Launch Deduplication
|
|
254
|
+
|
|
255
|
+
Maintain a session-scoped launch log of `(phase, task-fingerprint)` pairs. If the same pair already exists, do NOT launch again. Emit exactly one launch per distinct task and append the pair after launch.
|
|
256
|
+
|
|
257
|
+
## Sub-Agent Launch Protocol
|
|
258
|
+
|
|
259
|
+
Pre-flight before every SDD/Judgment-Day phase launch:
|
|
260
|
+
|
|
261
|
+
1. Identify the phase key (`sdd-apply`, `sdd-verify`, `jd-judge-a`, etc.).
|
|
262
|
+
2. Confirm its model routing per the Model Assignments gate above.
|
|
263
|
+
3. Resolve matching skill paths once per session from the registry and pass exact `SKILL.md` paths under `## Skills to load before work`.
|
|
264
|
+
4. If a delegated result reports `skill_resolution` as `fallback-registry`, `fallback-path`, or `none`, re-read the registry before subsequent delegations.
|
|
265
|
+
|
|
266
|
+
**Key Learnings closing (generic delegations):** when delegating to generic agents (`gentle-ai-explore`, `gentle-ai-worker`, `gentle-ai-verify`, scout/worker roles, or the native `Agent` fallback), apply the rule exactly as stated under "Key Learnings closing block" in `assets/orchestrator-delegation.md`. That file is the single statement of the rule; do not restate or paraphrase it here. SDD phase launch prompts need no such injection: every installed SDD phase executor already carries the effective contract in its own prompt (see "Key Learnings closing block (routing)" above).
|
|
160
267
|
|
|
161
268
|
## Strict TDD Forwarding
|
|
162
269
|
|
|
@@ -170,12 +277,50 @@ STRICT TDD MODE IS ACTIVE. Test runner: <command>. Follow RED, GREEN, TRIANGULAT
|
|
|
170
277
|
|
|
171
278
|
Do not rely on the child agent to discover this independently.
|
|
172
279
|
|
|
280
|
+
## Archive Final-State Handoff
|
|
281
|
+
|
|
282
|
+
When launching `sdd-archive`, forward explicit final-state facts for any work completed after `apply-progress`, `verify-report`, or `sync-report` were persisted — verify warnings fixed in later commits, blockers resolved, tasks finished, updated test or issue counts — with commit or evidence references where available. Those artifacts are intermediate snapshots, valid at the time they were written; the archive report records the state at close, and explicit final-state facts in the `sdd-archive` launch prompt outrank stale snapshot claims.
|
|
283
|
+
|
|
173
284
|
## Review Workload Guard
|
|
174
285
|
|
|
175
|
-
After `sdd-tasks` and before `sdd-apply`, inspect the task output
|
|
286
|
+
After `sdd-tasks` completes and before launching `sdd-apply`, inspect the task output's `Review Workload Forecast`.
|
|
287
|
+
|
|
288
|
+
If it says `Chained PRs recommended: Yes`, `400-line budget risk: High`, estimated changed lines exceed 400, or `Decision needed before apply: Yes`, apply the cached `delivery_strategy`:
|
|
289
|
+
|
|
290
|
+
- `ask-on-risk`: stop and ask whether to split or proceed with `size:exception`.
|
|
291
|
+
- `auto-chain`: split automatically; ask for `chain_strategy` only if missing.
|
|
292
|
+
- `single-pr`: stop and require/record `size:exception` before apply.
|
|
293
|
+
- `exception-ok`: continue and tell `sdd-apply` this run uses `size:exception`.
|
|
294
|
+
|
|
295
|
+
Any other `delivery_strategy` value is invalid. Do NOT pick the nearest branch and do NOT proceed: STOP, report the unrecognised value, and re-collect the delivery strategy before launching `sdd-apply`.
|
|
176
296
|
|
|
177
|
-
|
|
297
|
+
Always pass the resolved `delivery_strategy`, `chain_strategy`, and any chosen PR boundary/exception to `sdd-apply` in the launch prompt.
|
|
178
298
|
|
|
179
299
|
Any review transaction explicitly started outside SDD persists through its own artifact-store branch and budget. SDD completion itself launches no review actors and mints no review authority.
|
|
180
300
|
|
|
181
301
|
Automatic mode does not override reviewer burnout protection.
|
|
302
|
+
|
|
303
|
+
## Recovery
|
|
304
|
+
|
|
305
|
+
- `engram` → resolve state with the injected memory search/get tools on the change topic keys (`sdd/{change-name}/...`).
|
|
306
|
+
- `openspec` → read `openspec/changes/<change>/` artifacts and re-derive readiness through the native status engine.
|
|
307
|
+
- `none` → state is not persisted; explain the limitation.
|
|
308
|
+
|
|
309
|
+
## Provider Defect Handoff
|
|
310
|
+
|
|
311
|
+
This section applies when an SDD phase or review lifecycle operation appears blocked by a Gentle AI provider defect. The full contract lives in `assets/orchestrator-delegation.md` under `#### Gentle AI Provider Defect Handoff (MANDATORY)`; it ports Gentle AI's v2.4.0-rc.8 handoff consent contract (the `gentle-ai.review-integration.consent/v3` envelope; canonical source `internal/assets/generic/sdd-orchestrator.md` at tag `v2.4.0-rc.8`, a prerelease not present in v2.3.0 stable). Pi review commands use `gentle_review`.
|
|
312
|
+
|
|
313
|
+
Concise rules:
|
|
314
|
+
|
|
315
|
+
- Classify admissibility before relaying: offer the handoff only when a Gentle AI invocation produced the failure, not when its runtime merely hosted it.
|
|
316
|
+
- Never offer to switch to, inspect, modify, or directly repair the Gentle AI repository from this SDD workflow. If an upstream envelope offers direct repair, reject it as semantically inadmissible and issue the orchestrator-owned handoff envelope instead.
|
|
317
|
+
- Ask the user first, in the active conversation language, for explicit consent to report the apparent defect. Present one single-select blocking envelope with exactly three semantic choices in this order. Its exact internal answer tokens are `report_and_continue`, `continue_without_reporting`, `stop_here`. Do not expose machine or internal codes in user-facing labels.
|
|
318
|
+
- Privacy scrub immediately before the first GitHub operation: exclude raw argv, absolute paths, private project names, usernames, hostnames, credentials, diffs, source contents, and environment values.
|
|
319
|
+
- Complete a definitive lookup across open and closed issues in `Gentleman-Programming/gentle-ai` before any write; only a definitive lookup may branch to GitHub mutation.
|
|
320
|
+
- Derive the evidence channel only from the installed build string: recognized prerelease tags are `-rc.` and `-main.`; every other build is stable. A fix counts only in the installed build's channel. A fix published only to the other channel gets one occurrence comment naming where it is published; never recommend switching channels.
|
|
321
|
+
- If the installed build predates the relevant published fix, recommend installing it and reproducing; do not create or comment for that occurrence yet. If the installed build demonstrably contains the fix and still reproduces, treat it as a possible regression: comment on a suitable canonical tracker or create a linked regression issue; never reopen automatically.
|
|
322
|
+
- Confirmed creation requires the GitHub create operation to confirm a newly-created issue identity/URL; never infer creation from output text alone.
|
|
323
|
+
- On search, comment, or creation failure/ambiguity/timeout/permission/unknown: perform no further GitHub mutation and no blind retry; preserve all consumer state, then execute the exact captured provider-owned decline invocation exactly once, validate it, re-enter native negotiated STATUS, and resume the already-held consumer continuation.
|
|
324
|
+
- Both continue choices execute that exact captured decline invocation exactly once; never synthesize the decline command, target, token, or consumer continuation from prose. If unavailable or ambiguous, fail closed.
|
|
325
|
+
- Do not invoke `gentle-ai review mode disable` at clone or global scope within this handoff. Do not turn RDD off or on within this handoff.
|
|
326
|
+
- Resume after an installed published fix or an explicit maintainer-authorized, documented native recovery or reset that the runtime contract supports; then re-enter through native status. Never resume against unpublished code.
|
|
@@ -13,6 +13,16 @@ Any phase that selects, continues, applies, verifies, syncs, or archives an SDD
|
|
|
13
13
|
- If multiple active changes match or the active change is unclear, ask the user to choose. Do not guess.
|
|
14
14
|
- If no active changes exist, report that no SDD change is active and suggest starting one.
|
|
15
15
|
|
|
16
|
+
## Native Engine
|
|
17
|
+
|
|
18
|
+
- When the session artifact store is `openspec` or `both` (with an `openspec/` directory) and the `gentle-ai` binary is available, prefer `gentle-ai sdd-status [change] --cwd <repo> --json --instructions` for read-only status and `gentle-ai sdd-continue [change] --cwd <repo>` for dispatcher output, and treat their native status JSON as authoritative over prompt inference or manually reconstructed state.
|
|
19
|
+
- For non-authoritative stores (`engram`, `none`, and `both` without an `openspec/` directory), do not treat dispatcher output as authoritative; follow Engine Authority by Store below.
|
|
20
|
+
- Runtime-attempt authority is different from artifact dispatch: normal runtime-bearing OpenSpec and Engram continuations MUST bracket external execution with `gentle-ai sdd-attempt acquire|settle --cwd <repo> --change <change>`. Their bounded result contains only `proceed`, `blocked`, or `complete` plus an opaque continuation token when required, and MAY carry `settle_obligation` on a `proceed`. The Git-common-dir immutable chain remains the sole authority for ordinals, cumulative attempt/line budgets, runtime evidence, and atomic bound remediation.
|
|
21
|
+
- A phase actor launched BY a parent that already holds a `proceed`-state acquire for that exact work unit is a distinct call/process, not a fresh continuation: it MUST NOT `acquire` again blind. Colliding with its own parent's active attempt is not a genuine `blocked: active_attempt` (#2291). It authenticates as that SAME attempt by passing the parent's returned token on its own `acquire --token <token>` call: a token matching the ledger's live active attempt returns `proceed` with that same token and zero mutation, while a non-matching token gets the ordinary `blocked: active_attempt` naming the real active token.
|
|
22
|
+
- When `blockedReasons` is non-empty, do not proceed to terminal, archive, or apply work. Return or report `blockedReasons` and stop unless `nextRecommended` is `verify`, in which case verification may run only to remediate or refresh evidence for the blockers. When `nextRecommended` is `resolve-blockers`, always report `blockedReasons` and stop. When `nextRecommended` is a planning token (`propose`, `spec`, `design`, or `tasks`), launch the corresponding planning phase — missing planning artifacts are the expected output of those phases, not genuine blockers.
|
|
23
|
+
- `nextRecommended` is a bounded machine token for routing, not human prose. Route only by `nextRecommended` and dependency states. Human-readable explanation belongs in `blockedReasons`, not `nextRecommended`.
|
|
24
|
+
- If the binary is unavailable, fall back to this prompt contract and the manual status schema below. Manual fallback status MUST stay shape-compatible with the native status JSON even when values are reconstructed manually.
|
|
25
|
+
|
|
16
26
|
## Status Schema
|
|
17
27
|
|
|
18
28
|
Return status as markdown with these fields, or equivalent JSON when the host supports it:
|
|
@@ -71,7 +81,7 @@ actionContext:
|
|
|
71
81
|
workspaceRoot: <absolute path>
|
|
72
82
|
allowedEditRoots: [<absolute paths>]
|
|
73
83
|
warnings: []
|
|
74
|
-
nextRecommended: <
|
|
84
|
+
nextRecommended: <bounded-machine-token>
|
|
75
85
|
isNonAuthoritative: false # boolean; true when the native engine is not authoritative for the store
|
|
76
86
|
```
|
|
77
87
|
|
|
@@ -107,6 +117,14 @@ The orchestrator MUST carry `actionContext` into any phase launch.
|
|
|
107
117
|
- `openspec` and `both` (when `openspec/` directory exists): the native status engine resolves artifact state from disk and is authoritative. Phase executors must obey it.
|
|
108
118
|
- `engram`, `none`, and `both` (when `openspec/` directory does NOT exist): the native status engine cannot read Engram artifacts. It returns `nextRecommended: "resolve-via-engram"` and empty `blockedReasons`. This output is **non-authoritative**. The orchestrator must resolve readiness directly from Engram using the Engram memory tools injected by the memory provider on the change topic keys (`sdd/{change-name}/proposal`, `sdd/{change-name}/spec`, etc.) instead of relying on the engine's dependency states. The `artifactStore` field still reflects the real chosen store value (e.g. `"both"`) and must not be rewritten.
|
|
109
119
|
|
|
120
|
+
## Native Runtime Attempt Authority
|
|
121
|
+
|
|
122
|
+
The compact SDD runtime attempt authority is separate from artifact dispatch and status. It is artifact-store agnostic: the same acquire/settle discipline applies to `openspec`, `engram`, `both`, and `none` stores. Its payload MUST NOT be embedded in the SDD v1 status schema above; status reports artifact state only, never attempt tokens or attempt counters. No OpenSpec or Engram attempt ledger may be created or mirrored by Pi.
|
|
123
|
+
|
|
124
|
+
Before every runtime-bearing `sdd-apply`, `sdd-verify`, or remediation launch, the orchestrator MUST acquire a bounded attempt from the provider compact CLI; after the external run completes it MUST settle. The acquire and settle request IDs are distinct; an operation's own request ID is reused only for idempotent replay of that exact operation. Continuation routes only from the provider-returned `proceed|blocked|complete` — launch only on `proceed`, stop on `blocked` or `complete`. `reset` is never automatic and requires an explicit maintainer scope decision.
|
|
125
|
+
|
|
126
|
+
For the exact compact acquire/settle shapes and the full field semantics, see the `Native Runtime Attempt Authority` section of the lazy-loaded `SDD Orchestrator Workflow` contract. Do not look up `assets/...` paths at runtime; those are package source paths before installation.
|
|
127
|
+
|
|
110
128
|
## Status Output
|
|
111
129
|
|
|
112
130
|
Every command or agent that acts on a change MUST show or consume status before doing phase work:
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"operation": "review.start",
|
|
5
5
|
"action": "consent_required",
|
|
6
6
|
"blocking": true,
|
|
7
|
-
"target_identity": "sha256:
|
|
7
|
+
"target_identity": "sha256:04c970c2b0f7c128751ed2b0f7e672a2fe26dc267f018bf10e612096d19cfa04",
|
|
8
8
|
"projection": "workspace",
|
|
9
9
|
"risk_level": "high",
|
|
10
10
|
"changed_files": 1,
|
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
"answer": "granted",
|
|
21
21
|
"label": "Run the review now",
|
|
22
22
|
"effect": "Reviews this exact frozen candidate now; nothing is granted for later candidates, so each later medium- or high-risk candidate asks again.",
|
|
23
|
-
"invocation": "gentle-ai review start --contract gentle-ai.review-integration/v1 --cwd /repo --target sha256:
|
|
23
|
+
"invocation": "gentle-ai review start --contract gentle-ai.review-integration/v1 --cwd /repo --target sha256:04c970c2b0f7c128751ed2b0f7e672a2fe26dc267f018bf10e612096d19cfa04 --projection workspace --lineage review-consent-fixture --consent granted"
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
"answer": "declined",
|
|
27
27
|
"label": "Not now, just this once",
|
|
28
28
|
"effect": "Skips the review for this candidate only; nothing is persisted and the next candidate is asked again. This is not the kill switch.",
|
|
29
|
-
"invocation": "gentle-ai review start --contract gentle-ai.review-integration/v1 --cwd /repo --target sha256:
|
|
29
|
+
"invocation": "gentle-ai review start --contract gentle-ai.review-integration/v1 --cwd /repo --target sha256:04c970c2b0f7c128751ed2b0f7e672a2fe26dc267f018bf10e612096d19cfa04 --projection workspace --lineage review-consent-fixture --consent declined"
|
|
30
30
|
}
|
|
31
31
|
],
|
|
32
32
|
"off_path": {
|
|
@@ -27,45 +27,45 @@
|
|
|
27
27
|
"artifact_subjects": [
|
|
28
28
|
{
|
|
29
29
|
"schema": "gentle-ai.review-artifact-subject/v1",
|
|
30
|
-
"subject_hash": "sha256:
|
|
30
|
+
"subject_hash": "sha256:462591bc0cfab672cdf741536c5f1d8122a1f31b1773b9f1d12c5f2b72c76d23",
|
|
31
31
|
"lineage_id": "review-start-fixture",
|
|
32
|
-
"authority_revision": "sha256:
|
|
33
|
-
"target_identity": "sha256:
|
|
32
|
+
"authority_revision": "sha256:e10bced7198e3c817c5ff6d1172d6aa8ce3321d45ec4d68834e0b5f03a4246d9",
|
|
33
|
+
"target_identity": "sha256:04c970c2b0f7c128751ed2b0f7e672a2fe26dc267f018bf10e612096d19cfa04",
|
|
34
34
|
"candidate_diff_sha256": "sha256:c18ffcaf6f41a8cd5f3399a10355eb8de3e5eb561cb65cb551ea93bdf4df921b",
|
|
35
|
-
"changed_path_manifest_sha256": "sha256:
|
|
35
|
+
"changed_path_manifest_sha256": "sha256:dc754e73f2d661e2f914fdc5dd8d2a399be18567481137f43ae9d8d45aae3397",
|
|
36
36
|
"lens": "review-risk",
|
|
37
37
|
"selected_order": 0
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
"schema": "gentle-ai.review-artifact-subject/v1",
|
|
41
|
-
"subject_hash": "sha256:
|
|
41
|
+
"subject_hash": "sha256:6374e313d6524b832afa399bdd205d4e852e1a19ea8d87000804789df6117e3b",
|
|
42
42
|
"lineage_id": "review-start-fixture",
|
|
43
|
-
"authority_revision": "sha256:
|
|
44
|
-
"target_identity": "sha256:
|
|
43
|
+
"authority_revision": "sha256:e10bced7198e3c817c5ff6d1172d6aa8ce3321d45ec4d68834e0b5f03a4246d9",
|
|
44
|
+
"target_identity": "sha256:04c970c2b0f7c128751ed2b0f7e672a2fe26dc267f018bf10e612096d19cfa04",
|
|
45
45
|
"candidate_diff_sha256": "sha256:c18ffcaf6f41a8cd5f3399a10355eb8de3e5eb561cb65cb551ea93bdf4df921b",
|
|
46
|
-
"changed_path_manifest_sha256": "sha256:
|
|
46
|
+
"changed_path_manifest_sha256": "sha256:dc754e73f2d661e2f914fdc5dd8d2a399be18567481137f43ae9d8d45aae3397",
|
|
47
47
|
"lens": "review-resilience",
|
|
48
48
|
"selected_order": 1
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
"schema": "gentle-ai.review-artifact-subject/v1",
|
|
52
|
-
"subject_hash": "sha256:
|
|
52
|
+
"subject_hash": "sha256:56924c7ad539c596fd584905c9be7a82765e551154375a8022fb1e820bc2f61a",
|
|
53
53
|
"lineage_id": "review-start-fixture",
|
|
54
|
-
"authority_revision": "sha256:
|
|
55
|
-
"target_identity": "sha256:
|
|
54
|
+
"authority_revision": "sha256:e10bced7198e3c817c5ff6d1172d6aa8ce3321d45ec4d68834e0b5f03a4246d9",
|
|
55
|
+
"target_identity": "sha256:04c970c2b0f7c128751ed2b0f7e672a2fe26dc267f018bf10e612096d19cfa04",
|
|
56
56
|
"candidate_diff_sha256": "sha256:c18ffcaf6f41a8cd5f3399a10355eb8de3e5eb561cb65cb551ea93bdf4df921b",
|
|
57
|
-
"changed_path_manifest_sha256": "sha256:
|
|
57
|
+
"changed_path_manifest_sha256": "sha256:dc754e73f2d661e2f914fdc5dd8d2a399be18567481137f43ae9d8d45aae3397",
|
|
58
58
|
"lens": "review-readability",
|
|
59
59
|
"selected_order": 2
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
"schema": "gentle-ai.review-artifact-subject/v1",
|
|
63
|
-
"subject_hash": "sha256:
|
|
63
|
+
"subject_hash": "sha256:0e15bc61702fd815c7140592e02d752143a0ac10a5fd59b4f8e8a8c0e8ea103b",
|
|
64
64
|
"lineage_id": "review-start-fixture",
|
|
65
|
-
"authority_revision": "sha256:
|
|
66
|
-
"target_identity": "sha256:
|
|
65
|
+
"authority_revision": "sha256:e10bced7198e3c817c5ff6d1172d6aa8ce3321d45ec4d68834e0b5f03a4246d9",
|
|
66
|
+
"target_identity": "sha256:04c970c2b0f7c128751ed2b0f7e672a2fe26dc267f018bf10e612096d19cfa04",
|
|
67
67
|
"candidate_diff_sha256": "sha256:c18ffcaf6f41a8cd5f3399a10355eb8de3e5eb561cb65cb551ea93bdf4df921b",
|
|
68
|
-
"changed_path_manifest_sha256": "sha256:
|
|
68
|
+
"changed_path_manifest_sha256": "sha256:dc754e73f2d661e2f914fdc5dd8d2a399be18567481137f43ae9d8d45aae3397",
|
|
69
69
|
"lens": "review-reliability",
|
|
70
70
|
"selected_order": 3
|
|
71
71
|
}
|
|
@@ -77,21 +77,12 @@
|
|
|
77
77
|
"byte_size": 226
|
|
78
78
|
},
|
|
79
79
|
"changed_path_manifest": [
|
|
80
|
-
{
|
|
81
|
-
"path": "scripts/deploy.sh",
|
|
82
|
-
"status": "A",
|
|
83
|
-
"old_mode": "000000",
|
|
84
|
-
"new_mode": "100644",
|
|
85
|
-
"deleted": false,
|
|
86
|
-
"type_changed": false,
|
|
87
|
-
"mode_only": false,
|
|
88
|
-
"intended_untracked": true
|
|
89
|
-
}
|
|
80
|
+
{"path":"scripts/deploy.sh","status":"A","old_mode":"000000","new_mode":"100644","deleted":false,"type_changed":false,"mode_only":false,"intended_untracked":false}
|
|
90
81
|
],
|
|
91
82
|
"repository_context": {
|
|
92
83
|
"capability": "review.opaque_repository_context",
|
|
93
84
|
"handle": "rctx1_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
94
|
-
"revision": "sha256:
|
|
95
|
-
"target_identity": "sha256:
|
|
85
|
+
"revision": "sha256:e10bced7198e3c817c5ff6d1172d6aa8ce3321d45ec4d68834e0b5f03a4246d9",
|
|
86
|
+
"target_identity": "sha256:04c970c2b0f7c128751ed2b0f7e672a2fe26dc267f018bf10e612096d19cfa04"
|
|
96
87
|
}
|
|
97
88
|
}
|
|
@@ -31,16 +31,7 @@
|
|
|
31
31
|
"byte_size": 226
|
|
32
32
|
},
|
|
33
33
|
"changed_path_manifest": [
|
|
34
|
-
{
|
|
35
|
-
"path": "scripts/deploy.sh",
|
|
36
|
-
"status": "A",
|
|
37
|
-
"old_mode": "000000",
|
|
38
|
-
"new_mode": "100644",
|
|
39
|
-
"deleted": false,
|
|
40
|
-
"type_changed": false,
|
|
41
|
-
"mode_only": false,
|
|
42
|
-
"intended_untracked": true
|
|
43
|
-
}
|
|
34
|
+
{"path":"scripts/deploy.sh","status":"A","old_mode":"000000","new_mode":"100644","deleted":false,"type_changed":false,"mode_only":false,"intended_untracked":true}
|
|
44
35
|
],
|
|
45
36
|
"repository_context": {
|
|
46
37
|
"capability": "review.opaque_repository_context",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"lineage_id": "review-status-fixture",
|
|
9
9
|
"state": "reviewing",
|
|
10
10
|
"generation": 1,
|
|
11
|
-
"revision": "sha256:
|
|
11
|
+
"revision": "sha256:c978e5383ae788a963c5e80c4f887d3b65ca415767398d57de827a9f0905f423"
|
|
12
12
|
},
|
|
13
13
|
"receipt": {
|
|
14
14
|
"status": "expected_missing"
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"original_changed_lines": 2,
|
|
21
21
|
"correction_budget": 1
|
|
22
22
|
},
|
|
23
|
-
"target_identity": "sha256:
|
|
23
|
+
"target_identity": "sha256:00c0d796b4136e365d0130886f300c954ecf9431c45d96d8031155c415507d49",
|
|
24
24
|
"projection": {
|
|
25
25
|
"schema": "gentle-ai.review-integration.projection/v1",
|
|
26
26
|
"kind": "current-changes",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
],
|
|
35
35
|
"intended_untracked": [],
|
|
36
36
|
"intended_untracked_proof": "sha256:b97229718d4c7fe50a8892eb474ae5aa6491697bccb400e3e31dbaca4894d2f3",
|
|
37
|
-
"initial_snapshot_identity": "sha256:
|
|
38
|
-
"current_snapshot_identity": "sha256:
|
|
37
|
+
"initial_snapshot_identity": "sha256:00c0d796b4136e365d0130886f300c954ecf9431c45d96d8031155c415507d49",
|
|
38
|
+
"current_snapshot_identity": "sha256:00c0d796b4136e365d0130886f300c954ecf9431c45d96d8031155c415507d49"
|
|
39
39
|
},
|
|
40
40
|
"repair": {
|
|
41
41
|
"schema": "gentle-ai.review-authority-repair-assessment/v1",
|
|
@@ -133,13 +133,13 @@
|
|
|
133
133
|
},
|
|
134
134
|
{
|
|
135
135
|
"name": "expected-revision",
|
|
136
|
-
"value": "sha256:
|
|
137
|
-
"token": "--expected-revision=sha256:
|
|
136
|
+
"value": "sha256:c978e5383ae788a963c5e80c4f887d3b65ca415767398d57de827a9f0905f423",
|
|
137
|
+
"token": "--expected-revision=sha256:c978e5383ae788a963c5e80c4f887d3b65ca415767398d57de827a9f0905f423"
|
|
138
138
|
},
|
|
139
139
|
{
|
|
140
140
|
"name": "target",
|
|
141
|
-
"value": "sha256:
|
|
142
|
-
"token": "--target=sha256:
|
|
141
|
+
"value": "sha256:00c0d796b4136e365d0130886f300c954ecf9431c45d96d8031155c415507d49",
|
|
142
|
+
"token": "--target=sha256:00c0d796b4136e365d0130886f300c954ecf9431c45d96d8031155c415507d49"
|
|
143
143
|
},
|
|
144
144
|
{
|
|
145
145
|
"name": "repository-context",
|
|
@@ -159,10 +159,10 @@
|
|
|
159
159
|
],
|
|
160
160
|
"artifact_subject": {
|
|
161
161
|
"schema": "gentle-ai.review-artifact-subject/v1",
|
|
162
|
-
"subject_hash": "sha256:
|
|
162
|
+
"subject_hash": "sha256:d8f46ff5cdcd86385033ce73f18cbfd61651c81deba1340b743e034cdf9dce48",
|
|
163
163
|
"lineage_id": "review-status-fixture",
|
|
164
|
-
"authority_revision": "sha256:
|
|
165
|
-
"target_identity": "sha256:
|
|
164
|
+
"authority_revision": "sha256:c978e5383ae788a963c5e80c4f887d3b65ca415767398d57de827a9f0905f423",
|
|
165
|
+
"target_identity": "sha256:00c0d796b4136e365d0130886f300c954ecf9431c45d96d8031155c415507d49",
|
|
166
166
|
"candidate_diff_sha256": "sha256:8ed4bd24d5beb3f73f6026355f6755f5aef7feebcd76447be820860c22bc47c6",
|
|
167
167
|
"changed_path_manifest_sha256": "sha256:64d028ff676fb4ef10f2d4a3488d568854b364b4cc4399578b5932d144d2347b",
|
|
168
168
|
"lens": "review-reliability",
|
|
@@ -175,16 +175,7 @@
|
|
|
175
175
|
"byte_size": 209
|
|
176
176
|
},
|
|
177
177
|
"changed_path_manifest": [
|
|
178
|
-
{
|
|
179
|
-
"path": "tracked.txt",
|
|
180
|
-
"status": "M",
|
|
181
|
-
"old_mode": "100644",
|
|
182
|
-
"new_mode": "100644",
|
|
183
|
-
"deleted": false,
|
|
184
|
-
"type_changed": false,
|
|
185
|
-
"mode_only": false,
|
|
186
|
-
"intended_untracked": false
|
|
187
|
-
}
|
|
178
|
+
{"path":"tracked.txt","status":"M","old_mode":"100644","new_mode":"100644","deleted":false,"type_changed":false,"mode_only":false,"intended_untracked":false}
|
|
188
179
|
]
|
|
189
180
|
}
|
|
190
181
|
]
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://gentle-ai.dev/contracts/review-integration/v1/schemas/correction-plan-request.schema.json",
|
|
4
|
+
"title": "Gentle AI provider-owned bounded correction plan request",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"schema", "request_hash", "lineage_id", "expected_revision", "target_identity",
|
|
9
|
+
"correction_budget", "fix_finding_ids", "findings"
|
|
10
|
+
],
|
|
11
|
+
"properties": {
|
|
12
|
+
"schema": {"const": "gentle-ai.review-correction-plan-request/v1"},
|
|
13
|
+
"request_hash": {"$ref": "#/$defs/sha256"},
|
|
14
|
+
"lineage_id": {"type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"},
|
|
15
|
+
"expected_revision": {"$ref": "#/$defs/sha256"},
|
|
16
|
+
"target_identity": {"$ref": "#/$defs/sha256"},
|
|
17
|
+
"correction_budget": {"type": "integer", "minimum": 1, "maximum": 200},
|
|
18
|
+
"fix_finding_ids": {
|
|
19
|
+
"type": "array", "minItems": 1, "uniqueItems": true,
|
|
20
|
+
"items": {"type": "string", "minLength": 1}
|
|
21
|
+
},
|
|
22
|
+
"findings": {
|
|
23
|
+
"type": "array", "minItems": 1, "uniqueItems": true,
|
|
24
|
+
"items": {"$ref": "#/$defs/finding"}
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"$defs": {
|
|
28
|
+
"sha256": {"type": "string", "pattern": "^sha256:[0-9a-f]{64}$"},
|
|
29
|
+
"finding": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"additionalProperties": false,
|
|
32
|
+
"required": [
|
|
33
|
+
"id", "lens", "location", "severity", "claim", "proof_refs", "evidence",
|
|
34
|
+
"evidence_class", "causal_disposition"
|
|
35
|
+
],
|
|
36
|
+
"properties": {
|
|
37
|
+
"id": {"type": "string", "minLength": 1},
|
|
38
|
+
"lens": {"enum": ["risk", "resilience", "readability", "reliability"]},
|
|
39
|
+
"location": {"type": "string", "minLength": 1},
|
|
40
|
+
"severity": {"enum": ["BLOCKER", "CRITICAL"]},
|
|
41
|
+
"claim": {"type": "string", "minLength": 1},
|
|
42
|
+
"proof_refs": {"type": "array", "minItems": 1, "items": {"type": "string", "minLength": 1}},
|
|
43
|
+
"evidence": {"type": "string", "minLength": 1},
|
|
44
|
+
"evidence_class": {"enum": ["deterministic", "inferential"]},
|
|
45
|
+
"causal_disposition": {"enum": ["introduced", "behavior-activated", "worsened"]}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|