Add Ralph loop tooling for autonomous spec implementation#9
Merged
Conversation
Enables running approved spec plans autonomously with a fresh Claude context per task (the original Ralph technique), instead of one long session that degrades as context fills. ralph.ps1 drives three phases around a spec index: /create-prd derives a gated task list from the spec plan, the loop implements one task per iteration with headless or Unity MCP verification, and /complete-prd hands off via the existing /commit and /pr skills. Per-phase cost metrics are logged to support comparing Ralph against single-session implementation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
scripts\ralph.ps1 -SpecIndex <n>derives a gated task list from the spec's plan (/create-prd), implements one task per freshclaude -piteration, and on success commits and opens a PR via the existing /commit and /pr skills (/complete-prd).ralph/metrics_<n>.csvto enable a Ralph-vs-single-session cost comparisonunity-manualfor manual follow-upralph/<spec>, refuses dirty trees, permission allowlist instead of skipping permissions, PR phase skipped when tasks remain unfinished/commitskill docs and project permission allowlist (Setup common skills)Test plan
ralph.ps1parse-checked clean (PowerShell 5.1, pure ASCII)Docs/Specs/45_province-ownership/create-prd→ loop →/complete-prd) with Unity Editor open🤖 Generated with Claude Code