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
|
@@ -12,6 +12,32 @@ width; waiting questions and errors retain their existing display priority. The
|
|
|
12
12
|
height-capped card above the editor retains its existing layout. The RPC payload
|
|
13
13
|
carries the task label for hosts to display.
|
|
14
14
|
|
|
15
|
+
## Delivered report size
|
|
16
|
+
|
|
17
|
+
A finished child's report enters the parent's context through the background
|
|
18
|
+
completion message and the task-mode `subagent_run` / `subagent_continue`
|
|
19
|
+
result. That delivered copy is capped at `report_max_bytes` UTF-8 bytes
|
|
20
|
+
(`subagents.json`, positive integer, default 16384; an invalid value falls
|
|
21
|
+
back to the default). Over the cap the parent gets the head of the report (up
|
|
22
|
+
to `report_max_bytes`, cut at a line break when one lies within the last 512
|
|
23
|
+
bytes of the cut or a quarter of the cap, whichever is smaller), then one line:
|
|
24
|
+
`Report truncated: the first N and the last T of M bytes were delivered. Call
|
|
25
|
+
subagent_result with task_id <id> for the full text.`, then the end of the
|
|
26
|
+
report: its last bytes, at most 2048, starting at the next line when a line
|
|
27
|
+
break lies within their first 512 bytes. Neither cut falls inside a character.
|
|
28
|
+
The end is kept because a closing summary at the end of a report, which a
|
|
29
|
+
memory provider may read from the delivered text, would otherwise be lost; the
|
|
30
|
+
runtime does not look for or interpret any such block. When the part the head
|
|
31
|
+
leaves out is 2048 bytes or less, the whole report is delivered unchanged, so
|
|
32
|
+
head and end never overlap. A report is never cut when it
|
|
33
|
+
comes from a strict-JSON agent (`jd-*` Judgment Day roles and `review-*` lens
|
|
34
|
+
agents) or when it is one valid JSON object or array, optionally inside one
|
|
35
|
+
fenced block, because a cut would deliver invalid JSON. The
|
|
36
|
+
result details add `reportTruncated: true`, `reportBytes` and
|
|
37
|
+
`reportDeliveredBytes` (N + T) under `gentleAgents`; a report within the cap is
|
|
38
|
+
delivered byte-identical with unchanged details. The stored task, its task
|
|
39
|
+
file and `subagent_result` always keep the full text.
|
|
40
|
+
|
|
15
41
|
## Same-profile orchestrator discovery (Refs #1701)
|
|
16
42
|
|
|
17
43
|
`orchestrator_list` keeps stable raw routing session IDs and adds recorded display
|
package/docs/gentle-shell.md
CHANGED
|
@@ -44,9 +44,9 @@ The [v2.6.0 release](https://github.com/Gentleman-Programming/gentle-pi/releases
|
|
|
44
44
|
- Registered worktrees survive reloads. `/gentle:changes` groups each dirty root (the session's repository and its subagents' worktrees) and shows Git status, line counts, and lazy diffs against HEAD without conflating identical paths from different worktrees.
|
|
45
45
|
- Fullscreen pointer navigation and the responsive sidebar keep changes, agents, and TODO usable at changing terminal widths; cached frames avoid redrawing inactive sidebar content while live status still updates.
|
|
46
46
|
- The Agents List and Details views preserve the orchestrator/session hierarchy and completion, abort, and lost-exit history. Parent-child queries and notifications have an explicit handoff path, while model, effort, and usage stay observable per task.
|
|
47
|
-
- Named `/gentle:profiles` atomically route the orchestrator separately from packaged and review roles, and carry a per-profile orchestrator workflow mode (`w` on the models screen: organic, where the orchestrator may implement inline, or full delegation, where every implementation goes to a subagent); see the [technical reference](readme-reference.md#agent-model-profiles) for the profile model.
|
|
47
|
+
- Named `/gentle:profiles` atomically route the orchestrator separately from packaged and review roles, and carry a per-profile orchestrator workflow mode (`w` on the models screen: organic, where the orchestrator may implement inline, or full delegation, where every implementation goes to a subagent); see the [technical reference](readme-reference.md#agent-model-profiles) for the profile model. Full delegation pays off with an expensive orchestrator and light workers; on small tasks it costs a few times the wall time of organic, so see [Orchestrator workflow mode](readme-reference.md#orchestrator-workflow-mode) for the measured cost and which mode to pick.
|
|
48
48
|
|
|
49
|
-
The source checkout prepares `gentle-pi` `4.
|
|
49
|
+
The source checkout prepares `gentle-pi` `4.8.0` with a package-local Gentle AI `v4.5.0` pin; this does not imply that the package release has been published.
|
|
50
50
|
|
|
51
51
|
## Shell interactions and runtime behavior
|
|
52
52
|
|
|
@@ -235,7 +235,7 @@ The panel rows a provider reports its windows with:
|
|
|
235
235
|
- For Codex, usage comes from the same account usage endpoint the Codex CLI reads, using the OAuth token pi already holds. It is fetched at session start, at most every 5 minutes after a turn, and on `r` in the panel. Rate-limit headers on SSE responses are picked up too. Codex windows require a finite positive duration reported by the provider; missing or invalid durations are ignored, never shown as `0m` or replaced with an assumed `5h` quota. A real `0%` remains visible when its window is valid, and a response with no valid header windows leaves the previous snapshot untouched. The same refresh covers every provider the session targets: the active model's own provider plus every provider the session profile's subagent routing names — the same profile subagent launches use: the profile selected in this session, otherwise the profile the session froze at startup from the local pin, the repository declaration, or the global active profile (see [Session profile frozen at startup](readme-reference.md#session-profile-frozen-at-startup)). Each provider keeps its own 5-minute window, its own stale-source guard, and its own last good snapshot. Providers refresh concurrently, each inside its own bounded window (default 10s, `GENTLE_PI_SHELL_USAGE_TIMEOUT_MS`): the abort signal reaches the underlying fetch — composed with the caller's own signal when it carries one, never replacing it — a provider that outlives its window wears the generic failure note, and whatever it answers afterwards is discarded — a late answer never replaces what the timeout settled, exactly like the stale-source guard above.
|
|
236
236
|
- A routing entry names its provider with a qualified ref (`provider/model`); a bare model id is resolved through the model registry only when exactly one provider carries that id, and is left untargeted rather than guessed when none or several do. The targeted scope is resolved when a refresh runs — at session start, on each turn's throttled refresh, on `r` or reopening the panel, and when a usage source registers — so a profile selected in the session (or a default change in `follow` mode) is picked up by the next refresh rather than live per render.
|
|
237
237
|
- For Claude Pro/Max, usage arrives in the rate-limit headers of every response, so the 5h and weekly windows appear after the first turn. `pi-claude-bridge` 0.9.3 and later forward Claude Code's usage updates as those same headers, so a `claude-bridge` session shows them too. A header snapshot is filed under the provider that served the response (the session's `claude-bridge`, not `anthropic`), and falls back to the provider the headers name only when no model is known.
|
|
238
|
-
- For NaN Cloud, usage comes from the quota endpoint the official dashboard reads, with the same API key pi already holds. Each metered model reports one allowance for the billing period, and that window carries no label: the model id names it in the bar and the reset text says what it is in the panel. A model that also reports a rolling window shows that one labeled next to it (`4h`), which today's payload does not send; percentages are tokens used over the allowance, exactly as the dashboard draws them, and the allowance is the full-period cap (`fullCap`) whenever the model reports a positive one, because `cap` alone is the prorated allowance of the period in progress. It is fetched under the same 5-minute rule as Codex, counted per provider so a switch fetches the provider it switched to, refuses redirects so the bearer cannot be replayed to another origin, and keeps no cached copy. The endpoint sits outside NaN's published OpenAPI, so the parser reads it defensively: a model that reports no allowance is skipped, as the dashboard skips it, while a metered model whose usage cannot be read fails the whole read, so a partial payload never replaces a complete snapshot with a cheaper-looking one. A session that already has a snapshot keeps the last valid one through a malformed payload or a failed fetch, and the pending note appears only while there is nothing to draw.
|
|
238
|
+
- For NaN Cloud, usage comes from the quota endpoint the official dashboard reads, with the same API key pi already holds. Each metered model reports one allowance for the billing period, and that window carries no label: the model id names it in the bar and the reset text says what it is in the panel. A model that also reports a rolling window shows that one labeled next to it (`4h`), which today's payload does not send; percentages are tokens used over the allowance, exactly as the dashboard draws them, and the allowance is the full-period cap (`fullCap`) whenever the model reports a positive one, because `cap` alone is the prorated allowance of the period in progress. It is fetched under the same 5-minute rule as Codex, counted per provider so a switch fetches the provider it switched to, refuses redirects so the bearer cannot be replayed to another origin, and keeps no cached copy. The endpoint sits outside NaN's published OpenAPI, so the parser reads it defensively: a model that reports no allowance is skipped, as the dashboard skips it, while a metered model whose usage cannot be read fails the whole read, so a partial payload never replaces a complete snapshot with a cheaper-looking one. A session that already has a snapshot keeps the last valid one through a malformed payload or a failed fetch, and the pending note appears only while there is nothing to draw. NaN now bills from a shared credit pool, but its credit balance is not readable with an API key, so these rows are NaN's per-model token quota, not the balance: the panel says so under the NaN rows (`per-model token quota · not your credit balance`), rows for models outside the maintained NaN catalog (such as the retired `glm5.2`) are dropped, and the quota never puts a NaN model or the NaN provider on cooldown.
|
|
239
239
|
- Extensions can register a usage source for their own provider: gentle-shell has no built-in knowledge of it, but treats it exactly like Codex or NaN once registered. Emit `gentle-pi:usage-source/v1` on `pi.events` with `{ schema: "gentle-pi.usage-source/v1", provider, pendingNote?, fetch(apiKey, fetchFn, now) }`, where `fetch` resolves a `ProviderUsage` the same shape the built-in providers produce, or `undefined` when there is nothing to show yet. A malformed payload, a `fetch` that isn't a function, a provider id outside the safe id pattern, or a `fetch` call that throws or rejects is ignored rather than crashing the shell. The `fetchFn` a source receives is bounded the same way: once the provider's window expires it aborts, and a later resolution is discarded. Re-registering the same provider replaces its source, so emitting again at every `session_start` is safe and keeps load order irrelevant. Once registered, the provider shows `pendingNote` (or the same "no usage yet · r to fetch" default the built-ins use) until its first fetch, and a registration that arrives after the session already started, for any targeted provider (the session's own or a subagent route of the session profile), triggers one immediate refresh of that provider instead of waiting for the next turn or the 5-minute window. Example, using a neutral provider id:
|
|
240
240
|
|
|
241
241
|
```ts
|
|
@@ -250,8 +250,8 @@ The panel rows a provider reports its windows with:
|
|
|
250
250
|
},
|
|
251
251
|
});
|
|
252
252
|
```
|
|
253
|
-
- The bar names the subscription it shows (`codex`, `claude`, a NaN model) and always follows the active model. A provider with per-model allowances draws the session model's own meter, falling back to its family and then to the account total, never to whichever model the payload happens to list first — and that holds for a payload that reports a single metered model too, because one allowance is still per-model data rather than a reason to echo the first entry. The panel puts the active provider first, marked with the petal, and says why it has no data when it does not: API-key providers have no subscription windows, Claude reports after the first response, Codex and NaN wait for a fetch. It draws exactly the targeted providers, in scope order — a targeted provider with no snapshot explains itself, and one whose latest refresh settled without a snapshot wears a generic nonsecret "fetch failed · r to retry" note: beside its retained snapshot when it has one, or in place of the pending note when it has none. The note tracks actual failures only — a refresh still in flight never reads as failed, Claude (headers-only) is never dressed up as one, and the next successful refresh clears it. A provider recorded under a previous profile's routing is not current scope after a profile switch. A provider without per-model allowances keeps its single aggregate line in the sidebar, unchanged.
|
|
254
|
-
- A provider with per-model allowances is ordered by family on both surfaces: a family stays together, the family that consumes most comes first, and the models inside it follow the same rule, most used first. There are no `total` rows anywhere — an aggregate nobody can act on only costs space — so the account and family totals survive only as the bar's fallback name when the session model holds no allowance of its own
|
|
253
|
+
- The bar names the subscription it shows (`codex`, `claude`, a NaN model) and always follows the active model. A provider with per-model allowances draws the session model's own meter, falling back to its family and then to the account total (NaN stops at the family: an account total of NaN quotas would read as a balance it is not), never to whichever model the payload happens to list first — and that holds for a payload that reports a single metered model too, because one allowance is still per-model data rather than a reason to echo the first entry. The panel puts the active provider first, marked with the petal, and says why it has no data when it does not: API-key providers have no subscription windows, Claude reports after the first response, Codex and NaN wait for a fetch. It draws exactly the targeted providers, in scope order — a targeted provider with no snapshot explains itself, and one whose latest refresh settled without a snapshot wears a generic nonsecret "fetch failed · r to retry" note: beside its retained snapshot when it has one, or in place of the pending note when it has none. The note tracks actual failures only — a refresh still in flight never reads as failed, Claude (headers-only) is never dressed up as one, and the next successful refresh clears it. A provider recorded under a previous profile's routing is not current scope after a profile switch. A provider without per-model allowances keeps its single aggregate line in the sidebar, unchanged.
|
|
254
|
+
- A provider with per-model allowances is ordered by family on both surfaces: a family stays together, the family that consumes most comes first, and the models inside it follow the same rule, most used first. There are no `total` rows anywhere — an aggregate nobody can act on only costs space — so the account and family totals survive only as the bar's fallback name when the session model holds no allowance of its own; NaN never shows an account total. An allowance row leaves the window label empty and prints `name meter percent`, while a labeled sub-window (`4h`) keeps its column, and the reset a window reports rides that same line after a `·`; a window without one ends at its percentage, never on a dangling separator. The sidebar's Usage group prints those same rows in that same order, so the breakdown does not require opening the panel, and stops at the percentage: the reset dates stay in the panel. A row whose windows all round to `0%` is dropped from that group — an allowance nobody has touched yet tells the reader nothing the missing row does not — and the same rule retires the aggregate line of a provider without raw allowances once every window it shows sits at `0%`; the bar and the panel keep printing it, so a zeroed subscription is still verifiable there.
|
|
255
255
|
- Only the plan name and the windows are kept; account details in the payload are discarded.
|
|
256
256
|
- Gauges turn amber at 80% and red at 95%, like the context gauge.
|
|
257
257
|
|
|
@@ -321,14 +321,14 @@ Gentle Shell ships its own interactive tools instead of depending on third-party
|
|
|
321
321
|
- **`ask_user_choice`** — one exactly representable single-select question, with an opt-in free-text response.
|
|
322
322
|
- **`todo`** — plan tracking with the Gentle Todo card (see Gentle Todo below).
|
|
323
323
|
- **`bash_background`**, **`monitor`**, **`job_stop`**, **`job_list`** — background shell jobs that notify the agent when they exit, or on every output line (see Background jobs below).
|
|
324
|
-
- **`gentle_review` / capture tools** — the native review surface for receipt-driven development.
|
|
324
|
+
- **`gentle_review` / capture tools** — the native review surface for receipt-driven development. While RDD is not off, **`gentle_review_run`** runs an ordinary native review in one call ([ordinary review in one call](review-coordinator.md)).
|
|
325
325
|
- **Optional companions** (separately installed, never bundled): `gentle-engram` for persistent memory, `pi-web-access` for web access when a task needs it and your policy allows it, `pi-lens` for additional inspection surfaces, `pi-intercom` for cross-session communication where your Pi setup supports it, and `@juicesharp/rpiv-ask-user-question` for interactive choice support where a separately installed extension fits your setup. These are companions, not hidden prerequisites or a claim that every Pi installation has every capability; persistent memory is **not** bundled with `gentle-pi`.
|
|
326
326
|
|
|
327
327
|
### Gentle Agents
|
|
328
328
|
|
|
329
|
-
The current package requires Pi 1.2.0 or newer and Node >=22.19.0. Development tests resolve Pi through the open `>=1.0.0` development range. The private Vim editor adapter admits only the audited Pi `0.99.1`, `0.99.2`, `1.0.0`, `1.1.0`, `1.2.0`, `1.3.0`, `1.4.0`, and `1.5.
|
|
329
|
+
The current package requires Pi 1.2.0 or newer and Node `^22.19.0 || >=23.6.0` (22.19.0 or a later 22.x release, or 23.6.0 or newer; Node 23.0–23.5 are not supported). Development tests resolve Pi through the open `>=1.0.0` development range. The private Vim editor adapter admits only the audited Pi `0.99.1`, `0.99.2`, `1.0.0`, `1.1.0`, `1.2.0`, `1.3.0`, `1.4.0`, `1.5.0`, `1.5.1`, and `1.5.2` releases; any other release keeps ordinary prompt editing until its editor is audited. Use the latest Pi release; gentle-pi does not update your installed Pi automatically. Children, including any `GENTLE_PI_AGENTS_PI` override, must emit `agent_settled`: `agent_end` records a run's output but is not completion because retries or queued continuations may follow.
|
|
330
330
|
|
|
331
|
-
The `subagent_*` tools and the agents card replace the third-party subagents package (remove `npm:pi-subagents-j0k3r` from your pi packages; while it is still installed the tools stay unregistered and a warning says so at startup). Agent definitions and settings are the ones you already have: markdown agents in `~/.pi/agent/agents/`, `~/.pi/agent/subagents/`, `<cwd>/.pi/agents/`, `<cwd>/.pi/subagents/` (project beats global, `subagents/` beats `agents/`), and `subagents.json` at the global and project level (`default_model`, `default_effort`, `default_mode`, `model_profiles`, `stall_timeout_ms`, `tool_stall_timeout_ms`, `max_concurrency`, `history_max_tasks`).
|
|
331
|
+
The `subagent_*` tools and the agents card replace the third-party subagents package (remove `npm:pi-subagents-j0k3r` from your pi packages; while it is still installed the tools stay unregistered and a warning says so at startup). Agent definitions and settings are the ones you already have: markdown agents in `~/.pi/agent/agents/`, `~/.pi/agent/subagents/`, `<cwd>/.pi/agents/`, `<cwd>/.pi/subagents/` (project beats global, `subagents/` beats `agents/`), and `subagents.json` at the global and project level (`default_model`, `default_effort`, `default_mode`, `model_profiles`, `stall_timeout_ms`, `tool_stall_timeout_ms`, `max_concurrency`, `history_max_tasks`, `report_max_bytes`). A finished child's report is delivered into your context up to `report_max_bytes` (default 16384) UTF-8 bytes; a longer one arrives as its head, a truncation line with the exact byte counts naming `subagent_result`, and the end of the report (its last 2048 bytes at most, from a line start), so a closing summary that a memory provider reads from the delivered text is not lost (a report whose part after the head is 2048 bytes or less is delivered whole); a report from a `jd-*` or `review-*` agent, or one that is a single JSON object or array, is never cut, and `subagent_result` returns the full text.
|
|
332
332
|
|
|
333
333
|
Agent paths follow `GENTLE_PI_AGENT_HOME`, then `PI_CODING_AGENT_DIR`, then `~/.pi/agent` for definitions, config, history, child sessions, and transcripts. These overrides select the agent profile; they do not sandbox project or shared global resources.
|
|
334
334
|
|
|
@@ -343,7 +343,9 @@ The card is above the editor in every mode, including fullscreen — it is not o
|
|
|
343
343
|
|
|
344
344
|
Every subagent is its own `pi --mode rpc` child process, so the terminal never runs subagent work: the host reads JSON lines, applies each one as a small delta to a bounded per-task thread, and notifies only the listeners of that task. A task-mode child's question (`ctx.ui.select`, `confirm`, `input`, `editor`) reaches you as an ordinary pi dialog; a background child's question is dismissed. Subagents have no automatic total execution timeout: a long-running child remains live while it continues emitting RPC events. A silent child still times out through the configurable `stall_timeout_ms` watchdog (default four minutes). An announced tool call that is still running is live work, not silence, so it is bounded by `tool_stall_timeout_ms` instead (default 30 minutes, never below `stall_timeout_ms`). Closing pi stops the children that are still running.
|
|
345
345
|
|
|
346
|
-
Delegated children (`GENTLE_PI_AGENTS_CHILD=1`) load the same context files as their parent, minus the gentle-ai managed blocks that bind themselves to the orchestrator, such as `orchestrator` and `agent-routing` (the full list lives in [`lib/child-context-files.ts`](../lib/child-context-files.ts)). Every other managed block (for example `codegraph-guidance`,
|
|
346
|
+
Delegated children (`GENTLE_PI_AGENTS_CHILD=1`) load the same context files as their parent, minus the gentle-ai managed blocks that bind themselves to the orchestrator, such as `orchestrator` and `agent-routing` (the full list lives in [`lib/child-context-files.ts`](../lib/child-context-files.ts)), and minus the `engram-protocol` memory block, which gentle-engram injects itself every turn. Every other managed block (for example `codegraph-guidance`, or `remote-authorization` nested inside `agent-routing`) and all unmanaged project text reach the child unchanged. A marker counts only when it is alone on its line outside fenced code; if a file's markers are unbalanced, mismatched, or ambiguous, that file is passed through unfiltered. The filtering lives in the packaged `extensions/child-context.ts`, which every child loads (see below); if that file is missing, the child starts without it and keeps today's unfiltered context. The extension registers only a `before_agent_start` hook and does nothing outside a child session; the primary session applies the same filter itself while Gentle Shell injects its own orchestrator prompt. Only the injected context is filtered: every file on disk keeps all of its blocks, so a runtime that reads the same file as a workspace file and carries no runtime-injected protocol (OpenClaw) still gets the `engram-protocol` block.
|
|
347
|
+
|
|
348
|
+
Children of the package-owned `gentle-ai-worker`, `gentle-ai-explore`, and `gentle-ai-verify` agents start without Pi's skills catalog: the parent passes the exact skill paths they need, which they open with `read`. Gentle Agents sets `GENTLE_PI_AGENTS_NO_SKILLS_CATALOG=1` for those children, and `extensions/child-context.ts` empties the loaded skills before the first prompt, so no `<available_skills>` section is sent under either launch form, including the package's own skills in the Gentle Shell launch below. An agent with one of those names in a project `.pi/agents/` or a `subagents/` directory, and every other agent, keeps the full catalog.
|
|
347
349
|
|
|
348
350
|
In the isolated Gentle Shell home, `settings.json` does not declare gentle-pi; the launcher injects it with `-e`. So that children load the same package as the parent, the launcher also exports `GENTLE_SHELL_CHILD_PACKAGE_INJECTION` with that exact `-e` set, and Gentle Agents forwards the same set to every child as `--extension` arguments, plus `--no-extensions` when the launch replaced the configured extensions (a takeover). A child then has the same package commands, tools, guardrails, skills, and prompts as a regular gentle-pi child, where `settings.json` declares the package:
|
|
349
351
|
|
|
@@ -353,7 +355,7 @@ In the isolated Gentle Shell home, `settings.json` does not declare gentle-pi; t
|
|
|
353
355
|
- Without the signal, for example after a manual `pi -e <package>` launch, children fall back to `extensions/child-context.ts`, `extensions/child-safety.ts`, and `extensions/nan-provider.ts` only, with no missing-tool note. That fallback list is frozen; new child behavior ships in the package.
|
|
354
356
|
- A takeover forwards every package the parent loaded, so a settings package with no extensions (for example a skills-only package with only a `package.json`), which already makes the takeover parent fail with `Failed to load extension`, makes the child fail the same way; this limitation predates forwarding.
|
|
355
357
|
|
|
356
|
-
- `subagent_list_agents`, `subagent_run` (`agent`, `task`, `label?`, `context?`, `workspace_root?` or `repository_root?`, `mode?` task or background), `subagent_status`, `subagent_result`, `subagent_list_tasks`, `subagent_reply` (one current-session reply to a
|
|
358
|
+
- `subagent_list_agents`, `subagent_run` (`agent`, `task`, `label?`, `context?`, `workspace_root?` or `repository_root?`, `mode?` task or background), `subagent_status`, `subagent_result`, `subagent_list_tasks`, `subagent_reply` (one current-session reply to a child query; after the query expires, the reply reaches a running child as a message), `subagent_cancel`, `subagent_send_message` (steer a running child), `subagent_continue` (resume a finished task in its own session).
|
|
357
359
|
- Each agent tool call renders as one continuous card in the active card style: the call draws the heading and a `running…` row while it waits, and the result continues the same card and closes it. `subagent_result` is the exception: its call draws nothing and a poll of a running task renders no rows; any other result draws a card with its own `↩ Agent answer` heading. The heading names the action with its own glyph (`→ Delegating`, `◎ Agent status`, `↩ Agent answer`, `⨯ Stopping agent`, `✉ Messaging agent` / `✉ Replying to agent`, `↻ Resuming agent`, `☰ Agent tasks` / `☰ Agent roster`) and the agent; calls that carry only a task id resolve the agent's name from the tasks already loaded in this session, and otherwise show `task <id>` alone (a task from an earlier session loads only when the call runs). The heading also names what the child runs on — `provider/model · effort`, resolved from the child's own report and reading `inherit` when no layer picked a model — which a launch learns only once its result exists. A heading that cannot hold all of it with the expand hint sheds effort first, then the model, then the task id, and finally the agent name — the hint itself never goes. Status and answer bodies lead with the task state in uppercase (`RUNNING`, `WAITING`, `COMPLETED`, `FAILED`, `CANCELLED`, `TIMED OUT`) in its role color. A status card follows it with the task label and last step; collapsed, it keeps those three on one row each, clipping them on narrow terminals, and expanded, it also shows the workspace and any error. An answer card follows the state with the answer or error text. Agent cards for work in progress wear their own iris chrome (frame, heading, glyph, the running state and the float tint) in every theme. Waiting, finished, failed and stale cards take the theme's warning, success or error color for their frame and heading, and the theme's background; text and hints always keep the theme's colors. A call that fails before any task exists — a rejected workspace or repository scope, for instance — keeps its action heading in the error color and leads its body with a `FAILED` pill, so a delegation that never happened never reads as one still running. Card headings stay on one row: a line break in an agent name or task id is folded into a space. Results without structured task details keep a plain text preview. The text the model reads is unchanged.
|
|
358
360
|
- `orchestrator_session_id`, `orchestrator_list`, and `orchestrator_send_message` provide local-profile session notifications. List results advertise IDs only and reachability remains unknown. Sending selects the sole advertised peer or asks the user to choose; outbound messages require explicit interactive human consent before dispatch (Allow once, Allow for this session, or Deny), and fail closed if interactive UI or its selector is unavailable, even after a session grant. Each send requires a caller-supplied reason with at least 8 characters after trimming and at most 512 UTF-8 bytes. The consent preview visibly escapes controls and Unicode line separators; the delivered message remains unchanged. A successful ACK means the peer accepted the notification for delivery, not that it read or completed work. This is notification-and-ACK transport only: it has no cross-session queries, offline queue, retries, broadcasts, or read/completion guarantees. On Unix, presence records remain in the profile's private transport directory while socket endpoints use a private, profile-hashed directory below the canonical system temporary directory, keeping endpoint length independent of the profile path and at most 100 encoded bytes. The shared system temporary parent is only validated (current-user-owned without group/other write, or root/current-user-owned, world-writable, and sticky); it is never claimed, permissioned, or cleaned up by gentle-pi. On POSIX, the transport uses private Unix-domain sockets; on Windows, it uses private named pipes scoped by the current account SID, served by a package-local PowerShell helper (`runtime/windows-session-transport.ps1`): the transport selects that fixed helper, and availability and delivery depend on the helper's bounded startup and pipe checks. Notification and ACK limits remain bounded across platforms.
|
|
359
361
|
|
|
@@ -362,7 +364,7 @@ In the isolated Gentle Shell home, `settings.json` does not declare gentle-pi; t
|
|
|
362
364
|
- Alternatively, `subagent_run.repository_root` selects an explicit canonical root of an independent Git repository; the two root selectors cannot be combined. A direct interactive parent must grant that clone before queue or child session-directory writes. The grant belongs to the live parent session and canonical Git common directory: subsequent launches there can reuse it, but denial, cancellation, lost UI, reload, or changed session/repository identity fails closed. Print, RPC, and child callers cannot request a foreign target; foreign remediation launches are unsupported. Task and background launches still obey their ordinary mode restrictions. Queued tasks revalidate immediately before spawn; `subagent_continue` retains the target cwd and revalidates the grant rather than prompting to restore a lost one. Status and task details expose the cwd. Foreign children never enter the same-clone registry or its footer/widget counts. A delegation grant is not permission to review, commit, push, or deliver in the target repository.
|
|
363
365
|
- Background work requires a live interactive/RPC parent. Both `subagent_run` and `subagent_continue` reject background mode in `pi -p` before creating or spawning a task: the parent exits before it can receive a later result. Use task mode for bounded print-mode work.
|
|
364
366
|
- A background task's result comes back to the model as a `gentle-agents.result` message and starts a new turn when the agent is idle; the model never polls. Its **↩ Agent answer** card uses the success color when the task completed and the error color otherwise. Collapsed, it shows at most three rows: the task state in uppercase when the result carries task details, then the first non-blank rows of the answer or error, leaving out the `Subagent … (task …) <outcome>.` bookkeeping line the model reads; older results without that line preview their text unmodified, within the same three rows. Expanded, it shows the complete message, header included. A result held past the stale window does not replay its report: the model gets a compact `gentle-agents.stale-notice` naming the task and telling it to call `subagent_result` (an idle parent is woken for it), and the human gets a **↩ Stale agent answer** card in the warning color that previews up to three rows of its warning and never shows an answer it does not have. A completion whose forwarding fails stays queued for the next turn boundary instead of being lost. An idle parent has no boundary coming, so a failed delivery or a wake the host rejects there is retried after the wake grace, at most three times in a row.
|
|
365
|
-
- A configured child can call `subagent_parent_message` with bounded, well-formed Unicode text. Notifications retain their existing admission semantics. A `kind: "query"` waits for one strictly correlated `subagent_reply` for at most
|
|
367
|
+
- A configured child can call `subagent_parent_message` with bounded, well-formed Unicode text. Notifications retain their existing admission semantics. A `kind: "query"` waits for one strictly correlated `subagent_reply` for at most 120 seconds, so a parent busy with a model call or a tool batch can still answer; while a query is pending, the stall watchdog never fires before that query's deadline plus 5 seconds, whatever `stall_timeout_ms` and `tool_stall_timeout_ms` say, and the normal budget returns once the query is answered or expires. Each child has at most four pending queries, and disconnect, timeout, stop, and send failure settle each request once. On timeout the child is told the parent did not answer in time, that a late answer may still arrive as a message, and to continue with what does not depend on it and state the open question in its report. The current parent session alone can reply, once per request. A reply to a query that expired or closed unanswered is delivered to the still-running task as a steering message prefixed `Answer to your earlier question (<request id>; it expired before the reply arrived):`, and the tool result says so; when the task is no longer running, the result says the answer was not delivered and to pass it with `subagent_continue`; a late reply over 8 KiB is refused with the limit and the request stays answerable. A query that expires while the parent is still busy is shown once at its next turn boundary, marked `This query expired before it reached you; a reply is delivered to the task as a message.`, unless the task has ended; a query the parent already saw is not shown again. The first admitted task-mode query ends the original tool response while its child keeps running; its eventual non-cancelled completion returns once as a follow-up only if that same session is still active. Channel closure prevents later sends and automatic retry is not provided. Peer transport, offline delivery, retries, and broadcasts are unsupported.
|
|
366
368
|
- The card shows the active session's tasks only: after `/new` or `/resume` the earlier session's tasks leave it and come back with their session. Finished rows stay for one minute (three at most), and the card spends at most a quarter of the terminal (three to eight rows) on tasks; beyond that the rest fold into one `… N more · alt+a to view` line so the editor never leaves the screen. Questions and running work keep their rows first.
|
|
367
369
|
- `/gentle:agents` or `alt+a` opens a full-terminal overlay. At 60+ columns, the split view shows groups/tasks beside the retained semantic thread; uppercase `F` or **Fullscreen** expands that thread. At 12–59 columns, click a current subagent directly to inspect its thread; in All sessions, first select its orchestrator. `Enter`/`Tab` also enter a narrow selection. **Back** or `Escape` returns one level, closing only at the root; **Close** or `q` closes globally without cancelling children. Selection and manual thread scrolling survive Back and resize.
|
|
368
370
|
- Mouse controls take priority over keyboard hints: **Follow** (`f`), **Open session** (`o`), **Stop** (`s`, legacy `c`, owned active tasks only), and **Scope** (`a`). A compact footer's `>` cycles through actions. Scope switches between this session's direct active children and all open orchestrators, including idle ones. Open writes a markdown transcript for `$EDITOR`, not a resumed child session. `j`/`k` move through lists or scroll an expanded thread; `ctrl+j`/`ctrl+k` and Page Down/Up page the thread. In Pi fullscreen mode, the wheel scrolls the viewport under the pointer; regular terminal mode does not capture mouse input. Below 12 columns or three rows, only a bounded Close cell remains; zero-sized terminals render nothing.
|
|
@@ -394,6 +396,18 @@ until curl -sf localhost:3000/health; do sleep 1; done # server is up
|
|
|
394
396
|
- `monitor` is a background job whose every output line is an event, delivered while the command keeps running — for example `tail -f app.log | grep --line-buffered ERROR`, or a loop that prints each CI check as it finishes. Lines within 200 ms share one notice of at most 20 lines (the rest are counted, and stay in the log); notices waiting for a busy agent coalesce. `timeout_seconds` is mandatory (1–1800): the monitor is stopped when it expires and reports its event count. One that prints more than 120 lines within 60 seconds is stopped as a flood, so filter its output. When the command exits, a final notice reports the exit code and event count. It goes through the same command guards as `bash`.
|
|
395
397
|
- `/gentle:jobs` opens a full-terminal overlay with this session's jobs beside the selected job's command, status, output file, and live output tail; `↑`/`↓` or `j`/`k` move, `s` stops the selected running job, `q` closes (narrow terminals: `Tab` toggles details, `Escape` goes back). In fullscreen, click a visible job or the details, Stop and close controls; hovered targets use the shared orange role, and Stop rechecks the selected job's current identity and running status. The footer shows `⧗ N jobs` while any run. In fullscreen at 140 columns or wider, running jobs also get their own collapsible sidebar card (`⧗ Jobs`), one row per job with its elapsed time, newest first; it paints nothing only while nothing is current — no running jobs and no finished result still inside its 60-second tail, the Status card never repeats it, and `ctrl+shift+j` (or clicking the card's header) collapses it; `GENTLE_PI_JOBS_KEY` remaps the shortcut, with an empty value or `off` disabling it.
|
|
396
398
|
|
|
399
|
+
### Conflict markers in commits
|
|
400
|
+
|
|
401
|
+
The session refuses a `git commit` run through `bash` or `bash_background` when it would record leftover merge conflict markers, and names each `path:line`: at most five, then `and N more`. The command is not run, and the agent is told to resolve the markers and retry, and how a file that holds markers on purpose is exempted.
|
|
402
|
+
|
|
403
|
+
- It checks the lines that would be added. A plain commit or a `merge`, `rebase`, `cherry-pick`, `revert` or `am --continue` checks the staged content, `commit -a` checks tracked worktree changes, and `commit <paths>` checks those paths. A `git add` or `git stage` earlier in the same command (across `&&`, `;` and new lines, with the same `cd` or `-C` directory) is checked too, because the hook runs before it: named paths and `.` add their worktree content, untracked files included; `-A`/`--all` adds every tracked change and every untracked file that is not ignored; `-u` adds tracked changes only. File names are read as NUL-separated Git output, so spaces, quotes and non-ASCII names are exact.
|
|
404
|
+
- When a commit concludes a merge, or a picked commit during `cherry-pick` or `rebase`, a marker line counts only when it is added against both `HEAD` and the other side (`MERGE_HEAD`, `CHERRY_PICK_HEAD`, `REBASE_HEAD`): unresolved markers are in neither, and a file that arrived whole from the other branch is not this commit's addition. `revert` and `am` have no such side and are checked against `HEAD` only.
|
|
405
|
+
- A marker is a line starting with `<<<<<<< `, a line that is exactly `=======`, or a line starting with `>>>>>>> `. A file counts only when its added lines include both an opening and a closing marker, so a lone `=======` Markdown underline passes, and binary files are skipped.
|
|
406
|
+
- For a file that contains markers on purpose, such as a fixture or a document that shows a conflict, set Git's own `conflict-marker-size` attribute in `.gitattributes`, for example `docs/conflict-example.md conflict-marker-size=32`. Markers that a file already contained before this commit do not count.
|
|
407
|
+
- `git -C <dir>`, a leading `cd <dir> &&`, `builtin cd` and `command cd` select the repository that is checked. Redirections (`2>&1`, `>&2`, `&>file`, `> /dev/null`, `< file`) belong to their command and keep that directory, and a backslash at the end of a line continues the command, so flags and paths on the next line count.
|
|
408
|
+
- Not checked, and let through without a message: pushes (the range a push publishes depends on remote refs that may be stale or missing offline, so a check would block legitimate pushes of content already published; every commit made in the session is checked instead); wrapped shells (`sh -c`, `eval`, `env`, a `cd` with options); `GIT_*` variables, `--git-dir` and `--work-tree`; `git add -p`, `-i`, `-e`, `-N`, pathspec magic (`:(...)`) and shell globs, whose staging cannot be predicted (the existing index is still checked); a direct `git merge <branch>` that completes without stopping; untracked files over 1 MiB, binary files, and more than 200 candidate files per check; a diff over 16 MiB; and anything Git cannot answer within the 5-second budget for the whole check, or outside a repository.
|
|
409
|
+
- This is a mechanical guard, not a review. It runs whether RDD is on, off or unknown, and only after the RDD pre-delivery check, whose denials take precedence and are unchanged. It does not run in subagent sessions and never writes to the repository.
|
|
410
|
+
|
|
397
411
|
### Gentle Todo
|
|
398
412
|
|
|
399
413
|
The `todo` tool and its card replace the third-party todo extension (remove `npm:@juicesharp/rpiv-todo` from your pi packages; sessions written by it replay into the new card).
|
|
@@ -409,9 +423,9 @@ The `todo` tool and its card replace the third-party todo extension (remove `npm
|
|
|
409
423
|
The runtime helps keep the list current beyond a static tool description:
|
|
410
424
|
|
|
411
425
|
- `write` replaces the whole list in one call, so the model rewrites the plan instead of patching it; `add`, `update`, `clear`, and `list` remain for single moves.
|
|
412
|
-
- Each agent run's system prompt carries the same byte-stable rules block (in_progress before starting, done right after finishing, update before ending the run), so the cached prompt prefix never changes because of the list. While tasks stay open, the current list reaches the model as a hidden conversation message appended whenever the list changes, and closing the list appends a hidden "no open tasks" marker; the list never enters the system prompt and requests stay append-only, so status, title, note and ordering changes cost only the tail of the conversation and keep the provider prompt cache (Anthropic breakpoints, openai-codex input deltas) warm. When the conversation no longer holds the current list (after compaction, branch navigation, or in a session recorded before this behavior), the next request carries it once and it is
|
|
426
|
+
- Each agent run's system prompt carries the same byte-stable rules block (in_progress before starting, done right after finishing, update before ending the run), so the cached prompt prefix never changes because of the list. While tasks stay open, the current list reaches the model as a hidden conversation message appended whenever the list changes, and closing the list appends a hidden "no open tasks" marker; the list never enters the system prompt and requests stay append-only, so status, title, note and ordering changes cost only the tail of the conversation and keep the provider prompt cache (Anthropic breakpoints, openai-codex input deltas) warm. When the conversation no longer holds the current list (after compaction, branch navigation, or in a session recorded before this behavior), the next request carries it once and it is saved at that same place, so later requests still extend it.
|
|
413
427
|
- A list that goes two agent runs untouched while pending or in-progress tasks remain turns amber with `stale · N turns` on the card; that age is shown to the human only.
|
|
414
|
-
- Within a long run, after four tool-use model turns without a successful todo write, the next model request receives one hidden
|
|
428
|
+
- Within a long run, after four tool-use model turns without a successful todo write, the next model request receives one hidden reminder to review the plan; it is saved where that request carried it, so the following requests extend it and the prompt cache keeps its prefix. A successful `write`, `add`, `update`, or `clear` resets and rearms it; `list` and rejected writes do not. The turn containing the write does not count toward the threshold. Empty, finished and blocked-only plans receive no reminder. Reminder tracking restarts when the session loads; it does not change the existing card freshness, show a message in the conversation, start an extra model turn, change task statuses, or connect to subagents.
|
|
415
429
|
|
|
416
430
|
Tasks are `pending` (`○`), `in_progress` (`◐`), `blocked` (`⊘`), `done` (`✓`), or `dropped` (`✕`):
|
|
417
431
|
|
|
@@ -452,10 +466,17 @@ Expanded cards reserve at most one third of the terminal height (up to 16 rows,
|
|
|
452
466
|
|
|
453
467
|
You do not need the command: ask in plain language for a screen, mockup, landing page, or a few visual directions, and the session uses the gentle-design skill by default with any provider. After it writes or changes a design under `design/<slug>/`, the model opens the canvas on it (or refreshes the running one) through the `gentle_design` tool, unless you ask it not to. The same tool lists the designs and their artboards, shows whether the canvas is running and at which URL, stops the canvas, and starts the handoff of an artboard (`<slug>/<artboard>`) to the project's real stack, using exactly the text `/gentle:design implement` sends. Briefs and the design-system sync go through the skill itself. The `/gentle:design` subcommands remain available as optional shortcuts, and they share the same canvas server as the tool. Delegated subagents (`GENTLE_PI_AGENTS_CHILD=1`) do not get the default design flow.
|
|
454
468
|
|
|
455
|
-
The canvas opens in navigation mode: the mouse wheel
|
|
469
|
+
The canvas opens in navigation mode: the mouse wheel and trackpad pan or zoom the canvas, even over an artboard, a drag on the empty canvas pans it (a drag on an artboard moves it; see **Layout**), and Ctrl/Cmd + wheel zooms. Hovering an artboard shows "Click to use this design"; clicking it enters focus mode, which shows that artboard at 100% as wide as the window (**Desktop**, see **Sizes**; an artboard designed wider than the window keeps its width and is drawn smaller to fit, with the zoom showing how much) and lets it own the pointer and keyboard, so its own scrolling, hovers, buttons, and inputs behave like the real page. While an artboard is in focus, it keeps 8 px from the window's edges with a 48 px band below it for "Back to canvas", the comments panel hides to make room, the other artboards are hidden, the canvas does not pan or zoom, and an artboard taller than the window scrolls inside its frame. To return to navigation mode, press the floating "Back to canvas" button or `Shift+Esc`, which works even while typing inside the artboard; plain `Esc` stays with the design, and the previous zoom, position, and comments panel are restored. Comment mode keeps working in both modes: a click picks an element instead of entering focus mode.
|
|
456
470
|
|
|
457
471
|
- While the agent is busy, the run is queued as a follow-up.
|
|
458
|
-
- `/gentle:design open [slug]` shows a design on a local canvas in the default browser: every artboard side by side at its manifest size, with its title and tradeoff; zoom with the buttons or Ctrl/Cmd + wheel, pan by
|
|
472
|
+
- `/gentle:design open [slug]` shows a design on a local canvas in the default browser: every artboard side by side at its manifest size, with its title and tradeoff; zoom with the buttons or Ctrl/Cmd + wheel, pan by scrolling or by dragging the empty canvas, and Fit to the window. The view starts fitted and fits again when the window or the panel changes size, until you zoom or pan yourself; while you write a comment it waits, and the next size change fits it. The canvas reloads an artboard when its file changes and the whole design when `design.json` changes. Without a slug it opens the most recent design. The URL is always printed; when the browser cannot be opened, open it manually.
|
|
473
|
+
- **Tool rail** (left of the canvas): few tools, each an icon with a word under it: **Move** (`V`, leaves Comment mode) and **Comment** (`C`), one pressed pair; **Overview** (`F`), which fits every board like **Fit**; and **Settings** (a gear) at the bottom, a menu with **Design system board** (shows `design/system.html` in focus mode; unavailable when there is none), **Keyboard shortcuts** (`?`), the list of every shortcut, **Technical details**, a checkbox (off by default) that turns on the token inspector (see **Tokens**), and the language, three radio items under a **Language** heading: **Español**, **English** and **Match the browser**, the default, which follows the browser's language (Spanish for any `es` language, English for anything else) and changes with it. The choice is saved in this browser (`localStorage`, key `gentle-design:language`; a browser that blocks storage keeps it for the page only) and applies at once, without reloading any artboard: the canvas's own words on every surface (the rail, the top bar, the artboards' controls and handoff row, the keyboard shortcuts list, the minimap, the preview sizes with All sizes and the Overflows chip, the ⋯ export menu, Compare, the layout's messages, the Comments panel and the comment box, **Partial implementations** with its dates, the token inspector and **Quality**, whose accessibility findings are shown in the chosen language) and the page's `lang` switch (a message already on the status line or in a toast keeps the language it was shown in), while comment text, artboard titles and tradeoffs, and design file names stay as written; the menu notes that Messages to the agent stay in English, as everything the canvas sends to the session does: a comment goes as you wrote it, the request **Ask the agent to fix** prefills is in English, and so are the findings in it, even when the card shows them in Spanish. `]` shows or hides the Comments panel. Settings keeps the usual menu keys (arrows, `Home`, `End`, `Enter`, `Esc` back to the button, `Tab` or a click outside to close). Compare covers the rail, which stays inactive until **Back to canvas**. Single-key shortcuts are ignored while typing, with Ctrl, Alt or Cmd (a key typed with AltGr still counts as a single key), while the comment popover, a menu or Compare is open, and in focus mode, where only `Shift+Esc` applies; while the list is open only its own key works, and closes it. These keys are the defaults and can be changed in the **Keyboard shortcuts** list: **Change** next to an action (Move, Comment, Overview, the Comments panel, the minimap or **Show keyboard shortcuts**, the list itself) waits for the next key and gives that action the single key pressed (a letter, digit or punctuation key, without Ctrl, Alt or Cmd, AltGr allowed; `Esc` cancels the wait and `Tab` moves on and ends it), and a key another action already uses is refused with a message naming that action, so nothing changes. **Reset** puts one action back on its default key and **Restore defaults** puts them all back. The keys are saved in this browser (`localStorage`, key `gentle-design:shortcuts`) for every design the running canvas shows (when the browser cannot save them, the list says the change holds for this page only); the browser keeps them per canvas address, and the canvas server listens on a new port each time it starts, so after a restart the shortcuts are back to their defaults, an unusable or conflicting saved entry falls back to that action's default, and the rail's tooltips, the Comments button, the minimap, **Settings** and the list always show the current keys. `Esc`, `Shift+Esc`, the arrows, `Space`, `Enter`, `Tab` and the zoom keys (`+`, `-`, `0`) stay fixed and cannot be assigned.
|
|
474
|
+
- **Layout**: in Move mode, drag an artboard by any part of it (its title, its frame, the gaps in its header; not its buttons) to move it anywhere on the canvas, in canvas pixels at any zoom; the artboard you press shows selected, outlined whole, until you press the empty canvas or `Esc`, and a still click on its frame still opens it. A drag on the empty canvas pans, and holding `Space` pans from anywhere, even over an artboard. **Row**, **Column** and **Grid** in the top bar lay every artboard out again, 80 px apart, and fit the view; a moved artboard makes the layout free (none of the three pressed). Where the artboards sit is saved once per move or arrangement in `design/<slug>/layout.json` (the system board under the key `system`), restored when the design opens, and followed live by every open canvas page; without the file the artboards sit in a row, and a file that cannot be read never stops the canvas: a `layout.json` that cannot be read or used (not valid JSON, no valid layout or a position more than 2,000,000 px from the origin, too large, or not a regular file) keeps the artboards where they are and says so in the status line, and until it can be read again (or is removed) nothing is saved over it: moving an artboard or **Row**, **Column** and **Grid** change only the view. A read with no answer from the server keeps the artboards where they are without a message. A save that fails says so in the status line, and the message stays (a `design.json` reload shows it again) while the layout is unsaved; the next save that succeeds clears it. The arrangement is off inside an artboard, in Compare and when no board shows, and in Comment mode a drag on an artboard pans instead of moving it, so a click still picks an element. `Space` held on **Row**, **Column** or **Grid** just clicked pans too; a button reached with `Tab` keeps `Space` for itself. Moving an artboard by hand (free positioning) is pointer-only: from the keyboard, **Row**, **Column** and **Grid** lay the artboards out, and on the canvas the arrow keys pan, `+` and `-` zoom and `0` fits every board.
|
|
475
|
+
- **Sizes**: the **Preview size** button in the top bar, after **Row**, **Column** and **Grid**, shows the open artboard's size with its icon, name and `<width> × <height>` (`Desktop 1440 × 900`); it works on an open artboard only, so outside focus mode it is disabled and its tooltip says to open an artboard. It opens a menu with the usual menu keys (arrows, `Home`, `End`, `Enter`, `Esc` back to the button, `Tab` or a click outside to close) and **Phone** (390 × 844), **Tablet** (820 × 1180), **Desktop** (the window's width less its 8 px margins, at the artboard's height in `design.json`, never narrower than the artboard's own width; checked when focus mode starts), **All sizes**, and a **Custom** width field (whole px from 240 to 2560, applied with `Enter`; the height stays the artboard's own). A width out of range keeps the menu open and says which numbers it takes. A size resizes the artboard's frame at 100% without reloading it, so the design's own media queries respond; a size taller than the window is clipped like a tall artboard, and one wider than the window keeps its width and is drawn smaller to fit. **All sizes** shows the open artboard at Phone, Tablet and **As designed** (the artboard's own size in `design.json`) side by side below its title, each in its own iframe at its true width so the design's media queries apply, all drawn at one scale that fits the window (each label names the size and the scale); live reload reloads every frame. Comment mode and pins work at every size and in every All sizes frame: a pick opens the comment box beside the element in the frame it was made in. A frame whose page is wider than it shows an **Overflows** chip at its bottom right, whose tooltip says the content is wider than that many px; the open artboard's own frame shows it only at a single size. A comment made at Phone, Tablet, a custom width or in an All sizes frame records that size unless it is the artboard's own; Desktop records none, since its width is the window's. Its card in the comments panel shows the size it was made at (`Phone 390 × 844`, `Tablet 820 × 1180` or `<width> × <height>`). Leaving focus mode, or opening another artboard, restores the artboard's own size and closes All sizes.
|
|
476
|
+
- **Minimap** (bottom right of the canvas): every board drawn small where the layout puts it, the chosen artboard in the accent color, and the visible area outlined; click or drag in it to move the view there. `M` (a single key you can change in **Keyboard shortcuts**) shows or hides it; it hides inside an artboard and in Compare. The minimap is pointer-only (a picture to screen readers); from the keyboard the arrow keys pan the canvas, `+` and `-` zoom and `0` fits every board.
|
|
477
|
+
- **Export**: every design artboard (not the Design system board) has a **⋯** button beside **Implement this** that opens a menu with **Export as PNG**, **Export as PNG at 2×**, **Export as PDF** and **Download HTML**, with the usual menu keys (arrows, `Home`, `End`, `Enter`, `Esc` back to the button, `Tab` or a click outside to close); a pan or zoom closes it. **Export as PDF** prints the artboard alone, at its size in `design.json` as one page with no margin, through the browser's print dialog (choose *Save as PDF*; if the artboard file cannot be read or the dialog cannot open, the status line says so); it works in every browser, and content below that height is not printed. **Download HTML** saves the artboard file exactly as written in `design/<slug>/`, without the inspector the canvas server adds. **Export as PNG** and **Export as PNG at 2×** use the browser's own tab capture: the browser's selector opens at once and the status line asks you to choose the canvas tab in it, then, for one frame, the canvas hides its own controls and, inside the artboard, the selected comment's outline and Comment mode's hover outline, places the artboard at 100% in the window's top left at its size in `design.json` (Desktop's own width, whatever preview size was open), grabs the frame, stops the capture, restores the open artboard, its preview size, the view (fitted again or re-centered when the window changed size meanwhile), Comment mode and that outline, and puts the keyboard focus back on **⋯**. While one PNG export runs, another one is ignored. It downloads `<artboard>.png` or `<artboard>@2x.png`; at 2× it uses the screen's pixel density or upscales, and says so. The window must be at least as large as the artboard (full screen, `F11`, helps); otherwise the export stops and names the size it needs. It also stops with an explanation on the status line when the capture API is missing, permission is denied, a window or a screen was shared instead of the tab, sharing stopped before the frame was grabbed, a `design.json` reload removed the artboard meanwhile (a reload that keeps it, before the capture starts, exports the reloaded artboard), or a reload or **Back** replaced or closed the artboard while the frame was being grabbed. Browsers that only offer windows or screens, such as Firefox, cannot export this way; Chrome and other Chromium browsers offer the tab. When export is not possible, use the browser's own screenshot tool. **Export as PNG** contacts no server; **Export as PDF** and **Download HTML** only read the artboard file from the canvas server. In every case nothing is uploaded and nothing is written under `design/`.
|
|
478
|
+
- **Tokens**: with **Technical details** on (in **Settings**; off by default, saved in this browser under the `localStorage` key `gentle-design:technical`, and off for a browser that blocks storage), Comment mode shows a panel beside the frame of the element under the pointer: in the overview, in focus mode for the open artboard only (at any size, also in every All sizes frame), never on the Design system board and never while the comment box is open; artboards measure the element under the pointer only while Technical details is on. It shows the element's selector and its computed text color, background (walked up to the first opaque ancestor, translucent layers composited), font family and size, line height, margins and paddings, border radius, and the WCAG contrast ratio of the text on that background. Each value shows the `design/system.md` token it matches, or **⚠ no token** with the nearest one: colors by perceptual distance (OKLab), sizes by numeric distance. Contrast under AA (4.5 : 1, or 3 : 1 for large text: 24 px or more, or 18.66 px bold) is flagged; the ratio is shown to two decimals without rounding up. The canvas reads the tokens from the canvas server (`GET api/system/tokens`: each table row of `design/system.md` whose first cell is a backticked custom property, read-only, at most 256 KB and 500 tokens) when it starts and again when `design/system.md` changes; without that file, or for a kind with no tokens, the panel shows the values and the contrast without a comparison (and says when `design/system.md` is over 256 KB or could not be read), a read that fails keeps the tokens it had, and an open panel compares with new tokens at once. **Ask the agent to fix** opens the comment box on that element, prefilled and editable, with the flagged values and their nearest tokens, and follows **Send now** or **Collect** (and the size it was made at, in All sizes or at another preview size); it is disabled when nothing is off the system. **Copy** copies what the panel shows: the element, its selector and each row as `label: value` on its own line (with a fallback when the browser blocks the clipboard). Once a panel shows, it follows another element only after the pointer rests on it (250 ms), so the pointer can cross the artboard to the panel's buttons, and with the pointer on the panel nothing changes. The panel stays while the pointer or the keyboard is in it and goes shortly (300 ms) after the pointer leaves the element or keyboard focus leaves the panel; `Esc` in the panel closes it, with focus back on the canvas and Comment mode still on. It closes when Comment mode, focus mode, the preview size or the design changes, on a pan or a zoom, when the open artboard is re-centered (a layout change or a resize), when its frame goes (a `design.json` reload) and when Technical details goes off. These are heuristics: an element with a background image or gradient has no known background, and the match uses computed values, not the CSS that produced them.
|
|
479
|
+
- **Quality** (accessibility checks): the panel has two tabs, **Comments** and **Quality**, each with its count (open comments; problems found, shown once an artboard has reported), and the arrow keys, `Home` and `End` move between them; **Partial implementations** stays at the bottom in both. Each design artboard's own frame checks its page once it loads and again after a resize, once the size settles: text with contrast under AA (4.5 : 1, or 3 : 1 for large text; translucent text and every opacity on the element and its ancestors, which fades the text and its background together over what lies behind, are composited down to the page; text with an image or gradient showing through behind it is not judged, since its background is unknown), rendered `img` without an `alt` attribute (an image inside a `display: none` parent is skipped; one not loaded yet is not), form fields without an accessible label (`label[for]`, a wrapping `label`, `aria-label`, `aria-labelledby` or `title`), and heading levels that skip. Target sizes are listed as advice and never count: interactive elements (`a[href]`, `button`, `input`, `select`, `textarea`, `[role=button]`, focusable `[tabindex]`; inline links and disabled controls are skipped) smaller than 24 × 24 CSS px (the WCAG 2.2 target size minimum, which a smaller target also meets with enough space around it, and the check cannot measure that space), and those under 44 × 44 px. The Design system board and the All sizes frames are never checked. **Quality** has a group per design artboard reading `Accessible ✓`, `N checks` or **Not checked yet**, a card per finding as the artboard reported it, in the canvas language (the artboard sends each finding in English with a key and its values, from which the canvas words it; a finding it cannot word that way shows the English it came with), with **Problem** or **Advice** in words, and the checks that passed listed once. **Show** scrolls the artboard's page to the element, centers it and draws a ring around it on the canvas (never inside the artboard's page), labeled with the check's title and the same size on screen at any zoom; under 100% it also zooms in, to 100% or to the zoom at which a large element fits the view, never out, and in focus mode the artboard stays where it is. The ring follows the element as its page scrolls (in All sizes, in the frame as designed, where it is drawn), and is not drawn while the element is scrolled out of its frame. One ring at a time: `Esc` (after the comment box, Compare, a menu or a dialog, and before the selected artboard), a click elsewhere on the canvas, another **Show**, a reload of its artboard, another size, leaving All sizes or another design clears it, with the element's highlight in the artboard, while a drag that pans keeps it; an export never includes it. A finding whose element is hidden or off-screen (such as a skip link) says so, and its **Show** centers the artboard without a ring. **Ask the agent to fix** opens the comment box on that element (with its text, as a click in Comment mode records it), prefilled and editable, and follows **Send now** or **Collect**; the comment records the preview size the finding was found at, even after you change the size and before the artboard's next check arrives (a check the page made before it heard of a new size is ignored). The checks run inside the artboard's own frame, so they describe the artboard at the size it is shown, and they are heuristics, not a full audit: they miss keyboard, focus-order, motion and screen-reader problems, each list is capped (20 problems and 10 advice items per check, with the full count reported), and a page with more than 3000 elements is checked only up to its 3000th, so its counts cover that part only.
|
|
459
480
|
- `/gentle:design` with no arguments opens the most recent design (by `design.json` modification time) the same way. When the project has no design yet but has `design/system.html`, it and `open` show the canvas with only the system board; with neither, they print usage.
|
|
460
481
|
- Comments: turn on Comment mode, click an element in an artboard, and type a comment. Every comment is saved in `design/<slug>/comments.json` with its artboard, CSS selector, text excerpt, date, and status (`open` or `resolved`), so any agent or later session can read it.
|
|
461
482
|
- **Send now** (the default) also sends the session one message with the design, the comment id, the artboard file, the selector, the excerpt, and the comment; while the agent is busy, it is queued as a follow-up.
|
|
@@ -476,8 +497,10 @@ The canvas opens in navigation mode: the mouse wheel, trackpad, and drag always
|
|
|
476
497
|
- `/gentle:design implement <slug>/<artboard>`, or **Implement this** on an artboard's header in the canvas (after a confirm step; never on the system board), sends the session one handoff message, queued as a follow-up while the agent is busy. Both send the same text: the artboard path, title, and tradeoff; an instruction to build it in the project's real stack with the artboard as the visual spec, mapped to existing components rather than copied; `design/system.md` as the token source when it exists; and every open comment on that artboard, to apply and then resolve with `gentle_design_comments`. An unknown design or artboard warns with the valid `<slug>/<artboard>` values and sends nothing. An invalid `feature` link in `design.json` is reported as a warning, and the handoff goes out unlinked. The handoff itself commits nothing.
|
|
477
498
|
- ODD link: a design that comes from a tracked ODD feature records it in `design.json` as `"feature": "odd/tasks/<feature>.md"`, and the skill appends a Log entry naming the design to that document; small, untracked work has no `feature` and stays standalone. The canvas top bar shows **Feature: <path>** for a linked design, and the handoff asks to track the implementation in that document instead of sizing it from scratch. Only a relative `odd/tasks/<name>.md` path is accepted; any other value is ignored and reported as a warning in the canvas.
|
|
478
499
|
- Handoff state: every handoff (the canvas button, the command, or the tool's `implement`) is recorded in `design/<slug>/handoffs.json` before it is sent, and the handed-off artboard becomes the design's **chosen** direction: its header shows a **Chosen** badge and an accent frame, and the other artboards show **Alternative**. Handing off another artboard moves the mark. After **Send**, a toast confirms it, and the artboard's header shows **Queued** (the agent was busy) or **Implementing…** (it was idle), then **In progress** and **Implemented ✓** as the agent reports them with the `gentle_design` tool's `handoff` action, which the handoff message asks it to call. The canvas updates live, the badge names the linked feature document, and `list` reports each design's chosen artboard and handoff states. When the agent marks an artboard implemented with the `previewUrl` of the running app, **Compare** shows the artboard and the app side by side at the artboard's size, at 100%, with **Scale to fit** when the pair is wider than the window; exit with **Back to canvas** or `Shift+Esc`. The preview must be an `http`/`https` URL on `localhost`, `127.0.0.1`, or `[::1]` (any port, no credentials, at most 2048 characters); the tool and the server refuse anything else. Prefer `localhost` or `127.0.0.1`: CSP has no IPv6 source form, so browsers do not frame a `[::1]` preview, and Compare says so and offers the new tab. An app that refuses to be framed (`X-Frame-Options` or `frame-ancestors`) still opens with **Open in new tab**, which the Compare view always shows.
|
|
500
|
+
- Implement only this: when the directions share a piece you already want in the app (a side menu, a card), build that piece on its own while you keep choosing. In Comment mode, click the element and choose **Implement only this** in the comment popover, between **Cancel** and **Send**; the field becomes an optional note (at most 2000 characters). It sends the session the artboard, the element's selector and excerpt and the note, and does not choose a direction: the chosen artboard and the alternatives stay as they are. A toast and the status line say **Sent** or **Queued** (a busy agent gets it as a follow-up), and a refusal shows its reason on the popover's message line. The button is disabled, with the reason in a note under the buttons, when no Pi session is behind the canvas. **Partial implementations** (with its count), at the bottom of the comments panel and hidden while the design has no parts, lists the design's parts live from `parts.json`: the artboard, the state in words (**Sent**, **Queued**, **In progress**, **Implemented ✓**) and since when, the excerpt, the agent's note, and **Show**, which opens the artboard and highlights the element in every frame of it (also in All sizes). A part still **Sent** or **Queued** has **Remove**, which asks first, inline, because the agent can no longer report on a removed part; when the agent took the part up meanwhile, or a failed delivery already took it back, nothing is removed, the list reloads and the status line says why.
|
|
501
|
+
- Parts: the canvas server's `POST api/designs/<slug>/implement-part` hands one element of an artboard to the session without choosing a direction. Each part is recorded in `design/<slug>/parts.json` (never `handoffs.json`) as `sent`, then `in_progress` and `implemented` as the agent reports it; a repeated `in_progress` report keeps the time the part was first started. `parts.json` holds at most 1 MiB: a part or report that would make it larger is refused (`409 parts-too-large` on the canvas routes) and the previous file stays as it was. A part the agent never reports can be cleared with `POST api/designs/<slug>/parts/remove` and `{ "id": "<part id>" }`: it removes only a part still `sent` (queued or not) and answers `200 { "ok": true, "id" }`. A Remove that arrives while that design is still delivering a part waits until the delivery settles, so a part is never removed while its message is on its way to the session; once a failed delivery has taken the part back, the Remove answers `404 not-found`. A part in progress or implemented is `409 part-not-sent`, an unknown id `404 not-found`, a malformed id `400 invalid-part`, and an unreadable `parts.json` `422 invalid-parts`; a refusal writes nothing. Every change to `parts.json` reaches open canvas pages as a live change event.
|
|
479
502
|
|
|
480
|
-
The canvas server binds `127.0.0.1` on a random port and needs a random per-server token in every URL. It rejects any `Host` other than its own loopback address, accepts every write (comments, Send all, resolve/reopen, Implement) only with its own `Origin` (`http://127.0.0.1:<port>` or `http://localhost:<port>`), a JSON body, and bounded lengths, keeps at most 500 comments per design, and serves only files under `design/` in the session cwd (design folders, plus exactly `design/system.html` for the system board), resolved by real path so neither `..` nor a symlink can escape. Artboards run in iframes sandboxed without `allow-same-origin`, so they cannot read the canvas or post comments themselves. The canvas may frame only loopback origins (its `frame-src`), and the Compare preview frame keeps its own origin (`allow-scripts allow-same-origin allow-forms allow-popups`, never top navigation) only because it is another origin than the canvas: the canvas refuses a preview on its own port, and sends no referrer, so the app never sees the token. No other network traffic is involved. The server and the tool write `comments.json` and `
|
|
503
|
+
The canvas server binds `127.0.0.1` on a random port and needs a random per-server token in every URL. It rejects any `Host` other than its own loopback address, accepts every write (comments, Send all, resolve/reopen, Implement, parts) only with its own `Origin` (`http://127.0.0.1:<port>` or `http://localhost:<port>`), a JSON body, and bounded lengths, keeps at most 500 comments per design, and serves only files under `design/` in the session cwd (design folders, plus exactly `design/system.html` for the system board), resolved by real path so neither `..` nor a symlink can escape. Artboards run in iframes sandboxed without `allow-same-origin`, so they cannot read the canvas or post comments themselves. The canvas may frame only loopback origins (its `frame-src`), and the Compare preview frame keeps its own origin (`allow-scripts allow-same-origin allow-forms allow-popups`, never top navigation) only because it is another origin than the canvas: the canvas refuses a preview on its own port, and sends no referrer, so the app never sees the token. No other network traffic is involved. The server and the tool write `comments.json`, `handoffs.json` and `parts.json` one at a time through an atomic replace, and never overwrite a file they cannot parse.
|
|
481
504
|
|
|
482
505
|
### Gentle Music
|
|
483
506
|
|
package/docs/install-wizard.md
CHANGED
|
@@ -57,9 +57,10 @@ it lets the window close.
|
|
|
57
57
|
`collectInventory`; see [Host probes](#host-probes).
|
|
58
58
|
|
|
59
59
|
Current requirements come from `package.json` and
|
|
60
|
-
[`gentle-ai-installer.mjs`](../scripts/gentle-ai-installer.mjs): Node
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
[`gentle-ai-installer.mjs`](../scripts/gentle-ai-installer.mjs): Node `^22.19.0 || >=23.6.0`
|
|
61
|
+
(22.19.0 or a later 22.x release, or 23.6.0 or newer; 23.0–23.5 are not
|
|
62
|
+
supported), Pi ≥1.2.0, pnpm acquisition 11.1.1, Gentle Shell package 4.0.0 and package-local
|
|
63
|
+
Gentle AI 4.5.0. Windows native source builds require Go ≥1.25.10 when the
|
|
63
64
|
required usable native binary is missing. A reusable binary does not require Go.
|
|
64
65
|
When a build needs Go and the user's Go is missing, older or unchecked, the installer uses
|
|
65
66
|
its own [pinned Go](#pinned-go) instead of blocking.
|
|
@@ -131,12 +132,14 @@ Shell, also the pnpm commands that update or remove it); other blockers keep
|
|
|
131
132
|
their fixed guidance. A missing, older or unchecked Go is not a blocker: `tools.go` is
|
|
132
133
|
`needs-acquire` with `required`, the pinned `version` and the older `found`
|
|
133
134
|
version (or `unchecked: true` when `go version` reported no version it can
|
|
134
|
-
check), and the plan acquires the [pinned Go](#pinned-go).
|
|
135
|
-
|
|
135
|
+
check), and the plan acquires the [pinned Go](#pinned-go). A
|
|
136
|
+
Node.js outside the supported range (older than 22.19.0, or 23.0–23.5) or an
|
|
137
|
+
incompatible pnpm on the user's PATH is not a blocker when
|
|
136
138
|
the bootstrap's pinned copy runs the wizard: the probe reports that copy
|
|
137
139
|
(bootstrap-only) with the user's stable version as `found`, and `tools.node` or
|
|
138
|
-
`tools.pnpm` records `found` and the persisted pin as `version
|
|
139
|
-
|
|
140
|
+
`tools.pnpm` records `found` and the persisted pin as `version`. When the
|
|
141
|
+
found Node is in `$PNPM_HOME/bin`, the probe and plan also record
|
|
142
|
+
`foundInGlobalBin: true` (see [Existing installations](#existing-installations)). That copy is persisted
|
|
140
143
|
only for a new installation of Gentle Shell: with an existing Shell (updated or
|
|
141
144
|
current) the replaced runtime is an `incompatible-tool` blocker before consent,
|
|
142
145
|
except for a setup recovery, which persists nothing. A user's pnpm in
|
|
@@ -622,10 +625,15 @@ For a bootstrap-only Node, the full group runs these fixed steps:
|
|
|
622
625
|
|
|
623
626
|
The outcome then also reports `npmPrefix: "configured"` or `"unchanged"`.
|
|
624
627
|
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
628
|
+
When the first Node on the user's PATH is supported, it is reused and never
|
|
629
|
+
replaced: there is no `runtime set` and no prefix change. A Node in
|
|
630
|
+
`$PNPM_HOME/bin` can shadow it in the installer child environment, which puts
|
|
631
|
+
`$PNPM_HOME/bin` first on PATH. When that
|
|
632
|
+
first Node is unsupported, the bootstrap's pinned Node runs the wizard, so the
|
|
633
|
+
full group above persists it into `$PNPM_HOME/bin`. That replaces any Node
|
|
634
|
+
already in `$PNPM_HOME/bin`, even a supported one found later on PATH, and the
|
|
635
|
+
plan says so before consent; the unsupported Node found first is left
|
|
636
|
+
unchanged when it lives elsewhere. One fixed add runs, then only the matching checks:
|
|
629
637
|
|
|
630
638
|
| Intent | Command | Then |
|
|
631
639
|
| --- | --- | --- |
|
|
@@ -656,7 +664,7 @@ Pi but never reinstalls or downgrades it, and nothing changes before consent.
|
|
|
656
664
|
| A Pi older than the minimum that pnpm or npm owns | `update-pi` to `PI_INSTALL_VERSION` with that package manager (`pnpm add -g @earendil-works/pi-coding-agent@<version>` or `npm install -g …`), before any Gentle Shell step: ahead of `install-shell` or `update-shell-*`, or alone when Gentle Shell is current. The plan names the found and target versions and the manager. |
|
|
657
665
|
| A Pi older than the minimum that neither pnpm nor npm owns (mise, Homebrew, a standalone binary) | Left unchanged. `install-pi` adds the installer's Pi with pnpm exactly as when Pi is absent (in the same `pnpm add -g` as gentle-pi, before an update of Gentle Shell, or alone when Gentle Shell is current), and the plan says so before consent. |
|
|
658
666
|
| A Gentle Shell neither pnpm nor npm owns (an `npm link` of a source checkout, for example) | Blocked with an explanation; never reinstalled. |
|
|
659
|
-
| A Node.js
|
|
667
|
+
| A stable Node.js outside the supported range (mise, nvm, Homebrew, pnpm or an old installer) | The POSIX bootstrap acquires verified Node 24.21.0 and the plan persists it (`persist-node`, `persist-package-managers`, `configure-npm-prefix`). A Node already in `$PNPM_HOME/bin` is replaced even when a different Node appears first on PATH; that other Node is left unchanged. The plan says so before consent. An unknown or prerelease version still blocks. Windows: `bootstrap.cmd` does the same, and also acquires its Node for a user Node whose storage it cannot trust (nvm-windows' symlink, fnm's junction), which it never runs. |
|
|
660
668
|
| A pnpm older than 11.1.1, or whose engine rejects the bootstrap's Node (or, for the bootstraps only, another major) | Left unchanged. Both bootstraps acquire the verified pnpm 11.1.1 as when pnpm is absent, and the plan persists it (`persist-pnpm`, or `persist-package-managers` with npm). The plan says so before consent. Unknown evidence still blocks. |
|
|
661
669
|
| That pnpm in `$PNPM_HOME/bin` itself (where persisting pnpm writes) | Never replaced or downgraded. At 11.1.1 or newer, of any major (pnpm 12 included), it is used as it is and nothing is persisted over it. An older one blocks before consent; the guidance names the found and required versions and updates it with `pnpm self-update 11.1.1`. |
|
|
662
670
|
| A pnpm in `$PNPM_HOME/bin` whose shim is not recognized or whose `pnpm --version` reports no stable version | Left unchanged and never run again. The bootstrap's verified pnpm runs the installer and nothing is persisted over it (no `persist-pnpm`). The plan says so before consent. |
|
|
@@ -698,15 +706,16 @@ replaces the existing global package in place (its isolated global directory is
|
|
|
698
706
|
swapped), whether Pi was added alone or together with gentle-pi, so the next run
|
|
699
707
|
sees a single Pi; `npm install -g` replaces it in npm's global root.
|
|
700
708
|
|
|
701
|
-
An
|
|
702
|
-
bootstrap has its pinned copy the installer never runs
|
|
703
|
-
steps: the wizard and runner run under the bootstrap's Node (`process.execPath`),
|
|
709
|
+
An unsupported Node.js outside `$PNPM_HOME/bin` or incompatible pnpm is left
|
|
710
|
+
unchanged, and once the bootstrap has its pinned copy the installer never runs
|
|
711
|
+
the user's copy for installation steps: the wizard and runner run under the bootstrap's Node (`process.execPath`),
|
|
704
712
|
`persist-node` puts the pinned Node first in the runner's child `PATH`, and the
|
|
705
713
|
runner invokes the bootstrap's pnpm by absolute path (`runnerEnvironment` puts
|
|
706
714
|
its directory first on POSIX; Windows uses the `GENTLE_INSTALL_PNPM_*`
|
|
707
|
-
handoff).
|
|
708
|
-
|
|
709
|
-
|
|
715
|
+
handoff). Persisting Node replaces a pnpm-managed found Node in
|
|
716
|
+
`$PNPM_HOME/bin`. The wizard reads the user's pnpm only for its `--version`
|
|
717
|
+
(POSIX, from `/`). The plan's runtime persistence text names the found and pinned
|
|
718
|
+
versions and says whether the found Node is replaced or left unchanged. It promises no PATH
|
|
710
719
|
precedence: a version manager such as `mise activate` puts its own paths first
|
|
711
720
|
again on every prompt, so new terminals may still run the older Node or pnpm.
|
|
712
721
|
An update of an existing Gentle Shell persists nothing, so an older Node or
|
|
@@ -734,7 +743,7 @@ PNPM_HOME, `pnpm add -g @earendil-works/pi-coding-agent@1.0.0 gentle-pi@4.0.0`
|
|
|
734
743
|
lists Pi 1.0.0 while the Pi beside gentle-pi is 1.1.0. So Gentle Shell may run a
|
|
735
744
|
Pi newer than `PI_INSTALL_VERSION`, always at least the minimum: the runner
|
|
736
745
|
verifies that Pi (`verify-global-list`, the setup recovery, a pnpm
|
|
737
|
-
`verify-updated-shell`) and, when it is not `PI_INSTALL_VERSION` (1.5.
|
|
746
|
+
`verify-updated-shell`) and, when it is not `PI_INSTALL_VERSION` (1.5.2 now; the 1.0.0/1.1.0/1.2.0 figures above are that older verification), the outcome says which Pi
|
|
738
747
|
Gentle Shell runs. `--config.auto-install-peers=false` would leave gentle-pi
|
|
739
748
|
with no Pi beside it, so the launcher would run any `pi` on PATH, and
|
|
740
749
|
`--config.overrides` is ignored for global installs.
|
|
@@ -1324,7 +1333,7 @@ Windows bootstrap end to end still lacks native acceptance evidence.
|
|
|
1324
1333
|
| --- | --- |
|
|
1325
1334
|
| Entry | Small CMD entry invokes fixed stock Windows PowerShell commands with no profile. Paths are environment data, not interpolated PowerShell source. Delayed CMD expansion is disabled. |
|
|
1326
1335
|
| Storage | Claim a new random-named prerequisite directory directly below `%LOCALAPPDATA%`, or below `%USERPROFILE%` when `%LOCALAPPDATA%` fails `acl-mask` or `home-owner` (see [claim candidates](#claim-candidates-and-owners)); never reuse an existing destination. Verify each path component's reparse attributes, owner and role-specific ACL rights. Set the claimed directory's owner to the invoking SID, protect its DACL for the invoking SID, SYSTEM and Administrators, and read both back. |
|
|
1327
|
-
| Node | Reuse a proven stable existing Node ≥24.3.0
|
|
1336
|
+
| Node | Reuse a proven stable existing Node ≥24.3.0 inside the repository `engines.node` range. Otherwise (missing, a stable version outside that range, or a Node whose storage fails the reparse/owner/ACL walk, which therefore never runs) leave it as it is and acquire only the fixed official Node 24.21.0 Windows x64/arm64 ZIP, with no redirects and bounded transport, verify SHA256 before opening the archive, validate the whole namespace and extract only regular `node.exe`. |
|
|
1328
1337
|
| pnpm | A pnpm whose wrapper, Node, entry, metadata or exe fails the reparse/owner/ACL walk never runs: it is left as it is and pnpm is acquired as when missing. Reuse only a [known shim](#windows-command-shims) of pnpm's own JS entry, with package identity, bin target, stable CLI version, compatible engine and global add/bin help evidence, preserving its sibling-Node preference or proving its inherited cwd/PATH/PATHEXT Node selection; or a native `pnpm.exe` (`pnpm setup`, `pnpm self-update`, @pnpm/exe, pnpm 12), directly or as a known shim's target (an extensionless target resolves through PATHEXT in order, and only an `.exe` first match counts), whose `--version` is stable and equals the `package.json` naming pnpm or `@pnpm/*` beside it, with the same global help evidence. A `pnpm.exe` without that `package.json` (pnpm's standalone installer, a Volta or mise shim), Corepack's `pnpm.cmd` and mise's file shim are not proven pnpm: they are never run and pnpm is acquired as when missing. Never execute a shim via cmd.exe. Other unknown wrappers block without replacement. One whose stable version is of another major or older than 11.1.1 is left as it is, and pnpm is acquired as when missing. |
|
|
1329
1338
|
| Missing pnpm | Shared pnpm 11.1.1 URL/SRI and raw `>=22.13` engine identity are unchanged. Parse bounded gzip/USTAR bytes, reject unsupported extensions, links and unsafe Windows namespaces before no-clobber publication. Return a direct Node + JS-entry invocation; do not fabricate a wrapper. |
|
|
1330
1339
|
| Handoff | Existing Node helper starts the fixed wizard entry `bin/gentle-shell-install.mjs`. Only child PATH is refreshed. No persistent PATH, global installation, product root or companion installation is created here. |
|
|
@@ -1712,7 +1721,7 @@ never the path.
|
|
|
1712
1721
|
| `output-limit` | Combined stdout and stderr exceeded 1 MiB. |
|
|
1713
1722
|
| `exit-code` | Node exited with a nonzero code. |
|
|
1714
1723
|
| `version-format` | `node --version` did not print exactly `vMAJOR.MINOR.PATCH`. |
|
|
1715
|
-
| `engine` | The acquired Node is below 24.3.0 or the repository `engines.node`
|
|
1724
|
+
| `engine` | The acquired Node is below 24.3.0 or outside the repository `engines.node` range. |
|
|
1716
1725
|
| `acquired-version` | A Node acquired by this bootstrap is not exactly v24.21.0. |
|
|
1717
1726
|
|
|
1718
1727
|
The user's Node (no `.node-stem`) is never refused for `engine` or for the
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Reuse continuity during specified work
|
|
2
|
+
|
|
3
|
+
Refs #3078. This is a bounded instruction improvement, not a reproduction or closure of the reported multi-hour preparation delays.
|
|
4
|
+
|
|
5
|
+
The Shell-owned lazy memory guidance previously required reading both persisted copies back after every task-transition save, even when the save explicitly succeeded. An Engram full-observation read emits the feature document again. Initial implementation/recovery still needs reconciliation; an intact continuation should reuse its established task, route and applicable proof.
|
|
6
|
+
|
|
7
|
+
After a successful local update and an explicit, complete save acknowledgement, the guidance now permits targeted inspection of the changed local task/log lines without routinely rereading both full copies. It still saves the full mirror at the existing task-transition cadence. Missing, partial, truncated, failed or uncertain acknowledgements require checking which writes applied before retrying. A payload the memory tool cannot preserve remains pending instead of being resent unchanged. External edits, new scope, stale evidence or lost context require inspecting affected state; recovery still reads the actual file and full observation. A progress question does not restart discovery or planning.
|
|
8
|
+
|
|
9
|
+
## Bounded read-volume accounting
|
|
10
|
+
|
|
11
|
+
Source: `42c68c46859f1724ce9179d8781dd4ee35c13a00`, `odd/tasks/review-one-call.md`. Read its exact Git blob as UTF-8 bytes; it has existing Specs and Tasks sections. Its body is **22,837 bytes**. For one already specified unit, starting and finishing are two mirror transitions:
|
|
12
|
+
|
|
13
|
+
| Quantity | Before | After explicit complete acknowledgements |
|
|
14
|
+
| --- | ---: | ---: |
|
|
15
|
+
| Required routine full-mirror readbacks | 2 | 0 |
|
|
16
|
+
| Repeated document-body bytes from those readbacks | 45,674 | 0 |
|
|
17
|
+
|
|
18
|
+
This accounts only for removed mandatory mirror reads, excluding protocol envelopes. Targeted local inspection, full mirror writes and initial/recovery reads remain. Tools may expose extra bytes or clip outputs. This is instruction-volume accounting, **not an observed agent run, model-compliance result, token-cost measurement or latency benchmark**. It does not establish the cause or duration of the original incidents. Available local project sessions predate the November reports and were not treated as reproductions.
|
|
19
|
+
|
|
20
|
+
No new telemetry, framework, budget, agent, tracking artifact, approval or authority layer was introduced. No memory records were created for the accounting fixture. Existing consent, verification, delivery and correction limits are unchanged.
|
|
21
|
+
|
|
22
|
+
## Validation
|
|
23
|
+
|
|
24
|
+
The existing prompt-diet and work-continuity suites pass (17 tests). They check instruction contracts and parent prompt delivery, not model choices. The always-on prompt and provider-owned mirrored routing are unchanged. A representative real task trace is still needed to measure time to the first useful edit, repeated reads/consultations and redundant verification, and to decide whether other causes remain.
|
package/docs/permission-modes.md
CHANGED
|
@@ -50,7 +50,7 @@ Changing the default does **not** change the current session. To return this ses
|
|
|
50
50
|
|
|
51
51
|
| Mode | Behavior |
|
|
52
52
|
| --- | --- |
|
|
53
|
-
| **Normal** | Existing permission behavior; the default when no valid global preference exists. Guarded-command confirmations offer scoped choices: **Allow once**, **Allow for this session** (remembers the
|
|
53
|
+
| **Normal** | Existing permission behavior; the default when no valid global preference exists. Guarded-command confirmations offer scoped choices: **Allow once**, **Allow for this session** (remembers the guarded identity until the session ends) and **Always allow <family>** (persists `guardedCommands[key]="allow"` for non-push guards, or a push-variant entry in the user-level `runtime-guardrails.json`), besides **Deny**. Recognized data-loss commands never offer Always allow; hosts without a select dialog keep the plain yes/no confirm. |
|
|
54
54
|
| **Auto** | A separate reviewer using the current session model checks eligible actions against live user intent before execution. Local reads are classified too; locality does not exempt an action from explicit restrictions. |
|
|
55
55
|
| **YOLO** | Standing permission for ordinary already-authorized work and delivery; no Auto classifier. Destructive and independent consent boundaries remain, except recursive removal of the session's own [temp scratch](yolo-mode.md#temp-scratch-removal). Destructive confirmations apply only to commands the session actually runs: destructive text quoted from issues, files or docs is not an execution. Reading and listing non-sensitive material outside the workspace (the agent's own skills, docs, configuration) needs no permission question; sensitive-path and private-credential blocks still win. [Full YOLO details](yolo-mode.md). |
|
|
56
56
|
| **Super Yolo** | No permission prompts at all, including data-loss confirmations and configured guardrail actions. The only remaining line is the sensitive-path guard: read/write/edit of `.env`, `.ssh`, keychains, `*.pem/*.key/*.p12/*.pfx`, `secrets/` and cloud credential files stays hard-blocked. Code-level catastrophic denies (`rm -rf /`, `--no-preserve-root`, `git reset --hard`, forced clean, force push) also remain. |
|
|
@@ -69,6 +69,14 @@ In `/gentle:customize` → **Editor**, use **Session permissions** to change the
|
|
|
69
69
|
|
|
70
70
|
Current-session selection takes precedence over the global default. Repository settings, visual profiles, and session transcript entries cannot supply a permission-mode default. Package-owned children do not inherit the parent's elevated mode; their existing bounded delegation and safety paths remain in charge.
|
|
71
71
|
|
|
72
|
+
## Push permission identity
|
|
73
|
+
|
|
74
|
+
A guarded push is remembered by its operation and option variant, not its operands. Approving `git push origin main` also covers `git push origin feature` and `git push upstream main:release`, but not `--delete`, `--mirror` or a force refspec (`+main`). A single leading `git -C <directory>` prefix is recognized too; the directory is ignored for identity. `-d` shares `--delete`; `-f`, `--force` and `--force-with-lease` remain hard-blocked and a normal push grant never enables them.
|
|
75
|
+
|
|
76
|
+
Session and Always use the same identity (`gitPush:plain`, `gitPush:--delete`, `gitPush:--mirror`, `gitPush:--force`); only the lifetime differs. The Always choice writes `guardedCommandVariants` in the user-level config, so it survives a new session; only `allow` entries are honored there. Existing broad `guardedCommands.gitPush` entries keep their current meaning.
|
|
77
|
+
|
|
78
|
+
Only one literal `git push` command (optionally with that single `-C <directory>` prefix) is recognized. Quoted, expanded, redirected or compound commands, and options this guard does not classify (for example `-u` or `--tags`), never create or inherit a push-variant grant and never offer Always. **Allow for this session** can still remember such an exact command, but that grant applies only to the same exact text.
|
|
79
|
+
|
|
72
80
|
## What Auto checks
|
|
73
81
|
|
|
74
82
|
Auto intercepts eligible primary tool calls before their executors run, including `write`/`edit`, shell tools (`bash`, `bash_background`, `monitor`), custom/MCP tools, and nested calls dispatched through Pi's tool-event pipeline, such as codemode's `executeTool` calls. Local `read`, `grep`, `find`, and `ls` calls are classified, as are local edits. Workspace locality is not a safety exemption: explicit read prohibitions and read-only instructions remain part of the decision.
|
package/docs/prompt-budget.md
CHANGED
|
@@ -26,3 +26,15 @@ The test calls Pi 1.4's actual pure system prompt builder, with the primary Gent
|
|
|
26
26
|
Pi 1.4 does not export the builder at its package root. This test deliberately resolves its installed internal `core/system-prompt.js` adjacent to the public entrypoint; an upstream move or API change fails the test and requires maintenance. It starts no session and makes no model or native-review call.
|
|
27
27
|
|
|
28
28
|
The assembly budget excludes other extensions' guidelines, other skills, project instructions, dynamic session state, and provider serialization. The three declaration bytes are reported separately, not as part of the assembled system-text count. The fixture is not an exact provider request or a guarantee for other configurations. Bytes are not tokens, and these measurements do not establish latency or cost savings.
|
|
29
|
+
|
|
30
|
+
## Tools behind codemode
|
|
31
|
+
|
|
32
|
+
When `codemode` is declared in the primary session, rarely used or state-bound tools leave the per-turn declarations through each tool's `prepareLoadout` hook (`lib/hidden-tools.ts`, the same `hiddenDeclarations` projection as the RDD-off review loadout). They stay registered and active, so a codemode script calls them as `tools.<name>(args)`, and the system prompt gains one short route sentence per group:
|
|
33
|
+
|
|
34
|
+
- `orchestrator_list`, `orchestrator_consult`, `orchestrator_send_message`: always while codemode is declared.
|
|
35
|
+
- `gentle_guide`: always while codemode is declared.
|
|
36
|
+
- `gentle_design`, `gentle_design_comments`: only while the project has no `design/` directory; the route says "not declared in this run" (the state is read when a run starts) and names `tools.gentle_design({ action: "list" })`, the call the design hint requires before designing; the design skill names the same route once.
|
|
37
|
+
|
|
38
|
+
Without `codemode` (Pi's default when no MCP server or `defaultTools` entry activates it), every tool stays a direct declaration and no route sentence is added; `tool_search` alone is not treated as a route. Delegated children are unchanged.
|
|
39
|
+
|
|
40
|
+
Measured with an offline provider (RDD off, organic and full delegation alike): with codemode the declarations drop from 34,521 B to 27,321 B without `design/` and to 30,484 B with it; the system prompt grows by 114 B and 209 B. Without codemode both stay byte-identical (30,804 B). The decision is evaluated once per run, so consecutive requests carry the same tool list; a `design/` directory appearing takes effect at the next run and rewrites the cached request prefix once.
|