Sequential sprint execution of GitHub issues on separate branches
Invocation: As your first action, call
crane_skill_invoked(skill_name: "sprint"). This is non-blocking — if the call fails, log the warning and continue. Usage data drives/skill-audit.
Takes a set of pre-selected GitHub issue numbers, builds an optimal wave-based execution plan, and implements them sequentially on separate branches. The prior step (human or planning agent) selects which issues go into the sprint. This skill handles execution.
Works in any venture console repo.
sprint <issue numbers> [--dry-run] [--parallel N]
# prefix optional--dry-run: show wave plan only, do not execute--parallel N: ignored in Codex mode (sequential execution), but preserved for argument compatibilityParse the arguments provided by the user:
# prefix from any token--dry-run flag if present--parallel N if present (note: execution is sequential regardless)If no issue numbers remain, display usage and stop:
Usage: sprint <issue numbers> [--dry-run]
Examples:
sprint 42 45 51 # execute issues 42, 45, 51
sprint 42, 45 --dry-run # show plan only
Store: ISSUE_NUMBERS (array), DRY_RUN (bool).
Repo context:
basename "$(pwd)" # e.g., ke-console
git remote get-url origin # e.g., [email protected]:kidexpenses/ke-console.git
VENTURE_CODE: basename of cwd minus -console suffixREPO: extract org/repo from the git remote URLREPO_ROOT: absolute path of the repo root (git rev-parse --show-toplevel)VERIFY_COMMAND: read the repo's CLAUDE.md and extract the verify command (typically npm run verify)If not in a git repo, stop: "Not in a recognized repo. Run sprint from a venture console directory."
Display:
Sprint for {REPO}
Mode: Sequential execution
For each issue number, fetch via:
gh issue view {N} --repo {REPO} --json number,title,body,labels,state
For each issue, extract from labels:
prio:* label (P0/P1/P2/P3)component:* labeltype:* labelstatus:* labelAlso extract from body:
- [ ] lines)Validation:
Issue #{N} not found in {REPO}. Aborting.state: closed, stop: Issue #{N} is closed. Remove it and re-run.status:ready, warn (do not block): Warning: Issue #{N} has status:{current} instead of status:ready.Display issue summary table:
Issues:
| # | Title | Priority | Type | Component | Status | ACs | Body Words |
| --- | -------------------- | -------- | ----- | ------------- | ------ | --- | ---------- |
| 45 | Fix balance calc | P0 | bug | ke-api | ready | 4 | 120 |
Extract explicit dependencies:
Scan each issue body (case-insensitive) for: depends on #N, blocked by #N, after #N, requires #N.
Build a dependency graph. Only track dependencies within the sprint issue set. Warn about external dependencies.
Schedule waves:
available = issues with no unresolved in-sprint deps
waves = []
completed = set()
while unscheduled issues remain:
wave = available issues sorted: P0 first, then P1, P2, P3, then by issue number
waves.append(wave)
completed.update(wave issues)
recompute available
If a cycle is detected, stop: Dependency cycle detected among issues: #{A}, #{B}. Fix issue dependencies and re-run.
Advisory warnings: If two issues in the same wave share a component:* label, warn about potential file conflicts.
Display the wave plan. For sequential execution, all issues in a wave are executed one at a time. Multiple waves indicate dependency ordering.
If DRY_RUN is true: stop here. Display "Dry run complete. Re-run without --dry-run to execute."
Ask the user: "Execute this sprint? ({N} issues will be implemented sequentially)"
Options: "Execute" / "Abort"
If Abort, stop.
For each issue, in wave order (Wave 1 first, then Wave 2, etc.), and within each wave in priority order:
5a. Create branch
Branch naming: {issue-number}-{slugified-title} where slugified-title is the issue title lowercased, spaces replaced with hyphens, non-alphanumeric characters removed, truncated to 50 chars, trailing hyphens stripped.
git checkout main
git pull origin main
git checkout -b {branch-name}
If the branch already exists, ask the user: reuse the existing branch or create with a -2 suffix.
5b. Implement the issue
Execute the following steps for each issue:
Read CLAUDE.md for project conventions and build commands.
Explore the relevant code. Read nearby files to understand patterns.
Implement the change. Make minimal, focused changes. Do not refactor unrelated code.
Run verification:
{VERIFY_COMMAND}
Fix failures and re-run. If you cannot pass after 3 attempts, STOP and report the failure. Do NOT open a PR with failing verification.
Stage specific changed files (not git add -A), commit with a conventional message referencing the issue number.
Push: git push -u origin {branch-name}
Open PR:
gh pr create --repo {REPO} --base main \
--head {branch-name} --title "{type}: {description}" \
--body "## Summary
{1-2 sentence summary}
## Changes
- {change 1}
- {change 2}
## Test Plan
- [ ] {test step 1}
- [ ] {test step 2}
Closes #{NUMBER}
Co-Authored-By: Claude Opus 4.6 <[email protected]>"
5c. Record result
Track for each issue: PR URL (or FAILED with reason), files changed, verify status, decisions made.
5d. Update labels
For each successful PR:
gh issue edit {NUMBER} --repo {REPO} --remove-label "status:ready" --add-label "status:review"
5e. Handle failures
If an issue fails, ask the user: "Issue #{N} failed: {reason}. Retry or skip?"
5f. Return to main
After each issue (success or failure), switch back to main:
git checkout main
Display results:
Sprint Complete: {succeeded}/{total} issues
| # | Title | Status | PR |
| --- | ------------------ | ------- | ----- |
| 45 | Fix balance calc | SUCCESS | #67 |
| 42 | Add expense filter | SUCCESS | #68 |
| 47 | Update docs | FAILED | - |
If there were multiple waves and later waves remain unexecuted:
Remaining waves: {count} (issues: #{A}, #{B})
Next: merge the PRs above, then run: sprint {remaining issue numbers}
Done.