Skip to content

feat: Add interactive interview for PRD generation#22

Draft
Copilot wants to merge 5 commits intomasterfrom
copilot/add-interactive-qa-method
Draft

feat: Add interactive interview for PRD generation#22
Copilot wants to merge 5 commits intomasterfrom
copilot/add-interactive-qa-method

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 19, 2026

Users currently must write PRDs manually, which is counterintuitive given Ralph's autonomous nature. This adds an interview-based workflow where Ralph asks questions and generates PRDs automatically.

Changes

Core Implementation

  • ralph-interview.sh: CLI script conducting interactive interviews with colored prompts, input sanitization, and automatic session generation
  • /ralph:interview: AI command file for Claude/Cursor with conversation guidelines and example transcripts
  • Generates complete sessions: prd.json, progress.txt, learnings.md

Interview Flow

  • Session naming → Feature description → Validation commands → Agent/model selection → Task breakdown → Acceptance criteria
  • JSON escaping for quotes/backslashes, kebab-case sanitization for session names
  • Guides users toward atomic tasks (5-15 min) and measurable criteria

Model Selection

  • Clearly asks "Which model should Ralph use?" to specify the model for Ralph's execution
  • Shows common model options for Claude (sonnet, opus, haiku) with descriptions
  • Explains when to leave blank for agent's default
  • Required for cursor agent, optional for others

Documentation

  • README/USAGE updated to feature interview as primary session creation method
  • docs/INTERVIEW-EXAMPLE.md: Complete walkthrough with example interaction
  • Test suite: 11 tests validating script structure, syntax, documentation

Usage

# CLI
./ralph-interview.sh

# AI Command (Claude/Cursor)
/ralph:interview

Ralph interviews user conversationally, then generates:

{
  "branchName": "ralph/user-auth",
  "agent": "claude",
  "model": "sonnet",
  "validationCommands": { "typecheck": "pnpm typecheck" },
  "userStories": [
    {
      "id": "TASK-001",
      "title": "Create auth API routes",
      "acceptanceCriteria": ["Route exists at /api/auth", "Typecheck passes"],
      "priority": 1,
      "passes": false
    }
  ]
}

Makes Ralph self-contained for PRD creation as requested.

Original prompt

This section details on the original issue you should resolve

<issue_title>feat: new method to have Ralph ask the user questions instead of only running the loop</issue_title>
<issue_description>Right now, you need to come up with a PRD yourself, which seems counterintuitive, especially when you then run an automated loop for hours using really smart AI agents.

So I've been thinking that it would make a lot more sense to use a method that allows the AI to first interview you about what you want (Ralph-style, using CLIs) and have IT build the PRD for you directly. That would make this package entirely self-contained.

(An even more interesting improvement would be to bake in some git usage to directly clone your project into a worktree or clone overall and have Ralph act on it. That way, you do not even need to keep Ralph in your project directly. Though the sessions should definitely go in there for future compound engineering.)</issue_description>

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.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 19, 2026

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

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


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

Copilot AI and others added 3 commits January 19, 2026 10:22
- Add ralph-interview.sh CLI script for interactive PRD generation
- Add /ralph:interview command for AI-guided PRD creation
- Update README and documentation with interview workflow
- Add comprehensive tests for interview feature
- Update examples with interview instructions

Co-authored-by: OctavianTocan <55554752+OctavianTocan@users.noreply.github.com>
- Add json_escape function to handle quotes and backslashes
- Apply escaping to task titles and acceptance criteria
- Add comprehensive interview example walkthrough
- Update USAGE.md to reference example documentation

Co-authored-by: OctavianTocan <55554752+OctavianTocan@users.noreply.github.com>
- Enhanced session name sanitization to remove special characters
- Added comments about JSON escaping and delimiter limitations
- Improved kebab-case conversion to handle edge cases

Co-authored-by: OctavianTocan <55554752+OctavianTocan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add method for Ralph to ask user questions feat: Add interactive interview for PRD generation Jan 19, 2026
Copilot AI requested a review from OctavianTocan January 19, 2026 10:30
@OctavianTocan
Copy link
Copy Markdown
Owner

@copilot I want this to also ask user's which model they want to add to the PRD for the Ralph session. By default you can just use Claude Code for the interviewer.

- Add explanation that model is for Ralph execution, not the interviewer
- Show common model options (sonnet, opus, haiku) for Claude
- Clarify when to leave blank for agent's default
- Update command file and documentation with improved flow
- Add context about model purpose in all interview materials

Co-authored-by: OctavianTocan <55554752+OctavianTocan@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jan 23, 2026

@copilot I want this to also ask user's which model they want to add to the PRD for the Ralph session. By default you can just use Claude Code for the interviewer.

Done in ad9b302. The interview now explicitly asks "Which model should Ralph use?" with clearer context that this is for Ralph's execution (not the interviewer). It shows common model options (sonnet, opus, haiku) for Claude and explains when to leave blank for the agent's default.

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.

feat: new method to have Ralph ask the user questions instead of only running the loop

2 participants