DEV Community

Cover image for AI Agent Promised Me a Website in One Prompt. It Forgot to Mention the PTSD of Working on a Legacy Codebas
Biswa Rizal
Biswa Rizal

Posted on

AI Agent Promised Me a Website in One Prompt. It Forgot to Mention the PTSD of Working on a Legacy Codebas

🧠 I Believed the AI Hype — Now I Just Want a Clean Git Diff

By a developer who just wanted help changing a button, not rewriting the universe.


Remember the hype?

ā€œJust write one prompt, and AI will build your whole app!ā€

Yeah, that was adorable.

Back in early 2024, every AI startup was demoing the same thing:

User: ā€œBuild me a pet adoption site.ā€
AI Agent: ā€œHere’s a full React app. Tailwind? Check. Supabase? Sure. Stripe integration? Why not. Deployed to Vercel, with a puppy licking the screen for extra UX.ā€
Enter fullscreen mode Exit fullscreen mode

✨ Applause. Standing ovation. Dev Twitter went feral. VCs wrote blank checks like it was OpenAI’s IPO.

Everyone had a ā€œBuilt with AI in 10 secondsā€ link in bio.


Then Reality Hit: Welcome to Existing Codebasesā„¢

Fast forward to 2025.

You’re not building toy projects anymore. You want the AI to contribute to an actual product. A real one. With users. And deadlines.

You ask your agent:

ā€œChange the button color and move this section into a modal.ā€

And suddenly:

  • Tests fail in files you didn’t even know existed
  • Redux state starts talking in Morse code
  • useEffect breaks time itself
  • AI rewrites the entire design system because it couldn’t parse your className string

AI: ā€œWhat is this… legacy?ā€

The truth? These agents were trained in a sandbox. Pristine, utopian codebases written by themselves.

In your company’s repo?

  • 2016 jQuery hacks sitting next to 2023 Next.js pages
  • Components named CardFinal, CardFinalV2, and CardFinalV2ReallyFinal
  • A global state shaped like a Jenga tower
  • 7,000 lines of dead code that might still power prod

Asking an AI to ā€œjust update the modalā€ in that soup is like giving a cat a Rubik’s Cube and asking it to deploy on AWS.


"Just Give It Context," They Said.

So now you're pasting half the repo into the prompt:

theme.ts  
utils/getColorFromName.ts  
components/DropdownV5/deprecated/index.tsx  
// don’t touch this – it breaks prod
Enter fullscreen mode Exit fullscreen mode

The AI replies confidently:

ā€œI’ve updated the navbar and cleaned up some unused styles.ā€

You check the git diff.

It deleted the homepage.


Developers in 2025: One Git Commit Away from Madness

We tried. We really did.

But instead of magical productivity, we got:

  • Nightmares in zod and zustand
  • Refactors of files with 12-year git history
  • Commit messages like fix: trying to undo what the AI did
  • AI-generated CSS-in-JS… inside a Tailwind project šŸ’€

One poor dev was last seen whispering:

ā€œWhy is it using styled-components… in a Tailwind app?ā€


Harsh Truth: AI Is Great at Starting. Terrible at Fitting In.

AI loves greenfield.

It thrives on:

  • New repos
  • Atomic design systems
  • Perfect TypeScript configs

Ask it to change 1px in a 7-year-old enterprise monolith?

Panic. Panic. Panic.

It’s like onboarding a junior dev who just realized the repo is a monorepo with 42 packages and no docs.


Final Thoughts: Maybe AI Agents Need Therapy

We gave them a chance.

We wanted helpers, not chaos goblins.

All we ask is:

  • Don’t delete the Header when we ask to fix the Footer.
  • Don’t optimize things we didn’t ask to touch.
  • Don’t hallucinate new design systems from thin air.

Maybe the dream isn’t dead — but let’s change the slogan.

Old: ā€œOne prompt. Full app.ā€
New: ā€œOne prompt. One PR. Zero survivors.ā€

Until then, we’ll be here:

  • Babysitting our agents
  • Writing scripts to fix what the AI broke
  • And praying git checkout -f saves our souls šŸ™

P.S. If your AI ever says:

ā€œI went ahead and optimized everything.ā€

RUN.


Top comments (0)