Orchestrate sprint implementation by managing branches, PRs, and CI while delegating coding to the sprint-implement agent. Use when implementing PRs from a sprint plan. Triggers on commands like "/sprint-orchestration sprint 1" or requests to "implement the sprint" or "work on sprint PRs". Also triggers on "perform the final review for sprint N" or "do the sprint final review" for cross-cutting code review after all PRs are drafted. This skill manages the process but does NOT write code - it delegates to sprint-implement for implementation and code-simplifier for reviews.
Coordinate the implementation of PRs defined in a sprint plan. Delegate all code writing to sprint-implement while handling branch management, Pull Request lifecycle, and CI monitoring.
You do NOT write code. You manage the process.
This is the MOST IMPORTANT RULE. Violation is a CRITICAL FAILURE.
STRICTLY FORBIDDEN:
MANDATORY APPROVAL FLOW:
IF IN DOUBT, DO NOT MERGE. ASK FOR CLARIFICATION.
Load the jujutsu skill before any VCS operation. This project uses Jujutsu (jj) exclusively.
See .claude/skills/jujutsu/ for all VCS workflows including:
jj fix, jj quality, jj secure-push)Load these references when needed:
ls mddocs/frontend/sprints/sprint*.md
If not found: STOP with "Sprint plan not found. Run /frontend-sprint-plan first."
jj version
gh auth status
Extract from sprint plan:
For each PR in scope (in dependency order):
sprint-<N>/<pr-id>/<brief-description>Load the jujutsu skill and follow its workflows for:
jj status and jj logBookmark naming convention: sprint-<N>/<pr-id>/<description>
Prepare context:
Invoke sprint-implement agent using the Task tool:
Task tool with subagent_type="sprint-implement"
Pass full PR details including background reading. WAIT for completion.
Verify implementation: Check jj status, verify changes align with PR goal
After the implementation agent completes, invoke the code-simplifier to review and potentially simplify the changes.
Determine diff scope using jj:
jj diff --stat
Invoke code-simplifier agent using the Task tool:
Task tool with subagent_type="code-simplifier:code-simplifier"
CRITICAL INSTRUCTIONS TO PASS TO CODE-SIMPLIFIER:
## Scope Constraint (MANDATORY)
You MUST only review and modify code that is part of THIS PR's changes.
**Determine the diff scope:**
- Run: `jj diff --stat` to see files in scope
- Run: `jj diff` to see the actual changes
**STRICTLY FORBIDDEN:**
- DO NOT modify any code outside the files listed in the diff
- DO NOT modify any lines within those files that weren't changed by this PR
- DO NOT "improve" code in other areas of the codebase, even if you see obvious improvements
- DO NOT touch code from parent PRs in the stack
**Your scope is ONLY:**
- Code added or modified in this PR (current working copy changes)
- Simplifications that maintain the same functionality
- Clarity improvements within the PR's changed code
## What to Look For
Within the PR scope, look for opportunities to:
- Reduce code complexity without changing behavior
- Improve readability and clarity
- Remove unnecessary abstractions or indirection
- Consolidate duplicate logic introduced in this PR
- Simplify conditional logic
- Use more idiomatic patterns for the language/framework
## Output
If no meaningful simplifications are found, report that the code is already clean.
If simplifications are made, briefly list what was changed and why.
Verify simplifications (if any were made):
jj diff to review the simplifier's changesLoad the jujutsu skill and follow its workflows:
Format code: jj fix (auto-applies ruff, prettier, buf format)
Review changes: jj diff --stat (target ~200 lines max)
Describe the commit (using jujutsu skill's describe-then-new pattern):
jj describe -m "<PR-ID>: <brief description>
<PR goal>
Acceptance Criteria:
- <criteria 1>
- <criteria 2>
"
Create bookmark and push (using jujutsu skill's GitHub sync workflow):
jj bookmark create <bookmark-name> -r @
jj git push --bookmark <bookmark-name>
Create Draft PR:
gh pr create --draft --title "<PR-ID>: <description>" --body "## Goal
<PR goal>
## Sprint Context
Sprint: <N>
Sprint Plan: mddocs/frontend/sprints/sprint<N>.md
## Acceptance Criteria
- [ ] <criteria>
## Background Reading
- <links>
"
Monitor CI (poll, NEVER use gh run watch):
gh run list --branch <bookmark-name> --limit 1 --json databaseId,status
gh run view <run-id> --json status,conclusion
Handle CI Failure:
gh run view <run-id> --log-failed
Re-invoke sprint-implement with error context. Max 3 attempts.
CI Success: gh pr ready
Log PR completion (number, URL, branch). Add to batch for review. Continue to next PR.
After ALL requested PRs are complete:
Present summary:
## Sprint <N> Progress
| PR | Branch | Status | LOC |
|----|--------|--------|-----|
| S1PR1 | sprint-1/pr1/scaffold | Ready | 45 |
All PRs ready for review.
AWAITING YOUR APPROVAL - I will NOT merge until you explicitly approve.
Request explicit approval:
MANDATORY FULL STOP:
MANDATORY: READ references/merge-process.md BEFORE MERGING ANY PR
The merge process contains critical steps that MUST be followed exactly. Skipping steps will cause GitHub to auto-close child PRs or create orphaned branches. DO NOT attempt to merge from memory. READ THE REFERENCE FIRST.
PRE-MERGE VERIFICATION: Did user EXPLICITLY approve? If NO or UNSURE: STOP.
BEFORE YOUR FIRST MERGE: Read references/merge-process.md in its entirety. This is not optional.
Follow the merge process reference for each approved PR (oldest/parent first):
gh pr merge --squash --delete-branch## Sprint <N> Orchestration Complete
### PRs Merged
| PR | Description | LOC |
|----|-------------|-----|
| S1PR1 | Project scaffold | 45 |
### Sprint Progress
- PRs completed: X
- PRs remaining: Y
### Next Steps
- Update TDD checkboxes
- Run `/sprint-orchestration sprint 1` to continue (if PRs remain)
gh run watch (blocks agent)jujutsu skill for all VCS operationsjj fix before pushing to auto-format code