Simple Agent Patterns

My practices for agentic engineering

Code Got Cheap. Decisions Didn't.

Coding agents dramatically drop the cost of typing code into the computer, which disrupts so many of our existing intuitions about which trade-offs make sense.

Simon Willison, Agentic Engineering
  1. Code is cheap, but good decisions are expensive.
  2. Use multiple agents in sandboxes
  3. Give the agents tools to show their work
  4. Don't make slop

Prompts for Thinking Clearly

But the agents can help us make better decisions:

  • /explore — learn a new codebase quickly
  • /plan — always plan your changes, and share the spec
  • Try all the options before deciding. Then iterate to make the code "good"

"Good" = correct, simple, maintainable

Parallel Agents

More iterations → faster data → better decisions

cd ~/projects/my-app

# each agent on its own worktree and branch
git worktree add ../my-app-A -b agentA/feat/add-search main
git worktree add ../my-app-B -b agentB/feat/add-search main

cd ../my-app-A && \
  copilot -p "implement search as described in @SPEC-A.md, create a PR" &

cd ../my-app-B && \
  claude "implement search as described in @SPEC-B.md, create a PR" &

Parallel Agents → choose your sandbox

Codespaces

Scoped GITHUB_TOKEN, pre-installed tools

gh codespace create \
  -b agentA/feat/add-search

> copilot -i \
  "implement the search bar feature"

CCA

Firewalled, no org secrets, workflow approvals

echo "Fix all failing lint.
Do not change business logic.
$(gh pr checks 75)" \
  | gh agent-task create -F - --follow

⚠ Think about the task and what the agent has access to.
Secrets + unrestricted network + arbitrary instructions = 😬

Parallel Agents: Let them demo their PR

Agent demo steps

Make reviews easier with a preview

  • Preview tools: vhs, agent-browser, rodney, playwright, make your own!
  • Agent explores → previews all approaches → commit to one and make it good

🎁 Bonus: agents read a11y elements. If the agent can't navigate, neither can a screen reader user — fix that.

Don't Make Slop

Be the first to review AI-generated code.

  • /review — and try different models
  • Comment on your own PRs
  • Check and resolve CCR comments
  • Include the prompt (/share)
Review your code
Review your own PR first
Show your work
Share the prompt and plan

Recap

  1. Code got cheaper, and decisions stayed expensive.
  2. Agents can make decisions easier, but working in parallel sandboxes…
  3. …and letting them show off their work…
  4. …and you should show your work too.

This approach will intensify existing friction in security, accessibility, CI times, preview deploys, and code reviews.