You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-Program issue: `[Autoloop: {program-name}]` (a single GitHub issue labeled `autoloop-program` — created automatically for file-based programs, the source issue for issue-based programs — that hosts the status comment, per-iteration comments, and human steering)
206
207
- Long-running branch: `autoloop/{program-name}` (persists across iterations)
207
208
- Single draft PR per program: `[Autoloop: {program-name}]` (accumulates all accepted iterations)
208
209
- State file: `{program-name}.md` in repo-memory (all state: scheduling, research context, iteration history)
@@ -288,10 +289,10 @@ Examples:
288
289
289
290
Each program has three coordinated resources:
290
291
-**Branch + PR**: `autoloop/{program-name}` with a single draft PR
291
-
-**Steering Issue**: `[Autoloop: {program-name}] Steering` — persistent GitHub issue linking branch, PR, and state
292
+
-**Program Issue**: `[Autoloop: {program-name}]` — a single GitHub issue (labeled `autoloop-program`) that hosts the status comment, per-iteration comments, and human steering. For issue-based programs this is the source issue. For file-based programs it is auto-created on the first run.
292
293
-**State File**: `{program-name}.md` in repo-memory — all state, history, and research context
293
294
294
-
All three reference each other. The steering issue is created on the first accepted iteration and updated with links to the PR and state.
295
+
All three reference each other. The program issue is created (or, for issue-based programs, adopted) on the first run and updated with links to the PR and state.
295
296
296
297
## Iteration Loop
297
298
@@ -346,15 +347,15 @@ Each run executes **one iteration for the single selected program**:
346
347
2. Push the commit to the long-running branch.
347
348
3. If a draft PR does not already exist for this branch, create one:
348
349
- Title: `[Autoloop: {program-name}]`
349
-
- Body includes: a summary of the program goal, link to the steering issue, the current best metric, and AI disclosure: `🤖 *This PR is maintained by Autoloop. Each accepted iteration adds a commit to this branch.*`
350
+
- Body includes: a summary of the program goal, link to the program issue, the current best metric, and AI disclosure: `🤖 *This PR is maintained by Autoloop. Each accepted iteration adds a commit to this branch.*`
350
351
If a draft PR already exists, update the PR body with the latest metric and a summary of the most recent accepted iteration. Add a comment to the PR summarizing the iteration: what changed, old metric, new metric, improvement delta, and a link to the actions run.
351
-
4. Ensure the steering issue exists (see [Steering Issue](#steering-issue) below). Add a comment to the steering issue linking to the commit and actions run.
352
+
4. Ensure the program issue exists (see [Program Issue](#program-issue) below) — for file-based programs that have no program issue yet (`selected_issue` is null in `/tmp/gh-aw/autoloop.json`), create one and record its number in the state file's `Issue` field.
352
353
5. Update the state file `{program-name}.md` in the repo-memory folder:
353
354
- Update the **⚙️ Machine State** table: reset `consecutive_errors` to 0, set `best_metric`, increment `iteration_count`, set `last_run` to current UTC timestamp, append `"accepted"` to `recent_statuses` (keep last 10), set `paused` to false.
354
355
- Prepend an entry to **📊 Iteration History** (newest first) with status ✅, metric, PR link, and a one-line summary of what changed and why it worked.
355
356
- Update **📚 Lessons Learned** if this iteration revealed something new about the problem or what works.
356
357
- Update **🔭 Future Directions** if this iteration opened new promising paths.
357
-
6.**If this is an issue-based program** (`selected_issue` is not null): update the status comment and post a per-run comment on the source issue (see [Issue-Based Program Updates](#issue-based-program-updates)).
358
+
6.**Update the program issue**: edit the status comment and post a per-iteration comment on the program issue (see [Program Issue](#program-issue)).
358
359
7.**Check halting condition** (see [Halting Condition](#halting-condition)): If the program has a `target-metric` in its frontmatter and the new `best_metric` meets or surpasses the target, mark the program as completed.
359
360
360
361
**If the metric did not improve**:
@@ -364,58 +365,41 @@ Each run executes **one iteration for the single selected program**:
364
365
- Prepend an entry to **📊 Iteration History** with status ❌, metric, and a one-line summary of what was tried.
365
366
- If this approach is conclusively ruled out (e.g., tried multiple variations and all fail), add it to **🚧 Foreclosed Avenues** with a clear explanation.
366
367
- Update **🔭 Future Directions** if this rejection clarified what to try next.
367
-
3.**If this is an issue-based program** (`selected_issue` is not null): update the status comment and post a per-run comment on the source issue (see [Issue-Based Program Updates](#issue-based-program-updates)).
368
+
3.**Update the program issue**: edit the status comment and post a per-iteration comment on the program issue (see [Program Issue](#program-issue)).
368
369
369
370
**If evaluation could not run** (build failure, missing dependencies, etc.):
370
371
1. Discard the code changes (do not commit them to the long-running branch).
371
372
2. Update the state file `{program-name}.md` in the repo-memory folder:
372
373
- Update the **⚙️ Machine State** table: increment `consecutive_errors`, increment `iteration_count`, set `last_run`, append `"error"` to `recent_statuses` (keep last 10).
373
374
- If `consecutive_errors` reaches 3+, set `paused` to `true` and set `pause_reason` in the Machine State table, and create an issue describing the problem.
374
375
- Prepend an entry to **📊 Iteration History** with status ⚠️ and a brief error description.
375
-
3.**If this is an issue-based program** (`selected_issue` is not null): update the status comment and post a per-run comment on the source issue (see [Issue-Based Program Updates](#issue-based-program-updates)).
376
+
3.**Update the program issue**: edit the status comment and post a per-iteration comment on the program issue (see [Program Issue](#program-issue)).
376
377
377
-
## Steering Issue
378
+
## Program Issue
378
379
379
-
Maintain a single**persistent** open issue per program titled `[Autoloop: {program-name}] Steering`. The steering issue lives for the entire lifetime of the program.
380
+
Each program has**exactly one** open GitHub issue (labeled `autoloop-program`) titled `[Autoloop: {program-name}]`. This single issue is the source of truth for the program — it hosts:
380
381
381
-
The steering issue serves as the central coordination point linking together the program's key resources:
382
-
-The**long-running branch**`autoloop/{program-name}` and its draft PR
383
-
-The **state file**`{program-name}.md` in repo-memory (on the `memory/autoloop` branch)
382
+
-The **status comment** (the earliest bot comment, edited in place each iteration) — a dashboard of current state.
383
+
-A**per-iteration comment**for every iteration (accepted, rejected, or error) — the rolling log.
384
+
-**Human steering comments**— plain-prose comments from maintainers, treated by the agent as directives.
384
385
385
-
### Steering Issue Body Format
386
+
There are no separate "steering" or "experiment log" issues — they have all been collapsed into this one issue.
386
387
387
-
```markdown
388
-
🤖 *Autoloop — steering issue for the `{program-name}` program.*
If `selected_issue` is `null` in `/tmp/gh-aw/autoloop.json`, the program is file-based **and** has no program issue yet. On the first run, create one with `create-issue`:
397
391
398
-
**Goal**: {one-line summary from program.md}
399
-
**Metric**: {metric-name} ({higher/lower} is better)
400
-
**Current best**: {best_metric}
401
-
**Iterations**: {iteration_count}
402
-
```
392
+
-**Title**: `[Autoloop: {program-name}]` (the `[Autoloop] ` prefix is added automatically by the safe-output `title-prefix`, so pass the title as `{program-name}`).
393
+
-**Body**: the contents of the program file (`program.md`) plus a placeholder for the status comment so maintainers know one will be edited in place.
Record the new issue number in the state file's `Issue` field. On subsequent runs, the pre-step will discover the existing program issue (it scans open issues with the `autoloop-program` label) and `selected_issue` will be populated automatically.
405
397
406
-
- Create the steering issue on the **first accepted iteration** for the program if it does not already exist.
407
-
-**Update the issue body** whenever the best metric or PR number changes.
408
-
-**Add a comment** on each accepted iteration with a link to the commit and actions run.
409
-
- The steering issue is labeled `[automation, autoloop]`.
410
-
- Do NOT close the steering issue when the PR is merged — the branch continues to accumulate future iterations.
411
-
412
-
## Issue-Based Program Updates
413
-
414
-
When a program is defined via a GitHub issue (i.e., `selected_issue` is not null in `/tmp/gh-aw/autoloop.json`), the source issue itself serves as the program definition **and** as the primary interface for steering and monitoring the program. In addition to the normal iteration workflow (state file, steering issue, PR), you must also update the source issue.
398
+
For issue-based programs (`selected_issue` is not null on the very first run), no creation is needed — the source issue is already the program issue. The flow below is identical from there on.
415
399
416
400
### Status Comment
417
401
418
-
On the **first iteration** for an issue-based program, post a comment on the source issue. On **every subsequent iteration**, update that same comment (edit it, do not post a new one). This is the "status comment" — always the earliest bot comment on the issue.
402
+
On the **first iteration**, post a comment on the program issue. On **every subsequent iteration**, update that same comment (edit it, do not post a new one). This is the "status comment" — always the earliest bot comment on the issue.
419
403
420
404
Find the status comment by searching for a comment containing `<!-- AUTOLOOP:STATUS -->`. If multiple comments contain this sentinel, use the earliest one (lowest comment ID) and ignore the others.
421
405
@@ -435,16 +419,16 @@ Find the status comment by searching for a comment containing `<!-- AUTOLOOP:STA
|**Paused**|{true/false} ({pause_reason if paused})|
439
423
440
424
### Summary
441
425
442
426
{2-3 sentence summary of current state: what has been accomplished so far, what the current best approach is, and what direction the next iteration will likely take.}
443
427
```
444
428
445
-
### Per-Run Comment
429
+
### Per-Iteration Comment
446
430
447
-
After **every iteration** (accepted, rejected, or error), post a **new comment** on the source issue with a summary of what happened:
431
+
After **every iteration** (accepted, rejected, or error), post a **new comment** on the program issue with a summary of what happened:
@@ -457,15 +441,23 @@ After **every iteration** (accepted, rejected, or error), post a **new comment**
457
441
458
442
### Steering via Issue Comments
459
443
460
-
For issue-based programs, **human comments on the source issue act as steering input** (in addition to the state file's Current Priorities section). Before proposing a change, read all comments on the source issue and treat any human comments as directives — similar to how the Current Priorities section works in the state file.
444
+
**Human comments on the program issue act as steering input** (in addition to the state file's Current Priorities section). Before proposing a change, read all comments on the program issue and treat any human (non-bot) comments posted since the last iteration as directives — similar to how the Current Priorities section works in the state file.
461
445
462
-
### Issue-Based Program Rules
446
+
### Program Issue Rules
463
447
464
-
- The source issue body IS the program definition — do not modify it (the user owns it).
448
+
- For issue-based programs, the source issue body IS the program definition — do not modify it (the user owns it).
449
+
- For file-based programs, the program issue body is informational and may be lightly updated (e.g., to refresh the program summary), but the program file (`program.md`) remains the source of truth for the goal/target/evaluation.
465
450
- The `autoloop-program` label must remain on the issue for the program to be discovered. When a program completes (target metric reached), the label is removed automatically and replaced with `autoloop-completed`.
466
-
- Closing the issue stops the program from being discovered (equivalent to deleting a program.md file).
467
-
- Issue-based programs use the same branching model, state files, and steering issue as file-based programs.
468
-
- For issue-based programs, the steering issue is optional — the source issue itself serves a similar coordination role. However, if the program grows complex, a separate steering issue may still be created.
451
+
- Closing the program issue stops the program from being discovered (equivalent to deleting a program file). Do NOT close the program issue when the PR is merged — the branch continues to accumulate future iterations.
452
+
- Program issues are labeled `[autoloop-program, automation, autoloop]`.
453
+
454
+
### Migration from the Old Three-Issue Model
455
+
456
+
Older Autoloop installations created up to three issues per program: the program issue (issue-based only), a separate `[Autoloop: {name}] Steering` issue, and monthly `[Autoloop: {name}] Experiment Log` issues. These have been collapsed into the single program issue described above.
457
+
458
+
- Before creating a new program issue for a file-based program, check whether one with the title `[Autoloop: {program-name}]` already exists (open or closed). If found and open, adopt it; if closed, reopen it rather than creating a new one.
459
+
- Existing `Steering` and monthly `Experiment Log` issues can be manually closed by maintainers; the agent must stop posting to them.
460
+
- The state file's legacy `Steering Issue` field is deprecated; the new `Issue` field replaces it. If only the legacy field is present, copy its value into the new `Issue` field on the next iteration.
469
461
470
462
## Halting Condition
471
463
@@ -486,7 +478,7 @@ Programs can be **open-ended** (run indefinitely until manually stopped) or **go
486
478
- Add the `autoloop-completed` label to the source issue.
487
479
- Update the status comment to show ✅ Completed status.
488
480
- Post a per-run comment celebrating the achievement: `🎉 **Target metric reached!** The program has achieved its goal.`
489
-
-Add a comment on the steering issue (if one exists) noting the completion.
481
+
-Post a per-iteration comment on the program issue noting the completion.
490
482
- The program will not be selected for future runs (the pre-step skips completed programs).
491
483
492
484
### Example
@@ -575,7 +567,7 @@ When creating or updating a program's state file in the repo-memory folder, use
575
567
| Target Metric | — |
576
568
| Branch |`autoloop/{program-name}`|
577
569
| PR | — |
578
-
|Steering Issue | — |
570
+
| Issue | — |
579
571
| Paused | false |
580
572
| Pause Reason | — |
581
573
| Completed | false |
@@ -591,7 +583,7 @@ When creating or updating a program's state file in the repo-memory folder, use
591
583
**Metric**: {metric-name} ({higher/lower} is better)
@@ -646,7 +638,7 @@ All iterations in reverse chronological order (newest first).
646
638
| Target Metric | number or `—`| Target metric from program frontmatter (halting condition). `—` if open-ended |
647
639
| Branch | branch name | Long-running branch: `autoloop/{program-name}`|
648
640
| PR |`#number` or `—`| Draft PR number for this program |
649
-
|Steering Issue |`#number` or `—`|Steering issue number for this program |
641
+
| Issue |`#number` or `—`|The single program issue (`[Autoloop: {program-name}]`) for this program. Hosts the status comment, per-iteration comments, and human steering comments.|
650
642
| Paused |`true` or `false`| Whether the program is paused |
651
643
| Pause Reason | text or `—`| Why it is paused (if applicable) |
652
644
| Completed |`true` or `false`| Whether the program has reached its target metric |
Copy file name to clipboardExpand all lines: AGENTS.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -91,13 +91,13 @@ Programs can include an Evolution Strategy section (inspired by OpenEvolve) that
91
91
- Evaluation commands must output JSON with a numeric metric
92
92
- Each program has a single **long-running branch** named `autoloop/<program-name>` that accumulates all accepted iterations
93
93
- A single **draft PR** per program is created on the first accepted iteration and accumulates subsequent commits
94
-
- A **steering issue** per program (`[Autoloop: <program-name>] Steering`) links the branch, PR, and state together
94
+
- A single **program issue** per program (`[Autoloop: <program-name>]`, labeled `autoloop-program`) is the single source of truth for the program — it hosts the status comment, per-iteration comments, and human steering. For issue-based programs this is the source issue; for file-based programs it is auto-created on the first run.
95
95
- All state lives in repo-memory — per-program state files on the `memory/autoloop` branch are the single source of truth for both scheduling/machine state and human-readable research context
96
96
- State files: `<program-name>.md` on the `memory/autoloop` branch (per-program with Machine State table + research sections)
97
-
- Experiment history is tracked in the state file's Iteration History section and via per-run comments on the source issue (for issue-based programs)
97
+
- Experiment history is tracked in the state file's Iteration History section and via per-iteration comments on the program issue
98
98
- The default branch is automatically merged into all `autoloop/*` branches whenever it changes
99
99
- Issue-based programs are discovered via the `autoloop-program` label; the issue body is the program definition
100
-
-For issue-based programs, a status comment (marked with `<!-- AUTOLOOP:STATUS -->`) is maintained on the source issue, and a per-run comment is posted after each iteration
100
+
-A status comment (marked with `<!-- AUTOLOOP:STATUS -->`) is maintained on every program issue (the earliest bot comment, edited in place each iteration), and a per-iteration comment is posted after each iteration
101
101
- Programs can be **open-ended** (run indefinitely) or **goal-oriented** (run until `target-metric` in frontmatter is reached). When a goal-oriented program completes, the `autoloop-program` label is removed and `autoloop-completed` is added (for issue-based programs)
102
102
- When proposing a new program, always clarify whether it is open-ended or goal-oriented
0 commit comments