Lurker News
I've been working on a personal project recently, rewriting an old jQuery + Django project into SvelteKit. The main work is translating the UI templates into idiomatic SvelteKit while maintaining the original styling. This includes things like using semantic HTML instead of div-spamming, not wrapping divs in divs in divs, and replacing bootstrap with minimal tailwind. It also includes some logic refactors, to maintain the original functionality but rewritten to avoid years of code debt. Things like replacing templates using boolean flags for multiple views with composable Svelte components.

I've had a fairly steady process for doing this: look at each route defined in Django, build out my `+page.server.ts`, and then split each major section of the page into a Svelte component with a matching Storybook story. It takes a lot of time to do this, since I have to ensure I'm not just copying the template but rather recreating it in a more idiomatic style.
This kind of work seems like a great use case for AI assisted programming, but I've failed to use it effectively. At most, I can only get Claude Code to recreate some slightly less spaghetti code in Svelte. Simple prompting just isn't able to get AI's code quality within 90% of what I'd write by hand. Ideally, AI could get it's code to something I could review manually in 15-20 minutes, which would massively speed up the time spent on this project (right now it takes me 1-2 hours to properly translate a route).
Do you guys have tips or suggestions on how to improve my efficiency and code quality with AI?

Comments (469) 111 threads

Earlier comments
Krish-mal15#
My suggestion is to use prompting tools. Its usually the prompts fault. AI reasoning does exist, but it performs at its best if you spoonfeed actionable steps and provide as much context as possible.

I personally use JSON prompts that follow this format I shared on reddit: https://www.reddit.com/r/vibecoding/comments/1pl4zbr/i_made_...
I actually built a tool for this called Promptify (https://joinpromptify.com/) which is a completely free chrome extension that works with really any AI platform
Use claude code + this extension and you'll be set! Completely free stack unless you buy Claude pro

somangshu1 reply#
Hey, I am the co-founder at https://brew.studio We built the platform for the problem you are facing. Our agent `brew` excels at managing context with growing change requests and actual code change so that solving spaghetti code is easier and efficient.

We will allow you to create and supervise impact analysis on a change request you are planning and then you get brew to also create a detailed implementation prompt for you. This way you always remain in control and our able to instruct you AI coding agent better at once.
Not just this, we also map the commit that comes in to the original change request and show you what's done, what's not, Expected vs Actual & unplanned changes mapping them to actual code that is written. This makes it really easy to review.
We are in our early stages. I would love for you to try us out. I am open to offering you usage credits as well.

tasuki#
Brew? Didn't anyone tell you that name was taken already?
mirsadm1 reply#
I break everything down into very small tasks. Always ask it to plan how it will do it. Make sure to review the plan and spot mistakes. Then only ask it to do one step at a time so you can control the whole process. This workflow works well enough as long as you're not trying to do anything too interesting. Anything which is even a little bit unique it fails to do very well.
kgwxd1 reply#
sounds like you're doing all the actual work. why not just type the code as you figure out how to break down the problem? you're going to have to review the output anyway.
Iulioh#
It's useful to have the small functions all written.

I program mostly in VBA these days (a little problematic as is a dead leanguage since 2006 and even then it was niche) and I have never recived a correct high level ""main"" sub but the AIs are pretty good at doing small subs I then organize.
And yes, telling me where I make errors, they are pretty good at that
At the end of the day I want reliability and there is no way I can't do what without full review.
The funny thing is that they try to use the """best practices""" of coding where you would reasonably want to NOT have them.

nutellalover#
Hey, I teach a class at Stanford covering among other things how to effectively use AI across the full SDLC. Hope it's helpful! https://themodernsoftware.dev/

Load more comments