gentle-pi 4.5.1 → 4.7.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.
Files changed (428) hide show
  1. package/README.md +17 -15
  2. package/assets/agents/gentle-ai-explore.md +1 -0
  3. package/assets/agents/gentle-ai-verify.md +8 -1
  4. package/assets/agents/gentle-ai-worker.md +4 -0
  5. package/assets/agents/jd-fix-agent.md +1 -0
  6. package/assets/agents/jd-judge-a.md +1 -0
  7. package/assets/agents/jd-judge-b.md +1 -0
  8. package/assets/design-canvas/canvas.css +13 -1
  9. package/assets/design-canvas/canvas.js +11 -2
  10. package/assets/install-wizard/wizard.js +1 -0
  11. package/assets/migrations/agent-body-history.json +162 -0
  12. package/assets/orchestrator-delegation-reference.md +7 -7
  13. package/assets/orchestrator-delegation.md +3 -3
  14. package/assets/orchestrator-full-delegation-card.md +65 -0
  15. package/assets/orchestrator-full-delegation.md +34 -0
  16. package/assets/orchestrator-memory.md +3 -3
  17. package/assets/orchestrator-prompts.md +1 -1
  18. package/assets/orchestrator-skills.md +1 -1
  19. package/assets/orchestrator-verification.md +14 -8
  20. package/assets/orchestrator.md +11 -11
  21. package/bin/gentle-shell.mjs +225 -82
  22. package/docs/agent-status.md +61 -0
  23. package/docs/bundled-install.md +7 -5
  24. package/docs/ci-performance.md +11 -0
  25. package/docs/delegated-verification.md +35 -7
  26. package/docs/fast-mode.md +15 -0
  27. package/docs/gentle-agents-activity.md +22 -0
  28. package/docs/gentle-shell.md +113 -25
  29. package/docs/install-wizard.md +2 -2
  30. package/docs/mcp-status.md +52 -0
  31. package/docs/permission-modes.md +9 -4
  32. package/docs/prompt-budget.md +28 -0
  33. package/docs/readme-reference.md +154 -50
  34. package/docs/render-cache-performance.md +11 -1
  35. package/docs/review-coordinator.md +33 -0
  36. package/docs/review-request-context.md +19 -0
  37. package/docs/review-windows-acl.md +18 -0
  38. package/docs/session-profile-format.md +20 -5
  39. package/docs/sound-notifications.md +1 -1
  40. package/docs/star-prompt.md +32 -0
  41. package/docs/voice.md +6 -3
  42. package/docs/work-continuity.md +46 -0
  43. package/docs/yolo-mode.md +5 -5
  44. package/extensions/ask-user-choice.ts +1 -0
  45. package/extensions/ask-user-question.ts +2 -0
  46. package/extensions/child-safety.ts +3 -0
  47. package/extensions/codegraph-tools.ts +38 -4
  48. package/extensions/gentle-agent-status.ts +99 -0
  49. package/extensions/gentle-agents.ts +803 -84
  50. package/extensions/gentle-ai.ts +2491 -596
  51. package/extensions/gentle-fast.ts +61 -0
  52. package/extensions/gentle-guide.ts +174 -0
  53. package/extensions/gentle-herdr-activity.ts +21 -1
  54. package/extensions/gentle-herdr-agent.ts +144 -0
  55. package/extensions/gentle-program-identity.ts +61 -0
  56. package/extensions/gentle-shell.ts +895 -120
  57. package/extensions/gentle-star-prompt.ts +334 -0
  58. package/extensions/gentle-stats.ts +5 -5
  59. package/extensions/gentle-todo.ts +59 -23
  60. package/extensions/gentle-tps.ts +48 -0
  61. package/extensions/history/store.ts +18 -12
  62. package/extensions/quiet-tools.ts +38 -8
  63. package/extensions/skill-registry.ts +210 -21
  64. package/extensions/startup-banner.ts +69 -10
  65. package/lib/agent-assets.ts +74 -17
  66. package/lib/agent-profile-pin.ts +3 -3
  67. package/lib/agent-profiles.ts +161 -3
  68. package/lib/agent-status.ts +105 -0
  69. package/lib/agents-config.ts +58 -3
  70. package/lib/agents-history.ts +24 -5
  71. package/lib/agents-keys.ts +8 -16
  72. package/lib/agents-messaging.ts +47 -5
  73. package/lib/agents-protocol.ts +80 -4
  74. package/lib/agents-runner.ts +287 -15
  75. package/lib/agents-view.ts +6 -1
  76. package/lib/agents-widget.ts +132 -9
  77. package/lib/auto-permission-runtime.ts +1 -1
  78. package/lib/bounded-writer-admission.ts +13 -1
  79. package/lib/bridge-cost.ts +28 -0
  80. package/lib/card-content-policy.ts +8 -6
  81. package/lib/codemode-renderer.ts +16 -0
  82. package/lib/command-palette-catalog.ts +1 -0
  83. package/lib/command-palette.ts +154 -25
  84. package/lib/context-backstop.ts +14 -5
  85. package/lib/destructive-command-guard.ts +48 -4
  86. package/lib/execution-surface-guard.ts +20 -0
  87. package/lib/exploration-budget.ts +64 -0
  88. package/lib/gentle-ai-binary.ts +1 -1
  89. package/lib/gentle-design.ts +3 -0
  90. package/lib/gentle-guide.ts +201 -0
  91. package/lib/gentle-shell-bundled.ts +6 -19
  92. package/lib/gentle-shell-launcher.ts +47 -8
  93. package/lib/herdr-activity.ts +23 -5
  94. package/lib/herdr-busy.ts +45 -0
  95. package/lib/herdr-task-summary-policy.ts +85 -0
  96. package/lib/image-attachments.ts +33 -0
  97. package/lib/image-disk-cache.ts +137 -0
  98. package/lib/inprocess-reviewer.ts +282 -132
  99. package/lib/jobs-sidebar-state.ts +5 -6
  100. package/lib/jobs-view.ts +198 -11
  101. package/lib/jobs-widget.ts +16 -52
  102. package/lib/keymaps-customize.ts +81 -0
  103. package/lib/keymaps.ts +291 -0
  104. package/lib/model-fallback-notice.ts +61 -0
  105. package/lib/model-fallback-policy.ts +141 -0
  106. package/lib/model-fallback-store.ts +143 -0
  107. package/lib/model-routing-authority.ts +32 -6
  108. package/lib/nan-provider.ts +3 -2
  109. package/lib/native-choice-list.ts +20 -2
  110. package/lib/native-review-cli.ts +103 -21
  111. package/lib/notification-customize.ts +48 -51
  112. package/lib/openai-fast-tier.ts +22 -0
  113. package/lib/orchestrator-discovery.ts +5 -1
  114. package/lib/orchestrator-fallback.ts +75 -0
  115. package/lib/orchestrator-mode-policy.ts +105 -0
  116. package/lib/pasted-image-paths.ts +113 -0
  117. package/lib/questionnaire/questionnaire-view.ts +225 -18
  118. package/lib/rdd-mode-control.ts +32 -0
  119. package/lib/reply-language-anchor.ts +104 -0
  120. package/lib/review-blocker.ts +92 -0
  121. package/lib/review-candidate-symlink-scan.ts +136 -0
  122. package/lib/review-candidate-view-owner.ts +85 -44
  123. package/lib/review-candidate-view.ts +10 -7
  124. package/lib/review-continuation-registry.ts +99 -0
  125. package/lib/review-coordinator.ts +163 -0
  126. package/lib/review-failure-facts.ts +49 -0
  127. package/lib/review-host-relay.ts +51 -11
  128. package/lib/review-integration-v2.ts +29 -8
  129. package/lib/review-relay-phase-timing.ts +45 -0
  130. package/lib/review-repository.ts +5 -0
  131. package/lib/review-start-context.ts +17 -0
  132. package/lib/session-profile-append-controller.ts +21 -6
  133. package/lib/session-profile-authority.ts +119 -0
  134. package/lib/session-profile-binding.ts +54 -5
  135. package/lib/session-profile-freeze.ts +107 -9
  136. package/lib/session-profile-integration.ts +313 -0
  137. package/lib/session-profile-persistence.ts +63 -9
  138. package/lib/shell-bar.ts +269 -72
  139. package/lib/shell-card.ts +26 -6
  140. package/lib/shell-changes.ts +2 -0
  141. package/lib/shell-page.ts +120 -0
  142. package/lib/shell-panel.ts +163 -0
  143. package/lib/shell-prompt.ts +53 -1
  144. package/lib/shell-sidebar-layout.ts +198 -53
  145. package/lib/shell-sidebar.ts +61 -1
  146. package/lib/shell-stats.ts +123 -0
  147. package/lib/shell-todo.ts +79 -1
  148. package/lib/shell-usage.ts +12 -2
  149. package/lib/star-prompt.ts +197 -0
  150. package/lib/verifier-admission.ts +18 -8
  151. package/lib/verifier-settle-reminder.ts +64 -0
  152. package/lib/vim-editor-adapter.ts +6 -1
  153. package/lib/visual-customization-policy.ts +67 -12
  154. package/lib/visual-customize-view.ts +373 -40
  155. package/lib/visual-layout-preview.ts +47 -0
  156. package/lib/visual-profiles.ts +2 -2
  157. package/lib/windows-session-transport.ts +53 -2
  158. package/lib/yolo-session-policy.ts +68 -16
  159. package/package.json +2 -1
  160. package/runtime/gentle-ai-binary.mjs +1 -1
  161. package/runtime/gentle-shell-bundled.mjs +6 -19
  162. package/runtime/gentle-shell-launcher.mjs +46 -7
  163. package/runtime/native-review-cli.mjs +100 -18
  164. package/runtime/review-integration-v2.mjs +29 -8
  165. package/runtime/windows-session-transport.ps1 +60 -3
  166. package/scripts/bootstrap.sh +4 -1
  167. package/scripts/build-full-delegation-card.mjs +175 -0
  168. package/scripts/bundled-install.mjs +38 -8
  169. package/scripts/download-progress.mjs +68 -0
  170. package/scripts/gentle-ai-installer.mjs +41 -18
  171. package/scripts/gentle-ai-proxy.mjs +294 -0
  172. package/scripts/install-gentle-ai.mjs +14 -1
  173. package/scripts/installer-preflight.mjs +6 -6
  174. package/scripts/installer-runner.mjs +27 -12
  175. package/scripts/installer-server.mjs +8 -7
  176. package/scripts/pi-update.mjs +113 -3
  177. package/scripts/render-cache-host.mjs +72 -0
  178. package/scripts/render-cache-performance-worker.mjs +5 -4
  179. package/scripts/render-cache-performance.mjs +6 -1
  180. package/scripts/run-test-suite.mjs +41 -13
  181. package/scripts/shell-snapshot.mjs +340 -0
  182. package/scripts/test-packed-runner.mjs +1 -1
  183. package/scripts/update-agent-body-history.mjs +41 -0
  184. package/scripts/verify-installer-tap.mjs +45 -0
  185. package/scripts/verify-package-files.mjs +14 -2
  186. package/scripts/voice-worker.cjs +32 -6
  187. package/skills/design/SKILL.md +11 -8
  188. package/skills/gentle-ai/SKILL.md +4 -4
  189. package/skills/gentle-ui-design/SKILL.md +46 -0
  190. package/skills/gentle-ui-design/references/adaptive-interfaces.md +46 -0
  191. package/skills/gentle-ui-design/references/browse-and-compare.md +62 -0
  192. package/skills/gentle-ui-design/references/composition-and-feedback.md +56 -0
  193. package/skills/gentle-ui-design/references/task-and-content.md +60 -0
  194. package/skills/skill-registry/SKILL.md +4 -2
  195. package/skills/tui-design/NOTICE.md +5 -0
  196. package/skills/tui-design/SKILL.md +56 -0
  197. package/skills/tui-design/references/commands.md +75 -0
  198. package/skills/tui-design/references/critique.md +48 -0
  199. package/skills/tui-design/references/design-doc.md +44 -0
  200. package/skills/tui-design/references/terminal-craft.md +64 -0
  201. package/skills/tui-design/references/visual-loop.md +32 -0
  202. package/skills/work-unit-commits/SKILL.md +6 -7
  203. package/tests/agent-home.test.ts +28 -9
  204. package/tests/agent-profiles-workflow.test.ts +163 -0
  205. package/tests/agent-risk-escalation.test.ts +1 -1
  206. package/tests/agent-status.test.ts +143 -0
  207. package/tests/agents-config.test.ts +96 -0
  208. package/tests/agents-history.test.ts +31 -0
  209. package/tests/agents-jobs-frames.test.ts +93 -0
  210. package/tests/agents-prompt-lifecycle-runtime.test.ts +376 -0
  211. package/tests/agents-protocol.test.ts +53 -1
  212. package/tests/agents-runner-drain.test.ts +193 -0
  213. package/tests/agents-runner.test.ts +345 -4
  214. package/tests/agents-view.test.ts +27 -0
  215. package/tests/agents-widget.test.ts +312 -10
  216. package/tests/append-system-prompt-route.test.ts +4 -1
  217. package/tests/ask-user-choice.test.ts +4 -3
  218. package/tests/ask-user-question.test.ts +97 -0
  219. package/tests/auto-permission-runtime.test.ts +1 -1
  220. package/tests/autonomous-guard.test.ts +346 -10
  221. package/tests/bounded-scan-contract.test.ts +39 -0
  222. package/tests/bounded-stop-contract.test.ts +43 -3
  223. package/tests/bridge-cost.test.ts +47 -0
  224. package/tests/bundled-install.test.ts +36 -9
  225. package/tests/card-content-policy.test.ts +3 -3
  226. package/tests/chained-pr-skill.test.ts +8 -6
  227. package/tests/child-safety.test.ts +11 -0
  228. package/tests/ci-concurrency.test.ts +11 -0
  229. package/tests/ci-merge-base-identity.test.ts +114 -0
  230. package/tests/codegraph-tools.test.ts +80 -5
  231. package/tests/codemode-rendering.test.ts +22 -2
  232. package/tests/command-palette.test.ts +300 -3
  233. package/tests/commit-slice-signal.test.ts +11 -9
  234. package/tests/delegate-for-reason-contract.test.ts +8 -7
  235. package/tests/design-canvas-assets.test.ts +185 -2
  236. package/tests/destructive-command-guard.test.ts +52 -0
  237. package/tests/download-progress.test.ts +71 -0
  238. package/tests/execution-surface-guard.test.ts +55 -0
  239. package/tests/exploration-budget.test.ts +128 -0
  240. package/tests/fixtures/agent-assets/gentle-ai-worker.strict-tdd-era.md +122 -0
  241. package/tests/fixtures/measure-orchestrator-prompt.mjs +2 -1
  242. package/tests/fixtures/primary-session-prompt/gentleman.golden.md +26 -14
  243. package/tests/fixtures/proxy-tls/proxy.crt +19 -0
  244. package/tests/fixtures/proxy-tls/proxy.key +28 -0
  245. package/tests/fixtures/session-profile-v1/gentle-ai-reviewer.ts +89 -0
  246. package/tests/fixtures/session-profile-v1/replay.ts +172 -0
  247. package/tests/fixtures/session-profile-v1/session-profile-authority.ts +113 -0
  248. package/tests/fixtures/session-profile-v1/session-profile-binding.ts +83 -0
  249. package/tests/fixtures/session-profile-v1/session-profile-disk-reader.ts +182 -0
  250. package/tests/fixtures/session-profile-v1/session-profile-freeze.ts +290 -0
  251. package/tests/fixtures/session-profile-v1/session-profile-persistence.ts +195 -0
  252. package/tests/fixtures/session-profile-v1/v1-inputs.ts +16 -0
  253. package/tests/fixtures/windows-pipe-availability.ps1 +26 -0
  254. package/tests/fixtures/windows-session-bootstrap.ps1 +6 -2
  255. package/tests/full-delegation-closure.test.ts +131 -0
  256. package/tests/full-delegation-notices.test.ts +76 -0
  257. package/tests/generic-agent-tools.test.ts +3 -3
  258. package/tests/gentle-agent-status.test.ts +74 -0
  259. package/tests/gentle-agents-child-jobs.test.ts +237 -0
  260. package/tests/gentle-agents.test.ts +1491 -38
  261. package/tests/gentle-ai-binary.test.ts +3 -1
  262. package/tests/gentle-ai-elapsed-store.test.ts +19 -0
  263. package/tests/gentle-ai-exploration-budget.test.ts +151 -0
  264. package/tests/gentle-ai-installer.test.ts +134 -51
  265. package/tests/gentle-ai-proxy.test.ts +434 -0
  266. package/tests/gentle-ai.test.ts +1101 -52
  267. package/tests/gentle-design.test.ts +21 -0
  268. package/tests/gentle-fast.test.ts +73 -0
  269. package/tests/gentle-guide.test.ts +208 -0
  270. package/tests/gentle-herdr-activity.test.ts +80 -3
  271. package/tests/gentle-herdr-agent.test.ts +111 -0
  272. package/tests/gentle-program-identity.test.ts +197 -0
  273. package/tests/gentle-shell-bin.test.ts +172 -26
  274. package/tests/gentle-shell-bundled.test.ts +207 -31
  275. package/tests/gentle-shell-launcher.test.ts +93 -10
  276. package/tests/gentle-shell.test.ts +1937 -66
  277. package/tests/gentle-stats.test.ts +15 -2
  278. package/tests/gentle-todo.test.ts +67 -4
  279. package/tests/gentle-tps.test.ts +123 -0
  280. package/tests/gentle-ui-design-skill.test.ts +59 -0
  281. package/tests/herdr-busy.test.ts +59 -0
  282. package/tests/herdr-task-summary-policy.test.ts +132 -0
  283. package/tests/history-store-private-mode.test.ts +40 -0
  284. package/tests/image-disk-cache.test.ts +163 -0
  285. package/tests/image-paste-chips.test.ts +42 -0
  286. package/tests/independent-recovery-delivery.test.ts +83 -0
  287. package/tests/inprocess-reviewer.test.ts +298 -4
  288. package/tests/installer-posix-bootstrap.test.ts +68 -6
  289. package/tests/installer-preflight.test.ts +5 -4
  290. package/tests/installer-runner.test.ts +79 -44
  291. package/tests/installer-server.test.ts +14 -11
  292. package/tests/installer-windows-diagnostics.test.ts +4 -5
  293. package/tests/isolated-config-home.ts +28 -0
  294. package/tests/jobs-view.test.ts +260 -6
  295. package/tests/jobs-widget.test.ts +25 -37
  296. package/tests/keymaps-customize.test.ts +114 -0
  297. package/tests/keymaps.test.ts +103 -0
  298. package/tests/maintainer/mcp-status.maintest.ts +88 -0
  299. package/tests/maintainer/pi-update-source.maintest.ts +116 -0
  300. package/tests/modal-mouse-boundaries.test.ts +136 -0
  301. package/tests/model-fallback-notice.test.ts +45 -0
  302. package/tests/model-fallback-policy.test.ts +83 -0
  303. package/tests/model-fallback-store.test.ts +111 -0
  304. package/tests/model-routing-authority.test.ts +178 -2
  305. package/tests/nan-provider.test.ts +4 -4
  306. package/tests/native-choice-list.test.ts +77 -2
  307. package/tests/native-review-capability-contract.test.ts +7 -1
  308. package/tests/native-review-cli.test.ts +269 -1
  309. package/tests/no-self-pause-contract.test.ts +22 -0
  310. package/tests/notification-customize.test.ts +58 -34
  311. package/tests/odd-routing-canonical-ratchet.test.ts +6 -6
  312. package/tests/odd-routing-contract.test.ts +1 -1
  313. package/tests/orchestrator-budget.test.ts +7 -2
  314. package/tests/orchestrator-delegation-mode.test.ts +153 -0
  315. package/tests/orchestrator-fallback.test.ts +82 -0
  316. package/tests/orchestrator-mode-policy.test.ts +175 -0
  317. package/tests/orchestrator-prompt-budget.test.ts +133 -0
  318. package/tests/orchestrator-rdd-ownership.test.ts +2 -2
  319. package/tests/package-manifest.test.ts +169 -14
  320. package/tests/pasted-image-paths.test.ts +118 -0
  321. package/tests/permission-allowlist.test.ts +202 -0
  322. package/tests/persona-reply-language.test.ts +20 -1
  323. package/tests/pi-update-launcher.test.ts +40 -8
  324. package/tests/pi-update-source.test.ts +162 -0
  325. package/tests/pnpm-workspace-config.test.ts +58 -0
  326. package/tests/primary-session-prompt.test.ts +13 -0
  327. package/tests/profile-fast-tier.test.ts +311 -0
  328. package/tests/profile-pin.test.ts +29 -2
  329. package/tests/profile-tier-footer.test.ts +84 -0
  330. package/tests/profiles-panel-delegation-mode.test.ts +422 -0
  331. package/tests/questionnaire-view.test.ts +265 -0
  332. package/tests/quiet-bash-runtime.test.ts +1 -1
  333. package/tests/quiet-tool-rendering.test.ts +48 -0
  334. package/tests/rdd-aware-verification-contract.test.ts +16 -11
  335. package/tests/rdd-customize.test.ts +287 -0
  336. package/tests/rdd-mode-cache.test.ts +450 -0
  337. package/tests/rdd-mode-control.test.ts +407 -0
  338. package/tests/rdd-mode-scope-regression.test.ts +137 -0
  339. package/tests/rdd-off-independent-regression.test.ts +69 -0
  340. package/tests/rdd-status-line.test.ts +18 -0
  341. package/tests/render-cache-performance.test.ts +171 -2
  342. package/tests/reply-language-anchor.test.ts +173 -0
  343. package/tests/review-agent-end-preflight.test.ts +1 -1
  344. package/tests/review-blocker.test.ts +193 -0
  345. package/tests/review-candidate-owner-retry.test.ts +1 -1
  346. package/tests/review-candidate-owner-sweep.test.ts +93 -0
  347. package/tests/review-candidate-symlink-scan.test.ts +157 -0
  348. package/tests/review-candidate-view.test.ts +52 -1
  349. package/tests/review-candidate-windows-boundary.test.ts +131 -0
  350. package/tests/review-candidate-windows-probe.test.ts +63 -0
  351. package/tests/review-committed-restart-ack.test.ts +129 -0
  352. package/tests/review-continuation-registry.test.ts +76 -0
  353. package/tests/review-controller-native-routing.test.ts +381 -11
  354. package/tests/review-controller-workspace-root.test.ts +230 -3
  355. package/tests/review-controller.test.ts +96 -11
  356. package/tests/review-coordinator-runtime.test.ts +117 -0
  357. package/tests/review-coordinator.test.ts +195 -0
  358. package/tests/review-failure-facts.test.ts +87 -0
  359. package/tests/review-gate.test.ts +24 -0
  360. package/tests/review-host-relay-routing.test.ts +258 -4
  361. package/tests/review-host-relay.test.ts +39 -0
  362. package/tests/review-inspect-preflight.test.ts +197 -0
  363. package/tests/review-integration-v2-forward.test.ts +59 -0
  364. package/tests/review-integration-v2.test.ts +46 -3
  365. package/tests/review-json-arguments.test.ts +65 -10
  366. package/tests/review-last-event-closure.test.ts +68 -0
  367. package/tests/review-loadout-rdd-off-sdk.test.ts +65 -31
  368. package/tests/review-owner-identity.test.ts +60 -24
  369. package/tests/review-relay-phase-timing.test.ts +128 -0
  370. package/tests/review-relay-transport-agent.test.ts +12 -2
  371. package/tests/review-repository.test.ts +52 -1
  372. package/tests/review-reviewer-evidence.test.ts +183 -0
  373. package/tests/review-risk-assessment.test.ts +74 -3
  374. package/tests/review-session-standing-permission-controller.test.ts +21 -1
  375. package/tests/review-sidebar-state.test.ts +5 -5
  376. package/tests/review-start-context.test.ts +19 -0
  377. package/tests/review-tool-prose-budget.test.ts +121 -0
  378. package/tests/run-test-suite.test.ts +183 -6
  379. package/tests/runtime-harness.mjs +4 -1
  380. package/tests/sensitive-path-tools.test.ts +250 -0
  381. package/tests/session-profile-append-controller-pi.test.ts +60 -31
  382. package/tests/session-profile-append-controller.test.ts +63 -0
  383. package/tests/session-profile-authority.test.ts +259 -0
  384. package/tests/session-profile-binding.test.ts +34 -1
  385. package/tests/session-profile-disk-reader-pi.test.ts +58 -16
  386. package/tests/session-profile-extension.test.ts +615 -0
  387. package/tests/session-profile-freeze.test.ts +110 -2
  388. package/tests/session-profile-integration.test.ts +857 -0
  389. package/tests/session-profile-persistence.test.ts +57 -0
  390. package/tests/session-profile-v1-compat.test.ts +255 -0
  391. package/tests/shell-bar.test.ts +274 -72
  392. package/tests/shell-card.test.ts +13 -1
  393. package/tests/shell-page.test.ts +108 -0
  394. package/tests/shell-panel.test.ts +360 -0
  395. package/tests/shell-prompt.test.ts +54 -0
  396. package/tests/shell-render-cache.test.ts +5 -0
  397. package/tests/shell-sidebar-fullscreen.test.ts +13 -1
  398. package/tests/shell-sidebar-layout.test.ts +447 -44
  399. package/tests/shell-sidebar-scroll-benchmark.test.ts +1 -1
  400. package/tests/shell-stats.test.ts +90 -0
  401. package/tests/shell-surface-transparent.test.ts +89 -0
  402. package/tests/shell-todo.test.ts +12 -0
  403. package/tests/shell-usage.test.ts +14 -0
  404. package/tests/skill-registry.test.ts +902 -2
  405. package/tests/star-prompt.test.ts +470 -0
  406. package/tests/startup-banner.test.ts +209 -2
  407. package/tests/startup-home-repo.test.ts +2 -0
  408. package/tests/support/review-coordinator-runtime.ts +69 -0
  409. package/tests/task-size-routing-contract.test.ts +50 -4
  410. package/tests/verifier-admission.test.ts +49 -0
  411. package/tests/verifier-settle-reminder.test.ts +281 -0
  412. package/tests/verify-first-launch-contract.test.ts +134 -8
  413. package/tests/verify-installer-tap.test.ts +57 -0
  414. package/tests/vim-editor-adapter.test.ts +2 -2
  415. package/tests/visual-customization-policy.test.ts +95 -8
  416. package/tests/visual-customize-view.test.ts +818 -9
  417. package/tests/visual-layout-preview.test.ts +42 -0
  418. package/tests/visual-profiles.test.ts +11 -0
  419. package/tests/voice-worker.test.ts +73 -2
  420. package/tests/windows-session-bootstrap.test.ts +105 -2
  421. package/tests/windows-session-transport.test.ts +126 -0
  422. package/tests/work-continuity-contract.test.ts +114 -0
  423. package/tests/writer-feature-document-admission.test.ts +92 -0
  424. package/tests/writer-surfaces.test.ts +12 -10
  425. package/tests/yolo-customize.test.ts +57 -15
  426. package/tests/yolo-mode-runtime.test.ts +4 -2
  427. package/tests/yolo-mode.test.ts +39 -20
  428. package/tests/yolo-session-policy.test.ts +270 -1
@@ -6,11 +6,27 @@ For development, use [ODD and feature recovery](readme-reference.md#organic-driv
6
6
 
7
7
  Source map: [shell extension](../extensions/gentle-shell.ts), [shell bar](../lib/shell-bar.ts), [changes model](../lib/shell-changes.ts), [changes view](../lib/shell-changes-view.ts), [usage model](../lib/shell-usage.ts), [usage view](../lib/shell-usage-view.ts), [agents extension](../extensions/gentle-agents.ts), and [agent runner](../lib/agents-runner.ts).
8
8
 
9
+ ## Web and product design guidance
10
+
11
+ Use `/skill:gentle-ui-design` for web and product interface guidance or a read-only critique. Ask it, for example, to improve how people find and compare records or to assess a narrow-screen layout. It works with the current project's design system and adds no validation hooks. When you ask for HTML canvas artboards, `gentle-design` owns the delivery and pairs with this skill for UX quality; use `gentle-ai-tui-design` for terminal interfaces.
12
+
13
+ ## Terminal program identity
14
+
15
+ `gentle-shell` identifies as `gentle-shell` in native OSC 7501 reports, so terminals and dashboards can distinguish it from plain Pi. The launcher sets `PI_PROGRAM_STATUS_APP=gentle-shell`; the bundled `gentle-program-identity` extension consumes it even when Pi itself does not. Ordinary Pi sessions without that marker, delegated children, RPC, JSON and print modes are unchanged. `PI_PROGRAM_STATUS=1|0` still controls whether the native terminal sends reports.
16
+
17
+ The extension wraps only the active terminal instance's `setProgramStatus`, preserving Pi's states and messages. Pi can emit an initial `pi` report before extensions load; the extension immediately replays its cached native status with the corrected identity, without waiting for a prompt. The wrapper and guarded startup-cache replay are compatibility adaptations, not an official Pi identity hook; shutdown, reload and session replacement release the wrapper without overwriting later extensions. If a terminal has no compatible cached status, correction begins with its next native report. Disabling this extension removes the fallback on Pi versions that ignore the variable. This changes reported identity, not Herdr's resume-command configuration.
18
+
9
19
  ## Updating Pi safely
10
20
 
11
21
  Run `gentle-shell update` to update the Pi this launcher runs. It also works when that Pi is older than the required minimum version, which every other command refuses. Shell verifies npm/pnpm global listing JSON and canonical package roots before installing exactly one supplying package. This supports pnpm v11 linked stores without relying on `PNPM_HOME` containment. When the launcher runs its adjacent Pi peer, the supplier is the listed `gentle-pi` package itself: Shell is reinstalled at its current version so the package manager re-resolves the peer, because updating a separate global Pi never changes the peer a Shell install runs. A main-channel Shell (`<version>-main.<sha12>`) is never published, so it is reinstalled from the tarball `gentle-shell upgrade --channel main` packed under `<config home>/main/packages/` (an absolute `GENTLE_PI_CONFIG_HOME`, else `~/.pi/gentle-ai`; a relative override is refused); when that tarball is missing, `update` installs nothing and names the rebuild path (`gentle-shell upgrade --channel release`, then `--channel main`), because `upgrade --channel main` alone is a no-op when already at the latest main. A Pi found on `PATH` or through `GENTLE_SHELL_PI` is updated through its own listed global package; a package-manager shim is followed to the single `cli.js` it names. Pi and Shell are never combined into a comma install.
12
22
 
13
- Unknown or ambiguous ownership, npm source/link packages, and pnpm groups shared with other top-level packages refuse without installation changes. Separate groups in one aggregated listing are allowed. After the install, Shell reads the supplied Pi version back from a fresh listing and reports whether it changed. pnpm installs only releases older than its `minimumReleaseAge` setting (pnpm 11 defaults to 4320 minutes), so a very recent Pi release is picked up once it is old enough; Shell reports that rule instead of overriding it. Package managers run from the system temporary directory so a project's `packageManager` pin never changes which pnpm answers. Use the supplying package manager for source checkouts or unsupported layouts. `gentle-shell update --extensions-only` remains an extension-only Pi command; prefix-bundled Pi still updates with `gentle-shell upgrade`, or with `gentle-shell update --latest` to the newest published Pi without the release's verified lockfile (after a warning that features relying on audited Pi internals, such as the Vim editor, may turn off; `upgrade` never downgrades it afterwards). See [managing packages](readme-reference.md#managing-packages) for the ownership contract.
23
+ The global installer resolves an exact latest stable Pi after consent when it must install Pi or update an older owned Pi; compatible existing installations are left alone. Its setup-recovery check still accepts only the legacy verified recovery pin, so an interrupted setup after a newer Pi was installed cannot use automatic recovery.
24
+
25
+ A source-linked Shell uses a separate local route: the exact listed Shell link and selected adjacent Pi must resolve to the checkout. A single-project Git checkout needs an exact `npm@x.y.z` or `pnpm@x.y.z` `packageManager` declaration and a compatible manager on PATH: pnpm may match or exceed the declared version; npm must match its pin. pnpm's `--pm-on-fail=ignore` keeps the checked newer manager instead of downloading the older project pin, without changing the declaration or release-age/security policy. Bundled installations continue to use their own contained manager; source checkouts do not borrow an unverified manager from another prefix. The checkout also needs a direct registry Pi dependency, and exactly one matching lockfile (`package-lock.json` or `pnpm-lock.yaml`). `update` runs a named, range-respecting local update with `--no-save` and lifecycle scripts disabled, preserving the global Shell link and declared ranges. Its Pi/transitive lockfile graph may change. pnpm's metadata cache and minimum-release-age policy still apply: an unchanged version is reported without clearing caches or overriding that policy. The checkout's adjacent Pi is read back after installation; an unreadable version is reported, never invented. Root-only `pnpm-workspace.yaml` configuration is allowed only when the pinned manager's read-only selectors and recursive project listing prove that the checkout is the sole project. Its release-age/security settings are loaded normally, never ignored, and its bytes must remain unchanged. Declared multi-project or ancestor workspaces, conflicting/missing lockfiles, linked manifests/lockfiles and installed Pi source-checkout overrides (including `npm link` without a manifest change) refuse before installation; resolve these layouts manually rather than deleting a lockfile blindly.
26
+
27
+ Unknown or ambiguous ownership, unsupported source/link packages, and pnpm global groups shared with other top-level packages refuse without installation changes. Separate groups in one aggregated listing are allowed. After the install, Shell reads the supplied Pi version back from a fresh listing and reports whether it changed. pnpm installs only releases older than its `minimumReleaseAge` setting (pnpm 11 defaults to 4320 minutes), so a very recent Pi release is picked up once it is old enough; Shell reports that rule instead of overriding it. Global listings, version probes and global installations run from the system temporary directory so the current project's `packageManager` pin never changes which pnpm answers. Only a verified source update runs from its checkout. Use the supplying package manager for unsupported layouts. `gentle-shell update --extensions-only` remains an extension-only Pi command. Prefix-bundled `gentle-shell update` selects the newest published stable Pi (`--latest` is an alias), without the release's verified lockfile; it warns that features relying on audited Pi internals, such as the Vim editor, may turn off. A later Shell `upgrade` keeps a newer Pi and warns when it must install without the new release's lockfile. Explicit extension pins stay pinned; `--all` also forwards extension updates. Managed Pi self updates reject `--force`. See [managing packages](readme-reference.md#managing-packages) for the ownership contract.
28
+
29
+ For Pi packages, run `gentle-shell update --extensions`. The bundled Shell-managed `gentle-engram` uses an unversioned package source, so Pi's existing startup notice lists it when a newer version is available; opening Shell does not automatically update it. An older Shell-owned `0.4.2` registration is migrated without an install, while linked/foreign homes, other versions and unrelated pinned packages are left selected. This updates the Pi package, not the native Engram executable.
14
30
 
15
31
  When the install fails, `update` names the package manager and the exact command it ran, then one sanitized line of that manager's own output. That line is the last error line (`Error:` or an `ERR_` code) in its stdout or stderr, stderr's when both have one, because npm prints its error on stderr while pnpm 11 prints `ERR_PNPM_*` on stdout. A warning on stderr never hides that error. Without any error line, it is the last line of stderr, else of stdout. Terminal escapes and control characters are removed, your home directory becomes `~`, and the line is at most 300 characters. For example:
16
32
 
@@ -28,29 +44,63 @@ The [v2.6.0 release](https://github.com/Gentleman-Programming/gentle-pi/releases
28
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.
29
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.
30
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.
31
- - Named `/gentle:profiles` atomically route the orchestrator separately from packaged and review roles; 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.
32
48
 
33
- The source checkout prepares `gentle-pi` `4.0.0` with a package-local Gentle AI `v4.3.1` pin; this does not imply that the package release has been published.
49
+ The source checkout prepares `gentle-pi` `4.0.0` with a package-local Gentle AI `v4.4.0` pin; this does not imply that the package release has been published.
34
50
 
35
51
  ## Shell interactions and runtime behavior
36
52
 
37
53
  Gentle Shell is the Pi workspace experience provided by the `gentle-pi` package. It follows the Gentle themes: one border language, rose for whatever is alive.
38
54
 
55
+ ### Modal mouse controls
56
+
57
+ In fullscreen, visible click targets use the shared orange hover role (`warning` in the active theme). Hover is presentation only: it does not run a command, change a setting, choose an answer, or stop a job. Keyboard navigation remains available.
58
+
59
+ | Surface | Mouse behavior |
60
+ | --- | --- |
61
+ | `/gentle:customize` | Click a category, setting row or value. Clicking a value applies it; compact `‹`/`›` arrows follow the same immediate or preview-first behavior as the keyboard arrows. Confirmations still require an explicit click on `y yes` (or the `y` key); click `cancel` to decline when visible. |
62
+ | `/gentle:commands` | Click a visible command to run it; use the wheel to navigate the filtered list. Headers and clipped rows are not targets, and mouse activation is disabled during shortcut capture. |
63
+ | `/gentle:jobs` | Click a visible job to select it, and use the visible list/details, Stop and close controls. Stop applies only to a currently running job; hovering never changes the selected job or stops it. |
64
+ | Questionnaires and response selectors | Existing option clicks keep their single-select, multi-select and custom-answer behavior; selectable labels now use the same hover role. Questionnaire tabs remain keyboard-controlled. |
65
+
66
+ Moving to blank space inside a modal, keyboard navigation, resizing and disposal clear its hover. Native centered-overlay routing does not deliver motion outside the card, so the previous highlight can remain until the pointer returns or the view changes. Hover also depends on the terminal forwarding motion events; clicks remain usable when a multiplexer does not forward plain motion.
67
+
68
+ In regular mode the terminal owns mouse input, so use the keyboard instead. Review-consent dialogs are not changed by these modal controls.
69
+
39
70
  ### Fullscreen layout
40
71
 
41
- At 140 columns or wider, fullscreen defaults to a live header over a transcript-and-rail split, both driven by [`lib/shell-sidebar-layout.ts`](../lib/shell-sidebar-layout.ts):
72
+ Open `/gentle:customize` → **Layout** to adjust placements, spacing and task-summary publishing:
73
+
74
+ - **Task summary:** `on` (the default) or `off` controls the active-task summary published to terminal tools, such as Herdr's sidebar. Highlighting a choice does not save it; Enter or Space saves and applies it now. The `enabled` preference lives in `herdr-task-summary.json` in the Gentle Pi config home, separate from visual profiles. Existing colors are preserved; malformed or unreadable files are not overwritten. This does not edit Herdr config or hide the local Todo list.
75
+ - **Header:** `top` (the default) puts the full-width status bar above both the conversation and the rail. `below-input` puts it below the editor; beside a rail it becomes a full-width row below both columns. `split` puts a title above the conversation and a status bar below it.
76
+ - **Status:** `auto` and `right` use the rail at 140 columns or wider; `bottom` removes the rail and keeps the Status sections available through `[ Panel ]`; `hidden` suppresses Status. This controls the rail and its fallback, not an independent position for every bar.
77
+ - **Density:** `comfortable` adds spacing around the bars and between rail sections. `compact` removes those gaps except between transparent float cards; `minimal` also removes gauges and usage shortcut hints from the fullscreen bars while retaining their values when space permits.
78
+
79
+ At 140 columns or wider the placements share the split status bar's design. In single `top` or `below-input` bars, the project folder and its abbreviated path join the branch when there is room; the project identity yields before the live model and counters. Split shows the project identity only in its title row. The bar carries branch and dirty count, the permission mode with its icon (`🔥 YOLO`, `💥 SUPER-YOLO`, which replaces the YOLO banner), then model · effort, context, cost and usage. Comfortable centers the bar between two margin rows on the chrome surface; compact and minimal draw the bar row alone. Beside the rail, the top header spans the terminal above both columns; the rail and its separator begin below the complete header, with one blank row before the first rail section in every density and card style. On tinted surfaces that row continues the rail background; on transparent surfaces it stays unpainted and separates the first card from the header. The titled-rule editor keeps one margin row under the input. Without the rail the bars also count the running jobs, Agents and Todos keep their cards above the editor, and Changes keep their own row. Status at the bottom differs from hidden by the editor's `[ Panel ]` button, which opens the Status sections as `/gentle:panel` does; neither shows the integrations. Below 140 columns the same placement choices remain distinct: top and below-input each draw one shared identity and status bar at the chosen edge, while split keeps a title above the conversation and a status bar below the editor.
80
+
81
+ At 140 columns or wider, fullscreen with the split header draws an IDE inside the terminal (design: [`design/shell-rework`](../design/shell-rework/02-proposal.html)), driven by [`lib/shell-sidebar-layout.ts`](../lib/shell-sidebar-layout.ts):
42
82
 
43
83
  ```text
44
- ✿ Gentle Shell ⟡ ~/work/gentle-pi main ⟡ gpt-5.5 · medium · team ctx ▰▰▰▰▱▱▱▱ 45% ⟡ $9.49 sub
84
+ ✿ gentle-pi ~/work/gentle-pi fleet adopt
85
+ … transcript … ▾ TODOS 2/6
86
+ ✓ 2 done
87
+ ◐ Run the full suite
88
+ └ job-1
89
+ ─ ✿ waiting for input ───────────────── INSERT ─ ▾ AGENTS 3 running · 1 waiting
90
+ › type, or / for commands …
91
+ main ±3 │ SUPER-YOLO gpt-5.5 · medium · claude (session) │ ctx ▰▰▰▰▱▱▱▱ 45% │ $9.49 sub │ usage · alt+u
45
92
  ```
46
93
 
47
- - The header carries live session data: session identity on the left (brand, cwd, branch, dirty count, model · effort · profile) and the two live counters right-aligned (the context gauge and session cost). The effort reads `auto` for NaN models that manage their reasoning depth themselves (DeepSeek V4 Flash, Qwen 3.8 Flash, MiMo), with a one-time notice explaining that the selected level does not change the depth. It never shows the working/thinking state or extension statuses — those stay in the prompt indicator and the Status surface. When the terminal is too narrow for everything, segments give way in a fixed order — profile, then effort, then the whole cwd/branch/dirty group — before the counters are touched; below that, only the brand survives, and below that the header renders nothing.
48
- - The right rail scrolls **Status → Jobs → Agents → TODO**. Cards cache their rendered content until their own digest or an explicit invalidation changes. `neon` keeps the rounded border and accent title; `float` uses a tone background, a full-height `▎` accent, one-column transparent margins, painted padding above and below, and a blank painted separator between heading and body. Warning/error/success panels retain their tone colors.
49
- - The Status card carries Project (cwd, branch, session name, active profile), Changes, and Integrations (other extensions' statuses); its live digest detects changes without requiring an event. Model, effort, context, cost, and the per-model usage table live in the header instead — the header ticks every frame, so duplicating them in a card would just make that card repaint every frame too.
50
- - Gentle Agents follows TODO: while the fullscreen rail is showing, the Agents card moves into it and lists every shown task; without the rail (narrow fullscreen or regular mode) it stays above the editor. Its card has fixed right-aligned columns for `model · effort`, tokens, cost, and elapsed, each sized to the widest value among the shown tasks — so the numbers line up vertically even when one row's values are much shorter than another's. A queued task fills only the elapsed column with the word `queued`, leaving the other columns blank rather than overwriting the row.
51
- - The sidebar reuses its last frame until something it paints changes, so silent frames stay cheap; a per-section cache means one card's changing digest (or the header's) never forces an unrelated card to redraw.
52
- - Header placement is configurable. Above input, the float header has a full-width background, painted padding above and below its content, and a transparent `▔` bottom edge. Below input, the float footer groups Changes (when the session's roots have uncommitted work), header data, and locally owned integration statuses under one upper edge; it never duplicates statuses owned by the rail.
53
- - Below 140 columns, fullscreen has no sidebar. A configured top header owns the narrow status surface; otherwise the bottom bar owns it, unless Status is hidden. The Agents and TODO cards then return above the editor. Regular mode keeps the compact one-line bottom bar and the above-editor Agents widget, without a fullscreen header or sidebar.
94
+ - **Title row.** The project name and path once, and the session name on the right; when space runs out the path gives way first. The effective agent profile (with its source suffix, `claude (session)`) follows the model and effort in the status bar (`claude-opus-5-5 · high · claude (session)`), giving way before the usage does, and opens the rail's Stats section (`profile claude (session)`); Integrations no longer lists it. On a phone with split selected, the title row carries the model, effort and profile, since the narrow status bar leaves them out.
95
+ - **Page.** With a light theme (`appearance: "light"`) the fullscreen frame is painted on a paper background with the theme's text color, so a dark terminal never shows through the conversation, the gaps or the column beside the rail. Dark themes keep the terminal background. In Ghostty, set `window-padding-color = extend` so the window padding takes the same color.
96
+ - **Rail.** One tinted panel (the theme's `customMessageBg`) that runs to the bottom of the screen, not a stack of cards. Sections have a one-row header (`▾ NAME … count`, a click on it collapses the section) and dense rows, live work first: **Todos → Jobs → Agents → Changes → Review → Integrations**, with no key hints row: the Todos header shows its collapse key, small and dim, before the count (`▾ TODOS ctrl+shift+t 2/6`), and the bars carry the usage key outside minimal density. Finished todos fold into `✓ N done`; the task in progress (or blocked) wraps its title and note in full, the note hanging under it (`└ job-1`); other tasks take one clipped row. Agents list one row per agent with the task first, the agent kind, tokens and elapsed, ordered by what needs you (asking, running, queued, failed), finished agents folded into `✓ N done · /gentle:agents`, at most eight rows before `… N more`; a click on an agent row opens `/gentle:agents`. Every section header folds its section on a click (Changes, Review and Integrations too), and the Changes row opens `/gentle:changes`; hovering a control paints it in the shared hover role. Changes shows `N files` with `+added −deleted` or `clean`; Review appears only with current-session RDD evidence and says `needs you` on consent; With the `stats` section on (the Power user preset turns it on; Customize → Sections toggles it), a **Stats** section sits before Integrations: what the session spent, input/output tokens, cache hit rate and reads, tool calls with failures, what started subagents spent (runs · tokens · cost, from the Agents section), the span from the first to the last entry, and one row per model (turns · tokens · cost), most expensive first, with the numbers on their own row when the rail is too narrow. Integrations lists other extensions' statuses and says what the permission mode means without repeating it. An idle section keeps one muted row with the command that opens it. The panel is the same in every card style; `neon` and `float` dress transcript cards.
97
+ - **Status bar.** One full-width row under the transcript and the rail: branch and dirty count, a non-default permission mode once (with its banner icon: `🔥 YOLO`, `💥 SUPER-YOLO`), then model · effort, tier and profile, context, cost and subscription usage (clicking `usage` opens `/gentle:usage`). A long branch shortens to leave room for those values and the permission or job badges. The profile gives way before usage; usage then degrades from gauges to secondary windows to the segment before the model and counters. At very narrow widths not everything can fit.
98
+ - **Editor.** A titled rule `─ ✿ <state> ──── <vim mode or esc hint> ─` above the input, which sits behind a `›` prompt with no frame; the state scans while the agent works and shows the ODD phase. In mobile/minimal fullscreen chrome, `[ Panel ]` appears on that rule and opens `/gentle:panel` even without live work or Vim; it and individual agent rows use the shared hover role to signal their click targets. Owned shell controls and unhandled transcript or blank-space motion clear the previous shell hover; arbitrary handled third-party components do not guarantee a leave notification. Row count, cursor, selection, autocomplete and mouse geometry stay native. When a subagent asks you a question (a dialog relayed to this session), a row above the editor says so: `? explore asked: Which file? … /gentle:agents`.
99
+ - The sidebar reuses its last frame until something it paints changes, so silent frames stay cheap; a per-section cache means one section's changing digest (or the header's) never forces an unrelated section to redraw.
100
+ - **Mobile and minimal.** Below 140 columns (including the **Light** preset, Status at the bottom), fullscreen uses the titled-rule editor and `[ Panel ]` for every header placement. Top puts one identity and status bar above the conversation; below-input puts that bar below the editor; split keeps the mobile title above and a status bar below (design: [`05-mobile`](../design/shell-rework/05-mobile.html)). Split's title carries the model, while its status bar keeps branch, permission mode, running jobs (`⧗ 1 job`), context and cost. Live work folds into one row drawn inside the editor, right above its rule — the current todo with `done/planned`, or the agents while they run (`◐ 3 agents · ? 1 waiting · ✗ 1 … 2/6 todos`) — replacing the Todos and Agents cards. Tapping that row opens `/gentle:agents` while the agents lead it (a subagent running or failed); otherwise the tap, like `/gentle:panel` at any width, opens the rail's sections as a full-width sheet hanging from the top; it leaves the bottom rows to the work row, the editor and the status bar, shows only the sections the rail would show (the Todos switch included), and holds the keyboard while open: `↑`/`↓` (or `j`/`k`) or the wheel scroll it, and `esc` (or `q`, or a click on `esc back`) closes it. The work row's `▸` lights up under the pointer to show it is clickable. A subagent question keeps its row above the editor on a phone too.
101
+ - **Surface.** Layout → Surface `transparent` (the default) leaves the rail panel, the title row, the status bar and the `/gentle:panel` sheet unpainted, and the float style's header card background (its margins stay), so a terminal background image or translucency shows through and the elements float; there the rail draws every section (Todos, Jobs, Agents, and each Status section: Changes, Review, Stats, Integrations) as its own card with the conversation cards' renderer, so it follows Customize → Cards live: in `neon` the section title and count sit in the card's rounded top rule (`╭─ ▾ AGENTS ──── idle ╮`), in `float` the card is tinted with its accent bar, and float cards always keep one blank row between them so they never fuse, whatever the density. A click anywhere on a card's title row folds the section like its header and hovering it paints the title in the hover role, as on the panel headers; body rows keep their own clicks. `tinted` paints them with the theme's `customMessageBg`. Apart from the float-card gap, density controls spacing; section headers stay bold, and hover keeps its color. It is stored as `surface` in `visual-customization.json` (and saved profiles) only when tinted; Gentle Shell versions older than this one reject a file that stores it and fall back to the defaults.
102
+ - **Density.** Comfortable spaces the rail sections and adds margin rows around the chrome bar; compact removes those gaps except between transparent float cards and keeps the gauges and usage shortcut hint. Minimal also removes the fullscreen context and usage gauges and usage shortcut hint, while keeping percentages, cost and the clickable usage label when they fit; it drops the brand where present. The Todos shortcut remains in its header. Pi owns the spacing between transcript messages, so density does not change it.
103
+ - Header placement is configurable. Beside the rail every placement's bar shows the permission mode with its icon, so the rail never repeats the raw mode statuses in Integrations and adds no Session section. Below input, beside the rail, the bar is the full-width bottom row like split's status bar, and the editor keeps its gap from the rail. At wide widths without the rail, a below-input float footer can group Changes (when the session's roots have uncommitted work) and header data under one upper edge. On mobile the chrome bar and Changes keep separate rows, and live Agents and Todos fold into the work row even with Status hidden. Integrations show only in the rail (and the `/gentle:panel` sheet), never in a bar. Regular mode keeps the compact one-line bottom bar and the above-editor Agents widget, without a fullscreen header or sidebar.
54
104
 
55
105
  The regular-mode compact bar replaces pi's three-line footer with a single line of segments:
56
106
 
@@ -60,10 +110,11 @@ The regular-mode compact bar replaces pi's three-line footer with a single line
60
110
 
61
111
  - Context is a gauge, not a number. It turns amber at 80% and red at 95%; after compaction it shows `?%` until the next response.
62
112
  - Cost carries `sub` when the active model runs on a subscription login.
113
+ - `pi-claude-bridge` records every turn at $0, so a `claude-bridge` turn is priced at the Anthropic list price of the same model when it ends. The cost (shown with `sub`), the Stats section and `/gentle:stats` then show what those tokens would cost on the API, not what the subscription bills. Subagents price their `claude-bridge` turns the same way, so the Stats `agents` row adds them to subagents on other providers. Sessions recorded before this stay at $0.
63
114
  - Statuses other extensions publish through `setStatus` are appended as trailing segments; the session name sits at the right edge.
64
115
  - On narrow terminals the session name is dropped first, then trailing segments, before the line is truncated.
65
116
 
66
- The prompt follows the selected card style. `neon` keeps pi's editor in its rounded frame:
117
+ Outside the fullscreen IDE chrome, the prompt follows the selected card style. `neon` keeps pi's editor in its rounded frame:
67
118
 
68
119
  ```text
69
120
  ╭─ ✿ working ──────────────────────────────────────────╮
@@ -88,7 +139,8 @@ While a draft holds chips, a strip above the prompt lists each one:
88
139
 
89
140
  - **Preview:** terminals with an image protocol (Kitty, Ghostty, WezTerm, Warp, iTerm2) draw a small thumbnail under each label while the agent is idle. While it works, and in terminals or multiplexers that hide the protocol (such as tmux), the label alone is shown, so streaming never re-sends the image to the terminal.
90
141
  - **Clipboard sources:** the native clipboard on macOS and Windows; `wl-paste` or `xclip` on Linux. On WSL, a Windows screenshot (`Win+Shift+S`) is read from the Windows clipboard through `powershell.exe`, because the Linux clipboard never receives it.
91
- - **What stays Pi's:** files copied in a file manager, text, and image formats other than PNG, JPEG, WebP and GIF go through Pi's own paste handler unchanged.
142
+ - **Pasted paths:** an image that arrives as a file path also becomes a chip. Herdr's desktop app and `herdr --remote` hand a clipboard image to a terminal on another machine as a temp file and paste its path (`herdr-paste-*.png`, `client-N-clipboard-*.png`); dropping images on a Herdr pane, or copying image files in a file manager, pastes quoted paths. Up to eight paths are read from the file itself, with spaces, `~` and `file://` forms. A paste that is not made only of image paths still goes through Pi unchanged.
143
+ - **What stays Pi's:** text, other files copied in a file manager, and image formats other than PNG, JPEG, WebP and GIF go through Pi's own paste handler unchanged.
92
144
  - **Models without image input:** the strip warns before you send. If you send anyway, each chip becomes `[Image#N omitted: the current model does not accept images]` and a notice explains why, so nothing is dropped silently.
93
145
  - **Numbering:** numbers keep counting up for the whole session, so a chip recalled from prompt history never points at a newer image. A recalled chip is plain text; paste the image again to attach it.
94
146
  - **Sending while the clipboard is read:** reading the Windows clipboard on WSL takes about a second. If you send the message before it finishes, the image is discarded with a notice instead of landing in the next draft; paste again to attach it.
@@ -117,7 +169,7 @@ Changes shows the **current Git state** — working tree against HEAD, untracked
117
169
 
118
170
  ### Bounds and session lifetime
119
171
 
120
- Changes lists every changed file outside the untracked dependency-backup exclusion without a count limit. One selected diff is bounded at 1 MiB or 20,000 lines; beyond that the panel shows "Diff too large — press o to open in editor."
172
+ Changes lists every changed file outside the untracked dependency-backup exclusion without a count limit. One selected diff is bounded at 1 MiB or 20,000 lines; beyond that the panel shows "Diff too large — press o to open in editor." If Git times out, partial diff output is discarded and the pane shows "no diff for this file"; press `o` to inspect the file in the editor.
121
173
 
122
174
  Captured evidence (`gentle-pi.session-change/v1`) is still stored for session statistics and root discovery, capped at 256 operations and 4 MiB per session, without affecting the Changes list. Reload and resume read the same state from Git; new sessions and forks do not inherit another session's worktrees.
123
175
 
@@ -135,7 +187,34 @@ Captured evidence (`gentle-pi.session-change/v1`) is still stored for session st
135
187
 
136
188
  ### Command palette
137
189
 
138
- `/gentle:commands` or `alt+k` opens a curated, grouped command menu, OpenCode-style — not a raw listing of every registered extension command. Entries are grouped under Configuration, Session, Diagnostics, and Skills, each shown by a human label with its shortcut hint where it has one; a command only appears when it is both in the curated set and actually registered. The Search row filters by label, by the underlying command name, and by description; arrows or `ctrl+j`/`ctrl+k` move, enter runs the highlighted entry exactly as if its command had been typed, escape closes. `GENTLE_PI_COMMANDS_KEY` rebinds the shortcut; `off` disables it. Built-in Pi commands are not listed. The default is `alt+k`, not `ctrl+k`, because Pi reserves `ctrl+k` for the editor's delete-to-line-end action.
190
+ `/gentle:commands` or `alt+k` opens a curated, grouped command menu, OpenCode-style — not a raw listing of every registered extension command. Entries are grouped under Configuration, Session, Diagnostics, and Skills, each shown by a human label with its current key where it has one (a key saved but not yet applied reads `(reload)`); a command only appears when it is both in the curated set and actually registered. The Search row filters by label, by the underlying command name, and by description; arrows or `ctrl+j`/`ctrl+k` move, enter runs the highlighted entry exactly as if its command had been typed, `tab` assigns a key to it (press the key next; escape cancels), escape closes. `GENTLE_PI_COMMANDS_KEY` rebinds the shortcut; `off` disables it. Built-in Pi commands are not listed. The default is `alt+k`, not `ctrl+k`, because Pi reserves `ctrl+k` for the editor's delete-to-line-end action.
191
+
192
+ ### Guided tour
193
+
194
+ `/gentle:guide` gives a guided tour of Gentle Shell, one step at a time, in the style of [driver.js](https://driverjs.com/). Each step is a popover beside the part of the screen it describes (the prompt, the sidebar or the middle of the screen) with a step counter and the command and key to try it.
195
+
196
+ - **With a model**, the agent drives the tour through its `gentle_guide` tool and explains each step in the chat. The popover never takes the prompt's focus: reply to continue, or ask anything and the agent answers before moving on.
197
+ - **Without a model**, or with `/gentle:guide local`, you step through it yourself: `→`, `Enter` or `Space` next, `←` back, `Esc` ends.
198
+ - `/gentle:guide stop` closes the tour at any point.
199
+
200
+ Steps only appear for features the session has (for example, Design only when `/gentle:design` is registered). The startup banner ends with a one-line reminder of `/gentle:guide` on every start, while the command exists.
201
+
202
+ ### Keymaps
203
+
204
+ Every Gentle shortcut, and any command in the palette, can get a key of your choice:
205
+
206
+ - `/gentle:customize` → **Keymaps** lists each action with its current key. `Enter` waits for the new key, `⌫` disables the key, `r` restores the default, and the last row reloads.
207
+ - In the command palette, `tab` assigns a key to the highlighted command.
208
+
209
+ Keys are saved in `keymaps.json` in the Gentle config home and **apply after `/reload`**, because Pi reads shortcuts only at startup and on reload; the shell says so after every change.
210
+
211
+ | Rule | Behavior |
212
+ |---|---|
213
+ | Typing keys | Only keys with `ctrl` or `alt` (with or without `shift`), or `f1`-`f12`, can be assigned. |
214
+ | Keys Pi reserves | Refused with the Pi action that owns them (for example `ctrl+k`, delete to line end). |
215
+ | A key another action uses | Asks first; confirming moves the key and leaves the other action without one. |
216
+ | Environment variables | A `GENTLE_PI_*_KEY` variable still wins; its row shows the variable and cannot be changed there. |
217
+ | Unreadable `keymaps.json` | The default keys apply, startup warns once, and the file is never overwritten. |
139
218
 
140
219
  To use `ctrl+p` like OpenCode, rebind Pi's `app.model.cycleForward` in `~/.pi/agent/keybindings.json` (Pi reserves that action, so an extension cannot take `ctrl+p` while it holds it) and set `GENTLE_PI_COMMANDS_KEY=ctrl+p`.
141
220
 
@@ -155,7 +234,7 @@ The panel rows a provider reports its windows with:
155
234
 
156
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.
157
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.
158
- - 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.
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.
159
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.
160
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:
161
240
 
@@ -209,17 +288,17 @@ Pick the conversation-card and shell-chrome style in `/gentle:customize` → **C
209
288
  ▎
210
289
  ```
211
290
 
212
- - `float` applies to tool, Code and 🌹 cards, Agent result and stale cards, the review preflight reminder, the dev-binary notice, and the Agents, Todos and Status panels. The prompt and fullscreen header/footer use their specialized float chrome described above. The regular-mode one-line Status bar is unchanged.
291
+ - `float` applies to tool, Code and 🌹 cards, agent tool cards, Agent answer and stale cards, the review preflight reminder, the dev-binary notice, and the Agents, Todos and Status panels. The prompt and fullscreen header/footer use their specialized float chrome described above. The regular-mode one-line Status bar is unchanged.
213
292
  - A theme without a tool background, or a card narrower than 10 columns, falls back to `neon`. A malformed `card-style.json` reads as `float` and the panel refuses to overwrite it.
214
293
 
215
294
  ### Card content
216
295
 
217
- Pick how much a collapsed quiet-tool card shows in `/gentle:customize` → **Cards** → **Card content**. The choice is saved in `card-content.json` in the Gentle Pi config home; a missing, malformed, or unreadable file reads as `default`, and a malformed file is never overwritten.
296
+ Pick how much a collapsed quiet-tool card shows in `/gentle:customize` → **Cards** → **Card content**. The choice is saved in `card-content.json` in the Gentle Pi config home; a missing, malformed, or unreadable file reads as `minimal` (the default), and a malformed file is never overwritten. Pick `default` for the result previews.
218
297
 
219
298
  | Level | Collapsed quiet-tool cards |
220
299
  |-------|----------------------------|
221
300
  | `default` | Result previews, counts, and summaries, as described above. Bash rows keep pi's native drawing. |
222
- | `minimal` | Only the command row for `read`, `write`, `bash`, `grep`, `find`, `ls`, and `edit`; the expand key still reveals the full result. Failed calls keep their bounded error tail. Bash rows draw as a Gentle card when the host supports `pi.registerToolRenderer`, with the bare command as the title. |
301
+ | `minimal` | Only the command row for `read`, `write`, `bash`, `grep`, `find`, `ls`, and `edit`; the expand key still reveals the full result. Failed calls keep their bounded error tail. Bash rows draw as a Gentle card when the host supports `pi.registerToolRenderer`, with the bare command as the title. Collapsed, that title is one row saying what the command does: its first line without leading `cd <dir> &&` hops, clipped to the row, with `… +N lines` when more lines fold behind it; expanding shows the whole command. |
223
302
 
224
303
  Quiet tool cards redraw immediately after a change; bash rows follow on new calls. Gentle AI cards keep their full card and elapsed time at both levels.
225
304
 
@@ -227,6 +306,8 @@ Quiet tool cards redraw immediately after a change; bash rows follow on new call
227
306
 
228
307
  With quiet tools enabled, `codemode` uses the same rounded **Code** card. The collapsed view shows up to eight observed child calls in their original order, including repeats, with Pi's actual status and available nonnegative duration. Additional calls and failures are counted. Error payloads have a separate two-row preview even when their child falls outside the first eight; final output has a three-row physical budget, and a full-output locator remains visible when available.
229
308
 
309
+ The same registration adds thin-orchestration rules to `codemode`'s prompt guidelines, after Pi's own guideline. Pi puts them in the system prompt only while `codemode` is active, in the primary session and in subagents. They ask the model to give each script one coherent objective, run only independent calls together with `Promise.allSettled()`, check each result's failure fields (such as bash `exit_code` or MCP `isError`) instead of trusting a fulfilled promise, treat side effects as non-transactional, return evidence rather than hiding failures, move long waits to background tools (or one bounded direct foreground call when those are unavailable), and discover unfamiliar tools with `searchTools()` and `describeTool()`. Discovery does not make a tool callable: direct-only tools stay direct-only, and permissions, consent, and sandbox boundaries still apply, since codemode never bypasses them. The rules live in `CODEMODE_GUIDELINES` in `lib/codemode-renderer.ts`.
310
+
230
311
  - JavaScript and child arguments stay out of the collapsed preview. Expand with the configured key shown in the top rule for the actual script, all observed children, complete available error/output text, image fallback and full-output locator.
231
312
  - Host failure/partial flags and observed child failures retain their existing semantic colors; no generic `finished` heading, inferred children, progress percentage, or aggregate duration is added. Pi's final status/wall-time header stays in expanded output rather than displacing useful collapsed content. Child success does not promise rollback or overall success.
232
313
  - Missing metadata is reported honestly. Terminal controls are stripped from displayed text; this is terminal-spoofing protection, **not secret redaction**. Both collapsed previews and expanded content can contain sensitive data.
@@ -245,7 +326,7 @@ Gentle Shell ships its own interactive tools instead of depending on third-party
245
326
 
246
327
  ### Gentle Agents
247
328
 
248
- 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`, and `1.4.0` 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.
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.0` 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.
249
330
 
250
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`).
251
332
 
@@ -273,11 +354,14 @@ In the isolated Gentle Shell home, `settings.json` does not declare gentle-pi; t
273
354
  - 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.
274
355
 
275
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 live child query), `subagent_cancel`, `subagent_send_message` (steer a running child), `subagent_continue` (resume a finished task in its own session).
357
+ - 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.
276
358
  - `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
+
360
+ Windows discovery checks pipe availability without connecting or consuming an accept slot. Each check waits at most 1ms, over at most 64 directory entries; only a missing pipe is classified as dead. Busy pipes, timeouts, access errors, and other inconclusive results retain unknown reachability. Dead records are omitted even if cleanup cannot safely acquire them. Best-effort cleanup revalidates the exact file identity, private ACL, and record contents through a rooted handle that prevents write/delete sharing, checks pipe absence again, and deletes through that same handle. Reopening a session creates a separate activation; cleanup does not remove its newer record.
277
361
  - `subagent_run.workspace_root` selects the parent's main worktree or an existing linked worktree in the parent's Git clone only. Validation happens before queueing; the child runs at that canonical root. Successful OS spawn registers it in the originating parent's same-clone registry, including delayed queued launches; failed spawns do not register.
278
362
  - 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.
279
363
  - 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.
280
- - 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 result** card uses the success color when the task completed and the error color otherwise. Collapsed, it previews up to three 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 full text. 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 result** 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.
364
+ - 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.
281
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 30 seconds; each child has at most four pending queries, and disconnect, timeout, stop, and send failure settle each request once. The current parent session alone can reply. 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.
282
366
  - 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.
283
367
  - `/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.
@@ -288,7 +372,7 @@ In the isolated Gentle Shell home, `settings.json` does not declare gentle-pi; t
288
372
  - Presence refresh is paged while the overlay is open. Graceful shutdown withdraws an instance; after abrupt closure its last heartbeat may remain visible for up to 15 seconds plus the time to complete the next directory refresh. A recent heartbeat is a heuristic, not proof that a process is alive. Same-profile, same-user processes share retained activity text; this is not an authorization channel.
289
373
  - `alt+s` confirms stopping the current active or queued subagents owned by the current process. `GENTLE_PI_AGENTS_STOP_KEY` rebinds it; `off` disables it.
290
374
  - Finished tasks are written to `~/.pi/agent/gentle-agents/tasks/` (one JSON per task, newest `history_max_tasks` kept, default 200) and come back on demand for `subagent_result` and `subagent_continue`; an id looked up this way from an unrelated session never enters the overlay or becomes cancellable. Child sessions live under `~/.pi/agent/gentle-agents/sessions/`.
291
- - `ctrl+shift+a` or a left click on the card's `▾ Collapse` / `▸ Expand` header control collapses the card to its first row (`GENTLE_PI_AGENTS_KEY` rebinds the key), `GENTLE_PI_AGENTS_VIEW_KEY` rebinds the overlay, `GENTLE_PI_AGENTS_PI` overrides the pi command used for children, and `GENTLE_PI_AGENTS=0` disables the tools and the card.
375
+ - `ctrl+shift+a` or a left click on the card's `▾ Collapse` / `▸ Expand` header control collapses the card to its first row, and a left click on an agent row opens the `/gentle:agents` overlay (`GENTLE_PI_AGENTS_KEY` rebinds the key), `GENTLE_PI_AGENTS_VIEW_KEY` rebinds the overlay, `GENTLE_PI_AGENTS_PI` overrides the pi command used for children, and `GENTLE_PI_AGENTS=0` disables the tools and the card.
292
376
 
293
377
  ### Background jobs
294
378
 
@@ -308,7 +392,7 @@ until curl -sf localhost:3000/health; do sleep 1; done # server is up
308
392
  - While the orchestrator has background work running (a subagent task or a background job), a `bash` call that only sleeps (`sleep 10`, `sleep 2m`, or several such sleeps joined by `&&`/`;`) is refused with a message to end the turn, because each completion already arrives as its own message. Wait conditions such as `until ...; do sleep 1; done`, sleeps mixed with real commands, `bash_background`, and `monitor` are never refused, and `sleep` is unrestricted when nothing runs in the background.
309
393
  - Jobs live in memory, belong to the session that started them, and are stopped when the session shuts down. At most 25 run at once.
310
394
  - `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`.
311
- - `/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). 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.
395
+ - `/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.
312
396
 
313
397
  ### Gentle Todo
314
398
 
@@ -401,7 +485,7 @@ The canvas server binds `127.0.0.1` on a random port and needs a random per-serv
401
485
 
402
486
  ### Bridge providers
403
487
 
404
- Idle Claude Bridge continuation uses the normal user-prompt lifecycle so prompt preparation and tool declarations are retained. Gentle Agents hides only its exact, uniquely generated reserved wake in Pi's interactive transcript; child result and query cards remain visible. Native providers keep their hidden `display: false` custom wake.
488
+ Idle Claude Bridge continuation uses the normal user-prompt lifecycle so prompt preparation and tool declarations are retained. Gentle Agents hides only its exact, uniquely generated reserved wake in Pi's interactive transcript; child result and query cards remain visible. Native providers keep their hidden `display: false` custom wake. Pi gives custom messages to the model with the user role, so the native wake carries the same "not written by the user" label as the Bridge wake and asks for a reply in the language of the human's own last message, never the language of the notification or of the subagent output. The Bridge wake text is unchanged because persisted wake identities embed it. That label alone does not hold in long sessions, where the human's message sits far up the transcript or has been compacted away, so the harness also anchors the reply language itself: it records the human's own typed input (interactive or RPC, never extension-sent text such as Bridge wakes) and, when the primary session is about to answer right after an automated message, adds one hidden `gentle-pi.reply-language` note quoting the start of that input. The note is added only when the request ends with an automated message, so a plain tool round adds nothing, and it is persisted once per such message, so requests stay append-only for the provider's prompt cache; child sessions never receive it.
405
489
 
406
490
  The reserved identity is stored once per session as a non-context custom entry and reconstructed on reload/resume, including identities on abandoned branches. It is session-owned: switching sessions releases the previous identity. Ordinary text quoting the old notification, prefixes, substrings, and whitespace variations is not hidden. Pi's transformer exposes no author/message ID, so an exact copy of the current reserved identity is indistinguishable from its generated wake.
407
491
 
@@ -409,5 +493,9 @@ This is **TUI-only suppression**: the generated user-role message remains in ses
409
493
 
410
494
  The Gentle AI harness (ODD workflow, identity, review contract) and the open-tasks block are appended to `before_agent_start`'s `systemPromptOptions.appendSystemPrompt` instead of being returned as a replacement `systemPrompt` (gentle-shell#1485). Provider bridges such as `pi-claude-bridge` forward only those structured sections after their own preset and drop a returned `systemPrompt`, so this route reaches every provider, bridged or not.
411
495
 
496
+ ### Empty review scope after acknowledgement
497
+
498
+ After acknowledging a committed candidate, a selectorless STATUS may inspect the empty workspace and return `empty_candidate_base_ref_required`. The `blocked` label describes that candidate selection request; it does not establish that the earlier review failed or remains open. To check the previously acknowledged candidate, use ASSESS with its original `baseRef` and `committedOnly: true`, and rely on the returned native `candidate.consumed` evidence. Do not infer closure from the empty workspace or repeat the acknowledgement.
499
+
412
500
  Set `GENTLE_PI_SHELL=0` to keep pi's built-in footer and editor.
413
501
 
@@ -59,7 +59,7 @@ it lets the window close.
59
59
  Current requirements come from `package.json` and
60
60
  [`gentle-ai-installer.mjs`](../scripts/gentle-ai-installer.mjs): Node ≥22.19.0,
61
61
  Pi ≥1.2.0, pnpm acquisition 11.1.1, Gentle Shell package 4.0.0 and package-local
62
- Gentle AI 4.3.1. Windows native source builds require Go ≥1.25.10 when the
62
+ Gentle AI 4.4.0. Windows native source builds require Go ≥1.25.10 when the
63
63
  required usable native binary is missing. A reusable binary does not require Go.
64
64
  When a build needs Go and the user's Go is missing, older or unchecked, the installer uses
65
65
  its own [pinned Go](#pinned-go) instead of blocking.
@@ -734,7 +734,7 @@ PNPM_HOME, `pnpm add -g @earendil-works/pi-coding-agent@1.0.0 gentle-pi@4.0.0`
734
734
  lists Pi 1.0.0 while the Pi beside gentle-pi is 1.1.0. So Gentle Shell may run a
735
735
  Pi newer than `PI_INSTALL_VERSION`, always at least the minimum: the runner
736
736
  verifies that Pi (`verify-global-list`, the setup recovery, a pnpm
737
- `verify-updated-shell`) and, when it is not `PI_INSTALL_VERSION` (1.2.0 now; the 1.0.0/1.1.0 figures above are that older verification), the outcome says which Pi
737
+ `verify-updated-shell`) and, when it is not `PI_INSTALL_VERSION` (1.5.0 now; the 1.0.0/1.1.0/1.2.0 figures above are that older verification), the outcome says which Pi
738
738
  Gentle Shell runs. `--config.auto-install-peers=false` would leave gentle-pi
739
739
  with no Pi beside it, so the launcher would run any `pi` on PATH, and
740
740
  `--config.overrides` is ignored for global installs.
@@ -0,0 +1,52 @@
1
+ # Observe native MCP connection status
2
+
3
+ Gentle Shell extensions use Pi's native MCP status API directly. No second MCP manager, polling command or installed-dependency patch is involved.
4
+
5
+ ## Availability
6
+
7
+ Use a Pi build that exposes `pi.getMcpStatus()` and `pi.onMcpStatusChanged()`. Published Pi 1.4.0 predates these methods; this Shell change does not claim that an upstream release is already available or raise the optional peer requirement to a nonexistent version. Feature-detect both methods on older Pi builds.
8
+
9
+ The native implementation targets Pi base `6291b9b` (commit `c8fb968` on a local contribution branch) and has not yet been proposed upstream. Shell never patches installed dependencies to provide it.
10
+
11
+ Configured-server counts and `pi.getAllTools()` are **not** connection health. A server can retain registered tools after its transport dies. Until the native API is available, show `connection status: /mcp`, not an inferred ready/error state.
12
+
13
+ ## Extension example
14
+
15
+ This optional JavaScript extension uses the existing footer-status interface; it is not enabled by default:
16
+
17
+ ```javascript
18
+ export default function (pi) {
19
+ let subscription;
20
+ pi.on("session_start", (_event, ctx) => {
21
+ subscription?.dispose();
22
+ if (typeof pi.getMcpStatus !== "function" ||
23
+ typeof pi.onMcpStatusChanged !== "function") {
24
+ ctx.ui.setStatus("mcp-health", "connection status: /mcp");
25
+ return;
26
+ }
27
+ const render = (all) => ctx.ui.setStatus("mcp-health",
28
+ all.map((server) => server.name + " · " + server.state +
29
+ (server.error ? " (" + server.error.kind + ")" : "")).join(" | ") || undefined);
30
+ subscription = pi.onMcpStatusChanged(render);
31
+ render(pi.getMcpStatus());
32
+ });
33
+ pi.on("session_shutdown", () => subscription?.dispose());
34
+ }
35
+ ```
36
+
37
+ Snapshots contain only `name`, `state`, optional `tools` and `error.kind`, and `since`. States are exactly `connecting`, `ready`, `error`, `disabled`; categories are `auth`, `timeout`, `transport`, `config`, `unknown`. The normalized name matches the tool namespace suffix: `dev-docs` becomes `dev_docs` in `mcp__dev_docs`.
38
+
39
+ Reads and subscriptions never start connections, retries or authentication. Events include count/category changes; `since` changes only when the public state changes. Empty snapshots do not prove health: the native manager may not have started, may be disabled/replaced, or may have no servers. Invalid entries without runtime records remain diagnostics in `/mcp`.
40
+
41
+ The API excludes credentials, configuration values, URLs, raw errors, stderr and auth prompts. Keep all authentication and connection management in `/mcp`.
42
+
43
+ ## Maintainer integration check
44
+
45
+ Build the Pi coding-agent package containing the API, then run:
46
+
47
+ ```bash
48
+ GENTLE_MCP_STATUS_PI_ROOT=/path/to/pi/packages/coding-agent \
49
+ node --experimental-strip-types --test tests/maintainer/mcp-status.maintest.ts
50
+ ```
51
+
52
+ The explicit probe uses Shell's child invocation builder and Pi's real bundled CLI with a disposable home, an inert disabled MCP server and a synthetic provider that rejects model calls. It checks the exact snapshot and change event for one disabled server — normalized namespace and no fields beyond `name`, `state` and `since` — the exit status, that a server environment value never appears in the output, plus empty stdout and one exact status report on stderr (Pi's print-mode output guard redirects extension writes there). It does not exercise `tools`, `error.kind`, state transitions or provider credentials; Pi's own tests cover the full state, error-category and redaction contract. Without the selected runtime it reports a skip, not proof of API support. It neither reads your MCP configuration nor contacts a server or model provider.
@@ -1,6 +1,6 @@
1
1
  # Choose how permission questions are handled
2
2
 
3
- Use **Normal**, **Auto**, or **YOLO** for the current primary session. Optionally save any of them as the user-global default for future sessions. These modes do not redesign Gentle Shell delegation, expand the task you authorized, or replace independent safety and consent.
3
+ Use **Normal**, **Auto**, **YOLO**, or **Super Yolo** for the current primary session. Optionally save any of them as the user-global default for future sessions. These modes do not redesign Gentle Shell delegation, expand the task you authorized, or replace independent safety and consent. One always-on exception: reading the task's exact resolved skill files (the selected `SKILL.md` plus its referenced instruction files, by registry, catalog or parent-supplied paths) needs no per-file permission question in any mode; secrets, sensitive paths, unrelated personal files and explicit user prohibitions still apply.
4
4
 
5
5
  ## Tool context in Auto
6
6
 
@@ -50,9 +50,9 @@ 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. |
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 exact command until the session ends) and **Always allow <family>** (persists `guardedCommands[key]="allow"` 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
- | **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). [Full YOLO details](yolo-mode.md). |
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. |
57
57
 
58
58
  ## Commands and menu
@@ -62,7 +62,8 @@ Changing the default does **not** change the current session. To return this ses
62
62
  | `/gentle:mode normal`, `auto`, `yolo`, or `super-yolo` | Select exactly one mode for the current interactive primary session. |
63
63
  | `/gentle:mode status` or `/gentle:mode` | Show current mode and saved default. |
64
64
  | `/gentle:mode default normal`, `auto`, `yolo`, or `super-yolo` | Save the default for new primary sessions, leaving the current mode unchanged. |
65
- | `/gentle:yolo enable`, `disable`, or `status` | Existing shortcut; enable selects YOLO, disable selects Normal. |
65
+ | `/gentle:yolo` | Choose the session mode interactively; cancellation does not grant permission or save a default. Noninteractive callers see status. |
66
+ | `/gentle:yolo enable`, `disable`, or `status` | Existing shortcut; enable selects YOLO, disable selects Normal, and status distinguishes Super Yolo. |
66
67
 
67
68
  In `/gentle:customize` → **Editor**, use **Session permissions** to change the current mode, or **Default permissions** to save a future-session preference. The original **YOLO: ON/OFF · session only** row still toggles the live mode; it does not save a default. Browsing, previews, and closing the menu do not grant permission.
68
69
 
@@ -92,6 +93,10 @@ An allow verdict only returns control to the original executor and remaining gua
92
93
  - The mode does not choose an unknown remote destination, account or credential, or authorize ambient credential discovery.
93
94
  - Calls that execute outside Pi's intercepted tool pipeline are outside this hook's coverage. A custom tool is inspected by its name and arguments, not by executing or proving its implementation.
94
95
 
96
+ ### Execution-surface guard
97
+
98
+ A tool call whose input sets `openProjectPaneIfMissing` to anything but `false` is blocked before any prompt or execution, in every mode including YOLO and super-YOLO, and in child sessions. The reason carries the stable code `gentle-ai.execution-surface.external-fallback-prohibited`; run the work through `subagent_*` or the native `Agent` in the current runtime instead, or stop and tell the user.
99
+
95
100
  ## Failure behavior and cost
96
101
 
97
102
  Auto uses the **current session model and existing model registry/authentication** in an independent request. Ordinary checks remain tool-free; an eligible script check can inspect at most two complete 8 KB files, with at most three provider calls and a 60-second overall limit. Each provider call has a 20-second deadline. Only explicit script operands in simple shell commands, or `package.json` for supported package-script commands, are eligible. Compound commands, cwd-changing options (such as `bun --cwd nested check.ts`), substitutions and globs are not expanded; Auto does not crawl directories or execute a script to assess it. See [inspection limits and accounting](auto-permission-evidence.md). It does not ask the acting conversation to approve itself. Enabling or saving Auto discloses this additional inference; individual actions do not each ask for inference consent. Depending on the provider, these checks add token cost and latency.
@@ -0,0 +1,28 @@
1
+ # Prompt byte budgets
2
+
3
+ The regression test measures a fixed primary-session fixture, not every live Pi loadout. Run it with:
4
+
5
+ ```sh
6
+ node --experimental-strip-types --test tests/orchestrator-prompt-budget.test.ts tests/session-subject-routing-contract.test.ts tests/orchestrator-state.test.ts tests/orchestrator-work-search.test.ts tests/orchestrator-status-publication-contract.test.ts
7
+ ```
8
+
9
+ Use isolated temporary and Gentle Pi configuration directories when running tests.
10
+
11
+ ## Budgets and measurements
12
+
13
+ | Measurement | Ceiling | Before | After |
14
+ | --- | ---: | ---: | ---: |
15
+ | Rendered orchestrator core plus selected declarations | 16,600 B | 16,990 B | 16,554 B |
16
+ | Fixed assembled system text | 40,000 B | 33,993 B | 33,993 B |
17
+
18
+ The core is 9,114 B in both targeted measurements. The selected declarations decreased from 7,876 B to 7,440 B: a 436 B reduction. They are measured as UTF-8 bytes of compact JSON containing each registered tool's name, description and parameters, in the fixed order `orchestrator_session_id`, `orchestrator_list`, `subagent_run`. The targeted cap leaves 46 B of headroom. Only descriptions changed; the test also pins each tool's schema with descriptions excluded. The focused command includes the existing session-subject contract tests, retaining their exact exemption, identity-preservation, and privacy phrases.
19
+
20
+ The baseline is commit `eff5d24694b21663095a4790b3ef15de21c290c2`. Running the same fixture with that commit's `gentle-agents.ts` loaded in memory fails the targeted budget at 16,990 B and passes the non-description schema checks. The assembled system text is unchanged: this compaction reduces selected declaration bytes, not system-message bytes. These fixture results are not directly comparable to historical measurements with other loadouts or Pi versions.
21
+
22
+ ## Fixed assembly fixture
23
+
24
+ The test calls Pi 1.4's actual pure system prompt builder, with the primary Gentleman harness in TUI mode, background policy off, RDD status unknown, and the verified mirrored review fragment. The production `appendSystemPromptOnce` helper appends harness then review; both complete fragments must appear exactly once in the assembled text. An explicit project-policy file inside the temporary fixture pins background off above ambient/global configuration; a regression check renders under both ambient `off` and `on` and requires identical output. Active tools are `read`, `bash`, `edit`, `write`, and the three named declarations above. Registered tool snippets and guidelines and one `work-unit-commits` skill are passed to the builder. The assets, installation/docs, fixture cwd and skill paths in the generated text are normalized to fixed `/fixture` paths before counting UTF-8 bytes.
25
+
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
+
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.