A talk for engineers · 25 minutes · source: aihero.dev
The basics of agentic development, from Matt Pocock’s AI Hero. What an agent is, why it fails, and the two habits that fix most of it.
→ / space to advance
Before we start
This is not a machine learning topic.
Nothing here asks you to train a model, tune a prompt or learn a new maths. The agent writes the code. You decide what is worth building, and whether what came back is right.
Your engineering judgement is the asset. It transfers directly.
The mechanism · start here
“An agent, though, doesn’t use predetermined steps. It calls an LLM and gives it a bunch of tools, different options of things that it can do next.”
aihero.dev/what-is-an-agent
A model, a set of tools, and a loop. That is the whole machine.
The one distinction worth memorising
“The code itself decides when to stop the program, when to call the next LLM.”
Predictable. Good when the task is clearly specified.
“The LLM itself decides when to stop the program when it thinks it’s finished.”
Flexible. Good when the steps are not clear up front.
The fact behind every failure you will hit this week
“An agent can only work with what’s in its context window.”
aihero.dev/plan-mode-introduction
“Agents often work in fresh context windows.”
aihero.dev/my-7-phases-of-ai-development
It never read your codebase. It read what fitted in the window.
The frame to take away
“AI is not a super-powered developer. It’s a new starter with no memory.”
aihero.dev/how-to-make-codebases-ai-agents-love
You already know how to brief a new starter. Say what to build. Give them the context. Let them check their own work. Read what they wrote.
Habit 1 of 2 · do this on Monday
“In plan mode, you iterate with the agent on what you want to build before any code gets written.”
aihero.dev/plan-mode-introduction
Mechanically, it is a restricted mode
Read files. Run shell commands to explore. Ask you clarifying questions. Write a step-by-step plan.
“does not edit your source. … edits stay blocked until you approve the plan.”
“Plan mode tells Claude to research and propose changes without making them.”
code.claude.com/docs/en/permission-modes
Switch modes with Shift+Tab, or start with claude --permission-mode plan.
It works twice, once for each of you
“it’s not just about the plan document, it’s about priming the agent’s context.”
The reading it does becomes the context it builds on.
“You don’t know what you want until you see it.”
“Plan mode is a forcing function for concrete requirements.”
aihero.dev/plan-mode-introduction
A wrong plan costs you one paragraph to fix. Wrong code costs you a review, a revert and an afternoon.
“You wouldn’t chuck vague requirements at a human colleague and expect good results. Without plan mode, that’s exactly what you’re doing to an AI.”
aihero.dev/plan-mode-introduction
“Plan mode isn’t optional. It’s a foundational tool for AI-assisted coding.”
Habit 2 of 2 · install one this week
“When working with AI coding agents, especially those operating independently, you need feedback loops so the AI can verify its own work.”
aihero.dev/essential-ai-coding-feedback-loops-for-type-script-projects
Why this works better on an agent than on a person
“AI agents don’t get frustrated by repetition. When code fails type checking or tests, the agent simply tries again. This makes feedback loops (and pre-commit hooks, especially) incredibly powerful for AI-driven development.”
aihero.dev/essential-ai-coding-feedback-loops-for-type-script-projects
A red test is not a complaint. It is an instruction the agent can act on, at three in the morning, forty times.
Four you can install this week · cheapest first
aihero.dev/essential-ai-coding-feedback-loops-for-type-script-projects
Habit 2, installed · not git hooks — the agent’s own lifecycle
“Hooks are user-defined shell commands. Claude Code runs them at specific points in its lifecycle, which gives you deterministic control: certain actions always happen rather than relying on the LLM to choose to run them.”
code.claude.com/docs/en/hooks-guide
PostToolUse“After a tool call succeeds.” Typecheck or format every edit, automatically.
Stop“When Claude finishes responding.” Your check runs before the turn can end.
The beginner pair. Match file edits with an Edit|Write matcher.
Where your existing skill pays off
“Your codebase, way more than your prompt or your
aihero.dev/how-to-make-codebases-ai-agents-loveAGENTS.mdfile, is the biggest influence on AI’s output.”
“These are grey box modules. You own the interface. AI owns the implementation. Tests keep it honest.”
When you repeat yourself twice, write it down
“Skill — A teachable capability bundled as a unit — kept out of the context window until a context pointer pulls it in for the task at hand.”
aihero.dev · AI coding dictionary
/grill-me“Align on an idea before committing to it.”
/tdd“The rules of the red-green-refactor loop.”
Router: /ask-matt · aihero.dev/skills
The closing frame
“This is nothing new. This is how good codebases have been designed for 20 years. What works for humans is also great for AI.”
aihero.dev/how-to-make-codebases-ai-agents-love
Do this
Thank you
All quotes verbatim from aihero.dev