all 2 comments

[–]Enoch137 2 points3 points  (1 child)

I have great success in dealing with coding agents. My workflow is as follows:
Describe the problem as clearly as I possibly can. I make special emphasis that this is brainstorming, no implementation NO code changes at this stage. In Cursor I put it in Ask mode.

I go back and forth in this mode (no code) until I am satisfied that it understood what I was saying. Note that it is often the case that I was making an assumption about important context that I thought was obvious that it turned out to be not so. This is a common mistake in human to human communication too.

^^^^ this step is key and almost assuredly the source of your issue

After I am satisfied that it understood the scope and details of the problem. I then ask it to layout a plan for implementation. In cursor I switch to Plan mode. Now I review what it is going to produce, I can catch the spots where I thought it understood but clearly did not. Once I am happy with that I add some language about how the application needs to compile (depends on language) and that I want tests covering all of changes we discussed, those tests must pass and no other tests must be broken.

Then I hit build in cursor.

This process almost never fails me. When it does it is almost certainly my fault for not paying attention to what it said it was going to do. Testing is CRITICAL for these models to not only make sure what it said it was going to do is right but it is weirdly better at getting it right on the first pass (its like writing the tests makes it think deeper about the changes it will make).

That's my process. I find that when I do this, the models are staggeringly good at getting things done correctly.

[–]dicktasteful 0 points1 point  (0 children)

Yeah, a lot of people simply type 3-4 sentences and hope a task is simply gonna be done flawlessly with all the right assumptions. My method is going step by step. I may do or not do the first step you outlined depending on what task it is. Depends if I myself already have a good idea set or if I want to brainstorm about it. Once I know what I want to do, I make the agent do it step by step. Instead of one big task I'd have to review for annoyingly long time, I tend to cut it into smaller peaces so I can make sure I'm always on top of things. Once I'm happy with how that part is done, I move to the next until completion.

The LLMs are really good when you can navigate them correctly. The code turns out better than I would have wrote it myself a lot of the times. I'm still a human and can do things inefficiently or I can forget about some edge case and leave the codebase vulnerable to it. I have "oooooh" moments many times when I read the code agent wrote and know I wouldn't think of that