@edupia-tutor/spec-driven-docs 0.14.0 → 0.14.1
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/commands/debug.md +435 -435
- package/commands/debug.tmpl +111 -111
- package/commands/define-product.md +330 -327
- package/commands/define-product.tmpl +50 -47
- package/commands/dev-gen-test.md +364 -364
- package/commands/dev-gen-test.tmpl +63 -63
- package/commands/dev-run-test.md +375 -375
- package/commands/dev-run-test.tmpl +74 -74
- package/commands/dev-smoke-test.md +340 -340
- package/commands/dev-smoke-test.tmpl +60 -60
- package/commands/fix-bug.md +402 -402
- package/commands/fix-bug.tmpl +78 -78
- package/commands/generate-bdd.md +512 -512
- package/commands/generate-bdd.tmpl +211 -211
- package/commands/generate-code.md +480 -482
- package/commands/generate-code.tmpl +179 -181
- package/commands/generate-design-spec.md +495 -495
- package/commands/generate-design-spec.tmpl +219 -219
- package/commands/generate-prd.md +445 -396
- package/commands/generate-prd.tmpl +45 -198
- package/commands/generate-spec-manifest.md +337 -337
- package/commands/generate-spec-manifest.tmpl +57 -57
- package/commands/generate-tech-docs.md +364 -364
- package/commands/generate-tech-docs.tmpl +84 -84
- package/commands/learn.md +346 -346
- package/commands/learn.tmpl +22 -22
- package/commands/map-testids.md +321 -321
- package/commands/map-testids.tmpl +41 -41
- package/commands/propose-scenario.md +334 -334
- package/commands/propose-scenario.tmpl +54 -54
- package/commands/qc-analyze.md +322 -323
- package/commands/qc-analyze.tmpl +42 -43
- package/commands/qc-design-test.md +303 -303
- package/commands/qc-design-test.tmpl +23 -23
- package/commands/qc-plan.md +296 -296
- package/commands/qc-plan.tmpl +16 -16
- package/commands/qc-report.md +301 -301
- package/commands/qc-report.tmpl +21 -21
- package/commands/qc-review.md +297 -297
- package/commands/qc-review.tmpl +17 -17
- package/commands/qc-run-test.md +336 -336
- package/commands/qc-run-test.tmpl +35 -35
- package/commands/refine-prd.md +426 -428
- package/commands/refine-prd.tmpl +61 -61
- package/commands/report-bug.md +350 -350
- package/commands/report-bug.tmpl +70 -70
- package/commands/review-code.md +363 -363
- package/commands/review-code.tmpl +39 -39
- package/commands/review-context.md +577 -579
- package/commands/review-context.tmpl +212 -212
- package/commands/review-tech-docs.md +426 -426
- package/commands/review-tech-docs.tmpl +146 -146
- package/commands/setup-ai-first.md +237 -237
- package/commands/setup-ai-first.tmpl +131 -131
- package/commands/sync.md +145 -145
- package/commands/sync.tmpl +93 -93
- package/commands/update-framework.md +88 -88
- package/commands/update-framework.tmpl +36 -36
- package/commands/validate-traces.md +379 -379
- package/commands/validate-traces.tmpl +99 -99
- package/core/FRAMEWORK_VERSION +1 -1
- package/core/commands/debug.md +435 -435
- package/core/commands/define-product.md +330 -327
- package/core/commands/dev-gen-test.md +364 -364
- package/core/commands/dev-run-test.md +375 -375
- package/core/commands/dev-smoke-test.md +340 -340
- package/core/commands/fix-bug.md +402 -402
- package/core/commands/generate-bdd.md +512 -512
- package/core/commands/generate-code.md +480 -482
- package/core/commands/generate-design-spec.md +495 -495
- package/core/commands/generate-prd.md +445 -396
- package/core/commands/generate-spec-manifest.md +337 -337
- package/core/commands/generate-tech-docs.md +364 -364
- package/core/commands/learn.md +346 -346
- package/core/commands/map-testids.md +321 -321
- package/core/commands/propose-scenario.md +334 -334
- package/core/commands/qc-analyze.md +322 -323
- package/core/commands/qc-design-test.md +303 -303
- package/core/commands/qc-plan.md +296 -296
- package/core/commands/qc-report.md +301 -301
- package/core/commands/qc-review.md +297 -297
- package/core/commands/qc-run-test.md +336 -336
- package/core/commands/refine-prd.md +426 -428
- package/core/commands/report-bug.md +350 -350
- package/core/commands/review-code.md +363 -363
- package/core/commands/review-context.md +577 -579
- package/core/commands/review-tech-docs.md +426 -426
- package/core/commands/setup-ai-first.md +237 -237
- package/core/commands/sync.md +145 -145
- package/core/commands/update-framework.md +88 -88
- package/core/commands/validate-traces.md +379 -379
- package/core/skills/code/SKILL.md +388 -388
- package/core/skills/debug/SKILL.md +390 -390
- package/core/skills/design-spec/SKILL.md +316 -316
- package/core/skills/discovery/SKILL.md +7 -547
- package/core/skills/prd/SKILL.md +298 -394
- package/core/skills/setup-ai-first/SKILL.md +79 -79
- package/core/skills/spec/SKILL.md +176 -176
- package/core/skills/test/SKILL.md +602 -602
- package/core/steps/capture-lesson.md +44 -44
- package/core/steps/context-loader.md +174 -174
- package/core/steps/gate.md +54 -54
- package/core/steps/report-footer.md +52 -52
- package/core/steps/review-fanout.md +85 -87
- package/core/steps/spawn-agent.md +45 -45
- package/core/steps/trace-mirror.md +21 -21
- package/core/templates/architecture.template.md +37 -37
- package/core/templates/design-spec.template.md +77 -77
- package/core/templates/platform-guide.template.md +47 -47
- package/core/templates/prd.template.md +106 -231
- package/core/templates/product-definition.template.md +101 -88
- package/docs/04-operations/publishing.md +20 -3
- package/package.json +1 -1
- package/skills/code/SKILL.md +388 -388
- package/skills/code/SKILL.tmpl +56 -56
- package/skills/debug/SKILL.md +390 -390
- package/skills/debug/SKILL.tmpl +60 -60
- package/skills/design-spec/SKILL.md +316 -316
- package/skills/design-spec/SKILL.tmpl +36 -36
- package/skills/discovery/SKILL.md +7 -547
- package/skills/discovery/SKILL.tmpl +7 -140
- package/skills/prd/SKILL.md +298 -394
- package/skills/prd/SKILL.tmpl +40 -151
- package/skills/setup-ai-first/SKILL.md +79 -79
- package/skills/setup-ai-first/SKILL.tmpl +27 -27
- package/skills/spec/SKILL.md +176 -176
- package/skills/spec/SKILL.tmpl +18 -18
- package/skills/test/SKILL.md +602 -602
- package/skills/test/SKILL.tmpl +44 -44
- package/steps/capture-lesson.md +44 -44
- package/steps/context-loader.md +174 -174
- package/steps/gate.md +54 -54
- package/steps/report-footer.md +52 -52
- package/steps/review-fanout.md +85 -87
- package/steps/spawn-agent.md +45 -45
- package/steps/trace-mirror.md +21 -21
- package/templates/architecture.template.md +37 -37
- package/templates/design-spec.template.md +77 -77
- package/templates/platform-guide.template.md +47 -47
- package/templates/prd.template.md +106 -231
- package/templates/product-definition.template.md +101 -88
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
# /define-product — Feature Discovery (
|
|
1
|
+
# /define-product — Feature Discovery (Q&A 8 Phase)
|
|
2
2
|
|
|
3
3
|
## Gate
|
|
4
4
|
{{include:steps/gate.md}}
|
|
5
5
|
|
|
6
|
-
*
|
|
6
|
+
*Lưu ý: Với lệnh này, không có file input cần phân giải ở Bước 1. Bỏ qua sang Bước 2 (nạp context) rồi hỏi: **"Ticket ID và tên feature? (vd: LOYAL-29 Loyalty Points)"***
|
|
7
7
|
|
|
8
8
|
## Context
|
|
9
9
|
{{include:steps/context-loader.md}}
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
-
## Phase 0 — Knowledge Sync *(AI
|
|
13
|
+
## Phase 0 — Knowledge Sync *(AI tự điền — bối cảnh hệ thống, KHÔNG phải yêu cầu nghiệp vụ; không cần input PO)*
|
|
14
14
|
|
|
15
|
-
AI
|
|
15
|
+
AI quét dự án và ghi:
|
|
16
16
|
|
|
17
|
-
- **
|
|
18
|
-
- **
|
|
19
|
-
- **
|
|
20
|
-
- **
|
|
17
|
+
- **Khái niệm / dữ liệu nghiệp vụ liên quan** — liệt kê khái niệm từ các PRD/domain-knowledge có sẵn liên quan tới feature này.
|
|
18
|
+
- **Phần hệ thống / feature liên quan** — liệt kê phần hệ thống/feature bị ảnh hưởng.
|
|
19
|
+
- **Rule / Logic có sẵn** — các rule từ PRD có sẵn mà feature này phải tôn trọng.
|
|
20
|
+
- **Chuẩn hoá thuật ngữ** — map mọi thuật ngữ trong input PO về thuật ngữ chuẩn từ business-dictionary.md.
|
|
21
21
|
|
|
22
22
|
```
|
|
23
23
|
| Term in PO input | Canonical term (business-dictionary) |
|
|
@@ -25,47 +25,50 @@ AI scans the project and writes:
|
|
|
25
25
|
| {original} | {canonical} |
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
Lưu bản đồ thuật ngữ này vào file product-definition output dưới section `## Terminology Map` — `/generate-prd` sẽ tham chiếu nó trong bước Terminology Rules để đảm bảo nhất quán.
|
|
29
29
|
|
|
30
30
|
---
|
|
31
31
|
|
|
32
32
|
## Phase 1 — Feature Definition *(CHECKPOINT 1)*
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
Hỏi **lần lượt từng câu một**, đợi PO trả lời rồi mới hỏi câu kế. Giữ giọng nghiệp vụ, thân thiện; nếu PO lúng túng, đưa một ví dụ ngắn để gợi ý. Tránh hỏi về giải pháp kỹ thuật ở phase này.
|
|
35
35
|
|
|
36
|
-
1. **Context**:
|
|
37
|
-
2. **Problem**:
|
|
38
|
-
3. **Goal**:
|
|
39
|
-
4. **Actors**:
|
|
40
|
-
5. **Scope**:
|
|
41
|
-
6. **
|
|
36
|
+
1. **Context**: Bối cảnh / lý do vì sao cần feature này?
|
|
37
|
+
2. **Problem**: Vấn đề cụ thể cần giải quyết?
|
|
38
|
+
3. **Goal**: Khi feature chạy ổn, kết quả nghiệp vụ bạn muốn thấy là gì? Mô tả *thành quả*, chưa cần cách làm.
|
|
39
|
+
4. **Actors**: Những ai sẽ dùng feature này? Liệt kê từng vai trò, và đánh dấu ai là người dùng chính (Primary), ai phụ (Secondary).
|
|
40
|
+
5. **In Scope**: Feature này làm gì? (mỗi dòng một chức năng — chỉ những gì thuộc ticket này)
|
|
41
|
+
6. **Out of Scope**: Cái gì KHÔNG làm trong ticket này? Ghi rõ kèm lý do hoặc để dành pha/ticket sau — để tránh phình phạm vi.
|
|
42
|
+
7. **User Story**: Xác nhận theo format:
|
|
42
43
|
```
|
|
43
|
-
As a {
|
|
44
|
-
I want to {
|
|
45
|
-
So that {
|
|
44
|
+
Là một (As a) {vai trò}
|
|
45
|
+
Tôi muốn (I want to) {mục tiêu}
|
|
46
|
+
Để (So that) {giá trị nghiệp vụ}
|
|
46
47
|
```
|
|
48
|
+
8. **Phụ thuộc liên service**: Để chạy được, feature có cần **dữ liệu hay năng lực** gì từ feature/team khác không? Mô tả ở mức nghiệp vụ (cần gì, từ ai, vì sao) — chưa cần nói API hay kỹ thuật. Nếu không có → trả lời "Không có".
|
|
47
49
|
|
|
48
|
-
|
|
50
|
+
Sau câu 8 → **tóm tắt lại toàn bộ** cho PO → chờ xác nhận → ghi `✅ PO xác nhận: Có` → sang Phase 2.
|
|
49
51
|
|
|
50
52
|
---
|
|
51
53
|
|
|
52
54
|
## Phase 2 — User Flow Definition *(CHECKPOINT 2)*
|
|
53
55
|
|
|
54
|
-
|
|
55
|
-
1. **Entry Point**:
|
|
56
|
-
2. **Flow Steps**:
|
|
56
|
+
Hỏi:
|
|
57
|
+
1. **Entry Point**: Người dùng bắt đầu tương tác với feature này ở đâu?
|
|
58
|
+
2. **Flow Steps**: Mô tả từng bước (dùng bảng):
|
|
57
59
|
```
|
|
58
|
-
| Step | Action (user) |
|
|
60
|
+
| Step | Action (user) | Business State / Result | Notes |
|
|
59
61
|
```
|
|
60
|
-
3. **Exit Point**:
|
|
62
|
+
3. **Exit Point**: Kết quả cuối khi flow hoàn thành là gì?
|
|
63
|
+
4. **Edge Cases**: Các kịch bản thất bại nghiệp vụ ngoài happy path? (input thiếu, điều kiện không thoả, thao tác đồng thời, phụ thuộc không sẵn sàng → kết quả nghiệp vụ kỳ vọng)
|
|
61
64
|
|
|
62
|
-
|
|
65
|
+
Xác nhận → ghi `✅ PO xác nhận: Có` → tiếp tục.
|
|
63
66
|
|
|
64
67
|
---
|
|
65
68
|
|
|
66
69
|
## Phase 3 — Clarification Log *(CHECKPOINT 3)*
|
|
67
70
|
|
|
68
|
-
|
|
71
|
+
Dựa trên Phase 1-2, AI xác định gap và hỏi các câu follow-up. Tiếp tục các vòng cho tới khi không còn Unresolved Items.
|
|
69
72
|
|
|
70
73
|
```
|
|
71
74
|
### Round {N}
|
|
@@ -74,18 +77,18 @@ Based on Phases 1-2, AI identifies gaps and asks follow-up questions. Continue r
|
|
|
74
77
|
| 1 | Context/Flow/Logic | {question} | {answer} |
|
|
75
78
|
```
|
|
76
79
|
|
|
77
|
-
**BLOCK**:
|
|
80
|
+
**BLOCK**: Nếu còn Unresolved Items → KHÔNG được sang Phase 4.
|
|
78
81
|
|
|
79
82
|
### Unresolved Items
|
|
80
|
-
- {item —
|
|
83
|
+
- {item — hoặc "None"}
|
|
81
84
|
|
|
82
|
-
|
|
85
|
+
Khi mọi Unresolved Items đã giải quyết → ghi `✅ CHECKPOINT 3: No Unresolved Items` → sang Phase 4.
|
|
83
86
|
|
|
84
87
|
---
|
|
85
88
|
|
|
86
89
|
## Phase 4 — Business Rules *(CHECKPOINT 4)*
|
|
87
90
|
|
|
88
|
-
|
|
91
|
+
Suy ra từ Phase 1-3. Mỗi BR = một quy tắc (hệ thống PHẢI / KHÔNG được làm gì — WHAT):
|
|
89
92
|
|
|
90
93
|
```
|
|
91
94
|
| Rule ID | Action / Trigger | Rule | Condition |
|
|
@@ -93,27 +96,27 @@ Derive from Phases 1-3. Each BR = one rule (WHAT the system must/must not do):
|
|
|
93
96
|
| BR-1 | {action from flow} | System MUST/MUST NOT... | {applicable condition} |
|
|
94
97
|
```
|
|
95
98
|
|
|
96
|
-
|
|
99
|
+
Xác nhận → ghi `✅ PO xác nhận: Có` → tiếp tục.
|
|
97
100
|
|
|
98
101
|
---
|
|
99
102
|
|
|
100
103
|
## Phase 5 — Business Logic *(CHECKPOINT 5)*
|
|
101
104
|
|
|
102
|
-
Map
|
|
105
|
+
Map mỗi BR sang **logic nghiệp vụ** thực thi nó (rẽ nhánh / công thức / điều kiện — KHÔNG mô tả thay đổi dữ liệu hay hành vi UI; đó là kỹ thuật/design):
|
|
103
106
|
|
|
104
107
|
```
|
|
105
|
-
| Rule ID |
|
|
106
|
-
|
|
107
|
-
| BR-1 | {
|
|
108
|
+
| Rule ID | Logic nghiệp vụ (rẽ nhánh / công thức / điều kiện) | Thông báo/kết quả nghiệp vụ khi lỗi |
|
|
109
|
+
|---------|---------------------------------------------------|-------------------------------------|
|
|
110
|
+
| BR-1 | {logic nghiệp vụ khi rule kích hoạt} | {vd: báo "Số dư không đủ"} |
|
|
108
111
|
```
|
|
109
112
|
|
|
110
|
-
|
|
113
|
+
Xác nhận → ghi `✅ PO xác nhận: Có` → tiếp tục.
|
|
111
114
|
|
|
112
115
|
---
|
|
113
116
|
|
|
114
117
|
## Phase 6 — Acceptance Criteria *(CHECKPOINT 6)*
|
|
115
118
|
|
|
116
|
-
|
|
119
|
+
Suy ra từ BR + User Story. Mỗi AC phải testable (pass/fail rõ ràng):
|
|
117
120
|
|
|
118
121
|
```
|
|
119
122
|
| AC ID | Description | Expected Behavior | Derived from |
|
|
@@ -121,13 +124,13 @@ Derive from BRs + User Story. Each AC must be testable (clear pass/fail):
|
|
|
121
124
|
| AC-1 | {criterion description} | {what system should do} | BR-{N} |
|
|
122
125
|
```
|
|
123
126
|
|
|
124
|
-
|
|
127
|
+
Xác nhận → ghi `✅ PO xác nhận: Có` → tiếp tục.
|
|
125
128
|
|
|
126
129
|
---
|
|
127
130
|
|
|
128
131
|
## Phase 7 — Validation Report
|
|
129
132
|
|
|
130
|
-
|
|
133
|
+
Tự sinh ma trận độ phủ:
|
|
131
134
|
|
|
132
135
|
```
|
|
133
136
|
| Flow Action | Has Rule? | Has Logic? | Has AC? | Status |
|
|
@@ -135,24 +138,24 @@ Generate coverage matrix automatically:
|
|
|
135
138
|
| {Action 1} | ✅/❌ | ✅/❌ | ✅/❌ | OK/GAP |
|
|
136
139
|
```
|
|
137
140
|
|
|
138
|
-
- **Conflicts Detected**:
|
|
139
|
-
- **Missing Items**:
|
|
141
|
+
- **Conflicts Detected**: liệt kê các rule xung đột, hoặc "None".
|
|
142
|
+
- **Missing Items**: liệt kê gap, hoặc "None".
|
|
140
143
|
|
|
141
|
-
|
|
144
|
+
Nếu phát hiện GAP → cảnh báo PO và giải quyết trước khi đánh dấu completed.
|
|
142
145
|
|
|
143
146
|
---
|
|
144
147
|
|
|
145
148
|
## Output
|
|
146
149
|
|
|
147
|
-
|
|
150
|
+
Ghi `{paths.product_definitions_dir}/{TICKET-ID}-{slug}.md` theo `templates/product-definition.template.md`.
|
|
148
151
|
|
|
149
|
-
|
|
150
|
-
|
|
152
|
+
Điền tất cả section bằng dữ liệu thu thập qua các phase.
|
|
153
|
+
Đặt `Status: completed` khi Phase 7 pass mà không còn GAP.
|
|
151
154
|
|
|
152
155
|
{{include:steps/report-footer.md}}
|
|
153
156
|
|
|
154
157
|
```
|
|
155
|
-
/define-product
|
|
158
|
+
/define-product Hoàn tất ✅
|
|
156
159
|
File: {paths.product_definitions_dir}/{TICKET-ID}-{slug}.md
|
|
157
160
|
Next: /generate-prd {paths.product_definitions_dir}/{TICKET-ID}-{slug}.md
|
|
158
161
|
```
|