Hacker News new | ask | show | jobs
by reqo 117 days ago
IME this works until it does not. This approach works well at the beginning of a greenfield project, but at the same time because it is so easy to add features, you will likely ship something that is way too over engineered. And that complexity will not amortize over next increments and will more likely lead to the entire project being a black box only fully understood by AI. However a more careful use of AI for targeted surgical changes is far more ”productive” in the long term IMO.
3 comments

I disagree, the approach works well in a legacy project, since there are structures and standards that already exist, which them model can draw from (if you aren't more explicit about it in AGENTS.md)
Wow how many years of experience with Claude Code and Codex do you have? lol
The job requires 10 years of those technologies ;)
Disagree. I operate this way inside a multi-million line legacy codebase.
> I work at a small startup

How does a “small startup” end up with a multi million line “legacy” codebase? Something not mathing

> How does a “small startup” end up with a multi million line “legacy” codebase?

Easy! The output of 6 months ago Opus! Which seemed so wonderful at the time.

This! I don't think folks understand how easy it is to go from greenfield to brownfield with these tools, esp if your organization is only valuing velocity. Meaning your doing full agentic development on large features, barely reviewing any code, and shipping without much refinement. It's insane, but this appears to be the status quo in SF startups.
Have you worked at many startups?
Something isn't clear about the size of your codebase here and the level of reliability your customers expect, as a reader of your comments. Clarity there will help.

My observation has been:

- Initial greenfield work by an LLM is fast and very effective with minimal or no human oversight.

- Subsequent work ends up being over engineered and very verbose. Assumptions are made that aren't suited to the problem at hand (for example I find Fable is extremely regex happy where structured data would work much better from a readability perspective.)

- Once code bloats beyond a certain point due to unguided LLM usage, complexity is high enough that only LLMs can operate on the codebase with any economical amount of time.

- Rinse repeat and your code ends up unclear about any state that's not explicitly being tested and verified in QA loops

For some of our products this has been fine, for others it's been problematic. An understanding of your size and reliability requirements will help make the conversation more productive.

> unguided LLM usage

Why aren't you guiding your LLM usage? Is that what I said - to spam it and not guide anything? Or to have a careful workflow where you agree on design and maximize your human judgement/leverage?

> any state that's not explicitly being tested and verified in QA loops

As opposed to before, when engineers perfectly reasoned about code behavior from first principals and QA was unnecessary?

> Why aren't you guiding your LLM usage? Is that what I said - to spam it and not guide anything? Or to have a careful workflow where you agree on design and maximize your human judgement/leverage?

You didn't say anything positively or negatively regarding this so I made an assumption that you were using the LLM relatively unguided (e.g. a bit of oversight, not the kind of thing that heavy code reviews used to involve pre-agents.) Feel free to add clarity on your actual usage loop.

> As opposed to before, when engineers perfectly reasoned about code behavior from first principals and QA was unnecessary?

In my experience, most engineers are quite good at reasoning about code behavior for non-QAed code paths. Obviously things fall through the cracks. But I've been in the ground floor of plenty of Big Techs in their early stages before agents and, yes, a lot of initial development had spotty test coverage and yet most of the engineers had good mental models of what was happening. It used to be a very valuable skill to wrap your head around a torrid piece of code with few or no tests but was nonetheless a core piece of your application. Conversely, agentic development can bring cognitive debt [1].

===

This isn't a fight. We aren't sparring over what's right and wrong. I'm just curious how other people use agents in their work as someone who is also now in a startup that uses LLM agents heavily and has no limitations on spend.

[1]: https://martinfowler.com/fragments/2026-02-09.html

AI is an accelerate tool for any organizations, management thinks it'll solve their organization issue because it accelerates it. Most often, it accelerates toward a wall.

Design is too expensive, we do agile. QA too expensive, we fire all of them, and claim devops is the now, which allows us to fire the Ops team too, 100% ownership from deisng to ops on devs.

One person with an agent can replace all these teams. Yeah mo profits.

No, but not relevant.

What is the point of working at a startup if you’re dealing with millions of lines of legacy code ? Isn’t the whole point of startups to create & innovate with a clean slate and modern tools?

No, actually. The point is to build a profitable business.
How long has your startup been around? I’ve worked at plenty of startups over the past 20 years. Including one that was still calling themselves a startup 10 years out. The org I work at now was a startup before my tech giant employer acquired them. We have a very bloated and very profitable 8 year old codebase that is barely 500k LOC.

I’ve never seen a startup with a multi million line legacy codebase.

I don't know if that's the whole point, but I agree with the sentiment, why would a startup be working in legacy code and where would that code come from if this is truly the start of something.

OP might just be working at a small software company or for one that broke from a bigger one and is now "startup" like?

You'd be surprised. I met a guy last week who was proud to tell me he had vibe coded an almost 2 million line code base. The app did not sound that complicated, so I'm assuming it's full of copy-pasta flavored slop.
Meanwhile I'm so proud that I'm keeping my hobby project under 10k lines and spend time trying to delete code for my own sanity
"startup" and "legacy codebase" are diametrically opposed concepts.

And if you're saying (based on your other comments) that a 6 month window is enough to create a legacy codebase...that indicates a serious lack of experience or understanding as to what a legacy codebase is, or why they exist.

Man, so many people in this thread just arguing pointless semantics, making weirdo absolutist (and incorrect) statements.

Accept that other people may ascribe different meanings/interpretations to words than you, and that if your reading of their statement doesn't make sense to you, perhaps you are simply reading it wrong.

Trying to hold someone else to your definition of words suits what purpose exactly? Are you just trying to "win" ?

This is an ultra cop out. There are standards in language that are not all “left means right for me so you cannot assume when i say right it is right and not left”

This whole thread around loc is depressing. It speaks volumes of some peoples inexperience working on actual legacy code. Legacy code is not just age or size but that the technical foundation is dated in a fundamental way. A giant monolith running on a now defunk framework using a database only one guy in canada knows about.

Case and point in my day job. The org that owns XMM development does not know how to recover a physical bench that is bricked because everyone who knew how has left. So now they just use simulators…

Interestingly, AI figured out some of this pretty easily for me. But the org has the exact same AI as i do. At the same time another org is close to a year into a greenfield rewrite that has been developed via agentic swarms. Absolute trainwreck.

AI doesnt make bad engineers good. Anyone who says they are doing 4 eng work likely would be without ai too. Those that claim otherwise, are the bad engineers.

> There are standards in language that are not all “left means right for me so you cannot assume when i say right it is right and not left”

Yes of course there are words that have very clear meaning, and that's not the case here.

"startup" and "legacy" - used in the context of this discussion - are not words like "left" and "right" where everyone has a universal agreed-upon understanding of their meaning.

Yes lol. Of all things people are getting on me for it's the number of LoC x Years In Business of this startup. I don't fucking know, I didn't start the company and I wasn't here for several of those industrious years. Looking now it looks like we have slightly fewer LoC than that, I was counting some of the generated stuff.

But who cares? The point is any codebase over a few years old with lots of customers and a big surface area has lots of code, much of it "legacy" from the standpoint of a guy in 2026.

You are wrong and they are wrong but that is ok.
Sounds like you simply don't know what you're talking about.
I agree with your larger point. Though I think it's pretty natural to wonder how the poster ended up with a multi million line codebase.
2M lines of code is 15 people committing ~26k lines of code per year (~100 lines per working day) for 5 years.

15 people is a pretty small startup, what if this is a 50-person startup?

Doesn't seem like that much to me, depending on what you're building and the size of your team.

I’ve worked at many startups and consulted at many more over the last 20 years. I’ve never seen 2 million lines of code happen that fast at a small startup.

15 devs putting out 400k LOC a year into the same codebase is not normal at all. I’ve never seen anything close to that kind of rate of growth across that number of people.

And 50 engineers is not even remotely close to a small startup. I have worked at a startup that had 50 engineers after a few years, but it was a multi billion dollar unicorn.

exactly. Usually legacy code forms when people lose context and confidence in parts of the codebase due to staff turnover etc and ppl avoid touching or enhancing those parts for long periods. Six months is a short time to accrue that much tech debt, its enough time where most of the people who created that "legacy" are probably still around. As you said indicates bigger problems.
So basically any LLM codebase of sufficient size is immediately legacy.