# Epic Walkthrough Skill Generate comprehensive walkthrough documentation and trigger self-improvement for epic workflows. ## Purpose Create walkthrough.md documenting the epic journey and trigger workflow audit/healing for continuous improvement. ## When to Invoke - During `/epic` Step 8 (Finalization phase) - After deployment completes successfully - Via `/finalize` command ## Template Reference Use the template at `.spec-flow/templates/epic/walkthrough.md` as the base structure. **Template variables** (replace with actual values): - `{{EPIC_TITLE}}`, `{{EPIC_NUMBER}}`, `{{EPIC_SLUG}}` - `{{START_DATE}}`, `{{END_DATE}}`, `{{DURATION_DAYS}}`, `{{DURATION_HOURS}}` - `{{SPRINT_COUNT}}`, `{{TASKS_COMPLETED}}` - `{{EXPECTED_VELOCITY}}`, `{{ACTUAL_VELOCITY}}` - Phase durations, sprint details, quality gate results - File change statistics, deployment information **Data sources**: - `state.yaml` - Phase timestamps, sprint status - `epic-spec.md` - Business value, constraints - `sprint-plan.md` - Sprint dependencies, estimates - `optimization-report.md` - Quality gate results - `git log` - Commit history, file statistics ## Walkthrough Structure ```xml ... ... Start: 2025-11-19, End: 2025-11-25 (6 days) Expected: 3x, Actual: 4.2x 2 hours OAuth 2.1 recommended, JWT tokens for sessions research.md, API contracts locked 1.5 hours PostgreSQL for sessions, httpOnly cookies plan.md, sprint-plan.md 16 hours S01 (8h), S02 (12h), S03 (6h) Implementation in sprints/S01, S02, S03 2 hours All passed (tests, security, performance, accessibility) optimization-report.xml 98% coverage, 142/142 passing 0 critical, 2 medium (triaged) API p95: 87ms (target: <200ms) WCAG 2.1 AA compliant Deployed v1.5.0-rc.1, validated 2025-11-24 Promoted to v1.5.0, deployed 2025-11-25 JWT validation middleware OAuth 2.1 integration OAuth login flow Auth state management Session table Auth API contract Add MFA support Social login Token refresh uses polling (should use refresh tokens) Watch auth_failures_total metric - Parallel sprint execution saved 8 hours - API contract locking prevented integration bugs - Meta-prompting research identified OAuth 2.1 early - Sprint S02 took 12h vs 8h estimated - Cookie SameSite policy required research - Lock contracts before parallel work - Research phase crucial for architectural decisions - Parallel execution 4.2x faster than sequential Expected: 3x faster Actual: 4.2x faster Reason: S02/S03 ran 60% parallel ``` ## Self-Improvement Actions **1. Run post-mortem audit:** ```bash /audit-workflow ``` **2. Pattern detection (after 2-3 epics):** - Analyze completed epics for recurring patterns - Detect code generation opportunities - Suggest custom skills for detected patterns - Generate project-specific commands/hooks **3. Self-healing:** ```bash /heal-workflow ``` - Apply approved workflow improvements - Update skills based on learnings **4. Update documentation:** - CHANGELOG.md - README.md - Project CLAUDE.md (add epic summary) **5. Archive epic artifacts:** - Move prompts to completed/ - Mark epic complete in state.yaml ## Outputs - `walkthrough.md` - Comprehensive epic summary - `workflow-improvements.xml` - Self-improvement suggestions - Updated project documentation ## State Updates After finalization: ```yaml phases: finalization: status: completed completed_at: { ISO_TIMESTAMP } epic: status: completed completed_at: { ISO_TIMESTAMP } velocity_actual: 4.2 ``` ## Velocity Tracking **Metrics captured:** - Expected vs actual sprint durations - Parallel execution efficiency - Quality gate pass rates - Deployment success rate **Used for:** - Future epic estimation - Workflow optimization - Pattern detection for self-improvement