fix: branch creation defaults to current HEAD instead of main#44
Open
chaitanyakumar-d wants to merge 1 commit intosnarktank:mainfrom
Open
fix: branch creation defaults to current HEAD instead of main#44chaitanyakumar-d wants to merge 1 commit intosnarktank:mainfrom
chaitanyakumar-d wants to merge 1 commit intosnarktank:mainfrom
Conversation
- Update prompt.md and CLAUDE.md to create branches from baseBranch (if specified) or current HEAD - Add optional baseBranch field to prd.json.example - Update README.md to document the new baseBranch option Fixes snarktank#40
Author
|
Hi! 👋 This is my first contribution to this project. A few notes on this implementation:
Happy to make any changes if you'd like a different approach! |
Greptile Summary
Important Files Changed
Confidence score: 5/5
Sequence DiagramsequenceDiagram
participant User
participant Ralph as ralph.sh
participant AI as "AI Tool (Amp/Claude)"
participant Git
participant Files as "PRD & Progress Files"
User->>Ralph: "Execute ./ralph.sh [--tool] [iterations]"
Ralph->>Files: "Read prd.json"
Ralph->>Git: "Check/create branch from baseBranch or HEAD"
loop Until all stories pass or max iterations
Ralph->>AI: "Spawn fresh AI instance with prompt"
AI->>Files: "Read prd.json and progress.txt"
AI->>AI: "Pick highest priority story with passes: false"
AI->>AI: "Implement single user story"
AI->>AI: "Run quality checks (typecheck, lint, test)"
alt Quality checks pass
AI->>Git: "Commit changes with feat: [Story ID] - [Title]"
AI->>Files: "Update prd.json: set passes: true"
AI->>Files: "Append progress to progress.txt"
else Quality checks fail
AI->>AI: "Fix issues and retry"
end
AI->>Ralph: "Return completion status"
Ralph->>Files: "Check if all stories have passes: true"
alt All complete
Ralph->>User: "Output <promise>COMPLETE</promise>"
else More work needed
Ralph->>Ralph: "Continue to next iteration"
end
end
|
Greptile found no issues!From now on, if a review finishes and we haven't found any issues, we will not post anything, but you can confirm that we reviewed your changes in the status check section. This feature can be toggled off in your Code Review Settings by deselecting "Create a status check for each PR". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes the branch creation behavior to use the current HEAD or an optional
baseBranchinstead of always defaulting tomain.Problem
When the PRD's
branchNamedoesn't exist, the agent instructions say to "create from main". This causes issues when using a development branch (e.g.,stage) as the integration point, leading to:Solution
prompt.mdandCLAUDE.mdto create branches frombaseBranch(if specified in PRD) or from the current HEADbaseBranchfield toprd.json.exampleREADME.mdto document the new optionChanges
prompt.md: Updated step 3 to usebaseBranchor current HEADCLAUDE.md: Updated step 3 to usebaseBranchor current HEADprd.json.example: AddedbaseBranchfield exampleREADME.md: Documented the newbaseBranchoptionFixes #40