| name | Sprint Executor |
| description | Execute approved sprint plans with test-driven development, continuous linting, progress tracking, and pause points. Supports parallel milestone execution via Task sub-agents. Use when user says "execute sprint", "start sprint", or wants to implement an approved sprint plan. |
Sprint Executor
Execute an approved sprint plan with continuous progress tracking, testing, and documentation updates. Supports parallel execution of independent milestones using Task sub-agents for faster sprints.
Configuration
| Environment Variable | Default | Description |
|---|
SPRINT_STATE_DIR | .sprint-state | Directory for sprint JSON progress files |
DESIGN_DOCS_DIR | design_docs | Root directory for design documents |
BUILD_CMD | make build | Command to build the project |
TEST_CMD | make test | Command to run tests |
LINT_CMD | make lint | Command to run linting |
FMT_CMD | make fmt | Command to auto-format code |
CHANGELOG_PATH | CHANGELOG.md | Path to changelog file |
Quick Start
Sequential execution (default):
Parallel execution (for independent milestones):
When to Use This Skill
Invoke this skill when:
- User says "execute sprint", "start sprint", "begin implementation"
- User has an approved sprint plan ready to implement
- User wants guided execution with built-in quality checks
- User needs progress tracking and pause points
Choose parallel mode when:
- Sprint has 3+ milestones with independent work
- Milestones touch different files/packages (low merge conflict risk)
Choose sequential mode when:
- Milestones have strict dependencies (M2 depends on M1's output)
- All milestones touch the same files
- Sprint is small (1-2 milestones)
Core Principles
- Test-Driven: All code must pass tests before moving to next milestone
- Lint-Clean: All code must pass linting before moving to next milestone
- Document as You Go: Update CHANGELOG and sprint plan progressively
- Pause for Breath: Stop at natural breakpoints for review and approval
- Track Everything: Use TodoWrite to maintain visible progress
- Parallelize When Possible: Independent milestones run as concurrent Task sub-agents for speed
- Failing Tests First: Sub-agents MUST write failing tests before implementation
Multi-Session Continuity
Sprint execution can span multiple sessions!
Based on Anthropic's long-running agent patterns, sprint-executor implements the "Coding Agent" pattern:
-
Session Startup Routine: Every session starts with session_start.sh
- Checks working directory
- Reads JSON progress file (
${SPRINT_STATE_DIR:-.sprint-state}/sprint_<id>.json)
- Reviews recent git commits
- Validates tests pass
- Prints "Here's where we left off" summary
-
Structured Progress Tracking: JSON file tracks state
- Features with
passes: true/false/null (follows "constrained modification" pattern)
- Velocity metrics updated automatically
- Clear checkpoint messages
- Session timestamps
-
Pause and Resume: Work can be interrupted at any time
- Status saved to JSON:
not_started, in_progress, paused, completed
- Next session picks up exactly where you left off
For JSON schema details, see resources/json_progress_schema.md
Available Scripts
scripts/session_start.sh <sprint_id>
Resume sprint execution across multiple sessions.
When to use: ALWAYS at the start of EVERY session continuing a sprint.
What it does:
- Loads sprint JSON progress file
- Shows linked GitHub issues
- Displays feature progress summary
- Shows velocity metrics
- Runs tests to verify clean state
- Prints "Here's where we left off" summary
scripts/validate_prerequisites.sh
Validate prerequisites before starting sprint execution.
What it checks:
- Working directory status (clean/uncommitted changes)
- Current branch
- Test suite passes
- Linting passes
scripts/validate_sprint_json.sh <sprint_id>
REQUIRED before starting any sprint. Validates that sprint JSON has real milestones (not placeholders).
scripts/milestone_checkpoint.sh <milestone_name> [sprint_id]
Run checkpoint after completing a milestone.
CRITICAL: Tests passing does not mean the feature is working! This script verifies with REAL DATA.
What it does:
- Runs
${TEST_CMD} and ${LINT_CMD}
- Shows git diff of changed files
- Checks file sizes
- Shows JSON update reminder with current milestone statuses
scripts/finalize_sprint.sh <sprint_id> [version]
Finalize a completed sprint by moving design docs and updating status.
Execution Flow
Phase 0: Session Resumption (for continuing sprints)
If this is NOT the first session for this sprint:
scripts/session_start.sh <sprint-id>
This prints "Here's where we left off" summary. Then skip to Phase 2 to continue with the next milestone.
Phase 1: Initialize Sprint (first session only)
- Validate Sprint JSON - Run
validate_sprint_json.sh <sprint-id> REQUIRED FIRST
- Read Sprint Plan - Parse markdown + load JSON progress file
- Validate Prerequisites - Run
validate_prerequisites.sh (tests, linting, git status)
- Create Todo List - Use TodoWrite to track all milestones
- Initial Status Update - Mark sprint as "In Progress"
Phase 2: Choose Execution Mode
After Phase 1 initialization, choose between sequential or parallel execution based on milestone dependencies.
Phase 2A: Sequential Execution (default)
For each milestone:
- Pre-Implementation - Mark milestone as
in_progress in TodoWrite
- Implement - Write code
- Write Tests - TDD recommended for complex logic, comprehensive coverage required
- Verify Quality - Run
milestone_checkpoint.sh <milestone-name> (tests + lint must pass)
- Update Documentation:
- Changelog (what, LOC, key decisions)
- Sprint plan markdown (mark milestone as done)
- Update Sprint JSON - CRITICAL - The checkpoint script reminds you!
- Update
passes: true/false
- Set
completed: "<ISO timestamp>"
- Add
notes: "<summary of what was done>"
- Pause for Breath - Show progress, ask user if ready to continue
After all milestones complete, proceed to Phase 4: Finalize Sprint.
Phase 2B: Parallel Milestone Execution
Use this mode when independent milestones can be developed concurrently using Task sub-agents.
Step 1: Dependency Analysis
Read the sprint plan and build a dependency graph from the milestones. Group milestones into parallelizable waves.
Step 2: Spawn Task Sub-Agents Per Milestone
For each parallelizable wave, spawn one Task sub-agent per milestone in a single message. Each sub-agent:
- Works on its own branch (
sprint/<milestone-slug>)
- Writes failing tests FIRST
- Implements until tests pass
- Commits with milestone reference
Step 3: Collect Sub-Agent Results
Parse MILESTONE_REPORT blocks from each sub-agent. Handle failures before proceeding.
Step 4: Repeat for Each Wave
Execute waves sequentially (Wave 1 -> integrate -> Wave 2 -> integrate -> ...).
Phase 3: Integration Agent
After parallel milestones complete, merge all milestone branches and verify the combined result.
Phase 4: Finalize Sprint
- Final Testing - Run
${TEST_CMD}, ${LINT_CMD}
- Documentation Review - Verify CHANGELOG, sprint plan complete
- Final Commit - Git commit with sprint summary
- Move Design Docs - Run
finalize_sprint.sh <sprint-id> [version]
- Summary Report - Compare planned vs actual (LOC, time, velocity)
Key Features
Continuous Testing
- Run
${TEST_CMD} after every file change
- Never proceed if tests fail
- Track test count increase
Progress Tracking
- TodoWrite shows real-time progress
- Sprint plan updated at each milestone
- CHANGELOG grows incrementally
- JSON file tracks structured state
- Git commits create audit trail
GitHub Issue Integration
If github_issues is set in sprint JSON:
- Milestone checkpoint reminds you to include
Refs #... in commits
- Finalize script suggests commit message with issue references
Commit message format:
git commit -m "Complete M1: Feature description, refs #17"
git commit -m "Finalize sprint M-BUG-FIX
Fixes #17
Fixes #42"
Pause Points
- After each milestone completion
- When tests or linting fail
- When user requests "pause"
- When encountering unexpected issues
Error Handling
- If tests fail: Show output, ask how to fix, don't proceed
- If linting fails: Show output, ask how to fix, don't proceed
- If implementation unclear: Ask for clarification, don't guess
- If milestone takes much longer than estimated: Pause and reassess
Resources
Multi-Session State
Prerequisites
- Working directory clean (or only sprint-related changes)
- Current branch
dev or main (or specified in sprint plan)
- All existing tests pass
- All existing linting passes
- Sprint plan approved and documented
- JSON progress file created AND POPULATED by sprint-planner (not just template!)
- JSON must pass validation:
scripts/validate_sprint_json.sh <sprint-id>
Failure Recovery
If Tests Fail During Sprint
- Show test failure output
- Ask user: "Tests failing. Options: (a) fix now, (b) revert change, (c) pause sprint"
- Don't proceed until tests pass
If Velocity Much Lower Than Expected
- Pause and reassess after 2-3 milestones
- Calculate actual velocity
- Propose: (a) continue as-is, (b) reduce scope, (c) extend timeline
- Update sprint plan with revised estimates
If Sub-Agent Fails (Parallel Mode)
- Parse the MILESTONE_REPORT from the failed sub-agent
- Show failure notes and any test output to the user
- Options: (a) retry, (b) fix manually, (c) skip
- Do NOT merge a failed milestone's branch
Notes
- This skill is long-running - expect it to take hours or days
- Pause points are built in - you're not locked into finishing
- Sprint plan is the source of truth - but reality may require adjustments
- Git commits create a reversible audit trail
- Test-driven development is non-negotiable - tests must pass
- Multi-session continuity - Sprint can span multiple sessions
- Parallel execution - Independent milestones run as concurrent Task sub-agents