Add autoloop — autonomous improvement loop (karpathy/autoresearch) - #27
Merged
Conversation
…esearch Three files, zero new Go code: workflows/autoloop.yml — 8-step deterministic loop via Go engine: baseline → audit → fix → measure → compare → branch(keep/revert) → loop Each cycle is a discrete, auditable experiment. Metric measurement is its own step. Keep/revert is a branch decision, not agent judgment. Scratchpad prevents repeating failed approaches. skills/autoloop/SKILL.md — triggers on "autoloop", asks clarifying questions (objective, metric, direction, iterations, scope), auto-detects metric from stack, then invokes the workflow. commands/autoloop.md — slash command for direct invocation.
Critical:
- Add AUTOLOOP_COMPLETE path to revert step (was missing — all-revert
loops would burn entire budget with no exit)
- Add iteration counting in both keep and revert steps
Warnings:
- Remove {{revert}}{{keep}} from audit (undefined on first iteration),
rely on scratchpad instead
- Add SCORE: sentinel for structured numeric extraction
- Add DIRECTION: sentinel for structured comparison
Suggestions:
- Baseline now reports AUTOLOOP_ERROR if metric command fails
- Replace git add -A with targeted file staging (protect untracked work)
- Replace git clean -fd with targeted checkout (protect untracked files)
- Fix step now tracks MODIFIED FILES for targeted git operations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Autonomous codebase improvement loop inspired by karpathy/autoresearch. Three files, zero new Go code — YAML workflow executed by the existing Go engine.
How it works
Each cycle is a discrete, auditable experiment:
Key design decisions
Files
workflows/autoloop.yml— 8-step workflow with branch-loop patternskills/autoloop/SKILL.md— triggers on "autoloop", gathers inputscommands/autoloop.md— slash commandTest plan
devkit workflow autoloopgo test -cover ./...