The working cycle
task → description → generation → reading → checking → iteration
What it is
The working cycle is the order of steps in which a task turns into working code. Six steps, repeated until the result is good enough.
The cycle is worth knowing by heart, because almost every problem with an AI is a skipped step rather than a bad model. Each chapter of this book takes one of the steps apart in detail, and we will keep coming back to this list.
The six steps
| # | Step | What comes out |
|---|---|---|
| 1 | Task | an understanding of what the result should be |
| 2 | Description | a prompt or a mini-spec |
| 3 | Generation | code |
| 4 | Reading | an understanding of what it wrote |
| 5 | Checking | a run, a test, an answer: works or not |
| 6 | Iteration | the next prompt, or a finished feature |
A common misconception is that working with an AI means step 2 and step 3. In reality it is steps 1, 2, 4 and 5 — and generation is the shortest and easiest part.
What to look for
The main mistake looks like this: got the code → didn't understand it → ran it → doesn't work → "doesn't work, fix it" → got the code → didn't understand it → ran it…
This is the no-reading loop. It feels like work, because something keeps happening, but no lap adds any understanding. Five laps in, you have a project you don't know and a bug nobody can find.
The only way out of the loop is step 4. You don't have to read every line — it's enough to understand what the code does and where. But the step cannot be skipped.
What to tell the AI
Each step has its own kind of prompt. These are not separate tricks — they are one cycle, broken into turns.
Step 2, description:
Add a /weather command to bot.py. It takes a city name,
requests the weather from api.openweathermap.org and replies
with one line: temperature and conditions. Take the key from
the OWM_API_KEY environment variable. If the city is not
found, reply "City not found".Step 4, reading:
Explain line by line what the function you added does.
Separately, tell me what happens if the API returns an error.Step 5, checking:
Which three cases should I check by hand to be sure
the command works correctly?The third prompt is underrated. The AI knows perfectly well where its own code is fragile — you only have to ask.
Cheat sheet
Six steps: task → description → generation → reading → checking → iteration.
Four of the six are yours. Generation is the easiest part.
The no-reading loop is the main way to lose control of a project.
Can't explain the code in two sentences — don't keep it.