@anhth2/spec-driven-dev-plugin 0.11.0 → 0.12.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 (133) hide show
  1. package/commands/debug.md +5 -0
  2. package/commands/define-product.md +5 -0
  3. package/commands/dev-gen-test.md +5 -0
  4. package/commands/dev-run-test.md +5 -0
  5. package/commands/dev-smoke-test.md +5 -0
  6. package/commands/fix-bug.md +41 -6
  7. package/commands/fix-bug.tmpl +36 -6
  8. package/commands/generate-bdd.md +9 -2
  9. package/commands/generate-bdd.tmpl +4 -2
  10. package/commands/generate-code.md +5 -0
  11. package/commands/generate-design-spec.md +5 -0
  12. package/commands/generate-prd.md +5 -0
  13. package/commands/generate-spec-manifest.md +5 -0
  14. package/commands/generate-tech-docs.md +5 -0
  15. package/commands/learn.md +5 -0
  16. package/commands/propose-scenario.md +36 -11
  17. package/commands/propose-scenario.tmpl +31 -11
  18. package/commands/qc-analyze.md +25 -5
  19. package/commands/qc-analyze.tmpl +20 -5
  20. package/commands/qc-design-test.md +8 -3
  21. package/commands/qc-design-test.tmpl +3 -3
  22. package/commands/qc-plan.md +8 -3
  23. package/commands/qc-plan.tmpl +3 -3
  24. package/commands/qc-report.md +18 -1
  25. package/commands/qc-report.tmpl +13 -1
  26. package/commands/qc-review.md +7 -2
  27. package/commands/qc-review.tmpl +2 -2
  28. package/commands/qc-run-test.md +13 -2
  29. package/commands/qc-run-test.tmpl +8 -2
  30. package/commands/refine-prd.md +5 -0
  31. package/commands/report-bug.md +21 -2
  32. package/commands/report-bug.tmpl +16 -2
  33. package/commands/review-code.md +5 -0
  34. package/commands/review-context.md +5 -0
  35. package/commands/review-tech-docs.md +5 -0
  36. package/commands/sync.md +12 -9
  37. package/commands/sync.tmpl +12 -9
  38. package/commands/validate-traces.md +15 -2
  39. package/commands/validate-traces.tmpl +10 -2
  40. package/core/FRAMEWORK_VERSION +1 -1
  41. package/core/commands/debug.md +5 -0
  42. package/core/commands/define-product.md +5 -0
  43. package/core/commands/dev-gen-test.md +5 -0
  44. package/core/commands/dev-run-test.md +5 -0
  45. package/core/commands/dev-smoke-test.md +5 -0
  46. package/core/commands/fix-bug.md +41 -6
  47. package/core/commands/generate-bdd.md +9 -2
  48. package/core/commands/generate-code.md +5 -0
  49. package/core/commands/generate-design-spec.md +5 -0
  50. package/core/commands/generate-prd.md +5 -0
  51. package/core/commands/generate-spec-manifest.md +5 -0
  52. package/core/commands/generate-tech-docs.md +5 -0
  53. package/core/commands/learn.md +5 -0
  54. package/core/commands/propose-scenario.md +36 -11
  55. package/core/commands/qc-analyze.md +25 -5
  56. package/core/commands/qc-design-test.md +8 -3
  57. package/core/commands/qc-plan.md +8 -3
  58. package/core/commands/qc-report.md +18 -1
  59. package/core/commands/qc-review.md +7 -2
  60. package/core/commands/qc-run-test.md +13 -2
  61. package/core/commands/refine-prd.md +5 -0
  62. package/core/commands/report-bug.md +21 -2
  63. package/core/commands/review-code.md +5 -0
  64. package/core/commands/review-context.md +5 -0
  65. package/core/commands/review-tech-docs.md +5 -0
  66. package/core/commands/sync.md +12 -9
  67. package/core/commands/validate-traces.md +15 -2
  68. package/core/modules/qc-playwright/stack-profile.yaml +3 -3
  69. package/core/skills/code/SKILL.md +5 -0
  70. package/core/skills/debug/SKILL.md +5 -0
  71. package/core/skills/design-spec/SKILL.md +5 -0
  72. package/core/skills/discovery/SKILL.md +5 -0
  73. package/core/skills/qc/qa-analyst/acceptance-criteria.md +5 -1
  74. package/core/skills/qc/qa-analyst/business-rules.md +6 -2
  75. package/core/skills/qc/qa-analyst/data-flow.md +6 -2
  76. package/core/skills/qc/qa-analyst/spec-breakdown.md +7 -3
  77. package/core/skills/qc/qa-designer/e2e/journey.md +1 -1
  78. package/core/skills/qc/qa-designer/exploratory/charter.md +2 -2
  79. package/core/skills/qc/qa-designer/exploratory/explore-to-functional.md +1 -1
  80. package/core/skills/qc/qa-designer/functional/api.md +1 -1
  81. package/core/skills/qc/qa-designer/functional/gui-feature.md +1 -1
  82. package/core/skills/qc/qa-designer/functional/gui-screen.md +1 -1
  83. package/core/skills/qc/qa-designer/integration/api.md +1 -1
  84. package/core/skills/qc/qa-designer/integration/db.md +1 -1
  85. package/core/skills/qc/qa-designer/integration/gui.md +1 -1
  86. package/core/skills/qc/qa-designer/integration/kafka.md +1 -1
  87. package/core/skills/qc/qa-designer/non-functional.md +1 -1
  88. package/core/skills/qc/qa-planner/test-plan.md +4 -4
  89. package/core/skills/qc/qa-runner/exploratory/session.md +2 -2
  90. package/core/skills/test/SKILL.md +10 -0
  91. package/core/steps/context-loader.md +5 -0
  92. package/core/templates/project-context.yaml +19 -1
  93. package/docs/01-getting-started/installation.md +3 -1
  94. package/docs/02-guides/developer/commands.md +1 -1
  95. package/docs/02-guides/developer/workflow.md +2 -0
  96. package/docs/02-guides/qc-automation.md +66 -1
  97. package/docs/02-guides/tester/README.md +2 -0
  98. package/docs/02-guides/tester/bug-reporting.md +1 -1
  99. package/docs/02-guides/tester/workflow.md +4 -3
  100. package/docs/03-concepts/architecture.md +2 -0
  101. package/docs/03-concepts/pipeline.md +19 -6
  102. package/docs/03-concepts/traceability.md +2 -1
  103. package/docs/04-operations/bug-flow.md +45 -4
  104. package/docs/04-operations/sync-and-update.md +38 -1
  105. package/docs/05-reference/commands.md +11 -11
  106. package/docs/05-reference/modules.md +2 -2
  107. package/docs/05-reference/trace-schema.md +18 -12
  108. package/modules/qc-playwright/stack-profile.yaml +3 -3
  109. package/package.json +1 -1
  110. package/skills/code/SKILL.md +5 -0
  111. package/skills/debug/SKILL.md +5 -0
  112. package/skills/design-spec/SKILL.md +5 -0
  113. package/skills/discovery/SKILL.md +5 -0
  114. package/skills/qc/qa-analyst/acceptance-criteria.md +5 -1
  115. package/skills/qc/qa-analyst/business-rules.md +6 -2
  116. package/skills/qc/qa-analyst/data-flow.md +6 -2
  117. package/skills/qc/qa-analyst/spec-breakdown.md +7 -3
  118. package/skills/qc/qa-designer/e2e/journey.md +1 -1
  119. package/skills/qc/qa-designer/exploratory/charter.md +2 -2
  120. package/skills/qc/qa-designer/exploratory/explore-to-functional.md +1 -1
  121. package/skills/qc/qa-designer/functional/api.md +1 -1
  122. package/skills/qc/qa-designer/functional/gui-feature.md +1 -1
  123. package/skills/qc/qa-designer/functional/gui-screen.md +1 -1
  124. package/skills/qc/qa-designer/integration/api.md +1 -1
  125. package/skills/qc/qa-designer/integration/db.md +1 -1
  126. package/skills/qc/qa-designer/integration/gui.md +1 -1
  127. package/skills/qc/qa-designer/integration/kafka.md +1 -1
  128. package/skills/qc/qa-designer/non-functional.md +1 -1
  129. package/skills/qc/qa-planner/test-plan.md +4 -4
  130. package/skills/qc/qa-runner/exploratory/session.md +2 -2
  131. package/skills/test/SKILL.md +10 -0
  132. package/steps/context-loader.md +5 -0
  133. package/templates/project-context.yaml +19 -1
@@ -48,7 +48,7 @@ Có 2 thứ cần update, **nguồn khác nhau, tần suất khác nhau**:
48
48
 
49
49
  - Pull specs (spec submodule) + services (service submodules).
50
50
  - Refresh Living Docs panel (regenerate trace report — xem [§5](#5-living-docs-sync)).
51
- - Liệt kê **📥 New tester feedback** — bug report / scenario proposal mới từ tester trong vùng `feedback/` của spec repo.
51
+ - Liệt kê **📥 New tester feedback** — bug report / scenario proposal mới từ tester trong vùng `feedback/` của spec repo. Chỉ surface bug có `State: Open` là đang chờ; `State: Fixed` (chờ QC re-verify) / `Closed` liệt kê riêng để không làm nhiễu view của PO/PM. Vòng đời đầy đủ: [bug-flow.md §10](bug-flow.md).
52
52
 
53
53
  ```bash
54
54
  /sync
@@ -78,12 +78,49 @@ Service submodules không bị ảnh hưởng — luôn checkout đúng SHA mà
78
78
 
79
79
  > **Umbrella mode:** `/update-framework` chỉ cần chạy ở **umbrella root**. Service submodule chỉ chứa `.agent/project-context.yaml` (config), không có command files → không cần nâng cấp riêng.
80
80
 
81
+ > ⚠️ **`--init` ghi đè TOÀN BỘ `.agent/`** (gồm cả `.agent/skills/qc/`) — KHÔNG đụng `.agent/project-context.yaml` (config của bạn) và mọi thứ **ngoài** `.agent/`.
82
+ > **Hệ quả với skill QC:** nếu QC sửa skill **trực tiếp trong `.agent/skills/qc/`** thì sẽ **mất sau upgrade**. Để skill QC tồn tại độc lập, trỏ `paths.qc_skills_dir` (trong `.agent/project-context.yaml`) tới **repo QC riêng / submodule** (vd `qc-base/.claude/skills`) — `qc_skills_dir` nằm ngoài `.agent/` nên upgrade không bao giờ chạm. Chi tiết: [Guide · QC Automation](../02-guides/qc-automation.md#skill-sourcing--upgrade-safety).
83
+
81
84
  ---
82
85
 
83
86
  ## 4. Umbrella mode & git submodule
84
87
 
85
88
  Claude Code luôn mở ở **umbrella repo** (không mở trong service submodule). Umbrella thấy được cả spec submodule (read-only) lẫn service submodule (code).
86
89
 
90
+ ### Ai commit vào repo nào? (git flow theo role)
91
+
92
+ 3 repo độc lập (mỗi cái có origin riêng), umbrella chỉ giữ **pointer**. Mỗi role ghi vào repo khác nhau → số "tầng push" khác nhau:
93
+
94
+ ```
95
+ UMBRELLA REPO (Claude Code mở ở đây · .gitmodules + docs/)
96
+ │ giữ pointer (SHA) tới từng submodule
97
+ ┌─────────────┴──────────────┐
98
+ ▼ ▼
99
+ SPEC SUBMODULE SERVICE SUBMODULE(s)
100
+ (PO sở hữu · origin riêng) (Dev sở hữu · origin riêng)
101
+ specs/prd · specs/bdd src/
102
+ specs/design-spec .trace/*.tsv (qc_status + dev_selftest)
103
+ specs/tech-docs (API contract)
104
+ feedback/ (bug · proposal · prd-change-request)
105
+ ```
106
+
107
+ | Role | Tạo gì | Repo đích | Push mấy tầng |
108
+ |------|--------|-----------|---------------|
109
+ | **PO** | PRD · BDD · design-spec · sửa PRD theo change-request | SPEC repo | **1 tầng** (spec repo) |
110
+ | **Dev (FE/BE)** | tech-docs · code · dev test (`dev_selftest`) | tech-docs → SPEC repo · code + `.trace/` → SERVICE | code: **2 tầng** (service → umbrella pointer) · tech-docs: thêm 1 tầng ở spec repo |
111
+ | **QC** | analysis/test-cases · `qc_status` · bug/gap | artifacts → `{qc_dir}/{UC-ID}/` (umbrella root `docs/`) · `qc_status` → SERVICE `.trace/` · bug/gap → SPEC `feedback/` | trace: **2 tầng** · feedback: 1 tầng (spec repo) |
112
+ | **Tester** | bug report · scenario proposal · prd-change-request | SPEC repo `feedback/` | **1 tầng** (spec repo) — read-only trên specs/code |
113
+
114
+ Thứ tự bàn giao (mỗi mũi tên = `git push` rồi role kế tiếp `/sync`):
115
+
116
+ ```
117
+ PO ─push spec─▶ Dev /sync ─code 2 tầng─▶ QC /sync ─qc_status 2 tầng + bug/gap 1 tầng─▶ PO/Dev /sync
118
+ BDD approved tech-docs + src test + report fix code / sửa PRD → /generate-bdd lại
119
+ (vòng feedback: xem Bug Flow §9)
120
+ ```
121
+
122
+ > **`qc_status` ở service nhưng analysis docs ở umbrella:** `qc_dir` (mặc định `docs/`) **không** auto-route theo service như `trace_dir`. Muốn artifacts QC nằm cùng service submodule (push chung 2 tầng với trace) → set `paths.qc_dir` trong `{service}/.agent/project-context.yaml`, hoặc trỏ ra repo QC riêng.
123
+
87
124
  ### 4.1 — Clone lần đầu
88
125
 
89
126
  ```bash
@@ -123,12 +123,12 @@
123
123
 
124
124
  | Command | Input | Output | When to use |
125
125
  |---------|-------|--------|-------------|
126
- | `/qc-analyze` | feature file / UC-ID | QC analysis of scenarios + risks | After BDD approved — đầu pipeline QC. |
127
- | `/qc-plan` | QC analysis | Test plan (scope, layers, priorities) | After `/qc-analyze`. |
128
- | `/qc-design-test` | test plan | Test case designs mapped to `{UC-ID}-SC{N}` | After `/qc-plan`. |
129
- | `/qc-review` | test designs | Reviewed/approved test design set | After `/qc-design-test`. |
130
- | `/qc-run-test` | test designs | Execution results ghi `qc_status` (pass/fail/skip/not_run) + `qc_run_at` vào trace TSV, keyed by `@trace.verifies={UC-ID}-SC{N}` | After `/qc-review`. |
131
- | `/qc-report` | run results | QC report (Playwright Trace + pytest-html) | After `/qc-run-test`. |
126
+ | `/qc-analyze` | feature file / UC-ID | **2 file** trong `{qc_dir}/{UC-ID}/` (mặc định `docs/`): `REQUIREMENT_ANALYSIS.md` (gộp requirement + BR + data-flow + AC) + `DOC_GAPS.md` | After BDD approved — đầu pipeline QC. |
127
+ | `/qc-plan` | `REQUIREMENT_ANALYSIS.md` + `DOC_GAPS.md` | `{qc_dir}/{UC-ID}/TEST_PLAN.md` (scope, layers, priorities, questions-for-dev) | After `/qc-analyze`. |
128
+ | `/qc-design-test` | `TEST_PLAN.md` + `REQUIREMENT_ANALYSIS.md` | `{qc_dir}/{UC-ID}/test-cases/*.Test.md` mapped to `{UC-ID}-SC{N}` | After `/qc-plan`. |
129
+ | `/qc-review` | test-case `.Test.md` **hoặc** script Python | Verdict APPROVED / NEEDS_FIX + findings (**inline — không sinh file**) | After `/qc-design-test` (test-case) hoặc `/qc-run-test` (script). |
130
+ | `/qc-run-test` | reviewed `.Test.md` | Script Python (`pages/`, `tests/`) + ghi `qc_status` (pass/fail/skip/not_run) + `qc_run_at` vào trace TSV, keyed by `@trace.verifies={UC-ID}-SC{N}` | After `/qc-review`. |
131
+ | `/qc-report` | run results | QC report `reports/<feature>/report.html` (Playwright Trace + pytest-html) | After `/qc-run-test`. |
132
132
 
133
133
  ---
134
134
 
@@ -140,14 +140,14 @@
140
140
 
141
141
  ---
142
142
 
143
- ## Phase 8 — Tester Feedback
143
+ ## Phase 8 — Tester / QC Feedback
144
144
 
145
- > Cả hai đều **read-only trên canonical specs/code**. Chúng chỉ ghi vào `feedback/` của shared spec repo và **commit + push** → PO/Dev thấy qua `/sync`. Testers không bao giờ sửa `.feature` trực tiếp.
145
+ > Cả hai đều **read-only trên canonical specs/code**. Chúng chỉ ghi vào `feedback/` của shared spec repo và **commit + push** → PO/Dev thấy qua `/sync`. Tester/QC không bao giờ sửa `.feature` trực tiếp. QC cũng dùng hai lệnh này: `/qc-run-test` FAIL = product-gap và `/qc-analyze` DOC_GAPS blocker đều route sang `/report-bug` hoặc `/propose-scenario` (xem [../02-guides/qc-automation.md](../02-guides/qc-automation.md)).
146
146
 
147
147
  | Command | Input | Output | When to use |
148
148
  |---------|-------|--------|-------------|
149
- | `/report-bug {UC-ID} {desc}` | UC/TICKET + description | `{spec_repo}/feedback/bug-reports/{BUG-ID}.md` + spec context + layer classification | Tester tìm thấy bug. Phân loại layer (Code/BDD/PRD/Design/Env) để route. |
150
- | `/propose-scenario {UC-ID} {desc}` | UC + edge-case description | `{spec_repo}/feedback/bdd-proposals/{UC-ID}-*.md` draft Gherkin | Tester tìm thấy edge case BDD chưa cover. Map vào PRD AC sẵn có, hoặc emit PRD change request nếu hành vi thực sự mới. |
149
+ | `/report-bug {UC-ID} {desc}` | UC/TICKET + description | `{spec_repo}/feedback/bug-reports/{BUG-ID}.md` + spec context + layer classification | Tester hoặc QC tìm thấy bug (gồm QC product-gap). Phân loại layer (Code/BDD/PRD/Design/Env) để route. |
150
+ | `/propose-scenario {UC-ID} {desc}` | UC + edge-case description | `{spec_repo}/feedback/bdd-proposals/{UC-ID}-*.md` draft Gherkin | Tester hoặc QC tìm thấy edge case BDD chưa cover. Map vào PRD AC sẵn có, hoặc emit PRD change request nếu hành vi thực sự mới. |
151
151
 
152
152
  ---
153
153
 
@@ -155,7 +155,7 @@
155
155
 
156
156
  | Command | Input | Output | When to use |
157
157
  |---------|-------|--------|-------------|
158
- | `/fix-bug` | | Bug fix | When a bug is found. |
158
+ | `/fix-bug {BUG-ID\|ticket\|desc}` | filed `BUG-ID` (đọc spec-context từ report) / ticket / description | Code fix trên branch + regression test; nếu nhận `{BUG-ID}` → set report State `🟢 Open` → `🟡 Fixed` (QC re-verify pass mới → `🟢 Closed`) | Khi tìm thấy bug/ticket, hoặc route một filed bug report. |
159
159
  | `/debug` | — | Debug session | Deep debugging. |
160
160
  | `/learn {text}` | "AI does X, should Y" | Appends guardrail vào project lessons file | Khi AI lặp lại lỗi bạn muốn chặn. |
161
161
  | `/generate-spec-manifest` | — | `spec-manifest.yaml` | Sinh manifest làm entry point cho external/tester agents. |
@@ -85,9 +85,9 @@ Ví dụ adapt theo platform type:
85
85
 
86
86
  **Folder structure:**
87
87
  ```
88
- docs/<project>/<feature>/ ← test-case Markdown (.Test.md) — source of truth
88
+ {paths.qc_dir}/{UC-ID}/test-cases/ ← test-case Markdown (.Test.md) — source of truth (mặc định docs/, lộ ra ngoài)
89
89
  pages/ ← Page Object Model (base_page.py + <feature>_page.py)
90
- tests/ ← pytest scripts, 1-1 với docs/ (conftest.py + test_<feature>.py)
90
+ tests/ ← pytest scripts, 1-1 với test-cases/ (conftest.py + test_<feature>.py)
91
91
  utils/ ← config_loader, logger, steps, test_ordering, report helpers
92
92
  test_data/ ← JSON datasets
93
93
  config/config.yaml ← browser, timeout, video/screenshot/trace toggles
@@ -22,10 +22,10 @@
22
22
  Tab-separated, một header row + một data row mỗi scenario. Header chính xác (từ `generate-bdd.tmpl`):
23
23
 
24
24
  ```
25
- sc_id sc_title spec_ver gen_ver implemented_by test_count test_classes dev_selftest dev_selftest_at qc_status qc_run_at prd_version bdd_version tech_doc_revision prd_status uc_status fe_phase status last_updated
25
+ sc_id sc_title spec_ver gen_ver implemented_by test_count test_classes dev_selftest dev_selftest_at qc_status qc_run_at qc_owner qc_blocked_by prd_version bdd_version tech_doc_revision prd_status uc_status fe_phase status last_updated
26
26
  ```
27
27
 
28
- 19 cột, theo đúng thứ tự trên.
28
+ 21 cột, theo đúng thứ tự trên.
29
29
 
30
30
  ---
31
31
 
@@ -44,16 +44,22 @@ sc_id sc_title spec_ver gen_ver implemented_by test_count test_classes dev_selft
44
44
  | 9 | `dev_selftest_at` | Ngày chạy dev self-check (`YYYY-MM-DD`) | `—` | **dev-run-test** |
45
45
  | 10 | `qc_status` | Kết quả QC chính thức: `pass` / `fail` / `skip` / `not_run` | `—` | **qc-run-test** |
46
46
  | 11 | `qc_run_at` | Ngày chạy QC (`YYYY-MM-DD`) | `—` | **qc-run-test** |
47
- | 12 | `prd_version` | `@trace.prd_version` từ `.feature` header | từ `.feature` | generate-bdd |
48
- | 13 | `bdd_version` | `@trace.bdd_version` từ `.feature` header | từ `.feature` | generate-bdd |
49
- | 14 | `tech_doc_revision` | Tech-doc revision tại thời điểm codegen | `—` | generate-code |
50
- | 15 | `prd_status` | `\| **Status** \|` từ PRD metadata | từ PRD | generate-bdd |
51
- | 16 | `uc_status` | Trạng thái UC: `draft` / `approved` / … | `draft` (UC mới) | generate-bdd |
52
- | 17 | `fe_phase` | FE phase khi implement (`ui` / `integration`) | `—` | generate-code `--phase` |
53
- | 18 | `status` | Trạng thái tổng hợp: `OK` / `DRIFT` / `GAP` / `UNTRACKED` | `UNTRACKED` | validate-traces |
54
- | 19 | `last_updated` | Ngày update gần nhất (`YYYY-MM-DD`) | today | mọi command ghi row |
47
+ | 12 | `qc_owner` | **Đang chờ ai** (PM view) khi SC chưa pass: `dev` / `po` / `—` | `—` | **qc-run-test** / **report-bug** |
48
+ | 13 | `qc_blocked_by` | Artifact liên quan: `BUG-{id}` / `GAP-{id}` / `—` | `—` | **qc-run-test** / **report-bug** |
49
+ | 14 | `prd_version` | `@trace.prd_version` từ `.feature` header | từ `.feature` | generate-bdd |
50
+ | 15 | `bdd_version` | `@trace.bdd_version` từ `.feature` header | từ `.feature` | generate-bdd |
51
+ | 16 | `tech_doc_revision` | Tech-doc revision tại thời điểm codegen | `—` | generate-code |
52
+ | 17 | `prd_status` | `\| **Status** \|` từ PRD metadata | từ PRD | generate-bdd |
53
+ | 18 | `uc_status` | Trạng thái UC: `draft` / `approved` / | `draft` (UC mới) | generate-bdd |
54
+ | 19 | `fe_phase` | FE phase khi implement (`ui` / `integration`) | `—` | generate-code `--phase` |
55
+ | 20 | `status` | Trạng thái tổng hợp: `OK` / `DRIFT` / `GAP` / `UNTRACKED` | `UNTRACKED` | validate-traces |
56
+ | 21 | `last_updated` | Ngày update gần nhất (`YYYY-MM-DD`) | today | mọi command ghi row |
55
57
 
56
- > **Re-generation rules (generate-bdd):** SC đã trong TSV & `spec_ver` không đổi chỉ update `sc_title`, `prd_version`, `bdd_version`, `prd_status`, `uc_status`, `last_updated`. Nếu `spec_ver` đổithêm `spec_ver` set `status = DRIFT` ngay. SC mới append với `gen_ver`/`implemented_by`/`test_count`/`test_classes`/`dev_selftest`/`dev_selftest_at`/`qc_status`/`qc_run_at`/`tech_doc_revision` = `—`. SC bị xóa khỏi `.feature` xóa row.
58
+ > **`qc_owner` / `qc_blocked_by` (PM "waiting-on" view):** dành cho PO kiêm PM xem **case nào đang chờ ai**. `/qc-run-test` set khi ghi `qc_status`: product-gap FAIL → `qc_owner=dev`; `skip`/`not_run` do `DOC_GAPS` 🔴 Blocker mở → `qc_owner=po` + `qc_blocked_by=GAP-{id}`; `pass` cả hai về `—`. `/report-bug` backfill `qc_blocked_by=BUG-{id}` (+ `qc_owner` theo layer) cho SC khớp. `/validate-traces` tổng hợp `waiting_dev` / `waiting_po` cho dashboard.
59
+
60
+ > **Re-generation rules (generate-bdd):** SC đã có trong TSV & `spec_ver` không đổi → chỉ update `sc_title`, `prd_version`, `bdd_version`, `prd_status`, `uc_status`, `last_updated`. Nếu `spec_ver` đổi → thêm `spec_ver` và set `status = DRIFT` ngay. SC mới → append với `gen_ver`/`implemented_by`/`test_count`/`test_classes`/`dev_selftest`/`dev_selftest_at`/`qc_status`/`qc_run_at`/`qc_owner`/`qc_blocked_by`/`tech_doc_revision` = `—`. SC bị xóa khỏi `.feature` → xóa row.
61
+
62
+ > **Backward-compat:** TSV cũ (19 cột, trước nâng cấp) thiếu `qc_owner`/`qc_blocked_by` → `/validate-traces` đọc thành `null`, không lỗi; lần `/generate-bdd` re-gen kế tiếp tự nâng header lên 21 cột.
57
63
 
58
64
  ---
59
65
 
@@ -133,7 +139,7 @@ Per-scenario trong file: `# @trace.scenario: {UC-ID}-SC{N}`, `# @trace.sc_versio
133
139
  `/validate-traces` ghi `{paths.trace_dir}/trace-report.json` — single source of truth cho web dashboards. Cấu trúc rút gọn:
134
140
 
135
141
  - `generated_at`, `domain`
136
- - `summary` — aggregates: `total_prds`, `approved_prds`, `total_ucs`, `approved_ucs`, `draft_ucs`, `total_scs`, `coded_scs`, `tested_scs`, `code_coverage_pct`, `test_coverage_pct`, `drift_count`, `gap_count`, `untracked_count`, `dev_selftest_passing/failing/not_run`, `qc_passing/failing/skipped/not_run`, `tech_docs_count`
142
+ - `summary` — aggregates: `total_prds`, `approved_prds`, `total_ucs`, `approved_ucs`, `draft_ucs`, `total_scs`, `coded_scs`, `tested_scs`, `code_coverage_pct`, `test_coverage_pct`, `drift_count`, `gap_count`, `untracked_count`, `dev_selftest_passing/failing/not_run`, `qc_passing/failing/skipped/not_run`, `waiting_dev`, `waiting_po`, `tech_docs_count`
137
143
  - `prds[]` → `ucs[]` → `scenarios[]` — mỗi scenario có đầy đủ các trường của TSV row (gồm `dev_selftest`, `dev_selftest_at`, `qc_status`, `qc_run_at`)
138
144
  - `issues` — phân loại: `drift`, `gap`, `untracked`, `prd_version_drift`, `techdoc_drift`, mỗi entry kèm `fix` command gợi ý
139
145
 
@@ -22,11 +22,11 @@ architecture:
22
22
  - "Group tests by (role, account) so login/logout never interleaves across roles"
23
23
  - "Cover 100% of TCs in the .Test.md — every TC ends Pass/Fail/Skip, none left Draft"
24
24
  folder_structure: |
25
- docs/<project>/<feature>/ ← test-case Markdown (.Test.md) — source of truth
25
+ {paths.qc_dir}/{UC-ID}/test-cases/ ← test-case Markdown (.Test.md) — source of truth (mặc định docs/, lộ ra ngoài)
26
26
  pages/ ← Page Object Model
27
27
  │ ├── base_page.py ← slim BasePage (click/fill/wait/screenshot)
28
28
  │ └── <feature>_page.py
29
- tests/ ← pytest scripts, 1-1 with docs/
29
+ tests/ ← pytest scripts, 1-1 with test-cases/
30
30
  │ ├── conftest.py ← fixtures: browser, page, logged_in_page, tracing
31
31
  │ └── <project>/test_<feature>.py
32
32
  utils/ ← config_loader, logger, steps, test_ordering, report helpers
@@ -41,7 +41,7 @@ coding_standards:
41
41
  test_function: "test_TC<NNN>_<snake_case>"
42
42
  page_object: "<feature>_page.py with <Feature>Page class extending BasePage"
43
43
  files:
44
- test_case_md: "docs/<project>/<feature>/TC_<FEATURE>.Test.md"
44
+ test_case_md: "{paths.qc_dir}/{UC-ID}/test-cases/TC_<FEATURE>.Test.md"
45
45
  page_object: "pages/<feature>_page.py"
46
46
  test_script: "tests/<project>/test_<feature>.py"
47
47
  patterns:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anhth2/spec-driven-dev-plugin",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "AI-First Spec-Driven Development workflow plugin for Claude Code",
5
5
  "bin": {
6
6
  "spec-driven-dev": "./bin/index.js"
@@ -152,6 +152,8 @@ Read `.agent/project-context.yaml`. Extract and store:
152
152
  - `paths.specs_dir` → BDD specs root
153
153
  - `paths.prd_dir` → PRD documents root
154
154
  - `paths.refinement_dir` → findings/review output dir
155
+ - `paths.qc_dir` → QC automation artifacts root (visible top-level, one subfolder per UC: `{qc_dir}/{UC-ID}/`)
156
+ - `paths.qc_skills_dir` → where qc-* commands load QC skills from (default bundled `.agent/skills/qc`; override to the QC team's own repo/submodule so framework upgrade won't overwrite them)
155
157
  - `paths.product_definitions_dir` → product definitions root
156
158
  - `paths.domain_knowledge_dir` → domain knowledge root
157
159
  - `paths.business_dictionary` → path to business-dictionary.md
@@ -164,6 +166,8 @@ If `paths` section is absent, use these defaults:
164
166
  - `specs_dir` = `specs/bdd`
165
167
  - `prd_dir` = `specs/prd`
166
168
  - `refinement_dir` = `.agent/review`
169
+ - `qc_dir` = `docs`
170
+ - `qc_skills_dir` = `.agent/skills/qc`
167
171
  - `product_definitions_dir` = `specs/product-definition`
168
172
  - `domain_knowledge_dir` = `specs/domain-knowledge`
169
173
  - `business_dictionary` = `specs/domain-knowledge/business-dictionary.md`
@@ -208,6 +212,7 @@ If `services` section is present:
208
212
  - Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
209
213
  - Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
210
214
  - Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
215
+ - Override `paths.prd_change_requests_dir` → `{spec_source}/feedback/prd-change-requests`
211
216
 
212
217
  > **Why under `spec_source`:** PRD, design-spec, domain knowledge, the **API contract (tech-docs)**, and tester feedback are all **cross-team artifacts** — they must live in the **shared spec repo** so every umbrella (FE/App/BE) reads the same source via `/sync`. Tech-docs specifically: BE authors the tech-design (API contract), commits + pushes it into the spec submodule (2-layer commit), and FE/App pull it on their next `/sync` to wire the real API in `/generate-code --phase=integration`. In single-service mode (no `spec_source`), these default under the repo root — still shared, same repo.
213
218
 
@@ -67,6 +67,8 @@ Read `.agent/project-context.yaml`. Extract and store:
67
67
  - `paths.specs_dir` → BDD specs root
68
68
  - `paths.prd_dir` → PRD documents root
69
69
  - `paths.refinement_dir` → findings/review output dir
70
+ - `paths.qc_dir` → QC automation artifacts root (visible top-level, one subfolder per UC: `{qc_dir}/{UC-ID}/`)
71
+ - `paths.qc_skills_dir` → where qc-* commands load QC skills from (default bundled `.agent/skills/qc`; override to the QC team's own repo/submodule so framework upgrade won't overwrite them)
70
72
  - `paths.product_definitions_dir` → product definitions root
71
73
  - `paths.domain_knowledge_dir` → domain knowledge root
72
74
  - `paths.business_dictionary` → path to business-dictionary.md
@@ -79,6 +81,8 @@ If `paths` section is absent, use these defaults:
79
81
  - `specs_dir` = `specs/bdd`
80
82
  - `prd_dir` = `specs/prd`
81
83
  - `refinement_dir` = `.agent/review`
84
+ - `qc_dir` = `docs`
85
+ - `qc_skills_dir` = `.agent/skills/qc`
82
86
  - `product_definitions_dir` = `specs/product-definition`
83
87
  - `domain_knowledge_dir` = `specs/domain-knowledge`
84
88
  - `business_dictionary` = `specs/domain-knowledge/business-dictionary.md`
@@ -123,6 +127,7 @@ If `services` section is present:
123
127
  - Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
124
128
  - Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
125
129
  - Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
130
+ - Override `paths.prd_change_requests_dir` → `{spec_source}/feedback/prd-change-requests`
126
131
 
127
132
  > **Why under `spec_source`:** PRD, design-spec, domain knowledge, the **API contract (tech-docs)**, and tester feedback are all **cross-team artifacts** — they must live in the **shared spec repo** so every umbrella (FE/App/BE) reads the same source via `/sync`. Tech-docs specifically: BE authors the tech-design (API contract), commits + pushes it into the spec submodule (2-layer commit), and FE/App pull it on their next `/sync` to wire the real API in `/generate-code --phase=integration`. In single-service mode (no `spec_source`), these default under the repo root — still shared, same repo.
128
133
 
@@ -141,6 +141,8 @@ Read `.agent/project-context.yaml`. Extract and store:
141
141
  - `paths.specs_dir` → BDD specs root
142
142
  - `paths.prd_dir` → PRD documents root
143
143
  - `paths.refinement_dir` → findings/review output dir
144
+ - `paths.qc_dir` → QC automation artifacts root (visible top-level, one subfolder per UC: `{qc_dir}/{UC-ID}/`)
145
+ - `paths.qc_skills_dir` → where qc-* commands load QC skills from (default bundled `.agent/skills/qc`; override to the QC team's own repo/submodule so framework upgrade won't overwrite them)
144
146
  - `paths.product_definitions_dir` → product definitions root
145
147
  - `paths.domain_knowledge_dir` → domain knowledge root
146
148
  - `paths.business_dictionary` → path to business-dictionary.md
@@ -153,6 +155,8 @@ If `paths` section is absent, use these defaults:
153
155
  - `specs_dir` = `specs/bdd`
154
156
  - `prd_dir` = `specs/prd`
155
157
  - `refinement_dir` = `.agent/review`
158
+ - `qc_dir` = `docs`
159
+ - `qc_skills_dir` = `.agent/skills/qc`
156
160
  - `product_definitions_dir` = `specs/product-definition`
157
161
  - `domain_knowledge_dir` = `specs/domain-knowledge`
158
162
  - `business_dictionary` = `specs/domain-knowledge/business-dictionary.md`
@@ -197,6 +201,7 @@ If `services` section is present:
197
201
  - Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
198
202
  - Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
199
203
  - Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
204
+ - Override `paths.prd_change_requests_dir` → `{spec_source}/feedback/prd-change-requests`
200
205
 
201
206
  > **Why under `spec_source`:** PRD, design-spec, domain knowledge, the **API contract (tech-docs)**, and tester feedback are all **cross-team artifacts** — they must live in the **shared spec repo** so every umbrella (FE/App/BE) reads the same source via `/sync`. Tech-docs specifically: BE authors the tech-design (API contract), commits + pushes it into the spec submodule (2-layer commit), and FE/App pull it on their next `/sync` to wire the real API in `/generate-code --phase=integration`. In single-service mode (no `spec_source`), these default under the repo root — still shared, same repo.
202
207
 
@@ -46,6 +46,8 @@ Read `.agent/project-context.yaml`. Extract and store:
46
46
  - `paths.specs_dir` → BDD specs root
47
47
  - `paths.prd_dir` → PRD documents root
48
48
  - `paths.refinement_dir` → findings/review output dir
49
+ - `paths.qc_dir` → QC automation artifacts root (visible top-level, one subfolder per UC: `{qc_dir}/{UC-ID}/`)
50
+ - `paths.qc_skills_dir` → where qc-* commands load QC skills from (default bundled `.agent/skills/qc`; override to the QC team's own repo/submodule so framework upgrade won't overwrite them)
49
51
  - `paths.product_definitions_dir` → product definitions root
50
52
  - `paths.domain_knowledge_dir` → domain knowledge root
51
53
  - `paths.business_dictionary` → path to business-dictionary.md
@@ -58,6 +60,8 @@ If `paths` section is absent, use these defaults:
58
60
  - `specs_dir` = `specs/bdd`
59
61
  - `prd_dir` = `specs/prd`
60
62
  - `refinement_dir` = `.agent/review`
63
+ - `qc_dir` = `docs`
64
+ - `qc_skills_dir` = `.agent/skills/qc`
61
65
  - `product_definitions_dir` = `specs/product-definition`
62
66
  - `domain_knowledge_dir` = `specs/domain-knowledge`
63
67
  - `business_dictionary` = `specs/domain-knowledge/business-dictionary.md`
@@ -102,6 +106,7 @@ If `services` section is present:
102
106
  - Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
103
107
  - Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
104
108
  - Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
109
+ - Override `paths.prd_change_requests_dir` → `{spec_source}/feedback/prd-change-requests`
105
110
 
106
111
  > **Why under `spec_source`:** PRD, design-spec, domain knowledge, the **API contract (tech-docs)**, and tester feedback are all **cross-team artifacts** — they must live in the **shared spec repo** so every umbrella (FE/App/BE) reads the same source via `/sync`. Tech-docs specifically: BE authors the tech-design (API contract), commits + pushes it into the spec submodule (2-layer commit), and FE/App pull it on their next `/sync` to wire the real API in `/generate-code --phase=integration`. In single-service mode (no `spec_source`), these default under the repo root — still shared, same repo.
107
112
 
@@ -51,6 +51,10 @@ Mỗi AC gắn mã trace: chức năng + BR-xx để TC sau này map 1-1.
51
51
 
52
52
  ## Output
53
53
 
54
- - Danh sách AC dạng Given/When/Then, có mã trace về chức năng và business rule.
54
+ Ghi vào **mục Acceptance Criteria** của `{paths.qc_dir}/{UC-ID}/REQUIREMENT_ANALYSIS.md`
55
+ (KHÔNG tạo file riêng — qc-analyze chỉ trả 2 file: `REQUIREMENT_ANALYSIS.md` + `DOC_GAPS.md`):
56
+
57
+ - Danh sách AC dạng Given/When/Then, có mã trace về chức năng, business rule (BR-xx)
58
+ và scenario chính thức `{UC-ID}-SC{N}` của `.feature`.
55
59
  - Bảng ma trận: BR / chức năng × AC để xác nhận không bỏ sót.
56
60
  - Đâ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).
@@ -49,7 +49,11 @@ Với rule có nhiều điều kiện kết hợp → gợi ý dựng **Decision
49
49
 
50
50
  ## Output
51
51
 
52
+ Ghi vào **mục Business Rules** của `{paths.qc_dir}/{UC-ID}/REQUIREMENT_ANALYSIS.md`
53
+ (KHÔNG tạo file riêng — qc-analyze chỉ trả 2 file: `REQUIREMENT_ANALYSIS.md` + `DOC_GAPS.md`):
54
+
52
55
  - 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
56
  - Gợi ý các rule cần Decision Table / BVA khi sang qa-designer.
57
+
58
+ Rule MÂU THUẪN / KHÔNG RÕ → ghi vào `{paths.qc_dir}/{UC-ID}/DOC_GAPS.md`
59
+ (loại CONTRADICTORY / AMBIGUOUS, cột "Ảnh hưởng" trỏ BR-xx).
@@ -52,9 +52,13 @@ Thể hiện luồng dạng bước tuần tự hoặc sơ đồ text:
52
52
 
53
53
  ## Output
54
54
 
55
+ Ghi vào **mục Data Flow** của `{paths.qc_dir}/{UC-ID}/REQUIREMENT_ANALYSIS.md`
56
+ (KHÔNG tạo file riêng — qc-analyze chỉ trả 2 file: `REQUIREMENT_ANALYSIS.md` + `DOC_GAPS.md`):
57
+
55
58
  - Sơ đồ/list luồng dữ liệu cho mỗi kịch bản chính.
56
59
  - 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
60
  - Gợi ý loại test cần cho từng điểm (gui-feature / integration / e2e) khi sang qa-designer.
60
61
  - Dữ liệu/trạng thái cần chuẩn bị & cleanup → đầu vào fixture cho qa-runner.
62
+
63
+ Chặng nào luồng/hành vi chưa rõ (vd lỗi xử lý ra sao, retry, partial commit) →
64
+ ghi vào `{paths.qc_dir}/{UC-ID}/DOC_GAPS.md` (loại MISSING / OPEN QUESTION).
@@ -46,12 +46,16 @@ F. GIẢ ĐỊNH & CÂU HỎI MỞ: điều suy ra được vs điều cần dev
46
46
 
47
47
  ## Output
48
48
 
49
- File Markdown tả yêu cầu cấu trúc (đặt trong `docs/<project>/<feature>/`):
49
+ ⚠️ `/qc-analyze` chỉ ghi **ĐÚNG 2 FILE** cho mỗi UC, đặt trong thư mục QC **lộ ra ngoài**
50
+ `{paths.qc_dir}/{UC-ID}/` (mặc định `docs/{UC-ID}/` — KHÔNG để trong `.agent/` ẩn):
51
+ `REQUIREMENT_ANALYSIS.md` + `DOC_GAPS.md`. KHÔNG tách mỗi bước phân tích thành file riêng.
52
+
53
+ Phần spec-breakdown là **mục đầu tiên** của `REQUIREMENT_ANALYSIS.md`:
50
54
  - Bảng chức năng + input/output/constraint
51
55
  - Sơ đồ/list luồng chính & phụ
52
56
  - Danh sách giả định và câu hỏi mở (đánh dấu rõ điều CHƯA chắc)
53
57
 
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`.
58
+ Đồng thời ghi mọi khoảng trống phát hiện vào `{paths.qc_dir}/{UC-ID}/DOC_GAPS.md`
59
+ (theo `{paths.qc_skills_dir}/qa-analyst/DOC_GAPS.template.md`), mỗi gap có ID `GAP-xx`.
56
60
 
57
61
  Kết thúc bằng gợi ý: feature đã đủ rõ để chuyển sang `qa-planner` (phân tích rủi ro) chưa.
@@ -37,5 +37,5 @@ Mỗi journey → 1 TC bám Format; Expected = chuỗi verify point; chuẩn b
37
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
38
 
39
39
  ## Output
40
- File TC e2e (hoặc nhóm E2E trong file feature) trong `docs/<project>/<feature>/`.
40
+ File TC e2e (hoặc nhóm E2E trong file feature) trong `{paths.qc_dir}/{UC-ID}/test-cases/`.
41
41
  In bảng `E2E-ID | Journey | Pri | Trace | Block` + bảng TC block. Bàn giao `qa-reviewer`.
@@ -63,6 +63,6 @@ Sinh 10-15 câu hỏi cho dev/BA (assumptions, edge case, error handling, securi
63
63
 
64
64
  ## Output
65
65
 
66
- Charter files: docs/<project>/exploratory/charters/<feature>_01.md, _02.md...
67
- Ideas file: docs/<project>/exploratory/ideas/<feature>.md
66
+ Charter files: {paths.qc_dir}/exploratory/charters/<feature>_01.md, _02.md...
67
+ Ideas file: {paths.qc_dir}/exploratory/ideas/<feature>.md
68
68
  Bảng tổng kết: STT | Charter | Tour | Risk | Time-box
@@ -37,7 +37,7 @@ Chuyển draft → TC chính thức bám **format file `TC_<FEATURE>.md`**:
37
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
38
  - **Test Data** dạng list · **Steps** `[Action]`/`[Verify]` · **Expected** 1 bullet cụ thể.
39
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`.
40
+ - Đặt file `{paths.qc_dir}/{UC-ID}/test-cases/TC_<FEATURE>.md`.
41
41
 
42
42
  ## Output
43
43
  File TC functional + bảng `TC_ID | Title | Priority | Technique | Trace`. Bàn giao `qa-reviewer`.
@@ -41,5 +41,5 @@ response (schema thành công + các mã lỗi 4xx/5xx + body lỗi) · side-eff
41
41
  - Mỗi TC bám khối Format; Expected ghi status code + phần body verify; trace BR; gap chặn → 🚫 Block.
42
42
 
43
43
  ## Output
44
- File TC (`TC_<FEATURE>_API.md` hoặc gộp trong file feature) trong `docs/<project>/<feature>/`.
44
+ File TC (`TC_<FEATURE>_API.md` hoặc gộp trong file feature) trong `{paths.qc_dir}/{UC-ID}/test-cases/`.
45
45
  In bảng TC + Trace matrix. Bàn giao `qa-reviewer`.
@@ -42,5 +42,5 @@ Liệt kê các màn/route + thứ tự điều hướng · state/dữ liệu tr
42
42
  - Mỗi TC bám khối Format; trace BR; gap chặn → 🚫 Block.
43
43
 
44
44
  ## Output
45
- File `TC_<FEATURE>.md` trong `docs/<project>/<feature>/`. In bảng TC + Trace matrix + bảng TC block.
45
+ File `TC_<FEATURE>.md` trong `{paths.qc_dir}/{UC-ID}/test-cases/`. In bảng TC + Trace matrix + bảng TC block.
46
46
  Bàn giao `qa-reviewer` (test-case).
@@ -48,5 +48,5 @@ chức năng (input/action/display/nav) · constraint (required/min-max/format/e
48
48
  - Mỗi TC bám khối Format trên; trace BR; TC chặn bởi gap → 🚫 Block.
49
49
 
50
50
  ## Output
51
- File `TC_<FEATURE>.md` trong `docs/<project>/<feature>/`. In bảng `TC_ID | Title | Priority | Tags | Trace`
51
+ File `TC_<FEATURE>.md` trong `{paths.qc_dir}/{UC-ID}/test-cases/`. In bảng `TC_ID | Title | Priority | Tags | Trace`
52
52
  + Trace matrix + bảng TC block. Bàn giao `qa-reviewer` (test-case).
@@ -39,4 +39,4 @@ Nhóm TC: happy (dữ liệu đúng đầu→cuối) → contract negative (inpu
39
39
  → concurrency → điều kiện đồng bộ (đổ/không đổ). Mỗi TC bám Format; trace BR; gap chặn → 🚫 Block.
40
40
 
41
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`.
42
+ File TC integration trong `{paths.qc_dir}/{UC-ID}/test-cases/`. Ưu tiên P0 cho định tuyến & tiền-dữ liệu. Bàn giao `qa-reviewer`.
@@ -35,5 +35,5 @@ Nhóm TC: ghi đúng giá trị (happy) → default/null đúng → update khôn
35
35
  → audit log → ràng buộc/unique (negative). Mỗi TC bám Format; trace BR; gap chặn → 🚫 Block.
36
36
 
37
37
  ## Output
38
- File TC trong `docs/<project>/<feature>/`. Ghi rõ query kiểm tra DB + yêu cầu cleanup;
38
+ File TC trong `{paths.qc_dir}/{UC-ID}/test-cases/`. Ghi rõ query kiểm tra DB + yêu cầu cleanup;
39
39
  không hardcode ID, chuẩn bị/dọn data qua fixture. Bàn giao `qa-reviewer`.
@@ -37,4 +37,4 @@ Nhóm TC: UI render đúng dữ liệu backend (happy) → empty state → lỗi
37
37
  Mỗi TC bám Format; trace BR; gap chặn → 🚫 Block.
38
38
 
39
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`.
40
+ File TC trong `{paths.qc_dir}/{UC-ID}/test-cases/`. Mỗi TC nêu API liên quan + biểu hiện UI. Bàn giao `qa-reviewer`.
@@ -37,4 +37,4 @@ Nhóm TC: phát đúng topic+payload (happy) → điều kiện không phát →
37
37
  Mỗi TC bám Format; trace BR; gap chặn → 🚫 Block.
38
38
 
39
39
  ## Output
40
- File TC trong `docs/<project>/<feature>/`. Mỗi TC ghi topic, key, payload cần verify + hành vi consumer. Bàn giao `qa-reviewer`.
40
+ File TC trong `{paths.qc_dir}/{UC-ID}/test-cases/`. Mỗi TC ghi topic, key, payload cần verify + hành vi consumer. Bàn giao `qa-reviewer`.
@@ -37,4 +37,4 @@ Mỗi TC bám Format; **Expected có ngưỡng pass + công cụ đo**; đánh d
37
37
  Trace BR; gap chặn → 🚫 Block.
38
38
 
39
39
  ## Output
40
- File TC non-functional trong `docs/<project>/<feature>/`. Mỗi TC ghi tiêu chí đo + ngưỡng + công cụ. Bàn giao `qa-reviewer`.
40
+ File TC non-functional trong `{paths.qc_dir}/{UC-ID}/test-cases/`. Mỗi TC ghi tiêu chí đo + ngưỡng + công cụ. Bàn giao `qa-reviewer`.
@@ -8,9 +8,9 @@ ported_from: ai-automation-qc-base
8
8
 
9
9
  Tổng hợp **output của qa-analyst** thành **Test Plan** cho một feature.
10
10
 
11
- **Đầu vào (bắt buộc, chỉ 2 nguồn):**
12
- 1. `docs/<project>/<feature>/REQUIREMENT_ANALYSIS.md` — chức năng, BR-xx, AC-xx, data flow (qa-analyst).
13
- 2. `docs/<project>/<feature>/DOC_GAPS.md` — bảng gap GAP-xx, mức độ, gap Blocker (qa-analyst).
11
+ **Đầu vào (bắt buộc, chỉ 2 nguồn — đúng 2 file qa-analyst trả ra):**
12
+ 1. `{paths.qc_dir}/{UC-ID}/REQUIREMENT_ANALYSIS.md` — chức năng, BR-xx, AC-xx, data flow (qa-analyst).
13
+ 2. `{paths.qc_dir}/{UC-ID}/DOC_GAPS.md` — bảng gap GAP-xx, mức độ, gap Blocker (qa-analyst).
14
14
 
15
15
  ## Khi nào trigger
16
16
  - "lập test plan cho [Feature]" / "viết test plan"
@@ -53,7 +53,7 @@ Tổng hợp **output của qa-analyst** thành **Test Plan** cho một feature.
53
53
 
54
54
  ## Output — Template `TEST_PLAN.md`
55
55
 
56
- Đặt tại `docs/<project>/<feature>/TEST_PLAN.md`:
56
+ Đặt tại `{paths.qc_dir}/{UC-ID}/TEST_PLAN.md`:
57
57
 
58
58
  ```markdown
59
59
  # Test Plan – <Feature>
@@ -23,7 +23,7 @@ Skill **tự chứa**, 2 mode:
23
23
  Input: charter + tour + tester + time-box. Tạo file gồm: metadata (date/tester/charter/tour/env/data) ·
24
24
  `#SETUP` (bước chuẩn bị) · `#TEST` (5–8 gợi ý theo tour) · `#BUG` template (title, severity, steps,
25
25
  expected/actual) · `#QUESTION`, `#IDEA` placeholder · summary cuối session.
26
- → `docs/<project>/exploratory/sessions/<YYYY-MM-DD>_<tester>.md`
26
+ → `{paths.qc_dir}/exploratory/sessions/<YYYY-MM-DD>_<tester>.md`
27
27
 
28
28
  ## Mode 2 — Convert Findings
29
29
  Input: session note (#BUG + #IDEA).
@@ -33,4 +33,4 @@ Input: session note (#BUG + #IDEA).
33
33
  - **Weekly summary** (nếu yêu cầu): overview, top findings, coverage gap, recommendations.
34
34
 
35
35
  ## Output
36
- Mode 1: file session note. Mode 2: bug reports + file TC trong `docs/<project>/<feature>/` + summary.
36
+ Mode 1: file session note. Mode 2: bug reports + file TC trong `{paths.qc_dir}/{UC-ID}/test-cases/` + summary.
@@ -331,6 +331,8 @@ Read `.agent/project-context.yaml`. Extract and store:
331
331
  - `paths.specs_dir` → BDD specs root
332
332
  - `paths.prd_dir` → PRD documents root
333
333
  - `paths.refinement_dir` → findings/review output dir
334
+ - `paths.qc_dir` → QC automation artifacts root (visible top-level, one subfolder per UC: `{qc_dir}/{UC-ID}/`)
335
+ - `paths.qc_skills_dir` → where qc-* commands load QC skills from (default bundled `.agent/skills/qc`; override to the QC team's own repo/submodule so framework upgrade won't overwrite them)
334
336
  - `paths.product_definitions_dir` → product definitions root
335
337
  - `paths.domain_knowledge_dir` → domain knowledge root
336
338
  - `paths.business_dictionary` → path to business-dictionary.md
@@ -343,6 +345,8 @@ If `paths` section is absent, use these defaults:
343
345
  - `specs_dir` = `specs/bdd`
344
346
  - `prd_dir` = `specs/prd`
345
347
  - `refinement_dir` = `.agent/review`
348
+ - `qc_dir` = `docs`
349
+ - `qc_skills_dir` = `.agent/skills/qc`
346
350
  - `product_definitions_dir` = `specs/product-definition`
347
351
  - `domain_knowledge_dir` = `specs/domain-knowledge`
348
352
  - `business_dictionary` = `specs/domain-knowledge/business-dictionary.md`
@@ -387,6 +391,7 @@ If `services` section is present:
387
391
  - Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
388
392
  - Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
389
393
  - Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
394
+ - Override `paths.prd_change_requests_dir` → `{spec_source}/feedback/prd-change-requests`
390
395
 
391
396
  > **Why under `spec_source`:** PRD, design-spec, domain knowledge, the **API contract (tech-docs)**, and tester feedback are all **cross-team artifacts** — they must live in the **shared spec repo** so every umbrella (FE/App/BE) reads the same source via `/sync`. Tech-docs specifically: BE authors the tech-design (API contract), commits + pushes it into the spec submodule (2-layer commit), and FE/App pull it on their next `/sync` to wire the real API in `/generate-code --phase=integration`. In single-service mode (no `spec_source`), these default under the repo root — still shared, same repo.
392
397
 
@@ -765,6 +770,8 @@ Read `.agent/project-context.yaml`. Extract and store:
765
770
  - `paths.specs_dir` → BDD specs root
766
771
  - `paths.prd_dir` → PRD documents root
767
772
  - `paths.refinement_dir` → findings/review output dir
773
+ - `paths.qc_dir` → QC automation artifacts root (visible top-level, one subfolder per UC: `{qc_dir}/{UC-ID}/`)
774
+ - `paths.qc_skills_dir` → where qc-* commands load QC skills from (default bundled `.agent/skills/qc`; override to the QC team's own repo/submodule so framework upgrade won't overwrite them)
768
775
  - `paths.product_definitions_dir` → product definitions root
769
776
  - `paths.domain_knowledge_dir` → domain knowledge root
770
777
  - `paths.business_dictionary` → path to business-dictionary.md
@@ -777,6 +784,8 @@ If `paths` section is absent, use these defaults:
777
784
  - `specs_dir` = `specs/bdd`
778
785
  - `prd_dir` = `specs/prd`
779
786
  - `refinement_dir` = `.agent/review`
787
+ - `qc_dir` = `docs`
788
+ - `qc_skills_dir` = `.agent/skills/qc`
780
789
  - `product_definitions_dir` = `specs/product-definition`
781
790
  - `domain_knowledge_dir` = `specs/domain-knowledge`
782
791
  - `business_dictionary` = `specs/domain-knowledge/business-dictionary.md`
@@ -821,6 +830,7 @@ If `services` section is present:
821
830
  - Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
822
831
  - Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
823
832
  - Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
833
+ - Override `paths.prd_change_requests_dir` → `{spec_source}/feedback/prd-change-requests`
824
834
 
825
835
  > **Why under `spec_source`:** PRD, design-spec, domain knowledge, the **API contract (tech-docs)**, and tester feedback are all **cross-team artifacts** — they must live in the **shared spec repo** so every umbrella (FE/App/BE) reads the same source via `/sync`. Tech-docs specifically: BE authors the tech-design (API contract), commits + pushes it into the spec submodule (2-layer commit), and FE/App pull it on their next `/sync` to wire the real API in `/generate-code --phase=integration`. In single-service mode (no `spec_source`), these default under the repo root — still shared, same repo.
826
836
 
@@ -36,6 +36,8 @@ Read `.agent/project-context.yaml`. Extract and store:
36
36
  - `paths.specs_dir` → BDD specs root
37
37
  - `paths.prd_dir` → PRD documents root
38
38
  - `paths.refinement_dir` → findings/review output dir
39
+ - `paths.qc_dir` → QC automation artifacts root (visible top-level, one subfolder per UC: `{qc_dir}/{UC-ID}/`)
40
+ - `paths.qc_skills_dir` → where qc-* commands load QC skills from (default bundled `.agent/skills/qc`; override to the QC team's own repo/submodule so framework upgrade won't overwrite them)
39
41
  - `paths.product_definitions_dir` → product definitions root
40
42
  - `paths.domain_knowledge_dir` → domain knowledge root
41
43
  - `paths.business_dictionary` → path to business-dictionary.md
@@ -48,6 +50,8 @@ If `paths` section is absent, use these defaults:
48
50
  - `specs_dir` = `specs/bdd`
49
51
  - `prd_dir` = `specs/prd`
50
52
  - `refinement_dir` = `.agent/review`
53
+ - `qc_dir` = `docs`
54
+ - `qc_skills_dir` = `.agent/skills/qc`
51
55
  - `product_definitions_dir` = `specs/product-definition`
52
56
  - `domain_knowledge_dir` = `specs/domain-knowledge`
53
57
  - `business_dictionary` = `specs/domain-knowledge/business-dictionary.md`
@@ -92,6 +96,7 @@ If `services` section is present:
92
96
  - Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
93
97
  - Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
94
98
  - Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
99
+ - Override `paths.prd_change_requests_dir` → `{spec_source}/feedback/prd-change-requests`
95
100
 
96
101
  > **Why under `spec_source`:** PRD, design-spec, domain knowledge, the **API contract (tech-docs)**, and tester feedback are all **cross-team artifacts** — they must live in the **shared spec repo** so every umbrella (FE/App/BE) reads the same source via `/sync`. Tech-docs specifically: BE authors the tech-design (API contract), commits + pushes it into the spec submodule (2-layer commit), and FE/App pull it on their next `/sync` to wire the real API in `/generate-code --phase=integration`. In single-service mode (no `spec_source`), these default under the repo root — still shared, same repo.
97
102