@anhth2/spec-driven-dev-plugin 0.12.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 +42 -7
- package/commands/define-product.md +42 -7
- package/commands/dev-gen-test.md +60 -17
- package/commands/dev-run-test.md +61 -18
- package/commands/dev-run-test.tmpl +1 -1
- package/commands/dev-smoke-test.md +42 -7
- package/commands/fix-bug.md +42 -7
- package/commands/generate-bdd.md +67 -21
- package/commands/generate-bdd.tmpl +7 -4
- package/commands/generate-code.md +113 -35
- package/commands/generate-code.tmpl +53 -18
- package/commands/generate-design-spec.md +42 -7
- package/commands/generate-prd.md +42 -7
- package/commands/generate-spec-manifest.md +42 -7
- package/commands/generate-tech-docs.md +229 -20
- package/commands/generate-tech-docs.tmpl +187 -13
- package/commands/learn.md +42 -7
- package/commands/map-testids.md +564 -0
- package/commands/map-testids.tmpl +81 -0
- package/commands/propose-scenario.md +42 -7
- package/commands/qc-analyze.md +42 -7
- package/commands/qc-design-test.md +44 -8
- package/commands/qc-design-test.tmpl +2 -1
- package/commands/qc-plan.md +42 -7
- package/commands/qc-report.md +42 -7
- package/commands/qc-review.md +42 -7
- package/commands/qc-run-test.md +62 -18
- package/commands/qc-run-test.tmpl +2 -1
- package/commands/refine-prd.md +42 -7
- package/commands/report-bug.md +42 -7
- package/commands/review-code.md +42 -7
- package/commands/review-context.md +42 -7
- package/commands/review-tech-docs.md +45 -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 +35 -2
- package/commands/update-framework.md +35 -2
- package/commands/validate-traces.md +85 -40
- package/commands/validate-traces.tmpl +43 -33
- package/core/FRAMEWORK_VERSION +1 -1
- package/core/commands/debug.md +42 -7
- package/core/commands/define-product.md +42 -7
- package/core/commands/dev-gen-test.md +60 -17
- package/core/commands/dev-run-test.md +61 -18
- package/core/commands/dev-smoke-test.md +42 -7
- package/core/commands/fix-bug.md +42 -7
- package/core/commands/generate-bdd.md +67 -21
- package/core/commands/generate-code.md +113 -35
- package/core/commands/generate-design-spec.md +42 -7
- package/core/commands/generate-prd.md +42 -7
- package/core/commands/generate-spec-manifest.md +42 -7
- package/core/commands/generate-tech-docs.md +229 -20
- package/core/commands/learn.md +42 -7
- package/core/commands/map-testids.md +564 -0
- package/core/commands/propose-scenario.md +42 -7
- package/core/commands/qc-analyze.md +42 -7
- package/core/commands/qc-design-test.md +44 -8
- package/core/commands/qc-plan.md +42 -7
- package/core/commands/qc-report.md +42 -7
- package/core/commands/qc-review.md +42 -7
- package/core/commands/qc-run-test.md +62 -18
- package/core/commands/refine-prd.md +42 -7
- package/core/commands/report-bug.md +42 -7
- package/core/commands/review-code.md +42 -7
- package/core/commands/review-context.md +42 -7
- package/core/commands/review-tech-docs.md +45 -9
- package/core/commands/setup-ai-first.md +37 -4
- package/core/commands/sync.md +35 -2
- package/core/commands/update-framework.md +35 -2
- package/core/commands/validate-traces.md +85 -40
- package/core/modules/qc-playwright/stack-profile.yaml +1 -0
- package/core/skills/code/SKILL.md +77 -9
- package/core/skills/debug/SKILL.md +112 -11
- package/core/skills/design-spec/SKILL.md +42 -7
- package/core/skills/discovery/SKILL.md +42 -7
- package/core/skills/prd/SKILL.md +70 -4
- package/core/skills/setup-ai-first/SKILL.md +35 -2
- package/core/skills/spec/SKILL.md +70 -4
- package/core/skills/test/SKILL.md +119 -16
- package/core/steps/context-loader.md +7 -5
- package/core/steps/report-footer.md +35 -2
- package/core/steps/trace-mirror.md +18 -10
- package/core/templates/project-context.yaml +8 -5
- package/docs/01-getting-started/core-concepts.md +7 -7
- package/docs/01-getting-started/installation.md +2 -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 +3 -3
- package/docs/02-guides/developer/scenarios.md +26 -14
- package/docs/02-guides/developer/workflow.md +80 -20
- 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 +12 -11
- package/docs/02-guides/tester/bug-reporting.md +1 -1
- package/docs/02-guides/{qc-automation.md → tester/qc-automation.md} +14 -6
- 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 +8 -11
- package/docs/03-concepts/architecture.md +5 -4
- package/docs/03-concepts/pipeline.md +18 -6
- package/docs/03-concepts/traceability.md +17 -17
- package/docs/04-operations/README.md +1 -1
- package/docs/04-operations/bug-flow.md +4 -4
- package/docs/04-operations/sync-and-update.md +163 -38
- package/docs/05-reference/README.md +3 -0
- package/docs/05-reference/command-cheatsheet.md +147 -0
- package/docs/05-reference/commands.md +72 -69
- package/docs/05-reference/modules.md +2 -2
- package/docs/05-reference/trace-schema.md +15 -14
- package/docs/README.md +3 -5
- package/modules/qc-playwright/stack-profile.yaml +1 -0
- package/package.json +1 -1
- package/skills/code/SKILL.md +77 -9
- package/skills/debug/SKILL.md +112 -11
- package/skills/design-spec/SKILL.md +42 -7
- package/skills/discovery/SKILL.md +42 -7
- package/skills/prd/SKILL.md +70 -4
- package/skills/setup-ai-first/SKILL.md +35 -2
- package/skills/spec/SKILL.md +70 -4
- package/skills/test/SKILL.md +119 -16
- package/steps/context-loader.md +7 -5
- package/steps/report-footer.md +35 -2
- package/steps/trace-mirror.md +18 -10
- package/templates/project-context.yaml +8 -5
|
@@ -19,6 +19,7 @@ architecture:
|
|
|
19
19
|
- "Each test independent via pytest-playwright fixtures (page / logged_in_page / …)"
|
|
20
20
|
- "Page Object extends slim BasePage; split 3 layers: locators _x(), actions verb_noun(), assertions assert_x() using expect()"
|
|
21
21
|
- "Locator priority: data-testid → role → label/text → CSS → avoid XPath"
|
|
22
|
+
- "test-id values come from the FE tech-design §2b Test Selectors contract ({UC-ID}-tech-design-{platform}.md) — prefer them (no runtime scan); fall back to role/text only when an actionable element has no test-id there, and note the gap"
|
|
22
23
|
- "Group tests by (role, account) so login/logout never interleaves across roles"
|
|
23
24
|
- "Cover 100% of TCs in the .Test.md — every TC ends Pass/Fail/Skip, none left Draft"
|
|
24
25
|
folder_structure: |
|
|
@@ -193,7 +193,7 @@ If `services` section is present:
|
|
|
193
193
|
- If `$ARGUMENTS` contains a path, extract the segment after `prd_dir`
|
|
194
194
|
|
|
195
195
|
**2. Route to service** — if active domain matches a key in `services`:
|
|
196
|
-
- Override `paths.specs_dir` → `services.{domain}.specs_dir`
|
|
196
|
+
- 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.
|
|
197
197
|
- 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.
|
|
198
198
|
- Store `active_service` = `services.{domain}.path`
|
|
199
199
|
- Store `active_service_module` = `services.{domain}.module`
|
|
@@ -204,6 +204,7 @@ If `services` section is present:
|
|
|
204
204
|
- Set `active_service = unresolved`
|
|
205
205
|
|
|
206
206
|
**4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
|
|
207
|
+
- 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`.)*
|
|
207
208
|
- Override `paths.prd_dir` → `{spec_source}/specs/prd`
|
|
208
209
|
- Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
|
|
209
210
|
- 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.)*
|
|
@@ -213,8 +214,9 @@ If `services` section is present:
|
|
|
213
214
|
- Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
|
|
214
215
|
- Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
|
|
215
216
|
- Override `paths.prd_change_requests_dir` → `{spec_source}/feedback/prd-change-requests`
|
|
217
|
+
- 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`.)*
|
|
216
218
|
|
|
217
|
-
> **Why under `spec_source`:** PRD, design-spec, domain knowledge, the **API contract (tech-docs)**,
|
|
219
|
+
> **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.
|
|
218
220
|
|
|
219
221
|
---
|
|
220
222
|
|
|
@@ -234,12 +236,12 @@ When `active_service` has been resolved to a real path in Step 1.5 (e.g., `user-
|
|
|
234
236
|
|----------|--------|
|
|
235
237
|
| `conventions.test_command` | service's `conventions.test_command` |
|
|
236
238
|
| `conventions.build_command` | service's `conventions.build_command` |
|
|
237
|
-
| `paths.trace_dir` | `{active_service}/{service paths.trace_dir}`
|
|
238
|
-
| `paths.specs_dir` | `{active_service}/{service paths.specs_dir}`
|
|
239
|
+
| `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`). |
|
|
240
|
+
| `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. |
|
|
239
241
|
|
|
240
242
|
**3. Store** `service_root = {active_service}` as the working directory anchor for all downstream commands:
|
|
241
243
|
- Shell commands (`/dev-run-test`, `/dev-gen-test`) run **from within** `service_root`
|
|
242
|
-
-
|
|
244
|
+
- **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/`).
|
|
243
245
|
|
|
244
246
|
**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).
|
|
245
247
|
|
|
@@ -518,6 +520,36 @@ Output Artifacts:
|
|
|
518
520
|
|
|
519
521
|
If no files were written (e.g., review or analysis commands) → write `Output Artifacts: none (read-only)`.
|
|
520
522
|
|
|
523
|
+
## Pipeline Position
|
|
524
|
+
|
|
525
|
+
Print a one-line map of the pipeline with the CURRENT command's phase marked `◀ bạn ở đây`,
|
|
526
|
+
so the user always sees where this command sits in the end-to-end flow:
|
|
527
|
+
|
|
528
|
+
```
|
|
529
|
+
Discovery → PRD → [Design Spec] → BDD → Tech Design → Code → Dev Self-Check → QC → Trace Audit
|
|
530
|
+
```
|
|
531
|
+
|
|
532
|
+
Find the current command in this phase legend and mark **its** phase in the map above:
|
|
533
|
+
|
|
534
|
+
| Phase | Commands |
|
|
535
|
+
|-------|----------|
|
|
536
|
+
| Discovery | `/define-product` |
|
|
537
|
+
| PRD | `/generate-prd` · `/refine-prd` · `/review-context` (PRD) |
|
|
538
|
+
| Design Spec | `/generate-design-spec` |
|
|
539
|
+
| BDD | `/generate-bdd` · `/review-context` (BDD) |
|
|
540
|
+
| Tech Design | `/generate-tech-docs` · `/map-testids` · `/review-tech-docs` |
|
|
541
|
+
| Code | `/generate-code` · `/review-code` |
|
|
542
|
+
| Dev Self-Check | `/dev-gen-test` · `/dev-run-test` · `/dev-smoke-test` |
|
|
543
|
+
| QC | `/qc-analyze` · `/qc-plan` · `/qc-design-test` · `/qc-review` · `/qc-run-test` · `/qc-report` |
|
|
544
|
+
| Trace Audit | `/validate-traces` |
|
|
545
|
+
|
|
546
|
+
For a **review command**, also append the 3-step review loop with the current step marked, e.g.:
|
|
547
|
+
`Vòng review: [① phân tích ◀] → ② Review Board → ③ --resume`.
|
|
548
|
+
|
|
549
|
+
**Cross-cutting commands** (`/sync`, `/update-framework`, `/fix-bug`, `/debug`, `/learn`,
|
|
550
|
+
`/report-bug`, `/propose-scenario`, `/generate-spec-manifest`) sit outside the linear pipeline —
|
|
551
|
+
**omit the Pipeline line entirely** for these (do not force-fit them onto the map).
|
|
552
|
+
|
|
521
553
|
## Next Command Suggestion
|
|
522
554
|
|
|
523
555
|
Suggest the logical next command based on workflow phase:
|
|
@@ -559,10 +591,13 @@ Suggest the logical next command based on workflow phase:
|
|
|
559
591
|
Format the footer as:
|
|
560
592
|
```
|
|
561
593
|
---
|
|
562
|
-
Status
|
|
594
|
+
Status : {badge}
|
|
563
595
|
{Output Artifacts block}
|
|
564
|
-
|
|
596
|
+
Pipeline : Discovery → PRD → [BDD ◀ bạn ở đây] → Tech Design → Code → Dev Self-Check → QC → Trace Audit
|
|
597
|
+
(review cmd) Vòng review: [① phân tích ◀] → ② Review Board → ③ --resume
|
|
598
|
+
Next : {suggested command with example arguments}
|
|
565
599
|
```
|
|
600
|
+
*(Omit the `Pipeline` line for cross-cutting commands listed above.)*
|
|
566
601
|
|
|
567
602
|
|
|
568
603
|
---
|
|
@@ -643,6 +678,36 @@ Output Artifacts:
|
|
|
643
678
|
|
|
644
679
|
If no files were written (e.g., review or analysis commands) → write `Output Artifacts: none (read-only)`.
|
|
645
680
|
|
|
681
|
+
## Pipeline Position
|
|
682
|
+
|
|
683
|
+
Print a one-line map of the pipeline with the CURRENT command's phase marked `◀ bạn ở đây`,
|
|
684
|
+
so the user always sees where this command sits in the end-to-end flow:
|
|
685
|
+
|
|
686
|
+
```
|
|
687
|
+
Discovery → PRD → [Design Spec] → BDD → Tech Design → Code → Dev Self-Check → QC → Trace Audit
|
|
688
|
+
```
|
|
689
|
+
|
|
690
|
+
Find the current command in this phase legend and mark **its** phase in the map above:
|
|
691
|
+
|
|
692
|
+
| Phase | Commands |
|
|
693
|
+
|-------|----------|
|
|
694
|
+
| Discovery | `/define-product` |
|
|
695
|
+
| PRD | `/generate-prd` · `/refine-prd` · `/review-context` (PRD) |
|
|
696
|
+
| Design Spec | `/generate-design-spec` |
|
|
697
|
+
| BDD | `/generate-bdd` · `/review-context` (BDD) |
|
|
698
|
+
| Tech Design | `/generate-tech-docs` · `/map-testids` · `/review-tech-docs` |
|
|
699
|
+
| Code | `/generate-code` · `/review-code` |
|
|
700
|
+
| Dev Self-Check | `/dev-gen-test` · `/dev-run-test` · `/dev-smoke-test` |
|
|
701
|
+
| QC | `/qc-analyze` · `/qc-plan` · `/qc-design-test` · `/qc-review` · `/qc-run-test` · `/qc-report` |
|
|
702
|
+
| Trace Audit | `/validate-traces` |
|
|
703
|
+
|
|
704
|
+
For a **review command**, also append the 3-step review loop with the current step marked, e.g.:
|
|
705
|
+
`Vòng review: [① phân tích ◀] → ② Review Board → ③ --resume`.
|
|
706
|
+
|
|
707
|
+
**Cross-cutting commands** (`/sync`, `/update-framework`, `/fix-bug`, `/debug`, `/learn`,
|
|
708
|
+
`/report-bug`, `/propose-scenario`, `/generate-spec-manifest`) sit outside the linear pipeline —
|
|
709
|
+
**omit the Pipeline line entirely** for these (do not force-fit them onto the map).
|
|
710
|
+
|
|
646
711
|
## Next Command Suggestion
|
|
647
712
|
|
|
648
713
|
Suggest the logical next command based on workflow phase:
|
|
@@ -684,8 +749,11 @@ Suggest the logical next command based on workflow phase:
|
|
|
684
749
|
Format the footer as:
|
|
685
750
|
```
|
|
686
751
|
---
|
|
687
|
-
Status
|
|
752
|
+
Status : {badge}
|
|
688
753
|
{Output Artifacts block}
|
|
689
|
-
|
|
754
|
+
Pipeline : Discovery → PRD → [BDD ◀ bạn ở đây] → Tech Design → Code → Dev Self-Check → QC → Trace Audit
|
|
755
|
+
(review cmd) Vòng review: [① phân tích ◀] → ② Review Board → ③ --resume
|
|
756
|
+
Next : {suggested command with example arguments}
|
|
690
757
|
```
|
|
758
|
+
*(Omit the `Pipeline` line for cross-cutting commands listed above.)*
|
|
691
759
|
|
|
@@ -108,7 +108,7 @@ If `services` section is present:
|
|
|
108
108
|
- If `$ARGUMENTS` contains a path, extract the segment after `prd_dir`
|
|
109
109
|
|
|
110
110
|
**2. Route to service** — if active domain matches a key in `services`:
|
|
111
|
-
- Override `paths.specs_dir` → `services.{domain}.specs_dir`
|
|
111
|
+
- 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.
|
|
112
112
|
- 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.
|
|
113
113
|
- Store `active_service` = `services.{domain}.path`
|
|
114
114
|
- Store `active_service_module` = `services.{domain}.module`
|
|
@@ -119,6 +119,7 @@ If `services` section is present:
|
|
|
119
119
|
- Set `active_service = unresolved`
|
|
120
120
|
|
|
121
121
|
**4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
|
|
122
|
+
- 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`.)*
|
|
122
123
|
- Override `paths.prd_dir` → `{spec_source}/specs/prd`
|
|
123
124
|
- Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
|
|
124
125
|
- 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.)*
|
|
@@ -128,8 +129,9 @@ If `services` section is present:
|
|
|
128
129
|
- Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
|
|
129
130
|
- Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
|
|
130
131
|
- Override `paths.prd_change_requests_dir` → `{spec_source}/feedback/prd-change-requests`
|
|
132
|
+
- 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`.)*
|
|
131
133
|
|
|
132
|
-
> **Why under `spec_source`:** PRD, design-spec, domain knowledge, the **API contract (tech-docs)**,
|
|
134
|
+
> **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.
|
|
133
135
|
|
|
134
136
|
---
|
|
135
137
|
|
|
@@ -149,12 +151,12 @@ When `active_service` has been resolved to a real path in Step 1.5 (e.g., `user-
|
|
|
149
151
|
|----------|--------|
|
|
150
152
|
| `conventions.test_command` | service's `conventions.test_command` |
|
|
151
153
|
| `conventions.build_command` | service's `conventions.build_command` |
|
|
152
|
-
| `paths.trace_dir` | `{active_service}/{service paths.trace_dir}`
|
|
153
|
-
| `paths.specs_dir` | `{active_service}/{service paths.specs_dir}`
|
|
154
|
+
| `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`). |
|
|
155
|
+
| `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. |
|
|
154
156
|
|
|
155
157
|
**3. Store** `service_root = {active_service}` as the working directory anchor for all downstream commands:
|
|
156
158
|
- Shell commands (`/dev-run-test`, `/dev-gen-test`) run **from within** `service_root`
|
|
157
|
-
-
|
|
159
|
+
- **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/`).
|
|
158
160
|
|
|
159
161
|
**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).
|
|
160
162
|
|
|
@@ -456,6 +458,36 @@ Output Artifacts:
|
|
|
456
458
|
|
|
457
459
|
If no files were written (e.g., review or analysis commands) → write `Output Artifacts: none (read-only)`.
|
|
458
460
|
|
|
461
|
+
## Pipeline Position
|
|
462
|
+
|
|
463
|
+
Print a one-line map of the pipeline with the CURRENT command's phase marked `◀ bạn ở đây`,
|
|
464
|
+
so the user always sees where this command sits in the end-to-end flow:
|
|
465
|
+
|
|
466
|
+
```
|
|
467
|
+
Discovery → PRD → [Design Spec] → BDD → Tech Design → Code → Dev Self-Check → QC → Trace Audit
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
Find the current command in this phase legend and mark **its** phase in the map above:
|
|
471
|
+
|
|
472
|
+
| Phase | Commands |
|
|
473
|
+
|-------|----------|
|
|
474
|
+
| Discovery | `/define-product` |
|
|
475
|
+
| PRD | `/generate-prd` · `/refine-prd` · `/review-context` (PRD) |
|
|
476
|
+
| Design Spec | `/generate-design-spec` |
|
|
477
|
+
| BDD | `/generate-bdd` · `/review-context` (BDD) |
|
|
478
|
+
| Tech Design | `/generate-tech-docs` · `/map-testids` · `/review-tech-docs` |
|
|
479
|
+
| Code | `/generate-code` · `/review-code` |
|
|
480
|
+
| Dev Self-Check | `/dev-gen-test` · `/dev-run-test` · `/dev-smoke-test` |
|
|
481
|
+
| QC | `/qc-analyze` · `/qc-plan` · `/qc-design-test` · `/qc-review` · `/qc-run-test` · `/qc-report` |
|
|
482
|
+
| Trace Audit | `/validate-traces` |
|
|
483
|
+
|
|
484
|
+
For a **review command**, also append the 3-step review loop with the current step marked, e.g.:
|
|
485
|
+
`Vòng review: [① phân tích ◀] → ② Review Board → ③ --resume`.
|
|
486
|
+
|
|
487
|
+
**Cross-cutting commands** (`/sync`, `/update-framework`, `/fix-bug`, `/debug`, `/learn`,
|
|
488
|
+
`/report-bug`, `/propose-scenario`, `/generate-spec-manifest`) sit outside the linear pipeline —
|
|
489
|
+
**omit the Pipeline line entirely** for these (do not force-fit them onto the map).
|
|
490
|
+
|
|
459
491
|
## Next Command Suggestion
|
|
460
492
|
|
|
461
493
|
Suggest the logical next command based on workflow phase:
|
|
@@ -497,10 +529,13 @@ Suggest the logical next command based on workflow phase:
|
|
|
497
529
|
Format the footer as:
|
|
498
530
|
```
|
|
499
531
|
---
|
|
500
|
-
Status
|
|
532
|
+
Status : {badge}
|
|
501
533
|
{Output Artifacts block}
|
|
502
|
-
|
|
534
|
+
Pipeline : Discovery → PRD → [BDD ◀ bạn ở đây] → Tech Design → Code → Dev Self-Check → QC → Trace Audit
|
|
535
|
+
(review cmd) Vòng review: [① phân tích ◀] → ② Review Board → ③ --resume
|
|
536
|
+
Next : {suggested command with example arguments}
|
|
503
537
|
```
|
|
538
|
+
*(Omit the `Pipeline` line for cross-cutting commands listed above.)*
|
|
504
539
|
|
|
505
540
|
|
|
506
541
|
---
|
|
@@ -607,6 +642,36 @@ Output Artifacts:
|
|
|
607
642
|
|
|
608
643
|
If no files were written (e.g., review or analysis commands) → write `Output Artifacts: none (read-only)`.
|
|
609
644
|
|
|
645
|
+
## Pipeline Position
|
|
646
|
+
|
|
647
|
+
Print a one-line map of the pipeline with the CURRENT command's phase marked `◀ bạn ở đây`,
|
|
648
|
+
so the user always sees where this command sits in the end-to-end flow:
|
|
649
|
+
|
|
650
|
+
```
|
|
651
|
+
Discovery → PRD → [Design Spec] → BDD → Tech Design → Code → Dev Self-Check → QC → Trace Audit
|
|
652
|
+
```
|
|
653
|
+
|
|
654
|
+
Find the current command in this phase legend and mark **its** phase in the map above:
|
|
655
|
+
|
|
656
|
+
| Phase | Commands |
|
|
657
|
+
|-------|----------|
|
|
658
|
+
| Discovery | `/define-product` |
|
|
659
|
+
| PRD | `/generate-prd` · `/refine-prd` · `/review-context` (PRD) |
|
|
660
|
+
| Design Spec | `/generate-design-spec` |
|
|
661
|
+
| BDD | `/generate-bdd` · `/review-context` (BDD) |
|
|
662
|
+
| Tech Design | `/generate-tech-docs` · `/map-testids` · `/review-tech-docs` |
|
|
663
|
+
| Code | `/generate-code` · `/review-code` |
|
|
664
|
+
| Dev Self-Check | `/dev-gen-test` · `/dev-run-test` · `/dev-smoke-test` |
|
|
665
|
+
| QC | `/qc-analyze` · `/qc-plan` · `/qc-design-test` · `/qc-review` · `/qc-run-test` · `/qc-report` |
|
|
666
|
+
| Trace Audit | `/validate-traces` |
|
|
667
|
+
|
|
668
|
+
For a **review command**, also append the 3-step review loop with the current step marked, e.g.:
|
|
669
|
+
`Vòng review: [① phân tích ◀] → ② Review Board → ③ --resume`.
|
|
670
|
+
|
|
671
|
+
**Cross-cutting commands** (`/sync`, `/update-framework`, `/fix-bug`, `/debug`, `/learn`,
|
|
672
|
+
`/report-bug`, `/propose-scenario`, `/generate-spec-manifest`) sit outside the linear pipeline —
|
|
673
|
+
**omit the Pipeline line entirely** for these (do not force-fit them onto the map).
|
|
674
|
+
|
|
610
675
|
## Next Command Suggestion
|
|
611
676
|
|
|
612
677
|
Suggest the logical next command based on workflow phase:
|
|
@@ -648,10 +713,13 @@ Suggest the logical next command based on workflow phase:
|
|
|
648
713
|
Format the footer as:
|
|
649
714
|
```
|
|
650
715
|
---
|
|
651
|
-
Status
|
|
716
|
+
Status : {badge}
|
|
652
717
|
{Output Artifacts block}
|
|
653
|
-
|
|
718
|
+
Pipeline : Discovery → PRD → [BDD ◀ bạn ở đây] → Tech Design → Code → Dev Self-Check → QC → Trace Audit
|
|
719
|
+
(review cmd) Vòng review: [① phân tích ◀] → ② Review Board → ③ --resume
|
|
720
|
+
Next : {suggested command with example arguments}
|
|
654
721
|
```
|
|
722
|
+
*(Omit the `Pipeline` line for cross-cutting commands listed above.)*
|
|
655
723
|
|
|
656
724
|
|
|
657
725
|
---
|
|
@@ -715,6 +783,36 @@ Output Artifacts:
|
|
|
715
783
|
|
|
716
784
|
If no files were written (e.g., review or analysis commands) → write `Output Artifacts: none (read-only)`.
|
|
717
785
|
|
|
786
|
+
## Pipeline Position
|
|
787
|
+
|
|
788
|
+
Print a one-line map of the pipeline with the CURRENT command's phase marked `◀ bạn ở đây`,
|
|
789
|
+
so the user always sees where this command sits in the end-to-end flow:
|
|
790
|
+
|
|
791
|
+
```
|
|
792
|
+
Discovery → PRD → [Design Spec] → BDD → Tech Design → Code → Dev Self-Check → QC → Trace Audit
|
|
793
|
+
```
|
|
794
|
+
|
|
795
|
+
Find the current command in this phase legend and mark **its** phase in the map above:
|
|
796
|
+
|
|
797
|
+
| Phase | Commands |
|
|
798
|
+
|-------|----------|
|
|
799
|
+
| Discovery | `/define-product` |
|
|
800
|
+
| PRD | `/generate-prd` · `/refine-prd` · `/review-context` (PRD) |
|
|
801
|
+
| Design Spec | `/generate-design-spec` |
|
|
802
|
+
| BDD | `/generate-bdd` · `/review-context` (BDD) |
|
|
803
|
+
| Tech Design | `/generate-tech-docs` · `/map-testids` · `/review-tech-docs` |
|
|
804
|
+
| Code | `/generate-code` · `/review-code` |
|
|
805
|
+
| Dev Self-Check | `/dev-gen-test` · `/dev-run-test` · `/dev-smoke-test` |
|
|
806
|
+
| QC | `/qc-analyze` · `/qc-plan` · `/qc-design-test` · `/qc-review` · `/qc-run-test` · `/qc-report` |
|
|
807
|
+
| Trace Audit | `/validate-traces` |
|
|
808
|
+
|
|
809
|
+
For a **review command**, also append the 3-step review loop with the current step marked, e.g.:
|
|
810
|
+
`Vòng review: [① phân tích ◀] → ② Review Board → ③ --resume`.
|
|
811
|
+
|
|
812
|
+
**Cross-cutting commands** (`/sync`, `/update-framework`, `/fix-bug`, `/debug`, `/learn`,
|
|
813
|
+
`/report-bug`, `/propose-scenario`, `/generate-spec-manifest`) sit outside the linear pipeline —
|
|
814
|
+
**omit the Pipeline line entirely** for these (do not force-fit them onto the map).
|
|
815
|
+
|
|
718
816
|
## Next Command Suggestion
|
|
719
817
|
|
|
720
818
|
Suggest the logical next command based on workflow phase:
|
|
@@ -756,8 +854,11 @@ Suggest the logical next command based on workflow phase:
|
|
|
756
854
|
Format the footer as:
|
|
757
855
|
```
|
|
758
856
|
---
|
|
759
|
-
Status
|
|
857
|
+
Status : {badge}
|
|
760
858
|
{Output Artifacts block}
|
|
761
|
-
|
|
859
|
+
Pipeline : Discovery → PRD → [BDD ◀ bạn ở đây] → Tech Design → Code → Dev Self-Check → QC → Trace Audit
|
|
860
|
+
(review cmd) Vòng review: [① phân tích ◀] → ② Review Board → ③ --resume
|
|
861
|
+
Next : {suggested command with example arguments}
|
|
762
862
|
```
|
|
863
|
+
*(Omit the `Pipeline` line for cross-cutting commands listed above.)*
|
|
763
864
|
|
|
@@ -182,7 +182,7 @@ If `services` section is present:
|
|
|
182
182
|
- If `$ARGUMENTS` contains a path, extract the segment after `prd_dir`
|
|
183
183
|
|
|
184
184
|
**2. Route to service** — if active domain matches a key in `services`:
|
|
185
|
-
- Override `paths.specs_dir` → `services.{domain}.specs_dir`
|
|
185
|
+
- 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.
|
|
186
186
|
- 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.
|
|
187
187
|
- Store `active_service` = `services.{domain}.path`
|
|
188
188
|
- Store `active_service_module` = `services.{domain}.module`
|
|
@@ -193,6 +193,7 @@ If `services` section is present:
|
|
|
193
193
|
- Set `active_service = unresolved`
|
|
194
194
|
|
|
195
195
|
**4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
|
|
196
|
+
- 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`.)*
|
|
196
197
|
- Override `paths.prd_dir` → `{spec_source}/specs/prd`
|
|
197
198
|
- Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
|
|
198
199
|
- 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.)*
|
|
@@ -202,8 +203,9 @@ If `services` section is present:
|
|
|
202
203
|
- Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
|
|
203
204
|
- Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
|
|
204
205
|
- Override `paths.prd_change_requests_dir` → `{spec_source}/feedback/prd-change-requests`
|
|
206
|
+
- 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`.)*
|
|
205
207
|
|
|
206
|
-
> **Why under `spec_source`:** PRD, design-spec, domain knowledge, the **API contract (tech-docs)**,
|
|
208
|
+
> **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.
|
|
207
209
|
|
|
208
210
|
---
|
|
209
211
|
|
|
@@ -223,12 +225,12 @@ When `active_service` has been resolved to a real path in Step 1.5 (e.g., `user-
|
|
|
223
225
|
|----------|--------|
|
|
224
226
|
| `conventions.test_command` | service's `conventions.test_command` |
|
|
225
227
|
| `conventions.build_command` | service's `conventions.build_command` |
|
|
226
|
-
| `paths.trace_dir` | `{active_service}/{service paths.trace_dir}`
|
|
227
|
-
| `paths.specs_dir` | `{active_service}/{service paths.specs_dir}`
|
|
228
|
+
| `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`). |
|
|
229
|
+
| `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. |
|
|
228
230
|
|
|
229
231
|
**3. Store** `service_root = {active_service}` as the working directory anchor for all downstream commands:
|
|
230
232
|
- Shell commands (`/dev-run-test`, `/dev-gen-test`) run **from within** `service_root`
|
|
231
|
-
-
|
|
233
|
+
- **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/`).
|
|
232
234
|
|
|
233
235
|
**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).
|
|
234
236
|
|
|
@@ -485,6 +487,36 @@ Output Artifacts:
|
|
|
485
487
|
|
|
486
488
|
If no files were written (e.g., review or analysis commands) → write `Output Artifacts: none (read-only)`.
|
|
487
489
|
|
|
490
|
+
## Pipeline Position
|
|
491
|
+
|
|
492
|
+
Print a one-line map of the pipeline with the CURRENT command's phase marked `◀ bạn ở đây`,
|
|
493
|
+
so the user always sees where this command sits in the end-to-end flow:
|
|
494
|
+
|
|
495
|
+
```
|
|
496
|
+
Discovery → PRD → [Design Spec] → BDD → Tech Design → Code → Dev Self-Check → QC → Trace Audit
|
|
497
|
+
```
|
|
498
|
+
|
|
499
|
+
Find the current command in this phase legend and mark **its** phase in the map above:
|
|
500
|
+
|
|
501
|
+
| Phase | Commands |
|
|
502
|
+
|-------|----------|
|
|
503
|
+
| Discovery | `/define-product` |
|
|
504
|
+
| PRD | `/generate-prd` · `/refine-prd` · `/review-context` (PRD) |
|
|
505
|
+
| Design Spec | `/generate-design-spec` |
|
|
506
|
+
| BDD | `/generate-bdd` · `/review-context` (BDD) |
|
|
507
|
+
| Tech Design | `/generate-tech-docs` · `/map-testids` · `/review-tech-docs` |
|
|
508
|
+
| Code | `/generate-code` · `/review-code` |
|
|
509
|
+
| Dev Self-Check | `/dev-gen-test` · `/dev-run-test` · `/dev-smoke-test` |
|
|
510
|
+
| QC | `/qc-analyze` · `/qc-plan` · `/qc-design-test` · `/qc-review` · `/qc-run-test` · `/qc-report` |
|
|
511
|
+
| Trace Audit | `/validate-traces` |
|
|
512
|
+
|
|
513
|
+
For a **review command**, also append the 3-step review loop with the current step marked, e.g.:
|
|
514
|
+
`Vòng review: [① phân tích ◀] → ② Review Board → ③ --resume`.
|
|
515
|
+
|
|
516
|
+
**Cross-cutting commands** (`/sync`, `/update-framework`, `/fix-bug`, `/debug`, `/learn`,
|
|
517
|
+
`/report-bug`, `/propose-scenario`, `/generate-spec-manifest`) sit outside the linear pipeline —
|
|
518
|
+
**omit the Pipeline line entirely** for these (do not force-fit them onto the map).
|
|
519
|
+
|
|
488
520
|
## Next Command Suggestion
|
|
489
521
|
|
|
490
522
|
Suggest the logical next command based on workflow phase:
|
|
@@ -526,10 +558,13 @@ Suggest the logical next command based on workflow phase:
|
|
|
526
558
|
Format the footer as:
|
|
527
559
|
```
|
|
528
560
|
---
|
|
529
|
-
Status
|
|
561
|
+
Status : {badge}
|
|
530
562
|
{Output Artifacts block}
|
|
531
|
-
|
|
563
|
+
Pipeline : Discovery → PRD → [BDD ◀ bạn ở đây] → Tech Design → Code → Dev Self-Check → QC → Trace Audit
|
|
564
|
+
(review cmd) Vòng review: [① phân tích ◀] → ② Review Board → ③ --resume
|
|
565
|
+
Next : {suggested command with example arguments}
|
|
532
566
|
```
|
|
567
|
+
*(Omit the `Pipeline` line for cross-cutting commands listed above.)*
|
|
533
568
|
|
|
534
569
|
|
|
535
570
|
```
|
|
@@ -87,7 +87,7 @@ If `services` section is present:
|
|
|
87
87
|
- If `$ARGUMENTS` contains a path, extract the segment after `prd_dir`
|
|
88
88
|
|
|
89
89
|
**2. Route to service** — if active domain matches a key in `services`:
|
|
90
|
-
- Override `paths.specs_dir` → `services.{domain}.specs_dir`
|
|
90
|
+
- 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.
|
|
91
91
|
- 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.
|
|
92
92
|
- Store `active_service` = `services.{domain}.path`
|
|
93
93
|
- Store `active_service_module` = `services.{domain}.module`
|
|
@@ -98,6 +98,7 @@ If `services` section is present:
|
|
|
98
98
|
- Set `active_service = unresolved`
|
|
99
99
|
|
|
100
100
|
**4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
|
|
101
|
+
- 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`.)*
|
|
101
102
|
- Override `paths.prd_dir` → `{spec_source}/specs/prd`
|
|
102
103
|
- Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
|
|
103
104
|
- 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.)*
|
|
@@ -107,8 +108,9 @@ If `services` section is present:
|
|
|
107
108
|
- Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
|
|
108
109
|
- Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
|
|
109
110
|
- Override `paths.prd_change_requests_dir` → `{spec_source}/feedback/prd-change-requests`
|
|
111
|
+
- 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`.)*
|
|
110
112
|
|
|
111
|
-
> **Why under `spec_source`:** PRD, design-spec, domain knowledge, the **API contract (tech-docs)**,
|
|
113
|
+
> **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.
|
|
112
114
|
|
|
113
115
|
---
|
|
114
116
|
|
|
@@ -128,12 +130,12 @@ When `active_service` has been resolved to a real path in Step 1.5 (e.g., `user-
|
|
|
128
130
|
|----------|--------|
|
|
129
131
|
| `conventions.test_command` | service's `conventions.test_command` |
|
|
130
132
|
| `conventions.build_command` | service's `conventions.build_command` |
|
|
131
|
-
| `paths.trace_dir` | `{active_service}/{service paths.trace_dir}`
|
|
132
|
-
| `paths.specs_dir` | `{active_service}/{service paths.specs_dir}`
|
|
133
|
+
| `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`). |
|
|
134
|
+
| `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. |
|
|
133
135
|
|
|
134
136
|
**3. Store** `service_root = {active_service}` as the working directory anchor for all downstream commands:
|
|
135
137
|
- Shell commands (`/dev-run-test`, `/dev-gen-test`) run **from within** `service_root`
|
|
136
|
-
-
|
|
138
|
+
- **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/`).
|
|
137
139
|
|
|
138
140
|
**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).
|
|
139
141
|
|
|
@@ -466,6 +468,36 @@ Output Artifacts:
|
|
|
466
468
|
|
|
467
469
|
If no files were written (e.g., review or analysis commands) → write `Output Artifacts: none (read-only)`.
|
|
468
470
|
|
|
471
|
+
## Pipeline Position
|
|
472
|
+
|
|
473
|
+
Print a one-line map of the pipeline with the CURRENT command's phase marked `◀ bạn ở đây`,
|
|
474
|
+
so the user always sees where this command sits in the end-to-end flow:
|
|
475
|
+
|
|
476
|
+
```
|
|
477
|
+
Discovery → PRD → [Design Spec] → BDD → Tech Design → Code → Dev Self-Check → QC → Trace Audit
|
|
478
|
+
```
|
|
479
|
+
|
|
480
|
+
Find the current command in this phase legend and mark **its** phase in the map above:
|
|
481
|
+
|
|
482
|
+
| Phase | Commands |
|
|
483
|
+
|-------|----------|
|
|
484
|
+
| Discovery | `/define-product` |
|
|
485
|
+
| PRD | `/generate-prd` · `/refine-prd` · `/review-context` (PRD) |
|
|
486
|
+
| Design Spec | `/generate-design-spec` |
|
|
487
|
+
| BDD | `/generate-bdd` · `/review-context` (BDD) |
|
|
488
|
+
| Tech Design | `/generate-tech-docs` · `/map-testids` · `/review-tech-docs` |
|
|
489
|
+
| Code | `/generate-code` · `/review-code` |
|
|
490
|
+
| Dev Self-Check | `/dev-gen-test` · `/dev-run-test` · `/dev-smoke-test` |
|
|
491
|
+
| QC | `/qc-analyze` · `/qc-plan` · `/qc-design-test` · `/qc-review` · `/qc-run-test` · `/qc-report` |
|
|
492
|
+
| Trace Audit | `/validate-traces` |
|
|
493
|
+
|
|
494
|
+
For a **review command**, also append the 3-step review loop with the current step marked, e.g.:
|
|
495
|
+
`Vòng review: [① phân tích ◀] → ② Review Board → ③ --resume`.
|
|
496
|
+
|
|
497
|
+
**Cross-cutting commands** (`/sync`, `/update-framework`, `/fix-bug`, `/debug`, `/learn`,
|
|
498
|
+
`/report-bug`, `/propose-scenario`, `/generate-spec-manifest`) sit outside the linear pipeline —
|
|
499
|
+
**omit the Pipeline line entirely** for these (do not force-fit them onto the map).
|
|
500
|
+
|
|
469
501
|
## Next Command Suggestion
|
|
470
502
|
|
|
471
503
|
Suggest the logical next command based on workflow phase:
|
|
@@ -507,8 +539,11 @@ Suggest the logical next command based on workflow phase:
|
|
|
507
539
|
Format the footer as:
|
|
508
540
|
```
|
|
509
541
|
---
|
|
510
|
-
Status
|
|
542
|
+
Status : {badge}
|
|
511
543
|
{Output Artifacts block}
|
|
512
|
-
|
|
544
|
+
Pipeline : Discovery → PRD → [BDD ◀ bạn ở đây] → Tech Design → Code → Dev Self-Check → QC → Trace Audit
|
|
545
|
+
(review cmd) Vòng review: [① phân tích ◀] → ② Review Board → ③ --resume
|
|
546
|
+
Next : {suggested command with example arguments}
|
|
513
547
|
```
|
|
548
|
+
*(Omit the `Pipeline` line for cross-cutting commands listed above.)*
|
|
514
549
|
|