@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.
- package/ARCHITECTURE.md +20 -9
- package/bin/index.js +1 -2
- package/commands/debug.md +13 -12
- package/commands/define-product.md +12 -11
- package/commands/{generate-tests.md → dev-gen-test.md} +48 -15
- package/commands/{generate-tests.tmpl → dev-gen-test.tmpl} +18 -4
- package/{core/commands/run-tests.md → commands/dev-run-test.md} +62 -13
- package/commands/{run-tests.tmpl → dev-run-test.tmpl} +32 -2
- package/{core/commands/smoke-test.md → commands/dev-smoke-test.md} +17 -16
- package/commands/{smoke-test.tmpl → dev-smoke-test.tmpl} +5 -5
- package/commands/fix-bug.md +13 -12
- package/commands/generate-bdd.md +39 -13
- package/commands/generate-bdd.tmpl +9 -2
- package/commands/generate-code.md +86 -15
- package/commands/generate-code.tmpl +56 -4
- package/commands/generate-design-spec.md +105 -39
- package/commands/generate-design-spec.tmpl +93 -28
- package/commands/generate-prd.md +12 -11
- package/commands/generate-spec-manifest.md +12 -11
- package/commands/generate-tech-docs.md +63 -22
- package/commands/generate-tech-docs.tmpl +51 -11
- package/commands/learn.md +13 -12
- package/commands/propose-scenario.md +13 -12
- package/commands/propose-scenario.tmpl +1 -1
- package/commands/refine-prd.md +166 -16
- package/commands/refine-prd.tmpl +16 -5
- package/commands/report-bug.md +12 -11
- package/commands/review-code.md +14 -13
- package/commands/review-code.tmpl +1 -1
- package/commands/review-context.md +161 -12
- package/commands/review-context.tmpl +11 -1
- package/commands/review-tech-docs.md +13 -11
- package/commands/review-tech-docs.tmpl +1 -0
- package/commands/setup-ai-first.md +7 -7
- package/commands/sync.md +23 -20
- package/commands/sync.tmpl +16 -13
- package/commands/update-framework.md +7 -7
- package/commands/validate-traces.md +57 -37
- package/commands/validate-traces.tmpl +45 -26
- package/core/FRAMEWORK_VERSION +1 -1
- package/core/commands/debug.md +13 -12
- package/core/commands/define-product.md +12 -11
- package/core/commands/{generate-tests.md → dev-gen-test.md} +48 -15
- package/{commands/run-tests.md → core/commands/dev-run-test.md} +62 -13
- package/{commands/smoke-test.md → core/commands/dev-smoke-test.md} +17 -16
- package/core/commands/fix-bug.md +13 -12
- package/core/commands/generate-bdd.md +39 -13
- package/core/commands/generate-code.md +86 -15
- package/core/commands/generate-design-spec.md +105 -39
- package/core/commands/generate-prd.md +12 -11
- package/core/commands/generate-spec-manifest.md +12 -11
- package/core/commands/generate-tech-docs.md +63 -22
- package/core/commands/learn.md +13 -12
- package/core/commands/propose-scenario.md +13 -12
- package/core/commands/refine-prd.md +166 -16
- package/core/commands/report-bug.md +12 -11
- package/core/commands/review-code.md +14 -13
- package/core/commands/review-context.md +161 -12
- package/core/commands/review-tech-docs.md +13 -11
- package/core/commands/setup-ai-first.md +7 -7
- package/core/commands/sync.md +23 -20
- package/core/commands/update-framework.md +7 -7
- package/core/commands/validate-traces.md +57 -37
- package/core/modules/android-compose/module.yaml +13 -0
- package/core/modules/android-compose/stack-profile.yaml +57 -0
- package/core/modules/flutter/module.yaml +14 -0
- package/core/modules/flutter/stack-profile.yaml +59 -0
- package/core/modules/ios-swiftui/module.yaml +13 -0
- package/core/modules/ios-swiftui/stack-profile.yaml +55 -0
- package/core/modules/nuxt/module.yaml +14 -0
- package/core/modules/nuxt/stack-profile.yaml +58 -0
- package/core/modules/react-native/module.yaml +14 -0
- package/core/modules/react-native/stack-profile.yaml +56 -0
- package/core/modules/vue/module.yaml +14 -0
- package/core/modules/vue/stack-profile.yaml +65 -0
- package/core/skills/code/SKILL.md +19 -18
- package/core/skills/debug/SKILL.md +27 -26
- package/core/skills/design-spec/SKILL.md +12 -11
- package/core/skills/discovery/SKILL.md +12 -11
- package/core/skills/prd/SKILL.md +14 -14
- package/core/skills/setup-ai-first/SKILL.md +7 -7
- package/core/skills/spec/SKILL.md +14 -14
- package/core/skills/test/SKILL.md +40 -38
- package/core/steps/capture-lesson.md +1 -1
- package/core/steps/context-loader.md +5 -4
- package/core/steps/report-footer.md +7 -7
- package/core/steps/review-fanout.md +138 -0
- package/core/steps/spawn-agent.md +1 -1
- package/core/steps/trace-mirror.md +18 -0
- package/core/templates/design-spec.template.md +16 -8
- package/core/templates/product-definition.template.md +3 -3
- package/core/templates/project-context.yaml +4 -1
- package/modules/android-compose/module.yaml +13 -0
- package/modules/android-compose/stack-profile.yaml +57 -0
- package/modules/flutter/module.yaml +14 -0
- package/modules/flutter/stack-profile.yaml +59 -0
- package/modules/ios-swiftui/module.yaml +13 -0
- package/modules/ios-swiftui/stack-profile.yaml +55 -0
- package/modules/nuxt/module.yaml +14 -0
- package/modules/nuxt/stack-profile.yaml +58 -0
- package/modules/react-native/module.yaml +14 -0
- package/modules/react-native/stack-profile.yaml +56 -0
- package/modules/vue/module.yaml +14 -0
- package/modules/vue/stack-profile.yaml +65 -0
- package/package.json +1 -1
- package/skills/code/SKILL.md +19 -18
- package/skills/debug/SKILL.md +27 -26
- package/skills/debug/SKILL.tmpl +1 -1
- package/skills/design-spec/SKILL.md +12 -11
- package/skills/discovery/SKILL.md +12 -11
- package/skills/prd/SKILL.md +14 -14
- package/skills/setup-ai-first/SKILL.md +7 -7
- package/skills/spec/SKILL.md +14 -14
- package/skills/test/SKILL.md +40 -38
- package/skills/test/SKILL.tmpl +9 -9
- package/steps/capture-lesson.md +1 -1
- package/steps/context-loader.md +5 -4
- package/steps/report-footer.md +7 -7
- package/steps/review-fanout.md +138 -0
- package/steps/spawn-agent.md +1 -1
- package/steps/trace-mirror.md +18 -0
- package/templates/design-spec.template.md +16 -8
- package/templates/product-definition.template.md +3 -3
- 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`:**
|
|
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-
|
|
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 (
|
|
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 → `/
|
|
476
|
-
| /
|
|
477
|
-
| /run-
|
|
478
|
-
| /run-
|
|
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 → `/
|
|
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`:**
|
|
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-
|
|
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 (
|
|
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 → `/
|
|
457
|
-
| /
|
|
458
|
-
| /run-
|
|
459
|
-
| /run-
|
|
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 → `/
|
|
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}` |
|
package/skills/prd/SKILL.md
CHANGED
|
@@ -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 → `/
|
|
200
|
-
| /
|
|
201
|
-
| /run-
|
|
202
|
-
| /run-
|
|
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 → `/
|
|
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 → `/
|
|
449
|
-
| /
|
|
450
|
-
| /run-
|
|
451
|
-
| /run-
|
|
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 → `/
|
|
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 → `/
|
|
146
|
-
| /
|
|
147
|
-
| /run-
|
|
148
|
-
| /run-
|
|
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 → `/
|
|
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}` |
|
package/skills/spec/SKILL.md
CHANGED
|
@@ -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 → `/
|
|
217
|
-
| /
|
|
218
|
-
| /run-
|
|
219
|
-
| /run-
|
|
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 → `/
|
|
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 → `/
|
|
354
|
-
| /
|
|
355
|
-
| /run-
|
|
356
|
-
| /run-
|
|
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 → `/
|
|
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}` |
|
package/skills/test/SKILL.md
CHANGED
|
@@ -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: "/
|
|
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: `/
|
|
7
|
+
This skill handles three commands: `/dev-gen-test`, `/dev-run-test`, and `/dev-smoke-test`.
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
## /
|
|
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
|
-
/
|
|
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 → `/
|
|
260
|
-
| /
|
|
261
|
-
| /run-
|
|
262
|
-
| /run-
|
|
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 → `/
|
|
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-
|
|
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`:**
|
|
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-
|
|
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 (
|
|
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-
|
|
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 → `/
|
|
660
|
-
| /
|
|
661
|
-
| /run-
|
|
662
|
-
| /run-
|
|
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 → `/
|
|
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-
|
|
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`:**
|
|
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-
|
|
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 (
|
|
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 → `/
|
|
1078
|
-
| /
|
|
1079
|
-
| /run-
|
|
1080
|
-
| /run-
|
|
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 → `/
|
|
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}` |
|
package/skills/test/SKILL.tmpl
CHANGED
|
@@ -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: "/
|
|
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: `/
|
|
7
|
+
This skill handles three commands: `/dev-gen-test`, `/dev-run-test`, and `/dev-smoke-test`.
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
## /
|
|
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
|
-
/
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
|
package/steps/capture-lesson.md
CHANGED
|
@@ -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 | /
|
|
57
|
+
| tests | /dev-gen-test output |
|
|
58
58
|
| prd | /generate-prd, /refine-prd output |
|
|
59
59
|
| general | every command |
|
|
60
60
|
|
package/steps/context-loader.md
CHANGED
|
@@ -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`:**
|
|
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-
|
|
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 (
|
|
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
|
|
package/steps/report-footer.md
CHANGED
|
@@ -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 → `/
|
|
40
|
-
| /
|
|
41
|
-
| /run-
|
|
42
|
-
| /run-
|
|
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 → `/
|
|
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}` |
|