@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,9 +1,9 @@
1
- # /fix-bug — Full Bug Fix Workflow
1
+ # /fix-bug — Workflow Fix Bug đầy đủ
2
2
 
3
3
  ## Gate
4
4
  {{include:steps/gate.md}}
5
5
 
6
- *Note: For this command, the target in Step 1 is a ticket ID (e.g., `PROJ-123`), a **filed bug `{BUG-ID}`** (a `{paths.bug_reports_dir}/{BUG-ID}.md` from `/report-bug` — e.g. a QC product-gap), or a bug description from `$ARGUMENTS`. If a `{BUG-ID}` is given, resolve & read that report for spec context; otherwise proceed to context loading.*
6
+ *Lưu ý: Với lệnh này, target Bước 1 một ticket ID (vd `PROJ-123`), một **bug đã file `{BUG-ID}`** (một `{paths.bug_reports_dir}/{BUG-ID}.md` từ `/report-bug` — vd một QC product-gap), hoặc một mô tả bug từ `$ARGUMENTS`. Nếu cho `{BUG-ID}`, phân giải & đọc report đó để lấy spec context; ngược lại tiếp tục sang context loading.*
7
7
 
8
8
  ## Context
9
9
  {{include:steps/context-loader.md}}
@@ -11,69 +11,69 @@
11
11
  ---
12
12
 
13
13
  ## Phase 1 — Gather Info
14
- If a `{BUG-ID}` was given: read `{paths.bug_reports_dir}/{BUG-ID}.md` for the spec context, AC violated, expected-vs-actual, and the suggested layeruse it as the bug details (no need to re-ask).
15
- If ticket: fetch details (or ask user to paste).
16
- If no ticket / BUG-ID — CHECKPOINT:
17
- 1. Where does the bug occur? (module, endpoint, flow)
18
- 2. Steps to reproduce?
14
+ Nếu cho `{BUG-ID}`: đọc `{paths.bug_reports_dir}/{BUG-ID}.md` để lấy spec context, AC bị vi phạm, expected-vs-actual, layer gợi ýdùng làm chi tiết bug (không cần hỏi lại).
15
+ Nếu ticket: fetch chi tiết (hoặc nhờ user dán).
16
+ Nếu không ticket / BUG-ID — CHECKPOINT:
17
+ 1. Bug xảy ra đâu? (module, endpoint, flow)
18
+ 2. Các bước tái hiện?
19
19
  3. Expected vs Actual?
20
20
  4. Error log / stack trace?
21
21
 
22
22
  ## Phase 2 — Root Cause Analysis
23
23
 
24
- Use `active_module` from context to select the relevant table.
24
+ Dùng `active_module` từ context để chọn bảng liên quan.
25
25
 
26
- ### If `platform_type = backend`
26
+ ### Nếu `platform_type = backend`
27
27
 
28
28
  #### java-spring / golang / dotnet / php-laravel
29
29
 
30
- | Bug Type | Common Location | How to Check |
30
+ | Bug Type | Vị trí thường gặp | Cách kiểm tra |
31
31
  |----------|----------------|--------------|
32
- | Wrong response data | Mapping layer | Check field mapping, DTO conversions |
33
- | 400 Bad Request | Input validation | Check DTO constraints / validators |
34
- | 401 Unauthorized | Auth filter | Check token config, filter order |
35
- | 403 Forbidden | Auth config | Check role-based access rules |
36
- | 404 Not Found | Repository query | Check find method, ID types |
37
- | N+1 Query | Data access | Check for missing JOIN FETCH / eager load |
38
- | Null Pointer | Optional not handled | Check Optional.orElseThrow, null guards |
39
- | Transaction rollback | Missing @Transactional | Check transaction scope, propagation |
40
- | Stale cache | Missing eviction | Check cache invalidation triggers |
41
- | Type mismatch | Filter / specification | Check field types in predicates |
32
+ | Wrong response data | Mapping layer | Kiểm tra field mapping, DTO conversion |
33
+ | 400 Bad Request | Input validation | Kiểm tra DTO constraint / validator |
34
+ | 401 Unauthorized | Auth filter | Kiểm tra token config, thứ tự filter |
35
+ | 403 Forbidden | Auth config | Kiểm tra rule role-based access |
36
+ | 404 Not Found | Repository query | Kiểm tra find method, kiểu ID |
37
+ | N+1 Query | Data access | Kiểm tra thiếu JOIN FETCH / eager load |
38
+ | Null Pointer | Optional chưa xử | Kiểm tra Optional.orElseThrow, null guard |
39
+ | Transaction rollback | Thiếu @Transactional | Kiểm tra transaction scope, propagation |
40
+ | Stale cache | Thiếu eviction | Kiểm tra trigger cache invalidation |
41
+ | Type mismatch | Filter / specification | Kiểm tra kiểu field trong predicate |
42
42
 
43
43
  #### context-engineering (AI/LLM pipelines)
44
44
 
45
- | Bug Type | Common Location | How to Check |
45
+ | Bug Type | Vị trí thường gặp | Cách kiểm tra |
46
46
  |----------|----------------|--------------|
47
- | Wrong pipeline output | Prompt template | Check prompt content; verify variables are substituted correctly |
48
- | Missing context in output | Context assembly | Verify all required context blocks are included and non-empty |
49
- | Schema validation failure | Output parser | Compare raw LLM output vs expected schema; add stricter output instructions |
50
- | Flaky / non-deterministic results | LLM temperature | Check temperature setting; use fixed seed/mock in tests |
51
- | API rate limit errors | LLM client | Implement backoff; check quota usage in provider dashboard |
52
- | Token limit exceeded | Prompt assembly | Reduce context size; add chunking strategy |
47
+ | Wrong pipeline output | Prompt template | Kiểm tra nội dung prompt; verify biến được substitute đúng |
48
+ | Missing context in output | Context assembly | Verify mọi context block bắt buộc mặt và không rỗng |
49
+ | Schema validation failure | Output parser | So raw LLM output vs schema kỳ vọng; thêm output instruction chặt hơn |
50
+ | Flaky / non-deterministic results | LLM temperature | Kiểm tra temperature; dùng fixed seed/mock trong test |
51
+ | API rate limit errors | LLM client | Implement backoff; kiểm tra quota trên dashboard provider |
52
+ | Token limit exceeded | Prompt assembly | Giảm kích thước context; thêm chiến lược chunking |
53
53
 
54
- ### If `platform_type = web-frontend`
54
+ ### Nếu `platform_type = web-frontend`
55
55
 
56
- | Bug Type | Common Location | How to Check |
56
+ | Bug Type | Vị trí thường gặp | Cách kiểm tra |
57
57
  |----------|----------------|--------------|
58
- | Wrong data displayed | State / store | Check state update logic, selector |
59
- | UI not re-rendering | Missing reactive dep | Check deps array, state immutability |
60
- | API data not loading | HTTP client / hook | Check network tab, error handler |
61
- | 401 on API call | Auth token | Check token refresh, header injection |
62
- | Form not submitting | Validation / handler | Check form state, required fields, errors |
63
- | Route not found | Router config | Check route definition, lazy import |
64
- | Build / type error | TypeScript types | Compare type definitions vs actual API shape |
58
+ | Wrong data displayed | State / store | Kiểm tra logic update state, selector |
59
+ | UI not re-rendering | Thiếu reactive dep | Kiểm tra deps array, state immutability |
60
+ | API data not loading | HTTP client / hook | Kiểm tra network tab, error handler |
61
+ | 401 on API call | Auth token | Kiểm tra token refresh, header injection |
62
+ | Form not submitting | Validation / handler | Kiểm tra form state, field bắt buộc, error |
63
+ | Route not found | Router config | Kiểm tra route definition, lazy import |
64
+ | Build / type error | TypeScript types | So type definition vs shape API thực tế |
65
65
 
66
- ### If `platform_type = mobile`
66
+ ### Nếu `platform_type = mobile`
67
67
 
68
- | Bug Type | Common Location | How to Check |
68
+ | Bug Type | Vị trí thường gặp | Cách kiểm tra |
69
69
  |----------|----------------|--------------|
70
- | Screen shows stale data | State / BLoC / ViewModel | Check event dispatched, state emitted correctly |
71
- | Crash on navigation | Route param missing | Check params passed, null safety |
72
- | API call not firing | Repository / service layer | Add log in repo method, check network |
73
- | UI not reflecting state | Widget not observing stream | Check `BlocBuilder` / `StateObserver` setup |
74
- | Crash on app resume | Lifecycle handler | Check `onResume` / `viewDidAppear` logic |
75
- | Auth token expired | Token refresh logic | Check refresh flow, token storage |
76
- | Permission denied | OS permission | Check runtime permission request code |
70
+ | Screen shows stale data | State / BLoC / ViewModel | Kiểm tra event dispatch, state emit đúng |
71
+ | Crash on navigation | Thiếu route param | Kiểm tra param truyền, null safety |
72
+ | API call not firing | Repository / service layer | Thêm log trong repo method, kiểm tra network |
73
+ | UI not reflecting state | Widget không observe stream | Kiểm tra setup `BlocBuilder` / `StateObserver` |
74
+ | Crash on app resume | Lifecycle handler | Kiểm tra logic `onResume` / `viewDidAppear` |
75
+ | Auth token expired | Token refresh logic | Kiểm tra refresh flow, token storage |
76
+ | Permission denied | OS permission | Kiểm tra code request runtime permission |
77
77
 
78
78
  CHECKPOINT — Root Cause Report:
79
79
  ```
@@ -87,13 +87,13 @@ Proceed? (Y/N)
87
87
 
88
88
  ## Phase 3 — Fix
89
89
 
90
- *Umbrella mode: the buggy code lives in the **service submodule** resolved at context-loader Step 1.6 — create the branch and run every git/build step from **inside** `{service_root}`. Single-service: omit the `cd`.*
90
+ *Umbrella mode: code lỗi sống trong **service submodule** phân giải context-loader Bước 1.6 — tạo branch chạy mọi bước git/build từ **trong** `{service_root}`. Single-service: bỏ `cd`.*
91
91
 
92
92
  ```bash
93
93
  cd {service_root} # umbrella: the service submodule; single-service: omit
94
94
  git checkout -b fix/{TICKET_ID}-{description}
95
95
  ```
96
- Apply fix. Add trace annotation if file has `@trace.implements`:
96
+ Áp dụng fix. Thêm trace annotation nếu file `@trace.implements`:
97
97
  ```
98
98
  @trace.fixes={TICKET_ID}
99
99
  @trace.root_cause={brief description}
@@ -105,53 +105,53 @@ Apply fix. Add trace annotation if file has `@trace.implements`:
105
105
  // @trace.regression={TICKET_ID}
106
106
  Test: "Regression {TICKET_ID}: {bug description}"
107
107
  ```
108
- Run test. If fail → debug and fix (max 3 iterations).
108
+ Chạy test. Nếu fail → debug fix (tối đa 3 vòng).
109
109
 
110
- ## Phase 5 — Build & Commit (2-layer push in umbrella mode)
110
+ ## Phase 5 — Build & Commit (push 2 tầng umbrella mode)
111
111
  ```bash
112
- {conventions.build_command} # max 3 retriesruns inside {service_root} in umbrella mode
113
- # Tầng 1 — push the fix branch in the service submodule (where the code lives):
112
+ {conventions.build_command} # tối đa 3 retrychạy trong {service_root} umbrella mode
113
+ # Tầng 1 — push fix branch trong service submodule (nơi code sống):
114
114
  git add {files}
115
115
  git commit -m "fix({TICKET_ID}): {description}"
116
- git push -u origin fix/{TICKET_ID}-{slug} # then open a PR into the service's tracked branch
116
+ git push -u origin fix/{TICKET_ID}-{slug} # rồi mở PR vào branch được track của service
117
117
  ```
118
- > **Umbrella mode — Tầng 2 (bump umbrella pointer):** the umbrella records a *commit* of the service
119
- > submodule, not a branch. After the fix-branch PR **merges** into the service's tracked branch, bump
120
- > the pointer so teammates pulling the umbrella don't hit "commit not found":
118
+ > **Umbrella mode — Tầng 2 (bump umbrella pointer):** umbrella ghi một *commit* của service
119
+ > submodule, không phải branch. Sau khi PR fix-branch **merge** vào branch được track của service, bump
120
+ > pointer để đồng đội pull umbrella không gặp "commit not found":
121
121
  > ```bash
122
122
  > cd - # back to umbrella root
123
123
  > git add {service_root} && git commit -m "chore: bump {service_root} pointer (fix {TICKET_ID})"
124
124
  > git push
125
125
  > ```
126
- > Single-service mode: no umbrella pointer — Tầng 1 is the whole push. Full rule: Sync & Update §4.4 (commit 2 tầng).
126
+ > Single-service mode: không umbrella pointer — Tầng 1 toàn bộ push. Quy tắc đầy đủ: Sync & Update §4.4 (commit 2 tầng).
127
127
 
128
- ## Phase 5.5 — Close the bug report (if fixing a filed `{BUG-ID}`)
128
+ ## Phase 5.5 — Đóng bug report (nếu fix một `{BUG-ID}` đã file)
129
129
 
130
- *Skip if the target was a plain ticket/description (no `{BUG-ID}` file).*
130
+ *Bỏ qua nếu target ticket/ tả thường (không có file `{BUG-ID}`).*
131
131
 
132
- After the fix is committed, update `{paths.bug_reports_dir}/{BUG-ID}.md`:
133
- - Set `State` → `🟡 Fixed` and append a short **Resolution** (root cause + commit/PR link).
134
- - It is **not** `Closed` yet — QC owns verification: when `/qc-run-test` re-runs and `qc_status`
135
- for the linked SC flips to `pass`, it becomes `🟢 Closed` (and `qc_owner`/`qc_blocked_by` clear).
136
- - Commit the updated report to the spec repo (same 2-layer push as `/report-bug`) so the PO/PM
137
- "waiting-on" view reflects it on `/sync`.
132
+ Sau khi fix được commit, cập nhật `{paths.bug_reports_dir}/{BUG-ID}.md`:
133
+ - Set `State` → `🟡 Fixed` thêm một **Resolution** ngắn (root cause + link commit/PR).
134
+ - **chưa** `Closed` — QC sở hữu verification: khi `/qc-run-test` chạy lại `qc_status`
135
+ của SC liên kết flip thành `pass`, thành `🟢 Closed` ( `qc_owner`/`qc_blocked_by` clear).
136
+ - Commit report đã cập nhật vào spec repo (cùng push 2 tầng như `/report-bug`) để view
137
+ "waiting-on" của PO/PM phản ánh nó trên `/sync`.
138
138
 
139
- This is the only write `/fix-bug` makes to the feedback area it still fixes **code** only,
140
- never edits PRD/BDD (spec changes are PO/Dev per BUG_FLOW Case 2–4).
139
+ Đây lần ghi duy nhất `/fix-bug` làm tới khu feedback — vẫn chỉ fix **code**,
140
+ không bao giờ sửa PRD/BDD (thay đổi spec việc PO/Dev theo BUG_FLOW Case 2–4).
141
141
 
142
- ## Phase 6 — Offer to Record a Lesson (optional)
142
+ ## Phase 6 — Đề xuất ghi Lesson (tuỳ chọn)
143
143
 
144
- If the root cause was a **mistake the AI made during generation and could repeat**
145
- (e.g. it generated code that skipped a layer, missed a null guard, used a wrong pattern —
146
- NOT an external cause like a third-party outage or bad input data), ask:
144
+ Nếu root cause một **lỗi AI gây ra khi sinh có thể lặp lại**
145
+ (vd sinh code skip layer, thiếu null guard, dùng sai pattern —
146
+ KHÔNG phải nguyên nhân bên ngoài như outage third-party hay input data sai), hỏi:
147
147
 
148
148
  ```
149
- This root cause looks like a repeatable AI mistake.
150
- Record it as a project lesson so it isn't generated again? (Y/N)
149
+ Root cause này trông như một lỗi AI lặp lại.
150
+ Ghi thành project lesson để không bị sinh lại? (Y/N)
151
151
  ```
152
152
 
153
- If `Y` → run the capture procedure below with `source=/fix-bug {TICKET_ID}`, an appropriate
154
- `category` (usually `code-gen`), and `scope` = the affected domain or file glob.
153
+ Nếu `Y` → chạy quy trình capture bên dưới với `source=/fix-bug {TICKET_ID}`, một
154
+ `category` phù hợp (thường `code-gen`), `scope` = domain hoặc file glob bị ảnh hưởng.
155
155
 
156
156
  {{include:steps/capture-lesson.md}}
157
157
 
@@ -160,12 +160,12 @@ If `Y` → run the capture procedure below with `source=/fix-bug {TICKET_ID}`, a
160
160
  {{include:steps/report-footer.md}}
161
161
 
162
162
  ```
163
- /fix-bug Complete — {TICKET_ID}
163
+ /fix-bug Hoàn tất — {TICKET_ID}
164
164
  Root Cause: {analysis}
165
165
  Changes: {list}
166
166
  ✅ Regression test added | ✅ Build: SUCCESS
167
- {🐞 BUG-{id} → State: Fixed (pushed) — Closed after /qc-run-test re-verify pass | if fixing a filed bug}
168
- {📝 Lesson L-NNN recorded (if captured)}
167
+ {🐞 BUG-{id} → State: Fixed (pushed) — Closed sau khi /qc-run-test re-verify pass | nếu fix một bug đã file}
168
+ {📝 Lesson L-NNN recorded (nếu đã capture)}
169
169
  Branch: fix/{TICKET_ID}-{slug}
170
- Next: Create PR and link to ticket. {QC: re-run /qc-run-test {UC-ID} to verify + close the bug | if applicable}
170
+ Next: Tạo PR link tới ticket. {QC: chạy lại /qc-run-test {UC-ID} để verify + đóng bug | nếu áp dụng}
171
171
  ```