@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.
Files changed (141) hide show
  1. package/commands/debug.md +435 -435
  2. package/commands/debug.tmpl +111 -111
  3. package/commands/define-product.md +330 -327
  4. package/commands/define-product.tmpl +50 -47
  5. package/commands/dev-gen-test.md +364 -364
  6. package/commands/dev-gen-test.tmpl +63 -63
  7. package/commands/dev-run-test.md +375 -375
  8. package/commands/dev-run-test.tmpl +74 -74
  9. package/commands/dev-smoke-test.md +340 -340
  10. package/commands/dev-smoke-test.tmpl +60 -60
  11. package/commands/fix-bug.md +402 -402
  12. package/commands/fix-bug.tmpl +78 -78
  13. package/commands/generate-bdd.md +512 -512
  14. package/commands/generate-bdd.tmpl +211 -211
  15. package/commands/generate-code.md +480 -482
  16. package/commands/generate-code.tmpl +179 -181
  17. package/commands/generate-design-spec.md +495 -495
  18. package/commands/generate-design-spec.tmpl +219 -219
  19. package/commands/generate-prd.md +445 -396
  20. package/commands/generate-prd.tmpl +45 -198
  21. package/commands/generate-spec-manifest.md +337 -337
  22. package/commands/generate-spec-manifest.tmpl +57 -57
  23. package/commands/generate-tech-docs.md +364 -364
  24. package/commands/generate-tech-docs.tmpl +84 -84
  25. package/commands/learn.md +346 -346
  26. package/commands/learn.tmpl +22 -22
  27. package/commands/map-testids.md +321 -321
  28. package/commands/map-testids.tmpl +41 -41
  29. package/commands/propose-scenario.md +334 -334
  30. package/commands/propose-scenario.tmpl +54 -54
  31. package/commands/qc-analyze.md +322 -323
  32. package/commands/qc-analyze.tmpl +42 -43
  33. package/commands/qc-design-test.md +303 -303
  34. package/commands/qc-design-test.tmpl +23 -23
  35. package/commands/qc-plan.md +296 -296
  36. package/commands/qc-plan.tmpl +16 -16
  37. package/commands/qc-report.md +301 -301
  38. package/commands/qc-report.tmpl +21 -21
  39. package/commands/qc-review.md +297 -297
  40. package/commands/qc-review.tmpl +17 -17
  41. package/commands/qc-run-test.md +336 -336
  42. package/commands/qc-run-test.tmpl +35 -35
  43. package/commands/refine-prd.md +426 -428
  44. package/commands/refine-prd.tmpl +61 -61
  45. package/commands/report-bug.md +350 -350
  46. package/commands/report-bug.tmpl +70 -70
  47. package/commands/review-code.md +363 -363
  48. package/commands/review-code.tmpl +39 -39
  49. package/commands/review-context.md +577 -579
  50. package/commands/review-context.tmpl +212 -212
  51. package/commands/review-tech-docs.md +426 -426
  52. package/commands/review-tech-docs.tmpl +146 -146
  53. package/commands/setup-ai-first.md +237 -237
  54. package/commands/setup-ai-first.tmpl +131 -131
  55. package/commands/sync.md +145 -145
  56. package/commands/sync.tmpl +93 -93
  57. package/commands/update-framework.md +88 -88
  58. package/commands/update-framework.tmpl +36 -36
  59. package/commands/validate-traces.md +379 -379
  60. package/commands/validate-traces.tmpl +99 -99
  61. package/core/FRAMEWORK_VERSION +1 -1
  62. package/core/commands/debug.md +435 -435
  63. package/core/commands/define-product.md +330 -327
  64. package/core/commands/dev-gen-test.md +364 -364
  65. package/core/commands/dev-run-test.md +375 -375
  66. package/core/commands/dev-smoke-test.md +340 -340
  67. package/core/commands/fix-bug.md +402 -402
  68. package/core/commands/generate-bdd.md +512 -512
  69. package/core/commands/generate-code.md +480 -482
  70. package/core/commands/generate-design-spec.md +495 -495
  71. package/core/commands/generate-prd.md +445 -396
  72. package/core/commands/generate-spec-manifest.md +337 -337
  73. package/core/commands/generate-tech-docs.md +364 -364
  74. package/core/commands/learn.md +346 -346
  75. package/core/commands/map-testids.md +321 -321
  76. package/core/commands/propose-scenario.md +334 -334
  77. package/core/commands/qc-analyze.md +322 -323
  78. package/core/commands/qc-design-test.md +303 -303
  79. package/core/commands/qc-plan.md +296 -296
  80. package/core/commands/qc-report.md +301 -301
  81. package/core/commands/qc-review.md +297 -297
  82. package/core/commands/qc-run-test.md +336 -336
  83. package/core/commands/refine-prd.md +426 -428
  84. package/core/commands/report-bug.md +350 -350
  85. package/core/commands/review-code.md +363 -363
  86. package/core/commands/review-context.md +577 -579
  87. package/core/commands/review-tech-docs.md +426 -426
  88. package/core/commands/setup-ai-first.md +237 -237
  89. package/core/commands/sync.md +145 -145
  90. package/core/commands/update-framework.md +88 -88
  91. package/core/commands/validate-traces.md +379 -379
  92. package/core/skills/code/SKILL.md +388 -388
  93. package/core/skills/debug/SKILL.md +390 -390
  94. package/core/skills/design-spec/SKILL.md +316 -316
  95. package/core/skills/discovery/SKILL.md +7 -547
  96. package/core/skills/prd/SKILL.md +298 -394
  97. package/core/skills/setup-ai-first/SKILL.md +79 -79
  98. package/core/skills/spec/SKILL.md +176 -176
  99. package/core/skills/test/SKILL.md +602 -602
  100. package/core/steps/capture-lesson.md +44 -44
  101. package/core/steps/context-loader.md +174 -174
  102. package/core/steps/gate.md +54 -54
  103. package/core/steps/report-footer.md +52 -52
  104. package/core/steps/review-fanout.md +85 -87
  105. package/core/steps/spawn-agent.md +45 -45
  106. package/core/steps/trace-mirror.md +21 -21
  107. package/core/templates/architecture.template.md +37 -37
  108. package/core/templates/design-spec.template.md +77 -77
  109. package/core/templates/platform-guide.template.md +47 -47
  110. package/core/templates/prd.template.md +106 -231
  111. package/core/templates/product-definition.template.md +101 -88
  112. package/docs/04-operations/publishing.md +20 -3
  113. package/package.json +1 -1
  114. package/skills/code/SKILL.md +388 -388
  115. package/skills/code/SKILL.tmpl +56 -56
  116. package/skills/debug/SKILL.md +390 -390
  117. package/skills/debug/SKILL.tmpl +60 -60
  118. package/skills/design-spec/SKILL.md +316 -316
  119. package/skills/design-spec/SKILL.tmpl +36 -36
  120. package/skills/discovery/SKILL.md +7 -547
  121. package/skills/discovery/SKILL.tmpl +7 -140
  122. package/skills/prd/SKILL.md +298 -394
  123. package/skills/prd/SKILL.tmpl +40 -151
  124. package/skills/setup-ai-first/SKILL.md +79 -79
  125. package/skills/setup-ai-first/SKILL.tmpl +27 -27
  126. package/skills/spec/SKILL.md +176 -176
  127. package/skills/spec/SKILL.tmpl +18 -18
  128. package/skills/test/SKILL.md +602 -602
  129. package/skills/test/SKILL.tmpl +44 -44
  130. package/steps/capture-lesson.md +44 -44
  131. package/steps/context-loader.md +174 -174
  132. package/steps/gate.md +54 -54
  133. package/steps/report-footer.md +52 -52
  134. package/steps/review-fanout.md +85 -87
  135. package/steps/spawn-agent.md +45 -45
  136. package/steps/trace-mirror.md +21 -21
  137. package/templates/architecture.template.md +37 -37
  138. package/templates/design-spec.template.md +77 -77
  139. package/templates/platform-guide.template.md +47 -47
  140. package/templates/prd.template.md +106 -231
  141. package/templates/product-definition.template.md +101 -88
@@ -1,23 +1,23 @@
1
- # /define-product — Feature Discovery (8-Phase Q&A)
1
+ # /define-product — Feature Discovery (Q&A 8 Phase)
2
2
 
3
3
  ## Gate
4
4
  {{include:steps/gate.md}}
5
5
 
6
- *Note: For this command, there is no input file to resolve in Step 1. Skip to Step 2 (context load) and then ask: **"Ticket ID and feature name? (e.g., LOYAL-29 Loyalty Points)"***
6
+ *Lưu ý: Với lệnh này, không 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 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 fills automatically, no PO input needed)*
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 scans the project and writes:
15
+ AI quét dự án ghi:
16
16
 
17
- - **Related Entities** — list entities from existing PRDs/domain-knowledge that relate to this feature.
18
- - **Related Modules** — list affected modules/services.
19
- - **Existing Rules / Logic** — rules from existing PRDs that this feature must respect.
20
- - **Terminology Normalization** — map any terms found in PO input to canonical terms from business-dictionary.md.
17
+ - **Khái niệm / dữ liệu nghiệp vụ liên quan** — liệt khái niệm từ các PRD/domain-knowledge sẵn liên quan tới feature này.
18
+ - **Phần hệ thống / feature liên quan** — liệt phần hệ thống/feature bị ảnh hưởng.
19
+ - **Rule / Logic có sẵn** — các rule từ PRD sẵn 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
- Store this terminology map in the output product-definition file under a `## Terminology Map` section — `/generate-prd` will reference it during its Terminology Rules step to ensure consistency.
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 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
- Ask in order, one at a time:
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 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**: Background / reason why this feature is needed?
37
- 2. **Problem**: Specific problem to solve?
38
- 3. **Goal**: What objective does this feature achieve?
39
- 4. **Actors**: Who are the users? (list roles, mark Primary/Secondary)
40
- 5. **Scope**: What does this feature do? (one function per lineonly what is in this ticket)
41
- 6. **User Story**: Confirm in format:
36
+ 1. **Context**: Bối cảnh / do 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 thuộc ticket này)
41
+ 6. **Out of Scope**: Cái 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 {User role}
44
- I want to {User goal}
45
- So that {Business value}
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
- Summarizeconfirmwrite `✅ PO Confirmed: Yes`proceed.
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
- Ask:
55
- 1. **Entry Point**: Where does the user start interacting with this feature?
56
- 2. **Flow Steps**: Describe each step (use table):
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**: tả từng bước (dùng bảng):
57
59
  ```
58
- | Step | Action (user) | Screen / State | Notes |
60
+ | Step | Action (user) | Business State / Result | Notes |
59
61
  ```
60
- 3. **Exit Point**: What is the final result when the flow completes?
62
+ 3. **Exit Point**: Kết quả cuối khi flow hoàn thành 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
- Confirmwrite `✅ PO Confirmed: Yes`proceed.
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
- Based on Phases 1-2, AI identifies gaps and asks follow-up questions. Continue rounds until no Unresolved Items remain.
71
+ Dựa trên Phase 1-2, AI xác định gap 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**: If Unresolved Items remain MUST NOT proceed to Phase 4.
80
+ **BLOCK**: Nếu còn Unresolved Items → KHÔNG được sang Phase 4.
78
81
 
79
82
  ### Unresolved Items
80
- - {item — or "None"}
83
+ - {item — hoặc "None"}
81
84
 
82
- When all Unresolved Items are resolvedwrite `✅ CHECKPOINT 3: No Unresolved Items` → proceed to Phase 4.
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
- Derive from Phases 1-3. Each BR = one rule (WHAT the system must/must not do):
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
- Confirmwrite `✅ PO Confirmed: Yes`proceed.
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 each BR to HOW the system executes it:
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 | System Behavior | Data State Change | UI Behavior | Error Handling |
106
- |---------|---------------------------------------|---------------------|-------------------------|------------------------|
107
- | BR-1 | {how system processes when triggers} | {what data changes} | {enable/disable/show...}| {error message/action} |
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ố không đủ"} |
108
111
  ```
109
112
 
110
- Confirmwrite `✅ PO Confirmed: Yes`proceed.
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
- Derive from BRs + User Story. Each AC must be testable (clear pass/fail):
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
- Confirmwrite `✅ PO Confirmed: Yes`proceed.
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
- Generate coverage matrix automatically:
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**: list any conflicting rules, or "None".
139
- - **Missing Items**: list gaps, or "None".
141
+ - **Conflicts Detected**: liệt các rule xung đột, hoặc "None".
142
+ - **Missing Items**: liệt kê gap, hoặc "None".
140
143
 
141
- If any GAP found alert PO and resolve before marking completed.
144
+ Nếu phát hiện GAP → cảnh báo PO giải quyết trước khi đánh dấu completed.
142
145
 
143
146
  ---
144
147
 
145
148
  ## Output
146
149
 
147
- Write `{paths.product_definitions_dir}/{TICKET-ID}-{slug}.md` following `templates/product-definition.template.md`.
150
+ Ghi `{paths.product_definitions_dir}/{TICKET-ID}-{slug}.md` theo `templates/product-definition.template.md`.
148
151
 
149
- Fill all sections with data gathered across phases.
150
- Set `Status: completed` when Phase 7 passes with no GAPs.
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 không còn GAP.
151
154
 
152
155
  {{include:steps/report-footer.md}}
153
156
 
154
157
  ```
155
- /define-product Complete
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
  ```