Live data from Hacker News

How I use Claude Code to implement new features in an existing complex codebase

sabrina.dev

51–60 of 71 posts

Re: How I use Claude Code to implement new features in an existing complex codebase

#51
post #37

Earlier quoted context omitted.

Actually 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.

I think the basic issue for me is that people put this stuff out as if it's some big discovery, and yet my own usage is way different and serves me just fine thank you. These have the feel of a developer who has just discovered development and then want to tell you about all the best tools. But it's not really about showing you the best tools, is it? Rather, it's about riding the hype train and creating slop for more…

Respectfully, I think you are being reflexively contrarian or overindexing on the vibe coding hype train. The way vibe coding UX works is basically just having LLMs guess what they need to do to complete a task and then sending it off to do it and try to fix anything that doesn't go according to plan along the way. Nothing big there.

I had started working on an AI devtool product a few months before Cursor took off, I didn't even know about them when I first started, and I hated that such a dumb UX was setting the narrative in this space. LLMs had essentially no ability to decompose and plan tasks at the time, and they weren't fucking sandboxing it!

Terminal agents are actually moving towards the UX I've been building/anticipating for. In March of 2024 I was playing around with GPT4 and saw it oneshot a microservice I asked it to make. I was so excited about the implications of where this stuff could go that I quit my job at google just to start building in this space.

Without getting into all the details, I am pretty convinced there must be some particular way of arranging infrastructure primitives and AI-coding tools in a way that properly decomposes and executes arbitrarily large or complicated tasks (limited only by available time and resources). Claude code is IMO getting closer to that by the week. No iterative change is crazy science or anything but there are some genuinely novel and exciting patterns for computing things underway.

Re: How I use Claude Code to implement new features in an existing complex codebase

#52

Am 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: “Foc…

I 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.

Re: How I use Claude Code to implement new features in an existing complex codebase

#53
post #18

It 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.

One 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.

Re: How I use Claude Code to implement new features in an existing complex codebase

#55

Earlier quoted context omitted.

> 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?

This 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 instr…

> So my argument is that removing the context that is entirely irrelevant for the agent improves performance dramatically.

100% agree on building the optimal context, just have not seen parallel agents do better at sequential tasks. the documentation agent may have better initial context about how to write documentation, but it doesn't have the context of the changes, apart from what is passed to it / can explore. if we don't spawn a new session, and instead throw it a /document command - that would still get all the guidelines and rules for writing documentation, and it should have the same weight since it's at the bottom of the context.

for me the highest 'model jump level' performance booster is externalizing context and controlling the process - having claude initialize a plan file with a pre-defined template that makes it use that as its to do list and documentation place, and getting it to use that as its primary working area

Re: How I use Claude Code to implement new features in an existing complex codebase

#56

Earlier quoted context omitted.

This 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 instr…

> So my argument is that removing the context that is entirely irrelevant for the agent improves performance dramatically. 100% agree on building the optimal context, just have not seen parallel agents do better at sequential tasks. the documentation agent may have better initial context about how to write documentation, but it doesn't have the context of the changes, apart from what is passed to it / can explore. if…

I am doing that too. Perhaps I am misjudging which part is providing which benefit, but when using the plan system as well as the agent, the agents with this context setup perform much better.

It all builds on each other, so it can be slightly challenging to untangle which part is providing the majority of benefits.

Re: How I use Claude Code to implement new features in an existing complex codebase

#57
post #54

[flagged]

Why did you replace your comments in this thread with . ?

Because 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.

Re: How I use Claude Code to implement new features in an existing complex codebase

#58

Am 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: “Foc…

I 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…

Nice to see!! I wrote a longer post about this: https://open.substack.com/pub/boliv/p/claude-code-usage-patt...

Re: How I use Claude Code to implement new features in an existing complex codebase

#59
post #54

Earlier quoted context omitted.

Why did you replace your comments in this thread with . ?

Because 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…

Sadly 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.

Re: How I use Claude Code to implement new features in an existing complex codebase

#60
post #27
post #20

That many sites about AI look a lot like scam sites ("make money fast") is a real turn-off -> https://www.sabrina.dev Maybe it does have some valuable content but I will just close it.

The grifters have entered the arena.

I 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.

Post reply on HN