@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,139 +1,139 @@
1
- # /review-context — Review PRD or BDD for Quality & Consistency
1
+ # /review-context — Review PRD hoặc BDD về Chất lượng & Tính nhất quán
2
2
 
3
- **READ-ONLY analysis mode writes a findings file, does NOT modify the target.**
4
- **Use `--resume` to apply accepted findings.**
3
+ **Chế độ phân tích READ-ONLY — ghi file findings, KHÔNG sửa target.**
4
+ **Dùng `--resume` để áp dụng các finding được chấp nhận.**
5
5
 
6
6
  ## Gate
7
7
  {{include:steps/gate.md}}
8
8
 
9
- *Note: For this command, the target in Step 1 is either a `.md` PRD file or a `.feature` BDD file.
10
- If the path is a `prd.md` under `{paths.specs_dir}/{domain}/{prd-slug}/` → PRD Review Mode.
11
- If the path ends with `.feature` → BDD Review Mode.
12
- If `$ARGUMENTS` contains `--resume` → skip to Resume Mode below.
13
- If `$ARGUMENTS` contains `--fix` → skip to Fix Mode below (apply all auto-fixable findings immediately).*
9
+ *Lưu ý: Với lệnh này, target Bước 1 một file PRD `.md` hoặc file BDD `.feature`.
10
+ Nếu path file PRD (`{TICKET-ID}-{prd-slug}.md` file `.md` ở gốc feature folder `{paths.specs_dir}/{domain}/{prd-slug}/`) → PRD Review Mode.
11
+ Nếu path kết thúc bằng `.feature` → BDD Review Mode.
12
+ Nếu `$ARGUMENTS` chứa `--resume` → bỏ qua sang Resume Mode bên dưới.
13
+ Nếu `$ARGUMENTS` chứa `--fix` → bỏ qua sang Fix Mode bên dưới (áp dụng ngay mọi finding auto-fixable).*
14
14
 
15
15
  ## Context
16
16
  {{include:steps/context-loader.md}}
17
17
 
18
18
  ---
19
19
 
20
- ## Detect Review Mode
20
+ ## Phát hiện Review Mode
21
21
 
22
- After resolving the target file:
23
- - `.feature` file → **BDD Review Mode** (jump to BDD section)
24
- - `prd.md` under `{paths.specs_dir}/*/*/` → **PRD Review Mode** (continue below)
25
- - Unknownask: "Is this a PRD file or a BDD feature file? (prd/bdd)"
22
+ Sau khi phân giải target file:
23
+ - File `.feature` → **BDD Review Mode** (nhảy tới section BDD)
24
+ - File `.md` gốc feature folder `{paths.specs_dir}/*/*/` (không phải dưới `bdd/`·`tech-docs/`·`design-spec/`) → **PRD Review Mode** (tiếp tục bên dưới)
25
+ - Không xác định hỏi: "Đây file PRD hay file BDD feature? (prd/bdd)"
26
26
 
27
- Also check flags:
28
- - `--fix` present after running all checks, apply `auto_fixable: true` findings immediately (skip Review Board)
29
- - `--resume` present skip analysis entirely, go to Resume Mode
27
+ Đồng thời kiểm tra flag:
28
+ - `--fix` → sau khi chạy hết các check, áp dụng ngay các finding `auto_fixable: true` (bỏ qua Review Board)
29
+ - `--resume` → bỏ qua phân tích hoàn toàn, sang Resume Mode
30
30
 
31
- Derive the output findings filename:
31
+ Suy ra tên file findings output:
32
32
  - PRD: `{paths.refinement_dir}/{prd-slug}-review-context-findings.yaml`
33
33
  - BDD: `{paths.refinement_dir}/{uc-id}-review-bdd-findings.yaml`
34
34
 
35
35
  ---
36
36
 
37
- ## Review Procedure
37
+ ## Quy trình Review
38
38
  {{include:steps/review-fanout.md}}
39
39
 
40
- **How the checks below map onto the procedure:**
41
- - **DIMENSIONS** = the check groups for the detected mode — PRD: `P1, P2, P4, P5`; BDD: `B1, B2, B3, B4, B5, B6`. Fan out one sub-agent per check group, each scanning the full target file for just that group.
42
- - **Orchestrator-run checks (not fanned out):** `P0` (umbrella routing) and `P3` (cross-PRD conflict) need config / other-PRD contextthe orchestrator runs these itself **before** the fan-out and adds their results to `ALL_FINDINGS`.
43
- - The completeness-critic loop (Phase 2) guarantees the findings file is complete in one runre-running `/review-context` should surface **0 new** findings. Map each dimension into the `check_id` field of the schema below.
40
+ **Các check dưới đây map vào quy trình như sau:**
41
+ - **DIMENSIONS** = các nhóm check theo mode phát hiện được — PRD: `P1, P2, P4, P5`; BDD: `B1, B2, B3, B4, B5, B6`. Fan out một sub-agent cho mỗi nhóm check, mỗi cái quét toàn bộ target file chỉ cho nhóm đó.
42
+ - **Check do orchestrator chạy (không fan out):** `P0` (umbrella routing) `P3` (xung đột cross-PRD) cần config / context của PRD khác — orchestrator tự chạy chúng **trước** fan-out thêm kết quả vào `ALL_FINDINGS`.
43
+ - Vòng lặp completeness-critic (Phase 2) đảm bảo file findings đầy đủ trong một lần chạychạy lại `/review-context` sẽ lòi ra **0 finding mới**. Map mỗi dimension vào field `check_id` của schema dưới đây.
44
44
 
45
45
  ---
46
46
 
47
47
  ## PRD Review Mode
48
48
 
49
- ### P0 — Umbrella Routing Check (umbrella mode only)
49
+ ### P0 — Umbrella Routing Check (chỉ chế độ umbrella)
50
50
 
51
- *Skip this check entirely if `setup.mode` is not `"umbrella"` (i.e., `services` section absent from project-context.yaml).*
51
+ *Bỏ qua hoàn toàn check này nếu `setup.mode` không phải `"umbrella"` (tức không có section `services` trong project-context.yaml).*
52
52
 
53
- When `setup.mode = umbrella`, the PRD must have correct routing metadata so context-loader Step 1.5 can direct generated output to the right service submodule. Run these checks **before P1–P5**:
53
+ Khi `setup.mode = umbrella`, PRD phải metadata routing đúng để context-loader Bước 1.5 thể đưa output sinh ra tới đúng service submodule. Chạy các check này **trước P1–P5**:
54
54
 
55
- **P0.1 — `@trace.domain` presence**
56
- - Read the PRD frontmatter block (lines starting with `@trace.` at top of file)
57
- - If `@trace.domain` is **absent** → **critical** finding:
58
- - `finding`: "`@trace.domain` is missing. Dev team's umbrella routing depends on this field to route BDD and code output to the correct service submodule."
59
- - `suggestion`: "Add `@trace.domain: {domain}` to the PRD frontmatter. Use one of the domain keys defined in the umbrella's `project-context.yaml` services section."
60
- - `auto_fixable: false` — PO must confirm the correct domain name
55
+ **P0.1 — `@trace.domain` có mặt**
56
+ - Đọc block frontmatter của PRD (các dòng bắt đầu bằng `@trace.` đầu file)
57
+ - Nếu `@trace.domain` **vắng mặt** → finding **critical**:
58
+ - `finding`: "`@trace.domain` đang thiếu. Umbrella routing của team dev phụ thuộc field này để đưa BDD code output tới đúng service submodule."
59
+ - `suggestion`: "Thêm `@trace.domain: {domain}` vào frontmatter của PRD. Dùng một trong các domain key được định nghĩa trong section services của `project-context.yaml` của umbrella."
60
+ - `auto_fixable: false` — PO phải confirm tên domain đúng
61
61
 
62
- **P0.2 — `@trace.domain` matches a service key**
63
- - If `@trace.domain` is present, check if its value matches any key in the `services` section of project-context.yaml
64
- - If **no match found** → **critical** finding:
65
- - `finding`: "`@trace.domain: {value}` does not match any key in the umbrella's `services` config. Routing will fall back to default paths and BDD may be generated to the wrong location."
66
- - `suggestion`: "Either update `@trace.domain` to match an existing service key ({list known keys}), or add a new entry to `services` in project-context.yaml for domain `{value}`."
62
+ **P0.2 — `@trace.domain` khớp một service key**
63
+ - Nếu `@trace.domain` mặt, kiểm tra giá trị của có khớp key nào trong section `services` của project-context.yaml không
64
+ - Nếu **không khớp** → finding **critical**:
65
+ - `finding`: "`@trace.domain: {value}` không khớp key nào trong config `services` của umbrella. Routing sẽ fallback về path mặc định BDD thể được sinh sai chỗ."
66
+ - `suggestion`: "Hoặc cập nhật `@trace.domain` cho khớp một service key có sẵn ({list known keys}), hoặc thêm entry mới vào `services` trong project-context.yaml cho domain `{value}`."
67
67
  - `auto_fixable: false`
68
- - If `services` section is not yet configured (empty/placeholder) → **major** finding:
69
- - `finding`: "Umbrella `services` section is not yet configured. Cannot verify domain routing."
70
- - `suggestion`: "Update `.agent/project-context.yaml` services section with domain-to-submodule mapping before generating BDD."
68
+ - Nếu section `services` chưa được cấu hình (rỗng/placeholder) → finding **major**:
69
+ - `finding`: "Section `services` của umbrella chưa được cấu hình. Không thể kiểm chứng domain routing."
70
+ - `suggestion`: "Cập nhật section services trong `.agent/project-context.yaml` với mapping domain-to-submodule trước khi sinh BDD."
71
71
  - `auto_fixable: false`
72
72
 
73
- **P0.3 — `@trace.status` check**
74
- - If `@trace.status` is absent → **minor**, `auto_fixable: true` (add `@trace.status: draft`)
75
- - If `@trace.status: draft` → **major**, `auto_fixable: false`:
76
- - `finding`: "PRD status is `draft`. Dev team should not generate BDD from an unapproved PRD."
77
- - `suggestion`: "PO/SA should review and update status to `approved` before dev team proceeds."
73
+ **P0.3 — Check `@trace.status`**
74
+ - Nếu `@trace.status` vắng mặt → **minor**, `auto_fixable: true` (thêm `@trace.status: draft`)
75
+ - Nếu `@trace.status: draft` → **major**, `auto_fixable: false`:
76
+ - `finding`: "PRD status `draft`. Team dev không nên sinh BDD từ một PRD chưa được duyệt."
77
+ - `suggestion`: "PO/SA nên review cập nhật status thành `approved` trước khi team dev tiếp tục."
78
78
 
79
- > **P0 is a gate check:** If P0.1 or P0.2 yields a critical finding, display a warning before proceeding:
79
+ > **P0 một gate check:** Nếu P0.1 hoặc P0.2 cho finding critical, hiển thị cảnh báo trước khi tiếp tục:
80
80
  > ```
81
- > ⚠️ ROUTING WARNING: @trace.domain issue detected.
82
- > BDD/code generated from this PRD may land in the wrong service submodule.
83
- > Resolve P0 findings before running /generate-bdd.
81
+ > ⚠️ ROUTING WARNING: phát hiện vấn đề @trace.domain.
82
+ > BDD/code sinh từ PRD này thể rơi vào sai service submodule.
83
+ > Giải quyết các finding P0 trước khi chạy /generate-bdd.
84
84
  > ```
85
- > Then continue with P1–P5 (do not abort — PO may be reviewing early-stage PRDs).
85
+ > Rồi tiếp tục với P1–P5 (đừng abort — PO thể đang review PRD giai đoạn sớm).
86
86
 
87
87
  ### P1 — Terminology Check (Business Dictionary)
88
88
 
89
- Load `{paths.business_dictionary}`.
90
- Scan the entire PRD for terminology issues:
89
+ Nạp `{paths.business_dictionary}`.
90
+ Quét toàn bộ PRD tìm vấn đề thuật ngữ:
91
91
 
92
- 1. **Banned terms** — every occurrence of a term in §Banned Terms:
93
- → Severity: **critical**. AI can auto-fix in `--resume`.
92
+ 1. **Banned terms** — mọi lần xuất hiện của một term trong §Banned Terms:
93
+ → Severity: **critical**. AI thể auto-fix khi `--resume`.
94
94
 
95
- 2. **Inconsistent usage** — same concept named differently across sections:
96
- → Severity: **major**. Flag both occurrences. Human decides canonical form in Review Board note.
95
+ 2. **Dùng không nhất quán** — cùng một khái niệm được đặt tên khác nhau giữa các section:
96
+ → Severity: **major**. Gắn cờ cả hai chỗ. Người quyết định dạng chuẩn trong note Review Board.
97
97
 
98
- 3. **Unlisted business terms**important terms absent from the dictionary:
99
- → Severity: **minor**. Suggest adding to `business-dictionary.md`.
98
+ 3. **Business term chưa liệt kê** các term quan trọng vắng trong dictionary:
99
+ → Severity: **minor**. Đề xuất thêm vào `business-dictionary.md`.
100
100
 
101
101
  ### P2 — Ambiguity Check
102
102
 
103
- Scan each AC and BR for:
103
+ Quét mỗi AC BR tìm:
104
104
 
105
- | Signal | Example | Severity |
105
+ | Tín hiệu | dụ | Severity |
106
106
  |--------|---------|----------|
107
- | Vague quantifier | "fast", "large", "reasonable", "quickly" | Critical |
108
- | Missing actor | "the system should" with no trigger specified | Major |
109
- | Undefined reference | "{SomeThing}" used but never defined in this PRD | Major |
110
- | Missing negative path | AC only describes happy path but BR has error conditions | Minor |
111
- | Passive voice hiding actor | "Invoice is created" — who creates it? | Minor |
107
+ | Định lượng mơ hồ | "nhanh", "lớn", "hợp lý", "mau" | Critical |
108
+ | Thiếu actor | "hệ thống nên" không nêu trigger | Major |
109
+ | Tham chiếu chưa định nghĩa | "{SomeThing}" được dùng nhưng chưa định nghĩa trong PRD này | Major |
110
+ | Thiếu luồng âm | AC chỉ tả happy path nhưng BR điều kiện lỗi | Minor |
111
+ | Câu bị động giấu actor | "Invoice is created" — ai tạo? | Minor |
112
112
 
113
- → AI cannot auto-fix P2 findings. Human must write the fix in Review Board "Modify" note.
113
+ → AI không thể auto-fix finding P2. Người phải viết bản fix trong note "Modify" của Review Board.
114
114
 
115
115
  ### P3 — Domain Conflict Check
116
116
 
117
- List all other PRDs in `{paths.specs_dir}/{domain}/*/prd.md`.
118
- For each one, check if this PRD contradicts a defined BR (same trigger, different outcome)
119
- or redefines an entity field/status transition differently.
117
+ Liệt tất cả PRD khác trong `{paths.specs_dir}/{domain}/*/*.md` (file `.md` ở gốc mỗi feature folder = PRD).
118
+ Với mỗi PRD, kiểm tra xem PRD này mâu thuẫn với một BR đã định nghĩa không (cùng trigger, khác outcome)
119
+ hoặc định nghĩa lại field/status transition của một entity khác đi.
120
120
 
121
- → Severity: **critical**. Human decides which PRD is correct. Note required.
121
+ → Severity: **critical**. Người quyết định PRD nào đúng. Bắt buộc có note.
122
122
 
123
123
  ### P4 — Structural Completeness
124
124
 
125
- - [ ] Metadata block: Version, Author, Date, Status
126
- - [ ] At least 1 UC with `#### {TICKET-ID}-UC{N}:` heading
127
- - [ ] Each UC has: Description, Actors, Preconditions, Acceptance Criteria, Business Rules
128
- - [ ] `## Changelog` section exists
129
- - [ ] No `{{PLACEHOLDER}}` values unfilled
125
+ - [ ] Block Metadata: Version, Author, Date, Status
126
+ - [ ] Ít nhất 1 UC với heading `#### {TICKET-ID}-UC{N}:`
127
+ - [ ] Mỗi UC có: Description, Actors, Preconditions, Acceptance Criteria, Business Rules
128
+ - [ ] Có section `## Changelog`
129
+ - [ ] Không còn giá trị `{{PLACEHOLDER}}` chưa điền
130
130
 
131
- Missing sections: **major**. AI can add skeleton in `--resume` if accepted.
131
+ Section thiếu: **major**. AI thể thêm skeleton khi `--resume` nếu được chấp nhận.
132
132
 
133
- ### P5 — Custom Criteria (optional)
133
+ ### P5 — Custom Criteria (tuỳ chọn)
134
134
 
135
- If `$ARGUMENTS` contains additional criteria after the file path, evaluate them and create
136
- findings with `check_id: "P5"` and severity as appropriate.
135
+ Nếu `$ARGUMENTS` chứa tiêu chí bổ sung sau path file, đánh giá chúng và tạo
136
+ finding với `check_id: "P5"` severity phù hợp.
137
137
 
138
138
  ---
139
139
 
@@ -141,8 +141,8 @@ findings with `check_id: "P5"` and severity as appropriate.
141
141
 
142
142
  ### B1 — PRD Coverage Check
143
143
 
144
- Load the PRD referenced by `# @trace.prd:` in the feature file header.
145
- Map every AC and every BR (including sub-bullets) to scenarios:
144
+ Nạp PRD được tham chiếu bởi `# @trace.prd:` trong header file feature.
145
+ Map mọi AC mọi BR (gồm cả sub-bullet) sang scenario:
146
146
 
147
147
  ```
148
148
  AC1 ({short text}) → SC1, SC2 ✅
@@ -151,64 +151,64 @@ BR1 ({short text}) → SC1 ✅
151
151
  BR2 ({short text}) → MISSING ❌
152
152
  ```
153
153
 
154
- Each missing AC/BR coverage: **critical** finding.
155
- If accepted in Review Board, `--resume` generates the missing scenario(s).
154
+ Mỗi AC/BR thiếu coverage: finding **critical**.
155
+ Nếu được chấp nhận trong Review Board, `--resume` sinh scenario còn thiếu.
156
156
 
157
157
  ### B2 — Terminology & Entity Check
158
158
 
159
- Using `{paths.business_dictionary}` and `{paths.core_entities}`:
159
+ Dùng `{paths.business_dictionary}` `{paths.core_entities}`:
160
160
 
161
- 1. **Banned terms in steps** → **critical**, auto-fixable in `--resume`
162
- 2. **Non-canonical entity names** → **major**, auto-fixable
163
- 3. **Non-canonical field names in data tables** → **major**, auto-fixable
164
- 4. **Technically-looking sample data** (UUIDs, `item_123`) → **minor**, auto-fixable
161
+ 1. **Banned terms trong steps** → **critical**, auto-fixable khi `--resume`
162
+ 2. **Tên entity không chuẩn** → **major**, auto-fixable
163
+ 3. **Tên field không chuẩn trong data table** → **major**, auto-fixable
164
+ 4. **Sample data trông kỹ thuật** (UUID, `item_123`) → **minor**, auto-fixable
165
165
 
166
166
  ### B3 — Gherkin Rules Check (R1–R10)
167
167
 
168
168
  | Rule | Check | Auto-fixable? |
169
169
  |------|-------|---------------|
170
- | R1 | Every scenario has Given + When + Then | No — needs scenario redesign |
171
- | R2 | No chained `When … Then … When` | No — needs redesign |
172
- | R3 | No UI selectors / API paths / tech terms in steps | Yes — replace with business phrasing |
173
- | R4 | Scenario name is a business outcome | No — needs human rename |
174
- | R5 | Declarative WHAT, not imperative HOW | No — needs rewrite |
175
- | R6 | `Then` asserts observable business outcome | No — needs redesign |
176
- | R7 | Concrete values, not "valid data" | Yes — substitute realistic values |
177
- | R8 | Each scenario is independently runnable | No — needs redesign |
178
- | R9 | Data tables have enough columns for Then | Yes — add missing columns |
179
- | R10 | Cross-UC reference uses navigation phrasing + Note | Yes — add Note comment |
180
-
181
- → R3, R7, R9, R10 violations: auto-fixable. Others require human guidance via Review Board note.
170
+ | R1 | Mỗi scenario Given + When + Then | No — cần thiết kế lại scenario |
171
+ | R2 | Không chained `When … Then … When` | No — cần thiết kế lại |
172
+ | R3 | Không UI selector / API path / tech term trong steps | Yes — thay bằng cách diễn đạt nghiệp vụ |
173
+ | R4 | Tên scenario một business outcome | No — cần người đổi tên |
174
+ | R5 | Khai báo WHAT, không phải mệnh lệnh HOW | No — cần viết lại |
175
+ | R6 | `Then` khẳng định business outcome quan sát được | No — cần thiết kế lại |
176
+ | R7 | Giá trị cụ thể, không phải "valid data" | Yes — thay bằng giá trị thực tế |
177
+ | R8 | Mỗi scenario chạy độc lập được | No — cần thiết kế lại |
178
+ | R9 | Data table đủ cột cho Then | Yes — thêm cột còn thiếu |
179
+ | R10 | Cross-UC reference dùng cách diễn đạt navigation + Note | Yes — thêm comment Note |
180
+
181
+ Vi phạm R3, R7, R9, R10: auto-fixable. Còn lại cần người hướng dẫn qua note Review Board.
182
182
 
183
183
  ### B4 — Compliance Checks (C.1–C.5)
184
184
 
185
- - [ ] C.1 Wireframe Coverage: every screen component/action has ≥1 SC → finding per missing item
186
- - [ ] C.2 PRD Traceability: covered fully by B1 — do NOT create new findings here; deduplicate against B1 findings
187
- - [ ] C.3 Business Dictionary terms usedsame as B2
188
- - [ ] C.4 Banned Terms: 0 banned terms → **critical**, auto-fixable
189
- - [ ] C.5 NHÓM Grouping: if ≥3 SCs, grouped by business theme → **major**, auto-fixable
185
+ - [ ] C.1 Wireframe Coverage: mỗi component/action của màn hình có ≥1 SC → một finding cho mỗi mục thiếu
186
+ - [ ] C.2 PRD Traceability: đã phủ đầy đủ bởi B1 — KHÔNG tạo finding mới đây; dedup với finding B1
187
+ - [ ] C.3 Term Business Dictionary được dùnggiống B2
188
+ - [ ] C.4 Banned Terms: 0 banned term → **critical**, auto-fixable
189
+ - [ ] C.5 NHÓM Grouping: nếu ≥3 SC, gom nhóm theo business theme → **major**, auto-fixable
190
190
 
191
191
  ### B5 — Metadata & Structural Check
192
192
 
193
- - [ ] File header has all required `@trace.*` fieldscheck each explicitly: `@trace.id`, `@trace.title`, `@trace.revision`, `@trace.domain`, `@trace.service`, `@trace.module`, `@trace.status`, `@trace.author`, `@trace.created_at`, `@trace.prd`, `@trace.prd_version`, `@trace.bdd_version`, `@trace.business_rules`, `@trace.dataset` → **minor** per missing field, auto-fixable
194
- - Note: `@trace.revision` is always `1` (static field — see generate-bdd.tmpl). Only check for presence; do NOT flag value as stale.
195
- - [ ] Every scenario has `# @trace.scenario`, `# @trace.sc_version`, `# @trace.business_rules`, `# Side-effects:` → **minor**, auto-fixable
196
- - [ ] Coverage Matrix at end of file → **major**, auto-fixable (AI regenerates)
197
- - [ ] Pre-merge Checklist at end of file → **minor**, auto-fixable
193
+ - [ ] Header file đủ các field `@trace.*` bắt buộc kiểm tra từng cái tường minh: `@trace.id`, `@trace.title`, `@trace.revision`, `@trace.domain`, `@trace.service`, `@trace.module`, `@trace.status`, `@trace.author`, `@trace.created_at`, `@trace.prd`, `@trace.prd_version`, `@trace.bdd_version`, `@trace.business_rules`, `@trace.dataset` → **minor** cho mỗi field thiếu, auto-fixable
194
+ - Lưu ý: `@trace.revision` luôn `1` (field tĩnh xem generate-bdd.tmpl). Chỉ kiểm tra có mặt; KHÔNG gắn cờ giá trị stale.
195
+ - [ ] Mỗi scenario `# @trace.scenario`, `# @trace.sc_version`, `# @trace.business_rules`, `# Side-effects:` → **minor**, auto-fixable
196
+ - [ ] Coverage Matrix cuối file → **major**, auto-fixable (AI sinh lại)
197
+ - [ ] Pre-merge Checklist cuối file → **minor**, auto-fixable
198
198
 
199
199
  ### B6 — Side-effect Completeness
200
200
 
201
- For each `@happy` scenario:
202
- - `# Side-effects:` comment lists all observable side effects
203
- - `Then` block has `And <side-effect>` for each listed side effect
201
+ Với mỗi scenario `@happy`:
202
+ - Comment `# Side-effects:` liệt tất cả side effect quan sát được
203
+ - Block `Then` `And <side-effect>` cho mỗi side effect đã liệt kê
204
204
 
205
- Missing side-effect assertion: **major**, auto-fixable.
205
+ Thiếu assertion side-effect: **major**, auto-fixable.
206
206
 
207
207
  ---
208
208
 
209
- ## Write Findings File
209
+ ## Ghi File Findings
210
210
 
211
- After running all checks, write `{paths.refinement_dir}/{slug}-review-*-findings.yaml`:
211
+ Sau khi chạy hết các check, ghi `{paths.refinement_dir}/{slug}-review-*-findings.yaml`:
212
212
 
213
213
  ```yaml
214
214
  source_file: "{absolute path to reviewed file}"
@@ -218,14 +218,14 @@ status: "pending_review"
218
218
 
219
219
  findings:
220
220
  - id: "F001"
221
- check_id: "P1" # P1-P5 for PRD; B1-B6 for BDD
221
+ check_id: "P1" # P1-P5 cho PRD; B1-B6 cho BDD
222
222
  severity: "critical" # critical | major | minor
223
- section: "{section or scenario ID where issue was found}"
224
- uc_id: "{UC-ID this finding belongs to — PRD: the UC heading; BDD: @trace.id; \"\" if global}"
225
- quote: "{verbatim snippet copied EXACTLY from the reviewed file at the issue location, ≤120 chars}"
226
- finding: "{clear description of the issue}"
227
- suggestion: "{specific actionable fix — AI will apply this in --resume if accepted}"
228
- auto_fixable: true # true = AI can apply; false = human must write note in Review Board
223
+ section: "{section hoặc scenario ID nơi tìm thấy lỗi}"
224
+ uc_id: "{UC-ID finding này thuộc về — PRD: UC heading; BDD: @trace.id; \"\" nếu global}"
225
+ quote: "{trích đoạn nguyên văn copy CHÍNH XÁC từ file đang review tại vị trí lỗi, ≤120 ký tự}"
226
+ finding: "{ tả ràng vấn đề}"
227
+ suggestion: "{bản fix cụ thể, hành động được — AI sẽ áp dụng khi --resume nếu được chấp nhận}"
228
+ auto_fixable: true # true = AI áp dụng được; false = người phải viết note trong Review Board
229
229
  status: "pending" # pending | accepted | modified | rejected | deferred
230
230
 
231
231
  summary:
@@ -236,180 +236,180 @@ summary:
236
236
  recommendation: "APPROVED | NEEDS_REVISION | BLOCKED"
237
237
  ```
238
238
 
239
- > **Locator fields (`quote` + `uc_id`) — required for Review Board source-jump.**
240
- > For every finding, copy a short **verbatim** `quote` straight from the reviewed file at the exact
241
- > spot the issue occursdo NOT paraphrase; it is matched against the document to locate the line.
242
- > Set `uc_id` to the owning Use Case (`@trace.id` for BDD, the UC heading for PRD; `""` if global).
243
- > These let a reviewer click a finding in the Review Board and jump to the precise source location.
239
+ > **Field định vị (`quote` + `uc_id`) — bắt buộc cho source-jump của Review Board.**
240
+ > Với mỗi finding, copy một đoạn `quote` **nguyên văn** thẳng từ file đang review tại đúng
241
+ > chỗ lỗi xảy raKHÔNG diễn giải lại; được so khớp với tài liệu để định vị dòng.
242
+ > Đặt `uc_id` Use Case sở hữu (`@trace.id` cho BDD, UC heading cho PRD; `""` nếu global).
243
+ > Hai field này cho phép reviewer click một finding trong Review Board nhảy tới đúng vị trí nguồn.
244
244
 
245
- ## Post-Analysis Routing
245
+ ## Định tuyến sau phân tích (Post-Analysis Routing)
246
246
 
247
- After running all checks and writing the findings file:
247
+ Sau khi chạy hết các check ghi file findings:
248
248
 
249
- **If `--fix` flag present**jump to Fix Mode (apply `auto_fixable: true` findings immediately).
249
+ **Nếu flag `--fix`**nhảy tới Fix Mode (áp dụng ngay các finding `auto_fixable: true`).
250
250
 
251
- **If no flag** → print Report below and stop.
251
+ **Nếu không flag** → in Report bên dưới và dừng.
252
252
 
253
253
  ## Report
254
254
 
255
255
  {{include:steps/report-footer.md}}
256
256
 
257
257
  ```
258
- /review-context Complete — {target file}
258
+ /review-context Hoàn tất — {target file}
259
259
  Mode: {PRD | BDD}
260
260
  Findings: {total} | 🔴 Critical: {N} | 🟡 Major: {N} | 🟢 Minor: {N}
261
261
  Auto-fixable: {N} | Needs human decision: {N}
262
262
 
263
- Findings file:
263
+ File findings:
264
264
  {If PRD}: {paths.refinement_dir}/{prd-slug}-review-context-findings.yaml
265
265
  {If BDD}: {paths.refinement_dir}/{uc-id}-review-bdd-findings.yaml
266
266
 
267
- Next options:
267
+ Lựa chọn tiếp theo:
268
268
  A) Quick fix : /review-context --fix {target-file}
269
- applies all auto-fixable findings immediately
270
- B) Review Board: open findings file → accept/modify/reject
269
+ áp dụng ngay mọi finding auto-fixable
270
+ B) Review Board: mở file findings → accept/modify/reject
271
271
  → /review-context --resume {target-file}
272
272
  ```
273
273
 
274
274
  ---
275
275
 
276
- ## Fix Mode — Apply Auto-Fixable Findings Immediately
276
+ ## Fix Mode — Áp dụng ngay các Finding Auto-Fixable
277
277
 
278
- *Triggered when `$ARGUMENTS` contains `--fix`.*
279
- *Example: `/review-context --fix specs/payment/process-payment/bdd/PAY-001.feature`*
278
+ *Kích hoạt khi `$ARGUMENTS` chứa `--fix`.*
279
+ * dụ: `/review-context --fix specs/payment/process-payment/bdd/PAY-001.feature`*
280
280
 
281
- This mode runs the full analysis (same as default), then immediately applies every
282
- `auto_fixable: true` finding without going through the Review Board.
281
+ Mode này chạy toàn bộ phân tích (giống mặc định), rồi áp dụng ngay mọi finding
282
+ `auto_fixable: true` không qua Review Board.
283
283
 
284
- Use for: BDD cleanup, terminology fixes, metadata gaps anything the AI can safely
285
- correct without a human judgment call. Findings requiring human decisions are written
286
- to the findings file as usual and left `status: pending`.
284
+ Dùng cho: dọn BDD, fix thuật ngữ, gap metadata — bất cứ thứ gì AI thể sửa an toàn
285
+ không cần phán đoán của con người. Finding cần quyết định của con người vẫn được ghi
286
+ vào file findings như thường để `status: pending`.
287
287
 
288
- ### Phase 1 — Run analysis
288
+ ### Phase 1 — Chạy phân tích
289
289
 
290
- Run all checks via the **Review Procedure** (fan-out + completeness loop) exactly as in the default mode.
291
- Write the findings file with all `status: "pending"` as usual.
290
+ Chạy hết các check qua **Quy trình Review** (fan-out + completeness loop) đúng như mode mặc định.
291
+ Ghi file findings với tất cả `status: "pending"` như thường.
292
292
 
293
- ### Phase 2 — Apply auto-fixable findings
293
+ ### Phase 2 — Áp dụng các finding auto-fixable
294
294
 
295
- For each finding where `auto_fixable: true`, in order (critical → major → minor):
295
+ Với mỗi finding `auto_fixable: true`, theo thứ tự (critical → major → minor):
296
296
 
297
- **For PRD files:**
297
+ **Với file PRD:**
298
298
 
299
- | check_id | What to apply |
299
+ | check_id | Áp dụng |
300
300
  |----------|--------------|
301
- | P0.3 (Missing status) | Add `@trace.status: draft` to frontmatter |
302
- | P1 (Banned term) | Replace every banned term occurrence with canonical term |
303
- | P4 (Structure) | Add missing section/metadata skeleton |
301
+ | P0.3 (Thiếu status) | Thêm `@trace.status: draft` vào frontmatter |
302
+ | P1 (Banned term) | Thay mọi lần xuất hiện banned term bằng canonical term |
303
+ | P4 (Structure) | Thêm skeleton section/metadata còn thiếu |
304
304
 
305
- **For BDD files:**
305
+ **Với file BDD:**
306
306
 
307
- | check_id | What to apply |
307
+ | check_id | Áp dụng |
308
308
  |----------|--------------|
309
- | B2 (Terminology) | Replace banned terms, fix entity/field names, fix technical sample data |
310
- | B3 R3 | Replace tech terms/UI selectors with business phrasing |
311
- | B3 R7 | Substitute concrete realistic values |
312
- | B3 R9 | Add missing data table columns |
313
- | B3 R10 | Add cross-UC navigation Note comment |
314
- | B4 C4 | Fix banned terms in tags |
315
- | B4 C5 | Add NHÓM grouping if ≥3 SCs |
316
- | B5 | Add missing @trace headers, regenerate Coverage Matrix / Pre-merge Checklist |
317
- | B6 | Add missing `And <side-effect>` to Then blocks |
318
-
319
- After applying each finding, mark it `status: "applied_automatically"` in the findings file.
309
+ | B2 (Terminology) | Thay banned term, fix tên entity/field, fix sample data kỹ thuật |
310
+ | B3 R3 | Thay tech term/UI selector bằng cách diễn đạt nghiệp vụ |
311
+ | B3 R7 | Thay bằng giá trị thực tế cụ thể |
312
+ | B3 R9 | Thêm cột data table còn thiếu |
313
+ | B3 R10 | Thêm comment Note navigation cross-UC |
314
+ | B4 C4 | Fix banned term trong tag |
315
+ | B4 C5 | Thêm NHÓM grouping nếu ≥3 SC |
316
+ | B5 | Thêm @trace header còn thiếu, sinh lại Coverage Matrix / Pre-merge Checklist |
317
+ | B6 | Thêm `And <side-effect>` còn thiếu vào block Then |
318
+
319
+ Sau khi áp dụng mỗi finding, đánh dấu `status: "applied_automatically"` trong file findings.
320
320
 
321
321
  ### Phase 3 — Version bump
322
322
 
323
- - **PRD**: if ≥1 finding applied → bump **minor** version (auto-fix only applies P1 banned-term replacements and P4 skeleton additionsnever alters UC structure or BR content, so minor bump is always correct), add Changelog entry:
323
+ - **PRD**: nếu ≥1 finding được áp dụng → bump version **minor** (auto-fix chỉ áp dụng thay banned-term P1 thêm skeleton P4không bao giờ thay đổi cấu trúc UC hay nội dung BR, nên minor bump luôn đúng), thêm entry Changelog:
324
324
  `Auto-fix: applied {N} auto-fixable review-context findings`
325
- - **BDD**: if ≥1 finding appliedincrement `@trace.bdd_version` by 0.1
325
+ - **BDD**: nếu ≥1 finding được áp dụng tăng `@trace.bdd_version` lên 0.1
326
326
 
327
327
  ### Phase 4 — Report
328
328
 
329
329
  ```
330
- /review-context --fix Applied — {target file}
330
+ /review-context --fix Đã áp dụng — {target file}
331
331
  Mode: {PRD | BDD}
332
332
 
333
333
  Auto-fixed : {N} findings ({critical} critical, {major} major, {minor} minor)
334
- - {change 1 summary}
335
- - {change 2 summary}
334
+ - {tóm tắt change 1}
335
+ - {tóm tắt change 2}
336
336
 
337
- Still pending (needs human decision): {N}
338
- - F00X [{severity}] {finding summary} ← open findings file in Review Board
337
+ Còn pending (cần quyết định của con người): {N}
338
+ - F00X [{severity}] {tóm tắt finding} ← mở file findings trong Review Board
339
339
 
340
340
  {If PRD}: Version bumped: {old} → {new}
341
341
  {If BDD}: bdd_version: {old} → {new}
342
342
 
343
- Findings file:
343
+ File findings:
344
344
  {If PRD}: {paths.refinement_dir}/{prd-slug}-review-context-findings.yaml
345
345
  {If BDD}: {paths.refinement_dir}/{uc-id}-review-bdd-findings.yaml
346
- Re-run /review-context {file} to confirm 0 remaining critical findings.
346
+ Chạy lại /review-context {file} để xác nhận 0 finding critical còn lại.
347
347
  ```
348
348
 
349
- If 0 findings were auto-fixable → print:
349
+ Nếu 0 finding nào auto-fixable → in:
350
350
  ```
351
- Nothing to auto-fix. All {N} findings require human decision.
352
- Open findings file in Review Board → then run: /review-context --resume {file}
351
+ Không gì để auto-fix. Cả {N} finding đều cần quyết định của con người.
352
+ Mở file findings trong Review Board → rồi chạy: /review-context --resume {file}
353
353
  ```
354
354
 
355
355
  ---
356
356
 
357
- ## Resume Mode — Apply Accepted Findings
357
+ ## Resume Mode — Áp dụng các Finding được chấp nhận
358
358
 
359
- *Triggered when `$ARGUMENTS` contains `--resume`.*
360
- *Example: `/review-context --resume specs/payment/process-payment/prd.md`*
359
+ *Kích hoạt khi `$ARGUMENTS` chứa `--resume`.*
360
+ * dụ: `/review-context --resume specs/payment/process-payment/PAY01-process-payment.md`*
361
361
 
362
- ### Phase 1 — Read accepted findings
362
+ ### Phase 1 — Đọc các finding được chấp nhận
363
363
 
364
- 1. Derive findings filename from target file using the same rule as Detect Review Mode:
364
+ 1. Suy ra tên file findings từ target file dùng cùng quy tắc như Detect Review Mode:
365
365
  - PRD: `{paths.refinement_dir}/{prd-slug}-review-context-findings.yaml`
366
366
  - BDD: `{paths.refinement_dir}/{uc-id}-review-bdd-findings.yaml`
367
- 2. Read the findings file.
368
- 3. Collect findings where `status: "accepted"` or `status: "modified"`.
369
- 4. If nonereport "No accepted findings. File unchanged." and stop.
367
+ 2. Đọc file findings.
368
+ 3. Gom các finding `status: "accepted"` hoặc `status: "modified"`.
369
+ 4. Nếu không báo "No accepted findings. File unchanged." dừng.
370
370
 
371
- ### Phase 2 — Apply fixes
371
+ ### Phase 2 — Áp dụng fix
372
372
 
373
- Apply in order: critical → major → minor.
373
+ Áp dụng theo thứ tự: critical → major → minor.
374
374
 
375
- **For PRD findings:**
376
- | check_id | What to do |
375
+ **Với finding PRD:**
376
+ | check_id | Làm |
377
377
  |----------|-----------|
378
- | P0.3 (Missing status) | Add `@trace.status: draft` to frontmatter |
379
- | P1 (Banned term) | Replace every occurrence of banned term with canonical term |
380
- | P2 (Ambiguity) | Apply the fix stated in `suggestion` or `modified` note |
381
- | P3 (Conflict) | Apply the resolution stated in the modified note |
382
- | P4 (Structure) | Add the missing section/metadata field |
383
- | P5 (Custom) | Apply as stated in suggestion/note |
378
+ | P0.3 (Thiếu status) | Thêm `@trace.status: draft` vào frontmatter |
379
+ | P1 (Banned term) | Thay mọi lần xuất hiện banned term bằng canonical term |
380
+ | P2 (Ambiguity) | Áp dụng fix nêu trong `suggestion` hoặc note `modified` |
381
+ | P3 (Conflict) | Áp dụng cách giải quyết nêu trong note modified |
382
+ | P4 (Structure) | Thêm section/metadata field còn thiếu |
383
+ | P5 (Custom) | Áp dụng như nêu trong suggestion/note |
384
384
 
385
- After applying, bump PRD version (minor) and add Changelog entry.
385
+ Sau khi áp dụng, bump version PRD (minor) thêm entry Changelog.
386
386
 
387
- **For BDD findings:**
388
- | check_id | What to do |
387
+ **Với finding BDD:**
388
+ | check_id | Làm |
389
389
  |----------|-----------|
390
- | B1 (Coverage gap) | Generate new scenario(s) for the uncovered AC/BR and insert into correct NHÓM |
391
- | B2 (Terminology) | Replace banned terms, fix entity/field names |
392
- | B3 (Gherkin rule) | Apply rule-specific fix (replace tech terms, add concrete values, etc.) |
393
- | B4 (Compliance) | Add NHÓM grouping, fix @trace tags |
394
- | B5 (Metadata) | Add missing @trace headers, regenerate Coverage Matrix / Pre-merge Checklist |
395
- | B6 (Side effects) | Add missing `And <side-effect>` to Then block |
390
+ | B1 (Coverage gap) | Sinh scenario mới cho AC/BR chưa phủ chèn vào đúng NHÓM |
391
+ | B2 (Terminology) | Thay banned term, fix tên entity/field |
392
+ | B3 (Gherkin rule) | Áp dụng fix theo từng rule (thay tech term, thêm giá trị cụ thể, v.v.) |
393
+ | B4 (Compliance) | Thêm NHÓM grouping, fix tag @trace |
394
+ | B5 (Metadata) | Thêm @trace header còn thiếu, sinh lại Coverage Matrix / Pre-merge Checklist |
395
+ | B6 (Side effects) | Thêm `And <side-effect>` còn thiếu vào block Then |
396
396
 
397
- After applying, increment `@trace.bdd_version` in file header by 0.1.
398
- Also update `{paths.trace_dir}/{domain}/{prd-slug}/{UC-ID}.tsv`: set `bdd_version` column to the new `@trace.bdd_version` value for all rows, and set `last_updated` to today's date.
397
+ Sau khi áp dụng, tăng `@trace.bdd_version` trong header file lên 0.1.
398
+ Đồng thời cập nhật `{paths.trace_dir}/{domain}/{prd-slug}/{UC-ID}.tsv`: đặt cột `bdd_version` thành giá trị `@trace.bdd_version` mới cho mọi row, đặt `last_updated` thành ngày hôm nay.
399
399
 
400
400
  ### Phase 3 — Report
401
401
 
402
402
  ```
403
- /review-context --resume Applied — {target file}
403
+ /review-context --resume Đã áp dụng — {target file}
404
404
  Applied : {N} findings ({critical} critical, {major} major, {minor} minor)
405
405
  Skipped : {N} rejected/deferred
406
406
 
407
407
  Changes:
408
- - {change 1 summary}
409
- - {change 2 summary}
408
+ - {tóm tắt change 1}
409
+ - {tóm tắt change 2}
410
410
 
411
411
  {If PRD}: Version bumped: {old} → {new}
412
412
  {If BDD}: bdd_version: {old} → {new}
413
413
 
414
- Re-run /review-context {file} to confirm 0 remaining critical findings.
414
+ Chạy lại /review-context {file} để xác nhận 0 finding critical còn lại.
415
415
  ```