Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 19, 2026

Implements the Ralph pattern from https://github.com/snarktank/ralph - an autonomous agent loop that repeatedly executes Copilot until all PRD user stories are complete. Each iteration spawns a fresh agent instance with clean context; memory persists via git history, progress.txt, and prd.json.

Implementation

New engine type: ralph

  • Wraps Copilot CLI with autonomous loop orchestration
  • Delegates installation, MCP config, and log parsing to Copilot engine
  • Manages PRD-driven task execution with JSON user stories

Loop mechanics (actions/setup/sh/ralph-loop.sh):

  • Iterates until all stories pass or max iterations reached
  • Each iteration: select incomplete story → execute Copilot → update status → commit
  • State tracked in /tmp/gh-aw/ralph/{prd.json,progress.txt}

Schema changes:

  • Added ralph to engine enum in main_workflow_schema.json
  • Registered in global engine registry alongside claude/codex/copilot/custom

Usage

---
engine: ralph
on: workflow_dispatch
permissions:
  contents: read
---

{
  "userStories": [
    {
      "id": "story-1",
      "title": "Create hello.py",
      "passes": false
    }
  ]
}

The loop automatically picks incomplete stories, implements them via Copilot, validates, and marks complete.

Original prompt

Add ralf loop + copilot as a custom engine

https://github.com/snarktank/ralph


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 4 commits January 19, 2026 09:01
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Ralf loop and Copilot as a custom engine Add Ralph autonomous agent loop engine with Copilot backend Jan 19, 2026
Copilot AI requested a review from pelikhan January 19, 2026 09:19
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