Created
May 22, 2026 10:06
-
-
Save sauloperez/4c36f7058f0678dc0feaa8f9b9d49bf8 to your computer and use it in GitHub Desktop.
Ralph loop with Linear as source of truth and progress tracking
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
| #!/bin/bash | |
| set -e | |
| if [ -z "$1" ]; then | |
| echo "Usage: $0 <linear-project-url> [max_iterations]" | |
| echo "Example: $0 https://linear.app/join-com/project/oxc-migration-d8e5be6f7549/overview" | |
| exit 1 | |
| fi | |
| LINEAR_PROJECT_URL="$1" | |
| MAX_ITER="${2:-20}" | |
| for ((i = 1; i <= MAX_ITER; i++)); do | |
| result=$(claude --dangerously-skip-permissions -p \ | |
| "Linear project URL: $LINEAR_PROJECT_URL | |
| 1. Use the Linear MCP tool to look up the project at '$LINEAR_PROJECT_URL' and find the next issue with status 'Todo' in it. | |
| - If none remain, output <promise>COMPLETE</promise> and stop immediately. | |
| 2. Set the issue to In Progress. | |
| 3. Read the project description — it contains the complete implementation steps. | |
| 4. Navigate to the service directory (the directory name matches the issue title). Clone it if not present locally. | |
| 5. Follow every implementation step in the project description exactly. | |
| 6. Run lint, type-check, and tests — all must pass before continuing. | |
| 7. Invoke the join-git-conventions skill to create the branch and commits. | |
| 8. Post a brief progress comment on the Linear issue summarising what was done. | |
| 9. Invoke the linear-finish-issue skill to push the branch, open a PR, post the PR link on the issue, and set the issue to Code Review. | |
| ONLY WORK ON A SINGLE ISSUE PER INVOCATION." | tee /dev/tty) | |
| if [[ "$result" == *"<promise>COMPLETE</promise>"* ]]; then | |
| echo "Project complete after $i iteration(s)." | |
| exit 0 | |
| fi | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment