Ask stories

Live mirror
28 storiesupdated 0s agoView source snapshot
  1. Ask HN: What are you working on? (September 2026)
    1122comments
  2. Ask HN: Slow OpenAI Inference on AWS Bedrock
    1comments
  3. Ask HN: Lesser known features of macOS/iPadOS/iOS/etc. 27
    6comments
  4. Day 13. Three production applications on AWS down
    2comments
  5. Which crossword generator do you use?
    discuss
  6. SuperColoring – a simple crossword generator for learning and fun
    discuss
  7. Ask HN: Where is all of the AI coded software?
    7comments
  8. Started Learning Pentesting
    discuss
  9. Working on Plug and Play personal AI Memory that works across AI agents
    discuss
  10. Ask HN: Why 17?
    1comments
  11. Ask HN: Why is Pulley (cap table) shutting down?
    1comments
  12. What are you building,Lets explore each others
    3comments
  13. Ask HN: Are 80s high school hobby programmers overwhelmingly pro-AI?
    34comments
  14. Ask HN: How are you managing aging relatives passwords?
    15comments
  15. Tell HN: iOS 27 does not allow Apple Intelligence to be disabled
    25comments
  16. Ask HN: What would make you trust an AI's assessment of your understanding?
    3comments
  17. Ask HN: Would a startup for young creatives who reject AI be feasible?
    24comments
  18. Ask HN: What default model do you use and why?
    103comments
  19. Ask HN: Should we start airgapping our personal devices?
    7comments
  20. Ask HN: What would make self-hosting easy enough for average consumers?
    7comments
  21. Ask HN: Developers – Do you let agents write production code?
    11comments
  22. Has anyone made a legacy codebase more legible to AI coding agents?
    2comments
  23. A repo gained 3,278 stars while GitHub showed Andrej Karpathy as a contributor
    3comments
  24. Tell HN: Screenshots on macOS don't have to be date named files with spaces
    5comments
  25. Tell HN: OpenAI keeps re-enabling the 'allow training' setting
    188comments
  26. YouTube has banned Dmitry "Savromat" Chernyshevsky
    discuss
  27. Ask HN: Is there an emerging pattern for NEGATIVESKILLS.md files?
    3comments
  28. Ask HN: Did Google kill its enterprise workhorse model?
    18comments
  29. End of available stories

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

2 pointsby 1d ago
2 comments
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

1d agoHN ↗

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