@anhth2/spec-driven-dev-plugin 0.11.0 → 0.14.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.
- package/commands/debug.md +47 -7
- package/commands/define-product.md +47 -7
- package/commands/dev-gen-test.md +65 -17
- package/commands/dev-run-test.md +66 -18
- package/commands/dev-run-test.tmpl +1 -1
- package/commands/dev-smoke-test.md +47 -7
- package/commands/fix-bug.md +83 -13
- package/commands/fix-bug.tmpl +36 -6
- package/commands/generate-bdd.md +74 -21
- package/commands/generate-bdd.tmpl +9 -4
- package/commands/generate-code.md +118 -35
- package/commands/generate-code.tmpl +53 -18
- package/commands/generate-design-spec.md +47 -7
- package/commands/generate-prd.md +47 -7
- package/commands/generate-spec-manifest.md +47 -7
- package/commands/generate-tech-docs.md +234 -20
- package/commands/generate-tech-docs.tmpl +187 -13
- package/commands/learn.md +47 -7
- package/commands/map-testids.md +564 -0
- package/commands/map-testids.tmpl +81 -0
- package/commands/propose-scenario.md +78 -18
- package/commands/propose-scenario.tmpl +31 -11
- package/commands/qc-analyze.md +67 -12
- package/commands/qc-analyze.tmpl +20 -5
- package/commands/qc-design-test.md +51 -10
- package/commands/qc-design-test.tmpl +4 -3
- package/commands/qc-plan.md +50 -10
- package/commands/qc-plan.tmpl +3 -3
- package/commands/qc-report.md +60 -8
- package/commands/qc-report.tmpl +13 -1
- package/commands/qc-review.md +49 -9
- package/commands/qc-review.tmpl +2 -2
- package/commands/qc-run-test.md +75 -20
- package/commands/qc-run-test.tmpl +10 -3
- package/commands/refine-prd.md +47 -7
- package/commands/report-bug.md +63 -9
- package/commands/report-bug.tmpl +16 -2
- package/commands/review-code.md +47 -7
- package/commands/review-context.md +47 -7
- package/commands/review-tech-docs.md +50 -9
- package/commands/review-tech-docs.tmpl +3 -2
- package/commands/setup-ai-first.md +37 -4
- package/commands/setup-ai-first.tmpl +2 -2
- package/commands/sync.md +47 -11
- package/commands/sync.tmpl +12 -9
- package/commands/update-framework.md +35 -2
- package/commands/validate-traces.md +98 -40
- package/commands/validate-traces.tmpl +51 -33
- package/core/FRAMEWORK_VERSION +1 -1
- package/core/commands/debug.md +47 -7
- package/core/commands/define-product.md +47 -7
- package/core/commands/dev-gen-test.md +65 -17
- package/core/commands/dev-run-test.md +66 -18
- package/core/commands/dev-smoke-test.md +47 -7
- package/core/commands/fix-bug.md +83 -13
- package/core/commands/generate-bdd.md +74 -21
- package/core/commands/generate-code.md +118 -35
- package/core/commands/generate-design-spec.md +47 -7
- package/core/commands/generate-prd.md +47 -7
- package/core/commands/generate-spec-manifest.md +47 -7
- package/core/commands/generate-tech-docs.md +234 -20
- package/core/commands/learn.md +47 -7
- package/core/commands/map-testids.md +564 -0
- package/core/commands/propose-scenario.md +78 -18
- package/core/commands/qc-analyze.md +67 -12
- package/core/commands/qc-design-test.md +51 -10
- package/core/commands/qc-plan.md +50 -10
- package/core/commands/qc-report.md +60 -8
- package/core/commands/qc-review.md +49 -9
- package/core/commands/qc-run-test.md +75 -20
- package/core/commands/refine-prd.md +47 -7
- package/core/commands/report-bug.md +63 -9
- package/core/commands/review-code.md +47 -7
- package/core/commands/review-context.md +47 -7
- package/core/commands/review-tech-docs.md +50 -9
- package/core/commands/setup-ai-first.md +37 -4
- package/core/commands/sync.md +47 -11
- package/core/commands/update-framework.md +35 -2
- package/core/commands/validate-traces.md +98 -40
- package/core/modules/qc-playwright/stack-profile.yaml +4 -3
- package/core/skills/code/SKILL.md +82 -9
- package/core/skills/debug/SKILL.md +117 -11
- package/core/skills/design-spec/SKILL.md +47 -7
- package/core/skills/discovery/SKILL.md +47 -7
- package/core/skills/prd/SKILL.md +70 -4
- package/core/skills/qc/qa-analyst/acceptance-criteria.md +5 -1
- package/core/skills/qc/qa-analyst/business-rules.md +6 -2
- package/core/skills/qc/qa-analyst/data-flow.md +6 -2
- package/core/skills/qc/qa-analyst/spec-breakdown.md +7 -3
- package/core/skills/qc/qa-designer/e2e/journey.md +1 -1
- package/core/skills/qc/qa-designer/exploratory/charter.md +2 -2
- package/core/skills/qc/qa-designer/exploratory/explore-to-functional.md +1 -1
- package/core/skills/qc/qa-designer/functional/api.md +1 -1
- package/core/skills/qc/qa-designer/functional/gui-feature.md +1 -1
- package/core/skills/qc/qa-designer/functional/gui-screen.md +1 -1
- package/core/skills/qc/qa-designer/integration/api.md +1 -1
- package/core/skills/qc/qa-designer/integration/db.md +1 -1
- package/core/skills/qc/qa-designer/integration/gui.md +1 -1
- package/core/skills/qc/qa-designer/integration/kafka.md +1 -1
- package/core/skills/qc/qa-designer/non-functional.md +1 -1
- package/core/skills/qc/qa-planner/test-plan.md +4 -4
- package/core/skills/qc/qa-runner/exploratory/session.md +2 -2
- package/core/skills/setup-ai-first/SKILL.md +35 -2
- package/core/skills/spec/SKILL.md +70 -4
- package/core/skills/test/SKILL.md +129 -16
- package/core/steps/context-loader.md +12 -5
- package/core/steps/report-footer.md +35 -2
- package/core/steps/trace-mirror.md +18 -10
- package/core/templates/project-context.yaml +27 -6
- package/docs/01-getting-started/core-concepts.md +7 -7
- package/docs/01-getting-started/installation.md +4 -2
- package/docs/01-getting-started/quickstart.md +1 -1
- package/docs/02-guides/README.md +1 -2
- package/docs/02-guides/developer/README.md +1 -1
- package/docs/02-guides/developer/bdd-and-trace.md +10 -8
- package/docs/02-guides/developer/commands.md +4 -4
- package/docs/02-guides/developer/scenarios.md +26 -14
- package/docs/02-guides/developer/workflow.md +81 -19
- package/docs/02-guides/product-owner/README.md +6 -4
- package/docs/02-guides/product-owner/commands.md +1 -1
- package/docs/02-guides/product-owner/scenarios.md +80 -1
- package/docs/02-guides/tester/README.md +13 -10
- package/docs/02-guides/tester/bug-reporting.md +2 -2
- package/docs/02-guides/tester/qc-automation.md +165 -0
- package/docs/02-guides/tester/reading-specs.md +4 -4
- package/docs/02-guides/tester/scenarios.md +5 -5
- package/docs/02-guides/tester/spec-manifest.md +17 -12
- package/docs/02-guides/tester/test-checklist.md +3 -3
- package/docs/02-guides/tester/workflow.md +12 -14
- package/docs/03-concepts/architecture.md +7 -4
- package/docs/03-concepts/pipeline.md +37 -12
- package/docs/03-concepts/traceability.md +19 -18
- package/docs/04-operations/README.md +1 -1
- package/docs/04-operations/bug-flow.md +46 -5
- package/docs/04-operations/sync-and-update.md +186 -24
- package/docs/05-reference/README.md +3 -0
- package/docs/05-reference/command-cheatsheet.md +147 -0
- package/docs/05-reference/commands.md +73 -70
- package/docs/05-reference/modules.md +4 -4
- package/docs/05-reference/trace-schema.md +23 -16
- package/docs/README.md +3 -5
- package/modules/qc-playwright/stack-profile.yaml +4 -3
- package/package.json +1 -1
- package/skills/code/SKILL.md +82 -9
- package/skills/debug/SKILL.md +117 -11
- package/skills/design-spec/SKILL.md +47 -7
- package/skills/discovery/SKILL.md +47 -7
- package/skills/prd/SKILL.md +70 -4
- package/skills/qc/qa-analyst/acceptance-criteria.md +5 -1
- package/skills/qc/qa-analyst/business-rules.md +6 -2
- package/skills/qc/qa-analyst/data-flow.md +6 -2
- package/skills/qc/qa-analyst/spec-breakdown.md +7 -3
- package/skills/qc/qa-designer/e2e/journey.md +1 -1
- package/skills/qc/qa-designer/exploratory/charter.md +2 -2
- package/skills/qc/qa-designer/exploratory/explore-to-functional.md +1 -1
- package/skills/qc/qa-designer/functional/api.md +1 -1
- package/skills/qc/qa-designer/functional/gui-feature.md +1 -1
- package/skills/qc/qa-designer/functional/gui-screen.md +1 -1
- package/skills/qc/qa-designer/integration/api.md +1 -1
- package/skills/qc/qa-designer/integration/db.md +1 -1
- package/skills/qc/qa-designer/integration/gui.md +1 -1
- package/skills/qc/qa-designer/integration/kafka.md +1 -1
- package/skills/qc/qa-designer/non-functional.md +1 -1
- package/skills/qc/qa-planner/test-plan.md +4 -4
- package/skills/qc/qa-runner/exploratory/session.md +2 -2
- package/skills/setup-ai-first/SKILL.md +35 -2
- package/skills/spec/SKILL.md +70 -4
- package/skills/test/SKILL.md +129 -16
- package/steps/context-loader.md +12 -5
- package/steps/report-footer.md +35 -2
- package/steps/trace-mirror.md +18 -10
- package/templates/project-context.yaml +27 -6
- package/docs/02-guides/qc-automation.md +0 -92
|
@@ -13,15 +13,15 @@
|
|
|
13
13
|
- [ ] Cross-service flows đã được verify (nếu feature span nhiều service)
|
|
14
14
|
|
|
15
15
|
**TSV & Living Docs:**
|
|
16
|
-
- [ ] `/qc-run-test` đã chạy → `qc_status` đã ghi vào `{
|
|
17
|
-
- [ ] TSV đã được commit vào
|
|
16
|
+
- [ ] `/qc-run-test` đã chạy → `qc_status` đã ghi vào `{spec_source}/.trace/{UC-ID}.tsv` (spec repo — một chỗ)
|
|
17
|
+
- [ ] TSV đã được commit vào **spec repo** (1 tầng, giống `feedback/`) + push — KHÔNG commit vào service submodule
|
|
18
18
|
- [ ] `/validate-traces` (hoặc `/sync`) đã chạy → Living Docs panel hiển thị `qc_status: pass`
|
|
19
19
|
- [ ] Không còn scenario nào `qc_status: not_run` trong UC đang test
|
|
20
20
|
- [ ] Nếu có `qc_status: fail` → đã `/report-bug` kèm path evidence (`reports/<feature>/report.html`)
|
|
21
21
|
|
|
22
22
|
## Xem Thêm
|
|
23
23
|
|
|
24
|
-
- [Guide › QC Automation](
|
|
24
|
+
- [Guide › QC Automation](qc-automation.md) — pipeline `/qc-*` chi tiết, `qc_status`, stack `qc-playwright`
|
|
25
25
|
- [Operations › Bug Flow](../../04-operations/bug-flow.md) — flow phối hợp Tester ↔ Dev ↔ PO
|
|
26
26
|
- [Concepts › Traceability](../../03-concepts/traceability.md) — trace TSV, dev_selftest vs qc_status
|
|
27
27
|
- [Reference › Commands](../../05-reference/commands.md) — danh mục đầy đủ mọi command
|
|
@@ -17,9 +17,10 @@ Lookup FT-042 trong spec-manifest.yaml
|
|
|
17
17
|
→ status: approved? ✅ (nếu draft → dừng, báo PO)
|
|
18
18
|
→ ghi lại paths (tất cả đều nằm trong submodule):
|
|
19
19
|
prd: {spec_source}/specs/prd/{domain}/FT-042-*.md
|
|
20
|
-
bdd.
|
|
21
|
-
bdd.web: {
|
|
20
|
+
bdd.system: {spec_source}/specs/bdd/{domain}/system/FT-042-*.feature
|
|
21
|
+
bdd.web: {spec_source}/specs/bdd/{domain}/web/FT-042-*.feature
|
|
22
22
|
tech_docs.be: {spec_source}/specs/tech-docs/{domain}/FT-042-*.md
|
|
23
|
+
tech_docs.fe: {spec_source}/specs/tech-docs/{domain}/FT-042-*-tech-design-web.md
|
|
23
24
|
│
|
|
24
25
|
▼
|
|
25
26
|
Đọc PRD tại path manifest.prd
|
|
@@ -28,7 +29,7 @@ Lookup FT-042 trong spec-manifest.yaml
|
|
|
28
29
|
│
|
|
29
30
|
▼
|
|
30
31
|
Đọc BDD tại path manifest.bdd.be / bdd.web
|
|
31
|
-
→ file nằm trong
|
|
32
|
+
→ file nằm trong SPEC submodule (PO gen từ PRD — tất cả BDD web/app/system ở spec repo)
|
|
32
33
|
→ mỗi Scenario = 1 test case cần cover
|
|
33
34
|
→ BE có BDD riêng (system/), Web có BDD riêng (web/), App có BDD riêng (app/)
|
|
34
35
|
│
|
|
@@ -41,30 +42,27 @@ Lookup FT-042 trong spec-manifest.yaml
|
|
|
41
42
|
▼
|
|
42
43
|
Chạy QC automation pipeline (6 bước — ghi kết quả chính thức vào TSV)
|
|
43
44
|
│
|
|
44
|
-
├─ /qc-analyze {UC-ID} →
|
|
45
|
-
├─ /qc-plan {UC-ID} → risk +
|
|
46
|
-
├─ /qc-design-test {UC-ID} →
|
|
45
|
+
├─ /qc-analyze {UC-ID} → 2 file: REQUIREMENT_ANALYSIS.md + DOC_GAPS.md
|
|
46
|
+
├─ /qc-plan {UC-ID} → TEST_PLAN.md (risk + plan + questions-for-dev)
|
|
47
|
+
├─ /qc-design-test {UC-ID} → test-cases/*.Test.md
|
|
48
|
+
│ ⌙ artifact phân tích/thiết kế → {qc_dir}/{UC-ID}/ (mặc định docs/, VISIBLE)
|
|
47
49
|
├─ /qc-review {UC-ID} → review test design trước khi chạy
|
|
48
50
|
├─ /qc-run-test {UC-ID} → sinh + chạy pytest-playwright
|
|
49
51
|
│ → ghi qc_status (pass/fail/skip) per scenario
|
|
50
|
-
│ → vào {
|
|
52
|
+
│ → vào {spec_source}/.trace/{UC-ID}.tsv ← AUTHORITATIVE (spec repo)
|
|
51
53
|
└─ /qc-report {UC-ID} → report pytest-html + Playwright trace evidence
|
|
52
54
|
→ reports/<feature>/report.html ← LOCAL, gitignored
|
|
53
55
|
│
|
|
54
56
|
▼
|
|
55
|
-
Commit TSV vào
|
|
56
|
-
cd {
|
|
57
|
+
Commit TSV vào spec repo (1 tầng — trace dồn về specs, giống feedback/)
|
|
58
|
+
cd {spec_source}
|
|
57
59
|
git add .trace/{UC-ID}.tsv
|
|
58
60
|
git commit -m "qc: record qc_status for {UC-ID} — pass/fail"
|
|
59
|
-
git push
|
|
60
|
-
cd .. ← umbrella root
|
|
61
|
-
git add {service}
|
|
62
|
-
git commit -m "chore: update {service} submodule pointer — {UC-ID} qc_status"
|
|
63
61
|
git push
|
|
64
62
|
│
|
|
65
63
|
▼
|
|
66
64
|
/validate-traces (hoặc /sync)
|
|
67
|
-
→
|
|
65
|
+
→ đọc {spec_source}/.trace/ (một chỗ) → Living Docs cập nhật cột qc_status
|
|
68
66
|
│
|
|
69
67
|
▼
|
|
70
68
|
Kết quả:
|
|
@@ -56,12 +56,15 @@ LAYER 4 — EXECUTION (command logic)
|
|
|
56
56
|
│
|
|
57
57
|
LAYER 5 — OUTPUT (artifacts in consumer proj)
|
|
58
58
|
Spec module (cross-team, via {spec_source}):
|
|
59
|
-
specs/product-definition/ · specs/prd/ · specs/bdd/
|
|
60
|
-
specs/tech-docs/ (API contract) ·
|
|
59
|
+
specs/product-definition/ · specs/prd/ · specs/bdd/ (web/app/system)
|
|
60
|
+
specs/tech-docs/ (API contract + FE tech-design) · feedback/
|
|
61
|
+
.trace/*.tsv (authoritative, committed — một chỗ cho PM) · .living-docs/ (gitignored)
|
|
61
62
|
Service submodule (per-service):
|
|
62
|
-
src/
|
|
63
|
+
src/ (chỉ code) · .agent/review/
|
|
63
64
|
QC automation outputs:
|
|
64
65
|
QC test cases / scripts (Python pytest-playwright, Page Object)
|
|
66
|
+
→ QC analysis / test-cases ghi vào {qc_dir}/{UC-ID}/ (mặc định docs/,
|
|
67
|
+
visible — KHÔNG nằm trong .agent/)
|
|
65
68
|
→ guides per-layer ở skills/qc/<stage>/ · qc_status trong .trace/*.tsv
|
|
66
69
|
```
|
|
67
70
|
|
|
@@ -217,7 +220,7 @@ spec-driven-dev/
|
|
|
217
220
|
|
|
218
221
|
> **Umbrella mode — API contract (tech-docs) là cross-team artifact:** khi `setup.spec_source` được set, tech-docs LUÔN route về `{spec_source}/specs/tech-docs/` (giống PRD / design-spec / domain-knowledge), KHÔNG per-service — để FE/App đọc contract qua spec submodule ở `/generate-code --phase=integration`. Chỉ khi không có `spec_source` thì tech-docs mới nằm per-service.
|
|
219
222
|
|
|
220
|
-
> **Living Docs / trace data location:** `.trace/*.tsv`
|
|
223
|
+
> **Living Docs / trace data location:** khi `spec_source` set, `.trace/*.tsv` **authoritative** nằm **một chỗ** ở `{spec_source}/.trace/` (committed trong spec repo — PM quản lý tập trung; mỗi scenario mang `@trace.service`). Report `trace-report.json` sinh vào `{spec_source}/.living-docs/` (gitignored) + panel mirror cục bộ `./.trace`. Chỉ khi không có `spec_source` thì `.trace` mới per-service. Chi tiết: [traceability.md](traceability.md#living-docs--canonical-trong-spec-module--panel-mirror).
|
|
221
224
|
|
|
222
225
|
---
|
|
223
226
|
|
|
@@ -27,7 +27,7 @@ Vòng đời feature đi qua các phase, mỗi transition có một **AI review
|
|
|
27
27
|
| **2. PRD** | AI → SA/PO review | `/generate-prd`, `/refine-prd`, `/review-context` | `specs/prd/{domain}/{TICKET-ID}-{slug}.md` |
|
|
28
28
|
| **2b. Design Spec** *(FE/App only)* | AI → Designer/PO sign-off | `/generate-design-spec` | `specs/design-spec/{domain}/{TICKET-ID}-design-spec-{platform}.md` |
|
|
29
29
|
| **3. BDD Spec** | AI → SA/Dev review | `/generate-bdd`, `/review-context` | `specs/bdd/{domain}/{UC-ID}.feature` |
|
|
30
|
-
| **4. Tech Design** | AI → SA/Lead review | `/generate-tech-docs`, `/review-tech-docs` | `tech-docs/{domain}/{UC-ID}-tech-design.md` |
|
|
30
|
+
| **4. Tech Design** *(platform-aware)* | AI → SA/Lead review | `/generate-tech-docs`, `/review-tech-docs` | BE: `tech-docs/{domain}/{UC-ID}-tech-design.md` (API contract) · FE/App: `{UC-ID}-tech-design-{platform}.md` (client design — **gated** trên System BDD + BE contract) |
|
|
31
31
|
| **5. Code** | AI → Dev review | `/generate-code` *(FE: `--phase=ui`/`--phase=integration`)*, `/review-code` | `src/...` |
|
|
32
32
|
| **6. Dev Self-Check** | Dev (own code) | `/dev-gen-test`, `/dev-run-test`, `/dev-smoke-test` | `src/test/...` — dev smoke (`dev_selftest`), tách khỏi QC suite |
|
|
33
33
|
| **6b. QC Automation** *(official QC suite)* | QC | `/qc-analyze` → `/qc-plan` → `/qc-design-test` → `/qc-review` → `/qc-run-test` → `/qc-report` | QC test designs + run results — set `qc_status` (`qc-playwright` module) |
|
|
@@ -64,21 +64,33 @@ Phase 2b/3: Design Spec & BDD
|
|
|
64
64
|
sign-off + /generate-bdd blocked tới khi mọi screen có link)
|
|
65
65
|
[Designer review + PO sign-off]
|
|
66
66
|
/generate-bdd ────────────→ specs/bdd/{domain}/{UC-ID}.feature
|
|
67
|
+
THỨ TỰ OUTSIDE-IN (khi có client): web → app → system
|
|
68
|
+
System BDD được TỔNG HỢP từ web+app BDD (client-facing trước → BE/system suy ra để phục vụ)
|
|
69
|
+
(project chỉ-BE, không web/app: system gen thẳng từ PRD)
|
|
67
70
|
(apply platform vocabulary: web "clicks" / mobile "taps" / backend "submits a request")
|
|
68
71
|
/review-context {feature} → .agent/review/{uc-id}-review-bdd-findings.yaml
|
|
69
72
|
Checks: PRD coverage (mỗi AC + BR bullet → ≥1 scenario) · Gherkin R1–R10 · compliance C1–C5
|
|
70
73
|
✅ APPROVED → Phase 4
|
|
71
74
|
|
|
72
|
-
Phase 4: Tech Design
|
|
73
|
-
|
|
74
|
-
|
|
75
|
+
Phase 4: Tech Design (platform-aware — đọc @trace.platform)
|
|
76
|
+
BE (system):
|
|
77
|
+
/generate-tech-docs {system .feature} → tech-docs/{domain}/{UC-ID}-tech-design.md
|
|
78
|
+
API contract: endpoints, data model, DB, caching (brownfield: reverse-document)
|
|
79
|
+
FE/App (web|app) — GATED, cần CÓ trước: System BDD + BE contract (approved):
|
|
80
|
+
/generate-tech-docs {web|app .feature} → tech-docs/{domain}/{UC-ID}-tech-design-{platform}.md
|
|
81
|
+
client design: components, state, API-integration map theo BE contract, routing,
|
|
82
|
+
§2b Test Selectors (test-id ổn định cho element có action → QC locate khỏi scan)
|
|
83
|
+
(thiếu System BDD hoặc BE contract → HALT, in hướng dẫn)
|
|
75
84
|
/review-tech-docs ────────→ .agent/review/{uc-id}-tech-review-findings.yaml
|
|
76
85
|
[Review Board] → --resume (apply + bump revision)
|
|
77
86
|
✅ APPROVED → Phase 5
|
|
78
87
|
|
|
79
88
|
Phase 5: Code
|
|
80
89
|
/generate-code ───────────→ src/... (@trace.implements tags)
|
|
81
|
-
FE: --phase=ui (UI + mock adapter, tester-ready)
|
|
90
|
+
FE: --phase=ui (UI + mock adapter, tester-ready)
|
|
91
|
+
mock shape: BE contract nếu có (chuẩn) → else System BDD (tạm, warn) — fixture values luôn từ System BDD
|
|
92
|
+
→ khi BE contract approved → /generate-tech-docs {web|app} (FE design, Phase 4)
|
|
93
|
+
→ --phase=integration (wire real API theo §4 của FE tech-design)
|
|
82
94
|
(component enforcement: ✅ existing / ⚠️ TODO blocked / ❌ NEW confirm)
|
|
83
95
|
/review-code ─────────────→ Report: Critical / Major / Minor → fix CRITICAL/MAJOR
|
|
84
96
|
|
|
@@ -90,10 +102,13 @@ Phase 5 (cont): Dev Self-Check (dev verifies their OWN code — NOT the officia
|
|
|
90
102
|
|
|
91
103
|
Phase 5b: QC Automation (the OFFICIAL QC suite — see below)
|
|
92
104
|
|
|
93
|
-
Phase 6: Tester Feedback (QA → PO/Dev, closes the loop)
|
|
94
|
-
/report-bug {UC-ID} ──────→ {spec}/feedback/bug-reports/{BUG-ID}.md
|
|
95
|
-
/propose-scenario {UC-ID} → {spec}/feedback/bdd-proposals/{...}.md
|
|
96
|
-
|
|
105
|
+
Phase 6: Tester / QC Feedback (QA/QC → PO/Dev, closes the loop)
|
|
106
|
+
/report-bug {UC-ID} ──────→ {spec}/feedback/bug-reports/{BUG-ID}.md (State: Open) → push
|
|
107
|
+
/propose-scenario {UC-ID} → behavior ∈ AC → {spec}/feedback/bdd-proposals/{...}.md → push
|
|
108
|
+
behavior MỚI → {spec}/feedback/prd-change-requests/{...}.md → push
|
|
109
|
+
QC nguồn: /qc-run-test FAIL & /qc-analyze DOC_GAPS cũng route vào đây
|
|
110
|
+
PO/Dev: /sync → "📥 State: Open" → /fix-bug {BUG-ID} (Open→Fixed) · add BDD · update PRD
|
|
111
|
+
QC: /qc-run-test re-verify pass → bug Closed (qc_owner/qc_blocked_by clear)
|
|
97
112
|
|
|
98
113
|
Cross-cutting (any role, anytime)
|
|
99
114
|
/sync ────────────────────→ git pull + submodules + Living Docs + surface feedback
|
|
@@ -117,8 +132,18 @@ BDD approved (specs/bdd/*.feature)
|
|
|
117
132
|
/qc-analyze → /qc-plan → /qc-design-test → /qc-review → /qc-run-test → /qc-report
|
|
118
133
|
(đọc UC/SC, phân tích) chạy test → set qc_status
|
|
119
134
|
▼ ▼
|
|
120
|
-
QC test cases
|
|
121
|
-
(
|
|
135
|
+
QC analysis + test cases .trace/*.tsv: qc_status
|
|
136
|
+
→ {qc_dir}/{UC-ID}/ (visible, mặc định docs/) (pass/fail/skip/not_run)
|
|
137
|
+
REQUIREMENT_ANALYSIS.md · DOC_GAPS.md · + qc_owner / qc_blocked_by
|
|
138
|
+
TEST_PLAN.md · test-cases/*.Test.md (skills load từ {qc_skills_dir})
|
|
139
|
+
|
|
140
|
+
── Feedback loop về spec (đóng vòng) ───────────────────────────────────
|
|
141
|
+
/qc-analyze DOC_GAPS blocker (spec sai/mơ hồ) ┐
|
|
142
|
+
/qc-run-test FAIL = product-gap ├─▶ /report-bug · /propose-scenario
|
|
143
|
+
/qc-report tổng hợp gap → in sẵn lệnh ┘ │ (cùng flow tester)
|
|
144
|
+
▼
|
|
145
|
+
feedback/ trong spec repo (State: Open)
|
|
146
|
+
→ commit+push → PO/Dev thấy qua /sync (xem bug-flow.md)
|
|
122
147
|
|
|
123
148
|
Mapping: mỗi QC test → scenario qua @trace.verifies={UC-ID}-SC{N}
|
|
124
149
|
```
|
|
@@ -171,7 +196,7 @@ Load toàn bộ project context vào working memory theo thứ tự ưu tiên ng
|
|
|
171
196
|
| Step | Priority | What loads |
|
|
172
197
|
|------|----------|-----------|
|
|
173
198
|
| 1 | PROJECT-CONFIG | `project-context.yaml` → stack, conventions, domains, services, paths |
|
|
174
|
-
| 1.5 | SERVICE ROUTING | *(umbrella only)* detect active domain, route `
|
|
199
|
+
| 1.5 | SERVICE ROUTING | *(umbrella only)* detect active domain, route `trace_dir` (+ code) tới service submodule, store `service_root`. Khi `spec_source` set: `specs_dir` (BDD) / `tech_docs_dir` / PRD / design-spec / domain-knowledge / feedback → **spec repo** (cross-team), KHÔNG per-service |
|
|
175
200
|
| 1.6 | SERVICE CONVENTIONS | *(umbrella only)* load `{service_root}/.agent/project-context.yaml` → override `test_command`, `build_command`, `paths.trace_dir` |
|
|
176
201
|
| 2 | PROJECT-CONFIG | `.agent/modules/{module}/stack-profile.yaml` → layer patterns |
|
|
177
202
|
| 3 | **CRITICAL** | `CLAUDE.md` → architecture layers, coding standards, naming |
|
|
@@ -22,12 +22,12 @@ Mỗi artifact mang `@trace.*` metadata liên kết về artifact trước nó:
|
|
|
22
22
|
|
|
23
23
|
```
|
|
24
24
|
product-definition.md
|
|
25
|
-
└─► PRD.md (
|
|
26
|
-
└─► {UC-ID}.feature (@trace.
|
|
27
|
-
└─► tech-design
|
|
28
|
-
└─► src/ code (@trace.implements
|
|
25
|
+
└─► PRD.md (@trace.domain, @trace.status; Service/Module trong metadata)
|
|
26
|
+
└─► specs/bdd/{domain}/{web|app|system}/{UC-ID}.feature (@trace.prd_version, @trace.module)
|
|
27
|
+
└─► specs/tech-docs/{domain}/{UC-ID}-tech-design*.md (@trace.bdd_version)
|
|
28
|
+
└─► src/ code — service submodule (@trace.implements)
|
|
29
29
|
└─► src/test/ (@trace.verifies, @trace.service)
|
|
30
|
-
|
|
30
|
+
════► {spec_source}/.trace/{UC-ID}.tsv — TSV authoritative ở SPEC repo (coverage/drift)
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
**Các trace field quan trọng:**
|
|
@@ -62,7 +62,7 @@ Ví dụ tags trong `.feature`, code, và test:
|
|
|
62
62
|
|
|
63
63
|
## Trace TSV — coverage & drift
|
|
64
64
|
|
|
65
|
-
`.trace/{UC-ID}.tsv` là nguồn sự thật per-scenario về trạng thái implement/test. Được **ghi** bởi `/generate-bdd`, `/generate-code`, `/dev-gen-test`, `/qc-run-test`, và **update** bởi `/validate-traces`.
|
|
65
|
+
`.trace/{UC-ID}.tsv` là nguồn sự thật per-scenario về trạng thái implement/test. Được **ghi** bởi `/generate-bdd`, `/generate-code`, `/dev-gen-test`, `/qc-run-test`, và **update** bởi `/validate-traces`. Khi `spec_source` set, file `.trace/*.tsv` authoritative **được commit ở một chỗ** trong spec repo (`{spec_source}/.trace/`) — một nơi cho PM quản lý; mỗi scenario mang `@trace.service`. (Không có `spec_source` → `.trace` per-service.)
|
|
66
66
|
|
|
67
67
|
Status coverage per scenario:
|
|
68
68
|
|
|
@@ -103,28 +103,29 @@ Living Docs (VS Code panel) đọc trace TSV và hiển thị traceability healt
|
|
|
103
103
|
└──────────────────────────────────────────────────────────────────┘
|
|
104
104
|
```
|
|
105
105
|
|
|
106
|
-
- Drill down: PRD → UC → per-scenario table (Spec ver, Gen ver, Code, Tests, **Dev Self-Check**, **QC Status**, Status)
|
|
106
|
+
- Drill down: PRD → UC → per-scenario table (Spec ver, Gen ver, Code, Tests, **Dev Self-Check**, **QC Status**, **Waiting on**, Status)
|
|
107
|
+
- **Waiting on** (cột `qc_owner` + `qc_blocked_by`): cho PO/PM thấy case chưa pass đang **chờ dev** (product-gap → `BUG-{id}`) hay **chờ PO** confirm/clarify (spec gap → `GAP-{id}`). Aggregates `waiting_dev` / `waiting_po` ở header dashboard.
|
|
107
108
|
- Status badges: ✅ OK · ⚠️ DRIFT · 🔴 GAP · — UNTRACKED · filter theo domain/PRD status/doc status · search theo UC/SC ID.
|
|
108
109
|
|
|
109
110
|
**Ba nơi chứa trace data — phân biệt authoritative vs mirror:**
|
|
110
111
|
|
|
111
112
|
| Vị trí | Vai trò | Commit? |
|
|
112
113
|
|--------|---------|---------|
|
|
113
|
-
| `{
|
|
114
|
-
| `{spec_source}/.living-docs
|
|
115
|
-
| `./.trace` của workspace hiện tại | **Panel mirror** — giữ Living Docs panel không trống
|
|
114
|
+
| `{spec_source}/.trace/*.tsv` | **Authoritative** — nguồn sự thật, một chỗ cho cả team/PM (mỗi row mang `@trace.service`) | ✅ Committed trong spec repo |
|
|
115
|
+
| `{spec_source}/.living-docs/trace-report.json` | **Report** — dashboard tổng hợp, regenerate bởi `/sync` hoặc `/validate-traces` | ❌ Gitignored |
|
|
116
|
+
| `./.trace` của workspace hiện tại | **Panel mirror** — giữ Living Docs panel không trống khi mở Claude Code/VS Code ở một repo không phải spec repo | ❌ Gitignored |
|
|
116
117
|
|
|
117
|
-
**Vì sao
|
|
118
|
+
**Vì sao authoritative + report nằm ở spec module?** Spec module được mount vào mọi umbrella/service workspace, nên là nơi chung luôn resolve được cho cross-team dashboard, và là **một chỗ duy nhất** để PM/PO quản lý trạng thái. Code-side commands (`/generate-code`, `/dev-run-test`, `/qc-run-test`) chạy trong service nhưng ghi trace cross-repo vào đây (giống `feedback/`). Panel mirror `./.trace` chỉ để panel không trống khi mở một repo lẻ.
|
|
118
119
|
|
|
119
|
-
Thêm vào `.gitignore` (
|
|
120
|
+
Thêm vào `.gitignore` (report + mirror là read-only generated, không commit; `.trace/*.tsv` thì commit trong spec repo):
|
|
120
121
|
```
|
|
121
122
|
# spec module
|
|
122
123
|
.living-docs/
|
|
123
|
-
# workspace
|
|
124
|
+
# workspace không phải spec repo (panel mirror)
|
|
124
125
|
.trace/
|
|
125
126
|
```
|
|
126
127
|
|
|
127
|
-
> **Prerequisite cho data chính xác:**
|
|
128
|
+
> **Prerequisite cho data chính xác:** umbrella cần `setup.spec_source` trỏ đúng spec submodule → framework ghi mọi trace TSV vào `{spec_source}/.trace`. (Chế độ không có `spec_source` mới cần `paths.trace_dir` per-service.)
|
|
128
129
|
|
|
129
130
|
---
|
|
130
131
|
|
|
@@ -134,10 +135,10 @@ Chạy `/validate-traces {domain}` bất cứ lúc nào (đặc biệt **sau m
|
|
|
134
135
|
|
|
135
136
|
```
|
|
136
137
|
/validate-traces {domain}
|
|
137
|
-
→ Reads .trace/*.tsv authoritative (committed)
|
|
138
|
-
|
|
139
|
-
→ Writes
|
|
140
|
-
→ Writes panel mirror → ./.trace của workspace hiện tại (non-empty khi mở
|
|
138
|
+
→ Reads .trace/*.tsv authoritative (committed) từ MỘT chỗ: {spec_source}/.trace/
|
|
139
|
+
(mỗi scenario mang @trace.service — không cần quét/merge từng service)
|
|
140
|
+
→ Writes trace-report.json → {spec_source}/.living-docs/ (generated, gitignored)
|
|
141
|
+
→ Writes panel mirror → ./.trace của workspace hiện tại (non-empty khi mở repo lẻ)
|
|
141
142
|
→ Living Docs panel cập nhật ngay
|
|
142
143
|
```
|
|
143
144
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
> Vận hành hằng ngày với framework: đồng bộ nội dung & nâng cấp framework, quy trình xử lý bug, và publish package lên npm.
|
|
6
6
|
|
|
7
|
-
Mục này dành cho cả team (PO · Dev · Tester
|
|
7
|
+
Mục này dành cho cả team (PO · Dev · QC/Tester) và người maintain framework.
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
[📚 Docs](../README.md) › [Operations](README.md) › Bug Flow
|
|
2
2
|
|
|
3
|
-
# Bug Flow — PO · Dev · Tester
|
|
3
|
+
# Bug Flow — PO · Dev · QC/Tester
|
|
4
4
|
|
|
5
|
-
> Cách **PO, Dev, và Tester phối hợp** khi phát hiện bug. Mọi bug đều được trace về spec layer để fix đúng chỗ và tránh lặp lại.
|
|
5
|
+
> Cách **PO, Dev, và QC/Tester phối hợp** khi phát hiện bug. Mọi bug đều được trace về spec layer để fix đúng chỗ và tránh lặp lại.
|
|
6
|
+
|
|
7
|
+
> **QC cũng là nguồn bug.** Pipeline `/qc-*` đẩy vào **cùng** flow này: `/qc-run-test` FAIL = `product-gap` → `/report-bug {UC-ID}`; `/qc-analyze` `DOC_GAPS` blocker (spec sai/mơ hồ) → `/report-bug` (Case 2/3) hoặc thiếu coverage → `/propose-scenario`. Cùng phân loại Case 1–6 bên dưới. Chi tiết: [chương QC Automation](../02-guides/tester/qc-automation.md#khi-qc-tìm-thấy-bug--spec-gap--đẩy-lên-specs).
|
|
6
8
|
|
|
7
9
|
---
|
|
8
10
|
|
|
@@ -242,6 +244,40 @@ DevOps → check infra, env vars, deploy artifacts
|
|
|
242
244
|
|
|
243
245
|
## 9. Giao tiếp hiệu quả — các format thông báo
|
|
244
246
|
|
|
247
|
+
### Git flow của feedback loop (2 repo, 1 vòng)
|
|
248
|
+
|
|
249
|
+
Mọi feedback đi qua **git**, không qua chat: file được ghi vào spec repo, commit+push, rồi PO/Dev kéo về bằng `/sync`. Đây là đường đi đầy đủ — từ lúc QC/Tester phát hiện tới lúc bug `Closed`:
|
|
250
|
+
|
|
251
|
+
```
|
|
252
|
+
QC / Tester SPEC REPO (PO sở hữu) SERVICE SUBMODULE (Dev sở hữu)
|
|
253
|
+
───────────── ───────────────────── ──────────────────────────────
|
|
254
|
+
/report-bug read-only
|
|
255
|
+
/propose-scenario specs/code
|
|
256
|
+
(QC: /qc-run-test FAIL,
|
|
257
|
+
/qc-analyze DOC_GAPS)
|
|
258
|
+
│ ghi file ──────────────▶ feedback/bug-reports/*.md (KHÔNG sửa specs/code trực tiếp)
|
|
259
|
+
feedback/bdd-proposals/*.md
|
|
260
|
+
feedback/prd-change-requests/*.md
|
|
261
|
+
State: Open
|
|
262
|
+
│ git commit + push (tầng spec repo)
|
|
263
|
+
▼
|
|
264
|
+
origin(spec) ──── /sync (PO/Dev pull) ────┐
|
|
265
|
+
▼
|
|
266
|
+
┌──────────────── phân loại (Case 1–6) ───────────────┐
|
|
267
|
+
▼ ▼
|
|
268
|
+
PRD/BDD gap → PO sửa PRD + bump Code bug → Dev /fix-bug {BUG-ID}
|
|
269
|
+
→ commit+push spec repo → set State: Fixed
|
|
270
|
+
→ /generate-bdd lại → commit+push service (tầng 1)
|
|
271
|
+
│ + umbrella pointer (tầng 2)
|
|
272
|
+
└───────────────────┬──────────────────┘
|
|
273
|
+
▼
|
|
274
|
+
QC /qc-run-test re-verify ──── pass ──▶ State: Closed
|
|
275
|
+
(qc_owner / qc_blocked_by tự clear)
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
- **2 tầng push** chỉ áp dụng phía service submodule (xem [Sync & Update §4.4](sync-and-update.md#44--commit-2-tầng-thay-đổi-trong-service-submodule)); feedback file nằm trong **spec repo** nên chỉ cần push 1 tầng ở đó.
|
|
279
|
+
- `/sync` chỉ surface bug `State: Open`; `Fixed`/`Closed` để riêng (xem [§10](#10-checklist-đóng-bug)).
|
|
280
|
+
|
|
245
281
|
### Bug report (Tester → Dev)
|
|
246
282
|
|
|
247
283
|
Tester chạy `/report-bug {UC-ID} {mô tả}` → tự sinh report theo format dưới (gồm phân loại layer + phát hiện coverage gap), commit+push vào **spec repo** `feedback/bug-reports/{BUG-ID}.md`. PO/Dev thấy khi chạy `/sync` (dòng `📥 New tester feedback`):
|
|
@@ -306,11 +342,16 @@ Trước khi đánh "Resolved":
|
|
|
306
342
|
- [ ] Nếu root cause là lỗi AI gen hay lặp → đã `/learn` (hoặc accept prompt khi `/fix-bug`)
|
|
307
343
|
- [ ] Notify tester với đầy đủ thông tin re-test
|
|
308
344
|
|
|
309
|
-
**Tester:**
|
|
310
|
-
- [ ] Re-test đúng scenario được chỉ định
|
|
345
|
+
**Tester / QC:**
|
|
346
|
+
- [ ] Re-test đúng scenario được chỉ định (QC: `/qc-run-test {UC-ID}` lại → `qc_status` flip `fail → pass`)
|
|
311
347
|
- [ ] Kiểm tra regression: các AC khác của cùng PRD không bị ảnh hưởng
|
|
312
348
|
- [ ] Confirm PASS trước khi close
|
|
313
349
|
|
|
350
|
+
**Vòng đời bug report (đừng để `feedback/` phình mãi):**
|
|
351
|
+
- [ ] `State` của `feedback/bug-reports/{BUG-ID}.md`: `🟢 Open` → `🟡 Fixed` (set bởi `/fix-bug {BUG-ID}`) → `🟢 Closed` (sau khi `/qc-run-test` re-verify pass).
|
|
352
|
+
- [ ] Khi `Closed`: `/qc-run-test` clear `qc_owner`/`qc_blocked_by` của SC (tự động khi `qc_status=pass`); tuỳ chọn move file sang `feedback/bug-reports/archive/`.
|
|
353
|
+
- [ ] `/sync` chỉ surface bug `State: Open` là "đang chờ" — Fixed/Closed không làm nhiễu PO/PM.
|
|
354
|
+
|
|
314
355
|
**PO** *(nếu PRD được cập nhật)*:
|
|
315
356
|
- [ ] PRD version mới đã được bump
|
|
316
357
|
- [ ] Changelog có entry cho thay đổi
|
|
@@ -318,4 +359,4 @@ Trước khi đánh "Resolved":
|
|
|
318
359
|
|
|
319
360
|
---
|
|
320
361
|
|
|
321
|
-
*Xem thêm:* [Sync & Update](sync-and-update.md) · [Guide · Tester](../02-guides/tester/README.md) · [
|
|
362
|
+
*Xem thêm:* [Sync & Update](sync-and-update.md) · [Guide · Tester](../02-guides/tester/README.md) · [chương QC Automation](../02-guides/tester/qc-automation.md).
|