AILANG Sprint Planner
Create comprehensive, data-driven sprint plans by analyzing design documentation, current implementation status, and recent velocity.
Current State
- Branch: !'git branch --show-current'
- Current version: !'cat std/VERSION'
- Active sprints: !'ls .ailang/state/sprints/ 2>/dev/null | head -5 || echo "none"'
- Planned design docs: !'ls design_docs/planned/ 2>/dev/null | head -10'
- Recent velocity (7d): !'git diff --stat $(git log --since="7 days ago" --format=%H | tail -1) HEAD 2>/dev/null | tail -1 || echo "no recent commits"'
- Unread messages: !'ailang messages list --unread --compact 2>/dev/null | head -5 || echo "none"'
Use the data above first. Only re-run these commands manually if the injected context is empty or you need to refresh after making changes.
Quick Start
Most common usage:
# User says: "Plan the next sprint based on v0.4.0 roadmap"
# This skill will:
# 1. Read design doc (design_docs/planned/v0.4-roadmap.md)
# 2. Analyze CHANGELOG for recent velocity
# 3. Review current implementation status
# 4. Propose realistic milestones with LOC estimates
# 5. Create day-by-day task breakdown
When to Use This Skill
Invoke this skill when:
- User says "plan sprint", "create sprint plan", "plan next phase"
- User asks to estimate timeline for a feature or design doc
- User wants to know how long implementation will take
- User needs to prioritize work for upcoming development
Coordinator Integration
When invoked by the AILANG Coordinator (detected by GitHub issue reference in the prompt), you MUST output these markers at the end of your response:
SPRINT_PLAN_PATH: design_docs/planned/vX_Y/sprint-plan-name.md
SPRINT_JSON_PATH: .ailang/state/sprints/sprint_ID.json
Why? The coordinator uses these markers to:
- Read the sprint plan content for GitHub comments
- Track artifacts across pipeline stages
- Provide visibility to humans reviewing the issue
Example completion:
## Sprint Plan Created
I've created the sprint plan with 3 milestones...
**SPRINT_PLAN_PATH**: `design_docs/planned/v0_6_3/m-feature-sprint-plan.md`
**SPRINT_JSON_PATH**: `.ailang/state/sprints/sprint_M-FEATURE.json`
Documentation URLs
When planning sprints that involve adding error messages, help text, or documentation links:
Website: https://ailang.sunholo.com/
Documentation Source: The website documentation lives in this repo at docs/
- Markdown files:
docs/docs/(guides, reference, etc.) - Static assets:
docs/static/ - Docusaurus config:
docs/docusaurus.config.js
Common Documentation Paths:
- Language syntax:
/docs/reference/language-syntax - Module system:
/docs/guides/module_execution - Getting started:
/docs/guides/getting-started - REPL guide:
/docs/guides/getting-started#repl - Implementation status:
/docs/reference/implementation-status - Benchmarking:
/docs/guides/benchmarking - Evaluation:
/docs/guides/evaluation/README
Full URL Example:
https://ailang.sunholo.com/docs/reference/language-syntax
Best Practices:
- When planning features that include documentation links, verify the URLs exist before including them in sprint estimates
- Look in
docs/docs/to verify the file exists locally - Use
ls docs/docs/reference/orls docs/docs/guides/to find available pages
Role in Long-Running Agent Pattern
sprint-planner acts as the "Initializer" agent in the two-phase pattern from Anthropic's long-running agent article:
- Initializer (sprint-planner): Creates infrastructure for execution
- Analyzes design docs and calculates velocity
- Creates markdown sprint plan (human-readable)
- NEW: Creates JSON progress file (machine-readable)
- Sets up session resumption infrastructure
- Sends handoff message to sprint-executor
- Coding Agent (sprint-executor): Works incrementally across sessions
- Reads JSON progress file on each session start
- Updates only
passesfield as milestones complete - Can pause/resume work across multiple sessions
This separation enables multi-session continuity - sprints can span days or weeks with Claude resuming work from where it left off.
Available Scripts
`scripts/analyze_velocity.sh [days]`
Analyze recent development velocity from CHANGELOG and git commits.
Usage:
# Analyze last 7 days (default)
.claude/skills/sprint-planner/scripts/analyze_velocity.sh
# Analyze last 14 days
.claude/skills/sprint-planner/scripts/analyze_velocity.sh 14
Output:
Analyzing velocity for last 7 days...
=== Recent CHANGELOG Entries ===
Total: ~1,200 LOC
Total: ~800 LOC
=== Recent Commits (last 7 days) ===
abc1234 Complete M-DX1.5: Migrate all builtins
def5678 Add Type Builder DSL
=== Files Changed (last 7 days) ===
15 files changed, 1200 insertions(+), 300 deletions(-)
=== Velocity Summary ===
Based on CHANGELOG entries and git history, estimate:
- Average LOC/day from recent milestones
- Typical milestone duration
- Current development pace
`scripts/create_sprint_json.sh <sprint_id> <sprint_plan_md> [design_doc_md]`
NEW: Create structured JSON progress file for multi-session sprint execution.
Usage:
# Create JSON progress file from sprint plan
.claude/skills/sprint-planner/scripts/create_sprint_json.sh \
"M-S1" \
"design_docs/planned/v0_4_0/m-s1-sprint-plan.md" \
"design_docs/planned/v0_4_0/m-s1-parser-improvements.md"
What it does:
- Creates
.ailang/state/sprints/sprint_<id>.jsonwith feature list - Implements "constrained modification" pattern (only
passesfield changes) - Enables session resumption via structured state
- Provides template for milestone details (to be filled in)
Output:
- JSON progress file at
.ailang/state/sprints/sprint_<id>.json - Validation check
- Next steps instructions (edit JSON, send handoff message)
File Organization:
Sprint JSON files are stored in .ailang/state/sprints/ to keep the state directory organized.
Integration with sprint-executor:
After creating the JSON file, sprint-executor can:
- Resume work across multiple Claude Code sessions
- Track progress programmatically
- Update velocity metrics automatically
Sprint Planning Workflow
CRITICAL: Always end by handing off to sprint-executor after user approval!
0. Check the Registry (Mandatory Reuse Gate)
Search the registry before planning any package-like capability, and record a depend / contribute / none decision per milestone in registry_reuse; placeholders block handoff. Procedure: resources/registry_reuse_gate.md.
1. Read and Analyze Design Document
Input: Path to design doc (e.g., design_docs/planned/v0.4-roadmap.md)
What to extract:
- Completed milestones (marked ✅)
- Remaining milestones (marked ❌, ⏳, 📋)
- Target metrics (LOC estimates, timeline, acceptance criteria)
- Dependencies between milestones
2. Review Current Implementation Status
Check these sources:
CHANGELOG.md- Recent features and LOC countsgit log --oneline --since="1 week ago"- Actual commitsmake test-coverage-badge- Current test coverage- Design doc vs reality - gaps or partial implementations
3. Analyze Recent Velocity
Use the velocity script:
.claude/skills/sprint-planner/scripts/analyze_velocity.sh
Calculate:
- LOC per day from recent milestones
- Average milestone duration
- Actual completion rate vs estimates
4. Identify Remaining Work
List incomplete milestones with:
- Dependencies (what blocks what)
- Estimated effort (from design doc)
- Priority (based on dependencies, critical path)
- Current velocity (can we realistically do this?)
5. Propose Sprint Plan
Use the template: