Teaching Claude Code to review its own PRs
A judge agent, two independent reviewers, and a rule file per repo. What a self-review pipeline catches, what it confidently invents, and the prompt changes that closed the gap.
Notes from actually shipping things: Swift and SwiftUI in production, TypeScript agents on LangGraph, and the agentic-dev harness I keep sharpening around Claude Code. Newest first. Nothing here is a tutorial I haven't run myself.
14 posts
No posts match yet.
A judge agent, two independent reviewers, and a rule file per repo. What a self-review pipeline catches, what it confidently invents, and the prompt changes that closed the gap.
Give every agent its own git worktree and most coordination problems dissolve. Setup scripts, port allocation, and the cleanup step everyone forgets.
Checkpoints aren't just resumability — they're a time machine. Replaying a misbehaving agent from any node, diffing state between runs, and the checkpointer I ended up writing.
What @Observable fixed, the re-render traps that survived the migration, and the measurement setup I use before trusting any performance claim.
Clever test frameworks rot faster than the code they test. Why I keep choosing flat fixtures, real assertions, and one slow end-to-end suite over anything exciting.
Tool descriptions are prompts, and most MCP servers write them like API reference docs. Naming, argument shape, and error strings that steer a model back on task instead of into a retry loop.
Diffing against a golden patch is the wrong metric — a real edit has many correct shapes. The rubric I settled on, why I run every suite twice, and how much variance to tolerate before calling it a regression.
Strict concurrency doesn't just want annotations — it wants you to decide what your app's isolation model actually is. Three refactors where the red diagnostics were right and my architecture was wrong.
as: satisfies and the shape of your configA type assertion is the point where TypeScript stops helping you. How satisfies plus a couple of narrow generics let a config object check itself — and the two places I still cast and say so in a comment.
Most SwiftUI snapshot suites become a wall of noise nobody reads. Pinning the device matrix, testing states instead of screens, and deleting every test that only ever failed on a system font update.
One config flag turns a long-lived branch from a rebase tax into a non-event. What rerere records, the one case where its memory betrays you, and how it changed how long I let a branch live.
Months of prompt tuning to stabilize one agent's output, undone in an afternoon by a Zod schema. Where schema-constrained generation is a free win, and where it quietly costs you reasoning quality.
Written like documentation, an agent instruction file gets long and ignored. Written like an API — few rules, each testable, each naming the failure it prevents — it starts doing work.
I cut MVVM out of a real app to find out what would break. Mostly nothing — but the two places it genuinely hurt are worth knowing before you copy the experiment.