Skip to content

feat: Integrate Ralph Loop mechanism for automated app development - #5

Merged
Rishabh-Bajpai merged 6 commits into
developmentfrom
feat-ralph-loop-integration-4511484040334154221
May 20, 2026
Merged

feat: Integrate Ralph Loop mechanism for automated app development#5
Rishabh-Bajpai merged 6 commits into
developmentfrom
feat-ralph-loop-integration-4511484040334154221

Conversation

@Rishabh-Bajpai

Copy link
Copy Markdown
Collaborator

Integrates the "Ralph Loop" mechanism, adopting Geoffrey Huntley's pattern as implemented in ChristianKuri/ralph-and-opencode, to enable a fully automated application development workflow.

This change adds:

  • scripts/ralph/ralph.sh: The main loop runner that repeatedly executes OpenCode using the instructions.
  • scripts/ralph/prompt.md: The system prompt to guide each fresh OpenCode agent instance during the iterations.
  • prd.json.example: A format definition for structured feature plans the agent uses for tasks.
  • .opencode/skills/*: Global skills like prd and ralph to assist developers in defining and formatting tasks before running the loop, as well as dev-browser to allow UI testing.
  • AGENTS.md: Updated with usage instructions.

PR created automatically by Jules for task 4511484040334154221 started by @Rishabh-Bajpai

- Adopted Ralph Loop pattern from ChristianKuri/ralph-and-opencode
- Added `ralph.sh` script to orchestrate the loop execution
- Added `.opencode/skills/` globally available OpenCode agent skills
- Added `prompt.md` instructions and `prd.json.example` format definition
- Updated `AGENTS.md` with instructions on how to use Ralph Loop

Co-authored-by: Rishabh-Bajpai <28703138+Rishabh-Bajpai@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@coderabbitai

coderabbitai Bot commented May 7, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 362e39d1-7547-4e48-b7d5-c42420b8392a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat-ralph-loop-integration-4511484040334154221

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

- Adopted Ralph Loop pattern from ChristianKuri/ralph-and-opencode
- Added `ralph.sh` script to orchestrate the loop execution
- Added `.opencode/skills/` globally available OpenCode agent skills
- Added `prompt.md` instructions and `prd.json.example` format definition
- Updated `AGENTS.md` with instructions on how to use Ralph Loop
- Added UI checkboxes to "Create Chat Project" modals to scaffold Ralph Loop
- Backend copies Ralph Loop files securely without using shell subprocesses

Co-authored-by: Rishabh-Bajpai <28703138+Rishabh-Bajpai@users.noreply.github.com>
@Rishabh-Bajpai

Copy link
Copy Markdown
Collaborator Author

@copilot please review this PR and it looks like the ralph loop is not implemented properly in this PR (UI,feature are not that good). Please understand the whole code base and then improve the implementation. Also since the repo already have tasks maybe the current ralph implementation doesn't make any sense. Please re implement this feature with current code in the development branch.

Copilot AI and others added 3 commits May 20, 2026 01:42
… inline-styled checkbox

Agent-Logs-Url: https://github.com/Rishabh-Bajpai/mobile-opencode-control/sessions/e8245915-d516-4bab-b1a0-3909966004a2

Co-authored-by: Rishabh-Bajpai <28703138+Rishabh-Bajpai@users.noreply.github.com>
…prd routes

Agent-Logs-Url: https://github.com/Rishabh-Bajpai/mobile-opencode-control/sessions/e8245915-d516-4bab-b1a0-3909966004a2

Co-authored-by: Rishabh-Bajpai <28703138+Rishabh-Bajpai@users.noreply.github.com>
…trace exposure

Agent-Logs-Url: https://github.com/Rishabh-Bajpai/mobile-opencode-control/sessions/e8245915-d516-4bab-b1a0-3909966004a2

Co-authored-by: Rishabh-Bajpai <28703138+Rishabh-Bajpai@users.noreply.github.com>

Copilot AI commented May 20, 2026

Copy link
Copy Markdown
Contributor

@copilot please review this PR and it looks like the ralph loop is not implemented properly in this PR (UI,feature are not that good). Please understand the whole code base and then...

The Ralph Loop has been properly reimplemented in commit 33ebe71 to integrate with the existing Tasks system instead of copying shell scripts.

What changed:

  1. Removed the poor UI — the inline-styled checkbox on the create-project form is gone entirely (both desktop and mobile).

  2. Integrated with the Tasks panel — the Tasks sidebar now shows a Ralph Loop PRD Tracker section for the active project. It:

    • Shows the prd.json user stories with pass/fail status badges and a n/n done counter
    • Has an Init PRD button that scaffolds a starter prd.json directly in the project root via the new PUT /api/projects/{id}/prd backend endpoint
    • Has a Create Ralph Task button that pre-fills the task editor as a goal-type scheduled task with the ralph loop instruction and goal definition already set — the user just reviews and saves
  3. Goal-type task integration — the pre-filled Ralph task uses the existing scheduler's goal type: OpenCode runs every 15 minutes, implements one story, updates prd.json, and outputs GOAL_MET: yes/no. The scheduler loops until all stories have passes: true.

  4. Backend endpointsGET /api/projects/{id}/prd reads the project's prd.json, PUT /api/projects/{id}/prd creates/updates it.

  5. AGENTS.md — fixed formatting and added a proper Ralph Loop usage guide section.

…p-integration-4511484040334154221

# Conflicts:
#	frontend/src/api.ts

Co-authored-by: Rishabh-Bajpai <28703138+Rishabh-Bajpai@users.noreply.github.com>
@Rishabh-Bajpai
Rishabh-Bajpai merged commit 3df7d98 into development May 20, 2026
1 check passed
@Rishabh-Bajpai
Rishabh-Bajpai deleted the feat-ralph-loop-integration-4511484040334154221 branch May 20, 2026 05:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants