@xingular/harness 1.0.0 → 1.2.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 (397) hide show
  1. package/CHANGELOG.md +46 -5
  2. package/README.md +75 -21
  3. package/dist/cli.js +17421 -8711
  4. package/dist/sdk/accounts/accounts.d.ts +27 -3
  5. package/dist/sdk/accounts/accounts.js +78 -24
  6. package/dist/sdk/accounts/secrets.d.ts +12 -0
  7. package/dist/sdk/accounts/secrets.js +114 -7
  8. package/dist/sdk/accounts/store.d.ts +26 -1
  9. package/dist/sdk/accounts/store.js +1 -1
  10. package/dist/sdk/agents/builtin.d.ts +2 -0
  11. package/dist/sdk/agents/builtin.js +48 -0
  12. package/dist/sdk/agents/narrow.d.ts +13 -0
  13. package/dist/sdk/agents/narrow.js +29 -0
  14. package/dist/sdk/agents/planResearch.d.ts +5 -0
  15. package/dist/sdk/agents/planResearch.js +19 -0
  16. package/dist/sdk/agents/profiles.d.ts +81 -0
  17. package/dist/sdk/agents/profiles.js +226 -0
  18. package/dist/sdk/annotations/bridge.d.ts +42 -0
  19. package/dist/sdk/annotations/bridge.js +264 -0
  20. package/dist/sdk/annotations/capture.d.ts +116 -0
  21. package/dist/sdk/annotations/capture.js +308 -0
  22. package/dist/sdk/annotations/delivery.d.ts +72 -0
  23. package/dist/sdk/annotations/delivery.js +130 -0
  24. package/dist/sdk/annotations/inspect.d.ts +10 -0
  25. package/dist/sdk/annotations/inspect.js +33 -0
  26. package/dist/sdk/annotations/isolated.d.ts +6 -0
  27. package/dist/sdk/annotations/isolated.js +51 -0
  28. package/dist/sdk/annotations/pageScript.d.ts +28 -0
  29. package/dist/sdk/annotations/pageScript.js +871 -0
  30. package/dist/sdk/annotations/part.d.ts +10 -0
  31. package/dist/sdk/annotations/part.js +155 -0
  32. package/dist/sdk/annotations/queue.d.ts +4 -0
  33. package/dist/sdk/annotations/queue.js +40 -0
  34. package/dist/sdk/annotations/serverMethods.d.ts +3 -0
  35. package/dist/sdk/annotations/serverMethods.js +62 -0
  36. package/dist/sdk/annotations/store.d.ts +167 -0
  37. package/dist/sdk/annotations/store.js +394 -0
  38. package/dist/sdk/browser/backend.d.ts +16 -0
  39. package/dist/sdk/browser/backend.js +17 -0
  40. package/dist/sdk/browser/contracts.d.ts +19 -0
  41. package/dist/sdk/browser/contracts.js +116 -0
  42. package/dist/sdk/browser/index.d.ts +14 -3
  43. package/dist/sdk/browser/index.js +11 -4
  44. package/dist/sdk/browser/serverMethods.d.ts +3 -0
  45. package/dist/sdk/browser/serverMethods.js +7 -0
  46. package/dist/sdk/browser/session.d.ts +1 -0
  47. package/dist/sdk/browser/session.js +45 -9
  48. package/dist/sdk/browser/tools.d.ts +1 -4
  49. package/dist/sdk/browser/tools.js +14 -91
  50. package/dist/sdk/cli.js +24 -15
  51. package/dist/sdk/commands/list.d.ts +3 -0
  52. package/dist/sdk/commands/list.js +75 -0
  53. package/dist/sdk/commands/registry.d.ts +250 -0
  54. package/dist/sdk/commands/registry.js +47 -0
  55. package/dist/sdk/commands/routes.d.ts +16 -0
  56. package/dist/sdk/commands/routes.js +33 -0
  57. package/dist/sdk/core/bus.js +1 -1
  58. package/dist/sdk/core/commandBudget.d.ts +23 -0
  59. package/dist/sdk/core/commandBudget.js +57 -0
  60. package/dist/sdk/core/env.d.ts +1 -1
  61. package/dist/sdk/core/env.js +1 -1
  62. package/dist/sdk/core/index.js +17 -1
  63. package/dist/sdk/core/interactiveProfile.d.ts +46 -0
  64. package/dist/sdk/core/interactiveProfile.js +143 -0
  65. package/dist/sdk/core/workspace.d.ts +13 -0
  66. package/dist/sdk/core/workspace.js +88 -0
  67. package/dist/sdk/core/workspaceBashTool.d.ts +4 -0
  68. package/dist/sdk/core/workspaceBashTool.js +36 -0
  69. package/dist/sdk/core/workspaceSandbox.d.ts +31 -0
  70. package/dist/sdk/core/workspaceSandbox.js +320 -0
  71. package/dist/sdk/core/workspaceWriteOperations.d.ts +22 -0
  72. package/dist/sdk/core/workspaceWriteOperations.js +206 -0
  73. package/dist/sdk/doctor/serverMethods.d.ts +3 -0
  74. package/dist/sdk/doctor/serverMethods.js +8 -0
  75. package/dist/sdk/doctor/types.d.ts +2 -2
  76. package/dist/sdk/harness.d.ts +22 -0
  77. package/dist/sdk/harness.js +84 -5
  78. package/dist/sdk/history/recall.js +8 -8
  79. package/dist/sdk/history/serverMethods.d.ts +3 -0
  80. package/dist/sdk/history/serverMethods.js +8 -0
  81. package/dist/sdk/hub/cli.d.ts +1 -1
  82. package/dist/sdk/hub/cli.js +1 -1
  83. package/dist/sdk/hub/schema.d.ts +1 -1
  84. package/dist/sdk/hub/serverMethods.d.ts +3 -0
  85. package/dist/sdk/hub/serverMethods.js +11 -0
  86. package/dist/sdk/index.d.ts +16 -1
  87. package/dist/sdk/index.js +10 -0
  88. package/dist/sdk/mcp/connections.js +14 -7
  89. package/dist/sdk/mcp/serverMethods.d.ts +3 -0
  90. package/dist/sdk/mcp/serverMethods.js +22 -0
  91. package/dist/sdk/pi/runtime.d.ts +2 -1
  92. package/dist/sdk/pi/runtime.js +2 -2
  93. package/dist/sdk/plugins/builtin.d.ts +1 -0
  94. package/dist/sdk/plugins/builtin.js +145 -33
  95. package/dist/sdk/plugins/builtinRegistry.d.ts +60 -0
  96. package/dist/sdk/plugins/builtinRegistry.js +71 -0
  97. package/dist/sdk/plugins/catalogue.js +2 -1
  98. package/dist/sdk/plugins/cli.d.ts +1 -1
  99. package/dist/sdk/plugins/cli.js +4 -3
  100. package/dist/sdk/plugins/commandPrefix.d.ts +8 -0
  101. package/dist/sdk/plugins/commandPrefix.js +21 -0
  102. package/dist/sdk/plugins/firstParty.d.ts +1 -1
  103. package/dist/sdk/plugins/firstParty.js +8 -2
  104. package/dist/sdk/plugins/inventory.js +4 -3
  105. package/dist/sdk/plugins/manifest.d.ts +2 -0
  106. package/dist/sdk/plugins/manifest.js +2 -1
  107. package/dist/sdk/plugins/surfaces.d.ts +5 -0
  108. package/dist/sdk/plugins/surfaces.js +11 -0
  109. package/dist/sdk/plugins/types.d.ts +15 -0
  110. package/dist/sdk/prompt/compile.d.ts +19 -2
  111. package/dist/sdk/prompt/compile.js +79 -26
  112. package/dist/sdk/prompt/standard.d.ts +17 -0
  113. package/dist/sdk/prompt/standard.js +21 -0
  114. package/dist/sdk/refine/cli.d.ts +1 -1
  115. package/dist/sdk/refine/cli.js +2 -2
  116. package/dist/sdk/refine/serverMethods.d.ts +3 -0
  117. package/dist/sdk/refine/serverMethods.js +20 -0
  118. package/dist/sdk/server/methods.js +27 -86
  119. package/dist/sdk/server/params.d.ts +4 -0
  120. package/dist/sdk/server/params.js +11 -0
  121. package/dist/sdk/server/remote.js +36 -11
  122. package/dist/sdk/sessions/compactionCheckpoint.d.ts +11 -0
  123. package/dist/sdk/sessions/compactionCheckpoint.js +79 -0
  124. package/dist/sdk/sessions/continuation.d.ts +3 -0
  125. package/dist/sdk/sessions/continuation.js +5 -1
  126. package/dist/sdk/sessions/contracts.d.ts +185 -0
  127. package/dist/sdk/sessions/contracts.js +101 -4
  128. package/dist/sdk/sessions/control.d.ts +72 -0
  129. package/dist/sdk/sessions/control.js +158 -0
  130. package/dist/sdk/sessions/initialBash.d.ts +7 -0
  131. package/dist/sdk/sessions/initialBash.js +7 -0
  132. package/dist/sdk/sessions/planMode.d.ts +18 -4
  133. package/dist/sdk/sessions/planMode.js +82 -16
  134. package/dist/sdk/sessions/reasoningSummaries.d.ts +2 -2
  135. package/dist/sdk/sessions/reasoningSummaries.js +3 -3
  136. package/dist/sdk/sessions/registry.d.ts +2 -1
  137. package/dist/sdk/sessions/registry.js +6 -3
  138. package/dist/sdk/sessions/runIndex.js +7 -7
  139. package/dist/sdk/sessions/runStore.d.ts +14 -0
  140. package/dist/sdk/sessions/runStore.js +38 -1
  141. package/dist/sdk/sessions/runner.d.ts +40 -2
  142. package/dist/sdk/sessions/runner.js +163 -15
  143. package/dist/sdk/sessions/sessions.d.ts +40 -8
  144. package/dist/sdk/sessions/sessions.js +279 -27
  145. package/dist/sdk/sessions/sideQuestionServerMethods.d.ts +3 -0
  146. package/dist/sdk/sessions/sideQuestionServerMethods.js +19 -0
  147. package/dist/sdk/sessions/sideQuestions.d.ts +66 -0
  148. package/dist/sdk/sessions/sideQuestions.js +290 -0
  149. package/dist/sdk/sessions/subagentServerMethods.d.ts +3 -0
  150. package/dist/sdk/sessions/subagentServerMethods.js +41 -0
  151. package/dist/sdk/sessions/subagentService.d.ts +22 -2
  152. package/dist/sdk/sessions/subagentService.js +93 -16
  153. package/dist/sdk/sessions/subagents.d.ts +9 -1
  154. package/dist/sdk/sessions/subagents.js +19 -0
  155. package/dist/sdk/sessions/workSlice.d.ts +103 -0
  156. package/dist/sdk/sessions/workSlice.js +297 -0
  157. package/dist/sdk/sessions/workspaceBoundary.d.ts +15 -0
  158. package/dist/sdk/sessions/workspaceBoundary.js +46 -0
  159. package/dist/sdk/terminal/browser.d.ts +62 -0
  160. package/dist/sdk/terminal/browser.js +41 -0
  161. package/dist/sdk/terminal/browserControl.d.ts +29 -0
  162. package/dist/sdk/terminal/browserControl.js +187 -0
  163. package/dist/sdk/terminal/commandHelp.d.ts +17 -0
  164. package/dist/sdk/terminal/commandHelp.js +20 -0
  165. package/dist/sdk/terminal/controller.d.ts +15 -1
  166. package/dist/sdk/terminal/controller.js +67 -8
  167. package/dist/sdk/terminal/opentui/subagentsWidget.d.ts +28 -0
  168. package/dist/sdk/terminal/opentui/subagentsWidget.js +52 -0
  169. package/dist/sdk/terminal/opentui/theme.d.ts +43 -0
  170. package/dist/sdk/terminal/opentui/theme.js +87 -0
  171. package/dist/sdk/terminal/piExtension.d.ts +6 -1
  172. package/dist/sdk/terminal/piExtension.js +169 -84
  173. package/dist/sdk/terminal/socket.d.ts +6 -3
  174. package/dist/sdk/terminal/socket.js +40 -9
  175. package/dist/sdk/terminal/standalone.d.ts +9 -0
  176. package/dist/sdk/terminal/standalone.js +118 -19
  177. package/dist/sdk/terminal/subagentMonitor.d.ts +47 -0
  178. package/dist/sdk/terminal/subagentMonitor.js +152 -0
  179. package/dist/sdk/terminal/terminals.d.ts +60 -7
  180. package/dist/sdk/terminal/terminals.js +598 -47
  181. package/dist/sdk/terminal/trajectory.js +2 -2
  182. package/dist/sdk/terminal/tui/annotateCommand.d.ts +3 -0
  183. package/dist/sdk/terminal/tui/annotateCommand.js +22 -0
  184. package/dist/sdk/terminal/tui/commandPages.d.ts +7 -1
  185. package/dist/sdk/terminal/tui/commandPages.js +57 -6
  186. package/dist/sdk/terminal/tui/commands.d.ts +10 -4
  187. package/dist/sdk/terminal/tui/commands.js +269 -65
  188. package/dist/sdk/terminal/tui/dialogGeometry.d.ts +2 -2
  189. package/dist/sdk/terminal/tui/dialogGeometry.js +4 -2
  190. package/dist/sdk/terminal/tui/dialogs.d.ts +6 -1
  191. package/dist/sdk/terminal/tui/dialogs.js +9 -2
  192. package/dist/sdk/terminal/tui/list.d.ts +14 -1
  193. package/dist/sdk/terminal/tui/list.js +96 -14
  194. package/dist/sdk/terminal/tui/modelPicker.js +1 -6
  195. package/dist/sdk/terminal/tui/page.d.ts +3 -0
  196. package/dist/sdk/terminal/tui/pageOverlay.js +27 -7
  197. package/dist/sdk/terminal/tui/pages/accountsPage.d.ts +26 -4
  198. package/dist/sdk/terminal/tui/pages/accountsPage.js +264 -36
  199. package/dist/sdk/terminal/tui/pages/agentsPage.d.ts +74 -0
  200. package/dist/sdk/terminal/tui/pages/agentsPage.js +190 -0
  201. package/dist/sdk/terminal/tui/pages/annotatePage.d.ts +94 -0
  202. package/dist/sdk/terminal/tui/pages/annotatePage.js +341 -0
  203. package/dist/sdk/terminal/tui/pages/browserPage.d.ts +87 -0
  204. package/dist/sdk/terminal/tui/pages/browserPage.js +738 -0
  205. package/dist/sdk/terminal/tui/pages/doctorPage.d.ts +2 -0
  206. package/dist/sdk/terminal/tui/pages/doctorPage.js +103 -15
  207. package/dist/sdk/terminal/tui/pages/notesPage.d.ts +75 -0
  208. package/dist/sdk/terminal/tui/pages/notesPage.js +201 -0
  209. package/dist/sdk/terminal/tui/pages/pluginsPage.d.ts +0 -5
  210. package/dist/sdk/terminal/tui/pages/pluginsPage.js +9 -3
  211. package/dist/sdk/terminal/tui/pages/settingsPage.d.ts +8 -0
  212. package/dist/sdk/terminal/tui/pages/settingsPage.js +16 -1
  213. package/dist/sdk/terminal/tui/pages/subagentsPage.d.ts +24 -0
  214. package/dist/sdk/terminal/tui/pages/subagentsPage.js +152 -0
  215. package/dist/sdk/terminal/tui/pages/trajectoryPage.d.ts +12 -5
  216. package/dist/sdk/terminal/tui/pages/trajectoryPage.js +156 -83
  217. package/dist/sdk/terminal/tui/pages/usagePage.d.ts +43 -0
  218. package/dist/sdk/terminal/tui/pages/usagePage.js +370 -0
  219. package/dist/sdk/terminal/tui/pages/worktreesPage.d.ts +72 -0
  220. package/dist/sdk/terminal/tui/pages/worktreesPage.js +203 -0
  221. package/dist/sdk/terminal/tui/piAdapter.d.ts +1 -2
  222. package/dist/sdk/terminal/tui/piAdapter.js +3 -5
  223. package/dist/sdk/terminal/tui/planMode.d.ts +1 -1
  224. package/dist/sdk/terminal/tui/planMode.js +1 -1
  225. package/dist/sdk/terminal/tui/pluginCommands.d.ts +16 -0
  226. package/dist/sdk/terminal/tui/pluginCommands.js +31 -0
  227. package/dist/sdk/terminal/tui/questions.d.ts +2 -0
  228. package/dist/sdk/terminal/tui/runtime.js +27 -5
  229. package/dist/sdk/terminal/tui/sessionPicker.d.ts +40 -0
  230. package/dist/sdk/terminal/tui/sessionPicker.js +141 -0
  231. package/dist/sdk/terminal/tui/settingsModel.d.ts +2 -0
  232. package/dist/sdk/terminal/tui/settingsModel.js +32 -2
  233. package/dist/sdk/terminal/tui/sideQuestion.d.ts +26 -26
  234. package/dist/sdk/terminal/tui/sideQuestion.js +131 -98
  235. package/dist/sdk/terminal/tui/ui.d.ts +2 -0
  236. package/dist/sdk/terminal/tui/ui.js +1 -0
  237. package/dist/sdk/tools/askUser.js +26 -8
  238. package/dist/sdk/tools/checklist.js +3 -2
  239. package/dist/sdk/tools/checkpoint.d.ts +27 -0
  240. package/dist/sdk/tools/checkpoint.js +154 -0
  241. package/dist/sdk/tools/getCapabilities.d.ts +31 -0
  242. package/dist/sdk/tools/getCapabilities.js +34 -0
  243. package/dist/sdk/tools/harnessTools.d.ts +2 -0
  244. package/dist/sdk/tools/harnessTools.js +1 -1
  245. package/dist/sdk/tools/spawnSubagent.js +14 -4
  246. package/dist/sdk/usage/analytics.d.ts +20 -0
  247. package/dist/sdk/usage/analytics.js +151 -0
  248. package/dist/sdk/usage/ledger.d.ts +38 -0
  249. package/dist/sdk/usage/ledger.js +142 -0
  250. package/dist/sdk/usage/limits/adapters.d.ts +11 -0
  251. package/dist/sdk/usage/limits/adapters.js +349 -0
  252. package/dist/sdk/usage/limits/capture.d.ts +8 -0
  253. package/dist/sdk/usage/limits/capture.js +47 -0
  254. package/dist/sdk/usage/limits/http.d.ts +12 -0
  255. package/dist/sdk/usage/limits/http.js +51 -0
  256. package/dist/sdk/usage/limits/normalize.d.ts +15 -0
  257. package/dist/sdk/usage/limits/normalize.js +211 -0
  258. package/dist/sdk/usage/limits/service.d.ts +30 -0
  259. package/dist/sdk/usage/limits/service.js +176 -0
  260. package/dist/sdk/usage/limits/types.d.ts +65 -0
  261. package/dist/sdk/usage/limits/types.js +1 -0
  262. package/dist/sdk/usage/serverMethods.d.ts +3 -0
  263. package/dist/sdk/usage/serverMethods.js +22 -0
  264. package/dist/sdk/usage/service.d.ts +32 -0
  265. package/dist/sdk/usage/service.js +66 -0
  266. package/dist/sdk/usage/settings.d.ts +7 -0
  267. package/dist/sdk/usage/settings.js +28 -0
  268. package/dist/sdk/usage/types.d.ts +60 -0
  269. package/dist/sdk/usage/types.js +4 -0
  270. package/dist/sdk/web/part.d.ts +10 -0
  271. package/dist/sdk/web/part.js +6 -0
  272. package/dist/sdk/web/serverMethods.d.ts +3 -0
  273. package/dist/sdk/web/serverMethods.js +7 -0
  274. package/dist/sdk/wiki/serverMethods.d.ts +3 -0
  275. package/dist/sdk/wiki/serverMethods.js +26 -0
  276. package/dist/sdk/worktrees/cli.d.ts +11 -0
  277. package/dist/sdk/worktrees/cli.js +146 -0
  278. package/dist/sdk/worktrees/copy.d.ts +9 -0
  279. package/dist/sdk/worktrees/copy.js +111 -0
  280. package/dist/sdk/worktrees/git.d.ts +16 -0
  281. package/dist/sdk/worktrees/git.js +81 -0
  282. package/dist/sdk/worktrees/serverMethods.d.ts +3 -0
  283. package/dist/sdk/worktrees/serverMethods.js +30 -0
  284. package/dist/sdk/worktrees/service.d.ts +73 -0
  285. package/dist/sdk/worktrees/service.js +483 -0
  286. package/dist/sdk/worktrees/setup.d.ts +23 -0
  287. package/dist/sdk/worktrees/setup.js +65 -0
  288. package/dist/sdk/worktrees/types.d.ts +91 -0
  289. package/dist/sdk/worktrees/types.js +1 -0
  290. package/dist/sdk/world/cli.d.ts +2 -2
  291. package/dist/sdk/world/cli.js +6 -6
  292. package/dist/sdk/world/world.d.ts +3 -1
  293. package/dist/sdk/world/world.js +8 -9
  294. package/dist/terminal-opentui.js +16456 -5966
  295. package/dist/terminal-pi.js +1579 -573
  296. package/docs/README.md +22 -2
  297. package/docs/architecture/00-overview.md +28 -16
  298. package/docs/architecture/02-sessions-and-runs.md +184 -25
  299. package/docs/architecture/03-variants.md +10 -2
  300. package/docs/architecture/04-prompt.md +65 -7
  301. package/docs/architecture/06-plugins-and-capabilities.md +57 -4
  302. package/docs/architecture/07-tools-and-gate.md +112 -17
  303. package/docs/architecture/08-memory-and-history.md +4 -2
  304. package/docs/architecture/09-accounts-and-connectors.md +39 -1
  305. package/docs/architecture/10-server-protocol.md +168 -4
  306. package/docs/architecture/11-terminal.md +251 -8
  307. package/docs/architecture/12-storage.md +45 -3
  308. package/docs/architecture/13-world-tools.md +49 -6
  309. package/docs/architecture/14-surfaces-and-parity.md +136 -0
  310. package/docs/architecture/README.md +17 -4
  311. package/docs/architecture/proposals/PROP-0006-run-checklist.md +4 -2
  312. package/docs/architecture/proposals/PROP-0013-resource-browser.md +58 -0
  313. package/docs/architecture/proposals/PROP-0014-fullscreen-browser-tabs.md +58 -0
  314. package/docs/architecture/proposals/PROP-0015-one-capability-surface.md +88 -0
  315. package/docs/architecture/proposals/PROP-0016-managed-worktrees.md +156 -0
  316. package/docs/architecture/proposals/PROP-0017-page-annotations.md +131 -0
  317. package/docs/architecture/proposals/PROP-0018-annotation-queue-and-app-targets.md +179 -0
  318. package/docs/architecture/proposals/PROP-0019-contextual-side-questions.md +122 -0
  319. package/docs/architecture/proposals/PROP-0020-builtin-feature-plugins.md +105 -0
  320. package/docs/architecture/proposals/PROP-0021-command-namespaces-and-duplicates.md +99 -0
  321. package/docs/architecture/proposals/PROP-0022-plan-only-questions.md +102 -0
  322. package/docs/architecture/proposals/PROP-0023-xagent-cli-name.md +61 -0
  323. package/docs/architecture/proposals/PROP-0024-question-sketch-previews.md +130 -0
  324. package/docs/architecture/proposals/PROP-0025-contextual-question-wireframes.md +49 -0
  325. package/docs/architecture/proposals/PROP-0026-connected-sketch-display.md +94 -0
  326. package/docs/architecture/proposals/PROP-0027-xingular-agent-product-identity.md +60 -0
  327. package/docs/architecture/proposals/PROP-0028-normalize-question-wireframes.md +55 -0
  328. package/docs/architecture/proposals/PROP-0029-agent-profiles.md +124 -0
  329. package/docs/architecture/proposals/PROP-0030-subagent-title.md +86 -0
  330. package/docs/architecture/proposals/PROP-0031-plugin-command-owner-namespaces.md +54 -0
  331. package/docs/architecture/proposals/PROP-0032-planning-quality.md +196 -0
  332. package/docs/architecture/proposals/PROP-0033-compaction-plan-checkpoints.md +75 -0
  333. package/docs/architecture/proposals/PROP-0034-conversation-fast-mode.md +120 -0
  334. package/docs/architecture/proposals/PROP-0035-retain-subagent-status.md +47 -0
  335. package/docs/architecture/proposals/PROP-0036-first-class-harness-commands.md +59 -0
  336. package/docs/architecture/proposals/PROP-0037-workspace-write-boundary.md +63 -0
  337. package/docs/architecture/proposals/PROP-0038-annotate-open-shadow-roots.md +73 -0
  338. package/docs/architecture/proposals/PROP-0039-workspace-boundary-hardening.md +139 -0
  339. package/docs/architecture/proposals/PROP-0040-one-launch-path.md +87 -0
  340. package/docs/architecture/proposals/PROP-0041-bounded-work-slices.md +247 -0
  341. package/docs/architecture/proposals/PROP-0042-usage-and-provider-limits.md +127 -0
  342. package/docs/architecture/proposals/PROP-0043-read-only-plan-bash.md +74 -0
  343. package/docs/architecture/proposals/README.md +39 -0
  344. package/docs/decisions/ADR-0001-owned-terminal.md +1 -1
  345. package/docs/decisions/ADR-0009-xharness-command.md +6 -5
  346. package/docs/decisions/ADR-0014-public-release-baseline.md +3 -2
  347. package/docs/decisions/ADR-0015-resource-browser.md +28 -0
  348. package/docs/decisions/ADR-0016-fullscreen-browser-tabs.md +31 -0
  349. package/docs/decisions/ADR-0017-one-capability-surface.md +34 -0
  350. package/docs/decisions/ADR-0018-builtin-feature-plugins.md +35 -0
  351. package/docs/decisions/ADR-0019-managed-git-worktrees.md +31 -0
  352. package/docs/decisions/ADR-0020-page-annotations.md +37 -0
  353. package/docs/decisions/ADR-0021-required-command-namespaces.md +40 -0
  354. package/docs/decisions/ADR-0022-plan-only-question-tools.md +34 -0
  355. package/docs/decisions/ADR-0023-contextual-side-question-runs.md +35 -0
  356. package/docs/decisions/ADR-0024-xagent-command.md +40 -0
  357. package/docs/decisions/ADR-0025-question-choice-sketches.md +49 -0
  358. package/docs/decisions/ADR-0026-contextual-question-wireframes.md +58 -0
  359. package/docs/decisions/ADR-0027-connected-sketch-display.md +60 -0
  360. package/docs/decisions/ADR-0028-xingular-agent-product-identity.md +56 -0
  361. package/docs/decisions/ADR-0029-normalized-question-wireframe-borders.md +33 -0
  362. package/docs/decisions/ADR-0030-agent-profiles.md +43 -0
  363. package/docs/decisions/ADR-0031-plugin-command-owner-namespaces.md +37 -0
  364. package/docs/decisions/ADR-0032-compaction-run-checkpoints.md +33 -0
  365. package/docs/decisions/ADR-0033-plan-mode-research-delegation.md +47 -0
  366. package/docs/decisions/ADR-0034-first-class-harness-terminal-commands.md +25 -0
  367. package/docs/decisions/ADR-0035-one-launch-path.md +40 -0
  368. package/docs/decisions/ADR-0036-workspace-write-operation-boundary.md +54 -0
  369. package/docs/decisions/ADR-0037-usage-ledger-and-provider-limits.md +44 -0
  370. package/docs/decisions/ADR-0038-plan-bash-os-read-only.md +29 -0
  371. package/docs/doctor.md +10 -4
  372. package/docs/experiments/EXP-0003-performance-audit/data/session-runtime-replication.json +420 -0
  373. package/docs/experiments/EXP-0003-performance-audit/data/session-runtime.json +420 -0
  374. package/docs/experiments/EXP-0003-performance-audit/data/terminal-compact.json +376 -0
  375. package/docs/experiments/EXP-0003-performance-audit/data/terminal-history.json +422 -0
  376. package/docs/experiments/EXP-0003-performance-audit/data/terminal-question.json +95 -0
  377. package/docs/experiments/EXP-0003-performance-audit/data/terminal-wide.json +1036 -0
  378. package/docs/experiments/EXP-0003-performance-audit/plan.md +109 -0
  379. package/docs/experiments/EXP-0003-performance-audit/results.md +151 -0
  380. package/docs/features/README.md +26 -0
  381. package/docs/features/interfaces/README.md +1 -1
  382. package/docs/future-work.md +48 -0
  383. package/docs/handoff-2026-10-25-app-parity-and-solo-tabs.md +202 -0
  384. package/docs/parity.md +134 -0
  385. package/docs/releases/1.0.0.md +2 -2
  386. package/docs/releases/1.1.1.md +28 -0
  387. package/docs/releases/1.2.0.md +49 -0
  388. package/docs/releases/4.0.0.md +47 -0
  389. package/docs/releases/README.md +37 -27
  390. package/docs/study/00-index.md +8 -0
  391. package/docs/study/STUDY-0003-long-horizon-runs.md +210 -0
  392. package/docs/study/autonomous-engineering-sources.md +277 -0
  393. package/docs/study/autonomy-sources.md +147 -0
  394. package/docs/study/proactive-autonomy.md +408 -0
  395. package/docs/study/tui-resource-browser.md +78 -0
  396. package/docs/terminal-tui.md +386 -113
  397. package/package.json +6 -5
@@ -0,0 +1,277 @@
1
+ # Autonomous engineering: evidence from other harnesses
2
+
3
+ Companion evidence for [STUDY-0002: proactive autonomy and three feature ideas](proactive-autonomy.md).
4
+
5
+ Research date: 2026-10-23. Scope: autonomous software maintenance, recurring execution,
6
+ human-readable continuity, visual inspection, and the limits of product inference.
7
+ This is research evidence and design interpretation, not an accepted architecture change.
8
+
9
+ ## Finding
10
+
11
+ The strongest transferable pattern is a worker that repeatedly receives new evidence,
12
+ selects a concrete obligation, exercises the product, changes a branch, and leaves a
13
+ legible record for the next worker. The evidence supports automating that engineering
14
+ loop. It does not establish that a scheduler or a capable coding model can independently
15
+ discover which new feature customers need.
16
+
17
+ Three distinctions matter when comparing products:
18
+
19
+ 1. A scheduled prompt, a recoverable conversation, and a continuously available execution
20
+ service solve different problems.
21
+ 2. A screenshot, a browser interaction, and evidence that an edit fixed the correct source
22
+ component provide different levels of confidence.
23
+ 3. A working pull request, a justified product experiment, and an improved customer outcome
24
+ are different claims.
25
+
26
+ These distinctions are the researcher's synthesis of the cases below, rather than vendor
27
+ terminology or a benchmark result.
28
+
29
+ ## Evidence standard
30
+
31
+ **Documented capability** means the vendor or project documents the behavior; it was not
32
+ executed in this study. **Source observation** means the public implementation or README
33
+ was inspected. **Author-reported experiment** means the system's authors describe their
34
+ own run or evaluation. **Design inference** means a proposed lesson for this harness.
35
+ No model runs, production deployments, repository tests, or independent comparative
36
+ benchmarks were performed for this document.
37
+
38
+ ## 1. Anthropic: continuity artifacts and an evaluator that uses the application
39
+
40
+ **Author-reported experiment, November 2025.** Anthropic found that compaction alone did
41
+ not keep a coding agent coherent across many sessions. Its example used an initializer,
42
+ a startup script, Git history, a progress log, and a JSON feature list with explicit
43
+ acceptance steps and completion flags. A subsequent worker selected unfinished work,
44
+ verified basic behavior, implemented an increment, and handed off artifacts. Browser
45
+ interaction caught failures missed by unit checks or HTTP requests, although the
46
+ particular Puppeteer integration had blind spots such as native alert dialogs. These
47
+ are observations from Anthropic's harness experiments, not a general reliability rate.
48
+ [Source: effective harnesses, published 2025-11-26](https://www.anthropic.com/research/effective-harnesses-for-long-running-agents).
49
+
50
+ **Author-reported experiment, March 2026.** A later design separated planning, generation,
51
+ and evaluation. The evaluator exercised the running application with Playwright and
52
+ graded it against explicit criteria. One reported failure connected an unsuccessful
53
+ delete interaction to a condition in `LevelEditor.tsx:892`, demonstrating a useful
54
+ browser-to-source investigation. The author also found generous, superficial QA and
55
+ had to tune its judgment. With Opus 4.6, the author removed sprint scaffolding and moved
56
+ QA later; evaluation was valuable near the generator's capability limit and overhead
57
+ for easier tasks. An illustrative updated run took 3 hr 50 min and $124.70. These are
58
+ case studies and author-reported costs, not controlled evidence of general superiority.
59
+ [Source: harness design, published 2026-03-24](https://www.anthropic.com/research/harness-design-long-running-apps).
60
+
61
+ **Design inference.** Human readability belongs in the persisted work product: what was
62
+ observed, which obligation was chosen, what changed, what was verified, and what remains.
63
+ A separate critic is most useful when evidence is subjective or the change is difficult.
64
+ Making every tiny cleanup pass through a heavyweight planner and browser evaluator can
65
+ consume more time and money than the maintenance itself.
66
+
67
+ ## 2. Claude Code: maintenance becomes a default behavior, but scheduling has modes
68
+
69
+ **Documented capability, checked on the research date.** Claude Code's current `/loop`
70
+ can choose its own wakeup interval. Its default maintenance instructions continue
71
+ unfinished work, address the branch's PR, CI failures and conflicts, then do cleanup.
72
+ The documented scope excludes new initiatives, and irreversible actions must continue
73
+ existing authorization. A project can replace the default with `.claude/loop.md`.
74
+ Session cron runs while the process is active and idle, has no catch-up per missed tick,
75
+ and recurring tasks expire after seven days. Fixed cron tasks can be restored with
76
+ exceptions; self-paced loops are not restored. Cloud and Desktop scheduling are separate
77
+ options: cloud scheduling needs no open session or running laptop, while Desktop jobs
78
+ require the machine. Cloud tasks work from a fresh clone rather than local files.
79
+ [Source: scheduled tasks documentation](https://code.claude.com/docs/en/scheduled-tasks).
80
+
81
+ **Design inference.** A useful default work order can create the feeling that an agent
82
+ knows what to do next, without pretending it has an unlimited product mandate. Recovery
83
+ must belong to the execution system: a loop that only resumes while someone has an
84
+ interactive process open is not an unattended maintenance service. Seven-day expiry is
85
+ the current documented session behavior; older articles describing a three-day limit
86
+ should not be used as the current specification.
87
+
88
+ ## 3. OpenHands: scheduling and recoverable execution have explicit ownership
89
+
90
+ **Source observation.** OpenHands' Software Agent SDK owns conversations, workspaces,
91
+ events, tools and Agent Server execution. Its README explicitly assigns scheduling,
92
+ webhooks, run history and dispatch to a separate automation service. The automation
93
+ README also assigns sandbox lifecycle orchestration to that service and labels it beta.
94
+ This is an architectural precedent for separating *when work should happen* from
95
+ *executing an agent conversation*.
96
+ [SDK README](https://github.com/OpenHands/software-agent-sdk/blob/main/README.md),
97
+ [automation README](https://github.com/OpenHands/automation/blob/main/README.md).
98
+
99
+ **Source observation.** The automation scheduler polls persistent definitions and creates
100
+ pending runs. The inspected implementation uses PostgreSQL row locks with
101
+ `FOR UPDATE SKIP LOCKED`; its SQLite path assumes a single process. Dispatch is a separate
102
+ poller, and completion is reported asynchronously by the execution environment. The
103
+ inspected dispatcher distinguishes retryable HTTP statuses from permanent errors.
104
+ These details demonstrate queueing and failure handling; they do not prove exactly-once
105
+ execution of arbitrary external side effects.
106
+ [Scheduler source](https://github.com/OpenHands/automation/blob/main/openhands/automation/scheduler.py),
107
+ [dispatcher source](https://github.com/OpenHands/automation/blob/main/openhands/automation/dispatcher.py).
108
+
109
+ **Documented capability.** SDK persistence stores configuration and runtime status in
110
+ `base_state.json` and individual conversation events under `events/`. The same
111
+ conversation ID and persistence directory can restore a conversation for another run.
112
+ Separately, metrics expose per-LLM token usage, costs and latency, with conversation
113
+ aggregation that includes auxiliary LLMs such as a context condenser.
114
+ [Persistence guide](https://docs.openhands.dev/sdk/guides/convo-persistence),
115
+ [metrics guide](https://docs.openhands.dev/sdk/guides/metrics).
116
+
117
+ **Design inference.** A cron definition should create a durable work request that has
118
+ its own identity and lifecycle. A human-readable narrative should be derived from
119
+ those facts. Saving messages alone is not enough to decide whether a failed deployment
120
+ was retried, whether a run still owns a branch, or whether a successful tool call was
121
+ already applied before a worker crashed. Cost accounting must include scouting and
122
+ evaluation, not only the worker that edits code.
123
+
124
+ ## 4. SWE-agent and mini-swe-agent: evidence against unnecessary harness machinery
125
+
126
+ **Author-reported benchmark.** The original SWE-agent paper studies how the interface
127
+ given to an agent affects repository navigation, editing and tool execution. It reports
128
+ 12.5% pass@1 on SWE-bench and 87.7% on HumanEvalFix in its 2024 setup. These historical
129
+ figures establish a scoped research result; they do not describe current model quality,
130
+ an autonomous product manager, or long-running production maintenance.
131
+ [Paper, revised 2024-11-11](https://arxiv.org/abs/2405.15793v3).
132
+
133
+ **Source observation.** The SWE-agent README now recommends mini-swe-agent as its default
134
+ successor. mini-swe-agent's README describes a simple agent with bash actions, a linear
135
+ message history, independent subprocess execution, configurable local or sandbox
136
+ environments, and a trajectory browser. Its current README advertises a verified-benchmark
137
+ score above 74%; this study did not reproduce that claim or equate it to the original
138
+ paper's different benchmark setting.
139
+ [SWE-agent README](https://github.com/SWE-agent/SWE-agent/blob/main/README.md),
140
+ [mini-swe-agent README](https://github.com/SWE-agent/mini-swe-agent/blob/main/README.md).
141
+
142
+ **Design inference.** Durable execution and good evidence do not require a large society
143
+ of agents. Keep a small worker loop and add structure where observed failures require
144
+ it. A useful trajectory is both a debugging aid and training evidence for improving
145
+ future task selection. Benchmark issue repair supplies the problem statement; it does
146
+ not test whether the agent chose the right problem to solve without a human.
147
+
148
+ ## 5. Cursor and Copilot: unattended work increasingly arrives with review artifacts
149
+
150
+ **Documented capability: Cursor.** Cursor Automations supports schedules and external
151
+ events, configurable tools, repository or multiple-repository work, and PR creation.
152
+ Scheduled starts may be delayed. Persistent notes can be viewed and edited outside the
153
+ worker filesystem, and computer use is included for automations. Cursor explicitly warns
154
+ that untrusted input can influence memories and thereby later runs. An automation with
155
+ no repository does not clone code and cannot edit code or open PRs.
156
+ [Source: Automations](https://cursor.com/docs/cloud-agent/automations).
157
+
158
+ Cloud agents have isolated desktop VMs and can exercise software, then attach screenshots,
159
+ videos and log references. Cursor documents that artifacts embedded in GitHub PR
160
+ descriptions use unauthenticated, unguessable URLs. Screenshots make changes reviewable,
161
+ but their storage and publication are also deliberate product decisions.
162
+ [Source: capabilities](https://cursor.com/docs/cloud-agent/capabilities).
163
+
164
+ **Documented capability: Copilot.** GitHub's application card describes asynchronous
165
+ cloud execution in ephemeral environments, branch and PR creation, iteration from
166
+ feedback, and automated security scanning. It also documents missed defects, false
167
+ positives and potentially incorrect suggestions. GitHub's browser announcement describes
168
+ Playwright MCP for reproducing and validating web-app bugs and sharing screenshots in PRs.
169
+ [Application card](https://docs.github.com/en/copilot/responsible-use/agents),
170
+ [browser announcement, 2025-07-02](https://github.blog/changelog/2025-07-02-copilot-coding-agent-now-has-its-own-web-browser/).
171
+
172
+ VS Code's current browser guide describes a loop using page content, screenshots,
173
+ console errors and interaction results. Human-selected element context can include HTML
174
+ and CSS. The guide distinguishes isolated agent-opened pages from explicitly shared,
175
+ authenticated pages. This describes VS Code's tools; it is not a claim that every
176
+ Copilot cloud session exposes the identical integration.
177
+ [Source: VS Code browser tools, page dated 2026-10-21](https://code.visualstudio.com/docs/agents/run/browser-tools).
178
+
179
+ **Design inference.** The novel opportunity is the quality of the autonomous judgment
180
+ and the explanation it leaves. Cron, browser control and PR creation are already
181
+ established features. A compelling harness should explain why it chose this change,
182
+ show the failed journey, link the source ownership, and expose the resulting behavior.
183
+
184
+ ## What “knows where to fix the UI” should mean
185
+
186
+ The following is a proposed evidence chain, informed by the browser cases above:
187
+
188
+ | Step | Evidence the worker should preserve | What it establishes |
189
+ |---|---|---|
190
+ | Observe | Route, viewport, interaction trace, screenshot and console output | A specific condition was seen |
191
+ | Reproduce | A repeatable journey and its expected result | The suspected issue can be exercised |
192
+ | Locate | Component or handler, source revision and explanation of ownership | A plausible causal source exists |
193
+ | Change | Patch, branch and a statement of intended behavior | The intervention is inspectable |
194
+ | Recheck | The same journey before and after, plus relevant neighboring behavior | The intervention changed observed behavior |
195
+ | Learn | User correction or measured post-release outcome | The repair helped outside the agent's imagined task |
196
+
197
+ The first five steps can often operate against a development environment. The sixth
198
+ requires information from real usage or a human. A screenshot cannot by itself prove
199
+ which source file owns an element, and fixing one click path does not establish that
200
+ every customer path works. Framework metadata, source maps, route manifests and code
201
+ search are candidate techniques for source ownership, proposed here rather than claimed
202
+ as a universal capability of the surveyed products.
203
+
204
+ ## What “knows where to clean up” should mean
205
+
206
+ These are design judgments, not comparative benchmark findings:
207
+
208
+ - Prefer an observed maintenance obligation: a failing check, repeated exception, unused
209
+ export supported by repository analysis, duplicated implementation with clear ownership,
210
+ or a broken journey.
211
+ - For an apparent dead module, examine dynamic loading, scripts, plugins, generated
212
+ references and public package entry points before treating absence of ordinary imports
213
+ as evidence of non-use.
214
+ - Preserve a compact explanation: what made the code suspect, why the behavior should
215
+ remain equivalent, what was exercised, and how the change can be reverted.
216
+ - Treat a cleaner-looking diff as a hypothesis. A refactor that increases abstraction or
217
+ churn while changing no user outcome may be a poor use of the next unattended run.
218
+
219
+ Cleanup confidence should come from converging evidence, rather than a model's confidence
220
+ adjective. The failure mode is an endless sequence of plausible edits that produces
221
+ activity without making the software easier to maintain.
222
+
223
+ ## What “suggests features from analytics” needs beyond an agent runtime
224
+
225
+ The surveyed execution and browser capabilities provide tools for investigating product
226
+ questions. They do not supply this application's success definition. The following input
227
+ contract is a design inference:
228
+
229
+ | Input | Why feature invention needs it |
230
+ |---|---|
231
+ | Declared product direction and excluded work | Prevents successful optimization of the wrong objective |
232
+ | Journey events with stable definitions | Shows what users attempted, completed or abandoned |
233
+ | Errors linked to application revision and journey | Distinguishes product friction from release failures |
234
+ | Qualitative feedback and customer segment | Gives context for ambiguous behavior and conflicting needs |
235
+ | Baselines, experiment assignment and outcome windows | Makes a claimed improvement assessable |
236
+ | A permitted intervention scope | Defines where an agent may spend its own initiative |
237
+
238
+ A feature idea should state the observed signal, the user problem it suggests, an
239
+ alternative explanation, the proposed intervention, and an outcome that could prove the
240
+ idea wrong. Low usage alone is insufficient to justify deleting a capability: it may
241
+ serve a rare but essential workflow. Likewise, an apparent funnel improvement is not
242
+ automatically causal if releases, traffic composition or instrumentation also changed.
243
+
244
+ ## Where to trade safety for more autonomous behavior
245
+
246
+ The requested adventurous direction can be made explicit as product choices. These are
247
+ proposed tradeoffs, not features already implemented in this harness:
248
+
249
+ | Autonomy granted | What becomes more exciting | What the owner accepts |
250
+ |---|---|---|
251
+ | Let the worker choose an unassigned maintenance obligation | Useful work appears without a task queue curated by a person | Some work will be low value or based on a false diagnosis |
252
+ | Let it change presentation and interaction details in a preview | The agent can discover and demonstrate a better experience | Taste can drift and previews may include failed experiments |
253
+ | Let it prepare its own feature experiment from usage evidence | The harness can behave like an opinionated product collaborator | Analytics can be misread and an experiment can worsen its target metric |
254
+
255
+ The interesting freedom is initiative within an understandable operating agreement.
256
+ None of the research establishes that disabling account isolation, erasing the tool gate,
257
+ or allowing refinement to act externally improves autonomous product judgment. Those
258
+ would be separate architecture changes rather than a prerequisite for these ideas.
259
+
260
+ ## Source trace
261
+
262
+ All URLs were accessed on 2026-10-23. Public documentation can change. GitHub reads used
263
+ the connected GitHub tool. Inspected file blob SHAs, recorded for source identification:
264
+
265
+ | Repository and file | Blob SHA |
266
+ |---|---|
267
+ | `OpenHands/software-agent-sdk/README.md` | `386dc8945133cb51969192b0b29c8396719cbff6` |
268
+ | `OpenHands/automation/README.md` | `eb02e7d60fa72a9cd4207ca8841d37b675094643` |
269
+ | `OpenHands/automation/openhands/automation/scheduler.py` | `d9c17e3f6bc8a6942ff82d7b1c437fe553c31842` |
270
+ | `OpenHands/automation/openhands/automation/dispatcher.py` | `18d3f583e7f67a0fae0cde23d4ec447522c6a618` |
271
+ | `SWE-agent/SWE-agent/README.md` | `e241ede47c338b69eb13cbc5423047e1edf1d50f` |
272
+ | `SWE-agent/mini-swe-agent/README.md` | `7db1d82dfa92eaa00adeb10c8681677a9e6ec639` |
273
+
274
+ Blob SHAs identify the retrieved file contents; they are not repository commit SHAs.
275
+ The OpenHands scheduler and dispatcher observations above are limited to the retrieved
276
+ opening portions of those files (through lines 250 and 240 respectively), rather than
277
+ an audit of every backend, retry path or production deployment.
@@ -0,0 +1,147 @@
1
+ # Proactive autonomy precedents: OpenClaw, Paperclip, and Letta
2
+
3
+ Companion evidence for [STUDY-0002: proactive autonomy and three feature ideas](proactive-autonomy.md).
4
+
5
+ Research date: **2026-10-23**. Status: external evidence and design interpretation; this document changes no Harness contract or runtime behavior.
6
+
7
+ The useful combination is a readable mandate, a durable wake mechanism, explicit work ownership, and memory that improves between conversations. Scheduling alone supplies none of the judgment needed to identify valuable work. The three systems below implement different parts of that combination; their documentation and source establish mechanisms, not evidence that an unattended agent consistently improves a real product.
8
+
9
+ ## Evidence and version boundaries
10
+
11
+ Official documentation, upstream code, and original research were inspected. Source links are pinned to these upstream snapshots where possible:
12
+
13
+ | System | Snapshot inspected | What the evidence establishes |
14
+ |---|---|---|
15
+ | OpenClaw | [`42c0d5a8`](https://github.com/openclaw/openclaw/commit/42c0d5a8f9d00e113c48090c3d259977e67b5b5a), 2026-10-22 | Automation, prospective memory, and consolidation contracts; selected implementation checks |
16
+ | Paperclip | [`def4726b`](https://github.com/paperclipai/paperclip/commit/def4726bea0e3b340457100038d80ca55c2b7d4f), 2026-10-22 | Routine dispatch, ownership protocol, accounting controls, and suppression logic |
17
+ | Letta Code | [`035bb8c8`](https://github.com/letta-ai/letta-code/commit/035bb8c8917b5dd94a3989d4adf04860a2ce8fea), 2026-10-22 | Reflection triggers, memory editing instructions, merge behavior, and retry controls |
18
+
19
+ Two freshness traps matter. OpenClaw's [fetched live heartbeat page](https://docs.openclaw.ai/heartbeat) described a system-owned monitor, while repository HEAD documents its migration into ordinary automation jobs. Paperclip's [live routine guide](https://docs.paperclip.ing/guides/projects-workflow/routines/) described coalescing as a queued follow-up, while its API reference and dispatch implementation finalize the incoming occurrence against existing work without creating another issue. This note uses the pinned source for those disputed details. [OpenClaw migration][o1], [Paperclip API][p2], [Paperclip dispatch][p3]
20
+
21
+ ## OpenClaw: make recurring work inspectable
22
+
23
+ ### Current direction: ordinary jobs replace a special heartbeat mechanism
24
+
25
+ At the inspected revision, legacy heartbeat monitors become editable automation jobs with schedules, prompts, scratch context, policies, and run history. Migration preserves identity and history and verifies the destination before retiring old configuration. Runtime no longer interprets `HEARTBEAT.md` or scratch `tasks:` blocks as schedules. Initial setup provisions one owner-associated proactive check; deleting it is lasting because a provisioning receipt prevents its recreation. The worker implementation performs receipt inspection and job creation in a state transaction. [Migration and setup][o1], [`default-proactive-job.worker.ts:20`][o2]
26
+
27
+ **Interpretation:** an appealing Markdown checklist can express intent, but a machine-owned occurrence record should decide what is due. A self-editing checklist that also acts as the scheduler makes deleted tasks, concurrent edits, and restart behavior ambiguous. OpenClaw's evolution offers a stronger precedent than copying an old `HEARTBEAT.md` example.
28
+
29
+ ### Keep the mandate readable; make updates and silence structured
30
+
31
+ Each job can retain private scratch context. Scratch updates require revision comparison; an agent rereads and reconciles a conflicting revision. During a scheduled turn, scratch and result actions are restricted to the current job. Scratch is prompt context, so its private storage does not make it an appropriate secret store. [Scratch contract][o3]
32
+
33
+ The model can produce no outward message while recording an outcome such as `no_change`, `progress`, `done`, `blocked`, or `needs_attention`. A quiet outcome stays in run history and bounded session context. Silence does not erase execution failure. Explicitly empty scratch can suppress a run when that policy is enabled; absent scratch has different semantics. These are small distinctions with large consequences for an unattended system's readability. [Scratch and quiet results][o3]
34
+
35
+ **Interpretation:** provide a compact human view of “what I care about” and a separate machine record of “what happened.” Show consequential changes and blocked work; let routine all-clear checks remain quiet but inspectable. Preserve the difference between a quiet success, a deliberate skip, and an error.
36
+
37
+ ### Durable scheduling requires recovery rules, not merely persistence
38
+
39
+ OpenClaw documents persisted job definitions, runtime state, and history in shared SQLite state; its Gateway process must be running for schedules to fire. Startup reschedules overdue agent work rather than executing it during initialization, and the worker coalesces missed ticks. Execution and primary-delivery outcomes are persisted together before subsequent notification work. A terminal result recovers by exact run identity without replaying execution or delivery. [Runtime and recovery][o4]
40
+
41
+ For an interrupted, unchanged timed agent job before delivery, recovery permits one fresh attempt and asks the agent to reconcile prior effects. The documentation explicitly excludes an exactly-once guarantee for arbitrary interrupted tool effects. Unknown or possible delivery, command/script payloads, and event schedules have different replay rules. This is a useful honesty boundary: a durable scheduler cannot infer whether an external write succeeded just before a crash. [Run reconciliation][o4]
42
+
43
+ Policies support idle-only admission and timezone-aware active hours. The inspected migration also removes earlier heartbeat-specific duplicate suppression and no-route skipping. New designs should therefore state their own deduplication and delivery semantics rather than assuming a heartbeat label provides them. [Monitoring policies][o5], [Migration behavior][o1]
44
+
45
+ ### Future intent is not all the same kind of state
46
+
47
+ OpenClaw distinguishes clock work, event-conditioned intent, and aspirations kept in readable notes with review dates. Standing intents live in agent SQLite state and are matched before eligible interactive replies using a keyword prefilter and authoritative scope, expiry, cooldown, and fire-budget checks. Matching does not call a model. Default cooldown, fire count, and expiry bound repeated reminders. Cancellation is explicit durable state. These intents react to eligible incoming turns; they are not independent background event monitors. [Standing intents][o6]
48
+
49
+ Its memory system additionally separates dated working notes, curated durable knowledge, and a human Dream Diary. Dreaming applies evidence and provenance gates before consolidation; the model chooses operations while a writer constructs grounded entries. Untrusted and system-derived candidates are excluded from promotion. Prior memory is backed up, and the diary records additions, merges, and supersessions; the diary itself is not promoted as evidence. [Memory organization][o7], [Consolidation and diary][o8]
50
+
51
+ **Interpretation:** track “when to act,” “what I believe,” and “what I learned” separately. Otherwise generated reports become their own evidence and stale intentions keep reappearing.
52
+
53
+ ## Paperclip: organize autonomy around owned work
54
+
55
+ ### Goals provide direction; assigned tasks select execution
56
+
57
+ Paperclip models organizations, goals, agents, projects, and issues. Its core concepts describe a goal-to-task hierarchy and atomic task checkout, with a conflict preventing two agents from owning the same issue. The current agent skill is stricter than a free-roaming assistant: it selects assigned work, prioritizes existing work before new todo items, skips blocked tasks without new context, and exits if nothing is assigned. A scoped wake can bypass general inbox discovery. [Core concepts][p1], [`SKILL.md:94`][p4]
58
+
59
+ This matters for the user's “knows what to do next” request: Paperclip demonstrates a durable work queue and allocation protocol. It does **not** establish that any worker should invent unbounded new work whenever idle. Autonomous opportunity discovery would require a separate product-level mandate, candidate selection process, and resource policy. That is a proposed extension, not an observed property of the worker protocol.
60
+
61
+ The skill asks for compact incremental context rather than full thread replay. A blocked-status comment without subsequent replies suppresses another checkout or comment. Progress should identify what changed and the next owner, and waiting for a human uses a saved interaction that can wake the assignee later. A prose claim that a watcher exists is insufficient: an actual scheduled continuation must exist. [Heartbeat procedure][p4]
62
+
63
+ ### A routine creates accountable work with explicit overlap behavior
64
+
65
+ Routine definitions contain a readable title and description, assignee, project, optional goal, priority, triggers, and policies. They support schedule, webhook, and API activation, execution history, definition revisions, and optional revision checks on updates. Agents can manage routines assigned to themselves, while assignment to another agent is an operator capability. Webhook requests can use stable idempotency keys; acceptance means queued asynchronous work, not completion. [Routine API][p2]
66
+
67
+ At the inspected revision, `coalesce_if_active` finalizes the incoming occurrence as coalesced and links it to existing active execution; `skip_if_active` records a skip; `always_enqueue` creates separate work. The implementation checks for existing execution and handles the corresponding uniqueness conflict before creating and linking a new issue to an assignment wake. Catch-up is bounded, with an internal limit of 25; the scheduler has additional behavior for subhourly schedules. [Dispatch implementation][p3]
68
+
69
+ **Interpretation:** decide whether a missed tick represents discarded work, merged observation, or a required follow-up. Those are different semantics. A maintenance scan usually does not deserve a backlog entry for every missed hour.
70
+
71
+ ### Suppress work that feeds on its own bookkeeping
72
+
73
+ Paperclip's activity gate can require external activity since the last dispatched non-skipped occurrence. It excludes the routine's own execution issues, its scheduler bookkeeping, and read/archive activity, while work by other agents on delegated tasks counts as external input. Quiet skipped occurrences do not advance the observation window. This supports a watcher that runs while genuine work continues and becomes cheap when the environment settles. [Activity-gated runs][p5]
74
+
75
+ Source also implements an independent no-progress wake throttle: after two consecutive successful runs without issue-visible progress, eligible empty wakes receive a two-minute cooldown that doubles up to thirty minutes. Fresh input, human comment wakes, and explicit operator resumption bypass it; agent-authored comment wakes remain throttled. Failures break the successful-no-progress streak so recovery is not mistaken for redundant polling. [Wake throttle implementation][p6]
76
+
77
+ **Interpretation:** durable “no new evidence” state is as valuable as a task queue. Otherwise one autonomous agent's status comment can become another agent's reason to run, producing activity without useful progress.
78
+
79
+ ### Budgets must account for unfinished work
80
+
81
+ The inspected accounting source evaluates policies across organization, agent, and project scopes. It distinguishes recorded spend, held reservations, pending work, and unpriced usage, with policy-dependent blocking. Admission rechecks a held reservation before provider dispatch; budget enforcement pauses applicable scope and schedules cancellation through a durable path. This is more substantial than logging costs after a cron run completes. These are source-level controls, not a measurement that real provider spend can never overshoot a limit. [Budget admission and enforcement][p7]
82
+
83
+ **Interpretation:** a system allowed to discover its own work needs a resource envelope for discovery as well as implementation. Concurrent agents can exhaust a budget before any completed run reports a bill.
84
+
85
+ ## Letta: improve future work during idle periods
86
+
87
+ ### Use the current filesystem model, with historical sleep-time work as context
88
+
89
+ The 2025 sleep-time architecture used a primary agent and a separate memory editor. Letta's later first-party roadmap explicitly moves away from server memory tools and server-side sleep-time agents toward filesystem operations, context repositories, and runtime subagents. Current documentation describes MemFS as Markdown memory in an agent-owned Git repository. Root memories enter active context; deeper indexed directories can be read when needed. Memory subagents use worktrees to avoid blocking the foreground agent. [Historical design][l1], [Migration direction][l2], [Current MemFS][l3]
90
+
91
+ Current dreaming reviews recent conversations, extracts lessons, and updates memory. It can trigger after completed steps or compaction. The optional agent-review stage is another background conversation that can revise proposed edits; it consumes more tokens and does not require human approval. These are event/step triggers, not evidence of an always-running wall-clock daemon. Local schedules also require an active Letta session, whereas cloud schedules run in the managed environment. [Dream settings][l4], [Schedule execution targets][l5]
92
+
93
+ ### Autonomous learning already includes editing procedures
94
+
95
+ The inspected reflection prompt prioritizes mistakes and corrections, preferences, durable facts, contradictions, and reusable workflows. It directs the agent to skip ephemeral or duplicate material, prefer existing procedures, limit skill changes, make no commit when nothing survives, and report exact memory changes and issues. It permits autonomous memory and skill edits within the memory directory, with a commit recording why. This is implemented instruction, not evidence that every learned rule improves later performance. [`reflection-v2.md:27`][l6]
96
+
97
+ The launcher prevents overlapping reflection for the same agent, skips empty transcript work, and suppresses automatic retries for invalid model configuration. Worktree integration handles dirty parent state and conflicts explicitly. Failed integration has exponential retry delay from one to thirty minutes and notification deduplication; that retry state is process-local and resets on restart. [Launcher][l7], [Worktree integration][l8], [Retry implementation][l9]
98
+
99
+ **Interpretation:** the bold precedent is letting experience edit future procedure without a human approving each memory diff. Git history makes those changes reviewable and reversible. It does not make them correct, authorize unrelated source edits, or justify letting a background learner rewrite its own resource and permission limits.
100
+
101
+ ## What has actually been measured
102
+
103
+ The original sleep-time paper reports roughly five times less test-time compute at comparable accuracy on its stateful math variants, and amortized savings across related queries. Its software case study uses only 33 feature examples from two repositories and evaluates overlap with ground-truth modified files, not implementation correctness. Predictable future queries benefit more; the paper acknowledges the simplified split between preparation and later queries. These results motivate reusable preparation and memory, but do not establish reliable autonomous UI repair, product prioritization, or profitability. [Original paper, Sections 5–7 and Appendix D][r1]
104
+
105
+ TriggerBench finds proactive recall can degrade with longer context even when explicitly queried recall remains strong; enhanced reasoning can produce an excessive-reminder strategy. ProEvent evaluates synthetic ongoing chats and finds overaction and cancellation failures across tested systems. These benchmarks justify measuring missed opportunities **and** false actions, timing, cancellation, and cost. Their environments differ from this Harness; the findings are directional evidence rather than predicted local failure rates. [TriggerBench][r2], [ProEvent][r3]
106
+
107
+ ## Design consequences for this research
108
+
109
+ The following are inferences from the precedents, not existing Harness features:
110
+
111
+ | Capability | Grounded precedent | Deliberate autonomy trade |
112
+ |---|---|---|
113
+ | Scheduled self-directed work | OpenClaw jobs plus Paperclip owned issues, activity gates, and budgets | Let the agent rank and start bounded local work from a standing mandate without a fresh human prompt |
114
+ | Human-readable operating intent | Readable routine descriptions, scratch, explicit standing intents, and outcome diaries | Let the agent revise working plans while preserving owner intent and an inspectable change history |
115
+ | Learning between sessions | Letta reflection, versioned memory, procedure edits, and optional agent review | Automatically apply learned procedures or candidate improvements while keeping changes attributable and reversible |
116
+
117
+ The novel opportunity is combining those mechanisms with real product evidence and a human-readable explanation of why the next action was selected. The studied sources do not establish an end-to-end system that identifies a product's highest-value UI defect from analytics, repairs it correctly, and invents a desirable feature without supervision. That remains a hypothesis requiring local evaluation.
118
+
119
+ The most informative first evaluation would replay real work episodes with known useful actions and explicit “do nothing” cases. Record whether the right work was chosen, duplicate or canceled work was suppressed, artifacts stayed reviewable, and spending matched value. A system that runs frequently while producing low-value changes has not demonstrated useful autonomy.
120
+
121
+ [o1]: https://github.com/openclaw/openclaw/blob/42c0d5a8f9d00e113c48090c3d259977e67b5b5a/docs/gateway/heartbeat.md#L27
122
+ [o2]: https://github.com/openclaw/openclaw/blob/42c0d5a8f9d00e113c48090c3d259977e67b5b5a/src/cron/default-proactive-job.worker.ts#L20
123
+ [o3]: https://github.com/openclaw/openclaw/blob/42c0d5a8f9d00e113c48090c3d259977e67b5b5a/docs/automation/cron-jobs/payloads.md#L268
124
+ [o4]: https://github.com/openclaw/openclaw/blob/42c0d5a8f9d00e113c48090c3d259977e67b5b5a/docs/automation/cron-jobs/how-it-works.md#L14
125
+ [o5]: https://github.com/openclaw/openclaw/blob/42c0d5a8f9d00e113c48090c3d259977e67b5b5a/docs/automation/cron-jobs/schedules.md#L61
126
+ [o6]: https://github.com/openclaw/openclaw/blob/42c0d5a8f9d00e113c48090c3d259977e67b5b5a/docs/concepts/standing-intents.md#L14
127
+ [o7]: https://github.com/openclaw/openclaw/blob/42c0d5a8f9d00e113c48090c3d259977e67b5b5a/docs/concepts/memory.md
128
+ [o8]: https://github.com/openclaw/openclaw/blob/42c0d5a8f9d00e113c48090c3d259977e67b5b5a/docs/concepts/dreaming.md#L106
129
+ [p1]: https://github.com/paperclipai/paperclip/blob/def4726bea0e3b340457100038d80ca55c2b7d4f/docs/start/core-concepts.md
130
+ [p2]: https://github.com/paperclipai/paperclip/blob/def4726bea0e3b340457100038d80ca55c2b7d4f/docs/api/routines.md
131
+ [p3]: https://github.com/paperclipai/paperclip/blob/def4726bea0e3b340457100038d80ca55c2b7d4f/server/src/services/routines.ts#L1859
132
+ [p4]: https://github.com/paperclipai/paperclip/blob/def4726bea0e3b340457100038d80ca55c2b7d4f/skills/paperclip/SKILL.md#L94
133
+ [p5]: https://github.com/paperclipai/paperclip/blob/def4726bea0e3b340457100038d80ca55c2b7d4f/skills/paperclip/references/routines.md#L87
134
+ [p6]: https://github.com/paperclipai/paperclip/blob/def4726bea0e3b340457100038d80ca55c2b7d4f/server/src/services/issue-rewake-throttle.ts
135
+ [p7]: https://github.com/paperclipai/paperclip/blob/def4726bea0e3b340457100038d80ca55c2b7d4f/server/src/services/budgets.ts
136
+ [l1]: https://www.letta.com/blog/sleep-time-compute/
137
+ [l2]: https://www.letta.com/blog/our-next-phase/
138
+ [l3]: https://docs.letta.com/concepts/memfs
139
+ [l4]: https://docs.letta.com/configuration/memory
140
+ [l5]: https://docs.letta.com/configuration/schedules
141
+ [l6]: https://github.com/letta-ai/letta-code/blob/035bb8c8917b5dd94a3989d4adf04860a2ce8fea/src/agent/subagents/builtin/reflection-v2.md#L27
142
+ [l7]: https://github.com/letta-ai/letta-code/blob/035bb8c8917b5dd94a3989d4adf04860a2ce8fea/src/cli/helpers/reflection-launcher.ts
143
+ [l8]: https://github.com/letta-ai/letta-code/blob/035bb8c8917b5dd94a3989d4adf04860a2ce8fea/src/agent/memory-worktree.ts#L363
144
+ [l9]: https://github.com/letta-ai/letta-code/blob/035bb8c8917b5dd94a3989d4adf04860a2ce8fea/src/cli/helpers/reflection-retry.ts
145
+ [r1]: https://arxiv.org/html/2504.13171v1
146
+ [r2]: https://arxiv.org/abs/2606.23459
147
+ [r3]: https://arxiv.org/abs/2607.17701