gentle-pi 4.6.0 → 4.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (536) hide show
  1. package/README.md +65 -55
  2. package/assets/agents/gentle-ai-explore.md +4 -3
  3. package/assets/agents/gentle-ai-verify.md +23 -6
  4. package/assets/agents/gentle-ai-worker.md +9 -6
  5. package/assets/agents/jd-fix-agent.md +1 -0
  6. package/assets/agents/jd-judge-a.md +2 -3
  7. package/assets/agents/jd-judge-b.md +2 -3
  8. package/assets/agents/review-readability.md +1 -5
  9. package/assets/agents/review-reliability.md +1 -5
  10. package/assets/agents/review-resilience.md +1 -5
  11. package/assets/agents/review-risk.md +1 -5
  12. package/assets/design-canvas/canvas-api.js +45 -0
  13. package/assets/design-canvas/canvas-boards.js +456 -0
  14. package/assets/design-canvas/canvas-boot.js +217 -0
  15. package/assets/design-canvas/canvas-checks.js +491 -0
  16. package/assets/design-canvas/canvas-comments.js +315 -0
  17. package/assets/design-canvas/canvas-compare.js +159 -0
  18. package/assets/design-canvas/canvas-events.js +75 -0
  19. package/assets/design-canvas/canvas-export.js +393 -0
  20. package/assets/design-canvas/canvas-focus.js +203 -0
  21. package/assets/design-canvas/canvas-handoffs.js +150 -0
  22. package/assets/design-canvas/canvas-i18n-es.js +392 -0
  23. package/assets/design-canvas/canvas-i18n.js +108 -0
  24. package/assets/design-canvas/canvas-layout.js +526 -0
  25. package/assets/design-canvas/canvas-menu.js +213 -0
  26. package/assets/design-canvas/canvas-messages.js +86 -0
  27. package/assets/design-canvas/canvas-minimap.js +163 -0
  28. package/assets/design-canvas/canvas-parts.js +401 -0
  29. package/assets/design-canvas/canvas-popover.js +234 -0
  30. package/assets/design-canvas/canvas-rail.js +348 -0
  31. package/assets/design-canvas/canvas-sizes.js +524 -0
  32. package/assets/design-canvas/canvas-store.js +164 -0
  33. package/assets/design-canvas/canvas-tokens.js +674 -0
  34. package/assets/design-canvas/canvas-ui.js +24 -0
  35. package/assets/design-canvas/canvas-view.js +184 -0
  36. package/assets/design-canvas/canvas.css +759 -16
  37. package/assets/design-canvas/canvas.js +2 -1497
  38. package/assets/design-canvas/index.html +117 -36
  39. package/assets/design-canvas/inspector.js +546 -16
  40. package/assets/install-wizard/wizard.js +6 -1
  41. package/assets/migrations/agent-body-history.json +40 -1
  42. package/assets/orchestrator-delegation-reference.md +10 -16
  43. package/assets/orchestrator-delegation.md +5 -5
  44. package/assets/orchestrator-full-delegation-card.md +64 -0
  45. package/assets/orchestrator-full-delegation.md +34 -0
  46. package/assets/orchestrator-memory.md +5 -5
  47. package/assets/orchestrator-prompts.md +2 -2
  48. package/assets/orchestrator-quota-recovery.md +5 -0
  49. package/assets/orchestrator-skills.md +14 -13
  50. package/assets/orchestrator-tracking.md +10 -14
  51. package/assets/orchestrator-verification.md +12 -8
  52. package/assets/orchestrator-writer.md +4 -4
  53. package/assets/orchestrator.md +21 -25
  54. package/bin/gentle-shell.mjs +292 -65
  55. package/contracts/review-provider-contract-mirror/provider-contract.lock.json +8 -9
  56. package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/bundle/manifest.json +3 -3
  57. package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/bundle/orchestration/pi.md +1 -0
  58. package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/bundle/routing/pi.md +6 -6
  59. package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/generated/provider-capabilities.baseline.json +3 -3
  60. package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/generated/provider-roles.baseline.json +1 -1
  61. package/docs/agent-status.md +61 -0
  62. package/docs/assets/brand/sponsor-banner.svg +60 -0
  63. package/docs/bundled-install.md +20 -10
  64. package/docs/delegated-verification.md +46 -8
  65. package/docs/desktop-rpc.md +1253 -0
  66. package/docs/gentle-agents-activity.md +40 -0
  67. package/docs/gentle-shell.md +91 -30
  68. package/docs/install-wizard.md +30 -21
  69. package/docs/odd-preparation-continuity.md +24 -0
  70. package/docs/permission-modes.md +17 -4
  71. package/docs/prompt-budget.md +12 -0
  72. package/docs/rdd-odd-friction-triage-2026-11-07.md +57 -0
  73. package/docs/readme-reference.md +142 -45
  74. package/docs/render-cache-performance.md +11 -1
  75. package/docs/review-coordinator.md +53 -0
  76. package/docs/review-delivery-preflight.md +22 -0
  77. package/docs/review-request-context.md +19 -0
  78. package/docs/review-windows-acl.md +18 -0
  79. package/docs/voice.md +6 -3
  80. package/docs/work-continuity.md +11 -1
  81. package/docs/yolo-mode.md +5 -5
  82. package/extensions/ask-user-choice.ts +1 -0
  83. package/extensions/ask-user-question.ts +3 -2
  84. package/extensions/child-context.ts +21 -7
  85. package/extensions/child-safety.ts +3 -0
  86. package/extensions/gentle-agent-status.ts +99 -0
  87. package/extensions/gentle-agents.ts +559 -66
  88. package/extensions/gentle-ai.ts +2001 -518
  89. package/extensions/gentle-design.ts +69 -3
  90. package/extensions/gentle-desktop-rpc.ts +143 -0
  91. package/extensions/gentle-guide.ts +3 -0
  92. package/extensions/gentle-shell.ts +398 -115
  93. package/extensions/gentle-todo.ts +66 -27
  94. package/extensions/gentle-tps.ts +48 -0
  95. package/extensions/quiet-tools.ts +38 -8
  96. package/extensions/skill-registry.ts +349 -167
  97. package/extensions/startup-banner.ts +30 -3
  98. package/lib/agent-assets.ts +30 -6
  99. package/lib/agent-profile-pin.ts +3 -3
  100. package/lib/agent-profiles.ts +160 -2
  101. package/lib/agent-status.ts +105 -0
  102. package/lib/agent-tool-overlay.ts +117 -0
  103. package/lib/agents-config.ts +93 -6
  104. package/lib/agents-history.ts +24 -5
  105. package/lib/agents-message-delivery.ts +17 -0
  106. package/lib/agents-messaging.ts +55 -7
  107. package/lib/agents-protocol.ts +15 -0
  108. package/lib/agents-report-cap.ts +115 -0
  109. package/lib/agents-runner.ts +272 -16
  110. package/lib/agents-session-transport.ts +17 -1
  111. package/lib/auto-permission-runtime.ts +1 -1
  112. package/lib/background-jobs-tools.ts +9 -4
  113. package/lib/bounded-writer-admission.ts +197 -32
  114. package/lib/card-content-policy.ts +8 -6
  115. package/lib/child-context-files.ts +21 -6
  116. package/lib/codemode-renderer.ts +1 -0
  117. package/lib/command-palette.ts +133 -17
  118. package/lib/context-backstop.ts +14 -5
  119. package/lib/delivery-conflict-markers.ts +349 -0
  120. package/lib/design-canvas-assets.ts +36 -0
  121. package/lib/design-canvas-server.ts +241 -23
  122. package/lib/design-comments.ts +94 -4
  123. package/lib/design-handoffs.ts +2 -1
  124. package/lib/design-layout.ts +125 -0
  125. package/lib/design-parts.ts +281 -0
  126. package/lib/design-system-tokens.ts +111 -0
  127. package/lib/desktop-agents-service.ts +294 -0
  128. package/lib/desktop-design-service.ts +233 -0
  129. package/lib/desktop-jobs-service.ts +263 -0
  130. package/lib/desktop-rpc-agents.ts +294 -0
  131. package/lib/desktop-rpc-config.ts +731 -0
  132. package/lib/desktop-rpc-design.ts +138 -0
  133. package/lib/desktop-rpc-jobs.ts +181 -0
  134. package/lib/desktop-rpc-permissions.ts +177 -0
  135. package/lib/desktop-rpc-profiles.ts +196 -0
  136. package/lib/desktop-rpc-usage.ts +229 -0
  137. package/lib/desktop-rpc.ts +225 -0
  138. package/lib/desktop-usage-service.ts +310 -0
  139. package/lib/destructive-command-guard.ts +236 -17
  140. package/lib/execution-surface-guard.ts +20 -0
  141. package/lib/exploration-budget.ts +4 -2
  142. package/lib/gentle-ai-binary.ts +1 -1
  143. package/lib/gentle-ai-renderer.ts +13 -1
  144. package/lib/gentle-design.ts +204 -14
  145. package/lib/gentle-shell-bundled.ts +106 -28
  146. package/lib/gentle-shell-launcher.ts +43 -8
  147. package/lib/herdr-activity.ts +14 -2
  148. package/lib/herdr-busy.ts +45 -0
  149. package/lib/hidden-tools.ts +35 -0
  150. package/lib/image-attachments.ts +33 -0
  151. package/lib/image-disk-cache.ts +137 -0
  152. package/lib/inprocess-reviewer.ts +358 -144
  153. package/lib/jobs-view.ts +198 -11
  154. package/lib/model-fallback-policy.ts +9 -0
  155. package/lib/model-routing-authority.ts +31 -4
  156. package/lib/nan-provider.ts +42 -28
  157. package/lib/native-choice-list.ts +20 -2
  158. package/lib/native-review-cli.ts +172 -20
  159. package/lib/orchestrator-discovery.ts +39 -2
  160. package/lib/orchestrator-mode-policy.ts +105 -0
  161. package/lib/questionnaire/questionnaire-view.ts +105 -12
  162. package/lib/rdd-mode-control.ts +32 -0
  163. package/lib/reply-language-anchor.ts +129 -0
  164. package/lib/request-context-placement.ts +53 -0
  165. package/lib/review-blocker.ts +92 -0
  166. package/lib/review-candidate-symlink-scan.ts +136 -0
  167. package/lib/review-candidate-view-owner.ts +81 -44
  168. package/lib/review-candidate-view.ts +11 -1
  169. package/lib/review-continuation-registry.ts +116 -0
  170. package/lib/review-coordinator.ts +407 -0
  171. package/lib/review-delivery-preflight.ts +85 -0
  172. package/lib/review-failure-facts.ts +49 -0
  173. package/lib/review-host-relay.ts +51 -11
  174. package/lib/review-integration-v2.ts +63 -4
  175. package/lib/review-relay-phase-timing.ts +45 -0
  176. package/lib/review-start-context.ts +17 -0
  177. package/lib/reviewer-stream.ts +87 -0
  178. package/lib/session-profile-freeze.ts +4 -2
  179. package/lib/shell-bar.ts +140 -58
  180. package/lib/shell-changes.ts +2 -0
  181. package/lib/shell-panel.ts +17 -3
  182. package/lib/shell-prompt.ts +16 -3
  183. package/lib/shell-sidebar-layout.ts +112 -40
  184. package/lib/shell-sidebar.ts +7 -0
  185. package/lib/shell-todo.ts +10 -3
  186. package/lib/shell-usage.ts +10 -0
  187. package/lib/verifier-admission.ts +1 -1
  188. package/lib/vim-editor-adapter.ts +9 -2
  189. package/lib/visual-customization-policy.ts +36 -16
  190. package/lib/visual-customize-view.ts +216 -21
  191. package/lib/visual-layout-preview.ts +9 -5
  192. package/lib/visual-profiles.ts +2 -2
  193. package/lib/windows-session-transport.ts +53 -2
  194. package/lib/writer-batch-admission.ts +55 -0
  195. package/lib/yolo-session-policy.ts +46 -16
  196. package/package.json +3 -2
  197. package/prompts/skill-creation.md +1 -10
  198. package/runtime/design-canvas-assets.mjs +37 -0
  199. package/runtime/gentle-ai-binary.mjs +1 -1
  200. package/runtime/gentle-shell-bundled.mjs +106 -28
  201. package/runtime/gentle-shell-launcher.mjs +42 -7
  202. package/runtime/native-review-cli.mjs +169 -17
  203. package/runtime/review-integration-v2.mjs +63 -4
  204. package/scripts/bootstrap.cmd +2 -2
  205. package/scripts/bootstrap.sh +41 -4
  206. package/scripts/build-full-delegation-card.mjs +179 -0
  207. package/scripts/build-runtime-modules.mjs +1 -0
  208. package/scripts/bundled-install.mjs +38 -8
  209. package/scripts/download-progress.mjs +68 -0
  210. package/scripts/gentle-ai-installer.mjs +41 -18
  211. package/scripts/gentle-ai-proxy.mjs +294 -0
  212. package/scripts/install-gentle-ai.mjs +14 -1
  213. package/scripts/installer-downloads.mjs +34 -8
  214. package/scripts/installer-preflight.mjs +33 -22
  215. package/scripts/installer-probes.mjs +25 -5
  216. package/scripts/installer-runner.mjs +27 -12
  217. package/scripts/installer-server.mjs +46 -16
  218. package/scripts/installer-windows.mjs +2 -2
  219. package/scripts/pi-update.mjs +166 -27
  220. package/scripts/prepare-verifier.mjs +107 -0
  221. package/scripts/render-cache-host.mjs +72 -0
  222. package/scripts/render-cache-performance-worker.mjs +5 -4
  223. package/scripts/render-cache-performance.mjs +6 -1
  224. package/scripts/run-test-suite.mjs +40 -28
  225. package/scripts/update-agent-body-history.mjs +55 -8
  226. package/scripts/verify-package-files.mjs +50 -19
  227. package/scripts/voice-worker.cjs +32 -6
  228. package/skills/branch-pr/SKILL.md +16 -16
  229. package/skills/comment-writer/SKILL.md +1 -1
  230. package/skills/design/SKILL.md +16 -13
  231. package/skills/gentle-ai/SKILL.md +7 -7
  232. package/skills/gentle-ui-design/SKILL.md +46 -0
  233. package/skills/gentle-ui-design/references/adaptive-interfaces.md +46 -0
  234. package/skills/gentle-ui-design/references/browse-and-compare.md +62 -0
  235. package/skills/gentle-ui-design/references/composition-and-feedback.md +56 -0
  236. package/skills/gentle-ui-design/references/task-and-content.md +60 -0
  237. package/skills/judgment-day/SKILL.md +2 -2
  238. package/skills/judgment-day/references/prompts-and-formats.md +1 -1
  239. package/skills/rdd-defect-workflow/SKILL.md +6 -6
  240. package/skills/skill-improver/SKILL.md +2 -2
  241. package/skills/skill-registry/SKILL.md +11 -11
  242. package/skills/tui-design/SKILL.md +1 -1
  243. package/skills/work-unit-commits/SKILL.md +10 -11
  244. package/tests/agent-home.test.ts +28 -9
  245. package/tests/agent-profiles-workflow.test.ts +163 -0
  246. package/tests/agent-prompt-diet-contract.test.ts +101 -0
  247. package/tests/agent-risk-escalation.test.ts +1 -1
  248. package/tests/agent-status.test.ts +143 -0
  249. package/tests/agent-tool-overlay-acceptance.test.ts +158 -0
  250. package/tests/agent-tool-overlay.test.ts +89 -0
  251. package/tests/agents-config.test.ts +106 -1
  252. package/tests/agents-history.test.ts +31 -0
  253. package/tests/agents-jobs-frames.test.ts +93 -0
  254. package/tests/agents-message-delivery.test.ts +36 -0
  255. package/tests/agents-prompt-lifecycle-runtime.test.ts +376 -0
  256. package/tests/agents-queries.test.ts +144 -4
  257. package/tests/agents-report-cap.test.ts +126 -0
  258. package/tests/agents-runner-drain.test.ts +193 -0
  259. package/tests/agents-runner.test.ts +215 -3
  260. package/tests/agents-session-transport.test.ts +34 -0
  261. package/tests/always-on-prompt-verdicts-contract.test.ts +188 -0
  262. package/tests/append-system-prompt-route.test.ts +12 -1
  263. package/tests/approved-text-leftovers-contract.test.ts +136 -0
  264. package/tests/artifact-language.test.ts +1 -1
  265. package/tests/ask-user-choice.test.ts +4 -3
  266. package/tests/ask-user-question.test.ts +99 -1
  267. package/tests/audit-leftovers-contract.test.ts +51 -0
  268. package/tests/auto-permission-runtime.test.ts +1 -1
  269. package/tests/autonomous-guard.test.ts +346 -10
  270. package/tests/bounded-stop-contract.test.ts +51 -3
  271. package/tests/branch-pr-skill.test.ts +10 -1
  272. package/tests/bridge-cost.test.ts +19 -4
  273. package/tests/bundled-install.test.ts +31 -6
  274. package/tests/card-content-policy.test.ts +3 -3
  275. package/tests/chained-pr-skill.test.ts +8 -6
  276. package/tests/child-context-files.test.ts +64 -8
  277. package/tests/child-safety.test.ts +11 -0
  278. package/tests/child-skills-catalog.test.ts +56 -0
  279. package/tests/codegraph-tools.test.ts +11 -5
  280. package/tests/codemode-rendering.test.ts +4 -1
  281. package/tests/command-palette.test.ts +284 -1
  282. package/tests/delegate-for-reason-contract.test.ts +32 -10
  283. package/tests/delivery-conflict-markers.test.ts +348 -0
  284. package/tests/design-canvas-all-sizes.test.ts +631 -0
  285. package/tests/design-canvas-allowlist.test.ts +32 -0
  286. package/tests/design-canvas-assets.test.ts +11 -695
  287. package/tests/design-canvas-boards.test.ts +77 -0
  288. package/tests/design-canvas-checks.test.ts +655 -0
  289. package/tests/design-canvas-compare.test.ts +79 -0
  290. package/tests/design-canvas-events.test.ts +59 -0
  291. package/tests/design-canvas-export.test.ts +1168 -0
  292. package/tests/design-canvas-focus.test.ts +113 -0
  293. package/tests/design-canvas-handoffs.test.ts +59 -0
  294. package/tests/design-canvas-i18n-review.test.ts +513 -0
  295. package/tests/design-canvas-i18n-views.test.ts +259 -0
  296. package/tests/design-canvas-i18n.test.ts +526 -0
  297. package/tests/design-canvas-inspector.test.ts +937 -0
  298. package/tests/design-canvas-layout.test.ts +1222 -0
  299. package/tests/design-canvas-minimap.test.ts +413 -0
  300. package/tests/design-canvas-modules.test.ts +90 -0
  301. package/tests/design-canvas-parts.test.ts +721 -0
  302. package/tests/design-canvas-rail.test.ts +799 -0
  303. package/tests/design-canvas-server.test.ts +855 -17
  304. package/tests/design-canvas-sizes.test.ts +548 -0
  305. package/tests/design-canvas-store.test.ts +180 -0
  306. package/tests/design-canvas-tokens.test.ts +965 -0
  307. package/tests/design-canvas-view.test.ts +299 -0
  308. package/tests/design-comments.test.ts +201 -1
  309. package/tests/design-handoffs.test.ts +20 -0
  310. package/tests/design-layout.test.ts +100 -0
  311. package/tests/design-parts.test.ts +260 -0
  312. package/tests/design-system-tokens.test.ts +215 -0
  313. package/tests/desktop-rpc-agents.test.ts +893 -0
  314. package/tests/desktop-rpc-config.test.ts +1452 -0
  315. package/tests/desktop-rpc-design.test.ts +662 -0
  316. package/tests/desktop-rpc-jobs.test.ts +796 -0
  317. package/tests/desktop-rpc-permissions.test.ts +311 -0
  318. package/tests/desktop-rpc-profiles.test.ts +140 -0
  319. package/tests/desktop-rpc-safety.test.ts +119 -0
  320. package/tests/desktop-rpc-usage.test.ts +697 -0
  321. package/tests/desktop-rpc.test.ts +252 -0
  322. package/tests/destructive-command-guard.test.ts +52 -0
  323. package/tests/devbinary/pi-host-relay.devtest.ts +149 -80
  324. package/tests/devbinary/review-session-consent.devtest.ts +84 -0
  325. package/tests/download-progress.test.ts +71 -0
  326. package/tests/engram-safety.test.ts +111 -0
  327. package/tests/execution-surface-guard.test.ts +55 -0
  328. package/tests/fixtures/devbinary/status-v9-escalated-non-blocking.captured.json +92 -0
  329. package/tests/fixtures/devbinary/status-v9-escalated-non-blocking.provenance.md +3 -0
  330. package/tests/fixtures/primary-session-prompt/gentleman.golden.md +26 -31
  331. package/tests/fixtures/proxy-tls/proxy.crt +19 -0
  332. package/tests/fixtures/proxy-tls/proxy.key +28 -0
  333. package/tests/fixtures/refusal-identity.probe.mjs +139 -0
  334. package/tests/fixtures/session-profile-v1/gentle-ai-reviewer.ts +89 -0
  335. package/tests/fixtures/session-profile-v1/replay.ts +53 -6
  336. package/tests/full-delegation-closure.test.ts +160 -0
  337. package/tests/full-delegation-notices.test.ts +76 -0
  338. package/tests/generic-agent-tools.test.ts +3 -3
  339. package/tests/gentle-agent-status.test.ts +74 -0
  340. package/tests/gentle-agents-child-jobs.test.ts +237 -0
  341. package/tests/gentle-agents.test.ts +1403 -20
  342. package/tests/gentle-ai-binary.test.ts +3 -1
  343. package/tests/gentle-ai-child-guards.test.ts +1 -0
  344. package/tests/gentle-ai-elapsed-store.test.ts +19 -0
  345. package/tests/gentle-ai-exploration-budget.test.ts +18 -2
  346. package/tests/gentle-ai-installer.test.ts +135 -51
  347. package/tests/gentle-ai-proxy.test.ts +434 -0
  348. package/tests/gentle-ai-renderer.test.ts +36 -2
  349. package/tests/gentle-ai.test.ts +233 -43
  350. package/tests/gentle-design.test.ts +386 -1
  351. package/tests/gentle-herdr-activity.test.ts +9 -6
  352. package/tests/gentle-shell-bin.test.ts +123 -0
  353. package/tests/gentle-shell-bundled.test.ts +293 -31
  354. package/tests/gentle-shell-launcher.test.ts +78 -11
  355. package/tests/gentle-shell.test.ts +1017 -146
  356. package/tests/gentle-todo.test.ts +51 -11
  357. package/tests/gentle-tps.test.ts +123 -0
  358. package/tests/gentle-ui-design-skill.test.ts +59 -0
  359. package/tests/herdr-busy.test.ts +59 -0
  360. package/tests/herdr-task-summary-policy.test.ts +8 -4
  361. package/tests/hidden-tools.test.ts +188 -0
  362. package/tests/image-disk-cache.test.ts +163 -0
  363. package/tests/independent-recovery-delivery.test.ts +97 -0
  364. package/tests/inprocess-reviewer.test.ts +249 -4
  365. package/tests/install-wizard.test.ts +27 -1
  366. package/tests/installer-downloads.test.ts +30 -1
  367. package/tests/installer-posix-bootstrap.test.ts +115 -14
  368. package/tests/installer-preflight.test.ts +54 -5
  369. package/tests/installer-probes.test.ts +146 -0
  370. package/tests/installer-runner.test.ts +79 -44
  371. package/tests/installer-server.test.ts +215 -13
  372. package/tests/installer-windows-bootstrap.test.ts +19 -1
  373. package/tests/jobs-view.test.ts +260 -6
  374. package/tests/judgment-day-severity-admission.test.ts +46 -0
  375. package/tests/lazy-module-contradictions-contract.test.ts +158 -0
  376. package/tests/maintainer/desktop-rpc.maintest.ts +632 -0
  377. package/tests/maintainer/pi-update-source.maintest.ts +48 -18
  378. package/tests/modal-mouse-boundaries.test.ts +136 -0
  379. package/tests/model-fallback-policy.test.ts +26 -7
  380. package/tests/model-routing-authority.test.ts +178 -2
  381. package/tests/nan-provider-runtime.test.ts +17 -3
  382. package/tests/nan-provider.test.ts +111 -56
  383. package/tests/native-choice-list.test.ts +77 -2
  384. package/tests/native-review-capability-contract.test.ts +17 -1
  385. package/tests/native-review-cli-nonblocking-findings.test.ts +165 -0
  386. package/tests/native-review-cli.test.ts +269 -1
  387. package/tests/native-review-parity.test.ts +24 -5
  388. package/tests/native-review-refusal-identity.test.ts +25 -0
  389. package/tests/no-self-pause-contract.test.ts +13 -2
  390. package/tests/odd-integration.test.ts +11 -3
  391. package/tests/odd-routing-canonical-ratchet.test.ts +3 -3
  392. package/tests/odd-routing-contract.test.ts +80 -28
  393. package/tests/orchestrator-budget.test.ts +35 -5
  394. package/tests/orchestrator-consultation-sdk.test.ts +32 -6
  395. package/tests/orchestrator-delegation-mode.test.ts +154 -0
  396. package/tests/orchestrator-discovery.test.ts +28 -0
  397. package/tests/orchestrator-mode-policy.test.ts +175 -0
  398. package/tests/orchestrator-prompt-budget.test.ts +13 -2
  399. package/tests/orchestrator-prompt-diet-contract.test.ts +221 -0
  400. package/tests/orchestrator-rdd-ownership.test.ts +4 -3
  401. package/tests/orchestrator-work-search.test.ts +4 -2
  402. package/tests/package-files.test.ts +25 -1
  403. package/tests/package-manifest.test.ts +16 -13
  404. package/tests/parallel-reason-contract.test.ts +6 -3
  405. package/tests/permission-allowlist.test.ts +372 -0
  406. package/tests/persona-neutral-voseo.test.ts +4 -4
  407. package/tests/persona-reply-language.test.ts +1 -1
  408. package/tests/persona-single-channel.test.ts +13 -5
  409. package/tests/pi-update-launcher.test.ts +25 -7
  410. package/tests/pi-update-source.test.ts +113 -6
  411. package/tests/pi-update.test.ts +294 -19
  412. package/tests/pnpm-workspace-config.test.ts +58 -0
  413. package/tests/pnpm-workspace-policy.test.ts +47 -0
  414. package/tests/primary-context-files.test.ts +233 -0
  415. package/tests/primary-context-three-files.test.ts +174 -0
  416. package/tests/primary-session-prompt.test.ts +13 -0
  417. package/tests/profile-pin.test.ts +29 -2
  418. package/tests/profile-tier-footer.test.ts +5 -0
  419. package/tests/profiles-panel-delegation-mode.test.ts +422 -0
  420. package/tests/provider-defect-handoff.test.ts +9 -2
  421. package/tests/questionnaire-view.test.ts +115 -0
  422. package/tests/quiet-bash-runtime.test.ts +1 -1
  423. package/tests/quiet-tool-rendering.test.ts +48 -0
  424. package/tests/rdd-aware-verification-contract.test.ts +17 -12
  425. package/tests/rdd-customize.test.ts +287 -0
  426. package/tests/rdd-mode-cache.test.ts +450 -0
  427. package/tests/rdd-mode-control.test.ts +407 -0
  428. package/tests/rdd-mode-scope-regression.test.ts +137 -0
  429. package/tests/rdd-off-independent-regression.test.ts +69 -0
  430. package/tests/rdd-status-line.test.ts +112 -1
  431. package/tests/render-cache-performance.test.ts +171 -2
  432. package/tests/reply-language-anchor-placement.test.ts +184 -0
  433. package/tests/reply-language-anchor.test.ts +189 -0
  434. package/tests/request-context-append-only.test.ts +218 -0
  435. package/tests/request-context-placement.test.ts +148 -0
  436. package/tests/review-agent-end-preflight.test.ts +80 -2
  437. package/tests/review-blocker.test.ts +193 -0
  438. package/tests/review-candidate-owner-retry.test.ts +1 -1
  439. package/tests/review-candidate-symlink-scan.test.ts +157 -0
  440. package/tests/review-candidate-view.test.ts +66 -1
  441. package/tests/review-candidate-windows-boundary.test.ts +131 -0
  442. package/tests/review-candidate-windows-probe.test.ts +63 -0
  443. package/tests/review-committed-restart-ack.test.ts +129 -0
  444. package/tests/review-continuation-registry.test.ts +107 -0
  445. package/tests/review-contract-prompt.test.ts +1 -1
  446. package/tests/review-controller-native-routing.test.ts +261 -5
  447. package/tests/review-controller-workspace-root.test.ts +230 -3
  448. package/tests/review-controller.test.ts +98 -12
  449. package/tests/review-coordinator-correction-gate.test.ts +105 -0
  450. package/tests/review-coordinator-findings.test.ts +206 -0
  451. package/tests/review-coordinator-nonblocking-scope.test.ts +169 -0
  452. package/tests/review-coordinator-runtime.test.ts +117 -0
  453. package/tests/review-coordinator.test.ts +462 -0
  454. package/tests/review-delivery-preflight.test.ts +462 -0
  455. package/tests/review-due-compaction.test.ts +31 -0
  456. package/tests/review-due-public-boundary.test.ts +26 -0
  457. package/tests/review-failure-facts.test.ts +87 -0
  458. package/tests/review-host-relay-routing.test.ts +258 -4
  459. package/tests/review-host-relay.test.ts +39 -0
  460. package/tests/review-integration-nonblocking-findings.test.ts +108 -0
  461. package/tests/review-integration-v2.test.ts +46 -3
  462. package/tests/review-json-arguments.test.ts +105 -11
  463. package/tests/review-last-event-closure.test.ts +68 -0
  464. package/tests/review-ledger-contract.test.ts +19 -40
  465. package/tests/review-loadout-rdd-off-sdk.test.ts +95 -32
  466. package/tests/review-one-call-findings.test.ts +131 -0
  467. package/tests/review-one-call-followups.test.ts +308 -0
  468. package/tests/review-one-call-reviewer-requests.test.ts +207 -0
  469. package/tests/review-one-call.test.ts +452 -0
  470. package/tests/review-owner-identity.test.ts +60 -24
  471. package/tests/review-relay-phase-timing.test.ts +128 -0
  472. package/tests/review-relay-transport-agent.test.ts +39 -2
  473. package/tests/review-reviewer-evidence.test.ts +223 -0
  474. package/tests/review-risk-assessment.test.ts +126 -8
  475. package/tests/review-run-statement-guidance-independent.test.ts +54 -0
  476. package/tests/review-session-standing-permission-controller.test.ts +53 -3
  477. package/tests/review-start-context.test.ts +19 -0
  478. package/tests/review-tool-prose-budget.test.ts +122 -0
  479. package/tests/reviewer-stream.test.ts +149 -0
  480. package/tests/run-test-suite.test.ts +122 -1
  481. package/tests/runtime-harness.mjs +4 -1
  482. package/tests/sensitive-path-tools.test.ts +181 -5
  483. package/tests/session-profile-append-controller-pi.test.ts +60 -31
  484. package/tests/session-profile-binding.test.ts +19 -1
  485. package/tests/session-profile-disk-reader-pi.test.ts +58 -16
  486. package/tests/session-profile-extension.test.ts +2 -2
  487. package/tests/session-profile-v1-compat.test.ts +35 -1
  488. package/tests/shell-bar.test.ts +186 -42
  489. package/tests/shell-panel.test.ts +50 -22
  490. package/tests/shell-prompt.test.ts +17 -0
  491. package/tests/shell-sidebar-fullscreen.test.ts +5 -5
  492. package/tests/shell-sidebar-layout.test.ts +294 -23
  493. package/tests/shell-sidebar-scroll-benchmark.test.ts +1 -1
  494. package/tests/shell-surface-transparent.test.ts +89 -0
  495. package/tests/shell-todo.test.ts +12 -0
  496. package/tests/shell-usage.test.ts +59 -10
  497. package/tests/skill-contradictions-contract.test.ts +122 -0
  498. package/tests/skill-registry-watcher.test.ts +216 -2
  499. package/tests/skill-registry.test.ts +1461 -5
  500. package/tests/startup-banner.test.ts +152 -1
  501. package/tests/startup-home-repo.test.ts +2 -0
  502. package/tests/support/design-canvas-dom.ts +369 -0
  503. package/tests/support/review-coordinator-runtime.ts +264 -0
  504. package/tests/task-size-routing-contract.test.ts +45 -12
  505. package/tests/test-strength-contract.test.ts +2 -1
  506. package/tests/todo-request-append-only.test.ts +214 -0
  507. package/tests/tool-batching-contract.test.ts +3 -1
  508. package/tests/update-agent-body-history.test.ts +138 -0
  509. package/tests/verification-tiers-contract.test.ts +229 -0
  510. package/tests/verifier-admission.test.ts +49 -0
  511. package/tests/verifier-preparation.test.ts +229 -0
  512. package/tests/verify-agent-contract.test.ts +20 -2
  513. package/tests/verify-first-launch-contract.test.ts +162 -11
  514. package/tests/vim-editor-adapter.test.ts +2 -2
  515. package/tests/visual-customization-policy.test.ts +39 -6
  516. package/tests/visual-customize-view.test.ts +573 -9
  517. package/tests/visual-layout-preview.test.ts +15 -1
  518. package/tests/visual-profiles.test.ts +11 -0
  519. package/tests/voice-worker.test.ts +73 -2
  520. package/tests/windows-session-transport.test.ts +126 -0
  521. package/tests/work-continuity-contract.test.ts +77 -6
  522. package/tests/writer-admission-messages.test.ts +232 -0
  523. package/tests/writer-batch-admission.test.ts +66 -0
  524. package/tests/writer-edit-surface-scope.test.ts +52 -20
  525. package/tests/writer-feature-document-admission.test.ts +276 -0
  526. package/tests/yolo-customize.test.ts +27 -4
  527. package/tests/yolo-mode.test.ts +62 -18
  528. package/tests/yolo-session-policy.test.ts +270 -1
  529. package/skills/_shared/review-ledger-contract.md +0 -106
  530. /package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/bundle/README.md +0 -0
  531. /package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/bundle/schemas/lens.schema.json +0 -0
  532. /package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/bundle/schemas/refuter.schema.json +0 -0
  533. /package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/bundle/schemas/targeted-validator.schema.json +0 -0
  534. /package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/bundle/vectors/lens.json +0 -0
  535. /package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/bundle/vectors/refuter.json +0 -0
  536. /package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/bundle/vectors/targeted-validator.json +0 -0
@@ -28,7 +28,7 @@ The number of files, commands or tests, fixes, or a requested todo list never de
28
28
 
29
29
  Small path: work inline. Read and edit, several files of one understood change included; observe RED inline before the fix; run the focused test and the suite inline, once each. No explore, worker, or verifier; no feature document, mirror, or commits unless the user asks; a todo list is optional.
30
30
 
31
- **High risk**: a mistake would be hard to detect, hard to undo, or reaches beyond the change. It touches (1) data or irreversible effects: migrations, changing or deleting existing stored data, persisted format changes (not saving new records); (2) security: auth, permissions, credentials, secrets, guards, sandbox; (3) contracts others consume: changing or removing public API, CLI flags, config formats, published exports, or mirrored prompts or contracts others already consume (not adding a flag, command, or optional field; requested changes are not high risk by themselves; unrequested breaks in shared code are); (4) concurrency: locks, races, async ordering; (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, the native assess tier decides native review and you may only raise it; it never adds an independent verifier by itself, only a named high-risk item does.
31
+ **High risk**: a mistake would be hard to detect, hard to undo, or reaches beyond the change. It touches (1) data or irreversible effects that cannot be rebuilt: migrations, changing or deleting existing stored data, persisted format changes (not saving new records, nor a dev or test database a seed or backup rebuilds); (2) security: auth, permissions, credentials, secrets, guards, sandbox; (3) contracts others consume: changing or removing public API, CLI flags, config formats, published exports, or mirrored prompts or contracts others already consume (not adding a flag, command, or optional field; requested changes are not high risk by themselves; unrequested breaks in shared code are); (4) concurrency: locks, races, async ordering; (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, the native assess tier decides native review and you may only raise it; it never adds an independent verifier by itself, only a named high-risk item does.
32
32
 
33
33
  **Risk line**: close every code change, small path or delegated, with `Risk: item N (reason)` or `Risk: none` per the list; any item fires the Verification trigger. Before writing `Risk: none`, check whether the diff changes code that existing behavior the request did not mention also uses (shared options, parsers, helpers); if it does, that is item 3.
34
34
 
@@ -47,7 +47,7 @@ Each trigger holds only when its condition truly holds, and only then is it mand
47
47
  - **Mapping trigger:** when understanding exceeds the inline batch budget or needs more than approximately 5 sequential lookups, delegate one read-only explorer before deciding or writing anything. Return a handoff of at most approximately 2k tokens with path:line evidence; use one parent spot check (1 maximum). Do not reread the entire mapped evidence. Never explore to read files you will read anyway before writing inline.
48
48
  - **Verification trigger:** only a change whose Risk line names a high-risk item gets an independent verifier after the change's own checks, as rarely as possible; a native tier, an unclear or failed assessment, and the writer's model or effort never add one by themselves. Otherwise whoever made the change runs its focused test and suite inline, small tasks included.
49
49
  - **Tracking trigger:** a large task gets the feature document, its mirror, and work-unit commits.
50
- - **Writer trigger:** a writer is delegated only for a named reason, one bounded writer per unit: (a) parallelism: two or more independent units of behavior with disjoint edit surfaces, each needing several minutes of work (several files or roughly 100+ changed lines; a subagent spends one to two minutes reading before it writes), launched together; (b) context: the long-session 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, and 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. Never delegate a writer for size, a large task alone, file count, or a price ratio; file count never fires this trigger. Without a reason, the parent works inline, following its logbook (feature document, mirror, work-unit commits).
50
+ - **Writer trigger:** a writer is delegated only for a named reason, one bounded writer per unit: (a) parallelism: two or more independent units of behavior with disjoint edit surfaces, each needing several minutes of work (several files or roughly 100+ changed lines; a subagent spends one to two minutes reading before it writes), launched together in one turn (in background when background mode is on); (b) context: the long-session 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, and 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. Never delegate a writer for size, a large task alone, file count, or a price ratio; file count never fires this trigger. Without a reason, the parent works inline, following its logbook (feature document, mirror, work-unit commits).
51
51
  - **Parallel writers:** work in another repository goes in a fresh worktree based on that repository's main, never in a checkout someone else may be using. Parallel units in the same local repository run in the same tree, each with declared disjoint edit surfaces: the parent owns git; writers run no repository-wide formatters, generators, or installs; a shared file has one owner or the parent edits it at the end; the parent checks each writer's diff against its surface before accepting it; and one seam check runs at the end (the full suite, once). Units that need the same file use isolated worktrees.
52
52
  - **Invariants:** each writer prompt names the existing helpers its unit must reuse for shared state (for example the function that adds an entry other commands also add) and the invariants they keep (ordering, uniqueness, validation, normalization); units built in parallel cannot see each other, so the prompt is the only place they learn them. Whoever writes, inline or delegated, reuses the existing function for shared state and never re-implements that step with a different shape.
53
53
  - **Preparation trigger:** when the Writer trigger delegates a write, reading that prepares it, and broad research or context compression, delegate together with or ahead of the write instead of filling the parent context. Inline writes read inline.
@@ -69,16 +69,16 @@ This section is the reference detail for the protocol above.
69
69
  - Use at most one scoped independent read-only assumption challenge for a high-consequence unproven premise, even in a small security-critical change. Name the premise, evidence, and consequence; do not start a debate loop. Deterministic failures need fixes, not model debate. The native RDD refuter owns native review claims; never duplicate or bypass it.
70
70
  - Validate consequential premises against available evidence before building; reuse relevant sibling investigation instead of repeating it. Run focused checks during iteration and all applicable full checks at task closure. Keep spend proportional without a hard spend or line gate; preserve the applicable test-first policy, native RDD, safety, and consent requirements.
71
71
  - Size every task by the Task Size section; small work creates no durable task artifacts, and counts of files, commands, tests, fixes, or lines never make it large. For large authorized implementation, automatically create the feature document after exploration, without a task or storage permission prompt.
72
- - Use about 400 authored changed lines per ODD task only as a planning heuristic, counting additions plus deletions; prefer the smallest coherent behavior with its tests and docs. This is not a task acceptance criterion, hard cap, counter-trigger, automatic stop, forced split, or RDD trigger. If the correct, clear solution naturally exceeds it, briefly explain why and continue without size-only rework loops. Never delete spaces, blank lines, or comments for cosmetic line savings; never omit tests, minify, add gratuitous abstractions, or split artificially to fit the heuristic. Forward this same advisory-only instruction when delegating tasks to subagents. The delivery budget below reads the accumulated branch, not this per-task heuristic. Existing PR size gates remain unchanged; continue under existing repository policy.
72
+ - Use about 400 authored changed lines per ODD task only as a planning heuristic, counting additions plus deletions; prefer the smallest coherent behavior with its tests and docs. This is not a task acceptance criterion, hard cap, counter-trigger, automatic stop, forced split, or RDD trigger. If the correct, clear solution naturally exceeds it, briefly explain why and continue without size-only rework loops. Never delete spaces, blank lines, or comments for cosmetic line savings; never omit tests, minify, add gratuitous abstractions, or split artificially to fit the heuristic. Forward this same advisory-only instruction when delegating tasks to subagents. The delivery budget below reads the accumulated branch, not this per-task heuristic. Existing PR size gates remain unchanged; continue under existing repository policy. A user's line limit is a ceiling, never an exact-count gate; never invent acceptance gates the user did not ask for.
73
73
  - Keep `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 feature identity; 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: a header of two or three lines with the objective, branch, delivery strategy, and test runner; `## Specs` with numbered `S1`..`Sn` requirements and their authorized scope, acceptance criteria, and applicable checks, quoting the user's exact strings, error messages, commands, and examples verbatim in the user's language (number and order them, but never summarize or reword those fragments; Do not add requirements the user never asked for, and mark assumptions as assumptions); `## Tasks` with one line per task, using stable task IDs, with its linked `S#`, route (inline or delegated), status, and commit identity or RED/GREEN evidence; `## Log` as the logbook, where `L1` holds the user's original request verbatim, later user corrections are logged verbatim with their date, and problem analysis, rationale for meaningful accepted changes, verification evidence, progress, and next step are appended. Routine corrections stay brief; no exhaustive decision journal. Mirror the full current document and repository-relative file locator, not just a summary or completion notice.
74
74
  - Accepted user, review, or verification changes automatically update affected intent and TODOs, unlike a process that regenerates every artifact: a requirement change appends its verbatim `## Log` entry, rewrites only the affected `S#`, and reopens only its linked task; preserve valid completed and unrelated work; add genuinely new tasks or reopen invalidated items with a reason, and revise their checks. Findings alone never authorize scope expansion or automatic acceptance. Business scope changes still require user authorization. Check off only observed outcomes with applicable proof; record failed, unavailable, skipped, or pending checks honestly. Checkboxes grant no approval or receipt.
75
- - Read back both writes; they are not atomic. If Engram is unavailable, preserve local progress and explicitly mark the mirror pending; do not claim success or block unrelated safe work. Resynchronize when available. If a file write is unsafe or unavailable, preserve existing state and report the limitation. Preserve both versions on irreconcilable edits and ask only about the real conflict.
75
+ - Read back both writes with the normal read tool; they are not atomic, but never author comparison or reconciliation scripts or gates for them. After a partial or failed sync, check which writes already applied and continue from that state; never replay an applied write. The file is the source: a mirror that differs from the file just written is refreshed from the file, never a blocker. Refresh the mirror once per task transition (a task starts, finishes, is blocked, reopened, or dropped) or material plan change, and at close; `## Log` entries and evidence added between those points go to the file only and reach the mirror at the next one. If Engram is unavailable, preserve local progress and explicitly mark the mirror pending; do not claim success or block unrelated safe work. Resynchronize when available. If a file write is unsafe or unavailable, preserve existing state and report the limitation. Preserve both versions on irreconcilable edits and ask only about the real conflict.
76
76
  - On resume, use `mem_context`, then `mem_search` scoped to the current project and feature, and `mem_get_observation` for the full saved document; read the actual task file. Do not infer active work from the newest global memory. Reconcile current requirements, code, and proof before resuming the next unfinished task; preserve pending mirrors and conflicting edits.
77
77
  - Before implementation or resume, the parent reads both the actual file and full observation, reconciles them, and passes the locator, task IDs, and linked `S#`; workers read the document until `## Log` before edits and report which `S#` they covered. Small work without a document still receives its authorized scope and checks.
78
78
  - Apply one default test-first policy to ODD behavior changes: when a relevant runnable deterministic test and clear expected outcome exist, observe RED before implementation, implement GREEN, then refactor while tests stay green. Write one RED test per requested rule. For every existing command or option the change touches, add one test proving its previous behavior still holds; add no other cases. An existing behavior counts as touched when it shares the code you changed (options, parsers, helpers, validation). Before finishing, run a differential check: for each existing command that shares the code you changed, run it with the new or changed input (for example a new option passed to a sibling subcommand) against the previous code (a copy of the base commit in a `mktemp -d` scratch directory, never committed as a test; committed tests never read git history or a fixed commit) and against your change, and compare stdout, stderr, and exit code; any difference nobody asked for is a regression to fix and pin with a test. Tests or frameworks being present alone do not establish applicability. For passive documentation, unavailable runners, or no meaningful runnable RED, explain the exception and run proportionate functional or structural checks. Keep test scratch state (temporary directories, `HOME`, `TMPDIR`, tool caches) outside the worktree in a `mktemp -d` directory; when it must live inside the worktree, use a path git excludes and remove it before finishing, so no tool cache or scratch path remains in the change. Subagents never delete scratch: they report its exact paths, and the parent removes outside scratch after use, including the paths a worker or verifier reports. Forward the applicable runner, this test discipline, and the evidence or exception to workers; never invent RED/GREEN evidence or a runner.
79
- - Preserve existing native risk selection and applicable functional verification. Run applicable functional checks per task, not a review cycle per TODO checkbox. The native review candidate is a work-unit commit or a PR slice, never a TODO checkbox and never the accumulated feature branch. After each work-unit commit, when RDD is enabled, run `gentle-ai review assess --cwd <repo> --agent pi --base-ref <last reviewed boundary> --committed-only --json` on that commit and read `review_due` and `review_due_reason`. When `review_due` is true (`high_risk`), or when the user explicitly asks for a review, execute the returned `next_transition.command` verbatim with your `--lenses`/`--lenses-reason` selection appended: it is the exact preflight STATUS for the same `--base-ref`/`--committed-only` selectors; follow the transitions it returns, and the reviewed boundary advances to this commit once that review is acknowledged. When `review_due` is false, record `review_due_reason` and continue: `passive` needs no review and the boundary advances; `under_budget` stays pending in the slice until a later commit reaches the budget; `already_reviewed` means this exact range is already covered by terminal authority. When a high-risk unit follows pending `under_budget` commits, close the open slice first, assessing and reviewing it as the slice, so the high-risk commit is then reviewed alone against the new boundary. The first boundary is the branch point, and every reviewed boundary becomes the next base. Record per commit the assessed tier and outcome: granted, declined, passive, under budget, already reviewed, or unavailable. An unavailable or failed assessment never lowers the tier: treat the commit as due and run the preflight STATUS with `--base-ref <last reviewed boundary> --committed-only`. Never infer low risk from a failed assessment, and keep existing risk, consent, and authority unchanged. Never skip an existing delivery gate. A task list or assumption challenge never enables RDD, replaces its roles or candidate consent, or adds an execution harness.
79
+ - Preserve existing native risk selection and applicable functional verification. Run applicable functional checks per task, not a review cycle per TODO checkbox. The native review candidate is a work-unit commit or a PR slice, never a TODO checkbox and never the accumulated feature branch. After each work-unit commit, when RDD is enabled, run `gentle-ai review assess --cwd <repo> --agent pi --base-ref <last reviewed boundary> --committed-only --json` on that commit and read `review_due` and `review_due_reason`. When `review_due` is true (`high_risk`), or when the user explicitly asks for a review, execute the returned `next_transition.command` verbatim with your `--lenses`/`--lenses-reason` selection appended: it is the exact preflight STATUS for the same `--base-ref`/`--committed-only` selectors; follow the transitions it returns, and the reviewed boundary advances to this commit once that review is acknowledged. When `review_due` is false, record `review_due_reason` and continue: `passive` needs no review and the boundary advances; `under_budget` stays pending in the slice until a later commit reaches the budget; `already_reviewed` means this exact range is already covered by terminal authority. When a high-risk unit follows pending `under_budget` commits, assess the open slice first. Review the pending slice only when `review_due` is true or the user explicitly asks; otherwise preserve the pending boundary and proceed without starting review. A task boundary neither authorizes review nor advances a reviewed boundary. The first boundary is the branch point, and every reviewed boundary becomes the next base. Record per commit the assessed tier and outcome: granted, declined, passive, under budget, already reviewed, or unavailable. An unavailable or failed assessment never lowers the tier: report the missing assessment proof; never infer `review_due` or construct a preflight transition. Never infer low risk from a failed assessment, and keep existing risk, consent, and authority unchanged. Never skip an existing delivery gate. A task list or assumption challenge never enables RDD, replaces its roles or candidate consent, or adds an execution harness.
80
80
  - Delivery follows work units. At feature-document creation, forecast authored changed lines (additions plus deletions, generated files excluded) from the task list, and keep a running count from work-unit commits. Choose one delivery strategy per feature: `ask-on-risk` (default), `auto-chain`, `single-pr`, or `exception-ok`. When the forecast or the running count exceeds about 400 authored changed lines, apply the chosen strategy before the next commit: `ask-on-risk` asks once for the chain strategy, `stacked-to-main` or `feature-branch-chain`; `auto-chain` asks only for a missing chain strategy and slices automatically. Cache both choices, and record slice boundaries, which commits each pull request holds, in the feature document. Resolve the `work-unit-commits` and `chained-pr` skills by registry name before planning or creating any pull request, never hardcode their paths.
81
- - When RDD is enabled, first use the existing native candidate risk assessment (`gentle-ai review assess --cwd <repo> --agent pi --json`). Passive/low uses silent structural checks with no reviewer or consent ceremony. Medium/high relays the existing candidate consent and follows the native plan: native review runs only on grant; a decline continues under ordinary policy. Do not substitute model judgment, task size, or defect severity to lower prospective candidate risk; never infer low risk from a failed assessment. You may raise a candidate you know is high risk with `--escalate-item <1-6> --escalate-reason "<one line>"` on that same assessment command, citing the high-risk list; never lower it. Follow native continuations and authority without bypassing gates. When RDD is disabled, do not start or prompt for RDD; ordinary checks remain.
81
+ - When RDD is enabled, first use the existing native candidate risk assessment (`gentle-ai review assess --cwd <repo> --agent pi --json`). Passive/low uses silent structural checks with no reviewer or consent ceremony. Medium/high relays the existing candidate consent only when `review_due` is true or the user explicitly asks, and follows the returned native plan: native review runs only on grant; a decline continues under ordinary policy. Do not substitute model judgment, task size, or defect severity to lower prospective candidate risk; never infer low risk from a failed assessment. You may raise a candidate you know is high risk with `--escalate-item <1-6> --escalate-reason "<one line>"` on that same assessment command, citing the high-risk list; never lower it. Follow native continuations and authority without bypassing gates. When RDD is disabled, do not start or prompt for RDD; ordinary checks remain.
82
82
 
83
83
  ### Receipt-driven development is user-owned
84
84
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schema": "gentle-pi.provider-contract-capabilities-baseline/v1",
3
- "contract_semver": "1.4.0",
3
+ "contract_semver": "1.5.0",
4
4
  "transport_capability": "gentle-ai.provider-transport/v1",
5
5
  "mandatory_capabilities": [
6
6
  "gentle-ai.provider-transport/v1"
@@ -16,14 +16,14 @@
16
16
  {
17
17
  "runtime": "pi",
18
18
  "path": "orchestration/pi.md",
19
- "sha256": "2d7ddd99f1c739a97f4a6b3929e5e2bdddcbf69aed69356395038d90bca25b2f"
19
+ "sha256": "c0e7c4c2ab07a695ecf108b476bee81e6d9ca553b7a3860299fe2870b68d8bfc"
20
20
  }
21
21
  ],
22
22
  "routing": [
23
23
  {
24
24
  "runtime": "pi",
25
25
  "path": "routing/pi.md",
26
- "sha256": "1c7466e2333c08e386b4b5afb081531146d181030692463431e7695df7f90690"
26
+ "sha256": "f34508b060197339fc73dd885565a24d037366c02b3f91b4db15431b42a5c573"
27
27
  }
28
28
  ]
29
29
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schema": "gentle-pi.provider-contract-roles-baseline/v1",
3
- "contract_semver": "1.4.0",
3
+ "contract_semver": "1.5.0",
4
4
  "roles": [
5
5
  {
6
6
  "id": "lens",
@@ -0,0 +1,61 @@
1
+ # Read per-session agent status
2
+
3
+ Any terminal tool can read Gentle Shell's status without Herdr or a socket.
4
+ Interactive top-level Pi sessions publish JSON under
5
+ `<gentlePiConfigHome()>/agent-status/<sha256-of-session-id>.json`.
6
+ Use the active Gentle Shell profile's config home; no `XDG_RUNTIME_DIR` is needed.
7
+ The packaged `gentle-agent-status` extension loads automatically.
8
+
9
+ ## Format: `gentle-shell.agent-status/v1`
10
+
11
+ ```json
12
+ {
13
+ "schema": "gentle-shell.agent-status/v1",
14
+ "agent": "gentle-shell",
15
+ "session": "session-123",
16
+ "pid": 12345,
17
+ "cwd": "/work/project",
18
+ "state": "working",
19
+ "task": { "title": "Implement status adapter" },
20
+ "updatedAt": "2026-07-17T12:34:56.000Z"
21
+ }
22
+ ```
23
+
24
+ - `schema`: version identifier; readers should ignore unsupported versions.
25
+ - `agent`: `gentle-shell` when the launcher owns agent reporting, otherwise `pi`.
26
+ - `session`: stable Pi session ID; `pid`: publisher process ID; `cwd`: session workspace.
27
+ - `state`: `working`, `blocked` (attention takes precedence), or `idle`.
28
+ - `task`: sanitized first `in_progress` Todo title, or `null` when absent, inactive,
29
+ invalid, or task summaries are disabled. Live preference changes apply immediately.
30
+ Titles are bounded to a 4096 UTF-16-unit sample, preserve whole graphemes,
31
+ and strip terminal/control/bidi sequences; no icon, row layout or added ellipsis.
32
+ - `updatedAt`: ISO 8601 UTC heartbeat, refreshed at least every 10 seconds.
33
+
34
+ ## Minimal adapter
35
+
36
+ Set `STATUS_DIR` to the active config home's `agent-status` directory. For example,
37
+ this `jq` reader prints fresh sessions and tolerates missing files during shutdown:
38
+
39
+ ```sh
40
+ jq -r 'select(.schema == "gentle-shell.agent-status/v1") |
41
+ select((now - (.updatedAt | sub("\\.[0-9]+Z$"; "Z") | fromdateiso8601)) <= 30) |
42
+ [.agent, .session, .state, (.task.title // "")] | @tsv' "$STATUS_DIR"/*.json 2>/dev/null
43
+ ```
44
+
45
+ Treat timestamps older than 30 seconds as stale, even if the PID exists. Files
46
+ are replaced atomically on coalesced status changes and heartbeats, then removed
47
+ on shutdown. Crashes may leave stale files. Failed writes/removals never interrupt
48
+ Pi. Children and noninteractive sessions do not publish. Herdr remains unchanged.
49
+
50
+ ## Privacy
51
+
52
+ A symlinked config home, status directory, or status file is refused (nothing is
53
+ written). Directories above the config home are trusted and may be symlinks.
54
+ On POSIX the status directory is created 0700 and files 0600; an existing status
55
+ directory with any group/other permissions, or a config home owned by another
56
+ account or writable by group or others, is refused. Windows has no extra ACL
57
+ check: the files inherit the config home's
58
+ permissions, which are private under the default user profile. The files contain workspace paths,
59
+ session IDs and Todo titles: do not put secrets in titles or expose this directory
60
+ through a public server. Prompts, tool arguments/results and Todo notes are not
61
+ published. Disabling task summaries hides titles, not the remaining status fields.
@@ -0,0 +1,60 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="1200" height="400" viewBox="0 0 1200 400" role="img" aria-labelledby="title desc">
2
+ <title id="title">Sponsor Gentleman Programming on GitHub Sponsors</title>
3
+ <desc id="desc">Free forever, independent by choice. No investors, no paywalls. Gentle AI, Engram and Gentle Shell are funded by the people who use them. Sponsor on GitHub, monthly or one-time.</desc>
4
+ <defs>
5
+ <radialGradient id="glow" cx="18%" cy="50%" r="60%">
6
+ <stop offset="0%" stop-color="#F095C8" stop-opacity="0.30"/>
7
+ <stop offset="55%" stop-color="#F095C8" stop-opacity="0.06"/>
8
+ <stop offset="100%" stop-color="#F095C8" stop-opacity="0"/>
9
+ </radialGradient>
10
+ <linearGradient id="border" x1="0" y1="0" x2="1" y2="1">
11
+ <stop offset="0%" stop-color="#F095C8"/>
12
+ <stop offset="50%" stop-color="#6E3A57"/>
13
+ <stop offset="100%" stop-color="#F095C8"/>
14
+ </linearGradient>
15
+ <linearGradient id="cta" x1="0" y1="0" x2="1" y2="0">
16
+ <stop offset="0%" stop-color="#FF7AC0"/>
17
+ <stop offset="100%" stop-color="#F095C8"/>
18
+ </linearGradient>
19
+ <filter id="neon" x="-50%" y="-50%" width="200%" height="200%">
20
+ <feGaussianBlur stdDeviation="9" result="blur"/>
21
+ <feMerge><feMergeNode in="blur"/><feMergeNode in="blur"/><feMergeNode in="SourceGraphic"/></feMerge>
22
+ </filter>
23
+ <filter id="soft" x="-20%" y="-50%" width="140%" height="200%">
24
+ <feGaussianBlur stdDeviation="12"/>
25
+ </filter>
26
+ <pattern id="grid" width="32" height="32" patternUnits="userSpaceOnUse">
27
+ <path d="M32 0H0V32" fill="none" stroke="#F095C8" stroke-opacity="0.06" stroke-width="1"/>
28
+ </pattern>
29
+ <style>
30
+ .heart { transform-origin: 200px 200px; animation: beat 1.6s ease-in-out infinite; }
31
+ @keyframes beat { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.12); } 24% { transform: scale(0.98); } 36% { transform: scale(1.08); } 50% { transform: scale(1); } }
32
+ .ring { transform-origin: 200px 200px; animation: ring 3.2s ease-out infinite; }
33
+ @keyframes ring { 0% { transform: scale(0.7); opacity: 0.7; } 100% { transform: scale(1.5); opacity: 0; } }
34
+ text { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; }
35
+ </style>
36
+ </defs>
37
+
38
+ <rect x="2" y="2" width="1196" height="396" rx="28" fill="#120D11"/>
39
+ <rect x="2" y="2" width="1196" height="396" rx="28" fill="url(#grid)"/>
40
+ <rect x="2" y="2" width="1196" height="396" rx="28" fill="url(#glow)"/>
41
+ <rect x="2" y="2" width="1196" height="396" rx="28" fill="none" stroke="url(#border)" stroke-width="3"/>
42
+
43
+ <circle class="ring" cx="200" cy="200" r="92" fill="none" stroke="#F095C8" stroke-width="3"/>
44
+ <g class="heart" filter="url(#neon)">
45
+ <path transform="translate(0 9)" d="M200 268 C 120 214, 112 150, 152 128 C 176 115, 194 126, 200 144 C 206 126, 224 115, 248 128 C 288 150, 280 214, 200 268 Z"
46
+ fill="none" stroke="#F095C8" stroke-width="9" stroke-linejoin="round"/>
47
+ </g>
48
+
49
+ <text x="380" y="94" fill="#F095C8" font-size="20" font-weight="700" letter-spacing="5">SUPPORT THE PROJECT</text>
50
+ <text x="378" y="152" fill="#FFFFFF" font-size="50" font-weight="800">Free forever.</text>
51
+ <text x="378" y="208" fill="#FFFFFF" font-size="50" font-weight="800">Independent <tspan fill="#F095C8">by choice.</tspan></text>
52
+ <text x="380" y="250" fill="#D7A0B8" font-size="21">No investors, no paywalls. Gentle AI, Engram and Gentle Shell</text>
53
+ <text x="380" y="278" fill="#D7A0B8" font-size="21">are funded by the people who use them.</text>
54
+
55
+ <rect x="380" y="306" width="300" height="58" rx="29" fill="#F095C8" filter="url(#soft)" opacity="0.55"/>
56
+ <rect x="380" y="306" width="300" height="58" rx="29" fill="url(#cta)"/>
57
+ <path d="M420 348 C 406 339, 404 327, 411 323 C 415 321, 419 323, 420 326 C 421 323, 425 321, 429 323 C 436 327, 434 339, 420 348 Z" fill="#1A1218"/>
58
+ <text x="443" y="343" fill="#1A1218" font-size="22" font-weight="800">Sponsor on GitHub</text>
59
+ <text x="704" y="342" fill="#8F7A86" font-size="17">Monthly or one-time · every contribution counts</text>
60
+ </svg>
@@ -13,7 +13,7 @@ The building blocks live in `scripts/bundled-install.mjs`. The web installer and
13
13
  | `~/.gentle-shell/npm/{prefix,cache}/`, `~/.gentle-shell/npm/npmrc` | npm's global prefix, cache and global config. The global config file is never written. |
14
14
  | `~/.gentle-shell/runtime/pnpm-11.1.1/package/` | Our pnpm, from the verified registry tarball. |
15
15
  | `~/.gentle-shell/runtime/go/1.25.14/go/` | Our Go, only when asked (`acquireGo` layout). |
16
- | `~/.gentle-shell/runtime/engram-3.5.2/engram` | Our Engram, from the verified GitHub release archive ([Isolation from the user's Gentle AI](#isolation-from-the-users-gentle-ai)). |
16
+ | `~/.gentle-shell/runtime/engram-3.7.2/engram` | Our Engram, from the verified GitHub release archive ([Isolation from the user's Gentle AI](#isolation-from-the-users-gentle-ai)). |
17
17
  | `~/.gentle-shell/gentle-ai/` | Gentle AI's state, managed assets, backups and telemetry state (`GENTLE_AI_HOME`). |
18
18
  | `~/.gentle-shell/config/gentle-ai/` | gentle-pi's config home in a bundled install (derived, never exported to Pi): profiles, preferences, persona, background subagents. |
19
19
  | `~/.gentle-shell/pnpm/{store,cache,state,config}/` | Every folder pnpm writes. |
@@ -243,12 +243,12 @@ Dropped: inherited npm and pnpm settings, `NODE_OPTIONS`, `NODE_PATH`, and the w
243
243
  - **No `--prefix`.** A `--prefix` flag on the command line also sets npm's local prefix (`loadLocalPrefix` in `@npmcli/config`). Pi installs a git extension's dependencies with `npm install` in the clone and passes no `--prefix` of its own, so that install would land in the prefix and fail. Pi's `npm:` installs and removals pass `--prefix <agent home>/npm` themselves.
244
244
  - The only global read is `npm root -g` (Pi's lookup of packages an older Pi installed globally). It then resolves to the user's `npm_config_prefix` or our node folder's `lib/node_modules`. It only prints a path and creates nothing.
245
245
  - **Setup.** `gentle-shell setup` runs Gentle AI, which finds `pi` on `PATH`. pnpm's `.bin/pi` shim runs the first `node` on `PATH`. So setup alone gets our node's folder, then the version's `node_modules/.bin`, ahead of the user's `PATH` (`bundledSetupEnv`). It also gets Gentle AI's isolation variables. Everything else in its environment is the same as Pi's.
246
- - **Pi updates (S5).** Some `gentle-shell update` forms make Pi update itself: no target, `--self`, `self` or `pi` as the target, `--all`, and `self` or `pi` with `--extensions`. Pi reads the last two as "all" (`package-manager-cli.js`). For these forms the launcher says that Pi ships pinned with Gentle Shell. In a terminal it then runs `gentle-shell upgrade`; otherwise it names the command. For an "all" form, Pi still gets `update --extensions`, even when the upgrade could not complete; the launcher reports that and the extensions still update. Package, `--models`, help, and forms Pi refuses (conflicting or unknown options) go to Pi unchanged.
246
+ - **Pi updates (S5).** `gentle-shell update` with no target, `--self`, `self` or `pi`, `--all`, or `self`/`pi` with `--extensions` selects the newest published stable Pi for the current Shell. `--latest` is an alias. It warns before installing without the release's verified lockfile, verifies the new pair, and keeps the old pair for rollback. An "all" form still sends `update --extensions` to Pi if the Pi update fails, and exits nonzero for the failure. Explicit extension pins stay pinned. Package targets, `--models`, help, and forms Pi refuses go to Pi unchanged; `--force` on a managed self update is rejected.
247
247
  - **What cannot be intercepted.** A `pi update` that someone runs directly with the bundled `pi` (for example the agent's shell, which finds it through `node_modules/.bin`) is Pi's own command. In Pi 1.1.0, `PI_SKIP_VERSION_CHECK` hides only the startup "Update Available" notice (`utils/version-check.js`). For the update itself, `package-manager-cli.js` detects a pnpm install from the `.pnpm` path, and `config.js` (`getSelfUpdateCommand`) finds no global pnpm root that owns `versions/<id>`. Pi then prints `cannot self-update this installation` and changes nothing.
248
248
 
249
249
  ### Engram startup safety
250
250
 
251
- A bundled Shell shares the global Engram server, like other agents' hooks: it reuses a verified server already listening on the default endpoint and, when nothing listens, starts one itself with its verified bundled core. It decides before setup and again right before Pi starts. When memory may not be used, Shell keeps working without memory and **points `ENGRAM_BIN` at its own guard**, so no provider, whichever Pi route loaded it, can open, create or migrate a store directly. The core pin is **3.5.2**, acquired through the existing size- and checksum-verified path.
251
+ A bundled Shell shares the global Engram server, like other agents' hooks: it reuses a verified server already listening on the default endpoint and, when nothing listens, starts one itself with its verified bundled core. It decides before setup and again right before Pi starts. When memory may not be used, Shell keeps working without memory and **points `ENGRAM_BIN` at its own guard**, so no provider, whichever Pi route loaded it, can open, create or migrate a store directly. The core pin is **3.7.2**, acquired through the existing size- and checksum-verified path. Cores from 3.7.0 on start as a first-class daemon (`engram run -d`, so the standard `engram ps`, `stop`, `logs` and `restart` verbs manage the shared server); older cores, or a daemon handoff that does not come up, keep the legacy detached `serve`.
252
252
 
253
253
  #### Decision
254
254
 
@@ -261,13 +261,13 @@ A bundled Shell shares the global Engram server, like other agents' hooks: it re
261
261
  | Anything else listening: a different service, timeout, 401/404, an older server, malformed answers | Disabled; the listener is never stopped or replaced | Guard |
262
262
  | Explicit `ENGRAM_BIN`, `ENGRAM_URL`, `ENGRAM_PORT`, `ENGRAM_SOCKET`, `ENGRAM_DATA_DIR`, `ENGRAM_DATABASE_URL`, `ENGRAM_SERVER_MODE`, or an invalid `ENGRAM_STARTUP_POLICY` | Disabled, never probed or started | Explicit `ENGRAM_BIN`/`ENGRAM_URL` kept; `ENGRAM_URL` alone gets the verified core (or the guard) as `ENGRAM_BIN`; otherwise guard |
263
263
 
264
- An existing store at `~/.engram` does not disable memory by itself, whoever created it (an earlier Shell or the global Engram CLI): the server owns the store, and Shell only talks to a server that proves itself through `/compatibility`. The one exception is the header tripwire: when `engram.db` is a regular, unlinked file whose first 100 bytes are a valid SQLite header (magic, page size, bytes 18/19 each 1 or 2) and whose `user_version` (bytes 60-63) is **greater** than the bundled core's schema (`1`, verified from `v3.5.2:internal/store/store.go`), a newer Engram migrated the store, so Shell does not start its older core on it. Start that newer Engram's server yourself; Shell then reuses it. A pin without a verified schema entry treats any readable header as newer. Equal or lower (including a stale `0` before a WAL checkpoint) is no signal either way.
264
+ An existing store at `~/.engram` does not disable memory by itself, whoever created it (an earlier Shell or the global Engram CLI): the server owns the store, and Shell only talks to a server that proves itself through `/compatibility`. The one exception is the header tripwire: when `engram.db` is a regular, unlinked file whose first 100 bytes are a valid SQLite header (magic, page size, bytes 18/19 each 1 or 2) and whose `user_version` (bytes 60-63) is **greater** than the bundled core's schema (`1`, verified from `v3.7.2:internal/store/store.go`), a newer Engram migrated the store, so Shell does not start its older core on it. Start that newer Engram's server yourself; Shell then reuses it. A pin without a verified schema entry treats any readable header as newer. Equal or lower (including a stale `0` before a WAL checkpoint) is no signal either way.
265
265
 
266
266
  Classification never runs an Engram executable, never opens SQLite, and never infers compatibility from a version string. It reads the raw database header and makes bounded (1 s) read-only `GET /compatibility` and `GET /health` requests to the default endpoint on a direct loopback socket, without proxy, redirects or credentials. `gentle-shell --version` and a Pi version or help flag (`--version`, `-v`, `--help`, `-h` where Pi reads it as a flag: before Pi's own `--` and not as another option's value, so a prompt or option value containing `-v` does not count) never probe, start a server, ensure the companion or print memory notices. A Pi subcommand (`gentle-shell list`, `install`, ...) and `gentle-shell setup` never start a server either.
267
267
 
268
268
  #### Starting the shared server
269
269
 
270
- Only the final pre-Pi decision starts a server. Shell runs the verified bundled core as plain `engram serve`, with Engram's own default port and data directory, **detached** (its own process group, `stdio` ignored, unreferenced, `windowsHide` on Windows, working directory the home folder), so it outlives Pi like a server other agents' hooks start. Its environment is the user's minus every `ENGRAM_*` setting and `GH_TOKEN`/`GITHUB_TOKEN`, plus `ENGRAM_NO_UPDATE_CHECK=1`. For `TMPDIR`/`TMP`/`TEMP` whose final path component is session scratch (`gp` or `ga` followed by exactly six alphanumeric characters), POSIX drops the setting. Windows instead explicitly replaces it with its original absolute ancestor outside consecutive scratch components: omitting `TEMP` can cause Node to inherit the parent's scratch again. When any Windows scratch setting is replaced and `TEMP` is absent, Shell also sets `TEMP` to that stable ancestor. Existing custom temp settings retain their own values, even when they name different roots. Windows path separators and case-insensitive environment keys are supported. An unsafe relative scratch path disables this startup attempt before spawning; Shell never guesses a root or creates a temp folder. Unrelated variables remain unchanged. Pi keeps the user's environment. Shell then polls `GET /compatibility` for up to 10 seconds. A ready answer allows memory through the reuse URL; otherwise (the core fails to start, exits, or never answers ready) memory is disabled for that launch with a notice, and Shell still starts Pi. Concurrent launches converge: when the child exits (for example because another launch won the bind), Shell keeps polling for a short grace, and a ready `/compatibility` from the winner counts as started. Shell never stops a server it started or found; it keeps running for every client until you stop it.
270
+ Only the final pre-Pi decision starts a server. From Engram 3.7.0, Shell starts its verified bundled core through `engram run -d`, so the server is a pidfile-tracked daemon the standard `engram ps`, `stop`, `logs` and `restart` verbs manage, and the wrapper's bounded await plus a short `/compatibility` grace decide readiness. Anything else (an older core, a failed or timed-out daemon handoff) keeps the following legacy path. Shell runs the verified bundled core as plain `engram serve`, with Engram's own default port and data directory, **detached** (its own process group, `stdio` ignored, unreferenced, `windowsHide` on Windows, working directory the home folder), so it outlives Pi like a server other agents' hooks start. Its environment is the user's minus every `ENGRAM_*` setting and `GH_TOKEN`/`GITHUB_TOKEN`, plus `ENGRAM_NO_UPDATE_CHECK=1`. For `TMPDIR`/`TMP`/`TEMP` whose final path component is session scratch (`gp` or `ga` followed by exactly six alphanumeric characters), POSIX drops the setting. Windows instead explicitly replaces it with its original absolute ancestor outside consecutive scratch components: omitting `TEMP` can cause Node to inherit the parent's scratch again. When any Windows scratch setting is replaced and `TEMP` is absent, Shell also sets `TEMP` to that stable ancestor. Existing custom temp settings retain their own values, even when they name different roots. Windows path separators and case-insensitive environment keys are supported. An unsafe relative scratch path disables this startup attempt before spawning; Shell never guesses a root or creates a temp folder. Unrelated variables remain unchanged. Pi keeps the user's environment. Shell then polls `GET /compatibility` for up to 10 seconds. A ready answer allows memory through the reuse URL; otherwise (the core fails to start, exits, or never answers ready) memory is disabled for that launch with a notice, and Shell still starts Pi. Concurrent launches converge: when the child exits (for example because another launch won the bind), Shell keeps polling for a short grace, and a ready `/compatibility` from the winner counts as started. Shell never stops a server it started or found; it keeps running for every client until you stop it.
271
271
 
272
272
  #### The guard
273
273
 
@@ -286,7 +286,17 @@ When the running server's `/health` reports a valid 32-hex `instance_id` and a c
286
286
 
287
287
  Engram 3.3.2 does not expose `/compatibility`, so reinstalling that version cannot authorize reuse of an existing global store. [Engram 3.4.0](https://github.com/Gentleman-Programming/engram/releases/tag/v3.4.0) includes the endpoint from PR #1792. Back up the existing store before updating its server through its own installation method, then restart that server and Shell. Updating Shell's bundled binary does not replace an already-running global server. Reuse still requires a valid ready response, not just the version number; a token-protected server cannot provide it to Shell's unauthenticated probe. Do not disable authentication to bypass this policy or use an unpublished build.
288
288
 
289
- The memory decision never skips or fails setup: `gentle-shell setup` always publishes the verified core, runs Gentle AI and pins the companion, as before. Gentle AI 4.0.0 `install --agent pi` runs no `engram setup` for Pi, and `pi-engram init` only edits settings, so neither opens a store. Setup reclassifies after publishing the core, and the decision only selects the Engram environment its children and the launched Pi receive. On a new machine the wizard publishes the runtime without Engram, so the first `gentle-shell setup` publishes the core and the following launch starts the shared server. Setup and every launch pin `npm:gentle-engram@0.4.2` through Pi's own `install` command (configuration only) and verify the declaration plus `engram.startupPolicy: 1`; a failed check is reported and Shell still starts, protected by the guard. `setup --dry-run` installs nothing.
289
+ The memory decision never skips or fails setup: `gentle-shell setup` publishes the verified core and runs Gentle AI. Gentle AI 4.0.0 `install --agent pi` runs no `engram setup` for Pi, and `pi-engram init` only edits settings, so neither opens a store. Setup reclassifies after publishing the core, and the decision only selects the Engram environment its children and the launched Pi receive. On a new machine the wizard publishes the runtime without Engram, so the first `gentle-shell setup` publishes the core and the following launch starts the shared server.
290
+
291
+ In a Shell-owned home, a missing companion is installed through Pi as `npm:gentle-engram` and checked for `engram.startupPolicy: 1`; a failed check is reported and Shell still starts, protected by the guard. Shell migrates its old `npm:gentle-engram@0.4.2` registration to the unversioned source using Pi's package manager without installing an update. Pi then includes it in its normal startup package-update notice; run `gentle-shell update --extensions` to update it. An existing selection is not automatically reinstalled on launch, and linked/foreign homes, local companions, other companion pins and unrelated extension pins are not rewritten. This changes the Pi package, not the separately pinned native Engram core. `setup --dry-run` installs nothing.
292
+
293
+ Because that update leaves the unversioned source to Pi, Shell re-verifies the companion once the extensions update finishes instead of leaving the replaced install unchecked, and reports the version it found. It never turns a successful update into a failure and never rewrites the selection.
294
+
295
+ #### Companion and core must speak the same runtime contract
296
+
297
+ The companion and the core agree on a runtime contract identified by `contract_id` and `revision`, and validated by a digest: the companion ships it in `runtime-contract.json`, and the running core answers it on `GET /runtime-contract`. Shell publishes a verified digest for each pinned core (read from the real release binaries), and **warns** when the installed companion's digest differs from the pinned core's or from the digest the running server actually answers. A companion can require a newer core than the one Shell publishes, and until now the only signal was memory failing for the whole session.
298
+
299
+ The warning is deliberately non-blocking: an incompatible pair is still installed and still runs, the exit code never changes, the selection is never rewritten, and a missing or malformed `runtime-contract.json` is no signal rather than an error. Memory may be unavailable until the pair matches; update the core with a new Gentle Shell release, or update the companion.
290
300
 
291
301
  #### Explicit recovery after a core upgrade
292
302
 
@@ -296,7 +306,7 @@ Earlier Shell releases provisioned `~/.engram` themselves and recorded `<prefix>
296
306
  gentle-shell memory migrate --confirm-quiescent
297
307
  ```
298
308
 
299
- **Release dependency:** this requires a published bundled core advertising `migrate-copy`. The pinned Engram 3.5.2 implements it; Engram 3.4.0 did not. Shell checks help in an isolated home and refuses without invoking an unknown migration command or changing the source/provenance. Do not substitute an unpublished binary, edit hashes, or assume equal schema versions authorize recovery.
309
+ **Release dependency:** this requires a published bundled core advertising `migrate-copy`. The pinned Engram 3.7.2 implements it; Engram 3.4.0 did not. Shell checks help in an isolated home and refuses without invoking an unknown migration command or changing the source/provenance. Do not substitute an unpublished binary, edit hashes, or assume equal schema versions authorize recovery.
300
310
 
301
311
  When supported, the provider copies the complete directory to a new sibling and validates/migrates only that copy. Shell checks the provider's directory and identity evidence, renames the original to the reported `backup_dir`, promotes the copy, and atomically replaces its core-bound provenance. Success prints one JSON record with `status: "migrated"`, `instance_id`, and `backup_dir`. Keep that backup until you have verified your records in Shell. Provider failures preserve the original and provenance; any incomplete copy is identified and retained, never promoted. Explicit foreign data locations or endpoints are not adopted by this command.
302
312
 
@@ -337,7 +347,7 @@ S9. Everything Gentle AI and gentle-pi keep lives in the prefix, except Engram's
337
347
  - **gentle-engram.** The gentle-engram Pi extension finds Engram only through `ENGRAM_BIN`, read once when it loads, and otherwise runs `engram` from `PATH`. So Pi gets `ENGRAM_BIN` (the guard; memory reaches the shared server through `ENGRAM_URL`), and no `PATH` entry is added. An `ENGRAM_BIN` the user set is kept. The agent's shell inherits `ENGRAM_BIN` too, so an Engram MCP launcher started there through `ENGRAM_BIN` uses the same guard.
338
348
  - **Personas.** Setup snapshots and restores the persona Gentle AI may rewrite: the prefix's `config/gentle-ai/persona.json`, and also the user's `~/.pi/gentle-ai/persona.json`. A Gentle AI release without the variables still writes the user's file, and restoring an unchanged file does nothing. The managed-asset record is restored only in the user's `~/.gentle-ai/state.json`; the prefix's record belongs to the pinned Gentle AI.
339
349
  - **pi-pretty and prompt history.** In bundled mode only, the pi-pretty wrapper passes `deps.sdk` with Pi's five tool factories and `getAgentDir`, so its FFF database lands in `<agent home>/pi-pretty/fff`, and prompt history keeps its store under `<agent home>/history` ([Prompt history](prompt-history.md)). Elsewhere both keep their existing locations: Pi's deps reach pi-pretty unchanged (`$HOME/.pi/agent/pi-pretty/fff`, or no store without `HOME`), and history stays under `~/.pi/agent/history`, also in the isolated home of a pnpm or npm install, so existing histories are not left behind.
340
- - **Effective with a later Gentle AI.** gentle-pi pins Gentle AI 4.3.1 today (`INSTALLER_VERSION`); the following are historical compatibility notes for Gentle AI 4.0.0, which ignores the four `GENTLE_AI_*` variables. Whether 4.3.1 includes gentle-ai#5462 is unverified here. Until gentle-pi pins a Gentle AI release that contains gentle-ai#5462:
350
+ - **Effective with a later Gentle AI.** gentle-pi pins Gentle AI 4.5.0 today (`INSTALLER_VERSION`); the following are historical compatibility notes for Gentle AI 4.0.0, which ignores the four `GENTLE_AI_*` variables. Whether 4.5.0 includes gentle-ai#5462 is unverified here. Until gentle-pi pins a Gentle AI release that contains gentle-ai#5462:
341
351
  - Setup still writes `~/.gentle-ai` and `~/.pi/gentle-ai`, with the restores above, and still acquires Engram its own way.
342
352
  - The persona goes to the user's `~/.pi/gentle-ai/persona.json` (Gentle AI 4.0.0 resolves it from the OS home) and is restored there. The prefix's `config/gentle-ai/persona.json` is not created by setup.
343
353
  - The background-subagents policy already lands in `<prefix>/config/gentle-ai/` through `GENTLE_PI_CONFIG_HOME=<prefix>/config` (see above).
@@ -359,7 +369,7 @@ A rose-colored panel shows the current and available Shell versions and a link t
359
369
  - **Not now** (the default; also Escape or end of input) opens normally without saving a preference.
360
370
  - **Skip this version** stores only the offered version as `skippedStartupRelease` in the launcher’s `config.json` (or `GENTLE_SHELL_CONFIG` override), preserving unrelated settings. Another newer release can prompt again. A malformed or unwritable file is not replaced; the launcher warns and continues without saving.
361
371
 
362
- Ctrl+C cancels opening (exit 130). No update runs without explicit confirmation. The startup check does not update additional extensions; use `gentle-shell update --extensions` for those. Restarting does not change the working directory, startup arguments, or agent home. Pi remains pinned to the Shell release.
372
+ Ctrl+C cancels opening (exit 130). No update runs without explicit confirmation. The startup check does not update additional extensions; use `gentle-shell update --extensions` for those. Restarting does not change the working directory, startup arguments, or agent home. A newer independently updated Pi is kept across Shell releases.
363
373
 
364
374
  ### `gentle-shell upgrade` in a bundled install
365
375
 
@@ -367,7 +377,7 @@ Ctrl+C cancels opening (exit 130). No update runs without explicit confirmation.
367
377
 
368
378
  1. The latest release comes from the npm registry, as on the ordinary release channel (`latestRelease`). Its two assets come from `fetchDistribution` (identity encoding, size bounds), and `readDistribution` checks the exact versions, the workspace files and the lockfile sha256. A release without assets stops with its version, and nothing changes.
369
379
  2. When that release is the active version, the command says it is already current and changes nothing.
370
- 3. Otherwise `ensureRuntime` runs (with Go on Windows), and `installVersion` installs the release in place beside the active version.
380
+ 3. Otherwise `ensureRuntime` runs (with Go on Windows), and `installVersion` installs the release in place beside the active version. If the active Pi is newer than the release's verified Pi, Shell keeps that Pi and warns that it installs without the release's lockfile. The release lockfile is used only for its exact pair.
371
381
  4. The new version's own `scripts/bundled-install.mjs` is loaded, only from that freshly installed folder, and only when its real path stays inside it. Its `prefixLayout`, `ensureRuntime` and `ensureLauncher` must all be functions; otherwise the upgrade stops. Its `ensureRuntime` installs that release's pinned Node and pnpm beside ours when the pins moved, and reuses them otherwise.
372
382
  5. The new version's launcher must print exactly `gentle-shell <shell>` and `pi <pi>`. It runs with the release's Node, in the pnpm environment, with no `GENTLE_*` or `PI_*` overrides. It runs in bundled mode for that version, with its exact Pi: the only extra variable, `GENTLE_SHELL_VERIFY_VERSION=<id>`, makes `resolveBundledInstall` treat that id as current. The launcher honors it for `--version` only, and never passes it to a child. A `pi` on `PATH` cannot pass this check.
373
383
  6. Only then does `current` switch (`activateVersion`, one rename), and the release's own `ensureLauncher` writes the launcher for its Node. If the launcher cannot be written, `current` switches back and the command fails.
@@ -1,20 +1,56 @@
1
1
  # Delegated verification
2
2
 
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.
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 when the off state changes (which also drops or restores the review execution contract); an `unknown` to `on` flip or a deciding-source change keeps the original text. Off is freshly confirmed for each run; a failed read after off renders unknown rather than relying on a stale off status. 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
5
  ## Verifier preparation
6
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.
7
+ The independent verifier makes one isolated preparation attempt. When it fails on a deterministic error in a command or environment the verifier constructed (a wrong flag, conflicting config, a typo, a path it chose), the verifier makes exactly one corrected attempt without asking and reports both. At a second failure, or at any missing or unavailable prerequisite (a tool, network, space, permission), 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 otherwise retry setup or chain helper repairs. When the verifier returns a self-caused setup error without having used its correction, the parent relaunches it once with the corrected command, without asking a human; otherwise the parent stops with one **Needs your decision** result identifying the blocker and exact unrun checks, without continuing helper repairs or automatically relaunching for the same prerequisite. After the prerequisite is repaired, the human may explicitly request one new bounded verification attempt. 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
+ For Git-dependent checks, the runner exposes the absolute packaged `scripts/prepare-verifier.mjs` path through `GENTLE_PI_VERIFIER_PREPARER`. In one Bash call, invoke `s=$(mktemp -d) && node "$GENTLE_PI_VERIFIER_PREPARER" "$PWD" "$s" '<plan-json>'` to create and use an empty system-temp scratch directory. The plan has `include` (required untracked source and ignored dependency paths), `checks` (exact commands left unrun on failure), optional `baseline` (full commit ID), and optional `runtimeArtifacts` (known socket/FIFO paths to verify and identify as excluded). Git does not enumerate sockets; exclusions are explicitly declared, not discovered by a recursive filesystem scan. It preserves HEAD, the index and current tracked bytes in an independent local Git repository; unselected ignored evidence is excluded. It never runs probes, fetches remote objects or installs dependencies. A successful receipt identifies `work`, elapsed milliseconds, regular-file payload bytes and excluded runtime artifacts; failure exits nonzero with zero probes and exact unrun commands.
10
+
11
+ This pilot supports ordinary single-root Git repositories and regular-file dependencies inside that root. It rejects links, submodules, worktrees, shallow/shared/sparse/partial history and inputs outside the root; declare unsupported external dependencies as prerequisites. Limits are 20000 files, 256MiB regular-file payload, a 512MiB staged-patch buffer and a 60-second checked preparation budget. Staged patches retain raw bytes and fixed path prefixes regardless of repository diff settings. Scratch may have linked ancestors, but its final directory must not be a link and its real path must remain under system temp, empty and separate from the source. Git subprocesses receive the remaining deadline; filesystem operations check between steps. Git object transfer is not included in the regular-file payload measurement; unavailable baseline/history, capacity or deadline failures leave partial scratch and no probe result. This is deterministic helper behavior, not proof of model adherence or representative large-project performance.
12
+
13
+ The existing Bash `pipefail` tar copy is retained only for probes independent of Git metadata. A failed archive producer cannot be hidden by a successful extractor. Chain probes with `&&` when they share either setup call; a non-zero preparation result leaves them unrun even if the partial destination contains files. This does not make an oversized copy faster or establish that model-selected alternatives preserve the required payload. The one-attempt rule remains prompt policy, not a runtime-enforced limit.
14
+
15
+ ### Explicit recovery after a setup failure
16
+
17
+ A failed setup is not the same as an unavailable verifier capability. After the missing prerequisite is repaired, the human can explicitly request one new bounded attempt. Preserve the failed attempt and its zero-test result; static inspection and parent tests do not replace the missing independent runtime proof. Before dispatch, confirm the previous child has finished without uncertain status and establish the required payload, dependencies, and scratch capacity (space and inodes where relevant). A smaller system-temp copy is allowed only when it contains every input needed for the authorized probes; workspace symlinks, network access, and dependency installs remain prohibited for the verifier.
18
+
19
+ This request does not permit automatic retries, reset native budgets, override a denial or terminal native outcome, or bypass consent or an explicit one-run/no-retry limit. If the prerequisite is still missing, report the exact blocker rather than repeating the failed setup.
20
+
21
+ ### Explicit recovery after worker correction exhaustion
22
+
23
+ A worker-local correction limit ends its automatic cycle, not necessarily the feature. The partial report must preserve the failed commands, output, remaining implementation work, and missing proof. The parent can offer a concrete continuation for explicit human authorization, naming its scope, executor, correction limit, and checks; the human can also stop. A later conversation is not a budget reset, and an active or uncertain child prevents continuation.
24
+
25
+ Specifically authorized compilation or implementation can continue only when actual native authority and other applicable limits permit it. A read-only inspection with no instantiated native budget does not itself prohibit ordinary edits; it also grants no review approval. Missing required proof still blocks completion and delivery. Native recovery, consent, and terminal-outcome rules remain separate and unchanged.
8
26
 
9
27
  This is prompt policy, not a runtime-enforced limit; contract tests establish instruction delivery, not agent compliance or a measured speedup.
10
28
 
29
+ ## What the independent verifier checks
30
+
31
+ The change kind decides the verifier's evidence; it never decides whether a verifier runs, which still needs a named high-risk item. The verifier's evidence is what the writer could not see: it does not re-run the suite the writer reported, because the parent's single spot check of one reported command is the check on the writer's own results; the one exception is the user's failing command the parent passes, which it runs even when it is that suite. It runs the commands the parent authorizes as its evidence (the real-case command, the user's failing command, the spec's example commands) and its own probes, including a focused test only when a probe needs it. The parent names the change kind in the verify handoff:
32
+
33
+ - **External tool or environment** (package managers, CLIs, network services, operating-system behavior): the verifier reproduces the real case with the real tool and the configuration the change will meet, plus its own probes derived from the spec. A fixture that does not match that configuration is not proof.
34
+ - **Prompt or other contract text**: the verifier compares every removed or rewritten sentence with the baseline, one by one, for a lost qualifier or a rule turned absolute, and reads each new rule as a literal model would.
35
+ - **A fix for a failure the user reported**: the parent passes the user's exact failing command and error text verbatim, with the user's tool versions and configuration; the verifier runs that command against the baseline and against the change. The fix is not verified until that command passes there. The failure counts as reproduced only when that command fails at the baseline with the user's error; when it passes at the baseline or fails there with a different error, the verifier reports the fix unverified and says which, never verified. A handoff without the failing command leaves the fix unverified, with the missing command named; the verifier never guesses one.
36
+
37
+ When the real case needs the network, an install, or a tool, version, or configuration the verifier's scratch copy does not have, the verifier reports that check unverified with its exact command, and the parent runs that check itself before calling the change verified. Evidence for this split: in one long session the verifier's change-caused findings came only from real-case reproduction, sentence-by-sentence review of prompt text, and its own probes; re-running the writer's suite found none, and the one defect that reached the user escaped because the fixture did not match the user's environment.
38
+
39
+ ## Verifier launch admission and post-denial disposition (gentle-shell#2478)
40
+
41
+ The `gentle-ai-verify` launch is admitted only when its `task` or `context` declares a named high-risk item, names a task of an existing feature document, or the parent's measured context reaches the backstop. The declaration grammar is strict: `Risk: item N (reason)` must start a line (optionally after a list marker like `- `) or start a sentence (after `.`, `!` or `?` and a space). A declaration after another separator such as `; ` or `,` inside a sentence is not recognized. Keep the risk evidence tied to the actual change; never add a Risk line only to gain admission.
42
+
43
+ Assessment and admission are separate gates. A `gentle_review assess` plan (or its native `review assess` source) may name an independent verifier in the verification plan; it does not grant launch admission. Admission re-validates the actual launch envelope at `tool_call` time and does not receive the assessment result, so a plan that names the verifier can still be rejected when the envelope carries no supported declaration.
44
+
45
+ After a rejection, no gate-level disposition exists for the same launch: do not retry it, and do not substitute another agent for the verifier. The rejection is launch-scoped, not feature-scoped: it does not make the verifier unavailable for the whole feature, does not mean the change has no risk, and does not by itself keep later required proof unavailable. A new verifier launch requires the user's explicit decision in a new prompt, with a conforming envelope whose risk declaration reflects the actual change. Inline tests, the writer's self-verification, and a user's visual approval never replace the missing independent verification; when it stays unavailable, close with **Needs your decision** naming the missing proof.
46
+
11
47
  ## Background capability admission
12
48
 
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).
49
+ 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 forwards the job capability to the child, which registers `bash_background`, `job_list`, and `job_stop` for its own session; the runner then gives a running child job one bounded drain window at settlement instead of killing it immediately. The `monitor` tool stays parent-only, child jobs are never routed through the parent, and no new persisted state is added. Ordinary missing-tool reporting remains the backstop. See the [policy contract](readme-reference.md#capability-reference).
14
50
 
15
51
  ## Receipt-driven development on
16
52
 
17
- Verification is the same with RDD on, off, or unknown (verify-always-rdd-high S1). The bounded writer runs the exact commands the parent lists under `## Verification`, in the foreground, and reports each as `<command>: <observed result>`; after it returns, the parent calls `assess` and follows the risk tier below. 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. A declined consent, a clone-local disable, or a refused START/STATUS therefore changes nothing about verification.
53
+ The bounded writer runs the exact commands the parent lists under `## Verification`, in the foreground, and reports each as `<command>: <observed result>`. With RDD on or unknown, the parent calls `assess` after it returns and follows the risk tier below. With validated RDD off, assessment is not required: self-verification and a separate verifier for a named high-risk item remain required. 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. A declined consent, a clone-local disable, or a refused START/STATUS therefore changes nothing about required verification.
18
54
 
19
55
  ### How `assess` resolves the review outcome (gentle-pi#1175)
20
56
 
@@ -41,9 +77,11 @@ When native reports them, `assess` projects `reviewDue`, `reviewDueReason`, `can
41
77
 
42
78
  ## Receipt-driven development off or unknown (gentle-pi#662)
43
79
 
44
- The host exposes one read-only native operation: `gentle-ai review assess --cwd <repo> [--base-ref <ref> --committed-only] --json` (gentle-ai#4295). It is decoded by `lib/review-risk-assessment.ts` and wired through `lib/native-review-cli.ts` exactly like the existing `reviewMode` STATUS reader -- a bounded subprocess with a typed decode, never a mutation. A non-zero exit, a failure envelope, or an older binary without the verb all report native risk `unassessable`, which informs only: the plan is medium and adds no independent verifier unless the agent escalates.
80
+ With validated RDD off, a direct `assess` request remains read-only but skips native assessment and assessment-only target status. It returns `nativeRisk: unassessable`, a medium plan unless explicitly escalated, `candidate: null`, and no native review-due or continuation fields. The compatible zero changed-path and changed-line counts mean not measured, not a passive candidate; the skip reason says so. No native approval or candidate evidence is invented.
81
+
82
+ When RDD is on or unknown, the host exposes one read-only native operation: `gentle-ai review assess --cwd <repo> [--base-ref <ref> --committed-only] --json` (gentle-ai#4295). It is decoded by `lib/review-risk-assessment.ts` and wired through `lib/native-review-cli.ts` exactly like the existing `reviewMode` STATUS reader -- a bounded subprocess with a typed decode, never a mutation. A non-zero exit, a failure envelope, or an older binary without the verb all report native risk `unassessable`, which informs only: the plan is medium and adds no independent verifier unless the agent escalates.
45
83
 
46
- The `gentle_review` tool's `assess` operation (`extensions/gentle-ai.ts`) combines that assessment with the rendered `Receipt-driven development:` line to decide whether a delegated writer's change needs a separate `gentle-ai-verify` run, following this tier table:
84
+ The `gentle_review` tool's `assess` operation (`extensions/gentle-ai.ts`) combines the available assessment with the live `Receipt-driven development:` line to decide whether a delegated writer's change needs a separate `gentle-ai-verify` run, following this tier table. The passive row requires native evidence and therefore cannot be inferred when off:
47
85
 
48
86
  | Tier | Verification when RDD is `off`/`unknown` |
49
87
  | --- | --- |
@@ -54,9 +92,9 @@ The `gentle_review` tool's `assess` operation (`extensions/gentle-ai.ts`) combin
54
92
 
55
93
  The plan risk (`risk`) is high only with an escalation; otherwise a native passive stays passive and every other native tier is medium. The native tier stays visible as `nativeRisk`. The independent verifier is for concrete occasions: the plan adds it only when `escalate` names a Task Size high-risk item, never for size, a native tier alone, a failed assessment, or the model or effort that wrote the change.
56
94
 
57
- With RDD off, ASSESS remains read-only even when native reports `reviewDue` or a continuation: relay those fields unchanged, but do not execute the continuation, invoke STATUS or another review lifecycle operation, or enable RDD based on assessment metadata. Continue the verification plan and applicable functional checks; the named-risk independent verifier remains required.
95
+ With RDD off, do not require ASSESS to run the writer's applicable functional checks or the named-risk independent verifier. A direct plan request does not run native assessment or provide a review continuation; it never enables RDD or authorizes a review lifecycle operation.
58
96
 
59
- This table applies in every RDD state; a closed native review never removes a verifier the tier requires. An unknown RDD line never lowers a tier below `off`. The parent's own spot check (re-running one reported command before delivery) stays required in every tier.
97
+ This table applies in every RDD state; a closed native review never removes a verifier the tier requires. An unknown RDD line never waives named-risk verification. The parent's own spot check (re-running one reported command before delivery) stays required in every tier. A passive change that reports no command needs only its readback.
60
98
 
61
99
  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. Review outcomes never authorize delivery; human consent for native review and the user-owned RDD switch are unchanged.
62
100