frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Has anyone made a legacy codebase more legible to AI coding agents?

1•iacobandrei•39m ago
Quick Summary: Did you ever optimize a legacy/vibe-coded codebase to improve AI driven development results and avoid fixing a bug for 2 more to appear? i want to hear what your experience was.

First, some context. ~7 months ago i was the first Engineering hire at a ( now ) 2 years old startup. The codebase started as a Lovable MVP built by our low level CTO, one month ago we hired a second dev and we are further expanding our engineering team and preparing the terrain for me to move to Staff. Now as you probably expected, the codebase is a mess since we simply built on top of the first MVP, of course with zero documentation, the main problems i identified in our codebase: - Duplicated business logic → no single source of truth / poor separation of concerns. - Zombie tables and columns → accumulated schema/structural debt, most of them look right, they are not - We manually track downstream effects since everything is scattered and duplicated in the most confusing way → implicit dependencies, implicit architecture and high change coupling. Changing a thing here also needs changing there and there ( this is mainly fixable by a codebase graph indexer )

Now quickly, so you dont get bored, ive identified as the sweet spot solution between speed and reliability to properly document the whole codebase and store that efficiently as a 'knowledge database' for our AI agents, so they are at least aware of the known gaps, constraints, decisions, business logic, where else to change something and the causes and effects of changes.

The closest and most interesting article that treats this exact issue is this one from Meta, which i want to start my approach from.

Now what im asking here is for some similar experiences, other startup engineers that had to go through a similar approach, what was their approach, experience, outcome and any tips on what should i avoid or be aware of.

Any help will be much appreciated

Comments

iacobandrei•38m ago
BTW this is the article from Meta https://engineering.fb.com/2026/04/06/developer-tools/how-me...
PaulHoule•18m ago
I think it is the same with cleaning up a code base for human programmers.

For instance I picked up a typescript code base that was a real mess and if I tired to change anything I would get all these crazy error messages that made no sense to either me or the AI.

It took about two days going back and forth with the AI for me to understand that was going wrong and put the typescript into a good condition where, when it type checked, it typed check for the right reasons. As the code got better I was able to make changes easily and so was the agent. I haven't put a lot of effort into things like AGENTS.md files, I just write a lot of

  // documentation in comments
that would make sense to anyone

Project Blueprint

https://svangel.com/blueprint
1•tosh•2m ago•0 comments

Show HN: Backtotal – the total is given, work back to the four digits

https://backtotal.com/
1•Dogs2478•2m ago•0 comments

Show HN: Shortcut Express – My attempt to get the world using keyboard shortcuts

https://github.com/chimit/shortcut-express
1•motomac•3m ago•0 comments

Wales, Scotland and Northern Ireland now all have nationalist first ministers

https://www.bbc.com/news/articles/c62enegxyl9o
1•sashazykov•4m ago•0 comments

RAG Might Be Lying to You

https://github.com/ChandulaSenevirathna/Agentic_RAG
4•Pasannn•4m ago•0 comments

Show HN: Hazumi for HN Comes to the Web

https://www.hazumi.news
1•jrhey•4m ago•0 comments

A "slowdown" might improve OpenAI and Anthropic products

https://killerstorm.github.io/ai/2026/09/14/slowbetter.html
1•killerstorm•4m ago•0 comments

Show HN: Fidelic, a Salesforce emulator in a Docker container

https://www.fidelic.dev/
1•ifykhanikhan•4m ago•0 comments

A Beginning for Mathematics

https://www.daniellitt.com/blog/2026/9/13/a-beginning-for-mathematics/
1•robinhouston•6m ago•0 comments

WMail: Native iPhone Fastmail/JMAP Client

https://wmail.download/
1•cdrnsf•7m ago•0 comments

China's Regulators Take Aim at "AI Boyfriends"

https://spectrum.ieee.org/china-ai-chatbot-regulation
3•andai•8m ago•0 comments

Show HN: Botbin – A zero-login HTML pastebin for AI agents

http://botbin.io/
1•obilgic•9m ago•0 comments

Beijing hits back at Anthropic CEO's call to curb China's AI development

https://apnews.com/article/china-anthropic-ai-us-amodei-3da458d2c078da3e60900728d59f1ae8
2•djoldman•10m ago•0 comments

National Security Agency launches historic restructuring

https://www.msn.com/en-us/news/other/national-security-agency-launches-historic-restructuring/ar-...
1•pilingual•10m ago•0 comments

Show HN: msgspec-serde, Fast serialization for msgspec, flatbuffers, & arrays

https://github.com/ebrevdo/msgspec-serde
1•yablak•11m ago•0 comments

Qwen Audio Agent – full duplex via ACP

https://qwenaudio.github.io/qwen-audio-agent/
1•fallinditch•11m ago•0 comments

Show HN: Drone flight over world cities and neighbourhoods

https://citydrones.kingsbridge-consultancy.com/
1•beerglass•11m ago•2 comments

Principles for Fast Tokio Applications

https://dial9-rs.github.io/blog/principles-for-fast-tokio-applications/
3•carllerche•11m ago•0 comments

TikTok and Google got information about doctor's appointments around the world

https://themarkup.org/pixel-hunt/2026/09/14/how-tiktok-and-google-ended-up-with-information-about...
1•DeepLogin•11m ago•0 comments

Foundation Model Engineering: From Theory to Production

https://sungeuns.github.io/foundation-model-engineering/
3•sungeuns•12m ago•0 comments

Not Regulating AI Is Still a Regulatory Choice

https://www.jasonwillems.com/technology/2026/09/07/The-Paradox-of-AI-Regulation/
3•at1as•12m ago•0 comments

The Memory That AI Agents Love

https://medium.com/@majid.fekri/the-memory-that-ai-agents-love-b9ec0a708e7c
1•supportm•14m ago•0 comments

Are Flies Beat Saber?

https://www.neuroai.science/p/are-flies-playing-beat-saber
1•pminimax•17m ago•0 comments

Fossilized 10k-year-old Mastodon tooth found by California scientist

https://www.theguardian.com/us-news/2026/sep/12/fossilized-mastodon-tooth-10000-years-found-calif...
2•gmays•17m ago•0 comments

Suyu – a Nintendo Switch emulator and AArch64 native recompiler written in C++

https://github.com/suyu-emu/suyu-v0.0.4
1•ortusdux•18m ago•0 comments

Erythema Ab Igne

https://en.wikipedia.org/wiki/Erythema_ab_igne
1•pvaldes•18m ago•0 comments

Show HN: GSE Cleaner – In-browser streaming parser for large GEO datasets

https://byqing.com/gse/
1•niqing•20m ago•0 comments

Transitions.dev: UI transitions for AI agents

https://transitions.dev/
2•eustoria•20m ago•0 comments

Things That Annoy Me About Cars

https://blog.decryption.net.au/posts/cars_suck.html
2•eustoria•22m ago•0 comments

China Rejects AI 'Fearmongering' After Amodei Urges Slowdown

https://www.bloomberg.com/news/articles/2026-09-14/china-rejects-ai-fearmongering-after-amodei-ur...
4•larrysalibra•22m ago•0 comments