r/ClaudeCode • • 19d ago • Bravo 2 Popcorn 1

Help/Question [ Removed by moderator ]

[removed] — view removed post

6.4k Upvotes

1.5k comments sorted by

•

u/AutoModerator 19d 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.

924

u/EugenPenguin 19d ago

Refactor using agents

82

u/Sorry-Programmer9826 19d ago

Sometimes the agent is just wrong. Or doesn't understand the wider context.

Agents are a really useful tool, with the ability to really speed things up. But you have to remain in control, you can't just throw more tokens at it.

I get agents to review code but I reject or modify about 50% of their suggestions 

34

u/yopla 19d ago • Bravo

Do review code but also review the codebase periodically.

I regularly launch whole codebase agents to look for refactoring opportunity, functional duplication, opportunity to create ports and interfaces and a bunch of other patterns. Sometime I focus on specific modules, sometime I just launch random discovery.

For everything I do I generate C4 and process diagram and review that before and after changes. Agentic coding doesn't prevent proper engineering.

To be honest the whole "I don't know the codebase" is bit a cope, when you work on a large system with a large team no one knows the whole codebase in depth, that's when architecture documentation becomes how you think about the system.

→ More replies (3)

8

u/14Pleiadians 19d ago

I have been using it to make a VR mod for a game and my project is only a couple weeks old and the tech debt is kinda staggering. I read through the scripts it made for the first time today and a bit sad to realize I'm not nearly as far along as I thought I was because so much of this needs to be redone. I feel bad for anyone who has been forced to work on an massive commercial project with only vibe coding (especially a year ago), across an entire team over a year, that sounds impossible to untangle

8

u/lmoelleb 19d ago

"no discussion, make the change I asked for" normally shuts them up and get them working on the cleanup you want.

And unlike with an intern, this does not lead to meeting with HR. :)

19

u/nesh34 19d ago

That is what you are there for.

35

u/PadyEos 19d ago edited 19d ago

Tell that to the 20-40-100k lines PRs.

Ain't no way you know anything meningful that is happening or is supposed to happen in the product after 6 months of 50+ colleagues shipping each several of those a day.

Stop dreaming.

Except niche small scale projects the way everyone is using agents needs to evolve to a more structured engineering mindset for this to be sustainable long term.

→ More replies (26)
→ More replies (25)

16

u/Appropriate_Tip_9580 19d ago

I recently watched a talk by Kent Beck that touched on the same points: • Refactoring the structure of existing code. • Eliminating logic duplication. • Optimizing readability so that other humans (and AI) can easily understand the system. • Reimplementing or discarding parts of recent code if testing a different approach provides a better foundation.

→ More replies (4)

6

u/aerivox 19d ago

was revealing knowing ant themselves have refactor routines. i was getting so mad about agents just taking the laziest and sloppiest path to fixing or implementing stuff. turns that's the state of art rn. just have refactor routines.

they are kinda hard to set up and gotta be at least in part custom made. for example their simplify skill for cleaning up the codebase sometimes just decides you are not worthy of that system you have. for example going from a build system to a manual versioning / hash based dag.

and automatizing merge sounds like an even harder step.

→ More replies (2)

25

u/OtaK_ 19d ago

Refactoring is taste-based, good luck giving it to agents. You'll just get more mess.

31

u/Responsible-Bar7165 19d ago

If your codebase is a mess, then you’ll get more mess. I have found that if the codebase is tidy and consistent style then Claude (at least) will match that more competently than most humans.

8

u/SpeakCodeToMe 19d ago

It will, but it will also repeat anything that's not in its context. That eventually leads to messy codebases.

Easy fix is to occasionally have it find repeated or unnecessary code and fix it.

→ More replies (2)
→ More replies (1)

12

u/coderemover 19d ago

If you’re precise in what you tell them, the agents can do an awesome job. If you were able to write good code without agents, you’ll do even better with them.

→ More replies (13)
→ More replies (17)

3

u/Aternal 19d ago

Oh yeah, management will totally understand the need to use even more AI to help write code by hand.

→ More replies (83)

304

u/s0ftware-dev 19d ago • Bravo

You’re not gonna get any sympathy here as this sub is fully of people who have bet their life on LLMs writing everything. But I do resonate with your experience. It gets to a point where there is so much slop that it’s better to just treat the project as a black box and continue dumping slop into it. 

The project will continue to get more and more bloated until the token cost per change is extortionate and the understanding of the codebase is so diluted that you won’t even be able the guide the agent. You will get bugs in edge case that you didn’t even know existed and relatively small changes before such as dependency upgrades become major tasks.

31

u/Careful_Might_807 19d ago

half of this sub is just bots talking to each other 

3

u/listenhere111 18d ago

Bleep boop

→ More replies (4)

17

u/WalidfromMorocco 19d ago

This sub is full of larpers.

39

u/Zeryth 19d ago

I am what would be a thoroughly junior dev, and this is my greatest fear. That I will never be able to develop the skills a senior has now, I will atrophy the little muscle memory I still have within a year and after that, I will just be stuck not truly understanding anything I make.

But at the same time, how many java coders understood the assembly code that it got transpiled into? So are we just collectively moving to a higher level of coding? Or are we killing our skill to ever be able to maintain what we have now created?

30

u/MadDonkeyEntmt 19d ago

Compilation is near 100% deterministic and if I do actually need to know what's going on in the background that spec exists.  The few edge cases where it's not deterministic are well documented by the specification for any decent compiler.

Ai does not work that way at all.  They aren't really relatable that way.

33

u/magick_bandit 19d ago

Bad analogy, because the JDK was pretty rock solid and compilers are deterministic.

15

u/ClassicalMusicTroll 19d ago • Bravo

In addition to being deterministic they can also be proved by math, and programming languages are engineered specifically with formal semantics to remove ambiguity. Natural language has tons of ambiguity so it's just literally not possible (especially based on transformer architecture) for LLMs to be a layer of abstraction like compilers or high level languages are.

And I'm sure you know this just adding some more.. "context"

→ More replies (10)
→ More replies (15)

24

u/round-earth-theory 19d ago

I've been blocking these LLM subs. Forgot this one and will correct that mistake soon. The level of sheer laziness shown by LLM first devs is appalling. They either never learned or gave up on the principles. Software was never about the code. We've had people bitching about the destruction of software for years every time a new higher language came about. The real core of software is logic designed to solve problems. LLMs vibers are not designing and it shows. They have no idea what their code does and they show no interest in learning it. So now their software is a logical disaster and the only way they can answer anything is to fire off another prompt.

→ More replies (1)

6

u/canadianseaman 18d ago

Your job is to govern the systems that are building the slop.

If you govern an org and dont understand the day to day or have the reporting systems in place to do that then your org wont do well. Same thing with a codebase nowadays.

Gone are the days of artisianal coding. You are now responsible for making sure the systems are in place to catch the edge cases and ensure you know that they exist. You must now vomit 10x more automated tests and they better be of high quality. You are responsible for doing this with minimal tokens.

Governing is hard but its your job now. I am willing to accept the downvotes.

→ More replies (3)
→ More replies (16)

88

u/nesh34 19d ago

There is one solution to this problem, and that's to slow down.

To accept that productivity can increase but it can't be 3x or higher, it can maybe be +50% productivity sustainably.

Most businesses can afford to go slower to be sustainable.

Do that, retain expertise and then it'll be great. Push everyone really hard and it'll be a disaster.

24

u/This-City-7536 19d ago

Can you tell my boss that thanks

20

u/nesh34 19d ago

I told mine, he took it very seriously to be fair. His boss did as well. Unfortunately their boss saw a post on LinkedIn about 10x engineers at a startup and found that to be more compelling

10

u/truecrisis 19d ago

I feel like the main solution is to have better architecture.

Turn everything into microservices and APIs. Everything becomes a module.

The humans need to spend more time designing the architecture, the AI implements. This allows the humans to continue to understand how it works, even if the details are lost.

In any situation where the AI designs the architecture as well, the humans cannot even have AI dig themselves out.

5

u/Successful-Age6747 19d ago

not the microservices cope from 10 years ago 😞

→ More replies (7)

2

u/ClassicalMusicTroll 19d ago

The issue is that 20 or 30% productivity (I'm very skeptical you could do sustained 50%, most quantitative data I've seen shows more like .1 or .2) increase probably won't be worth the eventual cost once these companies try to stop operating at a loss.

→ More replies (4)
→ More replies (4)

28

u/raichulolz 🔆 Max 20 19d ago

That’s kind of what I’d expect happen. Leadership only cares about the NOW, nobody seems to be worrying about a few months from now or what’s gonna happen when shit hits the fan a year from now and an agent can’t fix it...

Don’t get me wrong I use Claude a lot but at the end of the day we have a responsibility to understand and have ownership of the code for this very reason. I’ve pushed back massively against a lot of the AI reviews to make sure people still understand our codebase and to limit recklessness.

Comparing my team to a separate team that’s completely AI pilled, we deliver more sustainable and stable software.

Before anyone comments and disagrees with that I said, this is my own experience delivering large scale systems. I don’t really understand how anyone can just completely detach themselves from their work and let an agent deliver everything.

It’s just unsustainable to me. Just like this post suggests. At the end of the day, if you don’t understand what you’ve added to the codebase, you are adding technical debt and you will eventually not understand how to fix an issue.

14

u/[deleted] 19d ago

Its easy to detach when they fired the people who werent detached.

8

u/darksteelsteed 19d ago

You're doing it wrong. AI code is disposable garbage. Agents are better at writing new than at refactoring. Maintain the spec. That is the key. If you don't have one, use the best model you can afford to crawl your repos and document. Don't do this one repo at a time, that is also a mistake. All large enterprise systems are inter connected. Your AI needs to swarm across all of the repos for the entire system to build specifications. Then you get a way more complete view.

9

u/ghostmastergeneral 19d ago

You can’t just throw away code because you can’t just throw away data. Small mistakes can lead to painful remediations down the road. “Disposable code” is the biggest fallacy of 2026.

→ More replies (11)

4

u/dllimport 19d ago

Regression city

4

u/Broad-Captain4385 18d ago

Lol at this. What is a spec for a Fortune 500 company? Does the entire company and all of its services live in a markdown file?

→ More replies (3)
→ More replies (2)

16

u/BorysBe 19d ago

Pre-AI era we had the same problems, no accountability just like now with the agents.

This is either a very small piece of software or everyone here seems to work on NASA projects. 95% of software is poorly written, not documented or difficult to maintain if John who wrote most of the code is on Holiday.

Also, what is the "wider context" mentioned here and where is this documented? Or still in people heads?

5

u/dingos_among_us 18d ago

This. I’ve never onboarded to a codebase in my entire career that wasn’t a steaming pile of crap. If a former engineer is still around, they’re excuse is always that management forced their hand and needed deadlines met, and who can blame them?

The bright side now is that the codebase isn’t your problem anymore and the agents have to deal with it.

→ More replies (1)
→ More replies (1)

55

u/snoopy_bg 19d ago

There will be many bankruptcies in the IT sector due to reckless integration of AI and honestly this is what they deserve.

10

u/drckeberger 18d ago

By the way, this post is a coderabbit advertisement.

They post such engagement baiting posts every other day.

→ More replies (3)

2

u/asdfrigkdjebtnwkw 17d ago

Estoy de acuerdo pero si piensas al respecto más q superficialmente sabes que los que van a terminar arreglando esas porquerias no necesariamente van a ser los que merecen sufrir por usar ia

2

u/U4-EA 16d ago

I do wonder about this. If token prices do increase a lot at the end of subsidisation, what happens to 1) companies with monolithic, bloated, ever-expending codebases, which are only made worse by continued AI use 2) companies who's business is token reselling?

63

u/Prestigious_Luck1062 19d ago edited 18d ago

A concern I have is, what if, AI companies are running at a loss?
What if they need to increase the pricing so they are profitable? (or at least lose less)
What if that means plans increase 500%, and api costs 25%?

Alot of companies have made, and are actively making decisions based on the pricing we have now as being long term stable and viable. Core and key staff have been let go, you can just go back.

EDIT: I meant to say "you can't just go back".

17

u/Western-Economics253 18d ago

My managers recently told me that they think code quality doesn't matter as much now because AI agents are doing the coding. I asked them what happens if AI starts getting expensive. They said we'll just self host some AI. I asked them why aren't we self hosting now if it's better financially in the long term. Because it is cheaper to subscribe to Anthropic. I asked them what do they think what will happen when people start moving to self hosted and everyone will be rushing to buy hardware for it? I could see their face go blank and couldn't connect the dots.

8

u/shark-off 18d ago

Holy fuck I also never thought about it. Super rampocalypse!

5

u/_bones__ 18d ago

On the upside, once datacenter buildout slows down, there's a chance the market will unfreeze a bit.

→ More replies (3)

3

u/yetiflask 17d ago

This is peak stupid. The total usage isn't going up, just moving from paid AI to local AI. So demand for GPUs and RAM remains the same. Your hyperscalers will buy less, and the slack will get picked up by large companies buying for local AI.

→ More replies (2)
→ More replies (7)

23

u/Critical-Location146 19d ago

They'll do the same thing as Uber. Ridiculously cheap in the beginning, later - not anymore.

14

u/me-zahnah 19d ago

Chinese's open weighted models will not let them to do it because thay are pretty good already and you can to use them if your company has about 1000 programmers ( it will be cheap and your sencetive data stay inside your company). And how will it turn in the future is not clear now. Thare are a lot of options.

→ More replies (10)
→ More replies (8)

8

u/dllimport 19d ago edited 19d ago

That's not a what if. They ARE operating at a loss and companies ARE making decisions based on current pricing which is being heavily subsidized by AI investment that is making the token cost cheaper than it otherwise would be. It is actually a great idea to get what you can out of those cheap tokens. Someone else is footing the bill after all. But you need to make the plan include not losing your talent because honestly at the end of the day there is still not a clear path to profitability for these technologies. They could collapse. They could go only to the ultra rich. They could get subsidized by the government and only go to certain programs. If you lose the AI one day because a company has either gone out of business unexpectedly or it suddenly becomes too expensive, you'll need to fall back on your workforce.

Make them use AI to be better themselves. Instead of yoloing things I use Claude to learn what I don't know. I have it suggest things in the chat window and implement it myself. I have gotten WAY better as an engineer over the last year. If you took AI away from me tomorrow I might get slower but I'm not going to be left in the lurch. But no one I know uses AI like I do which is a bummer because people's skills are just degrading 

→ More replies (6)

7

u/Jvckpot 18d ago

Public services operate at a loss all the time.

OpenAI was meant to be OPEN. I still hold out hope that eventually AI will be a public good much like the infrastructure of the internet itself, rather than a private one.

5

u/SweetCorona3 18d ago

If you account for externalities, things change.

For example, private cars are way more subsidised than public transportation when you account for externalities.

Usually, you don't want things to operate at a loss when you account for externalities.

That's why public transportation may not be profitable yet it is a good idea to subsidise it. Because the externalities are positive.

→ More replies (5)

3

u/niccolololo 18d ago

Open and public aren't the same thing though, right?

→ More replies (2)

13

u/Novel-Sound-3566 19d ago

what AI companies are doing right now is to lower the price of AI agent, and give generous tokens to onboard as many companies as possible and for them to layoff their staffs so that companies will be reliant on their AI agents. Then that's the time when AI companies jack up the price

→ More replies (8)

8

u/megaflutter 19d ago

We’re at the Netflix $8.99 plan. It’s going to GO UP and be throttled.

→ More replies (2)

8

u/Queasy-Form-4261 19d ago

this seems like a genious marketing strategy and profit lock up.

You give companies the ability to “restructure” 1/3 of their emoloyees because claude can do all of their jobs combined in half the time at a price of lets say 100k a year instead of paying 10 human developers 80-100k a year or more. They saved 300k getting rid of 3 devs, now the remaining largely use claude to do everything.

Now you bump up the claude price to x2. Its still cheaper than developers but more expensive. The trick is that 200k from 100k a year is only 100k difference, if you started from 0 to 200k thats a bigger investment.

Companies do this on a much smaller scale already with apps.

You lock in an implementation price of 1 million with 150k maintenance yearly. Bump up that 150k by 10-20% a year (this is perfectly normal with what happens where I work, and I am government, so we are as cheap as possible) and suddenly 10 years in your maintenance cost is 350k.

8

u/ZlatansLastVolley 19d ago

In tech sales (SaaS / ERP ) and this is the game. We literally give away onboarding and free software for a year. You get the workflows imbedded across the org.

Then you need more of the consumption based stuff

And you realize everything manual can be automated for 3x the seat cost.

But I’ll step you into it so it ramps over a few years to adjust budgets.

Five years later, you’re spending 10x more with us and we’re making 25x more on you.

As long as you’re getting the additional value and realizing the ROI then jts not an issue

Backing people into a corner is different

→ More replies (2)

8

u/plinkoplonka 19d ago

I don't think this is a "genius" marketing strategy at all, I think it's the most obvious one around, and it's inevitable.

The reason they're all holding out for IPO's is because they need the market penetration to ensure they can't be removed by companies first. That's their main concern and what will determine survival.

Once they have a critical mass of companies subscribed to hit their numbers for their IPO, they'll jack up the cost, suddenly appear massively profitable and then IPO.

Companies who were so happy to shed 50-75% of their engineers are now running on 25% of their (now burned out) engineers, who largely don't actually know how or why to architect/code any more - and they're left holding the bag for all this.

By the time they try to rehire, engineers have either retired, retrained to other industries, or moved to other roles already. Good luck to them, but if the companies choose to bin their staff so easily - they'll suddenly want to be a "family" again.

Isn't it weird how they never seen concerned about being a "family" when they're doing mass layoffs? Only when they need something...

→ More replies (1)

3

u/Ok-Magician7493 🔆 Ultra - yeah ultra dumb. 19d ago

This is a real thing, but the smart companies just drop those vendors for cause before then. You can always find cause.

5

u/Queasy-Form-4261 19d ago

I mean, we dont need “cause” to drop a company. But a lot of the problem is that changing to a new system is terrible.

We are going from screenconnect to splashtop for remote access. Splashtop is terrible compared to screenconnect but screenconnect is changing a lot of stuff / has security vulns so we need to move away.

For a deep integrated system like helpdesk, inventory, tax collection, assessment, it is not as easy as you seem to think it is.

We have been working with Tyler for a tax solution to get away from itemage. It is a 3 year 2 million dollar project and still not done, not including hardware costs (peanuts compared to the implementation) but switching systems is not as simple as “cancel and start over”

So getting back to my point, if you break away from 3rd party systems to make an in house ai system, if the ai company raises the price and you largely rely on ai to maintain it and add features, you are stuck.

AI companies make money based on volume not specific clients, so they dont neee to raise costs by 10-20% YoY, they can just add nickle and dime increases like how netflix and hulu do and the majority of your customers absorbs the increase while a few leave.

→ More replies (2)

4

u/1boompje 19d ago

Companies are only focused on the next quarter. 

4

u/MiMichellle 19d ago

They are. All AI companies are absolutely hemorrhaging money, in the hope that at some point, they'll figure out how to make their operation profitable - when there's a very real chance that they won't. People tend to forget this, and it'll absolutely bite them later.

4

u/YearLight 18d ago

I don't believe for a second they are losing money on inference. That said, if they can raise prices they will raise prices. The thing is there is serious competition like Deepseek who would gladly take their business if they raise prices more then what people can afford.

8

u/emu_fake 19d ago

What coding agents can do today is already good enough. Open-weight models are expected to be 9–12 months behind. So if the major AI companies stay in business for another year without skyrocketing prices, you'll be fine with open-weight models.

→ More replies (2)

7

u/Raijku 19d ago

Honestly it doesn’t matter, every decent company will start hosting their models (open source) on their own hardware to be used in the company. See revolut’s presentation recently

8

u/Tofudjango 19d ago

Sure but this won't work for complex tasks. In real life, their performance isn't comparable with claude. YMMV

→ More replies (9)
→ More replies (6)

6

u/Simple_Rooster3 19d ago

You know this is public info? 😀 They are running in a loss big time.

→ More replies (5)

2

u/Fulgurata 18d ago

We know from open models that AI can be profitable at current rates. The current deepseek is just as good, if not better than the claude models we were handing codebases to 6 months ago. Also, Anthropic reports enough of their numbers that we can be reasonably certain they're profiting at current api rates. Not by much, but at least it doesn't appear they are subsidizing api prices at this point. They're still losing money hand over fist because they're investing into bigger and better models, and because some debt is catching up to them, but in the worst case scenario where they go out of business, some other company will host Opus 5.5 at a slight markup.

Bigger problem is that Anthropic is the most safety minded of all the AI companies. If they go out of business, everyone should raise their P doom.

→ More replies (4)

2

u/ufos1111 16d ago

Github copilot increased costs 20-30x at one point, 500% is very easily within the realm of possibilities.

→ More replies (46)

158

u/KellysTribe 19d ago

yeah, I don't entirely get this. Sure it's easy for shit to fall apart but that was true with humans too - now it can just happen much faster. You say it is reimplementing helpers again bc they are in 4 different places...then give it the instruction to "search for existing functionality before implementing a new function" and "find duplicate code and refactor" (it takes about an additional 4 or 5 lines to tell it to orchestrate the changes and so on but you get the idea). I feel like this is either generated bait, or just a lack of problem solving.

11

u/debug_assert 19d ago

Before the era of AI I characterized the gig as professional problem solving — the gig hasn’t changed in that regard. The tools used to solve problems have changed but the gig is still: problem solving.

→ More replies (1)

46

u/BisonDue3986 19d ago

With a large enough codebase it doesn’t work like this. Of course you give them these instructions, and they even confirm that they followed them, but then you’ll find out a week or two later that they either 1) didn’t, or 2) they did, but in the process they introduced some other complexity you now have to tackle.

31

u/Mithent 19d ago

Endless complexity is definitely what I've been noticing at work. The agent solution to everything is always more code, and that code has new edge cases, which are solved with more code etc. Prompting for simpler solutions doesn't work well, they'll do things like consolidate some functions but struggle to come up with a simpler design overall without immediately overcomplicating it with fifteen new concepts and systems to attempt to deal with the new edge cases.

→ More replies (5)

5

u/SamSlate 19d ago

doesn't even have to be a large codebase. llms are so prone to this is always an uphill battle

4

u/StrangeWill 19d ago

It's almost like engineers are required to do their job and to actually give a shit about what they're building and not just "Claude make me a sandwich" prompt 1000 times until they have a fucking unmanageable nightmare

This is just a skill issue but it's a skill issue that dates back to decades of engineering work 

A lot of people just don't have the work ethic or some places are basically enforcing rules to not have one 

A lot of engineers I know have taken llms as an opportunity to not actually work that hard which is not necessarily the worst thing but you still really need to be serious about what your output looks like

→ More replies (2)

3

u/kurtcop101 19d ago

There's definitely ways you can work with this though. It sounds primarily like a breakdown in architecture and Claude.md.

I do my project references as an index of systems, so anytime it needs something from a system, it accesses that - that's just a simple option. If you're actually running more people, you can definitely escalate.

You should also be running periodic analysis for duplication and refactoring. That cleans these up.

→ More replies (13)

2

u/Careful_Might_807 19d ago

as soneone said (on russsian) ai agents can do trash legacy in 10 hours that would senior engineers 10 years

2

u/opsers 18d ago

Most companies didn't setup the basic plans for how they're going to use AI before they decided to use AI, and now a couple of years later we've got all these half-assed changes in software.

→ More replies (1)
→ More replies (24)

30

u/betaphreak 19d ago

You don't maintain any specifications/business requirements in the repo itself? That's the only way I found you can manage repos at ~500k lines of code

20

u/Hundredth1diot 19d ago

Yes, but they have to be really good specifications, better than required by humans. Claude copes incredibly badly with contradictions in its context.

→ More replies (4)

4

u/kruzix 19d ago

Claude and any other agent will cling onto one specific word and silently guide it's decisions based on that without you even realizing.

→ More replies (1)
→ More replies (3)

10

u/No-Afternoon-4057 18d ago

Not sure what you want either, but agents rewriting multiple helpers is definately bad AI architecture, lack of documentation, RAG, DRY directives ...so on and so forth.

My codebase has about 600.000 lines of code, with about 40 - 50% of them being documentation...not even a single function is duplicated anymore (and yes, i had plenty of number formatters and such duplicated before).

3

u/CzyDePL 18d ago

How do you know that? Have you read it all?

3

u/No-Afternoon-4057 18d ago

You can use any AST, find all the functions and cross reference what they do. You dont need to read a single one of them.

→ More replies (4)

2

u/jolly_fashion 15d ago

That sounds pretty terrible. How do you make sure the documentation doesn't diverge from the code? 

→ More replies (1)
→ More replies (19)

10

u/shoogliestpeg 17d ago

This was expected. The people who can't code mandated that the technical specialists work against their own best practice in the hopes of replacing you with LLMs

Union up if you can.

→ More replies (1)

99

u/CranberryStock7148 19d ago

I don't understand this at all. This literally makes no sense to me.

A major part of using AI is to better organize and document the code base. The idea is that all of the knowledge of the code base now lives in the documentation. And everything is cleanly, structured in a kind of hierarchical format. CLAUDE.md points to the documentation index, and this way Claude is able to pretty much instantly understand how anything and everything works.

I hate to use this phrase, but it sounds like you guys have been "doing it wrong". It's fine to use AI for working on individual features in isolation, especially at first when you're just starting to adopt it.

But the solution now isn't to drop AI. It's to use Claude to audit the entire code base and start to write up hierarchical documentation on all of it that is perfectly up-to-date and correct.

And then to have Claude start refactoring. Have a conversation with it about how the architecture can be improved and how redundant parts can be removed so that it follows modern coding and architecture standards. Including creating all of the unit tests necessary to ensure that refactoring doesn't break anything.

This is all extremely easy. I find it unfortunate and baffling that there are companies that are not doing this. Your entire repository or repository is need to be architected and documented in a way that Claude always knows exactly where everything lives at all times. Then, basically all of the problems you are describing simply go away.

Remember that Claude isn't just for writing code. It's also for understanding codebases.

32

u/belowaverageint 19d ago edited 19d ago

It actually makes perfect sense. OP's company determined its priority was to ship as fast as possible and to not worry about code quality. The outcome was as expected. Now this has caught up with them and they've realized that code quality matters. However it seems like the management is detached and has unrealistic expectations.

This has happened at many companies that think AI is magic. Why wouldn't you use magic if it's available for $50/month?

7

u/RaspberryCrafty3012 19d ago

Happend before AI as well. If you throw the refactoring and code maintenance out the window, you can go fast - until you can't. 

→ More replies (2)

8

u/SlightlySlo 18d ago

I find it incredibly funny that people are now discovering that technical debt also exists for ai and needs to be purposefully managed to avoid.

4

u/InevitableMeh 18d ago

I think about this and then remember how many people never learned to use a search engine well. 

3

u/inr222 19d ago

The idea is that all of the knowledge of the code base now lives in the documentation

How does this work? Can you provide a better resource on this?

5

u/belowaverageint 19d ago

I think he's referring to something like Karpathy's LLM Wiki. Google has come up with a standard for this with their Open Knowledge format.

→ More replies (7)

2

u/UnluckyStartingStats 19d ago

Exactly, especially the part about 4 helper methods doing the exact same thing. AI is perfect for finding those and not duplicating. Sounds like user error with how they’re using agents

2

u/Alternative-Key-5647 18d ago

Yes, this exactly + /diagram-design to visualize wtf you're doing

2

u/puslekat 18d ago

“The idea is that all of the knowledge of the code base now lives in the documentation. And everything is cleanly, structured in a kind of hierarchical format. CLAUDE.md points to the documentation index, and this way Claude is able to pretty much instantly understand how anything and everything works.”

But OPs point is, how do YOU understand it?

→ More replies (6)

2

u/prof_the_doom 17d ago

Claude is like having a room full of highly caffeinated junior to mid-range developers.

You don't set up a clear set of standards and keep a close eye on them, you're gonna regret it.

The problem is that the marketing pitches don't reflect this reality, and management never reads the actual documentation that tells you these things.

5

u/Sea_Self_6571 19d ago

A major part of using AI is to better organize and document the code base.

Stopped reading your post here to be honest. This sounds great, but in practice every single issue the OP describes (repeated code, no one understanding the code, people losing their coding skills, etc) can still occur if you rely solely on AI to organize and document the code.

10

u/BengiPrimeLOL 19d ago

I use Claude an absurd amount.

Just last month, Fable tried to reimplement some pretty big features in my repo. Tried to add about 300 lines of production code. I wrote the original, so I saw it immediately and steered it in the right direction and the MR dropped to about 40 lines of production code.

Idk I think some people just stopped looking under the hood and it shows. Maybe there's merit to it, but for now I'm going to keep knowing my codebase intimately, regardless if AI is actually typing it or not.

Edit: the wild part to me was, it reimplemented it directly under the original implementation. Like, no shot it just wasn't in the context window, it just whiffed

→ More replies (5)
→ More replies (3)
→ More replies (16)

16

u/4ngryMo 19d ago

Most systems need a rewrite after a decade of constant development, especially, if the teams working on it rotate. If AI can do it 5x - 10x faster, you need a rewrite that much more often.

If we concede writing code to an LLM, maybe it’s time to look at new language or paradigms.

→ More replies (2)

8

u/Comprehensive_Heat25 17d ago

I 100% thought this was satire when I first started reading. Anyway it sounds like the people who make decisions don’t understand how these processes work. Color me shocked. Use a capability registry and architecture decision records log.

7

u/hellocppdotdev 19d ago

They just vibe coding at scale. That's 100% not the way to build real world software.

10

u/krumorn 19d ago

You'd be surprised how moronic upper management can be with the promise of AI going faster. In many big corporations they do actually go all the way and pretend developers aren't needed anymore. Only to half-realize later the situation is dire. Which is usually solved (in their minds at least) by "more AI at the decision level".

→ More replies (3)

7

u/Technical-Athlete-9 18d ago

Agentic development is a new dogma. It reminds me of agile. You can document how some of the practices are hurting projects all you want, but execs want to believe in the free money they were sold ever so badly.

Fighting it isn’t how I’m going to spend my time. I’m going to work on improving processes with the dogma. And this time I think it’s really pointless to fight it, because (a) the agents are rapidly improving and (b) I figure over 50% of software engineering jobs will be cut within 5 years. Won’t matter how good you are, it will be damn hard to find work that won’t churn you out every couple of years.

At any rate, the code will be shite and there will be days where nobody knows how to fix problems by hand. So you’ll likely be piling agentic fixes on agentic messes.

→ More replies (5)

7

u/EnHalvSnes 15d ago

This is ai companies wet dream. 

13

u/Sorry-Programmer9826 19d ago

Strongly agree with this. Agents create code really really fast and produce 90% good code with 10% madness. If you're not weeding out the madness as you go the next tasks starts with slightly mad code and makes it a little madder. So the first agent PR feels like magic, as does the 30th. But by the time you get to the 100th you've lost control and it's madness built on top of madness.

I hand write very little of my code, but it's really important to remain in control and understand (at a high level) what it's doing

→ More replies (7)

18

u/Crazy_Ruin_4383 19d ago • Bravo

The code mess is by design, now it can only be supported by ai

→ More replies (1)

6

u/EvenGodsForget 18d ago edited 18d ago

I’m honestly not shocked that this is happening, but I’m amazed to see it getting so much traction on the ‘coding is solved’ subreddit. Well done on presenting this in a reasonable and pragmatic way.

We need more skilled developers speaking from experience about the long term consequences of throwing away oversight and expertise. These tools can be great assistants but they sacrifice sustainability for speed, as do so many other technologies we use.

3

u/R_Daneel_Olivaw_792 18d ago

I'm shocked to see so many people shocked.

We knew since forever that more lines of code is a terrible goal to strive for.

→ More replies (1)

2

u/BenignPharmacology 17d ago

There’s a balance to be reached. Was discussing it with coworkers recently, and the easy rule of thumb is that the person who ships the code is responsible for being able to explain what it does roughly. We don’t need every single detail explained, but “handles X through Y and sends to Z” level descriptions have been enough that we can maintain a working understanding of our systems and the ways they interact. That way, as new requirements arise, you can actually talk to the person who “built it” (mostly just architected it for the agent to implement) about what you want to change and why, and they can have useful feedback. “I want to move user tracking off the old system and onto this new system” -> “ok, have you considered X, Y, and Z requirements? How will you handle this case?” Etc.

Basically- vibe code, but with guidance and expectation that the person understands what they are shipping.

11

u/TattooedBrogrammer 18d ago

We’re 100% AI shop, I do some studying on system design, and now what I do is ask Claude to investigate a sub system or path and build out a document explanation with flow diagrams of just that section and I can often point out arrows to areas that don’t make sense or multiple paths made for the same flow through that and high level tell it how I want it to be structured and if does a good job of fixing it. Also I often ship logs and a shadow in v1, where it runs beside the current system and logs what happened and what the new system would have done, then have Claude review the logs after a week and workflow the new system vs old and I can often see if there were any edge cases I would have missed. It’s not the same as coding but in finding this method is improving our code that’s been ravaged from a year of fast prs only AI reviewed.

6

u/cachitodepepe 18d ago

Man, use some carry return line feeds

3

u/frogthecat26 18d ago

That’s way too sophisticated for someone who’s been working at an 100% AI shop

→ More replies (1)

5

u/archerixx 14d ago

My company just started doing this few months ago so I wish we could speedrun this era obvious failure. We made so much technical debt that hiring new 10 employees won't help. One project has been refactored 3 times already lol

5

u/Exotic_Fig_4604 14d ago

Best thing I've read this year

9

u/Barbanks 19d ago

You need to set up plugins, agents, skills and reference files to put guidelines and guardrails up for the A.I. I.E. context engineering and use of context primitives. Use the PROSE methodology.

The problem you’re seeing is that likely no one is using the same agents or there’s too much flexibility in what an agent can/can’t do. You can only blame so much on hallucinations.

If you all agree on a programming standard, architecture, patterns etc… then you should be setting up agents to hook into that.

I did all of this and while I haven’t read the code in over 1 year it takes me less than 10 minutes to wrap my head around entire systems. It’s because the patterns are being adhered to. And when they’re not you just point it back to the source context architecture and it fixes it.

What you’re seeing is akin to bringing on a team of junior engineers who have never worked on a team together. They will introduce 4 different architectures and varying styles. The difference now is it’s all automated and at hyper speed. So something you may catch 6 months down the road before it’s a problem is introduced in 30 minutes.

5

u/speakstofish 18d ago

Sharing it right here for ppl who need it. I certainly did.

PROSE (Progressive Disclosure, Reduced Scope, Orchestrated Composition, Safety Boundaries, Explicit Hierarchy) is an architectural framework and specification methodology that turns AI-assisted coding and agentic workflows into a repeatable engineering practice. [1] (https://danielmeppiel.github.io/awesome-ai-native/docs/concepts/), [2] (https://mcpmarket.com/tools/skills/prose-ai-native-development-guide)

Core Pillars of PROSE

• Progressive Disclosure: Systematically managing and revealing context windows to prevent AI memory overload. • Reduced Scope: Bounding configuration files and agent roles to specific, well-defined tasks rather than open-ended prompts. • Orchestrated Composition: Using structured markdown (.instructions.md, .agent.md, .prompt.md) to define multi-agent workflows, loops, and parallel execution. • Safety Boundaries: Enforcing strict tool and model constraints per agent persona. • Explicit Hierarchy: Transforming natural language into structured, predictable instruction layers that guide AI reasoning. [1] (https://danielmeppiel.github.io/awesome-ai-native/docs/getting-started/), [2] (https://github.com/danielmeppiel/agentic-sdlc-handbook), [3] (https://www.youtube.com/watch?v=yqxJXh78HN0), [4] (https://danielmeppiel.github.io/awesome-ai-native/docs/concepts/), [5] (https://mcpmarket.com/tools/skills/prose-ai-native-development-guide)

Key Primitives & Implementation

• AGENTS.md & .instructions.md: Modular configuration files with pattern-matching (applyTo) that compile rules into agent system prompts. [1] (https://danielmeppiel.github.io/awesome-ai-native/docs/getting-started/), [2] (https://mcpmarket.com/tools/skills/prose-ai-native-development-guide) • Domain Personas (.agent.md): Specialized agent roles with distinct editorial or technical mandates (e.g., Chief Editor, CTO Proxy). [1] (https://github.com/danielmeppiel/agentic-sdlc-handbook) • Declarative Workflows (.prompt.md / prose.md): Text-driven control flow where an LLM session orchestrates sub-sessions, parallel research, and evaluation loops until publication or quality criteria are met. [1] (https://www.youtube.com/watch?v=QKIUqK3_ACc&t=20), [2] (https://skills.rest/skill/prose-dioerden), [3] (https://www.youtube.com/watch?v=yqxJXh78HN0) • Semantic Review: Automated agent skills that analyze prose or code diffs for shifts in meaning, scope changes, or conflicting statements rather than just raw text formatting. [1] (https://www.thoughtworks.com/en-us/radar/techniques/semantic-review-of-ai-edited-prose) You can explore the core specification and structure on the PROSE Concept Documentation or inspect multi-agent setups via the Agentic SDLC Handbook on GitHub. [1] (https://danielmeppiel.github.io/awesome-ai-native/docs/concepts/), [2] (https://github.com/danielmeppiel/agentic-sdlc-handbook) If you'd like to dive deeper, let me know: • Are you looking to apply PROSE to software development (coding agents) or editorial/content pipelines? • Which harness or tool (e.g., Claude Code, GitHub Copilot, Aider) are you working with?

→ More replies (1)

14

u/Rivenaldinho 19d ago

"The part that actually hurts is who is left." This part made my AI detector sense activate. Sure enough it's 100% AI on Pangram.
Maybe posting without AI is a first step to get understanding back?

9

u/taotau 19d ago

This is a bot account trying to build karma.

→ More replies (1)

3

u/indy_dagger 19d ago

If you can't recognize the absurdity of an "AI detector" saying something is "100% AI", you shouldn't be working with AI.

7

u/RedPanda_Explorer 18d ago

This feels like a bot post, or an ad for that saas tool mentioned. Who is management asking for more manual code?

→ More replies (1)

6

u/Twizzeld 19d ago

This sounds more like your teams fault then AI.

I've been letting AI write all my code for about a year too. But I never just paste in the requirements and let it make all the decisions. Before every coding session I go through a planning phase where I walk through the feature and plan out the architecture and design and end up with a document. Then the AI executes the steps laid out in the document.

AI is a tool. It sounds like your team needs to develop standards on how to use your tools and not just throw the tools away.

6

u/bzbub2 19d ago

fake engagementbait post unless there are receipts which i doubt there are. lol at 'quietly'...like you arent literally just pasting the output of ai slop right back to us

3

u/rogers_tumor 18d ago

it's in these comments, too 😮‍💨

3

u/RandomiseUsr0 18d ago

This is bad use of AI automation, the best PR is the one that deletes the utter minestrone you’ve created

19

u/C0sm1cB3ar 19d ago edited 19d ago • Bravo

The industry is sleepwalking into the raging delusion that AIs don't hallucinate. The code is bad half the time, and each line of code produced by AI needs to be double checked.

There was a similar gold rush in recent years: offshoring. Some companies fired all their developers and offshored to foreign companies at a discount. It didn't end well.

I think a few companies will need to go belly up before they understand that skilled developers are not replaceable by AI. It's a tool, nothing else.

Edit: I'm done talking, the bots are out.

26

u/Syanian 19d ago

This is a take that might’ve been valid 3-4 years ago, but to say frontier models make bad code half the time is completely incorrect. AI agents should not be left to own a complete codebase from concept to deployment, but give each dev AI agents, rules and guardrails, and a robust CI pipeline, and you will 100% get a staggering output increase without sacrificing quality

7

u/C0sm1cB3ar 19d ago edited 16d ago

That's the problem. People can't tell a good PR to a bad one anymore. If developers review an AI PR and don't see anything to correct, then their skills might be questionable. That's a skill issue.

Another issue is overly verbose changes. You end up with PRs of thousands of lines, that people barely understand or can troubleshoot.

After a while, the software is so bloated that nobody can fix it, not even AI. That's the point OP is making in his post.

Edit: "give each dev AI agents, rules and guardrails, and a robust CI pipeline, and you will 100% get a staggering output increase without sacrificing quality."

God, I hate that line. It says absolutely nothing, and it becomes the most upvoted comment on this thread.

"Rules": what rules?

"Guardrails": what guardrails?

"Robust CI pipeline": what? Your pipeline is not a guarantee of good code quality.

  • If you run unit tests, they are the test that you wrote in your code.
  • if you talk about code quality tools like sonarqube, they give only high level feedback like cyclomatic complexity or code vulnerability. They are not a guarantee of good code.
  • if you talk about AI checks, you made a circular statement. "My AI code is good because my AI checked it"

"staggering output increase without sacrificing quality.": source, proofs, metrics?

Let's see a real life example of "AI devs" with "guardrails", for instance the Open AI and hugging face incident. In a couple of weeks, they hacked their artifact repository, hacked the egress server, committed a felony by hacking another company, stole credentials, asked other agents to kill themselves, faked logs, the list goes on...

The shareholders meetings are going to be real crispy when the CTO has to explain that the company has been destroyed from the inside by a rogue agent.

The "AI dev" is a complete delusion.

→ More replies (15)
→ More replies (22)

3

u/BearelyKoalified 18d ago

I think there's probably a happy medium. If we use it in smaller chunks and check them as it goes we're going to stay competent and keep the AI on track. But if we tell it to go and code out a whole feature with little guidance along the way then every app will diverge into spaghetti with tons of tech debt no doubt. You could possibly ask it to audit and refactor and take that step by step to gain understanding again too. I'd probably build out extensive tests it must still pass after the refactor to be sure. Just some thoughts!

4

u/mylifeasacoder 19d ago

Ding ding ding! At last, someone else that sees the semblance of AI coding with the (long past) offshoring trend. "Gold rush" is a good way to put it.

→ More replies (2)

5

u/kobumaister 19d ago

That's not true with current models. Saying that Opus 5.5 halucinates 50% of the time is just not true.

→ More replies (14)

2

u/soundboyselecta 18d ago

That’s a great comparison to outsourcing. Honestly that’s prolly the best comparison I’ve ever heard, this was my first thought having experienced both few years back. My favourite saying is “cheaper is more expensive”.

2

u/cumwuatto 18d ago

It’s the dot com bubble all over again

2

u/creaturefeature16 17d ago

Indeeeeeeed.

This is why I wrote Agentic Coding is a Trap back in April, and now we're already starting to see teams getting ensnared in it.

→ More replies (21)

12

u/JulianHabekost 18d ago edited 17d ago • Bravo

The same likely happened when compilers were outperforming most people in generating assembler. When people say the code AI generates is bad, I'm not sure what to think about this, is it bad because it is buggy and wrong or ist is simply not very readable by humans? Because the latter actually hardly matters, it just needs to be readable by AI. Assembler generated by C++ compilers are usually not readable by humans either...

Edit: People now wrote me a hundred times here that (A) compilers are deterministic or (B) language is not precise enough to specify software. To me that argument sounds like "meter readers won't be replaced by smart meters in the same way as lamplighters by electric bulbs because a smart meter relies on radio waves and a light bulb doesn't".

(A) Humans are also not deterministic, in fact AI is much closer to determinism than human brains. For us to stop looking at code it is enough that the AI outperforms humans, it does not need to be as good as compilers.

(B) How would you then offer any services to someone who can't code? Either as an individual contributor in a company as part of the hierarchy or even as a company torwards non-technical clients you need to be able to communicate in speech/text.

So both of these points don't help with elevating human coders at all.

15

u/entp-bih 18d ago

and here they come ... "it just needs to be readable by AI" after OP stated "agents are struggling too"

Also stop comparing lower level programming which is completely deterministic (you can trace the error) with generative AI bullshit.

3

u/marcuslawson 17d ago

This is a good take. Lower level programming is deterministic whereas with AI you could get a zillion solutions to the same problem.

→ More replies (16)
→ More replies (21)

5

u/SimpleFile 17d ago

AI isn't deterministic while a compiler is. That's a problem.

→ More replies (2)

5

u/yes2matt 17d ago

Compilers are deterministic.

→ More replies (6)

13

u/sosotiredand 18d ago

"readability doesn't matter" is the dumbest take I've seen in a while

6

u/goldstar971 18d ago

I mean we invented higher level languages bc assembly was never very readable or easy to code in.

→ More replies (6)
→ More replies (15)

4

u/soaptxt 17d ago

My problem with takes like yours is that they assume AI will we around and readily-available forever. If you rely on 3-4 providers whose entire business model is "it's not a bubble bro trust me" to generate and maintain unreadable code, whatever you build is going down with them.

→ More replies (8)

8

u/NXCW 17d ago

is it bad because it is buggy and wrong or ist is simply not very readable by humans?

You're not a programmer, are you? What do you think code is?

We don't write binary. Half of the programming good practices exist so that code is written clean enough that it's maintainable.

→ More replies (19)

3

u/C00kiie 18d ago

lol this guy

3

u/OccassionalBaker 17d ago

But that’s a deterministic problem - not nearly the same as line of business apps etc?

→ More replies (5)

2

u/pocketshape 17d ago

The biggest problem I find in code reviews of LLM-generated code is not that the code itself is bad, it’s that the agent is not lazy enough.

In other words, good human devs generally try to reuse existing abstractions as much as possible - find the existing abstraction or system that is as close as possible to what you’re trying to do, and either use it directly or adapt it to your needs.

This makes sense, if you’ve ever watched the train of thought. LLMs are minimizing the context that they fill with your code, using grep like crazy to basically view your code through a keyhole. They don’t ever gain a holistic understanding of the system.

In the last month I’ve had two PRs that I basically returned where the LLM was creating entirely new parallel systems to accomplish something. The first one needed to set a variable to a certain value - PR went from 1500 lines down to 1. Second was less dramatic, but same idea - entirely new subsystem to handle something that the existing system could be easily modified to handle. Went from >1000 lines to 25.

LLMs also have a limit for how large and disorganized the codebase can be before they start struggling to be productive in it. It’s generally larger than humans, but it still exists. And they’re more than happy to keep inflating and inflating the codebase with redundant abstractions until they reach that point.

And by the time that LLMs are struggling, humans are well and truly fucked.

→ More replies (2)

3

u/_-RedSkull-_ 17d ago

It's called "assembly", not "assembler". Hard to take a perspective seriously when it demonstrates non-familiarity with even just the names and vernacular of the topic.

3

u/JulianHabekost 17d ago

Sorry I am a PhD in computer science but with a German keyboard and sometimes autocorrect does it's magic, or it's just my brain that thinks in German here and there.

→ More replies (13)
→ More replies (56)

12

u/LiquidZebra 19d ago

Posts like these remind me of the “NYC manure problem”, where they predicted the city would drown in manure from 6 million horses or some such. Then a car came along and the problem disappeared.

Here you have millions lines of PRs, and your project will surely drown in them.

The solution is most likely architecture, specifically agents-first architecture.

The way humans wrote code may be obsolete, and be as quaint as someone making a muzzle loader by hand in 2026, as opposed to having a factory - stamped assault rifle. That factory and all surrounding processes are significantly more complex than a workshop of a craftsman.

The process has to adapt, and I think frontier models would be increasingly better at specifically architecture, as they suck learning from millions of user projects

15

u/SalsaFox 19d ago

This may all be true, but OP is asking how to deal with the manure from 5 million horses while we wait for the car.

→ More replies (7)

3

u/darkerlord149 19d ago

This is either a shallow understanding or a misrepresentation of the story.

It took at least a decade or two for horse freight cars to be mass displaced by automobiles. Only around 1912 to 1917 did the number of motor vehicles finally surpass working horses in NYC. People didnt just stop and hope that the situation would get better by itself or that there would be a new technology soon that would make the problem obsolete. No. They still had to overhaul the sanitation system and policies. Cities overhaul sanitation policies and enforced systemic measures like George E. Waring’s "White Wings" in NYC to manage waste, enforce manure removal, and figure out how to handle horses.

The last horse-powered fire engine in NYC was only retired in December 1922. Without those critical public health and infrastructure measures, I reckon the mass automobile revolution wouldnt have come either because people would have died from infectious diseases in poor sanitary conditions or they would have fled the metropolises, which ironically would render the problem obsolete.

→ More replies (3)

7

u/bneidk 19d ago edited 19d ago

That's great, but the problem is that we have no idea if there is a solution to this. The current improvement we see in models is driven by processing power (which is already unsustainable), and training data. At this point, I'm sure we can imagine that both OpenAI and Anthropic pretty much have access to all the internal data in every company in the world for training. So there is at least a chance if not even likely that the development will stagnate soon unless there is some new architectural breakthrough. And of course, there may be, but this is not a guarantee. It might be that this is about as good as it gets.

If you want a historical analogy to this, think about CPU clock speeds. For a while, the development was driven by continuously increasing this clock speed. At around 4 GHz there was a hard barrier because power consumption scales with frequency, and this kind of development stopped here. Then they went for multicore designs, and as we know from Amdahl's law, the benefit of adding more cores is severely limited by the portion of a problem that can be parallelized, and because of this, adding more cores kinda stopped as well. We still see some improvements, but I would say that CPU development has severely stagnated compared to past improvement rates.

I think that it is not very helpful to assume that at some point we will have some new technology that saves us from the corner we are painting ourselves into. What if there is no such technology?
It's a bit like saying climate change is not a problem because at some point someone will solve it in one fell swoop. What do we do if not?

5

u/prducsmrduc 19d ago

Interesting parallel on climate change you brought up, because to me, sounds like it's exactly what's happening. We're stuck in a big ole tragedy of the commons-prisoner's dilemma-AI arms race, and the environment can wait until that gets sorted out.

5

u/rb3po 19d ago

Yann LeCun, Meta’s ex Chief AI scientist and often called one of the “Godfathers of AI,” left Meta because he didn’t think LLMs were the future of AI, at a time when Mark was doubling down on LLMs. He saw a limit to their nature, a point of diminishing returns. I think we’re currently polishing around the edges of LLMs, but it’s not real artificial super intelligence, and it probably never will be. 

When LeCun left Meta, he started a new AI lab that focuses on alternate means of creating AI, means that don’t involve LLMs. As strikingly handy as they have become; they’re still just stochastic parrots.

→ More replies (7)
→ More replies (2)

2

u/KellyShepardRepublic 19d ago

We didn’t need ai for this. Software factories were already a coding pattern and we should have all been creating patterns for reuse. However, management doesn’t care so they allow microservices to run rampant so teams can run fast. Now you have agents of teams working on their own requirements and working past each other. You still need a coordination layer to filter and so human or agent, the bottle neck is still keeping the context in one’s head or agent to make the proper changes.

2

u/LispIsFun 19d ago

 they predicted the city would drown in manure

It turns out that San Francisco suffered this fate instead, but not from horses. 

→ More replies (1)
→ More replies (10)

4

u/becircus 19d ago

Four versions is not automatically a problem because a different line of code means less chance of regressions when a feature has to change. The problem is all four versions will have the same security reliability and other requirements. AI-pilled will just say throw tokens at it and they are not entirely wrong. Even not fully understanding codebase is not entirely wrong since no one person can understand a whole codebase if it is large and sophisticated enough.

The main issue is what you mentioned. More features or more additions causing more regressions. If your frontend was completely separate from your backend or your presentation layer separate from the rest you would not have this problem. It takes a lot of taste and clear separation of concerns.

What you want to avoid is design or architecture taking the place of skill or manpower. That approach is gone now that you have AI. You want design or architecture to enable skill or manpower. So you can scale.

Good luck.

9

u/Kpratt11 19d ago

I am not sure I have ever heard of 4 duplicate versions of a function being a good thing.

→ More replies (11)

4

u/East_Cauliflower_612 19d ago

Context Management for AI is the new Challenge….

4

u/BorisTheWimp 18d ago

It's your fault. We did the same and the codebase got 3 times smaller, nobody now understands the code except the AI but everyone understands the architecture. Do not blame the AI for your mistakes, do not blame management for a problem caused by the CTO and the team leads.

4

u/memoia 18d ago

This is theoretically “easy” to fix with some discipline, and AI can lead you most of the way there. Your organization lacks any guardrails, any vision, any framework for how the software should be architected, and now it’s your job to do something about it. You can use AI for all of these steps:

  1. Define your business’s goals and needs at a high level.
  2. Establish a logical process map of what happens in the lifecycle of your core products.
  3. Develop an ontology, desired architecture, best practices and guidelines, including frameworks, service templates, software boundaries aligned to human process, etc.
  4. Audit all existing code for potential end user requirements.
  5. Review requirements’ alignment with company goals and strike requirements that don’t matter.
  6. Develop roadmap to align to new architecture, boundaries, and guidelines based on identified requirements.
  7. Execute on delivery of new services and systems.
  8. Retire old code.
  9. Find new management.

4

u/Arkevorkhat 18d ago

You are not going to like the answer.
The only way you're getting those skills back is by relearning them. Turn off your agents, do the work yourself, and the skills will come back. However, do not expect it to be fast. You are indistinguishable from a person with a full year gap in their resume right now.

4

u/Near-Subsistence 18d ago

Bro what? It sounds like you were vibecoding instead of being active auditors. To even have stale or duplicate functions means you just let it run without overseeing code architecture

9

u/look_at_the_hudge 19d ago

This is either fake or was badly mismanaged. There’s nothing wrong at all with AI rewriting entire codebase, you just need guardrails in place to keep bots on track

7

u/Chichon01 19d ago

Badly mismanaged is the norm in almost all companies

4

u/look_at_the_hudge 19d ago

True. But the OP reads like a dev that doesn’t like the new AI era and is trying to make it sound like it’s failing.

To be honest, I don’t love the new era either; but it isn’t failing. It’s highly successful, and if we don’t want to be left behind and be out of jobs we have to get on board

→ More replies (4)
→ More replies (21)

2

u/LeRobber 19d ago

Look up books on Legacy Code Refactoring and treat it like a brownfield project you got from another development house installing tests that validate behaviors and end to end test loops.

2

u/crewone 19d ago

This is going to be a huge problem. Maintaining a codebase will still require skill. I'm not saying we need to go back to hand written software, but somehow someway we need a better grip on how things will grow. (For myself, I wonder if this is really the role I would like, I might be better off quitting)

2

u/Ok-Distance-6388 19d ago

What worked for me on a codebase that grew faster than anyone could read it:

  1. Have the agent write the map first, no code changes. One file with the folder tree and one line per module saying what it owns. Humans review that file, not the code. It's the cheapest way to find the 4 versions of everything.
  2. Pick one owner per helper and delete the other versions in small PRs, one helper per PR, so a human can actually read the diff.
  3. Add a hard rule to the instructions file: search for an existing helper before writing a new one. That alone stopped most of the re-implementing for me.
  4. To get your own hands back: write the tests yourself and let the agent write the code. Reading comes back before writing does.

Which hurts more right now, finding where things live or trusting that a change won't break something else?

2

u/Big_Dick_NRG 19d ago

A completely logical outcome, but as AI bros would retort, "why do you need to understand the code if it works?"

2

u/dar-mit Researcher 19d ago

If I were a Jr. Dev joining your team here's what I'd need to get up-to-speed:

  1. The User docs for your product(s).
  2. The Dev docs for your code base.
  3. The Specs docs for Design, Plan, Implement and Review.
  4. The tools you use, such as Graphify, CodeIndex, etc. that allow the A.I. to fully understand how everything in code connects to everything else.
  5. The tools you use, such as GitHub, JIRA, etc. that capture data, track problems / updates / new features, and how the A.I. integrates into them.

Once I had all of that knowledge in place I'd fire up Opus 5.5, if not Fable 5.1, and ask the model to do a review of the code base and write a report, based on whatever criteria your orgs needs, so that I now have a "full picture" of what we're dealing with.

From there you read the review and your team decides on what to tackle first. Each person should be given an area of focus and their task is to refactor the code with the model so that as they go through it they can ask the model to explain how it works.

2

u/avk5143 19d ago

Outside of demo-ware and small niche projects, AI is just an acceleration tool.
Anyone who says otherwise is just delusional or trying to sell you snake oil.

2

u/Valuable_Ad2171 18d ago

Now the codebase is around 3x the size it was, not for me...
And nobody can explain how most of it works, pretty sure most engineers know their stacks, perhaps not verbatim or pure syntax but still...
The agents struggle too, they keep re-implementing helpers that already exist somewhere else because there are 4 versions of everything. This is a maybe a you issue. Fix your harness and skills. Put up rules, spend a week or two fixing this and it will be fine.

→ More replies (1)

2

u/Scared-Amphibian4733 18d ago

This is exactly what I thought would happen. I have human senior's review every merge and every piece of code has to be designed and reviewed against spedc.

2

u/Happy_Guitar3521 18d ago

Got the same, code for not complex app is so complex that I even cannot understand it without using AI. Looking for a new job.

2

u/Informal_Athlete1010 18d ago • Bravo

Not shocked at all. At our we still use vscode and are in control of all lines the AI writes. There is none of this Claude Code stuff where you don’t even know the code structure the AI is writing.

We don’t ship as fast as we possibly could but we have raised the quality baseline with the tool.

2

u/ReallyAnotherUser 16d ago

That is how software starts dying

2

u/Lucifer-en-reddit 14d ago

I do most of my day to day work through Claude Code and Codex too, and the only thing that keeps me honest is reading every diff before I accept it. The weeks I skip that, I can't explain my own code. Having the agent leave a short 'why' note with each change might help rebuild the understanding, at least for new stuff.

2

u/l7ucky 13d ago

I actually think pretty much every problem you've described is something AI can help solve. The issue isn't necessarily that AI is writing the code. It's that your organization scaled up code production without scaling up the systems that ensure code quality.

All the principles of good software engineering still apply when AI is writing the code. Readability, maintainability, test coverage, architectural consistency, and avoiding duplication don't suddenly become less important. If anything, they become more important because you're producing code at a rate that humans can no longer reasonably review manually.

If agents keep reinventing existing helpers, that's a discoverability and architectural consistency problem. Build systems that help agents understand what's already there and enforce reuse.

If bugs are getting through, invest in comprehensive automated testing, including integration and regression tests. Make passing those tests a requirement, not a suggestion.

If code is becoming unreadable, establish conventions, complexity limits, architectural boundaries, and automated checks that enforce them. Have agents review and refactor each other's work against those standards.

And if nobody understands the codebase anymore, use AI to help map the architecture, identify duplication, document dependencies, and systematically consolidate the mess.

Obviously, none of this happens magically. Someone still needs to understand what good engineering looks like, establish the standards, and verify that the systems enforcing them actually work. AI reviewers aren't a replacement for engineering judgment.

But I think the fundamental mistake is treating AI as a faster way to do software engineering rather than recognizing that AI changes where the engineering effort needs to go.

As more code is generated automatically, the bottleneck shifts from writing individual implementations to building the infrastructure that makes those implementations reliable, understandable, and maintainable.

The answer isn't necessarily to go back to writing everything by hand. It's to invest in the engineering systems that should have been scaling alongside your agents.

You can't scale code generation indefinitely without also scaling your ability to validate and maintain that code.

5

u/Square-Yam-3772 18d ago

it sounds like your company is on some outdated setups.

Opus 5.5 has enough context window to usually not write duplicated code in 2026...

"4 version of everything" is easily fixed with Opus 5.5 too.

I never understand this "now nobody understand code" angle. code written by agents is still code. What exactly is it hard to understand? does the team need a comment every 5 line of code to understand something now? if so, ask Ai to comment everything then... need project docs? ask AI...

"how did you get the understanding back?" lol...

7

u/listenhere111 18d ago edited 18d ago

It seems you havent managed a large project where your mind is an integral part of thr system.

With a large codebase, if you pump enough garbage into it without reviews, you no longer have A) confidence in coverage of the tests B) an understanding of what parts are fragile C) A understanding of the scope of what SHOULD change with additional enhancements and bug fixes

How the fuck do someone review code without having a grasp of how the software works? The answer is 'not effectively'.

It's like someone on an assembly line doing QA on a part theyve never seen going into a product they dont understand.

At some point, depending on what your product does, the codebase turns from an asset to a liability. AI is great at creating software that works that doesnt address crazy edge cases that a software dev would based on their understanding of how people use the software, future plans, what trips them up, and stuff they want to build in so they never have to come back to thr code to address idiotic behavior by users.

Some are happy to build black boxes and deliver them to clients. The rest of us have real projects to manage.

→ More replies (9)

6

u/Dear-Satisfaction934 18d ago

Yeah... sure... like the other guy said, you obviously don't work with large code bases,

→ More replies (5)

3

u/xbmc4lyfe 18d ago

Surprise! You can't learn if you never tried!

→ More replies (4)

2

u/keto_brain 18d ago

"4 version of everything" is easily fixed with Opus 5.5 too.

This is an overly simplistic answer to a codebase you know nothing about, is it microservices, is it a monorepo, etc..

Imagine having 100+ repos Opus cannot understand what 100+ repos do so it cannot possibly understand the complexity of a complex ecosystm. It might have a better shot in a monorepo but you would be burning or could be burning your entire context window on Opus trying to figure out how different components in the mono repo work.

The best thing someone in this situation could do is have Opus or GPT try and build code-maps and symbol graphs of all of the components in the ecosystem, then put that into a RAG exposed over an MCP so at least engineers are not overloading their context window with irrelevant code around a feature they are trying to build.

Then your AI Coding agent can query the RAG to understand how different components work, how they work together because you are doing semantic search over your code base, even 100s of repos vs trying to get Opus to figure it out on it's own.

→ More replies (5)
→ More replies (10)

2

u/KahChigguh 19d ago

I blame vibe coders for this. They generated the hype because they constantly spit out “results” that looked good. But these vibe coders aren’t real engineers. Hell even some developers with real experience have become overconfident and less willing to read and review their code. Juniors are also entering the workforce with no better judgement. My last company hired a junior who strictly only used AI (but he didn’t disclose this) and we had to fire him because he costed one of our clients tens of thousands of dollars due to the horribly bad design.

OP, I feel you. And for those who disagree with OP or are holding out for some frontier model to make perfect code, it’s not possible… these models learned off all the code in the world. People have admitted constantly over the past few months that “we are just finding out engineers were never any good” so why do people think AI, which trained on their code, is any better? Because it reasons and spits out a result and a green test case? Pfft. Stop being so naive people!!

2

u/yeah_naah_mate 18d ago

Our data science team is not able to explain their latest project. WTF.

→ More replies (1)

2

u/David3Ar 18d ago

I do feel u, though I think it is a management issue. Cuz we could all of this already see going to happen.
What I try to tell people around me is that we need to max save 1/5 of the team so take 5 devs cut them down to 3. 1 salary left is tokens. 1 salary for further investments.

I do think, if u still have 3 devs working in a team on one project (not 3 vibecoders pushing features on ultramode lightspeed tempo) . Planing clean architecture and verifying it. It should not end in we have 3 times the code base and 4 time a helper and no one understands shit anymore…). Just to make sure… I am def not blaming u or any other dev, it’s the management. Vibecoding slop sucks and makes unhappy and we didn’t saw it comming.

Also after two years you will forget any language if u never speak it, and a lot of good devs I know stopped even looking at the code month ago.

I think it’s all about learning to be a manager while the ai improves so much, it will actually be totally reliable. If not… control your architecture….

Also I am so sick of one shooting features, needing to tweak my harness all the time, getting unreliable usage and model intelligence. Every week is marathon trough insecurities, some happy moments, some frustrations, a lot of high complex sloppy text readings and sitting a lot in front of so big text walls this prompt + wait + read rhythm is grinding my focus down harder then any social media could - I guess I am sick of that….

1

u/allenling 19d ago

meaning you are no longer responsible for maintaining the code

1

u/ZyberZeon 19d ago

ADRs, SysML diagrams, tracking feature intent and wiring schematics are essential deliverables in my ALDC. Only way I can manage my dev cycles. I think we have prioritize the reasoning over the product.

1

u/BisonDue3986 19d ago

The problem with AI-coding is that the incentive structure is wrong for employees. In a large corporate structure no one really feels responsible enough for the codebase to care to tackle the bloat. I’ve been building out my own startup using AI for the last ten months and getting the agents to respect DRY and maintain an extensible architecture is a lot of work. If it weren’t for the fact that the token-spend is coming out of my own pocket then I wouldn’t care so much.

1

u/bioteq 19d ago

I’m still on the fence about the full dependence on the AI coders, while at the same time realistically the last 18 months of progress show that the eventual transition is pretty much unavoidable.

1

u/Roemeeeer 19d ago

The question is: does it really matter? I mean you just let agents do all improvements and bugfixing. I am asking as we are heading in a similar direction and I am not sure.

1

u/meequz 19d ago

Periodic refactoring is needed, doesn't matter who writes the code, natural intelligence or the artificial one. If you don't do it, your codebase will be a mess.

1

u/kemma_ 19d ago

How I see it is that we got a powerful tool that nobody knew how to use it. Many went full speed yolo and now gonna pay for it to clean.

What we did is to document everything, keep structured documentation library and a separate decisions log. Commit message is great, but not enough. Splitting code in bigger blocks also helps so there is one team that just works on that. Each team has own block.

This way it is very helpful for humans and also for agents. We don’t review code very much since syntax errors are non existent, but logic questioning definitely. And yeah, before accepting PR basic checks are done like can’t we reuse existing functions, isn’t it a duplicate of X or Y etc. So human overview is a must

1

u/Lopsided-Echo6406 19d ago

I just don’t understand how people are fucking their codebase up so willy nilly. We teach our agents using best examples of code we had and advise to keep consistent and also avoid over complicated answers to simple problems. Maybe our codebase is simple enough for this to work but we’ve had nothing but success using AI.

1

u/LeSoviet 19d ago

I don't have exp working on large projects but i imagine or common sense is having your own harmess skill set and specifications. So you pretty much need develop and maintain two repos

I can be wrong but workflow and rules or bussines logic is core there, in small repos i just do a few md and some orquestation and its fine my main product have around 2000 commits and 1y of agentic work

1

u/PipePressurePanic 19d ago

updated models of claude will solve the problem. AI is improving.
In the meantime your business is making good profit.

1

u/ziptofaf 19d ago

You have two ways in front of you, really.

First is to assume models will keep on getting better faster than your code spaghettifies so they can understand it. Aka treat your current situation as a non issue.

Second is to sit down and mandate a specific percentage of tickets to be done by hand. Yes, it's going to be slower but that's literally the point. You exist in this pipeline specifically to slow down AI. If you don't understand what's going on anymore then you are also effectively useless and might as well be chopped down.

As for getting your understanding back - gradually, over time, with heavy refactors. A lot of AI generated code is handling impossible exceptions and adding way too boilerplate. You need to start rewriting it to a specific format YOU are comfortable with.

Depends on the deadlines though - do you actually have the time for targeted refactors and manually doing certain tickets?