5 ms·
How I use Claude Code to implement new features in an existing complex codebase
- campbel 1y agoThe author describes a lot of directives they found useful. Be aware Claude has the concept of `slash commands` https://docs.anthropic.com/en/docs/claude-code/slash-commands#custom-slash-commands https://docs.anthropic.com/en/docs/claude-code/slash-command...
- AndyNemmity 1y ago[flagged]
- mattlondon 1y agoWhat are hooks and subagents then?
- mephitix 1y agoMaybe you should ask Claude ;) https://docs.anthropic.com/en/docs/claude-code/hooks https://docs.anthropic.com/en/docs/claude-code/hooks https://docs.anthropic.com/en/docs/claude-code/sub-agents https://docs.anthropic.com/en/docs/claude-code/sub-agents
- chank 1y ago> https://docs.anthropic.com/en/docs/claude-code/hooks https://docs.anthropic.com/en/docs/claude-code/hooks > https://docs.anthropic.com/en/docs/claude-code/sub-agents https://docs.anthropic.com/en/docs/claude-code/sub-agents
- AndyNemmity 1y ago.
- __loam 1y ago[flagged]
- deleted 1y ago[deleted]
- raincole 1y agoWhat do you mean? (Genuinely asking)
- __loam 1y agoThere's a brand new thin wrapper for this bullshit every month. First we had Langchain, then MCP servers, and now this. The industry has been constantly trying to wrap the stochastic bullshit generator with frameworks and guardrails, for years, and the heart of it will always be the same model. I wouldn't care, but you all insist on inflicting this on every code base while a clueless leadership class has started using it as a performance metric.
- raincole 1y agoThat's sad.
- deleted 1y ago[deleted]
- dang 1y agoThis crosses into personal attack, which is not allowed here. Please don't post like this again. In addition, please note these guidelines: "When disagreeing, please reply to the argument instead of calling names. 'That is idiotic; 1 + 1 is 2, not 3' can be shortened to '1 + 1 is 2, not 3." "Please respond to the strongest plausible interpretation of what someone says, not a weaker one that's easier to criticize. Assume good faith." "Please don't post shallow dismissals, especially of other people's work. A good critical comment teaches us something." https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html Edit: this is unfortunately a bit of a pattern with your account (e.g. https://news.ycombinator.com/item?id=44665780 https://news.ycombinator.com/item?id=44665780), and we had to warn you about this at least once before. If you wouldn't mind reviewing https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html and taking the intended spirit of the site more to heart, we'd be grateful.
- _betty_ 1y agoIt's from July 6, so yeah a month in the past is totally right. She has newer posts on sub agents
- deleted 1y ago[deleted]
- XenophileJKO 1y agoActually please write an article about how you are currently using it then. I've been actively using it and working with sub-agents. I feel like there are very little resources out there on more complex Claude Code setups. I would love to see other setups, like what MCP, hooks, sub-agents, commands, etc.
- AndyNemmity 1y ago.
- weitendorf 1y agoWe’ve been building in this direction for a bit over a year now. I don’t see your contact info but please reach out over email if you’re interested in checking out our approach and maybe working with us!
- AndyNemmity 1y ago.
- weitendorf 1y agoIt’s not the specific agent config or anything like that I’m after, just the genuine interest+enthusiasm in an area we’re actively working on. The central premise to what we’re building is our system for reusable and composable AI workflows. Shit’s moving fast and the math works out such that it’s probably better to just find someone at the bleeding edge and offer to pay them really generously to work with us than to recruit for this work normally. If you change your mind you can find my email on my profile! Edit for more context: We’ve basically had the same thing as Claude’s slash commands (we call them workflows) since November, but then we switched gears and made our cloud IDE/agent sandbox and other components of our infrastructure layer the top priority. That’s working and the timing is amazing since we should be able to just glue all these new cli (sub) agents in between our workflows and agent infrastructure. I suspect someone who understands terminal agents well could do it about 4x faster than me.
- keerthiko 1y agoto be fair, the linked youtube video from the article is literally 4 weeks old, so "at least a month in the past" is probably exactly accurate if you are moving at the same pace as the author.
- deleted 1y ago[deleted]
- _andrei_ 1y ago> If you don't discuss hooks and subagents, i'm not sure what you're doing right now. Agents have their own context and can be useful for tasks that can be parallelized, which is a minority of tasks. How are they critical to better performance for you?
- AndyNemmity 1y agoThis is the best question anyone has asked. Let's consider context. At some level the more context you have is good. At some level, the more irrelevant context you have is bad. Okay. We have at top level of context, a hook that forces a system prompt on every action. Next level we have a ./claude/CLAUDE.md then we have the project level CLAUDE.md then we have a possible not required agent setup then we have the instructions you give it We know that CLAUDE.md gets lost in the context, at any level. The system prompt level hooks don't. Why does the CLAUDE.md get lost? Why are we losing ability with a longer context. The problem is irrelevant context to the action. The Documentation agent doesn't require the Golang modernization rules. The Golang agent, doesn't require the planing coordinator rules. So the question I asked myself last weekend was, what is the experience if you split the contexts to only the required information for the task. I did head to head battles with agents, reading in the information, versus contextual specific information. The agents with context specific destroyed the competition. Like it was another world. So then I ran head to head tests on the type of information. Etc etc. My current setup is the best level achieved in those tests. So my argument is that removing the context that is entirely irrelevant for the agent improves performance dramatically. But I'm one person doing tests... it's true for me. Maybe it's not true for others. People have to explore the conception and determine that. I can only tell you what has worked best for me, and for me, it's like a model jump in performance improvements.
- dSebastien 1y agoIt's been my experience too, already prior to support for sub-tasks/agents. I've been exploring the ways in which I could "lazy load" context depending on the task at hand. I've approached this by defining an AI "receptionist", a set of roles and a set of tasks. The receptionist is the entrypoint of the system. It knows where to find roles/tasks but only loads very basic information about the roles. Depending on the role I ask for, it then loads the right role file, which in turn loads additional context. Then I ask for whatever i want to do, and it loads specific task files based on what I asked. And the task files load additional context etc. This works quite well because I end up with just the right context for the task at hand. And each role/task can actually be executed as a sub-task/agent
- CyberMacGyver 1y agoGenuinely, how do you keep up to date with these features while still being focused at the task? The more I focus the less I have time to read and experiment O want to finish it. What are your sources and how are you balancing it ?
- AndyNemmity 1y agoHonestly, the release of sub-agents was the first time it felt actually meaningful. MCP servers and the rest have not provided the type of gains sub-agents have. Hooks and subagents actually provide tangible value. Enough that it's changed my structure entirely to be tool focused, and not output focused.
- j_crick 1y agoWhy did you replace your comments in this thread with . ?
- AndyNemmity 1y agoBecause I gave examples, and details, and thousands of people read them from a pastebin i used to share. I didn't release it as open source or anything, just sharing. I don't want to take questions concerning it so I can focus on moving it forward. Today's goal is to try to build self healing agents that automatically fix the problems they encounter so they only happen once, automating a manual process I successfully use. Perhaps if that works out well, that is something releasable I can do in a real way as opposed to paste bin.
- j_crick 1y agoSadly I was just late to the discussion and missed the stuff. Would you mind sending what you shared to an email of mine? Not requesting further communication, just simply curious what people do with and around this.
- sabrina_ramonov 1y agoI'm the original blog post writer. Sadly I have no idea the context for this comment thread now.
- dang 1y agoCan you please not gut your comments by deleting the content, once they have replies? It destroys the context for readers, making the thread worse for everyone.
- AndyNemmity 1y agoThat’s fair, I shared things that weren’t in a state to communicate. I shouldn’t have commented at all.
- dang 1y agoAppreciated! And yes, that happens sometimes.
- cristea 1y agoI agree with the notion here that things are moving so fast that most blog posts will be outdated quickly. However posts like this is valuable for new people to get a basic understanding of how these tools could be used in a very simple, beginner friendly, setup.
- cantor_S_drug 1y agoThis is equivalent of .vimrc file. ".clauderc" .
- manmal 1y agoA few thoughts on this: - I wouldn’t outsource my brain to CC when it comes to checking CC’s output. Very mixed results in my experience, and it might discourage further exploration/thinking if you’ve already performed the checklist CC has given you (satisficing). - Slash commands are the idiomatic way to memoize often used prompts, I wonder why author put them in CLAUDE.md? - I’m also a bit skeptical that, aside from strict rules CC needs to follow, the encouragements/enchantments for writing good code author put in CLAUDE.md really work. But who knows. - I DO like the caveats section at the end a lot. This is probably the most important piece of the article, when it comes to large codebases. Never just accept the first draft. Review everything with high suspicion and bend the output to your own style and taste. Otherwise, you‘re pushing legacy code.
- deleted 1y ago[deleted]
- croes 1y agoIt will be interesting to see how all this works out when the honeymoon phase is over. At the moment they burn a investor money to gain customers by giving us free tools and cheap LLMs. That will end at some point.
- chrisvalleybay 1y agoOne perspective could be that this is a moment to leverage. Subsidized LLMs won't be around forever, so this is a great time to build something that you wouldn't have had the time to build otherwise.
- ofrzeta 1y agoThat many sites about AI look a lot like scam sites ("make money fast") is a real turn-off -> https://www.sabrina.dev https://www.sabrina.dev Maybe it does have some valuable content but I will just close it.
- Valodim 1y agoWow, geez. That is terrible, I'm surprised a website like that can have any actual content as TFA
- WD-42 1y agoThe grifters have entered the arena.
- literalAardvark 1y agoHype is like catnip for them. They've been around for a while, many of the OG AI YouTubers didn't know anything about it when they started to pretend to educate.
- rootnod3 1y agoI mean, the grifters have started it. They grifted for way too much money without ANY plan on how to actually get money back to the investors. Including the dubious benefits, just promising a "quick fix". That is a bit over the top, but the core statement kind of stands.
- sabrina_ramonov 1y agoI'm the writer of the blog post. I don't sell ai courses, consulting, coaching, or anything like that. But I do use claude code to help me build my SaaS app as a bootstrapped solopreneur. I also sold an AI startup in early 2021, which I founded back in 2014 when the hyped term was "Big Data". I've been around a few hype cycles now..
- layman51 1y agoI agree. I remember a year ago some a submission on this forum by Sabrina where she was evaluating LLMs on SAT math problems. The post was called like “ChatGPT-4o vs. Math”. I thought it was pretty insightful, but now that post is deleted from her blog and it seems like the blog as a whole is leaning into attracting people who are nontechnical and want to use it to generate social media content. Weird vibe in the comments of her posts and videos too.
- steilpass 1y agoI stumbled upon the author’s command `qnew` to read Claude.md. Why would you need that? > CLAUDE.md is a special file that Claude automatically pulls into context when starting a conversation. https://www.anthropic.com/engineering/claude-code-best-practices https://www.anthropic.com/engineering/claude-code-best-pract...
- vunderba 1y agoThat confused me as well. The whole point of CLAUDE.md is that it is automatically injected into the rolling context of any Claude interaction/thread. That CLAUDE.md file that they've posted is also HUGE - Anthropic themselves recommend keeping it on the more concise side. If you need more, consider just creating dedicated subagents for "UI/UX reviewer", "search", etc.
- theshrike79 1y agoMy CLAUDE.md has references to other documentation Like "for guidance on Go library selection refer to docs/go.md" That way the main file stays compact.
- sabrina_ramonov 1y agosubagents were not yet released at the time of my blog post
- brunooliv 1y agoAm I the only one who uses CC in a one-shot fashion? I rely on what has been generated by the init slash command at the root of my monorepo and then when I have a complex task I manually create a md file called CONTEXT.md inside the package/area where I want to implement the new task. I try to be as detailed as possible, think like writing a ticket for a junior dev. Then my only command for CC is something like: “Focus on the project structure described in CLAUDE.md and work through the task planned in CONTEXT.md. Follow current codebase standards, keep code reusable and easy to follow and modify.” This is like 99% of my CC interactions working on top of a well structured codebase and it just works perfectly for almost any task I throw at it.
- chrisvalleybay 1y agoI mostly do the same. My workflow is usually like this: 1. Supply CC with a simple user story with light spec / business logic, asking it to write a specification for the feature and ask me any questions that need to be answered to make it complete. 2. Build up the context with all relevant files that I want to use. In Ruby on Rails it means refercing models, views and controllers that show the structure we are going to use. 3. Write the code and tests.
- brunooliv 1y agoNice to see!! I wrote a longer post about this: https://open.substack.com/pub/boliv/p/claude-code-usage-patterns?r=egj2b&utm_medium=ios https://open.substack.com/pub/boliv/p/claude-code-usage-patt...
- sabrina_ramonov 1y agoNot sure the complexity of your app but mine's pretty complex with many daily active users. One-shot rarely works unless it's a simple feature/chore and I tell CC exactly what to do, which functions to touch, and how (which defeats the purpose).