r/ClaudeCode • u/xmen-nowomen • 1h ago
Tips & Workflows 570 PRs in 5 months with Claude Code. Quality isn't the problem anymore, speed is.
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.
•
u/AutoModerator 1h ago
Hey! Thanks for posting to r/ClaudeCode
While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.
For help, project discussions, tips, and general chat, join the ClaudeCode Discord.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/norviking 49m ago edited 40m ago
Great process. Looks like some good old project management principles. Which I like.
Check this out. It also runs on some good old and boring software engineering principles.
This is not built for a team, but great for solo work. For a team repo, study and adapt process. Or the principles.
https://github.com/vegardjorg/ravenseat
With a decent machine you will get many parallel tracks. Separate worktrees, safe merging, intelligent track allocation based on file ownership, track allocation based on machine load.
Agents are cheap, so load is mostly test suites, db probes, gates etc. that you have set up.
Also, for your tokens, the entire project state and task state is outside claude code. So you can safely compact at 300k tokens. It does this on auto. If you compact at the default 1000k now, that will about 2x your usage.
Project state outside claude will also fix most of the claude.md, skill and memory read misses. And take the hopium out of compacting, 1000k to 100k with no real control is kinda gambling.
Its BYO tests, gates, probes and ci, naturally. But it sounds from your post like you guys have basics like that covered.
Edit: with the dev speed you will be getting, I highly recommend batch pushing after a few commits. Push on each commit will BURN through ci. So thats an area you will either pay for ci minutes, or make some smart solution for the shared repo work. It depends on your workflow and how many are working in the repo, where and so on.
1
u/called9527 35m ago
the sequential part is probably where most of the time goes, so id look at which stages really need a fresh session. spec grading and the RED review only need the spec and tests as input, so you could run those as subagents on several slices at once. also if a hook is only there to stop it reading the implementation on the test branch, a deny rule under permissions in settings.json might do the same job with less moving parts. do the three reviews mostly catch different things or does the same stuff keep coming up?
1
u/zzunkie 24m ago
Clearing between every phase is probably a big part of that token burn, since every fresh session drops the warm cache. Staying in the same session to try a few extra paths has been much cheaper than I expected.
1
u/UnstableManifolds 21m ago
Where's your time going? If it's exploration, you may want to investigate tools for code mapping in any form (I use Structurizr but there are many as you can imagine), LSPs, and so on).
1
u/bcrawl 15m ago
Solo dev here: Shipping (i am loosely defining it as deploying to your dev environment) speed depends a lot on your points 4 and 7. There are natural bottlenecks when test driven development + CI/CD is concerned and it involves wall clock time. Typically a feature implementation needs many PRs. How you manage tests, stack your changes and test in local fixtures before triggering CI/CD workflows is how you gain speed. Below is how my 500+ PRs look like, showing various metrics from last 1.5 months. As I work through feature, I manage these as best as I can. All agents are top of line anthropic / codex models. Agreed, no skimping on that.
1
u/t1nkl 0m ago
i don't run a spec pipeline like yours, but on a solo project the thing that kept quality up for me matches your context isolation point: whoever checks the work must not see the reasoning that produced it. i don't do that with fresh sessions by hand anymore. the review is a subagent that only gets the diff, never my conclusion, so it starts from a clean context while i keep working. it caught bugs my own live check had missed, because i'd computed the check with the same wrong assumption the code had. for speed, what helped me was running independent pieces in parallel instead of in a line: each subagent works in its own git worktree, and i merge the results myself (claude -w <name> does the same thing if you start sessions by hand). on whether isolating tests from implementation is worth it, i'd keep it, it's cheap next to what it catches