---
title: "Your AI Coding Agent Grades Its Own Homework. Add Gates."
author: "Harry"
published: 2026-10-31T04:14:12.705Z
updated: 2026-10-31T05:05:43.175Z
category: "AI Agents: SDLC & STLC"
tags: ["sdlc"]
canonical: "https://fxblog.dev/posts/ai-coding-agent-needs-gates"
---

# Your AI Coding Agent Grades Its Own Homework. Add Gates.

## Key takeaways

- An AI coding agent working alone reviews its own work, forgets earlier decisions and invents values it was never given.
- sdlc runs development as twelve stages, from a problem statement to monitoring, each ending in a gate with a written log.
- A gate is judged by a different agent with a fresh context, and the next stage refuses to run without a written PASS.
- Change classes keep it proportionate: case-search is a change, which runs a short requirements stage, plan, code, verification, release and the design gates it touches; a fix runs only G7 to G9.
- Where only a person can decide, the agent records a DEC question and keeps building whatever does not depend on it.

> **TL;DR** Your AI coding agent reports "done" after reviewing its own work, so what nobody decided ships, and you find it two weeks later. sdlc is an ai coding agent workflow for Claude Code where the agent that writes a stage never approves it: a different subagent writes the review log, and the next command refuses to start without its PASS. This series follows one feature, case-search, to the QA handoff.
>
> **Do this:** Run `npx agentic-fx@latest install` in your project, pick `dev`, and start one small feature with `/sdlc-intake <slug>`.

You ask an AI agent to add search to the test-case list. It writes the endpoint and the tests, runs them and reports that everything passed.

Two weeks later you find no pagination, an error shape that matches nothing else in the API, and a page size the agent picked itself. Nothing it said was false. It graded its own homework.

**This series, in four parts:**

1. **Your AI Coding Agent Grades Its Own Homework. Add Gates.** (you are here): the problem, and the route sdlc takes.
2. **Your First sdlc Run: case-search From Problem to Design**: install, then the first three gates and their logs.
3. **When Something Changes: STALE, Reaffirm and Who May Override**: an edit lands after approval.
4. **The Board, the Rules and the Handoff to QA**: the agents on screen, the standards, the packet QA starts from.

## Three habits cost you the two weeks

The code is usually fine. The damage comes from three habits, and a better prompt fixes none of them:

- **It grades itself.** The context that wrote the design is asked whether the design is good. It agrees.
- **It forgets.** Monday's choice is not in Friday's context, so the agent decides again, differently.
- **It invents.** Ask for a page size nobody gave it and you get a plausible number, not a question.

![Three ways an agent fails on case-search and what catches each: it grades itself, so a fresh reviewer judges; it forgets, so DEC-002 is in a file; it invents, so DEC-001 waits for a person](https://fxblog.dev/media/01a18fc8-d90f-7383-9d6d-9d7fb3f76798/1600)

_Every failure gets a rule a file can check_

## The route: each stage must earn the next

sdlc is a set of Claude Code commands, agents and skills. A feature runs through twelve stages, G0 (intake) to G11 (monitoring), each with its own slash command. At every stage the same five things happen:

1. The stage writes its artifact, a file you can open.
2. A different subagent, with a fresh context, reviews it. The writer never grades itself.
3. The verdict goes into a log under `.sdlc/reviews/`.
4. No `PASS` in that log, and the next command refuses to start. A wrong design never reaches code.
5. A missing fact becomes a `DEC` question for a person, so nobody invents a page size.

> **Tip**
>
> You declare a change class at intake. case-search adds endpoints to an existing surface, so it is a `change`: a short requirements stage, plan, code, verification and release, plus any design gate it touches. G5 (UI) is skipped, with a written reason, because nothing renders. A new capability runs all twelve; a `fix` runs only G7 to G9.

## Watch one invention get caught

case-search needed one answer nobody had given: title search or full text? The requirements stage did not guess. It wrote `DEC-001` with options and a default, and kept building everything that did not depend on it. The page size was the second question. A person answered it: 20.

![The Decisions tab for case-search: DEC-001, title search or step text, open and blocking TASK-003; DEC-002, the default page size, answered 20](https://fxblog.dev/media/01a18fc8-e169-714c-8c6c-6036409f8697/1600)

_Open questions, the task each one blocks, and the command to answer them_

> **Warning**
>
> Expect CHANGES_REQUESTED, a lot. I scored three of my own projects on sdlc 1.7.0, and a gate passed its first review about one time in six. After two failed rounds a person decides.

One task now waits on a person, and the rest keeps moving. But the pipeline asks you to believe a reviewer's verdict. What does a gate actually write, and how would you know the reviewer did more than nod? Part 2 installs sdlc and runs case-search through its first three gates.

## Try it

```sh
cd your-project
npx agentic-fx@latest install
```

Pick `dev` when it asks (it also adds the VS Code board), then choose one small feature, give it a slug like `case-search`, and start with `/sdlc-intake <slug>`. You get files in `.sdlc/`: one artifact and one review log per stage. sdlc runs only in Claude Code.

## Read this with your AI

```text
Read the post "Your AI Coding Agent Grades Its Own Homework. Add Gates.".
1. Summarise the three failure habits and sdlc's rule for each, in 3 bullets.
2. Ask me 3 questions to check I understood; wait, then correct me.
3. Look at my last AI-written feature (below) and say which habit showed up, and which change class it should have been.
<paste a short description of the feature>
```

> **Success**
>
> The agent that writes a stage never approves it. Next: **Your First sdlc Run: case-search From Problem to Design**.

## FAQ

### Does sdlc work with agents other than Claude Code?

No. It is a set of Claude Code agents, commands, skills and hooks, installed into a project's .claude folder by \`npx agentic-fx@latest install\`.

### Do small fixes have to go through all twelve gates?

No. A fix with no contract, schema or UI change runs implementation, verification and release only; a change runs a short requirements stage plus whatever it touches.

### Does sdlc write end-to-end or performance tests?

No. It writes unit and integration tests with the code. End-to-end, performance, security and accessibility testing belong to the sibling QA bundle it hands off to.
