feat: improve vibe loop (stop condition no longer promise complete but instead jq no passes=false stories) and add codex support#93
Conversation
Greptile OverviewGreptile SummaryThis PR improves the vibe loop completion detection by replacing the unreliable Key Changes:
Rationale: Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant Ralph as ralph.sh
participant PRD as prd.json
participant Tool as AI Tool (Amp/Claude/Codex)
User->>Ralph: Start with --tool [amp|claude|codex]
loop For each iteration (max 10)
Ralph->>Tool: Execute with prompt.md or CLAUDE.md
Tool->>PRD: Work on story, update passes=true
Tool-->>Ralph: Complete iteration
Ralph->>PRD: Check completion (jq query)
alt All stories passes=true
Ralph->>User: Exit: All tasks complete
else Stories remain
Ralph->>Ralph: Continue to next iteration
end
end
Ralph->>User: Exit: Max iterations reached
|
|
PS: I just noticed that support for Codex was declined in past PRs. If this is still the case I can remove the Codex reference and just address the vibe loop + stop condition. Please let me know. I think the vibe loop improvement is a good addition. |
|
@snarktank thoughts on the vibe loop improvement? I can remove the codex support if undesired. |
Sometimes the Claude Agent repeats the instruction to say COMPLETE when it is almost done - even though it is not done. This ends the vibe loop prematurely.
The check has instead moved to
With this done Codex support is now easier done and thus was also added.
Tested the ralph loop here with Codex and Claude, confirmed it is working.