@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,15 +1,15 @@
1
- # /dev-run-test — Run Dev Self-Check Tests & Report Results
1
+ # /dev-run-test — Chạy Dev Self-Check Tests & Report kết quả
2
2
 
3
- > **Scope — dev self-check (smoke), not the official test suite.** Runs the tests produced
4
- > by `/dev-gen-test` so the developer can confirm their own code works before review. This
5
- > is a developer self-check, **not** the QC/dev-team's authoritative test run (separate flow).
6
- > The pass/fail is published to Living Docs as a **dev self-test** signal it tells QC the
7
- > dev ran their checks; it is NOT a statement of official test coverage.
3
+ > **Scope — dev self-check (smoke), không phải bộ test chính thức.** Chạy các test do
4
+ > `/dev-gen-test` sinh ra để dev xác nhận code mình chạy được trước khi review. Đây là một
5
+ > self-check của dev, **không** phải lần chạy test authoritative của QC/dev-team (flow riêng).
6
+ > Pass/fail được publish lên Living Docs như tín hiệu **dev self-test** — cho QC biết
7
+ > dev đã chạy check của họ; KHÔNG phải tuyên bố về độ phủ test chính thức.
8
8
 
9
9
  ## Gate
10
10
  {{include:steps/gate.md}}
11
11
 
12
- *Note: For this command, the target in Step 1 is a UC-ID or service name. Context loading provides `conventions.test_command` and `tech_stack.module`.*
12
+ *Lưu ý: Với lệnh này, target Bước 1 một UC-ID hoặc tên service. Context loading cung cấp `conventions.test_command` `tech_stack.module`.*
13
13
 
14
14
  ## Context
15
15
  {{include:steps/context-loader.md}}
@@ -18,20 +18,20 @@
18
18
 
19
19
  ## Service Detection
20
20
 
21
- Read `active_module` from context (resolved in context-loader Step 1).
22
- Use it to select the correct run command and error analysis table below.
21
+ Đọc `active_module` từ context (đã phân giải ở context-loader Bước 1).
22
+ Dùng để chọn đúng lệnh chạy bảng phân tích lỗi bên dưới.
23
23
 
24
24
  ---
25
25
 
26
26
  ## Submodule Working Directory
27
27
 
28
- *Skip this section if `service_root` is not set (single-service mode).*
28
+ *Bỏ qua section này nếu `service_root` chưa được set (single-service mode).*
29
29
 
30
- When running in **umbrella/submodule mode** (`service_root` was resolved in context-loader Step 1.6):
30
+ Khi chạy **umbrella/submodule mode** (`service_root` được phân giải context-loader Bước 1.6):
31
31
 
32
- - All commands in the **Run** section below must execute from within `{service_root}/`
33
- - `conventions.test_command` was loaded from `{service_root}/.agent/project-context.yaml` — already service-specific
34
- - Prefix every shell command with `cd {service_root} &&`:
32
+ - Mọi lệnh trong section **Run** bên dưới phải thực thi từ trong `{service_root}/`
33
+ - `conventions.test_command` được nạp từ `{service_root}/.agent/project-context.yaml` — đã riêng theo service
34
+ - Prefix mọi lệnh shell bằng `cd {service_root} &&`:
35
35
 
36
36
  ```bash
37
37
  cd {service_root}
@@ -44,13 +44,13 @@ npx vitest run src/... # web-frontend
44
44
  flutter test test/{domain}/... # flutter
45
45
  ```
46
46
 
47
- > **Why cd?** Claude Code session is opened at umbrella root. Each service submodule has its own build tool, test runner, and dependency treetests must run from inside the service directory.
47
+ > ** sao cd?** Session Claude Code mở umbrella root. Mỗi service submodule build tool, test runner, cây dependency riêngtest phải chạy từ trong thư mục service.
48
48
 
49
49
  ---
50
50
 
51
51
  ## Run
52
52
 
53
- ### If `platform_type = backend`
53
+ ### Nếu `platform_type = backend`
54
54
 
55
55
  ```bash
56
56
  # Run all tests for this UC
@@ -71,7 +71,7 @@ pytest tests/{domain}/{test_file}.py::{TestClass}::{test_method} -v
71
71
  pytest tests/ --cov={source_dir} --cov-report=term-missing
72
72
  ```
73
73
 
74
- ### If `platform_type = web-frontend`
74
+ ### Nếu `platform_type = web-frontend`
75
75
 
76
76
  ```bash
77
77
  # Run all tests
@@ -87,7 +87,7 @@ npx playwright test {UC-ID}
87
87
  npx cypress run --spec "cypress/e2e/{UC-ID}*"
88
88
  ```
89
89
 
90
- ### If `platform_type = mobile`
90
+ ### Nếu `platform_type = mobile`
91
91
 
92
92
  ```bash
93
93
  # Flutter:
@@ -105,7 +105,7 @@ xcodebuild test -scheme {Scheme} -destination 'platform=iOS Simulator,name=iPhon
105
105
  ./gradlew connectedAndroidTest # instrumented (device/emulator required)
106
106
  ```
107
107
 
108
- > **Note for Android instrumented tests:** a running emulator or connected device is required before running `connectedAndroidTest`. Start one via Android Studio or: `emulator -avd {AVD_NAME} &`
108
+ > **Lưu ý cho Android instrumented test:** cần một emulator đang chạy hoặc device kết nối trước khi chạy `connectedAndroidTest`. Khởi động qua Android Studio hoặc: `emulator -avd {AVD_NAME} &`
109
109
 
110
110
  ---
111
111
 
@@ -115,86 +115,86 @@ xcodebuild test -scheme {Scheme} -destination 'platform=iOS Simulator,name=iPhon
115
115
 
116
116
  #### java-spring / golang / dotnet / php-laravel
117
117
 
118
- | Error Pattern | Common Cause | Suggested Fix |
118
+ | Error Pattern | Nguyên nhân thường gặp | Suggested Fix |
119
119
  |---|---|---|
120
- | `NullPointerException` | Missing mock setup | Check `given(...)`/`coEvery`/`mockk` for null dependency |
121
- | `Bean not found` | Missing mock declaration | Add `@MockBean` / inject mock |
122
- | `Expected 200, got 401` | Missing auth setup | Add auth token/user to test context |
123
- | `Expected 200, got 400` | Request body fails validation | Check required fields in DTO |
124
- | `Expected 200, got 403` | Wrong role | Add correct role to test user |
125
- | `LazyInitializationException` | Lazy collection outside transaction | Add `@Transactional` or eager fetch |
126
- | `Mapper not found` | Code not compiled | Run build step before tests |
127
- | `DataIntegrityViolationException` | Duplicate key in DB setup | Use `@Transactional` + rollback, or clean DB between tests |
128
- | Assertion mismatch | Wrong mock return value | Re-read `given(...).willReturn(...)` setup |
120
+ | `NullPointerException` | Thiếu setup mock | Kiểm tra `given(...)`/`coEvery`/`mockk` cho dependency null |
121
+ | `Bean not found` | Thiếu khai báo mock | Thêm `@MockBean` / inject mock |
122
+ | `Expected 200, got 401` | Thiếu setup auth | Thêm auth token/user vào test context |
123
+ | `Expected 200, got 400` | Request body fail validation | Kiểm tra field bắt buộc trong DTO |
124
+ | `Expected 200, got 403` | Sai role | Thêm đúng role cho test user |
125
+ | `LazyInitializationException` | Lazy collection ngoài transaction | Thêm `@Transactional` hoặc eager fetch |
126
+ | `Mapper not found` | Code chưa compile | Chạy build trước khi test |
127
+ | `DataIntegrityViolationException` | Trùng key trong DB setup | Dùng `@Transactional` + rollback, hoặc clean DB giữa các test |
128
+ | Assertion mismatch | Sai giá trị mock return | Đọc lại setup `given(...).willReturn(...)` |
129
129
 
130
130
  #### context-engineering (AI/LLM pipelines)
131
131
 
132
- | Error Pattern | Common Cause | Suggested Fix |
132
+ | Error Pattern | Nguyên nhân thường gặp | Suggested Fix |
133
133
  |---|---|---|
134
- | `AssertionError` on LLM mock output | Mock return value not matching schema | Re-check `mock_llm.return_value` / `mock_llm.complete.return_value` setup |
135
- | `ValidationError` on response | LLM output structure doesn't match expected schema | Tighten schema check or add retry logic in test |
136
- | `ConnectionError` / `APIError` | Real LLM API being called in test | Ensure `patch('...')` mock is appliednever call real LLM in unit tests |
137
- | `TimeoutError` | Test calling live LLM endpoint | Add mock; check test fixtures |
138
- | Flaky / non-deterministic results | Real LLM response used in assertion | Replace with deterministic mock return value |
134
+ | `AssertionError` trên output mock LLM | Giá trị mock return không khớp schema | Kiểm tra lại setup `mock_llm.return_value` / `mock_llm.complete.return_value` |
135
+ | `ValidationError` trên response | Cấu trúc output LLM không khớp schema kỳ vọng | Siết schema check hoặc thêm retry logic trong test |
136
+ | `ConnectionError` / `APIError` | LLM API thật bị gọi trong test | Đảm bảo mock `patch('...')` được áp dụngkhông bao giờ gọi LLM thật trong unit test |
137
+ | `TimeoutError` | Test gọi LLM endpoint live | Thêm mock; kiểm tra test fixture |
138
+ | Kết quả flaky / non-deterministic | Response LLM thật dùng trong assertion | Thay bằng giá trị mock return tất định |
139
139
 
140
140
  ### Web frontend failure patterns
141
141
 
142
- | Error Pattern | Common Cause | Suggested Fix |
142
+ | Error Pattern | Nguyên nhân thường gặp | Suggested Fix |
143
143
  |---|---|---|
144
- | `Unable to find role "..."` | Element not rendered yet | Wrap in `await waitFor(() => ...)` |
145
- | `TestingLibraryElementError: Found multiple elements` | Selector too broad | Use `getByRole(..., { name: '...' })` to narrow |
146
- | `Network request not intercepted` | Missing MSW handler / `cy.intercept` | Add handler for the endpoint |
147
- | `act(...)` warning | State update after test ended | Await async events / `await userEvent.click(...)` |
148
- | `Cannot read properties of undefined` | Component rendered before data loaded | Add loading state or mock resolved data |
149
- | Playwright timeout | Page not navigated / element hidden | Check route, add `waitForSelector` |
150
- | `expect(page.locator(...)).toBeVisible` fails | Wrong selector | Use Playwright Inspector to find correct locator |
144
+ | `Unable to find role "..."` | Element chưa render | Bọc trong `await waitFor(() => ...)` |
145
+ | `TestingLibraryElementError: Found multiple elements` | Selector quá rộng | Dùng `getByRole(..., { name: '...' })` để thu hẹp |
146
+ | `Network request not intercepted` | Thiếu MSW handler / `cy.intercept` | Thêm handler cho endpoint |
147
+ | `act(...)` warning | State update sau khi test kết thúc | Await async event / `await userEvent.click(...)` |
148
+ | `Cannot read properties of undefined` | Component render trước khi data load | Thêm loading state hoặc mock data đã resolve |
149
+ | Playwright timeout | Page chưa navigate / element ẩn | Kiểm tra route, thêm `waitForSelector` |
150
+ | `expect(page.locator(...)).toBeVisible` fail | Sai selector | Dùng Playwright Inspector để tìm đúng locator |
151
151
 
152
152
  ### Mobile failure patterns
153
153
 
154
154
  #### Flutter
155
- | Error Pattern | Common Cause | Suggested Fix |
155
+ | Error Pattern | Nguyên nhân thường gặp | Suggested Fix |
156
156
  |---|---|---|
157
- | `pumpAndSettle timed out` | Async operation not completing | Use `pump(Duration(...))` for specific delay |
158
- | `No widget found` | Widget not rendered / wrong finder | Check `find.byType`, `find.text`, `find.byKey` |
159
- | `setState called after dispose` | Widget disposed before async completes | Cancel async in `dispose()` |
160
- | BLoC state mismatch | Wrong event emitted | Verify `mockBloc` received correct event |
157
+ | `pumpAndSettle timed out` | Async operation chưa hoàn thành | Dùng `pump(Duration(...))` cho delay cụ thể |
158
+ | `No widget found` | Widget chưa render / sai finder | Kiểm tra `find.byType`, `find.text`, `find.byKey` |
159
+ | `setState called after dispose` | Widget bị dispose trước khi async xong | Cancel async trong `dispose()` |
160
+ | BLoC state mismatch | Sai event emit | Verify `mockBloc` nhận đúng event |
161
161
 
162
162
  #### React Native
163
- | Error Pattern | Common Cause | Suggested Fix |
163
+ | Error Pattern | Nguyên nhân thường gặp | Suggested Fix |
164
164
  |---|---|---|
165
- | `Unable to find element` | Missing `testID` or wrong query | Add `accessibilityLabel` or `testID` to component |
166
- | `act(...)` warning | Async state updates | Wrap in `act(async () => { ... })` |
167
- | Navigation mock missing | `useNavigation` not mocked | Add jest mock for `@react-navigation/native` |
165
+ | `Unable to find element` | Thiếu `testID` hoặc sai query | Thêm `accessibilityLabel` hoặc `testID` vào component |
166
+ | `act(...)` warning | Async state update | Bọc trong `act(async () => { ... })` |
167
+ | Thiếu navigation mock | `useNavigation` chưa mock | Thêm jest mock cho `@react-navigation/native` |
168
168
 
169
169
  #### iOS / Android
170
- | Error Pattern | Common Cause | Suggested Fix |
170
+ | Error Pattern | Nguyên nhân thường gặp | Suggested Fix |
171
171
  |---|---|---|
172
- | `XCTAssertEqual failed` | Wrong expected value | Check ViewModel output for given mock |
173
- | `Compose node not found` | Wrong `contentDescription` / `testTag` | Add `Modifier.testTag(...)` to composable |
174
- | `Hilt injection failed` | Missing test module | Add `@UninstallModules` + `@BindValue` in test class |
175
- | Emulator not available | `connectedAndroidTest` without device | Start emulator first, wait for it to boot |
172
+ | `XCTAssertEqual failed` | Sai giá trị kỳ vọng | Kiểm tra output ViewModel cho mock đã cho |
173
+ | `Compose node not found` | Sai `contentDescription` / `testTag` | Thêm `Modifier.testTag(...)` vào composable |
174
+ | `Hilt injection failed` | Thiếu test module | Thêm `@UninstallModules` + `@BindValue` trong test class |
175
+ | Emulator not available | `connectedAndroidTest` không device | Khởi động emulator trước, chờ boot |
176
176
 
177
177
  ---
178
178
 
179
179
  ## Write Trace State
180
180
 
181
- After the run, persist results to the **authoritative TSV** in the service so they reach
182
- the Living Docs report at the spec module (via `/sync` + `/validate-traces`). The test
183
- files themselves stay in the service — only the run *status* is reported.
181
+ Sau khi chạy, lưu kết quả vào **TSV authoritative** trong service để chúng tới được
182
+ report Living Docs spec module (qua `/sync` + `/validate-traces`). Các file test
183
+ lại trong service — chỉ *status* của lần chạy được report.
184
184
 
185
- Update `{paths.trace_dir}/{domain}/{prd-slug}/{UC-ID}.tsv` (if `domain`/`prd_slug` weren't resolved from a spec target, locate the TSV by globbing `{paths.trace_dir}/**/{UC-ID}.tsv` — it was created earlier by `/generate-bdd`) — for each scenario row (matched by `sc_id` via its
186
- test's `@trace.verifies={UC-ID}-SC{N}` tag). *(Umbrella + `spec_source`: `trace_dir` is `{spec_source}/.trace` — tests run from `service_root` but the `dev_selftest` update writes into the **spec repo**; commit/push the spec submodule for it.)*
185
+ Cập nhật `{paths.trace_dir}/{domain}/{prd-slug}/{UC-ID}.tsv` (nếu `domain`/`prd_slug` không phân giải được từ spec target, định vị TSV bằng cách glob `{paths.trace_dir}/**/{UC-ID}.tsv` — được tạo trước đó bởi `/generate-bdd`) — cho mỗi scenario row (khớp `sc_id` qua tag
186
+ `@trace.verifies={UC-ID}-SC{N}` của test). *(Umbrella + `spec_source`: `trace_dir` `{spec_source}/.trace` — test chạy từ `service_root` nhưng update `dev_selftest` ghi vào **spec repo**; commit/push spec submodule cho nó.)*
187
187
 
188
- | Column | Value |
188
+ | Cột | Giá trị |
189
189
  |--------|-------|
190
- | `dev_selftest` | `pass` if all tests for this SC passed · `fail` if any failed · `not_run` if its tests were skipped/absent |
191
- | `dev_selftest_at` | today `YYYY-MM-DD` |
190
+ | `dev_selftest` | `pass` nếu mọi test của SC này pass · `fail` nếu cái fail · `not_run` nếu test của bị skip/vắng |
191
+ | `dev_selftest_at` | hôm nay `YYYY-MM-DD` |
192
192
 
193
- Leave all other columns unchangedin particular **never** touch `qc_status`/`qc_run_at`
194
- (the official QC automation result, owned by `/qc-run-test`). `dev_selftest` (dev smoke)
195
- and `qc_status` (official QC) are separate
196
- signals. `dev_selftest`/`dev_selftest_at` are also orthogonal to `status`
197
- (OK/GAP/DRIFT/UNTRACKED): `status` tracks *coverage*, `dev_selftest` tracks the dev's latest *run result*.
193
+ Giữ nguyên mọi cột khácđặc biệt **không bao giờ** đụng `qc_status`/`qc_run_at`
194
+ (kết quả QC automation chính thức, do `/qc-run-test` sở hữu). `dev_selftest` (dev smoke)
195
+ `qc_status` (QC chính thức) hai tín hiệu riêng. `dev_selftest`/`dev_selftest_at` cũng
196
+ trực giao với `status` (OK/GAP/DRIFT/UNTRACKED): `status` theo dõi *coverage*, `dev_selftest`
197
+ theo dõi *kết quả chạy* gần nhất của dev.
198
198
 
199
199
  ## Refresh Panel Mirror
200
200
  {{include:steps/trace-mirror.md}}
@@ -212,13 +212,13 @@ signals. `dev_selftest`/`dev_selftest_at` are also orthogonal to `status`
212
212
  |------|-------|------------|
213
213
 
214
214
  ## Recommendations
215
- {specific fix per failure}
215
+ {fix cụ thể cho từng failure}
216
216
 
217
217
  Trace: {paths.trace_dir}/{domain}/{prd-slug}/{UC-ID}.tsv updated (dev_selftest, dev_selftest_at)
218
218
 
219
219
  Next:
220
- All tests pass → /review-code {UC-ID}
221
- Tests fail → /fix-bug {TICKET_ID} (real bug) or fix test (wrong expectation)
220
+ Mọi test pass → /review-code {UC-ID}
221
+ Test fail → /fix-bug {TICKET_ID} (bug thật) hoặc fix test (sai expectation)
222
222
 
223
- 📊 Living Docs: run /validate-traces (or /sync) to push this trace to the spec-module dashboard.
223
+ 📊 Living Docs: chạy /validate-traces (hoặc /sync) để push trace này lên dashboard spec-module.
224
224
  ```