diff --git a/CLAUDE.md b/CLAUDE.md index f95bb927..09d34b56 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -6,7 +6,7 @@ You are an autonomous coding agent working on a software project. 1. Read the PRD at `prd.json` (in the same directory as this file) 2. Read the progress log at `progress.txt` (check Codebase Patterns section first) -3. Check you're on the correct branch from PRD `branchName`. If not, check it out or create from main. +3. Check you're on the correct branch from PRD `branchName`. If not, check it out or create it from `baseBranch` (if specified in PRD) or from the current HEAD. 4. Pick the **highest priority** user story where `passes: false` 5. Implement that single user story 6. Run quality checks (e.g., typecheck, lint, test - use whatever your project requires) diff --git a/README.md b/README.md index 4db35bc2..10ba0453 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,7 @@ This creates `prd.json` with user stories structured for autonomous execution. Default is 10 iterations. Use `--tool amp` or `--tool claude` to select your AI coding tool. Ralph will: -1. Create a feature branch (from PRD `branchName`) +1. Create a feature branch (from PRD `branchName`, based on `baseBranch` if specified, otherwise from current HEAD) 2. Pick the highest priority story where `passes: false` 3. Implement that single story 4. Run quality checks (typecheck, tests) @@ -114,7 +114,7 @@ Ralph will: | `ralph.sh` | The bash loop that spawns fresh AI instances (supports `--tool amp` or `--tool claude`) | | `prompt.md` | Prompt template for Amp | | `CLAUDE.md` | Prompt template for Claude Code | -| `prd.json` | User stories with `passes` status (the task list) | +| `prd.json` | User stories with `passes` status (the task list). Supports optional `baseBranch` field to specify which branch to create feature branches from (defaults to current HEAD) | | `prd.json.example` | Example PRD format for reference | | `progress.txt` | Append-only learnings for future iterations | | `skills/prd/` | Skill for generating PRDs | diff --git a/prd.json.example b/prd.json.example index fbc40668..faf191b8 100644 --- a/prd.json.example +++ b/prd.json.example @@ -1,6 +1,7 @@ { "project": "MyApp", "branchName": "ralph/task-priority", + "baseBranch": "develop", "description": "Task Priority System - Add priority levels to tasks", "userStories": [ { diff --git a/prompt.md b/prompt.md index cdebe901..a291c946 100644 --- a/prompt.md +++ b/prompt.md @@ -6,7 +6,7 @@ You are an autonomous coding agent working on a software project. 1. Read the PRD at `prd.json` (in the same directory as this file) 2. Read the progress log at `progress.txt` (check Codebase Patterns section first) -3. Check you're on the correct branch from PRD `branchName`. If not, check it out or create from main. +3. Check you're on the correct branch from PRD `branchName`. If not, check it out or create it from `baseBranch` (if specified in PRD) or from the current HEAD. 4. Pick the **highest priority** user story where `passes: false` 5. Implement that single user story 6. Run quality checks (e.g., typecheck, lint, test - use whatever your project requires)