@mobrienv/autoloop 0.4.0 → 0.7.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.
- package/LICENSE +21 -0
- package/README.md +40 -14
- package/bin/autoloop +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/testing/mock-backend.js +3 -5
- package/dist/testing/mock-backend.js.map +1 -1
- package/package.json +32 -23
- package/plugins/autoloop/.claude-plugin/plugin.json +1 -1
- package/dist/agent-map.d.ts +0 -10
- package/dist/agent-map.js +0 -58
- package/dist/agent-map.js.map +0 -1
- package/dist/backend/acp-client.d.ts +0 -38
- package/dist/backend/acp-client.js +0 -293
- package/dist/backend/acp-client.js.map +0 -1
- package/dist/backend/index.d.ts +0 -10
- package/dist/backend/index.js +0 -71
- package/dist/backend/index.js.map +0 -1
- package/dist/backend/kiro-bridge.d.ts +0 -19
- package/dist/backend/kiro-bridge.js +0 -114
- package/dist/backend/kiro-bridge.js.map +0 -1
- package/dist/backend/kiro-worker.d.ts +0 -1
- package/dist/backend/kiro-worker.js +0 -96
- package/dist/backend/kiro-worker.js.map +0 -1
- package/dist/backend/run-command.d.ts +0 -7
- package/dist/backend/run-command.js +0 -50
- package/dist/backend/run-command.js.map +0 -1
- package/dist/backend/run-kiro.d.ts +0 -3
- package/dist/backend/run-kiro.js +0 -16
- package/dist/backend/run-kiro.js.map +0 -1
- package/dist/backend/run-mock.d.ts +0 -1
- package/dist/backend/run-mock.js +0 -6
- package/dist/backend/run-mock.js.map +0 -1
- package/dist/backend/run-pi.d.ts +0 -5
- package/dist/backend/run-pi.js +0 -5
- package/dist/backend/run-pi.js.map +0 -1
- package/dist/backend/types.d.ts +0 -21
- package/dist/backend/types.js +0 -2
- package/dist/backend/types.js.map +0 -1
- package/dist/chains/budget.d.ts +0 -7
- package/dist/chains/budget.js +0 -54
- package/dist/chains/budget.js.map +0 -1
- package/dist/chains/load.d.ts +0 -18
- package/dist/chains/load.js +0 -129
- package/dist/chains/load.js.map +0 -1
- package/dist/chains/render.d.ts +0 -2
- package/dist/chains/render.js +0 -74
- package/dist/chains/render.js.map +0 -1
- package/dist/chains/run.d.ts +0 -17
- package/dist/chains/run.js +0 -260
- package/dist/chains/run.js.map +0 -1
- package/dist/chains/types.d.ts +0 -38
- package/dist/chains/types.js +0 -2
- package/dist/chains/types.js.map +0 -1
- package/dist/chains.d.ts +0 -6
- package/dist/chains.js +0 -5
- package/dist/chains.js.map +0 -1
- package/dist/cli/color.d.ts +0 -6
- package/dist/cli/color.js +0 -40
- package/dist/cli/color.js.map +0 -1
- package/dist/commands/chain.d.ts +0 -1
- package/dist/commands/chain.js +0 -53
- package/dist/commands/chain.js.map +0 -1
- package/dist/commands/config.d.ts +0 -1
- package/dist/commands/config.js +0 -74
- package/dist/commands/config.js.map +0 -1
- package/dist/commands/dashboard.d.ts +0 -1
- package/dist/commands/dashboard.js +0 -68
- package/dist/commands/dashboard.js.map +0 -1
- package/dist/commands/guide.d.ts +0 -1
- package/dist/commands/guide.js +0 -33
- package/dist/commands/guide.js.map +0 -1
- package/dist/commands/inspect.d.ts +0 -1
- package/dist/commands/inspect.js +0 -243
- package/dist/commands/inspect.js.map +0 -1
- package/dist/commands/list.d.ts +0 -1
- package/dist/commands/list.js +0 -15
- package/dist/commands/list.js.map +0 -1
- package/dist/commands/loops.d.ts +0 -1
- package/dist/commands/loops.js +0 -72
- package/dist/commands/loops.js.map +0 -1
- package/dist/commands/memory.d.ts +0 -1
- package/dist/commands/memory.js +0 -65
- package/dist/commands/memory.js.map +0 -1
- package/dist/commands/pi-adapter.d.ts +0 -1
- package/dist/commands/pi-adapter.js +0 -6
- package/dist/commands/pi-adapter.js.map +0 -1
- package/dist/commands/run.d.ts +0 -1
- package/dist/commands/run.js +0 -292
- package/dist/commands/run.js.map +0 -1
- package/dist/commands/runs.d.ts +0 -1
- package/dist/commands/runs.js +0 -50
- package/dist/commands/runs.js.map +0 -1
- package/dist/commands/task.d.ts +0 -1
- package/dist/commands/task.js +0 -74
- package/dist/commands/task.js.map +0 -1
- package/dist/commands/worktree.d.ts +0 -1
- package/dist/commands/worktree.js +0 -162
- package/dist/commands/worktree.js.map +0 -1
- package/dist/config.d.ts +0 -31
- package/dist/config.js +0 -261
- package/dist/config.js.map +0 -1
- package/dist/dashboard/app.d.ts +0 -12
- package/dist/dashboard/app.js +0 -23
- package/dist/dashboard/app.js.map +0 -1
- package/dist/dashboard/routes/api.d.ts +0 -3
- package/dist/dashboard/routes/api.js +0 -186
- package/dist/dashboard/routes/api.js.map +0 -1
- package/dist/dashboard/routes/pages.d.ts +0 -2
- package/dist/dashboard/routes/pages.js +0 -16
- package/dist/dashboard/routes/pages.js.map +0 -1
- package/dist/dashboard/views/alpine-vendor.d.ts +0 -1
- package/dist/dashboard/views/alpine-vendor.js +0 -10
- package/dist/dashboard/views/alpine-vendor.js.map +0 -1
- package/dist/dashboard/views/shell.d.ts +0 -1
- package/dist/dashboard/views/shell.js +0 -1062
- package/dist/dashboard/views/shell.js.map +0 -1
- package/dist/events/decode.d.ts +0 -2
- package/dist/events/decode.js +0 -45
- package/dist/events/decode.js.map +0 -1
- package/dist/events/encode.d.ts +0 -2
- package/dist/events/encode.js +0 -33
- package/dist/events/encode.js.map +0 -1
- package/dist/events/guards.d.ts +0 -5
- package/dist/events/guards.js +0 -42
- package/dist/events/guards.js.map +0 -1
- package/dist/events/types.d.ts +0 -27
- package/dist/events/types.js +0 -2
- package/dist/events/types.js.map +0 -1
- package/dist/harness/artifacts.d.ts +0 -50
- package/dist/harness/artifacts.js +0 -333
- package/dist/harness/artifacts.js.map +0 -1
- package/dist/harness/config-helpers.d.ts +0 -35
- package/dist/harness/config-helpers.js +0 -409
- package/dist/harness/config-helpers.js.map +0 -1
- package/dist/harness/coordination.d.ts +0 -1
- package/dist/harness/coordination.js +0 -127
- package/dist/harness/coordination.js.map +0 -1
- package/dist/harness/display.d.ts +0 -21
- package/dist/harness/display.js +0 -176
- package/dist/harness/display.js.map +0 -1
- package/dist/harness/emit.d.ts +0 -15
- package/dist/harness/emit.js +0 -240
- package/dist/harness/emit.js.map +0 -1
- package/dist/harness/index.d.ts +0 -20
- package/dist/harness/index.js +0 -311
- package/dist/harness/index.js.map +0 -1
- package/dist/harness/iteration.d.ts +0 -16
- package/dist/harness/iteration.js +0 -131
- package/dist/harness/iteration.js.map +0 -1
- package/dist/harness/journal-format.d.ts +0 -25
- package/dist/harness/journal-format.js +0 -153
- package/dist/harness/journal-format.js.map +0 -1
- package/dist/harness/journal.d.ts +0 -31
- package/dist/harness/journal.js +0 -178
- package/dist/harness/journal.js.map +0 -1
- package/dist/harness/metareview.d.ts +0 -4
- package/dist/harness/metareview.js +0 -48
- package/dist/harness/metareview.js.map +0 -1
- package/dist/harness/metrics.d.ts +0 -12
- package/dist/harness/metrics.js +0 -180
- package/dist/harness/metrics.js.map +0 -1
- package/dist/harness/parallel.d.ts +0 -37
- package/dist/harness/parallel.js +0 -237
- package/dist/harness/parallel.js.map +0 -1
- package/dist/harness/prompt.d.ts +0 -46
- package/dist/harness/prompt.js +0 -403
- package/dist/harness/prompt.js.map +0 -1
- package/dist/harness/scratchpad.d.ts +0 -2
- package/dist/harness/scratchpad.js +0 -67
- package/dist/harness/scratchpad.js.map +0 -1
- package/dist/harness/stop.d.ts +0 -5
- package/dist/harness/stop.js +0 -70
- package/dist/harness/stop.js.map +0 -1
- package/dist/harness/tools.d.ts +0 -3
- package/dist/harness/tools.js +0 -65
- package/dist/harness/tools.js.map +0 -1
- package/dist/harness/types.d.ts +0 -110
- package/dist/harness/types.js +0 -2
- package/dist/harness/types.js.map +0 -1
- package/dist/harness/wave/finalize-wave.d.ts +0 -9
- package/dist/harness/wave/finalize-wave.js +0 -87
- package/dist/harness/wave/finalize-wave.js.map +0 -1
- package/dist/harness/wave/launch-branches.d.ts +0 -6
- package/dist/harness/wave/launch-branches.js +0 -314
- package/dist/harness/wave/launch-branches.js.map +0 -1
- package/dist/harness/wave/parse-objectives.d.ts +0 -3
- package/dist/harness/wave/parse-objectives.js +0 -32
- package/dist/harness/wave/parse-objectives.js.map +0 -1
- package/dist/harness/wave/types.d.ts +0 -43
- package/dist/harness/wave/types.js +0 -2
- package/dist/harness/wave/types.js.map +0 -1
- package/dist/harness/wave.d.ts +0 -6
- package/dist/harness/wave.js +0 -159
- package/dist/harness/wave.js.map +0 -1
- package/dist/isolation/index.d.ts +0 -4
- package/dist/isolation/index.js +0 -3
- package/dist/isolation/index.js.map +0 -1
- package/dist/isolation/resolve.d.ts +0 -39
- package/dist/isolation/resolve.js +0 -118
- package/dist/isolation/resolve.js.map +0 -1
- package/dist/isolation/run-scope.d.ts +0 -21
- package/dist/isolation/run-scope.js +0 -50
- package/dist/isolation/run-scope.js.map +0 -1
- package/dist/json.d.ts +0 -8
- package/dist/json.js +0 -82
- package/dist/json.js.map +0 -1
- package/dist/loops/health.d.ts +0 -17
- package/dist/loops/health.js +0 -152
- package/dist/loops/health.js.map +0 -1
- package/dist/loops/list.d.ts +0 -6
- package/dist/loops/list.js +0 -21
- package/dist/loops/list.js.map +0 -1
- package/dist/loops/policy.d.ts +0 -6
- package/dist/loops/policy.js +0 -41
- package/dist/loops/policy.js.map +0 -1
- package/dist/loops/render.d.ts +0 -19
- package/dist/loops/render.js +0 -100
- package/dist/loops/render.js.map +0 -1
- package/dist/loops/show.d.ts +0 -8
- package/dist/loops/show.js +0 -31
- package/dist/loops/show.js.map +0 -1
- package/dist/loops/watch.d.ts +0 -14
- package/dist/loops/watch.js +0 -143
- package/dist/loops/watch.js.map +0 -1
- package/dist/main.d.ts +0 -1
- package/dist/main.js +0 -148
- package/dist/main.js.map +0 -1
- package/dist/markdown.d.ts +0 -10
- package/dist/markdown.js +0 -66
- package/dist/markdown.js.map +0 -1
- package/dist/memory-render.d.ts +0 -6
- package/dist/memory-render.js +0 -81
- package/dist/memory-render.js.map +0 -1
- package/dist/memory.d.ts +0 -22
- package/dist/memory.js +0 -318
- package/dist/memory.js.map +0 -1
- package/dist/pi-adapter.d.ts +0 -1
- package/dist/pi-adapter.js +0 -220
- package/dist/pi-adapter.js.map +0 -1
- package/dist/profiles.d.ts +0 -12
- package/dist/profiles.js +0 -71
- package/dist/profiles.js.map +0 -1
- package/dist/registry/derive.d.ts +0 -8
- package/dist/registry/derive.js +0 -88
- package/dist/registry/derive.js.map +0 -1
- package/dist/registry/discover.d.ts +0 -20
- package/dist/registry/discover.js +0 -98
- package/dist/registry/discover.js.map +0 -1
- package/dist/registry/harness.d.ts +0 -7
- package/dist/registry/harness.js +0 -63
- package/dist/registry/harness.js.map +0 -1
- package/dist/registry/index.d.ts +0 -6
- package/dist/registry/index.js +0 -6
- package/dist/registry/index.js.map +0 -1
- package/dist/registry/read.d.ts +0 -11
- package/dist/registry/read.js +0 -50
- package/dist/registry/read.js.map +0 -1
- package/dist/registry/rebuild.d.ts +0 -5
- package/dist/registry/rebuild.js +0 -22
- package/dist/registry/rebuild.js.map +0 -1
- package/dist/registry/types.d.ts +0 -28
- package/dist/registry/types.js +0 -2
- package/dist/registry/types.js.map +0 -1
- package/dist/registry/update.d.ts +0 -2
- package/dist/registry/update.js +0 -7
- package/dist/registry/update.js.map +0 -1
- package/dist/tasks-render.d.ts +0 -2
- package/dist/tasks-render.js +0 -44
- package/dist/tasks-render.js.map +0 -1
- package/dist/tasks.d.ts +0 -24
- package/dist/tasks.js +0 -184
- package/dist/tasks.js.map +0 -1
- package/dist/topology.d.ts +0 -31
- package/dist/topology.js +0 -309
- package/dist/topology.js.map +0 -1
- package/dist/usage.d.ts +0 -9
- package/dist/usage.js +0 -160
- package/dist/usage.js.map +0 -1
- package/dist/utils.d.ts +0 -21
- package/dist/utils.js +0 -349
- package/dist/utils.js.map +0 -1
- package/dist/worktree/clean.d.ts +0 -12
- package/dist/worktree/clean.js +0 -113
- package/dist/worktree/clean.js.map +0 -1
- package/dist/worktree/create.d.ts +0 -14
- package/dist/worktree/create.js +0 -71
- package/dist/worktree/create.js.map +0 -1
- package/dist/worktree/index.d.ts +0 -10
- package/dist/worktree/index.js +0 -6
- package/dist/worktree/index.js.map +0 -1
- package/dist/worktree/list.d.ts +0 -9
- package/dist/worktree/list.js +0 -24
- package/dist/worktree/list.js.map +0 -1
- package/dist/worktree/merge.d.ts +0 -11
- package/dist/worktree/merge.js +0 -129
- package/dist/worktree/merge.js.map +0 -1
- package/dist/worktree/meta.d.ts +0 -17
- package/dist/worktree/meta.js +0 -34
- package/dist/worktree/meta.js.map +0 -1
- package/presets/autocode/README.md +0 -81
- package/presets/autocode/autoloops.toml +0 -30
- package/presets/autocode/harness.md +0 -26
- package/presets/autocode/miniloops.toml +0 -22
- package/presets/autocode/roles/build.md +0 -34
- package/presets/autocode/roles/critic.md +0 -40
- package/presets/autocode/roles/finalizer.md +0 -43
- package/presets/autocode/roles/planner.md +0 -40
- package/presets/autocode/topology.toml +0 -32
- package/presets/autodebug/README.md +0 -50
- package/presets/autodebug/autoloops.toml +0 -18
- package/presets/autodebug/harness.md +0 -31
- package/presets/autodebug/roles/fixer.md +0 -58
- package/presets/autodebug/roles/investigator.md +0 -52
- package/presets/autodebug/roles/strategist.md +0 -45
- package/presets/autodebug/roles/verifier.md +0 -66
- package/presets/autodebug/topology.toml +0 -34
- package/presets/autodoc/README.md +0 -42
- package/presets/autodoc/autoloops.toml +0 -21
- package/presets/autodoc/harness.md +0 -19
- package/presets/autodoc/miniloops.toml +0 -21
- package/presets/autodoc/roles/auditor.md +0 -39
- package/presets/autodoc/roles/checker.md +0 -43
- package/presets/autodoc/roles/publisher.md +0 -51
- package/presets/autodoc/roles/writer.md +0 -37
- package/presets/autodoc/topology.toml +0 -31
- package/presets/autofix/README.md +0 -56
- package/presets/autofix/autoloops.toml +0 -24
- package/presets/autofix/harness.md +0 -25
- package/presets/autofix/miniloops.toml +0 -21
- package/presets/autofix/roles/closer.md +0 -48
- package/presets/autofix/roles/diagnoser.md +0 -43
- package/presets/autofix/roles/fixer.md +0 -28
- package/presets/autofix/roles/verifier.md +0 -31
- package/presets/autofix/topology.toml +0 -33
- package/presets/autoideas/README.md +0 -73
- package/presets/autoideas/autoloops.toml +0 -18
- package/presets/autoideas/harness.md +0 -31
- package/presets/autoideas/miniloops.toml +0 -18
- package/presets/autoideas/roles/analyst.md +0 -32
- package/presets/autoideas/roles/reviewer.md +0 -36
- package/presets/autoideas/roles/scanner.md +0 -26
- package/presets/autoideas/roles/synthesizer.md +0 -61
- package/presets/autoideas/topology.toml +0 -32
- package/presets/automerge/README.md +0 -3
- package/presets/automerge/autoloops.toml +0 -12
- package/presets/automerge/harness.md +0 -10
- package/presets/automerge/miniloops.toml +0 -12
- package/presets/automerge/roles/merge.md +0 -10
- package/presets/automerge/topology.toml +0 -10
- package/presets/autoperf/README.md +0 -56
- package/presets/autoperf/autoloops.toml +0 -21
- package/presets/autoperf/harness.md +0 -21
- package/presets/autoperf/miniloops.toml +0 -21
- package/presets/autoperf/roles/judge.md +0 -38
- package/presets/autoperf/roles/measurer.md +0 -36
- package/presets/autoperf/roles/optimizer.md +0 -35
- package/presets/autoperf/roles/profiler.md +0 -38
- package/presets/autoperf/topology.toml +0 -32
- package/presets/autopr/README.md +0 -99
- package/presets/autopr/autoloops.toml +0 -22
- package/presets/autopr/harness.md +0 -27
- package/presets/autopr/miniloops.toml +0 -22
- package/presets/autopr/roles/collector.md +0 -55
- package/presets/autopr/roles/drafter.md +0 -38
- package/presets/autopr/roles/publisher.md +0 -28
- package/presets/autopr/roles/validator.md +0 -31
- package/presets/autopr/topology.toml +0 -32
- package/presets/autopreset/README.md +0 -35
- package/presets/autopreset/autoloops.toml +0 -18
- package/presets/autopreset/harness.md +0 -38
- package/presets/autopreset/roles/designer.md +0 -33
- package/presets/autopreset/roles/finalizer.md +0 -23
- package/presets/autopreset/roles/generator.md +0 -34
- package/presets/autopreset/roles/validator.md +0 -31
- package/presets/autopreset/topology.toml +0 -32
- package/presets/autoqa/README.md +0 -105
- package/presets/autoqa/autoloops.toml +0 -21
- package/presets/autoqa/harness.md +0 -52
- package/presets/autoqa/miniloops.toml +0 -21
- package/presets/autoqa/roles/executor.md +0 -96
- package/presets/autoqa/roles/inspector.md +0 -100
- package/presets/autoqa/roles/planner.md +0 -87
- package/presets/autoqa/roles/reporter.md +0 -117
- package/presets/autoqa/topology.toml +0 -31
- package/presets/autoresearch/README.md +0 -63
- package/presets/autoresearch/autoloops.toml +0 -18
- package/presets/autoresearch/harness.md +0 -28
- package/presets/autoresearch/miniloops.toml +0 -18
- package/presets/autoresearch/roles/benchmarker.md +0 -34
- package/presets/autoresearch/roles/evaluator.md +0 -33
- package/presets/autoresearch/roles/implementer.md +0 -26
- package/presets/autoresearch/roles/strategist.md +0 -43
- package/presets/autoresearch/topology.toml +0 -31
- package/presets/autoreview/README.md +0 -51
- package/presets/autoreview/autoloops.toml +0 -21
- package/presets/autoreview/harness.md +0 -20
- package/presets/autoreview/miniloops.toml +0 -21
- package/presets/autoreview/roles/checker.md +0 -36
- package/presets/autoreview/roles/reader.md +0 -33
- package/presets/autoreview/roles/suggester.md +0 -26
- package/presets/autoreview/roles/summarizer.md +0 -57
- package/presets/autoreview/topology.toml +0 -31
- package/presets/autosec/README.md +0 -51
- package/presets/autosec/autoloops.toml +0 -21
- package/presets/autosec/harness.md +0 -20
- package/presets/autosec/miniloops.toml +0 -21
- package/presets/autosec/roles/analyst.md +0 -38
- package/presets/autosec/roles/hardener.md +0 -36
- package/presets/autosec/roles/reporter.md +0 -63
- package/presets/autosec/roles/scanner.md +0 -38
- package/presets/autosec/topology.toml +0 -31
- package/presets/autosimplify/README.md +0 -83
- package/presets/autosimplify/autoloops.toml +0 -26
- package/presets/autosimplify/harness.md +0 -25
- package/presets/autosimplify/miniloops.toml +0 -22
- package/presets/autosimplify/roles/reviewer.md +0 -38
- package/presets/autosimplify/roles/scoper.md +0 -42
- package/presets/autosimplify/roles/simplifier.md +0 -51
- package/presets/autosimplify/roles/verifier.md +0 -40
- package/presets/autosimplify/topology.toml +0 -32
- package/presets/autospec/README.md +0 -84
- package/presets/autospec/autoloops.toml +0 -21
- package/presets/autospec/harness.md +0 -23
- package/presets/autospec/miniloops.toml +0 -21
- package/presets/autospec/roles/clarifier.md +0 -39
- package/presets/autospec/roles/critic.md +0 -41
- package/presets/autospec/roles/designer.md +0 -37
- package/presets/autospec/roles/planner.md +0 -38
- package/presets/autospec/roles/researcher.md +0 -33
- package/presets/autospec/topology.toml +0 -38
- package/presets/autotest/README.md +0 -55
- package/presets/autotest/autoloops.toml +0 -21
- package/presets/autotest/harness.md +0 -21
- package/presets/autotest/miniloops.toml +0 -21
- package/presets/autotest/roles/assessor.md +0 -57
- package/presets/autotest/roles/runner.md +0 -31
- package/presets/autotest/roles/surveyor.md +0 -39
- package/presets/autotest/roles/writer.md +0 -37
- 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"]
|
package/presets/autopr/README.md
DELETED
|
@@ -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.
|