Stop Asking Your Coding Agent to Behave: Gates, Not Prompts A developer built sdlc-playbooks, an open-source, file-based delivery procedure for agentic coding that runs in both Claude Code and Codex from a single source. The workflow replaces prompt-based behavioral rules with seven phases, each backed by a script gate that exits non-zero when artifacts are missing or state is inconsistent, keeping human approval between prototype and implementation. The project stores all workflow state in repo artifacts so a human can finish the work even if every playbook is deleted. Agentic coding is fast at producing code and bad at producing the right code. In my experience the usual failure isn't a bug. It's a feature nobody specified, built from a design nobody approved, against a mock-up that changed after the work started. The code is fine. It just answers the wrong question. I built sdlc-playbooks https://github.com/srnux/sdlc-playbooks to catch those failures mechanically. It's a file-based delivery procedure design system → requirements → prototype → human approval → product that runs in Claude Code and in Codex from one source. This post covers how it works and why it's shaped the way it is. The repo defines playbooks instead of specialised agents. Each playbook describes a phase: what it needs, which checks must pass, what work happens, and what artifact it produces. The coding agent executes that procedure. Moving from requirements to implementation means changing the playbook, without needing a separate "product owner" or "engineer" agent definition. One idea runs through the whole thing: A rule written only as prose for a model to honour will eventually be skipped. So I move checkable preconditions into scripts that exit non-zero. The scripts catch missing artifacts and inconsistent state; people still decide whether the requirements and the result are right. design system PO requirements text │ │ ▼ ▼ 0 lock-design-system 1 capture-requirements tokens.css REQ- + acceptance criteria components.md │ └──────────────┬─────────────────┘ ▼ 2 build-prototype single-file React page every screen, every state │ ▼ ◆ HUMAN APPROVES ◆ 3 freeze-approval frozen snapshot v