Fork this repository and watch a small AI software team create three pull requests in your fork.
monitoring event + GitHub issue
|
v
triage
|
v
isolated Git worktree
|
v
implement and test
|
v
open pull request
Each loop run processes exactly one issue and stops after opening its pull request. It never merges automatically.
- Git
- Python 3.12+
- uv
- GitHub CLI
- Codex CLI authenticated locally
On macOS, setup automatically detects the CLI bundled with Codex.app. For a
custom installation, set CODEX_BIN to the executable path.
Your origin remote must point to a fork owned by the authenticated GitHub
user. Your checked-out default branch must also be pushed and exactly match
origin/main. Setup refuses to create anything otherwise.
Use a short-lived fine-grained personal access token instead of granting GitHub CLI broad account access:
- Select your account as the resource owner.
- Select only this fork under repository access.
- Grant repository permissions:
- Contents: Read
- Issues: Read and write
- Pull requests: Read and write
- Choose a short expiration.
Load it into the current terminal without echoing it:
read -s GH_TOKEN
export GH_TOKENPaste the token, press Enter, and keep that terminal open while running the
demo. Git pushes use your existing SSH key. Remove the token afterward with
unset GH_TOKEN.
make setup
make loop
make loop
make loop
make statusmake setup installs dependencies and idempotently creates three GitHub Issues
from mock-systems/monitoring/events.jsonl.
Each make loop:
- Reads the open demo issues and monitoring events.
- Picks the oldest issue without a pull request.
- Uses a read-only explorer to establish a testable success predicate.
- Creates or resumes
worktrees/issue-<number>. - Lets an implementer make the smallest viable change there.
- Runs
make check, commits, pushes, and opens a pull request.
The command prints each stage immediately. Triage and implementation can each take a few minutes; the current stage remains visible while the agent works.
After three runs, your fork has three open pull requests. Keeping the runs separate makes it easy to inspect how the same loop picks the next issue each time.
Generated prompts, transcripts, and results live under ignored runs/.
Worktrees live under ignored worktrees/.
make resetReset is intentionally guarded because it closes remote demo issues and pull
requests. First inspect what will be affected with make status, then run:
make reset CONFIRM=1It only touches issues labeled loop-demo, branches named loop-demo/*, and
matching local worktrees.
Then run make setup again.
To inspect the repository as it existed before the GitHub-backed redesign:
git switch --detach pre-github-loop-demoReturn to the current version with git switch main.
Only monitoring is mocked as three readable JSON lines. GitHub Issues, Git branches, worktrees, commits, and pull requests are real and belong to your fork.
The sample application is a deliberately incomplete calculator under
src/loop_engineering_example/app/.
- This is an educational demo, not a production autonomous system.
- Agent output is non-deterministic.
- Pull requests may overlap because they all start from the fork's default branch and remain open for inspection.
- Setup and reset perform real writes in your fork.
MIT