Nguyen Le Phong

The Feedback Loop That Makes AI Work Better Every Week

The first AI draft is cheap.

A ticket comes in for a small schema change. You paste it into your coding assistant, and forty seconds later you have a migration, an updated model and a tidy note about edge cases. It looks done. Your teammate reviews it, spots that the migration has no down step, and fixes it in a comment thread. The following week someone else on the team asks the same assistant for a different migration, and it leaves out the down step again.

Nothing went wrong in either review. What failed is the bit after the review: the lesson stayed in one person's head and one PR thread, so the next request started from zero. This post is about closing that gap with a feedback loop that's light enough to keep running.

A small engineering team compares AI output on a laptop with printed test results and source notes during a review session.
Output from the model sits next to the evidence (tests, source, docs) before anyone treats it as a decision.

What the loop looks like

A human feedback loop is more than someone clicking approve. It has four steps, and the last two are the ones teams skip:

  1. Ask: give the model the task with the context it can't see on its own.
  2. Check: test the output against something outside the model, such as the source code, a test run or the real docs.
  3. Record: write down what was wrong, what was guessed and what context was missing.
  4. Feed back: put that lesson where the next request will pick it up automatically.

Skip steps 3 and 4 and you get a strange kind of speed. Functions, migrations and summaries appear fast, while the team's understanding of them lags behind. The same blind spot costs you again and again, each time a little later in the pipeline.

Give the check something to run

The check step only works if there's something concrete to check against. Anthropic's Claude Code docs say it bluntly: if the agent has nothing to run that tells it whether the work is done, "looks done" is all it has, and you end up being the test suite (Claude Code best practices, checked November 2026). The same page suggests asking for evidence, meaning the command it ran and the output, because "all tests pass" on its own tells you very little.

For a coding task, a short checklist covers most of it:

  • Which files did the model rely on, and did it read the ones that matter?
  • Which test proves the behavior, and does that test assert the real contract or only that something returned?
  • Which edge case is still untested?
  • Which part of the answer is inference with nothing behind it?

For writing or product work, the equivalents are source links, a fact check on every number and a person who decides what shouldn't go out. When you're unsure whether an answer deserves a test at all, this post has a quick way to decide.

Write the lesson where the next run will read it

Most coding assistants now read an instructions file from the repo at the start of every session. Claude Code reads CLAUDE.md. Many other tools read AGENTS.md, an open format that its site says more than 60,000 open-source projects use, now stewarded by the Agentic AI Foundation under the Linux Foundation (agents.md, checked November 2026). Either file gets committed, so the whole team and every agent share it.

This is where the record step pays off. The Claude Code docs give a good filter for what belongs there: only what the model can't work out from the code, plus anything you've had to correct twice already. They also recommend keeping the file short, because every line competes for attention on every task. A few lines from the migration story above might look like this:

# AGENTS.md (excerpt)
- Run one test file: pnpm vitest run path/to/file.test.ts
- Every migration needs a down step. Run up, down, up locally before the PR.
- Call the payments API through src/sdk/payments. Don't write raw requests from memory.
- API tests assert the response body against the schema, not only the status code.

One more distinction from the same docs is worth stealing. An instructions file is guidance, and the model can still decide a line doesn't apply. If a rule must hold every single time, such as "never edit the migrations folder" on some teams, move it into a hook or a CI check that the tooling enforces. Instructions are where lessons go first. A check is where they go once they really matter.

Look at the misses on purpose

Lessons only get recorded if someone looks for them. Hamel Husain, an ML engineer who writes a lot about evaluating LLM products, puts the foundation simply: remove all friction from looking at your data, then keep reading real examples until you stop learning anything new (Your AI product needs evals). He's writing about AI products, but the habit transfers well to AI-assisted engineering.

A lightweight team version: once a week, spend fifteen minutes on the AI-assisted PRs that needed rework. Tag each miss with a short label, such as "missing rollback", "invented API" or "test asserts nothing". When a label shows up twice, it earns a line in the instructions file. When a line keeps being ignored, it earns a check.

Keep it small

The loop should cost minutes a week. One shared doc of tagged misses and one owner who turns repeats into instruction lines is enough to start. If it feels like a process, it's too big.

Why the loop compounds

Google's DORA team summed up its 2025 research on AI-assisted development in one line: AI's main role is as an amplifier, magnifying an organization's existing strengths and weaknesses (DORA 2025 report). A team with a working feedback loop gets a little better with every request. A team without one ships the same mistakes faster.

That framing also takes the pressure off. You don't have to decide whether AI is magic or useless. It's a fast collaborator with uneven memory and no responsibility for production. Your job is to set things up so good output survives the check and weak output gets caught while it's still cheap to fix. Treating suggestions as draft evidence is a good habit to pair with it.

Try this week

  • Pick the last AI-assisted change that needed a fix and write down, in one line, what the model missed.
  • Check whether your repo has a CLAUDE.md or AGENTS.md. If it does, add that line. If not, start one with your test command and that line.
  • Next time an agent says it's done, ask for the command it ran and its output.
  • Book fifteen minutes on Friday to tag AI misses with your team.

The rhythm is simple: ask clearly, check against something outside the model, write the lesson down where the next run reads it, then ask again. The speed comes from the model. The reliability builds up in the loop.

What did you think?

Frequently asked questions

What is a human feedback loop in AI-assisted work?
It's the routine around AI output: ask with real context, check the output against something outside the model (source, tests, docs), record what was wrong or missing, and feed that lesson back so the next request starts better. Most teams do the first two steps and skip the last two.
Where should a team store lessons learned from AI mistakes?
In the instructions file your coding assistant reads at the start of each session, committed to the repo: CLAUDE.md for Claude Code, or AGENTS.md, an open format many other tools read. Keep it short and include only what the model can't work out from the code, plus anything you've had to correct twice.
What if the model keeps ignoring a rule in the instructions file?
Instructions are guidance, and the model can still decide a line doesn't apply. Claude Code's docs recommend moving rules that must hold every time into a hook, a deny rule or a CI check, so the tooling enforces them regardless of what the model decides.
How much time does a feedback loop take?
It can take minutes a week. Spend about fifteen minutes reviewing AI-assisted changes that needed rework, tag each miss with a short label, and turn any label that appears twice into an instruction line or an automated check.