gentle-pi 4.5.1 → 4.6.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 (239) hide show
  1. package/README.md +9 -6
  2. package/assets/agents/gentle-ai-verify.md +4 -0
  3. package/assets/agents/gentle-ai-worker.md +1 -0
  4. package/assets/migrations/agent-body-history.json +147 -0
  5. package/assets/orchestrator-delegation-reference.md +3 -3
  6. package/assets/orchestrator-delegation.md +2 -2
  7. package/assets/orchestrator-verification.md +10 -6
  8. package/assets/orchestrator.md +8 -8
  9. package/bin/gentle-shell.mjs +61 -26
  10. package/docs/ci-performance.md +11 -0
  11. package/docs/delegated-verification.md +6 -0
  12. package/docs/fast-mode.md +15 -0
  13. package/docs/gentle-agents-activity.md +8 -0
  14. package/docs/gentle-shell.md +69 -19
  15. package/docs/install-wizard.md +1 -1
  16. package/docs/mcp-status.md +52 -0
  17. package/docs/prompt-budget.md +28 -0
  18. package/docs/readme-reference.md +79 -20
  19. package/docs/session-profile-format.md +20 -5
  20. package/docs/sound-notifications.md +1 -1
  21. package/docs/star-prompt.md +32 -0
  22. package/docs/work-continuity.md +46 -0
  23. package/extensions/ask-user-question.ts +1 -0
  24. package/extensions/codegraph-tools.ts +38 -4
  25. package/extensions/gentle-agents.ts +477 -50
  26. package/extensions/gentle-ai.ts +1041 -188
  27. package/extensions/gentle-fast.ts +61 -0
  28. package/extensions/gentle-guide.ts +174 -0
  29. package/extensions/gentle-herdr-activity.ts +21 -1
  30. package/extensions/gentle-herdr-agent.ts +144 -0
  31. package/extensions/gentle-program-identity.ts +61 -0
  32. package/extensions/gentle-shell.ts +642 -97
  33. package/extensions/gentle-star-prompt.ts +334 -0
  34. package/extensions/gentle-stats.ts +5 -5
  35. package/extensions/gentle-todo.ts +42 -22
  36. package/extensions/history/store.ts +18 -12
  37. package/extensions/skill-registry.ts +35 -3
  38. package/extensions/startup-banner.ts +39 -7
  39. package/lib/agent-assets.ts +74 -17
  40. package/lib/agent-profiles.ts +1 -1
  41. package/lib/agents-config.ts +12 -3
  42. package/lib/agents-keys.ts +8 -16
  43. package/lib/agents-protocol.ts +80 -4
  44. package/lib/agents-runner.ts +105 -4
  45. package/lib/agents-view.ts +6 -1
  46. package/lib/agents-widget.ts +132 -9
  47. package/lib/bridge-cost.ts +28 -0
  48. package/lib/codemode-renderer.ts +16 -0
  49. package/lib/command-palette-catalog.ts +1 -0
  50. package/lib/command-palette.ts +21 -8
  51. package/lib/exploration-budget.ts +62 -0
  52. package/lib/gentle-guide.ts +201 -0
  53. package/lib/gentle-shell-launcher.ts +4 -0
  54. package/lib/herdr-activity.ts +9 -3
  55. package/lib/herdr-task-summary-policy.ts +85 -0
  56. package/lib/inprocess-reviewer.ts +33 -13
  57. package/lib/jobs-sidebar-state.ts +5 -6
  58. package/lib/jobs-widget.ts +16 -52
  59. package/lib/keymaps-customize.ts +81 -0
  60. package/lib/keymaps.ts +291 -0
  61. package/lib/model-fallback-notice.ts +61 -0
  62. package/lib/model-fallback-policy.ts +141 -0
  63. package/lib/model-fallback-store.ts +143 -0
  64. package/lib/model-routing-authority.ts +10 -2
  65. package/lib/nan-provider.ts +3 -2
  66. package/lib/native-review-cli.ts +7 -2
  67. package/lib/notification-customize.ts +48 -51
  68. package/lib/openai-fast-tier.ts +22 -0
  69. package/lib/orchestrator-discovery.ts +5 -1
  70. package/lib/orchestrator-fallback.ts +75 -0
  71. package/lib/pasted-image-paths.ts +113 -0
  72. package/lib/questionnaire/questionnaire-view.ts +121 -7
  73. package/lib/review-candidate-view-owner.ts +4 -0
  74. package/lib/review-candidate-view.ts +10 -7
  75. package/lib/review-host-relay.ts +5 -1
  76. package/lib/review-integration-v2.ts +22 -7
  77. package/lib/review-repository.ts +5 -0
  78. package/lib/session-profile-append-controller.ts +21 -6
  79. package/lib/session-profile-authority.ts +119 -0
  80. package/lib/session-profile-binding.ts +54 -5
  81. package/lib/session-profile-freeze.ts +105 -9
  82. package/lib/session-profile-integration.ts +313 -0
  83. package/lib/session-profile-persistence.ts +63 -9
  84. package/lib/shell-bar.ts +171 -56
  85. package/lib/shell-card.ts +26 -6
  86. package/lib/shell-page.ts +120 -0
  87. package/lib/shell-panel.ts +149 -0
  88. package/lib/shell-prompt.ts +53 -1
  89. package/lib/shell-sidebar-layout.ts +98 -25
  90. package/lib/shell-sidebar.ts +54 -1
  91. package/lib/shell-stats.ts +123 -0
  92. package/lib/shell-todo.ts +71 -0
  93. package/lib/shell-usage.ts +12 -2
  94. package/lib/star-prompt.ts +197 -0
  95. package/lib/verifier-admission.ts +18 -8
  96. package/lib/verifier-settle-reminder.ts +64 -0
  97. package/lib/vim-editor-adapter.ts +6 -1
  98. package/lib/visual-customization-policy.ts +41 -6
  99. package/lib/visual-customize-view.ts +164 -26
  100. package/lib/visual-layout-preview.ts +43 -0
  101. package/lib/yolo-session-policy.ts +28 -1
  102. package/package.json +1 -1
  103. package/runtime/gentle-shell-launcher.mjs +4 -0
  104. package/runtime/native-review-cli.mjs +7 -2
  105. package/runtime/review-integration-v2.mjs +22 -7
  106. package/runtime/windows-session-transport.ps1 +60 -3
  107. package/scripts/bootstrap.sh +4 -1
  108. package/scripts/installer-preflight.mjs +1 -1
  109. package/scripts/pi-update.mjs +113 -3
  110. package/scripts/run-test-suite.mjs +17 -1
  111. package/scripts/shell-snapshot.mjs +340 -0
  112. package/scripts/test-packed-runner.mjs +1 -1
  113. package/scripts/update-agent-body-history.mjs +41 -0
  114. package/scripts/verify-installer-tap.mjs +45 -0
  115. package/scripts/verify-package-files.mjs +2 -0
  116. package/skills/gentle-ai/SKILL.md +2 -2
  117. package/skills/tui-design/NOTICE.md +5 -0
  118. package/skills/tui-design/SKILL.md +56 -0
  119. package/skills/tui-design/references/commands.md +75 -0
  120. package/skills/tui-design/references/critique.md +48 -0
  121. package/skills/tui-design/references/design-doc.md +44 -0
  122. package/skills/tui-design/references/terminal-craft.md +64 -0
  123. package/skills/tui-design/references/visual-loop.md +32 -0
  124. package/tests/agents-protocol.test.ts +53 -1
  125. package/tests/agents-runner.test.ts +168 -3
  126. package/tests/agents-view.test.ts +27 -0
  127. package/tests/agents-widget.test.ts +312 -10
  128. package/tests/bounded-scan-contract.test.ts +39 -0
  129. package/tests/bridge-cost.test.ts +32 -0
  130. package/tests/bundled-install.test.ts +6 -4
  131. package/tests/ci-concurrency.test.ts +11 -0
  132. package/tests/ci-merge-base-identity.test.ts +114 -0
  133. package/tests/codegraph-tools.test.ts +69 -0
  134. package/tests/codemode-rendering.test.ts +22 -2
  135. package/tests/command-palette.test.ts +16 -2
  136. package/tests/commit-slice-signal.test.ts +11 -9
  137. package/tests/delegate-for-reason-contract.test.ts +5 -4
  138. package/tests/exploration-budget.test.ts +128 -0
  139. package/tests/fixtures/agent-assets/gentle-ai-worker.strict-tdd-era.md +122 -0
  140. package/tests/fixtures/measure-orchestrator-prompt.mjs +2 -1
  141. package/tests/fixtures/primary-session-prompt/gentleman.golden.md +18 -10
  142. package/tests/fixtures/session-profile-v1/replay.ts +125 -0
  143. package/tests/fixtures/session-profile-v1/session-profile-authority.ts +113 -0
  144. package/tests/fixtures/session-profile-v1/session-profile-binding.ts +83 -0
  145. package/tests/fixtures/session-profile-v1/session-profile-disk-reader.ts +182 -0
  146. package/tests/fixtures/session-profile-v1/session-profile-freeze.ts +290 -0
  147. package/tests/fixtures/session-profile-v1/session-profile-persistence.ts +195 -0
  148. package/tests/fixtures/session-profile-v1/v1-inputs.ts +16 -0
  149. package/tests/fixtures/windows-pipe-availability.ps1 +26 -0
  150. package/tests/fixtures/windows-session-bootstrap.ps1 +6 -2
  151. package/tests/gentle-agents.test.ts +416 -21
  152. package/tests/gentle-ai-exploration-budget.test.ts +135 -0
  153. package/tests/gentle-ai.test.ts +1007 -33
  154. package/tests/gentle-fast.test.ts +73 -0
  155. package/tests/gentle-guide.test.ts +208 -0
  156. package/tests/gentle-herdr-activity.test.ts +76 -2
  157. package/tests/gentle-herdr-agent.test.ts +111 -0
  158. package/tests/gentle-program-identity.test.ts +197 -0
  159. package/tests/gentle-shell-bin.test.ts +49 -26
  160. package/tests/gentle-shell-launcher.test.ts +18 -2
  161. package/tests/gentle-shell.test.ts +1068 -37
  162. package/tests/gentle-stats.test.ts +15 -2
  163. package/tests/gentle-todo.test.ts +50 -4
  164. package/tests/herdr-task-summary-policy.test.ts +128 -0
  165. package/tests/history-store-private-mode.test.ts +40 -0
  166. package/tests/image-paste-chips.test.ts +42 -0
  167. package/tests/inprocess-reviewer.test.ts +122 -0
  168. package/tests/installer-posix-bootstrap.test.ts +67 -5
  169. package/tests/installer-server.test.ts +2 -2
  170. package/tests/installer-windows-diagnostics.test.ts +4 -5
  171. package/tests/isolated-config-home.ts +28 -0
  172. package/tests/jobs-widget.test.ts +25 -37
  173. package/tests/keymaps-customize.test.ts +114 -0
  174. package/tests/keymaps.test.ts +103 -0
  175. package/tests/maintainer/mcp-status.maintest.ts +88 -0
  176. package/tests/maintainer/pi-update-source.maintest.ts +116 -0
  177. package/tests/model-fallback-notice.test.ts +45 -0
  178. package/tests/model-fallback-policy.test.ts +83 -0
  179. package/tests/model-fallback-store.test.ts +111 -0
  180. package/tests/nan-provider.test.ts +4 -4
  181. package/tests/no-self-pause-contract.test.ts +19 -0
  182. package/tests/notification-customize.test.ts +58 -34
  183. package/tests/odd-routing-canonical-ratchet.test.ts +3 -3
  184. package/tests/odd-routing-contract.test.ts +1 -1
  185. package/tests/orchestrator-fallback.test.ts +82 -0
  186. package/tests/orchestrator-prompt-budget.test.ts +131 -0
  187. package/tests/package-manifest.test.ts +160 -7
  188. package/tests/pasted-image-paths.test.ts +118 -0
  189. package/tests/persona-reply-language.test.ts +20 -1
  190. package/tests/pi-update-launcher.test.ts +32 -8
  191. package/tests/pi-update-source.test.ts +162 -0
  192. package/tests/profile-fast-tier.test.ts +311 -0
  193. package/tests/profile-tier-footer.test.ts +79 -0
  194. package/tests/questionnaire-view.test.ts +150 -0
  195. package/tests/review-candidate-owner-sweep.test.ts +93 -0
  196. package/tests/review-candidate-view.test.ts +51 -0
  197. package/tests/review-controller-native-routing.test.ts +120 -6
  198. package/tests/review-gate.test.ts +24 -0
  199. package/tests/review-inspect-preflight.test.ts +197 -0
  200. package/tests/review-integration-v2-forward.test.ts +59 -0
  201. package/tests/review-repository.test.ts +52 -1
  202. package/tests/review-sidebar-state.test.ts +5 -5
  203. package/tests/run-test-suite.test.ts +61 -5
  204. package/tests/sensitive-path-tools.test.ts +74 -0
  205. package/tests/session-profile-append-controller.test.ts +63 -0
  206. package/tests/session-profile-authority.test.ts +259 -0
  207. package/tests/session-profile-binding.test.ts +15 -0
  208. package/tests/session-profile-extension.test.ts +615 -0
  209. package/tests/session-profile-freeze.test.ts +110 -2
  210. package/tests/session-profile-integration.test.ts +857 -0
  211. package/tests/session-profile-persistence.test.ts +57 -0
  212. package/tests/session-profile-v1-compat.test.ts +221 -0
  213. package/tests/shell-bar.test.ts +113 -55
  214. package/tests/shell-card.test.ts +13 -1
  215. package/tests/shell-page.test.ts +108 -0
  216. package/tests/shell-panel.test.ts +332 -0
  217. package/tests/shell-prompt.test.ts +54 -0
  218. package/tests/shell-render-cache.test.ts +5 -0
  219. package/tests/shell-sidebar-fullscreen.test.ts +12 -0
  220. package/tests/shell-sidebar-layout.test.ts +159 -27
  221. package/tests/shell-stats.test.ts +90 -0
  222. package/tests/shell-usage.test.ts +14 -0
  223. package/tests/skill-registry.test.ts +68 -1
  224. package/tests/star-prompt.test.ts +470 -0
  225. package/tests/startup-banner.test.ts +57 -1
  226. package/tests/task-size-routing-contract.test.ts +45 -1
  227. package/tests/verifier-settle-reminder.test.ts +281 -0
  228. package/tests/verify-first-launch-contract.test.ts +56 -5
  229. package/tests/verify-installer-tap.test.ts +57 -0
  230. package/tests/vim-editor-adapter.test.ts +2 -2
  231. package/tests/visual-customization-policy.test.ts +61 -7
  232. package/tests/visual-customize-view.test.ts +253 -8
  233. package/tests/visual-layout-preview.test.ts +28 -0
  234. package/tests/windows-session-bootstrap.test.ts +105 -2
  235. package/tests/work-continuity-contract.test.ts +86 -0
  236. package/tests/writer-surfaces.test.ts +12 -10
  237. package/tests/yolo-customize.test.ts +30 -11
  238. package/tests/yolo-mode-runtime.test.ts +4 -2
  239. package/tests/yolo-mode.test.ts +16 -2
package/README.md CHANGED
@@ -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), 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.
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.
@@ -325,7 +327,7 @@ Save `/gentle:mode default auto` or `/gentle:mode default yolo` to use either op
325
327
  - **Status:** Active status plus a separate widget show **🚀 YOLO ON 🔥 — destructive confirmations remain**.
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
 
@@ -585,7 +588,7 @@ gentle-shell upgrade --rollback
585
588
  - **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
589
  - **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
590
  - **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.
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.
589
592
 
590
593
  </details>
591
594
 
@@ -16,6 +16,8 @@ Inspect relevant evidence and execute only exact test, build, lint, or spec exam
16
16
 
17
17
  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
18
 
19
+ **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).
20
+
19
21
  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
22
 
21
23
  ## Spec-derived probes
@@ -33,6 +35,8 @@ Verify the request, not just the writer's implementation. Reuse observed writer
33
35
 
34
36
  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
37
 
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
+
36
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.
37
41
 
38
42
  - Do not edit, write, or fix findings.
@@ -38,6 +38,7 @@ Do not read persistent memory for context. The parent selects and forwards relev
38
38
  - Preserve existing architecture and conventions; avoid drive-by refactors and dependency changes.
39
39
  - 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
40
  - Use `find` for scoped file discovery. Do not assume an unsupported `glob` tool exists.
41
+ - 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
42
  - **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
43
  - 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
44
  - Treat tool errors, unrelated dirty files, and failing unrelated tests as evidence to report, not problems to hide or rewrite around.
@@ -0,0 +1,147 @@
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
+ "e7bb6042688f9573b73b45b12802c9d598c903b518cffa6ce9128ab6cce82122",
12
+ "f2edcf189dacb0f3294f0c0c2039374ce612543182b78c4a410687bc61e6375f"
13
+ ],
14
+ "agents/gentle-ai-verify.md": [
15
+ "0c8df3faa0ed131fc621f716b13d3fcd9eae7763412a479e696cecf751d653b4",
16
+ "0ddacbfbe1d61d6ef984b9b621ca36b745ff3841e9ca16ac5983706d3a081cd7",
17
+ "106ffe40e2a7cd5a81200ee2c333c72672baa24d28d2808b8d0179913c462c14",
18
+ "24eb8897439b63eee8d03e8292ea337c15438cd2d647fbb38e19e7caf613bc78",
19
+ "2d77c1ddd78c3402381f8d8e336e261e7354e6a5a482f3cf2d3d988c0a59a7eb",
20
+ "375a4c092c2a52e1d7ddd2ef68d9c374d90ae62b85c0096ce0e3374f6eb05402",
21
+ "45d4c9c8960a4975e0ae8406fcfb8e925f4bccdbc459cc111e538be9d621b091",
22
+ "62b61daf53459b21dca599667e49e66a87c8e25894eb02ddff5d334fa1bd159a",
23
+ "642de8acfc92b3d3351cc0eef70d96b2c0d836b37ba322c8426f76ae6d44f8b6",
24
+ "7c93729f53c733c92acb37af89344c5b9446658c9bf110ad7276569937e28352",
25
+ "8b5828c1631392ea3f7e34927279d942af7886203623ef6cdc5e612e60edc690",
26
+ "8cfa5a7b20e16b7577823204205824c79b4658b9f664fdc0ff03915bd39476d4",
27
+ "9767d2720f3c0bdf08c32b4025a67398d84e7734c7d259c9008d9df85c7e75da",
28
+ "a1a7913bf7efa76bfc667be281b0f3ce7e2ca32338377cc340d809020730e63f",
29
+ "c47a862f31ad1833e3cf2f540079db32caae1b00ddb8a617deddc00059317bf5",
30
+ "dc5712ef3fcc30de3fbef08805769e00903206d22f8feef0faee5e73d209ebba",
31
+ "e791567f661f06017c6ed6d7bfc8357029516eb40525da39eb00a0525587ebf3",
32
+ "e85f2da2bb4fc40e0662e37b5afcb050ba00704fbcb32eaec58b32ab95a47fe5",
33
+ "ea9b01f6f97a12ed37471b86d338f3d4d6a1decba806464b085817ae0057961d",
34
+ "ece25e172a3f3c4614040da00cdeaf4fad2c3d8c62cfe02ca9c184f46d01c752",
35
+ "fd074e7cf5ecc25ec334d2c8db7d0507bb14061074157158199a90ac0af0a3d0"
36
+ ],
37
+ "agents/gentle-ai-worker.md": [
38
+ "0000cf664ae3d7186f861a65a0635eb738afa0c59b492906af5cb4c4e666c418",
39
+ "0cddd8508e4f0ce34ecd06e48cfd4037e9ec5bb0fdc3d77ff40537b110b931d1",
40
+ "1178dcf29e31ebdf81c8667c89da604f186f1056a629aa1993424fa25d90b111",
41
+ "1bbe61ae83655f349a2a813f8a59f7ddde15f9d730d706e5b23b1d72a24eba78",
42
+ "26feb5e62e54494799b388cbb959c8ec4f94e9530555ddde9a64dac2fbb04938",
43
+ "42e39b8659926d6509dc42dac8beb2d1a8876e1a9507cb3f93f417e041566230",
44
+ "4caf5a849e40aea3fdaa060a0ae1aecccf510d1440a01de1a3e356c391420b21",
45
+ "5864fda40e03b74748cb3de4815440bba22a0d28bc39eff129c1fd6097ee8808",
46
+ "6010bc8878d509ce606b48dd11ef1655565dcdeb58e54f15fceaf45a5d6d3d5b",
47
+ "62db7da32efc8481c229d88203d302b6c35a608d04d3c827ed23f8ae3f233dbb",
48
+ "67c05b8230edb04e32b6e4170a1a1e4aea32d1f06654f32c25c7bb036711c260",
49
+ "6b0f46ae30ae40c3c02ef6e59f4d8e24d79e9c99142f5d98d431e44d4f7b6afd",
50
+ "742f28df68fb6a96f75a9b0aa5b13a1404979abb32f4a73f4c61466f9743f1c3",
51
+ "844d72d6158e7b7727ec6e26454bfe684e704e8f705f19487a689db0de441f41",
52
+ "86063adefe9a61b8c4a9ae13a96f03704a7fd6dcf814650d5cb945fb9edc4363",
53
+ "891abb5122bf7df043393739a3b27a197dd5c04aa82f92a4807beb878571c627",
54
+ "92547d91843f2e9642305c6607b03c90063962237ff9e11c46d3f2ff4604ebe4",
55
+ "9c02d247e11d89fbde5975d13cb3fd8d74ded6c6b8777c91db7c083d7db0f26b",
56
+ "9c1646f893904d1fe6da24c592b90ae214ef8e7429de840225066b2a1b204081",
57
+ "aea936c9be526adb94fc2e215472c61cc99e6d31d0cc45383a18bcdc40c96c10",
58
+ "b7b7947b8535c1209807b2b7153aadc4b4020a362e1b9e2413c14225e0614b2f",
59
+ "c08804e7674aa1908baf7992c006ae641bd9ccea155506f5304f3e782a02703d",
60
+ "e3751bc757d3f2d5a809d08791778e689a606ac8662614995401d0a7a2f5f227",
61
+ "e4e19c666892c5fdc789a5555485873d7a2a644064dfec9771fcfb224dd34040",
62
+ "e9d2a7babaef1fb3fb62133cd122914fc38c1e6b7015b307cb1542278311b121",
63
+ "effa58a1b42a8aeed203ecaf4d02abf8da0e7cade11876ebf3410e213f14b2fc"
64
+ ],
65
+ "agents/jd-fix-agent.md": [
66
+ "636726fad70624051bfe2c81302dae34dd04c7c7d181cd0237dcd8139f844a6f",
67
+ "6ef3c3801fcf17acba6b2a2e6fd32c5a66a3bf6bc8f3f9841d74ae5a98a3f030",
68
+ "7614d2f87ae011b1b3163d0ea0f4cc506fc503addeffab1378609629adfc6d53",
69
+ "79d11f0c8609f46029c543338a36a28bf4b23bb8a24b075d2c6b0e40b77e3daa",
70
+ "812951941f17833ef9967ce1bb9ba84ce0955932be68d4adaf357d2e8ce5e18d"
71
+ ],
72
+ "agents/jd-judge-a.md": [
73
+ "2ce38f9cfa767b2e4694c604733ae0ee76b96ae256a246b5ce5eae2f994fc8e7",
74
+ "59fb0579a4104fa786be417af762c9d662ea49e58a3ab7d13f2d227ad4ee4446",
75
+ "5bb9343e6dc99740cfe0c0b45b04949eca67a0364c3263379fc7129089ad0ec7",
76
+ "7c933641029fbe84dd64d37f8fc568d5ab2b7c1d27d1a583386e56443303b9a7",
77
+ "af630de5152efa988193b4a4674a262dd7cf808bc342cad4db7b3068f36d258d",
78
+ "d3c28748de9cc21d83d9797ae2b97d2f08b28fa1f32d0910b9f519953f20beed",
79
+ "f186dc18019fefbe151573fd391a43c19063aaf4b45ee4f98aef961c6d44bd9f",
80
+ "f4226a3ca47c89462b389cf257efeefd7eec5f97237d95284aaecf7787e1bd5b",
81
+ "fd4c5d6e0c4b0adcf662418277d15fec6932ad7ee9079c0d8c66fd9a8e19aa75"
82
+ ],
83
+ "agents/jd-judge-b.md": [
84
+ "182106d3ba2cf66a316db57dd9991d1d3f19fbde7eeda4961d44a6919e87a498",
85
+ "6c6e4952e3ba84cdd144d417d63ec46c1b1eec04400614f7a66009f12619318b",
86
+ "78c99b242a24fb91de234c7604d45cc02b79862176add92ab888ee66c98905e0",
87
+ "79e91ccd3b9e8b27206f97e88bfe7aec95430cf3adec10a1a289620b9f0f0e8b",
88
+ "7cefac81c3fde087215aeb8788334f9096533332afa4a6b553b0d508de26151b",
89
+ "9475e2f73dad908eaaaaca62cb36e6294d99895b0894270cad8cb78a92273e1f",
90
+ "a408834b59786245e928859f39a6a46f4fe56b1cff78af2b0a083dfdad47f73c",
91
+ "bb984b2623c2e551540af7349c5b64fbc10fb83a2a7f33b7f1b2e5136b4f2825",
92
+ "dd5e37efcf57a10f0c9ddcd04f2c7578e8ddf938b9e4e7f9c129084a7a38c67e"
93
+ ],
94
+ "agents/review-readability.md": [
95
+ "03c7b1164de55384fd9925e3b4a36dcbcbfdcb97613ff20a0f3a31d9cdfd0bea",
96
+ "2d1606390093c73079a2c75f11d8ec0a51c62a9007d332c00e62f6b05ad475eb",
97
+ "302382c7f6d2d4932adcfc86a7ef5e91ca2cca1e2611b41aa40e73fda782d406",
98
+ "77e511fa51a8b3a6f07b678da04ad21e3e1f70ad13c90c09816e299f2471ebc5",
99
+ "824562d9f29632938104a79e9605ab1f967a2b925f389cf06a2ffd59a1299906",
100
+ "a8b7329d022767bbd3f3abdf3854f5160ada9c34f41dd2191515a69b56b6baca",
101
+ "ca1a6a2db4eac5d694acccace5b934fe33f5233f967a0e035c8ba0af1bb8c890",
102
+ "d1a11e867d569e1400603415576ffb42c06bef8eb7818d30659734b1eae9b120",
103
+ "d3f2f3f63138aef1c25410a5972ac4f95bb479cc6eec4782c1affca0fa168ebb",
104
+ "ec3cf8a5281c313e9004318ee04c35fa4fe584b69751575eed66c49d0bae562f",
105
+ "f60e94b17853581ad11177699744b3a3612584752f126125f939352b6313acd3"
106
+ ],
107
+ "agents/review-reliability.md": [
108
+ "1aec3e29f7fcf3c9b227d6b0dcbc670bd692cb8610d06fd8e2c3baa22094ef15",
109
+ "57757fb2404725142bc1162340596b1da04ad56ec429438444fba42b52ba62d4",
110
+ "66663a6017bcb20487410948028a60e7c46a8393f7d839c099a4ae603a4352db",
111
+ "72323c90a4c9a89be3f5f877507af2a44d4abad2d5424b9059915cdbdc376d6f",
112
+ "825e283bdd2a27aec20d192d13165ac6e8f78eaae76b3ab3cf6b85e2e355a4a6",
113
+ "8aa4108d332b6a0df56955684681370e3db191fa9d083af5a8489825ffcb437a",
114
+ "90999eed8fab6a66f9f25e77e4e82e21c15ec2ea7b25f9513c80017763c27fe1",
115
+ "99fb57b165d61e9aec15f6ec8dfa529b62c651a435a80e393d497468ad5f9222",
116
+ "a77e00377caef02167e70ef58297809cae55d3f264103cf4b452f0abc1d3ce47",
117
+ "bba81b607ff7e43b1c73a5b956fed2047b3585aba7e3d515cd4258c531eb25fd",
118
+ "f82e05ad287f9eb7d1d97a111c2fa2b83a2c05f61720e89188fe847f8895860e"
119
+ ],
120
+ "agents/review-resilience.md": [
121
+ "0eea216a510e730fd557a430f74220252a9428b6423cfdafb2489285bdab6aea",
122
+ "1937166959285b0fb294b5dfa6b7a7bd4350ddc32840dc54d737ab5e5c1bfd88",
123
+ "1a3a0840f8a86d6b0fcae8820a558936e51265aa9c0c016d5816af6aa53330ac",
124
+ "31380a35ddde77e41305d4bf743abfe542958f7ffd815def18fbbf3dfeca034f",
125
+ "38cf7b46f70bff0832320ca0f2befbc5ceb9d31f61bcdcef60864738b93031f2",
126
+ "54ad6cb64decfe063b8d6d42d16ba54e0cdc020e3515ab4a118157da2c0eef41",
127
+ "8cb2b41594f02c624e802c28f05dfa34b25129fd20cf45c425fa3e9485df65c9",
128
+ "cb611a4dff480468c7fb56cc4a1d54b4ea5f1f94a31ee51a49839e2c9c66a513",
129
+ "d244046cdf0255610505548751a73c06064e4c8cbc10976800674ff7712cfe81",
130
+ "d28ff69aff5a75d9ea529c535a47c270b326e76096cd279c8d2d83fe3d3bd703",
131
+ "e8848192c9329bd804eefbf422903f637a03d9cc503e1d2c27504431a936f65b"
132
+ ],
133
+ "agents/review-risk.md": [
134
+ "0ce1cdd03a37339f212917e29e13970525027a8ea905b8f1dd7dc5781ca9f30e",
135
+ "4cf2bb6b41a486488093479c5c80e4a415170496d6fc665c1f4002374d8a7074",
136
+ "6a8dd122d774c4f72a5cb4612677647aa00620f4c69ab4a9404f39c22c09343a",
137
+ "75af4c02b5408affdfbdc1b5675cdd15a8f3c5688ed72b9284705d9d8448bc4f",
138
+ "86ec32259ce97a77e61947b06d4fbcad713a389f39e989e2842fc1e193fa2288",
139
+ "965a4af892e8f3d5e2b1512b0af360d0df8d95c915db5da8a7b5bf1ec06e9e41",
140
+ "9f9d172cc55e28c5abaa753ee4cd3088d9e8821afb895a3e2a8e8ab5f8cde1ec",
141
+ "ab0b80cce8d55a5c415e3af8c87f0c1b6b58c26aa928adf30cc40459b611c017",
142
+ "ee69cd46c1fbb6fcca26cf83e87a9482297ffa7e0d97ce658455b24d0f4f13f5",
143
+ "f3d961a26806e612739baef984bc9e8acaba36f00b414c8d0dbe5e587df0324c",
144
+ "ff72301b1db1131ae6a63919201b001f65ee7157f8b7a13caa0d0a44e06195aa"
145
+ ]
146
+ }
147
+ }
@@ -45,9 +45,9 @@ 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 |
@@ -105,7 +105,7 @@ 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
 
@@ -15,10 +15,10 @@ 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.
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
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`.
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).
@@ -1,6 +1,6 @@
1
1
  # Orchestrator — Verification (lazy-loaded)
2
2
 
3
- Bind this to the parent Pi session only. Load it when the Verification rule fires (a high-risk change) or a delegated writer returns; the small path never needs it.
3
+ Parent only: load when Verification fires or a delegated writer returns; not for small work.
4
4
 
5
5
  ## Verification rule (normative)
6
6
 
@@ -17,18 +17,22 @@ The independent verifier runs only when the change touches a named Task Size hig
17
17
 
18
18
  ## Agent escalation (gentle-shell#1494)
19
19
 
20
- When the change touches a Task Size high-risk item, whatever the native tier, pass `"escalate": {"item": <1-6>, "reason": "<one line>"}` in the same assess input: the plan adds the independent verifier only when `escalate` names a Task Size high-risk item; the tool raises the tier to high, keeps the native one as `nativeRisk`, returns `agentEscalation`, and never lowers a tier. Until the installed gentle-ai assess accepts it, the raise binds this verification plan only, not the native review tier.
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.
21
+
22
+ ## Verifier preparation failure
23
+
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.
21
25
 
22
26
  ## Verification proportionality
23
27
 
24
- Before introducing or retaining an auxiliary gate, name the acceptance criterion, concrete threat, or authoritative contract it protects. Without that basis it must not become a delivery blocker. Do not build a framework for a bounded capability probe: use the existing command path and retain its observed result. Auxiliary tooling defects stay within the existing correction bound; they do not justify a new verification project or reset that bound.
28
+ Before adding or retaining an auxiliary gate, name its acceptance criterion, concrete threat, or authoritative contract; otherwise it must not become a delivery blocker. Do not build a framework for a bounded capability probe; use the existing command path and retain its observed result.
25
29
 
26
- When the user warns about overengineering, remove or collapse optional artifacts and checks before continuing. State what was removed, what remains indispensable, and the next application outcome. Keep required functional checks, security controls, and native review authority intact; do not call missing proof a pass or weaken permissions merely to proceed.
30
+ On overengineering warnings, remove or collapse optional artifacts and checks. State what was removed, what remains indispensable, and the next application outcome. Keep required functional checks, security controls, and native review authority intact; do not pass missing proof or weaken permissions.
27
31
 
28
32
  ## Parallel review protocol (gentle-shell#1731)
29
33
 
30
34
  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.
31
- 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 per unit 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.
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.
32
36
  3. **Seam check**: after parallel units finish, one inline full-suite command (the parent spot check) catches seams between units.
33
- 4. **Verify handoff**: the whole feature document for context, 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. Requirements belonging only to future or unrelated units 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.
37
+ 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.
34
38
  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**.
@@ -28,15 +28,15 @@ Subagent-facing English delegation and quote/UI exceptions: `orchestrator-delega
28
28
 
29
29
  ## Task Size
30
30
 
31
- A task is **small** when all three hold:
31
+ Task size: small or large. A task is **small** when all three hold:
32
32
 
33
- 1. **Understood** — outcome, what and where to change known; no product or design decision is open; proven in one bounded read batch (at most 3 calls, ~10k tokens).
33
+ 1. **Understood** — outcome, changes and their location known; no product or design decision is open; proven in one bounded read batch (at most 3 calls, ~10k tokens).
34
34
  2. **Contained risk** — no high-risk item below.
35
- 3. **Resumable from the diff** — resume test: if the session stopped now, someone could finish from the original request and `git diff` alone.
35
+ 3. **Resumable from the diff** — resume test: someone could finish from the original request and `git diff` alone.
36
36
 
37
- The number of files, commands or tests, fixes, or a requested `todo` list never decides size. A task is **large** only when the resume test fails (several sessions, external waits, deliverables the user wants apart (never several features asked at once), requirements compaction could lose); large tasks get ODD tracking and workers only by the Writer rule, else inline.
37
+ The number of files, commands or tests, fixes, or a requested `todo` list never decides size. A task is **large** only when the resume test fails (multi-session work, external waits, deliverables the user wants apart (never several features asked at once), requirements compaction could lose); large tasks get ODD tracking and workers only by the Writer rule, else inline.
38
38
 
39
- Small path: inline (parent; `bash_background` policy); read only what you change and its helpers, in one batch; observe RED inline before the fix; run the focused test and the suite inline in one command. No explore, worker, or verifier; no feature document, mirror, or commits unless the user asks; no `todo`. It needs no lazy asset.
39
+ Small path: inline (parent; `bash_background` policy); read only what you change and its helpers, in one batch; observe RED inline before the fix; run the focused test and the suite inline in one command. No explore, worker, or verifier unless a trigger fires; no feature document, mirror, or commits unless the user asks; no `todo`. It needs no lazy asset.
40
40
 
41
41
  **High risk**: a mistake would be hard to detect, hard to undo, or reaches beyond the change: (1) data or irreversible effects that cannot be rebuilt (migrations, rewriting or deleting stored data, format changes, writing data without validation; not saving new records, nor a dev or test database a seed or backup rebuilds); (2) security (auth, permissions, credentials, secrets, guards, sandbox); (3) changing or removing contracts others already consume (public API, CLI flags, config formats, exports, mirrored prompts; not adding a flag, command or optional field; requested changes are not; unrequested breaks in shared code are); (4) concurrency; (5) delivery or environment (installers, release, CI, deploy, dependencies); (6) no test would catch a regression in what changes. Count "unclear" as high only when a bounded look cannot tell whether (1)-(5) apply. When RDD is on and native assess returns a tier, that tier wins.
42
42
 
@@ -50,13 +50,13 @@ Before launching bounded writer (`gentle-ai-worker` or `worker`), derive nonempt
50
50
 
51
51
  ## Mechanisms
52
52
 
53
- Delegation Triggers — each mechanism turns on only when its own trigger condition truly holds, and only then is it mandatory; no trigger holds by default, and when in doubt work inline (prefer `subagent_run`; role missing/unusable: native `Agent`, same read-only constraints; report fallback). When it resolves, re-evaluate task size.
53
+ Delegation Triggers — each mechanism turns on only when its own trigger condition truly holds, and only then is it mandatory; no trigger holds by default, and when in doubt work inline within the evidence budget (prefer `subagent_run`; role missing/unusable: native `Agent`, same read-only constraints; report fallback). Then re-evaluate task size.
54
54
 
55
55
  1. **Ask** — open product or design decision → one focused question; stop and wait.
56
- 2. **Evidence-budget rule** — understanding needs more than one read batch or >~5 sequential lookups → one `gentle-ai-explore`, handoff at most ~2k tokens with `path:line` evidence; one spot check only; never for reading before an inline write.
56
+ 2. **Evidence-budget rule** — understanding needs more than one read batch or >~5 sequential lookups → stop and delegate one `gentle-ai-explore`, handoff at most ~2k tokens with `path:line` evidence; one spot check only. Reassess cumulative discovery each batch, never reset. A fired trigger overrides initial size, including read-only: it limits mutation, not routing. Exempt only preparation for an understood inline write, not discovery.
57
57
  3. **Verification rule** — only a named high-risk item (assess `escalate`) → independent `gentle-ai-verify`; else inline; runtime admission, gates/overengineering: `orchestrator-verification.md`.
58
58
  4. **Track** — large task → feature document, Engram mirror, `todo`, work-unit commits (`orchestrator-tracking.md`, `orchestrator-memory.md`).
59
- 5. **Writer rule** — never by file count or a large task alone; only for a reason (`orchestrator-writer.md`): 2+ independent units of behavior (separate features or fixes that do not depend on each other), each heavier than a subagent start (a subagent spends one to two minutes reading before it writes, so a unit qualifies only when it needs several minutes of work: several files or roughly 100+ changed lines; a small change to one module or one command is done inline even when several such changes are independent), launched together in background, else inline; Context backstop. Tests, docs, and code of the same behavior are one unit, never separate writers; a delivery that depends on an earlier one is not independent.
59
+ 5. **Writer rule** — never by file count or a large task alone; only for a reason (`orchestrator-writer.md`): 2+ independent units of behavior, each heavier than a subagent start (several minutes of work: several files or roughly 100+ changed lines), launched together in background, else inline; Context backstop. Small module or command changes stay inline, even when independent. Tests, docs, and code of the same behavior are one unit, never separate writers; dependent deliveries are not independent.
60
60
  6. **Incident rule** — diagnose wrong cwd/worktree/git/tooling incidents separately before resuming.
61
61
  7. **Context backstop** — when the runtime signals it → delegate the next unit needing several steps. Bound command output (counts, `--stat`, `tail`).
62
62
 
@@ -62,6 +62,7 @@ import {
62
62
  shellQuote,
63
63
  standaloneConfigHome,
64
64
  userPiHome,
65
+ HERDR_REPORTER_ENV,
65
66
  } from "../runtime/gentle-shell-launcher.mjs";
66
67
  import { formatImportPiReport, importPi } from "../runtime/gentle-shell-import-pi.mjs";
67
68
  import {
@@ -367,37 +368,28 @@ function isDirectory(path) {
367
368
  }
368
369
  }
369
370
 
370
- // Reuse Herdr's managed bridge, never its transport. This process-boundary
371
- // lookup is deliberately best-effort and does not modify either agent home.
372
- function managedHerdrExtensionArgs(home, args) {
373
- const env = process.env;
374
- if (home.mode !== "isolated" || args.piSubcommand !== undefined || args.passthrough[0] === "mcp") return [];
375
- if (env.HERDR_ENV !== "1" || !env.HERDR_SOCKET_PATH?.trim() || !env.HERDR_PANE_ID?.trim()) return [];
376
- if (env.GENTLE_PI_AGENTS_CHILD === "1" || !process.stdin.isTTY || !process.stdout.isTTY) return [];
377
- // Only automatic interactive loading: a user opt-out must not become an
378
- // explicit -e (which Pi loads even under --no-extensions). Conservatively
379
- // skip ambiguous mode flags too; --mode text alone still allows a TUI.
380
- const forwarded = args.passthrough;
381
- if (forwarded.some((arg) => ["--no-extensions", "-ne", "--print", "-p", "--export", "--list-models", "-v"].includes(arg))) return [];
382
- if (forwarded.some((arg, i) => (arg === "--mode" && forwarded[i + 1] !== "text") || arg.startsWith("--mode="))) return [];
371
+ const HERDR_BRIDGE_FILE = "herdr-agent-state.ts";
372
+
373
+ // Canonical file name check; an unreadable path is simply not a bridge.
374
+ function isHerdrBridge(path) {
383
375
  try {
384
- if (!statSync(env.HERDR_SOCKET_PATH).isSocket()) return [];
376
+ return basenameOf(realpathSync(path)) === HERDR_BRIDGE_FILE;
385
377
  } catch {
386
- return [];
378
+ return false;
387
379
  }
388
- // Prefer a bridge in the selected home over adding a competing copy; keep
389
- // the incoming Pi home override before falling back to Herdr's usual home.
390
- const agentHomes = [home.dir, env.PI_CODING_AGENT_DIR, join(homedir(), ".pi", "agent")];
391
- for (const agentHome of agentHomes) {
380
+ }
381
+
382
+ // First readable managed bridge among `homes`, as an explicit -e of its
383
+ // canonical path. Pi's package-manager.toResolvedPaths and
384
+ // resource-loader.mergePaths dedupe canonical files across discovery,
385
+ // explicit -e and manifests, so declaring it is harmless.
386
+ function managedBridgeArgs(homes) {
387
+ for (const agentHome of homes) {
392
388
  if (!agentHome) continue;
393
- const bridge = join(agentHome, "extensions", "herdr-agent-state.ts");
389
+ const bridge = join(agentHome, "extensions", HERDR_BRIDGE_FILE);
394
390
  try {
395
391
  if (!statSync(bridge).isFile()) continue;
396
392
  accessSync(bridge, fsConstants.R_OK);
397
- // Pi's package-manager.toResolvedPaths and resource-loader.mergePaths
398
- // dedupe canonical files across discovery, explicit -e and manifests.
399
- // Existence alone is NOT proof of loading: declare the resource and
400
- // let that resolver dedupe it, including explicit aliases from argv.
401
393
  return ["-e", realpathSync(bridge)];
402
394
  } catch {
403
395
  // An absent/unreadable bridge never prevents the ordinary launch.
@@ -406,6 +398,42 @@ function managedHerdrExtensionArgs(home, args) {
406
398
  return [];
407
399
  }
408
400
 
401
+ // Herdr agent identity for an interactive isolated launch (#2705). Herdr's
402
+ // managed Pi bridge reports every pane as `pi`, so when this launcher loads
403
+ // its own package (`loadsOwnPackage`) Gentle Shell no longer loads the bridge
404
+ // and enables its own reporter (extensions/gentle-herdr-agent.ts) through
405
+ // HERDR_REPORTER_ENV. Exactly one reporter owns the pane: a bridge in the
406
+ // selected home is discovered by Pi anyway, and a bridge the user passes
407
+ // explicitly is theirs, so Gentle Shell does not compete with either. A home
408
+ // that loads its own declared gentle-pi may predate the reporter, so it keeps
409
+ // the managed bridge. Best-effort, and it never modifies either agent home.
410
+ function herdrLaunchPlan(home, args, loadsOwnPackage) {
411
+ const none = { extensionArgs: [], reporter: false };
412
+ const env = process.env;
413
+ if (home.mode !== "isolated" || args.piSubcommand !== undefined || args.passthrough[0] === "mcp") return none;
414
+ if (env.HERDR_ENV !== "1" || !env.HERDR_SOCKET_PATH?.trim() || !env.HERDR_PANE_ID?.trim()) return none;
415
+ if (env.GENTLE_PI_AGENTS_CHILD === "1" || !process.stdin.isTTY || !process.stdout.isTTY) return none;
416
+ // Only automatic interactive loading: a user opt-out must not become an
417
+ // explicit -e (which Pi loads even under --no-extensions). Conservatively
418
+ // skip ambiguous mode flags too; --mode text alone still allows a TUI.
419
+ const forwarded = args.passthrough;
420
+ if (forwarded.some((arg) => ["--no-extensions", "-ne", "--print", "-p", "--export", "--list-models", "-v"].includes(arg))) return none;
421
+ if (forwarded.some((arg, i) => (arg === "--mode" && forwarded[i + 1] !== "text") || arg.startsWith("--mode="))) return none;
422
+ try {
423
+ if (!statSync(env.HERDR_SOCKET_PATH).isSocket()) return none;
424
+ } catch {
425
+ return none;
426
+ }
427
+ if (forwarded.some((arg, i) => (arg === "-e" || arg === "--extension") && isHerdrBridge(forwarded[i + 1] ?? ""))) return none;
428
+ if (!loadsOwnPackage) {
429
+ // Prefer the selected home, keep the incoming Pi home override, then
430
+ // fall back to Herdr's usual home.
431
+ return { extensionArgs: managedBridgeArgs([home.dir, env.PI_CODING_AGENT_DIR, join(homedir(), ".pi", "agent")]), reporter: false };
432
+ }
433
+ const selected = managedBridgeArgs([home.dir]);
434
+ return selected.length > 0 ? { extensionArgs: selected, reporter: false } : { extensionArgs: [], reporter: true };
435
+ }
436
+
409
437
  // Real-fs adapter for discoverLooseExtensionEntries (lib/gentle-shell-launcher.ts):
410
438
  // statSync-based isFile/isDirectory (not readdirSync's Dirent, which uses
411
439
  // lstat and so would treat a symlinked file or directory as neither) so a
@@ -1865,7 +1893,7 @@ async function main() {
1865
1893
  const args = parseLauncherArgs(process.argv.slice(2));
1866
1894
  if (args.error !== undefined) fail(`${args.error}\nRun 'gentle-shell --help' for usage.`, 2);
1867
1895
  if (args.help) {
1868
- process.stdout.write("Pi updates: update reinstalls the verified supplier of the Pi this launcher runs (a global Pi, or the\nShell package whose adjacent peer it is, at the same Shell version) and reads the resulting Pi version back.\nUnknown ownership refuses without installing; update --extensions-only stays Pi-only.\nPrefix-bundled Pi updates with gentle-shell upgrade.\n");
1896
+ process.stdout.write("Pi updates: update reinstalls the verified supplier of the Pi this launcher runs (a global Pi, or the\nShell package whose adjacent peer it is, at the same Shell version) and reads the resulting Pi version back.\nA linked source Shell updates its local Pi with its project manager and one matching lockfile;\npnpm may be newer than the declared minimum; npm must match its pin. No manager is downloaded;\nGit roots only, no lifecycle scripts or range changes. Root-only pnpm configuration is preserved;\nmulti-project/ancestor workspaces and conflicting lockfiles refuse before installation. Unknown ownership refuses; update --extensions-only stays Pi-only.\nPrefix-bundled Pi updates with gentle-shell upgrade.\n");
1869
1897
  process.stdout.write(`${helpText()}\nBundled Engram memory: Shell shares the global Engram server on 127.0.0.1:7437, like other agents' hooks.\nA running server is reused only with verified /compatibility evidence; when nothing listens, Shell starts the\nbundled core's engram serve (default ~/.engram) and waits for that evidence. Otherwise ENGRAM_BIN is Shell's\nguard and memory stays off for that launch. Matching versions or updating alone do not prove compatibility.\nBack up existing data before manual changes; do not delete it or bypass the safety check.\nShell rechecks on every launch and remains usable without memory.\nAn explicit ENGRAM_BIN or ENGRAM_URL is kept and bypasses the guard.\n`);
1870
1898
  process.exit(0);
1871
1899
  }
@@ -2185,6 +2213,9 @@ async function main() {
2185
2213
  }
2186
2214
  bundledEnv = bundledProcessEnv();
2187
2215
  }
2216
+ // buildPiInvocation injects this package unless the home's own declared
2217
+ // gentle-pi is used as-is.
2218
+ const herdr = herdrLaunchPlan(home, args, takeOver || declaration === undefined);
2188
2219
  const invocation = buildPiInvocation({
2189
2220
  runtime,
2190
2221
  home,
@@ -2193,7 +2224,7 @@ async function main() {
2193
2224
  takeOver,
2194
2225
  otherPackagePaths,
2195
2226
  looseExtensionEntries,
2196
- passthrough: [...managedHerdrExtensionArgs(home, args), ...passthrough],
2227
+ passthrough: [...herdr.extensionArgs, ...passthrough],
2197
2228
  piSubcommand: args.piSubcommand,
2198
2229
  baseEnv: bundledEnv ?? process.env,
2199
2230
  bundled: Boolean(bundled),
@@ -2204,6 +2235,10 @@ async function main() {
2204
2235
 
2205
2236
  // Only an interactive session ends with pi's exit resume hint, which
2206
2237
  // gentle-shell completes with its own line; a pi subcommand gets no handoff.
2238
+ // A nested launch must not inherit a stale reporter handoff.
2239
+ if (herdr.reporter) invocation.env[HERDR_REPORTER_ENV] = "1";
2240
+ else delete invocation.env[HERDR_REPORTER_ENV];
2241
+
2207
2242
  const resumeHandoff = args.piSubcommand === undefined ? createResumeHandoff() : undefined;
2208
2243
  const childEnv = resumeHandoff ? { ...invocation.env, [RESUME_HANDOFF_ENV]: resumeHandoff.path } : invocation.env;
2209
2244
 
@@ -0,0 +1,11 @@
1
+ # Installer CI: one native Windows pass
2
+
3
+ The installer job still runs all eight suites on Linux, macOS and Windows. On Windows it checks the first run's TAP against the 30 literal native declarations and eight process modes: every name must appear exactly once as an executed pass. Other platform-specific skips remain valid. The job preserves the test process exit status and fails if TAP capture or verification fails. It no longer repeats the native suite.
4
+
5
+ ## Compare hosted runs
6
+
7
+ Compare the exact base and candidate commits using the same event, runner image, Node and Go versions, and cache state. Record the queue, setup and installer execution times, exit status and full test inventories for each OS; repeat runs to expose variance. On Windows verify all 38 native passes and zero native skips from the first run. Local non-Windows runs and synthetic TAP fixtures do not prove native Windows behavior or a hosted speedup.
8
+
9
+ ## Superseded pull requests
10
+
11
+ Only a newer run of the same pull request cancels its predecessor. Main pushes have unique run-ID groups and are never cancelled by this policy. Required tests and the native fail-closed evidence check are unchanged; hosted supersession behavior still needs observation.
@@ -2,6 +2,12 @@
2
2
 
3
3
  How the Gentle Pi orchestrator decides who verifies a bounded writer's work. The always-on parent prompt renders a `Receipt-driven development: on|off|unknown` line; the verification module (`assets/orchestrator-verification.md`, Verification rule) keys the verification rule on it. Because the line sits in the cached system-prompt prefix, a session keeps the first line it rendered and re-renders it only when RDD turns off or back on (which also drops or restores the review execution contract); an `unknown` to `on` flip or a deciding-source change keeps the original text, and review tools always read the live mode. While the pinned line reads `off`, the parent request also carries a lean review loadout: `gentle_review` keeps its schema but its snippet, guidelines, and description cover only `assess`, and the `gentle_review_capture`, `gentle_review_capture_group`, and `gentle_review_scope` declarations are hidden (they stay registered and active). The loadout follows the pinned line, so it changes only at the next run after RDD turns off or back on, together with the review execution contract; `on` and `unknown` keep the full registered text. This page is package-owned; `docs/review-integration.md` mirrors the Gentle AI contract and must stay byte-identical to it.
4
4
 
5
+ ## Verifier preparation
6
+
7
+ The independent verifier makes one isolated preparation attempt. At the first inability to prepare a required copy, environment, dependency, or helper, it stops setup and reports one concrete blocker, the exact checks left unrun as unverified, not passed, and any scratch directories created. It does not retry setup or chain helper repairs; the parent stops with one **Needs your decision** result identifying the missing prerequisite and exact unrun checks, without continuing helper repairs or automatically relaunching for the same prerequisite. Setup or infrastructure failure is distinct from a code finding, whose existing correction allowance remains; auxiliary tooling defects remain subject to the existing correction bound, which setup failure does not reset. Successful preparation continues to authorized checks and independent probes within the existing isolation and permission boundaries.
8
+
9
+ This is prompt policy, not a runtime-enforced limit; contract tests establish instruction delivery, not agent compliance or a measured speedup.
10
+
5
11
  ## Background capability admission
6
12
 
7
13
  An explicit agent `tools` declaration containing `bash_background` requires the background-subagents policy to resolve to `on` at dispatch, for both task and background launches. Otherwise the runner fails the task before spawn and reports the policy file, opt-in schema, and `/gentle:background-subagents enable|disable|status`. Fix the deciding policy explicitly; automation must not toggle it. Passing admission does not promise child background-tool support (future Slices 2–3); ordinary missing-tool reporting remains the backstop. See the [policy contract](readme-reference.md#capability-reference).