And then you tell Claude, hey, go pick a task, implement it, do some feedback loops like running some tests or linting, make a commit, and then continue on with the next task. And then in the end, you can have a script that kind of looks like this, where you just pass in the prompt and it'll run in a loop with an additional stopping condition of like an iteration count so you don't completely go through your usage whenever you kick off that script. So let's basically look at the prompt, because that's kind of the magic sauce maybe. So it kind of looks like this. So you just tell it's really simple in essence. So you just tell it, hey, go read some specification and an implementation plan. I want you to decide whatever to work on next. So you tell Ralph, pick a task that seems the most important, because maybe you update your specification or implementation plan as you go and some tasks get mixed up or moved around, so you can make some smart decisions there. Check any feedback loops, and then update your progress in this implementation plan, and then make a commit of that feature. And this is also important, only work on one thing at a time, because, again, we do not want to get into the problems of big context windows.
Now you might be thinking optimistically, wow, these Ralph loops, they're amazing. They can do whatever I want. I don't have to code ever again. Or maybe you're a bit more pessimistic. But this is just a tool. This is not like the new way of working. I'm just showing you an idea, and it's up to you as an engineer to kind of decide, like, okay, this is where I can apply this, and this is another area where it might not be as useful. Again, so about feedback loops, they're also called back pressure, if you've heard that term. It basically just means telling the LLM to run some checks like tests, type checking or running a build or even writing new tests to ensure that it works, what it has made actually works, so it can kind of self-correct if it doesn't work yet. Because, of course, the point of this is to have an autonomous coding agent, and you don't want to have to babysit this, like, oh, no, it didn't work. Go fix it. The tests aren't passing. Why didn't you just run the test? No, you have to specify it, or otherwise it might not do it. And also another thing is permissions, because if you've ever used a coding agent, you will have probably noticed that they ask you, like, oh, can I run this command? Can I install this? Whatever. So what some people do is they run their agent with, like, dangerously skipped permissions as a flag, and, you know, what can go wrong?
I probably don't have to explain it, but there's, like, this post on Reddit that I saw of someone saying, like, oh, yeah, I ran this issue where, like, my coding agent was running, and it needed some more disk space to do the task, so the coding agent figured, well, I'm not done yet, so I'm just going to go clean up some files so I have some more space to work on, which is pretty bad. So a solution to that is called sandboxing, which is basically running your script in a container, and there's a Docker command that you can run in your RELFLOOP as well or some other approaches to that problem. Okay, so I'm kind of not on pace, so we're going to try to speed things up. So let's talk about creating your specification. So basically, in essence, you can just have a conversation with Claude or another coding agent to talk about your idea, and it will keep asking you. The important part here is that you ask it, hey, I want you to have a discussion with me and interview me until we have clarity on what we want to implement, and that will just keep asking you questions over and over until you have, like, a shared agreement, basically.
Comments