Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 24, 2026

Ralph Loop requires structured PRD files with atomic user stories. This adds a workflow that generates Ralph-compatible prd.json from feature descriptions.

Workflow: ralph-prd-generator

Inputs:

  • feature_description (required): Feature requirements in natural language
  • branch_name (optional): Target branch name

Output:
Creates PR with prd.json containing:

{
  "feature": "Task Management System",
  "branchName": "add-task-management-system",
  "userStories": [
    {
      "id": 1,
      "title": "Create Task data model and context",
      "description": "Define TypeScript interface...",
      "acceptanceCriteria": [
        "Task interface includes id, title, description, priority",
        "TaskContext provides state and actions"
      ],
      "passes": false
    }
  ]
}

The workflow prompt enforces:

  • Atomic stories (1-2 hours each, single focus)
  • 2-4 testable acceptance criteria per story
  • Sequential IDs starting from 1
  • kebab-case branch naming

Examples

examples/ralph/prd-samples/ contains:

  • feature-example.md: Task management feature with technical context
  • prd-output.json: 8-story PRD demonstrating proper decomposition
  • README.md: Format specification and best practices
Original prompt

This section details on the original issue you should resolve

<issue_title>[plan] Add PRD generation workflow for Ralph Loop</issue_title>
<issue_description>## Objective

Create a workflow that generates a structured PRD (Product Requirements Document) in JSON format, similar to Ralph's prd.json.

Context

Ralph uses a skill to convert markdown PRDs into structured JSON with user stories. We need a workflow that takes a feature description and generates a PRD suitable for the Ralph Loop workflow.

Approach

  1. Create .github/workflows/ralph-prd-generator.md that:

    • Takes a feature description as input
    • Uses AI engine to generate structured PRD
    • Asks clarifying questions if needed
    • Outputs prd.json with user stories format:
      {
        "feature": "...",
        "branchName": "...",
        "userStories": [
          {
            "id": 1,
            "title": "...",
            "description": "...",
            "acceptanceCriteria": [],
            "passes": false
          }
        ]
      }
  2. Include validation to ensure tasks are small and atomic

  3. Add examples in examples/ralph/prd-samples/

Files to Create

  • .github/workflows/ralph-prd-generator.md - PRD generation workflow
  • examples/ralph/prd-samples/feature-example.md - Sample input
  • examples/ralph/prd-samples/prd-output.json - Sample output

Acceptance Criteria

  • Workflow generates structured PRD from description
  • PRD includes properly formatted user stories
  • Each story has title, description, criteria, and passes flag
  • Workflow validates stories are appropriately sized
  • Examples demonstrate various feature types
    Related to Add Ralph Loop examples for agentic workflows #11132

AI generated by Plan Command for #11132

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits January 24, 2026 07:08
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 PRD generation workflow for Ralph Loop Add PRD generation workflow for Ralph Loop Jan 24, 2026
Copilot AI requested a review from pelikhan January 24, 2026 07:13
@pelikhan pelikhan closed this Jan 24, 2026
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.

[plan] Add PRD generation workflow for Ralph Loop

2 participants