gentle-pi 4.7.0 → 4.8.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 +55 -44
- package/assets/agents/gentle-ai-explore.md +3 -3
- package/assets/agents/gentle-ai-verify.md +20 -6
- package/assets/agents/gentle-ai-worker.md +6 -6
- package/assets/agents/jd-judge-a.md +1 -3
- package/assets/agents/jd-judge-b.md +1 -3
- package/assets/agents/review-readability.md +1 -5
- package/assets/agents/review-reliability.md +1 -5
- package/assets/agents/review-resilience.md +1 -5
- package/assets/agents/review-risk.md +1 -5
- package/assets/design-canvas/canvas-api.js +45 -0
- package/assets/design-canvas/canvas-boards.js +456 -0
- package/assets/design-canvas/canvas-boot.js +217 -0
- package/assets/design-canvas/canvas-checks.js +491 -0
- package/assets/design-canvas/canvas-comments.js +315 -0
- package/assets/design-canvas/canvas-compare.js +159 -0
- package/assets/design-canvas/canvas-events.js +75 -0
- package/assets/design-canvas/canvas-export.js +393 -0
- package/assets/design-canvas/canvas-focus.js +203 -0
- package/assets/design-canvas/canvas-handoffs.js +150 -0
- package/assets/design-canvas/canvas-i18n-es.js +392 -0
- package/assets/design-canvas/canvas-i18n.js +108 -0
- package/assets/design-canvas/canvas-layout.js +526 -0
- package/assets/design-canvas/canvas-menu.js +213 -0
- package/assets/design-canvas/canvas-messages.js +86 -0
- package/assets/design-canvas/canvas-minimap.js +163 -0
- package/assets/design-canvas/canvas-parts.js +401 -0
- package/assets/design-canvas/canvas-popover.js +234 -0
- package/assets/design-canvas/canvas-rail.js +348 -0
- package/assets/design-canvas/canvas-sizes.js +524 -0
- package/assets/design-canvas/canvas-store.js +164 -0
- package/assets/design-canvas/canvas-tokens.js +674 -0
- package/assets/design-canvas/canvas-ui.js +24 -0
- package/assets/design-canvas/canvas-view.js +184 -0
- package/assets/design-canvas/canvas.css +746 -15
- package/assets/design-canvas/canvas.js +2 -1506
- package/assets/design-canvas/index.html +117 -36
- package/assets/design-canvas/inspector.js +546 -16
- package/assets/install-wizard/wizard.js +5 -1
- package/assets/migrations/agent-body-history.json +24 -0
- package/assets/orchestrator-delegation-reference.md +8 -14
- package/assets/orchestrator-delegation.md +4 -4
- package/assets/orchestrator-full-delegation-card.md +4 -5
- package/assets/orchestrator-full-delegation.md +8 -8
- package/assets/orchestrator-memory.md +2 -2
- package/assets/orchestrator-prompts.md +1 -1
- package/assets/orchestrator-quota-recovery.md +5 -0
- package/assets/orchestrator-skills.md +13 -12
- package/assets/orchestrator-tracking.md +10 -14
- package/assets/orchestrator-verification.md +10 -8
- package/assets/orchestrator-writer.md +4 -4
- package/assets/orchestrator.md +18 -22
- package/bin/gentle-shell.mjs +128 -9
- package/contracts/review-provider-contract-mirror/provider-contract.lock.json +8 -9
- package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/bundle/manifest.json +3 -3
- package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/bundle/orchestration/pi.md +1 -0
- package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/bundle/routing/pi.md +6 -6
- package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/generated/provider-capabilities.baseline.json +3 -3
- package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/generated/provider-roles.baseline.json +1 -1
- package/docs/assets/brand/sponsor-banner.svg +60 -0
- package/docs/bundled-install.md +14 -6
- package/docs/delegated-verification.md +18 -2
- package/docs/desktop-rpc.md +1253 -0
- package/docs/gentle-agents-activity.md +26 -0
- package/docs/gentle-shell.md +39 -16
- package/docs/install-wizard.md +30 -21
- package/docs/odd-preparation-continuity.md +24 -0
- package/docs/permission-modes.md +9 -1
- package/docs/prompt-budget.md +12 -0
- package/docs/rdd-odd-friction-triage-2026-11-07.md +57 -0
- package/docs/readme-reference.md +76 -24
- package/docs/review-coordinator.md +29 -9
- package/docs/review-delivery-preflight.md +22 -0
- package/docs/work-continuity.md +11 -1
- package/extensions/ask-user-question.ts +2 -2
- package/extensions/child-context.ts +21 -7
- package/extensions/gentle-agents.ts +234 -33
- package/extensions/gentle-ai.ts +576 -135
- package/extensions/gentle-design.ts +69 -3
- package/extensions/gentle-desktop-rpc.ts +143 -0
- package/extensions/gentle-guide.ts +3 -0
- package/extensions/gentle-shell.ts +105 -52
- package/extensions/gentle-todo.ts +48 -25
- package/extensions/skill-registry.ts +248 -223
- package/lib/agent-assets.ts +30 -6
- package/lib/agent-tool-overlay.ts +117 -0
- package/lib/agents-config.ts +47 -6
- package/lib/agents-message-delivery.ts +17 -0
- package/lib/agents-messaging.ts +8 -2
- package/lib/agents-protocol.ts +15 -0
- package/lib/agents-report-cap.ts +115 -0
- package/lib/agents-runner.ts +91 -6
- package/lib/agents-session-transport.ts +17 -1
- package/lib/background-jobs-tools.ts +9 -4
- package/lib/bounded-writer-admission.ts +184 -31
- package/lib/child-context-files.ts +21 -6
- package/lib/codemode-renderer.ts +1 -0
- package/lib/delivery-conflict-markers.ts +349 -0
- package/lib/design-canvas-assets.ts +36 -0
- package/lib/design-canvas-server.ts +241 -23
- package/lib/design-comments.ts +94 -4
- package/lib/design-handoffs.ts +2 -1
- package/lib/design-layout.ts +125 -0
- package/lib/design-parts.ts +281 -0
- package/lib/design-system-tokens.ts +111 -0
- package/lib/desktop-agents-service.ts +294 -0
- package/lib/desktop-design-service.ts +233 -0
- package/lib/desktop-jobs-service.ts +263 -0
- package/lib/desktop-rpc-agents.ts +294 -0
- package/lib/desktop-rpc-config.ts +731 -0
- package/lib/desktop-rpc-design.ts +138 -0
- package/lib/desktop-rpc-jobs.ts +181 -0
- package/lib/desktop-rpc-permissions.ts +177 -0
- package/lib/desktop-rpc-profiles.ts +196 -0
- package/lib/desktop-rpc-usage.ts +229 -0
- package/lib/desktop-rpc.ts +225 -0
- package/lib/desktop-usage-service.ts +310 -0
- package/lib/destructive-command-guard.ts +188 -13
- package/lib/gentle-ai-renderer.ts +13 -1
- package/lib/gentle-design.ts +201 -14
- package/lib/gentle-shell-bundled.ts +100 -9
- package/lib/hidden-tools.ts +35 -0
- package/lib/inprocess-reviewer.ts +96 -12
- package/lib/model-fallback-policy.ts +9 -0
- package/lib/model-routing-authority.ts +9 -0
- package/lib/nan-provider.ts +42 -28
- package/lib/native-review-cli.ts +79 -4
- package/lib/orchestrator-discovery.ts +39 -2
- package/lib/reply-language-anchor.ts +27 -2
- package/lib/request-context-placement.ts +53 -0
- package/lib/review-candidate-view.ts +11 -1
- package/lib/review-continuation-registry.ts +17 -0
- package/lib/review-coordinator.ts +252 -8
- package/lib/review-delivery-preflight.ts +85 -0
- package/lib/review-host-relay.ts +5 -1
- package/lib/review-integration-v2.ts +56 -3
- package/lib/reviewer-stream.ts +87 -0
- package/lib/shell-prompt.ts +16 -3
- package/lib/shell-usage.ts +10 -0
- package/lib/vim-editor-adapter.ts +9 -2
- package/lib/writer-batch-admission.ts +55 -0
- package/lib/yolo-session-policy.ts +6 -1
- package/package.json +2 -2
- package/prompts/skill-creation.md +1 -10
- package/runtime/design-canvas-assets.mjs +37 -0
- package/runtime/gentle-shell-bundled.mjs +100 -9
- package/runtime/native-review-cli.mjs +79 -4
- package/runtime/review-integration-v2.mjs +56 -3
- package/scripts/bootstrap.cmd +2 -2
- package/scripts/bootstrap.sh +41 -4
- package/scripts/build-full-delegation-card.mjs +4 -0
- package/scripts/build-runtime-modules.mjs +1 -0
- package/scripts/gentle-ai-installer.mjs +10 -10
- package/scripts/gentle-ai-proxy.mjs +1 -1
- package/scripts/installer-downloads.mjs +34 -8
- package/scripts/installer-preflight.mjs +28 -17
- package/scripts/installer-probes.mjs +25 -5
- package/scripts/installer-server.mjs +38 -9
- package/scripts/installer-windows.mjs +2 -2
- package/scripts/pi-update.mjs +166 -27
- package/scripts/prepare-verifier.mjs +107 -0
- package/scripts/update-agent-body-history.mjs +55 -8
- package/scripts/verify-package-files.mjs +40 -19
- package/skills/branch-pr/SKILL.md +16 -16
- package/skills/comment-writer/SKILL.md +1 -1
- package/skills/design/SKILL.md +6 -6
- package/skills/gentle-ai/SKILL.md +5 -5
- package/skills/judgment-day/SKILL.md +2 -2
- package/skills/judgment-day/references/prompts-and-formats.md +1 -1
- package/skills/rdd-defect-workflow/SKILL.md +6 -6
- package/skills/skill-improver/SKILL.md +2 -2
- package/skills/skill-registry/SKILL.md +11 -13
- package/skills/tui-design/SKILL.md +1 -1
- package/skills/work-unit-commits/SKILL.md +5 -5
- package/tests/agent-prompt-diet-contract.test.ts +101 -0
- package/tests/agent-tool-overlay-acceptance.test.ts +158 -0
- package/tests/agent-tool-overlay.test.ts +89 -0
- package/tests/agents-config.test.ts +10 -1
- package/tests/agents-message-delivery.test.ts +36 -0
- package/tests/agents-queries.test.ts +144 -4
- package/tests/agents-report-cap.test.ts +126 -0
- package/tests/agents-runner.test.ts +37 -1
- package/tests/agents-session-transport.test.ts +34 -0
- package/tests/always-on-prompt-verdicts-contract.test.ts +188 -0
- package/tests/append-system-prompt-route.test.ts +10 -2
- package/tests/approved-text-leftovers-contract.test.ts +136 -0
- package/tests/artifact-language.test.ts +1 -1
- package/tests/ask-user-question.test.ts +2 -1
- package/tests/audit-leftovers-contract.test.ts +51 -0
- package/tests/bounded-stop-contract.test.ts +9 -1
- package/tests/branch-pr-skill.test.ts +10 -1
- package/tests/bundled-install.test.ts +1 -1
- package/tests/child-context-files.test.ts +64 -8
- package/tests/child-skills-catalog.test.ts +56 -0
- package/tests/codemode-rendering.test.ts +4 -1
- package/tests/delegate-for-reason-contract.test.ts +30 -8
- package/tests/delivery-conflict-markers.test.ts +348 -0
- package/tests/design-canvas-all-sizes.test.ts +631 -0
- package/tests/design-canvas-allowlist.test.ts +32 -0
- package/tests/design-canvas-assets.test.ts +11 -878
- package/tests/design-canvas-boards.test.ts +77 -0
- package/tests/design-canvas-checks.test.ts +655 -0
- package/tests/design-canvas-compare.test.ts +79 -0
- package/tests/design-canvas-events.test.ts +59 -0
- package/tests/design-canvas-export.test.ts +1168 -0
- package/tests/design-canvas-focus.test.ts +113 -0
- package/tests/design-canvas-handoffs.test.ts +59 -0
- package/tests/design-canvas-i18n-review.test.ts +513 -0
- package/tests/design-canvas-i18n-views.test.ts +259 -0
- package/tests/design-canvas-i18n.test.ts +526 -0
- package/tests/design-canvas-inspector.test.ts +937 -0
- package/tests/design-canvas-layout.test.ts +1222 -0
- package/tests/design-canvas-minimap.test.ts +413 -0
- package/tests/design-canvas-modules.test.ts +90 -0
- package/tests/design-canvas-parts.test.ts +721 -0
- package/tests/design-canvas-rail.test.ts +799 -0
- package/tests/design-canvas-server.test.ts +855 -17
- package/tests/design-canvas-sizes.test.ts +548 -0
- package/tests/design-canvas-store.test.ts +180 -0
- package/tests/design-canvas-tokens.test.ts +965 -0
- package/tests/design-canvas-view.test.ts +299 -0
- package/tests/design-comments.test.ts +201 -1
- package/tests/design-handoffs.test.ts +20 -0
- package/tests/design-layout.test.ts +100 -0
- package/tests/design-parts.test.ts +260 -0
- package/tests/design-system-tokens.test.ts +215 -0
- package/tests/desktop-rpc-agents.test.ts +893 -0
- package/tests/desktop-rpc-config.test.ts +1452 -0
- package/tests/desktop-rpc-design.test.ts +662 -0
- package/tests/desktop-rpc-jobs.test.ts +796 -0
- package/tests/desktop-rpc-permissions.test.ts +311 -0
- package/tests/desktop-rpc-profiles.test.ts +140 -0
- package/tests/desktop-rpc-safety.test.ts +119 -0
- package/tests/desktop-rpc-usage.test.ts +697 -0
- package/tests/desktop-rpc.test.ts +252 -0
- package/tests/devbinary/pi-host-relay.devtest.ts +149 -80
- package/tests/devbinary/review-session-consent.devtest.ts +84 -0
- package/tests/engram-safety.test.ts +111 -0
- package/tests/fixtures/devbinary/status-v9-escalated-non-blocking.captured.json +92 -0
- package/tests/fixtures/devbinary/status-v9-escalated-non-blocking.provenance.md +3 -0
- package/tests/fixtures/primary-session-prompt/gentleman.golden.md +20 -29
- package/tests/fixtures/refusal-identity.probe.mjs +139 -0
- package/tests/full-delegation-closure.test.ts +29 -0
- package/tests/gentle-agents.test.ts +329 -4
- package/tests/gentle-ai-binary.test.ts +1 -1
- package/tests/gentle-ai-child-guards.test.ts +1 -0
- package/tests/gentle-ai-installer.test.ts +52 -51
- package/tests/gentle-ai-renderer.test.ts +36 -2
- package/tests/gentle-ai.test.ts +121 -6
- package/tests/gentle-design.test.ts +365 -1
- package/tests/gentle-shell-bundled.test.ts +91 -5
- package/tests/gentle-shell-launcher.test.ts +1 -1
- package/tests/gentle-shell.test.ts +118 -87
- package/tests/gentle-todo.test.ts +32 -9
- package/tests/hidden-tools.test.ts +188 -0
- package/tests/independent-recovery-delivery.test.ts +19 -5
- package/tests/inprocess-reviewer.test.ts +73 -0
- package/tests/install-wizard.test.ts +27 -1
- package/tests/installer-downloads.test.ts +30 -1
- package/tests/installer-posix-bootstrap.test.ts +114 -13
- package/tests/installer-preflight.test.ts +49 -1
- package/tests/installer-probes.test.ts +146 -0
- package/tests/installer-server.test.ts +203 -4
- package/tests/installer-windows-bootstrap.test.ts +19 -1
- package/tests/judgment-day-severity-admission.test.ts +46 -0
- package/tests/lazy-module-contradictions-contract.test.ts +158 -0
- package/tests/maintainer/desktop-rpc.maintest.ts +632 -0
- package/tests/maintainer/pi-update-source.maintest.ts +48 -18
- package/tests/model-fallback-policy.test.ts +26 -7
- package/tests/nan-provider-runtime.test.ts +17 -3
- package/tests/nan-provider.test.ts +111 -56
- package/tests/native-review-capability-contract.test.ts +11 -1
- package/tests/native-review-cli-nonblocking-findings.test.ts +165 -0
- package/tests/native-review-parity.test.ts +24 -5
- package/tests/native-review-refusal-identity.test.ts +25 -0
- package/tests/no-self-pause-contract.test.ts +11 -3
- package/tests/odd-integration.test.ts +11 -3
- package/tests/odd-routing-contract.test.ts +80 -28
- package/tests/orchestrator-budget.test.ts +30 -5
- package/tests/orchestrator-consultation-sdk.test.ts +32 -6
- package/tests/orchestrator-delegation-mode.test.ts +2 -1
- package/tests/orchestrator-discovery.test.ts +28 -0
- package/tests/orchestrator-prompt-budget.test.ts +11 -2
- package/tests/orchestrator-prompt-diet-contract.test.ts +221 -0
- package/tests/orchestrator-rdd-ownership.test.ts +2 -1
- package/tests/orchestrator-work-search.test.ts +4 -2
- package/tests/package-files.test.ts +25 -1
- package/tests/package-manifest.test.ts +11 -10
- package/tests/parallel-reason-contract.test.ts +6 -3
- package/tests/permission-allowlist.test.ts +200 -30
- package/tests/persona-neutral-voseo.test.ts +4 -4
- package/tests/persona-reply-language.test.ts +1 -1
- package/tests/persona-single-channel.test.ts +13 -5
- package/tests/pi-update-launcher.test.ts +17 -7
- package/tests/pi-update-source.test.ts +113 -6
- package/tests/pi-update.test.ts +294 -19
- package/tests/pnpm-workspace-policy.test.ts +47 -0
- package/tests/primary-context-files.test.ts +233 -0
- package/tests/primary-context-three-files.test.ts +174 -0
- package/tests/provider-defect-handoff.test.ts +9 -2
- package/tests/rdd-aware-verification-contract.test.ts +1 -1
- package/tests/rdd-status-line.test.ts +94 -1
- package/tests/reply-language-anchor-placement.test.ts +184 -0
- package/tests/reply-language-anchor.test.ts +17 -1
- package/tests/request-context-append-only.test.ts +218 -0
- package/tests/request-context-placement.test.ts +148 -0
- package/tests/review-agent-end-preflight.test.ts +79 -1
- package/tests/review-candidate-view.test.ts +65 -0
- package/tests/review-continuation-registry.test.ts +31 -0
- package/tests/review-contract-prompt.test.ts +1 -1
- package/tests/review-controller.test.ts +2 -1
- package/tests/review-coordinator-correction-gate.test.ts +105 -0
- package/tests/review-coordinator-findings.test.ts +206 -0
- package/tests/review-coordinator-nonblocking-scope.test.ts +169 -0
- package/tests/review-coordinator.test.ts +271 -4
- package/tests/review-delivery-preflight.test.ts +462 -0
- package/tests/review-due-compaction.test.ts +31 -0
- package/tests/review-due-public-boundary.test.ts +26 -0
- package/tests/review-integration-nonblocking-findings.test.ts +108 -0
- package/tests/review-json-arguments.test.ts +41 -2
- package/tests/review-ledger-contract.test.ts +19 -40
- package/tests/review-loadout-rdd-off-sdk.test.ts +30 -1
- package/tests/review-one-call-findings.test.ts +131 -0
- package/tests/review-one-call-followups.test.ts +308 -0
- package/tests/review-one-call-reviewer-requests.test.ts +207 -0
- package/tests/review-one-call.test.ts +452 -0
- package/tests/review-relay-transport-agent.test.ts +28 -1
- package/tests/review-reviewer-evidence.test.ts +41 -1
- package/tests/review-risk-assessment.test.ts +52 -5
- package/tests/review-run-statement-guidance-independent.test.ts +54 -0
- package/tests/review-session-standing-permission-controller.test.ts +32 -2
- package/tests/review-tool-prose-budget.test.ts +1 -0
- package/tests/reviewer-stream.test.ts +149 -0
- package/tests/session-profile-extension.test.ts +2 -2
- package/tests/shell-prompt.test.ts +17 -0
- package/tests/shell-usage.test.ts +59 -10
- package/tests/skill-contradictions-contract.test.ts +122 -0
- package/tests/skill-registry-watcher.test.ts +216 -2
- package/tests/skill-registry.test.ts +929 -306
- package/tests/support/design-canvas-dom.ts +369 -0
- package/tests/support/review-coordinator-runtime.ts +212 -17
- package/tests/task-size-routing-contract.test.ts +42 -11
- package/tests/test-strength-contract.test.ts +2 -1
- package/tests/todo-request-append-only.test.ts +214 -0
- package/tests/tool-batching-contract.test.ts +3 -1
- package/tests/update-agent-body-history.test.ts +138 -0
- package/tests/verification-tiers-contract.test.ts +229 -0
- package/tests/verifier-preparation.test.ts +229 -0
- package/tests/verify-agent-contract.test.ts +20 -2
- package/tests/verify-first-launch-contract.test.ts +87 -11
- package/tests/vim-editor-adapter.test.ts +2 -2
- package/tests/work-continuity-contract.test.ts +54 -11
- package/tests/writer-admission-messages.test.ts +232 -0
- package/tests/writer-batch-admission.test.ts +66 -0
- package/tests/writer-edit-surface-scope.test.ts +52 -20
- package/tests/writer-feature-document-admission.test.ts +184 -0
- package/tests/yolo-mode.test.ts +39 -0
- package/skills/_shared/review-ledger-contract.md +0 -106
- /package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/bundle/README.md +0 -0
- /package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/bundle/schemas/lens.schema.json +0 -0
- /package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/bundle/schemas/refuter.schema.json +0 -0
- /package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/bundle/schemas/targeted-validator.schema.json +0 -0
- /package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/bundle/vectors/lens.json +0 -0
- /package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/bundle/vectors/refuter.json +0 -0
- /package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/bundle/vectors/targeted-validator.json +0 -0
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Parent Pi session only. Load it when the Writer rule fires or an explicitly activated Judgment Day fix batch is dispatched; small tasks never need it. The Writer rule fires on a named reason (parallel units, the context backstop), never on size alone or a price ratio: a large task without a reason stays inline, following its logbook. Configured per-agent models (`subagents.json` `model_profiles`) still apply to every writer it launches. Each writer prompt requires the self-review of the Parallel review protocol in `orchestrator-verification.md`. A reason holds only when the launch delivers it:
|
|
4
4
|
|
|
5
|
-
- **Invariants**: each writer prompt names the existing helpers its unit must reuse for shared state
|
|
5
|
+
- **Invariants**: each writer prompt names the existing helpers its unit must reuse for shared state and the invariants they keep; units built in parallel cannot see each other, so this is the only place they learn them.
|
|
6
6
|
- **Size threshold**: a subagent costs one to two minutes of reading and setup before it writes anything; delegate a unit only when it needs several minutes of work (several files or roughly 100+ changed lines). Several small independent changes are faster inline, one after another.
|
|
7
|
-
- **Parallelism**: a unit is one independent piece of behavior with its own code, tests, and docs; never split one behavior into a test writer, a docs writer, and inline code, and never delegate a unit that depends on another unit still in progress.
|
|
7
|
+
- **Parallelism**: a unit is one independent piece of behavior with its own code, tests, and docs; never split one behavior into a test writer, a docs writer, and inline code, and never delegate a unit that depends on another unit still in progress. In every mode, launch every independent unit in the same turn via `subagent_run` without `mode`, in one assistant message with no other tool call (in background when background mode is on), then wait for all completions before the Seam check; serial launches void the reason: if units cannot launch together, work inline.
|
|
8
8
|
|
|
9
9
|
#### Allowed edit surfaces (MANDATORY)
|
|
10
10
|
|
|
11
|
-
The bounded writer refuses to write outside the exact allowed edit surfaces and stops with `status: interaction_required` when they are missing.
|
|
11
|
+
The bounded writer refuses to write outside the exact allowed edit surfaces and stops with `status: interaction_required` when they are missing. Every new writer launch carries the section (a continuation inherits it); after an admission rejection, repair what it names once, never relaunch the same prompt unchanged.
|
|
12
12
|
|
|
13
13
|
Before launching a bounded writer (`gentle-ai-worker`, a user-configured `worker`, or the native `Agent` fallback), derive the allowed edit surface from the delegated task — files the change must touch, plus directories where it authorizes new files — and pass it in the prompt under an `## Allowed edit surfaces` heading, in the exact-path form of `## Skills to load before work`:
|
|
14
14
|
|
|
@@ -19,7 +19,7 @@ Before launching a bounded writer (`gentle-ai-worker`, a user-configured `worker
|
|
|
19
19
|
|
|
20
20
|
Test scratch stays outside the worktree (`mktemp -d`), never in the repository (nor caches or `TMPDIR`); state needed inside uses an excluded path the test removes. The runtime owns session scratch; `/gentle:scratch` lists or cleans recorded clones and worktrees.
|
|
21
21
|
|
|
22
|
-
If the surface genuinely cannot be derived, do not launch the writer or ask the human to author paths. Derive a candidate set first — the exact paths this task would touch — and present that enumerated list as an approve/decline choice under the Lossless Blocking Prompts rules in `orchestrator-prompts.md`.
|
|
22
|
+
If the surface genuinely cannot be derived, do not launch the writer or ask the human to author paths. Derive a candidate set first — the exact paths this task would touch — and present that enumerated list as an approve/decline choice under the Lossless Blocking Prompts rules in `orchestrator-prompts.md`.
|
|
23
23
|
|
|
24
24
|
Relay a writer's `interaction_required` payload about edit surfaces the same way: present its derived candidate paths as the choice, and add or drop paths only on the human's explicit instruction.
|
|
25
25
|
|
package/assets/orchestrator.md
CHANGED
|
@@ -2,30 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
Bind this to the parent Pi session only; subagents get bounded task instructions.
|
|
4
4
|
|
|
5
|
-
## Identity Contract
|
|
6
|
-
|
|
7
|
-
Defined once in the identity/harness section injected above (the `Current persona mode:` line). Honor it; do not restate here.
|
|
8
|
-
|
|
9
5
|
## Core Role
|
|
10
6
|
|
|
11
7
|
Package assets root: `{{GENTLE_PI_ASSETS_ROOT}}`. Lazy asset paths below are relative to this root.
|
|
12
8
|
|
|
13
|
-
You are a COORDINATOR
|
|
9
|
+
You are a COORDINATOR who executes understood work inline. Maintain one thin conversation thread, delegate only when a Mechanism trigger fires, and synthesize results for the user.
|
|
14
10
|
|
|
15
11
|
Default to concise synthesis: decision, outcome, next action. Expand on request or when detail is needed.
|
|
16
12
|
|
|
17
13
|
Batch independent tool calls in one turn (parallel calls or one multi-file command). Never spend a turn only on a `todo` or status update.
|
|
18
14
|
|
|
19
|
-
## Language Boundary
|
|
20
|
-
|
|
21
|
-
Reply-language style and the active persona's Spanish variant are defined once in the identity/harness section above (its `Current persona mode:` line). The rules below are delegation/artifact-scoped and not restated there:
|
|
22
|
-
|
|
23
|
-
Generated technical artifacts — whether by the parent inline or by subagents — (code, code comments, UI copy, identifiers, commit messages, filenames, PR descriptions, tests, fixtures, delegated outputs, and repository-facing documentation) default to English, regardless of the user's conversation language or active persona. Override only when the user explicitly requests another language for that artifact, or when extending a project whose existing convention is non-English.
|
|
24
|
-
|
|
25
|
-
Public/contextual comments and replies are different from technical artifacts. When using `comment-writer` or drafting a human-facing GitHub, PR review, Slack, Discord, or async comment, write in the target context language by default. Spanish issue/thread -> Spanish comment. English thread -> English comment. Mixed context -> target message language. Explicit user language or tone override wins. Spanish comments default to neutral/professional Spanish unless the user or target context clearly calls for regional tone.
|
|
26
|
-
|
|
27
|
-
Subagent-facing English delegation and quote/UI exceptions: `orchestrator-delegation.md`.
|
|
28
|
-
|
|
29
15
|
## Task Size
|
|
30
16
|
|
|
31
17
|
Task size: small or large. A task is **small** when all three hold:
|
|
@@ -36,9 +22,9 @@ Task size: small or large. A task is **small** when all three hold:
|
|
|
36
22
|
|
|
37
23
|
The number of files, commands or tests, fixes, or a requested `todo` list never decides size. A task is **large** only when the resume test fails (multi-session work, external waits, deliverables the user wants apart (never several features asked at once), requirements compaction could lose); large tasks get ODD tracking and workers only by the Writer rule, else inline.
|
|
38
24
|
|
|
39
|
-
Small path: inline (parent; `bash_background` policy); read only what you change and its helpers, in one batch; observe RED inline before the fix; run the focused test and the suite inline in one command. No explore, worker, or verifier unless a trigger fires; no feature document, mirror, or commits unless the user asks;
|
|
25
|
+
Small path: inline (parent; `bash_background` policy); read only what you change and its helpers, in one batch; observe RED inline before the fix; run the focused test and the suite inline in one command. No explore, worker, or verifier unless a trigger fires; no feature document, mirror, or commits unless the user asks; `todo` on request. It needs no lazy asset.
|
|
40
26
|
|
|
41
|
-
**High risk**: a mistake would be hard to detect, hard to undo, or reaches beyond the change: (1) data or irreversible effects that cannot be rebuilt (migrations, rewriting or deleting stored data, format changes, writing data without validation; not saving new records, nor a dev or test database a seed or backup rebuilds); (2) security (auth, permissions, credentials, secrets, guards, sandbox); (3) changing or removing contracts others already consume (public API, CLI flags, config formats, exports, mirrored prompts; not adding a flag, command or optional field; requested changes are not; unrequested
|
|
27
|
+
**High risk**: a mistake would be hard to detect, hard to undo, or reaches beyond the change: (1) data or irreversible effects that cannot be rebuilt (migrations, rewriting or deleting stored data, format changes, writing data without validation; not saving new records, nor a dev or test database a seed or backup rebuilds); (2) security (auth, permissions, credentials, secrets, guards, sandbox); (3) changing or removing contracts others already consume (public API, CLI flags, config formats, exports, mirrored prompts; not adding a flag, command or optional field; requested changes are not; changing shared code that unrequested behavior also uses is); (4) concurrency; (5) delivery or environment (installers, release, CI, deploy, dependencies); (6) no test would catch a regression in what changes. Count "unclear" as high only when a bounded look cannot tell whether (1)-(5) apply. When RDD is on and native assess returns a tier, that tier wins.
|
|
42
28
|
|
|
43
29
|
**Risk line**: close every code change, small path or delegated, with `Risk: item N (reason)` or `Risk: none` per the list; any item → Verification rule.
|
|
44
30
|
|
|
@@ -53,20 +39,30 @@ Before launching bounded writer (`gentle-ai-worker` or `worker`), derive nonempt
|
|
|
53
39
|
Delegation Triggers — each mechanism turns on only when its own trigger condition truly holds, and only then is it mandatory; no trigger holds by default, and when in doubt work inline within the evidence budget (prefer `subagent_run`; role missing/unusable: native `Agent`, same read-only constraints; report fallback). Then re-evaluate task size.
|
|
54
40
|
|
|
55
41
|
1. **Ask** — open product or design decision → one focused question; stop and wait.
|
|
56
|
-
2. **Evidence-budget rule** — understanding needs more than one read batch or
|
|
42
|
+
2. **Evidence-budget rule** — understanding needs more than one read batch or >3 lookups → stop and delegate one `gentle-ai-explore`, handoff at most ~2k tokens with `path:line` evidence; one spot check only. Reassess cumulative discovery each batch, never reset. A fired trigger overrides initial size, including read-only: it limits mutation, not routing. Exempt only preparation for an understood inline write, not discovery.
|
|
57
43
|
3. **Verification rule** — only a named high-risk item (assess `escalate` when RDD is on or unknown) → independent `gentle-ai-verify`; else inline; runtime admission, gates/overengineering: `orchestrator-verification.md`.
|
|
58
44
|
4. **Track** — large task → feature document, Engram mirror, `todo`, work-unit commits (`orchestrator-tracking.md`, `orchestrator-memory.md`).
|
|
59
|
-
5. **Writer rule** — never by file count or a large task alone; only for a reason (`orchestrator-writer.md`): 2+ independent units of behavior, each heavier than a subagent start (several minutes of work: several files or roughly 100+ changed lines), launched together in background, else inline; Context backstop. Small module or command changes stay inline, even when independent. Tests, docs, and code of the same behavior are one unit, never separate writers; dependent deliveries are not independent.
|
|
45
|
+
5. **Writer rule** — never by file count or a large task alone; only for a reason (`orchestrator-writer.md`): 2+ independent units of behavior, each heavier than a subagent start (several minutes of work: several files or roughly 100+ changed lines), launched together in one turn (in background when background mode is on), else inline; Context backstop. Small module or command changes stay inline, even when independent. Tests, docs, and code of the same behavior are one unit, never separate writers; dependent deliveries are not independent.
|
|
60
46
|
6. **Incident rule** — diagnose wrong cwd/worktree/git/tooling incidents separately before resuming.
|
|
61
47
|
7. **Context backstop** — when the runtime signals it → delegate the next unit needing several steps. Bound command output (counts, `--stat`, `tail`).
|
|
62
48
|
|
|
63
|
-
{{GENTLE_PI_BACKGROUND_POLICY}}; rules:
|
|
49
|
+
{{GENTLE_PI_BACKGROUND_POLICY}}; rules: background block, `orchestrator-delegation-reference.md`.
|
|
64
50
|
|
|
65
51
|
Per-action table, Work Routing Ladder, Canonical Workflows: `orchestrator-delegation-reference.md`; blocking-prompt relays and provider defects: `orchestrator-prompts.md`.
|
|
66
52
|
|
|
53
|
+
## Language Boundary
|
|
54
|
+
|
|
55
|
+
Reply-language style and the active persona's Spanish variant are defined once in the identity/harness section above (its `Current persona mode:` line). The rules below are delegation/artifact-scoped and not restated there:
|
|
56
|
+
|
|
57
|
+
Generated technical artifacts — whether by the parent inline or by subagents — (code, code comments, UI copy, identifiers, commit messages, filenames, PR descriptions, tests, fixtures, delegated outputs, and repository-facing documentation) default to English, regardless of the user's conversation language or active persona. Override only when the user explicitly requests another language for that artifact, or when extending a project whose existing convention is non-English.
|
|
58
|
+
|
|
59
|
+
Public/contextual comments and replies are different from technical artifacts. When using `comment-writer` or drafting a human-facing GitHub, PR review, Slack, Discord, or async comment, write in the target context language by default. Spanish issue/thread -> Spanish comment. English thread -> English comment. Mixed context -> target message language. Explicit user language or tone override wins. Spanish comments default to neutral/professional Spanish unless the user or target context clearly calls for regional tone.
|
|
60
|
+
|
|
61
|
+
Subagent-facing English delegation and quote/UI exceptions: `orchestrator-delegation.md`.
|
|
62
|
+
|
|
67
63
|
## Memory Contract
|
|
68
64
|
|
|
69
|
-
With memory, the parent selects context;
|
|
65
|
+
With memory, the parent selects context; workers save validated facts when given a project. ODD task continuity and memory lifecycle: `orchestrator-memory.md`.
|
|
70
66
|
|
|
71
67
|
## Skill Registry Protocol
|
|
72
68
|
|
|
@@ -78,7 +74,7 @@ For skill-shaped requests, `<available_skills>` is a discovery aid only, never o
|
|
|
78
74
|
|
|
79
75
|
## Gentle AI RDD ownership
|
|
80
76
|
|
|
81
|
-
|
|
77
|
+
While RDD is not off, this package injects the mirrored provider-bundle review execution contract; Gentle AI writes nothing into this prompt. Absent that mirrored contract, this package invents no lifecycle instructions.
|
|
82
78
|
|
|
83
79
|
## Safety
|
|
84
80
|
|
package/bin/gentle-shell.mjs
CHANGED
|
@@ -73,7 +73,9 @@ import {
|
|
|
73
73
|
ENGRAM_RECOVERY_NOTICE,
|
|
74
74
|
ENGRAM_START_FAILED_NOTICE,
|
|
75
75
|
GENTLE_SHELL_CONFIG_HOME_ENV,
|
|
76
|
+
engramContractMismatchNotice,
|
|
76
77
|
engramProbeAllowed,
|
|
78
|
+
engramSupportsDaemonLifecycle,
|
|
77
79
|
sharedEngramEnv,
|
|
78
80
|
piVersionOrHelpRequested,
|
|
79
81
|
probeEngramEndpoint,
|
|
@@ -86,6 +88,8 @@ import {
|
|
|
86
88
|
bundledUpdatePlan,
|
|
87
89
|
nodeBundledFs,
|
|
88
90
|
parseBundledUpgradeArgs,
|
|
91
|
+
parseEngramRuntimeContract,
|
|
92
|
+
probeEngramRuntimeContract,
|
|
89
93
|
resolveBundledInstall,
|
|
90
94
|
withBundledNpmCommand,
|
|
91
95
|
withoutMissingBundledNpmCommand,
|
|
@@ -230,23 +234,37 @@ async function classifyBundledMemory() {
|
|
|
230
234
|
}
|
|
231
235
|
|
|
232
236
|
// Like other agents' hooks, Shell starts the shared server when nothing
|
|
233
|
-
// listens
|
|
234
|
-
//
|
|
235
|
-
//
|
|
236
|
-
//
|
|
237
|
-
//
|
|
238
|
-
//
|
|
237
|
+
// listens. Cores with the daemon lifecycle (>= 3.7.0) become a first-class
|
|
238
|
+
// daemon through `engram run -d`, so the standard engram verbs manage them;
|
|
239
|
+
// anything else (older cores, a failed daemon handoff) keeps the legacy
|
|
240
|
+
// detached plain `serve` on Engram's own default port and data directory, so it
|
|
241
|
+
// outlives Pi. Both paths' environment drops the user's Engram settings and
|
|
242
|
+
// GitHub tokens and skips the update check. Ready means the same
|
|
243
|
+
// /compatibility contract any reused server must answer, and a concurrent
|
|
244
|
+
// launch that wins the bind converges through it within the overall bounds.
|
|
239
245
|
const ENGRAM_START_TIMEOUT_MS = 10000;
|
|
240
246
|
const ENGRAM_START_EXIT_GRACE_MS = 2000;
|
|
247
|
+
// `engram run -d` itself waits up to 15 s for its daemon's readiness before the
|
|
248
|
+
// wrapper exits (engram cmd/engram/run.go), so the daemon wrapper await can run
|
|
249
|
+
// slightly longer than the serve-only start budget.
|
|
250
|
+
const ENGRAM_DAEMON_START_TIMEOUT_MS = 16000;
|
|
241
251
|
|
|
242
252
|
async function startSharedEngram() {
|
|
243
253
|
const failed = { policy: "disabled", notice: ENGRAM_START_FAILED_NOTICE };
|
|
244
254
|
const core = verifiedBundledCore();
|
|
245
255
|
if (core === undefined) return failed;
|
|
256
|
+
const env = sharedEngramEnv(process.env);
|
|
257
|
+
// Cores with the daemon lifecycle (>= 3.7.0) start through `engram run -d`:
|
|
258
|
+
// the pidfile it keeps is what `engram ps/stop/logs/restart` manage, so the
|
|
259
|
+
// shared server becomes a first-class daemon (engram#2346). Anything short of
|
|
260
|
+
// a compatible running server falls back to the legacy detached serve below,
|
|
261
|
+
// which is the only option an older core would have had anyway.
|
|
262
|
+
if (engramSupportsDaemonLifecycle(engramPinVersion) && (await startEngramDaemon(core, env))) {
|
|
263
|
+
return { policy: "allow", url: ENGRAM_DEFAULT_URL };
|
|
264
|
+
}
|
|
246
265
|
let deadline = Date.now() + ENGRAM_START_TIMEOUT_MS;
|
|
247
266
|
const exited = () => { deadline = Math.min(deadline, Date.now() + ENGRAM_START_EXIT_GRACE_MS); };
|
|
248
267
|
try {
|
|
249
|
-
const env = sharedEngramEnv(process.env);
|
|
250
268
|
const child = spawn(core, ["serve"], { cwd: homedir(), env, detached: true, stdio: "ignore", windowsHide: true });
|
|
251
269
|
child.once("error", exited);
|
|
252
270
|
child.once("exit", exited);
|
|
@@ -262,6 +280,34 @@ async function startSharedEngram() {
|
|
|
262
280
|
return failed;
|
|
263
281
|
}
|
|
264
282
|
|
|
283
|
+
// Runs `engram run -d` to completion and reports whether a compatible server is
|
|
284
|
+
// listening: the wrapper exits 0 after the daemon reported readiness and exits
|
|
285
|
+
// non-zero on failure; a concurrent launch that wins the bind converges through
|
|
286
|
+
// the same probed contract as serve. Spawn errors and a wrapper that never ends
|
|
287
|
+
// are cut off at the start budget. Bounded either way.
|
|
288
|
+
async function startEngramDaemon(core, env) {
|
|
289
|
+
try {
|
|
290
|
+
const child = spawn(core, ["run", "-d"], { cwd: homedir(), env, stdio: "ignore", windowsHide: true });
|
|
291
|
+
await Promise.race([
|
|
292
|
+
new Promise((resolve, reject) => {
|
|
293
|
+
child.once("error", reject);
|
|
294
|
+
child.once("exit", (status) => resolve(typeof status === "number" ? status : -1));
|
|
295
|
+
}),
|
|
296
|
+
new Promise((_, reject) => setTimeout(() => reject(new Error("engram run -d start budget exceeded")), ENGRAM_DAEMON_START_TIMEOUT_MS)),
|
|
297
|
+
]);
|
|
298
|
+
const deadline = Date.now() + ENGRAM_START_EXIT_GRACE_MS;
|
|
299
|
+
while (Date.now() < deadline) {
|
|
300
|
+
const endpoint = await probeEngramEndpoint({ timeoutMs: 500 });
|
|
301
|
+
if (endpoint.kind === "listening" && endpoint.compatible) return true;
|
|
302
|
+
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
303
|
+
}
|
|
304
|
+
} catch {
|
|
305
|
+
// Spawn error or the wrapper outlived the start budget: fall back to the
|
|
306
|
+
// legacy detached serve.
|
|
307
|
+
}
|
|
308
|
+
return false;
|
|
309
|
+
}
|
|
310
|
+
|
|
265
311
|
const LEGACY_ENGRAM_COMPANION_SOURCE = "npm:gentle-engram@0.4.2";
|
|
266
312
|
const companionSource = (entry) => typeof entry === "string" ? entry : entry?.source;
|
|
267
313
|
|
|
@@ -323,10 +369,56 @@ async function migrateManagedEngramCompanion(home, homeHadContentBeforeBootstrap
|
|
|
323
369
|
}
|
|
324
370
|
}
|
|
325
371
|
|
|
372
|
+
// A stderr write that resolves once the bytes are handed to the stream. When
|
|
373
|
+
// stderr is a pipe (a parent process, a test harness) Node writes
|
|
374
|
+
// asynchronously, so an immediate process.exit() truncates the message. Anything
|
|
375
|
+
// written right before the process exits must go through this.
|
|
376
|
+
function writeStderrAndFlush(text) {
|
|
377
|
+
return new Promise((resolve) => { process.stderr.write(text, () => resolve()); });
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
// Companion-vs-core contract gate (S1, S3, S4), warn only: a companion whose
|
|
381
|
+
// runtime contract differs from the bundled core's is still installed and run,
|
|
382
|
+
// and the mismatch is only announced loudly — never a failure, never an exit
|
|
383
|
+
// code change, never a rewritten selection. A missing or malformed contract
|
|
384
|
+
// file is not an error: without a parsed digest there is nothing to compare.
|
|
385
|
+
function warnEngramContractMismatch(home) {
|
|
386
|
+
try {
|
|
387
|
+
const contract = parseEngramRuntimeContract(JSON.parse(readJsonIfExists(join(home.dir, "npm", "node_modules", "gentle-engram", "runtime-contract.json")) ?? "null"));
|
|
388
|
+
const notice = engramContractMismatchNotice(contract?.digest, engramPinVersion);
|
|
389
|
+
if (notice) process.stderr.write(`gentle-shell: ${notice}\n`);
|
|
390
|
+
} catch {
|
|
391
|
+
// Warn only: an unreadable contract file never blocks anything.
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
// At launch, after the shared server is ready: compare the digest the running
|
|
396
|
+
// server answers on GET /runtime-contract with the companion's own contract
|
|
397
|
+
// file, and warn loudly on a mismatch. Warn only: a probe failure, an
|
|
398
|
+
// unparseable answer or a missing file never disables memory or changes the
|
|
399
|
+
// exit code, and the selection is never rewritten.
|
|
400
|
+
async function warnLiveEngramContractMismatch(home) {
|
|
401
|
+
try {
|
|
402
|
+
const companion = parseEngramRuntimeContract(JSON.parse(readJsonIfExists(join(home.dir, "npm", "node_modules", "gentle-engram", "runtime-contract.json")) ?? "null"));
|
|
403
|
+
if (companion === undefined) return;
|
|
404
|
+
const live = await probeEngramRuntimeContract();
|
|
405
|
+
// Without a well-formed live answer the core side is unknown: the gate is
|
|
406
|
+
// silent here, and the companion-vs-pinned check already warned above.
|
|
407
|
+
if (live === undefined) return;
|
|
408
|
+
const notice = engramContractMismatchNotice(companion.digest, engramPinVersion, live, "the running Engram server");
|
|
409
|
+
if (notice) process.stderr.write(`gentle-shell: ${notice}\n`);
|
|
410
|
+
} catch {
|
|
411
|
+
// Warn only: an unreadable contract file never blocks anything.
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
|
|
326
415
|
// Use Pi's install command, never an alternate extension loader. A user's
|
|
327
416
|
// selected companion stays selected; missing or unverified capability is only
|
|
328
417
|
// warned about, while the guard continues to protect unverified stores.
|
|
329
418
|
async function ensureEngramCompanion(home, runtime, stdio, timeoutMs, homeHadContentBeforeBootstrap) {
|
|
419
|
+
// S1/S3/S4: warn on a companion whose contract does not match the bundled
|
|
420
|
+
// core, but never fail, never change the exit code, never rewrite the selection.
|
|
421
|
+
warnEngramContractMismatch(home);
|
|
330
422
|
const metadata = join(home.dir, "npm", "node_modules", "gentle-engram", "package.json");
|
|
331
423
|
let packages;
|
|
332
424
|
try {
|
|
@@ -2002,7 +2094,7 @@ async function main() {
|
|
|
2002
2094
|
const args = parseLauncherArgs(process.argv.slice(2));
|
|
2003
2095
|
if (args.error !== undefined) fail(`${args.error}\nRun 'gentle-shell --help' for usage.`, 2);
|
|
2004
2096
|
if (args.help) {
|
|
2005
|
-
process.stdout.write("Pi updates: update
|
|
2097
|
+
process.stdout.write("Pi updates: update resolves the newest published stable Pi and updates its verified supplier\n(a global Pi, or its Shell package at the same Shell version), then reads the Pi version back.\npnpm temporarily exempts only Pi and the @earendil-works packages it pins exactly (transitively) from\nminimumReleaseAge, merged into their existing exclusions; other exclusions and policy stay in force.\nA linked source Shell updates local Pi with its project manager and one matching lockfile;\npnpm may be newer than the declared minimum; npm must match its pin. No manager is downloaded;\nGit roots only, no lifecycle scripts or manifest range changes. Root-only pnpm configuration is preserved;\nmulti-project/ancestor workspaces and conflicting lockfiles refuse before installation. Unknown ownership refuses; update --extensions-only stays Pi-only.\nPrefix-bundled update also selects the latest stable Pi; upgrade updates Shell.\n");
|
|
2006
2098
|
process.stdout.write(`${helpText()}\nBundled Engram memory: Shell shares the global Engram server on 127.0.0.1:7437, like other agents' hooks.\nA running server is reused only with verified /compatibility evidence; when nothing listens, Shell starts the\nbundled core's engram serve (default ~/.engram) and waits for that evidence. Otherwise ENGRAM_BIN is Shell's\nguard and memory stays off for that launch. Matching versions or updating alone do not prove compatibility.\nBack up existing data before manual changes; do not delete it or bypass the safety check.\nShell rechecks on every launch and remains usable without memory.\nAn explicit ENGRAM_BIN or ENGRAM_URL is kept and bypasses the guard.\n`);
|
|
2007
2099
|
process.exit(0);
|
|
2008
2100
|
}
|
|
@@ -2317,6 +2409,9 @@ async function main() {
|
|
|
2317
2409
|
// Only this final decision starts the shared server, and Pi gets its
|
|
2318
2410
|
// URL only once the server verified.
|
|
2319
2411
|
if (bundledMemory.spawn) bundledMemory = await startSharedEngram();
|
|
2412
|
+
// S1/S4: with the shared server ready, the live GET /runtime-contract is
|
|
2413
|
+
// compared with the companion's file. Warn only.
|
|
2414
|
+
if (bundledMemory.policy === "allow") await warnLiveEngramContractMismatch(home);
|
|
2320
2415
|
if (bundledMemory.notice) process.stderr.write(`gentle-shell: ${bundledMemory.notice}\n`);
|
|
2321
2416
|
}
|
|
2322
2417
|
bundledEnv = bundledProcessEnv();
|
|
@@ -2371,7 +2466,7 @@ async function main() {
|
|
|
2371
2466
|
resumeHandoff?.dispose();
|
|
2372
2467
|
fail(`Could not start pi: ${error.message}`, 1);
|
|
2373
2468
|
});
|
|
2374
|
-
child.on("exit", (code, signal) => {
|
|
2469
|
+
child.on("exit", async (code, signal) => {
|
|
2375
2470
|
const exitCode = signal ? signalExitCode(signal) : ((code ?? 1) || updateExitCode);
|
|
2376
2471
|
if (resumeHandoff) {
|
|
2377
2472
|
const hint = planResumeHint({
|
|
@@ -2393,6 +2488,30 @@ async function main() {
|
|
|
2393
2488
|
return;
|
|
2394
2489
|
}
|
|
2395
2490
|
}
|
|
2491
|
+
// T4 (S2, S5): after the `pi update --extensions` child completes for a
|
|
2492
|
+
// bundled, Shell-owned home, run the same companion verification that setup
|
|
2493
|
+
// and launch run, instead of skipping it because a piSubcommand is set: the
|
|
2494
|
+
// migration above un-pins the source, Pi replaces it with @latest, and
|
|
2495
|
+
// nothing else re-verifies the replaced companion. Warn only: a successful
|
|
2496
|
+
// update is never reported as failed because of this, the user's package
|
|
2497
|
+
// selection is never rewritten or deleted, and the version found after the
|
|
2498
|
+
// update is reported. A signal-killed child did not complete; the next
|
|
2499
|
+
// launch re-verifies as always.
|
|
2500
|
+
// `signal` is null, not undefined, on a normal exit; keep the truthiness the
|
|
2501
|
+
// exit code above already relies on.
|
|
2502
|
+
if (bundled && extensionUpdate && !signal && ownsCompanionHome(home, homeHadContentBeforeBootstrap)) {
|
|
2503
|
+
try {
|
|
2504
|
+
const companion = await ensureEngramCompanion(home, runtime, ["ignore", 2, 2], 10000, homeHadContentBeforeBootstrap);
|
|
2505
|
+
if (companion.ok) {
|
|
2506
|
+
const version = JSON.parse(readJsonIfExists(join(home.dir, "npm", "node_modules", "gentle-engram", "package.json")) ?? "null")?.version;
|
|
2507
|
+
if (typeof version === "string") await writeStderrAndFlush(`gentle-shell: gentle-engram ${version} verified after the extensions update\n`);
|
|
2508
|
+
} else {
|
|
2509
|
+
await writeStderrAndFlush(`${companion.message}\n`);
|
|
2510
|
+
}
|
|
2511
|
+
} catch (error) {
|
|
2512
|
+
await writeStderrAndFlush(`gentle-shell: could not verify the gentle-engram companion after the extensions update (${error.message}); continuing\n`);
|
|
2513
|
+
}
|
|
2514
|
+
}
|
|
2396
2515
|
process.exit(exitCode);
|
|
2397
2516
|
});
|
|
2398
2517
|
}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": "gentle-pi.review-provider-contract-mirror-lock/v1",
|
|
3
3
|
"acquisition": "field-test-local",
|
|
4
|
-
"contract_semver": "1.
|
|
4
|
+
"contract_semver": "1.5.0",
|
|
5
5
|
"source": {
|
|
6
|
-
"kind": "
|
|
7
|
-
"archive_sha256": "9d2927a84ba9a596f69029e3f854b16f86ca4c8b32cc5d63683764ccf2fb394b"
|
|
6
|
+
"kind": "tree"
|
|
8
7
|
},
|
|
9
|
-
"tree_sha256": "
|
|
8
|
+
"tree_sha256": "9e887fbded4a216aa89e8ec8818a6f4789d2b09cfff7fbd165fc1518a4d3d312",
|
|
10
9
|
"entries": {
|
|
11
10
|
"README.md": "3a655c2f19aee02636da062f0cae7a189b7e5f691c8ba8010f2ed50e5d8e8d70",
|
|
12
|
-
"manifest.json": "
|
|
13
|
-
"orchestration/pi.md": "
|
|
14
|
-
"routing/pi.md": "
|
|
11
|
+
"manifest.json": "cd8f2379a27b66877a77d7cf57ad21d4a19244baaa9929117183b0f6e5ae6d6d",
|
|
12
|
+
"orchestration/pi.md": "c0e7c4c2ab07a695ecf108b476bee81e6d9ca553b7a3860299fe2870b68d8bfc",
|
|
13
|
+
"routing/pi.md": "f34508b060197339fc73dd885565a24d037366c02b3f91b4db15431b42a5c573",
|
|
15
14
|
"schemas/lens.schema.json": "9b8a2354a570888486015434501b66b51441a3baf5bf858635e4fff56b2e8298",
|
|
16
15
|
"schemas/refuter.schema.json": "36f8267c6c3f04600b8f1cb77df70d90858611af822cc81922efd6b3502fb646",
|
|
17
16
|
"schemas/targeted-validator.schema.json": "40e397195bdfbc6782fc3090f20c5be082e4d14d2855314f99ecb8506133eddc",
|
|
@@ -20,8 +19,8 @@
|
|
|
20
19
|
"vectors/targeted-validator.json": "7b5a5165e3a913863fb98d2ba5387811860c21333b5c37e6ed3b4e0d121cf2fa"
|
|
21
20
|
},
|
|
22
21
|
"generated": {
|
|
23
|
-
"generated/provider-capabilities.baseline.json": "
|
|
24
|
-
"generated/provider-roles.baseline.json": "
|
|
22
|
+
"generated/provider-capabilities.baseline.json": "f9b2e0f3600683e81d7e381ee24aa251e781a11e8cfc7fe12e476861354102ff",
|
|
23
|
+
"generated/provider-roles.baseline.json": "f6a9c8b071d01266a7ba2a3c74ab54833cfd5b240abfe435ae931086e5397a8b"
|
|
25
24
|
},
|
|
26
25
|
"runtimes": [
|
|
27
26
|
"claude-code",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": "gentle-ai.review-provider-contract-bundle/v1",
|
|
3
|
-
"contract_semver": "1.
|
|
3
|
+
"contract_semver": "1.5.0",
|
|
4
4
|
"transport_capability": "gentle-ai.provider-transport/v1",
|
|
5
5
|
"runtimes": [
|
|
6
6
|
"claude-code",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"runtime": "pi",
|
|
68
68
|
"file": {
|
|
69
69
|
"path": "orchestration/pi.md",
|
|
70
|
-
"sha256": "
|
|
70
|
+
"sha256": "c0e7c4c2ab07a695ecf108b476bee81e6d9ca553b7a3860299fe2870b68d8bfc"
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
],
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"runtime": "pi",
|
|
77
77
|
"file": {
|
|
78
78
|
"path": "routing/pi.md",
|
|
79
|
-
"sha256": "
|
|
79
|
+
"sha256": "f34508b060197339fc73dd885565a24d037366c02b3f91b4db15431b42a5c573"
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
]
|
package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/bundle/orchestration/pi.md
RENAMED
|
@@ -52,6 +52,7 @@ A `stop` ends its transition, never approves delivery. `D` means the human disab
|
|
|
52
52
|
| Reason codes | Continuation |
|
|
53
53
|
| --- | --- |
|
|
54
54
|
| `captured_artifacts_unverifiable`, `captured_result_selection_unavailable`, `captured_verification_evidence_invalid`, `final_verification_retry_unavailable`, `missing_authority_binding`, `corrupted_or_unverifiable_authority`, `manual_intervention_required`, `native_stop_required` | Terminal: the maintainer inspects authority/lineage, or `D`. |
|
|
55
|
+
| `correction_request_unavailable` | Valid authority cannot build a correction request (invalid frozen budget or non-actionable finding). If eligible, the stop's `continuation` names the manual release command; obtain its binding template and explicit maintainer authorization, never invent authorization or abandon automatically. Release neither corrects nor approves the lineage; its forecast remains terminal. Without a continuation, stop and report the defect with the lineage. |
|
|
55
56
|
| `empty_base_diff_bootstrap_required` | Terminal: authorized empty-root bootstrap for a new target, or `D`. |
|
|
56
57
|
| `lens_context_budget_exceeded` | Terminal: reduce the candidate scope and start a new transaction, or `D`. |
|
|
57
58
|
| `correction_context_budget_exceeded` | Terminal: this authority has to be released rather than left in place, and invalidation refuses here. The maintainer runs the release command the stop's `continuation` names, exactly as printed; it is the preparatory step its `detail` describes, and its refusal prints the binding the full release needs. A stop with no `continuation` means the authority is not releasable in its current state: the maintainer inspects it, or `D`. Then review as smaller candidates, or `D`. |
|
|
@@ -28,7 +28,7 @@ The number of files, commands or tests, fixes, or a requested todo list never de
|
|
|
28
28
|
|
|
29
29
|
Small path: work inline. Read and edit, several files of one understood change included; observe RED inline before the fix; run the focused test and the suite inline, once each. No explore, worker, or verifier; no feature document, mirror, or commits unless the user asks; a todo list is optional.
|
|
30
30
|
|
|
31
|
-
**High risk**: a mistake would be hard to detect, hard to undo, or reaches beyond the change. It touches (1) data or irreversible effects: migrations, changing or deleting existing stored data, persisted format changes (not saving new records); (2) security: auth, permissions, credentials, secrets, guards, sandbox; (3) contracts others consume: changing or removing public API, CLI flags, config formats, published exports, or mirrored prompts or contracts others already consume (not adding a flag, command, or optional field; requested changes are not high risk by themselves; unrequested breaks in shared code are); (4) concurrency: locks, races, async ordering; (5) delivery or environment: installers, release, CI, deploy, dependencies; (6) no test would catch a regression in what changes. Count "unclear" as high only when a bounded look cannot tell whether (1)-(5) apply. When RDD is on, the native assess tier decides native review and you may only raise it; it never adds an independent verifier by itself, only a named high-risk item does.
|
|
31
|
+
**High risk**: a mistake would be hard to detect, hard to undo, or reaches beyond the change. It touches (1) data or irreversible effects that cannot be rebuilt: migrations, changing or deleting existing stored data, persisted format changes (not saving new records, nor a dev or test database a seed or backup rebuilds); (2) security: auth, permissions, credentials, secrets, guards, sandbox; (3) contracts others consume: changing or removing public API, CLI flags, config formats, published exports, or mirrored prompts or contracts others already consume (not adding a flag, command, or optional field; requested changes are not high risk by themselves; unrequested breaks in shared code are); (4) concurrency: locks, races, async ordering; (5) delivery or environment: installers, release, CI, deploy, dependencies; (6) no test would catch a regression in what changes. Count "unclear" as high only when a bounded look cannot tell whether (1)-(5) apply. When RDD is on, the native assess tier decides native review and you may only raise it; it never adds an independent verifier by itself, only a named high-risk item does.
|
|
32
32
|
|
|
33
33
|
**Risk line**: close every code change, small path or delegated, with `Risk: item N (reason)` or `Risk: none` per the list; any item fires the Verification trigger. Before writing `Risk: none`, check whether the diff changes code that existing behavior the request did not mention also uses (shared options, parsers, helpers); if it does, that is item 3.
|
|
34
34
|
|
|
@@ -47,7 +47,7 @@ Each trigger holds only when its condition truly holds, and only then is it mand
|
|
|
47
47
|
- **Mapping trigger:** when understanding exceeds the inline batch budget or needs more than approximately 5 sequential lookups, delegate one read-only explorer before deciding or writing anything. Return a handoff of at most approximately 2k tokens with path:line evidence; use one parent spot check (1 maximum). Do not reread the entire mapped evidence. Never explore to read files you will read anyway before writing inline.
|
|
48
48
|
- **Verification trigger:** only a change whose Risk line names a high-risk item gets an independent verifier after the change's own checks, as rarely as possible; a native tier, an unclear or failed assessment, and the writer's model or effort never add one by themselves. Otherwise whoever made the change runs its focused test and suite inline, small tasks included.
|
|
49
49
|
- **Tracking trigger:** a large task gets the feature document, its mirror, and work-unit commits.
|
|
50
|
-
- **Writer trigger:** a writer is delegated only for a named reason, one bounded writer per unit: (a) parallelism: two or more independent units of behavior with disjoint edit surfaces, each needing several minutes of work (several files or roughly 100+ changed lines; a subagent spends one to two minutes reading before it writes), launched together; (b) context: the long-session backstop below. A unit is one independent piece of behavior with its code, tests, and docs together: never split one behavior into test, docs, and code writers, and a delivery that depends on another is not independent; several small independent changes run inline, one after another. Units of about 100 changed lines or less always run inline: writing them costs less than starting workers. Never delegate a writer for size, a large task alone, file count, or a price ratio; file count never fires this trigger. Without a reason, the parent works inline, following its logbook (feature document, mirror, work-unit commits).
|
|
50
|
+
- **Writer trigger:** a writer is delegated only for a named reason, one bounded writer per unit: (a) parallelism: two or more independent units of behavior with disjoint edit surfaces, each needing several minutes of work (several files or roughly 100+ changed lines; a subagent spends one to two minutes reading before it writes), launched together in one turn (in background when background mode is on); (b) context: the long-session backstop below. A unit is one independent piece of behavior with its code, tests, and docs together: never split one behavior into test, docs, and code writers, and a delivery that depends on another is not independent; several small independent changes run inline, one after another. Units of about 100 changed lines or less always run inline: writing them costs less than starting workers. Never delegate a writer for size, a large task alone, file count, or a price ratio; file count never fires this trigger. Without a reason, the parent works inline, following its logbook (feature document, mirror, work-unit commits).
|
|
51
51
|
- **Parallel writers:** work in another repository goes in a fresh worktree based on that repository's main, never in a checkout someone else may be using. Parallel units in the same local repository run in the same tree, each with declared disjoint edit surfaces: the parent owns git; writers run no repository-wide formatters, generators, or installs; a shared file has one owner or the parent edits it at the end; the parent checks each writer's diff against its surface before accepting it; and one seam check runs at the end (the full suite, once). Units that need the same file use isolated worktrees.
|
|
52
52
|
- **Invariants:** each writer prompt names the existing helpers its unit must reuse for shared state (for example the function that adds an entry other commands also add) and the invariants they keep (ordering, uniqueness, validation, normalization); units built in parallel cannot see each other, so the prompt is the only place they learn them. Whoever writes, inline or delegated, reuses the existing function for shared state and never re-implements that step with a different shape.
|
|
53
53
|
- **Preparation trigger:** when the Writer trigger delegates a write, reading that prepares it, and broad research or context compression, delegate together with or ahead of the write instead of filling the parent context. Inline writes read inline.
|
|
@@ -69,16 +69,16 @@ This section is the reference detail for the protocol above.
|
|
|
69
69
|
- Use at most one scoped independent read-only assumption challenge for a high-consequence unproven premise, even in a small security-critical change. Name the premise, evidence, and consequence; do not start a debate loop. Deterministic failures need fixes, not model debate. The native RDD refuter owns native review claims; never duplicate or bypass it.
|
|
70
70
|
- Validate consequential premises against available evidence before building; reuse relevant sibling investigation instead of repeating it. Run focused checks during iteration and all applicable full checks at task closure. Keep spend proportional without a hard spend or line gate; preserve the applicable test-first policy, native RDD, safety, and consent requirements.
|
|
71
71
|
- Size every task by the Task Size section; small work creates no durable task artifacts, and counts of files, commands, tests, fixes, or lines never make it large. For large authorized implementation, automatically create the feature document after exploration, without a task or storage permission prompt.
|
|
72
|
-
- Use about 400 authored changed lines per ODD task only as a planning heuristic, counting additions plus deletions; prefer the smallest coherent behavior with its tests and docs. This is not a task acceptance criterion, hard cap, counter-trigger, automatic stop, forced split, or RDD trigger. If the correct, clear solution naturally exceeds it, briefly explain why and continue without size-only rework loops. Never delete spaces, blank lines, or comments for cosmetic line savings; never omit tests, minify, add gratuitous abstractions, or split artificially to fit the heuristic. Forward this same advisory-only instruction when delegating tasks to subagents. The delivery budget below reads the accumulated branch, not this per-task heuristic. Existing PR size gates remain unchanged; continue under existing repository policy.
|
|
72
|
+
- Use about 400 authored changed lines per ODD task only as a planning heuristic, counting additions plus deletions; prefer the smallest coherent behavior with its tests and docs. This is not a task acceptance criterion, hard cap, counter-trigger, automatic stop, forced split, or RDD trigger. If the correct, clear solution naturally exceeds it, briefly explain why and continue without size-only rework loops. Never delete spaces, blank lines, or comments for cosmetic line savings; never omit tests, minify, add gratuitous abstractions, or split artificially to fit the heuristic. Forward this same advisory-only instruction when delegating tasks to subagents. The delivery budget below reads the accumulated branch, not this per-task heuristic. Existing PR size gates remain unchanged; continue under existing repository policy. A user's line limit is a ceiling, never an exact-count gate; never invent acceptance gates the user did not ask for.
|
|
73
73
|
- Keep `odd/tasks/<feature-name>.md` and an Engram recovery copy under topic `odd/<feature-name>/tasks`, scoped to the current project. Use a descriptive filename-safe feature name. Reuse the same feature identity; never overwrite another feature. Keep one feature document, not a separate plan file or topic. It is the specification subagents read by reference, so keep this fixed order, stable content first and the growing log last: a header of two or three lines with the objective, branch, delivery strategy, and test runner; `## Specs` with numbered `S1`..`Sn` requirements and their authorized scope, acceptance criteria, and applicable checks, quoting the user's exact strings, error messages, commands, and examples verbatim in the user's language (number and order them, but never summarize or reword those fragments; Do not add requirements the user never asked for, and mark assumptions as assumptions); `## Tasks` with one line per task, using stable task IDs, with its linked `S#`, route (inline or delegated), status, and commit identity or RED/GREEN evidence; `## Log` as the logbook, where `L1` holds the user's original request verbatim, later user corrections are logged verbatim with their date, and problem analysis, rationale for meaningful accepted changes, verification evidence, progress, and next step are appended. Routine corrections stay brief; no exhaustive decision journal. Mirror the full current document and repository-relative file locator, not just a summary or completion notice.
|
|
74
74
|
- Accepted user, review, or verification changes automatically update affected intent and TODOs, unlike a process that regenerates every artifact: a requirement change appends its verbatim `## Log` entry, rewrites only the affected `S#`, and reopens only its linked task; preserve valid completed and unrelated work; add genuinely new tasks or reopen invalidated items with a reason, and revise their checks. Findings alone never authorize scope expansion or automatic acceptance. Business scope changes still require user authorization. Check off only observed outcomes with applicable proof; record failed, unavailable, skipped, or pending checks honestly. Checkboxes grant no approval or receipt.
|
|
75
|
-
- Read back both writes; they are not atomic. If Engram is unavailable, preserve local progress and explicitly mark the mirror pending; do not claim success or block unrelated safe work. Resynchronize when available. If a file write is unsafe or unavailable, preserve existing state and report the limitation. Preserve both versions on irreconcilable edits and ask only about the real conflict.
|
|
75
|
+
- Read back both writes with the normal read tool; they are not atomic, but never author comparison or reconciliation scripts or gates for them. After a partial or failed sync, check which writes already applied and continue from that state; never replay an applied write. The file is the source: a mirror that differs from the file just written is refreshed from the file, never a blocker. Refresh the mirror once per task transition (a task starts, finishes, is blocked, reopened, or dropped) or material plan change, and at close; `## Log` entries and evidence added between those points go to the file only and reach the mirror at the next one. If Engram is unavailable, preserve local progress and explicitly mark the mirror pending; do not claim success or block unrelated safe work. Resynchronize when available. If a file write is unsafe or unavailable, preserve existing state and report the limitation. Preserve both versions on irreconcilable edits and ask only about the real conflict.
|
|
76
76
|
- On resume, use `mem_context`, then `mem_search` scoped to the current project and feature, and `mem_get_observation` for the full saved document; read the actual task file. Do not infer active work from the newest global memory. Reconcile current requirements, code, and proof before resuming the next unfinished task; preserve pending mirrors and conflicting edits.
|
|
77
77
|
- Before implementation or resume, the parent reads both the actual file and full observation, reconciles them, and passes the locator, task IDs, and linked `S#`; workers read the document until `## Log` before edits and report which `S#` they covered. Small work without a document still receives its authorized scope and checks.
|
|
78
78
|
- Apply one default test-first policy to ODD behavior changes: when a relevant runnable deterministic test and clear expected outcome exist, observe RED before implementation, implement GREEN, then refactor while tests stay green. Write one RED test per requested rule. For every existing command or option the change touches, add one test proving its previous behavior still holds; add no other cases. An existing behavior counts as touched when it shares the code you changed (options, parsers, helpers, validation). Before finishing, run a differential check: for each existing command that shares the code you changed, run it with the new or changed input (for example a new option passed to a sibling subcommand) against the previous code (a copy of the base commit in a `mktemp -d` scratch directory, never committed as a test; committed tests never read git history or a fixed commit) and against your change, and compare stdout, stderr, and exit code; any difference nobody asked for is a regression to fix and pin with a test. Tests or frameworks being present alone do not establish applicability. For passive documentation, unavailable runners, or no meaningful runnable RED, explain the exception and run proportionate functional or structural checks. Keep test scratch state (temporary directories, `HOME`, `TMPDIR`, tool caches) outside the worktree in a `mktemp -d` directory; when it must live inside the worktree, use a path git excludes and remove it before finishing, so no tool cache or scratch path remains in the change. Subagents never delete scratch: they report its exact paths, and the parent removes outside scratch after use, including the paths a worker or verifier reports. Forward the applicable runner, this test discipline, and the evidence or exception to workers; never invent RED/GREEN evidence or a runner.
|
|
79
|
-
- Preserve existing native risk selection and applicable functional verification. Run applicable functional checks per task, not a review cycle per TODO checkbox. The native review candidate is a work-unit commit or a PR slice, never a TODO checkbox and never the accumulated feature branch. After each work-unit commit, when RDD is enabled, run `gentle-ai review assess --cwd <repo> --agent pi --base-ref <last reviewed boundary> --committed-only --json` on that commit and read `review_due` and `review_due_reason`. When `review_due` is true (`high_risk`), or when the user explicitly asks for a review, execute the returned `next_transition.command` verbatim with your `--lenses`/`--lenses-reason` selection appended: it is the exact preflight STATUS for the same `--base-ref`/`--committed-only` selectors; follow the transitions it returns, and the reviewed boundary advances to this commit once that review is acknowledged. When `review_due` is false, record `review_due_reason` and continue: `passive` needs no review and the boundary advances; `under_budget` stays pending in the slice until a later commit reaches the budget; `already_reviewed` means this exact range is already covered by terminal authority. When a high-risk unit follows pending `under_budget` commits,
|
|
79
|
+
- Preserve existing native risk selection and applicable functional verification. Run applicable functional checks per task, not a review cycle per TODO checkbox. The native review candidate is a work-unit commit or a PR slice, never a TODO checkbox and never the accumulated feature branch. After each work-unit commit, when RDD is enabled, run `gentle-ai review assess --cwd <repo> --agent pi --base-ref <last reviewed boundary> --committed-only --json` on that commit and read `review_due` and `review_due_reason`. When `review_due` is true (`high_risk`), or when the user explicitly asks for a review, execute the returned `next_transition.command` verbatim with your `--lenses`/`--lenses-reason` selection appended: it is the exact preflight STATUS for the same `--base-ref`/`--committed-only` selectors; follow the transitions it returns, and the reviewed boundary advances to this commit once that review is acknowledged. When `review_due` is false, record `review_due_reason` and continue: `passive` needs no review and the boundary advances; `under_budget` stays pending in the slice until a later commit reaches the budget; `already_reviewed` means this exact range is already covered by terminal authority. When a high-risk unit follows pending `under_budget` commits, assess the open slice first. Review the pending slice only when `review_due` is true or the user explicitly asks; otherwise preserve the pending boundary and proceed without starting review. A task boundary neither authorizes review nor advances a reviewed boundary. The first boundary is the branch point, and every reviewed boundary becomes the next base. Record per commit the assessed tier and outcome: granted, declined, passive, under budget, already reviewed, or unavailable. An unavailable or failed assessment never lowers the tier: report the missing assessment proof; never infer `review_due` or construct a preflight transition. Never infer low risk from a failed assessment, and keep existing risk, consent, and authority unchanged. Never skip an existing delivery gate. A task list or assumption challenge never enables RDD, replaces its roles or candidate consent, or adds an execution harness.
|
|
80
80
|
- Delivery follows work units. At feature-document creation, forecast authored changed lines (additions plus deletions, generated files excluded) from the task list, and keep a running count from work-unit commits. Choose one delivery strategy per feature: `ask-on-risk` (default), `auto-chain`, `single-pr`, or `exception-ok`. When the forecast or the running count exceeds about 400 authored changed lines, apply the chosen strategy before the next commit: `ask-on-risk` asks once for the chain strategy, `stacked-to-main` or `feature-branch-chain`; `auto-chain` asks only for a missing chain strategy and slices automatically. Cache both choices, and record slice boundaries, which commits each pull request holds, in the feature document. Resolve the `work-unit-commits` and `chained-pr` skills by registry name before planning or creating any pull request, never hardcode their paths.
|
|
81
|
-
- When RDD is enabled, first use the existing native candidate risk assessment (`gentle-ai review assess --cwd <repo> --agent pi --json`). Passive/low uses silent structural checks with no reviewer or consent ceremony. Medium/high relays the existing candidate consent and follows the native plan: native review runs only on grant; a decline continues under ordinary policy. Do not substitute model judgment, task size, or defect severity to lower prospective candidate risk; never infer low risk from a failed assessment. You may raise a candidate you know is high risk with `--escalate-item <1-6> --escalate-reason "<one line>"` on that same assessment command, citing the high-risk list; never lower it. Follow native continuations and authority without bypassing gates. When RDD is disabled, do not start or prompt for RDD; ordinary checks remain.
|
|
81
|
+
- When RDD is enabled, first use the existing native candidate risk assessment (`gentle-ai review assess --cwd <repo> --agent pi --json`). Passive/low uses silent structural checks with no reviewer or consent ceremony. Medium/high relays the existing candidate consent only when `review_due` is true or the user explicitly asks, and follows the returned native plan: native review runs only on grant; a decline continues under ordinary policy. Do not substitute model judgment, task size, or defect severity to lower prospective candidate risk; never infer low risk from a failed assessment. You may raise a candidate you know is high risk with `--escalate-item <1-6> --escalate-reason "<one line>"` on that same assessment command, citing the high-risk list; never lower it. Follow native continuations and authority without bypassing gates. When RDD is disabled, do not start or prompt for RDD; ordinary checks remain.
|
|
82
82
|
|
|
83
83
|
### Receipt-driven development is user-owned
|
|
84
84
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": "gentle-pi.provider-contract-capabilities-baseline/v1",
|
|
3
|
-
"contract_semver": "1.
|
|
3
|
+
"contract_semver": "1.5.0",
|
|
4
4
|
"transport_capability": "gentle-ai.provider-transport/v1",
|
|
5
5
|
"mandatory_capabilities": [
|
|
6
6
|
"gentle-ai.provider-transport/v1"
|
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
{
|
|
17
17
|
"runtime": "pi",
|
|
18
18
|
"path": "orchestration/pi.md",
|
|
19
|
-
"sha256": "
|
|
19
|
+
"sha256": "c0e7c4c2ab07a695ecf108b476bee81e6d9ca553b7a3860299fe2870b68d8bfc"
|
|
20
20
|
}
|
|
21
21
|
],
|
|
22
22
|
"routing": [
|
|
23
23
|
{
|
|
24
24
|
"runtime": "pi",
|
|
25
25
|
"path": "routing/pi.md",
|
|
26
|
-
"sha256": "
|
|
26
|
+
"sha256": "f34508b060197339fc73dd885565a24d037366c02b3f91b4db15431b42a5c573"
|
|
27
27
|
}
|
|
28
28
|
]
|
|
29
29
|
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="400" viewBox="0 0 1200 400" role="img" aria-labelledby="title desc">
|
|
2
|
+
<title id="title">Sponsor Gentleman Programming on GitHub Sponsors</title>
|
|
3
|
+
<desc id="desc">Free forever, independent by choice. No investors, no paywalls. Gentle AI, Engram and Gentle Shell are funded by the people who use them. Sponsor on GitHub, monthly or one-time.</desc>
|
|
4
|
+
<defs>
|
|
5
|
+
<radialGradient id="glow" cx="18%" cy="50%" r="60%">
|
|
6
|
+
<stop offset="0%" stop-color="#F095C8" stop-opacity="0.30"/>
|
|
7
|
+
<stop offset="55%" stop-color="#F095C8" stop-opacity="0.06"/>
|
|
8
|
+
<stop offset="100%" stop-color="#F095C8" stop-opacity="0"/>
|
|
9
|
+
</radialGradient>
|
|
10
|
+
<linearGradient id="border" x1="0" y1="0" x2="1" y2="1">
|
|
11
|
+
<stop offset="0%" stop-color="#F095C8"/>
|
|
12
|
+
<stop offset="50%" stop-color="#6E3A57"/>
|
|
13
|
+
<stop offset="100%" stop-color="#F095C8"/>
|
|
14
|
+
</linearGradient>
|
|
15
|
+
<linearGradient id="cta" x1="0" y1="0" x2="1" y2="0">
|
|
16
|
+
<stop offset="0%" stop-color="#FF7AC0"/>
|
|
17
|
+
<stop offset="100%" stop-color="#F095C8"/>
|
|
18
|
+
</linearGradient>
|
|
19
|
+
<filter id="neon" x="-50%" y="-50%" width="200%" height="200%">
|
|
20
|
+
<feGaussianBlur stdDeviation="9" result="blur"/>
|
|
21
|
+
<feMerge><feMergeNode in="blur"/><feMergeNode in="blur"/><feMergeNode in="SourceGraphic"/></feMerge>
|
|
22
|
+
</filter>
|
|
23
|
+
<filter id="soft" x="-20%" y="-50%" width="140%" height="200%">
|
|
24
|
+
<feGaussianBlur stdDeviation="12"/>
|
|
25
|
+
</filter>
|
|
26
|
+
<pattern id="grid" width="32" height="32" patternUnits="userSpaceOnUse">
|
|
27
|
+
<path d="M32 0H0V32" fill="none" stroke="#F095C8" stroke-opacity="0.06" stroke-width="1"/>
|
|
28
|
+
</pattern>
|
|
29
|
+
<style>
|
|
30
|
+
.heart { transform-origin: 200px 200px; animation: beat 1.6s ease-in-out infinite; }
|
|
31
|
+
@keyframes beat { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.12); } 24% { transform: scale(0.98); } 36% { transform: scale(1.08); } 50% { transform: scale(1); } }
|
|
32
|
+
.ring { transform-origin: 200px 200px; animation: ring 3.2s ease-out infinite; }
|
|
33
|
+
@keyframes ring { 0% { transform: scale(0.7); opacity: 0.7; } 100% { transform: scale(1.5); opacity: 0; } }
|
|
34
|
+
text { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; }
|
|
35
|
+
</style>
|
|
36
|
+
</defs>
|
|
37
|
+
|
|
38
|
+
<rect x="2" y="2" width="1196" height="396" rx="28" fill="#120D11"/>
|
|
39
|
+
<rect x="2" y="2" width="1196" height="396" rx="28" fill="url(#grid)"/>
|
|
40
|
+
<rect x="2" y="2" width="1196" height="396" rx="28" fill="url(#glow)"/>
|
|
41
|
+
<rect x="2" y="2" width="1196" height="396" rx="28" fill="none" stroke="url(#border)" stroke-width="3"/>
|
|
42
|
+
|
|
43
|
+
<circle class="ring" cx="200" cy="200" r="92" fill="none" stroke="#F095C8" stroke-width="3"/>
|
|
44
|
+
<g class="heart" filter="url(#neon)">
|
|
45
|
+
<path transform="translate(0 9)" d="M200 268 C 120 214, 112 150, 152 128 C 176 115, 194 126, 200 144 C 206 126, 224 115, 248 128 C 288 150, 280 214, 200 268 Z"
|
|
46
|
+
fill="none" stroke="#F095C8" stroke-width="9" stroke-linejoin="round"/>
|
|
47
|
+
</g>
|
|
48
|
+
|
|
49
|
+
<text x="380" y="94" fill="#F095C8" font-size="20" font-weight="700" letter-spacing="5">SUPPORT THE PROJECT</text>
|
|
50
|
+
<text x="378" y="152" fill="#FFFFFF" font-size="50" font-weight="800">Free forever.</text>
|
|
51
|
+
<text x="378" y="208" fill="#FFFFFF" font-size="50" font-weight="800">Independent <tspan fill="#F095C8">by choice.</tspan></text>
|
|
52
|
+
<text x="380" y="250" fill="#D7A0B8" font-size="21">No investors, no paywalls. Gentle AI, Engram and Gentle Shell</text>
|
|
53
|
+
<text x="380" y="278" fill="#D7A0B8" font-size="21">are funded by the people who use them.</text>
|
|
54
|
+
|
|
55
|
+
<rect x="380" y="306" width="300" height="58" rx="29" fill="#F095C8" filter="url(#soft)" opacity="0.55"/>
|
|
56
|
+
<rect x="380" y="306" width="300" height="58" rx="29" fill="url(#cta)"/>
|
|
57
|
+
<path d="M420 348 C 406 339, 404 327, 411 323 C 415 321, 419 323, 420 326 C 421 323, 425 321, 429 323 C 436 327, 434 339, 420 348 Z" fill="#1A1218"/>
|
|
58
|
+
<text x="443" y="343" fill="#1A1218" font-size="22" font-weight="800">Sponsor on GitHub</text>
|
|
59
|
+
<text x="704" y="342" fill="#8F7A86" font-size="17">Monthly or one-time · every contribution counts</text>
|
|
60
|
+
</svg>
|