r/ClaudeCode • u/Ok_Vermicelli8618 • 12h ago
Help/Question Help/suggestions for Claude Code setup?
My second time back to reddit, hopefully I'm doing better this time :) I took the feedback from before, and have made some changes.
For the harness, I'm using Superpowers, I have borrowed quite a few idea ECC C++ and have implemented them too, but I'm trying to avoid anything conflicting.
Orchestrator: Opus, on Medium
The Agents: This works hand in hand with Superpowers, or it should. The first agent is a create writer and is meant to ask you questions, research things online, and interview you. This doesn't happen just once, for anything that would be a big change. You can initiate this with a skill, but it's supposed to automatically trigger if the change/addition is large enough. The point of this is to keep things in scope. I read somewhere that the reason lesser models didn't generally do as good in terms of coding was largely due to not planning well enough and not defining the scope. In the plan the agent, unless specified otherwise, is told to not deviate from the plan and create new things outside of what is being asked.
Agent A: The Planner: Generally, Sonnet at Medium. It goes from Sonnet to (the orchestrator) Opus to make sure the conversation between me and the Agent was sufficient. This is a quick overview and generally nothing gets added to the plan.
Agent B: The technical writer then writes up the technical plan. You can set this up to auto, if you aren't technical, but I've done a fair bit of dev work and want to read through it. If you didn't mention the technical stack to the planner, then it's up to the agent. The technical agent fills in the gaps. This is done by Opus on Medium.
Agent C: The Engineer: In the plan a level of difficulty is assigned to it. This is assigned by the orchestrator. It goes to an Engineer depending on that level of difficulty. Ether Haiku, Sonner, or Opus. This engineer has to finish the project, no questions. Once done, it reviews the code, entering into QA mode. This is a basic, initial review. It fixes anything it finds. I just setup an MCP server that allows the information to be piped out for static analysis done by software. This will hopefully reduce the QA cycle. I did have the QA cycle too strict, to where I wasn't allowing anything through, even small things that are basically meaningless. Two QA cycles (for two different things) took 9 or 10 cycles through Opus at Medium, and that's not including having to go back through the engineering phase too. When I changed this, most things pass the first or second QA round. The static analysis should be helpful too though, and ideally, it won't eat up much in terms of tokens. I haven't tested it out; my reset is tomorrow.
Agent: D: QA: QA was previously just Opus, but I've done a fair bit of research that shows Sonnet does a very good job at QA, about 5% or worse than opus (both at medium reasoning). I might switch this out. Thoughts? The QA process is a code review, but it's also a lot of tests, from mutagenic, to python scripts that are setup to test every feature, and to record oddities. Basically, anything out of what is defined as the expected behavior. The radial menu I made with Qt did this bunny job, because it's supposed to reset the center circle where the mouse is, but the exact behavior wasn't expected. This was caught by the python script, and the issue was resolved by the engineer. A lot of what I picked up for the QA agent came from how Uncle Bob explained his Claude Code setup, and that the biggest part relies on a gauntlet of QA, from code review, custom python scripts to test different things, mutation tests, etc)
Agent E: Git Agent: This agent manages all things to do with git. Once something is greenlit, it's ready to be pushed up to Git. It also makes sure that the repo stays tidy.
- To reduce context rot, I have new machines spawn at half their context. I know it's probably better to do it sooner and might save more tokens. Thoughts?
- Learning: All problems that come up, or difficulties the AI face, are recorded in csv file. Eventually I'll get around to putting together the SQL Lite sever to do this. So not only things that needed to be fixed, but overall difficulties that came up. Difficulties are given a number, the method for changing them, and the reasoning of how it came about. For fixes, the priority, the issue, and the fix are recorded. The learning is twofold. there is also a skill that breaks apart conversations and extracts important information out of it. This is all funneled into the same csv file right now. The skills and agents update based on lessons learned. I haven't had this in place long enough to see if it's worthwhile, but I have seen people do similar things.
- My hope is that the learning, planning, and staying within scope will help reduce the token usage. I'm also having the AI generate a handoff report whenever it does have to close the agent from reaching context limit. This ideally prevents a ton of tokens from being used, due to having to read the entire previous conversation. It isn't perfect, but hopefully it's enough to still get done what I'm working on. I'm also hopefully that the static analysis of the code will eventually replace the AI agent doing the QA, for the most part. If the static analyzer can point at the different files and feed the report back to the agent, that saves a ton of tokens in code review. Thoughts on this?
- MCP: I setup a handful so far. I have Qt Documentation, Qt Studio, Codacy, setup. I haven't used them yet, but I did run into some issues early on with Qt, though much of that was the strictness I have setup for QA.
- I haven't added too many new skills. Some for fuzzing, around Github, the different MCP servers, learning, and a few others. Maybe 15-20 custom skills so far.
- Update State: This is a new addition; we will see how it works out. A current state document is written when I want to update certain things. This is supposed to stop Claude from using old rules/governance that it was supposed to edit and change. We will see if it works.
Right now, I'm working on a fairly complex open-source project that focuses on retopology. It uses a lot of geometry and math, C++ focused, Qt, cMake, etc. My goal is to put out the best code I can within reason and also reduce the token usage where I can.
Any suggestions?
•
u/AutoModerator 12h 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.
3
u/maddcovv 11h ago
Paste this post into Claude. Happy to help.
1
u/_Dopaminefiends_ 11h ago
Your setup is solid, the part I'd watch is the planner-to-engineer handoff, that's where scope quietly grows in my experience. I run a similar split in my own work, the planner locks the exact boundaries and the engineer isn't allowed to invent anything outside them, and I only put a human approval on the irreversible moves while the code gates handle the rest. Sonnet for QA makes sense too, I found the same with my trading bots, it catches almost as much as Opus as long as the tests spell out the expected behavior instead of being vague. And keep your MCP tool descriptions tight, I've had tools drift from what their name promised, which is how you get a clean QA pass that still missed the real bug. For the handoff report I'd carry just the current scope and open decisions, not the whole history, otherwise you're paying to re-read it every session.
1
u/ainexfinder 8h ago
On Sonnet for QA: it usually holds up fine for running the checks and reading mutation and static analysis output, since those give it something concrete to judge against. Where a stronger model still earns its cost is the judgment call, like whether a surviving mutant or a passing test actually means the requirement is covered. A split that tends to work is Sonnet runs the tools and writes findings, and Opus only gets pulled in when findings disagree with the handoff report or a fix touches something hard to undo.
On spawning at half context, the number matters less than what the new agent inherits. If the handoff report has a fixed shape (goal, what's done, open problems pointing at the CSV rows, files touched), the fresh agent starts clean instead of re-reading half a conversation.
1
u/FishermanCrafty1249 7h ago
Honestly, at least for me, fewer agents worked better than more. I run one main Claude Code session per project with a short CLAUDE.md, a few skills and a memory folder of small notes, one fact per file: decisions, my preferences, things it got wrong before. Before anything big I ask it to grill me on the task first, which is basically your interview agent, but in the same chat, so nothing gets lost in a handoff.Where I'd spend the effort instead: a real check it can run by itself. Tests, a build, or a script that drives the actual app. Agents reviewing other agents' plans helped me much less than giving one agent a way to see that it's wrong. (Even though i know that right way to separate tasks and testing by different sessions) Probably a matter of taste though, your setup might pay off on bigger projects.Honestly, at least for me, fewer agents worked better than more. I run one main Claude Code session per project with a short CLAUDE.md, a few skills and a memory folder of small notes, one fact per file: decisions, my preferences, things it got wrong before. Before anything big I ask it to grill me on the task first, which is basically your interview agent, but in the same chat, so nothing gets lost in a handoff.Where I'd spend the effort instead: a real check it can run by itself. Tests, a build, or a script that drives the actual app. Agents reviewing other agents' plans helped me much less than giving one agent a way to see that it's wrong.Probably a matter of taste though, your setup might pay off on bigger projects.
1
u/daveparsley 1h ago
I'd focus less on optimizing the QA agents and more on defining what QA should actually be allowed to block. Not every finding deserves another engineering and review cycle. The level of rigor should depend on the stakes of the project.
As for context management, I generally aim to stay within 300-400k tokens with current frontier models. But rather than starting a fresh session whenever I hit a certain threshold, I try to structure the work into independently verifiable tasks that can comfortably fit within that context budget.
These are actually two of the problems I've been trying to solve in an open-source skill I'm building: https://github.com/theyv/shape-and-execute
It lets you define project stakes that both workers and reviewers operate against, and separates planning from execution so that each job gets a fresh context.
Even without using the skill, I'd recommend experimenting with these two principles in your existing setup.