@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,111 +1,111 @@
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
6
  {{include:steps/gate.md}}
7
7
 
8
- *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.*
8
+ *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.*
9
9
 
10
10
  ---
11
11
 
12
12
  ## Precondition Check
13
13
 
14
- Check if already set up:
15
- - If `CLAUDE.md` **and** `.agent/project-context.yaml` both existask: "This project is already initialized. Re-run setup to regenerate config files? (Y/N)"
16
- - N → stop
17
- - Y → continue (existing files will be preservedeach step will offer merge/skip)
18
- - If only `specs/` exists or only partial setup detectedcontinue normally (safe to re-run)
14
+ Kiểm tra đã setup chưa:
15
+ - 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)"
16
+ - N → dừng
17
+ - Y → tiếp tục (file sẵn được giữmỗi bước sẽ đề nghị merge/skip)
18
+ - 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)
19
19
 
20
- ## Step 0.5 — Project Type
20
+ ## Step 0.5 — Loại dự án
21
21
 
22
- Ask the user:
22
+ Hỏi người dùng:
23
23
 
24
24
  ```
25
- What type of project is this?
26
- 1. Single-service — one codebase, one platform (standard setup)
27
- 2. Umbrella repo — this repo contains multiple service submodules (microservices / multi-app)
28
- 3. PO Spec repo — docs only, no runnable code (PRD + design-spec only)
25
+ Dự án này thuộc loại nào?
26
+ 1. Single-service — một codebase, một platform (setup chuẩn)
27
+ 2. Umbrella repo — repo này chứa nhiều service submodule (microservices / multi-app)
28
+ 3. PO Spec repo — chỉ docs, không code chạy được (chỉ PRD + design-spec)
29
29
  ```
30
30
 
31
- Store the answer as `project_type`. Default to `1` if user does not answer.
31
+ Lưu câu trả lời thành `project_type`. Mặc định `1` nếu user không trả lời.
32
32
 
33
- Based on answer:
33
+ Dựa trên câu trả lời:
34
34
 
35
- **project_type = 1 (Single-service):** Continue standard setup below.
35
+ **project_type = 1 (Single-service):** Tiếp tục setup chuẩn bên dưới.
36
36
 
37
- **project_type = 2 (Umbrella):** Ask two follow-up questions:
38
- - "Path to spec submodule (e.g. `free-trial-specs`)? Press Enter to skip."
39
- - "List services as `domain:module` pairs, comma-separated
40
- (e.g. `user:java-spring,order:java-spring`). Press Enter to skip."
37
+ **project_type = 2 (Umbrella):** Hỏi hai câu follow-up:
38
+ - "Path tới spec submodule (vd `free-trial-specs`)? Nhấn Enter để skip."
39
+ - "Liệt các service dạng cặp `domain:module`, ngăn cách bởi dấu phẩy
40
+ (vd `user:java-spring,order:java-spring`). Nhấn Enter để skip."
41
41
 
42
- Then:
43
- - 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}/`)
44
- - Create only: `.trace/`, `.agent/review/` at umbrella level
45
- *(Unless user explicitly asks to create the full structure)*
46
- - Generate `.agent/project-context.yaml` in umbrella mode with the services and spec_source provided
47
- - Skip creating `CLAUDE.md` (umbrella has no single tech stack)
48
- - After setup, remind: "Open each service submodule separately in Claude Code to install the framework there if needed."
42
+ Rồi:
43
+ - 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}/`)
44
+ - Chỉ tạo: `.trace/`, `.agent/review/` cấp umbrella
45
+ *(Trừ khi user yêu cầu tạo cấu trúc đầy đủ)*
46
+ - Sinh `.agent/project-context.yaml` umbrella mode với services spec_source đã cung cấp
47
+ - Skip tạo `CLAUDE.md` (umbrella không một tech stack đơn)
48
+ - Sau setup, nhắc: "Mở từng service submodule riêng trong Claude Code để cài framework đó nếu cần."
49
49
 
50
50
  **project_type = 3 (PO Spec repo):**
51
- - Create base dirs: `specs/product-definition/`, `specs/domain-knowledge/`, `feedback/`, `.agent/review/`
52
- - 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
53
- - Skip: `.trace/` (per-service, lives beside code in each service submodule)
54
- - Generate minimal `CLAUDE.md` with only §1 (project overview) and §7 (git conventions)
55
- - 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
56
- - Inform:
57
- - Commands for PO repo: `/define-product`, `/generate-prd`, `/review-context`, `/generate-design-spec`
58
- - **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.
59
- - Recommended PRD frontmatter:
51
+ - Tạo base dir: `specs/product-definition/`, `specs/domain-knowledge/`, `feedback/`, `.agent/review/`
52
+ - 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
53
+ - Skip: `.trace/` (theo service, sống cạnh code trong mỗi service submodule)
54
+ - Sinh `CLAUDE.md` tối thiểu chỉ với §1 (project overview) §7 (git conventions)
55
+ - 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
56
+ - Thông báo:
57
+ - Lệnh cho PO repo: `/define-product`, `/generate-prd`, `/review-context`, `/generate-design-spec`
58
+ - **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.
59
+ - Frontmatter PRD khuyến nghị:
60
60
  ```
61
- @trace.domain: {domain} ← must match a key in dev team's services config
61
+ @trace.domain: {domain} ← phải khớp một key trong services config của team dev
62
62
  @trace.id: {TICKET-ID}
63
63
  @trace.status: draft | approved
64
64
  ```
65
65
 
66
- ## Step 1 — Create Directory Structure
66
+ ## Step 1 — Tạo cấu trúc thư mục
67
67
 
68
- Create these directories (skip if they exist):
68
+ Tạo các thư mục này (skip nếu đã tồn tại):
69
69
 
70
70
  ```
71
71
  {project-root}/
72
72
  ├── specs/
73
- │ ├── product-definition/ ← Output of /define-product
73
+ │ ├── product-definition/ ← Output của /define-product
74
74
  │ └── domain-knowledge/ ← business dictionary & domain context
75
75
  ├── .trace/ ← .trace/{domain}/{prd-slug}/{UC-ID}.tsv
76
76
  └── .agent/
77
77
  └── review/
78
78
  ```
79
79
 
80
- **Feature-package layout** — per-feature spec artifacts are NOT pre-created. Each generate
81
- command creates its own folder on demand under `specs/{domain}/{prd-slug}/`:
80
+ **Bố cục feature-package** — artifact spec theo từng feature KHÔNG được tạo trước. Mỗi lệnh generate
81
+ tự tạo folder của on demand dưới `specs/{domain}/{prd-slug}/`:
82
82
 
83
83
  ```
84
84
  specs/{domain}/{prd-slug}/
85
- ├── prd.md ← /generate-prd
86
- ├── bdd/ ← /generate-bdd (.feature files)
85
+ ├── {TICKET-ID}-{prd-slug}.md ← /generate-prd (vd SEG01-segment-scoring-service.md)
86
+ ├── bdd/ ← /generate-bdd (file .feature)
87
87
  ├── tech-docs/ ← /generate-tech-docs
88
- └── design-spec/ ← /generate-design-spec (FE/App platforms only)
88
+ └── design-spec/ ← /generate-design-spec (chỉ platform FE/App)
89
89
  ```
90
90
 
91
- *Which base dirs to create varies by `project_type` set in Step 0.5:*
91
+ *Tạo base dir nào tuỳ theo `project_type` set Step 0.5:*
92
92
 
93
- | project_type | Create | Skip |
93
+ | project_type | Tạo | Skip |
94
94
  |---|---|---|
95
- | **1 — Single-service** | Base structure above (`specs/product-definition/`, `specs/domain-knowledge/`, `.trace/`, `.agent/review/`) | per-feature folders (created on demand) |
96
- | **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/`** |
97
- | **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) |
95
+ | **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) |
96
+ | **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/`** |
97
+ | **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) |
98
98
 
99
- ## Step 2 — Create CLAUDE.md
99
+ ## Step 2 — Tạo CLAUDE.md
100
100
 
101
- *Skip this step entirely if `project_type = 2` (Umbrella) — umbrella has no single tech stack.*
102
- *For `project_type = 3` (PO Spec repo) — create a minimal CLAUDE.md with only §1 (project overview) and §7 (git conventions). Skip §2–§6.*
101
+ *Bỏ qua hoàn toàn step này nếu `project_type = 2` (Umbrella) — umbrella không một tech stack đơn.*
102
+ *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.*
103
103
 
104
- Check if `CLAUDE.md` exists:
105
- - Yesask "Merge template or skip?"
106
- - Nocreate from the template below
104
+ Kiểm tra `CLAUDE.md` tồn tại chưa:
105
+ - hỏi "Merge template hay skip?"
106
+ - Khôngtạo từ template bên dưới
107
107
 
108
- After creating, instruct: "Open CLAUDE.md and fill in the `{{PLACEHOLDER}}` values with your project information."
108
+ 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."
109
109
 
110
110
  ### CLAUDE.md Template
111
111
 
@@ -155,27 +155,27 @@ branch_feature: "feature/{{TICKET_PREFIX}}-{N}-{slug}"
155
155
  commit_feature: "feat({{TICKET_PREFIX}}-{N}): {description}"
156
156
  ```
157
157
 
158
- ## Step 3 — Create project-context.yaml
158
+ ## Step 3 — Tạo project-context.yaml
159
159
 
160
- *For `project_type = 2` (Umbrella):*
161
- - *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.*
162
- - *If not yet generated ask: "Spec submodule path?" and "Services (domain:module pairs)?" then generate umbrella config (see Step 0.5 for format).*
160
+ *Với `project_type = 2` (Umbrella):*
161
+ - *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.*
162
+ - *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).*
163
163
 
164
- Create `.agent/project-context.yaml` using `.agent/templates/project-context.yaml` as the source template.
164
+ Tạo `.agent/project-context.yaml` dùng `.agent/templates/project-context.yaml` làm template nguồn.
165
165
 
166
- 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."
166
+ 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."
167
167
 
168
- ## Step 4 — Create business-dictionary.md
168
+ ## Step 4 — Tạo business-dictionary.md
169
169
 
170
- *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/`.*
170
+ *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/`.*
171
171
 
172
172
 
173
- Create `specs/domain-knowledge/business-dictionary.md` if it does not exist:
173
+ Tạo `specs/domain-knowledge/business-dictionary.md` nếu chưa tồn tại:
174
174
 
175
175
  ```markdown
176
176
  # Business Dictionary — {{PROJECT_NAME}}
177
177
 
178
- > Canonical terminology for this project. All PRDs, BDD specs, and code must follow these terms.
178
+ > 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.
179
179
  > Managed by: PO / SA team.
180
180
 
181
181
  ## Canonical Terms
@@ -197,17 +197,17 @@ Create `specs/domain-knowledge/business-dictionary.md` if it does not exist:
197
197
  | {Entity} | status | {value1, value2} |
198
198
  ```
199
199
 
200
- 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."
200
+ 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."
201
201
 
202
- ## Step 5 — Create core-entities.md
202
+ ## Step 5 — Tạo core-entities.md
203
203
 
204
- Create `specs/domain-knowledge/core-entities.md` if it does not exist:
204
+ Tạo `specs/domain-knowledge/core-entities.md` nếu chưa tồn tại:
205
205
 
206
206
  ```markdown
207
207
  # Core Entities — {{PROJECT_NAME}}
208
208
 
209
- > Machine-readable entity glossary for AI-assisted development.
210
- > Loaded by all commands so AI knows your domain model without reading source code.
209
+ > Glossary entity máy-đọc-được cho phát triển có AI hỗ trợ.
210
+ > Được mọi lệnh nạp để AI biết domain model của bạn mà không cần đọc source code.
211
211
  > Managed by: Tech Lead / Architect.
212
212
  >
213
213
  > HOW TO USE:
@@ -245,114 +245,114 @@ Create `specs/domain-knowledge/core-entities.md` if it does not exist:
245
245
  *(Add more entities following the same pattern above)*
246
246
  ```
247
247
 
248
- 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."
248
+ 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."
249
249
 
250
- ## Step 6 — Install VS Code Extension (Recommended)
250
+ ## Step 6 — Cài VS Code Extension (Khuyến nghị)
251
251
 
252
- Recommend the user install the **Spec Driven Docs Tools** VS Code extension it provides Review Board + Living Documentation panels that integrate with this workflow.
252
+ 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.
253
253
 
254
254
  ```bash
255
255
  code --install-extension SpecDrivenDocsTools.spec-driven-docs-tool
256
256
  ```
257
257
 
258
- Or: VS Code → `Ctrl+Shift+P` → **"Extensions: Install from Marketplace"** → search **Spec Driven Docs Tools**.
258
+ Hoặc: VS Code → `Ctrl+Shift+P` → **"Extensions: Install from Marketplace"** → tìm **Spec Driven Docs Tools**.
259
259
 
260
- **What it does:**
261
- - 📋 **Review Board** — visual UI to review findings from `/refine-prd`, `/review-context`, `/review-tech-docs`
262
- - 📊 **Living Documentation** — traceability dashboard driven by `.trace/*.tsv`
260
+ ** làm gì:**
261
+ - 📋 **Review Board** — UI trực quan để review findings từ `/refine-prd`, `/review-context`, `/review-tech-docs`
262
+ - 📊 **Living Documentation** — dashboard traceability dựa trên `.trace/*.tsv`
263
263
 
264
264
  ## Step 7 — Verify
265
265
 
266
- Checklist varies by `project_type`:
266
+ Checklist tuỳ theo `project_type`:
267
267
 
268
268
  **project_type = 1 (Single-service):**
269
- - [ ] `specs/` exists
270
- - [ ] `specs/product-definition/` exists
271
- - [ ] `specs/domain-knowledge/` exists
272
- - [ ] `.trace/` exists
273
- *(per-feature `specs/{domain}/{prd-slug}/` folders are created on demand — not checked here)*
274
- - [ ] `.agent/project-context.yaml` exists
275
- - [ ] `CLAUDE.md` exists
276
- - [ ] `specs/domain-knowledge/business-dictionary.md` exists
277
- - [ ] `specs/domain-knowledge/core-entities.md` exists
269
+ - [ ] `specs/` tồn tại
270
+ - [ ] `specs/product-definition/` tồn tại
271
+ - [ ] `specs/domain-knowledge/` tồn tại
272
+ - [ ] `.trace/` tồn tại
273
+ *(folder `specs/{domain}/{prd-slug}/` theo feature tạo on demand — không check ở đây)*
274
+ - [ ] `.agent/project-context.yaml` tồn tại
275
+ - [ ] `CLAUDE.md` tồn tại
276
+ - [ ] `specs/domain-knowledge/business-dictionary.md` tồn tại
277
+ - [ ] `specs/domain-knowledge/core-entities.md` tồn tại
278
278
 
279
279
  **project_type = 2 (Umbrella):**
280
- - [ ] `.agent/project-context.yaml` exists with `setup.mode: umbrella`
281
- - [ ] `services` section has at least one entry with correct domain keys
282
- - [ ] `spec_source` path exists (e.g., `my-project-specs/` directory is present)
283
- - [ ] `.agent/review/` exists
284
- - [ ] Spec submodule initialized: `git submodule status` shows no `-` prefix
280
+ - [ ] `.agent/project-context.yaml` tồn tại với `setup.mode: umbrella`
281
+ - [ ] Section `services` ít nhất một entry với đúng domain key
282
+ - [ ] Path `spec_source` tồn tại (vd thư mục `my-project-specs/` mặt)
283
+ - [ ] `.agent/review/` tồn tại
284
+ - [ ] Spec submodule đã init: `git submodule status` không hiện prefix `-`
285
285
 
286
286
  **project_type = 3 (PO Spec repo):**
287
- - [ ] `specs/product-definition/` exists
288
- - [ ] `specs/domain-knowledge/` exists
289
- - [ ] `feedback/` exists
290
- *(per-feature `specs/{domain}/{prd-slug}/` folders are created on demand — not checked here)*
291
- - [ ] `.agent/review/` exists
292
- - [ ] `.agent/project-context.yaml` exists
293
- - [ ] `CLAUDE.md` exists (minimal)
294
- - [ ] `specs/domain-knowledge/business-dictionary.md` exists
295
- - [ ] `specs/domain-knowledge/core-entities.md` exists
287
+ - [ ] `specs/product-definition/` tồn tại
288
+ - [ ] `specs/domain-knowledge/` tồn tại
289
+ - [ ] `feedback/` tồn tại
290
+ *(folder `specs/{domain}/{prd-slug}/` theo feature tạo on demand — không check ở đây)*
291
+ - [ ] `.agent/review/` tồn tại
292
+ - [ ] `.agent/project-context.yaml` tồn tại
293
+ - [ ] `CLAUDE.md` tồn tại (tối thiểu)
294
+ - [ ] `specs/domain-knowledge/business-dictionary.md` tồn tại
295
+ - [ ] `specs/domain-knowledge/core-entities.md` tồn tại
296
296
 
297
297
  ## Output
298
298
 
299
299
  {{include:steps/report-footer.md}}
300
300
 
301
301
  ```
302
- /setup-ai-first Complete
302
+ /setup-ai-first Hoàn tất
303
303
  ```
304
304
 
305
- Output varies by `project_type`:
305
+ Output tuỳ theo `project_type`:
306
306
 
307
307
  **Single-service:**
308
308
  ```
309
309
  Next:
310
- 1. Fill CLAUDE.md (replace {{PLACEHOLDER}} values)
311
- 2. Fill .agent/project-context.yaml
312
- 3. Fill specs/domain-knowledge/business-dictionary.md
313
- 4. Fill specs/domain-knowledge/core-entities.md
314
- 5. git add and commit those 4 files
315
- 6. Install VS Code extension:
310
+ 1. Điền CLAUDE.md (thay các giá trị {{PLACEHOLDER}})
311
+ 2. Điền .agent/project-context.yaml
312
+ 3. Điền specs/domain-knowledge/business-dictionary.md
313
+ 4. Điền specs/domain-knowledge/core-entities.md
314
+ 5. git add commit 4 file đó
315
+ 6. Cài VS Code extension:
316
316
  code --install-extension SpecDrivenDocsTools.spec-driven-docs-tool
317
- 7. /define-product to start your first feature
317
+ 7. /define-product để bắt đầu feature đầu tiên
318
318
  ```
319
319
 
320
320
  **Umbrella:**
321
321
  ```
322
322
  Next:
323
323
  1. Review .agent/project-context.yaml:
324
- - Update services[].path to match actual submodule directory names
325
- - Update services domain keys to match @trace.domain in your PRD files
326
- - Confirm spec_source path is correct
324
+ - Cập nhật services[].path khớp tên thư mục submodule thực tế
325
+ - Cập nhật domain key của services khớp @trace.domain trong các file PRD
326
+ - Xác nhận path spec_source đúng
327
327
 
328
- 2. Run /sync — one command that handles everything else:
328
+ 2. Chạy /sync — một lệnh lo mọi thứ còn lại:
329
329
  /sync
330
330
  → git pull + submodule init + spec submodule update
331
- Auto-create .agent/project-context.yaml for each service submodule
332
- (detects module from pom.xml / go.mod / package.json / pubspec.yaml etc.)
331
+ Tự tạo .agent/project-context.yaml cho mỗi service submodule
332
+ (phát hiện module từ pom.xml / go.mod / package.json / pubspec.yaml v.v.)
333
333
  → Sync Living Docs panel
334
334
  → Refresh spec-manifest.yaml
335
335
 
336
- 3. Start generating:
337
- /generate-bdd {spec_source}/specs/{domain}/{prd-slug}/prd.md
336
+ 3. Bắt đầu sinh:
337
+ /generate-bdd {spec_source}/specs/{domain}/{prd-slug}/{TICKET-ID}-{prd-slug}.md
338
338
  ```
339
339
 
340
340
  **PO Spec repo:**
341
341
  ```
342
342
  Next:
343
- 1. Fill .agent/project-context.yaml:
344
- - domains: [list all business domainsthese become @trace.domain values in PRDs]
343
+ 1. Điền .agent/project-context.yaml:
344
+ - domains: [liệt mọi business domainchúng thành giá trị @trace.domain trong PRD]
345
345
  - project.name, project.description
346
- 2. Fill specs/domain-knowledge/business-dictionary.md ← canonical terms
347
- 3. Fill specs/domain-knowledge/core-entities.md ← entity glossary
348
- 4. git add and commit those files
349
- 5. Install VS Code extension:
346
+ 2. Điền specs/domain-knowledge/business-dictionary.md ← canonical terms
347
+ 3. Điền specs/domain-knowledge/core-entities.md ← entity glossary
348
+ 4. git add commit các file đó
349
+ 5. Cài VS Code extension:
350
350
  code --install-extension SpecDrivenDocsTools.spec-driven-docs-tool
351
- 6. /define-product to start your first feature
351
+ 6. /define-product để bắt đầu feature đầu tiên
352
352
 
353
- ⚠️ Dev team handoff reminder:
354
- - Each PRD must have @trace.domain matching one of your domains list
355
- - When dev team sets up their umbrella repo, they map these domain names
356
- to service submodule paths in their project-context.yaml services section
357
- - Share domain names with dev team before they configure their umbrellas
353
+ ⚠️ Nhắc handoff team dev:
354
+ - Mỗi PRD phải @trace.domain khớp một trong domains list của bạn
355
+ - Khi team dev setup umbrella repo của họ, họ map các tên domain này
356
+ tới path service submodule trong section services của project-context.yaml
357
+ - Chia sẻ tên domain với team dev trước khi họ cấu hình umbrella
358
358
  ```