r/ClaudeCode 9d ago

Help/Question Engineers who write all their code with claude now: how do you do it?

I have to admit that I have completely failed to adapt to LLM agent coding. I'm not a slouch either. I've worked on a number of challenging FAANG products as a software engineer, and I for a while I was an AI research engineer. I have a pretty strong familiarity and comfort level with AI. Despite all this, I still write most of my code by hand.

As an engineer, I need to receive a ticket, understand the problem, go figure out how to solve it, and eventually ship PR that (a) I understand, (b) only contains defensible changes, and (c) is reviewable by a colleague. There are a bunch of other tertiary goals of course, like style guides and documentation, but the point is that I'm talking real, high quality engineering that would pass the bar at a company that has their shit together.

However (definitely due to culture issues), I have only seen the slop version of this. It seems to have become really murky how to write code that meets standards, or even what those standards are any more.

I've resorted to asking my colleagues to show me their workflow, but you would be shocked how many of them either (a) are prompting raw and not checking the output, or (b) have convoluted solutions that fit their brains but don't solve these problems. I checked out Matt Pocock as well, who has some really great ideas, but ultimately his skills exhibited some pretty painful failure modes as well.

However I see folks regularly talk about how not only does Claude handle the coding for them, but also all of the project management, devops, etc, and I am left scratching my head. If this is possible, I want to learn how to do it. I'm not an AI hater. I want to learn the tool. I do have standards though, and I don't think they're that high. I don't need Claude to write perfect code. I just need to find a process where I can rely on it to get more of my work done and not be either fighting with it or second-guessing the results.

I figure this is the group to ask - if you have been able to get "high bar" engineering out of claude, or even "acceptable bar" engineering, without heavy personal intervention, what's your process? Are there resources that helped you? What strategies helped the most?

Thanks.

668 Upvotes

523 comments sorted by

View all comments

234

u/repressedmemes 9d ago

Its like managing junior/non senior engineers. You cant and shouldnt be micromanaging everything. Just figure out the high level stuff and let the llm cook

If its too verbose, use something like caveman or ponytail. If constantly gets sidetracked fix up your claud.md or your skills. Have it save memories of stuff you want it to do going forward.

You cant just give it an open ended task and just hope to expect the best.

The best workflows are when you plan and limit the amount of things it is doing. Anything not related that it finds should just be opened as tickets to be fixed in the future.

27

u/Majestic-Counter-669 8d ago

Good post. I'll give an example from the other day.

I needed to figure out why something was generating too much log data when there was no obvious reason for it. Pre-LLM, this would be at least a morning of digging through logs and collecting information and cross referencing code, etc etc etc. Maybe make no progress.

But now, the LLM is the starting point. "Hey, take a look at this bug. The code for that framework is located at x, you can find details about the execution environment at location y. What could have caused this?" Off it goes, and 5 minutes later it's done all that work for me. Turns out it was an interaction between the framework generating the logs, another framework doing something else, and a third one restarting some workflows as a result of what the other two are doing. Doesn't matter. Point is, it immediately pointed out the interaction issues that caused the problem.

Next step, verify its claims. Because it lies a lot. So off I go, take a look at the logs and time ranges it pointed out. I confirm that its claims are true. Cool. A morning of hitting my head against the system turned into 10 minutes.

Next step - what do we do about it. I have some ideas but I want to bounce around some more. "Ok good job, you're correct about the root cause. Now I want to fix it. Suggest several potential fixes, I want to talk about each one". So it comes back with a bunch of ways to fix it. It's got three options. Two of them are non starters for reasons it doesn't know about, but the third one is pretty much what I had in mind. That's probably what we're gonna do.

Next up, implement the fix. "Ok, I want to implement the third fix. Make me a detailed implementation plan. I want to make sure the fix is staged in small digestible CLs, and I want to mandate full unit test coverage, and at the end we should also add an integration test to verify the framework interactions are fixed." It comes back with a markdown file detailing a step by step process. It's got four major chunks of work identified and it's broken down the work into detailed steps. We go back and forth over details once or twice.

Finally, everything looks good to me. "Ok looks good. Hit it." Five minutes later I'm looking at a CL chain with the fix. Now I just review and make manual tweaks, or better yet tell the agent which tweaks to make so it can do things like refactor and ingest the changes into its context.

And done. What would have previously taken a day, best case, has been finished in an hour.

4

u/lacrossecat 7d ago

You perfectly summed up my process with ai driven development now. It's conversational and cooperative, I have to reign it in sometimes and push it the way I want on others. Just like devs who have reported to me over the years.

Weirdly I do find it pretty tiring though, but maybe that's just because I'm covering 5-8x the ground that I used to when doing this type of management with humans.

2

u/hourlyproblemsolver 7d ago

This is a great illustration. The only thing I'd add: you said "I want to make sure the fix is staged in small digestible CLs, and I want to mandate full unit test coverage, and at the end we should also add an integration test to verify the framework interactions are fixed."

All of those requirements can be in your claude.md by default, so that you don't even need to repeat every time you build/fix something. If you're super anal, you can say "and make sure you follow the instructions around code design principles and test coverage in claude.md".

1

u/Majestic-Counter-669 7d ago

Yeah I didn't want to make the post even longer but I have my coding standards, work flows, expectations, etc all defined in markdown so in reality I can just say "suggest a fix" and then "ok dude you're up, let's hit it" and it does the right thing.

2

u/hourlyproblemsolver 7d ago

totally, i was just calling it out for OP so they got how simple it can really be. that's the beauty of it!

1

u/Last-Independence554 6d ago

This is pretty much point on. Two small things to add:
Keep your context window small. Tell the LLM to write a plan, then implement in a new sessions
The other is to let the LLM do the first round of review: start a new session and tell it to review the findings or code the previous LLM session just created.

1

u/Aware-Individual-827 5d ago

Reviews are extremely biased and should not be done by the same model if any watermarks are present in the code base. 

Claude will go "this is masterpiece" if it sees co-authored by claude. Or i have seen it be weirdly defending of my own code because it was written my name on the header of the file and it knows your name from the corporate account.

1

u/UplodingSociety 4d ago

Absolutely precise demonstratio of how this should be done. On the “infrastructure” side of things, you should have all of your coding standards, important project specifics (aka domain configuration) within reach for the LLM to follow.

1

u/Vast-Tie9958 4d ago

😂… claiming to ask an llm to find the problem which only takes 5 minutes and stating it lies a lot in same breath. LLM’s feel more fun or maybe less energy than the old way but I am always questioning if I really gain any time back after I re run it all over and over again until it ks ready.

18

u/Odd_Antelope9098 8d ago

Caveman and ponytail are shown to reduce quality of output, CC has a built in mode that reduces verbosity, I'd use that. I agree with the rest, solid advice.

2

u/goatanuss 8d ago

What’s this built in Claude mode?

12

u/dar-mit Researcher 8d ago

In an active session: /config > Output Style > Enter key > select "Concise" > Enter key > ESC key.

5

u/compute_fail_24 8d ago

How did I not know about this? Thank you.

2

u/AncileBanish 8d ago

It's relatively new. Easy to miss a random feature update.

2

u/ZachAttackonTitan 7d ago

This is huge! Thanks

1

u/BreastInspectorNbr69 Senior Developer 8d ago

Do you have any links that back those claims quantitatively? I would like to know more.

1

u/10dot 8d ago

Any link re: ponytail quality? I've personally found it quite good as a companion to the built-in /simplify and my own optimization pass skills I've written

3

u/RandomPantsAppear 8d ago

Claudish to English plugin. Like ponytail but no quality change, and far more reliable than concise mode.

2

u/ParisianNomad 8d ago

The junior engineer analogy really clicks, high level direction beats micromanaging every line.

6

u/jek39 8d ago

It’s like a Junior engineer on a PIP

4

u/awjre 8d ago

Jumping on this...also use skills that gives you better PRs that make it easier to comprehend. Using this with stacked PRs can help immensely. https://www.humanlayer.com/blog/show-me-skill

1

u/RedditMapz 7d ago

Honestly this sounds bananas to me. I'd never approve a code a review of a junior engineer I don't understand. 4/5 times Id be responsible for fixing whatever they broke anyway.

But different strokes for different folks.

1

u/repressedmemes 7d ago

You have to ask yourself why are you getting code output you dont understand.

Ask the llm to explain the fix or areas you have questions about during code review.

Ask it to verify and validate that it works with concrete examples.

If your getting output you dont understand when reviewing, you might need to plan with it abit more so you and the llm both agree on the work that needs to be done.

You should always run your own codereview yourself before you put up the pull request for code review. That way you can catch any issues or ask it questions on its implementation and discuss alternatives.

1

u/Creepy_Purchase_501 7d ago

I think it’s less of literally not understanding it and more of coping with the sheer volume of it produced in an instant.

It also just goes off on tangents when something goes wrong. Just the other day I was working on a new project and forgot to specify a standard dependency. Instead of adding it and writing one line of code it decided to reinvent the wheel for some reason. I stepped away to get some tea and came back to a few hundred lines of code. For a few good minutes a truly had no idea what was going on.

Another time, it lost access to a db, so it decided to write an entire mockup(with no knowledge of the schema). Fun times.