|
| 1 | +# Agent Loop Plugin |
| 2 | + |
| 3 | +Continuous overnight/day repository maintenance with autonomous agent loops. |
| 4 | + |
| 5 | +``` |
| 6 | +Wake every 5m ──► Triage repos ──► Dispatch threads ──► Track & land |
| 7 | +``` |
| 8 | + |
| 9 | +## Version |
| 10 | + |
| 11 | +0.2.0 |
| 12 | + |
| 13 | +## Overview |
| 14 | + |
| 15 | +The agent-loop plugin runs a persistent automation cycle that keeps repositories |
| 16 | +healthy without human supervision. It is designed for overnight and day-long |
| 17 | +autonomous upkeep: triaging issues, reviewing PRs, applying fixes, and landing |
| 18 | +changes — all through parallel agent threads. |
| 19 | + |
| 20 | +Inspired by Peter Steinberger's maintainer-orchestrator pattern: tell Codex to |
| 21 | +maintain your repos, wake up every 5 minutes, and direct work to threads. |
| 22 | +That makes it easy to parallelize + steer work as needed. |
| 23 | + |
| 24 | +## Components |
| 25 | + |
| 26 | +### Skills |
| 27 | + |
| 28 | +| Skill | Purpose | |
| 29 | +|-------|---------| |
| 30 | +| **agent-loop-orchestrator** | Core loop: wait → triage → dispatch → monitor → report | |
| 31 | +| **agent-loop-triage** | GitHub issue/PR queue scanning and classification | |
| 32 | +| **agent-loop-autoreview** | Autonomous PR review, fix application, and merging | |
| 33 | +| **agent-loop-browser** | Browser automation for live UI proof and verification | |
| 34 | + |
| 35 | +### Commands |
| 36 | + |
| 37 | +| Command | Description | |
| 38 | +|---------|-------------| |
| 39 | +| `/agent-loop:start` | Start the continuous maintenance loop | |
| 40 | +| `/agent-loop:stop` | Gracefully stop the loop | |
| 41 | +| `/agent-loop:status` | Check loop status and history | |
| 42 | +| `/agent-loop:triage` | One-shot repo queue triage | |
| 43 | +| `/agent-loop:autoreview` | One-shot PR review and fix | |
| 44 | + |
| 45 | +## Skills |
| 46 | + |
| 47 | +Sources adapted for the agent-loop plugin: |
| 48 | + |
| 49 | +- **agent-loop-triage** — adapted from [steipete/agent-scripts github-project-triage](https://github.com/steipete/agent-scripts/tree/main/skills/github-project-triage) |
| 50 | +- **agent-loop-browser** — adapted from [steipete/agent-scripts browser-use](https://github.com/steipete/agent-scripts/tree/main/skills/browser-use) |
| 51 | +- **agent-loop-autoreview** — adapted from local autofix skill + CodeRabbit workflow patterns |
| 52 | +- **agent-loop-orchestrator** — original orchestrator pattern inspired by maintainer-orchestrator concept |
| 53 | + |
| 54 | +## Quick Start |
| 55 | + |
| 56 | +```bash |
| 57 | +# Start the loop (5 min interval, current repo) |
| 58 | +/agent-loop:start |
| 59 | + |
| 60 | +# Check status |
| 61 | +/agent-loop:status |
| 62 | + |
| 63 | +# One-shot triage (doesn't start loop) |
| 64 | +/agent-loop:triage |
| 65 | + |
| 66 | +# Review a specific PR |
| 67 | +/agent-loop:autoreview --pr 123 --merge |
| 68 | + |
| 69 | +# Stop the loop |
| 70 | +/agent-loop:stop |
| 71 | +``` |
| 72 | + |
| 73 | +## Configuration |
| 74 | + |
| 75 | +| Env Variable | Default | Description | |
| 76 | +|-------------|---------|-------------| |
| 77 | +| `AGENT_LOOP_INTERVAL` | 300 | Sleep between cycles (seconds) | |
| 78 | +| `AGENT_LOOP_MAX_CONCURRENCY` | 3 | Max parallel worker threads | |
| 79 | +| `AGENT_LOOP_SCOPE` | current | Default triage scope | |
| 80 | +| `AGENT_LOOP_LOG_DIR` | .agent-loop/logs | Log output directory | |
| 81 | +| `AGENT_LOOP_STATE_FILE` | .agent-loop/state.json | Persisted loop state | |
| 82 | +| `AGENT_LOOP_REPOS` | (from git remote) | Comma-separated repo list | |
| 83 | + |
| 84 | +## Plugin Structure |
| 85 | + |
| 86 | +``` |
| 87 | +agent-loop/ |
| 88 | +├── .claude-plugin/ |
| 89 | +│ └── plugin.json # Manifest (version 0.2.0) |
| 90 | +├── .codex-plugin/ |
| 91 | +│ └── plugin.json # Codex manifest |
| 92 | +├── commands/ # Slash commands |
| 93 | +│ ├── start.md |
| 94 | +│ ├── stop.md |
| 95 | +│ ├── status.md |
| 96 | +│ ├── triage.md |
| 97 | +│ └── autoreview.md |
| 98 | +├── skills/ # Reusable knowledge |
| 99 | +│ ├── agent-loop-orchestrator/ |
| 100 | +│ │ └── SKILL.md |
| 101 | +│ ├── agent-loop-triage/ |
| 102 | +│ │ └── SKILL.md |
| 103 | +│ ├── agent-loop-autoreview/ |
| 104 | +│ │ └── SKILL.md |
| 105 | +│ └── agent-loop-browser/ |
| 106 | +│ └── SKILL.md |
| 107 | +└── README.md |
| 108 | +``` |
| 109 | + |
| 110 | +## Versioning |
| 111 | + |
| 112 | +Follow semantic versioning (semver): |
| 113 | + |
| 114 | +| Change Type | Version Bump | Example | |
| 115 | +|-------------|--------------|---------| |
| 116 | +| Bug fix, docs | Patch | 0.2.0 → 0.2.1 | |
| 117 | +| New feature, minor change | Minor | 0.2.0 → 0.3.0 | |
| 118 | +| Breaking change | Major | 0.2.0 → 1.0.0 | |
| 119 | + |
| 120 | +## Commit Convention |
| 121 | + |
| 122 | +Use semantic commits with plugin scope: |
| 123 | + |
| 124 | +``` |
| 125 | +feat(agent-loop): add new feature |
| 126 | +fix(agent-loop): fix bug |
| 127 | +docs(agent-loop): update documentation |
| 128 | +``` |
| 129 | + |
| 130 | +Co-author: `Co-Authored-By: duyetbot <duyetbot@users.noreply.github.com>` |
| 131 | + |
| 132 | +--- |
| 133 | + |
| 134 | +**Based on concepts from [steipete/agent-scripts](https://github.com/steipete/agent-scripts)** |
0 commit comments