gentle-pi 4.6.0 → 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 (290) hide show
  1. package/README.md +10 -11
  2. package/assets/agents/gentle-ai-explore.md +1 -0
  3. package/assets/agents/gentle-ai-verify.md +5 -2
  4. package/assets/agents/gentle-ai-worker.md +3 -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 +16 -1
  12. package/assets/orchestrator-delegation-reference.md +4 -4
  13. package/assets/orchestrator-delegation.md +1 -1
  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 +7 -5
  20. package/assets/orchestrator.md +3 -3
  21. package/bin/gentle-shell.mjs +164 -56
  22. package/docs/agent-status.md +61 -0
  23. package/docs/bundled-install.md +7 -5
  24. package/docs/delegated-verification.md +29 -7
  25. package/docs/gentle-agents-activity.md +14 -0
  26. package/docs/gentle-shell.md +54 -16
  27. package/docs/install-wizard.md +1 -1
  28. package/docs/permission-modes.md +9 -4
  29. package/docs/readme-reference.md +75 -30
  30. package/docs/render-cache-performance.md +11 -1
  31. package/docs/review-coordinator.md +33 -0
  32. package/docs/review-request-context.md +19 -0
  33. package/docs/review-windows-acl.md +18 -0
  34. package/docs/voice.md +6 -3
  35. package/docs/yolo-mode.md +5 -5
  36. package/extensions/ask-user-choice.ts +1 -0
  37. package/extensions/ask-user-question.ts +1 -0
  38. package/extensions/child-safety.ts +3 -0
  39. package/extensions/gentle-agent-status.ts +99 -0
  40. package/extensions/gentle-agents.ts +326 -34
  41. package/extensions/gentle-ai.ts +1496 -454
  42. package/extensions/gentle-shell.ts +293 -63
  43. package/extensions/gentle-todo.ts +18 -2
  44. package/extensions/gentle-tps.ts +48 -0
  45. package/extensions/quiet-tools.ts +38 -8
  46. package/extensions/skill-registry.ts +175 -18
  47. package/extensions/startup-banner.ts +30 -3
  48. package/lib/agent-profile-pin.ts +3 -3
  49. package/lib/agent-profiles.ts +160 -2
  50. package/lib/agent-status.ts +105 -0
  51. package/lib/agents-config.ts +46 -0
  52. package/lib/agents-history.ts +24 -5
  53. package/lib/agents-messaging.ts +47 -5
  54. package/lib/agents-runner.ts +183 -12
  55. package/lib/auto-permission-runtime.ts +1 -1
  56. package/lib/bounded-writer-admission.ts +13 -1
  57. package/lib/card-content-policy.ts +8 -6
  58. package/lib/command-palette.ts +133 -17
  59. package/lib/context-backstop.ts +14 -5
  60. package/lib/destructive-command-guard.ts +48 -4
  61. package/lib/execution-surface-guard.ts +20 -0
  62. package/lib/exploration-budget.ts +4 -2
  63. package/lib/gentle-ai-binary.ts +1 -1
  64. package/lib/gentle-design.ts +3 -0
  65. package/lib/gentle-shell-bundled.ts +6 -19
  66. package/lib/gentle-shell-launcher.ts +43 -8
  67. package/lib/herdr-activity.ts +14 -2
  68. package/lib/herdr-busy.ts +45 -0
  69. package/lib/image-attachments.ts +33 -0
  70. package/lib/image-disk-cache.ts +137 -0
  71. package/lib/inprocess-reviewer.ts +270 -140
  72. package/lib/jobs-view.ts +198 -11
  73. package/lib/model-routing-authority.ts +22 -4
  74. package/lib/native-choice-list.ts +20 -2
  75. package/lib/native-review-cli.ts +96 -19
  76. package/lib/orchestrator-mode-policy.ts +105 -0
  77. package/lib/questionnaire/questionnaire-view.ts +105 -12
  78. package/lib/rdd-mode-control.ts +32 -0
  79. package/lib/reply-language-anchor.ts +104 -0
  80. package/lib/review-blocker.ts +92 -0
  81. package/lib/review-candidate-symlink-scan.ts +136 -0
  82. package/lib/review-candidate-view-owner.ts +81 -44
  83. package/lib/review-continuation-registry.ts +99 -0
  84. package/lib/review-coordinator.ts +163 -0
  85. package/lib/review-failure-facts.ts +49 -0
  86. package/lib/review-host-relay.ts +46 -10
  87. package/lib/review-integration-v2.ts +7 -1
  88. package/lib/review-relay-phase-timing.ts +45 -0
  89. package/lib/review-start-context.ts +17 -0
  90. package/lib/session-profile-freeze.ts +4 -2
  91. package/lib/shell-bar.ts +140 -58
  92. package/lib/shell-changes.ts +2 -0
  93. package/lib/shell-panel.ts +17 -3
  94. package/lib/shell-sidebar-layout.ts +112 -40
  95. package/lib/shell-sidebar.ts +7 -0
  96. package/lib/shell-todo.ts +10 -3
  97. package/lib/verifier-admission.ts +1 -1
  98. package/lib/visual-customization-policy.ts +36 -16
  99. package/lib/visual-customize-view.ts +216 -21
  100. package/lib/visual-layout-preview.ts +9 -5
  101. package/lib/visual-profiles.ts +2 -2
  102. package/lib/windows-session-transport.ts +53 -2
  103. package/lib/yolo-session-policy.ts +40 -15
  104. package/package.json +2 -1
  105. package/runtime/gentle-ai-binary.mjs +1 -1
  106. package/runtime/gentle-shell-bundled.mjs +6 -19
  107. package/runtime/gentle-shell-launcher.mjs +42 -7
  108. package/runtime/native-review-cli.mjs +93 -16
  109. package/runtime/review-integration-v2.mjs +7 -1
  110. package/scripts/build-full-delegation-card.mjs +175 -0
  111. package/scripts/bundled-install.mjs +38 -8
  112. package/scripts/download-progress.mjs +68 -0
  113. package/scripts/gentle-ai-installer.mjs +41 -18
  114. package/scripts/gentle-ai-proxy.mjs +294 -0
  115. package/scripts/install-gentle-ai.mjs +14 -1
  116. package/scripts/installer-preflight.mjs +5 -5
  117. package/scripts/installer-runner.mjs +27 -12
  118. package/scripts/installer-server.mjs +8 -7
  119. package/scripts/render-cache-host.mjs +72 -0
  120. package/scripts/render-cache-performance-worker.mjs +5 -4
  121. package/scripts/render-cache-performance.mjs +6 -1
  122. package/scripts/run-test-suite.mjs +40 -28
  123. package/scripts/verify-package-files.mjs +12 -2
  124. package/scripts/voice-worker.cjs +32 -6
  125. package/skills/design/SKILL.md +11 -8
  126. package/skills/gentle-ai/SKILL.md +2 -2
  127. package/skills/gentle-ui-design/SKILL.md +46 -0
  128. package/skills/gentle-ui-design/references/adaptive-interfaces.md +46 -0
  129. package/skills/gentle-ui-design/references/browse-and-compare.md +62 -0
  130. package/skills/gentle-ui-design/references/composition-and-feedback.md +56 -0
  131. package/skills/gentle-ui-design/references/task-and-content.md +60 -0
  132. package/skills/skill-registry/SKILL.md +4 -2
  133. package/skills/work-unit-commits/SKILL.md +6 -7
  134. package/tests/agent-home.test.ts +28 -9
  135. package/tests/agent-profiles-workflow.test.ts +163 -0
  136. package/tests/agent-risk-escalation.test.ts +1 -1
  137. package/tests/agent-status.test.ts +143 -0
  138. package/tests/agents-config.test.ts +96 -0
  139. package/tests/agents-history.test.ts +31 -0
  140. package/tests/agents-jobs-frames.test.ts +93 -0
  141. package/tests/agents-prompt-lifecycle-runtime.test.ts +376 -0
  142. package/tests/agents-runner-drain.test.ts +193 -0
  143. package/tests/agents-runner.test.ts +178 -2
  144. package/tests/append-system-prompt-route.test.ts +4 -1
  145. package/tests/ask-user-choice.test.ts +4 -3
  146. package/tests/ask-user-question.test.ts +97 -0
  147. package/tests/auto-permission-runtime.test.ts +1 -1
  148. package/tests/autonomous-guard.test.ts +346 -10
  149. package/tests/bounded-stop-contract.test.ts +43 -3
  150. package/tests/bridge-cost.test.ts +19 -4
  151. package/tests/bundled-install.test.ts +30 -5
  152. package/tests/card-content-policy.test.ts +3 -3
  153. package/tests/chained-pr-skill.test.ts +8 -6
  154. package/tests/child-safety.test.ts +11 -0
  155. package/tests/codegraph-tools.test.ts +11 -5
  156. package/tests/command-palette.test.ts +284 -1
  157. package/tests/delegate-for-reason-contract.test.ts +3 -3
  158. package/tests/design-canvas-assets.test.ts +185 -2
  159. package/tests/destructive-command-guard.test.ts +52 -0
  160. package/tests/download-progress.test.ts +71 -0
  161. package/tests/execution-surface-guard.test.ts +55 -0
  162. package/tests/fixtures/primary-session-prompt/gentleman.golden.md +9 -5
  163. package/tests/fixtures/proxy-tls/proxy.crt +19 -0
  164. package/tests/fixtures/proxy-tls/proxy.key +28 -0
  165. package/tests/fixtures/session-profile-v1/gentle-ai-reviewer.ts +89 -0
  166. package/tests/fixtures/session-profile-v1/replay.ts +53 -6
  167. package/tests/full-delegation-closure.test.ts +131 -0
  168. package/tests/full-delegation-notices.test.ts +76 -0
  169. package/tests/generic-agent-tools.test.ts +3 -3
  170. package/tests/gentle-agent-status.test.ts +74 -0
  171. package/tests/gentle-agents-child-jobs.test.ts +237 -0
  172. package/tests/gentle-agents.test.ts +1070 -12
  173. package/tests/gentle-ai-binary.test.ts +3 -1
  174. package/tests/gentle-ai-elapsed-store.test.ts +19 -0
  175. package/tests/gentle-ai-exploration-budget.test.ts +18 -2
  176. package/tests/gentle-ai-installer.test.ts +134 -51
  177. package/tests/gentle-ai-proxy.test.ts +434 -0
  178. package/tests/gentle-ai.test.ts +113 -38
  179. package/tests/gentle-design.test.ts +21 -0
  180. package/tests/gentle-herdr-activity.test.ts +9 -6
  181. package/tests/gentle-shell-bin.test.ts +123 -0
  182. package/tests/gentle-shell-bundled.test.ts +207 -31
  183. package/tests/gentle-shell-launcher.test.ts +77 -10
  184. package/tests/gentle-shell.test.ts +899 -59
  185. package/tests/gentle-todo.test.ts +19 -2
  186. package/tests/gentle-tps.test.ts +123 -0
  187. package/tests/gentle-ui-design-skill.test.ts +59 -0
  188. package/tests/herdr-busy.test.ts +59 -0
  189. package/tests/herdr-task-summary-policy.test.ts +8 -4
  190. package/tests/image-disk-cache.test.ts +163 -0
  191. package/tests/independent-recovery-delivery.test.ts +83 -0
  192. package/tests/inprocess-reviewer.test.ts +176 -4
  193. package/tests/installer-posix-bootstrap.test.ts +1 -1
  194. package/tests/installer-preflight.test.ts +5 -4
  195. package/tests/installer-runner.test.ts +79 -44
  196. package/tests/installer-server.test.ts +14 -11
  197. package/tests/jobs-view.test.ts +260 -6
  198. package/tests/modal-mouse-boundaries.test.ts +136 -0
  199. package/tests/model-routing-authority.test.ts +178 -2
  200. package/tests/native-choice-list.test.ts +77 -2
  201. package/tests/native-review-capability-contract.test.ts +7 -1
  202. package/tests/native-review-cli.test.ts +269 -1
  203. package/tests/no-self-pause-contract.test.ts +4 -1
  204. package/tests/odd-routing-canonical-ratchet.test.ts +3 -3
  205. package/tests/orchestrator-budget.test.ts +7 -2
  206. package/tests/orchestrator-delegation-mode.test.ts +153 -0
  207. package/tests/orchestrator-mode-policy.test.ts +175 -0
  208. package/tests/orchestrator-prompt-budget.test.ts +3 -1
  209. package/tests/orchestrator-rdd-ownership.test.ts +2 -2
  210. package/tests/package-manifest.test.ts +11 -9
  211. package/tests/permission-allowlist.test.ts +202 -0
  212. package/tests/pi-update-launcher.test.ts +8 -0
  213. package/tests/pnpm-workspace-config.test.ts +58 -0
  214. package/tests/primary-session-prompt.test.ts +13 -0
  215. package/tests/profile-pin.test.ts +29 -2
  216. package/tests/profile-tier-footer.test.ts +5 -0
  217. package/tests/profiles-panel-delegation-mode.test.ts +422 -0
  218. package/tests/questionnaire-view.test.ts +115 -0
  219. package/tests/quiet-bash-runtime.test.ts +1 -1
  220. package/tests/quiet-tool-rendering.test.ts +48 -0
  221. package/tests/rdd-aware-verification-contract.test.ts +16 -11
  222. package/tests/rdd-customize.test.ts +287 -0
  223. package/tests/rdd-mode-cache.test.ts +450 -0
  224. package/tests/rdd-mode-control.test.ts +407 -0
  225. package/tests/rdd-mode-scope-regression.test.ts +137 -0
  226. package/tests/rdd-off-independent-regression.test.ts +69 -0
  227. package/tests/rdd-status-line.test.ts +18 -0
  228. package/tests/render-cache-performance.test.ts +171 -2
  229. package/tests/reply-language-anchor.test.ts +173 -0
  230. package/tests/review-agent-end-preflight.test.ts +1 -1
  231. package/tests/review-blocker.test.ts +193 -0
  232. package/tests/review-candidate-owner-retry.test.ts +1 -1
  233. package/tests/review-candidate-symlink-scan.test.ts +157 -0
  234. package/tests/review-candidate-view.test.ts +1 -1
  235. package/tests/review-candidate-windows-boundary.test.ts +131 -0
  236. package/tests/review-candidate-windows-probe.test.ts +63 -0
  237. package/tests/review-committed-restart-ack.test.ts +129 -0
  238. package/tests/review-continuation-registry.test.ts +76 -0
  239. package/tests/review-controller-native-routing.test.ts +261 -5
  240. package/tests/review-controller-workspace-root.test.ts +230 -3
  241. package/tests/review-controller.test.ts +96 -11
  242. package/tests/review-coordinator-runtime.test.ts +117 -0
  243. package/tests/review-coordinator.test.ts +195 -0
  244. package/tests/review-failure-facts.test.ts +87 -0
  245. package/tests/review-host-relay-routing.test.ts +258 -4
  246. package/tests/review-host-relay.test.ts +39 -0
  247. package/tests/review-integration-v2.test.ts +46 -3
  248. package/tests/review-json-arguments.test.ts +65 -10
  249. package/tests/review-last-event-closure.test.ts +68 -0
  250. package/tests/review-loadout-rdd-off-sdk.test.ts +65 -31
  251. package/tests/review-owner-identity.test.ts +60 -24
  252. package/tests/review-relay-phase-timing.test.ts +128 -0
  253. package/tests/review-relay-transport-agent.test.ts +12 -2
  254. package/tests/review-reviewer-evidence.test.ts +183 -0
  255. package/tests/review-risk-assessment.test.ts +74 -3
  256. package/tests/review-session-standing-permission-controller.test.ts +21 -1
  257. package/tests/review-start-context.test.ts +19 -0
  258. package/tests/review-tool-prose-budget.test.ts +121 -0
  259. package/tests/run-test-suite.test.ts +122 -1
  260. package/tests/runtime-harness.mjs +4 -1
  261. package/tests/sensitive-path-tools.test.ts +181 -5
  262. package/tests/session-profile-append-controller-pi.test.ts +60 -31
  263. package/tests/session-profile-binding.test.ts +19 -1
  264. package/tests/session-profile-disk-reader-pi.test.ts +58 -16
  265. package/tests/session-profile-v1-compat.test.ts +35 -1
  266. package/tests/shell-bar.test.ts +186 -42
  267. package/tests/shell-panel.test.ts +50 -22
  268. package/tests/shell-sidebar-fullscreen.test.ts +5 -5
  269. package/tests/shell-sidebar-layout.test.ts +294 -23
  270. package/tests/shell-sidebar-scroll-benchmark.test.ts +1 -1
  271. package/tests/shell-surface-transparent.test.ts +89 -0
  272. package/tests/shell-todo.test.ts +12 -0
  273. package/tests/skill-registry.test.ts +838 -5
  274. package/tests/startup-banner.test.ts +152 -1
  275. package/tests/startup-home-repo.test.ts +2 -0
  276. package/tests/support/review-coordinator-runtime.ts +69 -0
  277. package/tests/task-size-routing-contract.test.ts +5 -3
  278. package/tests/verifier-admission.test.ts +49 -0
  279. package/tests/verify-first-launch-contract.test.ts +78 -3
  280. package/tests/visual-customization-policy.test.ts +39 -6
  281. package/tests/visual-customize-view.test.ts +573 -9
  282. package/tests/visual-layout-preview.test.ts +15 -1
  283. package/tests/visual-profiles.test.ts +11 -0
  284. package/tests/voice-worker.test.ts +73 -2
  285. package/tests/windows-session-transport.test.ts +126 -0
  286. package/tests/work-continuity-contract.test.ts +28 -0
  287. package/tests/writer-feature-document-admission.test.ts +92 -0
  288. package/tests/yolo-customize.test.ts +27 -4
  289. package/tests/yolo-mode.test.ts +23 -18
  290. 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>
@@ -230,7 +230,7 @@ Extension commands are only useful if you can find them. `alt+k` opens a curated
230
230
  <br>
231
231
 
232
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.
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), 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, model details, and Stats independently. Presets set density and visibility together and keep the header placement: **Light** is the minimal edition (no sidebar rail, Status at the bottom, minimal density; model, context, agent questions and review only), **Neutral** is the default and **Power user** keeps Neutral's spacing and 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 (compact density, no Stats) now reads as a custom mix, 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. Integrations shows the effective agent profile when available, including its source suffix when present. 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.
234
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.
235
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)).
236
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.
@@ -273,7 +273,7 @@ Open `/gentle:customize` → **Notifications** (the card header reads **Audio no
273
273
 
274
274
  ### Background jobs — Inspect what runs in the background
275
275
 
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.
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.
277
277
 
278
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.
279
279
 
@@ -322,9 +322,9 @@ Save `/gentle:mode default auto` or `/gentle:mode default yolo` to use either op
322
322
  <br>
323
323
 
324
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.
325
- - **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.
326
326
  - **Lifetime:** Reload and session replacement revoke live grants; new primary instances may apply the saved global default.
327
- - **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.
328
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.
329
329
 
330
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.
@@ -521,11 +521,10 @@ Every other argument is forwarded to pi unchanged, for example `gentle-shell --m
521
521
 
522
522
  ### Path B: inside an existing pi
523
523
 
524
- 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.
525
525
 
526
526
  ```bash
527
- # Published stable release: v4.1.0
528
- pi install npm:gentle-pi@4.1.0
527
+ pi install npm:gentle-pi
529
528
 
530
529
  # Restart Pi, then run:
531
530
  gentle-ai sync
@@ -534,7 +533,7 @@ gentle-ai sync
534
533
  pi
535
534
  ```
536
535
 
537
- 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.
538
537
 
539
538
  <details>
540
539
  <summary><kbd>More</kbd> <strong>Seeing a builtin codemode warning?</strong> — why it appears and how to silence it</summary>
@@ -578,7 +577,7 @@ gentle-shell upgrade --channel release
578
577
  gentle-shell upgrade --rollback
579
578
  ```
580
579
 
581
- `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.
582
581
 
583
582
  <details>
584
583
  <summary><kbd>More</kbd> <strong>Channels, bundled installs, and rollback</strong> — what each channel builds and how rollback works</summary>
@@ -588,7 +587,7 @@ gentle-shell upgrade --rollback
588
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.
589
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.
590
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`.
591
- - **`update` vs `upgrade`:** `gentle-shell update` updates the Pi this launcher runs. A verified source-linked Shell updates its checkout's local Pi without replacing the link; it requires a declared npm/pnpm (pnpm may be newer than its pin), one matching lockfile and a single-project Git root ([requirements](docs/gentle-shell.md#updating-pi-safely)). 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`.
592
591
 
593
592
  </details>
594
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.
@@ -35,9 +36,11 @@ Verify the request, not just the writer's implementation. Reuse observed writer
35
36
 
36
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.
37
38
 
38
- 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. Do not retry setup or enter repair-helper loops. Distinguish this infrastructure failure from a genuine code finding, 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.
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.
39
40
 
40
- 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.
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.
41
44
 
42
45
  - Do not edit, write, or fix findings.
43
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.
@@ -71,6 +72,8 @@ For passive documentation, non-testable changes, an unavailable runner, or no me
71
72
 
72
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.
73
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
+
74
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.
75
78
 
76
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",
@@ -8,12 +8,15 @@
8
8
  "a37cf617e8819e9ddc33c385f55520d70522c5bce77592dd997fe73fe0c36a00",
9
9
  "ab0510e040ae7c2293ecf334153b1d91482a3ec79ea4bda6db97027db08a0144",
10
10
  "bc09d5024127ed5b3789b377a0c55069d400d2ae405f3d4fe0b966a85f8b8068",
11
+ "e1cba02e63d2f726c513359c45263ae662847c45e13fd4e99ef3c402801f8c65",
11
12
  "e7bb6042688f9573b73b45b12802c9d598c903b518cffa6ce9128ab6cce82122",
13
+ "f0a2571f4b97cb4be56d0c74452ba922be31123a437e6da3ddd20eb78711c2d1",
12
14
  "f2edcf189dacb0f3294f0c0c2039374ce612543182b78c4a410687bc61e6375f"
13
15
  ],
14
16
  "agents/gentle-ai-verify.md": [
15
17
  "0c8df3faa0ed131fc621f716b13d3fcd9eae7763412a479e696cecf751d653b4",
16
18
  "0ddacbfbe1d61d6ef984b9b621ca36b745ff3841e9ca16ac5983706d3a081cd7",
19
+ "0eaaa30d4ca6f32a7281929beddb7769645534c6089bf3a6b88ada61fd8d4ec5",
17
20
  "106ffe40e2a7cd5a81200ee2c333c72672baa24d28d2808b8d0179913c462c14",
18
21
  "24eb8897439b63eee8d03e8292ea337c15438cd2d647fbb38e19e7caf613bc78",
19
22
  "2d77c1ddd78c3402381f8d8e336e261e7354e6a5a482f3cf2d3d988c0a59a7eb",
@@ -21,11 +24,14 @@
21
24
  "45d4c9c8960a4975e0ae8406fcfb8e925f4bccdbc459cc111e538be9d621b091",
22
25
  "62b61daf53459b21dca599667e49e66a87c8e25894eb02ddff5d334fa1bd159a",
23
26
  "642de8acfc92b3d3351cc0eef70d96b2c0d836b37ba322c8426f76ae6d44f8b6",
27
+ "655a3089deb63c94de24e741e5a50d4bcf9435a7ecefe2ca1bc9d3b5de994383",
24
28
  "7c93729f53c733c92acb37af89344c5b9446658c9bf110ad7276569937e28352",
25
29
  "8b5828c1631392ea3f7e34927279d942af7886203623ef6cdc5e612e60edc690",
26
30
  "8cfa5a7b20e16b7577823204205824c79b4658b9f664fdc0ff03915bd39476d4",
31
+ "92aa296e777badc756a5d2f1a527ac6b2db6b17bdce738f100ed4f0ae1a1dc75",
27
32
  "9767d2720f3c0bdf08c32b4025a67398d84e7734c7d259c9008d9df85c7e75da",
28
33
  "a1a7913bf7efa76bfc667be281b0f3ce7e2ca32338377cc340d809020730e63f",
34
+ "b958fa5e29675034280a18b556b9b7ea90d5a5ffdcc7207abdcb24c62ff555e1",
29
35
  "c47a862f31ad1833e3cf2f540079db32caae1b00ddb8a617deddc00059317bf5",
30
36
  "dc5712ef3fcc30de3fbef08805769e00903206d22f8feef0faee5e73d209ebba",
31
37
  "e791567f661f06017c6ed6d7bfc8357029516eb40525da39eb00a0525587ebf3",
@@ -54,9 +60,12 @@
54
60
  "92547d91843f2e9642305c6607b03c90063962237ff9e11c46d3f2ff4604ebe4",
55
61
  "9c02d247e11d89fbde5975d13cb3fd8d74ded6c6b8777c91db7c083d7db0f26b",
56
62
  "9c1646f893904d1fe6da24c592b90ae214ef8e7429de840225066b2a1b204081",
63
+ "a6af4ed80fd3b74061a5efa1fcf2527c64db72dcded3f3a98b353998c99057cf",
57
64
  "aea936c9be526adb94fc2e215472c61cc99e6d31d0cc45383a18bcdc40c96c10",
58
65
  "b7b7947b8535c1209807b2b7153aadc4b4020a362e1b9e2413c14225e0614b2f",
66
+ "b96f8e062ec534c13510bfefee46bb31cf9ca65f437fbb601b322461ef8fbbf9",
59
67
  "c08804e7674aa1908baf7992c006ae641bd9ccea155506f5304f3e782a02703d",
68
+ "c317b419b95e33b25809575a1f9508068dddd95fd7a49faa6e767f58f0cff136",
60
69
  "e3751bc757d3f2d5a809d08791778e689a606ac8662614995401d0a7a2f5f227",
61
70
  "e4e19c666892c5fdc789a5555485873d7a2a644064dfec9771fcfb224dd34040",
62
71
  "e9d2a7babaef1fb3fb62133cd122914fc38c1e6b7015b307cb1542278311b121",
@@ -67,12 +76,16 @@
67
76
  "6ef3c3801fcf17acba6b2a2e6fd32c5a66a3bf6bc8f3f9841d74ae5a98a3f030",
68
77
  "7614d2f87ae011b1b3163d0ea0f4cc506fc503addeffab1378609629adfc6d53",
69
78
  "79d11f0c8609f46029c543338a36a28bf4b23bb8a24b075d2c6b0e40b77e3daa",
70
- "812951941f17833ef9967ce1bb9ba84ce0955932be68d4adaf357d2e8ce5e18d"
79
+ "812951941f17833ef9967ce1bb9ba84ce0955932be68d4adaf357d2e8ce5e18d",
80
+ "b0d2220bea773ae1d24c4d849a795b66958f0b7064493105b92a4d3c1d2ce9fb",
81
+ "d281ebc2e96151190f8c8a0b3ff712082746b1a7ce1182a5e9a89ec7b529018b"
71
82
  ],
72
83
  "agents/jd-judge-a.md": [
84
+ "197c50be42e8c335852af8ac0ffe7024b171c4909b57cec0cfe4fa38bb312973",
73
85
  "2ce38f9cfa767b2e4694c604733ae0ee76b96ae256a246b5ce5eae2f994fc8e7",
74
86
  "59fb0579a4104fa786be417af762c9d662ea49e58a3ab7d13f2d227ad4ee4446",
75
87
  "5bb9343e6dc99740cfe0c0b45b04949eca67a0364c3263379fc7129089ad0ec7",
88
+ "674c17dc7ed52aa7e5d6022c1d0bb5e1a38c5d25af4f190db00dc56ac2567b64",
76
89
  "7c933641029fbe84dd64d37f8fc568d5ab2b7c1d27d1a583386e56443303b9a7",
77
90
  "af630de5152efa988193b4a4674a262dd7cf808bc342cad4db7b3068f36d258d",
78
91
  "d3c28748de9cc21d83d9797ae2b97d2f08b28fa1f32d0910b9f519953f20beed",
@@ -88,7 +101,9 @@
88
101
  "7cefac81c3fde087215aeb8788334f9096533332afa4a6b553b0d508de26151b",
89
102
  "9475e2f73dad908eaaaaca62cb36e6294d99895b0894270cad8cb78a92273e1f",
90
103
  "a408834b59786245e928859f39a6a46f4fe56b1cff78af2b0a083dfdad47f73c",
104
+ "b81a110699366701f9a594186895581e637b1aa674170acdcde2f86401698df0",
91
105
  "bb984b2623c2e551540af7349c5b64fbc10fb83a2a7f33b7f1b2e5136b4f2825",
106
+ "ce35b9ff066176d96a55eb3cdeb72537ace5b1110677291aa2e5433403918530",
92
107
  "dd5e37efcf57a10f0c9ddcd04f2c7578e8ddf938b9e4e7f9c129084a7a38c67e"
93
108
  ],
94
109
  "agents/review-readability.md": [
@@ -53,7 +53,7 @@ Progress is published automatically from the todo list: never call `orchestrator
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
 
@@ -109,9 +109,9 @@ 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
 
@@ -19,7 +19,7 @@ These boundaries do not authorize children to orchestrate. Each trigger holds on
19
19
 
20
20
  1. **Ask:** an open product or design decision gets one focused user question; stop and wait.
21
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`) 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`.
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.
@@ -0,0 +1,65 @@
1
+ # Orchestrator — Full Delegation Card (lazy-loaded)
2
+
3
+ <!-- Generated by scripts/build-full-delegation-card.mjs. Do not edit; run it with --write. -->
4
+
5
+ Parent Pi session only, in full delegation mode: every authorized change goes to a bounded writer. These are the handoff, launch, edit-surface and background rules both workflow modes share.
6
+
7
+ ## Handoff
8
+
9
+ Subagent-facing prompts should be written in English by default, even when the user speaks Spanish. Generated technical artifacts default to English regardless of the persona; forward this to the executor. Write the handoff instructions in English, but never translate, condense, or paraphrase the user's requirements: pass them by reference to the feature document's `## Specs` (`Spec: odd/tasks/<feature>.md (read until "## Log"). Do T#; S#.`), or include the user's request verbatim when no feature document exists.
10
+
11
+ Exceptions:
12
+
13
+ - Preserve exact user quotes, UI copy, error messages, filenames, commands, and domain terms in their original language when they are evidence.
14
+ - Ask a subagent to produce Spanish only when its output is intended to be pasted directly to the user, a PR/comment/reply in Spanish, or Spanish-language product/documentation text.
15
+
16
+ Before delegating, declare a subject via `orchestrator_session_id`.
17
+
18
+ **Invariants:** the writer reuses the existing function for shared state and keeps its invariants (ordering, uniqueness, validation, normalization); writer prompts name those helpers.
19
+
20
+ **Differential check (PRESERVE):** forward the harness test-first policy's differential check to writers.
21
+
22
+ ## Launch
23
+
24
+ - Derive nonempty `## Allowed edit surfaces` before launching a writer (below). Parallel writers only with disjoint Allowed edit surfaces (runtime-enforced) or isolated worktrees.
25
+ - Pass the session's resolved skill paths under `## Skills to load before work`; children read them first (`orchestrator-skills.md`).
26
+ - A child must be able to do the task it is given. Check the agent's declared `tools` in `subagent_list_agents` before launching: never give a read-only explorer shell, HTTP or MCP work, and never assume your own tools transfer to the child. With no qualified agent, report the capability gap; never do the work yourself instead.
27
+ - Background (policy on, `subagent_run` present): omit `mode`; it returns a task id at once. End the turn and resume on its `gentle-agents.result` completion message; never sleep or poll `subagent_status`. Otherwise run in the foreground. Detail: below.
28
+ - Do not pass `model` to generic subagents unless the user asks.
29
+
30
+ #### Allowed edit surfaces (MANDATORY)
31
+
32
+ The bounded writer refuses to write outside the exact allowed edit surfaces and stops with `status: interaction_required` when they are missing. The parent derives them while planning the delegation; neither the writer nor the human supplies them.
33
+
34
+ Before launching a bounded writer (`gentle-ai-worker`, a user-configured `worker`, or the native `Agent` fallback), derive the allowed edit surface from the delegated task — files the change must touch, plus directories where it authorizes new files — and pass it in the prompt under an `## Allowed edit surfaces` heading, in the exact-path form of `## Skills to load before work`:
35
+
36
+ - exact repository-relative paths or narrow globs, one per line; never `.` and never a bare repository root; paths containing whitespace require whole-entry backticks (for example, ``- `Directory With Spaces/note.md` ``); a list marker alone does not permit whitespace;
37
+ - the section ends only at the next canonical ATX Markdown heading of any level (zero to three leading ASCII spaces, one to six `#`, then an ASCII space); every non-empty line before that heading must be a valid surface entry, so put explanatory prose under a following heading;
38
+ - pre-existing untracked targets the writer may write, listed explicitly;
39
+ - nothing beyond the delegated task — a surface wider than the task is the same defect as no surface at all.
40
+
41
+ Test scratch stays outside the worktree (`mktemp -d`), never in the repository (nor caches or `TMPDIR`); state needed inside uses an excluded path the test removes. The runtime owns session scratch; `/gentle:scratch` lists or cleans recorded clones and worktrees.
42
+
43
+ If the surface genuinely cannot be derived, do not launch the writer or ask the human to author paths. Derive a candidate set first — the exact paths this task would touch — and present that enumerated list as an approve/decline choice under the Lossless Blocking Prompts rules in `orchestrator-prompts.md`. A free-text question asking which paths or globs to authorize is never a valid escalation: computing it is the parent's job.
44
+
45
+ Relay a writer's `interaction_required` payload about edit surfaces the same way: present its derived candidate paths as the choice, and add or drop paths only on the human's explicit instruction.
46
+
47
+ <!-- gentle-pi:background-subagents -->
48
+ #### Background Subagent Policy
49
+
50
+ Background execution is policy-gated: the always-on orchestrator prompt renders one status line, `Background subagent policy: on|off (capability: ready|absent)`. If the policy is off OR the `subagent_run` tool is unavailable, run every delegation in the foreground — `mode: "task"` when `subagent_*` tools exist, otherwise the native `Agent` fallback — always.
51
+
52
+ When the policy is on and `subagent_run` is available:
53
+
54
+ - The runtime already defaults `subagent_run` to `mode: "background"` under this policy in interactive and RPC sessions, so omit `mode` for ordinary delegation. It returns a task id at once; the terminal stays free and the human keeps typing. Pass a `label` of three to six words naming the work.
55
+ - A child `agent_end` retains its latest answer but is not completion: Pi may still retry, compact, or run a queued follow-up. Treat the task as finished only at `agent_settled`; only then release its queue slot, publish its background result, or terminate it. If it exits first, report failure with its retained answer as diagnostics.
56
+ - When a background task settles, its result arrives as a message in this session (custom type `gentle-agents.result`, one per task) and starts a new turn if you are idle. Wait for it: end the turn once launches and any non-overlapping work are done. Never sleep or periodically poll `subagent_status`/`subagent_result` for completion or cache maintenance. Retain the task ID. Use `subagent_status` only at a real orchestration decision boundary: user-requested inspection, relevant scope change, input request, or suspected abnormal behavior. Never relaunch equivalent work merely because it is queued or running. Cache warming belongs to Pi's native runtime, never to model-driven maintenance turns.
57
+ - Do not claim an implementation ready or RDD-ready while its required verification or correction follow-up remains queued. Run the required focused verification before that claim, and retain legitimate post-correction verification. This does not invent a universal full-suite requirement or make a receipt a delivery gate.
58
+ - Use `mode: "task"` only when the subagent must ask the human something mid-flight (task-mode dialogs reach the human; background dialogs are dismissed) or when the human asked to wait.
59
+ - Launch as many independent tasks as the work has; the runner queues beyond `max_concurrency`. Do not duplicate launches or work, and do not overlap files or topics.
60
+ - Finished tasks persist across restarts; running ones are stopped when pi exits and must be relaunched, never claimed as recovered.
61
+ <!-- /gentle-pi:background-subagents -->
62
+
63
+ #### Key Learnings closing block
64
+
65
+ Generic Explore/general worker prompts (`gentle-ai-explore`, `gentle-ai-worker`, `gentle-ai-verify`, or their native `Agent` fallback) end with: after the normal result, close the final response text with a `## Key Learnings` block of 1–5 numbered items, each a standalone factual sentence of at least 20 characters and at least 4 words; omit it when there is genuinely no reusable learning. It layers on after the Return contract without changing its fields and applies to final response text only. Engram automatically extracts and persists the items; the worker does not parse the block or call passive-capture tools; this is separate from explicit `mem_save`. Agents that must return strict JSON never receive it.
@@ -0,0 +1,34 @@
1
+ You are a COORDINATOR in full delegation mode: you never implement. Every authorized mutation — source, tests, docs, fixtures, configuration, repository content of any kind — goes to a bounded writer (`gentle-ai-worker`; role missing or unusable: a native `Agent` with the same bounded instructions, reporting the fallback), whatever the size of the change. The human selected a profile that carries this mode precisely so a frontier model never spends its context writing code while local models do the work. If no writer can run, report that blocker; never edit a file yourself.
2
+
3
+ This mode belongs to the session's active profile. The human switches it with `/gentle:profiles`: `w` toggles the shown profile's mode, then **Save** or **Use in this session**. It applies on the next turn, with no new session.
4
+
5
+ Keep synthesis short by default: decision, outcome, next action. Expand only when the user asks or the situation requires detail.
6
+
7
+ Batch independent tool calls in one turn (parallel calls or one multi-file command). Never spend a turn only on a `todo` or status update.
8
+
9
+ ## What stays yours
10
+
11
+ Authorize, explore for routing, decide, ask, track, commit, verify, report. Reads, `git` state checks, and re-running one reported verification command are yours; producing or changing repository content is not.
12
+
13
+ ## Task Size
14
+
15
+ Task size decides tracking and risk, never who writes. A task is **small** when it is understood, touches no high-risk item below, and passes the resume test: someone could finish it from the original request and `git diff` alone. Small work gets no feature document, mirror, `todo`, or commits unless the user asks. A task is **large** only when the resume test fails; it gets the feature document, Engram mirror, `todo`, and work-unit commits.
16
+
17
+ {{GENTLE_PI_HIGH_RISK_ITEMS}}
18
+
19
+ **Risk line**: close every change with `Risk: item N (reason)` or `Risk: none` per the list; any item → Verify adds the independent verifier.
20
+
21
+ ## Delegation Rules
22
+
23
+ One writer per unit of behavior: its code, tests and docs together, never split across writers, and never a unit launched while the unit it depends on is still running. Derive a nonempty `## Allowed edit surfaces` for every launch — narrow repository-relative paths or globs, never `.`, a bare repository root, or an absolute path — and never ask the human to author it. Without a feature document, the writer prompt carries the user's request verbatim. Handoff, launch, edit-surface and background rules: `orchestrator-full-delegation-card.md`.
24
+
25
+ Two or more independent units with disjoint surfaces launch together in one turn; units that need the same file run one at a time. The parent owns git: writers never commit, push, or run repository-wide formatters and installs.
26
+
27
+ ## Mechanisms
28
+
29
+ 1. **Ask** — open product or design decision → one focused question; stop and wait.
30
+ 2. **Explore** — mapping beyond one bounded read batch (3 calls, ~10k tokens) or more than ~5 sequential lookups → one `gentle-ai-explore`, handoff at most ~2k tokens with `path:line` evidence, then one spot check. Reading that prepares a writer belongs in that writer's prompt.
31
+ 3. **Verify** — the writer runs the authorized checks and reports `<command>: <observed result>`, observing RED before it writes; you re-run one reported command as a spot check, and add one independent `gentle-ai-verify` only when the Risk line names a high-risk item.
32
+ 4. **Track** — by Task Size above.
33
+ 5. **Incident** — diagnose a wrong cwd, worktree, git or tooling incident separately before resuming.
34
+ 6. **Context backstop** — when the runtime signals it, delegate the next unit instead of absorbing it.
@@ -1,14 +1,14 @@
1
1
  # Orchestrator — Memory Detail (lazy-loaded)
2
2
 
3
- Bind this to the parent Pi session only, on organic progress/recovery. Not always-on; loaded on demand from `assets/orchestrator.md`'s `## Memory Contract` pointer.
3
+ Bind this to the parent Pi session only, on organic progress/recovery. Not always-on; loaded on demand from the always-on core's `## Memory Contract` pointer.
4
4
 
5
5
  ### Organic feature continuity
6
6
 
7
- For large authorized organic implementation (Task Size in `orchestrator.md`), the parent maintains `odd/tasks/<feature-name>.md` and an Engram recovery copy under topic `odd/<feature-name>/tasks`, scoped to the current project. Use a descriptive filename-safe feature name, reuse the same identity, and never overwrite another feature. Keep one feature document, not a separate plan file or topic. It is the specification subagents read by reference, so keep this fixed order, stable content first and the growing log last:
7
+ For large authorized implementation (Task Size in the always-on core), the parent maintains `odd/tasks/<feature-name>.md` and an Engram recovery copy under topic `odd/<feature-name>/tasks`, scoped to the current project. Use a descriptive filename-safe feature name, reuse the same identity, and never overwrite another feature. Keep one feature document, not a separate plan file or topic. It is the specification subagents read by reference, so keep this fixed order, stable content first and the growing log last:
8
8
 
9
9
  1. A header of two or three lines: objective, branch, delivery strategy, and test runner.
10
10
  2. `## Specs`: numbered `S1`..`Sn` requirements, constraints, and acceptance criteria with their checks. Quote the user's exact strings, error messages, commands, and examples verbatim, in the user's language; you may number and order them, but never summarize or reword those fragments. Do not add requirements the user never asked for; mark assumptions as assumptions.
11
- 3. `## Tasks`: one line per task, using stable task IDs, with its linked `S#`, route (inline or delegated), status, and commit identity or RED/GREEN evidence.
11
+ 3. `## Tasks`: one line per task, using stable task IDs, with its linked `S#`, route (who writes it), status, and commit identity or RED/GREEN evidence.
12
12
  4. `## Log`: the logbook. `L1` holds the user's original request verbatim; later user corrections are logged verbatim with their date. Problem analysis, rationale for meaningful accepted changes, verification evidence, progress, and next step go here. Routine corrections stay brief; no exhaustive decision journal.
13
13
 
14
14
  Mirror the full current document and repository-relative file locator, not only a summary or completion notice. Update the feature document with targeted edits; never rewrite the whole file to change a task line or append a log entry. When a code-execution tool such as `codemode` is available, refresh the Engram mirror inside one script that reads the file and saves its content, so the document is never re-emitted as output tokens.
@@ -1,6 +1,6 @@
1
1
  # Orchestrator — Delegation Prompts and Provider Defects (lazy-loaded)
2
2
 
3
- Bind this to the parent Pi session only. Load it for source handoffs or when a tool or subagent returns a user-facing blocking prompt or menu, or a Gentle AI provider defect appears; small tasks never need it (see `orchestrator.md` Task Size).
3
+ Bind this to the parent Pi session only. Load it for source handoffs or when a tool or subagent returns a user-facing blocking prompt or menu, or a Gentle AI provider defect appears.
4
4
 
5
5
  ### Online Sources
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Orchestrator — Skills Detail (lazy-loaded)
2
2
 
3
- Bind this to the parent Pi session only, on skill resolution/discovery. Not always-on; loaded on demand from `assets/orchestrator.md`'s `## Skill Registry Protocol` and `## Intent-Driven Skill Discovery` pointers.
3
+ Bind this to the parent Pi session only, on skill resolution/discovery. Not always-on; loaded on demand from the always-on core's `## Skill Registry Protocol` and `## Intent-Driven Skill Discovery` pointers.
4
4
 
5
5
  ## Skill Registry Protocol
6
6
 
@@ -4,7 +4,7 @@ Parent only: load when Verification fires or a delegated writer returns; not for
4
4
 
5
5
  ## Verification rule (normative)
6
6
 
7
- 5. **Verification rule** (gentle-pi#661/#662, verify-always-rdd-high S1; normative -- referenced, not restated, in the other orchestrator modules): The bounded writer always runs the exact parent-authorized commands under the delegated task's `## Verification` heading, synchronously and in the foreground, and reports each as `<command>: <observed result>` -- see `gentle-ai-worker`'s Verification contract for the exact rules, including how `## Known environmental failures` (exact pre-existing base failures) differs from any other failing required command, which still forces `status: partial`. Those foreground commands are live work, not silence: while a tool call is in flight the runner's stall watchdog uses `tool_stall_timeout_ms` (default 30 minutes) instead of the `stall_timeout_ms` idle budget. After the writer returns, call `gentle_review` with `{"operation":"assess"}` over the writer's diff and follow the returned plan, whatever the `Receipt-driven development:` line reads (`on`, `off`, or `unknown`), instead of judging non-triviality from the task description: the operation resolves the native risk tier and states exactly who verifies next. When the line reads `on`, the native review is an additional outside view of the change; it never replaces or skips the tier's verification, and the tier's verifier runs before review. Pass `nativeReviewOutcome` when the parent already knows it; ASSESS derives `closed` only from the native `candidate.consumed` fact for this exact candidate (gentle-pi#1175), so a caller-supplied `closed` is not authority and, without that fact, resolves to `unknown`; the outcome only explains the plan, never lowers it. The tier table (stated once, here):
7
+ 5. **Verification rule** (gentle-pi#661/#662, verify-always-rdd-high S1; normative -- referenced, not restated, in the other orchestrator modules): The bounded writer always runs the exact parent-authorized commands under the delegated task's `## Verification` heading, synchronously and in the foreground, and reports each as `<command>: <observed result>` -- see `gentle-ai-worker`'s Verification contract for the exact rules, including how `## Known environmental failures` (exact pre-existing base failures) differs from any other failing required command, which still forces `status: partial`. Those foreground commands are live work, not silence: while a tool call is in flight the runner's stall watchdog uses `tool_stall_timeout_ms` (default 30 minutes) instead of the `stall_timeout_ms` idle budget. After the writer returns, when RDD is validated off, do not require `assess`: the writer's self-verification stands and a named Task Size high-risk item still requires an independent verifier. When RDD is on or unknown, call `gentle_review` with `{"operation":"assess"}` over the writer's diff and follow the returned plan. When the line reads `on`, the native review is an additional outside view of the change; it never replaces or skips the tier's verification, and the tier's verifier runs before review. Pass `nativeReviewOutcome` when the parent already knows it; ASSESS derives `closed` only from the native `candidate.consumed` fact for this exact candidate (gentle-pi#1175), so a caller-supplied `closed` is not authority and, without that fact, resolves to `unknown`; the outcome only explains the plan, never lowers it. The tier table (stated once, here):
8
8
 
9
9
  | Tier | Verification (any RDD state) |
10
10
  |---|---|
@@ -13,15 +13,17 @@ Parent only: load when Verification fires or a delegated writer returns; not for
13
13
  | high | only through `escalate` naming a Task Size high-risk item: writer self-verification plus one separate `gentle-ai-verify` run |
14
14
  | native high, unknown, or assess failed | informs only: writer self-verification stands; escalate when a named high-risk item applies |
15
15
 
16
- The independent verifier runs only when the change touches a named Task Size high-risk item, passed as `escalate` (runtime admits its launch on a `Risk: item N` line or sentence, a feature-document task line, or past the context backstop); never for size, a native tier alone, a failed assessment, or the model or effort that wrote the change. An unknown `Receipt-driven development:` line never lowers a tier below `off`. The parent spot check (re-running one reported command before delivery) stays required in every tier. ASSESS takes the writer profile from the runtime-recorded model and effort of the pending mutations for the root; caller `writerModelId`/`writerEffort` are only a fallback when no runtime evidence exists; the writer profile is reported but never adds a verifier. When native reports them, ASSESS also projects `reviewDue`, `reviewDueReason`, `candidate.consumed`, and the native continuation verbatim; relay that continuation unchanged and never rebuild it. A native code review is not a substitute for applicable functional checks: tests, builds, and functional verification such as browser checks for UI changes still run when applicable, and review outcomes never authorize delivery. The change's own focused test and suite run inline.
16
+ Validated off skips the native assessment, so its fallback is unassessable/medium, never a fabricated passive result. A direct plan request remains read-only and skips native assess and target status.
17
+
18
+ The independent verifier runs only when the change touches a named Task Size high-risk item (runtime admits its launch on a `Risk: item N` line or sentence, a feature-document task line, or past the context backstop); never for size, a native tier alone, a failed assessment, or the model or effort that wrote the change. An unknown `Receipt-driven development:` line does not waive named-risk verification. The parent spot check (re-running one reported command before delivery) stays required in every tier. ASSESS takes the writer profile from the runtime-recorded model and effort of the pending mutations for the root; caller `writerModelId`/`writerEffort` are only a fallback when no runtime evidence exists; the writer profile is reported but never adds a verifier. When native reports them, ASSESS also projects `reviewDue`, `reviewDueReason`, `candidate.consumed`, and the native continuation verbatim; relay that continuation unchanged and never rebuild it. A native code review is not a substitute for applicable functional checks: tests, builds, and functional verification such as browser checks for UI changes still run when applicable, and review outcomes never authorize delivery. The change's own focused test and suite run inline.
17
19
 
18
20
  ## Agent escalation (gentle-shell#1494)
19
21
 
20
- For Task Size high-risk work (any native tier), assess with `"escalate": {"item": <1-6>, "reason": "<one line>"}`. It adds a verifier only when `escalate` names a Task Size high-risk item; raises to high, keeps `nativeRisk`, returns `agentEscalation`, never lowers. Unsupported: raise this plan, not native review.
22
+ For Task Size high-risk work when RDD is on or unknown, assess with `"escalate": {"item": <1-6>, "reason": "<one line>"}`. With validated RDD off, name the risk and run the independent verifier without requiring assess; a direct plan request can still pass the same escalation. It adds a verifier only when `escalate` names a Task Size high-risk item; raises to high, keeps `nativeRisk`, returns `agentEscalation`, never lowers a tier. Unsupported: raise this plan, not native review.
21
23
 
22
24
  ## Verifier preparation failure
23
25
 
24
- If one isolated setup attempt fails, stop with one **Needs your decision** result identifying the missing prerequisite and exact unrun checks as a concrete blocker and unverified checks. Do not keep repairing helpers. Do not automatically relaunch the verifier for the same missing prerequisite. Distinguish setup or infrastructure failure from genuine code findings. Auxiliary tooling defects remain subject to the existing correction bound; setup failure does not reset it. Keep consent.
26
+ If setup fails, stop with one **Needs your decision** result identifying the missing prerequisite and exact unrun checks as unverified. Do not keep repairing helpers. Do not automatically relaunch the verifier for the same missing prerequisite. Distinguish setup or infrastructure failure from genuine code findings. Auxiliary tooling defects remain subject to the existing correction bound. Keep consent. Follow **Authorized work continuity** for setup and worker recovery; scratch: `gentle-ai-verify`.
25
27
 
26
28
  ## Verification proportionality
27
29
 
@@ -32,7 +34,7 @@ On overengineering warnings, remove or collapse optional artifacts and checks. S
32
34
  ## Parallel review protocol (gentle-shell#1731)
33
35
 
34
36
  1. **Self-review**, required by each writer prompt, in its own session before returning: spec sections by reference (#1713), the request's authorized examples, tests, and typecheck; it fixes and continues (one correction per failing check, a second only if the same check still fails, then `partial`), reporting requirement by requirement. Low and medium risk need nothing else.
35
- 2. **Independent verify per unit**, once, after its final self-review (never per worker cycle or retry), in parallel when several finish together, only when that unit is high risk: its Risk line, `assess` over its actual diff or the worker's own `escalate` (high-risk list in Task Size), never inferred from the worker's summary alone. Assess via its work-unit commit (`{"baseRef":"<previous>","committedOnly":true}`) or its own isolated worktree. Inline code over several deliveries of one feature: one verify at the feature's end.
37
+ 2. **Independent verify per unit**, once, after its final self-review (never per worker cycle or retry), in parallel when several finish together, only when that unit is high risk: its Risk line, or, when RDD is on or unknown, `assess` over its actual diff or the worker's own `escalate` (high-risk list in Task Size), never inferred from the worker's summary alone. When on or unknown, assess via its work-unit commit (`{"baseRef":"<previous>","committedOnly":true}`) or its own isolated worktree. Inline code over several deliveries of one feature: one verify at the feature's end.
36
38
  3. **Seam check**: after parallel units finish, one inline full-suite command (the parent spot check) catches seams between units.
37
39
  4. **Verify handoff**: the whole feature document, the assigned unit and its linked `S#` plus affected interactions, the baseline commit, and the probe command forms (tests, CLI, typecheck) for probes on isolated state in a fresh `mktemp -d` scratch copy, never just "read-only"; the runtime removes each subagent's own TMPDIR, which holds that copy; `gentle-ai-verify` holds the checklist. Future or unrelated requirements are out of scope, not unmet; final feature verification covers every `S#`. Resolve every in-scope unmet item before closing the unit; the writer commits its probes as regression tests.
38
40
  5. **One correction**: verify blockers get one correction batch that fixes every reported blocker, then one re-verify limited to those blockers, never a new full sweep. Blockers still open after that stop as one **Needs your decision**. Advisories never start a correction. A second correction runs automatically only when the recheck shows the same blocker still failing; a new finding never earns one. A `partial` or `blocked` writer report gets only this correction, never an extra verify run beyond the risk tier's verifier; partial, blocked, unavailable, or exhausted proof left after it becomes that one **Needs your decision**.