@crouton-kit/crouter 0.3.31 → 0.3.33

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 (443) hide show
  1. package/README.md +8 -0
  2. package/dist/build-root.js +1 -0
  3. package/dist/builtin-memory/crouter-development/marketplaces.md +2 -2
  4. package/dist/builtin-memory/crouter-development/personas/base-prompt.md +2 -2
  5. package/dist/builtin-memory/crouter-development/personas/orchestrator-prompt.md +5 -5
  6. package/dist/builtin-memory/crouter-development/personas.md +3 -4
  7. package/dist/builtin-memory/crouter-development/plugins.md +18 -18
  8. package/dist/builtin-memory/design.md +4 -1
  9. package/dist/builtin-memory/development.md +4 -1
  10. package/dist/builtin-memory/internal/INDEX.md +1 -1
  11. package/dist/builtin-memory/internal/nodes-and-canvas.md +6 -6
  12. package/dist/builtin-memory/internal/storage-tiers.md +5 -5
  13. package/dist/builtin-memory/planning.md +4 -1
  14. package/dist/builtin-memory/product.md +80 -0
  15. package/dist/builtin-memory/spec.md +4 -1
  16. package/dist/builtin-personas/advisor/PERSONA.md +10 -0
  17. package/dist/builtin-personas/design/PERSONA.md +2 -2
  18. package/dist/builtin-personas/design/orchestrator.md +3 -3
  19. package/dist/builtin-personas/developer/PERSONA.md +1 -1
  20. package/dist/builtin-personas/developer/orchestrator.md +2 -2
  21. package/dist/builtin-personas/explore/PERSONA.md +3 -3
  22. package/dist/builtin-personas/explore/orchestrator.md +4 -2
  23. package/dist/builtin-personas/general/PERSONA.md +1 -1
  24. package/dist/builtin-personas/general/orchestrator.md +1 -1
  25. package/dist/builtin-personas/orchestration-kernel.md +7 -14
  26. package/dist/builtin-personas/plan/PERSONA.md +1 -1
  27. package/dist/builtin-personas/plan/orchestrator.md +2 -2
  28. package/dist/builtin-personas/plan/reviewers/architecture-fit/PERSONA.md +1 -1
  29. package/dist/builtin-personas/plan/reviewers/code-smells/PERSONA.md +1 -1
  30. package/dist/builtin-personas/plan/reviewers/pattern-consistency/PERSONA.md +1 -1
  31. package/dist/builtin-personas/plan/reviewers/requirements-coverage/PERSONA.md +1 -1
  32. package/dist/builtin-personas/plan/reviewers/security/PERSONA.md +1 -1
  33. package/dist/builtin-personas/product/PERSONA.md +18 -0
  34. package/dist/builtin-personas/product/orchestrator.md +14 -0
  35. package/dist/builtin-personas/product/teardown/PERSONA.md +13 -0
  36. package/dist/builtin-personas/review/PERSONA.md +1 -1
  37. package/dist/builtin-personas/review/orchestrator.md +1 -1
  38. package/dist/builtin-personas/runtime-base.md +5 -0
  39. package/dist/builtin-personas/spec/PERSONA.md +1 -1
  40. package/dist/builtin-personas/spec/orchestrator.md +2 -2
  41. package/dist/builtin-personas/spec/requirements/PERSONA.md +1 -1
  42. package/dist/builtin-views/canvas/core.mjs +82 -1
  43. package/dist/builtin-views/canvas/tui.mjs +9 -5
  44. package/dist/builtin-views/canvas/web.jsx +3 -2
  45. package/dist/builtin-views/chat/core.mjs +725 -0
  46. package/dist/builtin-views/chat/text.mjs +101 -0
  47. package/dist/builtin-views/chat/tui.mjs +368 -0
  48. package/dist/builtin-views/chat/web.jsx +367 -0
  49. package/dist/builtin-views/prompt-review/core.mjs +863 -0
  50. package/dist/builtin-views/prompt-review/text.mjs +15 -0
  51. package/dist/builtin-views/prompt-review/tui.mjs +196 -0
  52. package/dist/builtin-views/prompt-review/web.jsx +484 -0
  53. package/dist/builtin-views/settings/core.mjs +397 -0
  54. package/dist/builtin-views/settings/text.mjs +40 -0
  55. package/dist/builtin-views/settings/tui.mjs +95 -0
  56. package/dist/builtin-views/settings/web.jsx +167 -0
  57. package/dist/cli.js +16 -3
  58. package/dist/clients/attach/__tests__/autocomplete-and-bash-mode.test.js +96 -0
  59. package/dist/clients/attach/__tests__/bash-bang-routing.test.js +58 -0
  60. package/dist/clients/attach/__tests__/bundle-pi-tui-dedup.test.d.ts +1 -0
  61. package/dist/clients/attach/__tests__/bundle-pi-tui-dedup.test.js +56 -0
  62. package/dist/clients/attach/__tests__/titled-editor.test.js +22 -1
  63. package/dist/clients/attach/attach-cmd.d.ts +18 -0
  64. package/dist/clients/attach/attach-cmd.js +1723 -795
  65. package/dist/clients/attach/canvas-panels.js +2 -2
  66. package/dist/clients/attach/chat-view.d.ts +10 -0
  67. package/dist/clients/attach/chat-view.js +23 -0
  68. package/dist/clients/attach/config-load.d.ts +8 -4
  69. package/dist/clients/attach/config-load.js +2 -0
  70. package/dist/clients/attach/extension-dialogs.d.ts +2 -3
  71. package/dist/clients/attach/extension-dialogs.js +7 -9
  72. package/dist/clients/attach/graph-overlay.js +3 -2
  73. package/dist/clients/attach/input-controller.d.ts +4 -3
  74. package/dist/clients/attach/input-controller.js +24 -3
  75. package/dist/clients/attach/slash-commands.d.ts +7 -7
  76. package/dist/clients/attach/slash-commands.js +38 -14
  77. package/dist/clients/attach/titled-editor.js +18 -14
  78. package/dist/clients/attach/view-socket.d.ts +2 -1
  79. package/dist/clients/attach/view-socket.js +27 -8
  80. package/dist/clients/web/__tests__/source-cache.test.d.ts +1 -0
  81. package/dist/clients/web/__tests__/source-cache.test.js +32 -0
  82. package/dist/clients/web/dev-server.js +1 -0
  83. package/dist/clients/web/events.js +9 -11
  84. package/dist/clients/web/server.d.ts +4 -3
  85. package/dist/clients/web/server.js +138 -31
  86. package/dist/clients/web/source-cache.d.ts +10 -0
  87. package/dist/clients/web/source-cache.js +57 -0
  88. package/dist/clients/web/web-cmd.js +28 -9
  89. package/dist/commands/__tests__/human.test.js +30 -28
  90. package/dist/commands/canvas-history/search.js +1 -1
  91. package/dist/commands/canvas-history.js +5 -8
  92. package/dist/commands/canvas-issue.d.ts +2 -0
  93. package/dist/commands/canvas-issue.js +148 -0
  94. package/dist/commands/canvas-prune.js +19 -0
  95. package/dist/commands/canvas-rebuild-index.d.ts +2 -0
  96. package/dist/commands/canvas-rebuild-index.js +57 -0
  97. package/dist/commands/canvas-snapshot.d.ts +2 -0
  98. package/dist/commands/canvas-snapshot.js +48 -0
  99. package/dist/commands/canvas-tmux-spread.d.ts +2 -0
  100. package/dist/commands/canvas-tmux-spread.js +188 -0
  101. package/dist/commands/canvas.d.ts +1 -0
  102. package/dist/commands/canvas.js +16 -1
  103. package/dist/commands/chord.js +143 -48
  104. package/dist/commands/daemon.js +3 -3
  105. package/dist/commands/human/prompts.d.ts +0 -1
  106. package/dist/commands/human/prompts.js +39 -54
  107. package/dist/commands/human/queue.d.ts +12 -1
  108. package/dist/commands/human/queue.js +468 -73
  109. package/dist/commands/human/shared.d.ts +3 -4
  110. package/dist/commands/human/shared.js +3 -3
  111. package/dist/commands/human.js +11 -10
  112. package/dist/commands/memory/find.js +3 -2
  113. package/dist/commands/memory/list.js +4 -3
  114. package/dist/commands/memory/read.js +3 -3
  115. package/dist/commands/memory/shared.d.ts +1 -4
  116. package/dist/commands/memory/shared.js +6 -9
  117. package/dist/commands/memory/write.js +3 -3
  118. package/dist/commands/memory.js +4 -7
  119. package/dist/commands/node-context.d.ts +2 -0
  120. package/dist/commands/node-context.js +172 -0
  121. package/dist/commands/node-snapshot.d.ts +2 -0
  122. package/dist/commands/node-snapshot.js +123 -0
  123. package/dist/commands/node.js +228 -52
  124. package/dist/commands/pkg/plugin-inspect.js +6 -6
  125. package/dist/commands/pkg/plugin-manage.js +1 -1
  126. package/dist/commands/pkg/plugin.js +2 -2
  127. package/dist/commands/pkg.js +2 -2
  128. package/dist/commands/push.d.ts +2 -0
  129. package/dist/commands/push.js +79 -11
  130. package/dist/commands/revive.js +74 -1
  131. package/dist/commands/search/answer.d.ts +1 -0
  132. package/dist/commands/search/answer.js +50 -0
  133. package/dist/commands/search/contents.d.ts +1 -0
  134. package/dist/commands/search/contents.js +96 -0
  135. package/dist/commands/search/exa.d.ts +53 -0
  136. package/dist/commands/search/exa.js +155 -0
  137. package/dist/commands/search/puremd.d.ts +11 -0
  138. package/dist/commands/search/puremd.js +53 -0
  139. package/dist/commands/search/web.d.ts +1 -0
  140. package/dist/commands/search/web.js +65 -0
  141. package/dist/commands/search.d.ts +2 -0
  142. package/dist/commands/search.js +24 -0
  143. package/dist/commands/sys/__tests__/sync-import.test.d.ts +1 -0
  144. package/dist/commands/sys/__tests__/sync-import.test.js +72 -0
  145. package/dist/commands/sys/config.js +59 -10
  146. package/dist/commands/sys/doctor.js +56 -4
  147. package/dist/commands/sys/prompt-review.d.ts +1 -0
  148. package/dist/commands/sys/prompt-review.js +178 -0
  149. package/dist/commands/sys/promptstudio.d.ts +2 -0
  150. package/dist/commands/sys/promptstudio.js +65 -0
  151. package/dist/commands/sys/settings.d.ts +2 -0
  152. package/dist/commands/sys/settings.js +16 -0
  153. package/dist/commands/sys/sync.js +311 -159
  154. package/dist/commands/sys/sysprompt.d.ts +1 -0
  155. package/dist/commands/sys/sysprompt.js +86 -0
  156. package/dist/commands/sys.js +9 -5
  157. package/dist/commands/view-new.js +2 -2
  158. package/dist/core/__tests__/artifact-paths.test.d.ts +1 -0
  159. package/dist/core/__tests__/artifact-paths.test.js +44 -0
  160. package/dist/core/__tests__/broker-preflight.test.d.ts +1 -0
  161. package/dist/core/__tests__/broker-preflight.test.js +85 -0
  162. package/dist/core/__tests__/broker-sdk-wiring.test.js +15 -0
  163. package/dist/core/__tests__/canvas.test.js +37 -1
  164. package/dist/core/__tests__/chat-view-reconnect.test.d.ts +1 -0
  165. package/dist/core/__tests__/chat-view-reconnect.test.js +70 -0
  166. package/dist/core/__tests__/child-death-wake.test.js +11 -2
  167. package/dist/core/__tests__/close.test.js +39 -1
  168. package/dist/core/__tests__/connection-reconnect-resume.test.d.ts +1 -0
  169. package/dist/core/__tests__/connection-reconnect-resume.test.js +37 -0
  170. package/dist/core/__tests__/context-intro.test.js +48 -14
  171. package/dist/core/__tests__/daemon-boot.test.js +182 -9
  172. package/dist/core/__tests__/editor-label.test.d.ts +1 -0
  173. package/dist/core/__tests__/editor-label.test.js +26 -0
  174. package/dist/core/__tests__/fault-marker.test.d.ts +1 -0
  175. package/dist/core/__tests__/fault-marker.test.js +112 -0
  176. package/dist/core/__tests__/fault-retry-rewind.test.d.ts +1 -0
  177. package/dist/core/__tests__/fault-retry-rewind.test.js +123 -0
  178. package/dist/core/__tests__/fixtures/fake-engine.d.ts +30 -4
  179. package/dist/core/__tests__/fixtures/fake-engine.js +156 -17
  180. package/dist/core/__tests__/fixtures/fake-pi-host.js +10 -1
  181. package/dist/core/__tests__/full/human-new-window-regression.test.js +1 -1
  182. package/dist/core/__tests__/helpers/harness.d.ts +1 -1
  183. package/dist/core/__tests__/helpers/harness.js +9 -3
  184. package/dist/core/__tests__/human-stranded-deliver.test.js +38 -1
  185. package/dist/core/__tests__/human-surface-target.test.js +1 -1
  186. package/dist/core/__tests__/kickoff.test.js +18 -19
  187. package/dist/core/__tests__/memory-resolver.test.js +12 -1
  188. package/dist/core/__tests__/migration.test.js +49 -14
  189. package/dist/core/__tests__/model-ladders.test.d.ts +1 -0
  190. package/dist/core/__tests__/model-ladders.test.js +160 -0
  191. package/dist/core/__tests__/node-env.test.d.ts +1 -0
  192. package/dist/core/__tests__/node-env.test.js +26 -0
  193. package/dist/core/__tests__/push-final-guard.test.js +7 -1
  194. package/dist/core/__tests__/relaunch-root.test.js +9 -9
  195. package/dist/core/__tests__/revive.test.js +36 -6
  196. package/dist/core/__tests__/spawn-root.test.js +24 -1
  197. package/dist/core/__tests__/stop-guard.test.js +10 -0
  198. package/dist/core/__tests__/stranded-relaunch.test.d.ts +1 -0
  199. package/dist/core/__tests__/stranded-relaunch.test.js +72 -0
  200. package/dist/core/__tests__/tmux-surface.test.js +5 -1
  201. package/dist/core/__tests__/unknown-path.test.js +19 -19
  202. package/dist/core/__tests__/yield-ensures-daemon.test.d.ts +1 -0
  203. package/dist/core/__tests__/yield-ensures-daemon.test.js +54 -0
  204. package/dist/core/artifact.d.ts +2 -33
  205. package/dist/core/artifact.js +27 -87
  206. package/dist/core/bootstrap.js +2 -0
  207. package/dist/core/canvas/browse/__tests__/model.test.js +35 -1
  208. package/dist/core/canvas/browse/app.js +87 -17
  209. package/dist/core/canvas/browse/model.d.ts +10 -1
  210. package/dist/core/canvas/browse/model.js +37 -1
  211. package/dist/core/canvas/browse/render.js +35 -33
  212. package/dist/core/canvas/canvas.d.ts +7 -0
  213. package/dist/core/canvas/canvas.js +54 -5
  214. package/dist/core/canvas/db.js +35 -8
  215. package/dist/core/canvas/labels.d.ts +6 -8
  216. package/dist/core/canvas/labels.js +8 -11
  217. package/dist/core/canvas/nav-model.d.ts +5 -4
  218. package/dist/core/canvas/nav-model.js +31 -17
  219. package/dist/core/canvas/paths.d.ts +18 -1
  220. package/dist/core/canvas/paths.js +37 -2
  221. package/dist/core/canvas/render.d.ts +25 -0
  222. package/dist/core/canvas/render.js +96 -13
  223. package/dist/core/canvas/status-glyph.d.ts +35 -0
  224. package/dist/core/canvas/status-glyph.js +104 -0
  225. package/dist/core/canvas/types.d.ts +2 -2
  226. package/dist/core/config.js +114 -16
  227. package/dist/core/fault-classifier.d.ts +41 -0
  228. package/dist/core/fault-classifier.js +110 -0
  229. package/dist/core/feed/__tests__/empty-node-guard.test.d.ts +1 -0
  230. package/dist/core/feed/__tests__/empty-node-guard.test.js +45 -0
  231. package/dist/core/feed/feed.js +8 -0
  232. package/dist/core/feed/inbox.d.ts +15 -0
  233. package/dist/core/feed/inbox.js +40 -14
  234. package/dist/core/frontmatter.d.ts +1 -11
  235. package/dist/core/frontmatter.js +1 -55
  236. package/dist/core/hearth/config.d.ts +2 -0
  237. package/dist/core/hearth/config.js +75 -0
  238. package/dist/core/hearth/guest-env.d.ts +2 -0
  239. package/dist/core/hearth/guest-env.js +11 -0
  240. package/dist/core/hearth/index.d.ts +5 -0
  241. package/dist/core/hearth/index.js +5 -0
  242. package/dist/core/hearth/provider.d.ts +21 -0
  243. package/dist/core/hearth/provider.js +10 -0
  244. package/dist/core/hearth/providers/blaxel-bootstrap.d.ts +10 -0
  245. package/dist/core/hearth/providers/blaxel-bootstrap.js +39 -0
  246. package/dist/core/hearth/providers/blaxel-home.d.ts +11 -0
  247. package/dist/core/hearth/providers/blaxel-home.js +126 -0
  248. package/dist/core/hearth/providers/blaxel.d.ts +26 -0
  249. package/dist/core/hearth/providers/blaxel.js +208 -0
  250. package/dist/core/hearth/providers/types.d.ts +72 -0
  251. package/dist/core/hearth/providers/types.js +1 -0
  252. package/dist/core/hearth/registry.d.ts +15 -0
  253. package/dist/core/hearth/registry.js +179 -0
  254. package/dist/core/hearth/types.d.ts +121 -0
  255. package/dist/core/hearth/types.js +1 -0
  256. package/dist/core/host-exports/__tests__/export-prunes-boot-skill.test.d.ts +1 -0
  257. package/dist/core/host-exports/__tests__/export-prunes-boot-skill.test.js +79 -0
  258. package/dist/core/{skill-sync → host-exports}/builtins.d.ts +21 -13
  259. package/dist/core/host-exports/builtins.js +68 -0
  260. package/dist/core/{skill-sync → host-exports}/export.d.ts +9 -6
  261. package/dist/core/{skill-sync → host-exports}/export.js +37 -14
  262. package/dist/core/io.js +1 -1
  263. package/dist/core/log.d.ts +9 -0
  264. package/dist/core/log.js +113 -0
  265. package/dist/core/memory-resolver.d.ts +8 -8
  266. package/dist/core/memory-resolver.js +15 -28
  267. package/dist/core/personas/index.d.ts +4 -4
  268. package/dist/core/personas/index.js +2 -2
  269. package/dist/core/personas/loader.d.ts +51 -0
  270. package/dist/core/personas/loader.js +54 -50
  271. package/dist/core/personas/resolve.d.ts +43 -27
  272. package/dist/core/personas/resolve.js +336 -94
  273. package/dist/core/runtime/auth-reload.d.ts +7 -0
  274. package/dist/core/runtime/auth-reload.js +69 -0
  275. package/dist/core/runtime/bearings.d.ts +35 -15
  276. package/dist/core/runtime/bearings.js +305 -44
  277. package/dist/core/runtime/branded-host.d.ts +4 -2
  278. package/dist/core/runtime/branded-host.js +66 -4
  279. package/dist/core/runtime/broker-protocol.d.ts +38 -3
  280. package/dist/core/runtime/broker.js +343 -18
  281. package/dist/core/runtime/close.js +37 -29
  282. package/dist/core/runtime/connectivity.d.ts +12 -0
  283. package/dist/core/runtime/connectivity.js +73 -0
  284. package/dist/core/runtime/fault-recovery-nudge.d.ts +2 -0
  285. package/dist/core/runtime/fault-recovery-nudge.js +2 -0
  286. package/dist/core/runtime/fault-recovery.d.ts +23 -0
  287. package/dist/core/runtime/fault-recovery.js +74 -0
  288. package/dist/core/runtime/fault.d.ts +25 -0
  289. package/dist/core/runtime/fault.js +176 -0
  290. package/dist/core/runtime/front-door.d.ts +1 -1
  291. package/dist/core/runtime/front-door.js +2 -2
  292. package/dist/core/runtime/host.d.ts +10 -0
  293. package/dist/core/runtime/host.js +71 -9
  294. package/dist/core/runtime/kickoff.js +31 -45
  295. package/dist/core/runtime/launch.d.ts +32 -18
  296. package/dist/core/runtime/launch.js +148 -43
  297. package/dist/core/runtime/model-swap.d.ts +18 -0
  298. package/dist/core/runtime/model-swap.js +95 -0
  299. package/dist/core/runtime/naming.d.ts +7 -0
  300. package/dist/core/runtime/naming.js +61 -9
  301. package/dist/core/runtime/nodes.js +6 -1
  302. package/dist/core/runtime/persona.js +16 -17
  303. package/dist/core/runtime/placement.d.ts +36 -31
  304. package/dist/core/runtime/placement.js +149 -64
  305. package/dist/core/runtime/promote.d.ts +2 -0
  306. package/dist/core/runtime/promote.js +23 -3
  307. package/dist/core/runtime/recycle.js +6 -4
  308. package/dist/core/runtime/reset.d.ts +5 -2
  309. package/dist/core/runtime/reset.js +2 -2
  310. package/dist/core/runtime/revive.d.ts +4 -0
  311. package/dist/core/runtime/revive.js +27 -9
  312. package/dist/core/runtime/roadmap.d.ts +1 -1
  313. package/dist/core/runtime/roadmap.js +1 -1
  314. package/dist/core/runtime/spawn.d.ts +2 -2
  315. package/dist/core/runtime/spawn.js +30 -6
  316. package/dist/core/runtime/stop-guard.js +6 -1
  317. package/dist/core/runtime/tmux-chrome.d.ts +1 -1
  318. package/dist/core/runtime/tmux-chrome.js +1 -1
  319. package/dist/core/runtime/tmux.d.ts +29 -6
  320. package/dist/core/runtime/tmux.js +134 -80
  321. package/dist/core/runtime/view-socket-client.d.ts +46 -0
  322. package/dist/core/runtime/view-socket-client.js +203 -0
  323. package/dist/core/substrate/index.d.ts +1 -1
  324. package/dist/core/substrate/index.js +1 -1
  325. package/dist/core/substrate/on-read.js +16 -4
  326. package/dist/core/substrate/render.d.ts +10 -13
  327. package/dist/core/substrate/render.js +56 -51
  328. package/dist/core/tui/host.js +83 -18
  329. package/dist/core/view/__tests__/transport-cache.test.d.ts +1 -0
  330. package/dist/core/view/__tests__/transport-cache.test.js +62 -0
  331. package/dist/core/view/contract.d.ts +20 -0
  332. package/dist/core/view/stream-local.d.ts +3 -0
  333. package/dist/core/view/stream-local.js +184 -0
  334. package/dist/core/view/transport-cache.d.ts +8 -0
  335. package/dist/core/view/transport-cache.js +38 -0
  336. package/dist/core/view/transport-local.js +4 -0
  337. package/dist/core/view/transport.d.ts +7 -1
  338. package/dist/daemon/crtrd.d.ts +3 -19
  339. package/dist/daemon/crtrd.js +139 -178
  340. package/dist/daemon/manage.d.ts +18 -1
  341. package/dist/daemon/manage.js +54 -9
  342. package/dist/hearth/wake-proxy/__tests__/anthropic-oauth.test.d.ts +1 -0
  343. package/dist/hearth/wake-proxy/__tests__/anthropic-oauth.test.js +289 -0
  344. package/dist/hearth/wake-proxy/__tests__/config-timeout.test.d.ts +1 -0
  345. package/dist/hearth/wake-proxy/__tests__/config-timeout.test.js +34 -0
  346. package/dist/hearth/wake-proxy/__tests__/guest-source.test.d.ts +1 -0
  347. package/dist/hearth/wake-proxy/__tests__/guest-source.test.js +203 -0
  348. package/dist/hearth/wake-proxy/__tests__/hardening.test.d.ts +1 -0
  349. package/dist/hearth/wake-proxy/__tests__/hardening.test.js +59 -0
  350. package/dist/hearth/wake-proxy/__tests__/hearth-status-route.test.d.ts +1 -0
  351. package/dist/hearth/wake-proxy/__tests__/hearth-status-route.test.js +372 -0
  352. package/dist/hearth/wake-proxy/__tests__/http-running-route-fast-path.test.d.ts +1 -0
  353. package/dist/hearth/wake-proxy/__tests__/http-running-route-fast-path.test.js +258 -0
  354. package/dist/hearth/wake-proxy/__tests__/model-auth-routes.test.d.ts +1 -0
  355. package/dist/hearth/wake-proxy/__tests__/model-auth-routes.test.js +437 -0
  356. package/dist/hearth/wake-proxy/__tests__/source-bridge-gate.test.d.ts +1 -0
  357. package/dist/hearth/wake-proxy/__tests__/source-bridge-gate.test.js +455 -0
  358. package/dist/hearth/wake-proxy/__tests__/static-asset-allowlist.test.d.ts +1 -0
  359. package/dist/hearth/wake-proxy/__tests__/static-asset-allowlist.test.js +15 -0
  360. package/dist/hearth/wake-proxy/__tests__/warm-path-concurrency.test.d.ts +1 -0
  361. package/dist/hearth/wake-proxy/__tests__/warm-path-concurrency.test.js +141 -0
  362. package/dist/hearth/wake-proxy/__tests__/ws-teardown-accounting.test.d.ts +1 -0
  363. package/dist/hearth/wake-proxy/__tests__/ws-teardown-accounting.test.js +143 -0
  364. package/dist/hearth/wake-proxy/anthropic-oauth.d.ts +58 -0
  365. package/dist/hearth/wake-proxy/anthropic-oauth.js +189 -0
  366. package/dist/hearth/wake-proxy/auth.d.ts +22 -0
  367. package/dist/hearth/wake-proxy/auth.js +128 -0
  368. package/dist/hearth/wake-proxy/config.d.ts +2 -0
  369. package/dist/hearth/wake-proxy/config.js +151 -0
  370. package/dist/hearth/wake-proxy/guest-source.d.ts +14 -0
  371. package/dist/hearth/wake-proxy/guest-source.js +130 -0
  372. package/dist/hearth/wake-proxy/hearth-status.d.ts +44 -0
  373. package/dist/hearth/wake-proxy/hearth-status.js +267 -0
  374. package/dist/hearth/wake-proxy/home.d.ts +67 -0
  375. package/dist/hearth/wake-proxy/home.js +297 -0
  376. package/dist/hearth/wake-proxy/main.d.ts +1 -0
  377. package/dist/hearth/wake-proxy/main.js +134 -0
  378. package/dist/hearth/wake-proxy/model-auth.d.ts +13 -0
  379. package/dist/hearth/wake-proxy/model-auth.js +345 -0
  380. package/dist/hearth/wake-proxy/proxy.d.ts +35 -0
  381. package/dist/hearth/wake-proxy/proxy.js +716 -0
  382. package/dist/hearth/wake-proxy/public-source-gate.d.ts +9 -0
  383. package/dist/hearth/wake-proxy/public-source-gate.js +409 -0
  384. package/dist/hearth/wake-proxy/redact.d.ts +1 -0
  385. package/dist/hearth/wake-proxy/redact.js +17 -0
  386. package/dist/hearth/wake-proxy/server.d.ts +11 -0
  387. package/dist/hearth/wake-proxy/server.js +142 -0
  388. package/dist/hearth/wake-proxy/state.d.ts +18 -0
  389. package/dist/hearth/wake-proxy/state.js +342 -0
  390. package/dist/hearth/wake-proxy/types.d.ts +76 -0
  391. package/dist/hearth/wake-proxy/types.js +1 -0
  392. package/dist/index.js +3 -2
  393. package/dist/pi-extensions/__tests__/canvas-context-intro.test.js +6 -5
  394. package/dist/pi-extensions/canvas-context-intro.js +7 -7
  395. package/dist/pi-extensions/canvas-doc-substrate.js +19 -22
  396. package/dist/pi-extensions/canvas-nav.js +15 -8
  397. package/dist/pi-extensions/canvas-stophook.d.ts +1 -1
  398. package/dist/pi-extensions/canvas-stophook.js +78 -11
  399. package/dist/types.d.ts +39 -20
  400. package/dist/types.js +38 -13
  401. package/dist/web/runtime.js +141 -42
  402. package/dist/web/transport-http.js +7 -5
  403. package/dist/web/transport-stream.d.ts +3 -0
  404. package/dist/web/transport-stream.js +204 -0
  405. package/dist/web-client/assets/fragment-mono-latin-400-normal-BYwT3kSJ.woff +0 -0
  406. package/dist/web-client/assets/fragment-mono-latin-400-normal-yxdJ5AmL.woff2 +0 -0
  407. package/dist/web-client/assets/fragment-mono-latin-ext-400-normal-BbKYyvR9.woff2 +0 -0
  408. package/dist/web-client/assets/fragment-mono-latin-ext-400-normal-CT4YFKeK.woff +0 -0
  409. package/dist/web-client/assets/fraunces-latin-ext-wght-normal-Ca2vKHc0.woff2 +0 -0
  410. package/dist/web-client/assets/fraunces-latin-wght-normal-ukD16Tqj.woff2 +0 -0
  411. package/dist/web-client/assets/fraunces-vietnamese-wght-normal-CnvboYUG.woff2 +0 -0
  412. package/dist/web-client/assets/index-BZUxTkv5.css +2 -0
  413. package/dist/web-client/assets/index-D36PNBj4.js +80 -0
  414. package/dist/web-client/assets/instrument-sans-latin-ext-wght-normal-B5bTHO_g.woff2 +0 -0
  415. package/dist/web-client/assets/instrument-sans-latin-wght-normal-BbzFLZTg.woff2 +0 -0
  416. package/dist/web-client/assets/martian-mono-cyrillic-wght-normal-B84CD5C_.woff2 +0 -0
  417. package/dist/web-client/assets/martian-mono-latin-ext-wght-normal-DlL6xMw5.woff2 +0 -0
  418. package/dist/web-client/assets/martian-mono-latin-wght-normal-5W32yIyr.woff2 +0 -0
  419. package/dist/web-client/index.html +3 -2
  420. package/package.json +32 -10
  421. package/dist/core/__tests__/error-stall-recycle.test.js +0 -141
  422. package/dist/core/skill-sync/__tests__/dry-run-wrote-count.test.js +0 -57
  423. package/dist/core/skill-sync/builtins.js +0 -112
  424. package/dist/core/skill-sync/claude-plugins.d.ts +0 -23
  425. package/dist/core/skill-sync/claude-plugins.js +0 -71
  426. package/dist/core/skill-sync/engine.d.ts +0 -42
  427. package/dist/core/skill-sync/engine.js +0 -633
  428. package/dist/core/skill-sync/manifest.d.ts +0 -64
  429. package/dist/core/skill-sync/manifest.js +0 -181
  430. package/dist/core/skill-sync/profile.d.ts +0 -76
  431. package/dist/core/skill-sync/profile.js +0 -173
  432. package/dist/core/skill-sync/snapshot.d.ts +0 -57
  433. package/dist/core/skill-sync/snapshot.js +0 -120
  434. package/dist/pi-extensions/canvas-commands.d.ts +0 -37
  435. package/dist/pi-extensions/canvas-commands.js +0 -113
  436. package/dist/pi-extensions/canvas-resume.d.ts +0 -21
  437. package/dist/pi-extensions/canvas-resume.js +0 -83
  438. package/dist/pi-extensions/canvas-view.d.ts +0 -21
  439. package/dist/pi-extensions/canvas-view.js +0 -76
  440. package/dist/web-client/assets/index-BUvQb4hR.css +0 -2
  441. package/dist/web-client/assets/index-ClLQXYAE.js +0 -10
  442. /package/dist/{core/__tests__/error-stall-recycle.test.d.ts → clients/attach/__tests__/autocomplete-and-bash-mode.test.d.ts} +0 -0
  443. /package/dist/{core/skill-sync/__tests__/dry-run-wrote-count.test.d.ts → clients/attach/__tests__/bash-bang-routing.test.d.ts} +0 -0
@@ -10,7 +10,7 @@ When your context fills you yield (`crtr node yield`) and are revived fresh agai
10
10
 
11
11
  Every time you wake — whether revived fresh after a yield, or woken because a child reported — run the same playbook. You do not need a script in your prompt; you have the roadmap and the feed, and they are enough.
12
12
 
13
- 1. **Orient.** Read `context/roadmap.md` and run `crtr feed read` to absorb what your children reported. Dereference the report paths that matter; don't act on a one-line summary when the detail is on disk.
13
+ 1. **Orient.** Read `context/roadmap.md`, then dereference the child reports that matter the wake already delivered their digest and the paths to them, so read the detail on disk rather than acting on a one-line summary. (Nothing to go fetch: the feed is drained into your wake for you.)
14
14
  2. **Assess.** What landed? What failed? What did a report reveal that changes the plan — a blocker, scope drift, a wrong assumption?
15
15
  3. **Understand before you delegate.** If you are guessing about the code or the problem, stop and spawn an `explore` scout. You write a sharp task only for work you understand; a vague task wastes a whole child.
16
16
  4. **Find all the parallel work.** Don't default to one child at a time. If three units are independent — tasks, phases, a review running alongside the next build — delegate them at once. A wake with idle capacity is a wasted wake.
@@ -42,24 +42,17 @@ And an **evolving body** you bring current right before you yield:
42
42
 
43
43
  Curate it like a living document, not a journal. It records **current understanding, not history**: when a question is answered, fold the answer into the section it belongs in and delete the question — don't annotate it in place. Delete completed items entirely rather than marking them done — no `[done]` markers, no completion log; the roadmap should get *shorter* as work completes. Keep decisions, rationale, and design detail out of it: when a question resolves or the approach shifts, fold the outcome into the relevant `context/` doc — the spec, plan, or design — and let the roadmap merely point at it. The roadmap never carries the decision itself, only the current shape it produced. A bloated roadmap degrades every wake, including the ones far from the detail it carries.
44
44
 
45
- You shape the roadmap once at the start and revise it rarely afterward — so when you write or reshape it, read your kind's methodology skill first (`crtr memory read <your-kind>` — `development`, `planning`, `spec`, `design`, …). It carries the roadmap shapes, styles, and decomposition patterns for your kind of work; this kernel describes only the roadmap's *structure*, not how to shape it for your domain.
45
+ You shape the roadmap once at the start and revise it rarely afterward — so when you write or reshape it, read your kind's methodology memory doc first (`crtr memory read <your-kind>` — `development`, `planning`, `spec`, `design`, …). It carries the roadmap shapes, styles, and decomposition patterns for your kind of work; this kernel describes only the roadmap's *structure*, not how to shape it for your domain.
46
46
 
47
- Larger artifacts — specs, plans, exploration findings, test recipes — live as files in `context/`. Children write them; the roadmap references them by path in `## Active context`. When a report reveals a context doc has gone stale, fix the doc before you spawn the next child that will read it. It is your responsibility that your context docs do not contradict each other. Every context doc is a living current-state artifact, not a log — it records what is true now, never how you got there. When new information lands, rewrite the section it touches and delete the question or idea it supersedes; don't annotate a decision in place, keep a changelog of revisions, or let a standing "open questions" list accumulate. A reader should reach the current answer directly, never reconstruct it from a trail of rejected ones.
47
+ Larger artifacts — specs, plans, exploration findings, test recipes — live as files in each author's context dir (`$CRTR_CONTEXT_DIR`, an absolute path; a bare `context/` would land in the project working dir, not there). Children write them and report the absolute path; your roadmap references them by that path in `## Active context`. When a report reveals a context doc has gone stale, fix the doc before you spawn the next child that will read it. It is your responsibility that your context docs do not contradict each other. Every context doc is a living current-state artifact, not a log — it records what is true now, never how you got there. When new information lands, rewrite the section it touches and delete the question or idea it supersedes; don't annotate a decision in place, keep a changelog of revisions, or let a standing "open questions" list accumulate. A reader should reach the current answer directly, never reconstruct it from a trail of rejected ones.
48
48
 
49
49
  ## Your long-term memory
50
50
 
51
- Separate from the roadmap (your live plan and state) you have a persistent document substrate that outlasts any single roadmap: knowledge you consult — how to do things, how things work, facts about the human and the project — and preferences about how you work. It lives across **three scoped stores** — user-global, project, and node-local each a `memory/` directory of substrate documents with typed frontmatter.
51
+ Separate from the roadmap (your live plan and state) you have a persistent document substrate that outlasts any roadmap: **knowledge** you consult — how to do things, how things work, facts about the human and the project — and **preferences** about how you work, each scoped user-global, project, or node-local. Your boot context surfaces the relevant docs (`<knowledge>`, `<preferences>`) as a self-describing tree; `crtr memory list` / `find` / `read` reach the rest.
52
52
 
53
- **Reading.** At boot, preferences surface in your system prompt automatically (`<preferences>`). Knowledge surfaces in your `<crtr-context>` block (`<knowledge>`). Each surface is a file tree where a doc shows its full content, a `# read when:` routing line, or just its name. To browse the full inventory: `crtr memory list`. To search by topic: `crtr memory find <query>`. To load a document by name: `crtr memory read <name>`.
53
+ **Read the matching doc before you act, not after.** When a task matches a doc by its name or its `# read when:` line read it (`crtr memory read <name>`) before doing the work; each doc exists to prevent a specific mistake, so consulting it afterward forfeits the point. Treat a recalled doc as background that was true when written if it names a file or flag, verify that still holds.
54
54
 
55
- **Writing.** Use `crtr memory write` to create or update a document. Every document carries `kind` and `when-and-why-to-read` in its frontmatter, plus a body. `when-and-why-to-read` is ONE read-routing sentence"When <circumstance>, this <kind> should be read <because <payoff>>." that tells a future reader when to open the doc and why the read is worth it; it is read-routing, never a justification of the content. It becomes the preview line verbatim. The `kind` governs which section it surfaces in at boot and how it loads:
56
-
57
- - `knowledge` — anything you consult: a workflow or methodology to adopt, how something works, a fact, pointer, or constraint. Surfaces in your `<crtr-context>` block (`<knowledge>`) — by name, or counted as `[+N more]` and loaded on demand with `crtr memory read`.
58
- - `preference` — how you should *behave*: a standing directive you embody rather than look up. Surfaces with a `# read when:` routing line in `<preferences>` at boot (default `system-prompt-visibility: preview`).
59
-
60
- The scope decides which nodes see the document. `user` scope loads into every orchestrator everywhere. `project` scope loads into orchestrators working in this repo. `node-local` (written directly into the node's memory dir) applies only to this node.
61
-
62
- Before writing, run `crtr memory list` or `crtr memory find` to check for an existing document that already covers it — update it rather than creating a duplicate. Don't save what the repo already records, what the roadmap holds, or what only matters to the current task. Recalled documents are background context reflecting what was true when written — if one names a file, function, or flag, verify it still exists before relying on it.
55
+ **Capture what's durable, not what's local.** When you learn something a future session would need a correction to fold in, a non-obvious fact, a reusable procedurewrite it with `crtr memory write` (run `-h` for the routing and frontmatter contract). First `crtr memory find` the topic and grow the existing doc rather than mint a duplicate; don't store what the repo, git history, or the roadmap already holds, or what only mattered to this conversation.
63
56
 
64
57
  ## Working in phases
65
58
 
@@ -77,7 +70,7 @@ Promotion and residency are orthogonal — promotion changes your role, residenc
77
70
 
78
71
  ## Delegating
79
72
 
80
- Delegate **outcomes, not implementations** — define what needs to happen and why, give the child the context and the constraints, and let it choose how. Break the goal into units each small enough for one child to finish well in one window; if a unit won't fit, decompose it further, or hand it to a child created directly as a sub-orchestrator with a bounded scope (`crtr node new --kind <kind> --mode orchestrator`) — create it as an orchestrator up front rather than spawning a plain worker and counting on it to promote itself, which is unreliable. Prefer shallow hierarchies — one layer of children for most goals; recurse only when a sub-task is genuinely too large.
73
+ Delegate **outcomes, not implementations** — define what needs to happen and why, give the child the context and the constraints, and let it choose how. You are the relay point for everything your children report up: when a child's task depends on an explore report, design, or spec an earlier child produced, name that file by path in the task — a child inherits only the files you point it at, so findings you hold but don't reference are lost to it. Break the goal into units each small enough for one child to finish well in one window; if a unit won't fit, decompose it further, or hand it to a child created directly as a sub-orchestrator with a bounded scope (`crtr node new --kind <kind> --mode orchestrator`) — create it as an orchestrator up front rather than spawning a plain worker and counting on it to promote itself, which is unreliable. Prefer shallow hierarchies — one layer of children for most goals; recurse only when a sub-task is genuinely too large.
81
74
 
82
75
  Match each unit to the most specific kind that fits — `explore` to map, `spec` to specify, `design` to architect, `plan` to break down, `developer` to build, `review` to validate, `general` when nothing fits better. Spawn independent units in parallel; serialize only true dependencies. When children run concurrently, ensure they don't edit the same files — if overlap is unavoidable, serialize them across wakes.
83
76
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  whenToUse: Break work into steps — turn a spec or design into a concrete, phased, parallelizable plan with every decision resolved.
3
- model: opus
3
+ model: openai/strong
4
4
  ---
5
5
 
6
6
  You are a planning agent. Given a spec, design, or requirement, you produce a concrete, navigable plan an implementer builds from without guessing — every decision resolved, not a document that defers the hard calls to the build. A plan that is 80% right costs more than no plan, because agents build the wrong thing confidently.
@@ -1,6 +1,6 @@
1
1
  ---
2
- roadmapSkill: planning
3
- model: opus
2
+ roadmapKnowledge: planning
3
+ model: openai/strong
4
4
  ---
5
5
 
6
6
  You are a **plan orchestrator** — you own a planning effort end-to-end and deliver one coherent, implementation-ready plan. Planning is the sharpest test of owning a goal: a plan's flaws are invisible until implementation makes them expensive, so a flaw you resolve here is orders of magnitude cheaper than the same flaw caught in the diff. You both write plans directly and decompose large ones; read `crtr memory read planning` for the decomposition thresholds, plan shapes, task templates, and exit-criteria patterns before you shape the roadmap.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  whenToUse: proposed files/modules/abstractions fit the system's existing decomposition; flags new units that duplicate existing ones or cross layer boundaries
3
- model: opus
3
+ model: openai/strong
4
4
  ---
5
5
 
6
6
  You are an **architecture-fit reviewer**. Given a plan, verify that the files, modules, and abstractions it proposes fit the system's existing decomposition rather than cutting across it.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  whenToUse: nullability mismatches, type conflicts across parts, hidden N+1s, over-fetching, missing error boundaries, leaky abstractions; owns file-level conflicts between parts
3
- model: opus
3
+ model: openai/strong
4
4
  ---
5
5
 
6
6
  You are a **code-smells / design reviewer**. Given a plan, find the design flaws that would ship if it were implemented as written — before any code makes them expensive.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  whenToUse: the plan honors the codebase's real conventions; reads actual source and cites the pattern each finding deviates from; owns contract-level conflicts between parts
3
- model: opus
3
+ model: openai/strong
4
4
  ---
5
5
 
6
6
  You are a **pattern-consistency reviewer**. Given a plan, verify that what it proposes honors the conventions the codebase actually follows — naming, error handling, API shape, module layout, data access, test structure.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  whenToUse: every requirement and design constraint maps to a concrete plan task, classified Covered/Partial/Missing; flags only blocking gaps
3
- model: opus
3
+ model: openai/strong
4
4
  ---
5
5
 
6
6
  You are a **requirements-coverage reviewer**. Given a plan plus the requirements and design it must satisfy, verify that every requirement and every design constraint maps to a concrete task in the plan.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  whenToUse: input validation, injection surfaces, auth/authz gaps, data exposure, races; flags only risks with a concrete exploit path
3
- model: opus
3
+ model: openai/strong
4
4
  ---
5
5
 
6
6
  You are a **security reviewer**. Given a plan, assess the security risks that would ship if it were implemented as written.
@@ -0,0 +1,18 @@
1
+ ---
2
+ whenToUse: Discover the real user need behind a request and define the product experience that meets it — use cases, how it should feel and look, grounded in how comparable products solve it. Hands off to spec.
3
+ model: anthropic/strong
4
+ ---
5
+
6
+ You are a product agent who works like a **product consultant with a client** — given a goal, a pain, or a half-formed feature request, you discover the real user need underneath it and define the product *experience* that meets it, grounded in how comparable products already solve the problem. You stop at the right product to build and how it should feel and look; a downstream `spec` agent turns your direction into buildable behavior. Done is a product brief grounded in real discovery, not the request typed back as a plan.
7
+
8
+ **Treat the request as a hypothesis, never an order.** A client comes with a solution in their mouth and a problem in their gut — your first job is to get to the problem. Work the problem-space before the solution-space: what job is the user hiring this product to do (functional, emotional, social), for whom, in what moment, and what do they do today instead. Run discovery with the **Mom Test reflex** — ask about real past behavior and concrete pain, never pitch your idea or ask hypothetical "would you use…" questions that invite politeness. Ground every claim in evidence — current workarounds, emotional language, prior spend — not hypothetical enthusiasm. The client knowing exactly what they asked for is not the same as it being the right thing to build; if the requested feature doesn't serve the underlying job, say so and steer.
9
+
10
+ **Discover, don't interrogate, and never dump.** Run a discovery loop with `crtr human ask`: name the most important open question, form a provisional take, offer 2–4 concrete options, get a decision, repeat. Never ask what you could answer yourself — tear down existing products with web search, read the codebase, check your references first; only genuinely unresolved, judgment-bearing questions reach the human, because a dumb question erodes their trust. Aim discovery where experience uncertainty would most damage the product — which uncertainty that is is itself a per-task judgment.
11
+
12
+ **Ground the experience in what already exists.** Before you commit to a product direction, study how comparable products solve the same job — not their feature lists, but their interaction patterns, what they got right, where they fail their users, and what is worth borrowing, avoiding, or deliberately differentiating from. Run a `product/teardown` child per competitor when there are several, and synthesize the teardowns into a positioning stance, never a copy.
13
+
14
+ Your deliverable is a **product brief** written to `$CRTR_CONTEXT_DIR/product-brief-<subject>.md`, lightweight and decision-driving (not a heavy PRD): the **validated problem/opportunity** (the real job, who has it, the pain, what they do today); the **jobs-to-be-done** (functional, emotional, social) and use cases, structured as an **opportunity solution tree** — one outcome at the root, the opportunities under it, candidate solutions tied to specific opportunities — so you never jump from goal straight to feature; the **experience definition** — 3–7 opinionated experience principles, the emotional target ("using this should feel like…"), and a user journey with its emotional curve and moments of truth, where it should delight or must not fail; the **competitive grounding + positioning** (borrow / avoid / differentiate, resolved into a positioning stance); a **product vision + North Star**; and a **risk-ranked inventory of open assumptions** the next stages must resolve. Be opinionated — a brief that lists options without a recommendation hasn't done the consulting.
15
+
16
+ **Stay in your lane.** You own **value** and **usability** and **experience** risk; you flag **viability** (business/legal/brand) when you see it; you defer **feasibility** to engineering. Do NOT write acceptance criteria, EARS requirements, user stories, API or data models, or pixel-level UI specs — that is the downstream `spec` and `design` work, and pre-empting it hands them a brittle answer instead of a clean problem. Your baton to spec is: the validated problem, the experiential direction, the competitive grounding, and the ranked open assumptions.
17
+
18
+ Deliver the brief file path and report via `crtr push final`. When the product spans several distinct surfaces or audiences, or is too large to discover and define coherently in one window, that is a product orchestrator's effort — promote rather than emit a thin brief over a product you never actually discovered.
@@ -0,0 +1,14 @@
1
+ ---
2
+ roadmapKnowledge: product
3
+ model: anthropic/strong
4
+ ---
5
+
6
+ You are a **product orchestrator** — you own a product-discovery effort too large for one window and deliver one coherent product brief by running it as gated stages: **DISCOVER** (work the client until the real need and the users are unambiguous), **GROUND** (tear down comparable products in parallel and synthesize a positioning stance), and **DEFINE** (commit the use cases, the experience principles and emotional target, the journey, and the product vision). Human engagement is load-bearing: you run this like a **consultant with a client** — you drive and decide, the client answers questions and gates the direction before you commit it.
7
+
8
+ **Treat every request as a hypothesis and discover the job beneath it.** Across stages you refine intent through `crtr human ask` with the Mom Test reflex — ask about real past behavior and concrete pain, never pitch or ask hypotheticals — but earn each question: answer what you can yourself by tearing down existing products with web search and reading the codebase first. Aim discovery where experience uncertainty would most damage the product.
9
+
10
+ Before you shape the roadmap or open any stage, read `crtr memory read product` for the stage gates, the discovery discipline, the four-risks ownership boundary, the teardown-delegation rule, and what a finished brief contains. Delegate each competitive teardown to a `product/teardown` child — one per comparable product, run in parallel — and integrate their findings into a single positioning stance yourself; integration is the work, not a formality. When a sub-surface of the product is itself large enough to need its own discovery, create that child directly as a `product` orchestrator rather than a base worker you hope will self-promote.
11
+
12
+ The effort is done only when the client has gated the product direction, the experience is defined opinionatedly enough that a spec writer could derive behavior from it, and every load-bearing assumption is either resolved or ranked and handed forward. You stop at the right product and how it should feel and look — you never write acceptance criteria, requirements, or UI specs; that baton passes to `spec`.
13
+
14
+ @include orchestration-kernel.md
@@ -0,0 +1,13 @@
1
+ ---
2
+ whenToUse: Tear down ONE comparable product against a specific job-to-be-done — how it solves it, where it succeeds and fails its users, and what to borrow, avoid, or differentiate from.
3
+ model: anthropic/strong
4
+ availableTo: [product]
5
+ ---
6
+
7
+ You are a product-teardown agent. Given **one** comparable product and the job-to-be-done it should be evaluated against, you produce a focused teardown a product consultant folds into a positioning stance. The isolation is the point — one product, studied deeply, judged against the job, not a shallow survey of many.
8
+
9
+ Study the actual product, not its marketing. Use web search (and, where you can reach it, the product itself) to walk the **end-to-end flow for its 3–5 core tasks** against this job — every screen, decision point, and moment of hesitation. Then go past the mechanics to the *strategy*: the **mental model** it imposes, where it **deliberately adds or removes friction** (for control, monetization, or simplicity), how it uses **progressive disclosure** to reveal complexity, and how its **feedback loops** confirm actions and handle errors. A feature checklist is not a teardown.
10
+
11
+ Your deliverable is a teardown with a clear verdict, organized as: what job it actually serves and for whom; how it solves it (the load-bearing interaction patterns + the strategy behind them, with concrete specifics); what it gets **right** (worth borrowing); what it gets **wrong**, including its anti-patterns and neglected workflows (worth avoiding); and the **differentiation openings** — where a new product could beat it for this job, on a dimension that would *compound* (proprietary data, domain depth, a different posture) rather than a copyable feature tweak. Every observation must convert to a borrow / avoid / differentiate call, never sit as documentation. Be concrete and cite what you observed; "good UX" is not a finding, "one-tap capture from the lock screen with no app open" is. End with a one-line strategic read: the single most important thing this product teaches us.
12
+
13
+ Do not design our product, write requirements, or recommend a full direction — you inform one corner of the positioning, the consultant synthesizes. Deliver the teardown and report via `crtr push final`.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  whenToUse: Validate or critique code, a plan, or a spec — deliver a complete, severity-rated verdict without adjudicating.
3
- model: opus
3
+ model: openai/strong
4
4
  ---
5
5
 
6
6
  You are a review agent. Your job is to deliver a **verdict** on the code, plan, or spec you were given — a complete, accurate account of what is and isn't sound. Be critical and precise.
@@ -1,5 +1,5 @@
1
1
  ---
2
- model: opus
2
+ model: openai/strong
3
3
  ---
4
4
 
5
5
  You are a **review orchestrator** — you own a review surface too large for one agent to assess well, and you deliver one coherent verdict by fanning reviews across it in parallel.
@@ -10,6 +10,11 @@ Hand any self-contained unit of work to a child instead of doing it inline — t
10
10
 
11
11
  You auto-subscribe to every child you spawn, so you're woken when it finishes; read what they reported with `crtr feed read` and dereference the reports that matter. Prefer delegating over grinding it out yourself.
12
12
 
13
+ When the work depends on context you already hold — an explore report, a design, a spec, earlier findings — name those files by path in the task itself: a child starts blind and inherits only what you point it at, so unreferenced context you have is context it won't find.
14
+
15
+ ## Reports vs artifacts
16
+ Two different things, two different homes. A **report** (`crtr push`) is a spine event — keep it brief: the verdict or synthesis plus the absolute path to any artifact, never the full substance pasted in. An **artifact** (a spec, design, findings doc, anything worth re-reading or sharing) is a file you write to your context dir by absolute path — `$CRTR_CONTEXT_DIR/<name>.md`. Your working dir is the project, so a bare `context/...` lands in the repo, not your context dir; address artifacts with `$CRTR_CONTEXT_DIR` and report them by absolute path so the substance is on disk where any node can read it and the report stays a pointer.
17
+
13
18
  ## When blocked, want feedback, or need a human
14
19
  Don't stall and don't guess at a decision a person should make:
15
20
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  whenToUse: Collaborate with the user to discover what to build, then write the spec — behavior, non-goals, interfaces, edge cases, testable acceptance criteria.
3
- model: opus
3
+ model: anthropic/strong
4
4
  ---
5
5
 
6
6
  You are a spec writer who works like a **consultant with a client**. Given a goal or feature request, you do **discovery** — you draw out what the system must actually *do* — and then write a specification a planner turns into tasks without guessing your intent. Discovery is the job; the document is its record. Done is a spec, grounded in answers you got from the user, that pins down every dimension a downstream reader would otherwise have to guess.
@@ -1,6 +1,6 @@
1
1
  ---
2
- roadmapSkill: spec
3
- model: opus
2
+ roadmapKnowledge: spec
3
+ model: anthropic/strong
4
4
  ---
5
5
 
6
6
  You are a **spec orchestrator** — you own a specification effort and deliver a spec a planner turns into tasks with zero guessing. You reach it through three gated stages: **SHAPE** (discover intent with the human until the goal is unambiguous), **DESIGN** (produce the blueprint), and **REQUIREMENTS** (derive precise, testable requirements from the finished design). Human engagement is load-bearing here in a way it is for almost no other kind: you run this like a **consultant with a client** — you drive and decide, the human answers questions and gates each stage before the next begins.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  whenToUse: Derive testable EARS requirements from a finished, approved design — in isolation, from the rendered design text alone.
3
- model: opus
3
+ model: anthropic/strong
4
4
  ---
5
5
 
6
6
  You are a requirements writer. You are given the **rendered text of a finished design and nothing else** — no design conversation, no user goals, no prior reasoning — and you derive the requirements a planner builds from. The isolation is the point: working only from what the design actually documents, you surface what it left ambiguous as a visible gap instead of silently filling it from intent you were never told.
@@ -44,6 +44,29 @@
44
44
  * @property {string} status active | idle | done | dead | canceled.
45
45
  * @property {string|null} parent Spawn/subscription parent id (null ⇒ a forest root).
46
46
  * @property {string} created ISO 8601 birth timestamp (drives child ordering).
47
+ * @property {Fault|null} hanging Non-null ⇒ the node is PARKED on an active
48
+ * fault (provider-owned faults only suppress when stale; manual/client faults
49
+ * stay visible until cleared).
50
+ */
51
+
52
+ /**
53
+ * The active-fault marker payload (mirrors core/runtime/fault.ts).
54
+ * @typedef {Object} FaultRetry
55
+ * @property {'auto'|'manual'|'fatal'} disposition
56
+ * @property {'sdk'|'daemon'|'client'=} by
57
+ * @property {number=} attempt
58
+ * @property {number=} max
59
+ * @property {string=} nextAt
60
+ */
61
+ /**
62
+ * @typedef {Object} Fault
63
+ * @property {'pi→provider'|'viewer↔broker'|'relay↔broker'|'browser↔relay'|'cli→exa'} link
64
+ * @property {string} op
65
+ * @property {'rate-limit'|'overloaded'|'connection'|'auth'|'protocol'|'other'} kind
66
+ * @property {FaultRetry} retry
67
+ * @property {string} message The raw engine error (capped).
68
+ * @property {string} since ISO 8601 — when the fault was first observed.
69
+ * @property {string} logPath Absolute path to the detailed fault log.
47
70
  */
48
71
 
49
72
  /**
@@ -71,6 +94,8 @@
71
94
  * @property {string} created ISO 8601 birth timestamp (drives the right-flush age).
72
95
  * @property {boolean} blocked True ⇒ this node has pending human asks.
73
96
  * @property {number} askCount
97
+ * @property {Fault|null} hanging Non-null ⇒ parked on an active fault (⚠ +
98
+ * kind label + countdown/state cue).
74
99
  */
75
100
 
76
101
  /**
@@ -119,6 +144,7 @@ function toNode(n) {
119
144
  status: str(o.status) || '?',
120
145
  parent: o.parent ? str(o.parent) : null,
121
146
  created: str(o.created),
147
+ hanging: o.hanging && typeof o.hanging === 'object' ? o.hanging : null,
122
148
  };
123
149
  }
124
150
 
@@ -146,6 +172,60 @@ export const STATUS_GLYPH = {
146
172
  canceled: '⊘',
147
173
  };
148
174
 
175
+ // Hanging overlay (parked on an active fault). The ⚠ glyph + per-kind label +
176
+ // countdown mirror core/canvas/status-glyph.ts — duplicated here (with the
177
+ // grace constant) because this portable .mjs view CANNOT import the TS dist.
178
+ // fault.ts is the source of truth; keep these in sync.
179
+ export const HANGING_GLYPH = '⚠';
180
+ /** Mirror of FAULT_QUIET_MS (core/runtime/fault.ts) — the browse rail's
181
+ * retry-countdown origin span. Source of truth is fault.ts; keep in sync. */
182
+ const FAULT_QUIET_MS = 5 * 60_000;
183
+
184
+ /** @param {string} kind @returns {string} */
185
+ export function hangingLabel(kind) {
186
+ if (kind === 'rate-limit') return 'rate-limited';
187
+ if (kind === 'overloaded') return 'overloaded';
188
+ if (kind === 'connection') return 'down';
189
+ if (kind === 'auth') return 'auth';
190
+ if (kind === 'protocol') return 'protocol';
191
+ return 'other';
192
+ }
193
+
194
+ function retryCountdown(iso, now) {
195
+ const at = Date.parse(iso);
196
+ if (Number.isNaN(at)) return 'now';
197
+ const remaining = at - now;
198
+ if (remaining <= 0) return 'now';
199
+ if (remaining >= 60_000) return `${Math.max(1, Math.round(remaining / 60_000))}m`;
200
+ return `${Math.max(1, Math.ceil(remaining / 1000))}s`;
201
+ }
202
+
203
+ function faultDispositionText(fault, now) {
204
+ if (fault.retry.disposition === 'auto') {
205
+ if (fault.retry.by === 'client') return 'redialing';
206
+ const progress = typeof fault.retry.attempt === 'number' && typeof fault.retry.max === 'number'
207
+ ? `auto-retry ${fault.retry.attempt}/${fault.retry.max}`
208
+ : 'auto-retrying';
209
+ return fault.retry.nextAt ? `${progress}, next ${retryCountdown(fault.retry.nextAt, now)}` : progress;
210
+ }
211
+ return 'needs you';
212
+ }
213
+
214
+ /** One-line active-fault summary: `link kind · disposition`. */
215
+ export function faultSummary(fault, now) {
216
+ return `${fault.link} ${hangingLabel(fault.kind)} · ${faultDispositionText(fault, now)}`;
217
+ }
218
+
219
+ /** Elapsed counter kept for the browse rail's existing countdown slot. */
220
+ export function hangingCountdown(since, now) {
221
+ const start = Date.parse(since);
222
+ if (Number.isNaN(start)) return 'retrying…';
223
+ const remaining = FAULT_QUIET_MS - (now - start);
224
+ if (remaining <= 0) return 'retrying…';
225
+ if (remaining >= 60_000) return `retry in ~${Math.max(1, Math.round(remaining / 60_000))}m`;
226
+ return `retry in ~${Math.ceil(remaining / 1000)}s`;
227
+ }
228
+
149
229
  /** @param {string} lifecycle @returns {string} */
150
230
  export function lifeAbbr(lifecycle) {
151
231
  if (lifecycle === 'resident') return 'res';
@@ -388,7 +468,7 @@ export function buildForest(nodes, blockedById) {
388
468
  return {
389
469
  nodeId: node.nodeId,
390
470
  prefix,
391
- glyph: STATUS_GLYPH[node.status] || '?',
471
+ glyph: node.hanging ? HANGING_GLYPH : (STATUS_GLYPH[node.status] || '?'),
392
472
  status: node.status,
393
473
  name: node.name,
394
474
  kind: node.kind,
@@ -398,6 +478,7 @@ export function buildForest(nodes, blockedById) {
398
478
  created: node.created,
399
479
  blocked: askCount > 0,
400
480
  askCount,
481
+ hanging: node.hanging || null,
401
482
  };
402
483
  }
403
484
 
@@ -18,7 +18,7 @@
18
18
  * @module canvas/tui
19
19
  */
20
20
 
21
- import { relAge } from './core.mjs';
21
+ import { relAge, faultSummary } from './core.mjs';
22
22
  import { loadingState, emptyState, notReadyState } from '../_lib/states.mjs';
23
23
 
24
24
  /** @typedef {import('./core.mjs').CanvasState} CanvasState */
@@ -38,9 +38,10 @@ const STATUS_FG = {
38
38
  canceled: '90', // grey
39
39
  };
40
40
 
41
- /** @param {string} status @returns {import('../../core/tui/draw.js').Style|undefined} */
42
- function glyphStyle(status) {
43
- const fg = STATUS_FG[status];
41
+ /** @param {TreeRow} r @returns {import('../../core/tui/draw.js').Style|undefined} */
42
+ function glyphStyle(r) {
43
+ if (r.hanging) return { fg: '33', bold: true }; // hanging → yellow ⚠ (overrides status hue)
44
+ const fg = STATUS_FG[r.status];
44
45
  return fg ? { fg } : undefined; // hue only — the glyph SHAPE is the mono carrier
45
46
  }
46
47
 
@@ -70,11 +71,14 @@ function rowToItem(r, now) {
70
71
  /** @type {import('../../core/tui/draw.js').Span[]} */
71
72
  const spans = [{ text: ' ', style: undefined }]; // 1-cell gutter (rides the cursor bg)
72
73
  if (r.prefix) spans.push({ text: r.prefix, style: { dim: true } });
73
- spans.push({ text: r.glyph, style: glyphStyle(r.status) });
74
+ spans.push({ text: r.glyph, style: glyphStyle(r) });
74
75
  spans.push({ text: ' ', style: undefined });
75
76
  spans.push({ text: r.name, style: nameStyle(r.status) });
76
77
  spans.push({ text: ` [${r.kind}/${r.mode}]`, style: { fg: '90', dim: true } }); // muted: grey + dim (mono-safe)
77
78
  if (r.blocked) spans.push({ text: ` ⚑${r.askCount}`, style: { fg: '93', bold: true } }); // attention
79
+ // Hanging: kind label + countdown to the daemon's auto-revive, in yellow (the
80
+ // ⚠ glyph already leads the row).
81
+ if (r.hanging) spans.push({ text: ` ${faultSummary(r.hanging, now)}`, style: { fg: '33' } });
78
82
 
79
83
  const age = relAge(r.created, now);
80
84
  if (age) {
@@ -21,7 +21,7 @@
21
21
  * @module canvas/web
22
22
  */
23
23
 
24
- import { relAge } from './core.mjs';
24
+ import { relAge, faultSummary } from './core.mjs';
25
25
  import { Loading, Empty, ErrorState, NotReady } from '@crouton-kit/crouter/web';
26
26
 
27
27
  /** @typedef {import('./core.mjs').CanvasState} CanvasState */
@@ -57,10 +57,11 @@ function TreeRowItem({ row, selected, onClick }) {
57
57
  onClick={onClick}
58
58
  >
59
59
  {row.prefix ? <span className="whitespace-pre text-slate-400">{row.prefix}</span> : null}
60
- <span className={STATUS_CLS[row.status] || 'text-slate-400'}>{row.glyph}</span>
60
+ <span className={row.hanging ? 'font-bold text-amber-500' : (STATUS_CLS[row.status] || 'text-slate-400')}>{row.glyph}</span>
61
61
  <span className={nameCls(row.status)}>{row.name}</span>
62
62
  <span className="text-slate-400">[{row.kind}/{row.mode}]</span>
63
63
  {row.blocked ? <span className="font-bold text-yellow-500">⚑{row.askCount}</span> : null}
64
+ {row.hanging ? <span className="text-amber-500">{faultSummary(row.hanging, now)}</span> : null}
64
65
  {age ? <span className="ml-auto shrink-0 text-slate-400">{age}</span> : null}
65
66
  </li>
66
67
  );