Skip to content

Commit 0408444

Browse files
mrjfclaude
andcommitted
Move autoloop config directory from .github/autoloop/ to .autoloop/
Aligns with the w3k deployment convention — keeps autoloop config at the repo root rather than nested under .github/. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f18b420 commit 0408444

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

workflows/autoloop.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ steps:
7070
import os, json, re, glob, sys
7171
from datetime import datetime, timezone, timedelta
7272
73-
programs_dir = ".github/autoloop/programs"
74-
state_file = ".github/autoloop/state.json"
73+
programs_dir = ".autoloop/programs"
74+
state_file = ".autoloop/state.json"
7575
template_file = os.path.join(programs_dir, "example.md")
7676
7777
# Bootstrap: create programs directory and template if missing
@@ -125,7 +125,7 @@ steps:
125125
program_files = sorted(glob.glob(os.path.join(programs_dir, "*.md")))
126126
if not program_files:
127127
# Fallback to single-file locations
128-
for path in [".github/autoloop/program.md", "program.md"]:
128+
for path in [".autoloop/program.md", "program.md"]:
129129
if os.path.isfile(path):
130130
program_files = [path]
131131
break
@@ -248,18 +248,18 @@ An iterative optimization agent that proposes changes, evaluates them against a
248248
Take heed of **instructions**: "${{ steps.sanitized.outputs.text }}"
249249

250250
If these are non-empty (not ""), then you have been triggered via `/autoloop <instructions>`. The instructions may be:
251-
- **A one-off directive targeting a specific program**: e.g., `/autoloop training: try a different approach to the loss function`. The text before the colon is the program name (matching a file in `.github/autoloop/programs/`). Execute it as a single iteration for that program, then report results.
251+
- **A one-off directive targeting a specific program**: e.g., `/autoloop training: try a different approach to the loss function`. The text before the colon is the program name (matching a file in `.autoloop/programs/`). Execute it as a single iteration for that program, then report results.
252252
- **A general directive**: e.g., `/autoloop try cosine annealing`. If no program name prefix is given and only one program exists, use that one. If multiple exist, ask which program to target.
253253
- **A configuration change**: e.g., `/autoloop training: set metric to accuracy instead of loss`. Update the relevant program file and confirm.
254254

255255
Then exit — do not run the normal loop after completing the instructions.
256256

257257
## Multiple Programs
258258

259-
Autoloop supports **multiple independent optimization loops** in the same repository. Each loop is defined by a separate markdown file in `.github/autoloop/programs/`. For example:
259+
Autoloop supports **multiple independent optimization loops** in the same repository. Each loop is defined by a separate markdown file in `.autoloop/programs/`. For example:
260260

261261
```
262-
.github/autoloop/programs/
262+
.autoloop/programs/
263263
├── training.md ← optimize model training
264264
├── coverage.md ← maximize test coverage
265265
└── build-perf.md ← minimize build time
@@ -296,7 +296,7 @@ This lets you run a fast coverage check every hour while running a slow training
296296

297297
## Program Definition
298298

299-
Each program file in `.github/autoloop/programs/` defines three things:
299+
Each program file in `.autoloop/programs/` defines three things:
300300

301301
1. **Goal**: What the agent is trying to optimize (natural language description)
302302
2. **Target**: Which files the agent is allowed to modify
@@ -306,7 +306,7 @@ The **program name** is the filename without the `.md` extension (e.g., `trainin
306306

307307
### Setup Guard
308308

309-
A template program file is installed at `.github/autoloop/programs/example.md`. **Programs will not run until the user has edited them.** Each template contains a sentinel line:
309+
A template program file is installed at `.autoloop/programs/example.md`. **Programs will not run until the user has edited them.** Each template contains a sentinel line:
310310

311311
```
312312
<!-- AUTOLOOP:UNCONFIGURED -->
@@ -331,14 +331,14 @@ The pre-step has already determined which programs are due, unconfigured, or ski
331331

332332
- **`due`**: List of program names to run iterations for this run.
333333
- **`unconfigured`**: Programs that still have the sentinel or placeholder content. For each unconfigured program:
334-
1. Check whether the program file actually exists on the default branch (use `git show HEAD:.github/autoloop/programs/{name}.md`). If it does NOT exist on the default branch, **you must create a draft PR** (branch: `autoloop/setup-template`) that adds the template file. The pre-step may have created the file locally in the working directory, so it will be available to commit — just create a branch, commit it, and open the PR.
334+
1. Check whether the program file actually exists on the default branch (use `git show HEAD:.autoloop/programs/{name}.md`). If it does NOT exist on the default branch, **you must create a draft PR** (branch: `autoloop/setup-template`) that adds the template file. The pre-step may have created the file locally in the working directory, so it will be available to commit — just create a branch, commit it, and open the PR.
335335
2. If no setup issue exists for this program, create one (see Setup Guard above).
336336
3. If the file already exists on the default branch and a setup issue already exists, then no action is needed for this program.
337337
- **`skipped`**: Programs not due yet based on their per-program schedule — ignore these entirely.
338338
- **`no_programs`**: If `true`, no program files exist at all. The pre-step should have bootstrapped a template locally. Follow the same steps as `unconfigured` above — create a draft PR with the template and a setup issue.
339339

340340
For each program in `due`:
341-
1. Read the program file from `.github/autoloop/programs/{name}.md`.
341+
1. Read the program file from `.autoloop/programs/{name}.md`.
342342
2. Parse the three sections: Goal, Target, Evaluation.
343343
3. Read the current state of all target files.
344344
4. Read repo memory for that program's metric history (keyed by program name).
@@ -350,7 +350,7 @@ Each run executes **one iteration per configured program**. For each program:
350350
### Step 1: Read State
351351

352352
1. Read the program file to understand the goal, targets, and evaluation method.
353-
2. Read `.github/autoloop/state.json` for this program's `best_metric` and `iteration_count`.
353+
2. Read `.autoloop/state.json` for this program's `best_metric` and `iteration_count`.
354354
3. Read repo memory (keyed by program name) for detailed history:
355355
- `history`: Summary of recent iterations (last 20).
356356
- `rejected_approaches`: Approaches that were tried and failed (to avoid repeating).
@@ -446,7 +446,7 @@ Maintain a single open issue **per program** titled `[Autoloop: {program-name}]
446446

447447
Autoloop uses **two persistence layers**:
448448

449-
### 1. State file (`.github/autoloop/state.json`) — lightweight, committed to repo
449+
### 1. State file (`.autoloop/state.json`) — lightweight, committed to repo
450450

451451
This file is read by the **pre-step** (before the agent starts) to decide which programs are due. The agent **must update this file and commit it** at the end of every iteration. This is the only way the pre-step can check schedules, plateaus, and pause flags on future runs.
452452

0 commit comments

Comments
 (0)