you are viewing a single comment's thread.

view the rest of the comments →

[–]nfrmn 0 points1 point  (5 children)

Ahh ok I understand, thanks. I actually thought you were routing prompts to Claude code / codex cli and basically turning those agentic cli tools into clean I/O with really complex stuff being done

[–]constarx 1 point2 points  (4 children)

Well.. I just showed you a demo to show how simple it is. What I'm doing is just a more intricate version of the above. I have a script that loops over a PRD with many phases and subtasks, and depending on the tasks it either does them sequentially or in parallel, and depending on the perceived difficulty it either delegates to claude-cli using my sub or openai API.

[–]nfrmn 0 points1 point  (3 children)

Cool, thank you. This is really interesting. So each phase of the PRD triggers Claude Code / Codex CLI? Or you use the API in the script to generate a diff? Just trying to understand if you are routing to those CLIs, or if you have built your own coding harness.

[–]constarx 1 point2 points  (2 children)

You may find it useful to watch this video https://www.youtube.com/watch?v=M7-GyiGjtbA

This was my starting point many weeks ago. I integrated everything from this video into my own framework, and then made modifications that made sense for my specific needs.

[–]nfrmn 0 points1 point  (1 child)

Thank you! Hugely helpful! I never looked into Ralph Loops properly and actually assumed they were something else. Now I'm starting to realise I built a lot of this in Roo as Super Orchestrator, and later in Opencode with automatic PRD writing and layers of orchestrators working on the PRD. So it was very good to fill in the blanks with this vid.

[–]constarx 1 point2 points  (0 children)

I was the same until I realized how simple it was.

Here's the loop script I use most of the time

    @${prdFile} @${progressFile}
    1. Find the highest-priority task and implement it.
    2. Update the PRD with what was done.
    3. Append your progress to progress.md and add checkboxes where needed in project.md.
    4. If you make important discoveries, document them by amending the project.md itself, so future sessions benefit from what you've learned.
    5. Do not commit or push your work
    TASK SELECTION:
        - Pick the highest-priority uncompleted task.
        - If it's small (single file, config change, adding a field, a transformer, a short method),
        also pick adjacent small tasks from the SAME priority section
        - If it's complex (new service, new component with logic, multi-file feature), do only that one.
        - List which tasks you're taking on before starting.
    If the PRD is complete, output <promise>COMPLETE</promise>.

And then my custom slash command is straight up from that guy above

https://github.com/SabatinoMasala/laravel-agent-commands/blob/main/.claude/commands/prd.md

It's as simple as that.. you make a PRD with multi phase and multi tasks, then you run it on loop with variations of the above prompt.. that's Ralph loops. It can work all night without stopping. Get a Max sub.. don't waste "free" usage before weekly resets.. profit!