DEV Community

Kix Panganiban
Kix Panganiban

Posted on

Shipping with AI is easy. Shipping tested code with AI is the hard part

Getting an agent to write code is solved. Getting it to write the right code, prove it works, and hand you a PR you'd actually merge is not.

For the last year we've been iterating on a set of prompts, role definitions and skills at sisig.ai to close that gap. We just open-sourced it as agent-doctrine.

The loop

Every agent on the machine follows the same steps:

scout → gate → plan → implement → review → consolidate → verify → ship

The agent you talk to is the lead. It plans and delegates, and it only hand-writes code if you tell it to.

The gate

This is the part that changed things the most for us. Before any edit, the lead answers fifteen questions from TENETS.md in the transcript, with evidence. Some examples:

  • what's the smallest correct change?
  • what's the blast radius?
  • how will you prove it on real data?

If the agent can't answer, it isn't ready to code.

The team

  • scout: reads the codebase before planning
  • implementer: one per split, each in its own worktree
  • simplifier: cuts the plan down (rigorous mode)
  • adv_review: tries to break the plan and every diff

Handoffs are files with a fixed shape (HANDOFFS.md), so a spec written in Claude Code can be picked up by Codex or Cursor.

Fast vs rigorous

Fast keeps the gate and a review per diff. Rigorous adds plan simplification, adversarial plan review, and your approval before code. The lead asks which one at the start.

The prose rules

We also wanted agent output that doesn't read like slop. Replies, specs, PR bodies and commit messages follow simplified technical English: active voice, 8-20 words per sentence, answer first, no "leverage" or "delve", no em dashes.

Try it

Needs Git and Bun. Back up your agent config first, because it rewrites global instructions.

git clone https://github.com/sisig-ai/agent-doctrine.git
cd agent-doctrine
bun install --frozen-lockfile
export CLAUDE_MD_DIR="$PWD"
./sync.sh apply-snapshot
Enter fullscreen mode Exit fullscreen mode

Then hand your agent a spec and answer "fast or rigorous?".

It's MIT and opinionated on purpose. Fork it and rewrite TASTE.md to fit how you work.

Top comments (0)