I was reminded of a few foundational truths during a catch-up with a colleague earlier this week. We were discussing what happens when teams get handed shiny new AI tooling without the playbook: people find themselves caught between the hype and the fear, skipping clean past the unsexy, essential groundwork—data hygiene, governance, and the basic architecture of how things actually fit together. The default expectation is that AI will be an omnipotent wizard swooping in to fix everything. When it doesn't, frustration sets in.

When users are told an autonomous agent can handle complex workflows, their immediate instinct is to throw every single task at it simultaneously. Predictably, the instructions tumble straight out of the context window, and the agent begins outputting absolute nonsense.

To fix this, we don’t need more breathless hype. We need to dust off some first-principles systems thinking.

Why We Decompose

Back in 2018, when I wrote How to Think Like a Coder, I broke down computational thinking into four core pillars: decomposition, pattern recognition, abstraction, and algorithm design.

To explain decomposition, I used the production of an average Hollywood blockbuster. A major film relies on a crew numbering in the thousands—caterers, visual-effects artists, costume designers, lighting technicians, and sound engineers. Even though audiences only notice the actors and the director, the film gets made precisely because a gargantuan undertaking was broken down into smaller, highly specialised pieces of the puzzle working in unison. You don't ask the lead actor to bake the muffins, and you certainly don't ask the director to sew the costumes.

Gemini_Generated_Image_yqczmtyqczmtyqcz.jpeg

The exact same discipline applies to designing an agentic workflow. If you attempt to build a monolithic agent that fetches company data, cleans it, analyses customer sentiment, and drafts an executive brief all in one go, you are setting it up to collapse.

Instead, construct a crew of single-function operators:

  • Unit A: Retrieve the raw context and data.
  • Unit B: Normalise that data into a clean, predictable structure.
  • Unit C: Run formatting, synthesis, and final checks.

Stack those small, verifiable building blocks together like Lego bricks. Because each step has a narrow, measurable scope, your pipeline becomes predictable rather than chaotic.

The Infinite Cheese Sandwich

Even when we break tasks down, we often fall into the trap of assuming computers— and by extension, large language models — magically understand our intent.

They do not.

Computers aren't inherently clever; the intelligence comes entirely from the human establishing the rules. So, if you want an automated system to make something terribly simple like a cheese sandwich, simply telling it to "make a sandwich" is asking for trouble. You have to define the mechanics: picking up the bread, setting the butter tub down, holding the knife with the blade facing away, dragging it along the butter for three seconds, and positioning the slice.

Gemini_Generated_Image_rvhnyqrvhnyqrvhn.jpeg

In the book, I showed what happens when you introduce a loop to that sandwich routine: "Repeat steps 1–3." Without an explicit exit condition, you create an infinite loop. The machine will keep buttering bread until the kitchen runs out of loaves and the system crashes.

To fix it, you have to add a conditional constraint: "Repeat steps 1–3 until two slices of bread have been buttered."

Modern AI agents land in this exact trap when users prompt them to "research a topic" or "refactor this codebase" without bounding the process. Without a rigid stopping condition, probabilistic agents loop endlessly, chewing through tokens and confidence until they hallucinate an arbitrary finish line.

KnowBot and the Made Bed

Systems also require clear success criteria and state awareness.

When I introduced my theoretical robot, KnowBot, I gave him a tidy algorithm for making a bed: spread the duvet evenly, pull up the blanket, and place the pillow neatly at the top. But when I pointed KnowBot at a bed that was already made, he froze in confusion.

Gemini_Generated_Image_3yb05t3yb05t3yb0.jpeg

The algorithm lacked a conditional check. It didn't evaluate state before initiating execution:

  • If the duvet is already pulled up: proceed to the next step.
  • If the bed is already made: stop.

When you architect AI workflows, evaluation criteria must come first. What does a successful output actually look like? What checks verify that a step succeeded before handing data off to the next agent? If your system cannot verify the state of its output, it will gladly rebuild a bed that was already made.

Two Games to Train Systems Thinking

Learning to think like a coder has never meant memorising syntax or staring at IDE error logs all day. It is about cultivating whole-brain problem-solving.

If you or your team want to sharpen these architectural instincts without touching a terminal, these two puzzle games are masterclasses in systems design:

  • Human Resource Machine: You play an office worker tasked with managing inputs, sorting boxes on an office floor, and sending outputs down an outbox conveyor belt. You programme your worker using simple mechanical blocks—loops, conditionals, and memory registers. It is the corporate equivalent of teaching KnowBot how to make the bed, forcing you to think through sequence bottlenecks, memory allocation, and step-by-step efficiency.
  • Baba Is You: In this logic puzzler, the rules of each level exist as movable, physical word blocks on the screen (e.g., FLAG IS WIN, WALL IS STOP). By pushing blocks around, you rewrite the environment's rules in real time—changing WALL IS STOP to WALL IS PUSH, or making yourself the key. It provides an immediate, tactile sense of Boolean logic, variable assignment, and constraint modification—the exact mental muscles required to structure modular agent environments.

No matter how advanced language models become, machines are not wizards. The real leverage still belongs to the person who knows how to step through an algorithm, set guardrails, and design the system.