Skip to content

Conversation

@sigent-amazon
Copy link
Contributor

@sigent-amazon sigent-amazon commented Nov 17, 2025

Sprint/Cycle Management for Spec Kit

Summary

Adds comprehensive sprint/cycle management to enable Agile/Scrum workflows in Spec Kit. Teams can now organize features into time-boxed sprints, archive completed sprints with high-level summaries, track decisions and pivots, conduct retrospectives, and maintain project-level visibility.

Addresses Issue #1047 (Project-Level PRD Generation and Phase/Status Tracking) and community requests for sprint planning capabilities.

Current Gap

Spec Kit excels at feature-level workflows but lacks project-level organization:

  • ❌ No way to group features into sprints
  • ❌ No cross-feature visibility or progress tracking
  • ❌ Decisions scattered across 30+ feature specs
  • ❌ No formal retrospectives or continuous improvement loop
  • ❌ No project-level roadmap
  • ❌ Difficult onboarding (must read all specs)
  • ❌ Hard to communicate progress to stakeholders

Approach

Non-Invasive Design

  • ✅ Existing feature workflows unchanged
  • ✅ Sprint management is optional (opt-in)
  • ✅ Backward compatible
  • ✅ Teams can adopt incrementally

Key Features

  1. Sprint Management (/speckit.sprint)

    • Create and manage time-boxed sprints
    • Link features to sprints
    • Track progress and capacity
  2. Sprint Archival (/speckit.archive)

    • Archive completed sprints with summaries
    • Extract decisions from feature specs
    • Document pivots and course corrections
    • Preserve knowledge with context
  3. Retrospectives (/speckit.retrospective)

    • Structured questioning (like /speckit.clarify for past decisions)
    • Clarify unclear decisions and pivots
    • Generate actionable improvements
    • Document lessons learned
  4. Project Roadmap (/speckit.roadmap)

    • Project-level visibility across sprints
    • Feature backlog by priority
    • Dependencies and blockers
    • Milestones and metrics

Changes Made

New Commands (4)

  • templates/commands/sprint.md - Sprint management command
  • templates/commands/archive.md - Sprint archival command
  • templates/commands/retrospective.md - Retrospective command
  • templates/commands/roadmap.md - Project roadmap command

New Scripts (4)

  • scripts/bash/create-sprint.sh - Sprint creation automation
  • scripts/bash/archive-sprint.sh - Sprint archival automation
  • scripts/powershell/create-sprint.ps1 - PowerShell version
  • scripts/powershell/archive-sprint.ps1 - PowerShell version

New Templates (3)

  • templates/sprint-template.md - Sprint planning template
  • templates/sprint-summary-template.md - Sprint archival template
  • templates/retrospective-template.md - Retrospective template

Documentation (1)

  • SPRINT_CYCLE_DESIGN.md - Complete design with generic example

Directory Structure

.specify/
├── sprints/                          # NEW
│   ├── active/                       # Current sprint
│   │   ├── sprint.md
│   │   ├── backlog.md
│   │   └── decisions.md
│   ├── archive/                      # Completed sprints
│   │   ├── sprint-001-foundation/
│   │   │   ├── summary.md
│   │   │   ├── decisions.md
│   │   │   ├── retrospective.md
│   │   │   └── features.md
│   │   └── sprint-002-core/
│   └── roadmap.md
└── specs/                            # Existing (unchanged)

Example Workflow

# Start sprint
/speckit.sprint start "Sprint 1: Foundation" --duration 2w

# Add features
/speckit.sprint add 001-auth 002-database

# Work on features (existing workflow - unchanged)
/speckit.specify Build authentication
/speckit.plan Use AWS Cognito
/speckit.tasks
/speckit.implement

# Complete sprint
/speckit.archive

# Conduct retrospective
/speckit.retrospective

# Update roadmap
/speckit.roadmap

Testing

Manual Testing Performed

  • Created test project with sprint commands
  • Verified sprint creation and archival
  • Tested feature linking to sprints
  • Verified template processing
  • Tested scripts (bash and PowerShell)
  • Verified backward compatibility
  • Tested with existing feature workflows

Test Project

  • Project: [To be tested with sample project]
  • AI Agent: Amazon Q Developer CLI
  • Commands Tested: All 4 new commands

Benefits

  1. Knowledge Preservation - Decisions archived with context
  2. Easier Onboarding - Read sprint summaries vs all specs
  3. Stakeholder Communication - Clear progress reports
  4. Decision Tracking - Understand why choices were made
  5. Continuous Improvement - Retrospectives drive improvements
  6. Pattern Recognition - Identify recurring issues
  7. Project Visibility - See progress across features

AI Assistance Disclosure

AI Tools Used: Amazon Q Developer CLI

Extent of AI Use:

  • Used for initial design discussion and pattern analysis
  • Generated script templates based on existing Spec Kit patterns
  • Created documentation structure and examples
  • All code reviewed, tested, and modified by human

Human Verification:

Backward Compatibility

  • ✅ Existing projects work without changes
  • ✅ Sprint management is optional
  • ✅ Feature workflows unchanged
  • ✅ No breaking changes to existing commands

Related Issues

Addresses #1047
Related to community requests for sprint planning and tracking

Reviewer Notes

Please focus on:

  1. Script patterns match existing conventions
  2. Command integration with AI agents
  3. Template completeness
  4. Documentation clarity
  5. Backward compatibility verification

Add comprehensive sprint/cycle management system to enable teams to:
- Organize features into time-boxed sprints
- Archive completed sprints with high-level summaries
- Track decisions and pivots across development cycles
- Conduct retrospectives to clarify unclear decisions
- Maintain project-level visibility via roadmap

New Commands:
- /speckit.sprint - Create and manage sprints (start, add, status, complete)
- /speckit.archive - Archive sprint with summary and decision extraction
- /speckit.retrospective - Conduct retrospective with structured questioning
- /speckit.roadmap - Generate project-level roadmap and visibility

Templates:
- sprint-template.md - Sprint planning with goals and capacity
- sprint-summary-template.md - Sprint archival with decisions and pivots
- retrospective-template.md - Structured retrospective format

Documentation:
- SPRINT_CYCLE_DESIGN.md - Complete architecture and design
- SPRINT_GENERIC_EXAMPLE.md - Generic reusable example
- SPRINT_SUMMARY.md - Implementation summary

Key Features:
- Non-invasive: Existing feature workflows unchanged
- Archival-first: Knowledge preservation with context
- Decision-focused: Captures WHY choices were made
- Retrospective-driven: Clarify unclear decisions (like /speckit.clarify)
- Project visibility: Roadmap across sprints

Addresses issue github#1047 (Project-Level PRD Generation and Phase/Status Tracking)
Related to community requests for sprint planning and tracking
Consolidate SPRINT_CYCLE_DESIGN.md, SPRINT_GENERIC_EXAMPLE.md, and
SPRINT_SUMMARY.md into a single comprehensive document.

Changes:
- Merged generic example into design doc
- Added quick summary section at top
- Removed redundant SPRINT_SUMMARY.md
- Removed separate SPRINT_GENERIC_EXAMPLE.md
- All content preserved in consolidated SPRINT_CYCLE_DESIGN.md

Benefits:
- Single source of truth (25KB vs 37KB across 3 files)
- Easier to navigate and maintain
- Complete example integrated with design
- No information lost
Add automation scripts for /speckit.sprint and /speckit.archive commands
following existing Spec Kit patterns.

New Scripts:
- scripts/bash/create-sprint.sh - Create new sprint with directory structure
- scripts/bash/archive-sprint.sh - Archive sprint with summary generation
- scripts/powershell/create-sprint.ps1 - PowerShell version of create-sprint
- scripts/powershell/archive-sprint.ps1 - PowerShell version of archive-sprint

Features:
- Sprint number auto-calculation
- Template copying with variable replacement
- Feature scanning and linking
- JSON output for agent parsing
- Error handling and validation
- Duration parsing (1w, 2w, 3w, 4w)
- Slug generation from sprint names

Updated Commands:
- templates/commands/sprint.md - Added script integration section
- templates/commands/archive.md - Added script integration section

Scripts follow existing patterns:
- Similar to create-new-feature.sh and setup-plan.sh
- Support --json flag for agent parsing
- Cross-platform (bash + PowerShell)
- Proper error handling
Add automatic sprint integration to /speckit.specify command.

Changes:
- scripts/bash/create-new-feature.sh: Check for active sprint and auto-add feature
- scripts/powershell/create-new-feature.ps1: PowerShell version of sprint check
- templates/commands/specify.md: Document sprint integration behavior

Behavior:
- If active sprint exists → Feature automatically added to sprint backlog
- If no active sprint → Feature created normally (backward compatible)
- No user action required → Seamless integration
- Manual override → User can remove from backlog if needed

Benefits:
- One less manual step (no need for /speckit.sprint add)
- Automatic sprint tracking
- Backward compatible (works without sprints)
- Minimal code change (only scripts modified)
- Archive script now moves completed feature specs from specs/ to archive/sprint-NNN/specs/
- Keeps root specs/ directory lightweight (only active work)
- Sprint archives are self-contained (specs + summary + decisions)
- Features identified as 'Done', 'Completed', or '✅' in backlog.md are moved
- Links in features.md point to archived specs (./specs/feature-id/spec.md)
- Updated both bash and PowerShell scripts
- Updated design document and PR description
- Implemented /speckit.sprint add command for adding features to backlog
  - Validates feature exists in specs/
  - Checks for duplicates in backlog
  - Extracts feature name from spec.md
  - Adds to backlog table with default status 'Not Started'

- Added interactive completion checking to archive script
  - Prompts for In Progress/In Review/Blocked features
  - Shows completion indicators (spec, plan, tasks)
  - Highlights TODO/FIXME markers
  - User can approve archiving near-complete features
  - 'skip-all' option to bypass remaining prompts

- Updated both bash and PowerShell archive scripts
- Updated sprint command documentation
- Updated design document with new features

Addresses user request for better backlog management and handling
half-finished specs during sprint archival.
- Changed from grep -c with pipe to grep -E with wc -l
- Fixes 'integer expression expected' error
- Added xargs to trim whitespace from count
- Changed **Duration**: to \*\*Duration\*\*:
- Fixes 'repetition-operator operand invalid' error
- Detects if stdin is a terminal with [ -t 0 ]
- Interactive mode: prompts for In Progress/In Review/Blocked features
- Non-interactive mode: auto-archives 'In Review' features only
- Fixes issue where AI agents can't respond to read prompts
- Removed bash read prompts (don't work with AI agents)
- Added --archive-features parameter for AI agent to pass decisions
- AI agent now handles prompting in conversation (like clarify)
- Script accepts comma or space-separated feature list
- Consistent with other speckit commands
- Added explicit instruction to ask ONE feature at a time
- Emphasized WAIT for user response before next feature
- Referenced /speckit.clarify pattern for consistency
- Updated archive command to show AI agent handles prompts
- Updated sprint command with proper script execution examples
- Added new panel showing 6 sprint management commands
- Displayed after Enhancement Commands
- Uses magenta border to distinguish from other sections
- Shows sprint start, add, status, archive, retrospective, roadmap
- Added Sprint Management Commands table with 6 commands
- Linked to SPRINT_CYCLE_DESIGN.md for detailed documentation
- Positioned after Optional Commands section
- Clearly marked as optional for Agile/Scrum workflows
- PR description is for local reference only
- Not needed in the repository
@sigent-amazon sigent-amazon marked this pull request as ready for review November 17, 2025 15:46
- Changed .specify/scripts/ to .specify/scripts/bash/
- Matches existing project structure where scripts are in bash/ subdirectory
- Ensures scripts can find common.sh correctly
- Added PowerShell examples alongside bash for all sprint commands
- Matches pattern used in other commands (specify, plan, etc.)
- Supports both bash and PowerShell environments
- Uses pwsh for PowerShell execution
- Removed dummy data (001-auth, 002-ui, 003-api)
- Leaves empty table row for clean sprint creation
- Features should be added via /speckit.sprint add or backlog.md
- Fixed all sprint script paths to use .specify/sprints/ consistently
- Added robust repo root detection (git + fallback) to all sprint scripts
- Fixed template paths to use .specify/templates/
- Added interactive sprint goal and success criteria collection
- Scripts accept --goal and --criteria parameters (no hanging prompts)
- Added update-sprint-feature-status.sh/ps1 scripts
- Implement command now updates feature status to 'In Progress'
- Create-new-feature adds features to active sprint with description and owner
- Sprint template cleaned: all examples in comments, no inline placeholders
- Sprint backlog weeks auto-generated based on duration (1w/2w/3w/4w)
- Removed example features from sprint-template.md
- Updated sprint.md command to use interactive prompts like clarify
- Fixed sed/awk issues with multi-line replacements
- Both bash and PowerShell versions updated and tested
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant