# Story {{STORY_ID}}: {{STORY_TITLE}}

> **Feature:** {{FEATURE_NAME_TITLE}}
> **Epic:** {{EPIC_NAME}}
> **Created:** {{DATE}}

---

## 📋 Context

{{STORY_CONTEXT}}

**Related Spec Section:** `.morph/outputs/{{FEATURE_NAME}}/spec/{{SPEC_SHARD}}.md`

---

## 🔗 Dependencies

### Architecture References
{{#ARCHITECTURE_REFS}}
- {{.}}
{{/ARCHITECTURE_REFS}}

### Contract References
{{#CONTRACT_REFS}}
- {{.}}
{{/CONTRACT_REFS}}

### Related Stories
{{#RELATED_STORIES}}
- [ ] {{.}}
{{/RELATED_STORIES}}

---

## ✅ Tasks

{{#TASKS}}
- [ ] {{.}}
{{/TASKS}}

**Estimated Effort:** {{EFFORT}} (max 1 developer-day)

---

## 💡 Dev Notes (Auto-Injected by SM)

{{#DEV_NOTES}}
- {{.}}
{{/DEV_NOTES}}

### Standards to Follow
- **Coding:** `.morph/standards/coding.md#{{CODING_PATTERN}}`
- **Architecture:** `.morph/standards/architecture.md#{{ARCH_PATTERN}}`
{{#AZURE_PATTERN}}
- **Azure/IaC:** `.morph/standards/azure.md#{{AZURE_PATTERN}}`
{{/AZURE_PATTERN}}

---

## 🎯 Acceptance Criteria (Gherkin Format)

{{#ACCEPTANCE_CRITERIA}}
- [ ] **GIVEN** {{given}} **WHEN** {{when}} **THEN** {{then}}
{{/ACCEPTANCE_CRITERIA}}

---

## 🛠️ Implementation Notes

### Dev Notes (Added by Dev Agent)
```
[Dev agent adds notes here after implementation]

Example:
✅ Implemented ScheduledReport.cs with Primary Constructor
✅ EF mapping configured in ReportDbContext.cs (line 45)
✅ Migration: 20251209_AddScheduledReports.cs
⚠️ ATTENTION QA: RecurrencePattern uses complex regex (validate edge cases line 67)
✅ Tests: 12 unit tests, 95% coverage in ScheduledReportTests.cs
```

### QA Notes (Added by QA Agent)
```
[QA agent adds notes here after review]

Example:
✅ Review complete - code follows standards
✅ Refactored: extracted ValidateRecurrence() method (line 89)
✅ Added 3 edge case tests (invalid cron expressions)
✅ Documented regex pattern in decisions.md (ADR-007)
⚠️ TODO: Add integration test for full CRUD cycle
```

---

## 📊 Status Tracking

**Current Status:** {{STATUS}}

| Status | Date | Agent | Notes |
|--------|------|-------|-------|
| Created | {{CREATED_DATE}} | SM | Story created from epic |
| Ready | {{READY_DATE}} | SM | Prerequisites met, ready for dev |
| In Progress | {{IN_PROGRESS_DATE}} | Dev | Implementation started |
| Ready for QA | {{QA_DATE}} | Dev | Implementation complete, awaiting review |
| Done | {{DONE_DATE}} | QA | Approved, ready for merge |

---

## 🔄 Handoff Protocol

### SM → Dev Handoff
- ✅ Story file created with complete context
- ✅ Dev Notes injected with architectural guidance
- ✅ Acceptance criteria defined and verifiable
- ✅ Dependencies documented
- ✅ Status: **Ready for Dev**

### Dev → QA Handoff
- [ ] All tasks checked off
- [ ] Dev Notes added with implementation details
- [ ] Tests written (unit + integration as needed)
- [ ] Code follows standards (validated via pre-commit hooks)
- [ ] Status updated to: **Ready for QA**

### QA → Done
- [ ] QA Notes added with review findings
- [ ] Code reviewed and refactored if needed
- [ ] All acceptance criteria validated
- [ ] Documentation updated (if applicable)
- [ ] Status updated to: **Done**

---

## 📝 Additional Notes

{{ADDITIONAL_NOTES}}

---

*Generated by MORPH-SPEC Framework - Story-Driven Development*
*Inspired by BMAD Method: Self-contained stories for AI agents*
