@comfanion/workflow 3.9.0 → 4.0.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/package.json +1 -1
- package/src/build-info.json +1 -1
- package/src/opencode/config.yaml +1 -1
- package/src/opencode/skills/epic-writing/SKILL.md +15 -14
- package/src/opencode/skills/story-writing/SKILL.md +120 -180
- package/src/opencode/templates/epic-template.md +12 -10
- package/src/opencode/templates/story-template.md +79 -137
package/package.json
CHANGED
package/src/build-info.json
CHANGED
package/src/opencode/config.yaml
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
# PROJECT CONFIGURATION
|
|
7
7
|
# =============================================================================
|
|
8
8
|
project_name: "ai-wf"
|
|
9
|
-
version: "
|
|
9
|
+
version: "4.0.0"
|
|
10
10
|
|
|
11
11
|
# =============================================================================
|
|
12
12
|
# USER CONFIGURATION
|
|
@@ -206,26 +206,27 @@ S01 (Domain) ──┬──► S02 (Repo Interface) ──► S04 (Repo Impl)
|
|
|
206
206
|
└──► S03 (Use Cases) ──► S05 (HTTP) ─┴──► S06 (Events) ──► S07 (Tests)
|
|
207
207
|
```
|
|
208
208
|
|
|
209
|
-
###
|
|
209
|
+
### Story Breakdown
|
|
210
210
|
|
|
211
211
|
```markdown
|
|
212
|
-
###
|
|
213
|
-
|
|
214
|
-
| Story | Tasks |
|
|
215
|
-
|
|
216
|
-
| S01 | 4 |
|
|
217
|
-
| S02 | 3 |
|
|
218
|
-
| S03 | 5 |
|
|
219
|
-
| S04 | 4 |
|
|
220
|
-
| S05 | 3 |
|
|
221
|
-
| S06 | 3 |
|
|
222
|
-
| S07 | 3 |
|
|
223
|
-
| **Total** | **25** |
|
|
212
|
+
### Stories Summary
|
|
213
|
+
|
|
214
|
+
| Story | Tasks | Size | Deps |
|
|
215
|
+
|-------|-------|------|------|
|
|
216
|
+
| S01 | 4 | M | - |
|
|
217
|
+
| S02 | 3 | S | S01 |
|
|
218
|
+
| S03 | 5 | L | S01 |
|
|
219
|
+
| S04 | 4 | M | S02 |
|
|
220
|
+
| S05 | 3 | S | S03 |
|
|
221
|
+
| S06 | 3 | S | S04 |
|
|
222
|
+
| S07 | 3 | S | S05,S06 |
|
|
223
|
+
| **Total** | **25** | | |
|
|
224
224
|
|
|
225
225
|
**Parallel Opportunities:** S02+S03, S04+S05
|
|
226
|
-
**With Parallelism:** ~10 days (2 weeks)
|
|
227
226
|
```
|
|
228
227
|
|
|
228
|
+
**Note:** No hour estimates. Use T-shirt sizes (XS/S/M/L/XL) for relative complexity.
|
|
229
|
+
|
|
229
230
|
## Epic Sizing
|
|
230
231
|
|
|
231
232
|
### Guidelines
|
|
@@ -92,11 +92,13 @@ Use template at: `@.opencode/templates/story-template.md`
|
|
|
92
92
|
|
|
93
93
|
**Story ID:** [MODULE]-S[EPIC]-[NN]
|
|
94
94
|
**Epic:** [MODULE]-E[EPIC] - [Epic Title]
|
|
95
|
-
**Status:**
|
|
95
|
+
**Status:** draft | ready-for-dev | in-progress | review | done
|
|
96
96
|
**Priority:** P0 | P1 | P2
|
|
97
|
-
**
|
|
97
|
+
**Size:** XS | S | M | L | XL
|
|
98
98
|
```
|
|
99
99
|
|
|
100
|
+
**Note:** Size is relative complexity (T-shirt sizing). NO hour estimates for tasks.
|
|
101
|
+
|
|
100
102
|
### User Story Format (MANDATORY)
|
|
101
103
|
|
|
102
104
|
```markdown
|
|
@@ -187,19 +189,23 @@ Each story should have:
|
|
|
187
189
|
- **Authorization** - Permission checks
|
|
188
190
|
- **Edge cases** - Boundary conditions
|
|
189
191
|
|
|
190
|
-
##
|
|
192
|
+
## Self-Contained Tasks (NO ESTIMATES)
|
|
191
193
|
|
|
192
|
-
### Task
|
|
194
|
+
### Task Philosophy
|
|
195
|
+
|
|
196
|
+
**CRITICAL:** Tasks must be **SELF-CONTAINED** - an AI agent or developer can take ANY task and execute it independently without asking questions.
|
|
197
|
+
|
|
198
|
+
**NO ESTIMATES** - Don't estimate time. Focus on clear scope and outcomes.
|
|
193
199
|
|
|
194
|
-
|
|
200
|
+
### Task Decomposition Rules
|
|
195
201
|
|
|
196
202
|
| Rule | Description |
|
|
197
203
|
|------|-------------|
|
|
198
|
-
| **
|
|
199
|
-
| **
|
|
200
|
-
| **
|
|
201
|
-
| **
|
|
202
|
-
| **
|
|
204
|
+
| **Self-contained** | Task has ALL information needed to execute |
|
|
205
|
+
| **Documentation links** | Every task links to relevant docs, schemas, examples |
|
|
206
|
+
| **Clear input/output** | What exists before, what must exist after |
|
|
207
|
+
| **Testable outcome** | How to verify task is complete |
|
|
208
|
+
| **Independent execution** | Can be picked up without context from other tasks |
|
|
203
209
|
|
|
204
210
|
## Development Methodologies
|
|
205
211
|
|
|
@@ -235,203 +241,137 @@ Interface → Stub Implementation → Tests → Real Implementation
|
|
|
235
241
|
|
|
236
242
|
**Best for:** Exploratory work, unclear requirements, rapid prototyping
|
|
237
243
|
|
|
238
|
-
### Task Structure
|
|
244
|
+
### Task Structure (MANDATORY FORMAT)
|
|
239
245
|
|
|
240
|
-
|
|
241
|
-
```markdown
|
|
242
|
-
### T2: Implement {{Entity}} Aggregate + Tests
|
|
243
|
-
- **Estimate:** 5h
|
|
244
|
-
- **Depends on:** T1
|
|
245
|
-
- **Methodology:** TDD
|
|
246
|
-
- **Deliverables:**
|
|
247
|
-
- [ ] Aggregate: `domain/aggregate/entity.go`
|
|
248
|
-
- [ ] Value objects: `domain/valueobject/*.go`
|
|
249
|
-
- **Validation Test:** `domain/aggregate/entity_test.go`
|
|
250
|
-
- [ ] Test creation happy path
|
|
251
|
-
- [ ] Test validation errors
|
|
252
|
-
- [ ] Test business rules
|
|
253
|
-
- [ ] **⚠️ ALL TESTS MUST PASS**
|
|
254
|
-
```
|
|
246
|
+
Each task MUST have this structure to be self-contained:
|
|
255
247
|
|
|
256
|
-
**STUB Task:**
|
|
257
248
|
```markdown
|
|
258
|
-
###
|
|
259
|
-
- **Estimate:** 6h
|
|
260
|
-
- **Depends on:** T1
|
|
261
|
-
- **Methodology:** STUB
|
|
262
|
-
- **Deliverables:**
|
|
263
|
-
- [ ] Stub: `infrastructure/repo/entity_memory_repo.go`
|
|
264
|
-
- [ ] Real: `infrastructure/repo/entity_postgres_repo.go`
|
|
265
|
-
- **Validation Test:** `infrastructure/repo/entity_repo_test.go`
|
|
266
|
-
- [ ] Test Save, FindByID, List
|
|
267
|
-
- [ ] Test with stub first
|
|
268
|
-
- [ ] Replace stub with real
|
|
269
|
-
- [ ] **⚠️ ALL TESTS MUST PASS**
|
|
270
|
-
```
|
|
249
|
+
### T{N}: {Clear Task Name}
|
|
271
250
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
### Task Types
|
|
251
|
+
**Goal:** One sentence describing what this task achieves.
|
|
275
252
|
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
| GREEN | 🟢 | Implement to pass tests |
|
|
281
|
-
| STUB | 🧪 | Stub implementation (STUB methodology) |
|
|
282
|
-
| REFACTOR | 🔵 | Clean up, no new functionality |
|
|
283
|
-
| INTEGRATION | 🔗 | E2E integration test |
|
|
284
|
-
| DOCS | 📝 | Documentation only |
|
|
253
|
+
**Documentation:**
|
|
254
|
+
- [AGENTS.md#section](../../../AGENTS.md#section) - Relevant coding patterns
|
|
255
|
+
- [data-model.md#table](../docs/data-model.md#table) - Database schema
|
|
256
|
+
- [example.go](../src/path/example.go) - Pattern to follow
|
|
285
257
|
|
|
286
|
-
|
|
258
|
+
**Input (Prerequisites):**
|
|
259
|
+
- T{N-1} completed (if dependent)
|
|
260
|
+
- Existing file: `path/to/existing.go` - what it provides
|
|
261
|
+
- Repository interface defined in: `path/to/interface.go`
|
|
287
262
|
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
-
|
|
291
|
-
- **Depends on:** T1, T2 | - (none)
|
|
292
|
-
- **Blocks:** T5, T6 | - (none)
|
|
293
|
-
- **Type:** 🔴 RED | 🟢 GREEN | 🔵 REFACTOR | 📝 DOCS
|
|
294
|
-
- **Files:** `path/to/file.go`
|
|
295
|
-
- **Definition of Done:**
|
|
296
|
-
- [ ] Specific deliverable 1
|
|
297
|
-
- [ ] Specific deliverable 2
|
|
298
|
-
- **Notes:** Implementation hints
|
|
299
|
-
```
|
|
263
|
+
**Output (Deliverables):**
|
|
264
|
+
- `path/to/new_file.go` - Description of what this file does
|
|
265
|
+
- `path/to/new_file_test.go` - Tests covering X, Y, Z
|
|
300
266
|
|
|
301
|
-
|
|
267
|
+
**Implementation Steps:**
|
|
268
|
+
1. Read documentation links above
|
|
269
|
+
2. Create file structure following pattern from [example.go]
|
|
270
|
+
3. Implement X following AGENTS.md conventions
|
|
271
|
+
4. Write tests covering: happy path, validation errors, edge cases
|
|
272
|
+
5. Run tests, ensure all pass
|
|
302
273
|
|
|
303
|
-
|
|
274
|
+
**Acceptance Criteria:**
|
|
275
|
+
- [ ] File created at correct path
|
|
276
|
+
- [ ] Follows naming conventions from AGENTS.md
|
|
277
|
+
- [ ] All tests pass: `go test ./path/to/...`
|
|
278
|
+
- [ ] No linting errors: `golangci-lint run`
|
|
304
279
|
|
|
280
|
+
**Notes:** Additional hints, gotchas, or context
|
|
305
281
|
```
|
|
306
|
-
T1 ──┬──► T2 ──► T4
|
|
307
|
-
│ │
|
|
308
|
-
└──► T3 ────┴──► T5 ──► T6
|
|
309
|
-
```
|
|
310
282
|
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
283
|
+
### Why This Structure?
|
|
284
|
+
|
|
285
|
+
| Section | Purpose |
|
|
286
|
+
|---------|---------|
|
|
287
|
+
| **Goal** | Agent knows the "why" |
|
|
288
|
+
| **Documentation** | Agent can read all needed context |
|
|
289
|
+
| **Input** | Agent knows what must exist before starting |
|
|
290
|
+
| **Output** | Agent knows exactly what to create |
|
|
291
|
+
| **Implementation Steps** | Agent has step-by-step guidance |
|
|
292
|
+
| **Acceptance Criteria** | Agent can verify completion |
|
|
314
293
|
|
|
315
|
-
### Summary Table
|
|
294
|
+
### Tasks Summary Table
|
|
316
295
|
|
|
317
296
|
```markdown
|
|
318
|
-
| ID | Task |
|
|
319
|
-
|
|
320
|
-
| T1 |
|
|
321
|
-
| T2 | Repository
|
|
322
|
-
| T3 | Use
|
|
323
|
-
| T4 |
|
|
324
|
-
| T5 | HTTP
|
|
325
|
-
| T6 | Integration tests + refactor | 5h | T4, T5 | ⬜ |
|
|
297
|
+
| ID | Task | Deps | Status |
|
|
298
|
+
|----|------|------|--------|
|
|
299
|
+
| T1 | MerchantProduct Aggregate + Value Objects | - | ⬜ |
|
|
300
|
+
| T2 | Repository Interface | T1 | ⬜ |
|
|
301
|
+
| T3 | CreateProduct Use Case | T2 | ⬜ |
|
|
302
|
+
| T4 | PostgreSQL Repository Implementation | T2 | ⬜ |
|
|
303
|
+
| T5 | HTTP Handler + Routes | T3, T4 | ⬜ |
|
|
326
304
|
```
|
|
327
305
|
|
|
328
306
|
**Status:** ⬜ TODO | 🔄 IN_PROGRESS | ✅ DONE | ⏸️ BLOCKED
|
|
329
307
|
|
|
330
|
-
###
|
|
331
|
-
|
|
332
|
-
Group tasks by parallel execution opportunity:
|
|
333
|
-
|
|
334
|
-
```markdown
|
|
335
|
-
### Execution Order
|
|
336
|
-
|
|
337
|
-
Phase 1: T1 (no deps)
|
|
338
|
-
Phase 2: T2, T3 (parallel - both depend only on T1)
|
|
339
|
-
Phase 3: T4, T6 (parallel - independent branches)
|
|
340
|
-
Phase 4: T5 (waits for T3, T4)
|
|
341
|
-
Phase 5: T7 (waits for T5)
|
|
342
|
-
Phase 6: T8, T6-continued (parallel)
|
|
343
|
-
Phase 7: T9 (waits for T6, T8)
|
|
344
|
-
Phase 8: T10 (final)
|
|
345
|
-
|
|
346
|
-
**Critical Path:** T1 → T2 → T4 → T5 → T7 → T8 → T9 → T10
|
|
347
|
-
**Total Estimate:** 32h (4 days)
|
|
348
|
-
**Parallel Savings:** ~3h (25%)
|
|
349
|
-
```
|
|
308
|
+
### Dependency Graph (Optional)
|
|
350
309
|
|
|
351
|
-
### Example: CreateProduct Story Tasks
|
|
352
|
-
|
|
353
|
-
```markdown
|
|
354
|
-
| ID | Task | Est | Depends On | Type |
|
|
355
|
-
|----|------|-----|------------|------|
|
|
356
|
-
| T1 | Domain layer: Product aggregate + value objects + tests | 6h | - | 🔴🟢 |
|
|
357
|
-
| T2 | Repository interface + CreateProduct use case tests | 5h | T1 | 🔴 |
|
|
358
|
-
| T3 | CreateProduct use case implementation | 5h | T2 | 🟢 |
|
|
359
|
-
| T4 | PostgreSQL repository implementation + tests | 6h | T2 | 🟢 |
|
|
360
|
-
| T5 | HTTP handler + tests | 5h | T3 | 🔴🟢 |
|
|
361
|
-
| T6 | Integration tests + refactor + documentation | 5h | T4, T5 | 🔵 |
|
|
362
|
-
|
|
363
|
-
**Graph:**
|
|
364
|
-
T1 ──► T2 ──┬──► T4 ──► T5 ──► T7 ──► T8 ──┬──► T9 ──► T10
|
|
365
|
-
│ │
|
|
366
|
-
T3 ─────────┴───────────► T6 ───────────────┘
|
|
367
310
|
```
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
If a task exceeds 6h, consider splitting it. **Each task MUST have validation test.**
|
|
372
|
-
|
|
373
|
-
| Original (8h+) | Split Into (with tests) |
|
|
374
|
-
|----------------|------------------------|
|
|
375
|
-
| "Full domain layer" (10h) | **T1:** Value objects + tests (4h)<br>**T2:** Aggregate + business rules + tests (6h) |
|
|
376
|
-
| "Full repository" (10h) | **T1:** Interface + Save/FindByID + tests (5h)<br>**T2:** List/Search + advanced queries + tests (5h) |
|
|
377
|
-
|
|
378
|
-
### Task Template with Validation
|
|
379
|
-
|
|
380
|
-
```markdown
|
|
381
|
-
### T{N}: {Task Name}
|
|
382
|
-
- **Estimate:** 5h
|
|
383
|
-
- **Depends on:** T{N-1}
|
|
384
|
-
- **Methodology:** TDD | STUB
|
|
385
|
-
- **Deliverables:**
|
|
386
|
-
- [ ] File: `path/to/implementation.go`
|
|
387
|
-
- [ ] File: `path/to/implementation2.go`
|
|
388
|
-
- **Validation Test:** `path/to/implementation_test.go`
|
|
389
|
-
- [ ] Test case 1: happy path
|
|
390
|
-
- [ ] Test case 2: error handling
|
|
391
|
-
- [ ] Test case 3: edge case
|
|
392
|
-
- [ ] **⚠️ ALL TESTS MUST PASS** ← MANDATORY
|
|
393
|
-
- **Notes:** Implementation hints
|
|
311
|
+
T1 ──► T2 ──┬──► T3 ──┬──► T5
|
|
312
|
+
│ │
|
|
313
|
+
└──► T4 ──┘
|
|
394
314
|
```
|
|
395
315
|
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
**Every task MUST have:**
|
|
399
|
-
|
|
400
|
-
| Test Type | Required | Description |
|
|
401
|
-
|-----------|----------|-------------|
|
|
402
|
-
| Happy path | ✅ Yes | Normal success case |
|
|
403
|
-
| Error handling | ✅ Yes | Expected failures |
|
|
404
|
-
| Edge cases | Recommended | Boundary conditions |
|
|
405
|
-
| **Pass gate** | ✅ MANDATORY | `⚠️ ALL TESTS MUST PASS` |
|
|
316
|
+
---
|
|
406
317
|
|
|
407
|
-
|
|
318
|
+
## Full Task Example
|
|
408
319
|
|
|
409
|
-
|
|
410
|
-
```markdown
|
|
411
|
-
### T2: Implement Product Aggregate
|
|
412
|
-
- **Methodology:** TDD
|
|
413
|
-
- **Deliverables:**
|
|
414
|
-
- [ ] `domain/aggregate/product.go`
|
|
415
|
-
- **Validation Test:** `domain/aggregate/product_test.go`
|
|
416
|
-
- [ ] 🔴 Write test first (should FAIL)
|
|
417
|
-
- [ ] 🟢 Implement until test PASSES
|
|
418
|
-
- [ ] 🔵 Refactor, tests still PASS
|
|
419
|
-
- [ ] **⚠️ ALL TESTS MUST PASS**
|
|
420
|
-
```
|
|
320
|
+
Here's a complete example of a self-contained task:
|
|
421
321
|
|
|
422
|
-
**STUB Example:**
|
|
423
322
|
```markdown
|
|
424
|
-
###
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
323
|
+
### T1: MerchantProduct Aggregate + Value Objects
|
|
324
|
+
|
|
325
|
+
**Goal:** Create the MerchantProduct aggregate with all value objects and domain validation.
|
|
326
|
+
|
|
327
|
+
**Documentation:**
|
|
328
|
+
- [AGENTS.md#type-safety](../../../AGENTS.md#type-safety) - Value object patterns
|
|
329
|
+
- [AGENTS.md#naming-conventions](../../../AGENTS.md#naming-conventions) - File/package naming
|
|
330
|
+
- [catalog-data-model.md#merchant_products](../docs/catalog-data-model.md#31-merchant-products) - Database schema
|
|
331
|
+
- [modules/catalog/domain/entity/marketplace_category.go](../src/services/catalog/modules/catalog/domain/entity/marketplace_category.go) - Example entity pattern
|
|
332
|
+
|
|
333
|
+
**Input (Prerequisites):**
|
|
334
|
+
- None (first task in story)
|
|
335
|
+
- Existing patterns in `modules/catalog/domain/` to follow
|
|
336
|
+
|
|
337
|
+
**Output (Deliverables):**
|
|
338
|
+
- `modules/catalog/domain/valueobject/merchant_id.go` - UUID wrapper with validation
|
|
339
|
+
- `modules/catalog/domain/valueobject/product_id.go` - UUID wrapper
|
|
340
|
+
- `modules/catalog/domain/valueobject/merchant_sku.go` - String with max length validation
|
|
341
|
+
- `modules/catalog/domain/valueobject/ean.go` - GTIN-13 checksum validation
|
|
342
|
+
- `modules/catalog/domain/valueobject/product_status.go` - Enum (pending, active, etc.)
|
|
343
|
+
- `modules/catalog/domain/entity/merchant_product.go` - Aggregate with private fields + getters
|
|
344
|
+
- `modules/catalog/domain/entity/merchant_product_test.go` - All tests
|
|
345
|
+
|
|
346
|
+
**Implementation Steps:**
|
|
347
|
+
1. Read AGENTS.md sections on value objects and naming
|
|
348
|
+
2. Look at existing `marketplace_category.go` for entity pattern
|
|
349
|
+
3. Create value objects with `New*()` factory functions that validate
|
|
350
|
+
4. Create aggregate with private fields, public getters, factory method
|
|
351
|
+
5. Write tests: creation happy path, validation errors, status transitions
|
|
352
|
+
6. Run `go test ./modules/catalog/domain/...`
|
|
353
|
+
|
|
354
|
+
**Acceptance Criteria:**
|
|
355
|
+
- [ ] All files created at correct paths
|
|
356
|
+
- [ ] Value objects validate on construction (not setters)
|
|
357
|
+
- [ ] EAN validates GTIN-13 checksum
|
|
358
|
+
- [ ] Aggregate uses private fields with getters
|
|
359
|
+
- [ ] Tests cover: valid creation, invalid data rejection, status transitions
|
|
360
|
+
- [ ] `go test ./modules/catalog/domain/...` passes
|
|
361
|
+
- [ ] `golangci-lint run ./modules/catalog/domain/...` passes
|
|
362
|
+
|
|
363
|
+
**Notes:**
|
|
364
|
+
- EAN checksum algorithm: sum odd positions × 1, even × 3, check digit makes sum divisible by 10
|
|
365
|
+
- Status enum values from PRD: pending, pending_category, pending_dedup, pending_pim, active, declined
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
### What Makes This Task Self-Contained?
|
|
369
|
+
|
|
370
|
+
1. **Agent can start immediately** - all documentation links provided
|
|
371
|
+
2. **No guessing** - exact file paths specified
|
|
372
|
+
3. **Pattern to follow** - links to existing code examples
|
|
373
|
+
4. **Clear verification** - specific test commands and criteria
|
|
374
|
+
5. **Context included** - notes explain non-obvious details (EAN algorithm)
|
|
435
375
|
|
|
436
376
|
## Definition of Done
|
|
437
377
|
|
|
@@ -84,8 +84,8 @@ S01 ──► S02 ──► S03 ──► S04
|
|
|
84
84
|
### Story Decomposition Rules
|
|
85
85
|
|
|
86
86
|
Each story MUST:
|
|
87
|
-
1. Be completable
|
|
88
|
-
2. Have
|
|
87
|
+
1. Be completable (not too big, not too small)
|
|
88
|
+
2. Have self-contained tasks with documentation links
|
|
89
89
|
3. Have clear dependencies on other stories
|
|
90
90
|
4. Map to specific Acceptance Criteria
|
|
91
91
|
|
|
@@ -99,15 +99,17 @@ Each story MUST:
|
|
|
99
99
|
6. **Events** - Domain events, Kafka publishers
|
|
100
100
|
7. **Integration Tests** - End-to-end verification
|
|
101
101
|
|
|
102
|
-
###
|
|
102
|
+
### Stories by Layer
|
|
103
103
|
|
|
104
|
-
| Layer | Stories | Tasks |
|
|
105
|
-
|
|
106
|
-
| Domain | 1 | 4 |
|
|
107
|
-
| Application |
|
|
108
|
-
| Infrastructure | 2 | 5 |
|
|
109
|
-
| Testing | 1 | 3 |
|
|
110
|
-
| **Total** | **
|
|
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).
|
|
111
113
|
|
|
112
114
|
---
|
|
113
115
|
|
|
@@ -10,7 +10,7 @@ workflowType: 'story'
|
|
|
10
10
|
**Epic:** {{module}}-E{{epic_number}} - {{epic_title}}
|
|
11
11
|
**Status:** draft | ready-for-dev | in-progress | review | done | blocked
|
|
12
12
|
**Priority:** P0 | P1 | P2
|
|
13
|
-
**
|
|
13
|
+
**Size:** XS | S | M | L | XL
|
|
14
14
|
**Created:** {{date}}
|
|
15
15
|
**Last Updated:** {{date}}
|
|
16
16
|
|
|
@@ -47,170 +47,112 @@ workflowType: 'story'
|
|
|
47
47
|
|
|
48
48
|
---
|
|
49
49
|
|
|
50
|
-
##
|
|
50
|
+
## Self-Contained Tasks
|
|
51
51
|
|
|
52
52
|
<!--
|
|
53
|
-
|
|
54
|
-
-
|
|
55
|
-
-
|
|
56
|
-
|
|
57
|
-
RULES:
|
|
58
|
-
- Each task is 4-6 hours of focused work
|
|
59
|
-
- Each task includes TEST as validation gate
|
|
60
|
-
- Tasks have explicit dependencies
|
|
61
|
-
- Dev agent respects dependency order
|
|
53
|
+
Each task MUST be self-contained:
|
|
54
|
+
- Agent can execute WITHOUT asking questions
|
|
55
|
+
- All documentation links provided
|
|
56
|
+
- Clear input/output/acceptance criteria
|
|
62
57
|
-->
|
|
63
58
|
|
|
64
|
-
###
|
|
59
|
+
### Tasks Summary
|
|
65
60
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
5. Validate: Test MUST pass
|
|
74
|
-
{{/if}}
|
|
75
|
-
{{#if methodology == "stub"}}
|
|
76
|
-
STUB Flow per Task:
|
|
77
|
-
1. Define Interface/Contract
|
|
78
|
-
2. Write Stub Implementation (returns mock data)
|
|
79
|
-
3. Write Tests against Stub
|
|
80
|
-
4. Replace Stub with Real Implementation
|
|
81
|
-
5. Validate: Test MUST pass
|
|
82
|
-
{{/if}}
|
|
83
|
-
```
|
|
61
|
+
| ID | Task | Deps | Status |
|
|
62
|
+
|----|------|------|--------|
|
|
63
|
+
| T1 | {{task_1_name}} | - | ⬜ |
|
|
64
|
+
| T2 | {{task_2_name}} | T1 | ⬜ |
|
|
65
|
+
| T3 | {{task_3_name}} | T2 | ⬜ |
|
|
66
|
+
|
|
67
|
+
**Status:** ⬜ TODO | 🔄 IN_PROGRESS | ✅ DONE | ⏸️ BLOCKED
|
|
84
68
|
|
|
85
69
|
---
|
|
86
70
|
|
|
87
|
-
###
|
|
71
|
+
### T1: {{task_1_name}}
|
|
88
72
|
|
|
89
|
-
|
|
90
|
-
T1 ──┬──► T2 ──► T3
|
|
91
|
-
│
|
|
92
|
-
└──► T4 ──► T5
|
|
93
|
-
│
|
|
94
|
-
T3 ───────────────┴──► T6
|
|
95
|
-
```
|
|
73
|
+
**Goal:** {{what_this_task_achieves}}
|
|
96
74
|
|
|
97
|
-
|
|
75
|
+
**Documentation:**
|
|
76
|
+
- [AGENTS.md#section](../../../AGENTS.md#section) - {{what_pattern}}
|
|
77
|
+
- [data-model.md#table](../../../docs/data-model.md#section) - {{schema_info}}
|
|
78
|
+
- [existing_example.go](../path/to/example.go) - Pattern to follow
|
|
98
79
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
| T2 | {{task_2}} | 6h | T1 | unit | ⬜ |
|
|
103
|
-
| T3 | {{task_3}} | 5h | T2 | unit | ⬜ |
|
|
104
|
-
| T4 | {{task_4}} | 5h | T1 | unit | ⬜ |
|
|
105
|
-
| T5 | {{task_5}} | 5h | T3,T4 | integration | ⬜ |
|
|
80
|
+
**Input (Prerequisites):**
|
|
81
|
+
- {{what_must_exist_before_starting}}
|
|
82
|
+
- Existing file: `path/to/dependency.go` - provides {{what}}
|
|
106
83
|
|
|
107
|
-
**
|
|
84
|
+
**Output (Deliverables):**
|
|
85
|
+
- `path/to/new_file.go` - {{description}}
|
|
86
|
+
- `path/to/new_file_test.go` - Tests for {{what}}
|
|
108
87
|
|
|
109
|
-
|
|
88
|
+
**Implementation Steps:**
|
|
89
|
+
1. Read documentation links above
|
|
90
|
+
2. {{step_2}}
|
|
91
|
+
3. {{step_3}}
|
|
92
|
+
4. Write tests covering: happy path, errors, edge cases
|
|
93
|
+
5. Run: `go test ./path/to/...`
|
|
94
|
+
|
|
95
|
+
**Acceptance Criteria:**
|
|
96
|
+
- [ ] Files created at specified paths
|
|
97
|
+
- [ ] Follows patterns from AGENTS.md
|
|
98
|
+
- [ ] Tests pass: `go test ./path/to/...`
|
|
99
|
+
- [ ] Lint passes: `golangci-lint run`
|
|
110
100
|
|
|
111
|
-
|
|
112
|
-
- **Estimate:** 6h
|
|
113
|
-
- **Depends on:** -
|
|
114
|
-
- **Blocks:** T2
|
|
115
|
-
- **Deliverables:**
|
|
116
|
-
- [ ] Interface/contract defined
|
|
117
|
-
- [ ] Value objects with validation
|
|
118
|
-
- [ ] Aggregate with business rules
|
|
119
|
-
- [ ] Factory methods
|
|
120
|
-
- **Validation Test:**
|
|
121
|
-
- [ ] Value object tests (validation, equality)
|
|
122
|
-
- [ ] Aggregate creation tests
|
|
123
|
-
- [ ] Business rules tests
|
|
124
|
-
- [ ] **⚠️ ALL TESTS MUST PASS**
|
|
125
|
-
- **Notes:** {{implementation_hint}}
|
|
101
|
+
**Notes:** {{additional_context_or_gotchas}}
|
|
126
102
|
|
|
127
103
|
---
|
|
128
104
|
|
|
129
|
-
### T2:
|
|
130
|
-
- **Estimate:** 5h
|
|
131
|
-
- **Depends on:** T1
|
|
132
|
-
- **Blocks:** T3, T4
|
|
133
|
-
- **Deliverables:**
|
|
134
|
-
- [ ] Repository interface (ports)
|
|
135
|
-
- [ ] Use case interface
|
|
136
|
-
- [ ] Use case DTOs (input/output)
|
|
137
|
-
- [ ] Use case tests (with mock repository)
|
|
138
|
-
- **Validation Test:**
|
|
139
|
-
- [ ] Use case happy path test
|
|
140
|
-
- [ ] Use case error handling tests
|
|
141
|
-
- [ ] **⚠️ ALL TESTS MUST PASS**
|
|
142
|
-
- **Notes:** {{implementation_hint}}
|
|
105
|
+
### T2: {{task_2_name}}
|
|
143
106
|
|
|
144
|
-
|
|
107
|
+
**Goal:** {{what_this_task_achieves}}
|
|
145
108
|
|
|
146
|
-
|
|
147
|
-
-
|
|
148
|
-
-
|
|
149
|
-
- **Blocks:** T5
|
|
150
|
-
- **Deliverables:**
|
|
151
|
-
- [ ] Use case handler implementation
|
|
152
|
-
- [ ] Mappers (entity ↔ DTO)
|
|
153
|
-
- [ ] Error handling
|
|
154
|
-
- **Validation Test:**
|
|
155
|
-
- [ ] All use case tests pass
|
|
156
|
-
- [ ] Edge cases covered
|
|
157
|
-
- [ ] **⚠️ ALL TESTS MUST PASS**
|
|
158
|
-
- **Notes:** {{implementation_hint}}
|
|
109
|
+
**Documentation:**
|
|
110
|
+
- [AGENTS.md#section](link) - {{pattern}}
|
|
111
|
+
- [T1 output](../path/from/T1) - Uses types from T1
|
|
159
112
|
|
|
160
|
-
|
|
113
|
+
**Input (Prerequisites):**
|
|
114
|
+
- T1 completed
|
|
115
|
+
- Files from T1: `path/to/aggregate.go`
|
|
161
116
|
|
|
162
|
-
|
|
163
|
-
-
|
|
164
|
-
-
|
|
165
|
-
- **Blocks:** T5
|
|
166
|
-
- **Deliverables (TDD):**
|
|
167
|
-
- [ ] Write repository tests first
|
|
168
|
-
- [ ] PostgreSQL repository implementation
|
|
169
|
-
- **Deliverables (STUB):**
|
|
170
|
-
- [ ] In-memory stub first
|
|
171
|
-
- [ ] PostgreSQL implementation
|
|
172
|
-
- **Validation Test:**
|
|
173
|
-
- [ ] Test Save
|
|
174
|
-
- [ ] Test FindByID (found/not found)
|
|
175
|
-
- [ ] Test List with filters
|
|
176
|
-
- [ ] **⚠️ ALL TESTS MUST PASS**
|
|
177
|
-
- **Notes:** {{implementation_hint}}
|
|
117
|
+
**Output (Deliverables):**
|
|
118
|
+
- `path/to/file.go` - {{description}}
|
|
119
|
+
- `path/to/file_test.go` - Tests
|
|
178
120
|
|
|
179
|
-
|
|
121
|
+
**Implementation Steps:**
|
|
122
|
+
1. {{step}}
|
|
123
|
+
2. {{step}}
|
|
180
124
|
|
|
181
|
-
|
|
182
|
-
-
|
|
183
|
-
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
- [ ] HTTP handler/controller
|
|
187
|
-
- [ ] Routes registered
|
|
188
|
-
- [ ] Request/response validation
|
|
189
|
-
- [ ] Integration tests
|
|
190
|
-
- [ ] Documentation updated
|
|
191
|
-
- **Validation Test:**
|
|
192
|
-
- [ ] Test 201 Created
|
|
193
|
-
- [ ] Test 400 Bad Request (validation)
|
|
194
|
-
- [ ] Test 404 Not Found
|
|
195
|
-
- [ ] E2E: API → Service → Repo → DB
|
|
196
|
-
- [ ] **⚠️ ALL TESTS MUST PASS**
|
|
197
|
-
- [ ] **⚠️ NO REGRESSIONS**
|
|
198
|
-
- **Notes:** {{implementation_hint}}
|
|
125
|
+
**Acceptance Criteria:**
|
|
126
|
+
- [ ] {{criterion}}
|
|
127
|
+
- [ ] Tests pass
|
|
128
|
+
|
|
129
|
+
**Notes:** {{notes}}
|
|
199
130
|
|
|
200
131
|
---
|
|
201
132
|
|
|
202
|
-
###
|
|
133
|
+
### T3: {{task_3_name}}
|
|
134
|
+
|
|
135
|
+
**Goal:** {{goal}}
|
|
136
|
+
|
|
137
|
+
**Documentation:**
|
|
138
|
+
- {{links}}
|
|
139
|
+
|
|
140
|
+
**Input (Prerequisites):**
|
|
141
|
+
- T2 completed
|
|
142
|
+
- {{dependencies}}
|
|
143
|
+
|
|
144
|
+
**Output (Deliverables):**
|
|
145
|
+
- {{files}}
|
|
146
|
+
|
|
147
|
+
**Implementation Steps:**
|
|
148
|
+
1. {{steps}}
|
|
203
149
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
| 3 | T3, T4 | 6h | Implementation tests |
|
|
209
|
-
| 4 | T5 | 5h | Integration tests |
|
|
210
|
-
| **Total** | | **22h** | **All green** |
|
|
150
|
+
**Acceptance Criteria:**
|
|
151
|
+
- [ ] {{criteria}}
|
|
152
|
+
- [ ] All tests pass
|
|
153
|
+
- [ ] **⚠️ NO REGRESSIONS** (run full test suite)
|
|
211
154
|
|
|
212
|
-
**
|
|
213
|
-
**With Parallelism (T3 || T4):** ~2.5 days
|
|
155
|
+
**Notes:** {{notes}}
|
|
214
156
|
|
|
215
157
|
---
|
|
216
158
|
|