@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,198 +1,198 @@
1
- # /setup-ai-first — Initialize Spec-Driven Docs in a Project
1
+ # /setup-ai-first — Khởi tạo Spec-Driven Docs trong một dự án
2
2
 
3
- Walk the user through a one-time setup that creates all required directories, installs CLAUDE.md, and verifies the environment.
3
+ Dẫn người dùng qua một setup một-lần tạo mọi thư mục cần thiết, cài CLAUDE.md, verify môi trường.
4
4
 
5
5
  ## Gate
6
- # Gate — Universal Entry Procedure
6
+ # Gate — Quy trình vào chuẩn cho mọi lệnh
7
7
 
8
- Every command must execute this gate before proceeding with its specific logic.
8
+ Mọi lệnh PHẢI chạy gate này trước khi thực thi phần logic riêng của nó.
9
9
 
10
- ## Step 0 — Sub-Agent Mode Check
10
+ ## Bước 0 — Kiểm tra chế độ Sub-Agent
11
11
 
12
- Before anything else, check if `$ARGUMENTS` is a JSON payload from an orchestrator:
12
+ Trước tiên, kiểm tra xem `$ARGUMENTS` phải payload JSON từ một orchestrator hay không:
13
13
 
14
- 1. Attempt to parse `$ARGUMENTS` as JSON.
15
- 2. If it parses successfully **and** contains `"_agent_mode": true`:
16
- - **Skip Steps 1, 2, and 3 of this Gate entirely.**
17
- - Set target file = `payload.target_file`
18
- - Set loaded context = `payload.context` (do NOT run context-loader.md)
19
- - Set UC scope = `payload.uc_id` (process only this UC)
20
- - Set line range = `payload.uc_section` (read only that PRD section)
21
- - Proceed directly to the command-specific logic.
22
- 3. If `$ARGUMENTS` is not JSON or `_agent_mode` is absent continue to Step 1 (normal mode).
14
+ 1. Thử parse `$ARGUMENTS` dưới dạng JSON.
15
+ 2. Nếu parse thành công **và** chứa `"_agent_mode": true`:
16
+ - **Bỏ qua hoàn toàn Bước 1, 2 3 của Gate này.**
17
+ - Đặt target file = `payload.target_file`
18
+ - Đặt loaded context = `payload.context` (KHÔNG chạy context-loader.md)
19
+ - Đặt phạm vi UC = `payload.uc_id` (chỉ xử UC này)
20
+ - Đặt line range = `payload.uc_section` (chỉ đọc đúng section đó của PRD)
21
+ - Đi thẳng tới phần logic riêng của lệnh.
22
+ 3. Nếu `$ARGUMENTS` không phải JSON hoặc không có `_agent_mode` tiếp tục sang Bước 1 (chế độ thường).
23
23
 
24
- ## Step 0-B — Model Check
24
+ ## Bước 0-B — Kiểm tra Model
25
25
 
26
- *Skip this step if `_agent_mode: true` (sub-agent — orchestrator already validated).*
26
+ *Bỏ qua bước này nếu `_agent_mode: true` (sub-agent — orchestrator đã kiểm tra rồi).*
27
27
 
28
- Complex generation and review commands require strong reasoning.
29
- Using a smaller model risks missed edge cases, incomplete spec analysis, and architecture violations.
28
+ Các lệnh sinh nội dung và review phức tạp đòi hỏi khả năng suy luận mạnh.
29
+ Dùng model nhỏ hơn sẽ rủi ro: bỏ sót edge case, phân tích spec thiếu sót, vi phạm kiến trúc.
30
30
 
31
- Display and wait for response:
31
+ Hiển thị chờ phản hồi:
32
32
 
33
33
  ```
34
34
  ⚙️ MODEL CHECK
35
35
  ──────────────────────────────────────────────────────────────────
36
- Recommended : claude-opus-4 (or latest Opus model)
37
- Why needed : Spec analysis, architecture review, code generation
38
- require deep reasoning. Smaller models miss edge cases.
36
+ Recommended : claude-opus-4 (hoặc model Opus mới nhất)
37
+ Why needed : Phân tích spec, review kiến trúc, sinh code đòi hỏi
38
+ suy luận sâu. Model nhỏ hơn dễ bỏ sót edge case.
39
39
 
40
- To switch in Claude Code:
41
- • Settings → Model → select "claude-opus"
42
- or: /model → choose claude-opus
40
+ Cách đổi trong Claude Code:
41
+ • Settings → Model → chọn "claude-opus"
42
+ hoặc: /model → chọn claude-opus
43
43
 
44
- Running on claude-opus?
45
- Y — yes, on claude-opus → proceed
46
- S — skip check (I accept lower quality risk with current model)
44
+ Đang chạy claude-opus?
45
+ Y — đúng, đang dùng claude-opus → tiếp tục
46
+ S — bỏ qua kiểm tra (tôi chấp nhận rủi ro chất lượng thấp hơn với model hiện tại)
47
47
  ──────────────────────────────────────────────────────────────────
48
48
  ```
49
49
 
50
- - "Y" → proceed to Step 1.
51
- - "S" → proceed to Step 1 (user accepts risk, add ⚠️ to final report).
52
- - "N" or anything else → **STOP.** Output: "Please switch to claude-opus, then re-run this command."
50
+ - "Y" → tiếp tục sang Bước 1.
51
+ - "S" → tiếp tục sang Bước 1 (người dùng chấp nhận rủi ro, thêm ⚠️ vào report cuối).
52
+ - "N" hoặc bất kỳ giá trị nào khác → **DỪNG.** Xuất: "Vui lòng chuyển sang claude-opus rồi chạy lại lệnh này."
53
53
 
54
- ## Step 1 — Resolve Target File
54
+ ## Bước 1 — Xác định Target File
55
55
 
56
- 1. If `$ARGUMENTS` is provided and points to an existing file → use it directly as the target.
57
- 2. If `$ARGUMENTS` is a **bare UC-ID / ticket ID / partial name** (no path) → resolve it to a file by globbing the feature-package layout. The `{prd-slug}` is **not known yet**, so use a `*` wildcard for that segment, and a recursive `**` under `bdd/` so the platform subfolders (`bdd/web/`, `bdd/app/`, `bdd/system/`) are all covered:
58
- - **BDD commands** (target is a `.feature`): `{specs_dir}/{domain}/*/bdd/**/{UC-ID}*.feature` — or `{specs_dir}/*/*/bdd/**/{UC-ID}*.feature` if the domain is also unknown. If a platform/scope is implied by the command (e.g. a system tech-doc needs the `system/` BDD), prefer the match under that platform subfolder.
59
- - **PRD commands** (target is `prd.md`): `{specs_dir}/{domain}/*/prd.md` (match the feature folder whose id corresponds), else `{specs_dir}/*/*/prd.md`.
60
- - **tech-docs commands**: `{specs_dir}/{domain}/*/tech-docs/{UC-ID}*-tech-design*.md`.
61
- - **design-spec commands**: `{specs_dir}/{domain}/*/design-spec/{TICKET-ID}*.md`.
56
+ 1. Nếu `$ARGUMENTS` được cung cấp trỏ tới một file tồn tại dùng trực tiếp làm target.
57
+ 2. Nếu `$ARGUMENTS` một **UC-ID / ticket ID / tên rút gọn** (không path) → phân giải thành file bằng cách glob theo bố cục feature-package. `{prd-slug}` lúc này **chưa biết**, nên dùng wildcard `*` cho segment đó, `**` đệ quy dưới `bdd/` để phủ hết các thư mục con theo platform (`bdd/web/`, `bdd/app/`, `bdd/system/`):
58
+ - **Lệnh BDD** (target `.feature`): `{specs_dir}/{domain}/*/bdd/**/{UC-ID}*.feature` — hoặc `{specs_dir}/*/*/bdd/**/{UC-ID}*.feature` nếu domain cũng chưa biết. Nếu lệnh ngụ ý một platform/scope cụ thể (vd: system tech-doc cần BDD `system/`), ưu tiên kết quả trong thư mục con platform đó.
59
+ - **Lệnh PRD** (target file PRD `{TICKET-ID}-{prd-slug}.md` — file `.md` duy nhất ở gốc feature folder, cạnh `bdd/`): `{specs_dir}/{domain}/*/{TICKET-ID}*.md` nếu biết TICKET-ID; nếu không, `{specs_dir}/{domain}/*/*.md` (khớp feature folder id tương ứng), hoặc `{specs_dir}/*/*/*.md` nếu domain cũng chưa biết. *(Glob `*/*.md` ở cấp gốc folder chỉ khớp PRD — tech-docs/design-spec `.md` nằm sâu hơn trong thư mục con.)*
60
+ - **Lệnh tech-docs**: `{specs_dir}/{domain}/*/tech-docs/{UC-ID}*-tech-design*.md`.
61
+ - **Lệnh design-spec**: `{specs_dir}/{domain}/*/design-spec/{TICKET-ID}*.md`.
62
62
 
63
- Once a file matches: set it as the target **and** record `domain` + `prd_slug` from its path (per the extraction rule in `context-loader.md` Step 1 — `prd_slug` = first segment after `{specs_dir}/{domain}/`). Every path the command later reads or writes (sibling BDD/tech-docs/design-spec/trace) uses **that resolved `prd_slug`**, so all artifacts stay in one feature package. If several files match (e.g. multiple platforms), pick per the command's platform/scope or list them and ask.
64
- 3. If `$ARGUMENTS` is empty or no match found:
65
- - List files in the relevant directory for this command (e.g., `specs/*/*/prd.md` for PRD commands, `specs/*/*/bdd/**/*.feature` for BDD commands).
66
- - Present the list to the user and ask: "Which file do you want to work with? (Enter number or filename)"
67
- - Wait for user selection before continuing.
63
+ Khi một file khớp: đặt làm target **và** ghi lại `domain` + `prd_slug` từ path của nó (theo quy tắc trích xuất trong `context-loader.md` Bước 1 — `prd_slug` = segment đầu tiên sau `{specs_dir}/{domain}/`). Mọi path lệnh đọc/ghi về sau (BDD/tech-docs/design-spec/trace cùng cấp) đều dùng **`prd_slug` đã phân giải đó**, nên tất cả artifact nằm chung một feature package. Nếu nhiều file khớp (vd: nhiều platform), chọn theo platform/scope của lệnh hoặc liệt kê ra và hỏi.
64
+ 3. Nếu `$ARGUMENTS` rỗng hoặc không tìm thấy file khớp:
65
+ - Liệt các file trong thư mục liên quan của lệnh này (vd: `specs/*/*/*.md` file PRD ở gốc mỗi feature folder — cho lệnh PRD, `specs/*/*/bdd/**/*.feature` cho lệnh BDD).
66
+ - Hiển thị danh sách cho người dùng và hỏi: "Bạn muốn làm việc với file nào? (Nhập số thứ tự hoặc tên file)"
67
+ - Chờ người dùng chọn rồi mới tiếp tục.
68
68
 
69
- ## Step 2 — Execute Context Loader
69
+ ## Bước 2 — Chạy Context Loader
70
70
 
71
- Load all project context by following the procedure in `steps/context-loader.md`.
72
- Store all loaded context in memory for use throughout this command session.
71
+ Nạp toàn bộ context của dự án bằng cách làm theo quy trình trong `steps/context-loader.md`.
72
+ Lưu toàn bộ context đã nạp vào bộ nhớ để dùng xuyên suốt phiên làm việc của lệnh.
73
73
 
74
- ## Step 3 — CHECKPOINT
74
+ ## Bước 3 — CHECKPOINT
75
75
 
76
- After completing Steps 1 and 2, display a summary and wait for confirmation:
76
+ Sau khi hoàn thành Bước 1 2, hiển thị bản tóm tắt chờ xác nhận:
77
77
 
78
78
  ```
79
79
  CHECKPOINT
80
80
  -----------
81
81
  Target : {resolved file path}
82
- Project : {project.name from project-context.yaml}
82
+ Project : {project.name từ project-context.yaml}
83
83
  Tech stack : {language} / {framework}
84
- Module : {module if set, else "not configured"}
85
- Domains : {comma-separated domain list}
84
+ Module : {module nếu có, else "not configured"}
85
+ Domains : {danh sách domain, ngăn cách bởi dấu phẩy}
86
86
 
87
- Proceed? (Y/N)
87
+ Tiếp tục? (Y/N)
88
88
  ```
89
89
 
90
- Wait for explicit "Y" or "N" from the user before continuing.
91
- - "Y" → proceed to the command-specific steps below.
92
- - "N" → stop and ask what the user wants to change.
90
+ Chờ người dùng trả lời rõ ràng "Y" hoặc "N" rồi mới tiếp tục.
91
+ - "Y" → tiếp tục sang các bước riêng của lệnh bên dưới.
92
+ - "N" → dừng lại hỏi người dùng muốn thay đổi gì.
93
93
 
94
94
 
95
- *Note: For this command — **skip Gate Steps 1, 2, and 3** (there is no input file and no project context yet). Only run Step 0-B (model check). The project root is the **current working directory**. Proceed directly to the Precondition Check below.*
95
+ *Lưu ý: Với lệnh này — **bỏ qua Gate Step 1, 2, 3** (chưa file input chưa project context). Chỉ chạy Step 0-B (model check). Project root **thư mục làm việc hiện tại**. Đi thẳng tới Precondition Check bên dưới.*
96
96
 
97
97
  ---
98
98
 
99
99
  ## Precondition Check
100
100
 
101
- Check if already set up:
102
- - If `CLAUDE.md` **and** `.agent/project-context.yaml` both existask: "This project is already initialized. Re-run setup to regenerate config files? (Y/N)"
103
- - N → stop
104
- - Y → continue (existing files will be preservedeach step will offer merge/skip)
105
- - If only `specs/` exists or only partial setup detectedcontinue normally (safe to re-run)
101
+ Kiểm tra đã setup chưa:
102
+ - Nếu cả `CLAUDE.md` **và** `.agent/project-context.yaml` đều tồn tại hỏi: "Dự án này đã được khởi tạo. Chạy lại setup để regenerate file config? (Y/N)"
103
+ - N → dừng
104
+ - Y → tiếp tục (file sẵn được giữmỗi bước sẽ đề nghị merge/skip)
105
+ - Nếu chỉ `specs/` hoặc phát hiện setup một phần tiếp tục bình thường (an toàn chạy lại)
106
106
 
107
- ## Step 0.5 — Project Type
107
+ ## Step 0.5 — Loại dự án
108
108
 
109
- Ask the user:
109
+ Hỏi người dùng:
110
110
 
111
111
  ```
112
- What type of project is this?
113
- 1. Single-service — one codebase, one platform (standard setup)
114
- 2. Umbrella repo — this repo contains multiple service submodules (microservices / multi-app)
115
- 3. PO Spec repo — docs only, no runnable code (PRD + design-spec only)
112
+ Dự án này thuộc loại nào?
113
+ 1. Single-service — một codebase, một platform (setup chuẩn)
114
+ 2. Umbrella repo — repo này chứa nhiều service submodule (microservices / multi-app)
115
+ 3. PO Spec repo — chỉ docs, không code chạy được (chỉ PRD + design-spec)
116
116
  ```
117
117
 
118
- Store the answer as `project_type`. Default to `1` if user does not answer.
118
+ Lưu câu trả lời thành `project_type`. Mặc định `1` nếu user không trả lời.
119
119
 
120
- Based on answer:
120
+ Dựa trên câu trả lời:
121
121
 
122
- **project_type = 1 (Single-service):** Continue standard setup below.
122
+ **project_type = 1 (Single-service):** Tiếp tục setup chuẩn bên dưới.
123
123
 
124
- **project_type = 2 (Umbrella):** Ask two follow-up questions:
125
- - "Path to spec submodule (e.g. `free-trial-specs`)? Press Enter to skip."
126
- - "List services as `domain:module` pairs, comma-separated
127
- (e.g. `user:java-spring,order:java-spring`). Press Enter to skip."
124
+ **project_type = 2 (Umbrella):** Hỏi hai câu follow-up:
125
+ - "Path tới spec submodule (vd `free-trial-specs`)? Nhấn Enter để skip."
126
+ - "Liệt các service dạng cặp `domain:module`, ngăn cách bởi dấu phẩy
127
+ (vd `user:java-spring,order:java-spring`). Nhấn Enter để skip."
128
128
 
129
- Then:
130
- - Skip creating any `specs/` artifacts (all specs — PRD, BDD, tech-docs, design-spec — live in the spec submodule under the feature-package layout `specs/{domain}/{prd-slug}/`)
131
- - Create only: `.trace/`, `.agent/review/` at umbrella level
132
- *(Unless user explicitly asks to create the full structure)*
133
- - Generate `.agent/project-context.yaml` in umbrella mode with the services and spec_source provided
134
- - Skip creating `CLAUDE.md` (umbrella has no single tech stack)
135
- - After setup, remind: "Open each service submodule separately in Claude Code to install the framework there if needed."
129
+ Rồi:
130
+ - Skip tạo bất kỳ artifact `specs/` nào (mọi spec — PRD, BDD, tech-docs, design-spec — sống trong spec submodule theo bố cục feature-package `specs/{domain}/{prd-slug}/`)
131
+ - Chỉ tạo: `.trace/`, `.agent/review/` cấp umbrella
132
+ *(Trừ khi user yêu cầu tạo cấu trúc đầy đủ)*
133
+ - Sinh `.agent/project-context.yaml` umbrella mode với services spec_source đã cung cấp
134
+ - Skip tạo `CLAUDE.md` (umbrella không một tech stack đơn)
135
+ - Sau setup, nhắc: "Mở từng service submodule riêng trong Claude Code để cài framework đó nếu cần."
136
136
 
137
137
  **project_type = 3 (PO Spec repo):**
138
- - Create base dirs: `specs/product-definition/`, `specs/domain-knowledge/`, `feedback/`, `.agent/review/`
139
- - Per-feature artifacts (`specs/{domain}/{prd-slug}/{prd.md, bdd/, tech-docs/, design-spec/}`) are created on demand by the generate commands do NOT pre-create them
140
- - Skip: `.trace/` (per-service, lives beside code in each service submodule)
141
- - Generate minimal `CLAUDE.md` with only §1 (project overview) and §7 (git conventions)
142
- - Ask the user: **"List your business domains (e.g. auth, payment, loyalty):"** — store as domain list for `project-context.yaml` and remind PO these names must be used consistently as `@trace.domain` in every PRD
143
- - Inform:
144
- - Commands for PO repo: `/define-product`, `/generate-prd`, `/review-context`, `/generate-design-spec`
145
- - **Critical for dev team handoff:** Every PRD must have `@trace.domain: {domain}` in its frontmatter. Dev team uses this to route generated BDD/code to the correct service submodule. Inconsistent domain names will break routing.
146
- - Recommended PRD frontmatter:
138
+ - Tạo base dir: `specs/product-definition/`, `specs/domain-knowledge/`, `feedback/`, `.agent/review/`
139
+ - Artifact theo từng feature (`specs/{domain}/{prd-slug}/{ {TICKET-ID}-{prd-slug}.md, bdd/, tech-docs/, design-spec/}`) được tạo on demand bởi các lệnh generate — ĐỪNG tạo trước
140
+ - Skip: `.trace/` (theo service, sống cạnh code trong mỗi service submodule)
141
+ - Sinh `CLAUDE.md` tối thiểu chỉ với §1 (project overview) §7 (git conventions)
142
+ - Hỏi người dùng: **"Liệt các business domain của bạn (vd auth, payment, loyalty):"** — lưu thành domain list cho `project-context.yaml` nhắc PO các tên này phải được dùng nhất quán làm `@trace.domain` trong mọi PRD
143
+ - Thông báo:
144
+ - Lệnh cho PO repo: `/define-product`, `/generate-prd`, `/review-context`, `/generate-design-spec`
145
+ - **Quan trọng cho handoff team dev:** Mọi PRD phải `@trace.domain: {domain}` trong frontmatter. Team dev dùng để route BDD/code sinh ra tới đúng service submodule. Tên domain không nhất quán sẽ phá routing.
146
+ - Frontmatter PRD khuyến nghị:
147
147
  ```
148
- @trace.domain: {domain} ← must match a key in dev team's services config
148
+ @trace.domain: {domain} ← phải khớp một key trong services config của team dev
149
149
  @trace.id: {TICKET-ID}
150
150
  @trace.status: draft | approved
151
151
  ```
152
152
 
153
- ## Step 1 — Create Directory Structure
153
+ ## Step 1 — Tạo cấu trúc thư mục
154
154
 
155
- Create these directories (skip if they exist):
155
+ Tạo các thư mục này (skip nếu đã tồn tại):
156
156
 
157
157
  ```
158
158
  {project-root}/
159
159
  ├── specs/
160
- │ ├── product-definition/ ← Output of /define-product
160
+ │ ├── product-definition/ ← Output của /define-product
161
161
  │ └── domain-knowledge/ ← business dictionary & domain context
162
162
  ├── .trace/ ← .trace/{domain}/{prd-slug}/{UC-ID}.tsv
163
163
  └── .agent/
164
164
  └── review/
165
165
  ```
166
166
 
167
- **Feature-package layout** — per-feature spec artifacts are NOT pre-created. Each generate
168
- command creates its own folder on demand under `specs/{domain}/{prd-slug}/`:
167
+ **Bố cục feature-package** — artifact spec theo từng feature KHÔNG được tạo trước. Mỗi lệnh generate
168
+ tự tạo folder của on demand dưới `specs/{domain}/{prd-slug}/`:
169
169
 
170
170
  ```
171
171
  specs/{domain}/{prd-slug}/
172
- ├── prd.md ← /generate-prd
173
- ├── bdd/ ← /generate-bdd (.feature files)
172
+ ├── {TICKET-ID}-{prd-slug}.md ← /generate-prd (vd SEG01-segment-scoring-service.md)
173
+ ├── bdd/ ← /generate-bdd (file .feature)
174
174
  ├── tech-docs/ ← /generate-tech-docs
175
- └── design-spec/ ← /generate-design-spec (FE/App platforms only)
175
+ └── design-spec/ ← /generate-design-spec (chỉ platform FE/App)
176
176
  ```
177
177
 
178
- *Which base dirs to create varies by `project_type` set in Step 0.5:*
178
+ *Tạo base dir nào tuỳ theo `project_type` set Step 0.5:*
179
179
 
180
- | project_type | Create | Skip |
180
+ | project_type | Tạo | Skip |
181
181
  |---|---|---|
182
- | **1 — Single-service** | Base structure above (`specs/product-definition/`, `specs/domain-knowledge/`, `.trace/`, `.agent/review/`) | per-feature folders (created on demand) |
183
- | **2 — Umbrella** | `.trace/` + `.agent/review/` only (at umbrella root) | Everything else — **all specs live in the spec submodule (`spec_source`)** under `specs/{domain}/{prd-slug}/`; service submodules hold only **code + `.trace/`** |
184
- | **3 — PO Spec repo** | `specs/product-definition/`, `specs/domain-knowledge/`, **`feedback/`**, `.agent/review/` (per-feature `specs/{domain}/{prd-slug}/` folders created on demand) | `.trace/` (per-service, lives beside code in each service submodule) |
182
+ | **1 — Single-service** | Cấu trúc base ở trên (`specs/product-definition/`, `specs/domain-knowledge/`, `.trace/`, `.agent/review/`) | folder theo feature (tạo on demand) |
183
+ | **2 — Umbrella** | Chỉ `.trace/` + `.agent/review/` ( umbrella root) | Mọi thứ khác — **toàn bộ spec sống trong spec submodule (`spec_source`)** dưới `specs/{domain}/{prd-slug}/`; service submodule chỉ chứa **code + `.trace/`** |
184
+ | **3 — PO Spec repo** | `specs/product-definition/`, `specs/domain-knowledge/`, **`feedback/`**, `.agent/review/` (folder `specs/{domain}/{prd-slug}/` theo feature tạo on demand) | `.trace/` (theo service, sống cạnh code trong mỗi service submodule) |
185
185
 
186
- ## Step 2 — Create CLAUDE.md
186
+ ## Step 2 — Tạo CLAUDE.md
187
187
 
188
- *Skip this step entirely if `project_type = 2` (Umbrella) — umbrella has no single tech stack.*
189
- *For `project_type = 3` (PO Spec repo) — create a minimal CLAUDE.md with only §1 (project overview) and §7 (git conventions). Skip §2–§6.*
188
+ *Bỏ qua hoàn toàn step này nếu `project_type = 2` (Umbrella) — umbrella không một tech stack đơn.*
189
+ *Với `project_type = 3` (PO Spec repo) — tạo CLAUDE.md tối thiểu chỉ với §1 (project overview) §7 (git conventions). Skip §2–§6.*
190
190
 
191
- Check if `CLAUDE.md` exists:
192
- - Yesask "Merge template or skip?"
193
- - Nocreate from the template below
191
+ Kiểm tra `CLAUDE.md` tồn tại chưa:
192
+ - hỏi "Merge template hay skip?"
193
+ - Khôngtạo từ template bên dưới
194
194
 
195
- After creating, instruct: "Open CLAUDE.md and fill in the `{{PLACEHOLDER}}` values with your project information."
195
+ Sau khi tạo, hướng dẫn: "Mở CLAUDE.md điền các giá trị `{{PLACEHOLDER}}` bằng thông tin dự án của bạn."
196
196
 
197
197
  ### CLAUDE.md Template
198
198
 
@@ -242,27 +242,27 @@ branch_feature: "feature/{{TICKET_PREFIX}}-{N}-{slug}"
242
242
  commit_feature: "feat({{TICKET_PREFIX}}-{N}): {description}"
243
243
  ```
244
244
 
245
- ## Step 3 — Create project-context.yaml
245
+ ## Step 3 — Tạo project-context.yaml
246
246
 
247
- *For `project_type = 2` (Umbrella):*
248
- - *If `.agent/project-context.yaml` was already generated by `--init --umbrella` → open it and verify/edit the `services` section (domain keys, paths, modules). Skip template copy below.*
249
- - *If not yet generated ask: "Spec submodule path?" and "Services (domain:module pairs)?" then generate umbrella config (see Step 0.5 for format).*
247
+ *Với `project_type = 2` (Umbrella):*
248
+ - *Nếu `.agent/project-context.yaml` đã được sinh bởi `--init --umbrella` → mở verify/sửa section `services` (domain key, path, module). Skip copy template bên dưới.*
249
+ - *Nếu chưa sinhhỏi: "Path spec submodule?" "Services (cặp domain:module)?" rồi sinh config umbrella (xem Step 0.5 cho format).*
250
250
 
251
- Create `.agent/project-context.yaml` using `.agent/templates/project-context.yaml` as the source template.
251
+ Tạo `.agent/project-context.yaml` dùng `.agent/templates/project-context.yaml` làm template nguồn.
252
252
 
253
- Copy the template and instruct: "Open `.agent/project-context.yaml` and fill in all `{{PLACEHOLDER}}` values. The `paths` section is pre-configured with sensible defaultsadjust if your project uses different directory names."
253
+ Copy template hướng dẫn: "Mở `.agent/project-context.yaml` điền mọi giá trị `{{PLACEHOLDER}}`. Section `paths` đã được cấu hình sẵn với default hợp lý chỉnh nếu dự án dùng tên thư mục khác."
254
254
 
255
- ## Step 4 — Create business-dictionary.md
255
+ ## Step 4 — Tạo business-dictionary.md
256
256
 
257
- *Skip Steps 4 and 5 if `project_type = 2` (Umbrella) — business dictionary and core entities live in the spec submodule and are managed by the PO team. Dev team reads them from `{spec_source}/specs/domain-knowledge/`.*
257
+ *Skip Step 4 5 nếu `project_type = 2` (Umbrella) — business dictionary core entities sống trong spec submodule do team PO quản lý. Team dev đọc chúng từ `{spec_source}/specs/domain-knowledge/`.*
258
258
 
259
259
 
260
- Create `specs/domain-knowledge/business-dictionary.md` if it does not exist:
260
+ Tạo `specs/domain-knowledge/business-dictionary.md` nếu chưa tồn tại:
261
261
 
262
262
  ```markdown
263
263
  # Business Dictionary — {{PROJECT_NAME}}
264
264
 
265
- > Canonical terminology for this project. All PRDs, BDD specs, and code must follow these terms.
265
+ > Thuật ngữ chuẩn cho dự án này. Mọi PRD, BDD spec, code phải theo các thuật ngữ này.
266
266
  > Managed by: PO / SA team.
267
267
 
268
268
  ## Canonical Terms
@@ -284,17 +284,17 @@ Create `specs/domain-knowledge/business-dictionary.md` if it does not exist:
284
284
  | {Entity} | status | {value1, value2} |
285
285
  ```
286
286
 
287
- Instruct: "Open `specs/domain-knowledge/business-dictionary.md` and add your project terminology. This file will be read by all commands to enforce consistent naming."
287
+ Hướng dẫn: "Mở `specs/domain-knowledge/business-dictionary.md` thêm thuật ngữ dự án của bạn. File này sẽ được mọi lệnh đọc để enforce naming nhất quán."
288
288
 
289
- ## Step 5 — Create core-entities.md
289
+ ## Step 5 — Tạo core-entities.md
290
290
 
291
- Create `specs/domain-knowledge/core-entities.md` if it does not exist:
291
+ Tạo `specs/domain-knowledge/core-entities.md` nếu chưa tồn tại:
292
292
 
293
293
  ```markdown
294
294
  # Core Entities — {{PROJECT_NAME}}
295
295
 
296
- > Machine-readable entity glossary for AI-assisted development.
297
- > Loaded by all commands so AI knows your domain model without reading source code.
296
+ > Glossary entity máy-đọc-được cho phát triển có AI hỗ trợ.
297
+ > Được mọi lệnh nạp để AI biết domain model của bạn mà không cần đọc source code.
298
298
  > Managed by: Tech Lead / Architect.
299
299
  >
300
300
  > HOW TO USE:
@@ -332,89 +332,89 @@ Create `specs/domain-knowledge/core-entities.md` if it does not exist:
332
332
  *(Add more entities following the same pattern above)*
333
333
  ```
334
334
 
335
- Instruct: "Open `specs/domain-knowledge/core-entities.md` and define your key domain entities. Start with aggregate roots. This file is loaded by every AI commandgood definitions here save significant back-and-forth during code generation."
335
+ Hướng dẫn: "Mở `specs/domain-knowledge/core-entities.md` định nghĩa các domain entity chính. Bắt đầu với aggregate root. File này được mọi lệnh AI nạpđịnh nghĩa tốt đây tiết kiệm đáng kể qua-lại khi sinh code."
336
336
 
337
- ## Step 6 — Install VS Code Extension (Recommended)
337
+ ## Step 6 — Cài VS Code Extension (Khuyến nghị)
338
338
 
339
- Recommend the user install the **Spec Driven Docs Tools** VS Code extension it provides Review Board + Living Documentation panels that integrate with this workflow.
339
+ Khuyến nghị user cài extension VS Code **Spec Driven Docs Tools** cung cấp panel Review Board + Living Documentation tích hợp với workflow này.
340
340
 
341
341
  ```bash
342
342
  code --install-extension SpecDrivenDocsTools.spec-driven-docs-tool
343
343
  ```
344
344
 
345
- Or: VS Code → `Ctrl+Shift+P` → **"Extensions: Install from Marketplace"** → search **Spec Driven Docs Tools**.
345
+ Hoặc: VS Code → `Ctrl+Shift+P` → **"Extensions: Install from Marketplace"** → tìm **Spec Driven Docs Tools**.
346
346
 
347
- **What it does:**
348
- - 📋 **Review Board** — visual UI to review findings from `/refine-prd`, `/review-context`, `/review-tech-docs`
349
- - 📊 **Living Documentation** — traceability dashboard driven by `.trace/*.tsv`
347
+ ** làm gì:**
348
+ - 📋 **Review Board** — UI trực quan để review findings từ `/refine-prd`, `/review-context`, `/review-tech-docs`
349
+ - 📊 **Living Documentation** — dashboard traceability dựa trên `.trace/*.tsv`
350
350
 
351
351
  ## Step 7 — Verify
352
352
 
353
- Checklist varies by `project_type`:
353
+ Checklist tuỳ theo `project_type`:
354
354
 
355
355
  **project_type = 1 (Single-service):**
356
- - [ ] `specs/` exists
357
- - [ ] `specs/product-definition/` exists
358
- - [ ] `specs/domain-knowledge/` exists
359
- - [ ] `.trace/` exists
360
- *(per-feature `specs/{domain}/{prd-slug}/` folders are created on demand — not checked here)*
361
- - [ ] `.agent/project-context.yaml` exists
362
- - [ ] `CLAUDE.md` exists
363
- - [ ] `specs/domain-knowledge/business-dictionary.md` exists
364
- - [ ] `specs/domain-knowledge/core-entities.md` exists
356
+ - [ ] `specs/` tồn tại
357
+ - [ ] `specs/product-definition/` tồn tại
358
+ - [ ] `specs/domain-knowledge/` tồn tại
359
+ - [ ] `.trace/` tồn tại
360
+ *(folder `specs/{domain}/{prd-slug}/` theo feature tạo on demand — không check ở đây)*
361
+ - [ ] `.agent/project-context.yaml` tồn tại
362
+ - [ ] `CLAUDE.md` tồn tại
363
+ - [ ] `specs/domain-knowledge/business-dictionary.md` tồn tại
364
+ - [ ] `specs/domain-knowledge/core-entities.md` tồn tại
365
365
 
366
366
  **project_type = 2 (Umbrella):**
367
- - [ ] `.agent/project-context.yaml` exists with `setup.mode: umbrella`
368
- - [ ] `services` section has at least one entry with correct domain keys
369
- - [ ] `spec_source` path exists (e.g., `my-project-specs/` directory is present)
370
- - [ ] `.agent/review/` exists
371
- - [ ] Spec submodule initialized: `git submodule status` shows no `-` prefix
367
+ - [ ] `.agent/project-context.yaml` tồn tại với `setup.mode: umbrella`
368
+ - [ ] Section `services` ít nhất một entry với đúng domain key
369
+ - [ ] Path `spec_source` tồn tại (vd thư mục `my-project-specs/` mặt)
370
+ - [ ] `.agent/review/` tồn tại
371
+ - [ ] Spec submodule đã init: `git submodule status` không hiện prefix `-`
372
372
 
373
373
  **project_type = 3 (PO Spec repo):**
374
- - [ ] `specs/product-definition/` exists
375
- - [ ] `specs/domain-knowledge/` exists
376
- - [ ] `feedback/` exists
377
- *(per-feature `specs/{domain}/{prd-slug}/` folders are created on demand — not checked here)*
378
- - [ ] `.agent/review/` exists
379
- - [ ] `.agent/project-context.yaml` exists
380
- - [ ] `CLAUDE.md` exists (minimal)
381
- - [ ] `specs/domain-knowledge/business-dictionary.md` exists
382
- - [ ] `specs/domain-knowledge/core-entities.md` exists
374
+ - [ ] `specs/product-definition/` tồn tại
375
+ - [ ] `specs/domain-knowledge/` tồn tại
376
+ - [ ] `feedback/` tồn tại
377
+ *(folder `specs/{domain}/{prd-slug}/` theo feature tạo on demand — không check ở đây)*
378
+ - [ ] `.agent/review/` tồn tại
379
+ - [ ] `.agent/project-context.yaml` tồn tại
380
+ - [ ] `CLAUDE.md` tồn tại (tối thiểu)
381
+ - [ ] `specs/domain-knowledge/business-dictionary.md` tồn tại
382
+ - [ ] `specs/domain-knowledge/core-entities.md` tồn tại
383
383
 
384
384
  ## Output
385
385
 
386
- # Report Footer — Standard Command Output Format
386
+ # Report Footer — Định dạng output chuẩn cho mọi lệnh
387
387
 
388
- Every command report must end with this standard footer section.
388
+ Mọi report của lệnh phải kết thúc bằng section footer chuẩn này.
389
389
 
390
390
  ## Status Badge
391
391
 
392
- Choose one based on outcome:
393
- - `✅ Complete` — all steps succeeded, no issues found
394
- - `❌ Failed` — command could not complete due to a blocking error
395
- - `⚠️ Warnings` — completed with non-blocking issues that should be reviewed
392
+ Chọn một theo kết quả:
393
+ - `✅ Complete` — mọi bước thành công, không vấn đề
394
+ - `❌ Failed` — lệnh không hoàn thành được do lỗi chặn
395
+ - `⚠️ Warnings` — hoàn thành nhưng vấn đề không chặn, nên review lại
396
396
 
397
397
  ## Output Artifacts
398
398
 
399
- List every file created or modified by this command:
399
+ Liệt mọi file được tạo hoặc sửa bởi lệnh này:
400
400
  ```
401
401
  Output Artifacts:
402
- {created|updated} {file-path} ({brief description})
403
- {created|updated} {file-path} ({brief description})
402
+ {created|updated} {file-path} ({ tả ngắn})
403
+ {created|updated} {file-path} ({ tả ngắn})
404
404
  ```
405
405
 
406
- If no files were written (e.g., review or analysis commands) → write `Output Artifacts: none (read-only)`.
406
+ Nếu không ghi file nào (vd: lệnh review hoặc phân tích) → ghi `Output Artifacts: none (read-only)`.
407
407
 
408
408
  ## Pipeline Position
409
409
 
410
- Print a one-line map of the pipeline with the CURRENT command's phase marked `◀ bạn ở đây`,
411
- so the user always sees where this command sits in the end-to-end flow:
410
+ In một đồ pipeline một dòng, đánh dấu phase của lệnh HIỆN TẠI bằng `◀ bạn ở đây`,
411
+ để người dùng luôn thấy lệnh này nằm đâu trong luồng end-to-end:
412
412
 
413
413
  ```
414
414
  Discovery → PRD → [Design Spec] → BDD → Tech Design → Code → Dev Self-Check → QC → Trace Audit
415
415
  ```
416
416
 
417
- Find the current command in this phase legend and mark **its** phase in the map above:
417
+ Tìm lệnh hiện tại trong bảng phase dưới đây đánh dấu **phase của nó** trong sơ đồ trên:
418
418
 
419
419
  | Phase | Commands |
420
420
  |-------|----------|
@@ -428,118 +428,118 @@ Find the current command in this phase legend and mark **its** phase in the map
428
428
  | QC | `/qc-analyze` · `/qc-plan` · `/qc-design-test` · `/qc-review` · `/qc-run-test` · `/qc-report` |
429
429
  | Trace Audit | `/validate-traces` |
430
430
 
431
- For a **review command**, also append the 3-step review loop with the current step marked, e.g.:
431
+ Với **lệnh review**, thêm vòng review 3 bước đánh dấu bước hiện tại, vd:
432
432
  `Vòng review: [① phân tích ◀] → ② Review Board → ③ --resume`.
433
433
 
434
- **Cross-cutting commands** (`/sync`, `/update-framework`, `/fix-bug`, `/debug`, `/learn`,
435
- `/report-bug`, `/propose-scenario`, `/generate-spec-manifest`) sit outside the linear pipeline
436
- **omit the Pipeline line entirely** for these (do not force-fit them onto the map).
434
+ **Lệnh xuyên suốt** (`/sync`, `/update-framework`, `/fix-bug`, `/debug`, `/learn`,
435
+ `/report-bug`, `/propose-scenario`, `/generate-spec-manifest`) nằm ngoài pipeline tuyến tính
436
+ **bỏ hẳn dòng Pipeline** cho các lệnh này (đừng cố nhét chúng vào đồ).
437
437
 
438
- ## Next Command Suggestion
438
+ ## Gợi ý lệnh tiếp theo
439
439
 
440
- Suggest the logical next command based on workflow phase:
440
+ Gợi ý lệnh kế tiếp hợp theo phase của workflow:
441
441
 
442
- | Current command | Suggest next |
442
+ | Lệnh hiện tại | Gợi ý lệnh tiếp theo |
443
443
  |-------------------------|-----------------------------------------------|
444
- | /setup-ai-first | `/define-product` to start your first feature |
444
+ | /setup-ai-first | `/define-product` để bắt đầu feature đầu tiên |
445
445
  | /define-product | `/generate-prd {product-definition-file}` |
446
- | /generate-prd | `/refine-prd {prd-file}` then `/review-context {prd-file}` |
447
- | /refine-prd | Open Review Board → update PRD → `/review-context {prd-file}` |
448
- | /review-context (PRD) | FE/App: `/generate-design-spec {prd-file}` (then BDD after sign-off); BE: `/generate-bdd {prd-file}` directly; fix PRD if NEEDS_FIX |
449
- | /generate-design-spec | Designer review → Figma links confirmed → PO + Designer sign-off → `/generate-bdd {prd-file}` |
450
- | /generate-bdd | `/review-context {feature-file}` to verify coverage |
451
- | /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
452
- | /qc-analyze | `/qc-plan {UC-ID}` (resolve 🔴 blocker gaps first) |
446
+ | /generate-prd | `/refine-prd {prd-file}` rồi `/review-context {prd-file}` |
447
+ | /refine-prd | Mở Review Board → cập nhật PRD → `/review-context {prd-file}` |
448
+ | /review-context (PRD) | FE/App: `/generate-design-spec {prd-file}` (rồi BDD sau khi sign-off); BE: `/generate-bdd {prd-file}` trực tiếp; sửa PRD nếu NEEDS_FIX |
449
+ | /generate-design-spec | Designer review → xác nhận link Figma → PO + Designer sign-off → `/generate-bdd {prd-file}` |
450
+ | /generate-bdd | `/review-context {feature-file}` để kiểm tra độ phủ |
451
+ | /review-context (BDD) | `/generate-tech-docs {UC-ID}` nếu APPROVED; sinh lại nếu NEEDS_FIX |
452
+ | /qc-analyze | `/qc-plan {UC-ID}` (xử các gap blocker 🔴 trước) |
453
453
  | /qc-plan | `/qc-design-test {UC-ID}` |
454
- | /qc-design-test | `/qc-review {UC-ID}` (test-case review) |
455
- | /qc-review (test-case) | `/qc-run-test {UC-ID}` if APPROVED; fix TCs if NEEDS_FIX |
456
- | /qc-run-test | `/qc-report {UC-ID}` then `/qc-review {UC-ID}` (script review) |
457
- | /qc-review (script) | `/qc-report {UC-ID}` then create PR if APPROVED |
458
- | /qc-report | `/validate-traces {UC-ID}` to refresh Living Docs (qc_status) |
454
+ | /qc-design-test | `/qc-review {UC-ID}` (review test-case) |
455
+ | /qc-review (test-case) | `/qc-run-test {UC-ID}` nếu APPROVED; sửa TC nếu NEEDS_FIX |
456
+ | /qc-run-test | `/qc-report {UC-ID}` rồi `/qc-review {UC-ID}` (review script) |
457
+ | /qc-review (script) | `/qc-report {UC-ID}` rồi tạo PR nếu APPROVED |
458
+ | /qc-report | `/validate-traces {UC-ID}` để làm mới Living Docs (qc_status) |
459
459
  | /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
460
- | /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
461
- | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
460
+ | /review-tech-docs | `/generate-code {feature-file}` nếu APPROVED; sửa doc nếu NEEDS_FIX |
461
+ | /generate-code | Lần gen đầu → `/review-code {UC-ID}`; gen lại → `/dev-gen-test {UC-ID}` |
462
462
  | /dev-gen-test | `/dev-run-test {UC-ID}` |
463
463
  | /dev-run-test (passing) | `/review-code {UC-ID}` |
464
- | /dev-run-test (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
465
- | /review-code | `/dev-smoke-test {UC-ID}` or create PR |
466
- | /dev-smoke-test | Create PR and link to ticket |
467
- | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; all OK → create PR |
468
- | /fix-bug | Create PR and link to ticket |
469
- | /debug | `/fix-bug {ticket-id}` if fix needed |
470
- | /report-bug | Send to dev (`/fix-bug {BUG-ID}`); if coverage gap → `/propose-scenario {UC-ID}` |
471
- | /propose-scenario | Notify PO/Dev to review the proposal in `feedback/bdd-proposals/` |
472
- | /learn | Continue working — lesson applies on next command |
473
- | /sync | `/validate-traces` for full coverage; act on any `📥 tester feedback` surfaced |
474
- | /update-framework | Review `git diff .agent/`, commit; `/sync` for project content |
475
-
476
- Format the footer as:
464
+ | /dev-run-test (failing) | `/fix-bug {ticket-id}` hoặc `/debug {error}` |
465
+ | /review-code | `/dev-smoke-test {UC-ID}` hoặc tạo PR |
466
+ | /dev-smoke-test | Tạo PR link tới ticket |
467
+ | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; tất cả OK → tạo PR |
468
+ | /fix-bug | Tạo PR link tới ticket |
469
+ | /debug | `/fix-bug {ticket-id}` nếu cần sửa |
470
+ | /report-bug | Gửi cho dev (`/fix-bug {BUG-ID}`); nếu thiếu coverage → `/propose-scenario {UC-ID}` |
471
+ | /propose-scenario | Báo PO/Dev review proposal trong `feedback/bdd-proposals/` |
472
+ | /learn | Tiếp tục làm việc — lesson áp dụng lệnh kế tiếp |
473
+ | /sync | `/validate-traces` để xem độ phủ đầy đủ; xử lý mọi `📥 tester feedback` được nêu |
474
+ | /update-framework | Review `git diff .agent/`, commit; `/sync` để đồng bộ nội dung dự án |
475
+
476
+ Định dạng footer như sau:
477
477
  ```
478
478
  ---
479
479
  Status : {badge}
480
- {Output Artifacts block}
480
+ {khối Output Artifacts}
481
481
  Pipeline : Discovery → PRD → [BDD ◀ bạn ở đây] → Tech Design → Code → Dev Self-Check → QC → Trace Audit
482
- (review cmd) Vòng review: [① phân tích ◀] → ② Review Board → ③ --resume
483
- Next : {suggested command with example arguments}
482
+ (lệnh review) Vòng review: [① phân tích ◀] → ② Review Board → ③ --resume
483
+ Next : {lệnh gợi ý kèm ví dụ tham số}
484
484
  ```
485
- *(Omit the `Pipeline` line for cross-cutting commands listed above.)*
485
+ *(Bỏ dòng `Pipeline` cho các lệnh xuyên suốt liệt kê ở trên.)*
486
486
 
487
487
 
488
488
  ```
489
- /setup-ai-first Complete
489
+ /setup-ai-first Hoàn tất
490
490
  ```
491
491
 
492
- Output varies by `project_type`:
492
+ Output tuỳ theo `project_type`:
493
493
 
494
494
  **Single-service:**
495
495
  ```
496
496
  Next:
497
- 1. Fill CLAUDE.md (replace {{PLACEHOLDER}} values)
498
- 2. Fill .agent/project-context.yaml
499
- 3. Fill specs/domain-knowledge/business-dictionary.md
500
- 4. Fill specs/domain-knowledge/core-entities.md
501
- 5. git add and commit those 4 files
502
- 6. Install VS Code extension:
497
+ 1. Điền CLAUDE.md (thay các giá trị {{PLACEHOLDER}})
498
+ 2. Điền .agent/project-context.yaml
499
+ 3. Điền specs/domain-knowledge/business-dictionary.md
500
+ 4. Điền specs/domain-knowledge/core-entities.md
501
+ 5. git add commit 4 file đó
502
+ 6. Cài VS Code extension:
503
503
  code --install-extension SpecDrivenDocsTools.spec-driven-docs-tool
504
- 7. /define-product to start your first feature
504
+ 7. /define-product để bắt đầu feature đầu tiên
505
505
  ```
506
506
 
507
507
  **Umbrella:**
508
508
  ```
509
509
  Next:
510
510
  1. Review .agent/project-context.yaml:
511
- - Update services[].path to match actual submodule directory names
512
- - Update services domain keys to match @trace.domain in your PRD files
513
- - Confirm spec_source path is correct
511
+ - Cập nhật services[].path khớp tên thư mục submodule thực tế
512
+ - Cập nhật domain key của services khớp @trace.domain trong các file PRD
513
+ - Xác nhận path spec_source đúng
514
514
 
515
- 2. Run /sync — one command that handles everything else:
515
+ 2. Chạy /sync — một lệnh lo mọi thứ còn lại:
516
516
  /sync
517
517
  → git pull + submodule init + spec submodule update
518
- Auto-create .agent/project-context.yaml for each service submodule
519
- (detects module from pom.xml / go.mod / package.json / pubspec.yaml etc.)
518
+ Tự tạo .agent/project-context.yaml cho mỗi service submodule
519
+ (phát hiện module từ pom.xml / go.mod / package.json / pubspec.yaml v.v.)
520
520
  → Sync Living Docs panel
521
521
  → Refresh spec-manifest.yaml
522
522
 
523
- 3. Start generating:
524
- /generate-bdd {spec_source}/specs/{domain}/{prd-slug}/prd.md
523
+ 3. Bắt đầu sinh:
524
+ /generate-bdd {spec_source}/specs/{domain}/{prd-slug}/{TICKET-ID}-{prd-slug}.md
525
525
  ```
526
526
 
527
527
  **PO Spec repo:**
528
528
  ```
529
529
  Next:
530
- 1. Fill .agent/project-context.yaml:
531
- - domains: [list all business domainsthese become @trace.domain values in PRDs]
530
+ 1. Điền .agent/project-context.yaml:
531
+ - domains: [liệt mọi business domainchúng thành giá trị @trace.domain trong PRD]
532
532
  - project.name, project.description
533
- 2. Fill specs/domain-knowledge/business-dictionary.md ← canonical terms
534
- 3. Fill specs/domain-knowledge/core-entities.md ← entity glossary
535
- 4. git add and commit those files
536
- 5. Install VS Code extension:
533
+ 2. Điền specs/domain-knowledge/business-dictionary.md ← canonical terms
534
+ 3. Điền specs/domain-knowledge/core-entities.md ← entity glossary
535
+ 4. git add commit các file đó
536
+ 5. Cài VS Code extension:
537
537
  code --install-extension SpecDrivenDocsTools.spec-driven-docs-tool
538
- 6. /define-product to start your first feature
538
+ 6. /define-product để bắt đầu feature đầu tiên
539
539
 
540
- ⚠️ Dev team handoff reminder:
541
- - Each PRD must have @trace.domain matching one of your domains list
542
- - When dev team sets up their umbrella repo, they map these domain names
543
- to service submodule paths in their project-context.yaml services section
544
- - Share domain names with dev team before they configure their umbrellas
540
+ ⚠️ Nhắc handoff team dev:
541
+ - Mỗi PRD phải @trace.domain khớp một trong domains list của bạn
542
+ - Khi team dev setup umbrella repo của họ, họ map các tên domain này
543
+ tới path service submodule trong section services của project-context.yaml
544
+ - Chia sẻ tên domain với team dev trước khi họ cấu hình umbrella
545
545
  ```