@edupia-tutor/spec-driven-docs 0.14.0 → 0.14.2

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 (162) hide show
  1. package/bin/index.js +12 -1
  2. package/commands/debug.md +436 -436
  3. package/commands/debug.tmpl +111 -111
  4. package/commands/define-product.md +350 -345
  5. package/commands/define-product.tmpl +69 -64
  6. package/commands/dev-gen-test.md +365 -365
  7. package/commands/dev-gen-test.tmpl +63 -63
  8. package/commands/dev-run-test.md +376 -376
  9. package/commands/dev-run-test.tmpl +74 -74
  10. package/commands/dev-smoke-test.md +341 -341
  11. package/commands/dev-smoke-test.tmpl +60 -60
  12. package/commands/fix-bug.md +403 -403
  13. package/commands/fix-bug.tmpl +78 -78
  14. package/commands/generate-bdd.md +513 -513
  15. package/commands/generate-bdd.tmpl +211 -211
  16. package/commands/generate-code.md +481 -483
  17. package/commands/generate-code.tmpl +179 -181
  18. package/commands/generate-design-spec.md +497 -497
  19. package/commands/generate-design-spec.tmpl +220 -220
  20. package/commands/generate-prd.md +452 -400
  21. package/commands/generate-prd.tmpl +50 -200
  22. package/commands/generate-spec-manifest.md +340 -340
  23. package/commands/generate-spec-manifest.tmpl +59 -59
  24. package/commands/generate-tech-docs.md +365 -365
  25. package/commands/generate-tech-docs.tmpl +84 -84
  26. package/commands/learn.md +347 -347
  27. package/commands/learn.tmpl +22 -22
  28. package/commands/map-testids.md +322 -322
  29. package/commands/map-testids.tmpl +41 -41
  30. package/commands/propose-scenario.md +335 -335
  31. package/commands/propose-scenario.tmpl +54 -54
  32. package/commands/qc-analyze.md +323 -324
  33. package/commands/qc-analyze.tmpl +42 -43
  34. package/commands/qc-design-test.md +304 -304
  35. package/commands/qc-design-test.tmpl +23 -23
  36. package/commands/qc-plan.md +297 -297
  37. package/commands/qc-plan.tmpl +16 -16
  38. package/commands/qc-report.md +302 -302
  39. package/commands/qc-report.tmpl +21 -21
  40. package/commands/qc-review.md +298 -298
  41. package/commands/qc-review.tmpl +17 -17
  42. package/commands/qc-run-test.md +337 -337
  43. package/commands/qc-run-test.tmpl +35 -35
  44. package/commands/refine-prd.md +428 -430
  45. package/commands/refine-prd.tmpl +62 -62
  46. package/commands/report-bug.md +351 -351
  47. package/commands/report-bug.tmpl +70 -70
  48. package/commands/review-code.md +364 -364
  49. package/commands/review-code.tmpl +39 -39
  50. package/commands/review-context.md +578 -580
  51. package/commands/review-context.tmpl +212 -212
  52. package/commands/review-tech-docs.md +427 -427
  53. package/commands/review-tech-docs.tmpl +146 -146
  54. package/commands/setup-ai-first.md +239 -239
  55. package/commands/setup-ai-first.tmpl +133 -133
  56. package/commands/sync.md +145 -145
  57. package/commands/sync.tmpl +93 -93
  58. package/commands/update-framework.md +88 -88
  59. package/commands/update-framework.tmpl +36 -36
  60. package/commands/validate-traces.md +381 -381
  61. package/commands/validate-traces.tmpl +100 -100
  62. package/core/FRAMEWORK_VERSION +1 -1
  63. package/core/commands/debug.md +436 -436
  64. package/core/commands/define-product.md +350 -345
  65. package/core/commands/dev-gen-test.md +365 -365
  66. package/core/commands/dev-run-test.md +376 -376
  67. package/core/commands/dev-smoke-test.md +341 -341
  68. package/core/commands/fix-bug.md +403 -403
  69. package/core/commands/generate-bdd.md +513 -513
  70. package/core/commands/generate-code.md +481 -483
  71. package/core/commands/generate-design-spec.md +497 -497
  72. package/core/commands/generate-prd.md +452 -400
  73. package/core/commands/generate-spec-manifest.md +340 -340
  74. package/core/commands/generate-tech-docs.md +365 -365
  75. package/core/commands/learn.md +347 -347
  76. package/core/commands/map-testids.md +322 -322
  77. package/core/commands/propose-scenario.md +335 -335
  78. package/core/commands/qc-analyze.md +323 -324
  79. package/core/commands/qc-design-test.md +304 -304
  80. package/core/commands/qc-plan.md +297 -297
  81. package/core/commands/qc-report.md +302 -302
  82. package/core/commands/qc-review.md +298 -298
  83. package/core/commands/qc-run-test.md +337 -337
  84. package/core/commands/refine-prd.md +428 -430
  85. package/core/commands/report-bug.md +351 -351
  86. package/core/commands/review-code.md +364 -364
  87. package/core/commands/review-context.md +578 -580
  88. package/core/commands/review-tech-docs.md +427 -427
  89. package/core/commands/setup-ai-first.md +239 -239
  90. package/core/commands/sync.md +145 -145
  91. package/core/commands/update-framework.md +88 -88
  92. package/core/commands/validate-traces.md +381 -381
  93. package/core/skills/code/SKILL.md +389 -389
  94. package/core/skills/debug/SKILL.md +391 -391
  95. package/core/skills/design-spec/SKILL.md +318 -318
  96. package/core/skills/discovery/SKILL.md +7 -547
  97. package/core/skills/prd/SKILL.md +298 -394
  98. package/core/skills/setup-ai-first/SKILL.md +80 -80
  99. package/core/skills/spec/SKILL.md +178 -178
  100. package/core/skills/test/SKILL.md +604 -604
  101. package/core/steps/capture-lesson.md +44 -44
  102. package/core/steps/context-loader.md +175 -175
  103. package/core/steps/gate.md +54 -54
  104. package/core/steps/report-footer.md +52 -52
  105. package/core/steps/review-fanout.md +85 -87
  106. package/core/steps/spawn-agent.md +45 -45
  107. package/core/steps/trace-mirror.md +21 -21
  108. package/core/templates/architecture.template.md +37 -37
  109. package/core/templates/design-spec.template.md +77 -77
  110. package/core/templates/platform-guide.template.md +47 -47
  111. package/core/templates/prd.template.md +107 -232
  112. package/core/templates/product-definition.template.md +101 -88
  113. package/core/templates/project-context.yaml +2 -2
  114. package/docs/01-getting-started/core-concepts.md +1 -1
  115. package/docs/01-getting-started/quickstart.md +7 -7
  116. package/docs/02-guides/developer/bdd-and-trace.md +1 -1
  117. package/docs/02-guides/developer/scenarios.md +5 -5
  118. package/docs/02-guides/product-owner/handoff-checklist.md +1 -1
  119. package/docs/02-guides/product-owner/scenarios.md +23 -23
  120. package/docs/02-guides/tester/bug-reporting.md +2 -2
  121. package/docs/02-guides/tester/reading-specs.md +2 -2
  122. package/docs/02-guides/tester/scenarios.md +1 -1
  123. package/docs/02-guides/tester/spec-manifest.md +3 -3
  124. package/docs/02-guides/tester/workflow.md +1 -1
  125. package/docs/03-concepts/architecture.md +3 -3
  126. package/docs/03-concepts/pipeline.md +3 -3
  127. package/docs/04-operations/publishing.md +20 -3
  128. package/docs/04-operations/sync-and-update.md +5 -5
  129. package/docs/05-reference/command-cheatsheet.md +2 -2
  130. package/docs/05-reference/commands.md +8 -8
  131. package/package.json +1 -1
  132. package/scripts/migrate-specs.js +5 -3
  133. package/scripts/rename-prd-files.js +174 -0
  134. package/skills/code/SKILL.md +389 -389
  135. package/skills/code/SKILL.tmpl +56 -56
  136. package/skills/debug/SKILL.md +391 -391
  137. package/skills/debug/SKILL.tmpl +60 -60
  138. package/skills/design-spec/SKILL.md +318 -318
  139. package/skills/design-spec/SKILL.tmpl +37 -37
  140. package/skills/discovery/SKILL.md +7 -547
  141. package/skills/discovery/SKILL.tmpl +7 -140
  142. package/skills/prd/SKILL.md +298 -394
  143. package/skills/prd/SKILL.tmpl +40 -151
  144. package/skills/setup-ai-first/SKILL.md +80 -80
  145. package/skills/setup-ai-first/SKILL.tmpl +28 -28
  146. package/skills/spec/SKILL.md +178 -178
  147. package/skills/spec/SKILL.tmpl +20 -20
  148. package/skills/test/SKILL.md +604 -604
  149. package/skills/test/SKILL.tmpl +44 -44
  150. package/steps/capture-lesson.md +44 -44
  151. package/steps/context-loader.md +175 -175
  152. package/steps/gate.md +54 -54
  153. package/steps/report-footer.md +52 -52
  154. package/steps/review-fanout.md +85 -87
  155. package/steps/spawn-agent.md +45 -45
  156. package/steps/trace-mirror.md +21 -21
  157. package/templates/architecture.template.md +37 -37
  158. package/templates/design-spec.template.md +77 -77
  159. package/templates/platform-guide.template.md +47 -47
  160. package/templates/prd.template.md +107 -232
  161. package/templates/product-definition.template.md +101 -88
  162. package/templates/project-context.yaml +2 -2
@@ -1,109 +1,109 @@
1
- # /report-bug — File a Spec-Traced Bug (Tester & QC-Facing)
1
+ # /report-bug — File một Bug có trace-spec (cho Tester & QC)
2
2
 
3
- For **testers and QC** — including **product-gaps** surfaced by the `/qc-*` pipeline
4
- (`/qc-run-test` FAIL classified product-gap, or a `DOC_GAPS` spec-defect blocker from
5
- `/qc-analyze`). Produces a structured bug report with full spec context, classifies the likely
6
- layer, and saves it for handoff to the dev team.
3
+ Dành cho **tester QC** — gồm cả **product-gap** lòi ra từ pipeline `/qc-*`
4
+ (`/qc-run-test` FAIL phân loại product-gap, hoặc một spec-defect blocker `DOC_GAPS` từ
5
+ `/qc-analyze`). Sinh một bug report cấu trúc với đầy đủ spec context, phân loại layer
6
+ khả nghi, lưu lại để handoff cho team dev.
7
7
 
8
- **READ-ONLY on specs and code.** This command never edits PRD, BDD, tech-docs, or source.
9
- Fixing is the dev's job (`/fix-bug`); writing scenarios is `/propose-scenario`.
8
+ **READ-ONLY trên spec code.** Lệnh này không bao giờ sửa PRD, BDD, tech-docs, hay source.
9
+ Fix việc của dev (`/fix-bug`); viết scenario `/propose-scenario`.
10
10
 
11
- Usage: `/report-bug {UC-ID or TICKET} {short description}`
12
- Example: `/report-bug FT-001 account locks after 6 failed logins, spec says 5`
11
+ Usage: `/report-bug {UC-ID hoặc TICKET} { tả ngắn}`
12
+ dụ: `/report-bug FT-001 tài khoản khoá sau 6 lần login fail, spec nói 5`
13
13
 
14
14
  ## Gate
15
15
  {{include:steps/gate.md}}
16
16
 
17
- *Note: For this command, the target in Step 1 is a UC-ID / TICKET from `$ARGUMENTS`. Resolve the matching `.feature` file if one exists; if not, continuea bug can still be filed.*
17
+ *Lưu ý: Với lệnh này, target Bước 1 một UC-ID / TICKET từ `$ARGUMENTS`. Phân giải file `.feature` khớp nếu có; nếu không, tiếp tục — bug vẫn file được.*
18
18
 
19
19
  ## Context
20
20
  {{include:steps/context-loader.md}}
21
21
 
22
22
  ---
23
23
 
24
- ## Step 1 — Resolve Spec Context
24
+ ## Step 1 — Phân giải Spec Context
25
25
 
26
- Locate the spec chain for the bug's UC/TICKET. Prefer `spec-manifest.yaml` (umbrella/tester setup) if present; else use resolved `paths`.
26
+ Định vị chuỗi spec cho UC/TICKET của bug. Ưu tiên `spec-manifest.yaml` (setup umbrella/tester) nếu có; else dùng `paths` đã phân giải.
27
27
 
28
- Gather and store:
29
- - `prd_path` + current PRD `Version`
30
- - `bdd_path` (the `.feature` for this UC) + the specific **failing scenario** title, if one matches
31
- - `tech_doc_path` (if any)
28
+ Thu thập và lưu:
29
+ - `prd_path` + `Version` hiện tại của PRD
30
+ - `bdd_path` (file `.feature` của UC này) + tiêu đề **scenario fail** cụ thể, nếu có cái khớp
31
+ - `tech_doc_path` (nếu )
32
32
  - `service` / domain
33
33
 
34
- If no `.feature` scenario matches the reported behavior → set `coverage_gap = true` (the behavior is untested by BDD).
34
+ Nếu không có scenario `.feature` nào khớp behavior báo cáo → set `coverage_gap = true` (behavior chưa được BDD test).
35
35
 
36
- ## Step 2 — Gather Bug Details
36
+ ## Step 2 — Thu thập chi tiết Bug
37
37
 
38
- If not already in `$ARGUMENTS`, ask the tester (one compact prompt):
38
+ Nếu chưa trong `$ARGUMENTS`, hỏi tester (một prompt gọn):
39
39
 
40
40
  ```
41
- File a bug — answer what you can:
42
- 1. Where does it occur? (endpoint / screen / flow)
43
- 2. Steps to reproduce?
44
- 3. Expected (per spec) vs Actual?
41
+ File một bug — trả lời những gì bạn biết:
42
+ 1. Xảy ra đâu? (endpoint / screen / flow)
43
+ 2. Các bước tái hiện?
44
+ 3. Expected (theo spec) vs Actual?
45
45
  4. Error / log / status code?
46
46
  5. Environment? (staging / prod / local)
47
47
  ```
48
48
 
49
- ## Step 3 — Identify the AC Violated
49
+ ## Step 3 — Xác định AC bị vi phạm
50
50
 
51
- Read the PRD acceptance criteria for this UC. Match the bug to the specific **AC** it violates
52
- (e.g. `AC3: "5 failed loginslock 30m"`). Quote it verbatim. If the behavior maps to no AC →
53
- note "No AC covers this" and treat as a possible PRD gap.
51
+ Đọc PRD acceptance criteria cho UC này. Khớp bug với **AC** cụ thể nó vi phạm
52
+ (vd `AC3: "5 lần login fail khoá 30m"`). Trích nguyên văn. Nếu behavior không map AC nào
53
+ ghi "No AC covers this" coi như một PRD gap khả dĩ.
54
54
 
55
- ## Step 4 — Classify Likely Layer (BUG_FLOW)
55
+ ## Step 4 — Phân loại Layer khả nghi (BUG_FLOW)
56
56
 
57
- Apply the BUG_FLOW decision table to suggest where the root cause likely isthis routes the bug:
57
+ Áp dụng bảng quyết định BUG_FLOW để gợi ý root cause khả năng ở đâu cái này route bug:
58
58
 
59
- | If… | Likely layer | Route to |
59
+ | Nếu… | Layer khả nghi | Route tới |
60
60
  |------|-------------|----------|
61
- | Code contradicts a BDD scenario | **Code bug** (Case 1) | Dev → `/fix-bug` |
62
- | BDD scenario contradicts PRD AC | **BDD bug** (Case 2) | Dev/PO fix BDD |
63
- | PRD AC is ambiguous / silent | **PRD ambiguity** (Case 3) | PO clarifies PRD |
64
- | Behavior correct but **no scenario covers it** | **BDD coverage gap** | Tester → `/propose-scenario` |
61
+ | Code mâu thuẫn một BDD scenario | **Code bug** (Case 1) | Dev → `/fix-bug` |
62
+ | BDD scenario mâu thuẫn PRD AC | **BDD bug** (Case 2) | Dev/PO fix BDD |
63
+ | PRD AC hồ / im lặng | **PRD ambiguity** (Case 3) | PO làm PRD |
64
+ | Behavior đúng nhưng **không scenario nào phủ** | **BDD coverage gap** | Tester → `/propose-scenario` |
65
65
  | UI ≠ Design Spec | **Design Spec bug** (Case 5) | Dev/Designer |
66
- | Env / data only | **Environment** (Case 6) | DevOps |
66
+ | Chỉ Env / data | **Environment** (Case 6) | DevOps |
67
67
 
68
- State the classification as a suggestion (dev confirms during `/fix-bug`).
68
+ Nêu phân loại như một gợi ý (dev confirm trong `/fix-bug`).
69
69
 
70
- ## Step 5 — Write the Report
70
+ ## Step 5 — Ghi Report
71
71
 
72
- Assign `BUG-{today YYYYMMDD}-{NN}` (NN = next sequence among existing reports).
73
- Write to `{paths.bug_reports_dir}/{BUG-ID}.md` (resolved to `{spec_source}/feedback/bug-reports/` in umbrella mode; create dir if needed) using the structure in the Output block, and also print it for pasting into Jira/Slack.
72
+ Gán `BUG-{today YYYYMMDD}-{NN}` (NN = sequence kế tiếp trong các report có sẵn).
73
+ Ghi vào `{paths.bug_reports_dir}/{BUG-ID}.md` (phân giải về `{spec_source}/feedback/bug-reports/` umbrella mode; tạo dir nếu cần) theo cấu trúc trong Output block, cũng in ra để dán vào Jira/Slack.
74
74
 
75
- ## Step 5.5 — Backfill the trace (pending-view link)
75
+ ## Step 5.5 — Backfill trace (link pending-view)
76
76
 
77
- If Step 1 matched a specific failing scenario `{UC-ID}-SC{N}` **and** a trace row exists in
78
- `{paths.trace_dir}/{domain}/{prd-slug}/{UC-ID}.tsv`, update **only** that row so the PO/PM "waiting-on" view points
79
- to this bug — leave every other column (incl. `qc_status`) unchanged:
77
+ Nếu Step 1 khớp một scenario fail cụ thể `{UC-ID}-SC{N}` **và** một trace row tồn tại trong
78
+ `{paths.trace_dir}/{domain}/{prd-slug}/{UC-ID}.tsv`, cập nhật **chỉ** row đó để view "waiting-on" của PO/PM trỏ
79
+ tới bug này giữ nguyên mọi cột khác (gồm `qc_status`):
80
80
  - `qc_blocked_by` = `{BUG-ID}`
81
- - `qc_owner` = `dev` if likely layer ∈ {Code, BDD, Design Spec, Env} · `po` if likely layer = PRD ambiguity
81
+ - `qc_owner` = `dev` nếu layer khả nghi ∈ {Code, BDD, Design Spec, Env} · `po` nếu layer khả nghi = PRD ambiguity
82
82
 
83
- Skip silently if no SC matched or no trace file/row exists (a bug can still be filed). This is
84
- the only write this command makes to operational state — it still **never** edits PRD/BDD/code.
83
+ Skip âm thầm nếu không SC nào khớp hoặc không file/row trace (bug vẫn file được). Đây
84
+ lần ghi duy nhất lệnh này làm tới operational state — vẫn **không bao giờ** sửa PRD/BDD/code.
85
85
 
86
- ## Step 6 — Handoff (so PO/Dev actually see it)
86
+ ## Step 6 — Handoff (để PO/Dev thực sự thấy)
87
87
 
88
- The report only reaches PO/Dev if it is **committed and pushed to the shared spec repo**. A local file is a dead drop.
88
+ Report chỉ tới PO/Dev nếu được **commit push lên spec repo dùng chung**. File local dead drop.
89
89
 
90
- Determine the repo that owns `{paths.bug_reports_dir}`:
91
- - Umbrella mode → the spec submodule at `{spec_source}`
92
- - Single-service → the current repo
90
+ Xác định repo sở hữu `{paths.bug_reports_dir}`:
91
+ - Umbrella mode → spec submodule tại `{spec_source}`
92
+ - Single-service → repo hiện tại
93
93
 
94
- Then commit + push **that** repo:
94
+ Rồi commit + push **repo đó**:
95
95
 
96
96
  ```bash
97
- cd {spec_source} # umbrella: the spec submodule; single-service: omit
97
+ cd {spec_source} # umbrella: spec submodule; single-service: bỏ
98
98
  git add feedback/bug-reports/{BUG-ID}.md
99
99
  git commit -m "qa(bug): {BUG-ID} — {short description}"
100
- git push # → PO/Dev see it on their next /sync
100
+ git push # → PO/Dev thấy lần /sync tiếp theo
101
101
  ```
102
102
 
103
- - If the tester lacks push rights to the spec repo → open a PR / MR instead, or hand the file to whoever owns it. Print this fallback.
104
- - Print the exact commands if you do not run them automatically.
103
+ - Nếu tester không quyền push spec repo → mở PR / MR thay vì, hoặc đưa file cho người sở hữu. In fallback này.
104
+ - In chính xác các lệnh nếu bạn không tự chạy chúng.
105
105
 
106
- > PO/Dev are notified through their normal routine: `/sync` lists newly-pulled bug reports.
106
+ > PO/Dev được thông báo qua routine bình thường: `/sync` liệt các bug report vừa pull về.
107
107
 
108
108
  ---
109
109
 
@@ -112,34 +112,34 @@ git push # → PO/Dev see it on their next /sync
112
112
  {{include:steps/report-footer.md}}
113
113
 
114
114
  ```
115
- 🐞 {BUG-ID} → {paths.bug_reports_dir}/{BUG-ID}.md (in shared spec repo)
115
+ 🐞 {BUG-ID} → {paths.bug_reports_dir}/{BUG-ID}.md (trong spec repo dùng chung)
116
116
 
117
117
  Feature : {UC-ID} — {feature name} | Service: {service} | Severity: {Critical|Major|Minor}
118
- State : 🟢 Open (lifecycle: Open → Fixed → Closed — set `Fixed` by /fix-bug, `Closed` after /qc-run-test re-verify pass)
118
+ State : 🟢 Open (lifecycle: Open → Fixed → Closed — set `Fixed` bởi /fix-bug, `Closed` sau khi /qc-run-test re-verify pass)
119
119
 
120
120
  Spec context
121
121
  PRD : {prd_path} (v{prd_version})
122
- BDD : {bdd_path} → Scenario: "{scenario title}" {or: ⚠️ no scenario covers this}
122
+ BDD : {bdd_path} → Scenario: "{scenario title}" {hoặc: ⚠️ no scenario covers this}
123
123
  Tech Doc : {tech_doc_path}
124
124
 
125
- AC violated
125
+ AC bị vi phạm
126
126
  {AC-N}: "{AC text}"
127
127
 
128
- Expected (per spec) : {expected}
129
- Actual : {actual}
130
- Steps to reproduce : {1..N}
131
- Environment : {env}
128
+ Expected (theo spec) : {expected}
129
+ Actual : {actual}
130
+ Steps to reproduce : {1..N}
131
+ Environment : {env}
132
132
 
133
- Likely layer : {Code | BDD | PRD | Design Spec | Env} → {route}
133
+ Layer khả nghi : {Code | BDD | PRD | Design Spec | Env} → {route}
134
134
 
135
- Handoff : {✅ committed + pushed to spec repo | ⚠️ run the git commands above / open a PR}
135
+ Handoff : {✅ committed + pushed to spec repo | ⚠️ chạy git command trên / mở PR}
136
136
 
137
137
  ---
138
- Status : ✅ Complete (read-only on specs/code — only wrote the feedback file)
138
+ Status : ✅ Complete (read-only trên specs/code — chỉ ghi file feedback)
139
139
  Output Artifacts: created {paths.bug_reports_dir}/{BUG-ID}.md (pushed to shared spec repo)
140
140
  Next :
141
- - PO/Dev will see this on their next /sync
142
- - Code bug → dev runs /fix-bug {BUG-ID}
141
+ - PO/Dev sẽ thấy lần /sync tiếp theo
142
+ - Code bug → dev chạy /fix-bug {BUG-ID}
143
143
  - PRD ambiguity → PO (BUG_FLOW Case 3)
144
144
  - Coverage gap → /propose-scenario {UC-ID}
145
145
  ```