@anhth2/spec-driven-dev-plugin 0.9.0 → 0.9.2

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.
Files changed (91) hide show
  1. package/ARCHITECTURE.md +1 -1
  2. package/bin/index.js +1 -2
  3. package/commands/debug.md +2 -1
  4. package/commands/define-product.md +2 -1
  5. package/commands/fix-bug.md +2 -1
  6. package/commands/generate-bdd.md +2 -1
  7. package/commands/generate-code.md +2 -1
  8. package/commands/generate-design-spec.md +2 -1
  9. package/commands/generate-prd.md +41 -21
  10. package/commands/generate-prd.tmpl +39 -20
  11. package/commands/generate-spec-manifest.md +2 -1
  12. package/commands/generate-tech-docs.md +53 -12
  13. package/commands/generate-tech-docs.tmpl +51 -11
  14. package/commands/generate-tests.md +2 -1
  15. package/commands/learn.md +2 -1
  16. package/commands/propose-scenario.md +2 -1
  17. package/commands/refine-prd.md +11 -2
  18. package/commands/refine-prd.tmpl +9 -1
  19. package/commands/report-bug.md +2 -1
  20. package/commands/review-code.md +2 -1
  21. package/commands/review-context.md +10 -1
  22. package/commands/review-context.tmpl +8 -0
  23. package/commands/review-tech-docs.md +10 -1
  24. package/commands/review-tech-docs.tmpl +8 -0
  25. package/commands/run-tests.md +2 -1
  26. package/commands/smoke-test.md +2 -1
  27. package/commands/validate-traces.md +2 -1
  28. package/core/FRAMEWORK_VERSION +1 -1
  29. package/core/commands/debug.md +2 -1
  30. package/core/commands/define-product.md +2 -1
  31. package/core/commands/fix-bug.md +2 -1
  32. package/core/commands/generate-bdd.md +2 -1
  33. package/core/commands/generate-code.md +2 -1
  34. package/core/commands/generate-design-spec.md +2 -1
  35. package/core/commands/generate-prd.md +41 -21
  36. package/core/commands/generate-spec-manifest.md +2 -1
  37. package/core/commands/generate-tech-docs.md +53 -12
  38. package/core/commands/generate-tests.md +2 -1
  39. package/core/commands/learn.md +2 -1
  40. package/core/commands/propose-scenario.md +2 -1
  41. package/core/commands/refine-prd.md +11 -2
  42. package/core/commands/report-bug.md +2 -1
  43. package/core/commands/review-code.md +2 -1
  44. package/core/commands/review-context.md +10 -1
  45. package/core/commands/review-tech-docs.md +10 -1
  46. package/core/commands/run-tests.md +2 -1
  47. package/core/commands/smoke-test.md +2 -1
  48. package/core/commands/validate-traces.md +2 -1
  49. package/core/modules/android-compose/module.yaml +13 -0
  50. package/core/modules/android-compose/stack-profile.yaml +57 -0
  51. package/core/modules/flutter/module.yaml +14 -0
  52. package/core/modules/flutter/stack-profile.yaml +59 -0
  53. package/core/modules/ios-swiftui/module.yaml +13 -0
  54. package/core/modules/ios-swiftui/stack-profile.yaml +55 -0
  55. package/core/modules/nuxt/module.yaml +14 -0
  56. package/core/modules/nuxt/stack-profile.yaml +58 -0
  57. package/core/modules/react-native/module.yaml +14 -0
  58. package/core/modules/react-native/stack-profile.yaml +56 -0
  59. package/core/modules/vue/module.yaml +14 -0
  60. package/core/modules/vue/stack-profile.yaml +65 -0
  61. package/core/skills/code/SKILL.md +2 -1
  62. package/core/skills/debug/SKILL.md +2 -1
  63. package/core/skills/design-spec/SKILL.md +2 -1
  64. package/core/skills/discovery/SKILL.md +2 -1
  65. package/core/skills/test/SKILL.md +4 -2
  66. package/core/steps/context-loader.md +2 -1
  67. package/core/templates/prd.template.md +35 -20
  68. package/core/templates/product-definition.template.md +3 -3
  69. package/core/templates/project-context.yaml +4 -1
  70. package/modules/android-compose/module.yaml +13 -0
  71. package/modules/android-compose/stack-profile.yaml +57 -0
  72. package/modules/flutter/module.yaml +14 -0
  73. package/modules/flutter/stack-profile.yaml +59 -0
  74. package/modules/ios-swiftui/module.yaml +13 -0
  75. package/modules/ios-swiftui/stack-profile.yaml +55 -0
  76. package/modules/nuxt/module.yaml +14 -0
  77. package/modules/nuxt/stack-profile.yaml +58 -0
  78. package/modules/react-native/module.yaml +14 -0
  79. package/modules/react-native/stack-profile.yaml +56 -0
  80. package/modules/vue/module.yaml +14 -0
  81. package/modules/vue/stack-profile.yaml +65 -0
  82. package/package.json +9 -2
  83. package/skills/code/SKILL.md +2 -1
  84. package/skills/debug/SKILL.md +2 -1
  85. package/skills/design-spec/SKILL.md +2 -1
  86. package/skills/discovery/SKILL.md +2 -1
  87. package/skills/test/SKILL.md +4 -2
  88. package/steps/context-loader.md +2 -1
  89. package/templates/prd.template.md +35 -20
  90. package/templates/product-definition.template.md +3 -3
  91. package/templates/project-context.yaml +4 -1
package/ARCHITECTURE.md CHANGED
@@ -222,7 +222,7 @@ spec-driven-dev/
222
222
  └── platform-guide.template.md
223
223
  ```
224
224
 
225
- > Build output (gitignored): `commands/*.md`, `skills/**/SKILL.md`, and `core/` (the distributable copied into a consumer's `.agent/` by `--init`). Consumer-side tester artifacts live in the shared spec repo under `feedback/bug-reports/` and `feedback/bdd-proposals/`.
225
+ > Build output (gitignored): `commands/*.md`, `skills/**/SKILL.md`, and `core/` (the distributable copied into a consumer's `.agent/` by `--init`). Consumer-side tester artifacts live in the shared spec repo under `feedback/bug-reports/` and `feedback/bdd-proposals/`. In umbrella mode the **API contract (tech-docs)** also lives in the shared spec repo (`{spec_source}/specs/tech-docs/`) so BE and FE/App read the same contract via the spec submodule.
226
226
 
227
227
  ---
228
228
 
package/bin/index.js CHANGED
@@ -204,7 +204,6 @@ if (isInit) {
204
204
  ` path: "${s.name}"`,
205
205
  ` module: "${s.module || 'TODO'}"`,
206
206
  ` specs_dir: "${s.name}/specs/bdd"`,
207
- ` tech_docs_dir: "${s.name}/specs/tech-docs"`,
208
207
  ].join('\n')).join('\n');
209
208
  } else {
210
209
  servicesBlock = [
@@ -212,7 +211,6 @@ if (isInit) {
212
211
  ` # path: "{service-submodule-dir}"`,
213
212
  ` # module: "{stack-module}"`,
214
213
  ` # specs_dir: "{service-dir}/specs/bdd"`,
215
- ` # tech_docs_dir: "{service-dir}/specs/tech-docs"`,
216
214
  ].join('\n');
217
215
  }
218
216
 
@@ -234,6 +232,7 @@ if (isInit) {
234
232
  `paths:`,
235
233
  ` prd_dir: "${specSrc}/specs/prd"`,
236
234
  ` design_spec_dir: "${specSrc}/specs/design-spec"`,
235
+ ` tech_docs_dir: "${specSrc}/specs/tech-docs" # API contract — shared (BE pushes here, FE/App read via /sync)`,
237
236
  ` domain_knowledge_dir: "${specSrc}/specs/domain-knowledge"`,
238
237
  ` business_dictionary: "${specSrc}/specs/domain-knowledge/business-dictionary.md"`,
239
238
  ` core_entities: "${specSrc}/specs/domain-knowledge/core-entities.md"`,
package/commands/debug.md CHANGED
@@ -178,13 +178,14 @@ If `services` section is present:
178
178
  **4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
179
179
  - Override `paths.prd_dir` → `{spec_source}/specs/prd`
180
180
  - Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
181
+ - Override `paths.tech_docs_dir` → `{spec_source}/specs/tech-docs` — **only if step 2 did not already route it to a service** (multi-service umbrellas keep per-service tech-docs). This publishes the BE-authored API contract into the shared spec repo so FE/App can read it via the spec submodule at `/generate-code --phase=integration`.
181
182
  - Override `paths.domain_knowledge_dir` → `{spec_source}/specs/domain-knowledge`
182
183
  - Override `paths.business_dictionary` → `{spec_source}/specs/domain-knowledge/business-dictionary.md`
183
184
  - Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
184
185
  - Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
185
186
  - Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
186
187
 
187
- > **Why under `spec_source`:** tester feedback (`/report-bug`, `/propose-scenario`) must land in the **shared spec repo** so PO/Dev see it when they `/sync`. In single-service mode (no `spec_source`), these default to `feedback/bug-reports` and `feedback/bdd-proposals` at repo root — still shared, same repo.
188
+ > **Why under `spec_source`:** PRD, design-spec, domain knowledge, the **API contract (tech-docs)**, and tester feedback are all **cross-team artifacts** — they must live in the **shared spec repo** so every umbrella (FE/App/BE) reads the same source via `/sync`. Tech-docs specifically: BE authors the tech-design (API contract), commits + pushes it into the spec submodule (2-layer commit), and FE/App pull it on their next `/sync` to wire the real API in `/generate-code --phase=integration`. In single-service mode (no `spec_source`), these default under the repo root — still shared, same repo.
188
189
 
189
190
  ---
190
191
 
@@ -175,13 +175,14 @@ If `services` section is present:
175
175
  **4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
176
176
  - Override `paths.prd_dir` → `{spec_source}/specs/prd`
177
177
  - Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
178
+ - Override `paths.tech_docs_dir` → `{spec_source}/specs/tech-docs` — **only if step 2 did not already route it to a service** (multi-service umbrellas keep per-service tech-docs). This publishes the BE-authored API contract into the shared spec repo so FE/App can read it via the spec submodule at `/generate-code --phase=integration`.
178
179
  - Override `paths.domain_knowledge_dir` → `{spec_source}/specs/domain-knowledge`
179
180
  - Override `paths.business_dictionary` → `{spec_source}/specs/domain-knowledge/business-dictionary.md`
180
181
  - Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
181
182
  - Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
182
183
  - Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
183
184
 
184
- > **Why under `spec_source`:** tester feedback (`/report-bug`, `/propose-scenario`) must land in the **shared spec repo** so PO/Dev see it when they `/sync`. In single-service mode (no `spec_source`), these default to `feedback/bug-reports` and `feedback/bdd-proposals` at repo root — still shared, same repo.
185
+ > **Why under `spec_source`:** PRD, design-spec, domain knowledge, the **API contract (tech-docs)**, and tester feedback are all **cross-team artifacts** — they must live in the **shared spec repo** so every umbrella (FE/App/BE) reads the same source via `/sync`. Tech-docs specifically: BE authors the tech-design (API contract), commits + pushes it into the spec submodule (2-layer commit), and FE/App pull it on their next `/sync` to wire the real API in `/generate-code --phase=integration`. In single-service mode (no `spec_source`), these default under the repo root — still shared, same repo.
185
186
 
186
187
  ---
187
188
 
@@ -175,13 +175,14 @@ If `services` section is present:
175
175
  **4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
176
176
  - Override `paths.prd_dir` → `{spec_source}/specs/prd`
177
177
  - Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
178
+ - Override `paths.tech_docs_dir` → `{spec_source}/specs/tech-docs` — **only if step 2 did not already route it to a service** (multi-service umbrellas keep per-service tech-docs). This publishes the BE-authored API contract into the shared spec repo so FE/App can read it via the spec submodule at `/generate-code --phase=integration`.
178
179
  - Override `paths.domain_knowledge_dir` → `{spec_source}/specs/domain-knowledge`
179
180
  - Override `paths.business_dictionary` → `{spec_source}/specs/domain-knowledge/business-dictionary.md`
180
181
  - Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
181
182
  - Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
182
183
  - Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
183
184
 
184
- > **Why under `spec_source`:** tester feedback (`/report-bug`, `/propose-scenario`) must land in the **shared spec repo** so PO/Dev see it when they `/sync`. In single-service mode (no `spec_source`), these default to `feedback/bug-reports` and `feedback/bdd-proposals` at repo root — still shared, same repo.
185
+ > **Why under `spec_source`:** PRD, design-spec, domain knowledge, the **API contract (tech-docs)**, and tester feedback are all **cross-team artifacts** — they must live in the **shared spec repo** so every umbrella (FE/App/BE) reads the same source via `/sync`. Tech-docs specifically: BE authors the tech-design (API contract), commits + pushes it into the spec submodule (2-layer commit), and FE/App pull it on their next `/sync` to wire the real API in `/generate-code --phase=integration`. In single-service mode (no `spec_source`), these default under the repo root — still shared, same repo.
185
186
 
186
187
  ---
187
188
 
@@ -173,13 +173,14 @@ If `services` section is present:
173
173
  **4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
174
174
  - Override `paths.prd_dir` → `{spec_source}/specs/prd`
175
175
  - Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
176
+ - Override `paths.tech_docs_dir` → `{spec_source}/specs/tech-docs` — **only if step 2 did not already route it to a service** (multi-service umbrellas keep per-service tech-docs). This publishes the BE-authored API contract into the shared spec repo so FE/App can read it via the spec submodule at `/generate-code --phase=integration`.
176
177
  - Override `paths.domain_knowledge_dir` → `{spec_source}/specs/domain-knowledge`
177
178
  - Override `paths.business_dictionary` → `{spec_source}/specs/domain-knowledge/business-dictionary.md`
178
179
  - Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
179
180
  - Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
180
181
  - Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
181
182
 
182
- > **Why under `spec_source`:** tester feedback (`/report-bug`, `/propose-scenario`) must land in the **shared spec repo** so PO/Dev see it when they `/sync`. In single-service mode (no `spec_source`), these default to `feedback/bug-reports` and `feedback/bdd-proposals` at repo root — still shared, same repo.
183
+ > **Why under `spec_source`:** PRD, design-spec, domain knowledge, the **API contract (tech-docs)**, and tester feedback are all **cross-team artifacts** — they must live in the **shared spec repo** so every umbrella (FE/App/BE) reads the same source via `/sync`. Tech-docs specifically: BE authors the tech-design (API contract), commits + pushes it into the spec submodule (2-layer commit), and FE/App pull it on their next `/sync` to wire the real API in `/generate-code --phase=integration`. In single-service mode (no `spec_source`), these default under the repo root — still shared, same repo.
183
184
 
184
185
  ---
185
186
 
@@ -175,13 +175,14 @@ If `services` section is present:
175
175
  **4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
176
176
  - Override `paths.prd_dir` → `{spec_source}/specs/prd`
177
177
  - Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
178
+ - Override `paths.tech_docs_dir` → `{spec_source}/specs/tech-docs` — **only if step 2 did not already route it to a service** (multi-service umbrellas keep per-service tech-docs). This publishes the BE-authored API contract into the shared spec repo so FE/App can read it via the spec submodule at `/generate-code --phase=integration`.
178
179
  - Override `paths.domain_knowledge_dir` → `{spec_source}/specs/domain-knowledge`
179
180
  - Override `paths.business_dictionary` → `{spec_source}/specs/domain-knowledge/business-dictionary.md`
180
181
  - Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
181
182
  - Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
182
183
  - Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
183
184
 
184
- > **Why under `spec_source`:** tester feedback (`/report-bug`, `/propose-scenario`) must land in the **shared spec repo** so PO/Dev see it when they `/sync`. In single-service mode (no `spec_source`), these default to `feedback/bug-reports` and `feedback/bdd-proposals` at repo root — still shared, same repo.
185
+ > **Why under `spec_source`:** PRD, design-spec, domain knowledge, the **API contract (tech-docs)**, and tester feedback are all **cross-team artifacts** — they must live in the **shared spec repo** so every umbrella (FE/App/BE) reads the same source via `/sync`. Tech-docs specifically: BE authors the tech-design (API contract), commits + pushes it into the spec submodule (2-layer commit), and FE/App pull it on their next `/sync` to wire the real API in `/generate-code --phase=integration`. In single-service mode (no `spec_source`), these default under the repo root — still shared, same repo.
185
186
 
186
187
  ---
187
188
 
@@ -175,13 +175,14 @@ If `services` section is present:
175
175
  **4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
176
176
  - Override `paths.prd_dir` → `{spec_source}/specs/prd`
177
177
  - Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
178
+ - Override `paths.tech_docs_dir` → `{spec_source}/specs/tech-docs` — **only if step 2 did not already route it to a service** (multi-service umbrellas keep per-service tech-docs). This publishes the BE-authored API contract into the shared spec repo so FE/App can read it via the spec submodule at `/generate-code --phase=integration`.
178
179
  - Override `paths.domain_knowledge_dir` → `{spec_source}/specs/domain-knowledge`
179
180
  - Override `paths.business_dictionary` → `{spec_source}/specs/domain-knowledge/business-dictionary.md`
180
181
  - Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
181
182
  - Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
182
183
  - Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
183
184
 
184
- > **Why under `spec_source`:** tester feedback (`/report-bug`, `/propose-scenario`) must land in the **shared spec repo** so PO/Dev see it when they `/sync`. In single-service mode (no `spec_source`), these default to `feedback/bug-reports` and `feedback/bdd-proposals` at repo root — still shared, same repo.
185
+ > **Why under `spec_source`:** PRD, design-spec, domain knowledge, the **API contract (tech-docs)**, and tester feedback are all **cross-team artifacts** — they must live in the **shared spec repo** so every umbrella (FE/App/BE) reads the same source via `/sync`. Tech-docs specifically: BE authors the tech-design (API contract), commits + pushes it into the spec submodule (2-layer commit), and FE/App pull it on their next `/sync` to wire the real API in `/generate-code --phase=integration`. In single-service mode (no `spec_source`), these default under the repo root — still shared, same repo.
185
186
 
186
187
  ---
187
188
 
@@ -175,13 +175,14 @@ If `services` section is present:
175
175
  **4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
176
176
  - Override `paths.prd_dir` → `{spec_source}/specs/prd`
177
177
  - Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
178
+ - Override `paths.tech_docs_dir` → `{spec_source}/specs/tech-docs` — **only if step 2 did not already route it to a service** (multi-service umbrellas keep per-service tech-docs). This publishes the BE-authored API contract into the shared spec repo so FE/App can read it via the spec submodule at `/generate-code --phase=integration`.
178
179
  - Override `paths.domain_knowledge_dir` → `{spec_source}/specs/domain-knowledge`
179
180
  - Override `paths.business_dictionary` → `{spec_source}/specs/domain-knowledge/business-dictionary.md`
180
181
  - Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
181
182
  - Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
182
183
  - Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
183
184
 
184
- > **Why under `spec_source`:** tester feedback (`/report-bug`, `/propose-scenario`) must land in the **shared spec repo** so PO/Dev see it when they `/sync`. In single-service mode (no `spec_source`), these default to `feedback/bug-reports` and `feedback/bdd-proposals` at repo root — still shared, same repo.
185
+ > **Why under `spec_source`:** PRD, design-spec, domain knowledge, the **API contract (tech-docs)**, and tester feedback are all **cross-team artifacts** — they must live in the **shared spec repo** so every umbrella (FE/App/BE) reads the same source via `/sync`. Tech-docs specifically: BE authors the tech-design (API contract), commits + pushes it into the spec submodule (2-layer commit), and FE/App pull it on their next `/sync` to wire the real API in `/generate-code --phase=integration`. In single-service mode (no `spec_source`), these default under the repo root — still shared, same repo.
185
186
 
186
187
  ---
187
188
 
@@ -450,13 +451,14 @@ Write `{paths.prd_dir}/{domain}/{TICKET-ID}-{slug}.md` using the structure below
450
451
 
451
452
  ## a. User Story
452
453
 
453
- As a {User role}
454
- I want to {User goal}
455
- So that {Business value}
454
+ - **As a** {User role}
455
+ - **I want to** {User goal}
456
+ - **So that** {Business value}
456
457
 
457
458
  ## b. Scope
458
459
 
459
- In Scope
460
+ **In Scope**
461
+
460
462
  - {Function 1}
461
463
  - {Function 2}
462
464
 
@@ -464,24 +466,36 @@ In Scope
464
466
 
465
467
  # 2. Acceptance Criteria
466
468
 
467
- AC1: {Acceptance criterion — testable, observable, no UI details}
468
- AC2: {Acceptance criterion}
469
+ - **AC1:** {Acceptance criterion — testable, observable, no UI details}
470
+ - **AC2:** {Acceptance criterion}
469
471
 
470
472
  ---
471
473
 
472
474
  # 3. Use Case
473
475
 
474
476
  #### {TICKET-ID}-UC1: {Use Case Name}
475
- Actor: {User performing the action}
476
- Description: {Business scenario description — 1 sentence}
477
- Pre-condition: {Condition that must be true BEFORE use case begins}
478
- Post-condition: {State / result AFTER use case completes}
479
477
 
480
- Business Rule
481
- | ID | Business Rule | Business Logic |
482
- |-------------------------|--------------------------------------|-------------------------------------------|
483
- | {TICKET-ID}-UC1-BR1 | {Rule WHAT the system must do} | - Logic 1<br/>- Logic 2<br/>- Logic 3 |
484
- | {TICKET-ID}-UC1-BR2 | {Rule} | - Logic |
478
+ - **Actor:** {User performing the action}
479
+ - **Description:** {Business scenario description — 1 sentence}
480
+ - **Pre-condition:** {Condition that must be true BEFORE use case begins}
481
+ - **Post-condition:** {State / result AFTER use case completes}
482
+
483
+ **Business Rule**
484
+
485
+ | ID | Business Rule |
486
+ |----|---------------|
487
+ | {TICKET-ID}-UC1-BR1 | {Rule — WHAT the system must do} |
488
+ | {TICKET-ID}-UC1-BR2 | {Rule} |
489
+
490
+ **Business Logic**
491
+
492
+ **{TICKET-ID}-UC1-BR1:**
493
+ - Logic 1
494
+ - Logic 2
495
+ - Logic 3
496
+
497
+ **{TICKET-ID}-UC1-BR2:**
498
+ - Logic
485
499
 
486
500
  ---
487
501
 
@@ -503,11 +517,16 @@ flowchart TD
503
517
 
504
518
  **Screen 1: {Screen Name}**
505
519
 
506
- | Component | Details |
507
- |----------------|-----------------------------------------------------------------|
508
- | **Screen** | {Screen name} |
509
- | **Components** | - {Component 1}<br/>- {Component 2}<br/>- {Component 3} |
510
- | **Actions** | - {Action 1} → {Result}<br/>- {Action 2} → {Result} |
520
+ **Screen:** {Screen name}
521
+
522
+ **Components:**
523
+ - {Component 1}
524
+ - {Component 2}
525
+ - {Component 3}
526
+
527
+ **Actions:**
528
+ - {Action 1} → {Result}
529
+ - {Action 2} → {Result}
511
530
 
512
531
  ---
513
532
 
@@ -557,6 +576,7 @@ flowchart TD
557
576
  - [ ] No banned terms (if dictionary exists)
558
577
  - [ ] User Flow includes error path / exception path
559
578
  - [ ] Wireframe covers all screens related to Use Cases
579
+ - [ ] **Định dạng (readability)**: User Story / AC / các field của UC (Actor, Description, Pre/Post-condition) viết dạng bullet `- **Label:** …` — mỗi ý MỘT dòng, KHÔNG viết các dòng liền nhau (sẽ bị dồn thành 1 đoạn khi render); có một dòng trống trước và sau mỗi bảng
560
580
 
561
581
  ## Changelog Section (append at end of PRD)
562
582
 
@@ -98,13 +98,14 @@ Write `{paths.prd_dir}/{domain}/{TICKET-ID}-{slug}.md` using the structure below
98
98
 
99
99
  ## a. User Story
100
100
 
101
- As a {User role}
102
- I want to {User goal}
103
- So that {Business value}
101
+ - **As a** {User role}
102
+ - **I want to** {User goal}
103
+ - **So that** {Business value}
104
104
 
105
105
  ## b. Scope
106
106
 
107
- In Scope
107
+ **In Scope**
108
+
108
109
  - {Function 1}
109
110
  - {Function 2}
110
111
 
@@ -112,24 +113,36 @@ In Scope
112
113
 
113
114
  # 2. Acceptance Criteria
114
115
 
115
- AC1: {Acceptance criterion — testable, observable, no UI details}
116
- AC2: {Acceptance criterion}
116
+ - **AC1:** {Acceptance criterion — testable, observable, no UI details}
117
+ - **AC2:** {Acceptance criterion}
117
118
 
118
119
  ---
119
120
 
120
121
  # 3. Use Case
121
122
 
122
123
  #### {TICKET-ID}-UC1: {Use Case Name}
123
- Actor: {User performing the action}
124
- Description: {Business scenario description — 1 sentence}
125
- Pre-condition: {Condition that must be true BEFORE use case begins}
126
- Post-condition: {State / result AFTER use case completes}
127
124
 
128
- Business Rule
129
- | ID | Business Rule | Business Logic |
130
- |-------------------------|--------------------------------------|-------------------------------------------|
131
- | {TICKET-ID}-UC1-BR1 | {Rule WHAT the system must do} | - Logic 1<br/>- Logic 2<br/>- Logic 3 |
132
- | {TICKET-ID}-UC1-BR2 | {Rule} | - Logic |
125
+ - **Actor:** {User performing the action}
126
+ - **Description:** {Business scenario description — 1 sentence}
127
+ - **Pre-condition:** {Condition that must be true BEFORE use case begins}
128
+ - **Post-condition:** {State / result AFTER use case completes}
129
+
130
+ **Business Rule**
131
+
132
+ | ID | Business Rule |
133
+ |----|---------------|
134
+ | {TICKET-ID}-UC1-BR1 | {Rule — WHAT the system must do} |
135
+ | {TICKET-ID}-UC1-BR2 | {Rule} |
136
+
137
+ **Business Logic**
138
+
139
+ **{TICKET-ID}-UC1-BR1:**
140
+ - Logic 1
141
+ - Logic 2
142
+ - Logic 3
143
+
144
+ **{TICKET-ID}-UC1-BR2:**
145
+ - Logic
133
146
 
134
147
  ---
135
148
 
@@ -151,11 +164,16 @@ flowchart TD
151
164
 
152
165
  **Screen 1: {Screen Name}**
153
166
 
154
- | Component | Details |
155
- |----------------|-----------------------------------------------------------------|
156
- | **Screen** | {Screen name} |
157
- | **Components** | - {Component 1}<br/>- {Component 2}<br/>- {Component 3} |
158
- | **Actions** | - {Action 1} → {Result}<br/>- {Action 2} → {Result} |
167
+ **Screen:** {Screen name}
168
+
169
+ **Components:**
170
+ - {Component 1}
171
+ - {Component 2}
172
+ - {Component 3}
173
+
174
+ **Actions:**
175
+ - {Action 1} → {Result}
176
+ - {Action 2} → {Result}
159
177
 
160
178
  ---
161
179
 
@@ -205,6 +223,7 @@ flowchart TD
205
223
  - [ ] No banned terms (if dictionary exists)
206
224
  - [ ] User Flow includes error path / exception path
207
225
  - [ ] Wireframe covers all screens related to Use Cases
226
+ - [ ] **Định dạng (readability)**: User Story / AC / các field của UC (Actor, Description, Pre/Post-condition) viết dạng bullet `- **Label:** …` — mỗi ý MỘT dòng, KHÔNG viết các dòng liền nhau (sẽ bị dồn thành 1 đoạn khi render); có một dòng trống trước và sau mỗi bảng
208
227
 
209
228
  ## Changelog Section (append at end of PRD)
210
229
 
@@ -180,13 +180,14 @@ If `services` section is present:
180
180
  **4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
181
181
  - Override `paths.prd_dir` → `{spec_source}/specs/prd`
182
182
  - Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
183
+ - Override `paths.tech_docs_dir` → `{spec_source}/specs/tech-docs` — **only if step 2 did not already route it to a service** (multi-service umbrellas keep per-service tech-docs). This publishes the BE-authored API contract into the shared spec repo so FE/App can read it via the spec submodule at `/generate-code --phase=integration`.
183
184
  - Override `paths.domain_knowledge_dir` → `{spec_source}/specs/domain-knowledge`
184
185
  - Override `paths.business_dictionary` → `{spec_source}/specs/domain-knowledge/business-dictionary.md`
185
186
  - Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
186
187
  - Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
187
188
  - Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
188
189
 
189
- > **Why under `spec_source`:** tester feedback (`/report-bug`, `/propose-scenario`) must land in the **shared spec repo** so PO/Dev see it when they `/sync`. In single-service mode (no `spec_source`), these default to `feedback/bug-reports` and `feedback/bdd-proposals` at repo root — still shared, same repo.
190
+ > **Why under `spec_source`:** PRD, design-spec, domain knowledge, the **API contract (tech-docs)**, and tester feedback are all **cross-team artifacts** — they must live in the **shared spec repo** so every umbrella (FE/App/BE) reads the same source via `/sync`. Tech-docs specifically: BE authors the tech-design (API contract), commits + pushes it into the spec submodule (2-layer commit), and FE/App pull it on their next `/sync` to wire the real API in `/generate-code --phase=integration`. In single-service mode (no `spec_source`), these default under the repo root — still shared, same repo.
190
191
 
191
192
  ---
192
193
 
@@ -196,13 +196,14 @@ If `services` section is present:
196
196
  **4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
197
197
  - Override `paths.prd_dir` → `{spec_source}/specs/prd`
198
198
  - Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
199
+ - Override `paths.tech_docs_dir` → `{spec_source}/specs/tech-docs` — **only if step 2 did not already route it to a service** (multi-service umbrellas keep per-service tech-docs). This publishes the BE-authored API contract into the shared spec repo so FE/App can read it via the spec submodule at `/generate-code --phase=integration`.
199
200
  - Override `paths.domain_knowledge_dir` → `{spec_source}/specs/domain-knowledge`
200
201
  - Override `paths.business_dictionary` → `{spec_source}/specs/domain-knowledge/business-dictionary.md`
201
202
  - Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
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
 
205
- > **Why under `spec_source`:** tester feedback (`/report-bug`, `/propose-scenario`) must land in the **shared spec repo** so PO/Dev see it when they `/sync`. In single-service mode (no `spec_source`), these default to `feedback/bug-reports` and `feedback/bdd-proposals` at repo root — still shared, same repo.
206
+ > **Why under `spec_source`:** PRD, design-spec, domain knowledge, the **API contract (tech-docs)**, and tester feedback are all **cross-team artifacts** — they must live in the **shared spec repo** so every umbrella (FE/App/BE) reads the same source via `/sync`. Tech-docs specifically: BE authors the tech-design (API contract), commits + pushes it into the spec submodule (2-layer commit), and FE/App pull it on their next `/sync` to wire the real API in `/generate-code --phase=integration`. In single-service mode (no `spec_source`), these default under the repo root — still shared, same repo.
206
207
 
207
208
  ---
208
209
 
@@ -453,25 +454,49 @@ Write `{paths.tech_docs_dir}/{domain}/{UC-ID}-tech-design.md`:
453
454
  ---
454
455
 
455
456
  ## §1. Overview
457
+
458
+ {Tóm tắt ngắn: UC này implement gì, scope kỹ thuật chính.}
459
+
456
460
  ## §2. API Endpoints
457
- *Greenfield:* endpoints được infer từ BDD scenarios — thiết kế mới.
458
- *Reverse-document:* tả lại API đã tồn tại từ bảng "Existing API Contract" trong PRD.
459
- Ghi chú gaps nếu contract thực tế khác với BDD expectations.
460
- | Method | Path | Auth/Role | Request | Response |
461
+
462
+ *Greenfield:* endpoints được infer từ BDD scenarios thiết kế mới.
463
+ *Reverse-document:* mô tả lại API đã tồn tại từ bảng "Existing API Contract" trong PRD. Ghi chú gaps nếu contract thực tế khác với BDD expectations.
464
+
465
+ | Method | Path | Auth/Role | Request | Response |
466
+ |--------|------|-----------|---------|----------|
467
+ | {GET/POST/PUT/DELETE} | {/api/v1/...} | {Bearer / role} | `{ field: type }` | `{ field: type }` |
468
+
461
469
  ## §3. Data Model
462
- Key entities and relationships.
470
+
471
+ Key entities and relationships.
472
+
463
473
  ## §4. Service Flow
464
- {Client} → Controller → {Facade/Service} → {Repository}
474
+
475
+ {Client} → Controller → {Facade/Service} → {Repository}
476
+
465
477
  ## §5. Business Rules Implementation
466
- | BR-ID | Rule | Implementation approach |
478
+
479
+ | BR-ID | Rule | Implementation approach |
480
+ |-------|------|-------------------------|
481
+ | {UC-ID}-BR1 | {rule} | {approach} |
482
+
467
483
  ## §6. Error Handling
468
- | Scenario | Exception | HTTP Status |
484
+
485
+ | Scenario | Exception | HTTP Status |
486
+ |----------|-----------|-------------|
487
+ | {scenario} | {ExceptionClass} | {4xx/5xx} |
488
+
469
489
  ## §7. Database Changes
470
- Migration scripts or schema changes.
490
+
491
+ Migration scripts or schema changes.
492
+
471
493
  ## §8. Caching Strategy
472
- What to cache, TTL, invalidation triggers.
494
+
495
+ What to cache, TTL, invalidation triggers.
496
+
473
497
  ## §9. Cross-Service Dependencies
474
- External calls, events produced/consumed.
498
+
499
+ External calls, events produced/consumed.
475
500
 
476
501
  ## Changelog
477
502
 
@@ -480,6 +505,21 @@ Write `{paths.tech_docs_dir}/{domain}/{UC-ID}-tech-design.md`:
480
505
  | 1 | {YYYY-MM-DD} | Initial generation from {UC-ID}.feature (BDD v{bdd_version}) |
481
506
  ```
482
507
 
508
+ ## Publish — share the contract (umbrella + shared spec repo)
509
+
510
+ If `paths.tech_docs_dir` resolved **under `setup.spec_source`** (e.g. `{spec_source}/specs/tech-docs`), the tech-doc was just written **inside the spec submodule**. It is the cross-team **API contract** — FE/App read it via their own `/sync`. Publish it so they can (2-layer commit):
511
+
512
+ ```bash
513
+ cd {spec_source}
514
+ git add specs/tech-docs/{domain}/{UC-ID}-tech-design.md
515
+ git commit -m "docs({UC-ID}): tech design / API contract"
516
+ git push origin {spec_branch} # the branch FE/App track in .gitmodules
517
+ cd -
518
+ git add {spec_source} && git commit -m "chore: bump spec pointer ({UC-ID} tech design)"
519
+ ```
520
+
521
+ If `tech_docs_dir` is **local** (single-service, or per-service routing in a multi-service umbrella), skip this — no cross-repo publish needed.
522
+
483
523
  ## Output
484
524
 
485
525
  # Report Footer — Standard Command Output Format
@@ -549,5 +589,6 @@ Next : {suggested command with example arguments}
549
589
  File: {paths.tech_docs_dir}/{domain}/{UC-ID}-tech-design.md
550
590
  Next: /review-tech-docs {paths.tech_docs_dir}/{domain}/{UC-ID}-tech-design.md
551
591
  ← SA/Lead review required before code generation
592
+ → if tech-docs live in the shared spec repo: commit + push to the spec submodule (see Publish above) so FE/App `/sync` can read the contract
552
593
  → after approved: /generate-code {paths.specs_dir}/{domain}/{UC-ID}-{slug}.feature
553
594
  ```
@@ -101,25 +101,49 @@ Write `{paths.tech_docs_dir}/{domain}/{UC-ID}-tech-design.md`:
101
101
  ---
102
102
 
103
103
  ## §1. Overview
104
+
105
+ {Tóm tắt ngắn: UC này implement gì, scope kỹ thuật chính.}
106
+
104
107
  ## §2. API Endpoints
105
- *Greenfield:* endpoints được infer từ BDD scenarios — thiết kế mới.
106
- *Reverse-document:* tả lại API đã tồn tại từ bảng "Existing API Contract" trong PRD.
107
- Ghi chú gaps nếu contract thực tế khác với BDD expectations.
108
- | Method | Path | Auth/Role | Request | Response |
108
+
109
+ *Greenfield:* endpoints được infer từ BDD scenarios thiết kế mới.
110
+ *Reverse-document:* mô tả lại API đã tồn tại từ bảng "Existing API Contract" trong PRD. Ghi chú gaps nếu contract thực tế khác với BDD expectations.
111
+
112
+ | Method | Path | Auth/Role | Request | Response |
113
+ |--------|------|-----------|---------|----------|
114
+ | {GET/POST/PUT/DELETE} | {/api/v1/...} | {Bearer / role} | `{ field: type }` | `{ field: type }` |
115
+
109
116
  ## §3. Data Model
110
- Key entities and relationships.
117
+
118
+ Key entities and relationships.
119
+
111
120
  ## §4. Service Flow
112
- {Client} → Controller → {Facade/Service} → {Repository}
121
+
122
+ {Client} → Controller → {Facade/Service} → {Repository}
123
+
113
124
  ## §5. Business Rules Implementation
114
- | BR-ID | Rule | Implementation approach |
125
+
126
+ | BR-ID | Rule | Implementation approach |
127
+ |-------|------|-------------------------|
128
+ | {UC-ID}-BR1 | {rule} | {approach} |
129
+
115
130
  ## §6. Error Handling
116
- | Scenario | Exception | HTTP Status |
131
+
132
+ | Scenario | Exception | HTTP Status |
133
+ |----------|-----------|-------------|
134
+ | {scenario} | {ExceptionClass} | {4xx/5xx} |
135
+
117
136
  ## §7. Database Changes
118
- Migration scripts or schema changes.
137
+
138
+ Migration scripts or schema changes.
139
+
119
140
  ## §8. Caching Strategy
120
- What to cache, TTL, invalidation triggers.
141
+
142
+ What to cache, TTL, invalidation triggers.
143
+
121
144
  ## §9. Cross-Service Dependencies
122
- External calls, events produced/consumed.
145
+
146
+ External calls, events produced/consumed.
123
147
 
124
148
  ## Changelog
125
149
 
@@ -128,6 +152,21 @@ Write `{paths.tech_docs_dir}/{domain}/{UC-ID}-tech-design.md`:
128
152
  | 1 | {YYYY-MM-DD} | Initial generation from {UC-ID}.feature (BDD v{bdd_version}) |
129
153
  ```
130
154
 
155
+ ## Publish — share the contract (umbrella + shared spec repo)
156
+
157
+ If `paths.tech_docs_dir` resolved **under `setup.spec_source`** (e.g. `{spec_source}/specs/tech-docs`), the tech-doc was just written **inside the spec submodule**. It is the cross-team **API contract** — FE/App read it via their own `/sync`. Publish it so they can (2-layer commit):
158
+
159
+ ```bash
160
+ cd {spec_source}
161
+ git add specs/tech-docs/{domain}/{UC-ID}-tech-design.md
162
+ git commit -m "docs({UC-ID}): tech design / API contract"
163
+ git push origin {spec_branch} # the branch FE/App track in .gitmodules
164
+ cd -
165
+ git add {spec_source} && git commit -m "chore: bump spec pointer ({UC-ID} tech design)"
166
+ ```
167
+
168
+ If `tech_docs_dir` is **local** (single-service, or per-service routing in a multi-service umbrella), skip this — no cross-repo publish needed.
169
+
131
170
  ## Output
132
171
 
133
172
  {{include:steps/report-footer.md}}
@@ -137,5 +176,6 @@ Write `{paths.tech_docs_dir}/{domain}/{UC-ID}-tech-design.md`:
137
176
  File: {paths.tech_docs_dir}/{domain}/{UC-ID}-tech-design.md
138
177
  Next: /review-tech-docs {paths.tech_docs_dir}/{domain}/{UC-ID}-tech-design.md
139
178
  ← SA/Lead review required before code generation
179
+ → if tech-docs live in the shared spec repo: commit + push to the spec submodule (see Publish above) so FE/App `/sync` can read the contract
140
180
  → after approved: /generate-code {paths.specs_dir}/{domain}/{UC-ID}-{slug}.feature
141
181
  ```
@@ -175,13 +175,14 @@ If `services` section is present:
175
175
  **4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
176
176
  - Override `paths.prd_dir` → `{spec_source}/specs/prd`
177
177
  - Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
178
+ - Override `paths.tech_docs_dir` → `{spec_source}/specs/tech-docs` — **only if step 2 did not already route it to a service** (multi-service umbrellas keep per-service tech-docs). This publishes the BE-authored API contract into the shared spec repo so FE/App can read it via the spec submodule at `/generate-code --phase=integration`.
178
179
  - Override `paths.domain_knowledge_dir` → `{spec_source}/specs/domain-knowledge`
179
180
  - Override `paths.business_dictionary` → `{spec_source}/specs/domain-knowledge/business-dictionary.md`
180
181
  - Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
181
182
  - Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
182
183
  - Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
183
184
 
184
- > **Why under `spec_source`:** tester feedback (`/report-bug`, `/propose-scenario`) must land in the **shared spec repo** so PO/Dev see it when they `/sync`. In single-service mode (no `spec_source`), these default to `feedback/bug-reports` and `feedback/bdd-proposals` at repo root — still shared, same repo.
185
+ > **Why under `spec_source`:** PRD, design-spec, domain knowledge, the **API contract (tech-docs)**, and tester feedback are all **cross-team artifacts** — they must live in the **shared spec repo** so every umbrella (FE/App/BE) reads the same source via `/sync`. Tech-docs specifically: BE authors the tech-design (API contract), commits + pushes it into the spec submodule (2-layer commit), and FE/App pull it on their next `/sync` to wire the real API in `/generate-code --phase=integration`. In single-service mode (no `spec_source`), these default under the repo root — still shared, same repo.
185
186
 
186
187
  ---
187
188
 
package/commands/learn.md CHANGED
@@ -184,13 +184,14 @@ If `services` section is present:
184
184
  **4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
185
185
  - Override `paths.prd_dir` → `{spec_source}/specs/prd`
186
186
  - Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
187
+ - Override `paths.tech_docs_dir` → `{spec_source}/specs/tech-docs` — **only if step 2 did not already route it to a service** (multi-service umbrellas keep per-service tech-docs). This publishes the BE-authored API contract into the shared spec repo so FE/App can read it via the spec submodule at `/generate-code --phase=integration`.
187
188
  - Override `paths.domain_knowledge_dir` → `{spec_source}/specs/domain-knowledge`
188
189
  - Override `paths.business_dictionary` → `{spec_source}/specs/domain-knowledge/business-dictionary.md`
189
190
  - Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
190
191
  - Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
191
192
  - Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
192
193
 
193
- > **Why under `spec_source`:** tester feedback (`/report-bug`, `/propose-scenario`) must land in the **shared spec repo** so PO/Dev see it when they `/sync`. In single-service mode (no `spec_source`), these default to `feedback/bug-reports` and `feedback/bdd-proposals` at repo root — still shared, same repo.
194
+ > **Why under `spec_source`:** PRD, design-spec, domain knowledge, the **API contract (tech-docs)**, and tester feedback are all **cross-team artifacts** — they must live in the **shared spec repo** so every umbrella (FE/App/BE) reads the same source via `/sync`. Tech-docs specifically: BE authors the tech-design (API contract), commits + pushes it into the spec submodule (2-layer commit), and FE/App pull it on their next `/sync` to wire the real API in `/generate-code --phase=integration`. In single-service mode (no `spec_source`), these default under the repo root — still shared, same repo.
194
195
 
195
196
  ---
196
197
 
@@ -184,13 +184,14 @@ If `services` section is present:
184
184
  **4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
185
185
  - Override `paths.prd_dir` → `{spec_source}/specs/prd`
186
186
  - Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
187
+ - Override `paths.tech_docs_dir` → `{spec_source}/specs/tech-docs` — **only if step 2 did not already route it to a service** (multi-service umbrellas keep per-service tech-docs). This publishes the BE-authored API contract into the shared spec repo so FE/App can read it via the spec submodule at `/generate-code --phase=integration`.
187
188
  - Override `paths.domain_knowledge_dir` → `{spec_source}/specs/domain-knowledge`
188
189
  - Override `paths.business_dictionary` → `{spec_source}/specs/domain-knowledge/business-dictionary.md`
189
190
  - Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
190
191
  - Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
191
192
  - Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
192
193
 
193
- > **Why under `spec_source`:** tester feedback (`/report-bug`, `/propose-scenario`) must land in the **shared spec repo** so PO/Dev see it when they `/sync`. In single-service mode (no `spec_source`), these default to `feedback/bug-reports` and `feedback/bdd-proposals` at repo root — still shared, same repo.
194
+ > **Why under `spec_source`:** PRD, design-spec, domain knowledge, the **API contract (tech-docs)**, and tester feedback are all **cross-team artifacts** — they must live in the **shared spec repo** so every umbrella (FE/App/BE) reads the same source via `/sync`. Tech-docs specifically: BE authors the tech-design (API contract), commits + pushes it into the spec submodule (2-layer commit), and FE/App pull it on their next `/sync` to wire the real API in `/generate-code --phase=integration`. In single-service mode (no `spec_source`), these default under the repo root — still shared, same repo.
194
195
 
195
196
  ---
196
197