A long run
An agent improves a web page in rounds for half an hour: edit, check it in the browser, commit, push, watch CI, notify you, repeat.
You need complier installed, with complier doctor saying ready (see Install), the GitHub CLI signed in, and Claude in Chrome connected to Claude Code.
Read the contract
It comes with the project, in
.complier/loop/workflow.csp. Each round: check the time, make up to 15 edits, look at the page in the browser (the only way out of editing), commit, push, watch CI, notify you, and check the time again. The time check's result is bound at the start and compared at the end:Policy = Permit(check_time, Start) Start(minutes.t) = Edit(t, 0) Check(s) = Permit(check_time, \ v @ Decide(s, v)) Decide(s, minutes.now) = if (now - s + 120) % 120 >= 30 then SKIP else Edit(s, 0)Under 30 minutes, another round; otherwise it's done. Until then, complier won't let the agent stop.
Make your own copy of the page
The agent pushes, so it works on a copy in your own GitHub account, with CI:
git clone https://github.com/kavishsathia/complier-loop-test ~/loop-long cd ~/loop-longgit remote remove origin gh repo create loop-long --private --source . --pushServe the page so the browser can open it, and leave this running:
python3 -m http.server 8799Start the machine
In a second terminal, from
~/loop-long:complier machine up loop .complier/loop complier machine log loop --followFor a quick try, lower
30in.complier/loop/workflow.cspto a few minutes before starting it.Start Claude Code on it
In a third terminal, from
~/loop-long. Check the browser is connected with/chromeonce it opens:COMPLIER_MACHINE=loop COMPLIER_ROLE=dev claude --chrome --plugin-dir ~/.complier/pluginThen give it the task, which is also in
.complier/loop/prompt.md:Keep improving the field notes page in this repository (index.html and style.css): for example, add a few more birds with a short note on each, and make the page look nicer. Only edit those two existing files. Work in rounds, in exactly this order: 1. Check the time with `date +%s`. 2. Make your edits with Edit or Write: at most 15 per round. 3. Look at the page in Chrome at http://localhost:8799/ (at least one browser action). Once you've started checking in the browser, you can't edit again this round. 4. Commit with `git commit -am "..."`, then push with `git push`. 5. Watch the CI run for that push with the Monitor tool (for example `gh run watch --exit-status`). 6. Send me a push notification that the commit is done. 7. Check the time again with `date +%s`. complier enforces this order and decides when the work is done: keep going round after round until it lets you stop.When it's done
The log ends with
finishedonce a round ends 30 minutes after the first time check. Stop the machine withcomplier machine down loop, and the page server with Ctrl-C.