@anhth2/spec-driven-dev-plugin 0.9.1 → 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 (124) hide show
  1. package/ARCHITECTURE.md +20 -9
  2. package/bin/index.js +1 -2
  3. package/commands/debug.md +13 -12
  4. package/commands/define-product.md +12 -11
  5. package/commands/{generate-tests.md → dev-gen-test.md} +48 -15
  6. package/commands/{generate-tests.tmpl → dev-gen-test.tmpl} +18 -4
  7. package/{core/commands/run-tests.md → commands/dev-run-test.md} +62 -13
  8. package/commands/{run-tests.tmpl → dev-run-test.tmpl} +32 -2
  9. package/{core/commands/smoke-test.md → commands/dev-smoke-test.md} +17 -16
  10. package/commands/{smoke-test.tmpl → dev-smoke-test.tmpl} +5 -5
  11. package/commands/fix-bug.md +13 -12
  12. package/commands/generate-bdd.md +39 -13
  13. package/commands/generate-bdd.tmpl +9 -2
  14. package/commands/generate-code.md +86 -15
  15. package/commands/generate-code.tmpl +56 -4
  16. package/commands/generate-design-spec.md +105 -39
  17. package/commands/generate-design-spec.tmpl +93 -28
  18. package/commands/generate-prd.md +12 -11
  19. package/commands/generate-spec-manifest.md +12 -11
  20. package/commands/generate-tech-docs.md +63 -22
  21. package/commands/generate-tech-docs.tmpl +51 -11
  22. package/commands/learn.md +13 -12
  23. package/commands/propose-scenario.md +13 -12
  24. package/commands/propose-scenario.tmpl +1 -1
  25. package/commands/refine-prd.md +166 -16
  26. package/commands/refine-prd.tmpl +16 -5
  27. package/commands/report-bug.md +12 -11
  28. package/commands/review-code.md +14 -13
  29. package/commands/review-code.tmpl +1 -1
  30. package/commands/review-context.md +161 -12
  31. package/commands/review-context.tmpl +11 -1
  32. package/commands/review-tech-docs.md +13 -11
  33. package/commands/review-tech-docs.tmpl +1 -0
  34. package/commands/setup-ai-first.md +7 -7
  35. package/commands/sync.md +23 -20
  36. package/commands/sync.tmpl +16 -13
  37. package/commands/update-framework.md +7 -7
  38. package/commands/validate-traces.md +57 -37
  39. package/commands/validate-traces.tmpl +45 -26
  40. package/core/FRAMEWORK_VERSION +1 -1
  41. package/core/commands/debug.md +13 -12
  42. package/core/commands/define-product.md +12 -11
  43. package/core/commands/{generate-tests.md → dev-gen-test.md} +48 -15
  44. package/{commands/run-tests.md → core/commands/dev-run-test.md} +62 -13
  45. package/{commands/smoke-test.md → core/commands/dev-smoke-test.md} +17 -16
  46. package/core/commands/fix-bug.md +13 -12
  47. package/core/commands/generate-bdd.md +39 -13
  48. package/core/commands/generate-code.md +86 -15
  49. package/core/commands/generate-design-spec.md +105 -39
  50. package/core/commands/generate-prd.md +12 -11
  51. package/core/commands/generate-spec-manifest.md +12 -11
  52. package/core/commands/generate-tech-docs.md +63 -22
  53. package/core/commands/learn.md +13 -12
  54. package/core/commands/propose-scenario.md +13 -12
  55. package/core/commands/refine-prd.md +166 -16
  56. package/core/commands/report-bug.md +12 -11
  57. package/core/commands/review-code.md +14 -13
  58. package/core/commands/review-context.md +161 -12
  59. package/core/commands/review-tech-docs.md +13 -11
  60. package/core/commands/setup-ai-first.md +7 -7
  61. package/core/commands/sync.md +23 -20
  62. package/core/commands/update-framework.md +7 -7
  63. package/core/commands/validate-traces.md +57 -37
  64. package/core/modules/android-compose/module.yaml +13 -0
  65. package/core/modules/android-compose/stack-profile.yaml +57 -0
  66. package/core/modules/flutter/module.yaml +14 -0
  67. package/core/modules/flutter/stack-profile.yaml +59 -0
  68. package/core/modules/ios-swiftui/module.yaml +13 -0
  69. package/core/modules/ios-swiftui/stack-profile.yaml +55 -0
  70. package/core/modules/nuxt/module.yaml +14 -0
  71. package/core/modules/nuxt/stack-profile.yaml +58 -0
  72. package/core/modules/react-native/module.yaml +14 -0
  73. package/core/modules/react-native/stack-profile.yaml +56 -0
  74. package/core/modules/vue/module.yaml +14 -0
  75. package/core/modules/vue/stack-profile.yaml +65 -0
  76. package/core/skills/code/SKILL.md +19 -18
  77. package/core/skills/debug/SKILL.md +27 -26
  78. package/core/skills/design-spec/SKILL.md +12 -11
  79. package/core/skills/discovery/SKILL.md +12 -11
  80. package/core/skills/prd/SKILL.md +14 -14
  81. package/core/skills/setup-ai-first/SKILL.md +7 -7
  82. package/core/skills/spec/SKILL.md +14 -14
  83. package/core/skills/test/SKILL.md +40 -38
  84. package/core/steps/capture-lesson.md +1 -1
  85. package/core/steps/context-loader.md +5 -4
  86. package/core/steps/report-footer.md +7 -7
  87. package/core/steps/review-fanout.md +138 -0
  88. package/core/steps/spawn-agent.md +1 -1
  89. package/core/steps/trace-mirror.md +18 -0
  90. package/core/templates/design-spec.template.md +16 -8
  91. package/core/templates/product-definition.template.md +3 -3
  92. package/core/templates/project-context.yaml +4 -1
  93. package/modules/android-compose/module.yaml +13 -0
  94. package/modules/android-compose/stack-profile.yaml +57 -0
  95. package/modules/flutter/module.yaml +14 -0
  96. package/modules/flutter/stack-profile.yaml +59 -0
  97. package/modules/ios-swiftui/module.yaml +13 -0
  98. package/modules/ios-swiftui/stack-profile.yaml +55 -0
  99. package/modules/nuxt/module.yaml +14 -0
  100. package/modules/nuxt/stack-profile.yaml +58 -0
  101. package/modules/react-native/module.yaml +14 -0
  102. package/modules/react-native/stack-profile.yaml +56 -0
  103. package/modules/vue/module.yaml +14 -0
  104. package/modules/vue/stack-profile.yaml +65 -0
  105. package/package.json +1 -1
  106. package/skills/code/SKILL.md +19 -18
  107. package/skills/debug/SKILL.md +27 -26
  108. package/skills/debug/SKILL.tmpl +1 -1
  109. package/skills/design-spec/SKILL.md +12 -11
  110. package/skills/discovery/SKILL.md +12 -11
  111. package/skills/prd/SKILL.md +14 -14
  112. package/skills/setup-ai-first/SKILL.md +7 -7
  113. package/skills/spec/SKILL.md +14 -14
  114. package/skills/test/SKILL.md +40 -38
  115. package/skills/test/SKILL.tmpl +9 -9
  116. package/steps/capture-lesson.md +1 -1
  117. package/steps/context-loader.md +5 -4
  118. package/steps/report-footer.md +7 -7
  119. package/steps/review-fanout.md +138 -0
  120. package/steps/spawn-agent.md +1 -1
  121. package/steps/trace-mirror.md +18 -0
  122. package/templates/design-spec.template.md +16 -8
  123. package/templates/product-definition.template.md +3 -3
  124. package/templates/project-context.yaml +4 -1
@@ -179,7 +179,7 @@ If `services` section is present:
179
179
 
180
180
  **2. Route to service** — if active domain matches a key in `services`:
181
181
  - Override `paths.specs_dir` → `services.{domain}.specs_dir`
182
- - Override `paths.tech_docs_dir` → `services.{domain}.tech_docs_dir`
182
+ - 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.
183
183
  - Store `active_service` = `services.{domain}.path`
184
184
  - Store `active_service_module` = `services.{domain}.module`
185
185
  - If service has its own `module` → use it as `active_module` (overrides `tech_stack.module`)
@@ -191,13 +191,14 @@ If `services` section is present:
191
191
  **4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
192
192
  - Override `paths.prd_dir` → `{spec_source}/specs/prd`
193
193
  - Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
194
+ - 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.)*
194
195
  - Override `paths.domain_knowledge_dir` → `{spec_source}/specs/domain-knowledge`
195
196
  - Override `paths.business_dictionary` → `{spec_source}/specs/domain-knowledge/business-dictionary.md`
196
197
  - Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
197
198
  - Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
198
199
  - Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
199
200
 
200
- > **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.
201
+ > **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.
201
202
 
202
203
  ---
203
204
 
@@ -221,7 +222,7 @@ When `active_service` has been resolved to a real path in Step 1.5 (e.g., `user-
221
222
  | `paths.specs_dir` | `{active_service}/{service paths.specs_dir}` (if set in service config, else keep Step 1.5 override) |
222
223
 
223
224
  **3. Store** `service_root = {active_service}` as the working directory anchor for all downstream commands:
224
- - Shell commands (`/run-tests`, `/generate-tests`) run **from within** `service_root`
225
+ - Shell commands (`/dev-run-test`, `/dev-gen-test`) run **from within** `service_root`
225
226
  - File write operations (test files, trace TSVs) use paths **relative to** `service_root`
226
227
 
227
228
  **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).
@@ -314,7 +315,7 @@ active_module = tech_stack.module (e.g. "java-spring", "react", "flutter")
314
315
 
315
316
  If `tech_stack.module` is blank or not recognized → set `platform_type = "unknown"` and flag as ⚠️ in the Step 7 recap.
316
317
 
317
- 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).
318
+ 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).
318
319
 
319
320
  ---
320
321
 
@@ -472,13 +473,13 @@ Suggest the logical next command based on workflow phase:
472
473
  | /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
473
474
  | /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
474
475
  | /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
475
- | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/generate-tests {UC-ID}` |
476
- | /generate-tests | `/run-tests {UC-ID}` |
477
- | /run-tests (passing) | `/review-code {UC-ID}` |
478
- | /run-tests (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
479
- | /review-code | `/smoke-test {UC-ID}` or create PR |
480
- | /smoke-test | Create PR and link to ticket |
481
- | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/generate-tests {UC-ID}`; all OK → create PR |
476
+ | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
477
+ | /dev-gen-test | `/dev-run-test {UC-ID}` |
478
+ | /dev-run-test (passing) | `/review-code {UC-ID}` |
479
+ | /dev-run-test (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
480
+ | /review-code | `/dev-smoke-test {UC-ID}` or create PR |
481
+ | /dev-smoke-test | Create PR and link to ticket |
482
+ | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; all OK → create PR |
482
483
  | /fix-bug | Create PR and link to ticket |
483
484
  | /debug | `/fix-bug {ticket-id}` if fix needed |
484
485
  | /report-bug | Send to dev (`/fix-bug {BUG-ID}`); if coverage gap → `/propose-scenario {UC-ID}` |
@@ -84,7 +84,7 @@ If `services` section is present:
84
84
 
85
85
  **2. Route to service** — if active domain matches a key in `services`:
86
86
  - Override `paths.specs_dir` → `services.{domain}.specs_dir`
87
- - Override `paths.tech_docs_dir` → `services.{domain}.tech_docs_dir`
87
+ - 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.
88
88
  - Store `active_service` = `services.{domain}.path`
89
89
  - Store `active_service_module` = `services.{domain}.module`
90
90
  - If service has its own `module` → use it as `active_module` (overrides `tech_stack.module`)
@@ -96,13 +96,14 @@ If `services` section is present:
96
96
  **4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
97
97
  - Override `paths.prd_dir` → `{spec_source}/specs/prd`
98
98
  - Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
99
+ - 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.)*
99
100
  - Override `paths.domain_knowledge_dir` → `{spec_source}/specs/domain-knowledge`
100
101
  - Override `paths.business_dictionary` → `{spec_source}/specs/domain-knowledge/business-dictionary.md`
101
102
  - Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
102
103
  - Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
103
104
  - Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
104
105
 
105
- > **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.
106
+ > **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.
106
107
 
107
108
  ---
108
109
 
@@ -126,7 +127,7 @@ When `active_service` has been resolved to a real path in Step 1.5 (e.g., `user-
126
127
  | `paths.specs_dir` | `{active_service}/{service paths.specs_dir}` (if set in service config, else keep Step 1.5 override) |
127
128
 
128
129
  **3. Store** `service_root = {active_service}` as the working directory anchor for all downstream commands:
129
- - Shell commands (`/run-tests`, `/generate-tests`) run **from within** `service_root`
130
+ - Shell commands (`/dev-run-test`, `/dev-gen-test`) run **from within** `service_root`
130
131
  - File write operations (test files, trace TSVs) use paths **relative to** `service_root`
131
132
 
132
133
  **4. If service config not found** — keep umbrella defaults, still set `service_root = {active_service}` (path anchor is always needed even without a config override).
@@ -219,7 +220,7 @@ active_module = tech_stack.module (e.g. "java-spring", "react", "flutter")
219
220
 
220
221
  If `tech_stack.module` is blank or not recognized → set `platform_type = "unknown"` and flag as ⚠️ in the Step 7 recap.
221
222
 
222
- 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).
223
+ 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).
223
224
 
224
225
  ---
225
226
 
@@ -453,13 +454,13 @@ Suggest the logical next command based on workflow phase:
453
454
  | /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
454
455
  | /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
455
456
  | /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
456
- | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/generate-tests {UC-ID}` |
457
- | /generate-tests | `/run-tests {UC-ID}` |
458
- | /run-tests (passing) | `/review-code {UC-ID}` |
459
- | /run-tests (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
460
- | /review-code | `/smoke-test {UC-ID}` or create PR |
461
- | /smoke-test | Create PR and link to ticket |
462
- | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/generate-tests {UC-ID}`; all OK → create PR |
457
+ | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
458
+ | /dev-gen-test | `/dev-run-test {UC-ID}` |
459
+ | /dev-run-test (passing) | `/review-code {UC-ID}` |
460
+ | /dev-run-test (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
461
+ | /review-code | `/dev-smoke-test {UC-ID}` or create PR |
462
+ | /dev-smoke-test | Create PR and link to ticket |
463
+ | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; all OK → create PR |
463
464
  | /fix-bug | Create PR and link to ticket |
464
465
  | /debug | `/fix-bug {ticket-id}` if fix needed |
465
466
  | /report-bug | Send to dev (`/fix-bug {BUG-ID}`); if coverage gap → `/propose-scenario {UC-ID}` |
@@ -196,13 +196,13 @@ Suggest the logical next command based on workflow phase:
196
196
  | /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
197
197
  | /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
198
198
  | /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
199
- | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/generate-tests {UC-ID}` |
200
- | /generate-tests | `/run-tests {UC-ID}` |
201
- | /run-tests (passing) | `/review-code {UC-ID}` |
202
- | /run-tests (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
203
- | /review-code | `/smoke-test {UC-ID}` or create PR |
204
- | /smoke-test | Create PR and link to ticket |
205
- | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/generate-tests {UC-ID}`; all OK → create PR |
199
+ | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
200
+ | /dev-gen-test | `/dev-run-test {UC-ID}` |
201
+ | /dev-run-test (passing) | `/review-code {UC-ID}` |
202
+ | /dev-run-test (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
203
+ | /review-code | `/dev-smoke-test {UC-ID}` or create PR |
204
+ | /dev-smoke-test | Create PR and link to ticket |
205
+ | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; all OK → create PR |
206
206
  | /fix-bug | Create PR and link to ticket |
207
207
  | /debug | `/fix-bug {ticket-id}` if fix needed |
208
208
  | /report-bug | Send to dev (`/fix-bug {BUG-ID}`); if coverage gap → `/propose-scenario {UC-ID}` |
@@ -445,13 +445,13 @@ Suggest the logical next command based on workflow phase:
445
445
  | /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
446
446
  | /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
447
447
  | /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
448
- | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/generate-tests {UC-ID}` |
449
- | /generate-tests | `/run-tests {UC-ID}` |
450
- | /run-tests (passing) | `/review-code {UC-ID}` |
451
- | /run-tests (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
452
- | /review-code | `/smoke-test {UC-ID}` or create PR |
453
- | /smoke-test | Create PR and link to ticket |
454
- | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/generate-tests {UC-ID}`; all OK → create PR |
448
+ | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
449
+ | /dev-gen-test | `/dev-run-test {UC-ID}` |
450
+ | /dev-run-test (passing) | `/review-code {UC-ID}` |
451
+ | /dev-run-test (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
452
+ | /review-code | `/dev-smoke-test {UC-ID}` or create PR |
453
+ | /dev-smoke-test | Create PR and link to ticket |
454
+ | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; all OK → create PR |
455
455
  | /fix-bug | Create PR and link to ticket |
456
456
  | /debug | `/fix-bug {ticket-id}` if fix needed |
457
457
  | /report-bug | Send to dev (`/fix-bug {BUG-ID}`); if coverage gap → `/propose-scenario {UC-ID}` |
@@ -142,13 +142,13 @@ Suggest the logical next command based on workflow phase:
142
142
  | /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
143
143
  | /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
144
144
  | /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
145
- | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/generate-tests {UC-ID}` |
146
- | /generate-tests | `/run-tests {UC-ID}` |
147
- | /run-tests (passing) | `/review-code {UC-ID}` |
148
- | /run-tests (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
149
- | /review-code | `/smoke-test {UC-ID}` or create PR |
150
- | /smoke-test | Create PR and link to ticket |
151
- | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/generate-tests {UC-ID}`; all OK → create PR |
145
+ | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
146
+ | /dev-gen-test | `/dev-run-test {UC-ID}` |
147
+ | /dev-run-test (passing) | `/review-code {UC-ID}` |
148
+ | /dev-run-test (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
149
+ | /review-code | `/dev-smoke-test {UC-ID}` or create PR |
150
+ | /dev-smoke-test | Create PR and link to ticket |
151
+ | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; all OK → create PR |
152
152
  | /fix-bug | Create PR and link to ticket |
153
153
  | /debug | `/fix-bug {ticket-id}` if fix needed |
154
154
  | /report-bug | Send to dev (`/fix-bug {BUG-ID}`); if coverage gap → `/propose-scenario {UC-ID}` |
@@ -213,13 +213,13 @@ Suggest the logical next command based on workflow phase:
213
213
  | /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
214
214
  | /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
215
215
  | /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
216
- | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/generate-tests {UC-ID}` |
217
- | /generate-tests | `/run-tests {UC-ID}` |
218
- | /run-tests (passing) | `/review-code {UC-ID}` |
219
- | /run-tests (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
220
- | /review-code | `/smoke-test {UC-ID}` or create PR |
221
- | /smoke-test | Create PR and link to ticket |
222
- | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/generate-tests {UC-ID}`; all OK → create PR |
216
+ | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
217
+ | /dev-gen-test | `/dev-run-test {UC-ID}` |
218
+ | /dev-run-test (passing) | `/review-code {UC-ID}` |
219
+ | /dev-run-test (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
220
+ | /review-code | `/dev-smoke-test {UC-ID}` or create PR |
221
+ | /dev-smoke-test | Create PR and link to ticket |
222
+ | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; all OK → create PR |
223
223
  | /fix-bug | Create PR and link to ticket |
224
224
  | /debug | `/fix-bug {ticket-id}` if fix needed |
225
225
  | /report-bug | Send to dev (`/fix-bug {BUG-ID}`); if coverage gap → `/propose-scenario {UC-ID}` |
@@ -350,13 +350,13 @@ Suggest the logical next command based on workflow phase:
350
350
  | /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
351
351
  | /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
352
352
  | /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
353
- | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/generate-tests {UC-ID}` |
354
- | /generate-tests | `/run-tests {UC-ID}` |
355
- | /run-tests (passing) | `/review-code {UC-ID}` |
356
- | /run-tests (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
357
- | /review-code | `/smoke-test {UC-ID}` or create PR |
358
- | /smoke-test | Create PR and link to ticket |
359
- | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/generate-tests {UC-ID}`; all OK → create PR |
353
+ | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
354
+ | /dev-gen-test | `/dev-run-test {UC-ID}` |
355
+ | /dev-run-test (passing) | `/review-code {UC-ID}` |
356
+ | /dev-run-test (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
357
+ | /review-code | `/dev-smoke-test {UC-ID}` or create PR |
358
+ | /dev-smoke-test | Create PR and link to ticket |
359
+ | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; all OK → create PR |
360
360
  | /fix-bug | Create PR and link to ticket |
361
361
  | /debug | `/fix-bug {ticket-id}` if fix needed |
362
362
  | /report-bug | Send to dev (`/fix-bug {BUG-ID}`); if coverage gap → `/propose-scenario {UC-ID}` |
@@ -1,14 +1,14 @@
1
1
  ---
2
- description: Generates unit and integration tests from BDD specs, runs the test suite and reports results, or smoke-tests live API endpoints on a running service. Trigger when: "/generate-tests", "/run-tests", "/smoke-test", "tạo test", "viết test", "chạy test", "generate tests", "run tests", "test kết quả", "smoke test", "test API", "kiểm tra endpoint đang chạy".
2
+ description: Generates unit and integration tests from BDD specs, runs the test suite and reports results, or dev-smoke-tests live API endpoints on a running service. Trigger when: "/dev-gen-test", "/dev-run-test", "/dev-smoke-test", "tạo test", "viết test", "chạy test", "generate tests", "run tests", "test kết quả", "smoke test", "test API", "kiểm tra endpoint đang chạy".
3
3
  ---
4
4
 
5
5
  # Test Skills — Generate, Run & Smoke Test
6
6
 
7
- This skill handles three commands: `/generate-tests`, `/run-tests`, and `/smoke-test`.
7
+ This skill handles three commands: `/dev-gen-test`, `/dev-run-test`, and `/dev-smoke-test`.
8
8
 
9
9
  ---
10
10
 
11
- ## /generate-tests — Generate Unit & Integration Tests
11
+ ## /dev-gen-test — Generate Unit & Integration Tests
12
12
 
13
13
  ### Gate
14
14
 
@@ -212,7 +212,7 @@ src/test/{language}/{package}/
212
212
  ### Output
213
213
 
214
214
  ```
215
- /generate-tests Complete — {UC-ID}:
215
+ /dev-gen-test Complete — {UC-ID}:
216
216
  ✅ service/{Service}Test.{ext} ({M} tests)
217
217
  ✅ facade/{Facade}Test.{ext} ({M} tests)
218
218
  ✅ controller/{Controller}Test.{ext} ({M} tests)
@@ -256,13 +256,13 @@ Suggest the logical next command based on workflow phase:
256
256
  | /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
257
257
  | /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
258
258
  | /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
259
- | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/generate-tests {UC-ID}` |
260
- | /generate-tests | `/run-tests {UC-ID}` |
261
- | /run-tests (passing) | `/review-code {UC-ID}` |
262
- | /run-tests (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
263
- | /review-code | `/smoke-test {UC-ID}` or create PR |
264
- | /smoke-test | Create PR and link to ticket |
265
- | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/generate-tests {UC-ID}`; all OK → create PR |
259
+ | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
260
+ | /dev-gen-test | `/dev-run-test {UC-ID}` |
261
+ | /dev-run-test (passing) | `/review-code {UC-ID}` |
262
+ | /dev-run-test (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
263
+ | /review-code | `/dev-smoke-test {UC-ID}` or create PR |
264
+ | /dev-smoke-test | Create PR and link to ticket |
265
+ | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; all OK → create PR |
266
266
  | /fix-bug | Create PR and link to ticket |
267
267
  | /debug | `/fix-bug {ticket-id}` if fix needed |
268
268
  | /report-bug | Send to dev (`/fix-bug {BUG-ID}`); if coverage gap → `/propose-scenario {UC-ID}` |
@@ -282,7 +282,7 @@ Next : {suggested command with example arguments}
282
282
 
283
283
  ---
284
284
 
285
- ## /run-tests — Run Tests & Report Results
285
+ ## /dev-run-test — Run Tests & Report Results
286
286
 
287
287
  ### Gate
288
288
 
@@ -362,7 +362,7 @@ If `services` section is present:
362
362
 
363
363
  **2. Route to service** — if active domain matches a key in `services`:
364
364
  - Override `paths.specs_dir` → `services.{domain}.specs_dir`
365
- - Override `paths.tech_docs_dir` → `services.{domain}.tech_docs_dir`
365
+ - 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.
366
366
  - Store `active_service` = `services.{domain}.path`
367
367
  - Store `active_service_module` = `services.{domain}.module`
368
368
  - If service has its own `module` → use it as `active_module` (overrides `tech_stack.module`)
@@ -374,13 +374,14 @@ If `services` section is present:
374
374
  **4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
375
375
  - Override `paths.prd_dir` → `{spec_source}/specs/prd`
376
376
  - Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
377
+ - 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.)*
377
378
  - Override `paths.domain_knowledge_dir` → `{spec_source}/specs/domain-knowledge`
378
379
  - Override `paths.business_dictionary` → `{spec_source}/specs/domain-knowledge/business-dictionary.md`
379
380
  - Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
380
381
  - Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
381
382
  - Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
382
383
 
383
- > **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.
384
+ > **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.
384
385
 
385
386
  ---
386
387
 
@@ -404,7 +405,7 @@ When `active_service` has been resolved to a real path in Step 1.5 (e.g., `user-
404
405
  | `paths.specs_dir` | `{active_service}/{service paths.specs_dir}` (if set in service config, else keep Step 1.5 override) |
405
406
 
406
407
  **3. Store** `service_root = {active_service}` as the working directory anchor for all downstream commands:
407
- - Shell commands (`/run-tests`, `/generate-tests`) run **from within** `service_root`
408
+ - Shell commands (`/dev-run-test`, `/dev-gen-test`) run **from within** `service_root`
408
409
  - File write operations (test files, trace TSVs) use paths **relative to** `service_root`
409
410
 
410
411
  **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).
@@ -497,7 +498,7 @@ active_module = tech_stack.module (e.g. "java-spring", "react", "flutter")
497
498
 
498
499
  If `tech_stack.module` is blank or not recognized → set `platform_type = "unknown"` and flag as ⚠️ in the Step 7 recap.
499
500
 
500
- 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).
501
+ 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).
501
502
 
502
503
  ---
503
504
 
@@ -602,7 +603,7 @@ Read stack trace and analyze:
602
603
  ### Output
603
604
 
604
605
  ```
605
- /run-tests Report — {service}
606
+ /dev-run-test Report — {service}
606
607
  Run at: {datetime}
607
608
 
608
609
  ## Summary
@@ -656,13 +657,13 @@ Suggest the logical next command based on workflow phase:
656
657
  | /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
657
658
  | /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
658
659
  | /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
659
- | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/generate-tests {UC-ID}` |
660
- | /generate-tests | `/run-tests {UC-ID}` |
661
- | /run-tests (passing) | `/review-code {UC-ID}` |
662
- | /run-tests (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
663
- | /review-code | `/smoke-test {UC-ID}` or create PR |
664
- | /smoke-test | Create PR and link to ticket |
665
- | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/generate-tests {UC-ID}`; all OK → create PR |
660
+ | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
661
+ | /dev-gen-test | `/dev-run-test {UC-ID}` |
662
+ | /dev-run-test (passing) | `/review-code {UC-ID}` |
663
+ | /dev-run-test (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
664
+ | /review-code | `/dev-smoke-test {UC-ID}` or create PR |
665
+ | /dev-smoke-test | Create PR and link to ticket |
666
+ | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; all OK → create PR |
666
667
  | /fix-bug | Create PR and link to ticket |
667
668
  | /debug | `/fix-bug {ticket-id}` if fix needed |
668
669
  | /report-bug | Send to dev (`/fix-bug {BUG-ID}`); if coverage gap → `/propose-scenario {UC-ID}` |
@@ -682,10 +683,10 @@ Next : {suggested command with example arguments}
682
683
 
683
684
  ---
684
685
 
685
- ## /smoke-test — Test Live API Endpoints
686
+ ## /dev-smoke-test — Test Live API Endpoints
686
687
 
687
688
  Use when the service is **already running** to verify endpoints work correctly.
688
- Different from `/run-tests` (which runs unit/integration tests without a live server).
689
+ Different from `/dev-run-test` (which runs unit/integration tests without a live server).
689
690
 
690
691
  ### Phase 1 — Find Service URL
691
692
 
@@ -765,7 +766,7 @@ If `services` section is present:
765
766
 
766
767
  **2. Route to service** — if active domain matches a key in `services`:
767
768
  - Override `paths.specs_dir` → `services.{domain}.specs_dir`
768
- - Override `paths.tech_docs_dir` → `services.{domain}.tech_docs_dir`
769
+ - 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.
769
770
  - Store `active_service` = `services.{domain}.path`
770
771
  - Store `active_service_module` = `services.{domain}.module`
771
772
  - If service has its own `module` → use it as `active_module` (overrides `tech_stack.module`)
@@ -777,13 +778,14 @@ If `services` section is present:
777
778
  **4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
778
779
  - Override `paths.prd_dir` → `{spec_source}/specs/prd`
779
780
  - Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
781
+ - 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.)*
780
782
  - Override `paths.domain_knowledge_dir` → `{spec_source}/specs/domain-knowledge`
781
783
  - Override `paths.business_dictionary` → `{spec_source}/specs/domain-knowledge/business-dictionary.md`
782
784
  - Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
783
785
  - Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
784
786
  - Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
785
787
 
786
- > **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.
788
+ > **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.
787
789
 
788
790
  ---
789
791
 
@@ -807,7 +809,7 @@ When `active_service` has been resolved to a real path in Step 1.5 (e.g., `user-
807
809
  | `paths.specs_dir` | `{active_service}/{service paths.specs_dir}` (if set in service config, else keep Step 1.5 override) |
808
810
 
809
811
  **3. Store** `service_root = {active_service}` as the working directory anchor for all downstream commands:
810
- - Shell commands (`/run-tests`, `/generate-tests`) run **from within** `service_root`
812
+ - Shell commands (`/dev-run-test`, `/dev-gen-test`) run **from within** `service_root`
811
813
  - File write operations (test files, trace TSVs) use paths **relative to** `service_root`
812
814
 
813
815
  **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).
@@ -900,7 +902,7 @@ active_module = tech_stack.module (e.g. "java-spring", "react", "flutter")
900
902
 
901
903
  If `tech_stack.module` is blank or not recognized → set `platform_type = "unknown"` and flag as ⚠️ in the Step 7 recap.
902
904
 
903
- 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).
905
+ 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).
904
906
 
905
907
  ---
906
908
 
@@ -1022,7 +1024,7 @@ tail -n 100 {LOG_FILE_PATH}
1022
1024
  ### Output
1023
1025
 
1024
1026
  ```
1025
- /smoke-test Report — {UC-ID}
1027
+ /dev-smoke-test Report — {UC-ID}
1026
1028
  Tested at: {datetime}
1027
1029
  Base URL: http://localhost:{port}
1028
1030
 
@@ -1074,13 +1076,13 @@ Suggest the logical next command based on workflow phase:
1074
1076
  | /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
1075
1077
  | /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
1076
1078
  | /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
1077
- | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/generate-tests {UC-ID}` |
1078
- | /generate-tests | `/run-tests {UC-ID}` |
1079
- | /run-tests (passing) | `/review-code {UC-ID}` |
1080
- | /run-tests (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
1081
- | /review-code | `/smoke-test {UC-ID}` or create PR |
1082
- | /smoke-test | Create PR and link to ticket |
1083
- | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/generate-tests {UC-ID}`; all OK → create PR |
1079
+ | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
1080
+ | /dev-gen-test | `/dev-run-test {UC-ID}` |
1081
+ | /dev-run-test (passing) | `/review-code {UC-ID}` |
1082
+ | /dev-run-test (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
1083
+ | /review-code | `/dev-smoke-test {UC-ID}` or create PR |
1084
+ | /dev-smoke-test | Create PR and link to ticket |
1085
+ | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; all OK → create PR |
1084
1086
  | /fix-bug | Create PR and link to ticket |
1085
1087
  | /debug | `/fix-bug {ticket-id}` if fix needed |
1086
1088
  | /report-bug | Send to dev (`/fix-bug {BUG-ID}`); if coverage gap → `/propose-scenario {UC-ID}` |
@@ -1,14 +1,14 @@
1
1
  ---
2
- description: Generates unit and integration tests from BDD specs, runs the test suite and reports results, or smoke-tests live API endpoints on a running service. Trigger when: "/generate-tests", "/run-tests", "/smoke-test", "tạo test", "viết test", "chạy test", "generate tests", "run tests", "test kết quả", "smoke test", "test API", "kiểm tra endpoint đang chạy".
2
+ description: Generates unit and integration tests from BDD specs, runs the test suite and reports results, or dev-smoke-tests live API endpoints on a running service. Trigger when: "/dev-gen-test", "/dev-run-test", "/dev-smoke-test", "tạo test", "viết test", "chạy test", "generate tests", "run tests", "test kết quả", "smoke test", "test API", "kiểm tra endpoint đang chạy".
3
3
  ---
4
4
 
5
5
  # Test Skills — Generate, Run & Smoke Test
6
6
 
7
- This skill handles three commands: `/generate-tests`, `/run-tests`, and `/smoke-test`.
7
+ This skill handles three commands: `/dev-gen-test`, `/dev-run-test`, and `/dev-smoke-test`.
8
8
 
9
9
  ---
10
10
 
11
- ## /generate-tests — Generate Unit & Integration Tests
11
+ ## /dev-gen-test — Generate Unit & Integration Tests
12
12
 
13
13
  ### Gate
14
14
 
@@ -131,7 +131,7 @@ src/test/{language}/{package}/
131
131
  ### Output
132
132
 
133
133
  ```
134
- /generate-tests Complete — {UC-ID}:
134
+ /dev-gen-test Complete — {UC-ID}:
135
135
  ✅ service/{Service}Test.{ext} ({M} tests)
136
136
  ✅ facade/{Facade}Test.{ext} ({M} tests)
137
137
  ✅ controller/{Controller}Test.{ext} ({M} tests)
@@ -141,7 +141,7 @@ src/test/{language}/{package}/
141
141
 
142
142
  ---
143
143
 
144
- ## /run-tests — Run Tests & Report Results
144
+ ## /dev-run-test — Run Tests & Report Results
145
145
 
146
146
  ### Gate
147
147
 
@@ -190,7 +190,7 @@ Read stack trace and analyze:
190
190
  ### Output
191
191
 
192
192
  ```
193
- /run-tests Report — {service}
193
+ /dev-run-test Report — {service}
194
194
  Run at: {datetime}
195
195
 
196
196
  ## Summary
@@ -210,10 +210,10 @@ Duration: {X}s
210
210
 
211
211
  ---
212
212
 
213
- ## /smoke-test — Test Live API Endpoints
213
+ ## /dev-smoke-test — Test Live API Endpoints
214
214
 
215
215
  Use when the service is **already running** to verify endpoints work correctly.
216
- Different from `/run-tests` (which runs unit/integration tests without a live server).
216
+ Different from `/dev-run-test` (which runs unit/integration tests without a live server).
217
217
 
218
218
  ### Phase 1 — Find Service URL
219
219
 
@@ -279,7 +279,7 @@ tail -n 100 {LOG_FILE_PATH}
279
279
  ### Output
280
280
 
281
281
  ```
282
- /smoke-test Report — {UC-ID}
282
+ /dev-smoke-test Report — {UC-ID}
283
283
  Tested at: {datetime}
284
284
  Base URL: http://localhost:{port}
285
285
 
@@ -54,7 +54,7 @@ If `lessons_path` does not exist, create it with this header first:
54
54
  | code-gen | /generate-code output |
55
55
  | bdd | /generate-bdd output |
56
56
  | tech-docs | /generate-tech-docs output |
57
- | tests | /generate-tests output |
57
+ | tests | /dev-gen-test output |
58
58
  | prd | /generate-prd, /refine-prd output |
59
59
  | general | every command |
60
60
 
@@ -74,7 +74,7 @@ If `services` section is present:
74
74
 
75
75
  **2. Route to service** — if active domain matches a key in `services`:
76
76
  - Override `paths.specs_dir` → `services.{domain}.specs_dir`
77
- - Override `paths.tech_docs_dir` → `services.{domain}.tech_docs_dir`
77
+ - 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.
78
78
  - Store `active_service` = `services.{domain}.path`
79
79
  - Store `active_service_module` = `services.{domain}.module`
80
80
  - If service has its own `module` → use it as `active_module` (overrides `tech_stack.module`)
@@ -86,13 +86,14 @@ If `services` section is present:
86
86
  **4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
87
87
  - Override `paths.prd_dir` → `{spec_source}/specs/prd`
88
88
  - Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
89
+ - 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.)*
89
90
  - Override `paths.domain_knowledge_dir` → `{spec_source}/specs/domain-knowledge`
90
91
  - Override `paths.business_dictionary` → `{spec_source}/specs/domain-knowledge/business-dictionary.md`
91
92
  - Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
92
93
  - Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
93
94
  - Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
94
95
 
95
- > **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.
96
+ > **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.
96
97
 
97
98
  ---
98
99
 
@@ -116,7 +117,7 @@ When `active_service` has been resolved to a real path in Step 1.5 (e.g., `user-
116
117
  | `paths.specs_dir` | `{active_service}/{service paths.specs_dir}` (if set in service config, else keep Step 1.5 override) |
117
118
 
118
119
  **3. Store** `service_root = {active_service}` as the working directory anchor for all downstream commands:
119
- - Shell commands (`/run-tests`, `/generate-tests`) run **from within** `service_root`
120
+ - Shell commands (`/dev-run-test`, `/dev-gen-test`) run **from within** `service_root`
120
121
  - File write operations (test files, trace TSVs) use paths **relative to** `service_root`
121
122
 
122
123
  **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).
@@ -209,7 +210,7 @@ active_module = tech_stack.module (e.g. "java-spring", "react", "flutter")
209
210
 
210
211
  If `tech_stack.module` is blank or not recognized → set `platform_type = "unknown"` and flag as ⚠️ in the Step 7 recap.
211
212
 
212
- 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).
213
+ 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).
213
214
 
214
215
  ---
215
216
 
@@ -36,13 +36,13 @@ Suggest the logical next command based on workflow phase:
36
36
  | /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
37
37
  | /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
38
38
  | /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
39
- | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/generate-tests {UC-ID}` |
40
- | /generate-tests | `/run-tests {UC-ID}` |
41
- | /run-tests (passing) | `/review-code {UC-ID}` |
42
- | /run-tests (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
43
- | /review-code | `/smoke-test {UC-ID}` or create PR |
44
- | /smoke-test | Create PR and link to ticket |
45
- | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/generate-tests {UC-ID}`; all OK → create PR |
39
+ | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
40
+ | /dev-gen-test | `/dev-run-test {UC-ID}` |
41
+ | /dev-run-test (passing) | `/review-code {UC-ID}` |
42
+ | /dev-run-test (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
43
+ | /review-code | `/dev-smoke-test {UC-ID}` or create PR |
44
+ | /dev-smoke-test | Create PR and link to ticket |
45
+ | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; all OK → create PR |
46
46
  | /fix-bug | Create PR and link to ticket |
47
47
  | /debug | `/fix-bug {ticket-id}` if fix needed |
48
48
  | /report-bug | Send to dev (`/fix-bug {BUG-ID}`); if coverage gap → `/propose-scenario {UC-ID}` |