28 lines
1.1 KiB
Markdown
28 lines
1.1 KiB
Markdown
|
|
# Task ID: 124
|
||
|
|
|
||
|
|
**Title:** Epic service layer with revision integration
|
||
|
|
|
||
|
|
**Status:** pending
|
||
|
|
|
||
|
|
**Dependencies:** 123
|
||
|
|
|
||
|
|
**Priority:** medium
|
||
|
|
|
||
|
|
**Description:** Create EpicService with CRUD operations, revision tracking via ResourceRevision, and done-criteria roll-up logic
|
||
|
|
|
||
|
|
**Details:**
|
||
|
|
|
||
|
|
Create src/mcpd/src/services/epic.service.ts:
|
||
|
|
1. Inject EpicRepository, ResourceRevisionRepository, ProjectRepository
|
||
|
|
2. create(): validate project exists, create Epic, create initial ResourceRevision with resourceType:'epic'
|
||
|
|
3. update(): bump semver, create ResourceRevision, update currentRevisionId
|
||
|
|
4. getById(), getByName(), listByProject()
|
||
|
|
5. addTradeoff(): append to acceptedTradeoffs JSON array
|
||
|
|
6. computeStatus(): roll up EpicTask completion to determine if Epic is delivered/delivered_with_tradeoffs
|
||
|
|
7. getRoadmap(): return epictask graph with per-node completeness percentages
|
||
|
|
8. Follow PromptService pattern for revision integration
|
||
|
|
|
||
|
|
**Test Strategy:**
|
||
|
|
|
||
|
|
Unit tests: test create writes revision, test update bumps semver and writes revision, test addTradeoff appends correctly, test computeStatus logic for all EpicStatus values.
|