I am a tech lead on a small team building a backend API (TypeScript, Postgres). Claude Code writes almost all our code. We've done around 570 PRs in 5 months.
The quality has been pretty good, but getting a single feature slice through the pipeline takes a while.
(I have drafted below workflow text using claude code itself; but made it concise and direct enough to be readable for you, sorry if its still a long post)
The pipeline (one feature slice = one PR)
1. Requirements: Written by the product owner. Defines the scope.
2. Spec: Acceptance criteria, each mapped to a requirement.
3. Spec grading: A fresh session scores the spec. Anything below 85 doesn't move forward.
4. Tests (RED): Written from the spec only.
5. RED review: A fresh session checks the tests against the spec.
6. Implementation (GREEN): Not allowed to modify the failing tests.
7. Ship gate: Review loop and final validation against the running API.
What's keeping the quality high
1. Context isolation: /clear between spec, tests and implementation. I've found that when the same session writes both tests and code, the tests end up validating what the code does rather than what the spec says.
2. Hooks: A hook prevents reading the implementation on the test branch. Another blocks PRs that skip the ship gate.
3. Model split: The stronger model handles specs and reviews. The cheaper one writes tests and code.
The downside
1. Time: Seven sequential stages, three fresh-session reviews, and each stage has to wait for the previous one.
2. Tokens: On one particularly heavy day, I burned through about half my weekly limit.
I am not looking to cut corners or squeeze a few tokens out of prompts. I am wondering if there's a fundamentally better way to structure this workflow.
which stages would you merge, parallelise or drop?
has anyone managed to maintain this level of quality while moving twice as fast?
is isolating tests from implementation actually worth the overhead? has anyone found a cheaper way to achieve the same thing?
curious to hear how others are handling this, especially people using Claude Code heavily in production codebases.