@comfanion/workflow 4.1.2 → 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -2
- package/bin/cli.js +2 -4
- package/package.json +1 -1
- package/src/build-info.json +1 -1
- package/src/opencode/ARCHITECTURE.md +7 -6
- package/src/opencode/FLOW.yaml +10 -10
- package/src/opencode/agents/coder.md +82 -0
- package/src/opencode/agents/dev.md +10 -0
- package/src/opencode/commands/architecture.md +1 -1
- package/src/opencode/commands/prd.md +1 -1
- package/src/opencode/config.yaml +1 -1
- package/src/opencode/skills/adr-writing/SKILL.md +122 -159
- package/src/opencode/skills/adr-writing/template.md +130 -0
- package/src/opencode/skills/architecture-design/SKILL.md +113 -107
- package/src/opencode/skills/architecture-design/template.md +212 -0
- package/src/opencode/skills/architecture-validation/SKILL.md +1 -1
- package/src/opencode/skills/changelog/template.md +23 -0
- package/src/opencode/skills/epic-writing/SKILL.md +116 -264
- package/src/opencode/skills/epic-writing/template.md +119 -0
- package/src/opencode/skills/prd-validation/SKILL.md +1 -1
- package/src/opencode/skills/prd-writing/SKILL.md +79 -43
- package/src/opencode/skills/prd-writing/template.md +147 -0
- package/src/opencode/skills/requirements-gathering/SKILL.md +128 -78
- package/src/opencode/skills/requirements-gathering/template.md +156 -0
- package/src/opencode/skills/story-writing/SKILL.md +106 -464
- package/src/opencode/skills/story-writing/template.md +214 -0
- package/src/opencode/skills/unit-writing/SKILL.md +185 -0
- package/src/opencode/skills/unit-writing/template.md +136 -0
- package/src/repo-structure/docs/README.md +5 -5
- package/src/repo-structure/docs/requirements/README.md +1 -1
- package/src/opencode/templates/CHANGELOG.md +0 -82
- package/src/opencode/templates/adr-template.md +0 -115
- package/src/opencode/templates/architecture-template.md +0 -362
- package/src/opencode/templates/epic-template.md +0 -166
- package/src/opencode/templates/prd-template.md +0 -479
- package/src/opencode/templates/requirements-template.md +0 -132
- package/src/opencode/templates/story-template.md +0 -182
- /package/src/opencode/{templates/prd-acceptance-criteria-template.md → skills/acceptance-criteria/template.md} +0 -0
- /package/src/opencode/{templates/change-proposal-template.md → skills/archiving/template-change-proposal.md} +0 -0
- /package/src/opencode/{templates/git-workflow-template.md → skills/coding-standards/template-git.md} +0 -0
- /package/src/opencode/{templates/testing-standards-template.md → skills/coding-standards/template-testing.md} +0 -0
- /package/src/opencode/{templates/jira-cache-template.yaml → skills/jira-integration/template-cache.yaml} +0 -0
- /package/src/opencode/{templates/module-index-template.md → skills/module-documentation/template.md} +0 -0
- /package/src/opencode/{templates/sprint-status-template.yaml → skills/sprint-planning/template.yaml} +0 -0
- /package/src/opencode/{templates/integration-tests-template.md → skills/test-design/template-integration.md} +0 -0
- /package/src/opencode/{templates/module-test-cases-template.md → skills/test-design/template-module.md} +0 -0
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
# ADR-NNN: [Title]
|
|
2
|
-
|
|
3
|
-
**Status:** Proposed | Accepted | Deprecated | Superseded
|
|
4
|
-
**Date:** YYYY-MM-DD
|
|
5
|
-
**Deciders:** [List of people involved]
|
|
6
|
-
**Supersedes:** [ADR-XXX if applicable]
|
|
7
|
-
**Superseded by:** [ADR-XXX if applicable]
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## Context
|
|
12
|
-
|
|
13
|
-
[What is the issue that we're seeing that is motivating this decision or change?]
|
|
14
|
-
|
|
15
|
-
[Describe the forces at play (technical, political, social, project). These forces are probably in tension.]
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
## Decision
|
|
20
|
-
|
|
21
|
-
[What is the change that we're proposing and/or doing?]
|
|
22
|
-
|
|
23
|
-
**We will [decision].**
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
## Consequences
|
|
28
|
-
|
|
29
|
-
### Positive
|
|
30
|
-
|
|
31
|
-
- [Benefit 1]
|
|
32
|
-
- [Benefit 2]
|
|
33
|
-
- [Benefit 3]
|
|
34
|
-
|
|
35
|
-
### Negative
|
|
36
|
-
|
|
37
|
-
- [Drawback 1]
|
|
38
|
-
- [Drawback 2]
|
|
39
|
-
|
|
40
|
-
### Neutral
|
|
41
|
-
|
|
42
|
-
- [Trade-off 1]
|
|
43
|
-
- [Trade-off 2]
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
## Options Considered
|
|
48
|
-
|
|
49
|
-
### Option 1: [Name]
|
|
50
|
-
|
|
51
|
-
**Description:** [What this option entails]
|
|
52
|
-
|
|
53
|
-
**Pros:**
|
|
54
|
-
- [Pro 1]
|
|
55
|
-
- [Pro 2]
|
|
56
|
-
|
|
57
|
-
**Cons:**
|
|
58
|
-
- [Con 1]
|
|
59
|
-
- [Con 2]
|
|
60
|
-
|
|
61
|
-
### Option 2: [Name]
|
|
62
|
-
|
|
63
|
-
**Description:** [What this option entails]
|
|
64
|
-
|
|
65
|
-
**Pros:**
|
|
66
|
-
- [Pro 1]
|
|
67
|
-
|
|
68
|
-
**Cons:**
|
|
69
|
-
- [Con 1]
|
|
70
|
-
|
|
71
|
-
### Option 3: [Name] (Chosen)
|
|
72
|
-
|
|
73
|
-
**Description:** [What this option entails]
|
|
74
|
-
|
|
75
|
-
**Pros:**
|
|
76
|
-
- [Pro 1]
|
|
77
|
-
- [Pro 2]
|
|
78
|
-
|
|
79
|
-
**Cons:**
|
|
80
|
-
- [Con 1]
|
|
81
|
-
|
|
82
|
-
**Why chosen:** [Why this option was selected over others]
|
|
83
|
-
|
|
84
|
-
---
|
|
85
|
-
|
|
86
|
-
## Implementation
|
|
87
|
-
|
|
88
|
-
[If applicable, describe how this decision will be implemented]
|
|
89
|
-
|
|
90
|
-
### Action Items
|
|
91
|
-
|
|
92
|
-
- [ ] [Action 1]
|
|
93
|
-
- [ ] [Action 2]
|
|
94
|
-
- [ ] [Action 3]
|
|
95
|
-
|
|
96
|
-
### Timeline
|
|
97
|
-
|
|
98
|
-
| Phase | Description | Target Date |
|
|
99
|
-
|-------|-------------|-------------|
|
|
100
|
-
| Phase 1 | [Description] | YYYY-MM-DD |
|
|
101
|
-
| Phase 2 | [Description] | YYYY-MM-DD |
|
|
102
|
-
|
|
103
|
-
---
|
|
104
|
-
|
|
105
|
-
## Related
|
|
106
|
-
|
|
107
|
-
- [Link to related ADR]
|
|
108
|
-
- [Link to related documentation]
|
|
109
|
-
- [Link to relevant code/PR]
|
|
110
|
-
|
|
111
|
-
---
|
|
112
|
-
|
|
113
|
-
## Notes
|
|
114
|
-
|
|
115
|
-
[Any additional notes, context, or information]
|
|
@@ -1,362 +0,0 @@
|
|
|
1
|
-
# [Project Name] - Architecture Document
|
|
2
|
-
|
|
3
|
-
**Author:** [Name]
|
|
4
|
-
**Date:** [YYYY-MM-DD]
|
|
5
|
-
**Version:** [X.Y]
|
|
6
|
-
**Status:** Draft | Review | Approved
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
## Architecture Overview
|
|
11
|
-
|
|
12
|
-
### System Context
|
|
13
|
-
|
|
14
|
-
[High-level description of system boundaries and external actors]
|
|
15
|
-
|
|
16
|
-
```
|
|
17
|
-
┌─────────────────────────────────────────┐
|
|
18
|
-
│ External Systems │
|
|
19
|
-
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
|
|
20
|
-
│ │ PIM │ │ DAX │ │ Payment │ │
|
|
21
|
-
│ └────┬────┘ └────┬────┘ └────┬────┘ │
|
|
22
|
-
└───────┼────────────┼────────────┼──────┘
|
|
23
|
-
│ │ │
|
|
24
|
-
┌───────▼────────────▼────────────▼──────┐
|
|
25
|
-
│ API Gateway │
|
|
26
|
-
└───────────────────┬────────────────────┘
|
|
27
|
-
│
|
|
28
|
-
┌───────────────────▼────────────────────┐
|
|
29
|
-
│ Your System │
|
|
30
|
-
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
|
|
31
|
-
│ │Module A │ │Module B │ │Module C │ │
|
|
32
|
-
│ └─────────┘ └─────────┘ └─────────┘ │
|
|
33
|
-
└─────────────────────────────────────────┘
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
### Architecture Style
|
|
37
|
-
|
|
38
|
-
| Aspect | Choice | Rationale |
|
|
39
|
-
|--------|--------|-----------|
|
|
40
|
-
| Overall | Modular Monolith / Microservices | [Why] |
|
|
41
|
-
| Communication | REST + Kafka Events | [Why] |
|
|
42
|
-
| Data | PostgreSQL + Redis | [Why] |
|
|
43
|
-
| Deployment | Kubernetes | [Why] |
|
|
44
|
-
|
|
45
|
-
### Key Decisions Summary
|
|
46
|
-
|
|
47
|
-
| Decision | Choice | ADR |
|
|
48
|
-
|----------|--------|-----|
|
|
49
|
-
| [Decision 1] | [Choice] | ADR-001 |
|
|
50
|
-
| [Decision 2] | [Choice] | ADR-002 |
|
|
51
|
-
|
|
52
|
-
---
|
|
53
|
-
|
|
54
|
-
## Module/Service Architecture
|
|
55
|
-
|
|
56
|
-
### [Module 1 Name]
|
|
57
|
-
|
|
58
|
-
**Responsibility:** [Single responsibility description]
|
|
59
|
-
|
|
60
|
-
#### Boundaries
|
|
61
|
-
|
|
62
|
-
| Aspect | Details |
|
|
63
|
-
|--------|---------|
|
|
64
|
-
| **Owns** | [Entities/data this module owns] |
|
|
65
|
-
| **Consumes** | [Events/APIs it consumes from other modules] |
|
|
66
|
-
| **Produces** | [Events/APIs it produces for other modules] |
|
|
67
|
-
|
|
68
|
-
#### Internal Structure
|
|
69
|
-
|
|
70
|
-
```
|
|
71
|
-
module-name/
|
|
72
|
-
├── domain/ # Business logic (NO infrastructure imports!)
|
|
73
|
-
│ ├── aggregate/ # Entities with business rules
|
|
74
|
-
│ │ └── entity.go
|
|
75
|
-
│ ├── valueobject/ # Immutable value objects
|
|
76
|
-
│ │ └── entity_id.go
|
|
77
|
-
│ ├── service/ # Domain services
|
|
78
|
-
│ └── repository/ # Repository INTERFACES (ports)
|
|
79
|
-
│ └── entity_repository.go
|
|
80
|
-
├── application/ # Use cases (orchestration)
|
|
81
|
-
│ └── usecase/
|
|
82
|
-
│ └── CreateEntity/
|
|
83
|
-
│ ├── inport.go # Interface
|
|
84
|
-
│ ├── dto.go # Command & Result
|
|
85
|
-
│ ├── handler.go # Orchestration
|
|
86
|
-
│ └── mappers.go # Explicit mapping
|
|
87
|
-
└── infrastructure/ # Adapters (implements ports)
|
|
88
|
-
├── repo/ # Database implementations
|
|
89
|
-
├── http/ # HTTP handlers, routes
|
|
90
|
-
└── kafka/ # Event bus implementations
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
#### API Endpoints
|
|
94
|
-
|
|
95
|
-
| Method | Endpoint | Description | Auth |
|
|
96
|
-
|--------|----------|-------------|------|
|
|
97
|
-
| POST | /api/v1/entities | Create entity | JWT |
|
|
98
|
-
| GET | /api/v1/entities/{id} | Get entity | JWT |
|
|
99
|
-
| PUT | /api/v1/entities/{id} | Update entity | JWT |
|
|
100
|
-
|
|
101
|
-
#### Events
|
|
102
|
-
|
|
103
|
-
| Event | Direction | Description |
|
|
104
|
-
|-------|-----------|-------------|
|
|
105
|
-
| entity.created | Produces | When entity is created |
|
|
106
|
-
| other.event | Consumes | Triggers action X |
|
|
107
|
-
|
|
108
|
-
---
|
|
109
|
-
|
|
110
|
-
### [Module 2 Name]
|
|
111
|
-
|
|
112
|
-
**Responsibility:** [Single responsibility description]
|
|
113
|
-
|
|
114
|
-
[Same structure as above...]
|
|
115
|
-
|
|
116
|
-
---
|
|
117
|
-
|
|
118
|
-
## Data Architecture
|
|
119
|
-
|
|
120
|
-
### Database Design
|
|
121
|
-
|
|
122
|
-
#### [Table 1 Name]
|
|
123
|
-
|
|
124
|
-
```sql
|
|
125
|
-
CREATE TABLE entities (
|
|
126
|
-
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
127
|
-
name VARCHAR(255) NOT NULL,
|
|
128
|
-
status VARCHAR(50) NOT NULL,
|
|
129
|
-
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
|
130
|
-
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
|
131
|
-
version INTEGER NOT NULL DEFAULT 1 -- Optimistic locking
|
|
132
|
-
);
|
|
133
|
-
|
|
134
|
-
-- Indexes
|
|
135
|
-
CREATE INDEX idx_entities_status ON entities(status);
|
|
136
|
-
CREATE INDEX idx_entities_name_trgm ON entities USING gin(name gin_trgm_ops);
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
#### Entity Relationship Diagram
|
|
140
|
-
|
|
141
|
-
```
|
|
142
|
-
┌──────────────┐ ┌──────────────┐
|
|
143
|
-
│ Entity A │ │ Entity B │
|
|
144
|
-
├──────────────┤ ├──────────────┤
|
|
145
|
-
│ id (PK) │──────<│ entity_a_id │
|
|
146
|
-
│ name │ │ id (PK) │
|
|
147
|
-
│ status │ │ data │
|
|
148
|
-
└──────────────┘ └──────────────┘
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
### Data Flow
|
|
152
|
-
|
|
153
|
-
```
|
|
154
|
-
[External] → [API Gateway] → [Module A] → [Database]
|
|
155
|
-
│
|
|
156
|
-
▼
|
|
157
|
-
[Kafka Topic]
|
|
158
|
-
│
|
|
159
|
-
▼
|
|
160
|
-
[Module B] → [External System]
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
### Event Schema
|
|
164
|
-
|
|
165
|
-
#### entity.created
|
|
166
|
-
|
|
167
|
-
```json
|
|
168
|
-
{
|
|
169
|
-
"event_type": "entity.created",
|
|
170
|
-
"version": "1.0",
|
|
171
|
-
"timestamp": "2026-01-23T10:00:00Z",
|
|
172
|
-
"correlation_id": "uuid",
|
|
173
|
-
"payload": {
|
|
174
|
-
"entity_id": "uuid",
|
|
175
|
-
"name": "string",
|
|
176
|
-
"created_by": "uuid"
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
---
|
|
182
|
-
|
|
183
|
-
## Integration Architecture
|
|
184
|
-
|
|
185
|
-
### External Systems
|
|
186
|
-
|
|
187
|
-
| System | Type | Protocol | Data Exchanged | Frequency |
|
|
188
|
-
|--------|------|----------|----------------|-----------|
|
|
189
|
-
| [System 1] | Inbound | REST API | Product data | On-demand |
|
|
190
|
-
| [System 2] | Outbound | Kafka | Order events | Real-time |
|
|
191
|
-
| [System 3] | Sync | REST API | Inventory levels | Every 5 min |
|
|
192
|
-
|
|
193
|
-
### API Contracts
|
|
194
|
-
|
|
195
|
-
#### [External API 1]
|
|
196
|
-
|
|
197
|
-
**Base URL:** https://external-system.com/api/v1
|
|
198
|
-
**Authentication:** API Key in header
|
|
199
|
-
|
|
200
|
-
| Endpoint | Method | Purpose |
|
|
201
|
-
|----------|--------|---------|
|
|
202
|
-
| /resources | GET | Fetch resources |
|
|
203
|
-
| /resources | POST | Create resource |
|
|
204
|
-
|
|
205
|
-
---
|
|
206
|
-
|
|
207
|
-
## Cross-Cutting Concerns
|
|
208
|
-
|
|
209
|
-
### Security
|
|
210
|
-
|
|
211
|
-
| Concern | Implementation |
|
|
212
|
-
|---------|---------------|
|
|
213
|
-
| Authentication | JWT tokens via API Gateway |
|
|
214
|
-
| Authorization | Role-based (RBAC) |
|
|
215
|
-
| Data Protection | TLS 1.3, AES-256 at rest |
|
|
216
|
-
| Secrets | HashiCorp Vault |
|
|
217
|
-
|
|
218
|
-
### Observability
|
|
219
|
-
|
|
220
|
-
| Concern | Tool | Implementation |
|
|
221
|
-
|---------|------|----------------|
|
|
222
|
-
| Logging | Loki + zerolog | Structured JSON logs |
|
|
223
|
-
| Metrics | VictoriaMetrics | Prometheus exposition |
|
|
224
|
-
| Tracing | Tempo | OpenTelemetry |
|
|
225
|
-
| Profiling | Pyroscope | Continuous profiling |
|
|
226
|
-
|
|
227
|
-
### Error Handling
|
|
228
|
-
|
|
229
|
-
| Error Type | HTTP Code | Strategy |
|
|
230
|
-
|------------|-----------|----------|
|
|
231
|
-
| Validation | 400 | Return structured errors |
|
|
232
|
-
| Not Found | 404 | Return with message |
|
|
233
|
-
| Business Rule | 422 | Return with error code |
|
|
234
|
-
| Internal | 500 | Log + correlation ID |
|
|
235
|
-
| External Failure | 503 | Circuit breaker + retry |
|
|
236
|
-
|
|
237
|
-
---
|
|
238
|
-
|
|
239
|
-
## Architecture Decision Records (ADRs)
|
|
240
|
-
|
|
241
|
-
### ADR-001: [Decision Title]
|
|
242
|
-
|
|
243
|
-
**Status:** Accepted | Superseded | Deprecated
|
|
244
|
-
**Date:** YYYY-MM-DD
|
|
245
|
-
**Deciders:** [Names]
|
|
246
|
-
|
|
247
|
-
**Context:**
|
|
248
|
-
[Why this decision was needed - the problem or requirement]
|
|
249
|
-
|
|
250
|
-
**Decision:**
|
|
251
|
-
[What was decided - the chosen solution]
|
|
252
|
-
|
|
253
|
-
**Consequences:**
|
|
254
|
-
- **Positive:** [Benefits]
|
|
255
|
-
- **Negative:** [Trade-offs]
|
|
256
|
-
- **Risks:** [What could go wrong]
|
|
257
|
-
|
|
258
|
-
**Alternatives Considered:**
|
|
259
|
-
1. [Alternative 1] - Rejected because [reason]
|
|
260
|
-
2. [Alternative 2] - Rejected because [reason]
|
|
261
|
-
|
|
262
|
-
---
|
|
263
|
-
|
|
264
|
-
### ADR-002: [Decision Title]
|
|
265
|
-
|
|
266
|
-
[Same structure...]
|
|
267
|
-
|
|
268
|
-
---
|
|
269
|
-
|
|
270
|
-
## NFR Compliance
|
|
271
|
-
|
|
272
|
-
| NFR ID | Requirement | Architectural Support |
|
|
273
|
-
|--------|-------------|----------------------|
|
|
274
|
-
| NFR-001 | Response time < 200ms | Caching, connection pooling |
|
|
275
|
-
| NFR-002 | 99.9% availability | K8s HA, health checks |
|
|
276
|
-
| NFR-003 | 1000 RPS throughput | Horizontal scaling |
|
|
277
|
-
| NFR-010 | Data encryption | TLS + encryption at rest |
|
|
278
|
-
|
|
279
|
-
---
|
|
280
|
-
|
|
281
|
-
## Deployment Architecture
|
|
282
|
-
|
|
283
|
-
### Infrastructure
|
|
284
|
-
|
|
285
|
-
```
|
|
286
|
-
┌─────────────────────────────────────────────────────────────┐
|
|
287
|
-
│ Kubernetes Cluster │
|
|
288
|
-
│ ┌──────────────────────────────────────────────────────┐ │
|
|
289
|
-
│ │ Namespace: prod │ │
|
|
290
|
-
│ │ ┌────────────┐ ┌────────────┐ ┌────────────┐ │ │
|
|
291
|
-
│ │ │ Service A │ │ Service B │ │ Service C │ │ │
|
|
292
|
-
│ │ │ (3 pods) │ │ (3 pods) │ │ (2 pods) │ │ │
|
|
293
|
-
│ │ └────────────┘ └────────────┘ └────────────┘ │ │
|
|
294
|
-
│ └──────────────────────────────────────────────────────┘ │
|
|
295
|
-
│ │
|
|
296
|
-
│ ┌──────────────────────────────────────────────────────┐ │
|
|
297
|
-
│ │ External Services │ │
|
|
298
|
-
│ │ PostgreSQL (RDS) Kafka (MSK) Redis (Elasticache)│ │
|
|
299
|
-
│ └──────────────────────────────────────────────────────┘ │
|
|
300
|
-
└─────────────────────────────────────────────────────────────┘
|
|
301
|
-
```
|
|
302
|
-
|
|
303
|
-
### Scaling Strategy
|
|
304
|
-
|
|
305
|
-
| Service | Min Pods | Max Pods | Scaling Metric |
|
|
306
|
-
|---------|----------|----------|----------------|
|
|
307
|
-
| Service A | 3 | 10 | CPU > 70% |
|
|
308
|
-
| Service B | 3 | 8 | RPS > 500 |
|
|
309
|
-
|
|
310
|
-
---
|
|
311
|
-
|
|
312
|
-
## Risks & Technical Debt
|
|
313
|
-
|
|
314
|
-
| Item | Type | Impact | Mitigation Plan | Owner |
|
|
315
|
-
|------|------|--------|-----------------|-------|
|
|
316
|
-
| [Item 1] | Risk | High | [Plan] | [Name] |
|
|
317
|
-
| [Item 2] | Tech Debt | Medium | [Plan] | [Name] |
|
|
318
|
-
|
|
319
|
-
---
|
|
320
|
-
|
|
321
|
-
## Diagrams
|
|
322
|
-
|
|
323
|
-
### C4 - Container Diagram
|
|
324
|
-
|
|
325
|
-
[Link to diagram or embedded]
|
|
326
|
-
|
|
327
|
-
### Sequence Diagram - [Flow Name]
|
|
328
|
-
|
|
329
|
-
```
|
|
330
|
-
┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐
|
|
331
|
-
│Client│ │ API │ │Svc A│ │ DB │
|
|
332
|
-
└──┬──┘ └──┬──┘ └──┬──┘ └──┬──┘
|
|
333
|
-
│ request │ │ │
|
|
334
|
-
│──────────>│ │ │
|
|
335
|
-
│ │ forward │ │
|
|
336
|
-
│ │──────────>│ │
|
|
337
|
-
│ │ │ query │
|
|
338
|
-
│ │ │──────────>│
|
|
339
|
-
│ │ │ result │
|
|
340
|
-
│ │ │<──────────│
|
|
341
|
-
│ │ response │ │
|
|
342
|
-
│ │<──────────│ │
|
|
343
|
-
│ response │ │ │
|
|
344
|
-
│<──────────│ │ │
|
|
345
|
-
```
|
|
346
|
-
|
|
347
|
-
---
|
|
348
|
-
|
|
349
|
-
## References
|
|
350
|
-
|
|
351
|
-
- CLAUDE.md - Coding standards and patterns
|
|
352
|
-
- PRD - Product requirements
|
|
353
|
-
- docs/architecture/adr/ - All ADRs
|
|
354
|
-
|
|
355
|
-
---
|
|
356
|
-
|
|
357
|
-
## Revision History
|
|
358
|
-
|
|
359
|
-
| Version | Date | Author | Changes |
|
|
360
|
-
|---------|------|--------|---------|
|
|
361
|
-
| 0.1 | YYYY-MM-DD | [Name] | Initial draft |
|
|
362
|
-
| 1.0 | YYYY-MM-DD | [Name] | Approved |
|
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
# Epic {{epic_number}}: {{epic_title}}
|
|
2
|
-
|
|
3
|
-
**Epic ID:** {{module}}-E{{epic_number}}
|
|
4
|
-
**Status:** TODO | IN_PROGRESS | DONE
|
|
5
|
-
**Priority:** P0 | P1 | P2
|
|
6
|
-
**Sprint:** sprint-{{sprint_number}}
|
|
7
|
-
**Branch:** feature/epic-{{epic_number}}-{{short_name}}
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## Overview
|
|
12
|
-
|
|
13
|
-
[2-3 sentences describing what this epic delivers and why it matters]
|
|
14
|
-
|
|
15
|
-
### Business Value
|
|
16
|
-
|
|
17
|
-
[Why is this epic important? What problem does it solve?]
|
|
18
|
-
|
|
19
|
-
### Dependencies
|
|
20
|
-
|
|
21
|
-
**Requires (must complete first):**
|
|
22
|
-
- [Epic ID]: [brief reason]
|
|
23
|
-
|
|
24
|
-
**Enables (unlocks these):**
|
|
25
|
-
- [Epic ID]: [brief reason]
|
|
26
|
-
|
|
27
|
-
### Technical Documentation (MANDATORY)
|
|
28
|
-
|
|
29
|
-
**Documents used to create this epic:**
|
|
30
|
-
- [ ] `CLAUDE.md` - Project patterns and conventions
|
|
31
|
-
- [ ] `docs/architecture.md` - Section: [specific section]
|
|
32
|
-
- [ ] `docs/architecture/{{module}}/` - Module documentation
|
|
33
|
-
- [ ] `index.md` - Module overview
|
|
34
|
-
- [ ] `architecture.md` - Module design
|
|
35
|
-
- [ ] `data-model.md` - Database schema
|
|
36
|
-
- [ ] `api/` - API contracts
|
|
37
|
-
- [ ] `events/` - Event schemas
|
|
38
|
-
|
|
39
|
-
### Architecture References
|
|
40
|
-
|
|
41
|
-
- [Link to architecture section that this epic implements]
|
|
42
|
-
- [Link to data model section]
|
|
43
|
-
- [Link to API contracts if applicable]
|
|
44
|
-
|
|
45
|
-
### PRD Coverage
|
|
46
|
-
|
|
47
|
-
| FR ID | Requirement | Covered |
|
|
48
|
-
|-------|-------------|---------|
|
|
49
|
-
| FR-XXX | [description] | [ ] |
|
|
50
|
-
| FR-YYY | [description] | [ ] |
|
|
51
|
-
|
|
52
|
-
---
|
|
53
|
-
|
|
54
|
-
## Acceptance Criteria
|
|
55
|
-
|
|
56
|
-
- [ ] [High-level acceptance criterion 1]
|
|
57
|
-
- [ ] [High-level acceptance criterion 2]
|
|
58
|
-
- [ ] [High-level acceptance criterion 3]
|
|
59
|
-
- [ ] All stories completed and reviewed
|
|
60
|
-
- [ ] All tests passing
|
|
61
|
-
- [ ] Documentation updated
|
|
62
|
-
|
|
63
|
-
---
|
|
64
|
-
|
|
65
|
-
## Stories
|
|
66
|
-
|
|
67
|
-
### Story Breakdown
|
|
68
|
-
|
|
69
|
-
| ID | Title | Status | Priority | Est | Tasks | Deps |
|
|
70
|
-
|----|-------|--------|----------|-----|-------|------|
|
|
71
|
-
| {{module}}-S{{epic_number}}-01 | [Domain Layer] | TODO | P0 | M | 6 | - |
|
|
72
|
-
| {{module}}-S{{epic_number}}-02 | [Use Cases] | TODO | P0 | M | 8 | S01 |
|
|
73
|
-
| {{module}}-S{{epic_number}}-03 | [HTTP Handlers] | TODO | P1 | S | 5 | S02 |
|
|
74
|
-
| {{module}}-S{{epic_number}}-04 | [Integration Tests] | TODO | P1 | S | 4 | S03 |
|
|
75
|
-
|
|
76
|
-
### Story Dependency Graph
|
|
77
|
-
|
|
78
|
-
```
|
|
79
|
-
S01 ──► S02 ──► S03 ──► S04
|
|
80
|
-
│ │
|
|
81
|
-
└──────────────┘ (S03 also needs domain from S01)
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
### Story Decomposition Rules
|
|
85
|
-
|
|
86
|
-
Each story MUST:
|
|
87
|
-
1. Be completable (not too big, not too small)
|
|
88
|
-
2. Have self-contained tasks with documentation links
|
|
89
|
-
3. Have clear dependencies on other stories
|
|
90
|
-
4. Map to specific Acceptance Criteria
|
|
91
|
-
|
|
92
|
-
### Recommended Story Order
|
|
93
|
-
|
|
94
|
-
1. **Domain Layer** - Aggregates, value objects, domain services
|
|
95
|
-
2. **Repository Interfaces** - Ports (domain layer)
|
|
96
|
-
3. **Use Cases** - Application layer handlers
|
|
97
|
-
4. **Repository Implementations** - Infrastructure adapters
|
|
98
|
-
5. **HTTP/API Handlers** - Infrastructure entry points
|
|
99
|
-
6. **Events** - Domain events, Kafka publishers
|
|
100
|
-
7. **Integration Tests** - End-to-end verification
|
|
101
|
-
|
|
102
|
-
### Stories by Layer
|
|
103
|
-
|
|
104
|
-
| Layer | Stories | Tasks | Size |
|
|
105
|
-
|-------|---------|-------|------|
|
|
106
|
-
| Domain | 1 | 4 | M |
|
|
107
|
-
| Application | 2 | 6 | M |
|
|
108
|
-
| Infrastructure | 2 | 5 | L |
|
|
109
|
-
| Testing | 1 | 3 | S |
|
|
110
|
-
| **Total** | **6** | **18** | |
|
|
111
|
-
|
|
112
|
-
**Note:** No hour estimates. Size = relative complexity (XS/S/M/L/XL).
|
|
113
|
-
|
|
114
|
-
---
|
|
115
|
-
|
|
116
|
-
## Technical Notes
|
|
117
|
-
|
|
118
|
-
### Key Decisions
|
|
119
|
-
- [Decision 1]
|
|
120
|
-
- [Decision 2]
|
|
121
|
-
|
|
122
|
-
### Implementation Hints
|
|
123
|
-
- [Hint 1]
|
|
124
|
-
- [Hint 2]
|
|
125
|
-
|
|
126
|
-
### Files to Create/Modify
|
|
127
|
-
- `src/path/to/file` - [description]
|
|
128
|
-
- `src/path/to/another` - [description]
|
|
129
|
-
|
|
130
|
-
### Testing Strategy
|
|
131
|
-
- Unit tests: [approach]
|
|
132
|
-
- Integration tests: [approach]
|
|
133
|
-
|
|
134
|
-
---
|
|
135
|
-
|
|
136
|
-
## Risks & Mitigations
|
|
137
|
-
|
|
138
|
-
| Risk | Impact | Probability | Mitigation |
|
|
139
|
-
|------|--------|-------------|------------|
|
|
140
|
-
| [Risk 1] | H/M/L | H/M/L | [How to address] |
|
|
141
|
-
|
|
142
|
-
---
|
|
143
|
-
|
|
144
|
-
## Notes
|
|
145
|
-
|
|
146
|
-
[Any additional context, links, or references]
|
|
147
|
-
|
|
148
|
-
---
|
|
149
|
-
|
|
150
|
-
## Changelog
|
|
151
|
-
|
|
152
|
-
<!-- UPDATE AT END OF SESSION -->
|
|
153
|
-
|
|
154
|
-
| Version | Date | Author | Changes |
|
|
155
|
-
|---------|------|--------|---------|
|
|
156
|
-
| 0.1 | {{date}} | @{{author}} | Initial creation |
|
|
157
|
-
|
|
158
|
-
<!--
|
|
159
|
-
Changelog Guidelines:
|
|
160
|
-
- Update at END of work session
|
|
161
|
-
- Summarize all changes in one entry
|
|
162
|
-
- Version: 0.x=planning, 1.0=sprint-ready, 1.x=in-progress
|
|
163
|
-
|
|
164
|
-
Example:
|
|
165
|
-
| 1.0 | 2024-01-15 | @sm | Add stories S01-S05; Define all AC; Ready for sprint |
|
|
166
|
-
-->
|