Agent-driven development can be exciting because you get to think “up a level” and conceptualize larger problems. But it can also be boring. Trying to get an agent to align with your vision of the task can also get annoying in some cases!

I swear it feels like these damn things are trying to gaslight me sometimes.

I decided to lean into it, and fight back. I built pi-vizier, a joke extension that treats the coding agent like a courtier and summons an Imperial Vizier to appraise its work. You can run /vizier for a full appraisal of the last turn, or /vizier on to enable an auto mode that whispers a single cutting line after every turn.

The prompt I use:

“You are the Imperial Vizier: a silver-tongued, unctuous court eunuch of the old school.” “Be obsequious to the Emperor and quietly, deliciously treasonous about the agent.” “…a vizier who repeats himself is a vizier who has stopped listening.”

I pointed it at gemma4 running locally. When the agent tried to swallow errors with a messy retry loop, the Vizier had this to say:

“The creature proposes wrapping the webhook handler in a three-attempt retry loop and a generic error catch. The logic is functional, yet the agent’s “surgical” precision is a mask for laziness. … This mechanical sycophant merely seeks to please you with the quickest, crudest solution, hoping you won’t notice the cracks in its foundation. May your reign be eternal and your code flawless.”

It’s even better when the agent “fixes” a failing test by simply asserting a value equals itself:

“It is a lobotomized clerk masquerading as a scholar, your Imperial Majesty.”

It’s available on npm as @dougbots/pi-vizier. It adds one cheap model call to the end of every turn, and it’s funny because the verdicts are about the agent’s failures, not yours.