@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
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
# /propose-scenario — Propose a New BDD Scenario (Tester-Facing)
|
|
1
|
+
# /propose-scenario — Propose a New BDD Scenario (Tester & QC-Facing)
|
|
2
2
|
|
|
3
|
-
For **testers** who discover an edge case not covered by existing BDD.
|
|
4
|
-
into a **proposals area** for
|
|
3
|
+
For **testers and QC** who discover an edge case not covered by existing BDD (e.g. a `DOC_GAPS`
|
|
4
|
+
missing-coverage gap from `/qc-analyze`). Drafts a Gherkin scenario into a **proposals area** for
|
|
5
|
+
PO/Dev to review and promote.
|
|
5
6
|
|
|
6
7
|
**Does NOT edit the canonical `.feature` file.** BDD is owned by PO/Dev — this command only writes
|
|
7
8
|
a proposal. Promotion into the real BDD is a PO/Dev action.
|
|
@@ -134,6 +135,8 @@ Read `.agent/project-context.yaml`. Extract and store:
|
|
|
134
135
|
- `paths.specs_dir` → BDD specs root
|
|
135
136
|
- `paths.prd_dir` → PRD documents root
|
|
136
137
|
- `paths.refinement_dir` → findings/review output dir
|
|
138
|
+
- `paths.qc_dir` → QC automation artifacts root (visible top-level, one subfolder per UC: `{qc_dir}/{UC-ID}/`)
|
|
139
|
+
- `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)
|
|
137
140
|
- `paths.product_definitions_dir` → product definitions root
|
|
138
141
|
- `paths.domain_knowledge_dir` → domain knowledge root
|
|
139
142
|
- `paths.business_dictionary` → path to business-dictionary.md
|
|
@@ -146,6 +149,8 @@ If `paths` section is absent, use these defaults:
|
|
|
146
149
|
- `specs_dir` = `specs/bdd`
|
|
147
150
|
- `prd_dir` = `specs/prd`
|
|
148
151
|
- `refinement_dir` = `.agent/review`
|
|
152
|
+
- `qc_dir` = `docs`
|
|
153
|
+
- `qc_skills_dir` = `.agent/skills/qc`
|
|
149
154
|
- `product_definitions_dir` = `specs/product-definition`
|
|
150
155
|
- `domain_knowledge_dir` = `specs/domain-knowledge`
|
|
151
156
|
- `business_dictionary` = `specs/domain-knowledge/business-dictionary.md`
|
|
@@ -171,7 +176,7 @@ If `services` section is present:
|
|
|
171
176
|
- If `$ARGUMENTS` contains a path, extract the segment after `prd_dir`
|
|
172
177
|
|
|
173
178
|
**2. Route to service** — if active domain matches a key in `services`:
|
|
174
|
-
- Override `paths.specs_dir` → `services.{domain}.specs_dir`
|
|
179
|
+
- Override `paths.specs_dir` → `services.{domain}.specs_dir` — **only if `setup.spec_source` is NOT set.** When `spec_source` IS set, ALL BDD (web/app/**system**) is a shared cross-team artifact → leave `specs_dir` for step 4 to route to the spec repo; do NOT pin it per-service here.
|
|
175
180
|
- Override `paths.tech_docs_dir` → `services.{domain}.tech_docs_dir` — **only if `setup.spec_source` is NOT set.** When `spec_source` IS set, the tech-design (API contract) is a cross-team artifact and must live in the shared spec repo (handled in step 4), so leave `tech_docs_dir` for step 4 to route — do NOT pin it per-service here.
|
|
176
181
|
- Store `active_service` = `services.{domain}.path`
|
|
177
182
|
- Store `active_service_module` = `services.{domain}.module`
|
|
@@ -182,6 +187,7 @@ If `services` section is present:
|
|
|
182
187
|
- Set `active_service = unresolved`
|
|
183
188
|
|
|
184
189
|
**4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
|
|
190
|
+
- Override `paths.specs_dir` → `{spec_source}/specs/bdd` — **always when `spec_source` is set.** All BDD (web/app/**system**) lives in the shared spec repo so every umbrella (FE/App/BE) reads the same scenarios; the FE tech-design gate + `/generate-code --phase=ui`/`--phase=integration` resolve the `system/` BDD here. *(Per-service `specs/bdd` only when there is no `spec_source`.)*
|
|
185
191
|
- Override `paths.prd_dir` → `{spec_source}/specs/prd`
|
|
186
192
|
- Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
|
|
187
193
|
- Override `paths.tech_docs_dir` → `{spec_source}/specs/tech-docs` — **always when `spec_source` is set** (step 2 no longer pins tech-docs per-service in this case). The tech-design IS the cross-team API contract: BE authors it here, and FE/App read it from the same spec submodule at `/generate-code --phase=integration`. *(Per-service tech-docs only happen when there is no `spec_source` — a pure multi-service BE repo with no shared spec module.)*
|
|
@@ -190,8 +196,10 @@ If `services` section is present:
|
|
|
190
196
|
- Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
|
|
191
197
|
- Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
|
|
192
198
|
- Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
|
|
199
|
+
- Override `paths.prd_change_requests_dir` → `{spec_source}/feedback/prd-change-requests`
|
|
200
|
+
- Override `paths.trace_dir` → `{spec_source}/.trace` — **always when `spec_source` is set.** Trace TSVs are consolidated in the spec repo (single authoritative location, no per-service split) so the PM/PO has one place to manage status. Code-side commands (`/generate-code`, `/dev-run-test`, `/qc-run-test`) run from `service_root` but **write their trace row into `{spec_source}/.trace`** — like they already push `feedback/` there. *(Per-service `.trace` only when there is no `spec_source`.)*
|
|
193
201
|
|
|
194
|
-
> **Why under `spec_source`:** PRD, design-spec, domain knowledge, the **API contract (tech-docs)**,
|
|
202
|
+
> **Why under `spec_source`:** PRD, design-spec, domain knowledge, **all BDD (web/app/system)**, the **API contract (tech-docs)**, tester feedback, **and the `.trace/` coverage state** are all **cross-team artifacts** — they live in the **shared spec repo** so every umbrella (FE/App/BE) and the PM read one source via `/sync`. The service submodule holds only **code** (+ build/test tooling). `.trace/` and `feedback/` are the dev/QC **write areas** in the spec repo (the PRD/BDD/design-spec/tech-docs there stay read-only for dev/QC — only PO edits those). In single-service mode (no `spec_source`), everything defaults under the repo root — still one repo.
|
|
195
203
|
|
|
196
204
|
---
|
|
197
205
|
|
|
@@ -211,12 +219,12 @@ When `active_service` has been resolved to a real path in Step 1.5 (e.g., `user-
|
|
|
211
219
|
|----------|--------|
|
|
212
220
|
| `conventions.test_command` | service's `conventions.test_command` |
|
|
213
221
|
| `conventions.build_command` | service's `conventions.build_command` |
|
|
214
|
-
| `paths.trace_dir` | `{active_service}/{service paths.trace_dir}`
|
|
215
|
-
| `paths.specs_dir` | `{active_service}/{service paths.specs_dir}`
|
|
222
|
+
| `paths.trace_dir` | **If `spec_source` is set → keep the Step 4 spec-repo route (`{spec_source}/.trace`); ignore any service-level `trace_dir`.** Only when there is no `spec_source`: `{active_service}/{service paths.trace_dir}` (default `{active_service}/.trace`). |
|
|
223
|
+
| `paths.specs_dir` | **If `spec_source` is set → keep the Step 4 spec-repo route (`{spec_source}/specs/bdd`); ignore any service-level `specs_dir`** (BDD is cross-team, never per-service in this mode). Only when there is no `spec_source`: `{active_service}/{service paths.specs_dir}` if set, else the Step 1.5 override. |
|
|
216
224
|
|
|
217
225
|
**3. Store** `service_root = {active_service}` as the working directory anchor for all downstream commands:
|
|
218
226
|
- Shell commands (`/dev-run-test`, `/dev-gen-test`) run **from within** `service_root`
|
|
219
|
-
-
|
|
227
|
+
- **Source/test files** are written relative to `service_root`; **trace TSVs** are written to `{paths.trace_dir}` (the spec repo when `spec_source` is set — a cross-repo write, committed/pushed to the spec submodule like `feedback/`).
|
|
220
228
|
|
|
221
229
|
**4. If service config not found** — keep umbrella defaults, still set `service_root = {active_service}` (path anchor is always needed even without a config override).
|
|
222
230
|
|
|
@@ -410,15 +418,28 @@ A BDD scenario must trace to a PRD acceptance criterion. Determine which case ap
|
|
|
410
418
|
→ This is a coverage gap. Proceed to draft the scenario (Step 3), mapped to that AC.
|
|
411
419
|
|
|
412
420
|
**Case B — behavior is NOT in any AC** (genuinely new requirement):
|
|
413
|
-
→
|
|
414
|
-
|
|
421
|
+
→ Do **not** draft a BDD proposal (a scenario would have nothing to trace to). Instead **write a
|
|
422
|
+
PRD change request file** so the PO actually sees it on `/sync` (do not just print it):
|
|
423
|
+
|
|
424
|
+
Write to `{paths.prd_change_requests_dir}/{UC-ID}-{slug}.md` (resolved to
|
|
425
|
+
`{spec_source}/feedback/prd-change-requests/` in umbrella mode; create dir if needed):
|
|
415
426
|
```
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
427
|
+
# PRD Change Request — {UC-ID}: {short title}
|
|
428
|
+
|
|
429
|
+
> ⚠️ New requirement found in test — NOT covered by any PRD AC (not a coverage gap).
|
|
430
|
+
| Field | Value |
|
|
431
|
+
|---|---|
|
|
432
|
+
| UC / Ticket | {UC-ID} |
|
|
433
|
+
| PRD | {prd_path} (v{prd_version}) |
|
|
434
|
+
| Source | {BUG-ID if any | tester/QC observation} |
|
|
435
|
+
| Requested by | tester/QC |
|
|
436
|
+
| Status | Open |
|
|
437
|
+
|
|
438
|
+
**Requested behavior:** {description}
|
|
439
|
+
**Suggested AC (draft for PO):** "{draft AC text}"
|
|
440
|
+
**Route to PO:** add/extend an AC in {prd_path} → `/refine-prd` → re-run `/generate-bdd` → dev `/generate-code`.
|
|
420
441
|
```
|
|
421
|
-
Then
|
|
442
|
+
Then go to Step 5 (handoff applies to this file too). Skip Step 3–4 (no BDD scenario for Case B).
|
|
422
443
|
|
|
423
444
|
If unsure which case → show the AC list and ask the tester which AC this maps to, or confirm it's new.
|
|
424
445
|
|
|
@@ -447,7 +468,13 @@ git push # → PO/Dev see it on their next /sync
|
|
|
447
468
|
```
|
|
448
469
|
|
|
449
470
|
- No push rights to the spec repo → open a PR / MR instead. Print this fallback.
|
|
450
|
-
- For a **PRD change request** (Case B),
|
|
471
|
+
- For a **PRD change request** (Case B), commit the request file instead:
|
|
472
|
+
```bash
|
|
473
|
+
cd {spec_source}
|
|
474
|
+
git add feedback/prd-change-requests/{UC-ID}-{slug}.md
|
|
475
|
+
git commit -m "qa(prd-change): {UC-ID} — {title}"
|
|
476
|
+
git push
|
|
477
|
+
```
|
|
451
478
|
|
|
452
479
|
> PO/Dev are notified through their normal routine: `/sync` lists newly-pulled proposals.
|
|
453
480
|
|
|
@@ -477,6 +504,36 @@ Output Artifacts:
|
|
|
477
504
|
|
|
478
505
|
If no files were written (e.g., review or analysis commands) → write `Output Artifacts: none (read-only)`.
|
|
479
506
|
|
|
507
|
+
## Pipeline Position
|
|
508
|
+
|
|
509
|
+
Print a one-line map of the pipeline with the CURRENT command's phase marked `◀ bạn ở đây`,
|
|
510
|
+
so the user always sees where this command sits in the end-to-end flow:
|
|
511
|
+
|
|
512
|
+
```
|
|
513
|
+
Discovery → PRD → [Design Spec] → BDD → Tech Design → Code → Dev Self-Check → QC → Trace Audit
|
|
514
|
+
```
|
|
515
|
+
|
|
516
|
+
Find the current command in this phase legend and mark **its** phase in the map above:
|
|
517
|
+
|
|
518
|
+
| Phase | Commands |
|
|
519
|
+
|-------|----------|
|
|
520
|
+
| Discovery | `/define-product` |
|
|
521
|
+
| PRD | `/generate-prd` · `/refine-prd` · `/review-context` (PRD) |
|
|
522
|
+
| Design Spec | `/generate-design-spec` |
|
|
523
|
+
| BDD | `/generate-bdd` · `/review-context` (BDD) |
|
|
524
|
+
| Tech Design | `/generate-tech-docs` · `/map-testids` · `/review-tech-docs` |
|
|
525
|
+
| Code | `/generate-code` · `/review-code` |
|
|
526
|
+
| Dev Self-Check | `/dev-gen-test` · `/dev-run-test` · `/dev-smoke-test` |
|
|
527
|
+
| QC | `/qc-analyze` · `/qc-plan` · `/qc-design-test` · `/qc-review` · `/qc-run-test` · `/qc-report` |
|
|
528
|
+
| Trace Audit | `/validate-traces` |
|
|
529
|
+
|
|
530
|
+
For a **review command**, also append the 3-step review loop with the current step marked, e.g.:
|
|
531
|
+
`Vòng review: [① phân tích ◀] → ② Review Board → ③ --resume`.
|
|
532
|
+
|
|
533
|
+
**Cross-cutting commands** (`/sync`, `/update-framework`, `/fix-bug`, `/debug`, `/learn`,
|
|
534
|
+
`/report-bug`, `/propose-scenario`, `/generate-spec-manifest`) sit outside the linear pipeline —
|
|
535
|
+
**omit the Pipeline line entirely** for these (do not force-fit them onto the map).
|
|
536
|
+
|
|
480
537
|
## Next Command Suggestion
|
|
481
538
|
|
|
482
539
|
Suggest the logical next command based on workflow phase:
|
|
@@ -518,10 +575,13 @@ Suggest the logical next command based on workflow phase:
|
|
|
518
575
|
Format the footer as:
|
|
519
576
|
```
|
|
520
577
|
---
|
|
521
|
-
Status
|
|
578
|
+
Status : {badge}
|
|
522
579
|
{Output Artifacts block}
|
|
523
|
-
|
|
580
|
+
Pipeline : Discovery → PRD → [BDD ◀ bạn ở đây] → Tech Design → Code → Dev Self-Check → QC → Trace Audit
|
|
581
|
+
(review cmd) Vòng review: [① phân tích ◀] → ② Review Board → ③ --resume
|
|
582
|
+
Next : {suggested command with example arguments}
|
|
524
583
|
```
|
|
584
|
+
*(Omit the `Pipeline` line for cross-cutting commands listed above.)*
|
|
525
585
|
|
|
526
586
|
|
|
527
587
|
```
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
# /propose-scenario — Propose a New BDD Scenario (Tester-Facing)
|
|
1
|
+
# /propose-scenario — Propose a New BDD Scenario (Tester & QC-Facing)
|
|
2
2
|
|
|
3
|
-
For **testers** who discover an edge case not covered by existing BDD.
|
|
4
|
-
into a **proposals area** for
|
|
3
|
+
For **testers and QC** who discover an edge case not covered by existing BDD (e.g. a `DOC_GAPS`
|
|
4
|
+
missing-coverage gap from `/qc-analyze`). Drafts a Gherkin scenario into a **proposals area** for
|
|
5
|
+
PO/Dev to review and promote.
|
|
5
6
|
|
|
6
7
|
**Does NOT edit the canonical `.feature` file.** BDD is owned by PO/Dev — this command only writes
|
|
7
8
|
a proposal. Promotion into the real BDD is a PO/Dev action.
|
|
@@ -34,15 +35,28 @@ A BDD scenario must trace to a PRD acceptance criterion. Determine which case ap
|
|
|
34
35
|
→ This is a coverage gap. Proceed to draft the scenario (Step 3), mapped to that AC.
|
|
35
36
|
|
|
36
37
|
**Case B — behavior is NOT in any AC** (genuinely new requirement):
|
|
37
|
-
→
|
|
38
|
-
|
|
38
|
+
→ Do **not** draft a BDD proposal (a scenario would have nothing to trace to). Instead **write a
|
|
39
|
+
PRD change request file** so the PO actually sees it on `/sync` (do not just print it):
|
|
40
|
+
|
|
41
|
+
Write to `{paths.prd_change_requests_dir}/{UC-ID}-{slug}.md` (resolved to
|
|
42
|
+
`{spec_source}/feedback/prd-change-requests/` in umbrella mode; create dir if needed):
|
|
39
43
|
```
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
+
# PRD Change Request — {UC-ID}: {short title}
|
|
45
|
+
|
|
46
|
+
> ⚠️ New requirement found in test — NOT covered by any PRD AC (not a coverage gap).
|
|
47
|
+
| Field | Value |
|
|
48
|
+
|---|---|
|
|
49
|
+
| UC / Ticket | {UC-ID} |
|
|
50
|
+
| PRD | {prd_path} (v{prd_version}) |
|
|
51
|
+
| Source | {BUG-ID if any | tester/QC observation} |
|
|
52
|
+
| Requested by | tester/QC |
|
|
53
|
+
| Status | Open |
|
|
54
|
+
|
|
55
|
+
**Requested behavior:** {description}
|
|
56
|
+
**Suggested AC (draft for PO):** "{draft AC text}"
|
|
57
|
+
**Route to PO:** add/extend an AC in {prd_path} → `/refine-prd` → re-run `/generate-bdd` → dev `/generate-code`.
|
|
44
58
|
```
|
|
45
|
-
Then
|
|
59
|
+
Then go to Step 5 (handoff applies to this file too). Skip Step 3–4 (no BDD scenario for Case B).
|
|
46
60
|
|
|
47
61
|
If unsure which case → show the AC list and ask the tester which AC this maps to, or confirm it's new.
|
|
48
62
|
|
|
@@ -71,7 +85,13 @@ git push # → PO/Dev see it on their next /sync
|
|
|
71
85
|
```
|
|
72
86
|
|
|
73
87
|
- No push rights to the spec repo → open a PR / MR instead. Print this fallback.
|
|
74
|
-
- For a **PRD change request** (Case B),
|
|
88
|
+
- For a **PRD change request** (Case B), commit the request file instead:
|
|
89
|
+
```bash
|
|
90
|
+
cd {spec_source}
|
|
91
|
+
git add feedback/prd-change-requests/{UC-ID}-{slug}.md
|
|
92
|
+
git commit -m "qa(prd-change): {UC-ID} — {title}"
|
|
93
|
+
git push
|
|
94
|
+
```
|
|
75
95
|
|
|
76
96
|
> PO/Dev are notified through their normal routine: `/sync` lists newly-pulled proposals.
|
|
77
97
|
|
package/commands/qc-analyze.md
CHANGED
|
@@ -133,6 +133,8 @@ Read `.agent/project-context.yaml`. Extract and store:
|
|
|
133
133
|
- `paths.specs_dir` → BDD specs root
|
|
134
134
|
- `paths.prd_dir` → PRD documents root
|
|
135
135
|
- `paths.refinement_dir` → findings/review output dir
|
|
136
|
+
- `paths.qc_dir` → QC automation artifacts root (visible top-level, one subfolder per UC: `{qc_dir}/{UC-ID}/`)
|
|
137
|
+
- `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)
|
|
136
138
|
- `paths.product_definitions_dir` → product definitions root
|
|
137
139
|
- `paths.domain_knowledge_dir` → domain knowledge root
|
|
138
140
|
- `paths.business_dictionary` → path to business-dictionary.md
|
|
@@ -145,6 +147,8 @@ If `paths` section is absent, use these defaults:
|
|
|
145
147
|
- `specs_dir` = `specs/bdd`
|
|
146
148
|
- `prd_dir` = `specs/prd`
|
|
147
149
|
- `refinement_dir` = `.agent/review`
|
|
150
|
+
- `qc_dir` = `docs`
|
|
151
|
+
- `qc_skills_dir` = `.agent/skills/qc`
|
|
148
152
|
- `product_definitions_dir` = `specs/product-definition`
|
|
149
153
|
- `domain_knowledge_dir` = `specs/domain-knowledge`
|
|
150
154
|
- `business_dictionary` = `specs/domain-knowledge/business-dictionary.md`
|
|
@@ -170,7 +174,7 @@ If `services` section is present:
|
|
|
170
174
|
- If `$ARGUMENTS` contains a path, extract the segment after `prd_dir`
|
|
171
175
|
|
|
172
176
|
**2. Route to service** — if active domain matches a key in `services`:
|
|
173
|
-
- Override `paths.specs_dir` → `services.{domain}.specs_dir`
|
|
177
|
+
- Override `paths.specs_dir` → `services.{domain}.specs_dir` — **only if `setup.spec_source` is NOT set.** When `spec_source` IS set, ALL BDD (web/app/**system**) is a shared cross-team artifact → leave `specs_dir` for step 4 to route to the spec repo; do NOT pin it per-service here.
|
|
174
178
|
- Override `paths.tech_docs_dir` → `services.{domain}.tech_docs_dir` — **only if `setup.spec_source` is NOT set.** When `spec_source` IS set, the tech-design (API contract) is a cross-team artifact and must live in the shared spec repo (handled in step 4), so leave `tech_docs_dir` for step 4 to route — do NOT pin it per-service here.
|
|
175
179
|
- Store `active_service` = `services.{domain}.path`
|
|
176
180
|
- Store `active_service_module` = `services.{domain}.module`
|
|
@@ -181,6 +185,7 @@ If `services` section is present:
|
|
|
181
185
|
- Set `active_service = unresolved`
|
|
182
186
|
|
|
183
187
|
**4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
|
|
188
|
+
- Override `paths.specs_dir` → `{spec_source}/specs/bdd` — **always when `spec_source` is set.** All BDD (web/app/**system**) lives in the shared spec repo so every umbrella (FE/App/BE) reads the same scenarios; the FE tech-design gate + `/generate-code --phase=ui`/`--phase=integration` resolve the `system/` BDD here. *(Per-service `specs/bdd` only when there is no `spec_source`.)*
|
|
184
189
|
- Override `paths.prd_dir` → `{spec_source}/specs/prd`
|
|
185
190
|
- Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
|
|
186
191
|
- Override `paths.tech_docs_dir` → `{spec_source}/specs/tech-docs` — **always when `spec_source` is set** (step 2 no longer pins tech-docs per-service in this case). The tech-design IS the cross-team API contract: BE authors it here, and FE/App read it from the same spec submodule at `/generate-code --phase=integration`. *(Per-service tech-docs only happen when there is no `spec_source` — a pure multi-service BE repo with no shared spec module.)*
|
|
@@ -189,8 +194,10 @@ If `services` section is present:
|
|
|
189
194
|
- Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
|
|
190
195
|
- Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
|
|
191
196
|
- Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
|
|
197
|
+
- Override `paths.prd_change_requests_dir` → `{spec_source}/feedback/prd-change-requests`
|
|
198
|
+
- Override `paths.trace_dir` → `{spec_source}/.trace` — **always when `spec_source` is set.** Trace TSVs are consolidated in the spec repo (single authoritative location, no per-service split) so the PM/PO has one place to manage status. Code-side commands (`/generate-code`, `/dev-run-test`, `/qc-run-test`) run from `service_root` but **write their trace row into `{spec_source}/.trace`** — like they already push `feedback/` there. *(Per-service `.trace` only when there is no `spec_source`.)*
|
|
192
199
|
|
|
193
|
-
> **Why under `spec_source`:** PRD, design-spec, domain knowledge, the **API contract (tech-docs)**,
|
|
200
|
+
> **Why under `spec_source`:** PRD, design-spec, domain knowledge, **all BDD (web/app/system)**, the **API contract (tech-docs)**, tester feedback, **and the `.trace/` coverage state** are all **cross-team artifacts** — they live in the **shared spec repo** so every umbrella (FE/App/BE) and the PM read one source via `/sync`. The service submodule holds only **code** (+ build/test tooling). `.trace/` and `feedback/` are the dev/QC **write areas** in the spec repo (the PRD/BDD/design-spec/tech-docs there stay read-only for dev/QC — only PO edits those). In single-service mode (no `spec_source`), everything defaults under the repo root — still one repo.
|
|
194
201
|
|
|
195
202
|
---
|
|
196
203
|
|
|
@@ -210,12 +217,12 @@ When `active_service` has been resolved to a real path in Step 1.5 (e.g., `user-
|
|
|
210
217
|
|----------|--------|
|
|
211
218
|
| `conventions.test_command` | service's `conventions.test_command` |
|
|
212
219
|
| `conventions.build_command` | service's `conventions.build_command` |
|
|
213
|
-
| `paths.trace_dir` | `{active_service}/{service paths.trace_dir}`
|
|
214
|
-
| `paths.specs_dir` | `{active_service}/{service paths.specs_dir}`
|
|
220
|
+
| `paths.trace_dir` | **If `spec_source` is set → keep the Step 4 spec-repo route (`{spec_source}/.trace`); ignore any service-level `trace_dir`.** Only when there is no `spec_source`: `{active_service}/{service paths.trace_dir}` (default `{active_service}/.trace`). |
|
|
221
|
+
| `paths.specs_dir` | **If `spec_source` is set → keep the Step 4 spec-repo route (`{spec_source}/specs/bdd`); ignore any service-level `specs_dir`** (BDD is cross-team, never per-service in this mode). Only when there is no `spec_source`: `{active_service}/{service paths.specs_dir}` if set, else the Step 1.5 override. |
|
|
215
222
|
|
|
216
223
|
**3. Store** `service_root = {active_service}` as the working directory anchor for all downstream commands:
|
|
217
224
|
- Shell commands (`/dev-run-test`, `/dev-gen-test`) run **from within** `service_root`
|
|
218
|
-
-
|
|
225
|
+
- **Source/test files** are written relative to `service_root`; **trace TSVs** are written to `{paths.trace_dir}` (the spec repo when `spec_source` is set — a cross-repo write, committed/pushed to the spec submodule like `feedback/`).
|
|
219
226
|
|
|
220
227
|
**4. If service config not found** — keep umbrella defaults, still set `service_root = {active_service}` (path anchor is always needed even without a config override).
|
|
221
228
|
|
|
@@ -405,7 +412,7 @@ Boundary vs `/qc-plan`: you answer *"what is the requirement?"*; qc-plan answers
|
|
|
405
412
|
the risk, what to ask dev?"*. When something is ambiguous/missing, record it as a gap and
|
|
406
413
|
hand off to qc-plan — never invent an answer.
|
|
407
414
|
|
|
408
|
-
## Skills (`
|
|
415
|
+
## Skills (`{paths.qc_skills_dir}/qa-analyst/`)
|
|
409
416
|
|
|
410
417
|
Load only the file for the step you are doing (each is self-contained):
|
|
411
418
|
- `spec-breakdown.md` — break a spec/PRD/user story into structure.
|
|
@@ -424,15 +431,29 @@ tests with `@trace.verifies` and write `qc_status` per scenario.
|
|
|
424
431
|
|
|
425
432
|
## DOC_GAPS (mandatory)
|
|
426
433
|
|
|
427
|
-
Always produce a gaps file following `
|
|
434
|
+
Always produce a gaps file following `{paths.qc_skills_dir}/qa-analyst/DOC_GAPS.template.md`:
|
|
428
435
|
- Each gap `GAP-xx`, classified MISSING / AMBIGUOUS / CONTRADICTORY / ASSUMPTION / OPEN QUESTION, with severity (🔴 Blocker → 🟢 Low) and the affected function/BR/AC.
|
|
429
436
|
- Never fabricate answers; mark assumptions as `ASSUMPTION` for PO/dev to confirm.
|
|
430
437
|
- Any `🔴 Blocker` still `Open` ⇒ the UC is not ready for qc-design-test — hand off to qc-plan.
|
|
438
|
+
- **Push genuine SPEC defects to the PO (not just keep them local).** A blocker that is a real
|
|
439
|
+
flaw in the official spec — `AMBIGUOUS` / `CONTRADICTORY` / `MISSING` in PRD/BDD — must reach
|
|
440
|
+
the PO via the feedback flow, not sit only in `DOC_GAPS.md`: file `/report-bug {UC-ID} {desc}`
|
|
441
|
+
(its BUG_FLOW classifies PRD vs BDD), or `/propose-scenario {UC-ID}` if the gap is missing test
|
|
442
|
+
coverage. `ASSUMPTION` / `OPEN QUESTION` gaps are confirmed via qc-plan's questions-for-dev — not filed as bugs.
|
|
431
443
|
|
|
432
444
|
## Output
|
|
433
445
|
|
|
434
|
-
Write
|
|
435
|
-
|
|
446
|
+
Write **exactly TWO files** under `{paths.qc_dir}/{UC-ID}/` — do **not** split the analysis
|
|
447
|
+
into one-file-per-step (no separate spec-breakdown / business-rules / data-flow / AC files):
|
|
448
|
+
|
|
449
|
+
1. **`{paths.qc_dir}/{UC-ID}/REQUIREMENT_ANALYSIS.md`** — the single consolidated analysis.
|
|
450
|
+
Sections in order: requirement breakdown → business-rule table (`BR-xx`) → data-flow →
|
|
451
|
+
acceptance-criteria (`AC-xx`), each `BR`/`AC` mapped to its owning `{UC-ID}-SC{N}`.
|
|
452
|
+
2. **`{paths.qc_dir}/{UC-ID}/DOC_GAPS.md`** — the gaps file (per `{paths.qc_skills_dir}/qa-analyst/DOC_GAPS.template.md`).
|
|
453
|
+
|
|
454
|
+
`{paths.qc_dir}` is a VISIBLE top-level folder in the QC repo (default `docs/`, **not** the
|
|
455
|
+
hidden `.agent/review/`) so the QC team can open and process the output easily. The official
|
|
456
|
+
spec stays in the PO spec submodule — do not write analysis there.
|
|
436
457
|
|
|
437
458
|
## Report
|
|
438
459
|
|
|
@@ -458,6 +479,36 @@ Output Artifacts:
|
|
|
458
479
|
|
|
459
480
|
If no files were written (e.g., review or analysis commands) → write `Output Artifacts: none (read-only)`.
|
|
460
481
|
|
|
482
|
+
## Pipeline Position
|
|
483
|
+
|
|
484
|
+
Print a one-line map of the pipeline with the CURRENT command's phase marked `◀ bạn ở đây`,
|
|
485
|
+
so the user always sees where this command sits in the end-to-end flow:
|
|
486
|
+
|
|
487
|
+
```
|
|
488
|
+
Discovery → PRD → [Design Spec] → BDD → Tech Design → Code → Dev Self-Check → QC → Trace Audit
|
|
489
|
+
```
|
|
490
|
+
|
|
491
|
+
Find the current command in this phase legend and mark **its** phase in the map above:
|
|
492
|
+
|
|
493
|
+
| Phase | Commands |
|
|
494
|
+
|-------|----------|
|
|
495
|
+
| Discovery | `/define-product` |
|
|
496
|
+
| PRD | `/generate-prd` · `/refine-prd` · `/review-context` (PRD) |
|
|
497
|
+
| Design Spec | `/generate-design-spec` |
|
|
498
|
+
| BDD | `/generate-bdd` · `/review-context` (BDD) |
|
|
499
|
+
| Tech Design | `/generate-tech-docs` · `/map-testids` · `/review-tech-docs` |
|
|
500
|
+
| Code | `/generate-code` · `/review-code` |
|
|
501
|
+
| Dev Self-Check | `/dev-gen-test` · `/dev-run-test` · `/dev-smoke-test` |
|
|
502
|
+
| QC | `/qc-analyze` · `/qc-plan` · `/qc-design-test` · `/qc-review` · `/qc-run-test` · `/qc-report` |
|
|
503
|
+
| Trace Audit | `/validate-traces` |
|
|
504
|
+
|
|
505
|
+
For a **review command**, also append the 3-step review loop with the current step marked, e.g.:
|
|
506
|
+
`Vòng review: [① phân tích ◀] → ② Review Board → ③ --resume`.
|
|
507
|
+
|
|
508
|
+
**Cross-cutting commands** (`/sync`, `/update-framework`, `/fix-bug`, `/debug`, `/learn`,
|
|
509
|
+
`/report-bug`, `/propose-scenario`, `/generate-spec-manifest`) sit outside the linear pipeline —
|
|
510
|
+
**omit the Pipeline line entirely** for these (do not force-fit them onto the map).
|
|
511
|
+
|
|
461
512
|
## Next Command Suggestion
|
|
462
513
|
|
|
463
514
|
Suggest the logical next command based on workflow phase:
|
|
@@ -499,15 +550,19 @@ Suggest the logical next command based on workflow phase:
|
|
|
499
550
|
Format the footer as:
|
|
500
551
|
```
|
|
501
552
|
---
|
|
502
|
-
Status
|
|
553
|
+
Status : {badge}
|
|
503
554
|
{Output Artifacts block}
|
|
504
|
-
|
|
555
|
+
Pipeline : Discovery → PRD → [BDD ◀ bạn ở đây] → Tech Design → Code → Dev Self-Check → QC → Trace Audit
|
|
556
|
+
(review cmd) Vòng review: [① phân tích ◀] → ② Review Board → ③ --resume
|
|
557
|
+
Next : {suggested command with example arguments}
|
|
505
558
|
```
|
|
559
|
+
*(Omit the `Pipeline` line for cross-cutting commands listed above.)*
|
|
506
560
|
|
|
507
561
|
|
|
508
562
|
```
|
|
509
563
|
/qc-analyze Complete — {UC-ID}
|
|
510
|
-
|
|
564
|
+
Files: {paths.qc_dir}/{UC-ID}/REQUIREMENT_ANALYSIS.md + DOC_GAPS.md (2 files)
|
|
565
|
+
Gaps: {N} ({blockers} blocker) ← spec-defect blocker? → /report-bug {UC-ID} | coverage gap → /propose-scenario {UC-ID}
|
|
511
566
|
SC mapping: {M} BR/AC mapped to {K} scenarios
|
|
512
567
|
Next: /qc-plan {UC-ID} ← risk / what-if / questions-for-dev
|
|
513
568
|
(resolve 🔴 Blocker gaps with PO/Dev first)
|
package/commands/qc-analyze.tmpl
CHANGED
|
@@ -29,7 +29,7 @@ Boundary vs `/qc-plan`: you answer *"what is the requirement?"*; qc-plan answers
|
|
|
29
29
|
the risk, what to ask dev?"*. When something is ambiguous/missing, record it as a gap and
|
|
30
30
|
hand off to qc-plan — never invent an answer.
|
|
31
31
|
|
|
32
|
-
## Skills (`
|
|
32
|
+
## Skills (`{paths.qc_skills_dir}/qa-analyst/`)
|
|
33
33
|
|
|
34
34
|
Load only the file for the step you are doing (each is self-contained):
|
|
35
35
|
- `spec-breakdown.md` — break a spec/PRD/user story into structure.
|
|
@@ -48,15 +48,29 @@ tests with `@trace.verifies` and write `qc_status` per scenario.
|
|
|
48
48
|
|
|
49
49
|
## DOC_GAPS (mandatory)
|
|
50
50
|
|
|
51
|
-
Always produce a gaps file following `
|
|
51
|
+
Always produce a gaps file following `{paths.qc_skills_dir}/qa-analyst/DOC_GAPS.template.md`:
|
|
52
52
|
- Each gap `GAP-xx`, classified MISSING / AMBIGUOUS / CONTRADICTORY / ASSUMPTION / OPEN QUESTION, with severity (🔴 Blocker → 🟢 Low) and the affected function/BR/AC.
|
|
53
53
|
- Never fabricate answers; mark assumptions as `ASSUMPTION` for PO/dev to confirm.
|
|
54
54
|
- Any `🔴 Blocker` still `Open` ⇒ the UC is not ready for qc-design-test — hand off to qc-plan.
|
|
55
|
+
- **Push genuine SPEC defects to the PO (not just keep them local).** A blocker that is a real
|
|
56
|
+
flaw in the official spec — `AMBIGUOUS` / `CONTRADICTORY` / `MISSING` in PRD/BDD — must reach
|
|
57
|
+
the PO via the feedback flow, not sit only in `DOC_GAPS.md`: file `/report-bug {UC-ID} {desc}`
|
|
58
|
+
(its BUG_FLOW classifies PRD vs BDD), or `/propose-scenario {UC-ID}` if the gap is missing test
|
|
59
|
+
coverage. `ASSUMPTION` / `OPEN QUESTION` gaps are confirmed via qc-plan's questions-for-dev — not filed as bugs.
|
|
55
60
|
|
|
56
61
|
## Output
|
|
57
62
|
|
|
58
|
-
Write
|
|
59
|
-
|
|
63
|
+
Write **exactly TWO files** under `{paths.qc_dir}/{UC-ID}/` — do **not** split the analysis
|
|
64
|
+
into one-file-per-step (no separate spec-breakdown / business-rules / data-flow / AC files):
|
|
65
|
+
|
|
66
|
+
1. **`{paths.qc_dir}/{UC-ID}/REQUIREMENT_ANALYSIS.md`** — the single consolidated analysis.
|
|
67
|
+
Sections in order: requirement breakdown → business-rule table (`BR-xx`) → data-flow →
|
|
68
|
+
acceptance-criteria (`AC-xx`), each `BR`/`AC` mapped to its owning `{UC-ID}-SC{N}`.
|
|
69
|
+
2. **`{paths.qc_dir}/{UC-ID}/DOC_GAPS.md`** — the gaps file (per `{paths.qc_skills_dir}/qa-analyst/DOC_GAPS.template.md`).
|
|
70
|
+
|
|
71
|
+
`{paths.qc_dir}` is a VISIBLE top-level folder in the QC repo (default `docs/`, **not** the
|
|
72
|
+
hidden `.agent/review/`) so the QC team can open and process the output easily. The official
|
|
73
|
+
spec stays in the PO spec submodule — do not write analysis there.
|
|
60
74
|
|
|
61
75
|
## Report
|
|
62
76
|
|
|
@@ -64,7 +78,8 @@ breakdown, BR table, data-flow, AC list with SC mapping, and `DOC_GAPS.md`).
|
|
|
64
78
|
|
|
65
79
|
```
|
|
66
80
|
/qc-analyze Complete — {UC-ID}
|
|
67
|
-
|
|
81
|
+
Files: {paths.qc_dir}/{UC-ID}/REQUIREMENT_ANALYSIS.md + DOC_GAPS.md (2 files)
|
|
82
|
+
Gaps: {N} ({blockers} blocker) ← spec-defect blocker? → /report-bug {UC-ID} | coverage gap → /propose-scenario {UC-ID}
|
|
68
83
|
SC mapping: {M} BR/AC mapped to {K} scenarios
|
|
69
84
|
Next: /qc-plan {UC-ID} ← risk / what-if / questions-for-dev
|
|
70
85
|
(resolve 🔴 Blocker gaps with PO/Dev first)
|
|
@@ -92,7 +92,7 @@ Wait for explicit "Y" or "N" from the user before continuing.
|
|
|
92
92
|
- "N" → stop and ask what the user wants to change.
|
|
93
93
|
|
|
94
94
|
|
|
95
|
-
*Note: For this command, the target in Step 1 is a UC-ID. Read the qc-analyze + qc-plan outputs from `{paths.
|
|
95
|
+
*Note: For this command, the target in Step 1 is a UC-ID. Read the qc-analyze + qc-plan outputs (`REQUIREMENT_ANALYSIS.md`, `DOC_GAPS.md`, `TEST_PLAN.md`) from `{paths.qc_dir}/{UC-ID}/` and the official `.feature` (with `@trace.scenario` per scenario). For GUI layers, also read the FE tech-design §2b **Test Selectors** table at `{paths.tech_docs_dir}/{domain}/{UC-ID}-tech-design-{platform}.md` (if present) — the stable test-ids QC will locate by.*
|
|
96
96
|
|
|
97
97
|
## Context
|
|
98
98
|
# Context Loader — Load All Project Context
|
|
@@ -133,6 +133,8 @@ Read `.agent/project-context.yaml`. Extract and store:
|
|
|
133
133
|
- `paths.specs_dir` → BDD specs root
|
|
134
134
|
- `paths.prd_dir` → PRD documents root
|
|
135
135
|
- `paths.refinement_dir` → findings/review output dir
|
|
136
|
+
- `paths.qc_dir` → QC automation artifacts root (visible top-level, one subfolder per UC: `{qc_dir}/{UC-ID}/`)
|
|
137
|
+
- `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)
|
|
136
138
|
- `paths.product_definitions_dir` → product definitions root
|
|
137
139
|
- `paths.domain_knowledge_dir` → domain knowledge root
|
|
138
140
|
- `paths.business_dictionary` → path to business-dictionary.md
|
|
@@ -145,6 +147,8 @@ If `paths` section is absent, use these defaults:
|
|
|
145
147
|
- `specs_dir` = `specs/bdd`
|
|
146
148
|
- `prd_dir` = `specs/prd`
|
|
147
149
|
- `refinement_dir` = `.agent/review`
|
|
150
|
+
- `qc_dir` = `docs`
|
|
151
|
+
- `qc_skills_dir` = `.agent/skills/qc`
|
|
148
152
|
- `product_definitions_dir` = `specs/product-definition`
|
|
149
153
|
- `domain_knowledge_dir` = `specs/domain-knowledge`
|
|
150
154
|
- `business_dictionary` = `specs/domain-knowledge/business-dictionary.md`
|
|
@@ -170,7 +174,7 @@ If `services` section is present:
|
|
|
170
174
|
- If `$ARGUMENTS` contains a path, extract the segment after `prd_dir`
|
|
171
175
|
|
|
172
176
|
**2. Route to service** — if active domain matches a key in `services`:
|
|
173
|
-
- Override `paths.specs_dir` → `services.{domain}.specs_dir`
|
|
177
|
+
- Override `paths.specs_dir` → `services.{domain}.specs_dir` — **only if `setup.spec_source` is NOT set.** When `spec_source` IS set, ALL BDD (web/app/**system**) is a shared cross-team artifact → leave `specs_dir` for step 4 to route to the spec repo; do NOT pin it per-service here.
|
|
174
178
|
- Override `paths.tech_docs_dir` → `services.{domain}.tech_docs_dir` — **only if `setup.spec_source` is NOT set.** When `spec_source` IS set, the tech-design (API contract) is a cross-team artifact and must live in the shared spec repo (handled in step 4), so leave `tech_docs_dir` for step 4 to route — do NOT pin it per-service here.
|
|
175
179
|
- Store `active_service` = `services.{domain}.path`
|
|
176
180
|
- Store `active_service_module` = `services.{domain}.module`
|
|
@@ -181,6 +185,7 @@ If `services` section is present:
|
|
|
181
185
|
- Set `active_service = unresolved`
|
|
182
186
|
|
|
183
187
|
**4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
|
|
188
|
+
- Override `paths.specs_dir` → `{spec_source}/specs/bdd` — **always when `spec_source` is set.** All BDD (web/app/**system**) lives in the shared spec repo so every umbrella (FE/App/BE) reads the same scenarios; the FE tech-design gate + `/generate-code --phase=ui`/`--phase=integration` resolve the `system/` BDD here. *(Per-service `specs/bdd` only when there is no `spec_source`.)*
|
|
184
189
|
- Override `paths.prd_dir` → `{spec_source}/specs/prd`
|
|
185
190
|
- Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
|
|
186
191
|
- Override `paths.tech_docs_dir` → `{spec_source}/specs/tech-docs` — **always when `spec_source` is set** (step 2 no longer pins tech-docs per-service in this case). The tech-design IS the cross-team API contract: BE authors it here, and FE/App read it from the same spec submodule at `/generate-code --phase=integration`. *(Per-service tech-docs only happen when there is no `spec_source` — a pure multi-service BE repo with no shared spec module.)*
|
|
@@ -189,8 +194,10 @@ If `services` section is present:
|
|
|
189
194
|
- Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
|
|
190
195
|
- Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
|
|
191
196
|
- Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
|
|
197
|
+
- Override `paths.prd_change_requests_dir` → `{spec_source}/feedback/prd-change-requests`
|
|
198
|
+
- Override `paths.trace_dir` → `{spec_source}/.trace` — **always when `spec_source` is set.** Trace TSVs are consolidated in the spec repo (single authoritative location, no per-service split) so the PM/PO has one place to manage status. Code-side commands (`/generate-code`, `/dev-run-test`, `/qc-run-test`) run from `service_root` but **write their trace row into `{spec_source}/.trace`** — like they already push `feedback/` there. *(Per-service `.trace` only when there is no `spec_source`.)*
|
|
192
199
|
|
|
193
|
-
> **Why under `spec_source`:** PRD, design-spec, domain knowledge, the **API contract (tech-docs)**,
|
|
200
|
+
> **Why under `spec_source`:** PRD, design-spec, domain knowledge, **all BDD (web/app/system)**, the **API contract (tech-docs)**, tester feedback, **and the `.trace/` coverage state** are all **cross-team artifacts** — they live in the **shared spec repo** so every umbrella (FE/App/BE) and the PM read one source via `/sync`. The service submodule holds only **code** (+ build/test tooling). `.trace/` and `feedback/` are the dev/QC **write areas** in the spec repo (the PRD/BDD/design-spec/tech-docs there stay read-only for dev/QC — only PO edits those). In single-service mode (no `spec_source`), everything defaults under the repo root — still one repo.
|
|
194
201
|
|
|
195
202
|
---
|
|
196
203
|
|
|
@@ -210,12 +217,12 @@ When `active_service` has been resolved to a real path in Step 1.5 (e.g., `user-
|
|
|
210
217
|
|----------|--------|
|
|
211
218
|
| `conventions.test_command` | service's `conventions.test_command` |
|
|
212
219
|
| `conventions.build_command` | service's `conventions.build_command` |
|
|
213
|
-
| `paths.trace_dir` | `{active_service}/{service paths.trace_dir}`
|
|
214
|
-
| `paths.specs_dir` | `{active_service}/{service paths.specs_dir}`
|
|
220
|
+
| `paths.trace_dir` | **If `spec_source` is set → keep the Step 4 spec-repo route (`{spec_source}/.trace`); ignore any service-level `trace_dir`.** Only when there is no `spec_source`: `{active_service}/{service paths.trace_dir}` (default `{active_service}/.trace`). |
|
|
221
|
+
| `paths.specs_dir` | **If `spec_source` is set → keep the Step 4 spec-repo route (`{spec_source}/specs/bdd`); ignore any service-level `specs_dir`** (BDD is cross-team, never per-service in this mode). Only when there is no `spec_source`: `{active_service}/{service paths.specs_dir}` if set, else the Step 1.5 override. |
|
|
215
222
|
|
|
216
223
|
**3. Store** `service_root = {active_service}` as the working directory anchor for all downstream commands:
|
|
217
224
|
- Shell commands (`/dev-run-test`, `/dev-gen-test`) run **from within** `service_root`
|
|
218
|
-
-
|
|
225
|
+
- **Source/test files** are written relative to `service_root`; **trace TSVs** are written to `{paths.trace_dir}` (the spec repo when `spec_source` is set — a cross-repo write, committed/pushed to the spec submodule like `feedback/`).
|
|
219
226
|
|
|
220
227
|
**4. If service config not found** — keep umbrella defaults, still set `service_root = {active_service}` (path anchor is always needed even without a config override).
|
|
221
228
|
|
|
@@ -400,7 +407,7 @@ You are the **QC Designer** — stage 3. Produce/maintain test-case Markdown fil
|
|
|
400
407
|
(`.Test.md`) from the analyzed requirement + plan. Output feeds qc-run-test (Python) and
|
|
401
408
|
qc-review. You do **not** write Python.
|
|
402
409
|
|
|
403
|
-
## Skills — pick the layer, load ONE file (`
|
|
410
|
+
## Skills — pick the layer, load ONE file (`{paths.qc_skills_dir}/qa-designer/`)
|
|
404
411
|
|
|
405
412
|
| Layer | File |
|
|
406
413
|
|---|---|
|
|
@@ -418,6 +425,7 @@ qc-review. You do **not** write Python.
|
|
|
418
425
|
- TC ID `TC_<FEATURE>_<NNN>`; split happy/negative; one assertion concern per TC; concrete expected values.
|
|
419
426
|
- Priority `P0/P1/P2`; Tags (`smoke regression happy-path negative ui …`); Status `Draft → In Progress → Pass/Fail/Skip`.
|
|
420
427
|
- A TC blocked by a gap is still written + marked `🚫 Block: GAP-xx`.
|
|
428
|
+
- **Reference test-ids, not visual cues.** For each GUI step that acts on an element, cite the stable test-id from the FE tech-design §2b table (e.g. "click `ft001-login-submit-btn`") so qc-run-test builds the locator from the contract. If an actionable element has no test-id in §2b, note it (qc-run-test will fall back to a slower role/text locator).
|
|
421
429
|
- End-of-file: Trace matrix + blocked-TC table.
|
|
422
430
|
|
|
423
431
|
## Trace mapping (mandatory)
|
|
@@ -429,7 +437,7 @@ qc-run-test write `qc_status` per scenario.
|
|
|
429
437
|
|
|
430
438
|
## Output
|
|
431
439
|
|
|
432
|
-
Write `.Test.md` files under `{paths.
|
|
440
|
+
Write `.Test.md` files under `{paths.qc_dir}/{UC-ID}/test-cases/`.
|
|
433
441
|
|
|
434
442
|
## Report
|
|
435
443
|
|
|
@@ -455,6 +463,36 @@ Output Artifacts:
|
|
|
455
463
|
|
|
456
464
|
If no files were written (e.g., review or analysis commands) → write `Output Artifacts: none (read-only)`.
|
|
457
465
|
|
|
466
|
+
## Pipeline Position
|
|
467
|
+
|
|
468
|
+
Print a one-line map of the pipeline with the CURRENT command's phase marked `◀ bạn ở đây`,
|
|
469
|
+
so the user always sees where this command sits in the end-to-end flow:
|
|
470
|
+
|
|
471
|
+
```
|
|
472
|
+
Discovery → PRD → [Design Spec] → BDD → Tech Design → Code → Dev Self-Check → QC → Trace Audit
|
|
473
|
+
```
|
|
474
|
+
|
|
475
|
+
Find the current command in this phase legend and mark **its** phase in the map above:
|
|
476
|
+
|
|
477
|
+
| Phase | Commands |
|
|
478
|
+
|-------|----------|
|
|
479
|
+
| Discovery | `/define-product` |
|
|
480
|
+
| PRD | `/generate-prd` · `/refine-prd` · `/review-context` (PRD) |
|
|
481
|
+
| Design Spec | `/generate-design-spec` |
|
|
482
|
+
| BDD | `/generate-bdd` · `/review-context` (BDD) |
|
|
483
|
+
| Tech Design | `/generate-tech-docs` · `/map-testids` · `/review-tech-docs` |
|
|
484
|
+
| Code | `/generate-code` · `/review-code` |
|
|
485
|
+
| Dev Self-Check | `/dev-gen-test` · `/dev-run-test` · `/dev-smoke-test` |
|
|
486
|
+
| QC | `/qc-analyze` · `/qc-plan` · `/qc-design-test` · `/qc-review` · `/qc-run-test` · `/qc-report` |
|
|
487
|
+
| Trace Audit | `/validate-traces` |
|
|
488
|
+
|
|
489
|
+
For a **review command**, also append the 3-step review loop with the current step marked, e.g.:
|
|
490
|
+
`Vòng review: [① phân tích ◀] → ② Review Board → ③ --resume`.
|
|
491
|
+
|
|
492
|
+
**Cross-cutting commands** (`/sync`, `/update-framework`, `/fix-bug`, `/debug`, `/learn`,
|
|
493
|
+
`/report-bug`, `/propose-scenario`, `/generate-spec-manifest`) sit outside the linear pipeline —
|
|
494
|
+
**omit the Pipeline line entirely** for these (do not force-fit them onto the map).
|
|
495
|
+
|
|
458
496
|
## Next Command Suggestion
|
|
459
497
|
|
|
460
498
|
Suggest the logical next command based on workflow phase:
|
|
@@ -496,10 +534,13 @@ Suggest the logical next command based on workflow phase:
|
|
|
496
534
|
Format the footer as:
|
|
497
535
|
```
|
|
498
536
|
---
|
|
499
|
-
Status
|
|
537
|
+
Status : {badge}
|
|
500
538
|
{Output Artifacts block}
|
|
501
|
-
|
|
539
|
+
Pipeline : Discovery → PRD → [BDD ◀ bạn ở đây] → Tech Design → Code → Dev Self-Check → QC → Trace Audit
|
|
540
|
+
(review cmd) Vòng review: [① phân tích ◀] → ② Review Board → ③ --resume
|
|
541
|
+
Next : {suggested command with example arguments}
|
|
502
542
|
```
|
|
543
|
+
*(Omit the `Pipeline` line for cross-cutting commands listed above.)*
|
|
503
544
|
|
|
504
545
|
|
|
505
546
|
```
|