@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
@@ -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
 
@@ -389,7 +390,9 @@ findings:
389
390
  - id: "F001"
390
391
  lens: "QA" # QA | DEV | SA | PO
391
392
  severity: "major" # critical | major | minor
392
- section: "§6. Acceptance Criteria"
393
+ section: "§6. Acceptance Criteria" # human-readable heading/section label
394
+ uc_id: "{TICKET-ID}-UC{N}" # UC this finding belongs to; "" if PRD-global (scope, metrics, problem statement)
395
+ quote: "{verbatim snippet copied EXACTLY from the PRD at the issue location, ≤120 chars}"
393
396
  finding: "{description of gap or issue}"
394
397
  suggestion: "{specific actionable improvement}"
395
398
  auto_fixable: false # true = AI applies in --resume; false = human must write decision in note
@@ -402,6 +405,12 @@ summary:
402
405
  recommendation: "APPROVED_WITH_MINOR_CHANGES | NEEDS_REVISION | BLOCKED"
403
406
  ```
404
407
 
408
+ > **Locator fields (`quote` + `uc_id`) — required for Review Board source-jump.**
409
+ > For every finding, copy a short **verbatim** `quote` straight from the PRD at the exact spot the
410
+ > issue occurs — do NOT paraphrase; it is matched against the document to locate the line. Set
411
+ > `uc_id` to the owning Use Case (or `""` for PRD-global findings). These let a reviewer click a
412
+ > finding in the Review Board and jump straight to the precise location in the source PRD.
413
+
405
414
  ## Report
406
415
 
407
416
  # Report Footer — Standard Command Output Format
@@ -37,7 +37,9 @@ findings:
37
37
  - id: "F001"
38
38
  lens: "QA" # QA | DEV | SA | PO
39
39
  severity: "major" # critical | major | minor
40
- section: "§6. Acceptance Criteria"
40
+ section: "§6. Acceptance Criteria" # human-readable heading/section label
41
+ uc_id: "{TICKET-ID}-UC{N}" # UC this finding belongs to; "" if PRD-global (scope, metrics, problem statement)
42
+ quote: "{verbatim snippet copied EXACTLY from the PRD at the issue location, ≤120 chars}"
41
43
  finding: "{description of gap or issue}"
42
44
  suggestion: "{specific actionable improvement}"
43
45
  auto_fixable: false # true = AI applies in --resume; false = human must write decision in note
@@ -50,6 +52,12 @@ summary:
50
52
  recommendation: "APPROVED_WITH_MINOR_CHANGES | NEEDS_REVISION | BLOCKED"
51
53
  ```
52
54
 
55
+ > **Locator fields (`quote` + `uc_id`) — required for Review Board source-jump.**
56
+ > For every finding, copy a short **verbatim** `quote` straight from the PRD at the exact spot the
57
+ > issue occurs — do NOT paraphrase; it is matched against the document to locate the line. Set
58
+ > `uc_id` to the owning Use Case (or `""` for PRD-global findings). These let a reviewer click a
59
+ > finding in the Review Board and jump straight to the precise location in the source PRD.
60
+
53
61
  ## Report
54
62
 
55
63
  {{include:steps/report-footer.md}}
@@ -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
 
@@ -177,13 +177,14 @@ If `services` section is present:
177
177
  **4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
178
178
  - Override `paths.prd_dir` → `{spec_source}/specs/prd`
179
179
  - Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
180
+ - 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`.
180
181
  - Override `paths.domain_knowledge_dir` → `{spec_source}/specs/domain-knowledge`
181
182
  - Override `paths.business_dictionary` → `{spec_source}/specs/domain-knowledge/business-dictionary.md`
182
183
  - Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
183
184
  - Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
184
185
  - Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
185
186
 
186
- > **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.
187
+ > **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.
187
188
 
188
189
  ---
189
190
 
@@ -182,13 +182,14 @@ If `services` section is present:
182
182
  **4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
183
183
  - Override `paths.prd_dir` → `{spec_source}/specs/prd`
184
184
  - Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
185
+ - 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`.
185
186
  - Override `paths.domain_knowledge_dir` → `{spec_source}/specs/domain-knowledge`
186
187
  - Override `paths.business_dictionary` → `{spec_source}/specs/domain-knowledge/business-dictionary.md`
187
188
  - Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
188
189
  - Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
189
190
  - Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
190
191
 
191
- > **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.
192
+ > **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.
192
193
 
193
194
  ---
194
195
 
@@ -563,6 +564,8 @@ findings:
563
564
  check_id: "P1" # P1-P5 for PRD; B1-B6 for BDD
564
565
  severity: "critical" # critical | major | minor
565
566
  section: "{section or scenario ID where issue was found}"
567
+ uc_id: "{UC-ID this finding belongs to — PRD: the UC heading; BDD: @trace.id; \"\" if global}"
568
+ quote: "{verbatim snippet copied EXACTLY from the reviewed file at the issue location, ≤120 chars}"
566
569
  finding: "{clear description of the issue}"
567
570
  suggestion: "{specific actionable fix — AI will apply this in --resume if accepted}"
568
571
  auto_fixable: true # true = AI can apply; false = human must write note in Review Board
@@ -576,6 +579,12 @@ summary:
576
579
  recommendation: "APPROVED | NEEDS_REVISION | BLOCKED"
577
580
  ```
578
581
 
582
+ > **Locator fields (`quote` + `uc_id`) — required for Review Board source-jump.**
583
+ > For every finding, copy a short **verbatim** `quote` straight from the reviewed file at the exact
584
+ > spot the issue occurs — do NOT paraphrase; it is matched against the document to locate the line.
585
+ > Set `uc_id` to the owning Use Case (`@trace.id` for BDD, the UC heading for PRD; `""` if global).
586
+ > These let a reviewer click a finding in the Review Board and jump to the precise source location.
587
+
579
588
  ## Post-Analysis Routing
580
589
 
581
590
  After running all checks and writing the findings file:
@@ -211,6 +211,8 @@ findings:
211
211
  check_id: "P1" # P1-P5 for PRD; B1-B6 for BDD
212
212
  severity: "critical" # critical | major | minor
213
213
  section: "{section or scenario ID where issue was found}"
214
+ uc_id: "{UC-ID this finding belongs to — PRD: the UC heading; BDD: @trace.id; \"\" if global}"
215
+ quote: "{verbatim snippet copied EXACTLY from the reviewed file at the issue location, ≤120 chars}"
214
216
  finding: "{clear description of the issue}"
215
217
  suggestion: "{specific actionable fix — AI will apply this in --resume if accepted}"
216
218
  auto_fixable: true # true = AI can apply; false = human must write note in Review Board
@@ -224,6 +226,12 @@ summary:
224
226
  recommendation: "APPROVED | NEEDS_REVISION | BLOCKED"
225
227
  ```
226
228
 
229
+ > **Locator fields (`quote` + `uc_id`) — required for Review Board source-jump.**
230
+ > For every finding, copy a short **verbatim** `quote` straight from the reviewed file at the exact
231
+ > spot the issue occurs — do NOT paraphrase; it is matched against the document to locate the line.
232
+ > Set `uc_id` to the owning Use Case (`@trace.id` for BDD, the UC heading for PRD; `""` if global).
233
+ > These let a reviewer click a finding in the Review Board and jump to the precise source location.
234
+
227
235
  ## Post-Analysis Routing
228
236
 
229
237
  After running all checks and writing the findings file:
@@ -179,13 +179,14 @@ If `services` section is present:
179
179
  **4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
180
180
  - Override `paths.prd_dir` → `{spec_source}/specs/prd`
181
181
  - Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
182
+ - 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`.
182
183
  - Override `paths.domain_knowledge_dir` → `{spec_source}/specs/domain-knowledge`
183
184
  - Override `paths.business_dictionary` → `{spec_source}/specs/domain-knowledge/business-dictionary.md`
184
185
  - Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
185
186
  - Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
186
187
  - Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
187
188
 
188
- > **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.
189
+ > **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.
189
190
 
190
191
  ---
191
192
 
@@ -554,6 +555,8 @@ findings:
554
555
  check_id: "T1" # T1–T7
555
556
  severity: "critical" # critical | major | minor
556
557
  section: "{section heading or component name where issue was found}"
558
+ uc_id: "{UC-ID}" # same as top-level uc_id (the UC this tech-doc designs)
559
+ quote: "{verbatim snippet copied EXACTLY from the tech-doc at the issue location, ≤120 chars}"
557
560
  finding: "{clear description of the violation or gap}"
558
561
  suggestion: "{specific fix — AI applies this in --resume if accepted}"
559
562
  auto_fixable: false # true = AI can apply; false = human must write decision in note
@@ -568,6 +571,11 @@ summary:
568
571
  sign_off_gate: "{blocked — pending: fe_team, app_team, sa | ready}"
569
572
  ```
570
573
 
574
+ > **Locator fields (`quote` + `uc_id`) — required for Review Board source-jump.**
575
+ > For every finding, copy a short **verbatim** `quote` straight from the tech-doc at the exact spot
576
+ > the issue occurs — do NOT paraphrase; it is matched against the document to locate the line.
577
+ > These let a reviewer click a finding in the Review Board and jump to the precise source location.
578
+
571
579
  ## Report
572
580
 
573
581
  # Report Footer — Standard Command Output Format
@@ -717,4 +725,5 @@ Sign-off : {✅ All done — status set to approved
717
725
  Re-run /review-tech-docs {file} to confirm 0 remaining critical findings.
718
726
  Next: {/generate-code {feature-file} ← only if status = approved
719
727
  | Collect pending sign-offs → update @trace.sign_off → re-run /review-tech-docs}
728
+ → if the tech-doc lives in the shared spec repo: commit + push it to the spec submodule so FE/App `/sync` the updated contract
720
729
  ```
@@ -202,6 +202,8 @@ findings:
202
202
  check_id: "T1" # T1–T7
203
203
  severity: "critical" # critical | major | minor
204
204
  section: "{section heading or component name where issue was found}"
205
+ uc_id: "{UC-ID}" # same as top-level uc_id (the UC this tech-doc designs)
206
+ quote: "{verbatim snippet copied EXACTLY from the tech-doc at the issue location, ≤120 chars}"
205
207
  finding: "{clear description of the violation or gap}"
206
208
  suggestion: "{specific fix — AI applies this in --resume if accepted}"
207
209
  auto_fixable: false # true = AI can apply; false = human must write decision in note
@@ -216,6 +218,11 @@ summary:
216
218
  sign_off_gate: "{blocked — pending: fe_team, app_team, sa | ready}"
217
219
  ```
218
220
 
221
+ > **Locator fields (`quote` + `uc_id`) — required for Review Board source-jump.**
222
+ > For every finding, copy a short **verbatim** `quote` straight from the tech-doc at the exact spot
223
+ > the issue occurs — do NOT paraphrase; it is matched against the document to locate the line.
224
+ > These let a reviewer click a finding in the Review Board and jump to the precise source location.
225
+
219
226
  ## Report
220
227
 
221
228
  {{include:steps/report-footer.md}}
@@ -305,4 +312,5 @@ Sign-off : {✅ All done — status set to approved
305
312
  Re-run /review-tech-docs {file} to confirm 0 remaining critical findings.
306
313
  Next: {/generate-code {feature-file} ← only if status = approved
307
314
  | Collect pending sign-offs → update @trace.sign_off → re-run /review-tech-docs}
315
+ → if the tech-doc lives in the shared spec repo: commit + push it to the spec submodule so FE/App `/sync` the updated contract
308
316
  ```
@@ -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
 
@@ -177,13 +177,14 @@ If `services` section is present:
177
177
  **4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
178
178
  - Override `paths.prd_dir` → `{spec_source}/specs/prd`
179
179
  - Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
180
+ - 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`.
180
181
  - Override `paths.domain_knowledge_dir` → `{spec_source}/specs/domain-knowledge`
181
182
  - Override `paths.business_dictionary` → `{spec_source}/specs/domain-knowledge/business-dictionary.md`
182
183
  - Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
183
184
  - Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
184
185
  - Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
185
186
 
186
- > **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.
187
+ > **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.
187
188
 
188
189
  ---
189
190
 
@@ -177,13 +177,14 @@ If `services` section is present:
177
177
  **4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
178
178
  - Override `paths.prd_dir` → `{spec_source}/specs/prd`
179
179
  - Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
180
+ - 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`.
180
181
  - Override `paths.domain_knowledge_dir` → `{spec_source}/specs/domain-knowledge`
181
182
  - Override `paths.business_dictionary` → `{spec_source}/specs/domain-knowledge/business-dictionary.md`
182
183
  - Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
183
184
  - Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
184
185
  - Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
185
186
 
186
- > **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.
187
+ > **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.
187
188
 
188
189
  ---
189
190
 
@@ -1 +1 @@
1
- 0.9.0
1
+ 0.9.2
@@ -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
 
@@ -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