Ship a feature with a coding agent: spec, tests first, then review the diff
The loop experienced developers describe on r/ExperiencedDevs: write the spec, plan the smallest steps, have tests written from the spec, implement, then review against the spec before anything merges.

Tools used
- Claude CodeCoding agent that reads, edits and tests the repo
- Codex CLITerminal agent with /plan and /review
- CursorEditor agent with Plan Mode
- GitHubPull requests and CI
- GitCheckpoints and small commits
Step navigator
A merged feature with a written spec, a saved implementation plan, tests that came from the spec, and a diff you reviewed yourself.
Working developers using Claude Code, Codex or Cursor on a real codebase who want fewer "it compiles but it's not what we meant" merges.
Before you start
In a thread about heavy agentic engineering, one developer who leads an AI platform team said "Half the effort is in writing the spec. The other half is in ensuring the agent follows the spec." This guide follows that loop, plus a ticket-driven version from another thread, using any of Claude Code, Codex or Cursor.
Step-by-step instructions
Write a ticket with background and acceptance criteria
Before opening the agent, write the ticket: background, business value, acceptance criteria and links to relevant docs. One commenter describes exactly this as step 1 of their team's workflow (they use Linear). OpenAI's Codex guidance boils it down to four parts: Goal, Context, Constraints and Done when.
Where this comes from: u/metaphorm in r/ExperiencedDevs: "Claude Autonomous Coding: Discussion".

Why this works
The agent can only check its work against criteria that are written down.
Discuss the design with the agent and save the plan
Feed the ticket to the agent in plan mode and talk through whatever is still ambiguous. Claude Code: Shift+Tab to plan mode. Codex: /plan. Cursor: Shift+Tab to Plan Mode. Get an implementation plan, then save it with the ticket. The commenter says "future agent sessions will see the implementation plan and immediately have much more context".
Where this comes from: u/metaphorm in r/ExperiencedDevs: "Claude Autonomous Coding: Discussion".
Here is the ticket: <paste>. Ask me about anything ambiguous, then write an implementation plan broken into the smallest steps that can each be tested.
Why this works
A saved plan anchors later sessions and makes debugging easier.
Have tests written from the spec before the implementation
Ask for tests that encode the acceptance criteria first, and confirm they fail. One developer runs this as separate steps: a subagent writes tests from the spec, then an implementation agent writes the code, then a review agent checks spec adherence. Anthropic's docs make the same point: give the agent "a check it can run" so it can iterate until it passes.
Where this comes from: u/nachoaverageplayer in r/ExperiencedDevs: "For folks heavily using agentic engineering, what does your workflow look like?".
Write tests for the acceptance criteria in the plan. Don't implement the feature yet. Run them and show me that they fail for the right reason.
Why this works
Tests written before the code can't quietly be bent to match whatever the code ended up doing.
Implement against the plan and the tests
Now let the agent implement, run the suite and fix failures. Watch the diff as it works. Cursor's docs suggest clicking Stop and redirecting as soon as it heads the wrong way rather than waiting until it finishes. If it drifts badly, revert, tighten the plan and rerun. That is usually faster than patching.
Where this comes from: u/nachoaverageplayer in r/ExperiencedDevs: "For folks heavily using agentic engineering, what does your workflow look like?".
Why this works
Early correction is cheap; untangling a finished wrong implementation is not.
Open the PR and run review bots, CI and your own QA together
Push a PR. Let review bots do a first pass (the commenter's team uses CodeRabbit; GitHub Copilot code review works the same way via Reviewers → Copilot → Request). At the same time, manually QA the change in your local environment while CI runs unit and integration tests. Feed review comments and QA findings back to the agent until the change is acceptable.
Where this comes from: u/metaphorm in r/ExperiencedDevs: "Claude Autonomous Coding: Discussion".
Why this works
Bots catch obvious issues quickly, but only your QA tells you whether it behaves as intended.
Review the diff yourself before merging
Final review gets human eyes. One developer has the agent wait for them to review the diff in their IDE, where they "inevitably make changes and fix things", and recommends manual reviews "early and often" because catching a spec mistake early is much cheaper. Merge only after that.
Where this comes from: u/nachoaverageplayer in r/ExperiencedDevs: "For folks heavily using agentic engineering, what does your workflow look like?".
Why this works
Most AI slop comes from letting the agent run unchecked, according to the same commenter.
End of guide · Reviewed Oct 26, 2026
Pro tips3
- If you could describe the diff in one sentence, skip plan mode. Anthropic says planning adds overhead for small, clear changes.
- After two failed corrections in one session, clear the context and restart with a better prompt.
- Ask for evidence: the test command and its output, not "done".
Common mistakes3
- Letting the agent change the acceptance criteria as it goes.
- Reviewing only the final diff of a long session instead of checking in early.
- Treating passing tests as proof that the feature matches the ticket.
FAQ3
Which agent should I use?
Do I need subagents?
What if the team has no ticket system?
Sources7
- r/ExperiencedDevs: "For folks heavily using agentic engineering, what does your workflow look like?"
- r/ExperiencedDevs: "Claude Autonomous Coding: Discussion"
- Best practices for Claude Code (Anthropic)
- Codex best practices (OpenAI)
- Plan Mode (Cursor docs)
- Reviewing and testing code (Cursor docs)
- Using GitHub Copilot code review (GitHub Docs)