@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
|
@@ -127,6 +127,8 @@ Read `.agent/project-context.yaml`. Extract and store:
|
|
|
127
127
|
- `paths.specs_dir` → BDD specs root
|
|
128
128
|
- `paths.prd_dir` → PRD documents root
|
|
129
129
|
- `paths.refinement_dir` → findings/review output dir
|
|
130
|
+
- `paths.qc_dir` → QC automation artifacts root (visible top-level, one subfolder per UC: `{qc_dir}/{UC-ID}/`)
|
|
131
|
+
- `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)
|
|
130
132
|
- `paths.product_definitions_dir` → product definitions root
|
|
131
133
|
- `paths.domain_knowledge_dir` → domain knowledge root
|
|
132
134
|
- `paths.business_dictionary` → path to business-dictionary.md
|
|
@@ -139,6 +141,8 @@ If `paths` section is absent, use these defaults:
|
|
|
139
141
|
- `specs_dir` = `specs/bdd`
|
|
140
142
|
- `prd_dir` = `specs/prd`
|
|
141
143
|
- `refinement_dir` = `.agent/review`
|
|
144
|
+
- `qc_dir` = `docs`
|
|
145
|
+
- `qc_skills_dir` = `.agent/skills/qc`
|
|
142
146
|
- `product_definitions_dir` = `specs/product-definition`
|
|
143
147
|
- `domain_knowledge_dir` = `specs/domain-knowledge`
|
|
144
148
|
- `business_dictionary` = `specs/domain-knowledge/business-dictionary.md`
|
|
@@ -164,7 +168,7 @@ If `services` section is present:
|
|
|
164
168
|
- If `$ARGUMENTS` contains a path, extract the segment after `prd_dir`
|
|
165
169
|
|
|
166
170
|
**2. Route to service** — if active domain matches a key in `services`:
|
|
167
|
-
- Override `paths.specs_dir` → `services.{domain}.specs_dir`
|
|
171
|
+
- 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.
|
|
168
172
|
- 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.
|
|
169
173
|
- Store `active_service` = `services.{domain}.path`
|
|
170
174
|
- Store `active_service_module` = `services.{domain}.module`
|
|
@@ -175,6 +179,7 @@ If `services` section is present:
|
|
|
175
179
|
- Set `active_service = unresolved`
|
|
176
180
|
|
|
177
181
|
**4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
|
|
182
|
+
- 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`.)*
|
|
178
183
|
- Override `paths.prd_dir` → `{spec_source}/specs/prd`
|
|
179
184
|
- Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
|
|
180
185
|
- 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.)*
|
|
@@ -183,8 +188,10 @@ If `services` section is present:
|
|
|
183
188
|
- Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
|
|
184
189
|
- Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
|
|
185
190
|
- Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
|
|
191
|
+
- Override `paths.prd_change_requests_dir` → `{spec_source}/feedback/prd-change-requests`
|
|
192
|
+
- 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`.)*
|
|
186
193
|
|
|
187
|
-
> **Why under `spec_source`:** PRD, design-spec, domain knowledge, the **API contract (tech-docs)**,
|
|
194
|
+
> **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.
|
|
188
195
|
|
|
189
196
|
---
|
|
190
197
|
|
|
@@ -204,12 +211,12 @@ When `active_service` has been resolved to a real path in Step 1.5 (e.g., `user-
|
|
|
204
211
|
|----------|--------|
|
|
205
212
|
| `conventions.test_command` | service's `conventions.test_command` |
|
|
206
213
|
| `conventions.build_command` | service's `conventions.build_command` |
|
|
207
|
-
| `paths.trace_dir` | `{active_service}/{service paths.trace_dir}`
|
|
208
|
-
| `paths.specs_dir` | `{active_service}/{service paths.specs_dir}`
|
|
214
|
+
| `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`). |
|
|
215
|
+
| `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. |
|
|
209
216
|
|
|
210
217
|
**3. Store** `service_root = {active_service}` as the working directory anchor for all downstream commands:
|
|
211
218
|
- Shell commands (`/dev-run-test`, `/dev-gen-test`) run **from within** `service_root`
|
|
212
|
-
-
|
|
219
|
+
- **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/`).
|
|
213
220
|
|
|
214
221
|
**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).
|
|
215
222
|
|
|
@@ -599,6 +606,36 @@ Output Artifacts:
|
|
|
599
606
|
|
|
600
607
|
If no files were written (e.g., review or analysis commands) → write `Output Artifacts: none (read-only)`.
|
|
601
608
|
|
|
609
|
+
## Pipeline Position
|
|
610
|
+
|
|
611
|
+
Print a one-line map of the pipeline with the CURRENT command's phase marked `◀ bạn ở đây`,
|
|
612
|
+
so the user always sees where this command sits in the end-to-end flow:
|
|
613
|
+
|
|
614
|
+
```
|
|
615
|
+
Discovery → PRD → [Design Spec] → BDD → Tech Design → Code → Dev Self-Check → QC → Trace Audit
|
|
616
|
+
```
|
|
617
|
+
|
|
618
|
+
Find the current command in this phase legend and mark **its** phase in the map above:
|
|
619
|
+
|
|
620
|
+
| Phase | Commands |
|
|
621
|
+
|-------|----------|
|
|
622
|
+
| Discovery | `/define-product` |
|
|
623
|
+
| PRD | `/generate-prd` · `/refine-prd` · `/review-context` (PRD) |
|
|
624
|
+
| Design Spec | `/generate-design-spec` |
|
|
625
|
+
| BDD | `/generate-bdd` · `/review-context` (BDD) |
|
|
626
|
+
| Tech Design | `/generate-tech-docs` · `/map-testids` · `/review-tech-docs` |
|
|
627
|
+
| Code | `/generate-code` · `/review-code` |
|
|
628
|
+
| Dev Self-Check | `/dev-gen-test` · `/dev-run-test` · `/dev-smoke-test` |
|
|
629
|
+
| QC | `/qc-analyze` · `/qc-plan` · `/qc-design-test` · `/qc-review` · `/qc-run-test` · `/qc-report` |
|
|
630
|
+
| Trace Audit | `/validate-traces` |
|
|
631
|
+
|
|
632
|
+
For a **review command**, also append the 3-step review loop with the current step marked, e.g.:
|
|
633
|
+
`Vòng review: [① phân tích ◀] → ② Review Board → ③ --resume`.
|
|
634
|
+
|
|
635
|
+
**Cross-cutting commands** (`/sync`, `/update-framework`, `/fix-bug`, `/debug`, `/learn`,
|
|
636
|
+
`/report-bug`, `/propose-scenario`, `/generate-spec-manifest`) sit outside the linear pipeline —
|
|
637
|
+
**omit the Pipeline line entirely** for these (do not force-fit them onto the map).
|
|
638
|
+
|
|
602
639
|
## Next Command Suggestion
|
|
603
640
|
|
|
604
641
|
Suggest the logical next command based on workflow phase:
|
|
@@ -640,10 +677,13 @@ Suggest the logical next command based on workflow phase:
|
|
|
640
677
|
Format the footer as:
|
|
641
678
|
```
|
|
642
679
|
---
|
|
643
|
-
Status
|
|
680
|
+
Status : {badge}
|
|
644
681
|
{Output Artifacts block}
|
|
645
|
-
|
|
682
|
+
Pipeline : Discovery → PRD → [BDD ◀ bạn ở đây] → Tech Design → Code → Dev Self-Check → QC → Trace Audit
|
|
683
|
+
(review cmd) Vòng review: [① phân tích ◀] → ② Review Board → ③ --resume
|
|
684
|
+
Next : {suggested command with example arguments}
|
|
646
685
|
```
|
|
686
|
+
*(Omit the `Pipeline` line for cross-cutting commands listed above.)*
|
|
647
687
|
|
|
648
688
|
|
|
649
689
|
```
|
package/commands/fix-bug.md
CHANGED
|
@@ -84,7 +84,7 @@ Wait for explicit "Y" or "N" from the user before continuing.
|
|
|
84
84
|
- "N" → stop and ask what the user wants to change.
|
|
85
85
|
|
|
86
86
|
|
|
87
|
-
*Note: For this command, the target in Step 1 is a ticket ID (e.g., `PROJ-123`) or bug description from `$ARGUMENTS`.
|
|
87
|
+
*Note: For this command, the target in Step 1 is a ticket ID (e.g., `PROJ-123`), a **filed bug `{BUG-ID}`** (a `{paths.bug_reports_dir}/{BUG-ID}.md` from `/report-bug` — e.g. a QC product-gap), or a bug description from `$ARGUMENTS`. If a `{BUG-ID}` is given, resolve & read that report for spec context; otherwise proceed to context loading.*
|
|
88
88
|
|
|
89
89
|
## Context
|
|
90
90
|
# Context Loader — Load All Project Context
|
|
@@ -125,6 +125,8 @@ Read `.agent/project-context.yaml`. Extract and store:
|
|
|
125
125
|
- `paths.specs_dir` → BDD specs root
|
|
126
126
|
- `paths.prd_dir` → PRD documents root
|
|
127
127
|
- `paths.refinement_dir` → findings/review output dir
|
|
128
|
+
- `paths.qc_dir` → QC automation artifacts root (visible top-level, one subfolder per UC: `{qc_dir}/{UC-ID}/`)
|
|
129
|
+
- `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)
|
|
128
130
|
- `paths.product_definitions_dir` → product definitions root
|
|
129
131
|
- `paths.domain_knowledge_dir` → domain knowledge root
|
|
130
132
|
- `paths.business_dictionary` → path to business-dictionary.md
|
|
@@ -137,6 +139,8 @@ If `paths` section is absent, use these defaults:
|
|
|
137
139
|
- `specs_dir` = `specs/bdd`
|
|
138
140
|
- `prd_dir` = `specs/prd`
|
|
139
141
|
- `refinement_dir` = `.agent/review`
|
|
142
|
+
- `qc_dir` = `docs`
|
|
143
|
+
- `qc_skills_dir` = `.agent/skills/qc`
|
|
140
144
|
- `product_definitions_dir` = `specs/product-definition`
|
|
141
145
|
- `domain_knowledge_dir` = `specs/domain-knowledge`
|
|
142
146
|
- `business_dictionary` = `specs/domain-knowledge/business-dictionary.md`
|
|
@@ -162,7 +166,7 @@ If `services` section is present:
|
|
|
162
166
|
- If `$ARGUMENTS` contains a path, extract the segment after `prd_dir`
|
|
163
167
|
|
|
164
168
|
**2. Route to service** — if active domain matches a key in `services`:
|
|
165
|
-
- Override `paths.specs_dir` → `services.{domain}.specs_dir`
|
|
169
|
+
- 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.
|
|
166
170
|
- 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.
|
|
167
171
|
- Store `active_service` = `services.{domain}.path`
|
|
168
172
|
- Store `active_service_module` = `services.{domain}.module`
|
|
@@ -173,6 +177,7 @@ If `services` section is present:
|
|
|
173
177
|
- Set `active_service = unresolved`
|
|
174
178
|
|
|
175
179
|
**4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
|
|
180
|
+
- 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`.)*
|
|
176
181
|
- Override `paths.prd_dir` → `{spec_source}/specs/prd`
|
|
177
182
|
- Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
|
|
178
183
|
- 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.)*
|
|
@@ -181,8 +186,10 @@ If `services` section is present:
|
|
|
181
186
|
- Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
|
|
182
187
|
- Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
|
|
183
188
|
- Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
|
|
189
|
+
- Override `paths.prd_change_requests_dir` → `{spec_source}/feedback/prd-change-requests`
|
|
190
|
+
- 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`.)*
|
|
184
191
|
|
|
185
|
-
> **Why under `spec_source`:** PRD, design-spec, domain knowledge, the **API contract (tech-docs)**,
|
|
192
|
+
> **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.
|
|
186
193
|
|
|
187
194
|
---
|
|
188
195
|
|
|
@@ -202,12 +209,12 @@ When `active_service` has been resolved to a real path in Step 1.5 (e.g., `user-
|
|
|
202
209
|
|----------|--------|
|
|
203
210
|
| `conventions.test_command` | service's `conventions.test_command` |
|
|
204
211
|
| `conventions.build_command` | service's `conventions.build_command` |
|
|
205
|
-
| `paths.trace_dir` | `{active_service}/{service paths.trace_dir}`
|
|
206
|
-
| `paths.specs_dir` | `{active_service}/{service paths.specs_dir}`
|
|
212
|
+
| `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`). |
|
|
213
|
+
| `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. |
|
|
207
214
|
|
|
208
215
|
**3. Store** `service_root = {active_service}` as the working directory anchor for all downstream commands:
|
|
209
216
|
- Shell commands (`/dev-run-test`, `/dev-gen-test`) run **from within** `service_root`
|
|
210
|
-
-
|
|
217
|
+
- **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/`).
|
|
211
218
|
|
|
212
219
|
**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).
|
|
213
220
|
|
|
@@ -387,8 +394,9 @@ Proceed to the next step of the calling command.
|
|
|
387
394
|
---
|
|
388
395
|
|
|
389
396
|
## Phase 1 — Gather Info
|
|
397
|
+
If a `{BUG-ID}` was given: read `{paths.bug_reports_dir}/{BUG-ID}.md` for the spec context, AC violated, expected-vs-actual, and the suggested layer — use it as the bug details (no need to re-ask).
|
|
390
398
|
If ticket: fetch details (or ask user to paste).
|
|
391
|
-
If no ticket — CHECKPOINT:
|
|
399
|
+
If no ticket / BUG-ID — CHECKPOINT:
|
|
392
400
|
1. Where does the bug occur? (module, endpoint, flow)
|
|
393
401
|
2. Steps to reproduce?
|
|
394
402
|
3. Expected vs Actual?
|
|
@@ -461,7 +469,11 @@ Proceed? (Y/N)
|
|
|
461
469
|
```
|
|
462
470
|
|
|
463
471
|
## Phase 3 — Fix
|
|
472
|
+
|
|
473
|
+
*Umbrella mode: the buggy code lives in the **service submodule** resolved at context-loader Step 1.6 — create the branch and run every git/build step from **inside** `{service_root}`. Single-service: omit the `cd`.*
|
|
474
|
+
|
|
464
475
|
```bash
|
|
476
|
+
cd {service_root} # umbrella: the service submodule; single-service: omit
|
|
465
477
|
git checkout -b fix/{TICKET_ID}-{description}
|
|
466
478
|
```
|
|
467
479
|
Apply fix. Add trace annotation if file has `@trace.implements`:
|
|
@@ -478,13 +490,37 @@ Test: "Regression {TICKET_ID}: {bug description}"
|
|
|
478
490
|
```
|
|
479
491
|
Run test. If fail → debug and fix (max 3 iterations).
|
|
480
492
|
|
|
481
|
-
## Phase 5 — Build & Commit
|
|
493
|
+
## Phase 5 — Build & Commit (2-layer push in umbrella mode)
|
|
482
494
|
```bash
|
|
483
|
-
{conventions.build_command} # max 3 retries
|
|
495
|
+
{conventions.build_command} # max 3 retries — runs inside {service_root} in umbrella mode
|
|
496
|
+
# Tầng 1 — push the fix branch in the service submodule (where the code lives):
|
|
484
497
|
git add {files}
|
|
485
498
|
git commit -m "fix({TICKET_ID}): {description}"
|
|
486
|
-
git push -u origin fix/{TICKET_ID}-{slug}
|
|
499
|
+
git push -u origin fix/{TICKET_ID}-{slug} # then open a PR into the service's tracked branch
|
|
487
500
|
```
|
|
501
|
+
> **Umbrella mode — Tầng 2 (bump umbrella pointer):** the umbrella records a *commit* of the service
|
|
502
|
+
> submodule, not a branch. After the fix-branch PR **merges** into the service's tracked branch, bump
|
|
503
|
+
> the pointer so teammates pulling the umbrella don't hit "commit not found":
|
|
504
|
+
> ```bash
|
|
505
|
+
> cd - # back to umbrella root
|
|
506
|
+
> git add {service_root} && git commit -m "chore: bump {service_root} pointer (fix {TICKET_ID})"
|
|
507
|
+
> git push
|
|
508
|
+
> ```
|
|
509
|
+
> Single-service mode: no umbrella pointer — Tầng 1 is the whole push. Full rule: Sync & Update §4.4 (commit 2 tầng).
|
|
510
|
+
|
|
511
|
+
## Phase 5.5 — Close the bug report (if fixing a filed `{BUG-ID}`)
|
|
512
|
+
|
|
513
|
+
*Skip if the target was a plain ticket/description (no `{BUG-ID}` file).*
|
|
514
|
+
|
|
515
|
+
After the fix is committed, update `{paths.bug_reports_dir}/{BUG-ID}.md`:
|
|
516
|
+
- Set `State` → `🟡 Fixed` and append a short **Resolution** (root cause + commit/PR link).
|
|
517
|
+
- It is **not** `Closed` yet — QC owns verification: when `/qc-run-test` re-runs and `qc_status`
|
|
518
|
+
for the linked SC flips to `pass`, it becomes `🟢 Closed` (and `qc_owner`/`qc_blocked_by` clear).
|
|
519
|
+
- Commit the updated report to the spec repo (same 2-layer push as `/report-bug`) so the PO/PM
|
|
520
|
+
"waiting-on" view reflects it on `/sync`.
|
|
521
|
+
|
|
522
|
+
This is the only write `/fix-bug` makes to the feedback area — it still fixes **code** only,
|
|
523
|
+
never edits PRD/BDD (spec changes are PO/Dev per BUG_FLOW Case 2–4).
|
|
488
524
|
|
|
489
525
|
## Phase 6 — Offer to Record a Lesson (optional)
|
|
490
526
|
|
|
@@ -605,6 +641,36 @@ Output Artifacts:
|
|
|
605
641
|
|
|
606
642
|
If no files were written (e.g., review or analysis commands) → write `Output Artifacts: none (read-only)`.
|
|
607
643
|
|
|
644
|
+
## Pipeline Position
|
|
645
|
+
|
|
646
|
+
Print a one-line map of the pipeline with the CURRENT command's phase marked `◀ bạn ở đây`,
|
|
647
|
+
so the user always sees where this command sits in the end-to-end flow:
|
|
648
|
+
|
|
649
|
+
```
|
|
650
|
+
Discovery → PRD → [Design Spec] → BDD → Tech Design → Code → Dev Self-Check → QC → Trace Audit
|
|
651
|
+
```
|
|
652
|
+
|
|
653
|
+
Find the current command in this phase legend and mark **its** phase in the map above:
|
|
654
|
+
|
|
655
|
+
| Phase | Commands |
|
|
656
|
+
|-------|----------|
|
|
657
|
+
| Discovery | `/define-product` |
|
|
658
|
+
| PRD | `/generate-prd` · `/refine-prd` · `/review-context` (PRD) |
|
|
659
|
+
| Design Spec | `/generate-design-spec` |
|
|
660
|
+
| BDD | `/generate-bdd` · `/review-context` (BDD) |
|
|
661
|
+
| Tech Design | `/generate-tech-docs` · `/map-testids` · `/review-tech-docs` |
|
|
662
|
+
| Code | `/generate-code` · `/review-code` |
|
|
663
|
+
| Dev Self-Check | `/dev-gen-test` · `/dev-run-test` · `/dev-smoke-test` |
|
|
664
|
+
| QC | `/qc-analyze` · `/qc-plan` · `/qc-design-test` · `/qc-review` · `/qc-run-test` · `/qc-report` |
|
|
665
|
+
| Trace Audit | `/validate-traces` |
|
|
666
|
+
|
|
667
|
+
For a **review command**, also append the 3-step review loop with the current step marked, e.g.:
|
|
668
|
+
`Vòng review: [① phân tích ◀] → ② Review Board → ③ --resume`.
|
|
669
|
+
|
|
670
|
+
**Cross-cutting commands** (`/sync`, `/update-framework`, `/fix-bug`, `/debug`, `/learn`,
|
|
671
|
+
`/report-bug`, `/propose-scenario`, `/generate-spec-manifest`) sit outside the linear pipeline —
|
|
672
|
+
**omit the Pipeline line entirely** for these (do not force-fit them onto the map).
|
|
673
|
+
|
|
608
674
|
## Next Command Suggestion
|
|
609
675
|
|
|
610
676
|
Suggest the logical next command based on workflow phase:
|
|
@@ -646,10 +712,13 @@ Suggest the logical next command based on workflow phase:
|
|
|
646
712
|
Format the footer as:
|
|
647
713
|
```
|
|
648
714
|
---
|
|
649
|
-
Status
|
|
715
|
+
Status : {badge}
|
|
650
716
|
{Output Artifacts block}
|
|
651
|
-
|
|
717
|
+
Pipeline : Discovery → PRD → [BDD ◀ bạn ở đây] → Tech Design → Code → Dev Self-Check → QC → Trace Audit
|
|
718
|
+
(review cmd) Vòng review: [① phân tích ◀] → ② Review Board → ③ --resume
|
|
719
|
+
Next : {suggested command with example arguments}
|
|
652
720
|
```
|
|
721
|
+
*(Omit the `Pipeline` line for cross-cutting commands listed above.)*
|
|
653
722
|
|
|
654
723
|
|
|
655
724
|
```
|
|
@@ -657,7 +726,8 @@ Next : {suggested command with example arguments}
|
|
|
657
726
|
Root Cause: {analysis}
|
|
658
727
|
Changes: {list}
|
|
659
728
|
✅ Regression test added | ✅ Build: SUCCESS
|
|
729
|
+
{🐞 BUG-{id} → State: Fixed (pushed) — Closed after /qc-run-test re-verify pass | if fixing a filed bug}
|
|
660
730
|
{📝 Lesson L-NNN recorded (if captured)}
|
|
661
731
|
Branch: fix/{TICKET_ID}-{slug}
|
|
662
|
-
Next: Create PR and link to ticket.
|
|
732
|
+
Next: Create PR and link to ticket. {QC: re-run /qc-run-test {UC-ID} to verify + close the bug | if applicable}
|
|
663
733
|
```
|
package/commands/fix-bug.tmpl
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
## Gate
|
|
4
4
|
{{include:steps/gate.md}}
|
|
5
5
|
|
|
6
|
-
*Note: For this command, the target in Step 1 is a ticket ID (e.g., `PROJ-123`) or bug description from `$ARGUMENTS`.
|
|
6
|
+
*Note: For this command, the target in Step 1 is a ticket ID (e.g., `PROJ-123`), a **filed bug `{BUG-ID}`** (a `{paths.bug_reports_dir}/{BUG-ID}.md` from `/report-bug` — e.g. a QC product-gap), or a bug description from `$ARGUMENTS`. If a `{BUG-ID}` is given, resolve & read that report for spec context; otherwise proceed to context loading.*
|
|
7
7
|
|
|
8
8
|
## Context
|
|
9
9
|
{{include:steps/context-loader.md}}
|
|
@@ -11,8 +11,9 @@
|
|
|
11
11
|
---
|
|
12
12
|
|
|
13
13
|
## Phase 1 — Gather Info
|
|
14
|
+
If a `{BUG-ID}` was given: read `{paths.bug_reports_dir}/{BUG-ID}.md` for the spec context, AC violated, expected-vs-actual, and the suggested layer — use it as the bug details (no need to re-ask).
|
|
14
15
|
If ticket: fetch details (or ask user to paste).
|
|
15
|
-
If no ticket — CHECKPOINT:
|
|
16
|
+
If no ticket / BUG-ID — CHECKPOINT:
|
|
16
17
|
1. Where does the bug occur? (module, endpoint, flow)
|
|
17
18
|
2. Steps to reproduce?
|
|
18
19
|
3. Expected vs Actual?
|
|
@@ -85,7 +86,11 @@ Proceed? (Y/N)
|
|
|
85
86
|
```
|
|
86
87
|
|
|
87
88
|
## Phase 3 — Fix
|
|
89
|
+
|
|
90
|
+
*Umbrella mode: the buggy code lives in the **service submodule** resolved at context-loader Step 1.6 — create the branch and run every git/build step from **inside** `{service_root}`. Single-service: omit the `cd`.*
|
|
91
|
+
|
|
88
92
|
```bash
|
|
93
|
+
cd {service_root} # umbrella: the service submodule; single-service: omit
|
|
89
94
|
git checkout -b fix/{TICKET_ID}-{description}
|
|
90
95
|
```
|
|
91
96
|
Apply fix. Add trace annotation if file has `@trace.implements`:
|
|
@@ -102,13 +107,37 @@ Test: "Regression {TICKET_ID}: {bug description}"
|
|
|
102
107
|
```
|
|
103
108
|
Run test. If fail → debug and fix (max 3 iterations).
|
|
104
109
|
|
|
105
|
-
## Phase 5 — Build & Commit
|
|
110
|
+
## Phase 5 — Build & Commit (2-layer push in umbrella mode)
|
|
106
111
|
```bash
|
|
107
|
-
{conventions.build_command} # max 3 retries
|
|
112
|
+
{conventions.build_command} # max 3 retries — runs inside {service_root} in umbrella mode
|
|
113
|
+
# Tầng 1 — push the fix branch in the service submodule (where the code lives):
|
|
108
114
|
git add {files}
|
|
109
115
|
git commit -m "fix({TICKET_ID}): {description}"
|
|
110
|
-
git push -u origin fix/{TICKET_ID}-{slug}
|
|
116
|
+
git push -u origin fix/{TICKET_ID}-{slug} # then open a PR into the service's tracked branch
|
|
111
117
|
```
|
|
118
|
+
> **Umbrella mode — Tầng 2 (bump umbrella pointer):** the umbrella records a *commit* of the service
|
|
119
|
+
> submodule, not a branch. After the fix-branch PR **merges** into the service's tracked branch, bump
|
|
120
|
+
> the pointer so teammates pulling the umbrella don't hit "commit not found":
|
|
121
|
+
> ```bash
|
|
122
|
+
> cd - # back to umbrella root
|
|
123
|
+
> git add {service_root} && git commit -m "chore: bump {service_root} pointer (fix {TICKET_ID})"
|
|
124
|
+
> git push
|
|
125
|
+
> ```
|
|
126
|
+
> Single-service mode: no umbrella pointer — Tầng 1 is the whole push. Full rule: Sync & Update §4.4 (commit 2 tầng).
|
|
127
|
+
|
|
128
|
+
## Phase 5.5 — Close the bug report (if fixing a filed `{BUG-ID}`)
|
|
129
|
+
|
|
130
|
+
*Skip if the target was a plain ticket/description (no `{BUG-ID}` file).*
|
|
131
|
+
|
|
132
|
+
After the fix is committed, update `{paths.bug_reports_dir}/{BUG-ID}.md`:
|
|
133
|
+
- Set `State` → `🟡 Fixed` and append a short **Resolution** (root cause + commit/PR link).
|
|
134
|
+
- It is **not** `Closed` yet — QC owns verification: when `/qc-run-test` re-runs and `qc_status`
|
|
135
|
+
for the linked SC flips to `pass`, it becomes `🟢 Closed` (and `qc_owner`/`qc_blocked_by` clear).
|
|
136
|
+
- Commit the updated report to the spec repo (same 2-layer push as `/report-bug`) so the PO/PM
|
|
137
|
+
"waiting-on" view reflects it on `/sync`.
|
|
138
|
+
|
|
139
|
+
This is the only write `/fix-bug` makes to the feedback area — it still fixes **code** only,
|
|
140
|
+
never edits PRD/BDD (spec changes are PO/Dev per BUG_FLOW Case 2–4).
|
|
112
141
|
|
|
113
142
|
## Phase 6 — Offer to Record a Lesson (optional)
|
|
114
143
|
|
|
@@ -135,7 +164,8 @@ If `Y` → run the capture procedure below with `source=/fix-bug {TICKET_ID}`, a
|
|
|
135
164
|
Root Cause: {analysis}
|
|
136
165
|
Changes: {list}
|
|
137
166
|
✅ Regression test added | ✅ Build: SUCCESS
|
|
167
|
+
{🐞 BUG-{id} → State: Fixed (pushed) — Closed after /qc-run-test re-verify pass | if fixing a filed bug}
|
|
138
168
|
{📝 Lesson L-NNN recorded (if captured)}
|
|
139
169
|
Branch: fix/{TICKET_ID}-{slug}
|
|
140
|
-
Next: Create PR and link to ticket.
|
|
170
|
+
Next: Create PR and link to ticket. {QC: re-run /qc-run-test {UC-ID} to verify + close the bug | if applicable}
|
|
141
171
|
```
|
package/commands/generate-bdd.md
CHANGED
|
@@ -123,6 +123,8 @@ Read `.agent/project-context.yaml`. Extract and store:
|
|
|
123
123
|
- `paths.specs_dir` → BDD specs root
|
|
124
124
|
- `paths.prd_dir` → PRD documents root
|
|
125
125
|
- `paths.refinement_dir` → findings/review output dir
|
|
126
|
+
- `paths.qc_dir` → QC automation artifacts root (visible top-level, one subfolder per UC: `{qc_dir}/{UC-ID}/`)
|
|
127
|
+
- `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)
|
|
126
128
|
- `paths.product_definitions_dir` → product definitions root
|
|
127
129
|
- `paths.domain_knowledge_dir` → domain knowledge root
|
|
128
130
|
- `paths.business_dictionary` → path to business-dictionary.md
|
|
@@ -135,6 +137,8 @@ If `paths` section is absent, use these defaults:
|
|
|
135
137
|
- `specs_dir` = `specs/bdd`
|
|
136
138
|
- `prd_dir` = `specs/prd`
|
|
137
139
|
- `refinement_dir` = `.agent/review`
|
|
140
|
+
- `qc_dir` = `docs`
|
|
141
|
+
- `qc_skills_dir` = `.agent/skills/qc`
|
|
138
142
|
- `product_definitions_dir` = `specs/product-definition`
|
|
139
143
|
- `domain_knowledge_dir` = `specs/domain-knowledge`
|
|
140
144
|
- `business_dictionary` = `specs/domain-knowledge/business-dictionary.md`
|
|
@@ -160,7 +164,7 @@ If `services` section is present:
|
|
|
160
164
|
- If `$ARGUMENTS` contains a path, extract the segment after `prd_dir`
|
|
161
165
|
|
|
162
166
|
**2. Route to service** — if active domain matches a key in `services`:
|
|
163
|
-
- Override `paths.specs_dir` → `services.{domain}.specs_dir`
|
|
167
|
+
- 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.
|
|
164
168
|
- 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.
|
|
165
169
|
- Store `active_service` = `services.{domain}.path`
|
|
166
170
|
- Store `active_service_module` = `services.{domain}.module`
|
|
@@ -171,6 +175,7 @@ If `services` section is present:
|
|
|
171
175
|
- Set `active_service = unresolved`
|
|
172
176
|
|
|
173
177
|
**4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
|
|
178
|
+
- 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`.)*
|
|
174
179
|
- Override `paths.prd_dir` → `{spec_source}/specs/prd`
|
|
175
180
|
- Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
|
|
176
181
|
- 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.)*
|
|
@@ -179,8 +184,10 @@ If `services` section is present:
|
|
|
179
184
|
- Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
|
|
180
185
|
- Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
|
|
181
186
|
- Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
|
|
187
|
+
- Override `paths.prd_change_requests_dir` → `{spec_source}/feedback/prd-change-requests`
|
|
188
|
+
- 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`.)*
|
|
182
189
|
|
|
183
|
-
> **Why under `spec_source`:** PRD, design-spec, domain knowledge, the **API contract (tech-docs)**,
|
|
190
|
+
> **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.
|
|
184
191
|
|
|
185
192
|
---
|
|
186
193
|
|
|
@@ -200,12 +207,12 @@ When `active_service` has been resolved to a real path in Step 1.5 (e.g., `user-
|
|
|
200
207
|
|----------|--------|
|
|
201
208
|
| `conventions.test_command` | service's `conventions.test_command` |
|
|
202
209
|
| `conventions.build_command` | service's `conventions.build_command` |
|
|
203
|
-
| `paths.trace_dir` | `{active_service}/{service paths.trace_dir}`
|
|
204
|
-
| `paths.specs_dir` | `{active_service}/{service paths.specs_dir}`
|
|
210
|
+
| `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`). |
|
|
211
|
+
| `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. |
|
|
205
212
|
|
|
206
213
|
**3. Store** `service_root = {active_service}` as the working directory anchor for all downstream commands:
|
|
207
214
|
- Shell commands (`/dev-run-test`, `/dev-gen-test`) run **from within** `service_root`
|
|
208
|
-
-
|
|
215
|
+
- **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/`).
|
|
209
216
|
|
|
210
217
|
**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).
|
|
211
218
|
|
|
@@ -832,17 +839,19 @@ Feature: <Feature name>
|
|
|
832
839
|
|
|
833
840
|
After generating all `.feature` files, create or update `{paths.trace_dir}/{UC-ID}.tsv` for each UC.
|
|
834
841
|
|
|
842
|
+
> **Umbrella + `spec_source`:** both the `.feature` files **and** the trace `.tsv` write to the **spec repo** (`{spec_source}/specs/bdd/…` and `{spec_source}/.trace/…`, resolved by context-loader) — a **single-repo** write, committed/pushed to the spec submodule. (Trace is consolidated in the spec repo so the PM manages all status in one place; code-side commands update it cross-repo later.)
|
|
843
|
+
|
|
835
844
|
**TSV columns (tab-separated, one header row + one data row per scenario):**
|
|
836
845
|
```
|
|
837
|
-
sc_id\tsc_title\tspec_ver\tgen_ver\timplemented_by\ttest_count\ttest_classes\tdev_selftest\tdev_selftest_at\tqc_status\tqc_run_at\tprd_version\tbdd_version\ttech_doc_revision\tprd_status\tuc_status\tfe_phase\tstatus\tlast_updated
|
|
846
|
+
sc_id\tsc_title\tspec_ver\tgen_ver\timplemented_by\ttest_count\ttest_classes\tdev_selftest\tdev_selftest_at\tqc_status\tqc_run_at\tqc_owner\tqc_blocked_by\tprd_version\tbdd_version\ttech_doc_revision\tfe_tech_doc_revision\tprd_status\tuc_status\tfe_phase\tstatus\tlast_updated
|
|
838
847
|
```
|
|
839
848
|
|
|
840
849
|
**Rules:**
|
|
841
850
|
- If file does not exist → create with header row + all scenario rows.
|
|
842
851
|
- If file exists (re-generation) → for each SC in the new `.feature`:
|
|
843
852
|
- SC already in `.tsv` AND `spec_ver` is unchanged → update only: `sc_title`, `prd_version`, `bdd_version`, `prd_status`, `uc_status`, `last_updated`. Leave all other columns unchanged.
|
|
844
|
-
- SC already in `.tsv` AND `spec_ver` changed (scenario was modified) → update: `sc_title`, `spec_ver`, `prd_version`, `bdd_version`, `prd_status`, `uc_status`, `last_updated` AND set `status = DRIFT` immediately (so the TSV reflects drift without waiting for `/validate-traces`). Leave `gen_ver`, `implemented_by`, `test_count`, `test_classes`, `tech_doc_revision` unchanged.
|
|
845
|
-
- SC is new (added in this re-gen) → append new row with `gen_ver`, `implemented_by`, `test_count`, `test_classes`, `dev_selftest`, `dev_selftest_at`, `qc_status`, `qc_run_at`, `tech_doc_revision` all set to `—`.
|
|
853
|
+
- SC already in `.tsv` AND `spec_ver` changed (scenario was modified) → update: `sc_title`, `spec_ver`, `prd_version`, `bdd_version`, `prd_status`, `uc_status`, `last_updated` AND set `status = DRIFT` immediately (so the TSV reflects drift without waiting for `/validate-traces`). Leave `gen_ver`, `implemented_by`, `test_count`, `test_classes`, `tech_doc_revision`, `fe_tech_doc_revision` unchanged.
|
|
854
|
+
- SC is new (added in this re-gen) → append new row with `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`, `fe_tech_doc_revision` all set to `—`.
|
|
846
855
|
- SC no longer in `.feature` (removed) → delete its row.
|
|
847
856
|
|
|
848
857
|
**Values to write for each scenario:**
|
|
@@ -860,9 +869,12 @@ sc_id\tsc_title\tspec_ver\tgen_ver\timplemented_by\ttest_count\ttest_classes\tde
|
|
|
860
869
|
| `dev_selftest_at` | `—` |
|
|
861
870
|
| `qc_status` | `—` (official QC automation result — set by `/qc-run-test`) |
|
|
862
871
|
| `qc_run_at` | `—` |
|
|
872
|
+
| `qc_owner` | `—` (who a non-passing SC waits on: `dev` / `po` — set by `/qc-run-test` + `/report-bug`) |
|
|
873
|
+
| `qc_blocked_by` | `—` (linked `BUG-{id}` / `GAP-{id}` — set by `/qc-run-test` + `/report-bug`) |
|
|
863
874
|
| `prd_version` | `@trace.prd_version` from `.feature` header |
|
|
864
875
|
| `bdd_version` | `@trace.bdd_version` from `.feature` header |
|
|
865
|
-
| `tech_doc_revision` | `—` |
|
|
876
|
+
| `tech_doc_revision` | `—` (BE API contract revision — set by `/generate-code` + `/review-tech-docs`) |
|
|
877
|
+
| `fe_tech_doc_revision` | `—` (FE client tech-design revision `{UC-ID}-tech-design-{platform}.md` — set by `/generate-code --phase=integration` + `/review-tech-docs` on an FE doc) |
|
|
866
878
|
| `prd_status` | read `\| **Status** \|` from PRD metadata |
|
|
867
879
|
| `uc_status` | `draft` for new UCs; keep existing value for re-gen |
|
|
868
880
|
| `fe_phase` | `—` (set by `/generate-code --phase` when FE implements) |
|
|
@@ -873,21 +885,29 @@ sc_id\tsc_title\tspec_ver\tgen_ver\timplemented_by\ttest_count\ttest_classes\tde
|
|
|
873
885
|
# Refresh Living Docs panel mirror *(local, umbrella mode)*
|
|
874
886
|
|
|
875
887
|
*Skip entirely in single-service mode (no `services` and no `setup.spec_source`) — there
|
|
876
|
-
the
|
|
888
|
+
the repo's own `.trace/` IS the panel location, so nothing to mirror.*
|
|
877
889
|
|
|
878
|
-
After updating the authoritative
|
|
890
|
+
After updating the authoritative TSV(s) at `{paths.trace_dir}`:
|
|
879
891
|
|
|
880
|
-
|
|
892
|
+
**When `setup.spec_source` is set (consolidated trace — the common case):**
|
|
893
|
+
`{paths.trace_dir}` resolves to `{spec_source}/.trace` — the single authoritative location.
|
|
894
|
+
This command runs from `service_root`, so the write is **cross-repo into the spec submodule**;
|
|
895
|
+
commit/push the spec submodule for the trace update (same as `feedback/`).
|
|
896
|
+
1. Resolve `panel_mirror = ./.trace` at the **current workspace root**.
|
|
881
897
|
2. If `panel_mirror` resolves to a different path than `{paths.trace_dir}`, copy each
|
|
882
|
-
just-updated `{UC-ID}.tsv` → `{panel_mirror}/{
|
|
883
|
-
|
|
898
|
+
just-updated `{UC-ID}.tsv` → `{panel_mirror}/{UC-ID}.tsv` (create the dir; overwrite).
|
|
899
|
+
No per-service namespacing — there is one trace set; the owning service is carried in each
|
|
900
|
+
row's `@trace.service`.
|
|
901
|
+
|
|
902
|
+
**Legacy (no `spec_source` — per-service trace):**
|
|
903
|
+
Copy each just-updated `{UC-ID}.tsv` → `{panel_mirror}/{service-name}/{UC-ID}.tsv`
|
|
904
|
+
(namespaced by `active_service`).
|
|
884
905
|
|
|
885
906
|
This keeps the open workspace's Living Docs panel current **between syncs** — it is a
|
|
886
|
-
**local convenience mirror only**. The
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
after all sub-agents return — not inside each sub-agent.
|
|
907
|
+
**local convenience mirror only**. The merged `trace-report.json` (canonical, in
|
|
908
|
+
`{spec_source}/.living-docs/`) is rebuilt by `/sync` or `/validate-traces`. For orchestrated
|
|
909
|
+
commands, do this once in the orchestrator after all sub-agents return — not inside each
|
|
910
|
+
sub-agent.
|
|
891
911
|
|
|
892
912
|
|
|
893
913
|
## Output
|
|
@@ -914,6 +934,36 @@ Output Artifacts:
|
|
|
914
934
|
|
|
915
935
|
If no files were written (e.g., review or analysis commands) → write `Output Artifacts: none (read-only)`.
|
|
916
936
|
|
|
937
|
+
## Pipeline Position
|
|
938
|
+
|
|
939
|
+
Print a one-line map of the pipeline with the CURRENT command's phase marked `◀ bạn ở đây`,
|
|
940
|
+
so the user always sees where this command sits in the end-to-end flow:
|
|
941
|
+
|
|
942
|
+
```
|
|
943
|
+
Discovery → PRD → [Design Spec] → BDD → Tech Design → Code → Dev Self-Check → QC → Trace Audit
|
|
944
|
+
```
|
|
945
|
+
|
|
946
|
+
Find the current command in this phase legend and mark **its** phase in the map above:
|
|
947
|
+
|
|
948
|
+
| Phase | Commands |
|
|
949
|
+
|-------|----------|
|
|
950
|
+
| Discovery | `/define-product` |
|
|
951
|
+
| PRD | `/generate-prd` · `/refine-prd` · `/review-context` (PRD) |
|
|
952
|
+
| Design Spec | `/generate-design-spec` |
|
|
953
|
+
| BDD | `/generate-bdd` · `/review-context` (BDD) |
|
|
954
|
+
| Tech Design | `/generate-tech-docs` · `/map-testids` · `/review-tech-docs` |
|
|
955
|
+
| Code | `/generate-code` · `/review-code` |
|
|
956
|
+
| Dev Self-Check | `/dev-gen-test` · `/dev-run-test` · `/dev-smoke-test` |
|
|
957
|
+
| QC | `/qc-analyze` · `/qc-plan` · `/qc-design-test` · `/qc-review` · `/qc-run-test` · `/qc-report` |
|
|
958
|
+
| Trace Audit | `/validate-traces` |
|
|
959
|
+
|
|
960
|
+
For a **review command**, also append the 3-step review loop with the current step marked, e.g.:
|
|
961
|
+
`Vòng review: [① phân tích ◀] → ② Review Board → ③ --resume`.
|
|
962
|
+
|
|
963
|
+
**Cross-cutting commands** (`/sync`, `/update-framework`, `/fix-bug`, `/debug`, `/learn`,
|
|
964
|
+
`/report-bug`, `/propose-scenario`, `/generate-spec-manifest`) sit outside the linear pipeline —
|
|
965
|
+
**omit the Pipeline line entirely** for these (do not force-fit them onto the map).
|
|
966
|
+
|
|
917
967
|
## Next Command Suggestion
|
|
918
968
|
|
|
919
969
|
Suggest the logical next command based on workflow phase:
|
|
@@ -955,10 +1005,13 @@ Suggest the logical next command based on workflow phase:
|
|
|
955
1005
|
Format the footer as:
|
|
956
1006
|
```
|
|
957
1007
|
---
|
|
958
|
-
Status
|
|
1008
|
+
Status : {badge}
|
|
959
1009
|
{Output Artifacts block}
|
|
960
|
-
|
|
1010
|
+
Pipeline : Discovery → PRD → [BDD ◀ bạn ở đây] → Tech Design → Code → Dev Self-Check → QC → Trace Audit
|
|
1011
|
+
(review cmd) Vòng review: [① phân tích ◀] → ② Review Board → ③ --resume
|
|
1012
|
+
Next : {suggested command with example arguments}
|
|
961
1013
|
```
|
|
1014
|
+
*(Omit the `Pipeline` line for cross-cutting commands listed above.)*
|
|
962
1015
|
|
|
963
1016
|
|
|
964
1017
|
```
|