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
package/README.md CHANGED
@@ -143,7 +143,7 @@ Review the exact change, not a moving target. Native review keeps one candidate
143
143
 
144
144
  Review is proportionate: an independent verifier runs only for a named high-risk item in every RDD state, a review is only due for high-risk work, and the agent forwards the 4R lenses that fit what it touched — with its reason — instead of paying for all four.
145
145
 
146
- > ℹ️ **RDD is optional and on by default:** turn native receipt-driven development off anytime with `/gentle:review-mode disable` (this clone) or `gentle-ai review mode disable` (machine-wide); `/gentle:review-mode status` shows the current mode. The `.git/gentle-ai/candidate-views` parent must sit on a filesystem that honors private POSIX modes (or equivalent Windows ACLs); WSL DrvFS mounts without metadata can reject START before lineage creation.
146
+ > ℹ️ **RDD is optional and on by default:** open `/gentle:rdd` to see the effective mode and its source, then choose a repository change or an explicitly named machine-wide change. Cancelling changes nothing. Repository enable only clears its local off override; it cannot override a machine-wide off. The existing `/gentle:review-mode status|enable|disable` remains clone-scoped. Changing RDD does not grant review consent or change permissions. The `.git/gentle-ai/candidate-views` parent must sit on a filesystem that honors private POSIX modes (or equivalent Windows ACLs); WSL DrvFS mounts without metadata can reject START before lineage creation.
147
147
 
148
148
  <details>
149
149
  <summary><kbd>More</kbd> <strong>Reviewer transport</strong> — how review completions follow Pi's transport setting</summary>
@@ -204,6 +204,8 @@ Delegating work should not mean losing it. Every subagent runs as its own proces
204
204
 
205
205
  Model, effort, and who does what should be choices, not accidents. Named profiles route the orchestrator atomically and independently from packaged and review roles; a repository can pin its profile so its subagents stop following the globally active one, and the panel always shows the routing the runtime actually uses.
206
206
 
207
+ Each profile can also give every agent, the orchestrator included, an ordered list of fallback models (`f` on its row in `/gentle:profiles`). When a model hits its usage limit, an auth error, or provider trouble Pi already retried, the run switches to the next model you listed and continues the same conversation; a model that ran out is skipped by every agent for a while, and a full `/gentle:usage` window skips its provider before anything fails. Each switch warns you, with a price note when the next model costs more. See [Model fallback chains](docs/readme-reference.md#model-fallback-chains).
208
+
207
209
  **[Docs →](docs/readme-reference.md#agent-model-profiles)**
208
210
 
209
211
  ---
@@ -220,7 +222,7 @@ Extension commands are only useful if you can find them. `alt+k` opens a curated
220
222
 
221
223
  ### Customize — Look, layout, and editor in one panel
222
224
 
223
- `/gentle:customize` opens an interactive panel to set animation quality, startup banner rose, text logo and color, or choose an installed Pi theme.
225
+ `/gentle:customize` uses one line per setting with its options inline across appearance, themes, Editor, History, Notifications, Layout, Cards, and Sections. `●` marks the current value and `›` a different highlighted option; `↑`/`↓` move between settings. The footer tells you whether `←`/`→` applies a live appearance change immediately or previews an option for **Enter** to apply. Themes, permissions, privacy, audio, and the newly grouped toggles require Enter: browsing never changes authority or saves those preferences. `←` past the first value returns to the categories; Tab also switches panes. Focused previews retain warnings, effective-state diagnostics and Layout's schematic. Profile and reset actions keep their explicit controls and confirmations.
224
226
 
225
227
  <details>
226
228
  <summary><kbd>More</kbd> <strong>Everything <code>/gentle:customize</code> controls</strong> — themes, status layout, Vim, history, and visual profiles</summary>
@@ -228,7 +230,7 @@ Extension commands are only useful if you can find them. `alt+k` opens a curated
228
230
  <br>
229
231
 
230
232
  - **Themes:** Highlighting a theme previews its source palette without changing the active theme; press Enter or Space to apply it through Pi. If its source is unreadable, the preview is unavailable.
231
- - **Status layout:** Status defaults to a right rail in fullscreen terminals at least 140 columns wide, and to a bottom bar otherwise. Choose right, bottom, or hidden (which removes both the rail and the bottom status bar at every width), move the fullscreen header below the input (below the 140-column breakpoint only one status row paints: a top header replaces the bottom bar, while with the header below the input the bottom bar alone carries the header's context, cost, and usage plus extension statuses), select comfortable/compact/minimal density, and toggle Changes, Agents, TODO, usage/cost, and model details independently. Layout changes and reset take effect immediately; banner changes appear on the next startup.
233
+ - **Status layout:** Status defaults to a right rail in fullscreen terminals at least 140 columns wide, and to a bottom bar otherwise. Choose right, bottom, or hidden (which removes both the rail and the bottom status bar at every width), place the fullscreen header on top of the conversation column (`top`), below the input, or split into a title row and a bottom status bar (`split`; Gentle Shell versions older than this one reject a file that stores it and fall back to the defaults) (below the 140-column breakpoint only one status row paints: a top header replaces the bottom bar, while with the header below the input the bottom bar alone carries the header's context, cost, and usage (integrations show only in the rail and the `/gentle:panel` sheet)), select comfortable/compact/minimal density (rail and header spacing; minimal also drops the brand and the key hints), choose a transparent (default) or tinted chrome surface (transparent leaves the rail, title row, status bar and panel unpainted so a terminal background image shows through), and toggle Changes, Agents, TODO, usage/cost, model details, and Stats independently. Presets set the visibility switches and keep the header placement, the density and the surface (changing the density keeps the preset selected): **Light** is the minimal edition (no sidebar rail, Status at the bottom; model, context, agent questions and review only; on terminals 140 columns or wider it keeps the chrome bars and the Agents and Todos cards, and `[ Panel ]` opens the Status sections), **Neutral** is the default and **Power user** adds a **Stats** section (session spend, input/output tokens, cache hit rate, tool calls and failures, subagent spend, and one row per model with its turns, tokens and cost); leaving Light brings the rail back. The menu marks the preset your settings match, and any switch still overrides it. The Stats switch is stored as `stats` in `visual-customization.json`: Gentle Shell versions older than this one reject a file that has it and fall back to the defaults, and a Power user setup saved before it (no Stats) now reads as Neutral, so pick Power user again. `alt+l` cycles Light → Neutral → Power user from anywhere (a hand-tuned mix starts on Neutral); set `GENTLE_PI_SHELL_PRESET_KEY` to another key, or to `off` to drop it. `/gentle:panel` opens the sidebar sections as a full-width sheet at any width. The effective agent profile, with its source suffix when present, follows the model in the status bar and opens the Stats section. Layout changes and reset take effect immediately; banner changes appear on the next startup.
232
234
  - **Vim:** The Editor category offers explicit Vim enable/disable controls for the global prompt preference; highlighting shows the persisted preference and effective prompt state without changing either. Enter or Space saves it and updates the live prompt; unsupported editors keep ordinary editing even when the saved preference is on. Vim is not included in visual profiles or visual reset.
233
235
  - **History:** The History category turns prompt-history capture on or off; it is off by default, applies to the next prompt without a restart, and never deletes stored history. An explicit `GENTLE_PI_HISTORY_CAPTURE` value overrides the saved choice, and the panel marks that override (see [Prompt history](docs/prompt-history.md)).
234
236
  - **Reset and profiles:** The panel can reset visual, banner, and animation settings to defaults. Press `p` for named visual profiles: `s` saves the current installed theme, banner, animation and layout; select a profile with ↑/↓, then use `r` to replace, `a` to apply, or `d` to delete. `z` clears only the profile catalog. Confirm destructive/apply actions with `y`, or cancel with any other key; Esc returns without applying a preview. Applying independent stores is not atomic: partial failures identify what changed.
@@ -252,7 +254,7 @@ Open `/gentle:customize` → **Notifications** (the card header reads **Audio no
252
254
 
253
255
  <br>
254
256
 
255
- - **Controls:** Enter toggles the master switch or cycles a type/event through silence/success/error/attention, `f` assigns a literal absolute local WAV/OGG/FLAC sound (≤2 MiB, ≤10 seconds) to the highlighted **Success**, **Error** or **Attention** type (each type keeps its own sound), and `p` previews its assigned sound. **Advanced** folds per-event exceptions; the type choices stay independent.
257
+ - **Controls:** Each audio setting has inline options: use `←`/`→` to choose and Enter to apply the master switch, process mute, type/event sound or Advanced visibility. Sound options include silence, the builtin tones and custom audio. `f` assigns a literal absolute local WAV/OGG/FLAC sound (≤2 MiB, ≤10 seconds) to the highlighted **Success**, **Error** or **Attention** type (each keeps its own sound); `p` previews its currently configured sound. **Advanced** folds per-event exceptions; the type choices stay independent. Navigation alone never writes audio preferences.
256
258
 
257
259
  - **Quick answer (Linux/WSLg):** on plain Linux the installed package prefers the native WAV backend and needs no external player — it talks to a local PulseAudio/PipeWire-Pulse Unix socket and requires a running server with a default sink.
258
260
  - Inside **WSL** the Windows system `SoundPlayer` is preferred instead: the validated WAV snapshot is mapped to a `\\wsl.localhost\<distro>\...` UNC path, so no Pulse server or RDP audio dependency is required; it does depend on the default `/mnt/c` automount and the standard `C:\Windows` root and otherwise falls back to the trusted Linux CLI before any playback.
@@ -271,7 +273,7 @@ Open `/gentle:customize` → **Notifications** (the card header reads **Audio no
271
273
 
272
274
  ### Background jobs — Inspect what runs in the background
273
275
 
274
- Use `/gentle:jobs` to inspect this session's background commands and monitors. Running jobs appear first; each group is ordered newest first. Arrow keys select a job, `Tab` opens details on narrow terminals, `s` stops a running job, and `q` closes the modal.
276
+ Use `/gentle:jobs` to inspect this session's background commands and monitors. Running jobs appear first; each group is ordered newest first. Arrow keys select a job, `Tab` opens details on narrow terminals, `s` stops a running job, and `q` closes the modal. In fullscreen, click a job or a visible details, Stop or close control; actionable targets use the shared orange hover role without changing the selection on hover.
275
277
 
276
278
  The Status panel has a **Jobs** section with each running job's description. When the panel is hidden or unavailable in the compact/mobile layout, the top or bottom bar shows only the running count (`⧗ 1 job`). The count and descriptions disappear when no jobs remain active; `/gentle:jobs` retains completed jobs for inspection.
277
279
 
@@ -320,12 +322,12 @@ Save `/gentle:mode default auto` or `/gentle:mode default yolo` to use either op
320
322
  <br>
321
323
 
322
324
  - **Default:** **OFF** unless selected or saved as the global default, with interactive primary TUI controls and live session/workspace binding; `/gentle:yolo disable` revokes it and `/gentle:yolo status` checks it.
323
- - **Menu:** With no argument, `/gentle:yolo` opens a menu (`enable`, `disable`, `status`) showing the current state; cancelling changes nothing, and without an interactive menu it reports status.
325
+ - **Menu:** With no argument, `/gentle:yolo` chooses Normal, Auto, YOLO or Super Yolo for this session. Cancelling grants nothing; outside an interactive primary TUI it reports status. Session choices never save defaults.
324
326
  - **Lifetime:** Reload and session replacement revoke live grants; new primary instances may apply the saved global default.
325
- - **Status:** Active status plus a separate widget show **🚀 YOLO ON 🔥 — destructive confirmations remain**.
327
+ - **Status:** Active YOLO status plus a separate widget show **🚀 YOLO ON 🔥 — destructive confirmations remain**; Super Yolo is identified separately.
326
328
  - **Still mandatory:** Explicit restrictions, configured confirmations/blocks, consequential unresolved choices, destination/credential ambiguity and native consent/recovery decisions remain mandatory. Children get no independent delivery grant. This is not a sandbox.
327
329
 
328
- - **From Customize:** Or open `/gentle:customize` → **Editor** and select **YOLO: OFF · session only**, immediately below Vim. Enter or Space toggles the same live-session permission as `/gentle:yolo`; browsing and previews never activate it. This live toggle does not save a preference. The separate **Session permissions** and **Default permissions** rows select a current mode or save a user-global default, respectively; repository settings and visual profiles cannot grant either mode.
330
+ - **From Customize:** Or open `/gentle:customize` → **Editor**, choose **ON** or **OFF** on the **YOLO** line below Vim, then press Enter or Space to apply that live-session value. Browsing and previews never activate it; the native permission and consent boundaries remain the same as `/gentle:yolo`. This live toggle does not save a preference. The separate **Session permissions** and **Default permissions** rows select a current mode or save a user-global default, respectively; repository settings and visual profiles cannot grant either mode.
329
331
 
330
332
  </details>
331
333
 
@@ -354,6 +356,7 @@ Save `/gentle:mode default auto` or `/gentle:mode default yolo` to use either op
354
356
  | Native interactive tools | Built-in questions, choices, and review captures — no third-party dependency. |
355
357
  | Gentle Todo | A plan card that turns amber when the model lets it go stale. |
356
358
  | Subscription usage | Per-window meters and resets for supported provider accounts. |
359
+ | OpenAI Fast | Save Standard or Fast per compatible model route in `/gentle:profiles`. Availability depends on account and plan, and Fast uses more quota. [Details and pricing caveats](docs/fast-mode.md). |
357
360
  | Gentle Stats | `/gentle:stats` shows local usage history: activity heatmap, tokens, cost, streaks, and per-model share. |
358
361
  | Gentle Design | Ask for a design in plain language, or run `/gentle:design <brief>`: the session model writes several self-contained HTML design directions to `design/<slug>/`, with any provider, and the canvas opens on its own. `open` shows them side by side on a local canvas, where a comment on any element, optionally with a pasted screenshot of an animation or transition state, is saved to `comments.json` and sent to the session now or in one batch; `stop` closes it. `sync` captures the project's tokens in `design/system.md` and `design/system.html`, which later designs follow and the canvas shows first; it runs on its own before the first design when the project has design sources, and the model warns when they changed since. `implement <slug>/<artboard>` (or the canvas Implement button) hands an artboard and its open comments to the session to build in the project's real stack, tracked in the design's linked ODD feature when it has one; the canvas marks it as the chosen direction, shows its handoff state live, and offers Compare with the running app once it is implemented. [Details](docs/gentle-shell.md#gentle-design). |
359
362
  | Gentle Music | `/gentle:music [mood]` opens the gentle-stream player full screen; `b` returns to Pi with the music playing. `next`, `pause`, `play`, `stop`, and `status` control it in place. [Details](docs/gentle-music.md). |
@@ -380,7 +383,7 @@ The first-party `nan` provider is included; no third-party provider package is r
380
383
  - **Login:** Both login routes await explicit API-key input; blank or whitespace-only entries fail without saving a credential, and surrounding whitespace is trimmed. Cancellation leaves the stored key unchanged. Stored keys take precedence over `NAN_API_KEY`.
381
384
  - **Streaming:** Pi streams chat completions through its OpenAI-compatible provider.
382
385
  - **Model discovery:** Model discovery intersects NaN's authenticated `/v1/models` response with a maintained subset of known chat IDs from the [official model documentation](https://nan.builders/docs/models); unknown and non-chat IDs are omitted. A successful response with no known chat IDs stays empty. Documented context, reasoning, and text/image capabilities are preserved with conservative numeric bounds for abbreviated limits; audio input is not advertised by Pi.
383
- - **Output caps:** The provider configures `maxTokens` caps rather than claiming undocumented model maxima: 32,768 for GLM 5.3, GLM 5.3 Flash, and MiMo; 16,384 for DeepSeek V4 Flash; 65,536 for Gemma 4 and Qwen 3.6; and 131,000 for Qwen 3.8 Flash (NaN documents 131K). Reasoning shares the output budget.
386
+ - **Output caps:** The provider configures `maxTokens` caps rather than claiming undocumented model maxima: 32,768 for GLM 5.3, GLM 5.3 Flash, and MiMo; 131,072 for DeepSeek V4 Flash; 65,536 for Gemma 4 and Qwen 3.6; and 131,000 for Qwen 3.8 Flash (NaN documents 131K). Reasoning shares the output budget, and dense prompts can reason past 16K tokens, so DeepSeek gets a generous budget (NaN documents up to 393,216).
384
387
  - **Offline fallback:** Before a successful refresh, all seven documented chat models are available as the offline fallback in `/gentle:profiles`: `glm5.3`, `deepseek-v4-flash`, `glm5.3-flash`, `qwen3.8-flash`, `mimo-v2.6-flash`, `gemma4`, and `qwen3.6`. This fallback declares documented support, not proof of access for your key. Once refreshed, the successful live key-scoped list remains authoritative (including an empty list), even offline or after a failed refresh. Changing credentials resets the catalog to the full documented fallback until discovery succeeds for the new key.
385
388
  - **Not included:** NaN MCP search and media bridges are not included.
386
389
 
@@ -518,11 +521,10 @@ Every other argument is forwarded to pi unchanged, for example `gentle-shell --m
518
521
 
519
522
  ### Path B: inside an existing pi
520
523
 
521
- Install the stable release into an existing pi agent, restart Pi, then synchronize the installed assets.
524
+ Install the current npm release into an existing pi agent, restart Pi, then synchronize the installed assets.
522
525
 
523
526
  ```bash
524
- # Published stable release: v4.1.0
525
- pi install npm:gentle-pi@4.1.0
527
+ pi install npm:gentle-pi
526
528
 
527
529
  # Restart Pi, then run:
528
530
  gentle-ai sync
@@ -531,7 +533,7 @@ gentle-ai sync
531
533
  pi
532
534
  ```
533
535
 
534
- See the [v4.1.0 release notes](https://github.com/Gentleman-Programming/gentle-shell/releases/tag/v4.1.0) for version-specific changes.
536
+ For a reproducible pin, use `pi install npm:gentle-pi@<version>` with a published version. Check the [published releases](https://github.com/Gentleman-Programming/gentle-shell/releases) for version-specific changes and runtime pairing; the unpinned command follows npm's `latest` dist-tag.
535
537
 
536
538
  <details>
537
539
  <summary><kbd>More</kbd> <strong>Seeing a builtin codemode warning?</strong> — why it appears and how to silence it</summary>
@@ -575,7 +577,7 @@ gentle-shell upgrade --channel release
575
577
  gentle-shell upgrade --rollback
576
578
  ```
577
579
 
578
- `gentle-shell upgrade` uses the package manager that owns your installation.
580
+ `gentle-shell upgrade` uses the package manager that owns your installation. To update Pi packages, including Shell's managed `gentle-engram`, run `gentle-shell update --extensions`. When Pi detects a newer package, it appears in Pi's normal startup update notice; it is not installed automatically.
579
581
 
580
582
  <details>
581
583
  <summary><kbd>More</kbd> <strong>Channels, bundled installs, and rollback</strong> — what each channel builds and how rollback works</summary>
@@ -585,7 +587,7 @@ gentle-shell upgrade --rollback
585
587
  - **Main channel:** On the main channel it rebuilds Gentle AI and Gentle Shell from the latest `main` commits (only what changed) and needs pnpm and Go (a Go older than the minimum is replaced, for the build only, by the pinned Go the installer left in its own folder); switching back to release restores the pinned Gentle AI binary. When the Gentle AI build fails but Gentle Shell moved, the new Gentle Shell is still installed and the command exits with an error asking you to run `gentle-shell upgrade --channel main` again. The retry rebuilds Gentle AI with the new Shell's code, and finishes once the cause of the original error is resolved.
586
588
  - **Your Pi:** With pnpm 11, the updated Gentle Shell may run a newer Pi that pnpm puts next to it (always at least the minimum); your own Pi is never changed.
587
589
  - **Bundled install:** A bundled install (the web installer's own Node, pnpm and Pi) follows the release channel only: it installs the new version beside the current one, verifies it, then switches, keeping the previous version for `--rollback`. On release, once the latest release publishes the bundled distribution, `upgrade` moves a global pnpm or npm installation to the bundled one and asks once before removing the old global `gentle-pi`.
588
- - **`update` vs `upgrade`:** `gentle-shell update` is a different command: it is Pi's own package update. In a bundled install Pi ships pinned with Gentle Shell, so updating Pi itself runs `gentle-shell upgrade` instead. `gentle-shell update --latest` (also with `pi`, `self`, `--self` or `--all`) installs the newest published stable Pi with the active Gentle Shell instead, without the release's verified lockfile: it first warns that Gentle Shell features relying on audited Pi internals (such as the Vim editor) may turn off until a Gentle Shell release verifies that Pi, then verifies and switches to it like `upgrade`, keeping the previous version for `gentle-shell upgrade --rollback`. Afterwards `gentle-shell upgrade` never downgrades that Pi: a release of the same Gentle Shell with an older verified Pi changes nothing, and a newer Gentle Shell release upgrades as usual.
590
+ - **`update` vs `upgrade`:** `gentle-shell update` updates the Pi this launcher runs; `upgrade` updates Gentle Shell. A verified source-linked Shell updates its checkout's local Pi within its declared range, without replacing the link ([requirements](docs/gentle-shell.md#updating-pi-safely)). In a bundled install `update` selects the newest published stable Pi (`--latest` is an alias); `--all` also updates extensions, while explicit extension pins stay pinned. The Pi update warns before installing without the release's verified lockfile: features relying on audited Pi internals (such as Vim) may turn off. It verifies and activates the new pair, retaining rollback. A Shell release upgrade keeps any newer active Pi, also without that release's lockfile. Managed Pi self updates reject `--force`.
589
591
 
590
592
  </details>
591
593
 
@@ -11,6 +11,7 @@ tools:
11
11
  - source_check
12
12
  - fetch_content
13
13
  - get_search_content
14
+ - mcp__codegraph__codegraph_explore
14
15
  ---
15
16
 
16
17
  You are the read-only explorer for generic ODD work.
@@ -6,6 +6,7 @@ tools:
6
6
  - grep
7
7
  - find
8
8
  - bash
9
+ - mcp__codegraph__codegraph_explore
9
10
  ---
10
11
 
11
12
  You are the read-only technical verifier for generic ODD work. Read-only means no edits to the repository or its git state.
@@ -16,6 +17,8 @@ Inspect relevant evidence and execute only exact test, build, lint, or spec exam
16
17
 
17
18
  For behavior changes with applicable runnable deterministic tests and a clear expected outcome, test-first is the default: assess observed RED before implementation, observed GREEN afterward, and focused checks after refactor. Do not infer RED from a test file existing or claim GREEN without observed execution. For passive documentation, non-testable changes, an unavailable runner, or no meaningful RED, assess the stated exception and proportionate ordinary functional or structural verification. Test presence alone is not applicability; never demand a TUI or chat toggle, invent lifecycle evidence, or skip checks.
18
19
 
20
+ **Search bounds:** prefer the dedicated `grep`/`find` tools over raw `bash` grep — they honour `.gitignore`. Never run an unbounded recursive scan (`grep -r … .`, `find .` from the workspace root); bound to source directories and pass `--exclude-dir={.git,vendor,node_modules}` (gentle-shell#2686).
21
+
19
22
  When the parent supplies an ODD feature document, read all of it, including the verbatim user entries in `## Log`, and return a verdict per `S#` with evidence (item 5 below). Run the spec's example commands on your first launch; when an example mutates state, run it only against isolated state (your scratch copy or a temporary data file the parent named), then compare the exact output and error text with the spec. Passing tests never prove an `S#` whose example was not executed.
20
23
 
21
24
  ## Spec-derived probes
@@ -33,7 +36,11 @@ Verify the request, not just the writer's implementation. Reuse observed writer
33
36
 
34
37
  A blocker is a defect the change caused or a spec item the change leaves unmet, reproduced with inputs a user could realistically enter. Before calling a finding a blocker, reproduce it at the baseline: a behavior already present at the baseline and not asked to change is a pre-existing advisory, never a blocker. A failure that appears only with inputs outside the realistic domain (amounts beyond any real balance, values past the language's safe numeric range, pathological sizes) is an advisory unless the request names those inputs. Any file, flag, or value a user can feed through the program's own commands is realistic input, hand-edited files included, and a rule the request sets for one entry path holds for every path that creates the same data (an import must reject what the command form rejects). Silently ignoring an option or value the user passed explicitly, with a success exit, is always a blocker, even when a spec rule says another input is kept. An unrequested change to the output, error text, or line numbering of a command that existed at the baseline is change-caused and a blocker, even when it looks like an improvement. Report advisories with their reproduction so the parent can decide; they never require a correction round.
35
38
 
36
- Probe on your first launch; never wait for further authorization. Create a fresh `mktemp -d` scratch copy of the workspace (and of the baseline the parent named) and run every probe only inside your scratch copy or on isolated state the parent named, using the project's own test, CLI, and typecheck commands or command forms the parent authorized. To build it, copy the workspace files without `.git` (for example `cp -a --reflink=auto`, dependencies included); never `git worktree`, `git stash`, or a symlink into the workspace; Create the scratch directory with `mktemp -d` under the system temp directory, never inside the workspace; set `HOME` and `TMPDIR` inside the scratch directory, `NODE_COMPILE_CACHE` there too, and `NO_UPDATE_NOTIFIER=1` for every probe, and leave no new file in the workspace (check `git status` before and after). Keep the scratch path in your commands; never write it, or anything else, to a file outside the scratch. No network, no installs, no writes outside the scratch directory. When a probe needs anything else, report that probe as unverified with its exact command instead of running it. Before returning, list every scratch directory you created by exact path in your result so the parent removes it; never delete it yourself.
39
+ Before isolated setup, establish the required payload, available dependencies, and scratch capacity, including space and inodes when relevant. A smaller copy is permitted only when it includes all source, test/build files, baseline material, and dependencies needed for every authorized probe. If a prerequisite cannot be established, report it as missing instead of blindly copying or omitting required inputs.
40
+
41
+ Make one isolated preparation attempt for the required scratch copies and environment. At the first inability to prepare a required copy, environment, dependency, or helper, stop setup; report one concrete setup blocker and the exact checks left unrun as unverified, not passed. If setup fails before probes, preserve the failed attempt and report zero tests run. Do not retry setup or enter repair-helper loops. Distinguish this infrastructure failure from a genuine code finding or an unavailable verifier capability, and still report every scratch directory created as required below. If preparation succeeds, run the authorized checks and independent spec-derived probes; legitimate scratch scripts and probes remain subject to the existing isolation and permission boundaries.
42
+
43
+ Probe on your first launch; never wait for further authorization. Create a fresh `mktemp -d` scratch copy of the workspace (and of the baseline the parent named) and run every probe only inside your scratch copy or on isolated state the parent named, using the project's own test, CLI, and typecheck commands or command forms the parent authorized. To build it, copy the workspace files without `.git`, dependencies included, by running exactly `mkdir -p "$s/work" && tar --exclude=./.git -cf - . | tar -xf - -C "$s/work"` from the workspace root with `s` set to your `mktemp -d` directory (use the same form from the baseline root), or use the smaller complete payload described above; never copy `.git` and delete it afterwards, because recursive deletion is blocked for child agents, and `cp` has no `--exclude` option; never `git worktree`, `git stash`, or a symlink into the workspace; Create the scratch directory with `mktemp -d` under the system temp directory, never inside the workspace; set `HOME` and `TMPDIR` inside the scratch directory, `NODE_COMPILE_CACHE` there too, and `NO_UPDATE_NOTIFIER=1` for every probe, and leave no new file in the workspace (check `git status` before and after). Keep the scratch path in your commands; never write it, or anything else, to a file outside the scratch. No network, no installs, no writes outside the scratch directory. When a probe needs anything else, report that probe as unverified with its exact command instead of running it. Before returning, list every scratch directory you created by exact path in your result so the parent removes it; never delete it yourself.
37
44
 
38
45
  - Do not edit, write, or fix findings.
39
46
  - Do not run unapproved commands (the scratch-copy probes above are approved), alter an authorized command, install dependencies, or mutate repository state. Outside the scratch directory, authorized commands may create only outputs the parent explicitly identified as expected.
@@ -9,6 +9,7 @@ tools:
9
9
  - write
10
10
  - bash
11
11
  - mem_save
12
+ - mcp__codegraph__codegraph_explore
12
13
  ---
13
14
 
14
15
  You are the package-owned implementation writer for Gentle AI.
@@ -38,6 +39,7 @@ Do not read persistent memory for context. The parent selects and forwards relev
38
39
  - Preserve existing architecture and conventions; avoid drive-by refactors and dependency changes.
39
40
  - Before you create or change shared state (a record, list entry, file, or setting that other commands also create or read), find the existing function that already does it and reuse it, keeping every invariant it enforces (ordering, uniqueness, validation, normalization). Never re-implement that step inline with a different shape.
40
41
  - Use `find` for scoped file discovery. Do not assume an unsupported `glob` tool exists.
42
+ - Prefer the dedicated `grep`/`find` tools over raw `bash` grep — they honour `.gitignore`. Never run an unbounded recursive scan (`grep -r … .`, `find .` from the workspace root); bound to source directories and pass `--exclude-dir={.git,vendor,node_modules}` (gentle-shell#2686).
41
43
  - **Batch tool calls:** every turn is a full model call, so issue independent calls together in the same turn (parallel tool calls) or read several files with one command, and read each relevant file whole once instead of many small ranges. Make all edits to one file in one `edit` call, and run the focused test and the suite without status-only turns between them.
42
44
  - Use `blocked` only for a non-human technical blocker such as a missing required tool, denied filesystem access, or an impossible repository invariant. Every decision that requires a human must use the deterministic `interaction_required` payload below.
43
45
  - Treat tool errors, unrelated dirty files, and failing unrelated tests as evidence to report, not problems to hide or rewrite around.
@@ -70,6 +72,8 @@ For passive documentation, non-testable changes, an unavailable runner, or no me
70
72
 
71
73
  Run focused tests first. Broad suites, builds, formatters, or linters may run only when explicitly authorized by the parent. Keep every command exact and verify its scope before execution. Do not claim completion while required validation is failing. Make one correction attempt per failing check, and a second only if the same check still fails after a real fix; then stop and return `status: partial` with the failing command and its output, never looping.
72
74
 
75
+ After the correction bound is exhausted, stop and return `status: partial`; report the concrete remaining implementation work, failing commands and outputs, and missing proof, and identify a scoped continuation the parent can offer for explicit human authorization, including its scope, executor, correction limit and checks. This handoff is not authorization to continue. Do not start a fresh correction cycle or treat a new session as a reset; native authority and all other applicable limits remain binding. Worker-local exhaustion is not by itself a feature-wide ban on specifically authorized compilation or implementation, but missing proof still blocks completion and delivery.
76
+
73
77
  Test scratch lives outside the worktree: tests and commands keep temporary state in a fresh system temp directory (`mktemp -d`, `mkdtemp`) and never point `TMPDIR` or a cache directory into the repository. When state must live inside the worktree, use an excluded path that the test removes before it ends. Tests delete the temp directories they create in teardown; name any scratch directory you created outside the worktree in `risks` so the parent removes it. Never leave tool caches or scratch paths in the change.
74
78
 
75
79
  Before returning, `git status --short` shows no tool cache or scratch path (for example `.codegraph/` or a test temp directory); name any that remains in `risks` instead of deleting it.
@@ -8,6 +8,7 @@ tools:
8
8
  - edit
9
9
  - write
10
10
  - bash
11
+ - mcp__codegraph__codegraph_explore
11
12
  ---
12
13
 
13
14
  You are the Judgment Day fix agent for Gentle AI.
@@ -7,6 +7,7 @@ tools:
7
7
  - grep
8
8
  - find
9
9
  - bash
10
+ - mcp__codegraph__codegraph_explore
10
11
  ---
11
12
 
12
13
  You are Judgment Day judge A for Gentle AI.
@@ -7,6 +7,7 @@ tools:
7
7
  - grep
8
8
  - find
9
9
  - bash
10
+ - mcp__codegraph__codegraph_explore
10
11
  ---
11
12
 
12
13
  You are Judgment Day judge B for Gentle AI.
@@ -153,6 +153,14 @@ button:focus-visible, select:focus-visible, textarea:focus-visible, .gd-viewport
153
153
  background: var(--gd-stage);
154
154
  cursor: grab;
155
155
  touch-action: none;
156
+ -webkit-user-select: none;
157
+ user-select: none;
158
+ }
159
+
160
+ /* Editable controls keep their native text selection inside the viewport. */
161
+ .gd-viewport input, .gd-viewport textarea, .gd-viewport [contenteditable]:not([contenteditable="false"]) {
162
+ -webkit-user-select: text;
163
+ user-select: text;
156
164
  }
157
165
 
158
166
  .gd-viewport.gd-panning { cursor: grabbing; }
@@ -320,7 +328,11 @@ button:focus-visible, select:focus-visible, textarea:focus-visible, .gd-viewport
320
328
  .gd-commenting .gd-shield:hover { background: transparent; box-shadow: none; }
321
329
  .gd-commenting .gd-shield-hint { display: none; }
322
330
 
323
- .gd-viewport.gd-focused { cursor: default; }
331
+ .gd-viewport.gd-focused {
332
+ cursor: default;
333
+ -webkit-user-select: auto;
334
+ user-select: auto;
335
+ }
324
336
  .gd-focused .gd-artboard:not(.gd-focus-board) { opacity: 0.25; }
325
337
  .gd-focused .gd-focus-board .gd-artboard-frame { box-shadow: 0 0 0 2px var(--gd-accent), 0 2px 16px rgba(0, 0, 0, 0.5); }
326
338
 
@@ -237,17 +237,26 @@
237
237
  handleWheel(event.deltaX, event.deltaY, event.deltaMode, event.ctrlKey || event.metaKey, event.shiftKey, event.clientX, event.clientY);
238
238
  }, { passive: false });
239
239
 
240
+ function interactiveTarget(target) {
241
+ const editable = target.closest("[contenteditable]");
242
+ return Boolean(target.closest("button, a, input, select, textarea, iframe") || (editable && editable.isContentEditable));
243
+ }
244
+
240
245
  // A press on a shield pans like the background; released without moving, it is a
241
246
  // click on that artboard: a routed pick in comment mode, else focus mode.
242
247
  let drag = null;
243
248
  els.viewport.addEventListener("pointerdown", (event) => {
244
- if (state.focus || event.button !== 0 || event.target.closest("button")) return;
249
+ if (state.focus || event.button !== 0 || interactiveTarget(event.target)) return;
245
250
  const shield = event.target.closest(".gd-shield");
246
- if (!shield && event.target !== els.viewport && event.target !== els.world && !event.target.closest(".gd-artboard-label")) return;
251
+ event.preventDefault();
247
252
  drag = { id: event.pointerId, x: event.clientX, y: event.clientY, startX: event.clientX, startY: event.clientY, moved: false, board: shield ? boardOfShield(shield) : null };
248
253
  els.viewport.setPointerCapture(event.pointerId);
249
254
  els.viewport.classList.add("gd-panning");
250
255
  });
256
+ // An old text selection can still initiate a native drag and cancel the pan.
257
+ els.viewport.addEventListener("dragstart", (event) => {
258
+ if (!state.focus && !interactiveTarget(event.target)) event.preventDefault();
259
+ });
251
260
  els.viewport.addEventListener("pointermove", (event) => {
252
261
  if (!drag || drag.id !== event.pointerId) {
253
262
  if (!drag) hoverAt(event);
@@ -12,6 +12,7 @@ const LOG_LIMIT = 200;
12
12
  /** Human labels for every step the runner logs. Unknown ids are shown as-is. */
13
13
  export const stepLabels = Object.freeze({
14
14
  gate: "Safety checks",
15
+ "resolve-pi-version": "Find the latest stable Pi version",
15
16
  "prepare-pnpm-home": "Create the private pnpm folder",
16
17
  "check-npm": "Check npm",
17
18
  "check-global-bin": "Check the pnpm global bin directory",
@@ -0,0 +1,162 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "bodies": {
4
+ "agents/gentle-ai-explore.md": [
5
+ "1436a9d11151b23a3b78ca42fe94658d7f074af38136b471cd4c015aa0dfff26",
6
+ "389c74cc4d949acaad20f21a13606755f46a73e74f07325851d44c445b1b689b",
7
+ "956418197652f430b1a4339c2912f11f3df64374751667759bdc84346f2508a0",
8
+ "a37cf617e8819e9ddc33c385f55520d70522c5bce77592dd997fe73fe0c36a00",
9
+ "ab0510e040ae7c2293ecf334153b1d91482a3ec79ea4bda6db97027db08a0144",
10
+ "bc09d5024127ed5b3789b377a0c55069d400d2ae405f3d4fe0b966a85f8b8068",
11
+ "e1cba02e63d2f726c513359c45263ae662847c45e13fd4e99ef3c402801f8c65",
12
+ "e7bb6042688f9573b73b45b12802c9d598c903b518cffa6ce9128ab6cce82122",
13
+ "f0a2571f4b97cb4be56d0c74452ba922be31123a437e6da3ddd20eb78711c2d1",
14
+ "f2edcf189dacb0f3294f0c0c2039374ce612543182b78c4a410687bc61e6375f"
15
+ ],
16
+ "agents/gentle-ai-verify.md": [
17
+ "0c8df3faa0ed131fc621f716b13d3fcd9eae7763412a479e696cecf751d653b4",
18
+ "0ddacbfbe1d61d6ef984b9b621ca36b745ff3841e9ca16ac5983706d3a081cd7",
19
+ "0eaaa30d4ca6f32a7281929beddb7769645534c6089bf3a6b88ada61fd8d4ec5",
20
+ "106ffe40e2a7cd5a81200ee2c333c72672baa24d28d2808b8d0179913c462c14",
21
+ "24eb8897439b63eee8d03e8292ea337c15438cd2d647fbb38e19e7caf613bc78",
22
+ "2d77c1ddd78c3402381f8d8e336e261e7354e6a5a482f3cf2d3d988c0a59a7eb",
23
+ "375a4c092c2a52e1d7ddd2ef68d9c374d90ae62b85c0096ce0e3374f6eb05402",
24
+ "45d4c9c8960a4975e0ae8406fcfb8e925f4bccdbc459cc111e538be9d621b091",
25
+ "62b61daf53459b21dca599667e49e66a87c8e25894eb02ddff5d334fa1bd159a",
26
+ "642de8acfc92b3d3351cc0eef70d96b2c0d836b37ba322c8426f76ae6d44f8b6",
27
+ "655a3089deb63c94de24e741e5a50d4bcf9435a7ecefe2ca1bc9d3b5de994383",
28
+ "7c93729f53c733c92acb37af89344c5b9446658c9bf110ad7276569937e28352",
29
+ "8b5828c1631392ea3f7e34927279d942af7886203623ef6cdc5e612e60edc690",
30
+ "8cfa5a7b20e16b7577823204205824c79b4658b9f664fdc0ff03915bd39476d4",
31
+ "92aa296e777badc756a5d2f1a527ac6b2db6b17bdce738f100ed4f0ae1a1dc75",
32
+ "9767d2720f3c0bdf08c32b4025a67398d84e7734c7d259c9008d9df85c7e75da",
33
+ "a1a7913bf7efa76bfc667be281b0f3ce7e2ca32338377cc340d809020730e63f",
34
+ "b958fa5e29675034280a18b556b9b7ea90d5a5ffdcc7207abdcb24c62ff555e1",
35
+ "c47a862f31ad1833e3cf2f540079db32caae1b00ddb8a617deddc00059317bf5",
36
+ "dc5712ef3fcc30de3fbef08805769e00903206d22f8feef0faee5e73d209ebba",
37
+ "e791567f661f06017c6ed6d7bfc8357029516eb40525da39eb00a0525587ebf3",
38
+ "e85f2da2bb4fc40e0662e37b5afcb050ba00704fbcb32eaec58b32ab95a47fe5",
39
+ "ea9b01f6f97a12ed37471b86d338f3d4d6a1decba806464b085817ae0057961d",
40
+ "ece25e172a3f3c4614040da00cdeaf4fad2c3d8c62cfe02ca9c184f46d01c752",
41
+ "fd074e7cf5ecc25ec334d2c8db7d0507bb14061074157158199a90ac0af0a3d0"
42
+ ],
43
+ "agents/gentle-ai-worker.md": [
44
+ "0000cf664ae3d7186f861a65a0635eb738afa0c59b492906af5cb4c4e666c418",
45
+ "0cddd8508e4f0ce34ecd06e48cfd4037e9ec5bb0fdc3d77ff40537b110b931d1",
46
+ "1178dcf29e31ebdf81c8667c89da604f186f1056a629aa1993424fa25d90b111",
47
+ "1bbe61ae83655f349a2a813f8a59f7ddde15f9d730d706e5b23b1d72a24eba78",
48
+ "26feb5e62e54494799b388cbb959c8ec4f94e9530555ddde9a64dac2fbb04938",
49
+ "42e39b8659926d6509dc42dac8beb2d1a8876e1a9507cb3f93f417e041566230",
50
+ "4caf5a849e40aea3fdaa060a0ae1aecccf510d1440a01de1a3e356c391420b21",
51
+ "5864fda40e03b74748cb3de4815440bba22a0d28bc39eff129c1fd6097ee8808",
52
+ "6010bc8878d509ce606b48dd11ef1655565dcdeb58e54f15fceaf45a5d6d3d5b",
53
+ "62db7da32efc8481c229d88203d302b6c35a608d04d3c827ed23f8ae3f233dbb",
54
+ "67c05b8230edb04e32b6e4170a1a1e4aea32d1f06654f32c25c7bb036711c260",
55
+ "6b0f46ae30ae40c3c02ef6e59f4d8e24d79e9c99142f5d98d431e44d4f7b6afd",
56
+ "742f28df68fb6a96f75a9b0aa5b13a1404979abb32f4a73f4c61466f9743f1c3",
57
+ "844d72d6158e7b7727ec6e26454bfe684e704e8f705f19487a689db0de441f41",
58
+ "86063adefe9a61b8c4a9ae13a96f03704a7fd6dcf814650d5cb945fb9edc4363",
59
+ "891abb5122bf7df043393739a3b27a197dd5c04aa82f92a4807beb878571c627",
60
+ "92547d91843f2e9642305c6607b03c90063962237ff9e11c46d3f2ff4604ebe4",
61
+ "9c02d247e11d89fbde5975d13cb3fd8d74ded6c6b8777c91db7c083d7db0f26b",
62
+ "9c1646f893904d1fe6da24c592b90ae214ef8e7429de840225066b2a1b204081",
63
+ "a6af4ed80fd3b74061a5efa1fcf2527c64db72dcded3f3a98b353998c99057cf",
64
+ "aea936c9be526adb94fc2e215472c61cc99e6d31d0cc45383a18bcdc40c96c10",
65
+ "b7b7947b8535c1209807b2b7153aadc4b4020a362e1b9e2413c14225e0614b2f",
66
+ "b96f8e062ec534c13510bfefee46bb31cf9ca65f437fbb601b322461ef8fbbf9",
67
+ "c08804e7674aa1908baf7992c006ae641bd9ccea155506f5304f3e782a02703d",
68
+ "c317b419b95e33b25809575a1f9508068dddd95fd7a49faa6e767f58f0cff136",
69
+ "e3751bc757d3f2d5a809d08791778e689a606ac8662614995401d0a7a2f5f227",
70
+ "e4e19c666892c5fdc789a5555485873d7a2a644064dfec9771fcfb224dd34040",
71
+ "e9d2a7babaef1fb3fb62133cd122914fc38c1e6b7015b307cb1542278311b121",
72
+ "effa58a1b42a8aeed203ecaf4d02abf8da0e7cade11876ebf3410e213f14b2fc"
73
+ ],
74
+ "agents/jd-fix-agent.md": [
75
+ "636726fad70624051bfe2c81302dae34dd04c7c7d181cd0237dcd8139f844a6f",
76
+ "6ef3c3801fcf17acba6b2a2e6fd32c5a66a3bf6bc8f3f9841d74ae5a98a3f030",
77
+ "7614d2f87ae011b1b3163d0ea0f4cc506fc503addeffab1378609629adfc6d53",
78
+ "79d11f0c8609f46029c543338a36a28bf4b23bb8a24b075d2c6b0e40b77e3daa",
79
+ "812951941f17833ef9967ce1bb9ba84ce0955932be68d4adaf357d2e8ce5e18d",
80
+ "b0d2220bea773ae1d24c4d849a795b66958f0b7064493105b92a4d3c1d2ce9fb",
81
+ "d281ebc2e96151190f8c8a0b3ff712082746b1a7ce1182a5e9a89ec7b529018b"
82
+ ],
83
+ "agents/jd-judge-a.md": [
84
+ "197c50be42e8c335852af8ac0ffe7024b171c4909b57cec0cfe4fa38bb312973",
85
+ "2ce38f9cfa767b2e4694c604733ae0ee76b96ae256a246b5ce5eae2f994fc8e7",
86
+ "59fb0579a4104fa786be417af762c9d662ea49e58a3ab7d13f2d227ad4ee4446",
87
+ "5bb9343e6dc99740cfe0c0b45b04949eca67a0364c3263379fc7129089ad0ec7",
88
+ "674c17dc7ed52aa7e5d6022c1d0bb5e1a38c5d25af4f190db00dc56ac2567b64",
89
+ "7c933641029fbe84dd64d37f8fc568d5ab2b7c1d27d1a583386e56443303b9a7",
90
+ "af630de5152efa988193b4a4674a262dd7cf808bc342cad4db7b3068f36d258d",
91
+ "d3c28748de9cc21d83d9797ae2b97d2f08b28fa1f32d0910b9f519953f20beed",
92
+ "f186dc18019fefbe151573fd391a43c19063aaf4b45ee4f98aef961c6d44bd9f",
93
+ "f4226a3ca47c89462b389cf257efeefd7eec5f97237d95284aaecf7787e1bd5b",
94
+ "fd4c5d6e0c4b0adcf662418277d15fec6932ad7ee9079c0d8c66fd9a8e19aa75"
95
+ ],
96
+ "agents/jd-judge-b.md": [
97
+ "182106d3ba2cf66a316db57dd9991d1d3f19fbde7eeda4961d44a6919e87a498",
98
+ "6c6e4952e3ba84cdd144d417d63ec46c1b1eec04400614f7a66009f12619318b",
99
+ "78c99b242a24fb91de234c7604d45cc02b79862176add92ab888ee66c98905e0",
100
+ "79e91ccd3b9e8b27206f97e88bfe7aec95430cf3adec10a1a289620b9f0f0e8b",
101
+ "7cefac81c3fde087215aeb8788334f9096533332afa4a6b553b0d508de26151b",
102
+ "9475e2f73dad908eaaaaca62cb36e6294d99895b0894270cad8cb78a92273e1f",
103
+ "a408834b59786245e928859f39a6a46f4fe56b1cff78af2b0a083dfdad47f73c",
104
+ "b81a110699366701f9a594186895581e637b1aa674170acdcde2f86401698df0",
105
+ "bb984b2623c2e551540af7349c5b64fbc10fb83a2a7f33b7f1b2e5136b4f2825",
106
+ "ce35b9ff066176d96a55eb3cdeb72537ace5b1110677291aa2e5433403918530",
107
+ "dd5e37efcf57a10f0c9ddcd04f2c7578e8ddf938b9e4e7f9c129084a7a38c67e"
108
+ ],
109
+ "agents/review-readability.md": [
110
+ "03c7b1164de55384fd9925e3b4a36dcbcbfdcb97613ff20a0f3a31d9cdfd0bea",
111
+ "2d1606390093c73079a2c75f11d8ec0a51c62a9007d332c00e62f6b05ad475eb",
112
+ "302382c7f6d2d4932adcfc86a7ef5e91ca2cca1e2611b41aa40e73fda782d406",
113
+ "77e511fa51a8b3a6f07b678da04ad21e3e1f70ad13c90c09816e299f2471ebc5",
114
+ "824562d9f29632938104a79e9605ab1f967a2b925f389cf06a2ffd59a1299906",
115
+ "a8b7329d022767bbd3f3abdf3854f5160ada9c34f41dd2191515a69b56b6baca",
116
+ "ca1a6a2db4eac5d694acccace5b934fe33f5233f967a0e035c8ba0af1bb8c890",
117
+ "d1a11e867d569e1400603415576ffb42c06bef8eb7818d30659734b1eae9b120",
118
+ "d3f2f3f63138aef1c25410a5972ac4f95bb479cc6eec4782c1affca0fa168ebb",
119
+ "ec3cf8a5281c313e9004318ee04c35fa4fe584b69751575eed66c49d0bae562f",
120
+ "f60e94b17853581ad11177699744b3a3612584752f126125f939352b6313acd3"
121
+ ],
122
+ "agents/review-reliability.md": [
123
+ "1aec3e29f7fcf3c9b227d6b0dcbc670bd692cb8610d06fd8e2c3baa22094ef15",
124
+ "57757fb2404725142bc1162340596b1da04ad56ec429438444fba42b52ba62d4",
125
+ "66663a6017bcb20487410948028a60e7c46a8393f7d839c099a4ae603a4352db",
126
+ "72323c90a4c9a89be3f5f877507af2a44d4abad2d5424b9059915cdbdc376d6f",
127
+ "825e283bdd2a27aec20d192d13165ac6e8f78eaae76b3ab3cf6b85e2e355a4a6",
128
+ "8aa4108d332b6a0df56955684681370e3db191fa9d083af5a8489825ffcb437a",
129
+ "90999eed8fab6a66f9f25e77e4e82e21c15ec2ea7b25f9513c80017763c27fe1",
130
+ "99fb57b165d61e9aec15f6ec8dfa529b62c651a435a80e393d497468ad5f9222",
131
+ "a77e00377caef02167e70ef58297809cae55d3f264103cf4b452f0abc1d3ce47",
132
+ "bba81b607ff7e43b1c73a5b956fed2047b3585aba7e3d515cd4258c531eb25fd",
133
+ "f82e05ad287f9eb7d1d97a111c2fa2b83a2c05f61720e89188fe847f8895860e"
134
+ ],
135
+ "agents/review-resilience.md": [
136
+ "0eea216a510e730fd557a430f74220252a9428b6423cfdafb2489285bdab6aea",
137
+ "1937166959285b0fb294b5dfa6b7a7bd4350ddc32840dc54d737ab5e5c1bfd88",
138
+ "1a3a0840f8a86d6b0fcae8820a558936e51265aa9c0c016d5816af6aa53330ac",
139
+ "31380a35ddde77e41305d4bf743abfe542958f7ffd815def18fbbf3dfeca034f",
140
+ "38cf7b46f70bff0832320ca0f2befbc5ceb9d31f61bcdcef60864738b93031f2",
141
+ "54ad6cb64decfe063b8d6d42d16ba54e0cdc020e3515ab4a118157da2c0eef41",
142
+ "8cb2b41594f02c624e802c28f05dfa34b25129fd20cf45c425fa3e9485df65c9",
143
+ "cb611a4dff480468c7fb56cc4a1d54b4ea5f1f94a31ee51a49839e2c9c66a513",
144
+ "d244046cdf0255610505548751a73c06064e4c8cbc10976800674ff7712cfe81",
145
+ "d28ff69aff5a75d9ea529c535a47c270b326e76096cd279c8d2d83fe3d3bd703",
146
+ "e8848192c9329bd804eefbf422903f637a03d9cc503e1d2c27504431a936f65b"
147
+ ],
148
+ "agents/review-risk.md": [
149
+ "0ce1cdd03a37339f212917e29e13970525027a8ea905b8f1dd7dc5781ca9f30e",
150
+ "4cf2bb6b41a486488093479c5c80e4a415170496d6fc665c1f4002374d8a7074",
151
+ "6a8dd122d774c4f72a5cb4612677647aa00620f4c69ab4a9404f39c22c09343a",
152
+ "75af4c02b5408affdfbdc1b5675cdd15a8f3c5688ed72b9284705d9d8448bc4f",
153
+ "86ec32259ce97a77e61947b06d4fbcad713a389f39e989e2842fc1e193fa2288",
154
+ "965a4af892e8f3d5e2b1512b0af360d0df8d95c915db5da8a7b5bf1ec06e9e41",
155
+ "9f9d172cc55e28c5abaa753ee4cd3088d9e8821afb895a3e2a8e8ab5f8cde1ec",
156
+ "ab0b80cce8d55a5c415e3af8c87f0c1b6b58c26aa928adf30cc40459b611c017",
157
+ "ee69cd46c1fbb6fcca26cf83e87a9482297ffa7e0d97ce658455b24d0f4f13f5",
158
+ "f3d961a26806e612739baef984bc9e8acaba36f00b414c8d0dbe5e587df0324c",
159
+ "ff72301b1db1131ae6a63919201b001f65ee7157f8b7a13caa0d0a44e06195aa"
160
+ ]
161
+ }
162
+ }
@@ -45,15 +45,15 @@ Progress is published automatically from the todo list: never call `orchestrator
45
45
 
46
46
  | Action | Direct inline | Delegated direct worker |
47
47
  |--------|---------------|-------------------------|
48
- | Read to decide/verify within the evidence budget (one parallel batch: at most 3 calls, ~10k tokens) | ✅ | — |
48
+ | Read to decide/verify within the cumulative evidence budget (one parallel batch: at most 3 calls, ~10k tokens) | ✅ | — |
49
49
  | Read to explore/understand beyond the evidence budget | — | ✅ one narrow explorer (handoff of at most ~2k tokens, `path:line` evidence) |
50
- | Read as preparation for writing | — | ✅ together with the write |
50
+ | Read as preparation for writing | ✅ for understood inline work | ✅ together with the delegated write |
51
51
  | Write a small task (one understood change, any number of files) | ✅ | — |
52
52
  | Write a large task with no Writer rule reason | ✅ following the logbook | — |
53
53
  | Write a unit with a Writer rule reason | — | ✅ one bounded writer per unit |
54
54
  | Bash for state (`git`, `gh`) | ✅ | — |
55
55
  | Focused test and suite of the change being made | ✅ in one command | — |
56
- | Named high-risk item (assess `escalate`), or long suites, builds, or installs of a large task | — | ✅ independent `gentle-ai-verify` |
56
+ | Named high-risk item (assess `escalate` when RDD is on or unknown), or long suites, builds, or installs of a large task | — | ✅ independent `gentle-ai-verify` |
57
57
 
58
58
  Use the platform's native bounded worker for delegated-direct work.
59
59
 
@@ -61,7 +61,7 @@ Keep each delegated writer bounded, with a short synthesized handoff. Delegation
61
61
 
62
62
  #### Pi Trigger Runtime Bindings
63
63
 
64
- Once a trigger fires, the parent MUST delegate through the best available subagent runtime. Prefer `subagent_run` when present; otherwise use Pi's native `Agent` or another available delegation mechanism. Do not replace a required delegation with inline execution. Do not inject these as child-agent permission to spawn subagents; children receive concrete role work and must not orchestrate.
64
+ Once a trigger fires, the parent MUST delegate through the best available subagent runtime. Prefer `subagent_run` when present; otherwise use Pi's native `Agent`; never fall back to an external pane, terminal, session, window, or remote worker. Do not replace a required delegation with inline execution. Do not inject these as child-agent permission to spawn subagents; children receive concrete role work and must not orchestrate.
65
65
 
66
66
  The canonical Writer rule under Delegation Triggers overrides this general runtime preference.
67
67
 
@@ -105,13 +105,13 @@ When the policy is on and `subagent_run` is available:
105
105
 
106
106
  Waiting on CI, a build, or a server is not delegation: use `bash_background` with the wait inside the command and end the turn. Never `sleep`, poll, or spend a subagent to wait.
107
107
 
108
- For generic mapping, follow the Evidence-budget rule under Pi Trigger Runtime Bindings.
108
+ For generic mapping, follow the Evidence-budget rule in the delegation card.
109
109
 
110
110
  The canonical Writer rule under Delegation Triggers overrides the general runtime preference above.
111
111
 
112
- Delegate generic verification that executes or delegates commands per the RDD-aware Verification rule (trigger 3 under Delegation Triggers, gentle-pi#661) -- the normative on/off/unknown routing lives in `orchestrator-verification.md`, not here: the bounded writer always self-verifies via `## Verification`, and the `gentle_review` `assess` operation's returned plan decides whether `gentle-ai-verify` (or the native `Agent` fallback, with the same read-only verification constraints, exact parent-authorized commands, and fallback reporting) also runs, by a named `escalate` item and whatever the rendered `Receipt-driven development:` line reads, instead of a blanket non-trivial rule (gentle-pi#662). `## Known environmental failures` follows the same definition as `gentle-ai-worker`'s Verification contract: exact pre-existing base failures reported as evidence, never blockers -- any other failing required command still forces `status: partial`. The change's own focused test and suite run inline. Separate exploration stays reserved for when the parent needs the map to decide or route; reading that prepares a write belongs with the writer making the change, consistent with the Delegation Rules table above.
112
+ Delegate generic verification that executes or delegates commands per the RDD-aware Verification rule (trigger 3 under Delegation Triggers, gentle-pi#661) -- the normative on/off/unknown routing lives in `orchestrator-verification.md`, not here: the bounded writer always self-verifies via `## Verification`; a named high-risk item also requires `gentle-ai-verify` (or the native `Agent` fallback, with the same read-only verification constraints, exact parent-authorized commands, and fallback reporting). When RDD is on or unknown, use the `gentle_review` `assess` plan and named `escalate` item; validated off does not require assessment (gentle-pi#662). `## Known environmental failures` follows the same definition as `gentle-ai-worker`'s Verification contract: exact pre-existing base failures reported as evidence, never blockers -- any other failing required command still forces `status: partial`. The change's own focused test and suite run inline. Separate exploration stays reserved for when the parent needs the map to decide or route; reading that prepares a write belongs with the writer making the change, consistent with the Delegation Rules table above.
113
113
 
114
- For delegation other than a large task's bounded writes, use the generic fallback: if `subagent_*` tools are unavailable, fall back to Pi's native `Agent` tool or another available delegation mechanism. The delegation trigger remains mandatory; the fallback changes the runtime, not the requirement to delegate. If no delegation mechanism is available, stop the complex work and explain the blocker instead of silently continuing inline.
114
+ For delegation other than a large task's bounded writes, use the generic fallback: if `subagent_*` tools are unavailable, fall back to Pi's native `Agent` tool in the current runtime; never fall back to an external pane, terminal, session, window, or remote worker. The delegation trigger remains mandatory. If no delegation mechanism is available, stop the complex work and tell the user instead of silently continuing inline.
115
115
 
116
116
  #### Pi Subagent Model Routing
117
117
 
@@ -15,11 +15,11 @@ Before delegating, declare a subject via `orchestrator_session_id` (reference).
15
15
 
16
16
  #### Delegation Triggers
17
17
 
18
- These are parent-orchestrator routing boundaries; do not pass these rules to child agents as permission to orchestrate. Each trigger holds only when its condition truly holds, and only then is it mandatory, not advisory; no trigger holds by default, and when in doubt work inline. When one fires, stop and delegate through the runtime's subagent mechanism before continuing; executing past a fired trigger inline is a routing defect even if the work succeeds.
18
+ These boundaries do not authorize children to orchestrate. Each trigger holds only when its condition truly holds; none holds by default. Inline stays within the evidence budget. When one fires, stop and delegate through the runtime's subagent mechanism before continuing; executing past a fired trigger inline is a routing defect even if the work succeeds.
19
19
 
20
20
  1. **Ask:** an open product or design decision gets one focused user question; stop and wait.
21
- 2. **Mapping trigger (Evidence-budget rule):** read inline only when the evidence fits one parallel batch of at most 3 calls totaling ~10k tokens. When understanding needs more or over ~5 sequential lookups, delegate one explorer returning a handoff of at most ~2k tokens with `path:line` evidence; never for a small targeted question; then re-evaluate task size. Never explore to read files you will read anyway before writing inline.
22
- 3. **Verification rule** (gentle-pi#661/#662, RDD-aware): only a change whose Risk line names a high-risk item (Task Size, assess `escalate`) gets an independent `gentle-ai-verify` run after the change's own checks, as rarely as possible; otherwise whoever made the change runs its focused test and suite inline, small tasks included. Routing: `orchestrator-verification.md`.
21
+ 2. **Mapping trigger (Evidence-budget rule):** read inline only when the evidence fits one parallel batch of at most 3 calls totaling ~10k tokens. Reassess cumulative discovery after each batch; never reset it. When understanding needs more or over ~5 sequential lookups, delegate one explorer returning a handoff of at most ~2k tokens with `path:line` evidence; the trigger overrides initial size, including for read-only work. Re-evaluate size after. Preparation for an already understood inline write stays inline, not further discovery.
22
+ 3. **Verification rule** (gentle-pi#661/#662, RDD-aware): only a change whose Risk line names a high-risk item (Task Size, assess `escalate` when RDD is on or unknown) gets an independent `gentle-ai-verify` run after the change's own checks, as rarely as possible; otherwise whoever made the change runs its focused test and suite inline, small tasks included. Routing: `orchestrator-verification.md`.
23
23
  4. **Track:** a large task gets the feature document, Engram mirror, `todo`, and work-unit commits (`orchestrator-memory.md`).
24
24
  5. **Writer trigger (Writer rule):** a large task alone never delegates, and file count never fires this trigger. Delegate one bounded writer per unit only for a named reason: (a) parallelism — 2+ independent units of behavior with disjoint edit surfaces, each needing several minutes of work (several files or ~100+ changed lines; a subagent spends 1-2 minutes reading before it writes), launched together; (b) context — the Context backstop below. A unit is one independent piece of behavior with its code, tests, and docs together: never split one behavior into test, docs, and code writers; a delivery that depends on another is not independent; several small independent changes run inline, one after another. Units of about 100 changed lines or less always run inline: writing them costs less than starting workers. The runtime admits writers only for a feature-document task or at the measured context backstop. Never for a price ratio. Without a reason, the parent works inline, following the logbook (feature document, mirror, `todo`, work-unit commits).
25
25
  6. **Incident rule:** after a wrong `cwd`, accidental repository/worktree mutation, failed merge recovery, or environment workaround, stop and diagnose it separately before resuming.