AGENTIC BASICS 1 / 19

A talk for engineers · 25 minutes · source: aihero.dev

The new starter
with no memory.

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.

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
read a file edit it run the tests read the error try again

The one distinction worth memorising

A workflow

“The code itself decides when to stop the program, when to call the next LLM.”

Predictable. Good when the task is clearly specified.

An agent

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

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

Plan before
any code.

“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

It can

Read files. Run shell commands to explore. Ask you clarifying questions. Write a step-by-step plan.

It cannot

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

It works twice, once for each of you

For the agent

“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.

For you

“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

Give it a way
to fail.

“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

  • Types“TypeScript is essentially free feedback for your AI. Use it over JavaScript.
  • Tests“Basic unit tests covering core functionality help keep the AI on track.”
  • Hooks“If any step fails, the commit is blocked and the AI gets an error message.”
  • Format“This runs Prettier on all staged files and automatically restages them.”

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.

Where your existing skill pays off

“Your codebase, way more than your prompt or your AGENTS.md file, is the biggest influence on AI’s output.”

aihero.dev/how-to-make-codebases-ai-agents-love

“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.”

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

  • MondayOne real ticket, in plan mode. No code until the plan is right.
  • This weekOne feedback loop the agent can fail against. A typecheck, or a pre-commit hook.
  • Every timeRead the diff. You are still the engineer. Nobody else is reviewing this.
  • LaterWrite your first skill. It can be three sentences.

Thank you

No memory.
So write it down.

plan first let it fail against a loop read the diff