@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
@@ -167,7 +167,7 @@ If `services` section is present:
167
167
 
168
168
  **2. Route to service** — if active domain matches a key in `services`:
169
169
  - Override `paths.specs_dir` → `services.{domain}.specs_dir`
170
- - Override `paths.tech_docs_dir` → `services.{domain}.tech_docs_dir`
170
+ - 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.
171
171
  - Store `active_service` = `services.{domain}.path`
172
172
  - Store `active_service_module` = `services.{domain}.module`
173
173
  - If service has its own `module` → use it as `active_module` (overrides `tech_stack.module`)
@@ -179,7 +179,7 @@ If `services` section is present:
179
179
  **4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
180
180
  - Override `paths.prd_dir` → `{spec_source}/specs/prd`
181
181
  - Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
182
- - Override `paths.tech_docs_dir` → `{spec_source}/specs/tech-docs` — **only if step 2 did not already route it to a service** (multi-service umbrellas keep per-service tech-docs). This publishes the BE-authored API contract into the shared spec repo so FE/App can read it via the spec submodule at `/generate-code --phase=integration`.
182
+ - 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.)*
183
183
  - Override `paths.domain_knowledge_dir` → `{spec_source}/specs/domain-knowledge`
184
184
  - Override `paths.business_dictionary` → `{spec_source}/specs/domain-knowledge/business-dictionary.md`
185
185
  - Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
@@ -210,7 +210,7 @@ When `active_service` has been resolved to a real path in Step 1.5 (e.g., `user-
210
210
  | `paths.specs_dir` | `{active_service}/{service paths.specs_dir}` (if set in service config, else keep Step 1.5 override) |
211
211
 
212
212
  **3. Store** `service_root = {active_service}` as the working directory anchor for all downstream commands:
213
- - Shell commands (`/run-tests`, `/generate-tests`) run **from within** `service_root`
213
+ - Shell commands (`/dev-run-test`, `/dev-gen-test`) run **from within** `service_root`
214
214
  - File write operations (test files, trace TSVs) use paths **relative to** `service_root`
215
215
 
216
216
  **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).
@@ -303,7 +303,7 @@ active_module = tech_stack.module (e.g. "java-spring", "react", "flutter")
303
303
 
304
304
  If `tech_stack.module` is blank or not recognized → set `platform_type = "unknown"` and flag as ⚠️ in the Step 7 recap.
305
305
 
306
- 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).
306
+ 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).
307
307
 
308
308
  ---
309
309
 
@@ -616,13 +616,13 @@ Suggest the logical next command based on workflow phase:
616
616
  | /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
617
617
  | /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
618
618
  | /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
619
- | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/generate-tests {UC-ID}` |
620
- | /generate-tests | `/run-tests {UC-ID}` |
621
- | /run-tests (passing) | `/review-code {UC-ID}` |
622
- | /run-tests (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
623
- | /review-code | `/smoke-test {UC-ID}` or create PR |
624
- | /smoke-test | Create PR and link to ticket |
625
- | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/generate-tests {UC-ID}`; all OK → create PR |
619
+ | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
620
+ | /dev-gen-test | `/dev-run-test {UC-ID}` |
621
+ | /dev-run-test (passing) | `/review-code {UC-ID}` |
622
+ | /dev-run-test (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
623
+ | /review-code | `/dev-smoke-test {UC-ID}` or create PR |
624
+ | /dev-smoke-test | Create PR and link to ticket |
625
+ | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; all OK → create PR |
626
626
  | /fix-bug | Create PR and link to ticket |
627
627
  | /debug | `/fix-bug {ticket-id}` if fix needed |
628
628
  | /report-bug | Send to dev (`/fix-bug {BUG-ID}`); if coverage gap → `/propose-scenario {UC-ID}` |
@@ -408,13 +408,13 @@ Suggest the logical next command based on workflow phase:
408
408
  | /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
409
409
  | /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
410
410
  | /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
411
- | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/generate-tests {UC-ID}` |
412
- | /generate-tests | `/run-tests {UC-ID}` |
413
- | /run-tests (passing) | `/review-code {UC-ID}` |
414
- | /run-tests (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
415
- | /review-code | `/smoke-test {UC-ID}` or create PR |
416
- | /smoke-test | Create PR and link to ticket |
417
- | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/generate-tests {UC-ID}`; all OK → create PR |
411
+ | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
412
+ | /dev-gen-test | `/dev-run-test {UC-ID}` |
413
+ | /dev-run-test (passing) | `/review-code {UC-ID}` |
414
+ | /dev-run-test (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
415
+ | /review-code | `/dev-smoke-test {UC-ID}` or create PR |
416
+ | /dev-smoke-test | Create PR and link to ticket |
417
+ | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; all OK → create PR |
418
418
  | /fix-bug | Create PR and link to ticket |
419
419
  | /debug | `/fix-bug {ticket-id}` if fix needed |
420
420
  | /report-bug | Send to dev (`/fix-bug {BUG-ID}`); if coverage gap → `/propose-scenario {UC-ID}` |
@@ -248,13 +248,15 @@ For each entry in `services[]`:
248
248
 
249
249
  ## Step 4 — Check `.gitignore`
250
250
 
251
- Check if `.trace/` appears in the umbrella root's `.gitignore` (or `.git/info/exclude`).
251
+ Check the generated Living Docs mirrors are gitignored:
252
+ - `.trace/` in the current repo's `.gitignore` (or `.git/info/exclude`)
253
+ - `.living-docs/` in the **specs module's** `.gitignore` (when `setup.spec_source` is set)
252
254
 
253
- If missing:
255
+ If either is missing:
254
256
  ```
255
- ⚠️ .trace/ is not in umbrella .gitignore
256
- Add it to prevent accidentally committing generated trace artifacts:
257
+ ⚠️ Living Docs mirrors not gitignored they are generated, never commit them:
257
258
  echo ".trace/" >> .gitignore
259
+ echo ".living-docs/" >> {spec_source}/.gitignore # specs module (if spec_source set)
258
260
  ```
259
261
 
260
262
  ---
@@ -263,20 +265,21 @@ If missing:
263
265
 
264
266
  *Skip if `services` is empty.*
265
267
 
266
- For each service in `services[]`:
267
- 1. Check if `{service.path}/.trace/` directory exists and contains `.tsv` files
268
- 2. If yes copy TSVs to `{umbrella_root}/.trace/{service-name}/` (create dir if needed)
268
+ **Resolve the Living Docs home (same rule as `/validate-traces`):**
269
+ - `living_docs_dir` = `{spec_source}/.living-docs` if `setup.spec_source` is set, else `.living-docs` at umbrella root. *(The specs module is mounted inside every service workspace, so the panel resolves it even when a dev opens a single service submodule.)*
270
+ - `panel_mirror` = `./.trace` at the current workspace root.
269
271
 
270
- After copying all services, write merged `{umbrella_root}/.trace/trace-report.json`:
271
- - Aggregate data from each service's `.trace/` TSVs
272
- - Include `"service"` field per scenario row
273
- - Recalculate summary totals
272
+ 1. For each service in `services[]`: if `{service.path}/.trace/` has `.tsv` files → copy them to `{living_docs_dir}/{service-name}/` (create dir if needed).
273
+ 2. Write merged `{living_docs_dir}/trace-report.json`:
274
+ - Aggregate each service's `.trace/` TSVs, add `"service"` field per row, recalc summary totals.
275
+ 3. **Mirror to the panel location:** copy `{living_docs_dir}/trace-report.json` (+ namespaced TSVs) → `{panel_mirror}/` so the panel in the currently-open repo is non-empty. Skip if `panel_mirror` already equals `living_docs_dir`.
274
276
 
275
277
  Print sync result:
276
278
  ```
277
- Living Docs → .trace/ synced
279
+ Living Docs → {living_docs_dir}/ synced (canonical, specs module)
278
280
  {service-name}: {N} TSVs
279
281
  trace-report.json: {total} scenarios across {S} services
282
+ Panel mirror → {panel_mirror}/ (current workspace)
280
283
  ```
281
284
 
282
285
  If no `.trace/` dirs found → `Living Docs: no trace data yet — run /generate-bdd then /generate-code first.`
@@ -334,13 +337,13 @@ Suggest the logical next command based on workflow phase:
334
337
  | /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
335
338
  | /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
336
339
  | /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
337
- | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/generate-tests {UC-ID}` |
338
- | /generate-tests | `/run-tests {UC-ID}` |
339
- | /run-tests (passing) | `/review-code {UC-ID}` |
340
- | /run-tests (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
341
- | /review-code | `/smoke-test {UC-ID}` or create PR |
342
- | /smoke-test | Create PR and link to ticket |
343
- | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/generate-tests {UC-ID}`; all OK → create PR |
340
+ | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
341
+ | /dev-gen-test | `/dev-run-test {UC-ID}` |
342
+ | /dev-run-test (passing) | `/review-code {UC-ID}` |
343
+ | /dev-run-test (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
344
+ | /review-code | `/dev-smoke-test {UC-ID}` or create PR |
345
+ | /dev-smoke-test | Create PR and link to ticket |
346
+ | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; all OK → create PR |
344
347
  | /fix-bug | Create PR and link to ticket |
345
348
  | /debug | `/fix-bug {ticket-id}` if fix needed |
346
349
  | /report-bug | Send to dev (`/fix-bug {BUG-ID}`); if coverage gap → `/propose-scenario {UC-ID}` |
@@ -385,7 +388,7 @@ Service Configs
385
388
  ✅ user-service — test: mvn test | build: mvn compile
386
389
  ✅ order-service — test: mvn test | build: mvn compile
387
390
  ⚠️ payment-service — .agent/project-context.yaml missing
388
- → create it so /run-tests works correctly
391
+ → create it so /dev-run-test works correctly
389
392
 
390
393
  .gitignore
391
394
  ✅ .trace/ is gitignored
@@ -163,13 +163,13 @@ Suggest the logical next command based on workflow phase:
163
163
  | /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
164
164
  | /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
165
165
  | /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
166
- | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/generate-tests {UC-ID}` |
167
- | /generate-tests | `/run-tests {UC-ID}` |
168
- | /run-tests (passing) | `/review-code {UC-ID}` |
169
- | /run-tests (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
170
- | /review-code | `/smoke-test {UC-ID}` or create PR |
171
- | /smoke-test | Create PR and link to ticket |
172
- | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/generate-tests {UC-ID}`; all OK → create PR |
166
+ | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
167
+ | /dev-gen-test | `/dev-run-test {UC-ID}` |
168
+ | /dev-run-test (passing) | `/review-code {UC-ID}` |
169
+ | /dev-run-test (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
170
+ | /review-code | `/dev-smoke-test {UC-ID}` or create PR |
171
+ | /dev-smoke-test | Create PR and link to ticket |
172
+ | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; all OK → create PR |
173
173
  | /fix-bug | Create PR and link to ticket |
174
174
  | /debug | `/fix-bug {ticket-id}` if fix needed |
175
175
  | /report-bug | Send to dev (`/fix-bug {BUG-ID}`); if coverage gap → `/propose-scenario {UC-ID}` |
@@ -165,7 +165,7 @@ If `services` section is present:
165
165
 
166
166
  **2. Route to service** — if active domain matches a key in `services`:
167
167
  - Override `paths.specs_dir` → `services.{domain}.specs_dir`
168
- - Override `paths.tech_docs_dir` → `services.{domain}.tech_docs_dir`
168
+ - 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.
169
169
  - Store `active_service` = `services.{domain}.path`
170
170
  - Store `active_service_module` = `services.{domain}.module`
171
171
  - If service has its own `module` → use it as `active_module` (overrides `tech_stack.module`)
@@ -177,7 +177,7 @@ If `services` section is present:
177
177
  **4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
178
178
  - Override `paths.prd_dir` → `{spec_source}/specs/prd`
179
179
  - Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
180
- - Override `paths.tech_docs_dir` → `{spec_source}/specs/tech-docs` — **only if step 2 did not already route it to a service** (multi-service umbrellas keep per-service tech-docs). This publishes the BE-authored API contract into the shared spec repo so FE/App can read it via the spec submodule at `/generate-code --phase=integration`.
180
+ - 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.)*
181
181
  - Override `paths.domain_knowledge_dir` → `{spec_source}/specs/domain-knowledge`
182
182
  - Override `paths.business_dictionary` → `{spec_source}/specs/domain-knowledge/business-dictionary.md`
183
183
  - Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
@@ -208,7 +208,7 @@ When `active_service` has been resolved to a real path in Step 1.5 (e.g., `user-
208
208
  | `paths.specs_dir` | `{active_service}/{service paths.specs_dir}` (if set in service config, else keep Step 1.5 override) |
209
209
 
210
210
  **3. Store** `service_root = {active_service}` as the working directory anchor for all downstream commands:
211
- - Shell commands (`/run-tests`, `/generate-tests`) run **from within** `service_root`
211
+ - Shell commands (`/dev-run-test`, `/dev-gen-test`) run **from within** `service_root`
212
212
  - File write operations (test files, trace TSVs) use paths **relative to** `service_root`
213
213
 
214
214
  **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).
@@ -301,7 +301,7 @@ active_module = tech_stack.module (e.g. "java-spring", "react", "flutter")
301
301
 
302
302
  If `tech_stack.module` is blank or not recognized → set `platform_type = "unknown"` and flag as ⚠️ in the Step 7 recap.
303
303
 
304
- 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).
304
+ 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).
305
305
 
306
306
  ---
307
307
 
@@ -376,8 +376,12 @@ Check whether `services` array exists in `project-context.yaml`.
376
376
  - Use `services[N].trace_dir` if explicitly set
377
377
  - Otherwise default to `{services[N].path}/.trace`
378
378
  - Set `all_trace_dirs = [ dir1, dir2, ... ]` — one per service
379
- - Set `umbrella_root_trace = ".trace"` (at umbrella workspace root)
380
379
  - Step 1 will read TSVs from ALL dirs in `all_trace_dirs`, tagged by service name
380
+ - **Resolve the Living Docs home (canonical report location):**
381
+ - If `setup.spec_source` is set → `living_docs_dir = {spec_source}/.living-docs`
382
+ *(the shared specs module — mounted inside every service/umbrella workspace, so the panel resolves it no matter which submodule the dev is standing in)*
383
+ - Else (umbrella without a separate spec repo) → `living_docs_dir = .living-docs` at umbrella root
384
+ - **Resolve the panel mirror:** `panel_mirror = ./.trace` at the **current workspace root** (wherever this command runs). The VS Code panel reads `.trace/trace-report.json` from the open workspace — writing the merged report here is what makes the view non-empty when a dev opens a service submodule directly.
381
385
 
382
386
  **If no `services` key (single-service mode):**
383
387
  - Set `all_trace_dirs = [ {paths.trace_dir} ]`
@@ -440,6 +444,7 @@ If code was generated from an older revision → flag `TECHDOC_DRIFT`.
440
444
  *Skip this step if no TSV files existed (handled by Step 1 no-TSV path).*
441
445
 
442
446
  For each `.tsv` file processed: write updated `spec_ver`, `status`, `last_updated` back to disk.
447
+ Do **not** modify `dev_selftest` or `dev_selftest_at` — those are owned by `/dev-run-test`; this command only reads them for the report.
443
448
 
444
449
  ### Step 7 — Compute dashboard aggregates
445
450
 
@@ -455,6 +460,11 @@ test_coverage = rows where test_count > 0 / total_scs
455
460
  drift_count = rows where status == DRIFT
456
461
  untracked_count = rows where status == UNTRACKED
457
462
  gap_count = rows where status == GAP
463
+ dev_selftest_passing = rows where dev_selftest == pass
464
+ dev_selftest_failing = rows where dev_selftest == fail
465
+ dev_selftest_not_run = rows where dev_selftest in (not_run, —)
466
+ # NOTE: this is the DEV self-check signal (did the dev run their own smoke tests),
467
+ # NOT official QC/dev-team coverage — keep it labeled as such on the dashboard.
458
468
  tech_docs_count = count .md files in {paths.tech_docs_dir}/{domain}/
459
469
  ```
460
470
 
@@ -482,6 +492,9 @@ Schema:
482
492
  "drift_count": 0,
483
493
  "gap_count": 0,
484
494
  "untracked_count": 0,
495
+ "dev_selftest_passing": 0,
496
+ "dev_selftest_failing": 0,
497
+ "dev_selftest_not_run": 0,
485
498
  "tech_docs_count": 0
486
499
  },
487
500
  "prds": [
@@ -507,6 +520,8 @@ Schema:
507
520
  "implemented_by": "<ClassName.method or null>",
508
521
  "test_count": 0,
509
522
  "test_classes": ["<TestClass1>", "<TestClass2>"],
523
+ "dev_selftest": "pass | fail | not_run",
524
+ "dev_selftest_at": "<YYYY-MM-DD or null>",
510
525
  "prd_version": "<prd version when BDD was generated>",
511
526
  "bdd_version": "<bdd version when code was generated>",
512
527
  "tech_doc_revision": 0,
@@ -533,7 +548,7 @@ Schema:
533
548
  "sc_id": "<SC-ID>",
534
549
  "sc_title": "<title>",
535
550
  "implemented_by": "<method>",
536
- "fix": "/generate-tests <UC-ID>"
551
+ "fix": "/dev-gen-test <UC-ID>"
537
552
  }
538
553
  ],
539
554
  "untracked": [
@@ -571,37 +586,40 @@ Schema:
571
586
  - `tech_doc_revision`: use integer; `0` if not yet generated
572
587
  - `code_coverage_pct` / `test_coverage_pct`: round to nearest integer (0–100)
573
588
  - Always write to `{paths.trace_dir}/trace-report.json` regardless of domain filter — if a domain filter was applied, include only those PRDs in `prds[]` but note the domain in the `domain` field
574
- - **TSV `"—"` mapping**: when reading TSV files, map dash values to JSON types: `implemented_by: "—"` → `null`; `test_count: "—"` → `0`; `test_classes: "—"` → `[]`; `tech_doc_revision: "—"` → `0`
589
+ - **TSV `"—"` mapping**: when reading TSV files, map dash values to JSON types: `implemented_by: "—"` → `null`; `test_count: "—"` → `0`; `test_classes: "—"` → `[]`; `tech_doc_revision: "—"` → `0`; `dev_selftest: "—"` → `"not_run"`; `dev_selftest_at: "—"` → `null`
575
590
 
576
- ### Step 8b — Umbrella Living Docs Sync *(umbrella mode only)*
591
+ ### Step 8b — Living Docs Sync *(umbrella mode only)*
577
592
 
578
593
  *Skip this step in single-service mode.*
579
594
 
580
- After writing each service's `trace-report.json`, sync trace files to the umbrella root so the Living Docs VS Code panel (opened at umbrella root) can read them:
595
+ Authoritative trace state stays in each service submodule's `.trace/` (committed there).
596
+ This step publishes the merged report to the **canonical Living Docs home** (the specs
597
+ module) and drops a local mirror so the panel is never empty.
581
598
 
582
- 1. Create directory `{umbrella_root_trace}/` if it does not exist (`mkdir -p .trace`).
599
+ 1. **Write canonical merged report** to `{living_docs_dir}/` (`mkdir -p` it first):
600
+ - `{living_docs_dir}/trace-report.json` — merge every per-service `trace-report.json`
601
+ into one document, add a `"service"` field per scenario row, recalc summary aggregates.
602
+ - `{living_docs_dir}/{service-name}/{UC-ID}.tsv` — copy each service's TSVs, namespaced
603
+ by service. Overwrite; don't delete TSVs whose service source is gone (prior runs).
583
604
 
584
- 2. **Copy TSV files** from each service trace dir to umbrella trace dir with service namespace:
585
- ```
586
- {service.path}/.trace/{UC-ID}.tsv .trace/{service-name}/{UC-ID}.tsv
587
- ```
588
- Overwrite if exists. Do not delete files in `.trace/` that no longer have a service source — they may be from a previous run.
589
-
590
- 3. **Write aggregated `trace-report.json`** to `{umbrella_root_trace}/trace-report.json`:
591
- - Merge all per-service `trace-report.json` data into one document
592
- - Add `"service"` field to each scenario row
593
- - Recalculate summary aggregates across all services
605
+ 2. **Mirror to the panel location** `{panel_mirror}` (`./.trace` at the current workspace
606
+ root) so a dev who opened *this* repo (umbrella **or** a single service submodule) sees
607
+ data immediately: copy `{living_docs_dir}/trace-report.json` `{panel_mirror}/trace-report.json`
608
+ (and the namespaced TSVs). If `panel_mirror` already resolves to `living_docs_dir`, skip.
594
609
 
595
- 4. **Print sync summary:**
610
+ 3. **Print sync summary:**
596
611
  ```
597
- Umbrella sync.trace/
598
- user-service : {N} TSV files copied
599
- order-service : {N} TSV files copied
612
+ Living Docs{living_docs_dir}/ (canonical, in specs module)
613
+ user-service : {N} TSV files
614
+ order-service : {N} TSV files
600
615
  trace-report.json: merged ({total} scenarios across {S} services)
601
- Living Docs panel will reflect this data immediately.
616
+ Panel mirror {panel_mirror}/trace-report.json (current workspace)
602
617
  ```
603
618
 
604
- > **Note:** `.trace/` at umbrella root is a **read-only mirror** do NOT commit it to the umbrella repo. Add `.trace/` to the umbrella's `.gitignore`. Authoritative trace state lives in each service submodule's `.trace/` dir and is committed there.
619
+ > **Note — both locations are generated, gitignored mirrors.** Add `.living-docs/` to the
620
+ > **specs module's** `.gitignore` and `.trace/` to the current repo's `.gitignore`. The only
621
+ > committed, authoritative trace state is each service submodule's own `.trace/`. The report
622
+ > is regenerated by `/validate-traces` or `/sync` — never commit it.
605
623
 
606
624
  ## Output
607
625
 
@@ -643,13 +661,13 @@ Suggest the logical next command based on workflow phase:
643
661
  | /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
644
662
  | /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
645
663
  | /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
646
- | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/generate-tests {UC-ID}` |
647
- | /generate-tests | `/run-tests {UC-ID}` |
648
- | /run-tests (passing) | `/review-code {UC-ID}` |
649
- | /run-tests (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
650
- | /review-code | `/smoke-test {UC-ID}` or create PR |
651
- | /smoke-test | Create PR and link to ticket |
652
- | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/generate-tests {UC-ID}`; all OK → create PR |
664
+ | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
665
+ | /dev-gen-test | `/dev-run-test {UC-ID}` |
666
+ | /dev-run-test (passing) | `/review-code {UC-ID}` |
667
+ | /dev-run-test (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
668
+ | /review-code | `/dev-smoke-test {UC-ID}` or create PR |
669
+ | /dev-smoke-test | Create PR and link to ticket |
670
+ | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; all OK → create PR |
653
671
  | /fix-bug | Create PR and link to ticket |
654
672
  | /debug | `/fix-bug {ticket-id}` if fix needed |
655
673
  | /report-bug | Send to dev (`/fix-bug {BUG-ID}`); if coverage gap → `/propose-scenario {UC-ID}` |
@@ -702,11 +720,12 @@ Tech-Doc Revision Drift:
702
720
 
703
721
  Recommendations:
704
722
  - /generate-code {UC-ID} for DRIFT and UNTRACKED scenarios
705
- - /generate-tests {UC-ID} for GAP (missing tests)
723
+ - /dev-gen-test {UC-ID} for GAP (missing tests)
706
724
  - /generate-bdd {prd-file} for PRD version drift
707
725
 
708
726
  [Umbrella mode only]
709
- Living Docs synced.trace/ (umbrella root)
710
- Tip: run /validate-traces after each codegen session to refresh the panel.
711
- .trace/ at umbrella root is a mirror do not commit it (add to .gitignore).
727
+ Living Docs canonical{living_docs_dir}/ (specs module — shared, gitignored)
728
+ Panel mirror → {panel_mirror}/trace-report.json (current workspace)
729
+ Tip: run /validate-traces (or /sync) after each codegen session to refresh the panel.
730
+ Both are generated mirrors — do not commit (.living-docs/ + .trace/ in .gitignore).
712
731
  ```
@@ -190,7 +190,7 @@ If `services` section is present:
190
190
 
191
191
  **2. Route to service** — if active domain matches a key in `services`:
192
192
  - Override `paths.specs_dir` → `services.{domain}.specs_dir`
193
- - Override `paths.tech_docs_dir` → `services.{domain}.tech_docs_dir`
193
+ - 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.
194
194
  - Store `active_service` = `services.{domain}.path`
195
195
  - Store `active_service_module` = `services.{domain}.module`
196
196
  - If service has its own `module` → use it as `active_module` (overrides `tech_stack.module`)
@@ -202,7 +202,7 @@ If `services` section is present:
202
202
  **4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
203
203
  - Override `paths.prd_dir` → `{spec_source}/specs/prd`
204
204
  - Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
205
- - 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`.
205
+ - 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.)*
206
206
  - Override `paths.domain_knowledge_dir` → `{spec_source}/specs/domain-knowledge`
207
207
  - Override `paths.business_dictionary` → `{spec_source}/specs/domain-knowledge/business-dictionary.md`
208
208
  - Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
@@ -233,7 +233,7 @@ When `active_service` has been resolved to a real path in Step 1.5 (e.g., `user-
233
233
  | `paths.specs_dir` | `{active_service}/{service paths.specs_dir}` (if set in service config, else keep Step 1.5 override) |
234
234
 
235
235
  **3. Store** `service_root = {active_service}` as the working directory anchor for all downstream commands:
236
- - Shell commands (`/run-tests`, `/generate-tests`) run **from within** `service_root`
236
+ - Shell commands (`/dev-run-test`, `/dev-gen-test`) run **from within** `service_root`
237
237
  - File write operations (test files, trace TSVs) use paths **relative to** `service_root`
238
238
 
239
239
  **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).
@@ -326,7 +326,7 @@ active_module = tech_stack.module (e.g. "java-spring", "react", "flutter")
326
326
 
327
327
  If `tech_stack.module` is blank or not recognized → set `platform_type = "unknown"` and flag as ⚠️ in the Step 7 recap.
328
328
 
329
- 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).
329
+ 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).
330
330
 
331
331
  ---
332
332
 
@@ -506,13 +506,13 @@ Suggest the logical next command based on workflow phase:
506
506
  | /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
507
507
  | /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
508
508
  | /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
509
- | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/generate-tests {UC-ID}` |
510
- | /generate-tests | `/run-tests {UC-ID}` |
511
- | /run-tests (passing) | `/review-code {UC-ID}` |
512
- | /run-tests (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
513
- | /review-code | `/smoke-test {UC-ID}` or create PR |
514
- | /smoke-test | Create PR and link to ticket |
515
- | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/generate-tests {UC-ID}`; all OK → create PR |
509
+ | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
510
+ | /dev-gen-test | `/dev-run-test {UC-ID}` |
511
+ | /dev-run-test (passing) | `/review-code {UC-ID}` |
512
+ | /dev-run-test (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
513
+ | /review-code | `/dev-smoke-test {UC-ID}` or create PR |
514
+ | /dev-smoke-test | Create PR and link to ticket |
515
+ | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; all OK → create PR |
516
516
  | /fix-bug | Create PR and link to ticket |
517
517
  | /debug | `/fix-bug {ticket-id}` if fix needed |
518
518
  | /report-bug | Send to dev (`/fix-bug {BUG-ID}`); if coverage gap → `/propose-scenario {UC-ID}` |
@@ -624,13 +624,13 @@ Suggest the logical next command based on workflow phase:
624
624
  | /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
625
625
  | /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
626
626
  | /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
627
- | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/generate-tests {UC-ID}` |
628
- | /generate-tests | `/run-tests {UC-ID}` |
629
- | /run-tests (passing) | `/review-code {UC-ID}` |
630
- | /run-tests (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
631
- | /review-code | `/smoke-test {UC-ID}` or create PR |
632
- | /smoke-test | Create PR and link to ticket |
633
- | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/generate-tests {UC-ID}`; all OK → create PR |
627
+ | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
628
+ | /dev-gen-test | `/dev-run-test {UC-ID}` |
629
+ | /dev-run-test (passing) | `/review-code {UC-ID}` |
630
+ | /dev-run-test (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
631
+ | /review-code | `/dev-smoke-test {UC-ID}` or create PR |
632
+ | /dev-smoke-test | Create PR and link to ticket |
633
+ | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; all OK → create PR |
634
634
  | /fix-bug | Create PR and link to ticket |
635
635
  | /debug | `/fix-bug {ticket-id}` if fix needed |
636
636
  | /report-bug | Send to dev (`/fix-bug {BUG-ID}`); if coverage gap → `/propose-scenario {UC-ID}` |
@@ -105,7 +105,7 @@ If `services` section is present:
105
105
 
106
106
  **2. Route to service** — if active domain matches a key in `services`:
107
107
  - Override `paths.specs_dir` → `services.{domain}.specs_dir`
108
- - Override `paths.tech_docs_dir` → `services.{domain}.tech_docs_dir`
108
+ - 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.
109
109
  - Store `active_service` = `services.{domain}.path`
110
110
  - Store `active_service_module` = `services.{domain}.module`
111
111
  - If service has its own `module` → use it as `active_module` (overrides `tech_stack.module`)
@@ -117,7 +117,7 @@ If `services` section is present:
117
117
  **4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
118
118
  - Override `paths.prd_dir` → `{spec_source}/specs/prd`
119
119
  - Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
120
- - 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`.
120
+ - 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.)*
121
121
  - Override `paths.domain_knowledge_dir` → `{spec_source}/specs/domain-knowledge`
122
122
  - Override `paths.business_dictionary` → `{spec_source}/specs/domain-knowledge/business-dictionary.md`
123
123
  - Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
@@ -148,7 +148,7 @@ When `active_service` has been resolved to a real path in Step 1.5 (e.g., `user-
148
148
  | `paths.specs_dir` | `{active_service}/{service paths.specs_dir}` (if set in service config, else keep Step 1.5 override) |
149
149
 
150
150
  **3. Store** `service_root = {active_service}` as the working directory anchor for all downstream commands:
151
- - Shell commands (`/run-tests`, `/generate-tests`) run **from within** `service_root`
151
+ - Shell commands (`/dev-run-test`, `/dev-gen-test`) run **from within** `service_root`
152
152
  - File write operations (test files, trace TSVs) use paths **relative to** `service_root`
153
153
 
154
154
  **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).
@@ -241,7 +241,7 @@ active_module = tech_stack.module (e.g. "java-spring", "react", "flutter")
241
241
 
242
242
  If `tech_stack.module` is blank or not recognized → set `platform_type = "unknown"` and flag as ⚠️ in the Step 7 recap.
243
243
 
244
- 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).
244
+ 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).
245
245
 
246
246
  ---
247
247
 
@@ -444,13 +444,13 @@ Suggest the logical next command based on workflow phase:
444
444
  | /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
445
445
  | /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
446
446
  | /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
447
- | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/generate-tests {UC-ID}` |
448
- | /generate-tests | `/run-tests {UC-ID}` |
449
- | /run-tests (passing) | `/review-code {UC-ID}` |
450
- | /run-tests (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
451
- | /review-code | `/smoke-test {UC-ID}` or create PR |
452
- | /smoke-test | Create PR and link to ticket |
453
- | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/generate-tests {UC-ID}`; all OK → create PR |
447
+ | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
448
+ | /dev-gen-test | `/dev-run-test {UC-ID}` |
449
+ | /dev-run-test (passing) | `/review-code {UC-ID}` |
450
+ | /dev-run-test (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
451
+ | /review-code | `/dev-smoke-test {UC-ID}` or create PR |
452
+ | /dev-smoke-test | Create PR and link to ticket |
453
+ | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; all OK → create PR |
454
454
  | /fix-bug | Create PR and link to ticket |
455
455
  | /debug | `/fix-bug {ticket-id}` if fix needed |
456
456
  | /report-bug | Send to dev (`/fix-bug {BUG-ID}`); if coverage gap → `/propose-scenario {UC-ID}` |
@@ -588,13 +588,13 @@ Suggest the logical next command based on workflow phase:
588
588
  | /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
589
589
  | /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
590
590
  | /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
591
- | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/generate-tests {UC-ID}` |
592
- | /generate-tests | `/run-tests {UC-ID}` |
593
- | /run-tests (passing) | `/review-code {UC-ID}` |
594
- | /run-tests (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
595
- | /review-code | `/smoke-test {UC-ID}` or create PR |
596
- | /smoke-test | Create PR and link to ticket |
597
- | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/generate-tests {UC-ID}`; all OK → create PR |
591
+ | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
592
+ | /dev-gen-test | `/dev-run-test {UC-ID}` |
593
+ | /dev-run-test (passing) | `/review-code {UC-ID}` |
594
+ | /dev-run-test (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
595
+ | /review-code | `/dev-smoke-test {UC-ID}` or create PR |
596
+ | /dev-smoke-test | Create PR and link to ticket |
597
+ | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; all OK → create PR |
598
598
  | /fix-bug | Create PR and link to ticket |
599
599
  | /debug | `/fix-bug {ticket-id}` if fix needed |
600
600
  | /report-bug | Send to dev (`/fix-bug {BUG-ID}`); if coverage gap → `/propose-scenario {UC-ID}` |
@@ -647,7 +647,7 @@ Gaps:
647
647
 
648
648
  Recommendations:
649
649
  - /generate-code {UC-ID} SC2
650
- - /generate-tests {UC-ID}
650
+ - /dev-gen-test {UC-ID}
651
651
  - Re-run /generate-code {UC-ID} for drifted scenarios
652
652
  ```
653
653
 
@@ -689,13 +689,13 @@ Suggest the logical next command based on workflow phase:
689
689
  | /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
690
690
  | /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
691
691
  | /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
692
- | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/generate-tests {UC-ID}` |
693
- | /generate-tests | `/run-tests {UC-ID}` |
694
- | /run-tests (passing) | `/review-code {UC-ID}` |
695
- | /run-tests (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
696
- | /review-code | `/smoke-test {UC-ID}` or create PR |
697
- | /smoke-test | Create PR and link to ticket |
698
- | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/generate-tests {UC-ID}`; all OK → create PR |
692
+ | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
693
+ | /dev-gen-test | `/dev-run-test {UC-ID}` |
694
+ | /dev-run-test (passing) | `/review-code {UC-ID}` |
695
+ | /dev-run-test (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
696
+ | /review-code | `/dev-smoke-test {UC-ID}` or create PR |
697
+ | /dev-smoke-test | Create PR and link to ticket |
698
+ | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; all OK → create PR |
699
699
  | /fix-bug | Create PR and link to ticket |
700
700
  | /debug | `/fix-bug {ticket-id}` if fix needed |
701
701
  | /report-bug | Send to dev (`/fix-bug {BUG-ID}`); if coverage gap → `/propose-scenario {UC-ID}` |