@anhth2/spec-driven-dev-plugin 0.9.2 → 0.11.0

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 (223) hide show
  1. package/commands/debug.md +50 -20
  2. package/commands/define-product.md +49 -19
  3. package/commands/{generate-tests.md → dev-gen-test.md} +85 -23
  4. package/commands/{generate-tests.tmpl → dev-gen-test.tmpl} +18 -4
  5. package/{core/commands/run-tests.md → commands/dev-run-test.md} +102 -21
  6. package/commands/{run-tests.tmpl → dev-run-test.tmpl} +35 -2
  7. package/commands/{smoke-test.md → dev-smoke-test.md} +54 -24
  8. package/commands/{smoke-test.tmpl → dev-smoke-test.tmpl} +5 -5
  9. package/commands/fix-bug.md +50 -20
  10. package/commands/generate-bdd.md +78 -21
  11. package/commands/generate-bdd.tmpl +11 -2
  12. package/commands/generate-code.md +123 -23
  13. package/commands/generate-code.tmpl +56 -4
  14. package/commands/generate-design-spec.md +142 -47
  15. package/commands/generate-design-spec.tmpl +93 -28
  16. package/commands/generate-prd.md +49 -19
  17. package/commands/generate-spec-manifest.md +49 -19
  18. package/commands/generate-tech-docs.md +50 -20
  19. package/commands/generate-tech-docs.tmpl +1 -1
  20. package/commands/learn.md +50 -20
  21. package/commands/propose-scenario.md +50 -20
  22. package/commands/propose-scenario.tmpl +1 -1
  23. package/commands/qc-analyze.md +514 -0
  24. package/commands/qc-analyze.tmpl +71 -0
  25. package/commands/qc-design-test.md +510 -0
  26. package/commands/qc-design-test.tmpl +67 -0
  27. package/commands/qc-plan.md +492 -0
  28. package/commands/qc-plan.tmpl +49 -0
  29. package/commands/qc-report.md +491 -0
  30. package/commands/qc-report.tmpl +48 -0
  31. package/commands/qc-review.md +496 -0
  32. package/commands/qc-review.tmpl +53 -0
  33. package/commands/qc-run-test.md +538 -0
  34. package/commands/qc-run-test.tmpl +77 -0
  35. package/commands/refine-prd.md +203 -24
  36. package/commands/refine-prd.tmpl +16 -5
  37. package/commands/report-bug.md +49 -19
  38. package/commands/review-code.md +51 -21
  39. package/commands/review-code.tmpl +1 -1
  40. package/commands/review-context.md +198 -20
  41. package/commands/review-context.tmpl +11 -1
  42. package/commands/review-tech-docs.md +49 -19
  43. package/commands/setup-ai-first.md +14 -7
  44. package/commands/sync.md +30 -20
  45. package/commands/sync.tmpl +16 -13
  46. package/commands/update-framework.md +14 -7
  47. package/commands/validate-traces.md +106 -45
  48. package/commands/validate-traces.tmpl +57 -26
  49. package/core/FRAMEWORK_VERSION +1 -1
  50. package/core/commands/debug.md +50 -20
  51. package/core/commands/define-product.md +49 -19
  52. package/core/commands/{generate-tests.md → dev-gen-test.md} +85 -23
  53. package/{commands/run-tests.md → core/commands/dev-run-test.md} +102 -21
  54. package/core/commands/{smoke-test.md → dev-smoke-test.md} +54 -24
  55. package/core/commands/fix-bug.md +50 -20
  56. package/core/commands/generate-bdd.md +78 -21
  57. package/core/commands/generate-code.md +123 -23
  58. package/core/commands/generate-design-spec.md +142 -47
  59. package/core/commands/generate-prd.md +49 -19
  60. package/core/commands/generate-spec-manifest.md +49 -19
  61. package/core/commands/generate-tech-docs.md +50 -20
  62. package/core/commands/learn.md +50 -20
  63. package/core/commands/propose-scenario.md +50 -20
  64. package/core/commands/qc-analyze.md +514 -0
  65. package/core/commands/qc-design-test.md +510 -0
  66. package/core/commands/qc-plan.md +492 -0
  67. package/core/commands/qc-report.md +491 -0
  68. package/core/commands/qc-review.md +496 -0
  69. package/core/commands/qc-run-test.md +538 -0
  70. package/core/commands/refine-prd.md +203 -24
  71. package/core/commands/report-bug.md +49 -19
  72. package/core/commands/review-code.md +51 -21
  73. package/core/commands/review-context.md +198 -20
  74. package/core/commands/review-tech-docs.md +49 -19
  75. package/core/commands/setup-ai-first.md +14 -7
  76. package/core/commands/sync.md +30 -20
  77. package/core/commands/update-framework.md +14 -7
  78. package/core/commands/validate-traces.md +106 -45
  79. package/core/modules/qc-playwright/stack-profile.yaml +65 -0
  80. package/core/skills/code/SKILL.md +63 -26
  81. package/core/skills/debug/SKILL.md +78 -34
  82. package/core/skills/design-spec/SKILL.md +49 -19
  83. package/core/skills/discovery/SKILL.md +49 -19
  84. package/core/skills/prd/SKILL.md +28 -14
  85. package/core/skills/qc/qa-analyst/DOC_GAPS.template.md +63 -0
  86. package/core/skills/qc/qa-analyst/acceptance-criteria.md +56 -0
  87. package/core/skills/qc/qa-analyst/business-rules.md +55 -0
  88. package/core/skills/qc/qa-analyst/data-flow.md +60 -0
  89. package/core/skills/qc/qa-analyst/spec-breakdown.md +57 -0
  90. package/core/skills/qc/qa-designer/e2e/journey.md +41 -0
  91. package/core/skills/qc/qa-designer/exploratory/charter.md +68 -0
  92. package/core/skills/qc/qa-designer/exploratory/explore-to-functional.md +43 -0
  93. package/core/skills/qc/qa-designer/functional/api.md +45 -0
  94. package/core/skills/qc/qa-designer/functional/gui-feature.md +46 -0
  95. package/core/skills/qc/qa-designer/functional/gui-screen.md +52 -0
  96. package/core/skills/qc/qa-designer/integration/api.md +42 -0
  97. package/core/skills/qc/qa-designer/integration/db.md +39 -0
  98. package/core/skills/qc/qa-designer/integration/gui.md +40 -0
  99. package/core/skills/qc/qa-designer/integration/kafka.md +40 -0
  100. package/core/skills/qc/qa-designer/non-functional.md +40 -0
  101. package/core/skills/qc/qa-planner/test-plan.md +120 -0
  102. package/core/skills/qc/qa-reviewer/script/e2e.md +87 -0
  103. package/core/skills/qc/qa-reviewer/script/exploratory.md +45 -0
  104. package/core/skills/qc/qa-reviewer/script/functional.md +101 -0
  105. package/core/skills/qc/qa-reviewer/script/integration.md +91 -0
  106. package/core/skills/qc/qa-reviewer/script/non-functional.md +126 -0
  107. package/core/skills/qc/qa-reviewer/test-case/e2e.md +73 -0
  108. package/core/skills/qc/qa-reviewer/test-case/exploratory.md +43 -0
  109. package/core/skills/qc/qa-reviewer/test-case/functional.md +76 -0
  110. package/core/skills/qc/qa-reviewer/test-case/integration.md +69 -0
  111. package/core/skills/qc/qa-reviewer/test-case/non-functional.md +73 -0
  112. package/core/skills/qc/qa-runner/e2e.md +49 -0
  113. package/core/skills/qc/qa-runner/exploratory/session.md +36 -0
  114. package/core/skills/qc/qa-runner/functional/api.md +35 -0
  115. package/core/skills/qc/qa-runner/functional/gui-feature.md +51 -0
  116. package/core/skills/qc/qa-runner/functional/gui-screen.md +55 -0
  117. package/core/skills/qc/qa-runner/integration.md +47 -0
  118. package/core/skills/qc/qa-runner/non-functional.md +49 -0
  119. package/core/skills/qc/qa-runner/report/report.md +37 -0
  120. package/core/skills/setup-ai-first/SKILL.md +14 -7
  121. package/core/skills/spec/SKILL.md +28 -14
  122. package/core/skills/test/SKILL.md +121 -54
  123. package/core/steps/capture-lesson.md +1 -1
  124. package/core/steps/context-loader.md +35 -12
  125. package/core/steps/report-footer.md +14 -7
  126. package/core/steps/review-fanout.md +138 -0
  127. package/core/steps/spawn-agent.md +1 -1
  128. package/core/steps/trace-mirror.md +18 -0
  129. package/core/templates/design-spec.template.md +16 -8
  130. package/core/templates/project-context.yaml +8 -0
  131. package/docs/01-getting-started/README.md +19 -0
  132. package/docs/01-getting-started/core-concepts.md +102 -0
  133. package/docs/01-getting-started/installation.md +154 -0
  134. package/docs/01-getting-started/quickstart.md +85 -0
  135. package/docs/02-guides/README.md +27 -0
  136. package/docs/02-guides/developer/README.md +46 -0
  137. package/docs/02-guides/developer/bdd-and-trace.md +123 -0
  138. package/docs/02-guides/developer/commands.md +76 -0
  139. package/docs/02-guides/developer/pr-checklist.md +15 -0
  140. package/docs/02-guides/developer/scenarios.md +448 -0
  141. package/docs/02-guides/developer/workflow.md +59 -0
  142. package/docs/02-guides/product-owner/README.md +77 -0
  143. package/docs/02-guides/product-owner/commands.md +30 -0
  144. package/docs/02-guides/product-owner/handoff-checklist.md +42 -0
  145. package/docs/02-guides/product-owner/prd-writing-rules.md +45 -0
  146. package/docs/02-guides/product-owner/scenarios.md +357 -0
  147. package/docs/02-guides/qc-automation.md +92 -0
  148. package/docs/02-guides/tester/README.md +72 -0
  149. package/docs/02-guides/tester/bug-reporting.md +117 -0
  150. package/docs/02-guides/tester/reading-specs.md +79 -0
  151. package/docs/02-guides/tester/scenarios.md +186 -0
  152. package/docs/02-guides/tester/spec-manifest.md +124 -0
  153. package/docs/02-guides/tester/test-checklist.md +31 -0
  154. package/docs/02-guides/tester/workflow.md +79 -0
  155. package/docs/03-concepts/README.md +19 -0
  156. package/docs/03-concepts/architecture.md +243 -0
  157. package/docs/03-concepts/pipeline.md +249 -0
  158. package/docs/03-concepts/traceability.md +148 -0
  159. package/docs/04-operations/README.md +33 -0
  160. package/docs/04-operations/bug-flow.md +321 -0
  161. package/docs/04-operations/publishing.md +137 -0
  162. package/docs/04-operations/sync-and-update.md +328 -0
  163. package/docs/05-reference/README.md +29 -0
  164. package/docs/05-reference/commands.md +229 -0
  165. package/docs/05-reference/modules.md +110 -0
  166. package/docs/05-reference/trace-schema.md +146 -0
  167. package/docs/README.md +51 -0
  168. package/modules/qc-playwright/stack-profile.yaml +65 -0
  169. package/package.json +2 -2
  170. package/skills/code/SKILL.md +63 -26
  171. package/skills/debug/SKILL.md +78 -34
  172. package/skills/debug/SKILL.tmpl +1 -1
  173. package/skills/design-spec/SKILL.md +49 -19
  174. package/skills/discovery/SKILL.md +49 -19
  175. package/skills/prd/SKILL.md +28 -14
  176. package/skills/qc/qa-analyst/DOC_GAPS.template.md +63 -0
  177. package/skills/qc/qa-analyst/acceptance-criteria.md +56 -0
  178. package/skills/qc/qa-analyst/business-rules.md +55 -0
  179. package/skills/qc/qa-analyst/data-flow.md +60 -0
  180. package/skills/qc/qa-analyst/spec-breakdown.md +57 -0
  181. package/skills/qc/qa-designer/e2e/journey.md +41 -0
  182. package/skills/qc/qa-designer/exploratory/charter.md +68 -0
  183. package/skills/qc/qa-designer/exploratory/explore-to-functional.md +43 -0
  184. package/skills/qc/qa-designer/functional/api.md +45 -0
  185. package/skills/qc/qa-designer/functional/gui-feature.md +46 -0
  186. package/skills/qc/qa-designer/functional/gui-screen.md +52 -0
  187. package/skills/qc/qa-designer/integration/api.md +42 -0
  188. package/skills/qc/qa-designer/integration/db.md +39 -0
  189. package/skills/qc/qa-designer/integration/gui.md +40 -0
  190. package/skills/qc/qa-designer/integration/kafka.md +40 -0
  191. package/skills/qc/qa-designer/non-functional.md +40 -0
  192. package/skills/qc/qa-planner/test-plan.md +120 -0
  193. package/skills/qc/qa-reviewer/script/e2e.md +87 -0
  194. package/skills/qc/qa-reviewer/script/exploratory.md +45 -0
  195. package/skills/qc/qa-reviewer/script/functional.md +101 -0
  196. package/skills/qc/qa-reviewer/script/integration.md +91 -0
  197. package/skills/qc/qa-reviewer/script/non-functional.md +126 -0
  198. package/skills/qc/qa-reviewer/test-case/e2e.md +73 -0
  199. package/skills/qc/qa-reviewer/test-case/exploratory.md +43 -0
  200. package/skills/qc/qa-reviewer/test-case/functional.md +76 -0
  201. package/skills/qc/qa-reviewer/test-case/integration.md +69 -0
  202. package/skills/qc/qa-reviewer/test-case/non-functional.md +73 -0
  203. package/skills/qc/qa-runner/e2e.md +49 -0
  204. package/skills/qc/qa-runner/exploratory/session.md +36 -0
  205. package/skills/qc/qa-runner/functional/api.md +35 -0
  206. package/skills/qc/qa-runner/functional/gui-feature.md +51 -0
  207. package/skills/qc/qa-runner/functional/gui-screen.md +55 -0
  208. package/skills/qc/qa-runner/integration.md +47 -0
  209. package/skills/qc/qa-runner/non-functional.md +49 -0
  210. package/skills/qc/qa-runner/report/report.md +37 -0
  211. package/skills/setup-ai-first/SKILL.md +14 -7
  212. package/skills/spec/SKILL.md +28 -14
  213. package/skills/test/SKILL.md +121 -54
  214. package/skills/test/SKILL.tmpl +9 -9
  215. package/steps/capture-lesson.md +1 -1
  216. package/steps/context-loader.md +35 -12
  217. package/steps/report-footer.md +14 -7
  218. package/steps/review-fanout.md +138 -0
  219. package/steps/spawn-agent.md +1 -1
  220. package/steps/trace-mirror.md +18 -0
  221. package/templates/design-spec.template.md +16 -8
  222. package/templates/project-context.yaml +8 -0
  223. package/ARCHITECTURE.md +0 -247
@@ -0,0 +1,56 @@
1
+ ---
2
+ version: 1.0
3
+ updated: 2026-06-11
4
+ ported_from: ai-automation-qc-base
5
+ ---
6
+
7
+ # Acceptance Criteria — Sinh tiêu chí chấp nhận
8
+
9
+ Chuyển yêu cầu đã phân tích thành acceptance criteria (Given/When/Then) làm cơ sở thiết kế TC.
10
+
11
+ ## Khi nào trigger
12
+ - "viết acceptance criteria cho [X]" / "định nghĩa tiêu chí pass"
13
+ - Sau spec-breakdown + business-rules, là bước cuối của qa-analyst
14
+ - Cần điều kiện chấp nhận rõ ràng để qa-designer trace TC ngược về
15
+
16
+ ## Khi KHÔNG trigger
17
+ - Cần bóc tách spec → dùng spec-breakdown
18
+ - Cần thiết kế test case chi tiết (steps cụ thể) → dùng qa-designer
19
+ - Cần phân tích rủi ro → dùng qa-planner
20
+
21
+ ---
22
+
23
+ ## Phase 1 — Tổng hợp
24
+
25
+ Gom đầu vào từ spec-breakdown, business-rules, data-flow:
26
+ - Mỗi chức năng/luồng → một nhóm acceptance criteria.
27
+ - Mỗi business rule (BR-xx) → ít nhất một AC kiểm chứng.
28
+
29
+ ---
30
+
31
+ ## Phase 2 — Viết AC
32
+
33
+ Dùng format Given/When/Then, mỗi AC kiểm chứng MỘT điều:
34
+
35
+ ```
36
+ AC-01 (chức năng / BR-xx):
37
+ Given <tiền điều kiện>
38
+ When <hành động + dữ liệu cụ thể>
39
+ Then <kết quả mong đợi CỤ THỂ>
40
+ ```
41
+
42
+ Bắt buộc phủ:
43
+ - Happy path (điều kiện hợp lệ).
44
+ - Negative (vi phạm validation / authorization).
45
+ - Boundary (giá trị biên của giới hạn trong business-rules).
46
+ - Alternate flow (luồng phụ trong data-flow).
47
+
48
+ Mỗi AC gắn mã trace: chức năng + BR-xx để TC sau này map 1-1.
49
+
50
+ ---
51
+
52
+ ## Output
53
+
54
+ - Danh sách AC dạng Given/When/Then, có mã trace về chức năng và business rule.
55
+ - Bảng ma trận: BR / chức năng × AC để xác nhận không bỏ sót.
56
+ - Đây là đầu vào trực tiếp cho `qa-designer` (mỗi AC → ≥1 test case) và `qa-reviewer` (đối chiếu coverage).
@@ -0,0 +1,55 @@
1
+ ---
2
+ version: 1.0
3
+ updated: 2026-06-11
4
+ ported_from: ai-automation-qc-base
5
+ ---
6
+
7
+ # Business Rules — Trích xuất luật nghiệp vụ
8
+
9
+ Trích xuất và liệt kê toàn bộ business rule, điều kiện và ràng buộc từ yêu cầu.
10
+
11
+ ## Khi nào trigger
12
+ - "liệt kê business rule cho [X]" / "feature này có luật nghiệp vụ gì"
13
+ - Sau spec-breakdown, khi cần làm rõ logic điều kiện trước khi thiết kế TC
14
+ - Feature có nhiều điều kiện AND/OR, phân quyền, tính toán, giới hạn
15
+
16
+ ## Khi KHÔNG trigger
17
+ - Cần bóc tách tổng thể spec → dùng spec-breakdown
18
+ - Cần luồng dữ liệu → dùng data-flow
19
+ - Cần phân tích rủi ro / lập test plan → thuộc qa-planner (skill test-plan)
20
+
21
+ ---
22
+
23
+ ## Phase 1 — Quét
24
+
25
+ 1. Đọc spec đã bóc tách (output của spec-breakdown) hoặc tài liệu gốc.
26
+ 2. Quét tìm: điều kiện ("nếu… thì…"), ràng buộc field, giới hạn (min/max, rate limit),
27
+ quy tắc phân quyền, công thức tính, quy tắc trạng thái, default value.
28
+
29
+ ---
30
+
31
+ ## Phase 2 — Cấu trúc hoá
32
+
33
+ Mỗi rule ghi dưới dạng bảng:
34
+
35
+ | ID | Rule | Điều kiện | Kết quả | Nguồn | Ghi chú/Ưu tiên |
36
+ |---|---|---|---|---|---|
37
+ | BR-01 | … | … | … | spec §x | … |
38
+
39
+ Phân loại rule:
40
+ - VALIDATION: ràng buộc input (định dạng, bắt buộc, độ dài, range).
41
+ - AUTHORIZATION: ai được làm gì.
42
+ - CALCULATION: công thức, làm tròn, đơn vị.
43
+ - STATE: điều kiện chuyển trạng thái hợp lệ vs cấm.
44
+ - LIMIT: rate limit, quota, concurrent.
45
+
46
+ Với rule có nhiều điều kiện kết hợp → gợi ý dựng **Decision Table** (đầu vào cho qa-designer).
47
+
48
+ ---
49
+
50
+ ## Output
51
+
52
+ - Bảng business rule có ID (BR-xx) để TC trace ngược về.
53
+ - Rule MÂU THUẪN / KHÔNG RÕ → ghi vào `DOC_GAPS.md` (loại CONTRADICTORY / AMBIGUOUS,
54
+ cột "Ảnh hưởng" trỏ BR-xx) rồi ghi vào `DOC_GAPS.md`.
55
+ - Gợi ý các rule cần Decision Table / BVA khi sang qa-designer.
@@ -0,0 +1,60 @@
1
+ ---
2
+ version: 1.0
3
+ updated: 2026-06-11
4
+ ported_from: ai-automation-qc-base
5
+ ---
6
+
7
+ # Data Flow — Phân tích luồng dữ liệu
8
+
9
+ Phân tích luồng dữ liệu, input/output, state và điểm tích hợp của feature.
10
+
11
+ ## Khi nào trigger
12
+ - "phân tích data flow cho [X]" / "dữ liệu đi qua đâu"
13
+ - Feature có nhiều bước, qua nhiều màn hình/API/DB, hoặc tích hợp Kafka/service khác
14
+ - Cần xác định điểm tích hợp trước khi thiết kế integration/e2e TC
15
+
16
+ ## Khi KHÔNG trigger
17
+ - Chỉ cần bóc tách spec tổng quan → dùng spec-breakdown
18
+ - Chỉ cần luật nghiệp vụ → dùng business-rules
19
+ - Thiết kế integration TC → dùng qa-designer/integration
20
+
21
+ ---
22
+
23
+ ## Phase 1 — Lập bản đồ
24
+
25
+ Với mỗi luồng nghiệp vụ, xác định:
26
+ 1. ĐIỂM BẮT ĐẦU: actor/sự kiện kích hoạt + dữ liệu đầu vào.
27
+ 2. CÁC CHẶNG: UI → API → service → DB → message queue → service ngoài.
28
+ 3. BIẾN ĐỔI: dữ liệu được tạo/sửa/xoá/validate ở mỗi chặng.
29
+ 4. ĐIỂM KẾT THÚC: output, side-effect (email, notification, audit log).
30
+
31
+ ---
32
+
33
+ ## Phase 2 — Mô tả
34
+
35
+ Thể hiện luồng dạng bước tuần tự hoặc sơ đồ text:
36
+
37
+ ```
38
+ [User submit form]
39
+ → POST /api/... (payload: ...)
40
+ → Service validate (rule BR-xx)
41
+ → DB insert bảng X
42
+ → Kafka topic Y (event Z)
43
+ → UI hiển thị kết quả / trạng thái
44
+ ```
45
+
46
+ Đánh dấu cho mỗi chặng:
47
+ - INTEGRATION POINT (nơi cần integration test).
48
+ - STATE CHANGE (dữ liệu/trạng thái thay đổi → cần verify + cleanup).
49
+ - FAILURE POINT (nơi có thể lỗi: timeout, validation fail, partial commit).
50
+
51
+ ---
52
+
53
+ ## Output
54
+
55
+ - Sơ đồ/list luồng dữ liệu cho mỗi kịch bản chính.
56
+ - Danh sách integration point + state change + failure point.
57
+ - Chặng nào luồng/hành vi chưa rõ (vd lỗi xử lý ra sao, retry, partial commit) →
58
+ ghi vào `DOC_GAPS.md` (loại MISSING / OPEN QUESTION).
59
+ - Gợi ý loại test cần cho từng điểm (gui-feature / integration / e2e) khi sang qa-designer.
60
+ - Dữ liệu/trạng thái cần chuẩn bị & cleanup → đầu vào fixture cho qa-runner.
@@ -0,0 +1,57 @@
1
+ ---
2
+ version: 1.0
3
+ updated: 2026-06-11
4
+ ported_from: ai-automation-qc-base
5
+ ---
6
+
7
+ # Spec Breakdown — Bóc tách yêu cầu
8
+
9
+ Bóc tách spec/PRD/user story thô thành mô tả yêu cầu có cấu trúc cho QC.
10
+
11
+ ## Khi nào trigger
12
+ - "phân tích spec/PRD cho feature [X]" / "bóc tách yêu cầu"
13
+ - Nhận tài liệu thô (PRD, user story, mô tả Figma, email) cần làm rõ trước khi thiết kế TC
14
+ - Là bước ĐẦU TIÊN của pipeline, trước qa-planner
15
+
16
+ ## Khi KHÔNG trigger
17
+ - Cần phân tích rủi ro / what-if → dùng qa-planner
18
+ - Cần trích riêng business rule → dùng business-rules
19
+ - Cần thiết kế test case → dùng qa-designer
20
+
21
+ ---
22
+
23
+ ## Phase 1 — Thu thập
24
+
25
+ 1. Đọc toàn bộ tài liệu nguồn QC cung cấp (PRD, user story, mockup, ghi chú).
26
+ 2. **Bỏ qua văn bản gạch ngang (strikethrough)** — đó là nội dung đã huỷ, KHÔNG đưa
27
+ vào phân tích/BR/AC. Với file Confluence/HTML/MHTML: phát hiện qua thẻ `<s>`,
28
+ `<strike>`, `<del>` hoặc style `text-decoration: line-through`.
29
+ 3. Xác định: feature name, actor/role, mục tiêu nghiệp vụ, phạm vi (in/out scope).
30
+ 4. Đánh dấu phần MƠ HỒ / THIẾU → ghi vào `DOC_GAPS.md` (gap GAP-xx).
31
+
32
+ ---
33
+
34
+ ## Phase 2 — Bóc tách
35
+
36
+ Tách yêu cầu thành các khối:
37
+
38
+ A. TỔNG QUAN: mục tiêu, actor, giá trị nghiệp vụ.
39
+ B. CHỨC NĂNG: list từng chức năng (visible + ẩn + integration point).
40
+ C. INPUT/OUTPUT: mỗi chức năng có input gì, output gì, ràng buộc field.
41
+ D. TRẠNG THÁI & LUỒNG: các state, điều kiện chuyển, happy path + alternate flow.
42
+ E. PHỤ THUỘC: hệ thống/API/module liên quan.
43
+ F. GIẢ ĐỊNH & CÂU HỎI MỞ: điều suy ra được vs điều cần dev/BA xác nhận.
44
+
45
+ ---
46
+
47
+ ## Output
48
+
49
+ File Markdown mô tả yêu cầu có cấu trúc (đặt trong `docs/<project>/<feature>/`):
50
+ - Bảng chức năng + input/output/constraint
51
+ - Sơ đồ/list luồng chính & phụ
52
+ - Danh sách giả định và câu hỏi mở (đánh dấu rõ điều CHƯA chắc)
53
+
54
+ Đồng thời ghi mọi khoảng trống phát hiện vào `docs/<project>/<feature>/DOC_GAPS.md`
55
+ (theo `.claude/skills/qa-analyst/DOC_GAPS.template.md`), mỗi gap có ID `GAP-xx`.
56
+
57
+ Kết thúc bằng gợi ý: feature đã đủ rõ để chuyển sang `qa-planner` (phân tích rủi ro) chưa.
@@ -0,0 +1,41 @@
1
+ ---
2
+ version: 1.0
3
+ updated: 2026-06-11
4
+ ported_from: ai-automation-qc-base
5
+ ---
6
+
7
+ # Test Case — E2E Journey
8
+
9
+ Skill **tự chứa** để viết TC end-to-end: hành trình đầu→cuối xuyên nhiều màn/module
10
+ (mở → nhập → submit → verify tạo + định tuyến + đồng bộ + hiển thị). Chỉ cần load file này.
11
+
12
+ ## Khi nào trigger
13
+ - "viết E2E cho [feature]" / nở danh sách journey trong TEST_PLAN thành TC chi tiết đầu-cuối
14
+
15
+ ## Khi KHÔNG trigger
16
+ - Test 1 màn/field → `functional/*` · test riêng 1 điểm tích hợp → `integration/*`
17
+
18
+ ---
19
+
20
+ ## Format file TC (bắt buộc)
21
+ - Metadata **list**: Title · Feature · Priority · Status(Draft) · Author(AI) · Tags · **Trace** `[BR-xx](REQUIREMENT_ANALYSIS.md#3-business-rules)` (không có → `⚠️ Chưa có Business Rule`) · **🚫 Block** `[GAP-xx](DOC_GAPS.md)`.
22
+ - **Test Data** dạng list (tài khoản/role, dữ liệu lớp/buổi…) · **Steps** `[Action]`/`[Verify]` xuyên các màn ·
23
+ **Expected** 1 bullet = chuỗi verify point (tạo thành công, mã đúng, định tuyến đúng, đồng bộ đúng, hiển thị danh sách).
24
+ - ID journey `E2E-<FEATURE>-NN` · cuối file: Trace matrix + bảng TC block · bỏ nội dung gạch ngang.
25
+
26
+ ## Kỹ thuật áp dụng
27
+ - **Use Case/Scenario:** mỗi journey = main + alternate + exception flow.
28
+ - **Decision Table** để chọn journey đại diện cho mỗi nhánh của **trục bao phủ** (vd Đối tượng × Bộ phận xử lý × lớp/buổi × role × CRM).
29
+ - **Verify points chung** (V1…Vn) áp cho mọi journey · **end-to-end data** (nhập màn A → hiện đúng màn B/DB/hệ thống ngoài).
30
+
31
+ ## Phase 1 — Clarify
32
+ Lấy danh sách journey + trục bao phủ + verify points từ TEST_PLAN · mỗi journey: actor/role, tiền điều kiện
33
+ (data + tài khoản), bước chính, kết quả/định tuyến kỳ vọng · journey nào phụ thuộc gap Blocker.
34
+
35
+ ## Phase 2 — Write
36
+ Mỗi journey → 1 TC bám Format; Expected = chuỗi verify point; chuẩn bị tiền điều kiện & cleanup, mỗi journey độc lập.
37
+ **Journey phụ thuộc gap vẫn viết + 🚫 Block: GAP-xx**, định tuyến ghi "dự kiến theo BR". Trace BR.
38
+
39
+ ## Output
40
+ File TC e2e (hoặc nhóm E2E trong file feature) trong `docs/<project>/<feature>/`.
41
+ In bảng `E2E-ID | Journey | Pri | Trace | Block` + bảng TC block. Bàn giao `qa-reviewer`.
@@ -0,0 +1,68 @@
1
+ ---
2
+ version: 1.0
3
+ updated: 2026-06-11
4
+ ported_from: ai-automation-qc-base
5
+ ---
6
+
7
+ # Gen Test Charter — Exploratory
8
+
9
+ Sinh bộ test charter + SFDIPOT test ideas + What-If scenarios cho exploratory session.
10
+
11
+ ## Khi nào trigger
12
+ - "generate charter cho [Feature]" / "chuẩn bị exploratory session"
13
+ - Trước khi bắt đầu exploratory session
14
+ - Feature mới chưa ai khám phá, hoặc feature có risk cao
15
+
16
+ ## Khi KHÔNG trigger
17
+ - Cần sinh functional TC từ spec → dùng qa-designer-gui-screen / qa-designer-gui-feature
18
+ - Cần khám phá feature rồi CHUYỂN ĐỔI thành functional TC → dùng explore-to-functional
19
+ - Cần review charter đã viết → dùng qa-reviewer/test-case/exploratory
20
+
21
+ ---
22
+
23
+ ## Phase 1 — Clarify
24
+
25
+ Thu thập:
26
+ 1. Feature name + mô tả ngắn
27
+ 2. Tester level — junior / mid / senior (ảnh hưởng charter complexity)
28
+ 3. Time-box — 30 / 60 / 90 phút
29
+ 4. Môi trường — staging / production-like
30
+ 5. Đã có functional TC coverage chưa (nếu có → exploratory focus vào edge case NGOÀI spec)
31
+
32
+ ---
33
+
34
+ ## Phase 2 — Analyze
35
+
36
+ Áp dụng SFDIPOT 7 dimension:
37
+ S - Structure: thành phần/module/page liên quan
38
+ F - Function: chức năng chính + phụ + ẩn
39
+ D - Data: edge data, boundary, empty, max, special chars
40
+ I - Interface: UI, API, integration point
41
+ P - Platform: browser, OS, device, network
42
+ O - Operations: ai dùng, khi nào, tần suất
43
+ T - Time: timeout, expiry, concurrent, timezone
44
+
45
+ Với mỗi dimension: 3-5 test idea CỤ THỂ.
46
+
47
+ Brainstorm 15-20 "What If" scenarios bất thường:
48
+ double click, network drop, 2 tab, back button, idle 2h, emoji input, device rotate...
49
+
50
+ ---
51
+
52
+ ## Phase 3 — Write
53
+
54
+ Sinh 3-5 charter, mỗi charter gồm:
55
+ - Format: "Explore <target> With <resource> To discover <information>"
56
+ - Whittaker Tour phù hợp (Money/FedEx/Saboteur/Couch Potato/Intellectual/...)
57
+ - Risk level: HIGH / MEDIUM / LOW
58
+ - Time-box: 30 / 60 / 90 phút
59
+
60
+ Sinh 10-15 câu hỏi cho dev/BA (assumptions, edge case, error handling, security)
61
+
62
+ ---
63
+
64
+ ## Output
65
+
66
+ Charter files: docs/<project>/exploratory/charters/<feature>_01.md, _02.md...
67
+ Ideas file: docs/<project>/exploratory/ideas/<feature>.md
68
+ Bảng tổng kết: STT | Charter | Tour | Risk | Time-box
@@ -0,0 +1,43 @@
1
+ ---
2
+ version: 1.0
3
+ updated: 2026-06-11
4
+ ported_from: ai-automation-qc-base
5
+ ---
6
+
7
+ # Explore-to-Functional Pipeline
8
+
9
+ Skill **tự chứa**: khám phá feature (chưa/thiếu spec) → draft TC → QC review → feed
10
+ requirement → chuyển thành functional TC chính thức. Chỉ cần load file này.
11
+
12
+ ## Khi nào trigger
13
+ - Feature KHÔNG có tài liệu/spec (legacy, take-over) hoặc spec mơ hồ/thiếu
14
+ - Cần bootstrap bộ TC nhanh cho hệ thống đang chạy · "khám phá [X] rồi tạo TC"
15
+
16
+ ## Khi KHÔNG trigger
17
+ - Feature có spec rõ → `functional/gui-screen`/`gui-feature` trực tiếp
18
+ - Chỉ cần charter cho session → `exploratory/charter`
19
+
20
+ ---
21
+
22
+ ## Phase 1 — Explore (AI tự chạy)
23
+ Dựa trên mô tả feature: list TẤT CẢ chức năng (visible + ẩn + integration point) · mỗi chức năng
24
+ identify input/output/state/side-effect · sinh DRAFT TC (1 happy + 2–3 edge mỗi chức năng) ·
25
+ "what if" mỗi chức năng · list chức năng liên quan QC chưa nêu. → ĐỢI QC phản hồi.
26
+
27
+ ## Phase 2 — QC Review + Bổ sung
28
+ Đợi QC confirm đúng/sai, thêm business edge case, cung cấp context → sửa → draft v2. → ĐỢI QC confirm/paste requirement.
29
+
30
+ ## Phase 3 — Feed Requirement (nếu có)
31
+ So requirement vs draft: requirement chưa phủ → thêm TC · TC sai logic → sửa expected · thêm Trace BR ·
32
+ chỉnh Priority theo business. Không có requirement → giữ draft Phase 2.
33
+
34
+ ## Phase 4 — Convert to Functional (format chuẩn)
35
+ Chuyển draft → TC chính thức bám **format file `TC_<FEATURE>.md`**:
36
+ - Metadata **list**: Title · Feature · Priority(P0/P1/P2) · Status(Draft) · Author(AI) · Tags ·
37
+ **Trace** `[BR-xx](REQUIREMENT_ANALYSIS.md#3-business-rules)` (không có BR → `⚠️ Chưa có Business Rule`) · **🚫 Block** `[GAP-xx]` nếu chặn.
38
+ - **Test Data** dạng list · **Steps** `[Action]`/`[Verify]` · **Expected** 1 bullet cụ thể.
39
+ - Phân nhóm GUI/Functional · cuối file: Trace matrix + bảng TC block · bỏ nội dung gạch ngang.
40
+ - Đặt file `docs/<project>/<feature>/TC_<FEATURE>.md`.
41
+
42
+ ## Output
43
+ File TC functional + bảng `TC_ID | Title | Priority | Technique | Trace`. Bàn giao `qa-reviewer`.
@@ -0,0 +1,45 @@
1
+ ---
2
+ version: 1.0
3
+ updated: 2026-06-11
4
+ ported_from: ai-automation-qc-base
5
+ ---
6
+
7
+ # Test Case — Functional API (không qua UI)
8
+
9
+ Skill **tự chứa** để viết TC kiểm thử một API endpoint ở mức chức năng (request → response).
10
+ Chỉ cần load file này.
11
+
12
+ ## Khi nào trigger
13
+ - "viết test case cho API [method] [path]" — verify contract, validation, mã lỗi của endpoint
14
+
15
+ ## Khi KHÔNG trigger
16
+ - Test qua giao diện → `functional/gui-screen`/`gui-feature`
17
+ - Luồng dữ liệu API ↔ DB/service khác → `integration/api` · message/event → `integration/kafka`
18
+
19
+ ---
20
+
21
+ ## Format file `TC_<FEATURE>.md` (bắt buộc)
22
+ - 1 file/feature · mỗi TC **1 concept** · metadata **list** (không bảng/emoji): Title · Feature ·
23
+ Priority(P0/P1/P2) · Status(Draft) · Author(AI) · Tags · Trace · 🚫 Block(nếu có).
24
+ - **Trace:** `[BR-xx](REQUIREMENT_ANALYSIS.md#3-business-rules)`; không có BR → `⚠️ Chưa có Business Rule`.
25
+ - **🚫 Block:** TC phụ thuộc gap vẫn viết đủ + `[GAP-xx](DOC_GAPS.md) — lý do`.
26
+ - **Test Data:** dạng **list** (request cụ thể: method/path/headers/body). **Steps:** `[Action]`/`[Verify]`.
27
+ **Expected:** 1 bullet nêu rõ **status code + field response cần chốt** (không ✅/❌).
28
+ - Cuối file: **Trace matrix** (BR↔TC, ⚠️ TC thiếu BR) + **bảng TC bị block** · bỏ nội dung gạch ngang.
29
+
30
+ ## Kỹ thuật áp dụng
31
+ - Mỗi field request → **EP** (phân vùng valid/invalid) + **BVA** (biên độ dài/giá trị).
32
+ - Tổ hợp điều kiện (auth × param × state) → **Decision Table**.
33
+
34
+ ## Phase 1 — Clarify
35
+ Endpoint (method/path/auth/role/content-type) · request (path/query/body schema: field, kiểu, bắt buộc, ràng buộc) ·
36
+ response (schema thành công + các mã lỗi 4xx/5xx + body lỗi) · side-effect (nếu cần verify → cân nhắc `integration/api`).
37
+
38
+ ## Phase 2 — Write
39
+ - Nhóm TC: happy (200 + schema đúng) → validation (400 từng field, dùng EP/BVA) → auth (401/403)
40
+ → not found (404) → edge (payload lớn, ký tự đặc biệt, rate limit).
41
+ - Mỗi TC bám khối Format; Expected ghi status code + phần body verify; trace BR; gap chặn → 🚫 Block.
42
+
43
+ ## Output
44
+ File TC (`TC_<FEATURE>_API.md` hoặc gộp trong file feature) trong `docs/<project>/<feature>/`.
45
+ In bảng TC + Trace matrix. Bàn giao `qa-reviewer`.
@@ -0,0 +1,46 @@
1
+ ---
2
+ version: 1.0
3
+ updated: 2026-06-11
4
+ ported_from: ai-automation-qc-base
5
+ ---
6
+
7
+ # Test Case — Functional GUI Feature (đa màn hình)
8
+
9
+ Skill **tự chứa** để viết TC functional cho feature có luồng span ≥ 2 màn hình
10
+ (wizard, master-detail, popup→list). Chỉ cần load file này.
11
+
12
+ ## Khi nào trigger
13
+ - "viết test case cho feature [X]" mà flow đi qua nhiều màn/route, truyền state giữa bước
14
+
15
+ ## Khi KHÔNG trigger
16
+ - Gọn trong 1 màn → `functional/gui-screen` · API thuần → `functional/api`
17
+ - Hành trình nghiệp vụ đầu-cuối + đồng bộ hệ thống → `e2e/journey`
18
+
19
+ ---
20
+
21
+ ## Format file `TC_<FEATURE>.md` (bắt buộc)
22
+ - 1 file/feature · mỗi TC **1 concept** · metadata **list** (không bảng/emoji): Title · Feature ·
23
+ Priority(P0/P1/P2) · Status(Draft) · Author(AI) · Tags · Trace · 🚫 Block(nếu có).
24
+ - **Trace:** `[BR-xx](REQUIREMENT_ANALYSIS.md#3-business-rules)`; không có BR → `⚠️ Chưa có Business Rule`.
25
+ - **🚫 Block:** TC phụ thuộc gap vẫn viết đủ + `[GAP-xx](DOC_GAPS.md) — lý do`.
26
+ - **Test Data:** dạng **list** (không bảng). **Steps:** `[Action]`/`[Verify]`, không `*Expected:*`/bước. **Expected:** 1 bullet cụ thể.
27
+ - Cuối file: **Trace matrix** (BR↔TC, ⚠️ TC thiếu BR) + **bảng TC bị block** · không `#### Python Test Mapping` · bỏ nội dung gạch ngang.
28
+
29
+ ## Kỹ thuật áp dụng
30
+ - **Use Case** cho flow tổng: main (P0) → alternate (P1) → exception (negative).
31
+ - **Decision Table** cho điểm rẽ nhánh (điều kiện qua bước/nhảy màn).
32
+ - **State Transition** nếu có trạng thái xuyên bước (draft→submitted…).
33
+ - **EP/BVA** cho field trên từng màn.
34
+
35
+ ## Phase 1 — Clarify
36
+ Liệt kê các màn/route + thứ tự điều hướng · state/dữ liệu truyền giữa màn (giữ/reset khi back) ·
37
+ điểm rẽ nhánh · platform · CRUD scope · cleanup.
38
+
39
+ ## Phase 2 — Write
40
+ - Nhóm TC: GUI từng màn → **điều hướng** (forward/back/giữ-reset state, deep-link) → happy path xuyên flow → negative.
41
+ - Đặc biệt phủ: back có mất dữ liệu không, dữ liệu bắt buộc để qua bước sau, hủy giữa flow.
42
+ - Mỗi TC bám khối Format; trace BR; gap chặn → 🚫 Block.
43
+
44
+ ## Output
45
+ File `TC_<FEATURE>.md` trong `docs/<project>/<feature>/`. In bảng TC + Trace matrix + bảng TC block.
46
+ Bàn giao `qa-reviewer` (test-case).
@@ -0,0 +1,52 @@
1
+ ---
2
+ version: 1.0
3
+ updated: 2026-06-11
4
+ ported_from: ai-automation-qc-base
5
+ ---
6
+
7
+ # Test Case — Functional GUI Screen (1 màn hình)
8
+
9
+ Skill **tự chứa** để viết TC functional cho 1 màn hình đơn lẻ (web/mobile). Chỉ cần load file này.
10
+
11
+ ## Khi nào trigger
12
+ - "viết test case cho màn hình [X]" — feature gọn trong 1 screen (1 page web / 1 Activity/VC)
13
+
14
+ ## Khi KHÔNG trigger
15
+ - Flow span ≥ 2 màn → `functional/gui-feature`
16
+ - API không qua UI → `functional/api`
17
+ - Tích hợp 2+ module → `integration/*` · hành trình đầu-cuối → `e2e/journey`
18
+
19
+ ---
20
+
21
+ ## Format file `TC_<FEATURE>.md` (bắt buộc)
22
+ - 1 file/feature · mỗi TC **1 concept** · metadata **list** (mỗi trường 1 dòng, không bảng/emoji):
23
+ Title · Feature · Priority(P0/P1/P2) · Status(Draft) · Author(AI) · Tags · Trace · 🚫 Block(nếu có).
24
+ - **Trace:** `[BR-xx](REQUIREMENT_ANALYSIS.md#3-business-rules)`; TC không có BR → `⚠️ Chưa có Business Rule`.
25
+ - **🚫 Block:** TC phụ thuộc gap **vẫn viết đủ** + `[GAP-xx](DOC_GAPS.md) — lý do`; chưa chạy tới khi gap Answered.
26
+ - **Test Data:** dạng **list** (`- **Trường:** giá trị`), không bảng.
27
+ - **Test Steps:** `**[Action]**` / `**[Verify]**`, KHÔNG `- *Expected:*` sau bước. **Expected:** 1 bullet cụ thể (không ✅/❌).
28
+ - Phân nhóm GUI/Functional · cuối file: **Trace matrix** (BR↔TC, ⚠️ TC thiếu BR) + **bảng TC bị block** · KHÔNG `#### Python Test Mapping` · bỏ nội dung gạch ngang.
29
+
30
+ ## Kỹ thuật áp dụng
31
+ - Field có ràng buộc (độ dài/số/ngày) → **EP** (mỗi phân vùng 1 TC, tag `ep`) + **BVA** (4 TC min−1/min/max/max+1, tag `bva`).
32
+ - Logic nhiều điều kiện / cascade dropdown / permission → **Decision Table** (mỗi rule = 1 TC).
33
+ - Element/đối tượng có trạng thái enabled/disabled, vòng đời → **State Transition** (chuyển đổi hợp lệ + cấm).
34
+ - Luồng thao tác trên màn → **Use Case** (main P0 → alternate P1 → exception negative).
35
+
36
+ ## Phase 1 — Clarify
37
+ Platform (web Playwright/mobile) · screen+route · domain (form-crud/listing/auth/settings) · CRUD scope ·
38
+ mutating actions OK? · cleanup policy. Thiếu → hỏi trước khi viết.
39
+
40
+ ## Phase 2 — Explore
41
+ Dump element: buttons, inputs, dropdowns, table headers, modal states. Mỗi element →
42
+ chức năng (input/action/display/nav) · constraint (required/min-max/format/enabled) · state change · câu hỏi "what if".
43
+
44
+ ## Phase 3 — Write
45
+ - **Nhóm 1 GUI:** title → buttons → inputs → date picker → dropdowns → bảng (header→row count→checkbox→từng cột) → pagination.
46
+ - **Nhóm 2 Functional:** filter (đơn→combined) → search → reset → pagination → data integrity → actions → negative.
47
+ - Phủ implicit: rate limit, concurrent, session, empty state, max data, special chars.
48
+ - Mỗi TC bám khối Format trên; trace BR; TC chặn bởi gap → 🚫 Block.
49
+
50
+ ## Output
51
+ File `TC_<FEATURE>.md` trong `docs/<project>/<feature>/`. In bảng `TC_ID | Title | Priority | Tags | Trace`
52
+ + Trace matrix + bảng TC block. Bàn giao `qa-reviewer` (test-case).
@@ -0,0 +1,42 @@
1
+ ---
2
+ version: 1.0
3
+ updated: 2026-06-11
4
+ ported_from: ai-automation-qc-base
5
+ ---
6
+
7
+ # Test Case — Integration API
8
+
9
+ Skill **tự chứa** để viết TC tích hợp qua API: caller → API → service/DB/hệ thống ngoài,
10
+ verify luồng dữ liệu & contract giữa các thành phần. Chỉ cần load file này.
11
+
12
+ ## Khi nào trigger
13
+ - Test điểm tích hợp API ↔ service backend / hệ thống ngoài (vd LMS ↔ CRM)
14
+ - Verify dữ liệu sau gọi API lan tới chặng tiếp (DB/event)
15
+
16
+ ## Khi KHÔNG trigger
17
+ - Chỉ verify request/response 1 endpoint → `functional/api`
18
+ - Verify riêng trạng thái DB → `integration/db` · message/event → `integration/kafka`
19
+
20
+ ---
21
+
22
+ ## Format file TC (bắt buộc)
23
+ - Metadata **list**: Title · Feature · Priority · Status(Draft) · Author(AI) · Tags · **Trace** `[BR-xx](REQUIREMENT_ANALYSIS.md#3-business-rules)` (không có → `⚠️ Chưa có Business Rule`) · **🚫 Block** `[GAP-xx](DOC_GAPS.md)` (TC chặn vẫn viết đủ).
24
+ - **Test Data** dạng list · **Steps** `[Action]`/`[Verify]` · **Expected** 1 bullet nêu rõ chặng verify (response/bản ghi/event).
25
+ - Cuối file: Trace matrix + bảng TC block · bỏ nội dung gạch ngang.
26
+
27
+ ## Kỹ thuật áp dụng
28
+ - **Interface/Contract:** verify schema request/response giữa caller↔callee.
29
+ - **Data flow verification:** theo sơ đồ data flow, mỗi chặng verify dữ liệu biến đổi đúng.
30
+ - **Decision Table** khi định tuyến/đồng bộ phụ thuộc nhiều điều kiện.
31
+ - **Error/Retry/Timeout/Concurrency:** failure point, thao tác đồng thời (sinh số không trùng).
32
+
33
+ ## Phase 1 — Clarify
34
+ Chuỗi tích hợp (caller→API→service/DB/API ngoài) · contract mỗi interface · điều kiện định tuyến/đồng bộ
35
+ (vd điều kiện đổ CRM) · failure point (timeout, lỗi service ngoài, partial commit).
36
+
37
+ ## Phase 2 — Write
38
+ Nhóm TC: happy (dữ liệu đúng đầu→cuối) → contract negative (input sai → mã lỗi đúng) → failure/timeout/retry
39
+ → concurrency → điều kiện đồng bộ (đổ/không đổ). Mỗi TC bám Format; trace BR; gap chặn → 🚫 Block.
40
+
41
+ ## Output
42
+ File TC integration trong `docs/<project>/<feature>/`. Ưu tiên P0 cho định tuyến & tiền-dữ liệu. Bàn giao `qa-reviewer`.
@@ -0,0 +1,39 @@
1
+ ---
2
+ version: 1.0
3
+ updated: 2026-06-11
4
+ ported_from: ai-automation-qc-base
5
+ ---
6
+
7
+ # Test Case — Integration DB
8
+
9
+ Skill **tự chứa** để viết TC verify **trạng thái dữ liệu trong DB** sau action:
10
+ insert/update/soft-delete đúng giá trị, side-effect, toàn vẹn. Chỉ cần load file này.
11
+
12
+ ## Khi nào trigger
13
+ - Kiểm tra bản ghi DB sau thao tác (tạo ticket → ghi đúng bảng/cột); soft-delete, default, audit log
14
+
15
+ ## Khi KHÔNG trigger
16
+ - Chỉ verify response API → `functional/api`/`integration/api` · message/event → `integration/kafka`
17
+
18
+ ---
19
+
20
+ ## Format file TC (bắt buộc)
21
+ - Metadata **list**: Title · Feature · Priority · Status(Draft) · Author(AI) · Tags · **Trace** `[BR-xx](REQUIREMENT_ANALYSIS.md#3-business-rules)` (không có → `⚠️ Chưa có Business Rule`) · **🚫 Block** `[GAP-xx](DOC_GAPS.md)`.
22
+ - **Test Data** dạng list (giá trị input) · **Steps** `[Action]`/`[Verify]` · **Expected** 1 bullet nêu rõ **bảng.cột = giá trị**.
23
+ - Cuối file: Trace matrix + bảng TC block · bỏ nội dung gạch ngang.
24
+
25
+ ## Kỹ thuật áp dụng
26
+ - **State/DB verification:** verify bản ghi sau action (giá trị từng cột, flag, timestamp).
27
+ - **Data flow:** dữ liệu từ input lan tới DB đúng. **Decision Table** nếu ghi phụ thuộc điều kiện.
28
+
29
+ ## Phase 1 — Clarify
30
+ Bảng & cột bị ảnh hưởng + giá trị kỳ vọng · loại thao tác (insert/update/soft-delete/cascade) ·
31
+ side-effect (audit log, timestamp, người tạo/sửa) · cleanup/rollback dữ liệu test.
32
+
33
+ ## Phase 2 — Write
34
+ Nhóm TC: ghi đúng giá trị (happy) → default/null đúng → update không đụng cột khác → soft-delete (flag đúng)
35
+ → audit log → ràng buộc/unique (negative). Mỗi TC bám Format; trace BR; gap chặn → 🚫 Block.
36
+
37
+ ## Output
38
+ File TC trong `docs/<project>/<feature>/`. Ghi rõ query kiểm tra DB + yêu cầu cleanup;
39
+ không hardcode ID, chuẩn bị/dọn data qua fixture. Bàn giao `qa-reviewer`.
@@ -0,0 +1,40 @@
1
+ ---
2
+ version: 1.0
3
+ updated: 2026-06-11
4
+ ported_from: ai-automation-qc-base
5
+ ---
6
+
7
+ # Test Case — Integration GUI ↔ Backend
8
+
9
+ Skill **tự chứa** để viết TC tích hợp UI ↔ backend: UI gọi API đúng, render đúng kết quả/
10
+ lỗi từ server, đồng bộ trạng thái hai chiều. Chỉ cần load file này.
11
+
12
+ ## Khi nào trigger
13
+ - UI phản ánh đúng dữ liệu/lỗi backend (lookup, list, validate server-side); UI gọi đúng API + xử lý response
14
+
15
+ ## Khi KHÔNG trigger
16
+ - Chỉ test layout/element tĩnh 1 màn → `functional/gui-screen`
17
+ - Chỉ test API không qua UI → `functional/api`/`integration/api`
18
+
19
+ ---
20
+
21
+ ## Format file TC (bắt buộc)
22
+ - Metadata **list**: Title · Feature · Priority · Status(Draft) · Author(AI) · Tags · **Trace** `[BR-xx](REQUIREMENT_ANALYSIS.md#3-business-rules)` (không có → `⚠️ Chưa có Business Rule`) · **🚫 Block** `[GAP-xx](DOC_GAPS.md)`.
23
+ - **Test Data** dạng list · **Steps** `[Action]`/`[Verify]` · **Expected** 1 bullet (API liên quan + biểu hiện UI kỳ vọng).
24
+ - Cuối file: Trace matrix + bảng TC block · bỏ nội dung gạch ngang.
25
+
26
+ ## Kỹ thuật áp dụng
27
+ - **Data flow UI→API→UI:** verify request gửi đúng + render response đúng.
28
+ - **Error handling:** lỗi server (4xx/5xx) → message UI đúng. **State:** loading/empty/error.
29
+
30
+ ## Phase 1 — Clarify
31
+ Điểm UI gọi backend (action→API) · mapping response→hiển thị (list/dropdown/message) ·
32
+ trạng thái loading/empty/error · debounce/cancel khi đổi input.
33
+
34
+ ## Phase 2 — Write
35
+ Nhóm TC: UI render đúng dữ liệu backend (happy) → empty state → lỗi server → message đúng → loading state
36
+ → đổi input reset/cancel request → đồng bộ sau action (tạo xong → list cập nhật). Locator ưu tiên data-testid/role.
37
+ Mỗi TC bám Format; trace BR; gap chặn → 🚫 Block.
38
+
39
+ ## Output
40
+ File TC trong `docs/<project>/<feature>/`. Mỗi TC nêu API liên quan + biểu hiện UI. Bàn giao `qa-reviewer`.