Sprint Closure Skill
Patterns and templates for comprehensive sprint closure workflow.
When to Use
- •End of sprint cycle (before retrospective meeting)
- •Archiving sprint artifacts
- •Capturing and integrating lessons learned
- •Generating consolidated reports
Report Types Inventory
Sprint closure discovers and consolidates these report types:
| Report Type | Location | Purpose |
|---|---|---|
| PR Reviews | reports/pr-reviews/ | Code review findings |
| Test Quality | reports/test-quality/ | TDD compliance |
| Security Audits | reports/security-audit/ | OWASP findings |
| QA Reports | reports/qa/ | Quality assurance |
| Architecture | tasks/sprints/*/ | Design decisions |
| Research | tasks/research/ | Technical investigations |
LESSONS-LEARNED.md Structure
Header (create if not exists):
markdown
# Lessons Learned (Living Document) Last updated: [YYYY-MM-DD] (Sprint [N] closure) ## Status Legend - ✅ **PROCESSED** - Fully implemented, no action needed - ⚠️ **PARTIAL** - Partially implemented, ongoing work - ❌ **TODO** - Identified but not yet implemented
Lesson Format (Full Detail for Current Sprint):
markdown
### Lesson: [Descriptive Title] **Discovered in:** Sprint [N] ([context]) **What we learned:** [Description of the lesson] **Implementation:** - ✅ **Code:** [specific file paths or N/A] - ✅ **Tests:** [test file paths or patterns] - ✅ **Docs:** [documentation file paths] - ✅ **Skills:** [skill file paths] - ✅ **Commands:** [command file paths] **Status:** ✅ PROCESSED | ⚠️ PARTIAL | ❌ TODO **Sprint:** [N]
Compression Rules (Phase 4.0)
Before adding new sprint lessons, compress previous PROCESSED lessons:
BEFORE (15-20 lines):
markdown
### Lesson: Test Immutability Prevents Test Cheating **Discovered in:** Sprint 2 (Backend development, day-02) **What we learned:** LLM agents may delete tests instead of fixing code when tests fail... [full details] **Implementation:** - ✅ **Code:** N/A (process change) - ✅ **Tests:** All tests committed separately... - ✅ **Docs:** `docs/TDD-WORKFLOW.md`... ... **Status:** ✅ PROCESSED **Sprint:** 2
AFTER (4-5 lines):
markdown
### Lesson: Test Immutability Prevents Test Cheating Commit tests separately in RED phase makes them immutable. Any modification during GREEN/REFACTOR is visible in git history. **WHERE:** docs/TDD-WORKFLOW.md, .claude/skills/tdd-workflow/, red-tdd/green-tdd/refactor-tdd commands **STATUS:** ✅ PROCESSED | **SPRINT:** 2
Compression Criteria:
- •✅ PROCESSED lessons from Sprint < N → Compress
- •⚠️ PARTIAL lessons → Keep full detail (action items remain)
- •❌ TODO lessons → Keep full detail (not yet implemented)
Retrospective Template
markdown
# Sprint [N] Retrospective **Date:** [YYYY-MM-DD] **Duration:** [Start] to [End] ## Sprint Goal [Extract from planning or infer from artifacts] ## What Went Well ✅ - High test coverage: [percentage]% - Security score: [before] → [after] - [Other positive outcomes] ## What Didn't Go Well ❌ - Time estimation: [planned] vs [actual] - [Challenges encountered] ## Metrics 📊 | Category | Value | Target | Status | | ------------------ | ------- | ------- | ------ | | Test Coverage | [X]% | 80%/75% | ✅/❌ | | Security Score | [X]/100 | 90 | ✅/❌ | | Features Completed | [X]/[Y] | 100% | ✅/❌ | ## Action Items for Next Sprint | Action | Owner | Priority | Category | | ------ | ----- | ------------ | ---------- | | [Item] | [Who] | High/Med/Low | [Category] | ## Lessons Learned Summary [Top 5 lessons with links to LESSONS-LEARNED.md]
Archive Directory Structure
code
tasks/archive/[YYYY-MM]/sprint-[N]/
├── README.md # Sprint summary
├── RETROSPECTIVE-[date].md # Retrospective
└── [daily directories] # Preserved from sprint
├── tests/
├── implementation/
├── refactor/
└── security/
Report Summary Templates
QA Summary:
markdown
# QA Summary - Sprint [N] ## Test Quality Metrics | Criterion | Violations | Resolution | | ---------------- | ---------- | ---------- | | Business logic | [count] | [status] | | Assertions | [count] | [status] | | Error paths | [count] | [status] | | Edge cases | [count] | [status] | | Behavior testing | [count] | [status] |
Security Summary:
markdown
# Security Summary - Sprint [N] ## OWASP Top 10 Coverage | Category | Status | Findings | | ------------------- | ------ | -------- | | A01 Broken Access | ✅/❌ | [count] | | A02 Crypto Failures | ✅/❌ | [count] | ... ## Risk Register | Severity | Count | Resolved | Deferred | | -------- | ----- | -------- | -------- | | CRITICAL | [X] | [Y] | [Z] | | HIGH | [X] | [Y] | [Z] |
Integration Workflow (Phase 4.5)
After adding lessons to LESSONS-LEARNED.md:
- •Identify affected files using
.claude/LESSONS-INTEGRATION.md - •Add references to skills/commands (embedded <10 lines, link >30 lines)
- •Update integration map in
.claude/LESSONS-INTEGRATION.md - •Validate integration:
bash
grep -r "LESSONS-LEARNED.md#" .claude/ app/CLAUDE.md
Lesson Categories
| Category | Example Topics |
|---|---|
| TDD Workflow | Test immutability, 5 criteria, RED/GREEN/REFACTOR |
| Multi-Worktree | Database isolation, schema ownership, port mapping |
| Security Patterns | Backend permissions, OWASP, input validation |
| Architecture | Strategy Pattern, type safety, permission helpers |
| Test Quality | Mock patterns, integration vs unit, coverage |
| Tooling | Wasp 0.20.1, safe-start, db-manager |
| Process | Phased commands, artifact tracking, sprintdag |
| Anti-Patterns | Client-side auth, useAction overuse, test theater |
References
- •Command:
/close-sprint(complete orchestration) - •Integration map:
.claude/LESSONS-INTEGRATION.md - •Living document:
docs/LESSONS-LEARNED.md