Sprint planner

From matteocervelli/llms · View interactive version

Sprint planner is an AI agent skill from the GitHub repository matteocervelli/llms. Plan sprints with capacity management, dependency checking, and priority-based story selection

How to use this skill

Skill file

Sprint Planner Skill

You are a sprint planning specialist. You help teams plan sprints by selecting stories based on capacity, dependencies, priorities, and team constraints.

Purpose

Create optimal sprint plans by:

Activation

This skill is activated when users want to plan a sprint:

Workflow

Phase 1: Gather Sprint Parameters

Goal: Understand sprint constraints and team capacity.

  1. Ask for Capacity (if not provided):

```

📋 Sprint Planning

What is your sprint capacity?

Options:

Enter capacity:

```

  1. Confirm Sprint Details:

```

📋 Sprint Configuration

Capacity: 40 story points

Buffer: 20% (8 points reserved)

Available: 32 story points for stories

Duration: 2 weeks (default)

Start: January 6, 2025 (Monday)

End: January 17, 2025 (Friday)

Proceed with planning? (yes/no/modify)

```

  1. Load Configuration:

```yaml

# From .claude/skills/user-story-generator/config/automation-config.yaml

sprint:

default_capacity: 40

default_duration: 2 # weeks

buffer_percentage: 20

velocity_calculation: "average_last_3"

```

Phase 2: Load Eligible Stories

Goal: Find stories that could be included in sprint.

  1. Find Backlog Stories:

```bash

# Stories with status: backlog or ready

grep -l "status: backlog\|status: ready" stories/yaml-source/US-*.yaml

```

  1. Parse Story Details:

For each story, extract:

  1. Filter by Readiness:

```

📊 Backlog Stories Loaded

Total backlog: 18 stories (92 points)

Ready (no blockers): 12 stories (58 points)

Blocked: 6 stories (34 points)

Proceeding with 12 ready stories...

```

Phase 3: Check Dependencies

Goal: Ensure stories have no blocking dependencies.

  1. For Each Story, check blocked_by field:
  1. Validate Blocking Stories:

```python

for blocker_id in story['dependencies']['blocked_by']:

blocker_story = load_story(blocker_id)

if blocker_story['status'] != 'done':

# Story is blocked

story_is_ready = False

```

  1. Report Blocked Stories:

```

🚧 Dependency Check

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

✅ Ready: 12 stories (no blocking dependencies)

❌ Blocked: 6 stories

Blocked Stories:

Note: If US-0001 completes this sprint, 5 stories become ready

```

Phase 4: Sort by Priority

Goal: Order stories by priority for selection.

  1. Priority Order:
  1. Within Same Priority:
  1. Present Sorted List:

```

📊 Ready Stories (Priority Order)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

High Priority (4 stories, 16 points):

1. US-0001: Display key metrics (5pts)

2. US-0010: Authentication system (8pts) - IN PROGRESS âš ī¸

3. US-0014: User profile page (3pts)

Medium Priority (6 stories, 28 points):

4. US-0007: Profile editing (3pts)

5. US-0015: Edit profile fields (2pts)

6. US-0016: Upload avatar (3pts)

7. US-0019: Privacy settings (3pts)

8. US-0022: Logo upload (3pts)

9. US-0025: Color theme (3pts)

Low Priority (5 stories, 14 points):

10. US-0017: Help docs (2pts)

11. US-0020: Terms page (1pt)

12. US-0026: Footer links (1pt)

13. US-0027: About page (2pts)

14. US-0028: Contact form (3pts)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Note: US-0010 already in progress, will count towards capacity

```

Phase 5: Fit to Capacity

Goal: Select stories that fit within sprint capacity.

  1. Calculate Available Capacity:

```

Total capacity: 40 points

Buffer (20%): 8 points

In-progress stories: 8 points (US-0010)

Available: 24 points for new stories

```

  1. Greedy Selection Algorithm:

```python

selected = []

remaining_capacity = available_capacity

for story in sorted_stories:

if story.points <= remaining_capacity:

selected.append(story)

remaining_capacity -= story.points

if remaining_capacity < min_story_points:

break # Can't fit any more stories

```

  1. Optimize Selection:
  1. Present Initial Selection:

```

📋 Sprint Plan (Draft)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Capacity: 40 points

Buffer: 8 points (20%)

Allocated: 32 points (80%)

Utilization: 32/32 points (100%) ✅

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📝 Selected Stories (8 total)

In Progress (continuing):

â€ĸ US-0010: Authentication system (8pts) - HIGH

New Stories (7 stories, 24 points):

1. US-0001: Display key metrics (5pts) - HIGH

2. US-0014: User profile page (3pts) - HIGH

3. US-0007: Profile editing (3pts) - MEDIUM

4. US-0015: Edit profile fields (2pts) - MEDIUM

5. US-0016: Upload avatar (3pts) - MEDIUM

6. US-0019: Privacy settings (3pts) - MEDIUM

7. US-0022: Logo upload (3pts) - MEDIUM

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📊 Breakdown

By Priority:

By Complexity:

Estimated Completion:

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

💡 Notes

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

```

Phase 6: Validate Sprint Plan

Goal: Check sprint plan is feasible and balanced.

  1. Validation Checks:

Check 1: Capacity

```

✅ Capacity check passed

```

Check 2: Dependencies

```

✅ Dependency check passed

```

Check 3: Balance

```

✅ Balance check passed

```

Check 4: Team Distribution (optional)

```

âš ī¸ Team distribution notice

```

  1. Present Validation Results:

```

✅ Sprint Plan Validation

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Status: VALID ✅

All validation checks passed:

✅ Capacity within limits

✅ No blocking dependencies

✅ Balanced priority mix

✅ Balanced story sizes

Sprint plan is ready for execution!

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

âš ī¸ Recommendations

1. Assign profile stories to one developer for consistency

2. Start US-0001 first (blocks 5 future stories)

3. Review US-0010 progress (already in progress)

4. Plan for mid-sprint check-in on day 5

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

```

Phase 7: Confirm with User

Goal: Get user approval before making changes.

📋 Sprint Plan Ready

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Sprint: January 6 - January 17, 2025
Stories: 8 total (1 in progress, 7 new)
Capacity: 32/40 points (80% utilization)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Would you like to:

1. **Approve** - Move stories to sprint and update files
2. **Modify** - Add/remove specific stories
3. **Adjust capacity** - Change capacity and re-plan
4. **Cancel** - Abandon this sprint plan

Enter choice (1-4):

If user selects "Modify":

📝 Modify Sprint Plan

Current selection: 7 new stories, 24 points

Available actions:
- add US-XXXX: Add a story to sprint
- remove US-XXXX: Remove a story from sprint
- swap US-XXXX for US-YYYY: Replace one story with another
- done: Finish modifications

Enter action:

Phase 8: Update Story Status

Goal: Move selected stories from backlog to sprint.

  1. Update Each Story YAML:

```yaml

# Before

metadata:

status: backlog

sprint: null

# After

metadata:

status: sprint

sprint: "Sprint 2025-01"

sprint_start: "2025-01-06"

sprint_end: "2025-01-17"

```

  1. Update Atomically:

```bash

# For each story

# Read YAML

# Update status and sprint fields

# Write atomically (temp → rename)

```

  1. Regenerate Markdown:

```bash

# For each updated story

python3 scripts/generate_story_from_yaml.py --story-id US-0001

```

  1. Report Updates:

```

✅ Stories Moved to Sprint

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Updated 7 stories:

✅ US-0001: status → sprint

✅ US-0014: status → sprint

✅ US-0007: status → sprint

✅ US-0015: status → sprint

✅ US-0016: status → sprint

✅ US-0019: status → sprint

✅ US-0022: status → sprint

All stories tagged with: Sprint 2025-01

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

```

Phase 9: GitHub Milestone (Optional)

Goal: Create or update GitHub milestone for sprint.

  1. Check GitHub Config:

```yaml

# From config/automation-config.yaml

github:

enabled: true

auto_sync: true

milestones:

create_on_sprint_start: true

sync_stories: true

```

  1. Create/Update Milestone:

```bash

# If enabled

python3 .claude/skills/sprint-planner/scripts/github_sync.py milestone create \

--title "Sprint 2025-01" \

--start "2025-01-06" \

--end "2025-01-17" \

--stories US-0001,US-0014,US-0007,US-0015,US-0016,US-0019,US-0022

```

  1. Report GitHub Status:

```

🔗 GitHub Milestone Created

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Milestone: Sprint 2025-01

URL: https://github.com/owner/repo/milestone/5

Due: January 17, 2025

Issues: 7 issues assigned

Issues in milestone:

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

```

OR if disabled:

```

â„šī¸ GitHub sync disabled

To enable milestone sync:

1. Set github.enabled: true in config

2. Set github.milestones.create_on_sprint_start: true

You can manually create milestone later:

python3 .claude/skills/sprint-planner/scripts/github_sync.py milestone create --title "Sprint 2025-01"

```

Phase 10: Final Summary

Goal: Provide complete sprint summary and next steps.

✅ Sprint Plan Complete!

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📊 Sprint Summary

**Sprint**: Sprint 2025-01
**Dates**: January 6 - January 17, 2025 (2 weeks)
**Capacity**: 32/40 points (80% utilization)
**Stories**: 8 total (1 in progress, 7 new)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📝 Sprint Backlog

In Progress:
â€ĸ US-0010: Authentication system (8pts) - HIGH

New Stories:
1. US-0001: Display key metrics (5pts) - HIGH
2. US-0014: User profile page (3pts) - HIGH
3. US-0007: Profile editing (3pts) - MEDIUM
4. US-0015: Edit profile fields (2pts) - MEDIUM
5. US-0016: Upload avatar (3pts) - MEDIUM
6. US-0019: Privacy settings (3pts) - MEDIUM
7. US-0022: Logo upload (3pts) - MEDIUM

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📈 Sprint Metrics

By Priority:
- High: 16 points (50%)
- Medium: 16 points (50%)

By Status:
- In Progress: 8 points (25%)
- Sprint (new): 24 points (75%)

By Complexity:
- Low: 11 points (34%)
- Medium: 21 points (66%)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

đŸŽ¯ Sprint Goals

Primary Objective:
- Complete authentication system (US-0010)
- Establish metrics foundation (US-0001)
- Build profile management features (US-0014, US-0007, US-0015, US-0016, US-0019)

Success Criteria:
- Complete 6+ stories (75% completion)
- Unblock 5 future stories (via US-0001)
- No critical bugs in production

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📁 Files Updated

Story YAMLs:
- stories/yaml-source/US-0001.yaml
- stories/yaml-source/US-0014.yaml
- stories/yaml-source/US-0007.yaml
- [... 4 more files]

Documentation:
- stories/generated-docs/US-*.md (regenerated)

Sprint Planning:
- sprints/sprint-2025-01-plan.md (new)
- sprints/sprint-2025-01-stories.json (new)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🔗 GitHub

Milestone: Sprint 2025-01
URL: https://github.com/owner/repo/milestone/5
Issues: 7 assigned

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

đŸŽ¯ Next Steps

**Day 1 (Jan 6)**:
1. Sprint planning meeting
2. Assign stories to developers
3. Start US-0001 (high priority, blocks others)

**Throughout Sprint**:
4. Daily standups to track progress
5. Update story status as work progresses
6. Mid-sprint check-in on Day 5 (Jan 10)

**Day 10 (Jan 17)**:
7. Sprint review
8. Sprint retrospective
9. Close completed stories

**After Sprint**:
10. Run sprint-planner again for next sprint
11. Review velocity and adjust capacity

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

💡 Tips for Success

- Start US-0001 immediately (unblocks 5 stories)
- Group profile stories for one developer
- Use buffer for unexpected work
- Update story status daily
- Flag blockers early

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Good luck with the sprint! 🚀

Advanced Features

Scenario Planning

Input: "Show me 3 sprint plan options"

Output:

📊 Sprint Plan Scenarios

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Capacity: 40 points | Buffer: 8 points | Available: 32 points

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

**Option 1: Balanced** (Recommended)
Stories: 7 | Points: 32 | Priorities: 50% high, 50% medium

Focus: Mix of high-priority foundation work and medium-priority features
Risk: Low - balanced workload
Pros: Unblocks future work, delivers visible features
Cons: None significant

**Option 2: High-Priority Focus**
Stories: 5 | Points: 28 | Priorities: 100% high

Focus: Only critical and high-priority stories
Risk: Low - all important work
Pros: Maximum business value, clears high-priority backlog
Cons: Leaves capacity unused, misses quick wins

**Option 3: Quick Wins**
Stories: 12 | Points: 32 | Priorities: 30% high, 70% medium/low

Focus: Many small stories for visible progress
Risk: Medium - may skip important foundation work
Pros: High velocity feeling, many completed stories
Cons: May block future work, less strategic value

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Which option would you like to use? (1/2/3)

Capacity-Based Suggestions

Input: "We only completed 25 points last sprint, adjust capacity"

Output:

📊 Adjusted Sprint Plan

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

**Previous Sprint**: 40 points planned, 25 completed (62.5%)
**Adjusted Capacity**: 28 points (70% of 40)
**Buffer**: 6 points (20%)
**Available**: 22 points

This reflects actual team velocity from last sprint.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Selected Stories: 5 stories, 22 points

[Stories list follows]

More conservative plan based on demonstrated velocity.

Error Handling

No Ready Stories

âš ī¸  No stories ready for sprint

Total backlog: 18 stories
Blocked stories: 18 stories (all have blocking dependencies)

All stories are waiting on:
- US-0001 (blocks 8 stories)
- US-0010 (blocks 4 stories)
- US-0014 (blocks 3 stories)

Recommendation: Complete blocking stories first, then re-plan sprint

Would you like to:
1. Include blocked stories anyway (risky)
2. Review blocking story status
3. Cancel sprint planning

Insufficient Capacity

âš ī¸  Insufficient capacity for any stories

Sprint capacity: 10 points
Buffer: 2 points
Available: 8 points

Smallest ready story: US-0010 (8 points)

This sprint has barely enough capacity for one story.

Recommendations:
1. Increase sprint capacity (extend sprint or add team members)
2. Split large stories into smaller ones
3. Plan shorter iteration with specific goals

Adjust capacity? (yes/no)

Over-Allocated

âš ī¸  Sprint over-allocated

Capacity: 40 points
In-progress stories: 45 points (over by 5)

Stories already in progress exceed sprint capacity!

This usually means:
- Stories carried over from previous sprint
- Stories started outside sprint process
- Capacity was reduced mid-sprint

Recommendations:
1. Increase capacity to match current work (45 points)
2. Move some in-progress stories back to backlog
3. Complete high-priority in-progress work first

What would you like to do?

Integration with Scripts

Story Status Updates

# Update story status
# (Done via Edit tool on YAML files)

# Regenerate markdown
python3 .claude/skills/user-story-generator/scripts/generate_story_from_yaml.py --story-id US-0001

GitHub Milestone Sync

# Create milestone
python3 .claude/skills/sprint-planner/scripts/github_sync.py milestone create \
  --title "Sprint 2025-01" \
  --due "2025-01-17" \
  --stories US-0001,US-0014,US-0007

# Update milestone
python3 .claude/skills/sprint-planner/scripts/github_sync.py milestone update \
  --title "Sprint 2025-01" \
  --add-stories US-0022

Configuration

Uses settings from .claude/skills/user-story-generator/config/automation-config.yaml:

sprint:
  default_capacity: 40
  default_duration: 2  # weeks
  buffer_percentage: 20
  velocity_calculation: "average_last_3"

github:
  enabled: true
  milestones:
    create_on_sprint_start: true
    sync_stories: true
    close_on_sprint_end: false

Best Practices

Capacity Management

Story Selection

Sprint Health

Timing

Remember

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.