@anhth2/spec-driven-dev-plugin 0.10.0 → 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 (203) hide show
  1. package/commands/debug.md +38 -8
  2. package/commands/define-product.md +38 -8
  3. package/commands/dev-gen-test.md +39 -9
  4. package/commands/dev-gen-test.tmpl +1 -1
  5. package/commands/dev-run-test.md +43 -10
  6. package/commands/dev-run-test.tmpl +5 -2
  7. package/commands/dev-smoke-test.md +38 -8
  8. package/commands/fix-bug.md +38 -8
  9. package/commands/generate-bdd.md +42 -10
  10. package/commands/generate-bdd.tmpl +4 -2
  11. package/commands/generate-code.md +39 -9
  12. package/commands/generate-code.tmpl +1 -1
  13. package/commands/generate-design-spec.md +38 -8
  14. package/commands/generate-prd.md +38 -8
  15. package/commands/generate-spec-manifest.md +38 -8
  16. package/commands/generate-tech-docs.md +38 -8
  17. package/commands/learn.md +38 -8
  18. package/commands/propose-scenario.md +38 -8
  19. package/commands/qc-analyze.md +514 -0
  20. package/commands/qc-analyze.tmpl +71 -0
  21. package/commands/qc-design-test.md +510 -0
  22. package/commands/qc-design-test.tmpl +67 -0
  23. package/commands/qc-plan.md +492 -0
  24. package/commands/qc-plan.tmpl +49 -0
  25. package/commands/qc-report.md +491 -0
  26. package/commands/qc-report.tmpl +48 -0
  27. package/commands/qc-review.md +496 -0
  28. package/commands/qc-review.tmpl +53 -0
  29. package/commands/qc-run-test.md +538 -0
  30. package/commands/qc-run-test.tmpl +77 -0
  31. package/commands/refine-prd.md +38 -8
  32. package/commands/report-bug.md +38 -8
  33. package/commands/review-code.md +38 -8
  34. package/commands/review-context.md +38 -8
  35. package/commands/review-tech-docs.md +38 -8
  36. package/commands/setup-ai-first.md +7 -0
  37. package/commands/sync.md +7 -0
  38. package/commands/update-framework.md +7 -0
  39. package/commands/validate-traces.md +54 -12
  40. package/commands/validate-traces.tmpl +16 -4
  41. package/core/FRAMEWORK_VERSION +1 -1
  42. package/core/commands/debug.md +38 -8
  43. package/core/commands/define-product.md +38 -8
  44. package/core/commands/dev-gen-test.md +39 -9
  45. package/core/commands/dev-run-test.md +43 -10
  46. package/core/commands/dev-smoke-test.md +38 -8
  47. package/core/commands/fix-bug.md +38 -8
  48. package/core/commands/generate-bdd.md +42 -10
  49. package/core/commands/generate-code.md +39 -9
  50. package/core/commands/generate-design-spec.md +38 -8
  51. package/core/commands/generate-prd.md +38 -8
  52. package/core/commands/generate-spec-manifest.md +38 -8
  53. package/core/commands/generate-tech-docs.md +38 -8
  54. package/core/commands/learn.md +38 -8
  55. package/core/commands/propose-scenario.md +38 -8
  56. package/core/commands/qc-analyze.md +514 -0
  57. package/core/commands/qc-design-test.md +510 -0
  58. package/core/commands/qc-plan.md +492 -0
  59. package/core/commands/qc-report.md +491 -0
  60. package/core/commands/qc-review.md +496 -0
  61. package/core/commands/qc-run-test.md +538 -0
  62. package/core/commands/refine-prd.md +38 -8
  63. package/core/commands/report-bug.md +38 -8
  64. package/core/commands/review-code.md +38 -8
  65. package/core/commands/review-context.md +38 -8
  66. package/core/commands/review-tech-docs.md +38 -8
  67. package/core/commands/setup-ai-first.md +7 -0
  68. package/core/commands/sync.md +7 -0
  69. package/core/commands/update-framework.md +7 -0
  70. package/core/commands/validate-traces.md +54 -12
  71. package/core/modules/qc-playwright/stack-profile.yaml +65 -0
  72. package/core/skills/code/SKILL.md +45 -8
  73. package/core/skills/debug/SKILL.md +52 -8
  74. package/core/skills/design-spec/SKILL.md +38 -8
  75. package/core/skills/discovery/SKILL.md +38 -8
  76. package/core/skills/prd/SKILL.md +14 -0
  77. package/core/skills/qc/qa-analyst/DOC_GAPS.template.md +63 -0
  78. package/core/skills/qc/qa-analyst/acceptance-criteria.md +56 -0
  79. package/core/skills/qc/qa-analyst/business-rules.md +55 -0
  80. package/core/skills/qc/qa-analyst/data-flow.md +60 -0
  81. package/core/skills/qc/qa-analyst/spec-breakdown.md +57 -0
  82. package/core/skills/qc/qa-designer/e2e/journey.md +41 -0
  83. package/core/skills/qc/qa-designer/exploratory/charter.md +68 -0
  84. package/core/skills/qc/qa-designer/exploratory/explore-to-functional.md +43 -0
  85. package/core/skills/qc/qa-designer/functional/api.md +45 -0
  86. package/core/skills/qc/qa-designer/functional/gui-feature.md +46 -0
  87. package/core/skills/qc/qa-designer/functional/gui-screen.md +52 -0
  88. package/core/skills/qc/qa-designer/integration/api.md +42 -0
  89. package/core/skills/qc/qa-designer/integration/db.md +39 -0
  90. package/core/skills/qc/qa-designer/integration/gui.md +40 -0
  91. package/core/skills/qc/qa-designer/integration/kafka.md +40 -0
  92. package/core/skills/qc/qa-designer/non-functional.md +40 -0
  93. package/core/skills/qc/qa-planner/test-plan.md +120 -0
  94. package/core/skills/qc/qa-reviewer/script/e2e.md +87 -0
  95. package/core/skills/qc/qa-reviewer/script/exploratory.md +45 -0
  96. package/core/skills/qc/qa-reviewer/script/functional.md +101 -0
  97. package/core/skills/qc/qa-reviewer/script/integration.md +91 -0
  98. package/core/skills/qc/qa-reviewer/script/non-functional.md +126 -0
  99. package/core/skills/qc/qa-reviewer/test-case/e2e.md +73 -0
  100. package/core/skills/qc/qa-reviewer/test-case/exploratory.md +43 -0
  101. package/core/skills/qc/qa-reviewer/test-case/functional.md +76 -0
  102. package/core/skills/qc/qa-reviewer/test-case/integration.md +69 -0
  103. package/core/skills/qc/qa-reviewer/test-case/non-functional.md +73 -0
  104. package/core/skills/qc/qa-runner/e2e.md +49 -0
  105. package/core/skills/qc/qa-runner/exploratory/session.md +36 -0
  106. package/core/skills/qc/qa-runner/functional/api.md +35 -0
  107. package/core/skills/qc/qa-runner/functional/gui-feature.md +51 -0
  108. package/core/skills/qc/qa-runner/functional/gui-screen.md +55 -0
  109. package/core/skills/qc/qa-runner/integration.md +47 -0
  110. package/core/skills/qc/qa-runner/non-functional.md +49 -0
  111. package/core/skills/qc/qa-runner/report/report.md +37 -0
  112. package/core/skills/setup-ai-first/SKILL.md +7 -0
  113. package/core/skills/spec/SKILL.md +14 -0
  114. package/core/skills/test/SKILL.md +83 -16
  115. package/core/steps/context-loader.md +31 -8
  116. package/core/steps/report-footer.md +7 -0
  117. package/core/templates/project-context.yaml +8 -0
  118. package/docs/01-getting-started/README.md +19 -0
  119. package/docs/01-getting-started/core-concepts.md +102 -0
  120. package/docs/01-getting-started/installation.md +154 -0
  121. package/docs/01-getting-started/quickstart.md +85 -0
  122. package/docs/02-guides/README.md +27 -0
  123. package/docs/02-guides/developer/README.md +46 -0
  124. package/docs/02-guides/developer/bdd-and-trace.md +123 -0
  125. package/docs/02-guides/developer/commands.md +76 -0
  126. package/docs/02-guides/developer/pr-checklist.md +15 -0
  127. package/docs/02-guides/developer/scenarios.md +448 -0
  128. package/docs/02-guides/developer/workflow.md +59 -0
  129. package/docs/02-guides/product-owner/README.md +77 -0
  130. package/docs/02-guides/product-owner/commands.md +30 -0
  131. package/docs/02-guides/product-owner/handoff-checklist.md +42 -0
  132. package/docs/02-guides/product-owner/prd-writing-rules.md +45 -0
  133. package/docs/02-guides/product-owner/scenarios.md +357 -0
  134. package/docs/02-guides/qc-automation.md +92 -0
  135. package/docs/02-guides/tester/README.md +72 -0
  136. package/docs/02-guides/tester/bug-reporting.md +117 -0
  137. package/docs/02-guides/tester/reading-specs.md +79 -0
  138. package/docs/02-guides/tester/scenarios.md +186 -0
  139. package/docs/02-guides/tester/spec-manifest.md +124 -0
  140. package/docs/02-guides/tester/test-checklist.md +31 -0
  141. package/docs/02-guides/tester/workflow.md +79 -0
  142. package/docs/03-concepts/README.md +19 -0
  143. package/docs/03-concepts/architecture.md +243 -0
  144. package/docs/03-concepts/pipeline.md +249 -0
  145. package/docs/03-concepts/traceability.md +148 -0
  146. package/docs/04-operations/README.md +33 -0
  147. package/docs/04-operations/bug-flow.md +321 -0
  148. package/docs/04-operations/publishing.md +137 -0
  149. package/docs/04-operations/sync-and-update.md +328 -0
  150. package/docs/05-reference/README.md +29 -0
  151. package/docs/05-reference/commands.md +229 -0
  152. package/docs/05-reference/modules.md +110 -0
  153. package/docs/05-reference/trace-schema.md +146 -0
  154. package/docs/README.md +51 -0
  155. package/modules/qc-playwright/stack-profile.yaml +65 -0
  156. package/package.json +2 -2
  157. package/skills/code/SKILL.md +45 -8
  158. package/skills/debug/SKILL.md +52 -8
  159. package/skills/design-spec/SKILL.md +38 -8
  160. package/skills/discovery/SKILL.md +38 -8
  161. package/skills/prd/SKILL.md +14 -0
  162. package/skills/qc/qa-analyst/DOC_GAPS.template.md +63 -0
  163. package/skills/qc/qa-analyst/acceptance-criteria.md +56 -0
  164. package/skills/qc/qa-analyst/business-rules.md +55 -0
  165. package/skills/qc/qa-analyst/data-flow.md +60 -0
  166. package/skills/qc/qa-analyst/spec-breakdown.md +57 -0
  167. package/skills/qc/qa-designer/e2e/journey.md +41 -0
  168. package/skills/qc/qa-designer/exploratory/charter.md +68 -0
  169. package/skills/qc/qa-designer/exploratory/explore-to-functional.md +43 -0
  170. package/skills/qc/qa-designer/functional/api.md +45 -0
  171. package/skills/qc/qa-designer/functional/gui-feature.md +46 -0
  172. package/skills/qc/qa-designer/functional/gui-screen.md +52 -0
  173. package/skills/qc/qa-designer/integration/api.md +42 -0
  174. package/skills/qc/qa-designer/integration/db.md +39 -0
  175. package/skills/qc/qa-designer/integration/gui.md +40 -0
  176. package/skills/qc/qa-designer/integration/kafka.md +40 -0
  177. package/skills/qc/qa-designer/non-functional.md +40 -0
  178. package/skills/qc/qa-planner/test-plan.md +120 -0
  179. package/skills/qc/qa-reviewer/script/e2e.md +87 -0
  180. package/skills/qc/qa-reviewer/script/exploratory.md +45 -0
  181. package/skills/qc/qa-reviewer/script/functional.md +101 -0
  182. package/skills/qc/qa-reviewer/script/integration.md +91 -0
  183. package/skills/qc/qa-reviewer/script/non-functional.md +126 -0
  184. package/skills/qc/qa-reviewer/test-case/e2e.md +73 -0
  185. package/skills/qc/qa-reviewer/test-case/exploratory.md +43 -0
  186. package/skills/qc/qa-reviewer/test-case/functional.md +76 -0
  187. package/skills/qc/qa-reviewer/test-case/integration.md +69 -0
  188. package/skills/qc/qa-reviewer/test-case/non-functional.md +73 -0
  189. package/skills/qc/qa-runner/e2e.md +49 -0
  190. package/skills/qc/qa-runner/exploratory/session.md +36 -0
  191. package/skills/qc/qa-runner/functional/api.md +35 -0
  192. package/skills/qc/qa-runner/functional/gui-feature.md +51 -0
  193. package/skills/qc/qa-runner/functional/gui-screen.md +55 -0
  194. package/skills/qc/qa-runner/integration.md +47 -0
  195. package/skills/qc/qa-runner/non-functional.md +49 -0
  196. package/skills/qc/qa-runner/report/report.md +37 -0
  197. package/skills/setup-ai-first/SKILL.md +7 -0
  198. package/skills/spec/SKILL.md +14 -0
  199. package/skills/test/SKILL.md +83 -16
  200. package/steps/context-loader.md +31 -8
  201. package/steps/report-footer.md +7 -0
  202. package/templates/project-context.yaml +8 -0
  203. package/ARCHITECTURE.md +0 -258
@@ -163,19 +163,41 @@ If the file does not exist → skip silently.
163
163
 
164
164
  ---
165
165
 
166
- ## Step 3 — [CRITICAL] Load CLAUDE.md
166
+ ## Step 3 — [CRITICAL] Load CLAUDE.md (layered: root + service overlay)
167
167
 
168
168
  *This is the highest-priority context — it defines HOW to write code and documents for this project.*
169
169
 
170
- Read `CLAUDE.md`. Extract and store:
170
+ CLAUDE.md is loaded in **two layers** so umbrella-wide rules and service-specific
171
+ architecture/coding standards compose correctly. The agent always sits at the umbrella
172
+ root, but the implementation code lives in a service submodule with its OWN stack,
173
+ architecture, and conventions — so the service's CLAUDE.md must win for code generation.
174
+
175
+ **Layer 1 — [BASE] Root CLAUDE.md (umbrella-wide).**
176
+ Read `CLAUDE.md` at the repo root. Treat its contents as the **shared baseline** for the
177
+ whole umbrella — git conventions, data-protection posture, cross-cutting rules, and (in
178
+ single-service mode) the project's only architecture + coding standards.
179
+
180
+ **Layer 2 — [OVERLAY] Service CLAUDE.md (umbrella mode only).**
181
+ *Run only if `service_root` was set in Step 1.6 (i.e. a real service was routed to).*
182
+ Read `{service_root}/CLAUDE.md`. This file defines the architecture + coding standards of
183
+ the **actual stack being implemented** (e.g. `user-service` = java-spring, `web` = nextjs).
184
+ Overlay it on top of Layer 1: **on any conflict, the service value WINS** for architecture,
185
+ coding standards, and error handling. Layer-1 values that the service does not redefine
186
+ (e.g. git conventions, banned patterns shared org-wide) remain in effect.
187
+
188
+ From the **merged** result, extract and store:
171
189
 
172
190
  - **§1 Project Overview** → project name, language, framework, build/test commands, domains
173
- - **§2 Architecture** → layer order (e.g., Controller → Facade → Service → Repository), architectural rules
174
- - **§3 Coding Standards** → naming conventions (classes, methods), response wrapper type, forbidden patterns
175
- - **§5 Error Handling** → exception types, HTTP status code mapping, not-found exception class name
176
- - **§7 Git Conventions** → branch naming pattern, commit message format
191
+ - **§2 Architecture** → layer order (e.g., Controller → Facade → Service → Repository), architectural rules — *service overlay wins*
192
+ - **§3 Coding Standards** → naming conventions (classes, methods), response wrapper type, forbidden patterns — *service overlay wins*
193
+ - **§5 Error Handling** → exception types, HTTP status code mapping, not-found exception class name — *service overlay wins*
194
+ - **§7 Git Conventions** → branch naming pattern, commit message format — *root baseline unless service redefines*
177
195
 
178
- If `CLAUDE.md` does not exist → note it as missing and continue with project-context.yaml data only.
196
+ **Resolution rules:**
197
+ - If both layers exist → merge as above; record `claude_md_source = root + {service_root}`.
198
+ - If only the service overlay exists (no root CLAUDE.md) → use the service file alone; `claude_md_source = {service_root}`.
199
+ - If `service_root` is set but `{service_root}/CLAUDE.md` is **missing** → fall back to root CLAUDE.md and flag ⚠️ in the Step 7 recap (the service has no architecture/coding-standards definition — code generation will use umbrella defaults, which may be the wrong stack).
200
+ - If neither exists → note CLAUDE.md as missing and continue with project-context.yaml data only.
179
201
 
180
202
  ---
181
203
 
@@ -275,7 +297,8 @@ Output exactly this block:
275
297
  [CTX LOADED]
276
298
  Stack : {language} / {framework} / {database}
277
299
  Platform : {active_module} ({platform_type})
278
- Layers : {layer order from CLAUDE.md §2, e.g., Controller → Facade → Service → Repository}
300
+ Layers : {layer order from merged CLAUDE.md §2, e.g., Controller → Facade → Service → Repository}
301
+ CLAUDE.md : {root + {service_root} | {service_root} only | root only | ⚠️ service overlay MISSING — using root | missing}
279
302
  Ticket : {ticket_prefix}-
280
303
  Dict : {loaded — N canonical terms, M banned terms | missing}
281
304
  Entities : {loaded — EntityA, EntityB, EntityC | missing}
@@ -442,6 +465,13 @@ Suggest the logical next command based on workflow phase:
442
465
  | /generate-design-spec | Designer review → Figma links confirmed → PO + Designer sign-off → `/generate-bdd {prd-file}` |
443
466
  | /generate-bdd | `/review-context {feature-file}` to verify coverage |
444
467
  | /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
468
+ | /qc-analyze | `/qc-plan {UC-ID}` (resolve 🔴 blocker gaps first) |
469
+ | /qc-plan | `/qc-design-test {UC-ID}` |
470
+ | /qc-design-test | `/qc-review {UC-ID}` (test-case review) |
471
+ | /qc-review (test-case) | `/qc-run-test {UC-ID}` if APPROVED; fix TCs if NEEDS_FIX |
472
+ | /qc-run-test | `/qc-report {UC-ID}` then `/qc-review {UC-ID}` (script review) |
473
+ | /qc-review (script) | `/qc-report {UC-ID}` then create PR if APPROVED |
474
+ | /qc-report | `/validate-traces {UC-ID}` to refresh Living Docs (qc_status) |
445
475
  | /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
446
476
  | /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
447
477
  | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
@@ -586,6 +616,13 @@ Suggest the logical next command based on workflow phase:
586
616
  | /generate-design-spec | Designer review → Figma links confirmed → PO + Designer sign-off → `/generate-bdd {prd-file}` |
587
617
  | /generate-bdd | `/review-context {feature-file}` to verify coverage |
588
618
  | /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
619
+ | /qc-analyze | `/qc-plan {UC-ID}` (resolve 🔴 blocker gaps first) |
620
+ | /qc-plan | `/qc-design-test {UC-ID}` |
621
+ | /qc-design-test | `/qc-review {UC-ID}` (test-case review) |
622
+ | /qc-review (test-case) | `/qc-run-test {UC-ID}` if APPROVED; fix TCs if NEEDS_FIX |
623
+ | /qc-run-test | `/qc-report {UC-ID}` then `/qc-review {UC-ID}` (script review) |
624
+ | /qc-review (script) | `/qc-report {UC-ID}` then create PR if APPROVED |
625
+ | /qc-report | `/validate-traces {UC-ID}` to refresh Living Docs (qc_status) |
589
626
  | /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
590
627
  | /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
591
628
  | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
@@ -687,6 +724,13 @@ Suggest the logical next command based on workflow phase:
687
724
  | /generate-design-spec | Designer review → Figma links confirmed → PO + Designer sign-off → `/generate-bdd {prd-file}` |
688
725
  | /generate-bdd | `/review-context {feature-file}` to verify coverage |
689
726
  | /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
727
+ | /qc-analyze | `/qc-plan {UC-ID}` (resolve 🔴 blocker gaps first) |
728
+ | /qc-plan | `/qc-design-test {UC-ID}` |
729
+ | /qc-design-test | `/qc-review {UC-ID}` (test-case review) |
730
+ | /qc-review (test-case) | `/qc-run-test {UC-ID}` if APPROVED; fix TCs if NEEDS_FIX |
731
+ | /qc-run-test | `/qc-report {UC-ID}` then `/qc-review {UC-ID}` (script review) |
732
+ | /qc-review (script) | `/qc-report {UC-ID}` then create PR if APPROVED |
733
+ | /qc-report | `/validate-traces {UC-ID}` to refresh Living Docs (qc_status) |
690
734
  | /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
691
735
  | /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
692
736
  | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
@@ -237,19 +237,41 @@ If the file does not exist → skip silently.
237
237
 
238
238
  ---
239
239
 
240
- ## Step 3 — [CRITICAL] Load CLAUDE.md
240
+ ## Step 3 — [CRITICAL] Load CLAUDE.md (layered: root + service overlay)
241
241
 
242
242
  *This is the highest-priority context — it defines HOW to write code and documents for this project.*
243
243
 
244
- Read `CLAUDE.md`. Extract and store:
244
+ CLAUDE.md is loaded in **two layers** so umbrella-wide rules and service-specific
245
+ architecture/coding standards compose correctly. The agent always sits at the umbrella
246
+ root, but the implementation code lives in a service submodule with its OWN stack,
247
+ architecture, and conventions — so the service's CLAUDE.md must win for code generation.
248
+
249
+ **Layer 1 — [BASE] Root CLAUDE.md (umbrella-wide).**
250
+ Read `CLAUDE.md` at the repo root. Treat its contents as the **shared baseline** for the
251
+ whole umbrella — git conventions, data-protection posture, cross-cutting rules, and (in
252
+ single-service mode) the project's only architecture + coding standards.
253
+
254
+ **Layer 2 — [OVERLAY] Service CLAUDE.md (umbrella mode only).**
255
+ *Run only if `service_root` was set in Step 1.6 (i.e. a real service was routed to).*
256
+ Read `{service_root}/CLAUDE.md`. This file defines the architecture + coding standards of
257
+ the **actual stack being implemented** (e.g. `user-service` = java-spring, `web` = nextjs).
258
+ Overlay it on top of Layer 1: **on any conflict, the service value WINS** for architecture,
259
+ coding standards, and error handling. Layer-1 values that the service does not redefine
260
+ (e.g. git conventions, banned patterns shared org-wide) remain in effect.
261
+
262
+ From the **merged** result, extract and store:
245
263
 
246
264
  - **§1 Project Overview** → project name, language, framework, build/test commands, domains
247
- - **§2 Architecture** → layer order (e.g., Controller → Facade → Service → Repository), architectural rules
248
- - **§3 Coding Standards** → naming conventions (classes, methods), response wrapper type, forbidden patterns
249
- - **§5 Error Handling** → exception types, HTTP status code mapping, not-found exception class name
250
- - **§7 Git Conventions** → branch naming pattern, commit message format
265
+ - **§2 Architecture** → layer order (e.g., Controller → Facade → Service → Repository), architectural rules — *service overlay wins*
266
+ - **§3 Coding Standards** → naming conventions (classes, methods), response wrapper type, forbidden patterns — *service overlay wins*
267
+ - **§5 Error Handling** → exception types, HTTP status code mapping, not-found exception class name — *service overlay wins*
268
+ - **§7 Git Conventions** → branch naming pattern, commit message format — *root baseline unless service redefines*
251
269
 
252
- If `CLAUDE.md` does not exist → note it as missing and continue with project-context.yaml data only.
270
+ **Resolution rules:**
271
+ - If both layers exist → merge as above; record `claude_md_source = root + {service_root}`.
272
+ - If only the service overlay exists (no root CLAUDE.md) → use the service file alone; `claude_md_source = {service_root}`.
273
+ - If `service_root` is set but `{service_root}/CLAUDE.md` is **missing** → fall back to root CLAUDE.md and flag ⚠️ in the Step 7 recap (the service has no architecture/coding-standards definition — code generation will use umbrella defaults, which may be the wrong stack).
274
+ - If neither exists → note CLAUDE.md as missing and continue with project-context.yaml data only.
253
275
 
254
276
  ---
255
277
 
@@ -349,7 +371,8 @@ Output exactly this block:
349
371
  [CTX LOADED]
350
372
  Stack : {language} / {framework} / {database}
351
373
  Platform : {active_module} ({platform_type})
352
- Layers : {layer order from CLAUDE.md §2, e.g., Controller → Facade → Service → Repository}
374
+ Layers : {layer order from merged CLAUDE.md §2, e.g., Controller → Facade → Service → Repository}
375
+ CLAUDE.md : {root + {service_root} | {service_root} only | root only | ⚠️ service overlay MISSING — using root | missing}
353
376
  Ticket : {ticket_prefix}-
354
377
  Dict : {loaded — N canonical terms, M banned terms | missing}
355
378
  Entities : {loaded — EntityA, EntityB, EntityC | missing}
@@ -471,6 +494,13 @@ Suggest the logical next command based on workflow phase:
471
494
  | /generate-design-spec | Designer review → Figma links confirmed → PO + Designer sign-off → `/generate-bdd {prd-file}` |
472
495
  | /generate-bdd | `/review-context {feature-file}` to verify coverage |
473
496
  | /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
497
+ | /qc-analyze | `/qc-plan {UC-ID}` (resolve 🔴 blocker gaps first) |
498
+ | /qc-plan | `/qc-design-test {UC-ID}` |
499
+ | /qc-design-test | `/qc-review {UC-ID}` (test-case review) |
500
+ | /qc-review (test-case) | `/qc-run-test {UC-ID}` if APPROVED; fix TCs if NEEDS_FIX |
501
+ | /qc-run-test | `/qc-report {UC-ID}` then `/qc-review {UC-ID}` (script review) |
502
+ | /qc-review (script) | `/qc-report {UC-ID}` then create PR if APPROVED |
503
+ | /qc-report | `/validate-traces {UC-ID}` to refresh Living Docs (qc_status) |
474
504
  | /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
475
505
  | /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
476
506
  | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
@@ -142,19 +142,41 @@ If the file does not exist → skip silently.
142
142
 
143
143
  ---
144
144
 
145
- ## Step 3 — [CRITICAL] Load CLAUDE.md
145
+ ## Step 3 — [CRITICAL] Load CLAUDE.md (layered: root + service overlay)
146
146
 
147
147
  *This is the highest-priority context — it defines HOW to write code and documents for this project.*
148
148
 
149
- Read `CLAUDE.md`. Extract and store:
149
+ CLAUDE.md is loaded in **two layers** so umbrella-wide rules and service-specific
150
+ architecture/coding standards compose correctly. The agent always sits at the umbrella
151
+ root, but the implementation code lives in a service submodule with its OWN stack,
152
+ architecture, and conventions — so the service's CLAUDE.md must win for code generation.
153
+
154
+ **Layer 1 — [BASE] Root CLAUDE.md (umbrella-wide).**
155
+ Read `CLAUDE.md` at the repo root. Treat its contents as the **shared baseline** for the
156
+ whole umbrella — git conventions, data-protection posture, cross-cutting rules, and (in
157
+ single-service mode) the project's only architecture + coding standards.
158
+
159
+ **Layer 2 — [OVERLAY] Service CLAUDE.md (umbrella mode only).**
160
+ *Run only if `service_root` was set in Step 1.6 (i.e. a real service was routed to).*
161
+ Read `{service_root}/CLAUDE.md`. This file defines the architecture + coding standards of
162
+ the **actual stack being implemented** (e.g. `user-service` = java-spring, `web` = nextjs).
163
+ Overlay it on top of Layer 1: **on any conflict, the service value WINS** for architecture,
164
+ coding standards, and error handling. Layer-1 values that the service does not redefine
165
+ (e.g. git conventions, banned patterns shared org-wide) remain in effect.
166
+
167
+ From the **merged** result, extract and store:
150
168
 
151
169
  - **§1 Project Overview** → project name, language, framework, build/test commands, domains
152
- - **§2 Architecture** → layer order (e.g., Controller → Facade → Service → Repository), architectural rules
153
- - **§3 Coding Standards** → naming conventions (classes, methods), response wrapper type, forbidden patterns
154
- - **§5 Error Handling** → exception types, HTTP status code mapping, not-found exception class name
155
- - **§7 Git Conventions** → branch naming pattern, commit message format
170
+ - **§2 Architecture** → layer order (e.g., Controller → Facade → Service → Repository), architectural rules — *service overlay wins*
171
+ - **§3 Coding Standards** → naming conventions (classes, methods), response wrapper type, forbidden patterns — *service overlay wins*
172
+ - **§5 Error Handling** → exception types, HTTP status code mapping, not-found exception class name — *service overlay wins*
173
+ - **§7 Git Conventions** → branch naming pattern, commit message format — *root baseline unless service redefines*
156
174
 
157
- If `CLAUDE.md` does not exist → note it as missing and continue with project-context.yaml data only.
175
+ **Resolution rules:**
176
+ - If both layers exist → merge as above; record `claude_md_source = root + {service_root}`.
177
+ - If only the service overlay exists (no root CLAUDE.md) → use the service file alone; `claude_md_source = {service_root}`.
178
+ - If `service_root` is set but `{service_root}/CLAUDE.md` is **missing** → fall back to root CLAUDE.md and flag ⚠️ in the Step 7 recap (the service has no architecture/coding-standards definition — code generation will use umbrella defaults, which may be the wrong stack).
179
+ - If neither exists → note CLAUDE.md as missing and continue with project-context.yaml data only.
158
180
 
159
181
  ---
160
182
 
@@ -254,7 +276,8 @@ Output exactly this block:
254
276
  [CTX LOADED]
255
277
  Stack : {language} / {framework} / {database}
256
278
  Platform : {active_module} ({platform_type})
257
- Layers : {layer order from CLAUDE.md §2, e.g., Controller → Facade → Service → Repository}
279
+ Layers : {layer order from merged CLAUDE.md §2, e.g., Controller → Facade → Service → Repository}
280
+ CLAUDE.md : {root + {service_root} | {service_root} only | root only | ⚠️ service overlay MISSING — using root | missing}
258
281
  Ticket : {ticket_prefix}-
259
282
  Dict : {loaded — N canonical terms, M banned terms | missing}
260
283
  Entities : {loaded — EntityA, EntityB, EntityC | missing}
@@ -452,6 +475,13 @@ Suggest the logical next command based on workflow phase:
452
475
  | /generate-design-spec | Designer review → Figma links confirmed → PO + Designer sign-off → `/generate-bdd {prd-file}` |
453
476
  | /generate-bdd | `/review-context {feature-file}` to verify coverage |
454
477
  | /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
478
+ | /qc-analyze | `/qc-plan {UC-ID}` (resolve 🔴 blocker gaps first) |
479
+ | /qc-plan | `/qc-design-test {UC-ID}` |
480
+ | /qc-design-test | `/qc-review {UC-ID}` (test-case review) |
481
+ | /qc-review (test-case) | `/qc-run-test {UC-ID}` if APPROVED; fix TCs if NEEDS_FIX |
482
+ | /qc-run-test | `/qc-report {UC-ID}` then `/qc-review {UC-ID}` (script review) |
483
+ | /qc-review (script) | `/qc-report {UC-ID}` then create PR if APPROVED |
484
+ | /qc-report | `/validate-traces {UC-ID}` to refresh Living Docs (qc_status) |
455
485
  | /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
456
486
  | /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
457
487
  | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
@@ -194,6 +194,13 @@ Suggest the logical next command based on workflow phase:
194
194
  | /generate-design-spec | Designer review → Figma links confirmed → PO + Designer sign-off → `/generate-bdd {prd-file}` |
195
195
  | /generate-bdd | `/review-context {feature-file}` to verify coverage |
196
196
  | /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
197
+ | /qc-analyze | `/qc-plan {UC-ID}` (resolve 🔴 blocker gaps first) |
198
+ | /qc-plan | `/qc-design-test {UC-ID}` |
199
+ | /qc-design-test | `/qc-review {UC-ID}` (test-case review) |
200
+ | /qc-review (test-case) | `/qc-run-test {UC-ID}` if APPROVED; fix TCs if NEEDS_FIX |
201
+ | /qc-run-test | `/qc-report {UC-ID}` then `/qc-review {UC-ID}` (script review) |
202
+ | /qc-review (script) | `/qc-report {UC-ID}` then create PR if APPROVED |
203
+ | /qc-report | `/validate-traces {UC-ID}` to refresh Living Docs (qc_status) |
197
204
  | /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
198
205
  | /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
199
206
  | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
@@ -443,6 +450,13 @@ Suggest the logical next command based on workflow phase:
443
450
  | /generate-design-spec | Designer review → Figma links confirmed → PO + Designer sign-off → `/generate-bdd {prd-file}` |
444
451
  | /generate-bdd | `/review-context {feature-file}` to verify coverage |
445
452
  | /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
453
+ | /qc-analyze | `/qc-plan {UC-ID}` (resolve 🔴 blocker gaps first) |
454
+ | /qc-plan | `/qc-design-test {UC-ID}` |
455
+ | /qc-design-test | `/qc-review {UC-ID}` (test-case review) |
456
+ | /qc-review (test-case) | `/qc-run-test {UC-ID}` if APPROVED; fix TCs if NEEDS_FIX |
457
+ | /qc-run-test | `/qc-report {UC-ID}` then `/qc-review {UC-ID}` (script review) |
458
+ | /qc-review (script) | `/qc-report {UC-ID}` then create PR if APPROVED |
459
+ | /qc-report | `/validate-traces {UC-ID}` to refresh Living Docs (qc_status) |
446
460
  | /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
447
461
  | /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
448
462
  | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
@@ -0,0 +1,63 @@
1
+ ---
2
+ version: 1.1
3
+ updated: 2026-06-11
4
+ ported_from: ai-automation-qc-base
5
+ ---
6
+
7
+ # Gap Analysis – <FEATURE>
8
+
9
+ > File ghi lại các **khoảng trống của tài liệu** mà `qa-analyst` phát hiện sau khi
10
+ > phân tích. Là đầu vào để hỏi dev/BA và cho `qa-planner`. Mỗi gap có ID `GAP-xx`
11
+ > để business rule (BR-xx), acceptance criteria (AC-xx) và test case trace ngược về.
12
+
13
+ | Trường | Giá trị |
14
+ |---|---|
15
+ | Feature | `<FEATURE>` |
16
+ | Project / Service | `<project or service name / domain>` |
17
+ | Tài liệu nguồn | `<đường dẫn / link PRD / user story>` |
18
+ | Người phân tích | qa-analyst |
19
+ | Ngày phân tích | `<YYYY-MM-DD>` |
20
+ | Tổng số gap | `<N>` (Blocker: x · High: y · Medium: z · Low: w) |
21
+ | Trạng thái chung | 🔴 Blocked / 🟡 Cần làm rõ / 🟢 Đủ rõ để thiết kế TC |
22
+
23
+ ---
24
+
25
+ ## Bảng Gap
26
+
27
+ | ID | Loại | Mô tả gap | Vị trí (mục/nguồn) | Ảnh hưởng (chức năng / BR / AC) | Mức độ | Người trả lời | Trạng thái | Câu trả lời |
28
+ |---|---|---|---|---|---|---|---|---|
29
+ | GAP-01 | MISSING | … | spec §x | chức năng A / BR-02 | 🔴 Blocker | Dev/BA | Open | — |
30
+ | GAP-02 | AMBIGUOUS | … | mockup màn hình Y | AC-03 | 🟠 High | BA | Open | — |
31
+ | GAP-03 | CONTRADICTORY | … | §2 vs §5 | BR-04 | 🟠 High | BA | Open | — |
32
+ | GAP-04 | ASSUMPTION | … (giả định AI tự đưa, cần xác nhận) | — | chức năng B | 🟡 Medium | Dev | Open | — |
33
+
34
+ ### Loại gap
35
+ - **MISSING** – thông tin/chức năng/field/rule chưa được mô tả.
36
+ - **AMBIGUOUS** – mô tả mơ hồ, có ≥ 2 cách hiểu.
37
+ - **CONTRADICTORY** – các phần tài liệu mâu thuẫn nhau.
38
+ - **ASSUMPTION** – giả định do qa-analyst tự suy ra, cần dev/BA xác nhận.
39
+ - **OPEN QUESTION** – câu hỏi mở cần trả lời trước khi thiết kế/triển khai.
40
+
41
+ ### Mức độ
42
+ 🔴 Blocker (chặn thiết kế TC) · 🟠 High · 🟡 Medium · 🟢 Low
43
+
44
+ ---
45
+
46
+ ## Quy ước cập nhật
47
+ - `qa-analyst` tạo & điền gap khi phân tích; **không tự bịa câu trả lời** cho gap Blocker.
48
+ - Khi có phản hồi dev/BA: điền cột *Câu trả lời*, đổi *Trạng thái* → `Answered`.
49
+ - Còn gap 🔴 Blocker `Open` ⇒ **chưa** chuyển sang `qa-designer`; đẩy sang `qa-planner`
50
+ (skill `questions-for-dev`) để chốt câu hỏi.
51
+
52
+ ---
53
+
54
+ ## ⚠️ Checklist bắt buộc trước khi lưu file
55
+
56
+ Trước khi lưu `DOC_GAPS.md`, kiểm tra **từng hàng** trong bảng gap:
57
+
58
+ - [ ] **9 cột đủ** – đúng thứ tự: `ID | Loại | Mô tả gap | Vị trí (mục/nguồn) | Ảnh hưởng (chức năng / BR / AC) | Mức độ | Người trả lời | Trạng thái | Câu trả lời`
59
+ - [ ] **Cột Vị trí không rỗng** – phải có tham chiếu cụ thể đến mục trong tài liệu nguồn (vd `§3 UC4 BR25`, `Appendix B loại 7`, `§4.b Screen 3`). Đây là cột hay bị bỏ thiếu nhất → gây lệch toàn bộ cột sau.
60
+ - [ ] **Cột Ảnh hưởng = BR/AC references** – KHÔNG phải mức độ severity. Ví dụ đúng: `BR25, BR26 / AC-F01-33`. Nếu thấy "Blocker" / "High" ở đây → đang bị lệch cột.
61
+ - [ ] **Cột Mức độ có emoji** – bắt buộc dùng: `🔴 Blocker` / `🟠 High` / `🟡 Medium` / `🟢 Low`. Không được ghi text thuần.
62
+ - [ ] **Cột Người trả lời = vai trò** (PO / BA / Dev / Design / Content / DPO / QC Lead). Nếu thấy "Open" ở đây → đang bị lệch cột.
63
+ - [ ] **Cột Trạng thái = Open / Answered**. Nếu thấy "—" ở đây → đang bị lệch cột.
@@ -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`.