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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/ARCHITECTURE.md +20 -9
  2. package/commands/debug.md +12 -12
  3. package/commands/define-product.md +11 -11
  4. package/commands/{generate-tests.md → dev-gen-test.md} +47 -15
  5. package/commands/{generate-tests.tmpl → dev-gen-test.tmpl} +18 -4
  6. package/{core/commands/run-tests.md → commands/dev-run-test.md} +61 -13
  7. package/commands/{run-tests.tmpl → dev-run-test.tmpl} +32 -2
  8. package/{core/commands/smoke-test.md → commands/dev-smoke-test.md} +16 -16
  9. package/commands/{smoke-test.tmpl → dev-smoke-test.tmpl} +5 -5
  10. package/commands/fix-bug.md +12 -12
  11. package/commands/generate-bdd.md +38 -13
  12. package/commands/generate-bdd.tmpl +9 -2
  13. package/commands/generate-code.md +85 -15
  14. package/commands/generate-code.tmpl +56 -4
  15. package/commands/generate-design-spec.md +104 -39
  16. package/commands/generate-design-spec.tmpl +93 -28
  17. package/commands/generate-prd.md +11 -11
  18. package/commands/generate-spec-manifest.md +11 -11
  19. package/commands/generate-tech-docs.md +12 -12
  20. package/commands/generate-tech-docs.tmpl +1 -1
  21. package/commands/learn.md +12 -12
  22. package/commands/propose-scenario.md +12 -12
  23. package/commands/propose-scenario.tmpl +1 -1
  24. package/commands/refine-prd.md +165 -16
  25. package/commands/refine-prd.tmpl +16 -5
  26. package/commands/report-bug.md +11 -11
  27. package/commands/review-code.md +13 -13
  28. package/commands/review-code.tmpl +1 -1
  29. package/commands/review-context.md +160 -12
  30. package/commands/review-context.tmpl +11 -1
  31. package/commands/review-tech-docs.md +11 -11
  32. package/commands/setup-ai-first.md +7 -7
  33. package/commands/sync.md +23 -20
  34. package/commands/sync.tmpl +16 -13
  35. package/commands/update-framework.md +7 -7
  36. package/commands/validate-traces.md +56 -37
  37. package/commands/validate-traces.tmpl +45 -26
  38. package/core/FRAMEWORK_VERSION +1 -1
  39. package/core/commands/debug.md +12 -12
  40. package/core/commands/define-product.md +11 -11
  41. package/core/commands/{generate-tests.md → dev-gen-test.md} +47 -15
  42. package/{commands/run-tests.md → core/commands/dev-run-test.md} +61 -13
  43. package/{commands/smoke-test.md → core/commands/dev-smoke-test.md} +16 -16
  44. package/core/commands/fix-bug.md +12 -12
  45. package/core/commands/generate-bdd.md +38 -13
  46. package/core/commands/generate-code.md +85 -15
  47. package/core/commands/generate-design-spec.md +104 -39
  48. package/core/commands/generate-prd.md +11 -11
  49. package/core/commands/generate-spec-manifest.md +11 -11
  50. package/core/commands/generate-tech-docs.md +12 -12
  51. package/core/commands/learn.md +12 -12
  52. package/core/commands/propose-scenario.md +12 -12
  53. package/core/commands/refine-prd.md +165 -16
  54. package/core/commands/report-bug.md +11 -11
  55. package/core/commands/review-code.md +13 -13
  56. package/core/commands/review-context.md +160 -12
  57. package/core/commands/review-tech-docs.md +11 -11
  58. package/core/commands/setup-ai-first.md +7 -7
  59. package/core/commands/sync.md +23 -20
  60. package/core/commands/update-framework.md +7 -7
  61. package/core/commands/validate-traces.md +56 -37
  62. package/core/skills/code/SKILL.md +18 -18
  63. package/core/skills/debug/SKILL.md +26 -26
  64. package/core/skills/design-spec/SKILL.md +11 -11
  65. package/core/skills/discovery/SKILL.md +11 -11
  66. package/core/skills/prd/SKILL.md +14 -14
  67. package/core/skills/setup-ai-first/SKILL.md +7 -7
  68. package/core/skills/spec/SKILL.md +14 -14
  69. package/core/skills/test/SKILL.md +38 -38
  70. package/core/steps/capture-lesson.md +1 -1
  71. package/core/steps/context-loader.md +4 -4
  72. package/core/steps/report-footer.md +7 -7
  73. package/core/steps/review-fanout.md +138 -0
  74. package/core/steps/spawn-agent.md +1 -1
  75. package/core/steps/trace-mirror.md +18 -0
  76. package/core/templates/design-spec.template.md +16 -8
  77. package/package.json +1 -1
  78. package/skills/code/SKILL.md +18 -18
  79. package/skills/debug/SKILL.md +26 -26
  80. package/skills/debug/SKILL.tmpl +1 -1
  81. package/skills/design-spec/SKILL.md +11 -11
  82. package/skills/discovery/SKILL.md +11 -11
  83. package/skills/prd/SKILL.md +14 -14
  84. package/skills/setup-ai-first/SKILL.md +7 -7
  85. package/skills/spec/SKILL.md +14 -14
  86. package/skills/test/SKILL.md +38 -38
  87. package/skills/test/SKILL.tmpl +9 -9
  88. package/steps/capture-lesson.md +1 -1
  89. package/steps/context-loader.md +4 -4
  90. package/steps/report-footer.md +7 -7
  91. package/steps/review-fanout.md +138 -0
  92. package/steps/spawn-agent.md +1 -1
  93. package/steps/trace-mirror.md +18 -0
  94. package/templates/design-spec.template.md +16 -8
@@ -163,7 +163,7 @@ If `services` section is present:
163
163
 
164
164
  **2. Route to service** — if active domain matches a key in `services`:
165
165
  - Override `paths.specs_dir` → `services.{domain}.specs_dir`
166
- - Override `paths.tech_docs_dir` → `services.{domain}.tech_docs_dir`
166
+ - Override `paths.tech_docs_dir` → `services.{domain}.tech_docs_dir` — **only if `setup.spec_source` is NOT set.** When `spec_source` IS set, the tech-design (API contract) is a cross-team artifact and must live in the shared spec repo (handled in step 4), so leave `tech_docs_dir` for step 4 to route — do NOT pin it per-service here.
167
167
  - Store `active_service` = `services.{domain}.path`
168
168
  - Store `active_service_module` = `services.{domain}.module`
169
169
  - If service has its own `module` → use it as `active_module` (overrides `tech_stack.module`)
@@ -175,7 +175,7 @@ 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
+ - Override `paths.tech_docs_dir` → `{spec_source}/specs/tech-docs` — **always when `spec_source` is set** (step 2 no longer pins tech-docs per-service in this case). The tech-design IS the cross-team API contract: BE authors it here, and FE/App read it from the same spec submodule at `/generate-code --phase=integration`. *(Per-service tech-docs only happen when there is no `spec_source` — a pure multi-service BE repo with no shared spec module.)*
179
179
  - Override `paths.domain_knowledge_dir` → `{spec_source}/specs/domain-knowledge`
180
180
  - Override `paths.business_dictionary` → `{spec_source}/specs/domain-knowledge/business-dictionary.md`
181
181
  - Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
@@ -206,7 +206,7 @@ When `active_service` has been resolved to a real path in Step 1.5 (e.g., `user-
206
206
  | `paths.specs_dir` | `{active_service}/{service paths.specs_dir}` (if set in service config, else keep Step 1.5 override) |
207
207
 
208
208
  **3. Store** `service_root = {active_service}` as the working directory anchor for all downstream commands:
209
- - Shell commands (`/run-tests`, `/generate-tests`) run **from within** `service_root`
209
+ - Shell commands (`/dev-run-test`, `/dev-gen-test`) run **from within** `service_root`
210
210
  - File write operations (test files, trace TSVs) use paths **relative to** `service_root`
211
211
 
212
212
  **4. If service config not found** — keep umbrella defaults, still set `service_root = {active_service}` (path anchor is always needed even without a config override).
@@ -299,7 +299,7 @@ active_module = tech_stack.module (e.g. "java-spring", "react", "flutter")
299
299
 
300
300
  If `tech_stack.module` is blank or not recognized → set `platform_type = "unknown"` and flag as ⚠️ in the Step 7 recap.
301
301
 
302
- These two variables (`active_module`, `platform_type`) are the canonical source for all branching logic in commands that need platform-specific behavior (generate-tests, debug, fix-bug, smoke-test).
302
+ These two variables (`active_module`, `platform_type`) are the canonical source for all branching logic in commands that need platform-specific behavior (dev-gen-test, debug, fix-bug, dev-smoke-test).
303
303
 
304
304
  ---
305
305
 
@@ -399,19 +399,6 @@ Using `active_module` and `platform_type` derived from context loading:
399
399
 
400
400
  ---
401
401
 
402
- ## Figma Check
403
-
404
- Ask:
405
-
406
- ```
407
- Do you have a Figma link for this feature? (paste URL or press Enter to skip)
408
- ```
409
-
410
- - If URL provided → store as `figma_url`.
411
- - If skipped → `figma_url = "TBD"`. Add AI Assumption: "Figma link not provided — all screen descriptions are text-based. Link must be added and verified before Design Spec sign-off."
412
-
413
- ---
414
-
415
402
  ## Screen Discovery
416
403
 
417
404
  From the PRD's Section 4 (User Flow + Wireframe), extract all screen / page / modal names mentioned.
@@ -432,6 +419,54 @@ Wait for confirmation. Store the confirmed list as `screen_list`.
432
419
 
433
420
  ---
434
421
 
422
+ ## Figma Frame Links *(mandatory — one readable node-level link per screen)*
423
+
424
+ A Design Spec is only as good as the design it points to. The AI **cannot read a plain
425
+ file link** (`figma.com/design/{fileKey}/...` with no `node-id`) — it needs a
426
+ **node-level link to each specific frame** so it can fetch that frame's real layout,
427
+ components, and tokens via the Figma MCP. So collect one link **per screen**, not one
428
+ link for the whole feature.
429
+
430
+ **Ask the PO, listing every screen in `screen_list`:**
431
+
432
+ ```
433
+ Paste the Figma frame link for each screen below.
434
+
435
+ In Figma: select the frame → right-click → "Copy link to selection"
436
+ (the URL must contain ?node-id=... — that is the per-frame link the AI can read)
437
+
438
+ 1. {Screen 1} : ____
439
+ 2. {Screen 2} : ____
440
+ ...
441
+
442
+ If a screen has no design yet, type none for that screen.
443
+ ```
444
+
445
+ **For each answer:**
446
+
447
+ 1. **Validate format** — the URL must match `figma.com/design/{fileKey}/...?node-id={nodeId}`.
448
+ - Valid → store as `figma_frames[{screen}] = {url}`, parse out `fileKey` + `nodeId`.
449
+ - A file link with **no `node-id`** → reject it: "This link points to the whole file, not a frame. Re-copy via right-click → Copy link to selection." Re-ask for that screen.
450
+ - `none` → `figma_frames[{screen}] = "TBD"`, mark that screen ❌ Missing.
451
+
452
+ 2. **Fetch the frame via Figma MCP** (only for valid links) — call `get_design_context`
453
+ (and `get_screenshot` when useful) with the parsed `fileKey` + `nodeId` to read the
454
+ real layout, component names, and design tokens. Ground every Screen Spec in this
455
+ fetched data; do **not** invent layout the frame does not show. If a fetch fails
456
+ (permission / not found) → treat that screen as ❌ Missing and note the fetch error.
457
+
458
+ 3. Derive the feature-level `figma_url` = the file link (without `node-id`) shared by the
459
+ frames, for the Metadata row. If frames span multiple files, list each.
460
+
461
+ **Mandatory gate (does not abort — produces a draft):**
462
+ - If **any** screen is ❌ Missing → the spec is generated as a **draft** with those screens
463
+ flagged, but `Status` stays `draft` and **sign-off / `/generate-bdd` is blocked** until
464
+ every screen has a readable, fetched frame link. Record `missing_frames = [screens]`.
465
+ - Add one AI Assumption per missing screen: "No readable Figma frame for {screen} — spec
466
+ for this screen is text-only and must not be signed off until a `node-id` link is added."
467
+
468
+ ---
469
+
435
470
  ## CHECKPOINT
436
471
 
437
472
  ```
@@ -443,9 +478,13 @@ Module : {active_module}
443
478
  Service : {active_service}
444
479
  Domain : {domain}
445
480
  Screens : {N} — {comma-separated screen_list}
446
- Figma : {figma_url}
481
+ Figma : {linked}/{N} screens have readable frame links{; missing: comma-separated missing_frames}
447
482
  Output path : {paths.design_spec_dir}/{domain}/{TICKET-ID}-design-spec-{active_platform}-{slug}.md
448
483
 
484
+ {If missing_frames non-empty}:
485
+ ⚠️ {count} screen(s) without a readable Figma frame link — these will be generated as
486
+ text-only drafts and the spec cannot be signed off until their node-id links are added.
487
+
449
488
  Generate? (Y/N)
450
489
  ```
451
490
 
@@ -470,6 +509,15 @@ Apply these rules consistently when generating all sections:
470
509
  - `app` / `app-ios` / `app-android` → include gestures, safe area, minimum touch targets, navigation pattern, deep links, permissions, offline behavior.
471
510
  - Only generate the section relevant to `active_platform`. Omit the other platform's section entirely.
472
511
 
512
+ **Figma grounding (mandatory):**
513
+ - For every screen with a fetched frame (`figma_frames[screen]` is a valid link), base the
514
+ Layout, Component Inventory, and Screen States on the **fetched Figma data** — real
515
+ component names, real tokens, real frame structure. Do not contradict or invent layout.
516
+ - Use the exact per-screen `figma_frames[screen]` URL in the Screen Inventory, each Screen
517
+ Spec header, and the Figma Summary — never a synthetic `{figma_url}#screen1` fragment.
518
+ - For ❌ Missing screens: generate a text-only draft from the PRD, prefix the Screen Spec
519
+ with `> [DRAFT — no Figma frame; do not sign off]`, and leave the Figma cell as ❌ Missing.
520
+
473
521
  **Screen states (mandatory per screen):**
474
522
  - Every screen must document at minimum: `default`, `loading`, `error`.
475
523
  - Add `empty` when the screen can display zero-data state.
@@ -499,7 +547,7 @@ Write `{paths.design_spec_dir}/{domain}/{TICKET-ID}-design-spec-{active_platform
499
547
  | **Service** | {active_service} |
500
548
  | **Domain** | {domain} |
501
549
  | **Business PRD** | [{TICKET-ID}]({relative-path-to-prd.md}) |
502
- | **Figma** | {figma_url} |
550
+ | **Figma** | {figma_url — feature file link} ({linked}/{N} frames linked) |
503
551
  | **Author** | {PO name or "AI-assisted"} |
504
552
  | **Created** | {YYYY-MM-DD} |
505
553
  | **Updated** | {YYYY-MM-DD} |
@@ -510,8 +558,8 @@ Write `{paths.design_spec_dir}/{domain}/{TICKET-ID}-design-spec-{active_platform
510
558
 
511
559
  | # | Screen Name | Entry Point | Figma Frame | Notes |
512
560
  |---|-------------|-------------|-------------|-------|
513
- | 1 | {Screen 1} | {how user arrives — e.g., tap CTA on Home} | [Frame]({figma_url}#screen1) | |
514
- | 2 | {Screen 2} | {entry point} | [Frame]({figma_url}#screen2) | |
561
+ | 1 | {Screen 1} | {how user arrives — e.g., tap CTA on Home} | [Frame]({figma_frames[Screen 1]}) | |
562
+ | 2 | {Screen 2} | {entry point} | [Frame]({figma_frames[Screen 2]}) / ❌ Missing | |
515
563
 
516
564
  ---
517
565
 
@@ -524,7 +572,7 @@ Write `{paths.design_spec_dir}/{domain}/{TICKET-ID}-design-spec-{active_platform
524
572
 
525
573
  ## Screen 1: {Screen Name}
526
574
 
527
- **Figma**: [{Frame name}]({figma_frame_url})
575
+ **Figma**: [{Frame name}]({figma_frames[Screen 1]}) <!-- ❌ Missing → prefix this screen with `> [DRAFT — no Figma frame; do not sign off]` -->
528
576
 
529
577
  ### Layout
530
578
 
@@ -680,10 +728,10 @@ Exit: {how the user leaves — back stack / tab switch / deeplink out}
680
728
 
681
729
  ## Figma Summary
682
730
 
683
- | Screen | Figma Frame | Designer Status |
684
- |-----------------|-------------------------------|------------------------|
685
- | {Screen 1} | [Link]({figma_frame_url}) | ✅ Ready / ⏳ WIP / ❌ Missing |
686
- | {Screen 2} | [Link]({figma_frame_url}) | Ready / WIP / Missing |
731
+ | Screen | Figma Frame | Link / Fetch Status |
732
+ |-----------------|--------------------------------------|--------------------------------------|
733
+ | {Screen 1} | [Link]({figma_frames[Screen 1]}) | ✅ Linked & fetched |
734
+ | {Screen 2} | | Missing no node-id link provided |
687
735
 
688
736
  ## Design Tokens Referenced
689
737
 
@@ -705,6 +753,7 @@ Exit: {how the user leaves — back stack / tab switch / deeplink out}
705
753
  > PO must review and confirm before sign-off.
706
754
 
707
755
  - {Assumption 1 — [AI DRAFT]}
756
+ - {One per ❌ Missing screen: "No readable Figma frame for {screen} — text-only draft; blocks sign-off until a node-id link is added."}
708
757
 
709
758
  ---
710
759
 
@@ -716,9 +765,10 @@ Exit: {how the user leaves — back stack / tab switch / deeplink out}
716
765
 
717
766
  <!--
718
767
  NEXT STEPS:
719
- 1. Share with Designer verify Figma links, update component inventory.
720
- 2. PO + Designer sign off: change Status "approved".
721
- 3. Run /generate-bdd "{prd-file}" BDD uses AC-UI from this spec for FE scenarios.
768
+ 1. Fill any Missing Figma frame links (node-id links) — re-run to fetch & ground them.
769
+ 2. Share with Designer verify Figma links, update component inventory.
770
+ 3. PO + Designer sign off: change Status → "approved" (only allowed when 0 screens are Missing).
771
+ 4. Run /generate-bdd "{prd-file}" — BDD uses AC-UI from this spec for FE scenarios.
722
772
  -->
723
773
  ````
724
774
 
@@ -733,7 +783,9 @@ Exit: {how the user leaves — back stack / tab switch / deeplink out}
733
783
  - [ ] Only the platform-relevant section generated in Section 4
734
784
  - [ ] AC-UI items are testable (clear pass/fail, not "looks good")
735
785
  - [ ] Business PRD cross-reference link is valid relative path
736
- - [ ] If `figma_url = "TBD"` AI Assumption added in Appendix
786
+ - [ ] Every screen has a node-level Figma frame link (`?node-id=`) — and screens with a link were fetched via Figma MCP and used to ground the spec
787
+ - [ ] Each ❌ Missing screen is flagged in-spec (`> [DRAFT — no Figma frame...]`), listed in Figma Summary, and has an AI Assumption
788
+ - [ ] If any screen is ❌ Missing → Status stays `draft` and the Output below blocks `/generate-bdd`
737
789
 
738
790
  ---
739
791
 
@@ -777,13 +829,13 @@ Suggest the logical next command based on workflow phase:
777
829
  | /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
778
830
  | /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
779
831
  | /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
780
- | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/generate-tests {UC-ID}` |
781
- | /generate-tests | `/run-tests {UC-ID}` |
782
- | /run-tests (passing) | `/review-code {UC-ID}` |
783
- | /run-tests (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
784
- | /review-code | `/smoke-test {UC-ID}` or create PR |
785
- | /smoke-test | Create PR and link to ticket |
786
- | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/generate-tests {UC-ID}`; all OK → create PR |
832
+ | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
833
+ | /dev-gen-test | `/dev-run-test {UC-ID}` |
834
+ | /dev-run-test (passing) | `/review-code {UC-ID}` |
835
+ | /dev-run-test (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
836
+ | /review-code | `/dev-smoke-test {UC-ID}` or create PR |
837
+ | /dev-smoke-test | Create PR and link to ticket |
838
+ | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; all OK → create PR |
787
839
  | /fix-bug | Create PR and link to ticket |
788
840
  | /debug | `/fix-bug {ticket-id}` if fix needed |
789
841
  | /report-bug | Send to dev (`/fix-bug {BUG-ID}`); if coverage gap → `/propose-scenario {UC-ID}` |
@@ -801,12 +853,25 @@ Next : {suggested command with example arguments}
801
853
  ```
802
854
 
803
855
 
856
+ {If missing_frames is empty}:
804
857
  ```
805
858
  /generate-design-spec Complete — {TICKET-ID} [{active_platform}]
806
859
  ---
807
- Status : ✅ Complete
860
+ Status : ✅ Complete — all {N} screens linked & fetched from Figma
808
861
  Output Artifacts:
809
862
  created {paths.design_spec_dir}/{domain}/{TICKET-ID}-design-spec-{active_platform}-{slug}.md (v1.0)
810
- Next : Share with Designer → add Figma links → PO + Designer sign-off (Status: approved)
863
+ Next : Share with Designer → PO + Designer sign-off (Status: approved)
811
864
  → /generate-bdd {prd-file} (generates BDD per service; reads AC-UI from Design Spec)
812
865
  ```
866
+
867
+ {If missing_frames is non-empty}:
868
+ ```
869
+ /generate-design-spec Complete (DRAFT) — {TICKET-ID} [{active_platform}]
870
+ ---
871
+ Status : ⚠️ Warnings — {count} screen(s) without a readable Figma frame: {comma-separated missing_frames}
872
+ Output Artifacts:
873
+ created {paths.design_spec_dir}/{domain}/{TICKET-ID}-design-spec-{active_platform}-{slug}.md (v1.0, draft)
874
+ Next : 🔒 Sign-off & /generate-bdd are BLOCKED until every screen has a node-id Figma link.
875
+ 1. In Figma: select each missing frame → right-click → Copy link to selection
876
+ 2. Re-run /generate-design-spec {prd-file} → AI fetches & grounds the new frames
877
+ ```
@@ -163,7 +163,7 @@ If `services` section is present:
163
163
 
164
164
  **2. Route to service** — if active domain matches a key in `services`:
165
165
  - Override `paths.specs_dir` → `services.{domain}.specs_dir`
166
- - Override `paths.tech_docs_dir` → `services.{domain}.tech_docs_dir`
166
+ - Override `paths.tech_docs_dir` → `services.{domain}.tech_docs_dir` — **only if `setup.spec_source` is NOT set.** When `spec_source` IS set, the tech-design (API contract) is a cross-team artifact and must live in the shared spec repo (handled in step 4), so leave `tech_docs_dir` for step 4 to route — do NOT pin it per-service here.
167
167
  - Store `active_service` = `services.{domain}.path`
168
168
  - Store `active_service_module` = `services.{domain}.module`
169
169
  - If service has its own `module` → use it as `active_module` (overrides `tech_stack.module`)
@@ -175,7 +175,7 @@ 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
+ - Override `paths.tech_docs_dir` → `{spec_source}/specs/tech-docs` — **always when `spec_source` is set** (step 2 no longer pins tech-docs per-service in this case). The tech-design IS the cross-team API contract: BE authors it here, and FE/App read it from the same spec submodule at `/generate-code --phase=integration`. *(Per-service tech-docs only happen when there is no `spec_source` — a pure multi-service BE repo with no shared spec module.)*
179
179
  - Override `paths.domain_knowledge_dir` → `{spec_source}/specs/domain-knowledge`
180
180
  - Override `paths.business_dictionary` → `{spec_source}/specs/domain-knowledge/business-dictionary.md`
181
181
  - Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
@@ -206,7 +206,7 @@ When `active_service` has been resolved to a real path in Step 1.5 (e.g., `user-
206
206
  | `paths.specs_dir` | `{active_service}/{service paths.specs_dir}` (if set in service config, else keep Step 1.5 override) |
207
207
 
208
208
  **3. Store** `service_root = {active_service}` as the working directory anchor for all downstream commands:
209
- - Shell commands (`/run-tests`, `/generate-tests`) run **from within** `service_root`
209
+ - Shell commands (`/dev-run-test`, `/dev-gen-test`) run **from within** `service_root`
210
210
  - File write operations (test files, trace TSVs) use paths **relative to** `service_root`
211
211
 
212
212
  **4. If service config not found** — keep umbrella defaults, still set `service_root = {active_service}` (path anchor is always needed even without a config override).
@@ -299,7 +299,7 @@ active_module = tech_stack.module (e.g. "java-spring", "react", "flutter")
299
299
 
300
300
  If `tech_stack.module` is blank or not recognized → set `platform_type = "unknown"` and flag as ⚠️ in the Step 7 recap.
301
301
 
302
- These two variables (`active_module`, `platform_type`) are the canonical source for all branching logic in commands that need platform-specific behavior (generate-tests, debug, fix-bug, smoke-test).
302
+ These two variables (`active_module`, `platform_type`) are the canonical source for all branching logic in commands that need platform-specific behavior (dev-gen-test, debug, fix-bug, dev-smoke-test).
303
303
 
304
304
  ---
305
305
 
@@ -632,13 +632,13 @@ Suggest the logical next command based on workflow phase:
632
632
  | /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
633
633
  | /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
634
634
  | /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
635
- | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/generate-tests {UC-ID}` |
636
- | /generate-tests | `/run-tests {UC-ID}` |
637
- | /run-tests (passing) | `/review-code {UC-ID}` |
638
- | /run-tests (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
639
- | /review-code | `/smoke-test {UC-ID}` or create PR |
640
- | /smoke-test | Create PR and link to ticket |
641
- | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/generate-tests {UC-ID}`; all OK → create PR |
635
+ | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
636
+ | /dev-gen-test | `/dev-run-test {UC-ID}` |
637
+ | /dev-run-test (passing) | `/review-code {UC-ID}` |
638
+ | /dev-run-test (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
639
+ | /review-code | `/dev-smoke-test {UC-ID}` or create PR |
640
+ | /dev-smoke-test | Create PR and link to ticket |
641
+ | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; all OK → create PR |
642
642
  | /fix-bug | Create PR and link to ticket |
643
643
  | /debug | `/fix-bug {ticket-id}` if fix needed |
644
644
  | /report-bug | Send to dev (`/fix-bug {BUG-ID}`); if coverage gap → `/propose-scenario {UC-ID}` |
@@ -168,7 +168,7 @@ If `services` section is present:
168
168
 
169
169
  **2. Route to service** — if active domain matches a key in `services`:
170
170
  - Override `paths.specs_dir` → `services.{domain}.specs_dir`
171
- - Override `paths.tech_docs_dir` → `services.{domain}.tech_docs_dir`
171
+ - Override `paths.tech_docs_dir` → `services.{domain}.tech_docs_dir` — **only if `setup.spec_source` is NOT set.** When `spec_source` IS set, the tech-design (API contract) is a cross-team artifact and must live in the shared spec repo (handled in step 4), so leave `tech_docs_dir` for step 4 to route — do NOT pin it per-service here.
172
172
  - Store `active_service` = `services.{domain}.path`
173
173
  - Store `active_service_module` = `services.{domain}.module`
174
174
  - If service has its own `module` → use it as `active_module` (overrides `tech_stack.module`)
@@ -180,7 +180,7 @@ 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
+ - Override `paths.tech_docs_dir` → `{spec_source}/specs/tech-docs` — **always when `spec_source` is set** (step 2 no longer pins tech-docs per-service in this case). The tech-design IS the cross-team API contract: BE authors it here, and FE/App read it from the same spec submodule at `/generate-code --phase=integration`. *(Per-service tech-docs only happen when there is no `spec_source` — a pure multi-service BE repo with no shared spec module.)*
184
184
  - Override `paths.domain_knowledge_dir` → `{spec_source}/specs/domain-knowledge`
185
185
  - Override `paths.business_dictionary` → `{spec_source}/specs/domain-knowledge/business-dictionary.md`
186
186
  - Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
@@ -211,7 +211,7 @@ When `active_service` has been resolved to a real path in Step 1.5 (e.g., `user-
211
211
  | `paths.specs_dir` | `{active_service}/{service paths.specs_dir}` (if set in service config, else keep Step 1.5 override) |
212
212
 
213
213
  **3. Store** `service_root = {active_service}` as the working directory anchor for all downstream commands:
214
- - Shell commands (`/run-tests`, `/generate-tests`) run **from within** `service_root`
214
+ - Shell commands (`/dev-run-test`, `/dev-gen-test`) run **from within** `service_root`
215
215
  - File write operations (test files, trace TSVs) use paths **relative to** `service_root`
216
216
 
217
217
  **4. If service config not found** — keep umbrella defaults, still set `service_root = {active_service}` (path anchor is always needed even without a config override).
@@ -304,7 +304,7 @@ active_module = tech_stack.module (e.g. "java-spring", "react", "flutter")
304
304
 
305
305
  If `tech_stack.module` is blank or not recognized → set `platform_type = "unknown"` and flag as ⚠️ in the Step 7 recap.
306
306
 
307
- These two variables (`active_module`, `platform_type`) are the canonical source for all branching logic in commands that need platform-specific behavior (generate-tests, debug, fix-bug, smoke-test).
307
+ These two variables (`active_module`, `platform_type`) are the canonical source for all branching logic in commands that need platform-specific behavior (dev-gen-test, debug, fix-bug, dev-smoke-test).
308
308
 
309
309
  ---
310
310
 
@@ -529,13 +529,13 @@ Suggest the logical next command based on workflow phase:
529
529
  | /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
530
530
  | /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
531
531
  | /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
532
- | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/generate-tests {UC-ID}` |
533
- | /generate-tests | `/run-tests {UC-ID}` |
534
- | /run-tests (passing) | `/review-code {UC-ID}` |
535
- | /run-tests (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
536
- | /review-code | `/smoke-test {UC-ID}` or create PR |
537
- | /smoke-test | Create PR and link to ticket |
538
- | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/generate-tests {UC-ID}`; all OK → create PR |
532
+ | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
533
+ | /dev-gen-test | `/dev-run-test {UC-ID}` |
534
+ | /dev-run-test (passing) | `/review-code {UC-ID}` |
535
+ | /dev-run-test (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
536
+ | /review-code | `/dev-smoke-test {UC-ID}` or create PR |
537
+ | /dev-smoke-test | Create PR and link to ticket |
538
+ | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; all OK → create PR |
539
539
  | /fix-bug | Create PR and link to ticket |
540
540
  | /debug | `/fix-bug {ticket-id}` if fix needed |
541
541
  | /report-bug | Send to dev (`/fix-bug {BUG-ID}`); if coverage gap → `/propose-scenario {UC-ID}` |
@@ -184,7 +184,7 @@ If `services` section is present:
184
184
 
185
185
  **2. Route to service** — if active domain matches a key in `services`:
186
186
  - Override `paths.specs_dir` → `services.{domain}.specs_dir`
187
- - Override `paths.tech_docs_dir` → `services.{domain}.tech_docs_dir`
187
+ - Override `paths.tech_docs_dir` → `services.{domain}.tech_docs_dir` — **only if `setup.spec_source` is NOT set.** When `spec_source` IS set, the tech-design (API contract) is a cross-team artifact and must live in the shared spec repo (handled in step 4), so leave `tech_docs_dir` for step 4 to route — do NOT pin it per-service here.
188
188
  - Store `active_service` = `services.{domain}.path`
189
189
  - Store `active_service_module` = `services.{domain}.module`
190
190
  - If service has its own `module` → use it as `active_module` (overrides `tech_stack.module`)
@@ -196,7 +196,7 @@ 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
+ - Override `paths.tech_docs_dir` → `{spec_source}/specs/tech-docs` — **always when `spec_source` is set** (step 2 no longer pins tech-docs per-service in this case). The tech-design IS the cross-team API contract: BE authors it here, and FE/App read it from the same spec submodule at `/generate-code --phase=integration`. *(Per-service tech-docs only happen when there is no `spec_source` — a pure multi-service BE repo with no shared spec module.)*
200
200
  - Override `paths.domain_knowledge_dir` → `{spec_source}/specs/domain-knowledge`
201
201
  - Override `paths.business_dictionary` → `{spec_source}/specs/domain-knowledge/business-dictionary.md`
202
202
  - Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
@@ -227,7 +227,7 @@ When `active_service` has been resolved to a real path in Step 1.5 (e.g., `user-
227
227
  | `paths.specs_dir` | `{active_service}/{service paths.specs_dir}` (if set in service config, else keep Step 1.5 override) |
228
228
 
229
229
  **3. Store** `service_root = {active_service}` as the working directory anchor for all downstream commands:
230
- - Shell commands (`/run-tests`, `/generate-tests`) run **from within** `service_root`
230
+ - Shell commands (`/dev-run-test`, `/dev-gen-test`) run **from within** `service_root`
231
231
  - File write operations (test files, trace TSVs) use paths **relative to** `service_root`
232
232
 
233
233
  **4. If service config not found** — keep umbrella defaults, still set `service_root = {active_service}` (path anchor is always needed even without a config override).
@@ -320,7 +320,7 @@ active_module = tech_stack.module (e.g. "java-spring", "react", "flutter")
320
320
 
321
321
  If `tech_stack.module` is blank or not recognized → set `platform_type = "unknown"` and flag as ⚠️ in the Step 7 recap.
322
322
 
323
- These two variables (`active_module`, `platform_type`) are the canonical source for all branching logic in commands that need platform-specific behavior (generate-tests, debug, fix-bug, smoke-test).
323
+ These two variables (`active_module`, `platform_type`) are the canonical source for all branching logic in commands that need platform-specific behavior (dev-gen-test, debug, fix-bug, dev-smoke-test).
324
324
 
325
325
  ---
326
326
 
@@ -518,7 +518,7 @@ cd -
518
518
  git add {spec_source} && git commit -m "chore: bump spec pointer ({UC-ID} tech design)"
519
519
  ```
520
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.
521
+ If `tech_docs_dir` is **local** — i.e. no `setup.spec_source` (single-repo, or a pure multi-service BE repo with no shared spec module) skip this; no cross-repo publish needed. Whenever `spec_source` is set, tech-docs route to the spec submodule and this publish step applies.
522
522
 
523
523
  ## Output
524
524
 
@@ -560,13 +560,13 @@ Suggest the logical next command based on workflow phase:
560
560
  | /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
561
561
  | /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
562
562
  | /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
563
- | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/generate-tests {UC-ID}` |
564
- | /generate-tests | `/run-tests {UC-ID}` |
565
- | /run-tests (passing) | `/review-code {UC-ID}` |
566
- | /run-tests (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
567
- | /review-code | `/smoke-test {UC-ID}` or create PR |
568
- | /smoke-test | Create PR and link to ticket |
569
- | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/generate-tests {UC-ID}`; all OK → create PR |
563
+ | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
564
+ | /dev-gen-test | `/dev-run-test {UC-ID}` |
565
+ | /dev-run-test (passing) | `/review-code {UC-ID}` |
566
+ | /dev-run-test (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
567
+ | /review-code | `/dev-smoke-test {UC-ID}` or create PR |
568
+ | /dev-smoke-test | Create PR and link to ticket |
569
+ | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; all OK → create PR |
570
570
  | /fix-bug | Create PR and link to ticket |
571
571
  | /debug | `/fix-bug {ticket-id}` if fix needed |
572
572
  | /report-bug | Send to dev (`/fix-bug {BUG-ID}`); if coverage gap → `/propose-scenario {UC-ID}` |
@@ -172,7 +172,7 @@ If `services` section is present:
172
172
 
173
173
  **2. Route to service** — if active domain matches a key in `services`:
174
174
  - Override `paths.specs_dir` → `services.{domain}.specs_dir`
175
- - Override `paths.tech_docs_dir` → `services.{domain}.tech_docs_dir`
175
+ - Override `paths.tech_docs_dir` → `services.{domain}.tech_docs_dir` — **only if `setup.spec_source` is NOT set.** When `spec_source` IS set, the tech-design (API contract) is a cross-team artifact and must live in the shared spec repo (handled in step 4), so leave `tech_docs_dir` for step 4 to route — do NOT pin it per-service here.
176
176
  - Store `active_service` = `services.{domain}.path`
177
177
  - Store `active_service_module` = `services.{domain}.module`
178
178
  - If service has its own `module` → use it as `active_module` (overrides `tech_stack.module`)
@@ -184,7 +184,7 @@ 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
+ - Override `paths.tech_docs_dir` → `{spec_source}/specs/tech-docs` — **always when `spec_source` is set** (step 2 no longer pins tech-docs per-service in this case). The tech-design IS the cross-team API contract: BE authors it here, and FE/App read it from the same spec submodule at `/generate-code --phase=integration`. *(Per-service tech-docs only happen when there is no `spec_source` — a pure multi-service BE repo with no shared spec module.)*
188
188
  - Override `paths.domain_knowledge_dir` → `{spec_source}/specs/domain-knowledge`
189
189
  - Override `paths.business_dictionary` → `{spec_source}/specs/domain-knowledge/business-dictionary.md`
190
190
  - Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
@@ -215,7 +215,7 @@ When `active_service` has been resolved to a real path in Step 1.5 (e.g., `user-
215
215
  | `paths.specs_dir` | `{active_service}/{service paths.specs_dir}` (if set in service config, else keep Step 1.5 override) |
216
216
 
217
217
  **3. Store** `service_root = {active_service}` as the working directory anchor for all downstream commands:
218
- - Shell commands (`/run-tests`, `/generate-tests`) run **from within** `service_root`
218
+ - Shell commands (`/dev-run-test`, `/dev-gen-test`) run **from within** `service_root`
219
219
  - File write operations (test files, trace TSVs) use paths **relative to** `service_root`
220
220
 
221
221
  **4. If service config not found** — keep umbrella defaults, still set `service_root = {active_service}` (path anchor is always needed even without a config override).
@@ -308,7 +308,7 @@ active_module = tech_stack.module (e.g. "java-spring", "react", "flutter")
308
308
 
309
309
  If `tech_stack.module` is blank or not recognized → set `platform_type = "unknown"` and flag as ⚠️ in the Step 7 recap.
310
310
 
311
- These two variables (`active_module`, `platform_type`) are the canonical source for all branching logic in commands that need platform-specific behavior (generate-tests, debug, fix-bug, smoke-test).
311
+ These two variables (`active_module`, `platform_type`) are the canonical source for all branching logic in commands that need platform-specific behavior (dev-gen-test, debug, fix-bug, dev-smoke-test).
312
312
 
313
313
  ---
314
314
 
@@ -446,7 +446,7 @@ If `lessons_path` does not exist, create it with this header first:
446
446
  | code-gen | /generate-code output |
447
447
  | bdd | /generate-bdd output |
448
448
  | tech-docs | /generate-tech-docs output |
449
- | tests | /generate-tests output |
449
+ | tests | /dev-gen-test output |
450
450
  | prd | /generate-prd, /refine-prd output |
451
451
  | general | every command |
452
452
 
@@ -513,13 +513,13 @@ Suggest the logical next command based on workflow phase:
513
513
  | /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
514
514
  | /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
515
515
  | /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
516
- | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/generate-tests {UC-ID}` |
517
- | /generate-tests | `/run-tests {UC-ID}` |
518
- | /run-tests (passing) | `/review-code {UC-ID}` |
519
- | /run-tests (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
520
- | /review-code | `/smoke-test {UC-ID}` or create PR |
521
- | /smoke-test | Create PR and link to ticket |
522
- | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/generate-tests {UC-ID}`; all OK → create PR |
516
+ | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
517
+ | /dev-gen-test | `/dev-run-test {UC-ID}` |
518
+ | /dev-run-test (passing) | `/review-code {UC-ID}` |
519
+ | /dev-run-test (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
520
+ | /review-code | `/dev-smoke-test {UC-ID}` or create PR |
521
+ | /dev-smoke-test | Create PR and link to ticket |
522
+ | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; all OK → create PR |
523
523
  | /fix-bug | Create PR and link to ticket |
524
524
  | /debug | `/fix-bug {ticket-id}` if fix needed |
525
525
  | /report-bug | Send to dev (`/fix-bug {BUG-ID}`); if coverage gap → `/propose-scenario {UC-ID}` |
@@ -172,7 +172,7 @@ If `services` section is present:
172
172
 
173
173
  **2. Route to service** — if active domain matches a key in `services`:
174
174
  - Override `paths.specs_dir` → `services.{domain}.specs_dir`
175
- - Override `paths.tech_docs_dir` → `services.{domain}.tech_docs_dir`
175
+ - Override `paths.tech_docs_dir` → `services.{domain}.tech_docs_dir` — **only if `setup.spec_source` is NOT set.** When `spec_source` IS set, the tech-design (API contract) is a cross-team artifact and must live in the shared spec repo (handled in step 4), so leave `tech_docs_dir` for step 4 to route — do NOT pin it per-service here.
176
176
  - Store `active_service` = `services.{domain}.path`
177
177
  - Store `active_service_module` = `services.{domain}.module`
178
178
  - If service has its own `module` → use it as `active_module` (overrides `tech_stack.module`)
@@ -184,7 +184,7 @@ 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
+ - Override `paths.tech_docs_dir` → `{spec_source}/specs/tech-docs` — **always when `spec_source` is set** (step 2 no longer pins tech-docs per-service in this case). The tech-design IS the cross-team API contract: BE authors it here, and FE/App read it from the same spec submodule at `/generate-code --phase=integration`. *(Per-service tech-docs only happen when there is no `spec_source` — a pure multi-service BE repo with no shared spec module.)*
188
188
  - Override `paths.domain_knowledge_dir` → `{spec_source}/specs/domain-knowledge`
189
189
  - Override `paths.business_dictionary` → `{spec_source}/specs/domain-knowledge/business-dictionary.md`
190
190
  - Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
@@ -215,7 +215,7 @@ When `active_service` has been resolved to a real path in Step 1.5 (e.g., `user-
215
215
  | `paths.specs_dir` | `{active_service}/{service paths.specs_dir}` (if set in service config, else keep Step 1.5 override) |
216
216
 
217
217
  **3. Store** `service_root = {active_service}` as the working directory anchor for all downstream commands:
218
- - Shell commands (`/run-tests`, `/generate-tests`) run **from within** `service_root`
218
+ - Shell commands (`/dev-run-test`, `/dev-gen-test`) run **from within** `service_root`
219
219
  - File write operations (test files, trace TSVs) use paths **relative to** `service_root`
220
220
 
221
221
  **4. If service config not found** — keep umbrella defaults, still set `service_root = {active_service}` (path anchor is always needed even without a config override).
@@ -308,7 +308,7 @@ active_module = tech_stack.module (e.g. "java-spring", "react", "flutter")
308
308
 
309
309
  If `tech_stack.module` is blank or not recognized → set `platform_type = "unknown"` and flag as ⚠️ in the Step 7 recap.
310
310
 
311
- These two variables (`active_module`, `platform_type`) are the canonical source for all branching logic in commands that need platform-specific behavior (generate-tests, debug, fix-bug, smoke-test).
311
+ These two variables (`active_module`, `platform_type`) are the canonical source for all branching logic in commands that need platform-specific behavior (dev-gen-test, debug, fix-bug, dev-smoke-test).
312
312
 
313
313
  ---
314
314
 
@@ -470,13 +470,13 @@ Suggest the logical next command based on workflow phase:
470
470
  | /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
471
471
  | /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
472
472
  | /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
473
- | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/generate-tests {UC-ID}` |
474
- | /generate-tests | `/run-tests {UC-ID}` |
475
- | /run-tests (passing) | `/review-code {UC-ID}` |
476
- | /run-tests (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
477
- | /review-code | `/smoke-test {UC-ID}` or create PR |
478
- | /smoke-test | Create PR and link to ticket |
479
- | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/generate-tests {UC-ID}`; all OK → create PR |
473
+ | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
474
+ | /dev-gen-test | `/dev-run-test {UC-ID}` |
475
+ | /dev-run-test (passing) | `/review-code {UC-ID}` |
476
+ | /dev-run-test (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
477
+ | /review-code | `/dev-smoke-test {UC-ID}` or create PR |
478
+ | /dev-smoke-test | Create PR and link to ticket |
479
+ | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; all OK → create PR |
480
480
  | /fix-bug | Create PR and link to ticket |
481
481
  | /debug | `/fix-bug {ticket-id}` if fix needed |
482
482
  | /report-bug | Send to dev (`/fix-bug {BUG-ID}`); if coverage gap → `/propose-scenario {UC-ID}` |
@@ -511,7 +511,7 @@ Proposed scenario (DRAFT — pending PO/Dev review):
511
511
  For PO/Dev to promote:
512
512
  [ ] AC mapping correct? (or update PRD if requirement is actually new)
513
513
  [ ] Add scenario to {bdd_path} (edit, or re-run /generate-bdd if PRD changed)
514
- [ ] Then: /generate-code {UC-ID} + /generate-tests {UC-ID}
514
+ [ ] Then: /generate-code {UC-ID} + /dev-gen-test {UC-ID}
515
515
 
516
516
  Handoff : {✅ committed + pushed to spec repo | ⚠️ run git commands above / open a PR}
517
517