plugin-sprint/skills/cycle/SKILL.md
Execute a single sprint through all phases (0-7)
npx skillsauth add themagictower/grimoires cycleInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Execute a single sprint cycle through 8 Phases (0-7). All project-specific settings come from sprint.config.yaml.
!cat sprint.config.yaml 2>/dev/null || echo "NO_CONFIG"
!cat $(grep 'memory_file:' sprint.config.yaml 2>/dev/null | awk '{print $2}') 2>/dev/null | head -40
!git branch --list 2>/dev/null | head -20
!git worktree list 2>/dev/null
!gh pr list --state open --limit 20 2>/dev/null
$ARGUMENTS — Sprint number or Phase resume point (e.g. 5, 5 phase3)
{sprint} phase{N}: Resume from that PhaseNotation below refers to sprint.config.yaml field paths.
| Shorthand | Config Path | Example |
|-----------|-------------|---------|
| CFG.repo_root | project.repo_root | /opt/.../repo |
| CFG.worktree_base | project.worktree_base | /opt/.../worktrees |
| CFG.main_branch | project.main_branch | main |
| CFG.memory_file | project.memory_file | .claude/.../MEMORY.md |
| CFG.sprint_plan | docs.sprint_plan | docs/SPRINT-PLAN.md |
| CFG.squads[] | squads array | [{name, prefix, scope, ...}] |
| CFG.merge.strategy | merge.strategy | squash |
| CFG.review_bots[] | ci.review_bots array | [{name, check_pattern, ...}] |
| CFG.checklist | review.checklist | [completion_criteria, ...] |
| CFG.custom_checks | review.custom_checks | [legal_compliance] |
| CFG.squad_model | agents.squad_model | sonnet |
| CFG.max_squad_agents | agents.max_squad_agents | 4 |
| Phase | Name | Gate | Description | |-------|------|------|-------------| | 0 | Pre-check | User approval | Memory, pending PRs, worktree check | | 1 | Planning | User approval | Issue parsing, squad assignment, merge order | | 2 | Infrastructure setup | Auto | Worktrees, team, tasks, agent spawn | | 3 | Execution monitoring | Auto | Agent monitoring, blocker resolution, shutdown on completion | | 4 | CI review | User approval | CI fixes, Draft→Ready, review bot wait | | 5 | Code review | User approval | AI PM direct review, fix loop | | 6 | Merge | User approval (per PR) | Sequential merge + rebase + review bot re-check | | 7 | Cleanup | Auto | Issue close, memory, team disband, worktree delete |
Gate: User approval
CFG.memory_file for current state, unmerged PRs, leftover worktreesgit worktree list
git worktree remove {CFG.worktree_base}/{name} 2>/dev/null
| Item | Status | Note |
|------|--------|------|
| Previous sprint complete | ? | Memory check |
| Unmerged PRs | ? | gh pr list |
| Leftover worktrees | ? | git worktree list |
| main CI | ? | Latest commit CI |
| Sprint Plan | ? | CFG.sprint_plan section |
Gate: User approval
CFG.sprint_planCFG.squads[] scope matching. Identify idle squads{squad.prefix}/{feature} format| Squad | Branch | Issues | Worktree | Merge Order | |-------|--------|--------|----------|-------------| | {name} | {prefix}/{feat} | {IDs} | {CFG.worktree_base}/{prefix} | {N} |
Auto proceed
cd {CFG.repo_root}
git worktree add {CFG.worktree_base}/{prefix} -b {prefix}/{feature}
Team creation: TeamCreate(team_name: "sprint-{N}")
Task creation (TaskCreate per squad):
subject: [{SQUAD}] {ISSUE-ID}: {title}
description: |
Working directory: {CFG.worktree_base}/{prefix}
Branch: {prefix}/{feature}
## Deliverables / Completion Criteria / Edge Cases (from sprint plan)
## Scope restriction: {squad.scope}
CFG.squad_model):Agent prompt essentials:
{CFG.worktree_base}/{prefix} — work here only{prefix}/{feature} — never commit to main directly{squad.scope} directories only{squad.conventions} (formatter, linter)feat({prefix}): {issue-ids} {desc}gh pr create --draft)Auto proceed
Agent cleanup (Phase 3 completion):
When all squad agents have created PRs, immediately shutdown_request.
CFG.max_squad_agents + PM = CFG.max_total_agentsGate: User approval (Phase 4→5)
Detailed procedure: references/ci-review-procedure.md
gh pr ready {number}references/seer-bot-procedure.md
CFG.review_bots[] botGate: User approval (Phase 5→6)
AI PM reviews directly — no separate review agent spawn
Review checklist (CFG.checklist + CFG.custom_checks):
| Check Item | Description |
|------------|-------------|
| completion_criteria | Sprint plan completion criteria comparison |
| coding_conventions | squad.conventions compliance |
| scope_boundary | squad.scope directory boundary check |
| edge_cases | Sprint plan edge case handling |
| (custom) | Each CFG.custom_checks item (project-specific) |
Bug classification: Valid Bug / False Positive / Enhancement
Fix loop (same as seer-bot-procedure.md re-review loop):
Results summary table:
| PR | Self Review | Review Bot | Valid Bug | False Positive | Final | |----|------------|------------|-----------|----------------|-------| | #{n} | {result} | {conclusion} | {N} | {N} | Pass/Fail |
Gate: User approval (per PR individually)
Merge sequentially in the dependency order from Phase 1.
+- PR-A (no dependencies) → squash merge
+- main CI check
+- PR-B worktree rebase:
| git fetch origin {CFG.main_branch}
| git rebase origin/{CFG.main_branch}
| git push --force-with-lease
+- PR-B CI + review bot re-review wait
+- PR-B squash merge
+- Repeat...
Key: After dependent PR merge, subsequent PRs must rebase → wait for review bot to re-check new code.
Per PR:
gh pr merge {number} --{CFG.merge.strategy} --delete-branch
If main CI fails after merge: fix immediately on hotfix/{sprint}-ci-fix branch.
Auto proceed
gh issue close {number} --comment "Completed in Sprint {N}. Related PR: #{pr}"
Memory update (CFG.memory_file):
Team disband: shutdown_request → TeamDelete
Worktree delete:
git worktree remove {CFG.worktree_base}/{prefix}
| Item | Result | |------|--------| | Completed issues | {N}/{Total} | | Merged PRs | #{...} | | Bugs found | {N} | | Lessons | {bullets} | | Next | Sprint {N+1} |
Not all sprints use every squad. Squads marked "no assignment" in the Sprint Plan are excluded from worktrees, agents, tasks, and merge order.
| File | Purpose |
|------|---------|
| sprint.config.yaml | Project config (squads, conventions, review bots, etc.) |
| {CFG.sprint_plan} | Issue list, completion criteria, edge cases |
| {CFG.memory_file} | Cross-session state persistence |
| references/ci-review-procedure.md | CI review procedure (Phase 4) |
| references/seer-bot-procedure.md | Review bot monitoring loop (Phase 4-6) |
testing
Analyze and improve test coverage
development
TDD workflow with RED-GREEN-REFACTOR cycle
tools
Initialize Grimoires for a project with auto-detection
development
Code review with design principles validation