@mobrienv/autoloop 0.1.4 → 0.2.1

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 (328) hide show
  1. package/README.md +103 -42
  2. package/bin/autoloop +0 -0
  3. package/dist/agent-map.d.ts +10 -0
  4. package/dist/agent-map.js +58 -0
  5. package/dist/agent-map.js.map +1 -0
  6. package/dist/backend/acp-client.d.ts +38 -0
  7. package/dist/backend/acp-client.js +288 -0
  8. package/dist/backend/acp-client.js.map +1 -0
  9. package/dist/backend/index.d.ts +1 -1
  10. package/dist/backend/index.js +17 -5
  11. package/dist/backend/index.js.map +1 -1
  12. package/dist/backend/kiro-bridge.d.ts +17 -0
  13. package/dist/backend/kiro-bridge.js +80 -0
  14. package/dist/backend/kiro-bridge.js.map +1 -0
  15. package/dist/backend/kiro-worker.d.ts +1 -0
  16. package/dist/backend/kiro-worker.js +83 -0
  17. package/dist/backend/kiro-worker.js.map +1 -0
  18. package/dist/backend/run-command.js +2 -2
  19. package/dist/backend/run-command.js.map +1 -1
  20. package/dist/backend/run-kiro.d.ts +3 -0
  21. package/dist/backend/run-kiro.js +12 -0
  22. package/dist/backend/run-kiro.js.map +1 -0
  23. package/dist/backend/run-pi.js.map +1 -1
  24. package/dist/chains/budget.js +16 -4
  25. package/dist/chains/budget.js.map +1 -1
  26. package/dist/chains/load.d.ts +7 -1
  27. package/dist/chains/load.js +58 -9
  28. package/dist/chains/load.js.map +1 -1
  29. package/dist/chains/render.js +36 -8
  30. package/dist/chains/render.js.map +1 -1
  31. package/dist/chains/run.js +129 -44
  32. package/dist/chains/run.js.map +1 -1
  33. package/dist/chains/types.d.ts +1 -0
  34. package/dist/chains.d.ts +5 -4
  35. package/dist/chains.js +3 -3
  36. package/dist/chains.js.map +1 -1
  37. package/dist/commands/chain.js +6 -4
  38. package/dist/commands/chain.js.map +1 -1
  39. package/dist/commands/config.d.ts +1 -0
  40. package/dist/commands/config.js +74 -0
  41. package/dist/commands/config.js.map +1 -0
  42. package/dist/commands/dashboard.d.ts +1 -0
  43. package/dist/commands/dashboard.js +68 -0
  44. package/dist/commands/dashboard.js.map +1 -0
  45. package/dist/commands/inspect.js +125 -17
  46. package/dist/commands/inspect.js.map +1 -1
  47. package/dist/commands/list.d.ts +1 -1
  48. package/dist/commands/list.js +6 -3
  49. package/dist/commands/list.js.map +1 -1
  50. package/dist/commands/loops.js +11 -11
  51. package/dist/commands/loops.js.map +1 -1
  52. package/dist/commands/memory.js +2 -2
  53. package/dist/commands/memory.js.map +1 -1
  54. package/dist/commands/run.d.ts +1 -1
  55. package/dist/commands/run.js +102 -15
  56. package/dist/commands/run.js.map +1 -1
  57. package/dist/commands/runs.d.ts +1 -0
  58. package/dist/commands/runs.js +50 -0
  59. package/dist/commands/runs.js.map +1 -0
  60. package/dist/commands/task.d.ts +1 -0
  61. package/dist/commands/task.js +74 -0
  62. package/dist/commands/task.js.map +1 -0
  63. package/dist/commands/worktree.d.ts +1 -0
  64. package/dist/commands/worktree.js +162 -0
  65. package/dist/commands/worktree.js.map +1 -0
  66. package/dist/config.d.ts +15 -1
  67. package/dist/config.js +90 -21
  68. package/dist/config.js.map +1 -1
  69. package/dist/dashboard/app.d.ts +12 -0
  70. package/dist/dashboard/app.js +23 -0
  71. package/dist/dashboard/app.js.map +1 -0
  72. package/dist/dashboard/routes/api.d.ts +3 -0
  73. package/dist/dashboard/routes/api.js +103 -0
  74. package/dist/dashboard/routes/api.js.map +1 -0
  75. package/dist/dashboard/routes/pages.d.ts +2 -0
  76. package/dist/dashboard/routes/pages.js +14 -0
  77. package/dist/dashboard/routes/pages.js.map +1 -0
  78. package/dist/dashboard/views/alpine-vendor.d.ts +1 -0
  79. package/dist/dashboard/views/alpine-vendor.js +10 -0
  80. package/dist/dashboard/views/alpine-vendor.js.map +1 -0
  81. package/dist/dashboard/views/shell.d.ts +1 -0
  82. package/dist/dashboard/views/shell.js +714 -0
  83. package/dist/dashboard/views/shell.js.map +1 -0
  84. package/dist/events/decode.js.map +1 -1
  85. package/dist/events/encode.js +2 -2
  86. package/dist/events/encode.js.map +1 -1
  87. package/dist/harness/config-helpers.d.ts +11 -0
  88. package/dist/harness/config-helpers.js +242 -64
  89. package/dist/harness/config-helpers.js.map +1 -1
  90. package/dist/harness/coordination.js +12 -12
  91. package/dist/harness/coordination.js.map +1 -1
  92. package/dist/harness/display.d.ts +4 -3
  93. package/dist/harness/display.js +57 -11
  94. package/dist/harness/display.js.map +1 -1
  95. package/dist/harness/emit.js +31 -13
  96. package/dist/harness/emit.js.map +1 -1
  97. package/dist/harness/index.d.ts +7 -7
  98. package/dist/harness/index.js +151 -35
  99. package/dist/harness/index.js.map +1 -1
  100. package/dist/harness/iteration.d.ts +12 -0
  101. package/dist/harness/iteration.js +66 -64
  102. package/dist/harness/iteration.js.map +1 -1
  103. package/dist/harness/journal.d.ts +17 -0
  104. package/dist/harness/journal.js +74 -5
  105. package/dist/harness/journal.js.map +1 -1
  106. package/dist/harness/metareview.js +30 -15
  107. package/dist/harness/metareview.js.map +1 -1
  108. package/dist/harness/metrics.js +12 -12
  109. package/dist/harness/metrics.js.map +1 -1
  110. package/dist/harness/parallel.d.ts +1 -1
  111. package/dist/harness/parallel.js +141 -62
  112. package/dist/harness/parallel.js.map +1 -1
  113. package/dist/harness/prompt.d.ts +18 -9
  114. package/dist/harness/prompt.js +80 -44
  115. package/dist/harness/prompt.js.map +1 -1
  116. package/dist/harness/scratchpad.js +8 -6
  117. package/dist/harness/scratchpad.js.map +1 -1
  118. package/dist/harness/stop.js +16 -9
  119. package/dist/harness/stop.js.map +1 -1
  120. package/dist/harness/tools.js +39 -13
  121. package/dist/harness/tools.js.map +1 -1
  122. package/dist/harness/types.d.ts +29 -0
  123. package/dist/harness/wave/finalize-wave.d.ts +1 -1
  124. package/dist/harness/wave/finalize-wave.js +36 -9
  125. package/dist/harness/wave/finalize-wave.js.map +1 -1
  126. package/dist/harness/wave/launch-branches.d.ts +2 -2
  127. package/dist/harness/wave/launch-branches.js +147 -51
  128. package/dist/harness/wave/launch-branches.js.map +1 -1
  129. package/dist/harness/wave/parse-objectives.js +4 -1
  130. package/dist/harness/wave/parse-objectives.js.map +1 -1
  131. package/dist/harness/wave.d.ts +2 -2
  132. package/dist/harness/wave.js +89 -28
  133. package/dist/harness/wave.js.map +1 -1
  134. package/dist/isolation/index.d.ts +4 -0
  135. package/dist/isolation/index.js +3 -0
  136. package/dist/isolation/index.js.map +1 -0
  137. package/dist/isolation/resolve.d.ts +39 -0
  138. package/dist/isolation/resolve.js +118 -0
  139. package/dist/isolation/resolve.js.map +1 -0
  140. package/dist/isolation/run-scope.d.ts +21 -0
  141. package/dist/isolation/run-scope.js +50 -0
  142. package/dist/isolation/run-scope.js.map +1 -0
  143. package/dist/json.js +10 -8
  144. package/dist/json.js.map +1 -1
  145. package/dist/loops/health.d.ts +4 -2
  146. package/dist/loops/health.js +73 -25
  147. package/dist/loops/health.js.map +1 -1
  148. package/dist/loops/list.d.ts +2 -2
  149. package/dist/loops/list.js +6 -6
  150. package/dist/loops/list.js.map +1 -1
  151. package/dist/loops/policy.d.ts +6 -0
  152. package/dist/loops/policy.js +41 -0
  153. package/dist/loops/policy.js.map +1 -0
  154. package/dist/loops/render.d.ts +2 -1
  155. package/dist/loops/render.js +24 -11
  156. package/dist/loops/render.js.map +1 -1
  157. package/dist/loops/show.d.ts +2 -2
  158. package/dist/loops/show.js +13 -13
  159. package/dist/loops/show.js.map +1 -1
  160. package/dist/loops/watch.d.ts +7 -1
  161. package/dist/loops/watch.js +82 -16
  162. package/dist/loops/watch.js.map +1 -1
  163. package/dist/main.js +58 -16
  164. package/dist/main.js.map +1 -1
  165. package/dist/markdown.js +11 -11
  166. package/dist/markdown.js.map +1 -1
  167. package/dist/memory-render.js +5 -5
  168. package/dist/memory-render.js.map +1 -1
  169. package/dist/memory.d.ts +1 -2
  170. package/dist/memory.js +44 -40
  171. package/dist/memory.js.map +1 -1
  172. package/dist/pi-adapter.js +11 -11
  173. package/dist/pi-adapter.js.map +1 -1
  174. package/dist/profiles.d.ts +12 -0
  175. package/dist/profiles.js +71 -0
  176. package/dist/profiles.js.map +1 -0
  177. package/dist/registry/derive.js +10 -3
  178. package/dist/registry/derive.js.map +1 -1
  179. package/dist/registry/discover.d.ts +20 -0
  180. package/dist/registry/discover.js +98 -0
  181. package/dist/registry/discover.js.map +1 -0
  182. package/dist/registry/harness.js +8 -2
  183. package/dist/registry/harness.js.map +1 -1
  184. package/dist/registry/index.d.ts +4 -3
  185. package/dist/registry/index.js +3 -2
  186. package/dist/registry/index.js.map +1 -1
  187. package/dist/registry/read.js.map +1 -1
  188. package/dist/registry/rebuild.js +7 -4
  189. package/dist/registry/rebuild.js.map +1 -1
  190. package/dist/registry/types.d.ts +9 -0
  191. package/dist/registry/update.js +1 -1
  192. package/dist/registry/update.js.map +1 -1
  193. package/dist/tasks-render.d.ts +2 -0
  194. package/dist/tasks-render.js +44 -0
  195. package/dist/tasks-render.js.map +1 -0
  196. package/dist/tasks.d.ts +24 -0
  197. package/dist/tasks.js +184 -0
  198. package/dist/tasks.js.map +1 -0
  199. package/dist/testing/mock-backend.js +2 -2
  200. package/dist/testing/mock-backend.js.map +1 -1
  201. package/dist/topology.d.ts +6 -0
  202. package/dist/topology.js +129 -8
  203. package/dist/topology.js.map +1 -1
  204. package/dist/usage.d.ts +1 -0
  205. package/dist/usage.js +56 -11
  206. package/dist/usage.js.map +1 -1
  207. package/dist/utils.d.ts +6 -0
  208. package/dist/utils.js +272 -2
  209. package/dist/utils.js.map +1 -1
  210. package/dist/worktree/clean.d.ts +12 -0
  211. package/dist/worktree/clean.js +98 -0
  212. package/dist/worktree/clean.js.map +1 -0
  213. package/dist/worktree/create.d.ts +14 -0
  214. package/dist/worktree/create.js +71 -0
  215. package/dist/worktree/create.js.map +1 -0
  216. package/dist/worktree/index.d.ts +10 -0
  217. package/dist/worktree/index.js +6 -0
  218. package/dist/worktree/index.js.map +1 -0
  219. package/dist/worktree/list.d.ts +9 -0
  220. package/dist/worktree/list.js +24 -0
  221. package/dist/worktree/list.js.map +1 -0
  222. package/dist/worktree/merge.d.ts +11 -0
  223. package/dist/worktree/merge.js +129 -0
  224. package/dist/worktree/merge.js.map +1 -0
  225. package/dist/worktree/meta.d.ts +17 -0
  226. package/dist/worktree/meta.js +34 -0
  227. package/dist/worktree/meta.js.map +1 -0
  228. package/package.json +24 -4
  229. package/presets/autocode/README.md +1 -1
  230. package/presets/autocode/autoloops.toml +9 -1
  231. package/presets/autocode/harness.md +12 -5
  232. package/presets/autocode/roles/build.md +5 -4
  233. package/presets/autocode/roles/critic.md +2 -2
  234. package/presets/autocode/roles/finalizer.md +2 -2
  235. package/presets/autocode/roles/planner.md +7 -7
  236. package/presets/autodoc/README.md +1 -1
  237. package/presets/autodoc/autoloops.toml +1 -1
  238. package/presets/autodoc/harness.md +6 -6
  239. package/presets/autodoc/roles/auditor.md +3 -3
  240. package/presets/autodoc/roles/checker.md +2 -2
  241. package/presets/autodoc/roles/publisher.md +3 -3
  242. package/presets/autodoc/roles/writer.md +4 -4
  243. package/presets/autofix/README.md +1 -1
  244. package/presets/autofix/autoloops.toml +5 -2
  245. package/presets/autofix/harness.md +8 -7
  246. package/presets/autofix/roles/closer.md +4 -4
  247. package/presets/autofix/roles/diagnoser.md +6 -5
  248. package/presets/autofix/roles/fixer.md +4 -4
  249. package/presets/autofix/roles/verifier.md +2 -2
  250. package/presets/autoideas/README.md +1 -1
  251. package/presets/autoideas/autoloops.toml +1 -1
  252. package/presets/autoideas/harness.md +11 -11
  253. package/presets/autoideas/roles/analyst.md +4 -4
  254. package/presets/autoideas/roles/reviewer.md +3 -3
  255. package/presets/autoideas/roles/scanner.md +3 -3
  256. package/presets/autoideas/roles/synthesizer.md +20 -7
  257. package/presets/automerge/README.md +3 -0
  258. package/presets/automerge/autoloops.toml +12 -0
  259. package/presets/automerge/harness.md +10 -0
  260. package/presets/automerge/miniloops.toml +12 -0
  261. package/presets/automerge/roles/merge.md +10 -0
  262. package/presets/automerge/topology.toml +10 -0
  263. package/presets/autoperf/README.md +1 -1
  264. package/presets/autoperf/autoloops.toml +1 -1
  265. package/presets/autoperf/harness.md +5 -5
  266. package/presets/autoperf/roles/judge.md +3 -3
  267. package/presets/autoperf/roles/measurer.md +4 -4
  268. package/presets/autoperf/roles/optimizer.md +4 -4
  269. package/presets/autoperf/roles/profiler.md +4 -4
  270. package/presets/autopr/README.md +99 -0
  271. package/presets/autopr/autoloops.toml +22 -0
  272. package/presets/autopr/harness.md +27 -0
  273. package/presets/autopr/miniloops.toml +22 -0
  274. package/presets/autopr/roles/collector.md +55 -0
  275. package/presets/autopr/roles/drafter.md +38 -0
  276. package/presets/autopr/roles/publisher.md +28 -0
  277. package/presets/autopr/roles/validator.md +31 -0
  278. package/presets/autopr/topology.toml +32 -0
  279. package/presets/autoqa/README.md +1 -1
  280. package/presets/autoqa/autoloops.toml +1 -1
  281. package/presets/autoqa/harness.md +10 -10
  282. package/presets/autoqa/roles/executor.md +3 -3
  283. package/presets/autoqa/roles/inspector.md +2 -2
  284. package/presets/autoqa/roles/planner.md +6 -6
  285. package/presets/autoqa/roles/reporter.md +9 -9
  286. package/presets/autoresearch/README.md +1 -1
  287. package/presets/autoresearch/autoloops.toml +1 -1
  288. package/presets/autoresearch/harness.md +5 -5
  289. package/presets/autoresearch/roles/benchmarker.md +3 -3
  290. package/presets/autoresearch/roles/evaluator.md +5 -5
  291. package/presets/autoresearch/roles/implementer.md +4 -4
  292. package/presets/autoresearch/roles/strategist.md +6 -6
  293. package/presets/autoreview/README.md +1 -1
  294. package/presets/autoreview/autoloops.toml +1 -1
  295. package/presets/autoreview/harness.md +5 -5
  296. package/presets/autoreview/roles/checker.md +4 -4
  297. package/presets/autoreview/roles/reader.md +5 -5
  298. package/presets/autoreview/roles/suggester.md +4 -4
  299. package/presets/autoreview/roles/summarizer.md +4 -4
  300. package/presets/autosec/README.md +1 -1
  301. package/presets/autosec/autoloops.toml +1 -1
  302. package/presets/autosec/harness.md +5 -5
  303. package/presets/autosec/roles/analyst.md +4 -4
  304. package/presets/autosec/roles/hardener.md +2 -2
  305. package/presets/autosec/roles/reporter.md +4 -4
  306. package/presets/autosec/roles/scanner.md +3 -3
  307. package/presets/autosimplify/README.md +1 -1
  308. package/presets/autosimplify/autoloops.toml +7 -3
  309. package/presets/autosimplify/harness.md +7 -7
  310. package/presets/autosimplify/roles/reviewer.md +3 -3
  311. package/presets/autosimplify/roles/scoper.md +7 -7
  312. package/presets/autosimplify/roles/simplifier.md +4 -4
  313. package/presets/autosimplify/roles/verifier.md +3 -3
  314. package/presets/autospec/README.md +1 -1
  315. package/presets/autospec/autoloops.toml +1 -1
  316. package/presets/autospec/harness.md +6 -6
  317. package/presets/autospec/roles/clarifier.md +4 -3
  318. package/presets/autospec/roles/critic.md +1 -1
  319. package/presets/autospec/roles/designer.md +3 -3
  320. package/presets/autospec/roles/planner.md +2 -2
  321. package/presets/autospec/roles/researcher.md +3 -3
  322. package/presets/autotest/README.md +1 -1
  323. package/presets/autotest/autoloops.toml +1 -1
  324. package/presets/autotest/harness.md +6 -6
  325. package/presets/autotest/roles/assessor.md +3 -3
  326. package/presets/autotest/roles/runner.md +2 -2
  327. package/presets/autotest/roles/surveyor.md +4 -4
  328. package/presets/autotest/roles/writer.md +4 -4
@@ -3,17 +3,17 @@ This is a autoloops-native autodoc loop for documentation generation and mainten
3
3
  The loop audits existing documentation against the codebase, identifies gaps and staleness, writes or updates docs, verifies accuracy, and compiles a report — iterating until the documentation is current.
4
4
 
5
5
  Global rules:
6
- - Shared working files are the source of truth: `.autoloop/doc-plan.md`, `.autoloop/doc-report.md`, `.autoloop/progress.md`.
6
+ - Shared working files are the source of truth: `{{STATE_DIR}}/doc-plan.md`, `{{STATE_DIR}}/doc-report.md`, `{{STATE_DIR}}/progress.md`.
7
7
  - One documentation gap at a time. Do not start writing the next doc before the current one is checked.
8
8
  - Use the event tool instead of prose-only handoffs.
9
9
  - Fresh context every iteration: re-read the shared working files and the relevant source before acting.
10
10
  - Write documentation that matches the project's existing style and tone.
11
- - The writer should leave a claim-level verification checklist in `.autoloop/progress.md` so the checker can attack specific claims, commands, paths, defaults, and examples.
11
+ - The writer should leave a claim-level verification checklist in `{{STATE_DIR}}/progress.md` so the checker can attack specific claims, commands, paths, defaults, and examples.
12
12
  - Documentation must be accurate — the checker should verify every claim against the actual code and default to rejection when a meaningful claim is unverified.
13
- - Use `./.autoloop/autoloops memory add learning ...` for durable learnings.
13
+ - Use `{{TOOL_PATH}} memory add learning ...` for durable learnings.
14
14
  - Do not invent extra phases. Stay inside auditor → writer → checker → publisher.
15
15
 
16
16
  State files:
17
- - `.autoloop/doc-plan.md` — audit results: existing docs inventory, gaps found, staleness detected, prioritized list.
18
- - `.autoloop/doc-report.md` — compiled report: docs written/updated, accuracy verification results.
19
- - `.autoloop/progress.md` — current gap being addressed, what the next role should do.
17
+ - `{{STATE_DIR}}/doc-plan.md` — audit results: existing docs inventory, gaps found, staleness detected, prioritized list.
18
+ - `{{STATE_DIR}}/doc-report.md` — compiled report: docs written/updated, accuracy verification results.
19
+ - `{{STATE_DIR}}/progress.md` — current gap being addressed, what the next role should do.
@@ -8,15 +8,15 @@ Your job:
8
8
  3. Prioritize and hand one gap at a time to the writer.
9
9
 
10
10
  On every activation:
11
- - Read `.autoloop/doc-plan.md`, `.autoloop/doc-report.md`, and `.autoloop/progress.md` if they exist.
11
+ - Read `{{STATE_DIR}}/doc-plan.md`, `{{STATE_DIR}}/doc-report.md`, and `{{STATE_DIR}}/progress.md` if they exist.
12
12
  - Re-read the latest scratchpad/journal context before deciding.
13
13
 
14
14
  On first activation:
15
15
  - Inventory existing docs: READMEs, doc directories, inline doc comments, API docs, guides.
16
16
  - Compare against the codebase: what is documented, what is not, what is stale.
17
17
  - Create or refresh:
18
- - `.autoloop/doc-plan.md` — docs inventory, gaps found, staleness detected, prioritized list.
19
- - `.autoloop/progress.md` — current phase, first gap to address.
18
+ - `{{STATE_DIR}}/doc-plan.md` — docs inventory, gaps found, staleness detected, prioritized list.
19
+ - `{{STATE_DIR}}/progress.md` — current phase, first gap to address.
20
20
  - Emit `gaps.found` with the highest-priority gap.
21
21
 
22
22
  On later activations (`doc.published`):
@@ -8,7 +8,7 @@ Your job:
8
8
  3. Fail closed: if a meaningful claim was not verified, treat the doc as inaccurate.
9
9
 
10
10
  On every activation:
11
- - Read `.autoloop/doc-plan.md`, `.autoloop/doc-report.md`, and `.autoloop/progress.md`.
11
+ - Read `{{STATE_DIR}}/doc-plan.md`, `{{STATE_DIR}}/doc-report.md`, and `{{STATE_DIR}}/progress.md`.
12
12
  - Start skeptical: assume the docs are wrong until you verify them.
13
13
 
14
14
  Process:
@@ -23,7 +23,7 @@ Process:
23
23
  - look for counterexamples, renamed or missing symbols, contradictory behavior, and edge cases
24
24
  - check whether examples actually match the real interfaces and paths
25
25
  - verify stated defaults, prerequisites, and limitations from code/config/tests, not from assumptions
26
- 5. Record results in `.autoloop/progress.md`, separating:
26
+ 5. Record results in `{{STATE_DIR}}/progress.md`, separating:
27
27
  - verified claims
28
28
  - unverified claims
29
29
  - incorrect or misleading claims
@@ -8,10 +8,10 @@ Your job:
8
8
  3. Decide whether more gaps need attention.
9
9
 
10
10
  On every activation:
11
- - Read `.autoloop/doc-plan.md`, `.autoloop/doc-report.md`, and `.autoloop/progress.md`.
11
+ - Read `{{STATE_DIR}}/doc-plan.md`, `{{STATE_DIR}}/doc-report.md`, and `{{STATE_DIR}}/progress.md`.
12
12
 
13
13
  Process:
14
- 1. Update `.autoloop/doc-report.md` with the completed documentation work:
14
+ 1. Update `{{STATE_DIR}}/doc-report.md` with the completed documentation work:
15
15
  - Gap addressed
16
16
  - Files written or updated
17
17
  - Accuracy check result
@@ -20,7 +20,7 @@ Process:
20
20
  - If more gaps remain → emit `doc.published` so the auditor picks the next one.
21
21
  - If all gaps are addressed → emit `task.complete` with a summary.
22
22
 
23
- `.autoloop/doc-report.md` format:
23
+ `{{STATE_DIR}}/doc-report.md` format:
24
24
  ```
25
25
  # Documentation Report
26
26
 
@@ -8,7 +8,7 @@ Your job:
8
8
  3. Leave a concrete verification checklist for the checker instead of making the checker reconstruct your claims from scratch.
9
9
 
10
10
  On every activation:
11
- - Read `.autoloop/doc-plan.md`, `.autoloop/doc-report.md`, and `.autoloop/progress.md`.
11
+ - Read `{{STATE_DIR}}/doc-plan.md`, `{{STATE_DIR}}/doc-report.md`, and `{{STATE_DIR}}/progress.md`.
12
12
  - Understand exactly which gap you are addressing.
13
13
 
14
14
  Process:
@@ -17,8 +17,8 @@ Process:
17
17
  3. Write or update the documentation:
18
18
  - For new docs: create the file in the conventional location.
19
19
  - For stale docs: update only the parts that are incorrect or missing.
20
- 4. Update `.autoloop/progress.md` with what was written.
21
- 5. Add a `Verification checklist` section to `.autoloop/progress.md` for this gap. For every concrete claim you introduced or changed, list:
20
+ 4. Update `{{STATE_DIR}}/progress.md` with what was written.
21
+ 5. Add a `Verification checklist` section to `{{STATE_DIR}}/progress.md` for this gap. For every concrete claim you introduced or changed, list:
22
22
  - the exact claim, command, path, API name, config key, default, or example
23
23
  - where it appears in the docs
24
24
  - the code/config/test evidence the checker should verify against
@@ -33,5 +33,5 @@ Rules:
33
33
  - Do not change code. Only write documentation.
34
34
  - The verification checklist must be claim-level, not file-level. `Updated README for CLI` is too vague; list the actual claims that need checking.
35
35
  - Include copy-pasteable commands and examples in the checklist exactly as written in the docs.
36
- - If you removed a stale claim, note the removal in `.autoloop/progress.md` so the checker knows the stale statement was intentionally deleted.
36
+ - If you removed a stale claim, note the removal in `{{STATE_DIR}}/progress.md` so the checker knows the stale statement was intentionally deleted.
37
37
  - If you cannot document the gap meaningfully (e.g., the code is too unclear), emit `write.blocked` with an explanation.
@@ -1,6 +1,6 @@
1
1
  # AutoFix miniloop
2
2
 
3
- An autoloop-native bug diagnosis and repair loop.
3
+ Use when you have a bug to diagnose and repair with minimal collateral changes.
4
4
 
5
5
  AutoFix takes a bug report or failing test, reproduces the issue, traces the root cause, implements a minimal fix, and verifies the fix — all without refactoring or improving code beyond what is needed.
6
6
 
@@ -1,10 +1,13 @@
1
1
  event_loop.max_iterations = 100
2
2
  event_loop.completion_event = "task.complete"
3
3
  event_loop.completion_promise = "LOOP_COMPLETE"
4
- event_loop.required_events = ["fix.verified"]
4
+ # Note: required_events intentionally omitted. The topology already enforces
5
+ # the correct flow (diagnoser→fixer→verifier→closer→task.complete). Adding
6
+ # required_events = ["fix.verified"] would block termination when there are
7
+ # no bugs to fix, causing a degenerate spin.
5
8
 
6
9
  backend.kind = "command"
7
- backend.command = "/Users/rook/.npm-global/bin/claude"
10
+ backend.command = "claude"
8
11
  backend.timeout_ms = 3000000
9
12
  # For deterministic local harness testing only:
10
13
  # backend.kind = "command"
@@ -3,8 +3,8 @@ This is a autoloops-native autofix loop for bug diagnosis and repair.
3
3
  The loop takes a bug report or failing test, reproduces the issue, traces the root cause, implements a minimal fix, and verifies the fix — iterating if the initial attempt fails or if multiple bugs are reported.
4
4
 
5
5
  Global rules:
6
- - Shared working files are the source of truth: `.autoloop/bug-report.md`, `.autoloop/fix-log.md`, `.autoloop/progress.md`.
7
- - Preserve canonical filenames exactly as they exist on disk. If the upstream report is `qa-report.md`, keep that spelling/path everywhere; never invent `qa_report.md` or move it under `.autoloop/` unless the file really lives there.
6
+ - Shared working files are the source of truth: `{{STATE_DIR}}/bug-report.md`, `{{STATE_DIR}}/fix-log.md`, `{{STATE_DIR}}/progress.md`.
7
+ - Preserve canonical filenames exactly as they exist on disk. If the upstream report is `qa-report.md`, keep that spelling/path everywhere; never invent `qa_report.md` or move it under `{{STATE_DIR}}/` unless the file really lives there.
8
8
  - If a shared working file is missing, recreate it before continuing. Do not keep going with a guessed or broken path.
9
9
  - One bug at a time. Do not start fixing the next bug before the current one is verified and closed.
10
10
  - Use the event tool instead of prose-only handoffs.
@@ -12,13 +12,14 @@ Global rules:
12
12
  - Prefer minimal fixes. Do not refactor, clean up, or improve code beyond what is needed to fix the bug.
13
13
  - No reproduction => no diagnosis. No before/after proof => no verified fix.
14
14
  - Regression verification is mandatory: the failing test must pass, and existing tests must not break.
15
- - Record exact commands and key outputs in `.autoloop/progress.md` or `.autoloop/fix-log.md`, not just summaries.
15
+ - Record exact commands and key outputs in `{{STATE_DIR}}/progress.md` or `{{STATE_DIR}}/fix-log.md`, not just summaries.
16
16
  - When refreshing structured markdown, read the current file first. If you are replacing most of a report/progress section, rewrite it cleanly instead of relying on brittle exact-text patching.
17
17
  - Scope searches to repo paths or other paths you have confirmed exist. Do not spray `rg` or `find` across optional home-directory locations.
18
- - Use `./.autoloop/autoloops memory add learning ...` for durable learnings.
18
+ - Use `{{TOOL_PATH}} memory add learning ...` for durable learnings.
19
19
  - Do not invent extra phases. Stay inside diagnoser → fixer → verifier → closer.
20
+ - If the diagnoser finds no bugs on first activation (build passes, all tests pass, no bug report or failing test), emit `task.complete` immediately. Do not re-confirm on subsequent iterations — one clean pass is sufficient.
20
21
 
21
22
  State files:
22
- - `.autoloop/bug-report.md` — the original bug report, reproduction steps, and root cause analysis.
23
- - `.autoloop/fix-log.md` — log of fixes applied: what was changed, why, verification results.
24
- - `.autoloop/progress.md` — current bug being fixed, what the next role should do.
23
+ - `{{STATE_DIR}}/bug-report.md` — the original bug report, reproduction steps, and root cause analysis.
24
+ - `{{STATE_DIR}}/fix-log.md` — log of fixes applied: what was changed, why, verification results.
25
+ - `{{STATE_DIR}}/progress.md` — current bug being fixed, what the next role should do.
@@ -8,24 +8,24 @@ Your job:
8
8
  3. Decide whether more bugs need attention.
9
9
 
10
10
  On every activation:
11
- - Read `.autoloop/bug-report.md`, `.autoloop/fix-log.md`, and `.autoloop/progress.md`.
11
+ - Read `{{STATE_DIR}}/bug-report.md`, `{{STATE_DIR}}/fix-log.md`, and `{{STATE_DIR}}/progress.md`.
12
12
  - Start skeptical: prefer `bug.reopened` over premature `task.complete`.
13
13
 
14
14
  Process:
15
15
  1. Review the fix: is it minimal? Does it address the root cause (not just the symptom)?
16
- 2. Update `.autoloop/fix-log.md` with:
16
+ 2. Update `{{STATE_DIR}}/fix-log.md` with:
17
17
  - Bug description
18
18
  - Root cause
19
19
  - Fix applied (files changed, what changed)
20
20
  - Verification result
21
- 3. Make sure `.autoloop/progress.md` exists and names the next action using the exact on-disk bug-report path.
21
+ 3. Make sure `{{STATE_DIR}}/progress.md` exists and names the next action using the exact on-disk bug-report path.
22
22
  4. Check if there are more bugs from the original report.
23
23
  5. Decide:
24
24
  - If the fix is good and no more bugs remain → emit `task.complete` with a summary.
25
25
  - If the fix is good but more bugs remain → emit `bug.closed` so the diagnoser picks up the next one.
26
26
  - If the fix is questionable, incomplete, workaround-shaped, API-breaking without justification, or weakly verified → emit `bug.reopened` with concerns for the diagnoser to reconsider.
27
27
 
28
- `.autoloop/fix-log.md` format:
28
+ `{{STATE_DIR}}/fix-log.md` format:
29
29
  ```
30
30
  # Fix Log
31
31
 
@@ -9,17 +9,18 @@ Your job:
9
9
  4. Hand a clear diagnosis to the fixer.
10
10
 
11
11
  On every activation:
12
- - Read `.autoloop/bug-report.md`, `.autoloop/fix-log.md`, and `.autoloop/progress.md` if they exist.
12
+ - Read `{{STATE_DIR}}/bug-report.md`, `{{STATE_DIR}}/fix-log.md`, and `{{STATE_DIR}}/progress.md` if they exist.
13
13
  - Confirm any upstream bug-report or failing-test path you cite actually exists on disk, and preserve that exact spelling/path in the working files.
14
14
  - Re-read the latest scratchpad/journal context before deciding.
15
15
 
16
16
  On first activation:
17
17
  - Parse the input: bug report, error message, failing test, or user description.
18
+ - If there is no bug report, no failing test, and the build is clean: emit `task.complete` with a brief summary. Do not continue diagnosing.
18
19
  - Reproduce the bug: run the failing test or trigger the reported behavior.
19
20
  - Trace the root cause: read the relevant source, follow the execution path.
20
21
  - Create or refresh:
21
- - `.autoloop/bug-report.md` — symptom, reproduction steps, root cause analysis, affected files.
22
- - `.autoloop/progress.md` — current bug, diagnosis status.
22
+ - `{{STATE_DIR}}/bug-report.md` — symptom, reproduction steps, root cause analysis, affected files.
23
+ - `{{STATE_DIR}}/progress.md` — current bug, diagnosis status.
23
24
  - Emit `cause.found` with the root cause and which files/lines need to change.
24
25
 
25
26
  On later activations (`bug.closed` or `bug.reopened`):
@@ -29,7 +30,7 @@ On later activations (`bug.closed` or `bug.reopened`):
29
30
  - Carry forward the exact on-disk source path for the original report when you queue the next bug (`qa-report.md` is not `qa_report.md`).
30
31
 
31
32
  On `diagnosis.blocked`:
32
- - If you cannot reproduce or trace the bug, explain what you tried in `.autoloop/progress.md`.
33
+ - If you cannot reproduce or trace the bug, explain what you tried in `{{STATE_DIR}}/progress.md`.
33
34
  - Try a different approach or ask for more information by emitting `diagnosis.blocked` again with details.
34
35
 
35
36
  Rules:
@@ -37,6 +38,6 @@ Rules:
37
38
  - Be precise: `the off-by-one in line 42 of parser.rs causes the last token to be dropped` not `parser has a bug`.
38
39
  - If the bug report is vague, state what assumptions you are making.
39
40
  - Preserve canonical file paths exactly as they exist on disk (`qa-report.md` ≠ `qa_report.md`).
40
- - If you need to replace most of `.autoloop/bug-report.md`, rewrite it cleanly after reading it instead of depending on a fragile partial patch.
41
+ - If you need to replace most of `{{STATE_DIR}}/bug-report.md`, rewrite it cleanly after reading it instead of depending on a fragile partial patch.
41
42
  - Identify the minimal scope of the fix — the fixer should know exactly what to change.
42
43
  - No reproduction means no diagnosis.
@@ -7,22 +7,22 @@ Your job:
7
7
  2. Hand off to the verifier.
8
8
 
9
9
  On every activation:
10
- - Read `.autoloop/bug-report.md`, `.autoloop/fix-log.md`, and `.autoloop/progress.md`.
10
+ - Read `{{STATE_DIR}}/bug-report.md`, `{{STATE_DIR}}/fix-log.md`, and `{{STATE_DIR}}/progress.md`.
11
11
  - Understand the root cause and exactly what needs to change.
12
12
 
13
13
  Process:
14
14
  1. Read the source files identified by the diagnoser.
15
15
  2. Implement the minimal fix — change only what is necessary.
16
- 3. Update `.autoloop/progress.md` with what was changed and why.
16
+ 3. Update `{{STATE_DIR}}/progress.md` with what was changed and why.
17
17
  4. Emit `fix.applied` with a summary of the change.
18
18
 
19
19
  On `fix.failed` reactivation:
20
- - Read the verification failure details from `.autoloop/progress.md`.
20
+ - Read the verification failure details from `{{STATE_DIR}}/progress.md`.
21
21
  - Adjust the fix — the previous attempt was incorrect or incomplete.
22
22
  - Emit `fix.applied` again.
23
23
 
24
24
  Rules:
25
25
  - Minimal changes only. Do not refactor, rename, reformat, or improve surrounding code.
26
26
  - Do not change test code to make tests pass — fix the code under test.
27
- - If the fix requires changing the public API, note this in `.autoloop/progress.md` for the closer to evaluate.
27
+ - If the fix requires changing the public API, note this in `{{STATE_DIR}}/progress.md` for the closer to evaluate.
28
28
  - If you cannot fix the bug with the diagnosis provided, emit `fix.blocked` explaining what additional information is needed.
@@ -8,14 +8,14 @@ Your job:
8
8
  3. Verify that no regressions were introduced.
9
9
 
10
10
  On every activation:
11
- - Read `.autoloop/bug-report.md`, `.autoloop/fix-log.md`, and `.autoloop/progress.md`.
11
+ - Read `{{STATE_DIR}}/bug-report.md`, `{{STATE_DIR}}/fix-log.md`, and `{{STATE_DIR}}/progress.md`.
12
12
  - Start skeptical: assume the fix is insufficient until the evidence proves otherwise.
13
13
 
14
14
  Process:
15
15
  1. Run the originally failing test or reproduce the originally reported behavior.
16
16
  2. Confirm the bug is fixed — the original failure should now pass or the bad behavior should now be absent.
17
17
  3. Run the full test suite or strongest relevant regression subset to check for regressions.
18
- 4. Record exact commands, exit codes, and key output in `.autoloop/progress.md`.
18
+ 4. Record exact commands, exit codes, and key output in `{{STATE_DIR}}/progress.md`.
19
19
  5. If the fix works and no regressions survive skeptical review → emit `fix.verified`.
20
20
  6. If the fix does not resolve the bug, introduces regressions, skips required proof, or leaves evidence ambiguous → emit `fix.failed` with:
21
21
  - What still fails
@@ -1,6 +1,6 @@
1
1
  # Autoideas miniloop
2
2
 
3
- An autoloop-native loop that surveys a repository and generates a skeptically filtered improvement report.
3
+ Use when you want a skeptical audit of improvement opportunities across your repository.
4
4
 
5
5
  Shape:
6
6
  - scanner
@@ -4,7 +4,7 @@ event_loop.completion_promise = "LOOP_COMPLETE"
4
4
  event_loop.required_events = ["analysis.validated"]
5
5
 
6
6
  backend.kind = "command"
7
- backend.command = "/Users/rook/.npm-global/bin/claude"
7
+ backend.command = "claude"
8
8
  backend.timeout_ms = 3000000
9
9
 
10
10
  review.enabled = true
@@ -1,9 +1,9 @@
1
1
  This is a autoloops-native autoideas loop that surveys a repository and generates an improvement report.
2
2
 
3
- The loop scans a repo, identifies areas worth analyzing, produces concrete suggestions, validates them, and compiles an `.autoloop/ideas-report.md`.
3
+ The loop scans a repo, identifies areas worth analyzing, produces concrete suggestions, validates them, and compiles an `{{STATE_DIR}}/ideas-report.md`.
4
4
 
5
5
  Global rules:
6
- - Shared working files are the source of truth: `.autoloop/ideas-report.md`, `.autoloop/scan-areas.md`, `.autoloop/progress.md`.
6
+ - Shared working files are the source of truth: `{{STATE_DIR}}/ideas-report.md`, `{{STATE_DIR}}/scan-areas.md`, `{{STATE_DIR}}/progress.md`.
7
7
  - Inherited chain objectives may mention spec/build/simplify/QA work. In this preset, treat those as upstream context only; the actual job is to identify, validate, and report improvements, not implement them.
8
8
  - One area at a time. Do not start analyzing a new area before the current one is validated.
9
9
  - Use the event tool instead of prose-only handoffs.
@@ -11,21 +11,21 @@ Global rules:
11
11
  - Suggestions must be actionable, specific, and non-obvious. No generic advice.
12
12
  - False positives are worse than false negatives. A healthy run may reject many areas and publish only a few ideas.
13
13
  - Maintain clear role boundaries:
14
- - scanner updates `.autoloop/scan-areas.md`
15
- - analyst drafts suggestions in `.autoloop/progress.md`
16
- - reviewer records PASS/DROP verdicts in `.autoloop/progress.md`
17
- - synthesizer updates `.autoloop/ideas-report.md`
14
+ - scanner updates `{{STATE_DIR}}/scan-areas.md`
15
+ - analyst drafts suggestions in `{{STATE_DIR}}/progress.md`
16
+ - reviewer records PASS/DROP verdicts in `{{STATE_DIR}}/progress.md`
17
+ - synthesizer updates `{{STATE_DIR}}/ideas-report.md`
18
18
  - If you catch yourself doing another role's job, stop and emit the blocking or rejection event instead.
19
19
  - Do not trust summaries alone. Re-read the actual working files and source.
20
- - Use `./.autoloop/autoloops memory add learning ...` for durable learnings.
20
+ - Use `{{TOOL_PATH}} memory add learning ...` for durable learnings.
21
21
  - Do not invent extra phases. Stay inside scanner -> analyst -> reviewer -> synthesizer.
22
22
 
23
23
  Termination rules:
24
24
  - Each iteration plays exactly ONE role and emits exactly ONE event from that role's allowed set. Do not play multiple roles in one iteration.
25
- - If the scratchpad or `recent_event` shows `task.complete` has already been emitted and `.autoloop/ideas-report.md` exists with content, the loop is done. Emit `task.complete` immediately without re-reading or re-summarizing the report. Keep the output to a single sentence.
25
+ - If the scratchpad or `recent_event` shows `task.complete` has already been emitted and `{{STATE_DIR}}/ideas-report.md` exists with content, the loop is done. Emit `task.complete` immediately without re-reading or re-summarizing the report. Keep the output to a single sentence.
26
26
  - Only emit events listed in the "Allowed next events" for this iteration. Emitting out-of-scope events wastes iterations.
27
27
 
28
28
  State files:
29
- - `.autoloop/scan-areas.md` — identified areas of the repo worth analyzing, with brief rationale for each.
30
- - `.autoloop/progress.md` — current area under analysis, what the next role should do, completed areas.
31
- - `.autoloop/ideas-report.md` — the compiled output report with reviewer-validated suggestions.
29
+ - `{{STATE_DIR}}/scan-areas.md` — identified areas of the repo worth analyzing, with brief rationale for each.
30
+ - `{{STATE_DIR}}/progress.md` — current area under analysis, what the next role should do, completed areas.
31
+ - `{{STATE_DIR}}/ideas-report.md` — the compiled output report with reviewer-validated suggestions.
@@ -3,8 +3,8 @@ You are the analyst.
3
3
  Do not survey the whole repo. Do not validate your own suggestions. Your job is to deep-dive one area and produce concrete suggestions.
4
4
 
5
5
  On activation:
6
- - Read `.autoloop/progress.md` to find the current area assignment.
7
- - Read `.autoloop/scan-areas.md` for the area's context and file paths.
6
+ - Read `{{STATE_DIR}}/progress.md` to find the current area assignment.
7
+ - Read `{{STATE_DIR}}/scan-areas.md` for the area's context and file paths.
8
8
  - Read the relevant source files thoroughly.
9
9
 
10
10
  Your job:
@@ -18,10 +18,10 @@ Your job:
18
18
  - **Risk**: what could go wrong or what trade-offs exist
19
19
  - **Counterargument**: why this idea might be wrong, unnecessary, or lower value than it first appears
20
20
  - **Confidence**: high / medium / low
21
- 4. Write your suggestions to `.autoloop/progress.md` under the current area.
21
+ 4. Write your suggestions to `{{STATE_DIR}}/progress.md` under the current area.
22
22
  5. Emit `analysis.ready`.
23
23
 
24
- If you cannot produce meaningful suggestions for the area (e.g., the code is already well-structured), note that in `.autoloop/progress.md` and emit `analysis.blocked` so the scanner can re-route.
24
+ If you cannot produce meaningful suggestions for the area (e.g., the code is already well-structured), note that in `{{STATE_DIR}}/progress.md` and emit `analysis.blocked` so the scanner can re-route.
25
25
 
26
26
  Rules:
27
27
  - Suggestions must be non-obvious. Skip anything a linter would catch.
@@ -5,7 +5,7 @@ You are not the analyst. Fresh eyes matter.
5
5
  Your job is to validate the quality of the analyst's suggestions for the current area by trying to prove them weak, wrong, or not worth doing.
6
6
 
7
7
  On activation:
8
- - Read `.autoloop/progress.md` for the current area and suggestions.
8
+ - Read `{{STATE_DIR}}/progress.md` for the current area and suggestions.
9
9
  - Read the actual source files referenced by each suggestion.
10
10
  - Independently assess each suggestion.
11
11
 
@@ -18,7 +18,7 @@ Review checklist for each suggestion:
18
18
  - Is there enough source evidence to defend the idea?
19
19
  - What is the strongest reason this suggestion should be rejected?
20
20
 
21
- Record in `.autoloop/progress.md` for each suggestion:
21
+ Record in `{{STATE_DIR}}/progress.md` for each suggestion:
22
22
  - PASS or DROP
23
23
  - exact files checked
24
24
  - one sentence of evidence
@@ -32,5 +32,5 @@ Rules:
32
32
  - Default to rejection when evidence is thin.
33
33
  - It is better to publish one strong idea than five weak ones.
34
34
  - Do not add your own suggestions.
35
- - Do not update `.autoloop/ideas-report.md`. Validation only.
35
+ - Do not update `{{STATE_DIR}}/ideas-report.md`. Validation only.
36
36
  - If fewer than one or two strong ideas survive, that is a valid rejection.
@@ -10,12 +10,12 @@ Your job:
10
10
  On first activation:
11
11
  - Read the repo tree, key config files, README, and a sample of source files.
12
12
  - Create or refresh:
13
- - `.autoloop/scan-areas.md` — a prioritized list of areas worth analyzing. Each area has: name, file paths, what kind of improvement might exist (perf, DX, correctness, extensibility, etc.), and why it looks promising.
14
- - `.autoloop/progress.md` — current area, status, completed areas.
13
+ - `{{STATE_DIR}}/scan-areas.md` — a prioritized list of areas worth analyzing. Each area has: name, file paths, what kind of improvement might exist (perf, DX, correctness, extensibility, etc.), and why it looks promising.
14
+ - `{{STATE_DIR}}/progress.md` — current area, status, completed areas.
15
15
  - Choose the highest-priority area and emit `areas.identified`.
16
16
 
17
17
  On later activations (`report.updated`, `analysis.blocked`, `synthesis.blocked`):
18
- - Re-read `.autoloop/scan-areas.md`, `.autoloop/progress.md`, and `.autoloop/ideas-report.md` if it exists.
18
+ - Re-read `{{STATE_DIR}}/scan-areas.md`, `{{STATE_DIR}}/progress.md`, and `{{STATE_DIR}}/ideas-report.md` if it exists.
19
19
  - If there are remaining unanalyzed areas, pick the next highest-priority one and emit `areas.identified`.
20
20
  - If all areas have been analyzed and the report is sufficient, emit `task.complete`.
21
21
  - If the synthesizer or analyst reported a blocker, adjust the area list and re-route.
@@ -3,16 +3,16 @@ You are the synthesizer.
3
3
  Do not analyze code. Do not validate suggestions. Your job is to compile and organize.
4
4
 
5
5
  On activation:
6
- - Read `.autoloop/progress.md` for the latest validated suggestions.
7
- - Read `.autoloop/ideas-report.md` if it exists.
8
- - Read `.autoloop/scan-areas.md` to understand how many areas remain.
6
+ - Read `{{STATE_DIR}}/progress.md` for the latest validated suggestions.
7
+ - Read `{{STATE_DIR}}/ideas-report.md` if it exists.
8
+ - Read `{{STATE_DIR}}/scan-areas.md` to understand how many areas remain.
9
9
 
10
10
  Your job:
11
- 1. Incorporate the validated suggestions from the current area into `.autoloop/ideas-report.md`.
11
+ 1. Incorporate the validated suggestions from the current area into `{{STATE_DIR}}/ideas-report.md`.
12
12
  2. Organize the report clearly with sections, priorities, and effort estimates.
13
13
  3. Decide what happens next.
14
14
 
15
- Report format (`.autoloop/ideas-report.md`):
15
+ Report format (`{{STATE_DIR}}/ideas-report.md`):
16
16
  ```
17
17
  # Ideas Report
18
18
 
@@ -37,8 +37,21 @@ Brief overview of findings so far.
37
37
  Table of all suggestions ranked by impact/effort ratio.
38
38
  ```
39
39
 
40
- After updating the report:
41
- - If there are remaining unanalyzed areas in `.autoloop/scan-areas.md`, emit `report.updated` to send the scanner back for the next area.
40
+ After updating the report, do these steps IN ORDER:
41
+
42
+ **Step 1 (MANDATORY — do this FIRST or the loop breaks):**
43
+ Open `{{STATE_DIR}}/context.md` and REPLACE the `## Current State` section with updated values:
44
+ ```
45
+ ## Current State
46
+ - **Phase**: Areas 1–N complete, cycling back to scanner to dispatch Area N+1.
47
+ - **Completed**: [list every completed area with suggestion count]. Total: X validated suggestions in ideas-report.md.
48
+ - **Next area**: Area N+1 ([name]) — see scan-areas.md for details.
49
+ - **Remaining**: Areas N+1–7 pending analysis.
50
+ ```
51
+ Fill in the actual numbers. This is not optional — the scanner reads this to decide what to do next.
52
+
53
+ **Step 2:** Emit the appropriate event:
54
+ - If there are remaining unanalyzed areas in `{{STATE_DIR}}/scan-areas.md`, emit `report.updated` to send the scanner back for the next area.
42
55
  - If all areas are covered and the report is complete, emit `task.complete`.
43
56
  - If you need the scanner to re-survey (e.g., the report reveals a gap), emit `synthesis.blocked`.
44
57
 
@@ -0,0 +1,3 @@
1
+ # automerge
2
+
3
+ Use after a worktree run to merge the worktree branch back into the base branch.
@@ -0,0 +1,12 @@
1
+ event_loop.max_iterations = 1
2
+ event_loop.completion_event = "task.complete"
3
+ event_loop.completion_promise = "LOOP_COMPLETE"
4
+
5
+ backend.kind = "command"
6
+ backend.command = "claude"
7
+ backend.timeout_ms = 300000
8
+
9
+ harness.instructions_file = "harness.md"
10
+
11
+ core.state_dir = ".autoloop"
12
+ core.journal_file = ".autoloop/journal.jsonl"
@@ -0,0 +1,10 @@
1
+ <!-- category: planning -->
2
+
3
+ This preset merges a completed worktree branch back into its base branch.
4
+
5
+ It runs in the main tree (not a worktree) and should never trigger worktree isolation itself.
6
+
7
+ Instructions:
8
+ 1. Read `handoff.md` in the current work directory. The `## Parent Run` section contains `parent_run_id: <id>`.
9
+ 2. Execute `autoloop worktree merge <parent-run-id>` to merge the worktree.
10
+ 3. Report success or failure via the completion event.
@@ -0,0 +1,12 @@
1
+ event_loop.max_iterations = 1
2
+ event_loop.completion_event = "task.complete"
3
+ event_loop.completion_promise = "LOOP_COMPLETE"
4
+
5
+ backend.kind = "command"
6
+ backend.command = "claude"
7
+ backend.timeout_ms = 300000
8
+
9
+ harness.instructions_file = "harness.md"
10
+
11
+ core.state_dir = ".miniloop"
12
+ core.journal_file = ".miniloop/journal.jsonl"
@@ -0,0 +1,10 @@
1
+ You are the merge role.
2
+
3
+ Your job is to merge a completed worktree branch back into the base branch.
4
+
5
+ Steps:
6
+ 1. Read `handoff.md` in the current work directory.
7
+ 2. Find the `## Parent Run` section and extract the value after `parent_run_id: `.
8
+ 3. Run `autoloop worktree merge <run-id>` using the event tool or CLI.
9
+ 4. If the merge succeeds, emit `task.complete` with a summary of what was merged.
10
+ 5. If the merge fails (e.g. conflicts), report the failure details and emit `task.complete` with the error.
@@ -0,0 +1,10 @@
1
+ name = "automerge"
2
+ completion = "task.complete"
3
+
4
+ [[role]]
5
+ id = "merge"
6
+ emits = ["task.complete"]
7
+ prompt_file = "roles/merge.md"
8
+
9
+ [handoff]
10
+ "loop.start" = ["merge"]
@@ -1,6 +1,6 @@
1
1
  # AutoPerf miniloop
2
2
 
3
- An autoloop-native performance profiling and optimization loop.
3
+ Use when you need to profile performance bottlenecks and apply targeted optimizations.
4
4
 
5
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
6
 
@@ -4,7 +4,7 @@ event_loop.completion_promise = "LOOP_COMPLETE"
4
4
  event_loop.required_events = ["perf.measured"]
5
5
 
6
6
  backend.kind = "command"
7
- backend.command = "/Users/rook/.npm-global/bin/claude"
7
+ backend.command = "claude"
8
8
  backend.timeout_ms = 3000000
9
9
  # For deterministic local harness testing only:
10
10
  # backend.kind = "command"
@@ -3,7 +3,7 @@ This is a autoloops-native autoperf loop for performance profiling and optimizat
3
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
4
 
5
5
  Global rules:
6
- - Shared working files are the source of truth: `.autoloop/perf-profile.md`, `.autoloop/perf-log.jsonl`, `.autoloop/progress.md`.
6
+ - Shared working files are the source of truth: `{{STATE_DIR}}/perf-profile.md`, `{{STATE_DIR}}/perf-log.jsonl`, `{{STATE_DIR}}/progress.md`.
7
7
  - One optimization at a time. Do not start the next before the current one is measured and judged.
8
8
  - Use the event tool instead of prose-only handoffs.
9
9
  - Fresh context every iteration: re-read the shared working files and the relevant source before acting.
@@ -12,10 +12,10 @@ Global rules:
12
12
  - False keeps are worse than false discards.
13
13
  - Missing baseline, missing tests, changed benchmark procedure, or noisy/inconclusive results should route to retry or discard, not acceptance.
14
14
  - The judge makes keep/discard decisions. Other roles do not commit or revert.
15
- - Use `./.autoloop/autoloops memory add learning ...` for durable learnings.
15
+ - Use `{{TOOL_PATH}} memory add learning ...` for durable learnings.
16
16
  - Do not invent extra phases. Stay inside profiler → optimizer → measurer → judge.
17
17
 
18
18
  State files:
19
- - `.autoloop/perf-profile.md` — performance goal, baseline measurements, identified hot paths, optimization history.
20
- - `.autoloop/perf-log.jsonl` — append-only log. Each line: `{"id":N, "target":"...", "change":"...", "metric_before":..., "metric_after":..., "verdict":"keep|discard", "reason":"..."}`.
21
- - `.autoloop/progress.md` — current optimization target, what the next role should do.
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.
@@ -8,7 +8,7 @@ Your job:
8
8
  3. Decide whether to continue optimizing.
9
9
 
10
10
  On every activation:
11
- - Read `.autoloop/perf-profile.md`, `.autoloop/perf-log.jsonl`, and `.autoloop/progress.md`.
11
+ - Read `{{STATE_DIR}}/perf-profile.md`, `{{STATE_DIR}}/perf-log.jsonl`, and `{{STATE_DIR}}/progress.md`.
12
12
  - Start skeptical: assume discard until the win is proven.
13
13
 
14
14
  Process:
@@ -20,12 +20,12 @@ Process:
20
20
  2. Decide:
21
21
  - **Keep** only if the metric improved meaningfully, the improvement survives noise scrutiny, and tests pass.
22
22
  - **Discard** if the metric regressed, improvement is noise-level or weakly evidenced, or tests fail.
23
- 3. Append to `.autoloop/perf-log.jsonl`:
23
+ 3. Append to `{{STATE_DIR}}/perf-log.jsonl`:
24
24
  ```json
25
25
  {"id": N, "target": "...", "change": "...", "metric_before": X, "metric_after": Y, "verdict": "keep|discard", "reason": "..."}
26
26
  ```
27
27
  4. If discarded: revert the optimization (git checkout the changed files).
28
- 5. Update `.autoloop/progress.md`.
28
+ 5. Update `{{STATE_DIR}}/progress.md`.
29
29
  6. If the overall goal is met → emit `task.complete` with cumulative results.
30
30
  7. If kept → emit `optimization.kept`.
31
31
  8. If discarded → emit `optimization.discarded`.