@mobrienv/autoloop 0.1.2
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/README.md +145 -0
- package/bin/autoloop +2 -0
- package/dist/backend/index.d.ts +10 -0
- package/dist/backend/index.js +59 -0
- package/dist/backend/index.js.map +1 -0
- package/dist/backend/run-command.d.ts +7 -0
- package/dist/backend/run-command.js +50 -0
- package/dist/backend/run-command.js.map +1 -0
- package/dist/backend/run-mock.d.ts +1 -0
- package/dist/backend/run-mock.js +6 -0
- package/dist/backend/run-mock.js.map +1 -0
- package/dist/backend/run-pi.d.ts +5 -0
- package/dist/backend/run-pi.js +5 -0
- package/dist/backend/run-pi.js.map +1 -0
- package/dist/backend/types.d.ts +21 -0
- package/dist/backend/types.js +2 -0
- package/dist/backend/types.js.map +1 -0
- package/dist/chains/budget.d.ts +7 -0
- package/dist/chains/budget.js +42 -0
- package/dist/chains/budget.js.map +1 -0
- package/dist/chains/load.d.ts +12 -0
- package/dist/chains/load.js +80 -0
- package/dist/chains/load.js.map +1 -0
- package/dist/chains/render.d.ts +2 -0
- package/dist/chains/render.js +46 -0
- package/dist/chains/render.js.map +1 -0
- package/dist/chains/run.d.ts +17 -0
- package/dist/chains/run.js +175 -0
- package/dist/chains/run.js.map +1 -0
- package/dist/chains/types.d.ts +37 -0
- package/dist/chains/types.js +2 -0
- package/dist/chains/types.js.map +1 -0
- package/dist/chains.d.ts +5 -0
- package/dist/chains.js +5 -0
- package/dist/chains.js.map +1 -0
- package/dist/commands/chain.d.ts +1 -0
- package/dist/commands/chain.js +51 -0
- package/dist/commands/chain.js.map +1 -0
- package/dist/commands/inspect.d.ts +1 -0
- package/dist/commands/inspect.js +95 -0
- package/dist/commands/inspect.js.map +1 -0
- package/dist/commands/list.d.ts +1 -0
- package/dist/commands/list.js +12 -0
- package/dist/commands/list.js.map +1 -0
- package/dist/commands/loops.d.ts +1 -0
- package/dist/commands/loops.js +72 -0
- package/dist/commands/loops.js.map +1 -0
- package/dist/commands/memory.d.ts +1 -0
- package/dist/commands/memory.js +65 -0
- package/dist/commands/memory.js.map +1 -0
- package/dist/commands/pi-adapter.d.ts +1 -0
- package/dist/commands/pi-adapter.js +6 -0
- package/dist/commands/pi-adapter.js.map +1 -0
- package/dist/commands/run.d.ts +1 -0
- package/dist/commands/run.js +185 -0
- package/dist/commands/run.js.map +1 -0
- package/dist/config.d.ts +16 -0
- package/dist/config.js +169 -0
- package/dist/config.js.map +1 -0
- package/dist/events/decode.d.ts +2 -0
- package/dist/events/decode.js +45 -0
- package/dist/events/decode.js.map +1 -0
- package/dist/events/encode.d.ts +2 -0
- package/dist/events/encode.js +33 -0
- package/dist/events/encode.js.map +1 -0
- package/dist/events/guards.d.ts +5 -0
- package/dist/events/guards.js +42 -0
- package/dist/events/guards.js.map +1 -0
- package/dist/events/types.d.ts +25 -0
- package/dist/events/types.js +2 -0
- package/dist/events/types.js.map +1 -0
- package/dist/harness/config-helpers.d.ts +24 -0
- package/dist/harness/config-helpers.js +231 -0
- package/dist/harness/config-helpers.js.map +1 -0
- package/dist/harness/coordination.d.ts +1 -0
- package/dist/harness/coordination.js +127 -0
- package/dist/harness/coordination.js.map +1 -0
- package/dist/harness/display.d.ts +20 -0
- package/dist/harness/display.js +130 -0
- package/dist/harness/display.js.map +1 -0
- package/dist/harness/emit.d.ts +15 -0
- package/dist/harness/emit.js +220 -0
- package/dist/harness/emit.js.map +1 -0
- package/dist/harness/index.d.ts +13 -0
- package/dist/harness/index.js +124 -0
- package/dist/harness/index.js.map +1 -0
- package/dist/harness/iteration.d.ts +4 -0
- package/dist/harness/iteration.js +129 -0
- package/dist/harness/iteration.js.map +1 -0
- package/dist/harness/journal.d.ts +13 -0
- package/dist/harness/journal.js +106 -0
- package/dist/harness/journal.js.map +1 -0
- package/dist/harness/metareview.d.ts +4 -0
- package/dist/harness/metareview.js +33 -0
- package/dist/harness/metareview.js.map +1 -0
- package/dist/harness/metrics.d.ts +12 -0
- package/dist/harness/metrics.js +180 -0
- package/dist/harness/metrics.js.map +1 -0
- package/dist/harness/parallel.d.ts +37 -0
- package/dist/harness/parallel.js +158 -0
- package/dist/harness/parallel.js.map +1 -0
- package/dist/harness/prompt.d.ts +35 -0
- package/dist/harness/prompt.js +328 -0
- package/dist/harness/prompt.js.map +1 -0
- package/dist/harness/scratchpad.d.ts +2 -0
- package/dist/harness/scratchpad.js +65 -0
- package/dist/harness/scratchpad.js.map +1 -0
- package/dist/harness/stop.d.ts +5 -0
- package/dist/harness/stop.js +63 -0
- package/dist/harness/stop.js.map +1 -0
- package/dist/harness/tools.d.ts +3 -0
- package/dist/harness/tools.js +39 -0
- package/dist/harness/tools.js.map +1 -0
- package/dist/harness/types.d.ts +81 -0
- package/dist/harness/types.js +2 -0
- package/dist/harness/types.js.map +1 -0
- package/dist/harness/wave/finalize-wave.d.ts +9 -0
- package/dist/harness/wave/finalize-wave.js +60 -0
- package/dist/harness/wave/finalize-wave.js.map +1 -0
- package/dist/harness/wave/launch-branches.d.ts +6 -0
- package/dist/harness/wave/launch-branches.js +218 -0
- package/dist/harness/wave/launch-branches.js.map +1 -0
- package/dist/harness/wave/parse-objectives.d.ts +3 -0
- package/dist/harness/wave/parse-objectives.js +29 -0
- package/dist/harness/wave/parse-objectives.js.map +1 -0
- package/dist/harness/wave/types.d.ts +43 -0
- package/dist/harness/wave/types.js +2 -0
- package/dist/harness/wave/types.js.map +1 -0
- package/dist/harness/wave.d.ts +6 -0
- package/dist/harness/wave.js +98 -0
- package/dist/harness/wave.js.map +1 -0
- package/dist/json.d.ts +8 -0
- package/dist/json.js +80 -0
- package/dist/json.js.map +1 -0
- package/dist/loops/health.d.ts +14 -0
- package/dist/loops/health.js +104 -0
- package/dist/loops/health.js.map +1 -0
- package/dist/loops/list.d.ts +6 -0
- package/dist/loops/list.js +21 -0
- package/dist/loops/list.js.map +1 -0
- package/dist/loops/render.d.ts +18 -0
- package/dist/loops/render.js +87 -0
- package/dist/loops/render.js.map +1 -0
- package/dist/loops/show.d.ts +8 -0
- package/dist/loops/show.js +31 -0
- package/dist/loops/show.js.map +1 -0
- package/dist/loops/watch.d.ts +8 -0
- package/dist/loops/watch.js +77 -0
- package/dist/loops/watch.js.map +1 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.js +101 -0
- package/dist/main.js.map +1 -0
- package/dist/markdown.d.ts +10 -0
- package/dist/markdown.js +66 -0
- package/dist/markdown.js.map +1 -0
- package/dist/memory-render.d.ts +6 -0
- package/dist/memory-render.js +81 -0
- package/dist/memory-render.js.map +1 -0
- package/dist/memory.d.ts +23 -0
- package/dist/memory.js +314 -0
- package/dist/memory.js.map +1 -0
- package/dist/pi-adapter.d.ts +1 -0
- package/dist/pi-adapter.js +220 -0
- package/dist/pi-adapter.js.map +1 -0
- package/dist/registry/derive.d.ts +8 -0
- package/dist/registry/derive.js +81 -0
- package/dist/registry/derive.js.map +1 -0
- package/dist/registry/harness.d.ts +7 -0
- package/dist/registry/harness.js +57 -0
- package/dist/registry/harness.js.map +1 -0
- package/dist/registry/index.d.ts +5 -0
- package/dist/registry/index.js +5 -0
- package/dist/registry/index.js.map +1 -0
- package/dist/registry/read.d.ts +11 -0
- package/dist/registry/read.js +50 -0
- package/dist/registry/read.js.map +1 -0
- package/dist/registry/rebuild.d.ts +5 -0
- package/dist/registry/rebuild.js +19 -0
- package/dist/registry/rebuild.js.map +1 -0
- package/dist/registry/types.d.ts +19 -0
- package/dist/registry/types.js +2 -0
- package/dist/registry/types.js.map +1 -0
- package/dist/registry/update.d.ts +2 -0
- package/dist/registry/update.js +7 -0
- package/dist/registry/update.js.map +1 -0
- package/dist/testing/mock-backend.d.ts +11 -0
- package/dist/testing/mock-backend.js +76 -0
- package/dist/testing/mock-backend.js.map +1 -0
- package/dist/topology.d.ts +25 -0
- package/dist/topology.js +188 -0
- package/dist/topology.js.map +1 -0
- package/dist/usage.d.ts +8 -0
- package/dist/usage.js +114 -0
- package/dist/usage.js.map +1 -0
- package/dist/utils.d.ts +15 -0
- package/dist/utils.js +79 -0
- package/dist/utils.js.map +1 -0
- package/package.json +52 -0
- package/presets/autocode/README.md +81 -0
- package/presets/autocode/autoloops.toml +22 -0
- package/presets/autocode/harness.md +19 -0
- package/presets/autocode/miniloops.toml +22 -0
- package/presets/autocode/roles/build.md +33 -0
- package/presets/autocode/roles/critic.md +40 -0
- package/presets/autocode/roles/finalizer.md +43 -0
- package/presets/autocode/roles/planner.md +40 -0
- package/presets/autocode/topology.toml +32 -0
- package/presets/autodoc/README.md +42 -0
- package/presets/autodoc/autoloops.toml +21 -0
- package/presets/autodoc/harness.md +19 -0
- package/presets/autodoc/miniloops.toml +21 -0
- package/presets/autodoc/roles/auditor.md +39 -0
- package/presets/autodoc/roles/checker.md +43 -0
- package/presets/autodoc/roles/publisher.md +51 -0
- package/presets/autodoc/roles/writer.md +37 -0
- package/presets/autodoc/topology.toml +31 -0
- package/presets/autofix/README.md +56 -0
- package/presets/autofix/autoloops.toml +21 -0
- package/presets/autofix/harness.md +24 -0
- package/presets/autofix/miniloops.toml +21 -0
- package/presets/autofix/roles/closer.md +48 -0
- package/presets/autofix/roles/diagnoser.md +42 -0
- package/presets/autofix/roles/fixer.md +28 -0
- package/presets/autofix/roles/verifier.md +31 -0
- package/presets/autofix/topology.toml +33 -0
- package/presets/autoideas/README.md +73 -0
- package/presets/autoideas/autoloops.toml +18 -0
- package/presets/autoideas/harness.md +31 -0
- package/presets/autoideas/miniloops.toml +18 -0
- package/presets/autoideas/roles/analyst.md +32 -0
- package/presets/autoideas/roles/reviewer.md +36 -0
- package/presets/autoideas/roles/scanner.md +26 -0
- package/presets/autoideas/roles/synthesizer.md +48 -0
- package/presets/autoideas/topology.toml +32 -0
- package/presets/autoperf/README.md +56 -0
- package/presets/autoperf/autoloops.toml +21 -0
- package/presets/autoperf/harness.md +21 -0
- package/presets/autoperf/miniloops.toml +21 -0
- package/presets/autoperf/roles/judge.md +38 -0
- package/presets/autoperf/roles/measurer.md +36 -0
- package/presets/autoperf/roles/optimizer.md +35 -0
- package/presets/autoperf/roles/profiler.md +38 -0
- package/presets/autoperf/topology.toml +32 -0
- package/presets/autoqa/README.md +76 -0
- package/presets/autoqa/autoloops.toml +21 -0
- package/presets/autoqa/harness.md +30 -0
- package/presets/autoqa/miniloops.toml +21 -0
- package/presets/autoqa/roles/executor.md +43 -0
- package/presets/autoqa/roles/inspector.md +45 -0
- package/presets/autoqa/roles/planner.md +55 -0
- package/presets/autoqa/roles/reporter.md +74 -0
- package/presets/autoqa/topology.toml +31 -0
- package/presets/autoresearch/README.md +63 -0
- package/presets/autoresearch/autoloops.toml +18 -0
- package/presets/autoresearch/harness.md +28 -0
- package/presets/autoresearch/miniloops.toml +18 -0
- package/presets/autoresearch/roles/benchmarker.md +34 -0
- package/presets/autoresearch/roles/evaluator.md +33 -0
- package/presets/autoresearch/roles/implementer.md +26 -0
- package/presets/autoresearch/roles/strategist.md +43 -0
- package/presets/autoresearch/topology.toml +31 -0
- package/presets/autoreview/README.md +51 -0
- package/presets/autoreview/autoloops.toml +21 -0
- package/presets/autoreview/harness.md +20 -0
- package/presets/autoreview/miniloops.toml +21 -0
- package/presets/autoreview/roles/checker.md +36 -0
- package/presets/autoreview/roles/reader.md +33 -0
- package/presets/autoreview/roles/suggester.md +26 -0
- package/presets/autoreview/roles/summarizer.md +57 -0
- package/presets/autoreview/topology.toml +31 -0
- package/presets/autosec/README.md +51 -0
- package/presets/autosec/autoloops.toml +21 -0
- package/presets/autosec/harness.md +20 -0
- package/presets/autosec/miniloops.toml +21 -0
- package/presets/autosec/roles/analyst.md +38 -0
- package/presets/autosec/roles/hardener.md +36 -0
- package/presets/autosec/roles/reporter.md +63 -0
- package/presets/autosec/roles/scanner.md +38 -0
- package/presets/autosec/topology.toml +31 -0
- package/presets/autosimplify/README.md +83 -0
- package/presets/autosimplify/autoloops.toml +22 -0
- package/presets/autosimplify/harness.md +25 -0
- package/presets/autosimplify/miniloops.toml +22 -0
- package/presets/autosimplify/roles/reviewer.md +38 -0
- package/presets/autosimplify/roles/scoper.md +42 -0
- package/presets/autosimplify/roles/simplifier.md +51 -0
- package/presets/autosimplify/roles/verifier.md +40 -0
- package/presets/autosimplify/topology.toml +32 -0
- package/presets/autospec/README.md +84 -0
- package/presets/autospec/autoloops.toml +21 -0
- package/presets/autospec/harness.md +23 -0
- package/presets/autospec/miniloops.toml +21 -0
- package/presets/autospec/roles/clarifier.md +38 -0
- package/presets/autospec/roles/critic.md +41 -0
- package/presets/autospec/roles/designer.md +37 -0
- package/presets/autospec/roles/planner.md +38 -0
- package/presets/autospec/roles/researcher.md +33 -0
- package/presets/autospec/topology.toml +38 -0
- package/presets/autotest/README.md +55 -0
- package/presets/autotest/autoloops.toml +21 -0
- package/presets/autotest/harness.md +21 -0
- package/presets/autotest/miniloops.toml +21 -0
- package/presets/autotest/roles/assessor.md +57 -0
- package/presets/autotest/roles/runner.md +31 -0
- package/presets/autotest/roles/surveyor.md +39 -0
- package/presets/autotest/roles/writer.md +37 -0
- package/presets/autotest/topology.toml +32 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"topology.js","sourceRoot":"","sources":["../src/topology.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,IAAI,MAAM,aAAa,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAiB7D,MAAM,UAAU,eAAe,CAAC,KAAa,EAAE,QAAkB;IAC/D,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,IAAI,mBAAmB,CAAC,KAAK,EAAE,OAAO,CAAC;YAAE,OAAO,IAAI,CAAC;IACvD,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,QAAkB;IAC3C,OAAO,QAAQ,CAAC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;QAAE,OAAO,QAAQ,CAAC;IAC7B,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IACtC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;QAC5B,IAAI,OAAO,KAAK,EAAE;YAAE,OAAO,OAAO,CAAC;IACrC,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
package/dist/usage.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function printUsage(): void;
|
|
2
|
+
export declare function printRunUsage(): void;
|
|
3
|
+
export declare function printEmitUsage(): void;
|
|
4
|
+
export declare function printInspectUsage(): void;
|
|
5
|
+
export declare function printMemoryUsage(): void;
|
|
6
|
+
export declare function printMemoryAddUsage(): void;
|
|
7
|
+
export declare function missingPresetError(): void;
|
|
8
|
+
export declare function unknownPresetError(name: string): void;
|
package/dist/usage.js
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { joinCsv } from "./utils.js";
|
|
2
|
+
import * as chains from "./chains.js";
|
|
3
|
+
export function printUsage() {
|
|
4
|
+
console.log("autoloop — autonomous LLM loop harness");
|
|
5
|
+
console.log("");
|
|
6
|
+
console.log("Usage:");
|
|
7
|
+
console.log(" autoloop run <preset-name|preset-dir> [prompt...] [flags]");
|
|
8
|
+
console.log(" autoloop emit <topic> [summary]");
|
|
9
|
+
console.log(" autoloop inspect <artifact> [selector] [project-dir] [--format <md|terminal|text|json|csv>]");
|
|
10
|
+
console.log(" autoloop memory <list|add|remove> [args]");
|
|
11
|
+
console.log(" autoloop list");
|
|
12
|
+
console.log(" autoloop loops [--all]");
|
|
13
|
+
console.log(" autoloop loops show <run-id>");
|
|
14
|
+
console.log(" autoloop loops artifacts <run-id>");
|
|
15
|
+
console.log(" autoloop loops watch <run-id>");
|
|
16
|
+
console.log(" autoloop loops health [--verbose]");
|
|
17
|
+
console.log(" autoloop chain <list|run> [args]");
|
|
18
|
+
console.log("");
|
|
19
|
+
console.log("The preset argument is required for `run`. It must be a bundled preset");
|
|
20
|
+
console.log("name (e.g. autocode, autoqa) or a path to a directory containing");
|
|
21
|
+
console.log("autoloops.toml. Use `.` to run from the current directory.");
|
|
22
|
+
console.log("");
|
|
23
|
+
console.log("Flags:");
|
|
24
|
+
console.log(" -h, --help Show this help");
|
|
25
|
+
console.log(" -v, --verbose Set log level to debug");
|
|
26
|
+
console.log(" -b, --backend Override backend command");
|
|
27
|
+
console.log(" -p, --preset Resolve a bundled preset name or custom preset dir");
|
|
28
|
+
console.log(" --chain Run an inline chain (comma-separated presets)");
|
|
29
|
+
}
|
|
30
|
+
export function printRunUsage() {
|
|
31
|
+
console.log("Usage: autoloop run <preset-name|preset-dir> [prompt...] [flags]");
|
|
32
|
+
console.log("");
|
|
33
|
+
console.log("The preset argument is required. It must be a bundled preset name");
|
|
34
|
+
console.log("(e.g. autocode, autoqa) or a path to a directory containing");
|
|
35
|
+
console.log("autoloops.toml. Use `.` to run from the current directory.");
|
|
36
|
+
console.log("");
|
|
37
|
+
console.log("Flags:");
|
|
38
|
+
console.log(" -h, --help Show this help");
|
|
39
|
+
console.log(" -v, --verbose Set log level to debug");
|
|
40
|
+
console.log(" -b, --backend Override backend command");
|
|
41
|
+
console.log(" -p, --preset Resolve a bundled preset name or custom preset dir");
|
|
42
|
+
console.log(" --chain Run an inline chain (comma-separated presets)");
|
|
43
|
+
console.log("");
|
|
44
|
+
console.log("Examples:");
|
|
45
|
+
console.log(" autoloop run autocode");
|
|
46
|
+
console.log(' autoloop run autocode "Fix the login bug"');
|
|
47
|
+
console.log(' autoloop run presets/autoqa "QA recent changes"');
|
|
48
|
+
console.log(' autoloop run . "Run from current directory"');
|
|
49
|
+
console.log("");
|
|
50
|
+
console.log("Run 'autoloop list' to see all available presets.");
|
|
51
|
+
}
|
|
52
|
+
export function printEmitUsage() {
|
|
53
|
+
console.log("Usage:");
|
|
54
|
+
console.log(" autoloop emit <topic> [summary]");
|
|
55
|
+
}
|
|
56
|
+
export function printInspectUsage() {
|
|
57
|
+
console.log("Usage:");
|
|
58
|
+
console.log(" autoloop inspect <artifact> [selector] [project-dir] [--format <md|terminal|text|json|csv>]");
|
|
59
|
+
console.log("");
|
|
60
|
+
console.log("Defaults when --format is omitted:");
|
|
61
|
+
console.log(" scratchpad, prompt, memory, coordination, chain, metrics -> terminal");
|
|
62
|
+
console.log(" output -> text");
|
|
63
|
+
console.log(" journal -> json");
|
|
64
|
+
console.log("");
|
|
65
|
+
console.log("Artifacts:");
|
|
66
|
+
console.log(" scratchpad, prompt, output, journal, memory, coordination, chain, metrics");
|
|
67
|
+
}
|
|
68
|
+
export function printMemoryUsage() {
|
|
69
|
+
console.log("Usage:");
|
|
70
|
+
console.log(" autoloop memory list [project-dir]");
|
|
71
|
+
console.log(" autoloop memory status [project-dir]");
|
|
72
|
+
console.log(" autoloop memory find <pattern...>");
|
|
73
|
+
console.log(" autoloop memory add learning <text...>");
|
|
74
|
+
console.log(" autoloop memory add preference <category> <text...>");
|
|
75
|
+
console.log(" autoloop memory add meta <key> <value...>");
|
|
76
|
+
console.log(" autoloop memory remove <id> [reason...]");
|
|
77
|
+
}
|
|
78
|
+
export function printMemoryAddUsage() {
|
|
79
|
+
console.log("Usage:");
|
|
80
|
+
console.log(" autoloop memory add learning <text...>");
|
|
81
|
+
console.log(" autoloop memory add preference <category> <text...>");
|
|
82
|
+
console.log(" autoloop memory add meta <key> <value...>");
|
|
83
|
+
console.log("");
|
|
84
|
+
console.log("Memory helpers:");
|
|
85
|
+
console.log(" autoloop memory status [project-dir]");
|
|
86
|
+
console.log(" autoloop memory find <pattern...>");
|
|
87
|
+
console.log(" autoloop memory remove <id> [reason...]");
|
|
88
|
+
}
|
|
89
|
+
export function missingPresetError() {
|
|
90
|
+
console.log("error: missing required preset argument");
|
|
91
|
+
console.log("");
|
|
92
|
+
console.log("Usage: autoloop run <preset-name|preset-dir> [prompt...] [flags]");
|
|
93
|
+
console.log("");
|
|
94
|
+
console.log("Examples:");
|
|
95
|
+
console.log(" autoloop run autocode");
|
|
96
|
+
console.log(' autoloop run autocode "Fix the login bug"');
|
|
97
|
+
console.log(' autoloop run presets/autoqa "QA recent changes"');
|
|
98
|
+
console.log(' autoloop run . "Run from current directory"');
|
|
99
|
+
console.log("");
|
|
100
|
+
console.log("Run 'autoloop list' to see all available presets.");
|
|
101
|
+
}
|
|
102
|
+
export function unknownPresetError(name) {
|
|
103
|
+
console.log("error: preset `" + name + "` not found");
|
|
104
|
+
console.log("");
|
|
105
|
+
console.log("The argument `" + name + "` is not a valid preset name or directory.");
|
|
106
|
+
console.log("A preset must be a directory containing autoloops.toml (or autoloops.conf),");
|
|
107
|
+
console.log("or a bundled preset name.");
|
|
108
|
+
console.log("");
|
|
109
|
+
console.log("Available presets: " + joinCsv(chains.listKnownPresets()));
|
|
110
|
+
console.log("Run 'autoloop list' to see all available presets.");
|
|
111
|
+
console.log("");
|
|
112
|
+
console.log("Usage: autoloop run <preset-name|preset-dir> [prompt...] [flags]");
|
|
113
|
+
}
|
|
114
|
+
//# sourceMappingURL=usage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usage.js","sourceRoot":"","sources":["../src/usage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC,MAAM,UAAU,UAAU;IACxB,OAAO,CAAC,GAAG,CAAC,wCAAwC,CAAC,CAAC;IACtD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACtB,OAAO,CAAC,GAAG,CAAC,6DAA6D,CAAC,CAAC;IAC3E,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;IACjD,OAAO,CAAC,GAAG,CAAC,+FAA+F,CAAC,CA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export declare function listContains(list: string[], needle: string): boolean;
|
|
2
|
+
export declare function listText(list: string[]): string;
|
|
3
|
+
export declare function splitCsv(text: string): string[];
|
|
4
|
+
export declare function parseStringList(value: string): string[];
|
|
5
|
+
export declare function joinCsv(items: string[]): string;
|
|
6
|
+
export declare function lineSep(): string;
|
|
7
|
+
export declare function joinLines(lines: string[]): string;
|
|
8
|
+
export declare function nonemptyOr(value: string, fallback: string): string;
|
|
9
|
+
export declare function shellQuote(text: string): string;
|
|
10
|
+
export declare function replaceAll(text: string, pattern: string, replacement: string): string;
|
|
11
|
+
export declare function shellWords(parts: string[]): string;
|
|
12
|
+
export declare function stripQuotes(value: string): string;
|
|
13
|
+
export declare function isQuoted(value: string): boolean;
|
|
14
|
+
export declare function sliceOuter(text: string): string;
|
|
15
|
+
export declare function generateCompactId(prefix: string): string;
|
package/dist/utils.js
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { randomBytes } from "node:crypto";
|
|
2
|
+
export function listContains(list, needle) {
|
|
3
|
+
return list.includes(needle);
|
|
4
|
+
}
|
|
5
|
+
export function listText(list) {
|
|
6
|
+
if (list.length === 0)
|
|
7
|
+
return "(none)";
|
|
8
|
+
return list.join(", ");
|
|
9
|
+
}
|
|
10
|
+
export function splitCsv(text) {
|
|
11
|
+
return text
|
|
12
|
+
.split(",")
|
|
13
|
+
.map((s) => s.trim())
|
|
14
|
+
.filter((s) => s !== "");
|
|
15
|
+
}
|
|
16
|
+
export function parseStringList(value) {
|
|
17
|
+
return parseStringListCsv(value.trim());
|
|
18
|
+
}
|
|
19
|
+
function parseStringListCsv(value) {
|
|
20
|
+
if (value.startsWith("[") && value.endsWith("]")) {
|
|
21
|
+
return parseStringListCsv(sliceOuter(value).trim());
|
|
22
|
+
}
|
|
23
|
+
return value
|
|
24
|
+
.split(",")
|
|
25
|
+
.map((s) => stripQuotes(s.trim()))
|
|
26
|
+
.filter((s) => s !== "");
|
|
27
|
+
}
|
|
28
|
+
export function joinCsv(items) {
|
|
29
|
+
return items.join(",");
|
|
30
|
+
}
|
|
31
|
+
export function lineSep() {
|
|
32
|
+
return "\n";
|
|
33
|
+
}
|
|
34
|
+
export function joinLines(lines) {
|
|
35
|
+
return lines.join(lineSep());
|
|
36
|
+
}
|
|
37
|
+
export function nonemptyOr(value, fallback) {
|
|
38
|
+
return value === "" ? fallback : value;
|
|
39
|
+
}
|
|
40
|
+
export function shellQuote(text) {
|
|
41
|
+
return "'" + replaceAll(text, "'", "'\"'\"'") + "'";
|
|
42
|
+
}
|
|
43
|
+
export function replaceAll(text, pattern, replacement) {
|
|
44
|
+
return text.split(pattern).join(replacement);
|
|
45
|
+
}
|
|
46
|
+
export function shellWords(parts) {
|
|
47
|
+
return parts.map(shellQuote).join(" ");
|
|
48
|
+
}
|
|
49
|
+
export function stripQuotes(value) {
|
|
50
|
+
return isQuoted(value) ? sliceOuter(value) : value;
|
|
51
|
+
}
|
|
52
|
+
export function isQuoted(value) {
|
|
53
|
+
return (value.startsWith('"') && value.endsWith('"') && value.length >= 2);
|
|
54
|
+
}
|
|
55
|
+
export function sliceOuter(text) {
|
|
56
|
+
return text.slice(1, -1);
|
|
57
|
+
}
|
|
58
|
+
export function generateCompactId(prefix) {
|
|
59
|
+
const ts = Date.now();
|
|
60
|
+
const encoded = intToBase36(ts);
|
|
61
|
+
const suffix = randomSuffix();
|
|
62
|
+
return `${prefix}-${encoded}-${suffix}`;
|
|
63
|
+
}
|
|
64
|
+
function randomSuffix() {
|
|
65
|
+
return randomBytes(16).toString("hex").slice(0, 4).toLowerCase();
|
|
66
|
+
}
|
|
67
|
+
function intToBase36(n) {
|
|
68
|
+
if (n === 0)
|
|
69
|
+
return "0";
|
|
70
|
+
const chars = "0123456789abcdefghijklmnopqrstuvwxyz";
|
|
71
|
+
let result = "";
|
|
72
|
+
let val = n;
|
|
73
|
+
while (val > 0) {
|
|
74
|
+
result = chars[val % 36] + result;
|
|
75
|
+
val = Math.floor(val / 36);
|
|
76
|
+
}
|
|
77
|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AI,CAAC,CAClE,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,IAAY;IACrC,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAC3B,CAAC;AAGD,MAAM,UAAU,iBAAiB,CAAC,MAAc;IAC9C,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IACtB,MAAM,OAAO,GAAG,WAAW,CAAC,EAAE,CAAC,CAAC;IAChC,MAAM,MAAM,GAAG,YAAY,EAAE,CAAC;IAC9B,OAAO,GAAG,MAAM,IAAI,OAAO,IAAI,MAAM,EAAE,CAAC;AAC1C,CAAC;AAED,SAAS,YAAY;IACnB,OAAO,WAAW,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;AACnE,CAAC;AAED,SAAS,WAAW,CAAC,CAAS;IAC5B,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,GAAG,CAAC;IACxB,MAAM,KAAK,GAAG,sCAAsC,CAAC;IACrD,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,IAAI,GAAG,GAAG,CAAC,CAAC;IACZ,OAAO,GAAG,GAAG,CAAC,EAAE,CAAC;QACf,MAAM,GAAG,KAAK,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,MAAM,CAAC;QAClC,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC;IAC7B,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mobrienv/autoloop",
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "Autonomous LLM loop harness and control plane for long-horizon autonomous work",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/main.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"autoloop": "bin/autoloop"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"bin/autoloop",
|
|
12
|
+
"dist",
|
|
13
|
+
"presets",
|
|
14
|
+
"README.md"
|
|
15
|
+
],
|
|
16
|
+
"engines": {
|
|
17
|
+
"node": ">=18"
|
|
18
|
+
},
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/mikeyobrien/autoloop.git"
|
|
22
|
+
},
|
|
23
|
+
"homepage": "https://github.com/mikeyobrien/autoloop#readme",
|
|
24
|
+
"bugs": {
|
|
25
|
+
"url": "https://github.com/mikeyobrien/autoloop/issues"
|
|
26
|
+
},
|
|
27
|
+
"keywords": [
|
|
28
|
+
"ai",
|
|
29
|
+
"agents",
|
|
30
|
+
"autonomous",
|
|
31
|
+
"cli",
|
|
32
|
+
"loops",
|
|
33
|
+
"orchestration"
|
|
34
|
+
],
|
|
35
|
+
"publishConfig": {
|
|
36
|
+
"access": "public",
|
|
37
|
+
"provenance": true
|
|
38
|
+
},
|
|
39
|
+
"scripts": {
|
|
40
|
+
"build": "tsc",
|
|
41
|
+
"test": "node --experimental-vm-modules node_modules/.bin/vitest run",
|
|
42
|
+
"test:watch": "node --experimental-vm-modules node_modules/.bin/vitest"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@types/node": "^25.5.2",
|
|
46
|
+
"typescript": "^5.7.0",
|
|
47
|
+
"vitest": "^3.0.0"
|
|
48
|
+
},
|
|
49
|
+
"dependencies": {
|
|
50
|
+
"@iarna/toml": "^2.2.5"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Autocode miniloop
|
|
2
|
+
|
|
3
|
+
An autoloop-native port of Ralph's code-assist/autocode loop.
|
|
4
|
+
|
|
5
|
+
Shape:
|
|
6
|
+
- planner
|
|
7
|
+
- builder
|
|
8
|
+
- critic
|
|
9
|
+
- finalizer
|
|
10
|
+
|
|
11
|
+
Shared state lives in project files plus the autoloops journal. One active step is tracked in `.autoloop/progress.md`.
|
|
12
|
+
|
|
13
|
+
## Fail-closed contract
|
|
14
|
+
|
|
15
|
+
Autocode is not an approval machine.
|
|
16
|
+
|
|
17
|
+
- Planner decomposes work into the next smallest slice.
|
|
18
|
+
- Builder implements and proves the slice.
|
|
19
|
+
- Critic tries to break the slice, including independently running a manual smoke test that exercises the builder's changed code path whenever a practical manual surface is available, and rejects on missing evidence.
|
|
20
|
+
- Finalizer tries to prove the whole task is still incomplete before allowing completion.
|
|
21
|
+
|
|
22
|
+
Success is evidence-based, not prose-based. Only the finalizer may emit `task.complete`.
|
|
23
|
+
|
|
24
|
+
## Files
|
|
25
|
+
|
|
26
|
+
- `autoloops.toml` — loop + backend config
|
|
27
|
+
- `topology.toml` — role deck + handoff graph
|
|
28
|
+
- `harness.md` — shared harness rules loaded every iteration
|
|
29
|
+
- `roles/planner.md`
|
|
30
|
+
- `roles/build.md`
|
|
31
|
+
- `roles/critic.md`
|
|
32
|
+
- `roles/finalizer.md`
|
|
33
|
+
|
|
34
|
+
## Shared working files created by the loop
|
|
35
|
+
|
|
36
|
+
The planner is expected to create and maintain:
|
|
37
|
+
- `.autoloop/context.md`
|
|
38
|
+
- `.autoloop/plan.md`
|
|
39
|
+
- `.autoloop/progress.md`
|
|
40
|
+
- `.autoloop/logs/`
|
|
41
|
+
|
|
42
|
+
## Backend
|
|
43
|
+
|
|
44
|
+
This preset assumes the built-in Pi adapter:
|
|
45
|
+
|
|
46
|
+
```toml
|
|
47
|
+
backend.kind = "pi"
|
|
48
|
+
backend.command = "pi"
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Pi is the only supported real adapter path here.
|
|
52
|
+
|
|
53
|
+
For deterministic local harness debugging only, switch to the repo mock backend:
|
|
54
|
+
|
|
55
|
+
```toml
|
|
56
|
+
backend.kind = "command"
|
|
57
|
+
backend.command = "../../examples/mock-backend.sh"
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Run
|
|
61
|
+
|
|
62
|
+
From this repo root:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
autoloop run autocode "Add a --verbose flag to the CLI"
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
For a one-off Claude dogfood run without editing config:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
autoloop -b claude -p autocode "Add a --verbose flag to the CLI"
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Intended input styles
|
|
75
|
+
|
|
76
|
+
The planner prompt supports the same three broad entry modes as Ralph's code-assist preset:
|
|
77
|
+
- a rough implementation request
|
|
78
|
+
- a single `.code-task.md` file path
|
|
79
|
+
- an existing implementation/spec directory
|
|
80
|
+
|
|
81
|
+
The planner must normalize that into the shared working files and then hand off one concrete next slice.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
event_loop.max_iterations = 100
|
|
2
|
+
event_loop.completion_event = "task.complete"
|
|
3
|
+
event_loop.completion_promise = "LOOP_COMPLETE"
|
|
4
|
+
# Require the critic and finalizer gates before completion is considered valid.
|
|
5
|
+
event_loop.required_events = ["review.passed"]
|
|
6
|
+
|
|
7
|
+
backend.kind = "command"
|
|
8
|
+
backend.command = "/Users/rook/.npm-global/bin/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"
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
This project is a autoloops-native port of Ralph's code-assist/autocode preset.
|
|
2
|
+
|
|
3
|
+
Global rules:
|
|
4
|
+
- Shared working files are the source of truth: `.autoloop/context.md`, `.autoloop/plan.md`, `.autoloop/progress.md`, and `.autoloop/logs/`.
|
|
5
|
+
- Keep only one concrete slice active at a time.
|
|
6
|
+
- Use the event tool instead of prose-only handoffs.
|
|
7
|
+
- Fresh context every iteration: re-read the shared working files and the relevant source before acting.
|
|
8
|
+
- Prefer small, verifiable changes.
|
|
9
|
+
- Verification is mandatory before `review.ready`, `review.passed`, or `task.complete`.
|
|
10
|
+
- The critic should independently run a manual smoke test that exercises the builder's changed code path whenever the repo exposes a practical manual surface; otherwise the critic should say why no such smoke path exists.
|
|
11
|
+
- Missing evidence means no success. No role may treat another role's assertion as proof.
|
|
12
|
+
- Every success handoff should cite exact files changed, exact verification command(s), and commit hash when applicable.
|
|
13
|
+
- After a slice is implemented and verified, commit it before `review.ready` or any later handoff. Every completed slice should land as its own commit. Avoid carrying verified but uncommitted work into the next iteration.
|
|
14
|
+
- Do not dismiss a relevant issue as merely pre-existing. If it matters to the current objective, touched surface, or verification path, you must fix it now, make it the next slice, explicitly defer it with rationale in `.autoloop/progress.md`, or prove it is out of scope.
|
|
15
|
+
- Maintain a `Relevant Issues` section in `.autoloop/progress.md`. Every relevant issue must have an explicit disposition: `fix-now`, `fix-next`, `deferred`, or `out-of-scope`.
|
|
16
|
+
- Use `./.autoloop/autoloops memory add learning ...` for durable repo/process learnings.
|
|
17
|
+
- Do not invent extra phases. Stay inside planner → builder → critic → finalizer.
|
|
18
|
+
- Only the finalizer may emit `task.complete`.
|
|
19
|
+
- If the prompt is a path to a `.code-task.md` file or an existing implementation directory, use that as source material instead of treating it like plain prose.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
event_loop.max_iterations = 100
|
|
2
|
+
event_loop.completion_event = "task.complete"
|
|
3
|
+
event_loop.completion_promise = "LOOP_COMPLETE"
|
|
4
|
+
# Require the critic and finalizer gates before completion is considered valid.
|
|
5
|
+
event_loop.required_events = ["review.passed"]
|
|
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"
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
You are the builder.
|
|
2
|
+
|
|
3
|
+
Implement exactly the active slice from the latest `tasks.ready` handoff.
|
|
4
|
+
|
|
5
|
+
On every activation:
|
|
6
|
+
- Re-read `.autoloop/context.md`, `.autoloop/plan.md`, and `.autoloop/progress.md`.
|
|
7
|
+
- Re-read the source files named in the current slice.
|
|
8
|
+
- Update `.autoloop/progress.md` with what you are doing and how you will verify it.
|
|
9
|
+
|
|
10
|
+
Process:
|
|
11
|
+
1. Understand the active slice and its acceptance criteria.
|
|
12
|
+
2. Prefer test-first work when the repo has a test harness for the area.
|
|
13
|
+
3. Make the smallest code change that satisfies the slice.
|
|
14
|
+
4. Run the strongest focused verification you can for that slice.
|
|
15
|
+
5. Commit the completed slice before handoff. Each completed slice should land as its own commit.
|
|
16
|
+
6. Record concise evidence in `.autoloop/progress.md` and longer output in `.autoloop/logs/` when useful, including the commit hash when available.
|
|
17
|
+
7. Emit `review.ready` with:
|
|
18
|
+
- what changed
|
|
19
|
+
- what was verified
|
|
20
|
+
- the slice commit hash
|
|
21
|
+
- any known risk or uncertainty
|
|
22
|
+
|
|
23
|
+
If blocked:
|
|
24
|
+
- Record the reason in `.autoloop/progress.md`.
|
|
25
|
+
- Emit `build.blocked` with a concrete blocker and the safest next planning move.
|
|
26
|
+
|
|
27
|
+
Rules:
|
|
28
|
+
- One slice per turn.
|
|
29
|
+
- No opportunistic side quests.
|
|
30
|
+
- No final completion decisions.
|
|
31
|
+
- No fake verification.
|
|
32
|
+
- Do not emit `review.ready` for an uncommitted completed slice.
|
|
33
|
+
- If confidence is shaky, choose the narrower, more reversible change and document why.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
You are the critic.
|
|
2
|
+
|
|
3
|
+
You are not the builder. Fresh eyes matter.
|
|
4
|
+
|
|
5
|
+
Your job is to challenge the latest increment and try to prove it is not ready.
|
|
6
|
+
|
|
7
|
+
On activation:
|
|
8
|
+
- Re-read `.autoloop/context.md`, `.autoloop/plan.md`, and `.autoloop/progress.md`.
|
|
9
|
+
- Inspect the changed files and the builder's stated verification.
|
|
10
|
+
- Re-run the strongest relevant checks yourself when possible.
|
|
11
|
+
- Run at least one manual smoke test that actually exercises the builder's changed code path whenever the repo exposes a practical manual surface (for example an existing smoke script, CLI invocation, dev server flow, or reproducible app path). Run it yourself instead of relying only on the builder's checks. If no practical manual smoke path exists, say that explicitly.
|
|
12
|
+
- Treat the builder's summary as a hint, not proof.
|
|
13
|
+
|
|
14
|
+
Review checklist:
|
|
15
|
+
- Did the builder actually satisfy the active slice?
|
|
16
|
+
- Did they silently skip an obvious edge case or acceptance criterion?
|
|
17
|
+
- Is there needless complexity or speculative work?
|
|
18
|
+
- Does the code fit the surrounding repo style?
|
|
19
|
+
- Did the claimed verification really cover the change?
|
|
20
|
+
- Did you run your own manual smoke test that exercised the builder's changed code path when a practical manual path existed?
|
|
21
|
+
- Can you independently validate the claim from code plus evidence?
|
|
22
|
+
- Is the verified slice committed, with `git status --short` clean except for intentional unrelated files?
|
|
23
|
+
- Were all relevant issues discovered during the slice given an explicit disposition in `.autoloop/progress.md`?
|
|
24
|
+
- Did anyone try to dismiss a relevant issue just because it was pre-existing?
|
|
25
|
+
|
|
26
|
+
Emit (only these two events — never emit builder events like `review.ready` or `build.blocked`):
|
|
27
|
+
- `review.rejected` when there is a concrete miss, bug, regression risk, failed verification, untested acceptance criterion, overbuilt solution worth fixing now, verified-but-uncommitted work that should be committed before handoff, or any relevant issue that was left unowned / untracked / ambiguously deferred.
|
|
28
|
+
- `review.passed` only when the current slice survives skeptical review, the verified slice is committed, and all relevant issues have explicit ownership or disposition.
|
|
29
|
+
|
|
30
|
+
Rules:
|
|
31
|
+
- Default to rejection when evidence is incomplete.
|
|
32
|
+
- Be concrete, not vague.
|
|
33
|
+
- Prefer one strong objection over a pile of weak ones.
|
|
34
|
+
- Do not rewrite the whole solution unless the current slice is fundamentally wrong.
|
|
35
|
+
- Do not approve with "fix later" caveats.
|
|
36
|
+
- If checks passed but the builder left the repo dirty, require a commit before `review.passed`.
|
|
37
|
+
- Reject any slice that mentions or reveals a relevant issue without recording whether it is `fix-now`, `fix-next`, `deferred`, or `out-of-scope`.
|
|
38
|
+
- `pre-existing` is never by itself a valid reason to ignore a relevant issue.
|
|
39
|
+
- If you cannot independently validate the builder's claim from code plus evidence, reject.
|
|
40
|
+
- If the changed code had a practical manual execution path and you did not run it yourself, treat the evidence as incomplete and reject. If no such path existed, say that explicitly.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
You are the finalizer.
|
|
2
|
+
|
|
3
|
+
You are the last gate before loop completion.
|
|
4
|
+
|
|
5
|
+
Your job is not just to ask whether the latest diff is okay.
|
|
6
|
+
Your job is to decide whether the whole requested outcome is complete or whether the loop should continue.
|
|
7
|
+
|
|
8
|
+
On activation:
|
|
9
|
+
- Re-read `.autoloop/context.md`, `.autoloop/plan.md`, and `.autoloop/progress.md`.
|
|
10
|
+
- Reconcile the latest reviewed slice against the whole request.
|
|
11
|
+
- Check whether the numbered plan still has unfinished steps.
|
|
12
|
+
- Check whether the current step is truly exhausted.
|
|
13
|
+
- Run the strongest end-to-end verification you can for the whole visible outcome.
|
|
14
|
+
- Build an explicit completion checklist before deciding.
|
|
15
|
+
|
|
16
|
+
Emit (only these three events — never emit critic events like `review.passed` or `review.rejected`):
|
|
17
|
+
- `queue.advance` if the latest slice passed review but more planned work remains or whole-task proof is still incomplete.
|
|
18
|
+
- `finalization.failed` if the latest slice is not good enough or whole-task consistency is still broken.
|
|
19
|
+
- `task.complete` only when:
|
|
20
|
+
- the requested outcome is satisfied,
|
|
21
|
+
- the numbered plan is complete,
|
|
22
|
+
- no obvious missing slice remains,
|
|
23
|
+
- the strongest available verification passed,
|
|
24
|
+
- the repo is in a clean committed state for the accepted work,
|
|
25
|
+
- and no relevant issue remains unowned, ambiguously deferred, or hand-waved as pre-existing.
|
|
26
|
+
|
|
27
|
+
Required completion checklist:
|
|
28
|
+
- requested outcome satisfied
|
|
29
|
+
- numbered plan complete
|
|
30
|
+
- end-to-end verification recorded
|
|
31
|
+
- accepted work committed
|
|
32
|
+
- repo clean
|
|
33
|
+
- remaining issues all explicitly dispositioned
|
|
34
|
+
|
|
35
|
+
Rules:
|
|
36
|
+
- Be stricter than the critic about whole-task completeness.
|
|
37
|
+
- Prefer one more loop over premature completion.
|
|
38
|
+
- Do not invent new requirements.
|
|
39
|
+
- Do not use `task.complete` just because one small slice passed review.
|
|
40
|
+
- If the work is done but the accepted changes are still uncommitted, commit them before `task.complete`.
|
|
41
|
+
- Do not allow `task.complete` while `.autoloop/progress.md` still contains a relevant issue with no clear disposition or owner.
|
|
42
|
+
- `pre-existing` is not a valid completion rationale for a relevant issue.
|
|
43
|
+
- Missing evidence means no completion.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
You are the planner.
|
|
2
|
+
|
|
3
|
+
Do not implement. Do not review.
|
|
4
|
+
|
|
5
|
+
Your job:
|
|
6
|
+
1. Normalize the user's request into shared working files.
|
|
7
|
+
2. Decide the next smallest meaningful slice.
|
|
8
|
+
3. Hand exactly one concrete slice to the builder.
|
|
9
|
+
|
|
10
|
+
On every activation:
|
|
11
|
+
- Read `.autoloop/context.md`, `.autoloop/plan.md`, and `.autoloop/progress.md` if they exist.
|
|
12
|
+
- If the objective text points at a `.code-task.md` file, read it.
|
|
13
|
+
- If the objective text points at an existing implementation/spec directory, inspect that directory.
|
|
14
|
+
- Re-read the latest scratchpad/journal context before deciding the next slice.
|
|
15
|
+
|
|
16
|
+
On first activation:
|
|
17
|
+
- Create or refresh:
|
|
18
|
+
- `.autoloop/context.md` — request summary, source type, constraints, repo patterns, acceptance criteria
|
|
19
|
+
- `.autoloop/plan.md` — numbered high-level steps, not a blob checklist
|
|
20
|
+
- `.autoloop/progress.md` — current step, active slice, verification notes, completed steps
|
|
21
|
+
- `.autoloop/logs/` directory if useful
|
|
22
|
+
- Choose only Step 1's current slice.
|
|
23
|
+
- Emit `tasks.ready` with a payload that includes:
|
|
24
|
+
- current step
|
|
25
|
+
- active slice
|
|
26
|
+
- files likely to change
|
|
27
|
+
- verification target
|
|
28
|
+
|
|
29
|
+
On later activations (`queue.advance` or `build.blocked`):
|
|
30
|
+
- Re-read the shared working files.
|
|
31
|
+
- If the current step still has unfinished work, hand the next smallest slice in the same step.
|
|
32
|
+
- If the current step is complete, mark it complete in `.autoloop/progress.md`, advance to the next numbered step, and emit the next `tasks.ready`.
|
|
33
|
+
- Planner never emits completion. If the plan appears done, leave that proof to the critic/finalizer path instead of self-certifying success.
|
|
34
|
+
|
|
35
|
+
Rules:
|
|
36
|
+
- One active slice only.
|
|
37
|
+
- Be specific enough that the builder can act without guessing.
|
|
38
|
+
- Prefer vertical slices over broad refactors.
|
|
39
|
+
- Do not create future-step work early just because you can imagine it.
|
|
40
|
+
- Do not treat another role's summary as proof. The slice should be defined so later roles can reject it from concrete evidence.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name = "autocode"
|
|
2
|
+
completion = "task.complete"
|
|
3
|
+
|
|
4
|
+
[[role]]
|
|
5
|
+
id = "planner"
|
|
6
|
+
emits = ["tasks.ready"]
|
|
7
|
+
prompt_file = "roles/planner.md"
|
|
8
|
+
|
|
9
|
+
[[role]]
|
|
10
|
+
id = "builder"
|
|
11
|
+
emits = ["review.ready", "build.blocked"]
|
|
12
|
+
prompt_file = "roles/build.md"
|
|
13
|
+
|
|
14
|
+
[[role]]
|
|
15
|
+
id = "critic"
|
|
16
|
+
emits = ["review.passed", "review.rejected"]
|
|
17
|
+
prompt_file = "roles/critic.md"
|
|
18
|
+
|
|
19
|
+
[[role]]
|
|
20
|
+
id = "finalizer"
|
|
21
|
+
emits = ["queue.advance", "finalization.failed", "task.complete"]
|
|
22
|
+
prompt_file = "roles/finalizer.md"
|
|
23
|
+
|
|
24
|
+
[handoff]
|
|
25
|
+
"loop.start" = ["planner"]
|
|
26
|
+
"queue.advance" = ["planner"]
|
|
27
|
+
"build.blocked" = ["planner"]
|
|
28
|
+
"tasks.ready" = ["builder"]
|
|
29
|
+
"review.ready" = ["critic"]
|
|
30
|
+
"review.rejected" = ["builder"]
|
|
31
|
+
"review.passed" = ["finalizer"]
|
|
32
|
+
"finalization.failed" = ["builder"]
|