graph TD
Start([Start: Execute Story Finalizer Test Task]) --> Phase1[Phase 1: Discovery
Team ID auto-discovery]
Phase1 --> Phase2[Phase 2: Preparation
Load task Todo
Update status: Todo → In Progress]
Phase2 --> Phase3[Phase 3: Implementation 6 steps]
subgraph Steps [6 Steps - Sequential]
Step1[Step 1: Fix Existing Tests
Section 8]
Step1 --> Step2[Step 2: Implement New Tests
E2E→Integration→Unit Priority ≥15
NO performance/load tests
Sections 3-5]
Step2 --> Step3[Step 3: Update Infrastructure
Section 9: package.json Docker]
Step3 --> Step4[Step 4: Update Documentation
Section 10: README CHANGELOG]
Step4 --> Step5[Step 5: Cleanup Legacy Code
Section 11]
Step5 --> Step6[Step 6: Final Verification
Delete scripts/tmp_[story_id].sh]
end
Phase3 --> Step1
Step6 --> Phase4
Phase4[Phase 4: Quality Gates
All tests pass 10-28 total
Priority ≥15 tested]
Phase4 --> QualityPass{Quality gates
pass?}
QualityPass -->|No| Phase3
QualityPass -->|Yes| Phase5
Phase5[Phase 4: Handoff
Update: In Progress → To Review]
Phase5 --> End([End])
classDef discovery fill:#E3F2FD,stroke:#1976D2,stroke-width:2px
classDef processing fill:#FFF9C4,stroke:#F57C00,stroke-width:2px
classDef decision fill:#FFE0B2,stroke:#E64A19,stroke-width:2px
classDef action fill:#C8E6C9,stroke:#388E3C,stroke-width:2px
class Phase1,Phase2 discovery
class Phase3,Step1,Step2,Step3,Step4,Step5,Step6,Phase4 processing
class QualityPass decision
class Phase5 action