AI automation
In short
Instead of prompting the AI step by step, you give it a measurable goal – and it works in loops: execute, self-check, improve, until the goal is reached. With Claude Code this already works in the free quota for small tasks; on the Pro plan, longer loops run that, for example, keep improving code until all tests pass.
/goal Every blog post in the /posts folder has a meta description under 160 characters and a title under 60 characters. After each file, output the character count so I can confirm, and don't touch the body text. Stop when every file passes, or after 25 files.
Limits: You start the loop by hand and watch the first run. Unverified goals lead to mistakes – the goal must be phrased so the AI can check its own work.
You run as a loop, not a single answer. GOAL: [describe the finished state in 1-2 sentences, measurable]. WHERE THE WORK IS: [e.g. 'Read TODO.md and treat every open item as a task']. HOW YOU WORK: always finish one item completely; adopt existing conventions; for decisions only I can make (money, deleting, contacting), stop and add it to a 'needs my decision' list. HOW YOU CHECK: [e.g. re-read the file and confirm against the goal] – proof, not confidence, max. 3 attempts per item, otherwise log as blocked. HOW YOU REMEMBER: keep a LOOP-STATE.md and read it first at the start of each run. WHEN YOU STOP: when everything is done or blocked, or after [N] items; then a short report.
Added value: Runs on a schedule and unattended, remembers progress via the state file and picks up on the next run where it left off. Caution: loops use more than simple prompts – start with small amounts ([N] items per run).
For anyone working with code or clearly verifiable tasks – including beginners with basic programming knowledge. The key is a measurable goal ("all tests pass", "error X disappears") against which the AI can check itself.
By the defined success criterion: a test run, an error message, a target value. After each round it checks the criterion and stops as soon as it's met – which is why a cleanly formulated goal matters more than a perfect prompt.
Always set an upper bound ("maximum 5 rounds") – then the loop stops even if the goal is unreachable. In the free quota the usage limit adds another cap; on a plan you keep an eye on the rounds.