README

I let AI code my bot without me

Drekken

Why hello Reader,

Code, test, fix, repeat. My screen a buzz with images of my bot.

I bet you know the loop. But those hands weren’t mine.

Fully automated, AI using the Ralph loop.

Its just A bash while loop that has the AI pick a task, make changes, run checks, and update plans by itself.

Which is a perfect if you’re a producitivity fiend like me, who wants to max out time doing something else but still checking off that to do list.

It has a drawback for bot building out of the box though. The agent can’t see the game.

But I figured out how to solve that by getting the game to leave evidence.

Let’s break it down how

Secret Sauce for Autonomous Bot Building

What made this loop work for bot building was feedback. Evidence from the game the agent could actually read.

That’s the job of an EventLogger class/module.

Pick the moments you care about, expansion taken, army attack, unit built. Every time one happens, write a receipt:

  • frame number
  • the event
  • the outcome

Log it to a JSONL file and keep it lean.

Once the loop has receipts, you need a judge. A validator script reads the log and returns pass or fail, whatever “worked” means for you. Then overwrite the log each run so the loop doesn’t get sloppy with context.

The Setup Behind the Loop

None of this works if the repo is broken. Start with a bot that already builds and runs. Otherwise the loop just burns tokens on build errors.

Use a CLI agent like Claude Code or Open Code. Fresh run, fresh context window. Long sessions get sloppy.

Give it an agent.md with everything it needs to onboard. Repo map, build commands, style, what matters. Let that file carry the weight.

Give it a plan.md file. The agent grabs the next unfinished item, does the work, updates the plan. One feature at a time.

Keep prompt.md strict. One task. Validate. Update the plan. If it fails, read the log and pick the next fix.

Give the loop a kill switch. The agent replies promise complete when everything is green, you grep for it and exit.

Then run the while loop command.

Watch the first two or three iterations before you walk away. Bad task selection and fake validation are easy to spot early.

Also token cost is real. If the agent reads giant logs every run, you’ll feel it. Keep events lean. Make validators specific.

Check out how I put it together in this video 👇🏾

video preview

Used This to Code My SC2 Bot Without Me

The better your feedback, the more autonomous your coding agent gets.

Proof is what lets the loop keep moving.

Hit reply and tell me, what’s the first behavior you’d make a validator check?

May the Bugs Be Ever In your Favour🪲

Email Preference:
Unsubscribe | Update your profile | 600 1st Ave, Ste 330 PMB 92768, Seattle, WA 98104-2246