Constitutional Prompting: Making AI Coding Agents Reliable Without the Iteration Tax
Every engineering team trying to automate developer workflows with AI agents hits the same wall: the iteration tax. You ask an agent to review a PR, scaffold a feature, or audit code quality — it does something almost right, you correct it, it overcorrects, you add guardrails, it gets confused. Four round-trips later you have acceptable output and a prompt that's fragile, opaque, and impossible to hand off to another engineer on your team.
Constitutional prompting is a pattern that eliminates this loop for developer tooling. Instead of iterating toward correctness at runtime, you encode your team's engineering standards, workflow constraints, and output contracts directly into structured agent specifications - upfront, before the agent ever runs. Think of it as writing a constitution for how an agent should behave within your development workflow: parameter schemas, numbered workflow phases, anti-loop directives that prevent the agent from second-guessing itself, and typed JSON output contracts that make success or failure unambiguous.
I've used this pattern to build rp1, an open-source framework with 36 specialised agents that automate real developer workflows - review, feature development, code auditing, autonomous research - executing in a single pass without human intervention mid-workflow. Hundreds of engineers at Block use these agents daily, and the results have been striking: fewer iteration cycles, higher first-pass code quality, and agents that consistently follow team conventions without drift. The same pattern powers a map-reduce PR review pipeline that splits diffs across parallel sub-reviewers and a builder-reviewer loop where adversarial agents verify code against seven quality dimensions before it ever reaches a human.
This talk breaks down the anatomy of a constitutional agent for developer workflows, walks through the failure modes it prevents, and shares hard numbers on iteration reduction and first-pass success rates. You'll leave with a concrete framework you can apply to your own engineering automation immediately.