@mobrienv/autoloop 0.4.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (440) hide show
  1. package/README.md +40 -14
  2. package/bin/autoloop +1 -1
  3. package/dist/index.d.ts +6 -0
  4. package/dist/index.js +19 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/testing/mock-backend.js +3 -5
  7. package/dist/testing/mock-backend.js.map +1 -1
  8. package/package.json +30 -23
  9. package/plugins/autoloop/.claude-plugin/plugin.json +1 -1
  10. package/dist/agent-map.d.ts +0 -10
  11. package/dist/agent-map.js +0 -58
  12. package/dist/agent-map.js.map +0 -1
  13. package/dist/backend/acp-client.d.ts +0 -38
  14. package/dist/backend/acp-client.js +0 -293
  15. package/dist/backend/acp-client.js.map +0 -1
  16. package/dist/backend/index.d.ts +0 -10
  17. package/dist/backend/index.js +0 -71
  18. package/dist/backend/index.js.map +0 -1
  19. package/dist/backend/kiro-bridge.d.ts +0 -19
  20. package/dist/backend/kiro-bridge.js +0 -114
  21. package/dist/backend/kiro-bridge.js.map +0 -1
  22. package/dist/backend/kiro-worker.d.ts +0 -1
  23. package/dist/backend/kiro-worker.js +0 -96
  24. package/dist/backend/kiro-worker.js.map +0 -1
  25. package/dist/backend/run-command.d.ts +0 -7
  26. package/dist/backend/run-command.js +0 -50
  27. package/dist/backend/run-command.js.map +0 -1
  28. package/dist/backend/run-kiro.d.ts +0 -3
  29. package/dist/backend/run-kiro.js +0 -16
  30. package/dist/backend/run-kiro.js.map +0 -1
  31. package/dist/backend/run-mock.d.ts +0 -1
  32. package/dist/backend/run-mock.js +0 -6
  33. package/dist/backend/run-mock.js.map +0 -1
  34. package/dist/backend/run-pi.d.ts +0 -5
  35. package/dist/backend/run-pi.js +0 -5
  36. package/dist/backend/run-pi.js.map +0 -1
  37. package/dist/backend/types.d.ts +0 -21
  38. package/dist/backend/types.js +0 -2
  39. package/dist/backend/types.js.map +0 -1
  40. package/dist/chains/budget.d.ts +0 -7
  41. package/dist/chains/budget.js +0 -54
  42. package/dist/chains/budget.js.map +0 -1
  43. package/dist/chains/load.d.ts +0 -18
  44. package/dist/chains/load.js +0 -129
  45. package/dist/chains/load.js.map +0 -1
  46. package/dist/chains/render.d.ts +0 -2
  47. package/dist/chains/render.js +0 -74
  48. package/dist/chains/render.js.map +0 -1
  49. package/dist/chains/run.d.ts +0 -17
  50. package/dist/chains/run.js +0 -260
  51. package/dist/chains/run.js.map +0 -1
  52. package/dist/chains/types.d.ts +0 -38
  53. package/dist/chains/types.js +0 -2
  54. package/dist/chains/types.js.map +0 -1
  55. package/dist/chains.d.ts +0 -6
  56. package/dist/chains.js +0 -5
  57. package/dist/chains.js.map +0 -1
  58. package/dist/cli/color.d.ts +0 -6
  59. package/dist/cli/color.js +0 -40
  60. package/dist/cli/color.js.map +0 -1
  61. package/dist/commands/chain.d.ts +0 -1
  62. package/dist/commands/chain.js +0 -53
  63. package/dist/commands/chain.js.map +0 -1
  64. package/dist/commands/config.d.ts +0 -1
  65. package/dist/commands/config.js +0 -74
  66. package/dist/commands/config.js.map +0 -1
  67. package/dist/commands/dashboard.d.ts +0 -1
  68. package/dist/commands/dashboard.js +0 -68
  69. package/dist/commands/dashboard.js.map +0 -1
  70. package/dist/commands/guide.d.ts +0 -1
  71. package/dist/commands/guide.js +0 -33
  72. package/dist/commands/guide.js.map +0 -1
  73. package/dist/commands/inspect.d.ts +0 -1
  74. package/dist/commands/inspect.js +0 -243
  75. package/dist/commands/inspect.js.map +0 -1
  76. package/dist/commands/list.d.ts +0 -1
  77. package/dist/commands/list.js +0 -15
  78. package/dist/commands/list.js.map +0 -1
  79. package/dist/commands/loops.d.ts +0 -1
  80. package/dist/commands/loops.js +0 -72
  81. package/dist/commands/loops.js.map +0 -1
  82. package/dist/commands/memory.d.ts +0 -1
  83. package/dist/commands/memory.js +0 -65
  84. package/dist/commands/memory.js.map +0 -1
  85. package/dist/commands/pi-adapter.d.ts +0 -1
  86. package/dist/commands/pi-adapter.js +0 -6
  87. package/dist/commands/pi-adapter.js.map +0 -1
  88. package/dist/commands/run.d.ts +0 -1
  89. package/dist/commands/run.js +0 -292
  90. package/dist/commands/run.js.map +0 -1
  91. package/dist/commands/runs.d.ts +0 -1
  92. package/dist/commands/runs.js +0 -50
  93. package/dist/commands/runs.js.map +0 -1
  94. package/dist/commands/task.d.ts +0 -1
  95. package/dist/commands/task.js +0 -74
  96. package/dist/commands/task.js.map +0 -1
  97. package/dist/commands/worktree.d.ts +0 -1
  98. package/dist/commands/worktree.js +0 -162
  99. package/dist/commands/worktree.js.map +0 -1
  100. package/dist/config.d.ts +0 -31
  101. package/dist/config.js +0 -261
  102. package/dist/config.js.map +0 -1
  103. package/dist/dashboard/app.d.ts +0 -12
  104. package/dist/dashboard/app.js +0 -23
  105. package/dist/dashboard/app.js.map +0 -1
  106. package/dist/dashboard/routes/api.d.ts +0 -3
  107. package/dist/dashboard/routes/api.js +0 -186
  108. package/dist/dashboard/routes/api.js.map +0 -1
  109. package/dist/dashboard/routes/pages.d.ts +0 -2
  110. package/dist/dashboard/routes/pages.js +0 -16
  111. package/dist/dashboard/routes/pages.js.map +0 -1
  112. package/dist/dashboard/views/alpine-vendor.d.ts +0 -1
  113. package/dist/dashboard/views/alpine-vendor.js +0 -10
  114. package/dist/dashboard/views/alpine-vendor.js.map +0 -1
  115. package/dist/dashboard/views/shell.d.ts +0 -1
  116. package/dist/dashboard/views/shell.js +0 -1062
  117. package/dist/dashboard/views/shell.js.map +0 -1
  118. package/dist/events/decode.d.ts +0 -2
  119. package/dist/events/decode.js +0 -45
  120. package/dist/events/decode.js.map +0 -1
  121. package/dist/events/encode.d.ts +0 -2
  122. package/dist/events/encode.js +0 -33
  123. package/dist/events/encode.js.map +0 -1
  124. package/dist/events/guards.d.ts +0 -5
  125. package/dist/events/guards.js +0 -42
  126. package/dist/events/guards.js.map +0 -1
  127. package/dist/events/types.d.ts +0 -27
  128. package/dist/events/types.js +0 -2
  129. package/dist/events/types.js.map +0 -1
  130. package/dist/harness/artifacts.d.ts +0 -50
  131. package/dist/harness/artifacts.js +0 -333
  132. package/dist/harness/artifacts.js.map +0 -1
  133. package/dist/harness/config-helpers.d.ts +0 -35
  134. package/dist/harness/config-helpers.js +0 -409
  135. package/dist/harness/config-helpers.js.map +0 -1
  136. package/dist/harness/coordination.d.ts +0 -1
  137. package/dist/harness/coordination.js +0 -127
  138. package/dist/harness/coordination.js.map +0 -1
  139. package/dist/harness/display.d.ts +0 -21
  140. package/dist/harness/display.js +0 -176
  141. package/dist/harness/display.js.map +0 -1
  142. package/dist/harness/emit.d.ts +0 -15
  143. package/dist/harness/emit.js +0 -240
  144. package/dist/harness/emit.js.map +0 -1
  145. package/dist/harness/index.d.ts +0 -20
  146. package/dist/harness/index.js +0 -311
  147. package/dist/harness/index.js.map +0 -1
  148. package/dist/harness/iteration.d.ts +0 -16
  149. package/dist/harness/iteration.js +0 -131
  150. package/dist/harness/iteration.js.map +0 -1
  151. package/dist/harness/journal-format.d.ts +0 -25
  152. package/dist/harness/journal-format.js +0 -153
  153. package/dist/harness/journal-format.js.map +0 -1
  154. package/dist/harness/journal.d.ts +0 -31
  155. package/dist/harness/journal.js +0 -178
  156. package/dist/harness/journal.js.map +0 -1
  157. package/dist/harness/metareview.d.ts +0 -4
  158. package/dist/harness/metareview.js +0 -48
  159. package/dist/harness/metareview.js.map +0 -1
  160. package/dist/harness/metrics.d.ts +0 -12
  161. package/dist/harness/metrics.js +0 -180
  162. package/dist/harness/metrics.js.map +0 -1
  163. package/dist/harness/parallel.d.ts +0 -37
  164. package/dist/harness/parallel.js +0 -237
  165. package/dist/harness/parallel.js.map +0 -1
  166. package/dist/harness/prompt.d.ts +0 -46
  167. package/dist/harness/prompt.js +0 -403
  168. package/dist/harness/prompt.js.map +0 -1
  169. package/dist/harness/scratchpad.d.ts +0 -2
  170. package/dist/harness/scratchpad.js +0 -67
  171. package/dist/harness/scratchpad.js.map +0 -1
  172. package/dist/harness/stop.d.ts +0 -5
  173. package/dist/harness/stop.js +0 -70
  174. package/dist/harness/stop.js.map +0 -1
  175. package/dist/harness/tools.d.ts +0 -3
  176. package/dist/harness/tools.js +0 -65
  177. package/dist/harness/tools.js.map +0 -1
  178. package/dist/harness/types.d.ts +0 -110
  179. package/dist/harness/types.js +0 -2
  180. package/dist/harness/types.js.map +0 -1
  181. package/dist/harness/wave/finalize-wave.d.ts +0 -9
  182. package/dist/harness/wave/finalize-wave.js +0 -87
  183. package/dist/harness/wave/finalize-wave.js.map +0 -1
  184. package/dist/harness/wave/launch-branches.d.ts +0 -6
  185. package/dist/harness/wave/launch-branches.js +0 -314
  186. package/dist/harness/wave/launch-branches.js.map +0 -1
  187. package/dist/harness/wave/parse-objectives.d.ts +0 -3
  188. package/dist/harness/wave/parse-objectives.js +0 -32
  189. package/dist/harness/wave/parse-objectives.js.map +0 -1
  190. package/dist/harness/wave/types.d.ts +0 -43
  191. package/dist/harness/wave/types.js +0 -2
  192. package/dist/harness/wave/types.js.map +0 -1
  193. package/dist/harness/wave.d.ts +0 -6
  194. package/dist/harness/wave.js +0 -159
  195. package/dist/harness/wave.js.map +0 -1
  196. package/dist/isolation/index.d.ts +0 -4
  197. package/dist/isolation/index.js +0 -3
  198. package/dist/isolation/index.js.map +0 -1
  199. package/dist/isolation/resolve.d.ts +0 -39
  200. package/dist/isolation/resolve.js +0 -118
  201. package/dist/isolation/resolve.js.map +0 -1
  202. package/dist/isolation/run-scope.d.ts +0 -21
  203. package/dist/isolation/run-scope.js +0 -50
  204. package/dist/isolation/run-scope.js.map +0 -1
  205. package/dist/json.d.ts +0 -8
  206. package/dist/json.js +0 -82
  207. package/dist/json.js.map +0 -1
  208. package/dist/loops/health.d.ts +0 -17
  209. package/dist/loops/health.js +0 -152
  210. package/dist/loops/health.js.map +0 -1
  211. package/dist/loops/list.d.ts +0 -6
  212. package/dist/loops/list.js +0 -21
  213. package/dist/loops/list.js.map +0 -1
  214. package/dist/loops/policy.d.ts +0 -6
  215. package/dist/loops/policy.js +0 -41
  216. package/dist/loops/policy.js.map +0 -1
  217. package/dist/loops/render.d.ts +0 -19
  218. package/dist/loops/render.js +0 -100
  219. package/dist/loops/render.js.map +0 -1
  220. package/dist/loops/show.d.ts +0 -8
  221. package/dist/loops/show.js +0 -31
  222. package/dist/loops/show.js.map +0 -1
  223. package/dist/loops/watch.d.ts +0 -14
  224. package/dist/loops/watch.js +0 -143
  225. package/dist/loops/watch.js.map +0 -1
  226. package/dist/main.d.ts +0 -1
  227. package/dist/main.js +0 -148
  228. package/dist/main.js.map +0 -1
  229. package/dist/markdown.d.ts +0 -10
  230. package/dist/markdown.js +0 -66
  231. package/dist/markdown.js.map +0 -1
  232. package/dist/memory-render.d.ts +0 -6
  233. package/dist/memory-render.js +0 -81
  234. package/dist/memory-render.js.map +0 -1
  235. package/dist/memory.d.ts +0 -22
  236. package/dist/memory.js +0 -318
  237. package/dist/memory.js.map +0 -1
  238. package/dist/pi-adapter.d.ts +0 -1
  239. package/dist/pi-adapter.js +0 -220
  240. package/dist/pi-adapter.js.map +0 -1
  241. package/dist/profiles.d.ts +0 -12
  242. package/dist/profiles.js +0 -71
  243. package/dist/profiles.js.map +0 -1
  244. package/dist/registry/derive.d.ts +0 -8
  245. package/dist/registry/derive.js +0 -88
  246. package/dist/registry/derive.js.map +0 -1
  247. package/dist/registry/discover.d.ts +0 -20
  248. package/dist/registry/discover.js +0 -98
  249. package/dist/registry/discover.js.map +0 -1
  250. package/dist/registry/harness.d.ts +0 -7
  251. package/dist/registry/harness.js +0 -63
  252. package/dist/registry/harness.js.map +0 -1
  253. package/dist/registry/index.d.ts +0 -6
  254. package/dist/registry/index.js +0 -6
  255. package/dist/registry/index.js.map +0 -1
  256. package/dist/registry/read.d.ts +0 -11
  257. package/dist/registry/read.js +0 -50
  258. package/dist/registry/read.js.map +0 -1
  259. package/dist/registry/rebuild.d.ts +0 -5
  260. package/dist/registry/rebuild.js +0 -22
  261. package/dist/registry/rebuild.js.map +0 -1
  262. package/dist/registry/types.d.ts +0 -28
  263. package/dist/registry/types.js +0 -2
  264. package/dist/registry/types.js.map +0 -1
  265. package/dist/registry/update.d.ts +0 -2
  266. package/dist/registry/update.js +0 -7
  267. package/dist/registry/update.js.map +0 -1
  268. package/dist/tasks-render.d.ts +0 -2
  269. package/dist/tasks-render.js +0 -44
  270. package/dist/tasks-render.js.map +0 -1
  271. package/dist/tasks.d.ts +0 -24
  272. package/dist/tasks.js +0 -184
  273. package/dist/tasks.js.map +0 -1
  274. package/dist/topology.d.ts +0 -31
  275. package/dist/topology.js +0 -309
  276. package/dist/topology.js.map +0 -1
  277. package/dist/usage.d.ts +0 -9
  278. package/dist/usage.js +0 -160
  279. package/dist/usage.js.map +0 -1
  280. package/dist/utils.d.ts +0 -21
  281. package/dist/utils.js +0 -349
  282. package/dist/utils.js.map +0 -1
  283. package/dist/worktree/clean.d.ts +0 -12
  284. package/dist/worktree/clean.js +0 -113
  285. package/dist/worktree/clean.js.map +0 -1
  286. package/dist/worktree/create.d.ts +0 -14
  287. package/dist/worktree/create.js +0 -71
  288. package/dist/worktree/create.js.map +0 -1
  289. package/dist/worktree/index.d.ts +0 -10
  290. package/dist/worktree/index.js +0 -6
  291. package/dist/worktree/index.js.map +0 -1
  292. package/dist/worktree/list.d.ts +0 -9
  293. package/dist/worktree/list.js +0 -24
  294. package/dist/worktree/list.js.map +0 -1
  295. package/dist/worktree/merge.d.ts +0 -11
  296. package/dist/worktree/merge.js +0 -129
  297. package/dist/worktree/merge.js.map +0 -1
  298. package/dist/worktree/meta.d.ts +0 -17
  299. package/dist/worktree/meta.js +0 -34
  300. package/dist/worktree/meta.js.map +0 -1
  301. package/presets/autocode/README.md +0 -81
  302. package/presets/autocode/autoloops.toml +0 -30
  303. package/presets/autocode/harness.md +0 -26
  304. package/presets/autocode/miniloops.toml +0 -22
  305. package/presets/autocode/roles/build.md +0 -34
  306. package/presets/autocode/roles/critic.md +0 -40
  307. package/presets/autocode/roles/finalizer.md +0 -43
  308. package/presets/autocode/roles/planner.md +0 -40
  309. package/presets/autocode/topology.toml +0 -32
  310. package/presets/autodebug/README.md +0 -50
  311. package/presets/autodebug/autoloops.toml +0 -18
  312. package/presets/autodebug/harness.md +0 -31
  313. package/presets/autodebug/roles/fixer.md +0 -58
  314. package/presets/autodebug/roles/investigator.md +0 -52
  315. package/presets/autodebug/roles/strategist.md +0 -45
  316. package/presets/autodebug/roles/verifier.md +0 -66
  317. package/presets/autodebug/topology.toml +0 -34
  318. package/presets/autodoc/README.md +0 -42
  319. package/presets/autodoc/autoloops.toml +0 -21
  320. package/presets/autodoc/harness.md +0 -19
  321. package/presets/autodoc/miniloops.toml +0 -21
  322. package/presets/autodoc/roles/auditor.md +0 -39
  323. package/presets/autodoc/roles/checker.md +0 -43
  324. package/presets/autodoc/roles/publisher.md +0 -51
  325. package/presets/autodoc/roles/writer.md +0 -37
  326. package/presets/autodoc/topology.toml +0 -31
  327. package/presets/autofix/README.md +0 -56
  328. package/presets/autofix/autoloops.toml +0 -24
  329. package/presets/autofix/harness.md +0 -25
  330. package/presets/autofix/miniloops.toml +0 -21
  331. package/presets/autofix/roles/closer.md +0 -48
  332. package/presets/autofix/roles/diagnoser.md +0 -43
  333. package/presets/autofix/roles/fixer.md +0 -28
  334. package/presets/autofix/roles/verifier.md +0 -31
  335. package/presets/autofix/topology.toml +0 -33
  336. package/presets/autoideas/README.md +0 -73
  337. package/presets/autoideas/autoloops.toml +0 -18
  338. package/presets/autoideas/harness.md +0 -31
  339. package/presets/autoideas/miniloops.toml +0 -18
  340. package/presets/autoideas/roles/analyst.md +0 -32
  341. package/presets/autoideas/roles/reviewer.md +0 -36
  342. package/presets/autoideas/roles/scanner.md +0 -26
  343. package/presets/autoideas/roles/synthesizer.md +0 -61
  344. package/presets/autoideas/topology.toml +0 -32
  345. package/presets/automerge/README.md +0 -3
  346. package/presets/automerge/autoloops.toml +0 -12
  347. package/presets/automerge/harness.md +0 -10
  348. package/presets/automerge/miniloops.toml +0 -12
  349. package/presets/automerge/roles/merge.md +0 -10
  350. package/presets/automerge/topology.toml +0 -10
  351. package/presets/autoperf/README.md +0 -56
  352. package/presets/autoperf/autoloops.toml +0 -21
  353. package/presets/autoperf/harness.md +0 -21
  354. package/presets/autoperf/miniloops.toml +0 -21
  355. package/presets/autoperf/roles/judge.md +0 -38
  356. package/presets/autoperf/roles/measurer.md +0 -36
  357. package/presets/autoperf/roles/optimizer.md +0 -35
  358. package/presets/autoperf/roles/profiler.md +0 -38
  359. package/presets/autoperf/topology.toml +0 -32
  360. package/presets/autopr/README.md +0 -99
  361. package/presets/autopr/autoloops.toml +0 -22
  362. package/presets/autopr/harness.md +0 -27
  363. package/presets/autopr/miniloops.toml +0 -22
  364. package/presets/autopr/roles/collector.md +0 -55
  365. package/presets/autopr/roles/drafter.md +0 -38
  366. package/presets/autopr/roles/publisher.md +0 -28
  367. package/presets/autopr/roles/validator.md +0 -31
  368. package/presets/autopr/topology.toml +0 -32
  369. package/presets/autopreset/README.md +0 -35
  370. package/presets/autopreset/autoloops.toml +0 -18
  371. package/presets/autopreset/harness.md +0 -38
  372. package/presets/autopreset/roles/designer.md +0 -33
  373. package/presets/autopreset/roles/finalizer.md +0 -23
  374. package/presets/autopreset/roles/generator.md +0 -34
  375. package/presets/autopreset/roles/validator.md +0 -31
  376. package/presets/autopreset/topology.toml +0 -32
  377. package/presets/autoqa/README.md +0 -105
  378. package/presets/autoqa/autoloops.toml +0 -21
  379. package/presets/autoqa/harness.md +0 -52
  380. package/presets/autoqa/miniloops.toml +0 -21
  381. package/presets/autoqa/roles/executor.md +0 -96
  382. package/presets/autoqa/roles/inspector.md +0 -100
  383. package/presets/autoqa/roles/planner.md +0 -87
  384. package/presets/autoqa/roles/reporter.md +0 -117
  385. package/presets/autoqa/topology.toml +0 -31
  386. package/presets/autoresearch/README.md +0 -63
  387. package/presets/autoresearch/autoloops.toml +0 -18
  388. package/presets/autoresearch/harness.md +0 -28
  389. package/presets/autoresearch/miniloops.toml +0 -18
  390. package/presets/autoresearch/roles/benchmarker.md +0 -34
  391. package/presets/autoresearch/roles/evaluator.md +0 -33
  392. package/presets/autoresearch/roles/implementer.md +0 -26
  393. package/presets/autoresearch/roles/strategist.md +0 -43
  394. package/presets/autoresearch/topology.toml +0 -31
  395. package/presets/autoreview/README.md +0 -51
  396. package/presets/autoreview/autoloops.toml +0 -21
  397. package/presets/autoreview/harness.md +0 -20
  398. package/presets/autoreview/miniloops.toml +0 -21
  399. package/presets/autoreview/roles/checker.md +0 -36
  400. package/presets/autoreview/roles/reader.md +0 -33
  401. package/presets/autoreview/roles/suggester.md +0 -26
  402. package/presets/autoreview/roles/summarizer.md +0 -57
  403. package/presets/autoreview/topology.toml +0 -31
  404. package/presets/autosec/README.md +0 -51
  405. package/presets/autosec/autoloops.toml +0 -21
  406. package/presets/autosec/harness.md +0 -20
  407. package/presets/autosec/miniloops.toml +0 -21
  408. package/presets/autosec/roles/analyst.md +0 -38
  409. package/presets/autosec/roles/hardener.md +0 -36
  410. package/presets/autosec/roles/reporter.md +0 -63
  411. package/presets/autosec/roles/scanner.md +0 -38
  412. package/presets/autosec/topology.toml +0 -31
  413. package/presets/autosimplify/README.md +0 -83
  414. package/presets/autosimplify/autoloops.toml +0 -26
  415. package/presets/autosimplify/harness.md +0 -25
  416. package/presets/autosimplify/miniloops.toml +0 -22
  417. package/presets/autosimplify/roles/reviewer.md +0 -38
  418. package/presets/autosimplify/roles/scoper.md +0 -42
  419. package/presets/autosimplify/roles/simplifier.md +0 -51
  420. package/presets/autosimplify/roles/verifier.md +0 -40
  421. package/presets/autosimplify/topology.toml +0 -32
  422. package/presets/autospec/README.md +0 -84
  423. package/presets/autospec/autoloops.toml +0 -21
  424. package/presets/autospec/harness.md +0 -23
  425. package/presets/autospec/miniloops.toml +0 -21
  426. package/presets/autospec/roles/clarifier.md +0 -39
  427. package/presets/autospec/roles/critic.md +0 -41
  428. package/presets/autospec/roles/designer.md +0 -37
  429. package/presets/autospec/roles/planner.md +0 -38
  430. package/presets/autospec/roles/researcher.md +0 -33
  431. package/presets/autospec/topology.toml +0 -38
  432. package/presets/autotest/README.md +0 -55
  433. package/presets/autotest/autoloops.toml +0 -21
  434. package/presets/autotest/harness.md +0 -21
  435. package/presets/autotest/miniloops.toml +0 -21
  436. package/presets/autotest/roles/assessor.md +0 -57
  437. package/presets/autotest/roles/runner.md +0 -31
  438. package/presets/autotest/roles/surveyor.md +0 -39
  439. package/presets/autotest/roles/writer.md +0 -37
  440. package/presets/autotest/topology.toml +0 -32
@@ -1,56 +0,0 @@
1
- # AutoPerf miniloop
2
-
3
- Use when you need to profile performance bottlenecks and apply targeted optimizations.
4
-
5
- AutoPerf identifies hot paths, establishes baselines, implements targeted optimizations, measures results, and keeps or discards changes — similar to autoresearch but scoped specifically to performance.
6
-
7
- Shape:
8
- - profiler — identifies hot paths, establishes baselines
9
- - optimizer — implements targeted optimization
10
- - measurer — runs benchmarks, captures before/after metrics
11
- - judge — skeptically evaluates improvement, keeps or discards
12
-
13
- ## Fail-closed contract
14
-
15
- AutoPerf should distrust claimed wins.
16
-
17
- - No benchmark parity means no real comparison.
18
- - No correctness proof means no kept optimization.
19
- - Noisy or weakly evidenced gains should be rerun or discarded.
20
- - Completion means either the target was met with logged wins or the remaining candidate space was explicitly exhausted.
21
-
22
- ## How it works
23
-
24
- 1. **Profiler** identifies available benchmarking tools, establishes baseline measurements, and ranks hot paths by estimated impact.
25
- 2. **Optimizer** implements a single, focused optimization for the highest-impact target.
26
- 3. **Measurer** runs the same benchmarks as the baseline, captures the delta, and verifies tests still pass.
27
- 4. **Judge** decides keep or discard based on meaningful improvement and correctness. Tracks cumulative progress.
28
-
29
- ## AutoPerf vs AutoResearch
30
-
31
- - **AutoPerf** = scoped to performance. Profiles, optimizes, measures. The metric is always a performance number.
32
- - **AutoResearch** = general experiment loop. Any hypothesis, any metric, any domain.
33
-
34
- ## Files
35
-
36
- - `autoloops.toml` — loop + backend config
37
- - `topology.toml` — role deck + handoff graph
38
- - `harness.md` — shared harness rules loaded every iteration
39
- - `roles/profiler.md`
40
- - `roles/optimizer.md`
41
- - `roles/measurer.md`
42
- - `roles/judge.md`
43
-
44
- ## Shared working files created by the loop
45
-
46
- - `.autoloop/perf-profile.md` — goal, baselines, identified hot paths
47
- - `.autoloop/perf-log.jsonl` — append-only log of optimization attempts and verdicts
48
- - `.autoloop/progress.md` — current optimization tracking
49
-
50
- ## Run
51
-
52
- From the repo root:
53
-
54
- ```bash
55
- autoloop run presets/autoperf "Reduce API response latency by 30%"
56
- ```
@@ -1,21 +0,0 @@
1
- event_loop.max_iterations = 100
2
- event_loop.completion_event = "task.complete"
3
- event_loop.completion_promise = "LOOP_COMPLETE"
4
- event_loop.required_events = ["perf.measured"]
5
-
6
- backend.kind = "command"
7
- backend.command = "claude"
8
- backend.timeout_ms = 3000000
9
- # For deterministic local harness testing only:
10
- # backend.kind = "command"
11
- # backend.command = "../../examples/mock-backend.sh"
12
-
13
- review.enabled = true
14
- review.timeout_ms = 300000
15
-
16
- memory.prompt_budget_chars = 8000
17
- harness.instructions_file = "harness.md"
18
-
19
- core.state_dir = ".autoloop"
20
- core.journal_file = ".autoloop/journal.jsonl"
21
- core.memory_file = ".autoloop/memory.jsonl"
@@ -1,21 +0,0 @@
1
- This is a autoloops-native autoperf loop for performance profiling and optimization.
2
-
3
- The loop identifies hot paths, establishes baselines, implements targeted optimizations, measures results, and keeps or discards changes — iterating until performance goals are met.
4
-
5
- Global rules:
6
- - Shared working files are the source of truth: `{{STATE_DIR}}/perf-profile.md`, `{{STATE_DIR}}/perf-log.jsonl`, `{{STATE_DIR}}/progress.md`.
7
- - One optimization at a time. Do not start the next before the current one is measured and judged.
8
- - Use the event tool instead of prose-only handoffs.
9
- - Fresh context every iteration: re-read the shared working files and the relevant source before acting.
10
- - Prefer small, reversible changes that can be cleanly reverted if the optimization fails.
11
- - Measure before and after. No optimization is accepted without measurement.
12
- - False keeps are worse than false discards.
13
- - Missing baseline, missing tests, changed benchmark procedure, or noisy/inconclusive results should route to retry or discard, not acceptance.
14
- - The judge makes keep/discard decisions. Other roles do not commit or revert.
15
- - Use `{{TOOL_PATH}} memory add learning ...` for durable learnings.
16
- - Do not invent extra phases. Stay inside profiler → optimizer → measurer → judge.
17
-
18
- State files:
19
- - `{{STATE_DIR}}/perf-profile.md` — performance goal, baseline measurements, identified hot paths, optimization history.
20
- - `{{STATE_DIR}}/perf-log.jsonl` — append-only log. Each line: `{"id":N, "target":"...", "change":"...", "metric_before":..., "metric_after":..., "verdict":"keep|discard", "reason":"..."}`.
21
- - `{{STATE_DIR}}/progress.md` — current optimization target, what the next role should do.
@@ -1,21 +0,0 @@
1
- event_loop.max_iterations = 100
2
- event_loop.completion_event = "task.complete"
3
- event_loop.completion_promise = "LOOP_COMPLETE"
4
- event_loop.required_events = ["perf.measured"]
5
-
6
- backend.kind = "pi"
7
- backend.command = "pi"
8
- backend.timeout_ms = 3000000
9
- # For deterministic local harness testing only:
10
- # backend.kind = "command"
11
- # backend.command = "../../examples/mock-backend.sh"
12
-
13
- review.enabled = true
14
- review.timeout_ms = 300000
15
-
16
- memory.prompt_budget_chars = 8000
17
- harness.instructions_file = "harness.md"
18
-
19
- core.state_dir = ".miniloop"
20
- core.journal_file = ".miniloop/journal.jsonl"
21
- core.memory_file = ".miniloop/memory.jsonl"
@@ -1,38 +0,0 @@
1
- You are the judge.
2
-
3
- Do not profile. Do not optimize. Do not measure.
4
-
5
- Your job:
6
- 1. Evaluate whether the optimization should be kept or discarded.
7
- 2. Update the performance log.
8
- 3. Decide whether to continue optimizing.
9
-
10
- On every activation:
11
- - Read `{{STATE_DIR}}/perf-profile.md`, `{{STATE_DIR}}/perf-log.jsonl`, and `{{STATE_DIR}}/progress.md`.
12
- - Start skeptical: assume discard until the win is proven.
13
-
14
- Process:
15
- 1. Review the measurement results:
16
- - Did the metric improve?
17
- - By how much? Is it meaningful?
18
- - Did correctness tests pass?
19
- - Is the evidence bundle complete and apples-to-apples?
20
- 2. Decide:
21
- - **Keep** only if the metric improved meaningfully, the improvement survives noise scrutiny, and tests pass.
22
- - **Discard** if the metric regressed, improvement is noise-level or weakly evidenced, or tests fail.
23
- 3. Append to `{{STATE_DIR}}/perf-log.jsonl`:
24
- ```json
25
- {"id": N, "target": "...", "change": "...", "metric_before": X, "metric_after": Y, "verdict": "keep|discard", "reason": "..."}
26
- ```
27
- 4. If discarded: revert the optimization (git checkout the changed files).
28
- 5. Update `{{STATE_DIR}}/progress.md`.
29
- 6. If the overall goal is met → emit `task.complete` with cumulative results.
30
- 7. If kept → emit `optimization.kept`.
31
- 8. If discarded → emit `optimization.discarded`.
32
-
33
- Rules:
34
- - Be rigorous about measurement. A 1% improvement on a noisy benchmark is not meaningful.
35
- - A 10% improvement that breaks tests is not acceptable — discard it.
36
- - Track cumulative improvement across all kept optimizations.
37
- - False keeps are worse than false discards.
38
- - Do not use `good enough` unless you tie it explicitly to the original target and remaining opportunity.
@@ -1,36 +0,0 @@
1
- You are the measurer.
2
-
3
- Do not profile. Do not optimize. Do not judge.
4
-
5
- Your job:
6
- 1. Run benchmarks or measurements after the optimization.
7
- 2. Capture before/after metrics.
8
- 3. Hand results to the judge.
9
-
10
- On every activation:
11
- - Read `{{STATE_DIR}}/perf-profile.md`, `{{STATE_DIR}}/perf-log.jsonl`, and `{{STATE_DIR}}/progress.md`.
12
-
13
- Process:
14
- 1. Run the benchmark or measurement command specified in `{{STATE_DIR}}/perf-profile.md`.
15
- 2. Capture:
16
- - exact benchmark command
17
- - the metric value after the optimization
18
- - the baseline metric value (from `{{STATE_DIR}}/perf-profile.md` or `{{STATE_DIR}}/progress.md`)
19
- - any secondary metrics (e.g., memory usage, throughput)
20
- - raw runs and aggregate used for comparison if multiple runs were needed
21
- - test suite results to verify correctness is preserved
22
- 3. Record results in `{{STATE_DIR}}/progress.md`:
23
- - Metric before: X
24
- - Metric after: Y
25
- - Delta: Z (improvement or regression)
26
- - Noise note: {stable / noisy / inconclusive}
27
- - Tests: pass/fail
28
- 4. If measurement succeeds with a complete evidence bundle → emit `perf.measured`.
29
- 5. If measurement fails (compilation error, benchmark crash, missing baseline, changed benchmark procedure, incomplete tests) → emit `measurement.failed` with details.
30
-
31
- Rules:
32
- - Run the same benchmark command as the baseline. Apples-to-apples comparison.
33
- - Run measurements multiple times if the metric is noisy — report the aggregate you used.
34
- - Always run the test suite after optimization to verify correctness.
35
- - Record real numbers, not estimates. Do not round away meaningful differences.
36
- - Missing evidence is a failed measurement, not a soft pass.
@@ -1,35 +0,0 @@
1
- You are the optimizer.
2
-
3
- Do not profile. Do not measure. Do not judge.
4
-
5
- Your job:
6
- 1. Implement the targeted optimization identified by the profiler.
7
- 2. Keep changes minimal and reversible.
8
-
9
- On every activation:
10
- - Read `{{STATE_DIR}}/perf-profile.md`, `{{STATE_DIR}}/perf-log.jsonl`, and `{{STATE_DIR}}/progress.md`.
11
- - Understand the optimization target: what to change, why, and the expected improvement.
12
-
13
- Process:
14
- 1. Read the code at the identified hot path.
15
- 2. Implement the optimization:
16
- - Algorithmic improvements (better data structures, reduced complexity)
17
- - Allocation reduction (reuse buffers, avoid copies)
18
- - Caching (memoization, lookup tables)
19
- - Parallelism (where safe and the framework supports it)
20
- - I/O optimization (batching, connection pooling)
21
- 3. Ensure correctness is preserved — the optimization must not change behavior.
22
- 4. Update `{{STATE_DIR}}/progress.md` with what was changed.
23
- 5. Emit `optimization.applied` with a summary of the change.
24
-
25
- On `measurement.failed` reactivation:
26
- - Read the failure details from `{{STATE_DIR}}/progress.md`.
27
- - The measurement could not run — fix the issue (compilation error, test failure, etc.).
28
- - Emit `optimization.applied` again.
29
-
30
- Rules:
31
- - One optimization per activation. Do not batch multiple changes.
32
- - Preserve correctness. If unsure, add a comment noting the assumption.
33
- - Prefer standard patterns for the language (e.g., `StringBuilder` over concatenation, `HashMap` over linear scan).
34
- - If the optimization requires an API change, note it in `{{STATE_DIR}}/progress.md`.
35
- - If you cannot optimize the target, emit `optimization.blocked` explaining why.
@@ -1,38 +0,0 @@
1
- You are the profiler.
2
-
3
- Do not optimize. Do not measure. Do not judge.
4
-
5
- Your job:
6
- 1. Identify performance hot paths and bottlenecks.
7
- 2. Establish baseline measurements.
8
- 3. Hand one optimization target at a time to the optimizer.
9
-
10
- On every activation:
11
- - Read `{{STATE_DIR}}/perf-profile.md`, `{{STATE_DIR}}/perf-log.jsonl`, and `{{STATE_DIR}}/progress.md` if they exist.
12
- - Re-read the latest scratchpad/journal context before deciding.
13
-
14
- On first activation:
15
- - Understand the performance goal: what metric to optimize, what direction (lower/higher is better), what target.
16
- - Profile the codebase:
17
- - Identify available profiling/benchmarking tools in the repo.
18
- - If benchmarks exist, run them to establish baselines.
19
- - If no benchmarks exist, identify how to measure the target metric.
20
- - Identify hot paths: slow functions, unnecessary allocations, N+1 queries, redundant computation.
21
- - Create or refresh:
22
- - `{{STATE_DIR}}/perf-profile.md` — goal, metric, baseline, identified hot paths ranked by estimated impact.
23
- - `{{STATE_DIR}}/perf-log.jsonl` — empty file (will be appended to by the judge).
24
- - `{{STATE_DIR}}/progress.md` — current phase, first optimization target.
25
- - Emit `hotspot.identified` with the highest-impact target and baseline measurement.
26
-
27
- On later activations (`optimization.kept` or `optimization.discarded`):
28
- - Re-read the shared working files and the optimization log.
29
- - Analyze cumulative progress toward the goal.
30
- - If the goal is met or no more impactful optimizations remain, emit `task.complete` only with an exhausted-candidate summary.
31
- - Otherwise, identify the next target and emit `hotspot.identified`.
32
-
33
- Rules:
34
- - Rank targets by estimated impact, not by ease of implementation.
35
- - Be specific: `string concatenation in hot loop at parser.rs:142 allocates on every iteration` not `parser is slow`.
36
- - Include the baseline measurement for the target so the measurer knows what to compare against.
37
- - Do not suggest micro-optimizations when algorithmic improvements are available.
38
- - Do not claim the search is exhausted by vibe. Record the remaining candidates and why they were rejected or deferred.
@@ -1,32 +0,0 @@
1
- name = "autoperf"
2
- completion = "task.complete"
3
-
4
- [[role]]
5
- id = "profiler"
6
- emits = ["hotspot.identified", "task.complete"]
7
- prompt_file = "roles/profiler.md"
8
-
9
- [[role]]
10
- id = "optimizer"
11
- emits = ["optimization.applied", "optimization.blocked"]
12
- prompt_file = "roles/optimizer.md"
13
-
14
- [[role]]
15
- id = "measurer"
16
- emits = ["perf.measured", "measurement.failed"]
17
- prompt_file = "roles/measurer.md"
18
-
19
- [[role]]
20
- id = "judge"
21
- emits = ["optimization.kept", "optimization.discarded", "task.complete"]
22
- prompt_file = "roles/judge.md"
23
-
24
- [handoff]
25
- "loop.start" = ["profiler"]
26
- "hotspot.identified" = ["optimizer"]
27
- "optimization.blocked" = ["profiler"]
28
- "optimization.applied" = ["measurer"]
29
- "measurement.failed" = ["optimizer"]
30
- "perf.measured" = ["judge"]
31
- "optimization.kept" = ["profiler"]
32
- "optimization.discarded" = ["profiler"]
@@ -1,99 +0,0 @@
1
- # AutoPR miniloop
2
-
3
- Use when you want to turn the current branch into an accurate, reviewable pull request.
4
-
5
- AutoPR inspects repo and branch state, normalizes any structured PR request, drafts a reviewer-useful title/body, validates that the draft matches the actual diff and evidence, and then creates or updates the PR. It can optionally arm auto-merge or immediately merge if checks are already green.
6
-
7
- Shape:
8
- - collector — resolves the request, repo state, base/head branches, checks, and existing PR state
9
- - drafter — writes the PR title/body/checklist
10
- - validator — attacks mismatches, fake claims, weak reviewer guidance, and missing evidence
11
- - publisher — creates or updates the PR and optionally arms/executes merge behavior
12
-
13
- ## Fail-closed contract
14
-
15
- AutoPR is not a PR-hallucination preset.
16
-
17
- - A PR draft must match the real diff and real verification evidence.
18
- - Missing checks, ambiguous branch state, missing `gh` auth, or unknown mergeability should block publication instead of being papered over.
19
- - `publish-and-arm` should enable auto-merge and stop; it should not poll CI.
20
- - `publish-and-merge-if-green` should merge only when green *now* or otherwise arm auto-merge if supported.
21
-
22
- ## Remote-first base comparison
23
-
24
- AutoPR always compares the PR branch against `origin/<base>` (the remote tracking ref), not the local `<base>` ref. This prevents a dangerous class of bugs where local main is ahead of or diverged from origin/main:
25
-
26
- - **Merge-base, commit list, and file diff** are all computed against `origin/<base>`. This ensures the PR body accurately describes what GitHub will show in the PR diff.
27
- - **Inherited unpublished commit guard**: If the head branch includes commits that exist on local `<base>` but not on `origin/<base>`, these would silently appear in the GitHub PR. AutoPR detects this and blocks publication (`pr.blocked`) with a clear explanation, advising the user to push the base branch first.
28
- - **Local/remote divergence disclosure**: When local `<base>` differs from `origin/<base>` (even without inherited commits leaking into the head branch), the collector records the divergence status in `pr-context.md` so the drafter and validator are aware.
29
-
30
- The validator independently recomputes the diff against `origin/<base>` and rejects drafts whose scope doesn't match the remote-based diff.
31
-
32
- ## How it works
33
-
34
- 1. **Collector** reads the launch prompt, optional `.autoloop/pr-request.md`, git state, and GitHub state and writes `.autoloop/pr-context.md`.
35
- 2. **Drafter** writes `.autoloop/pr-draft.md` with title, body, verification, risks, and reviewer focus.
36
- 3. **Validator** checks the draft against the actual diff, branch state, and evidence and either routes back for revision or validates it.
37
- 4. **Publisher** creates or updates the PR and records the result in `.autoloop/pr-result.md`.
38
-
39
- ## Inputs
40
-
41
- ### Primary input
42
-
43
- Run it with a normal objective prompt:
44
-
45
- ```bash
46
- autoloop run autopr "Open a PR for the current branch against main and enable auto-merge if checks pass."
47
- ```
48
-
49
- ### Optional structured request
50
-
51
- If `.autoloop/pr-request.md` exists, AutoPR should treat its frontmatter as the highest-priority structured request. Recommended fields:
52
-
53
- ```md
54
- ---
55
- base: main
56
- mode: publish-and-arm
57
- draft: false
58
- reviewers:
59
- - alice
60
- - bob
61
- labels:
62
- - dashboard
63
- - ux
64
- issue: 123
65
- rfc: docs/rfcs/dashboard-event-rendering.md
66
- title_hint: Improve dashboard event rendering and prompt display
67
- ---
68
-
69
- Open a PR for the dashboard UI work.
70
- Call out that tests passed and that this is UI-only.
71
- ```
72
-
73
- Supported frontmatter fields:
74
- - `base`
75
- - `mode` (`publish`, `publish-and-arm`, `publish-and-merge-if-green`)
76
- - `draft`
77
- - `reviewers`
78
- - `labels`
79
- - `issue`
80
- - `rfc`
81
- - `title_hint`
82
-
83
- ## Files
84
-
85
- - `autoloops.toml` — loop + backend config
86
- - `topology.toml` — role deck + handoff graph
87
- - `harness.md` — shared harness rules loaded every iteration
88
- - `roles/collector.md`
89
- - `roles/drafter.md`
90
- - `roles/validator.md`
91
- - `roles/publisher.md`
92
-
93
- ## Shared working files created by the loop
94
-
95
- - `.autoloop/pr-request.md` — optional structured request with frontmatter
96
- - `.autoloop/pr-context.md` — normalized publish context and repo evidence
97
- - `.autoloop/pr-draft.md` — title/body/checklist draft
98
- - `.autoloop/pr-result.md` — final PR URL/number and publish disposition
99
- - `.autoloop/progress.md` — phase, blockers, and verification notes
@@ -1,22 +0,0 @@
1
- event_loop.max_iterations = 100
2
- event_loop.completion_event = "task.complete"
3
- event_loop.completion_promise = "LOOP_COMPLETE"
4
- # Require the validation gate before publishing is considered complete.
5
- event_loop.required_events = ["pr.validated"]
6
-
7
- backend.kind = "command"
8
- backend.command = "claude"
9
- backend.timeout_ms = 3000000
10
- # For deterministic local harness testing only:
11
- # backend.kind = "command"
12
- # backend.command = "../../examples/mock-backend.sh"
13
-
14
- review.enabled = true
15
- review.timeout_ms = 300000
16
-
17
- memory.prompt_budget_chars = 8000
18
- harness.instructions_file = "harness.md"
19
-
20
- core.state_dir = ".autoloop"
21
- core.journal_file = ".autoloop/journal.jsonl"
22
- core.memory_file = ".autoloop/memory.jsonl"
@@ -1,27 +0,0 @@
1
- <!-- category: planning -->
2
- This preset turns the current branch into a reviewable pull request.
3
-
4
- Global rules:
5
- - Shared working files are the source of truth: `{{STATE_DIR}}/pr-request.md`, `{{STATE_DIR}}/pr-context.md`, `{{STATE_DIR}}/pr-draft.md`, `{{STATE_DIR}}/pr-result.md`, and `{{STATE_DIR}}/progress.md`.
6
- - The job is to publish an accurate PR, not to implement missing code or babysit CI forever.
7
- - Fresh context every iteration: re-read the shared working files, git state, and relevant source before acting.
8
- - Use the event tool instead of prose-only handoffs.
9
- - Missing evidence means no publish. If checks were not run, say so explicitly in the PR draft.
10
- - Do not invent verification, issue links, labels, reviewers, or mergeability state.
11
- - Prefer exact git / gh CLI evidence over summaries from earlier iterations.
12
- - **Remote-first base comparison (mandatory)**: All base-branch comparisons — merge-base, commit list, file diff — must use the remote tracking ref (`origin/<base>`), not the local ref. If local `<base>` and `origin/<base>` diverge, the collector must record the divergence in `pr-context.md` and block if the head branch inherits unpublished local-only commits. This prevents the PR body from misrepresenting what GitHub will actually show in the diff.
13
- - If `{{STATE_DIR}}/pr-request.md` exists, treat its frontmatter as the highest-priority structured request.
14
- - The freeform objective prompt is still valid input, but structured request fields override it.
15
- - Derive defaults when safe: head branch from git, base branch from repo default or `main`, mode defaults to `publish`, draft defaults to `false`.
16
- - Do not publish from a dirty, ambiguous, or detached repo state without calling that out and blocking.
17
- - If a PR already exists for the head branch, update it instead of creating a duplicate unless the request explicitly says otherwise.
18
- - `publish-and-arm` means enable platform auto-merge if supported; do not keep polling.
19
- - `publish-and-merge-if-green` means merge immediately only if checks are already green and mergeability is confirmed right now; otherwise arm auto-merge if available, or block with evidence.
20
- - Stay inside collector -> drafter -> validator -> publisher. Do not merge responsibilities.
21
- - Only the publisher may emit `task.complete`.
22
-
23
- Role boundaries (strict):
24
- - The collector normalizes the request and repo state into `{{STATE_DIR}}/pr-context.md`; it does not draft or publish.
25
- - The drafter writes `{{STATE_DIR}}/pr-draft.md`; it does not validate or publish.
26
- - The validator checks the draft against the actual repo state and request; it does not publish.
27
- - The publisher performs the side effect (`gh pr create`, `gh pr edit`, `gh pr merge --auto`, etc.) and records the result.
@@ -1,22 +0,0 @@
1
- event_loop.max_iterations = 100
2
- event_loop.completion_event = "task.complete"
3
- event_loop.completion_promise = "LOOP_COMPLETE"
4
- # Require the validation gate before publishing is considered complete.
5
- event_loop.required_events = ["pr.validated"]
6
-
7
- backend.kind = "pi"
8
- backend.command = "pi"
9
- backend.timeout_ms = 3000000
10
- # For deterministic local harness testing only:
11
- # backend.kind = "command"
12
- # backend.command = "../../examples/mock-backend.sh"
13
-
14
- review.enabled = true
15
- review.timeout_ms = 300000
16
-
17
- memory.prompt_budget_chars = 8000
18
- harness.instructions_file = "harness.md"
19
-
20
- core.state_dir = ".miniloop"
21
- core.journal_file = ".miniloop/journal.jsonl"
22
- core.memory_file = ".miniloop/memory.jsonl"
@@ -1,55 +0,0 @@
1
- You are the collector.
2
-
3
- Do not draft the PR. Do not validate claims. Do not publish.
4
-
5
- Your job:
6
- 1. Normalize the PR request into shared working files.
7
- 2. Inspect the actual repo and GitHub state.
8
- 3. Decide whether the loop has enough clean context to draft a PR.
9
-
10
- On every activation:
11
- - Read `{{STATE_DIR}}/pr-request.md`, `{{STATE_DIR}}/pr-context.md`, `{{STATE_DIR}}/pr-draft.md`, `{{STATE_DIR}}/pr-result.md`, and `{{STATE_DIR}}/progress.md` if they exist.
12
- - Re-read the latest scratchpad/journal context before deciding.
13
- - Re-check the live repo state; do not trust stale summaries.
14
-
15
- On first activation:
16
- - Parse the launch objective.
17
- - If `{{STATE_DIR}}/pr-request.md` exists, read its frontmatter and body and treat that as the highest-priority structured request.
18
- - Inspect git state directly: current branch, detached-head status, dirty files, commits ahead/behind, merge-base, changed files, likely base branch.
19
- - **Remote-first base resolution**: Always resolve the base branch to its remote tracking ref (`origin/<base>`, or the remote specified in the request). Compute merge-base, commit list, and file diff against `origin/<base>`, never against the local `<base>` ref.
20
- - **Local/remote divergence check**: Compare local `<base>` against `origin/<base>`. If they differ, record the divergence in `{{STATE_DIR}}/pr-context.md` (local ahead by N commits, behind by M, or diverged).
21
- - **Inherited unpublished commit guard**: If the head branch includes commits that are on local `<base>` but NOT on `origin/<base>`, these are inherited unpublished commits that would silently appear in the GitHub PR diff. Emit `pr.blocked` with a clear explanation listing the inherited commits and advising the user to push the base branch first.
22
- - Inspect platform state directly when possible: `gh auth status`, existing PR for head branch, check status, mergeability, repo default branch.
23
- - Create or refresh:
24
- - `{{STATE_DIR}}/pr-context.md` — normalized request, repo state, verification evidence, blockers, and publish intent.
25
- - `{{STATE_DIR}}/progress.md` — current phase, resolved inputs, unresolved blockers.
26
- - Emit `pr.context_ready` when the request is normalized and the repo state is clean enough for drafting.
27
- - Emit `pr.blocked` if publication is not safely draftable yet.
28
-
29
- On later activations (`pr.blocked`, `draft.blocked`, `publish.blocked`):
30
- - Re-read the shared files and re-check the live state.
31
- - If the blocker is gone, refresh `{{STATE_DIR}}/pr-context.md` and emit `pr.context_ready`.
32
- - If the blocker persists, update `{{STATE_DIR}}/progress.md` with exact evidence and emit `pr.blocked` again.
33
-
34
- Required output in `{{STATE_DIR}}/pr-context.md`:
35
- - Request summary
36
- - Base branch (local ref AND remote tracking ref)
37
- - Remote merge-base commit hash
38
- - Local/remote base divergence status (in-sync, local-ahead, diverged)
39
- - Head branch
40
- - Mode (`publish`, `publish-and-arm`, `publish-and-merge-if-green`)
41
- - Draft flag
42
- - Reviewers / labels / issue / RFC if known
43
- - Existing PR state
44
- - Verification evidence actually available
45
- - Key files changed
46
- - Risks / publish blockers
47
-
48
- Rules:
49
- - Prefer derived facts over prompt wishes.
50
- - If base is unspecified, infer repo default branch or fall back to `main`, and say which one you chose. Always verify `origin/<base>` exists; if not, block.
51
- - If the branch is detached, ambiguous, unpublished, or there is no meaningful diff, block.
52
- - If `gh` is unavailable or unauthenticated, block with exact command evidence.
53
- - Do not claim checks passed unless you found actual evidence.
54
- - Do not silently invent reviewers, labels, issue links, or mergeability.
55
- - If an existing PR already matches the head branch, record update-vs-create intent explicitly.
@@ -1,38 +0,0 @@
1
- You are the drafter.
2
-
3
- Do not inspect platform auth. Do not validate claims. Do not publish.
4
-
5
- Your job:
6
- 1. Turn the normalized context into a reviewable PR title and body.
7
- 2. Make the draft useful to human reviewers.
8
- 3. Record exactly what the PR should say.
9
-
10
- On every activation:
11
- - Read `{{STATE_DIR}}/pr-request.md`, `{{STATE_DIR}}/pr-context.md`, `{{STATE_DIR}}/pr-draft.md`, and `{{STATE_DIR}}/progress.md`.
12
- - Read the relevant changed files and docs only as needed to make the draft concrete.
13
-
14
- Process:
15
- 1. Draft or refresh `{{STATE_DIR}}/pr-draft.md` with:
16
- - `## Title`
17
- - `## Body`
18
- - `## Publish Notes`
19
- 2. The body should usually include:
20
- - Summary
21
- - Why
22
- - What changed
23
- - Verification
24
- - Risks / follow-ups
25
- - Reviewer focus
26
- 3. If the request includes issue/RFC/title hints, use them when accurate.
27
- 4. Update `{{STATE_DIR}}/progress.md` with what changed in the draft.
28
- 5. Emit `pr.drafted` when the draft is specific and publishable.
29
- 6. Emit `draft.blocked` if the context is too weak to write an accurate draft.
30
-
31
- Rules:
32
- - Be concise but reviewer-useful.
33
- - Do not claim tests/checks that are not present in `{{STATE_DIR}}/pr-context.md`.
34
- - Do not merely restate commit messages; explain the change in reviewer terms.
35
- - Surface risk honestly. A small PR can still have risky UI or behavior changes.
36
- - The title should be specific enough to stand alone in a PR list.
37
- - If verification is missing, say so plainly instead of faking confidence.
38
- - If reviewer focus is obvious, spell it out; this is one of the preset's main values.
@@ -1,28 +0,0 @@
1
- You are the publisher.
2
-
3
- Do not redraft. Do not validate. Your job is to publish the validated PR and record the result.
4
-
5
- On every activation:
6
- - Read `{{STATE_DIR}}/pr-context.md`, `{{STATE_DIR}}/pr-draft.md`, `{{STATE_DIR}}/pr-result.md`, and `{{STATE_DIR}}/progress.md`.
7
- - Re-check the live GitHub and git state before performing side effects.
8
-
9
- Process:
10
- 1. Determine whether to create a new PR or update an existing PR for the head branch.
11
- 2. Use the validated title/body from `{{STATE_DIR}}/pr-draft.md`.
12
- 3. Apply requested metadata when supported and evidenced: draft state, reviewers, labels.
13
- 4. Respect the normalized mode from `{{STATE_DIR}}/pr-context.md`:
14
- - `publish` → create/update PR and stop
15
- - `publish-and-arm` → create/update PR, then enable auto-merge if supported
16
- - `publish-and-merge-if-green` → create/update PR, then merge immediately only if checks are green and mergeability is confirmed now; otherwise enable auto-merge if supported; otherwise block
17
- 5. Write `{{STATE_DIR}}/pr-result.md` with PR number, URL, final mode disposition, metadata applied, and any blockers encountered.
18
- 6. Update `{{STATE_DIR}}/progress.md` with exact commands run and final state.
19
- 7. Emit `task.complete` only when the requested publish action succeeded.
20
- 8. Emit `publish.blocked` if publish or merge behavior could not be completed safely.
21
-
22
- Rules:
23
- - Use exact command evidence (`gh pr create`, `gh pr edit`, `gh pr merge --auto`, etc.) and record failures verbatim enough to debug.
24
- - Do not poll CI. If checks are pending and auto-merge can be armed, arm it and complete.
25
- - Do not merge on wishful thinking; immediate merge requires green checks and confirmed mergeability now.
26
- - If reviewer or label application fails after PR creation, record partial success explicitly.
27
- - If the PR was created/updated but the requested arm/merge behavior failed, treat that as blocked unless the normalized request said plain `publish`.
28
- - Never emit `task.complete` without recording the PR URL or equivalent durable result in `{{STATE_DIR}}/pr-result.md`.
@@ -1,31 +0,0 @@
1
- You are the validator.
2
-
3
- Do not publish. Do not rewrite the whole request. Your job is to attack weak or inaccurate PR drafts.
4
-
5
- On every activation:
6
- - Read `{{STATE_DIR}}/pr-request.md`, `{{STATE_DIR}}/pr-context.md`, `{{STATE_DIR}}/pr-draft.md`, and `{{STATE_DIR}}/progress.md`.
7
- - Read the actual repo state directly: git diff, changed files, branch/base info, and verification evidence.
8
- - **Remote-first validation**: Independently compute the diff against `origin/<base>` (not local `<base>`). This is the ground truth for what GitHub will show in the PR.
9
-
10
- Process:
11
- 1. Check the draft against reality:
12
- - title matches the actual change
13
- - body matches changed files and behavior
14
- - verification claims are evidenced
15
- - risks are disclosed
16
- - reviewer focus is useful and concrete
17
- - requested mode/base/draft semantics are reflected in publish notes
18
- 2. Record validation notes in `{{STATE_DIR}}/progress.md`.
19
- 3. If the draft is materially inaccurate, incomplete, or too vague, emit `pr.revise` with the concrete defect.
20
- 4. If the draft is accurate and strong enough to publish, emit `pr.validated`.
21
-
22
- Rules:
23
- - Start skeptical. Absence of obvious errors is not enough.
24
- - Do not approve invented verification, fake issue links, or unsupported mergeability claims.
25
- - If the diff is bigger or riskier than the title/body suggest, reject it.
26
- - If the draft hides uncertainty that a reviewer would need to know, reject it.
27
- - Prefer one more drafting loop over a misleading PR.
28
- - Minor phrasing nits are not enough for `pr.revise`; focus on material accuracy and reviewer usefulness.
29
- - **Remote-based scope check**: Compare the draft's claimed changed-files and scope against the `origin/<base>`-based diff. Reject (`pr.revise`) if they don't match — this catches cases where local base divergence caused the collector to undercount or overcount changes.
30
- - **Inherited commit disclosure**: Reject if `pr-context.md` does not record the remote merge-base hash or does not disclose local/remote base divergence status. A draft built on local-only comparisons is unreliable.
31
- - **Diff mismatch guard**: If `git diff origin/<base>...HEAD --stat` shows files not mentioned in the draft, or the draft mentions files not in the remote diff, reject with specifics.