@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
package/commands/debug.md
CHANGED
|
@@ -128,6 +128,8 @@ Read `.agent/project-context.yaml`. Extract and store:
|
|
|
128
128
|
- `paths.specs_dir` → BDD specs root
|
|
129
129
|
- `paths.prd_dir` → PRD documents root
|
|
130
130
|
- `paths.refinement_dir` → findings/review output dir
|
|
131
|
+
- `paths.qc_dir` → QC automation artifacts root (visible top-level, one subfolder per UC: `{qc_dir}/{UC-ID}/`)
|
|
132
|
+
- `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)
|
|
131
133
|
- `paths.product_definitions_dir` → product definitions root
|
|
132
134
|
- `paths.domain_knowledge_dir` → domain knowledge root
|
|
133
135
|
- `paths.business_dictionary` → path to business-dictionary.md
|
|
@@ -140,6 +142,8 @@ If `paths` section is absent, use these defaults:
|
|
|
140
142
|
- `specs_dir` = `specs/bdd`
|
|
141
143
|
- `prd_dir` = `specs/prd`
|
|
142
144
|
- `refinement_dir` = `.agent/review`
|
|
145
|
+
- `qc_dir` = `docs`
|
|
146
|
+
- `qc_skills_dir` = `.agent/skills/qc`
|
|
143
147
|
- `product_definitions_dir` = `specs/product-definition`
|
|
144
148
|
- `domain_knowledge_dir` = `specs/domain-knowledge`
|
|
145
149
|
- `business_dictionary` = `specs/domain-knowledge/business-dictionary.md`
|
|
@@ -165,7 +169,7 @@ If `services` section is present:
|
|
|
165
169
|
- If `$ARGUMENTS` contains a path, extract the segment after `prd_dir`
|
|
166
170
|
|
|
167
171
|
**2. Route to service** — if active domain matches a key in `services`:
|
|
168
|
-
- Override `paths.specs_dir` → `services.{domain}.specs_dir`
|
|
172
|
+
- 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.
|
|
169
173
|
- 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.
|
|
170
174
|
- Store `active_service` = `services.{domain}.path`
|
|
171
175
|
- Store `active_service_module` = `services.{domain}.module`
|
|
@@ -176,6 +180,7 @@ If `services` section is present:
|
|
|
176
180
|
- Set `active_service = unresolved`
|
|
177
181
|
|
|
178
182
|
**4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
|
|
183
|
+
- 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`.)*
|
|
179
184
|
- Override `paths.prd_dir` → `{spec_source}/specs/prd`
|
|
180
185
|
- Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
|
|
181
186
|
- 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.)*
|
|
@@ -184,8 +189,10 @@ If `services` section is present:
|
|
|
184
189
|
- Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
|
|
185
190
|
- Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
|
|
186
191
|
- Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
|
|
192
|
+
- Override `paths.prd_change_requests_dir` → `{spec_source}/feedback/prd-change-requests`
|
|
193
|
+
- 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`.)*
|
|
187
194
|
|
|
188
|
-
> **Why under `spec_source`:** PRD, design-spec, domain knowledge, the **API contract (tech-docs)**,
|
|
195
|
+
> **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.
|
|
189
196
|
|
|
190
197
|
---
|
|
191
198
|
|
|
@@ -205,12 +212,12 @@ When `active_service` has been resolved to a real path in Step 1.5 (e.g., `user-
|
|
|
205
212
|
|----------|--------|
|
|
206
213
|
| `conventions.test_command` | service's `conventions.test_command` |
|
|
207
214
|
| `conventions.build_command` | service's `conventions.build_command` |
|
|
208
|
-
| `paths.trace_dir` | `{active_service}/{service paths.trace_dir}`
|
|
209
|
-
| `paths.specs_dir` | `{active_service}/{service paths.specs_dir}`
|
|
215
|
+
| `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`). |
|
|
216
|
+
| `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. |
|
|
210
217
|
|
|
211
218
|
**3. Store** `service_root = {active_service}` as the working directory anchor for all downstream commands:
|
|
212
219
|
- Shell commands (`/dev-run-test`, `/dev-gen-test`) run **from within** `service_root`
|
|
213
|
-
-
|
|
220
|
+
- **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/`).
|
|
214
221
|
|
|
215
222
|
**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).
|
|
216
223
|
|
|
@@ -613,6 +620,36 @@ Output Artifacts:
|
|
|
613
620
|
|
|
614
621
|
If no files were written (e.g., review or analysis commands) → write `Output Artifacts: none (read-only)`.
|
|
615
622
|
|
|
623
|
+
## Pipeline Position
|
|
624
|
+
|
|
625
|
+
Print a one-line map of the pipeline with the CURRENT command's phase marked `◀ bạn ở đây`,
|
|
626
|
+
so the user always sees where this command sits in the end-to-end flow:
|
|
627
|
+
|
|
628
|
+
```
|
|
629
|
+
Discovery → PRD → [Design Spec] → BDD → Tech Design → Code → Dev Self-Check → QC → Trace Audit
|
|
630
|
+
```
|
|
631
|
+
|
|
632
|
+
Find the current command in this phase legend and mark **its** phase in the map above:
|
|
633
|
+
|
|
634
|
+
| Phase | Commands |
|
|
635
|
+
|-------|----------|
|
|
636
|
+
| Discovery | `/define-product` |
|
|
637
|
+
| PRD | `/generate-prd` · `/refine-prd` · `/review-context` (PRD) |
|
|
638
|
+
| Design Spec | `/generate-design-spec` |
|
|
639
|
+
| BDD | `/generate-bdd` · `/review-context` (BDD) |
|
|
640
|
+
| Tech Design | `/generate-tech-docs` · `/map-testids` · `/review-tech-docs` |
|
|
641
|
+
| Code | `/generate-code` · `/review-code` |
|
|
642
|
+
| Dev Self-Check | `/dev-gen-test` · `/dev-run-test` · `/dev-smoke-test` |
|
|
643
|
+
| QC | `/qc-analyze` · `/qc-plan` · `/qc-design-test` · `/qc-review` · `/qc-run-test` · `/qc-report` |
|
|
644
|
+
| Trace Audit | `/validate-traces` |
|
|
645
|
+
|
|
646
|
+
For a **review command**, also append the 3-step review loop with the current step marked, e.g.:
|
|
647
|
+
`Vòng review: [① phân tích ◀] → ② Review Board → ③ --resume`.
|
|
648
|
+
|
|
649
|
+
**Cross-cutting commands** (`/sync`, `/update-framework`, `/fix-bug`, `/debug`, `/learn`,
|
|
650
|
+
`/report-bug`, `/propose-scenario`, `/generate-spec-manifest`) sit outside the linear pipeline —
|
|
651
|
+
**omit the Pipeline line entirely** for these (do not force-fit them onto the map).
|
|
652
|
+
|
|
616
653
|
## Next Command Suggestion
|
|
617
654
|
|
|
618
655
|
Suggest the logical next command based on workflow phase:
|
|
@@ -654,10 +691,13 @@ Suggest the logical next command based on workflow phase:
|
|
|
654
691
|
Format the footer as:
|
|
655
692
|
```
|
|
656
693
|
---
|
|
657
|
-
Status
|
|
694
|
+
Status : {badge}
|
|
658
695
|
{Output Artifacts block}
|
|
659
|
-
|
|
696
|
+
Pipeline : Discovery → PRD → [BDD ◀ bạn ở đây] → Tech Design → Code → Dev Self-Check → QC → Trace Audit
|
|
697
|
+
(review cmd) Vòng review: [① phân tích ◀] → ② Review Board → ③ --resume
|
|
698
|
+
Next : {suggested command with example arguments}
|
|
660
699
|
```
|
|
700
|
+
*(Omit the `Pipeline` line for cross-cutting commands listed above.)*
|
|
661
701
|
|
|
662
702
|
|
|
663
703
|
```
|
|
@@ -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
|
|
|
@@ -547,6 +554,36 @@ Output Artifacts:
|
|
|
547
554
|
|
|
548
555
|
If no files were written (e.g., review or analysis commands) → write `Output Artifacts: none (read-only)`.
|
|
549
556
|
|
|
557
|
+
## Pipeline Position
|
|
558
|
+
|
|
559
|
+
Print a one-line map of the pipeline with the CURRENT command's phase marked `◀ bạn ở đây`,
|
|
560
|
+
so the user always sees where this command sits in the end-to-end flow:
|
|
561
|
+
|
|
562
|
+
```
|
|
563
|
+
Discovery → PRD → [Design Spec] → BDD → Tech Design → Code → Dev Self-Check → QC → Trace Audit
|
|
564
|
+
```
|
|
565
|
+
|
|
566
|
+
Find the current command in this phase legend and mark **its** phase in the map above:
|
|
567
|
+
|
|
568
|
+
| Phase | Commands |
|
|
569
|
+
|-------|----------|
|
|
570
|
+
| Discovery | `/define-product` |
|
|
571
|
+
| PRD | `/generate-prd` · `/refine-prd` · `/review-context` (PRD) |
|
|
572
|
+
| Design Spec | `/generate-design-spec` |
|
|
573
|
+
| BDD | `/generate-bdd` · `/review-context` (BDD) |
|
|
574
|
+
| Tech Design | `/generate-tech-docs` · `/map-testids` · `/review-tech-docs` |
|
|
575
|
+
| Code | `/generate-code` · `/review-code` |
|
|
576
|
+
| Dev Self-Check | `/dev-gen-test` · `/dev-run-test` · `/dev-smoke-test` |
|
|
577
|
+
| QC | `/qc-analyze` · `/qc-plan` · `/qc-design-test` · `/qc-review` · `/qc-run-test` · `/qc-report` |
|
|
578
|
+
| Trace Audit | `/validate-traces` |
|
|
579
|
+
|
|
580
|
+
For a **review command**, also append the 3-step review loop with the current step marked, e.g.:
|
|
581
|
+
`Vòng review: [① phân tích ◀] → ② Review Board → ③ --resume`.
|
|
582
|
+
|
|
583
|
+
**Cross-cutting commands** (`/sync`, `/update-framework`, `/fix-bug`, `/debug`, `/learn`,
|
|
584
|
+
`/report-bug`, `/propose-scenario`, `/generate-spec-manifest`) sit outside the linear pipeline —
|
|
585
|
+
**omit the Pipeline line entirely** for these (do not force-fit them onto the map).
|
|
586
|
+
|
|
550
587
|
## Next Command Suggestion
|
|
551
588
|
|
|
552
589
|
Suggest the logical next command based on workflow phase:
|
|
@@ -588,10 +625,13 @@ Suggest the logical next command based on workflow phase:
|
|
|
588
625
|
Format the footer as:
|
|
589
626
|
```
|
|
590
627
|
---
|
|
591
|
-
Status
|
|
628
|
+
Status : {badge}
|
|
592
629
|
{Output Artifacts block}
|
|
593
|
-
|
|
630
|
+
Pipeline : Discovery → PRD → [BDD ◀ bạn ở đây] → Tech Design → Code → Dev Self-Check → QC → Trace Audit
|
|
631
|
+
(review cmd) Vòng review: [① phân tích ◀] → ② Review Board → ③ --resume
|
|
632
|
+
Next : {suggested command with example arguments}
|
|
594
633
|
```
|
|
634
|
+
*(Omit the `Pipeline` line for cross-cutting commands listed above.)*
|
|
595
635
|
|
|
596
636
|
|
|
597
637
|
```
|
package/commands/dev-gen-test.md
CHANGED
|
@@ -131,6 +131,8 @@ Read `.agent/project-context.yaml`. Extract and store:
|
|
|
131
131
|
- `paths.specs_dir` → BDD specs root
|
|
132
132
|
- `paths.prd_dir` → PRD documents root
|
|
133
133
|
- `paths.refinement_dir` → findings/review output dir
|
|
134
|
+
- `paths.qc_dir` → QC automation artifacts root (visible top-level, one subfolder per UC: `{qc_dir}/{UC-ID}/`)
|
|
135
|
+
- `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)
|
|
134
136
|
- `paths.product_definitions_dir` → product definitions root
|
|
135
137
|
- `paths.domain_knowledge_dir` → domain knowledge root
|
|
136
138
|
- `paths.business_dictionary` → path to business-dictionary.md
|
|
@@ -143,6 +145,8 @@ If `paths` section is absent, use these defaults:
|
|
|
143
145
|
- `specs_dir` = `specs/bdd`
|
|
144
146
|
- `prd_dir` = `specs/prd`
|
|
145
147
|
- `refinement_dir` = `.agent/review`
|
|
148
|
+
- `qc_dir` = `docs`
|
|
149
|
+
- `qc_skills_dir` = `.agent/skills/qc`
|
|
146
150
|
- `product_definitions_dir` = `specs/product-definition`
|
|
147
151
|
- `domain_knowledge_dir` = `specs/domain-knowledge`
|
|
148
152
|
- `business_dictionary` = `specs/domain-knowledge/business-dictionary.md`
|
|
@@ -168,7 +172,7 @@ If `services` section is present:
|
|
|
168
172
|
- If `$ARGUMENTS` contains a path, extract the segment after `prd_dir`
|
|
169
173
|
|
|
170
174
|
**2. Route to service** — if active domain matches a key in `services`:
|
|
171
|
-
- Override `paths.specs_dir` → `services.{domain}.specs_dir`
|
|
175
|
+
- 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.
|
|
172
176
|
- 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.
|
|
173
177
|
- Store `active_service` = `services.{domain}.path`
|
|
174
178
|
- Store `active_service_module` = `services.{domain}.module`
|
|
@@ -179,6 +183,7 @@ If `services` section is present:
|
|
|
179
183
|
- Set `active_service = unresolved`
|
|
180
184
|
|
|
181
185
|
**4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
|
|
186
|
+
- 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`.)*
|
|
182
187
|
- Override `paths.prd_dir` → `{spec_source}/specs/prd`
|
|
183
188
|
- Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
|
|
184
189
|
- 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.)*
|
|
@@ -187,8 +192,10 @@ If `services` section is present:
|
|
|
187
192
|
- Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
|
|
188
193
|
- Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
|
|
189
194
|
- Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
|
|
195
|
+
- Override `paths.prd_change_requests_dir` → `{spec_source}/feedback/prd-change-requests`
|
|
196
|
+
- 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`.)*
|
|
190
197
|
|
|
191
|
-
> **Why under `spec_source`:** PRD, design-spec, domain knowledge, the **API contract (tech-docs)**,
|
|
198
|
+
> **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.
|
|
192
199
|
|
|
193
200
|
---
|
|
194
201
|
|
|
@@ -208,12 +215,12 @@ When `active_service` has been resolved to a real path in Step 1.5 (e.g., `user-
|
|
|
208
215
|
|----------|--------|
|
|
209
216
|
| `conventions.test_command` | service's `conventions.test_command` |
|
|
210
217
|
| `conventions.build_command` | service's `conventions.build_command` |
|
|
211
|
-
| `paths.trace_dir` | `{active_service}/{service paths.trace_dir}`
|
|
212
|
-
| `paths.specs_dir` | `{active_service}/{service paths.specs_dir}`
|
|
218
|
+
| `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`). |
|
|
219
|
+
| `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. |
|
|
213
220
|
|
|
214
221
|
**3. Store** `service_root = {active_service}` as the working directory anchor for all downstream commands:
|
|
215
222
|
- Shell commands (`/dev-run-test`, `/dev-gen-test`) run **from within** `service_root`
|
|
216
|
-
-
|
|
223
|
+
- **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/`).
|
|
217
224
|
|
|
218
225
|
**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).
|
|
219
226
|
|
|
@@ -850,21 +857,29 @@ Leave all other columns unchanged (including `dev_selftest_at`, which `/dev-run-
|
|
|
850
857
|
# Refresh Living Docs panel mirror *(local, umbrella mode)*
|
|
851
858
|
|
|
852
859
|
*Skip entirely in single-service mode (no `services` and no `setup.spec_source`) — there
|
|
853
|
-
the
|
|
860
|
+
the repo's own `.trace/` IS the panel location, so nothing to mirror.*
|
|
854
861
|
|
|
855
|
-
After updating the authoritative
|
|
862
|
+
After updating the authoritative TSV(s) at `{paths.trace_dir}`:
|
|
856
863
|
|
|
857
|
-
|
|
864
|
+
**When `setup.spec_source` is set (consolidated trace — the common case):**
|
|
865
|
+
`{paths.trace_dir}` resolves to `{spec_source}/.trace` — the single authoritative location.
|
|
866
|
+
This command runs from `service_root`, so the write is **cross-repo into the spec submodule**;
|
|
867
|
+
commit/push the spec submodule for the trace update (same as `feedback/`).
|
|
868
|
+
1. Resolve `panel_mirror = ./.trace` at the **current workspace root**.
|
|
858
869
|
2. If `panel_mirror` resolves to a different path than `{paths.trace_dir}`, copy each
|
|
859
|
-
just-updated `{UC-ID}.tsv` → `{panel_mirror}/{
|
|
860
|
-
|
|
870
|
+
just-updated `{UC-ID}.tsv` → `{panel_mirror}/{UC-ID}.tsv` (create the dir; overwrite).
|
|
871
|
+
No per-service namespacing — there is one trace set; the owning service is carried in each
|
|
872
|
+
row's `@trace.service`.
|
|
873
|
+
|
|
874
|
+
**Legacy (no `spec_source` — per-service trace):**
|
|
875
|
+
Copy each just-updated `{UC-ID}.tsv` → `{panel_mirror}/{service-name}/{UC-ID}.tsv`
|
|
876
|
+
(namespaced by `active_service`).
|
|
861
877
|
|
|
862
878
|
This keeps the open workspace's Living Docs panel current **between syncs** — it is a
|
|
863
|
-
**local convenience mirror only**. The
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
after all sub-agents return — not inside each sub-agent.
|
|
879
|
+
**local convenience mirror only**. The merged `trace-report.json` (canonical, in
|
|
880
|
+
`{spec_source}/.living-docs/`) is rebuilt by `/sync` or `/validate-traces`. For orchestrated
|
|
881
|
+
commands, do this once in the orchestrator after all sub-agents return — not inside each
|
|
882
|
+
sub-agent.
|
|
868
883
|
|
|
869
884
|
|
|
870
885
|
---
|
|
@@ -893,6 +908,36 @@ Output Artifacts:
|
|
|
893
908
|
|
|
894
909
|
If no files were written (e.g., review or analysis commands) → write `Output Artifacts: none (read-only)`.
|
|
895
910
|
|
|
911
|
+
## Pipeline Position
|
|
912
|
+
|
|
913
|
+
Print a one-line map of the pipeline with the CURRENT command's phase marked `◀ bạn ở đây`,
|
|
914
|
+
so the user always sees where this command sits in the end-to-end flow:
|
|
915
|
+
|
|
916
|
+
```
|
|
917
|
+
Discovery → PRD → [Design Spec] → BDD → Tech Design → Code → Dev Self-Check → QC → Trace Audit
|
|
918
|
+
```
|
|
919
|
+
|
|
920
|
+
Find the current command in this phase legend and mark **its** phase in the map above:
|
|
921
|
+
|
|
922
|
+
| Phase | Commands |
|
|
923
|
+
|-------|----------|
|
|
924
|
+
| Discovery | `/define-product` |
|
|
925
|
+
| PRD | `/generate-prd` · `/refine-prd` · `/review-context` (PRD) |
|
|
926
|
+
| Design Spec | `/generate-design-spec` |
|
|
927
|
+
| BDD | `/generate-bdd` · `/review-context` (BDD) |
|
|
928
|
+
| Tech Design | `/generate-tech-docs` · `/map-testids` · `/review-tech-docs` |
|
|
929
|
+
| Code | `/generate-code` · `/review-code` |
|
|
930
|
+
| Dev Self-Check | `/dev-gen-test` · `/dev-run-test` · `/dev-smoke-test` |
|
|
931
|
+
| QC | `/qc-analyze` · `/qc-plan` · `/qc-design-test` · `/qc-review` · `/qc-run-test` · `/qc-report` |
|
|
932
|
+
| Trace Audit | `/validate-traces` |
|
|
933
|
+
|
|
934
|
+
For a **review command**, also append the 3-step review loop with the current step marked, e.g.:
|
|
935
|
+
`Vòng review: [① phân tích ◀] → ② Review Board → ③ --resume`.
|
|
936
|
+
|
|
937
|
+
**Cross-cutting commands** (`/sync`, `/update-framework`, `/fix-bug`, `/debug`, `/learn`,
|
|
938
|
+
`/report-bug`, `/propose-scenario`, `/generate-spec-manifest`) sit outside the linear pipeline —
|
|
939
|
+
**omit the Pipeline line entirely** for these (do not force-fit them onto the map).
|
|
940
|
+
|
|
896
941
|
## Next Command Suggestion
|
|
897
942
|
|
|
898
943
|
Suggest the logical next command based on workflow phase:
|
|
@@ -934,10 +979,13 @@ Suggest the logical next command based on workflow phase:
|
|
|
934
979
|
Format the footer as:
|
|
935
980
|
```
|
|
936
981
|
---
|
|
937
|
-
Status
|
|
982
|
+
Status : {badge}
|
|
938
983
|
{Output Artifacts block}
|
|
939
|
-
|
|
984
|
+
Pipeline : Discovery → PRD → [BDD ◀ bạn ở đây] → Tech Design → Code → Dev Self-Check → QC → Trace Audit
|
|
985
|
+
(review cmd) Vòng review: [① phân tích ◀] → ② Review Board → ③ --resume
|
|
986
|
+
Next : {suggested command with example arguments}
|
|
940
987
|
```
|
|
988
|
+
*(Omit the `Pipeline` line for cross-cutting commands listed above.)*
|
|
941
989
|
|
|
942
990
|
|
|
943
991
|
```
|
package/commands/dev-run-test.md
CHANGED
|
@@ -131,6 +131,8 @@ Read `.agent/project-context.yaml`. Extract and store:
|
|
|
131
131
|
- `paths.specs_dir` → BDD specs root
|
|
132
132
|
- `paths.prd_dir` → PRD documents root
|
|
133
133
|
- `paths.refinement_dir` → findings/review output dir
|
|
134
|
+
- `paths.qc_dir` → QC automation artifacts root (visible top-level, one subfolder per UC: `{qc_dir}/{UC-ID}/`)
|
|
135
|
+
- `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)
|
|
134
136
|
- `paths.product_definitions_dir` → product definitions root
|
|
135
137
|
- `paths.domain_knowledge_dir` → domain knowledge root
|
|
136
138
|
- `paths.business_dictionary` → path to business-dictionary.md
|
|
@@ -143,6 +145,8 @@ If `paths` section is absent, use these defaults:
|
|
|
143
145
|
- `specs_dir` = `specs/bdd`
|
|
144
146
|
- `prd_dir` = `specs/prd`
|
|
145
147
|
- `refinement_dir` = `.agent/review`
|
|
148
|
+
- `qc_dir` = `docs`
|
|
149
|
+
- `qc_skills_dir` = `.agent/skills/qc`
|
|
146
150
|
- `product_definitions_dir` = `specs/product-definition`
|
|
147
151
|
- `domain_knowledge_dir` = `specs/domain-knowledge`
|
|
148
152
|
- `business_dictionary` = `specs/domain-knowledge/business-dictionary.md`
|
|
@@ -168,7 +172,7 @@ If `services` section is present:
|
|
|
168
172
|
- If `$ARGUMENTS` contains a path, extract the segment after `prd_dir`
|
|
169
173
|
|
|
170
174
|
**2. Route to service** — if active domain matches a key in `services`:
|
|
171
|
-
- Override `paths.specs_dir` → `services.{domain}.specs_dir`
|
|
175
|
+
- 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.
|
|
172
176
|
- 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.
|
|
173
177
|
- Store `active_service` = `services.{domain}.path`
|
|
174
178
|
- Store `active_service_module` = `services.{domain}.module`
|
|
@@ -179,6 +183,7 @@ If `services` section is present:
|
|
|
179
183
|
- Set `active_service = unresolved`
|
|
180
184
|
|
|
181
185
|
**4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
|
|
186
|
+
- 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`.)*
|
|
182
187
|
- Override `paths.prd_dir` → `{spec_source}/specs/prd`
|
|
183
188
|
- Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
|
|
184
189
|
- 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.)*
|
|
@@ -187,8 +192,10 @@ If `services` section is present:
|
|
|
187
192
|
- Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
|
|
188
193
|
- Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
|
|
189
194
|
- Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
|
|
195
|
+
- Override `paths.prd_change_requests_dir` → `{spec_source}/feedback/prd-change-requests`
|
|
196
|
+
- 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`.)*
|
|
190
197
|
|
|
191
|
-
> **Why under `spec_source`:** PRD, design-spec, domain knowledge, the **API contract (tech-docs)**,
|
|
198
|
+
> **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.
|
|
192
199
|
|
|
193
200
|
---
|
|
194
201
|
|
|
@@ -208,12 +215,12 @@ When `active_service` has been resolved to a real path in Step 1.5 (e.g., `user-
|
|
|
208
215
|
|----------|--------|
|
|
209
216
|
| `conventions.test_command` | service's `conventions.test_command` |
|
|
210
217
|
| `conventions.build_command` | service's `conventions.build_command` |
|
|
211
|
-
| `paths.trace_dir` | `{active_service}/{service paths.trace_dir}`
|
|
212
|
-
| `paths.specs_dir` | `{active_service}/{service paths.specs_dir}`
|
|
218
|
+
| `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`). |
|
|
219
|
+
| `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. |
|
|
213
220
|
|
|
214
221
|
**3. Store** `service_root = {active_service}` as the working directory anchor for all downstream commands:
|
|
215
222
|
- Shell commands (`/dev-run-test`, `/dev-gen-test`) run **from within** `service_root`
|
|
216
|
-
-
|
|
223
|
+
- **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/`).
|
|
217
224
|
|
|
218
225
|
**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).
|
|
219
226
|
|
|
@@ -559,7 +566,7 @@ the Living Docs report at the spec module (via `/sync` + `/validate-traces`). Th
|
|
|
559
566
|
files themselves stay in the service — only the run *status* is reported.
|
|
560
567
|
|
|
561
568
|
Update `{paths.trace_dir}/{UC-ID}.tsv` — for each scenario row (matched by `sc_id` via its
|
|
562
|
-
test's `@trace.verifies={UC-ID}-SC{N}` tag)
|
|
569
|
+
test's `@trace.verifies={UC-ID}-SC{N}` tag). *(Umbrella + `spec_source`: `trace_dir` is `{spec_source}/.trace` — tests run from `service_root` but the `dev_selftest` update writes into the **spec repo**; commit/push the spec submodule for it.)*
|
|
563
570
|
|
|
564
571
|
| Column | Value |
|
|
565
572
|
|--------|-------|
|
|
@@ -576,21 +583,29 @@ signals. `dev_selftest`/`dev_selftest_at` are also orthogonal to `status`
|
|
|
576
583
|
# Refresh Living Docs panel mirror *(local, umbrella mode)*
|
|
577
584
|
|
|
578
585
|
*Skip entirely in single-service mode (no `services` and no `setup.spec_source`) — there
|
|
579
|
-
the
|
|
586
|
+
the repo's own `.trace/` IS the panel location, so nothing to mirror.*
|
|
580
587
|
|
|
581
|
-
After updating the authoritative
|
|
588
|
+
After updating the authoritative TSV(s) at `{paths.trace_dir}`:
|
|
582
589
|
|
|
583
|
-
|
|
590
|
+
**When `setup.spec_source` is set (consolidated trace — the common case):**
|
|
591
|
+
`{paths.trace_dir}` resolves to `{spec_source}/.trace` — the single authoritative location.
|
|
592
|
+
This command runs from `service_root`, so the write is **cross-repo into the spec submodule**;
|
|
593
|
+
commit/push the spec submodule for the trace update (same as `feedback/`).
|
|
594
|
+
1. Resolve `panel_mirror = ./.trace` at the **current workspace root**.
|
|
584
595
|
2. If `panel_mirror` resolves to a different path than `{paths.trace_dir}`, copy each
|
|
585
|
-
just-updated `{UC-ID}.tsv` → `{panel_mirror}/{
|
|
586
|
-
|
|
596
|
+
just-updated `{UC-ID}.tsv` → `{panel_mirror}/{UC-ID}.tsv` (create the dir; overwrite).
|
|
597
|
+
No per-service namespacing — there is one trace set; the owning service is carried in each
|
|
598
|
+
row's `@trace.service`.
|
|
599
|
+
|
|
600
|
+
**Legacy (no `spec_source` — per-service trace):**
|
|
601
|
+
Copy each just-updated `{UC-ID}.tsv` → `{panel_mirror}/{service-name}/{UC-ID}.tsv`
|
|
602
|
+
(namespaced by `active_service`).
|
|
587
603
|
|
|
588
604
|
This keeps the open workspace's Living Docs panel current **between syncs** — it is a
|
|
589
|
-
**local convenience mirror only**. The
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
after all sub-agents return — not inside each sub-agent.
|
|
605
|
+
**local convenience mirror only**. The merged `trace-report.json` (canonical, in
|
|
606
|
+
`{spec_source}/.living-docs/`) is rebuilt by `/sync` or `/validate-traces`. For orchestrated
|
|
607
|
+
commands, do this once in the orchestrator after all sub-agents return — not inside each
|
|
608
|
+
sub-agent.
|
|
594
609
|
|
|
595
610
|
|
|
596
611
|
## Output
|
|
@@ -617,6 +632,36 @@ Output Artifacts:
|
|
|
617
632
|
|
|
618
633
|
If no files were written (e.g., review or analysis commands) → write `Output Artifacts: none (read-only)`.
|
|
619
634
|
|
|
635
|
+
## Pipeline Position
|
|
636
|
+
|
|
637
|
+
Print a one-line map of the pipeline with the CURRENT command's phase marked `◀ bạn ở đây`,
|
|
638
|
+
so the user always sees where this command sits in the end-to-end flow:
|
|
639
|
+
|
|
640
|
+
```
|
|
641
|
+
Discovery → PRD → [Design Spec] → BDD → Tech Design → Code → Dev Self-Check → QC → Trace Audit
|
|
642
|
+
```
|
|
643
|
+
|
|
644
|
+
Find the current command in this phase legend and mark **its** phase in the map above:
|
|
645
|
+
|
|
646
|
+
| Phase | Commands |
|
|
647
|
+
|-------|----------|
|
|
648
|
+
| Discovery | `/define-product` |
|
|
649
|
+
| PRD | `/generate-prd` · `/refine-prd` · `/review-context` (PRD) |
|
|
650
|
+
| Design Spec | `/generate-design-spec` |
|
|
651
|
+
| BDD | `/generate-bdd` · `/review-context` (BDD) |
|
|
652
|
+
| Tech Design | `/generate-tech-docs` · `/map-testids` · `/review-tech-docs` |
|
|
653
|
+
| Code | `/generate-code` · `/review-code` |
|
|
654
|
+
| Dev Self-Check | `/dev-gen-test` · `/dev-run-test` · `/dev-smoke-test` |
|
|
655
|
+
| QC | `/qc-analyze` · `/qc-plan` · `/qc-design-test` · `/qc-review` · `/qc-run-test` · `/qc-report` |
|
|
656
|
+
| Trace Audit | `/validate-traces` |
|
|
657
|
+
|
|
658
|
+
For a **review command**, also append the 3-step review loop with the current step marked, e.g.:
|
|
659
|
+
`Vòng review: [① phân tích ◀] → ② Review Board → ③ --resume`.
|
|
660
|
+
|
|
661
|
+
**Cross-cutting commands** (`/sync`, `/update-framework`, `/fix-bug`, `/debug`, `/learn`,
|
|
662
|
+
`/report-bug`, `/propose-scenario`, `/generate-spec-manifest`) sit outside the linear pipeline —
|
|
663
|
+
**omit the Pipeline line entirely** for these (do not force-fit them onto the map).
|
|
664
|
+
|
|
620
665
|
## Next Command Suggestion
|
|
621
666
|
|
|
622
667
|
Suggest the logical next command based on workflow phase:
|
|
@@ -658,10 +703,13 @@ Suggest the logical next command based on workflow phase:
|
|
|
658
703
|
Format the footer as:
|
|
659
704
|
```
|
|
660
705
|
---
|
|
661
|
-
Status
|
|
706
|
+
Status : {badge}
|
|
662
707
|
{Output Artifacts block}
|
|
663
|
-
|
|
708
|
+
Pipeline : Discovery → PRD → [BDD ◀ bạn ở đây] → Tech Design → Code → Dev Self-Check → QC → Trace Audit
|
|
709
|
+
(review cmd) Vòng review: [① phân tích ◀] → ② Review Board → ③ --resume
|
|
710
|
+
Next : {suggested command with example arguments}
|
|
664
711
|
```
|
|
712
|
+
*(Omit the `Pipeline` line for cross-cutting commands listed above.)*
|
|
665
713
|
|
|
666
714
|
|
|
667
715
|
```
|
|
@@ -183,7 +183,7 @@ the Living Docs report at the spec module (via `/sync` + `/validate-traces`). Th
|
|
|
183
183
|
files themselves stay in the service — only the run *status* is reported.
|
|
184
184
|
|
|
185
185
|
Update `{paths.trace_dir}/{UC-ID}.tsv` — for each scenario row (matched by `sc_id` via its
|
|
186
|
-
test's `@trace.verifies={UC-ID}-SC{N}` tag)
|
|
186
|
+
test's `@trace.verifies={UC-ID}-SC{N}` tag). *(Umbrella + `spec_source`: `trace_dir` is `{spec_source}/.trace` — tests run from `service_root` but the `dev_selftest` update writes into the **spec repo**; commit/push the spec submodule for it.)*
|
|
187
187
|
|
|
188
188
|
| Column | Value |
|
|
189
189
|
|--------|-------|
|