| name | all-sprints-runner |
| description | Execute ALL approved sprints sequentially and fully autonomously. Zero human intervention between sprints. |
| tags | ["autonomous","sprint"] |
All-Sprints Runner
Execute all approved sprints sequentially, from first to last, fully autonomously.
Pre-condition: All sprint plans must be approved before running this skill. This skill removes the human gate between sprints — once started, it runs until every sprint is complete or a fatal error halts execution.
Project Configuration
Read .claude/sdlc.json at the project root. Stop if missing.
All values below reference this config via sdlc.* notation.
CRITICAL EXECUTION RULES
NEVER STOP between sprints. After completing a sprint, IMMEDIATELY start the next one. Do NOT:
- Ask the user if you should continue
- Summarize progress and wait for confirmation
- Say "should I continue?" or "Sprint X is next in the queue"
- Cite context limits as a reason to pause
- Generate a "handoff state" for a new session
The ONLY reasons to stop are listed in Fatal errors below. Everything else = keep going.
After finishing Sprint N's retro, the very next action must be loading Sprint N+1's plan issue.
If you run out of context, use /context-minimizer to compress, or start a sub-agent for the next sprint.
The user said "loop until done" — respect that.
Overview
Each sprint runs the full /sprint-runner lifecycle:
- Load plan → 2. Execute stories → 3. Tech debt cleanup → 4. Retro → 5. Next sprint
Execution
Step 1 — Discover Sprint Queue
gh issue list --repo {sdlc.repo} \
--label "{sdlc.sprint.labels.plan}" --state open \
--json number,title --jq 'sort_by(.title | capture("Sprint (?<n>[0-9]+)").n | tonumber) | .[] | "\(.number) \(.title)"' \
--limit 50
Build the ordered sprint queue from the results.
Step 2 — Pre-flight
git checkout main
git pull origin main
git status --porcelain
Run all verification commands from config (lint, test, build) to verify the codebase is green before starting.
If pre-flight fails: fix the issue before proceeding. The codebase must be clean at the start — zero errors AND zero warnings (if sdlc.lint.zeroWarnings is true).
Step 3 — Sprint Loop
for each SPRINT_PLAN in sprint_queue:
run_sprint(SPRINT_PLAN)
For each sprint, execute the full sprint-runner lifecycle (see /sprint-runner):
3a — Load Sprint Plan
- Read the sprint plan issue body
- Parse the stories table (story ID, issue number, epic, points, execution order)
- Move stories from
{sdlc.sprint.labels.backlog} to {sdlc.sprint.labels.current}
- Post kickoff comment on the sprint plan issue
3b — Execute Each Story
For each story in execution order:
- Pre-flight:
git checkout main && git pull origin main && git status --porcelain
- Check blockers: Skip if
{sdlc.sprint.labels.blocked}, reorder if dependency not done
- Branch:
git checkout -b feature/{STORY_ID}-{short-description}
- Read: Gap analysis, epic doc, cookbook, design system, test infra (all paths from sdlc.json)
- Implement: Follow cookbook patterns
- Test: Write tests meeting
sdlc.test.min thresholds
- Verify: Run all commands from
sdlc.lint.commands, sdlc.test.commands, sdlc.build.commands
- Fix failures: Up to
sdlc.sprint.maxFixAttempts per step, then mark blocked and skip
- Scan for tech debt: Create debt issues for anything found
- Commit:
feat({scope}): {STORY_ID} — {description}
- Push + PR: Create PR with full template
- MANDATORY Copilot review gate (see sprint-runner Step 2g for full details):
- Wait for CI checks (
gh pr checks --watch)
- Wait
sdlc.sprint.reviewWaitSeconds, then check BOTH /pulls/{PR}/reviews AND /pulls/{PR}/comments
- If no Copilot review found, retry up to
sdlc.sprint.maxReviewRounds times
- Read ALL review comments — empty comments ≠ reviewed
- Fix ALL findings before proceeding (up to
sdlc.sprint.maxFixAttempts rounds)
- Log Copilot review outcome in sprint plan comment
- NEVER merge without confirming Copilot has actually reviewed
- Definition of Done — verify ALL before merge:
- Acceptance criteria met
- Lint: zero errors (+ zero warnings if
sdlc.lint.zeroWarnings)
- Build: succeeds
- Tests pass and meet
sdlc.test.min thresholds
- CHANGELOG.md updated
- i18n: all languages from
sdlc.i18n added
- Copilot review: received, read, and findings resolved
- PR description complete
- Merge:
gh pr merge --squash --delete-branch
- Close issue: Comment "Completed in PR #{PR_NUMBER}"
- Update progress: Comment on sprint plan issue
- Return to main:
git checkout main && git pull origin main
3c — Tech Debt Phase
After all stories in the sprint are done or skipped:
- List all open
{sdlc.sprint.labels.techDebt} issues
- Triage: Critical → fix now, High → fix if capacity, Medium/Low → backlog
- Fix critical/high items (branch, fix, test, PR, merge)
- Post debt summary on sprint plan issue
3d — Sprint Retrospective
- Count completed vs planned points → velocity
- Gather per-story metrics (PR size, Copilot rounds, test count)
- Create retro issue with full analysis
- Clean up labels: spillover →
{sdlc.sprint.labels.backlog}, completed stays
- Close the sprint plan issue
3e — Transition to Next Sprint (IMMEDIATE — NO PAUSE)
DO NOT summarize, ask the user, or generate a "handoff". Jump straight to the next sprint.
- Post transition comment on next sprint plan issue
- Immediately begin Step 3a (Load Sprint Plan) for the next sprint
- There is NO human gate here — all plans are pre-approved
gh issue comment {NEXT_SPRINT_PLAN} --repo {sdlc.repo} \
--body "Auto-transitioning from Sprint {N} (velocity: {Y}pts). Beginning Sprint {N+1}."
Then without any pause or user message, start executing the next sprint.
Step 4 — Completion
After the last sprint is done:
gh issue create --repo {sdlc.repo} \
--title "All Sprints Complete — Full Product Build Summary" \
--label "type:refinement" \
--body "$(cat <<'EOF'
## Full Build Complete
All {total_sprints} sprints executed autonomously.
### Overall Metrics
- Total stories: {total_stories}
- Total points: {total_points}
- Stories completed: {completed}
- Stories skipped/blocked: {skipped}
- Tech debt items created: {debt_created}
- Tech debt items resolved: {debt_resolved}
- Average velocity: {avg_velocity} pts/sprint
### Sprint-by-Sprint Summary
| Sprint | Planned | Completed | Velocity | Debt Created | Debt Fixed |
|--------|---------|-----------|----------|--------------|------------|
| 1 | ... | ... | ... | ... | ... |
### Open Items
- Blocked stories requiring human intervention: ...
- Unresolved tech debt: ...
- Follow-up issues created: ...
EOF
)"
Error Recovery
Recoverable errors (auto-handled)
| Error | Recovery |
|---|
| Lint failure | Fix and re-run (up to sdlc.sprint.maxFixAttempts) |
| Test failure | Fix test or implementation, re-run |
| Build failure | Fix build error, re-run |
| Merge conflict | Pull main, rebase branch, resolve, push |
| Copilot requests changes | Apply fixes, push new commit |
| Git dirty working tree | Stash, return to main, pull, unstash if relevant |
| Network timeout on gh commands | Retry up to 3x with 10s delay |
Non-recoverable errors (skip story, continue sprint)
| Error | Action |
|---|
| Max fix attempts failed | Mark story blocked, create investigation issue, skip |
| Max Copilot rounds exceeded | Escalate to human review, skip story |
| External dependency missing | Mark blocked, document blocker, skip |
| Story scope explosion | Implement what fits, create follow-up issue, close original |
Fatal errors (halt execution)
| Error | Action |
|---|
| Main branch is broken (tests failing on main) | Stop all execution, create urgent issue |
| Git repository corrupted | Stop, alert |
| GitHub API consistently failing | Stop after 3 consecutive API failures |
On fatal error:
gh issue comment {CURRENT_SPRINT_PLAN} --repo {sdlc.repo} \
--body ":rotating_light: **FATAL: Sprint execution halted**
Error: {description}
Last completed story: {STORY_ID}
Stories remaining: {count}
Manual intervention required. Resume with \`/all-sprints-runner\` after fixing."
Resumability
If execution is interrupted (crash, timeout, manual stop), running /all-sprints-runner again will:
- Find all open sprint plan issues (sprints not yet closed)
- For the current sprint: check which stories are already closed → skip those
- Continue from the first uncompleted story
- The sprint queue handles itself — completed sprints have closed plan issues
This means the runner is idempotent — safe to restart at any point.
Invocation
/all-sprints-runner # Run all remaining open sprints
No arguments needed. It discovers the queue automatically from open sprint plan issues.