-
Notifications
You must be signed in to change notification settings - Fork 0
Implement Ralph Loop methodology for self-correcting implementation #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 5 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
9a66b90
Implement Ralph Loop methodology (Phases 1-3) for self-correcting imp…
jsegov 4dc1513
Fix task loop state cleanup for INCOMPLETE/MISALIGNED cases
jsegov 8b80ff2
Fix Ralph Loop state management bugs
jsegov 09f38d9
Align Ralph Loop hooks with reference implementation
jsegov 0553df5
Fix planning refinement loop by adding prompt to state file
jsegov 6f79442
Fix awk prompt extraction to preserve --- in content
jsegov 29df897
Fix hook race conditions and add CLAUDE.md documentation
jsegov efd0e65
Bump marketplace version to 1.1.0 and document version bumping
jsegov f621064
Move loop state files from .claude/ to .shipspec/
jsegov 4b0d1a9
Convert to hybrid TASKS.json + TASKS.md structure
jsegov af62bd4
Fix missing BLOCKED handling in Step 3's INCOMPLETE flow
jsegov fa6cb0d
Reposition README around spec + Ralph loop narrative
jsegov fbed6b5
Fix misleading retry messages in stop hooks
jsegov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| --- | ||
| description: Cancel active feature implementation retry loop | ||
| allowed-tools: | ||
| - Bash(test:*) | ||
| - Bash(rm:*) | ||
| - Read | ||
| --- | ||
|
|
||
| # Cancel Feature Retry | ||
|
|
||
| Cancel an active feature implementation retry loop. | ||
|
|
||
| ## Step 1: Check for Active Loop | ||
|
|
||
| ```bash | ||
| test -f .claude/shipspec-feature-retry.local.md && echo "EXISTS" || echo "NOT_FOUND" | ||
| ``` | ||
|
|
||
| **If NOT_FOUND:** | ||
| > "No active feature retry loop found." | ||
|
|
||
| **Stop here.** | ||
|
|
||
| ## Step 2: Read Current State | ||
|
|
||
| If EXISTS, read the state file: | ||
|
|
||
| ``` | ||
| Read .claude/shipspec-feature-retry.local.md | ||
| ``` | ||
|
|
||
| Extract from the YAML frontmatter: | ||
| - `current_task_id` - the task being implemented | ||
| - `feature` - the feature name | ||
| - `task_attempt` - current attempt number for the task | ||
| - `max_task_attempts` - maximum attempts per task | ||
| - `tasks_completed` - number of completed tasks | ||
| - `total_tasks` - total number of tasks | ||
|
|
||
| ## Step 3: Cancel the Loop | ||
|
|
||
| Remove the state file: | ||
|
|
||
| ```bash | ||
| rm .claude/shipspec-feature-retry.local.md | ||
| ``` | ||
|
|
||
| ## Step 4: Report | ||
|
|
||
| > "Cancelled feature retry for **[FEATURE]** | ||
| > | ||
| > - Current task: [CURRENT_TASK_ID] (attempt [TASK_ATTEMPT]/[MAX_TASK_ATTEMPTS]) | ||
| > - Progress: [TASKS_COMPLETED]/[TOTAL_TASKS] tasks completed | ||
| > | ||
| > The current task remains in `[~]` (in-progress) status in TASKS.md. | ||
| > Run `/implement-feature [feature]` to resume, or `/implement-task [feature]` to continue task-by-task." |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| --- | ||
| description: Cancel active task implementation loop | ||
| allowed-tools: | ||
| - Bash(test:*) | ||
| - Bash(rm:*) | ||
| - Read | ||
| --- | ||
|
|
||
| # Cancel Task Loop | ||
|
|
||
| Cancel an active task implementation loop. | ||
|
|
||
| ## Step 1: Check for Active Loop | ||
|
|
||
| ```bash | ||
| test -f .claude/shipspec-task-loop.local.md && echo "EXISTS" || echo "NOT_FOUND" | ||
| ``` | ||
|
|
||
| **If NOT_FOUND:** | ||
| > "No active task loop found." | ||
|
|
||
| **Stop here.** | ||
|
|
||
| ## Step 2: Read Current State | ||
|
|
||
| If EXISTS, read the state file: | ||
|
|
||
| ``` | ||
| Read .claude/shipspec-task-loop.local.md | ||
| ``` | ||
|
|
||
| Extract from the YAML frontmatter: | ||
| - `task_id` - the task being implemented | ||
| - `feature` - the feature name | ||
| - `iteration` - current attempt number | ||
| - `max_iterations` - maximum attempts configured | ||
|
|
||
| ## Step 3: Cancel the Loop | ||
|
|
||
| Remove the state file: | ||
|
|
||
| ```bash | ||
| rm .claude/shipspec-task-loop.local.md | ||
| ``` | ||
|
|
||
| ## Step 4: Report | ||
|
|
||
| > "Cancelled task loop for **[TASK_ID]** in feature **[FEATURE]** | ||
| > | ||
| > - Was at iteration: [ITERATION]/[MAX_ITERATIONS] | ||
| > | ||
| > The task remains in `[~]` (in-progress) status in TASKS.md. | ||
| > Run `/implement-task [feature]` to resume, or manually update the task status." |
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.