Give Your Agent a Laboratory

concept
agent, evaluation, prompt, workflow, prototyping
4 sources

created
2026-11-17
updated
2026-12-02
reviewed
2026-12-02
confidence
medium

Brian Lovin‘s claim (14 January 2026) that “coding agents are only as good as their feedback loop”, so before an agent changes anything it should build the means to measure and check its own work. His bolded line: “You must give your agent the ability to view and verify its own work.”source 1


index

7 sections
select a row to jump


1 The rule

“If the agent ever asks you to do something manually, you should 1) stop 2) think really really hard about how to give the agent the tools it needs so it can do the thing by itself.”source 1

In the How I AI interview he gives the rule its origin. Claude used to finish with “Hey, I’ve implemented your feature. Go take a look at it and let me know what you think.” So he taught it to run eslint and “look for actual TypeScript errors”, gave it MCP tools, and told it: “Actually, you should be the one to go and open the browser.”source 2

Without a feedback loop, he says, vague prompts (“make it faster…find bugs…refactor the code…simplify the design”) fail in three ways: the agent stops early (“they’re lazy!”), keeps asking you to check, or “fix[es] one thing but break[s] something else”.source 1

2 The two worked prompts

He says “the words aren’t as important as” the change in mental model.source 1

Performance (“make it faster”) Figma to code
Before “Do a complete audit of the codebase and make it faster.” “Use the Figma MCP to implement this design”
Build the instrument Phase 1: a benchmark harness; Chrome DevTools MCP traces and console.time markers; baseline numbers Pull the design with the Figma MCP and “study it” before writing code
Expect to be wrong Phase 2: top 3 to 5 bottlenecks, each with a hypothesis; web search for known gotchas “Build a first pass. It will be wrong. That’s expected.”
Loop Phase 3: one hypothesis at a time; re-run, compare to baseline, keep what helps without breaking tests, commit each win “so we can cherry-pick later” Screenshot via Chrome DevTools MCP, compare with Figma, list every difference (spacing, colour, type, radius, shadows, borders, alignment, responsive), fix one by one, verify each
Stop and report Phase 4: an HTML report with before/after charts “Keep looping until you can’t find any differences”
Escalate to the human “If you hit something that requires a larger architectural change, flag it and move on. Ask me questions when you’re blocked.” “If something in the design is ambiguous or impossible to implement as spec’d, ask me rather than guessing.”

Both prompts keep the human for judgement calls (architecture, ambiguous design) and hand the checking to the agent.

3 His notes

  • Verbose prompting will matter less as models improve; until then, dictate (he uses Monologue).
  • Scaffolding should match the rigour the job needs: “Iterate until you develop intuition for how much scaffolding a task actually needs.”
  • Encode workflows as skills, commands and subagents, “but don’t formalize too early. You need reps to develop model feel first.”
  • When a workflow works, ask the agent to turn the whole conversation, “including my prompts over time”, into a new skill “with a clear name and description”.source 1

4 In practice at Notion (as of 2026-02)

The rule shapes the commands in Prototype Playground (Notion):source 3

  • /figma runs the second prompt as a command. It extracts via the Figma MCP, implements in Next.js and Tailwind, verifies with the Chrome DevTools MCP, and iterates “until the implementation is correct or after three iterations with no changes”. In the demo the first pass had broken images, which the loop fixed. He puts a one-prompt result at “roughly 80% complete”.
  • find-icon, a skill plus a TypeScript script that searches more than 5,000 icons with synonyms, so the agent stops guessing icon names that don’t exist.
  • /deploy watches CI every 30 to 60 seconds and, “when linting or type checks fail”, fixes, pushes and repeats until the checks pass.

Roger Wong frames this as protecting the designer’s flow: “Every interruption from the AI is interrupting your flow state.”source 2

5 Connections (my observations)

  • Single-File HTML Prototypes: Crowley’s “the browser is the test” makes the human the tester (“there’s no test suite for these — the browser is it”). Lovin hands that same test to the agent through the Chrome DevTools MCP. It is the same kind of check, run by someone else.

  • Vibe Coding vs Agentic Engineering: a laboratory turns the vibe-coding habit of “run it, eyeball it” into an instrumented loop with a baseline, a diff list and a stopping rule. That is a step toward the agentic-engineering column, though the checks here are lint, types, screenshots and benchmarks, not a test suite or review.

  • Oversight Degrades the Overseer: “automated pre-checks for properties that need no judgement” are one of Mitchell, Ghosh & Passi’s approval-design measures, and Lovin’s escalation lines keep the human for judgement. But the rule’s direction (whenever you’re asked to look, make it so you needn’t) is also a route to the “out-of-the-loop” problem when it reaches things that do need judgement. Visual fidelity to a Figma frame is checkable; whether an AI conversation feels right is not.

  • Levels of Autonomy for AI Agents: the rule moves the user from collaborator (L2: “go take a look”) toward consultant or approver (L3–L4) for a given task, by building tools rather than by changing the agent. The placement is mine.

  • Agents with Taste: the Figma loop’s checklist (spacing, colour, typography, radius, shadows) writes taste down as things to compare. “The gap between ‘close enough’ and ‘correct’ is where polish lives.”

  • Skill Writing: “don’t formalize too early” and “create a new skill… from this conversation” make skills a product of repeated work, as in Lamis Mukta‘s workflow.

  • AI-Native SDLC: Anthropic‘s playbook makes the same rule a stage of the lifecycle: “Always give Claude a way to verify its own work, whether tests, a build, or a screenshot diff.” Its UI loop is Lovin’s Figma prompt (“Implement, screenshot, compare, and adjust. Two or three rounds is normal”). It adds a step Lovin doesn’t have, protecting the instrument: “an agent fixing code must not be able to weaken the check on that code”, enforced by a hook that blocks test edits during a fix.source 4

  • Delegative UX: Phase 4’s HTML report is the agent explaining its work to the human afterwards, one of the “understand” needs.

  • Prototype Formats for Agent-Era Design — the Figma↔screenshot loop as a third prototype format column

6 Open questions

  • Which checks belong to the agent and which must stay with the designer? The rule as stated has no limit; the escalation lines in the prompts are the only boundary.
  • Does an agent comparing screenshots with Figma catch what a designer would? Nothing in the sources shows how often the loop’s “no differences” agrees with a human’s view.
  • The companion post, “Give your agent a stopwatch”, isn’t ingested.

7 Sources

  • raw/articles/lovin-give-your-agent-a-laboratory.md (the essay)
  • raw/articles/rogerwong-notion-prototype-playground.md (the rule’s origin, quoted from the interview)
  • raw/articles/chatprd-lovin-prototype-playground.md (/figma, find-icon, /deploy)
  • raw/articles/anthropic-ai-native-sdlc-playbook-2026.md (connection only)

referenced by

14 pages link here


sources

numbers match the markers
in the text above