@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
package/ARCHITECTURE.md
CHANGED
|
@@ -50,19 +50,26 @@
|
|
|
50
50
|
┌──────────────────────────────────────────────────────────────────────┐
|
|
51
51
|
│ LAYER 4 — EXECUTION (command logic) │
|
|
52
52
|
│ │
|
|
53
|
-
│ DISCOVERY PRD / BDD CODE /
|
|
53
|
+
│ DISCOVERY PRD / BDD CODE / DEV-CHECK DEBUG │
|
|
54
54
|
│ /define-product /generate-prd /generate-code /fix-bug │
|
|
55
|
-
│ /refine-prd /
|
|
56
|
-
│ /generate-bdd /run-
|
|
57
|
-
│ /generate-tech-docs /smoke-test
|
|
55
|
+
│ /refine-prd /dev-gen-test /debug │
|
|
56
|
+
│ /generate-bdd /dev-run-test /validate- │
|
|
57
|
+
│ /generate-tech-docs /dev-smoke-test traces │
|
|
58
58
|
│ /review-code /setup-ai-first │
|
|
59
|
+
│ │
|
|
60
|
+
│ Lưu ý: /dev-gen-test, /dev-run-test, /dev-smoke-test là dev │
|
|
61
|
+
│ self-check / smoke (dev tự kiểm code của mình), KHÔNG phải bộ │
|
|
62
|
+
│ test QC chính thức — QC là một flow riêng chạy sau. │
|
|
59
63
|
└──────────────────────────────────────────────────────────────────────┘
|
|
60
64
|
│
|
|
61
65
|
┌──────────────────────────────────────────────────────────────────────┐
|
|
62
66
|
│ LAYER 5 — OUTPUT (artifacts in consumer proj) │
|
|
63
67
|
│ │
|
|
64
|
-
│
|
|
65
|
-
│
|
|
68
|
+
│ Spec module (cross-team, via {spec_source}): │
|
|
69
|
+
│ specs/product-definition/ specs/prd/ specs/bdd/ │
|
|
70
|
+
│ specs/tech-docs/ (API contract) .living-docs/ (gitignored) │
|
|
71
|
+
│ Service submodule (per-service): │
|
|
72
|
+
│ src/ .trace/*.tsv (authoritative, committed) .agent/review/ │
|
|
66
73
|
└──────────────────────────────────────────────────────────────────────┘
|
|
67
74
|
```
|
|
68
75
|
|
|
@@ -171,8 +178,8 @@ Main session (orchestrator — lightweight, chỉ coordinate)
|
|
|
171
178
|
├─ spawn codegen-agent ──→ /generate-code UC1 (own context window)
|
|
172
179
|
│ └─ returns: src/ changes
|
|
173
180
|
│
|
|
174
|
-
└─ spawn test-agent ──→ /
|
|
175
|
-
└─ returns: test files
|
|
181
|
+
└─ spawn test-agent ──→ /dev-gen-test UC1 (own context window)
|
|
182
|
+
└─ returns: dev self-check test files (smoke, không phải QC)
|
|
176
183
|
|
|
177
184
|
Benefits:
|
|
178
185
|
- Main session không bị bloat bởi large file reads
|
|
@@ -222,7 +229,11 @@ spec-driven-dev/
|
|
|
222
229
|
└── platform-guide.template.md
|
|
223
230
|
```
|
|
224
231
|
|
|
225
|
-
> Build output (gitignored): `commands/*.md`, `skills/**/SKILL.md`, and `core/` (the distributable copied into a consumer's `.agent/` by `--init`). Consumer-side tester artifacts live in the shared spec repo under `feedback/bug-reports/` and `feedback/bdd-proposals/`.
|
|
232
|
+
> Build output (gitignored): `commands/*.md`, `skills/**/SKILL.md`, and `core/` (the distributable copied into a consumer's `.agent/` by `--init`). Consumer-side tester artifacts live in the shared spec repo under `feedback/bug-reports/` and `feedback/bdd-proposals/`. In umbrella mode the **API contract (tech-docs)** is a **cross-team artifact**: khi `setup.spec_source` được set, tech-docs LUÔN route về `{spec_source}/specs/tech-docs/` (giống PRD / design-spec / domain-knowledge), KHÔNG per-service — để FE/App đọc contract qua spec submodule ở `/generate-code --phase=integration`. Chỉ khi không có `spec_source` thì tech-docs mới nằm per-service.
|
|
233
|
+
|
|
234
|
+
> **Living Docs / trace data location**: `.trace/*.tsv` của mỗi service là **authoritative** và được commit trong chính SERVICE submodule. Canonical report của Living Docs (`trace-report.json` + bản TSV mirror đã namespaced) được sinh vào SPEC MODULE tại `{spec_source}/.living-docs/` (gitignored) bởi `/sync` hoặc `/validate-traces`. Ngoài ra một panel mirror cục bộ tại `./.trace` của workspace hiện tại cũng được ghi để VS Code panel resolve được data ngay cả khi mở bên trong một service submodule (không chỉ ở umbrella root). Lý do: spec module được mount vào mọi umbrella/service workspace, nên nó là nơi chung, luôn resolve được cho cross-team dashboard.
|
|
235
|
+
>
|
|
236
|
+
> Trace TSV schema có thêm 2 cột `dev_selftest` (pass/fail/not_run) và `dev_selftest_at`, được set bởi `/dev-run-test` và surface trong Living Docs report như tín hiệu **dev self-check** (không phải coverage QC chính thức).
|
|
226
237
|
|
|
227
238
|
---
|
|
228
239
|
|
package/bin/index.js
CHANGED
|
@@ -204,7 +204,6 @@ if (isInit) {
|
|
|
204
204
|
` path: "${s.name}"`,
|
|
205
205
|
` module: "${s.module || 'TODO'}"`,
|
|
206
206
|
` specs_dir: "${s.name}/specs/bdd"`,
|
|
207
|
-
` tech_docs_dir: "${s.name}/specs/tech-docs"`,
|
|
208
207
|
].join('\n')).join('\n');
|
|
209
208
|
} else {
|
|
210
209
|
servicesBlock = [
|
|
@@ -212,7 +211,6 @@ if (isInit) {
|
|
|
212
211
|
` # path: "{service-submodule-dir}"`,
|
|
213
212
|
` # module: "{stack-module}"`,
|
|
214
213
|
` # specs_dir: "{service-dir}/specs/bdd"`,
|
|
215
|
-
` # tech_docs_dir: "{service-dir}/specs/tech-docs"`,
|
|
216
214
|
].join('\n');
|
|
217
215
|
}
|
|
218
216
|
|
|
@@ -234,6 +232,7 @@ if (isInit) {
|
|
|
234
232
|
`paths:`,
|
|
235
233
|
` prd_dir: "${specSrc}/specs/prd"`,
|
|
236
234
|
` design_spec_dir: "${specSrc}/specs/design-spec"`,
|
|
235
|
+
` tech_docs_dir: "${specSrc}/specs/tech-docs" # API contract — shared (BE pushes here, FE/App read via /sync)`,
|
|
237
236
|
` domain_knowledge_dir: "${specSrc}/specs/domain-knowledge"`,
|
|
238
237
|
` business_dictionary: "${specSrc}/specs/domain-knowledge/business-dictionary.md"`,
|
|
239
238
|
` core_entities: "${specSrc}/specs/domain-knowledge/core-entities.md"`,
|
package/commands/debug.md
CHANGED
|
@@ -166,7 +166,7 @@ If `services` section is present:
|
|
|
166
166
|
|
|
167
167
|
**2. Route to service** — if active domain matches a key in `services`:
|
|
168
168
|
- Override `paths.specs_dir` → `services.{domain}.specs_dir`
|
|
169
|
-
- Override `paths.tech_docs_dir` → `services.{domain}.tech_docs_dir`
|
|
169
|
+
- 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.
|
|
170
170
|
- Store `active_service` = `services.{domain}.path`
|
|
171
171
|
- Store `active_service_module` = `services.{domain}.module`
|
|
172
172
|
- If service has its own `module` → use it as `active_module` (overrides `tech_stack.module`)
|
|
@@ -178,13 +178,14 @@ If `services` section is present:
|
|
|
178
178
|
**4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
|
|
179
179
|
- Override `paths.prd_dir` → `{spec_source}/specs/prd`
|
|
180
180
|
- Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
|
|
181
|
+
- Override `paths.tech_docs_dir` → `{spec_source}/specs/tech-docs` — **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
182
|
- Override `paths.domain_knowledge_dir` → `{spec_source}/specs/domain-knowledge`
|
|
182
183
|
- Override `paths.business_dictionary` → `{spec_source}/specs/domain-knowledge/business-dictionary.md`
|
|
183
184
|
- Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
|
|
184
185
|
- Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
|
|
185
186
|
- Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
|
|
186
187
|
|
|
187
|
-
> **Why under `spec_source`:**
|
|
188
|
+
> **Why under `spec_source`:** PRD, design-spec, domain knowledge, the **API contract (tech-docs)**, and tester feedback are all **cross-team artifacts** — they must live in the **shared spec repo** so every umbrella (FE/App/BE) reads the same source via `/sync`. Tech-docs specifically: BE authors the tech-design (API contract), commits + pushes it into the spec submodule (2-layer commit), and FE/App pull it on their next `/sync` to wire the real API in `/generate-code --phase=integration`. In single-service mode (no `spec_source`), these default under the repo root — still shared, same repo.
|
|
188
189
|
|
|
189
190
|
---
|
|
190
191
|
|
|
@@ -208,7 +209,7 @@ When `active_service` has been resolved to a real path in Step 1.5 (e.g., `user-
|
|
|
208
209
|
| `paths.specs_dir` | `{active_service}/{service paths.specs_dir}` (if set in service config, else keep Step 1.5 override) |
|
|
209
210
|
|
|
210
211
|
**3. Store** `service_root = {active_service}` as the working directory anchor for all downstream commands:
|
|
211
|
-
- Shell commands (`/run-
|
|
212
|
+
- Shell commands (`/dev-run-test`, `/dev-gen-test`) run **from within** `service_root`
|
|
212
213
|
- File write operations (test files, trace TSVs) use paths **relative to** `service_root`
|
|
213
214
|
|
|
214
215
|
**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 +302,7 @@ active_module = tech_stack.module (e.g. "java-spring", "react", "flutter")
|
|
|
301
302
|
|
|
302
303
|
If `tech_stack.module` is blank or not recognized → set `platform_type = "unknown"` and flag as ⚠️ in the Step 7 recap.
|
|
303
304
|
|
|
304
|
-
These two variables (`active_module`, `platform_type`) are the canonical source for all branching logic in commands that need platform-specific behavior (
|
|
305
|
+
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
306
|
|
|
306
307
|
---
|
|
307
308
|
|
|
@@ -605,13 +606,13 @@ Suggest the logical next command based on workflow phase:
|
|
|
605
606
|
| /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
|
|
606
607
|
| /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
|
|
607
608
|
| /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
|
|
608
|
-
| /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/
|
|
609
|
-
| /
|
|
610
|
-
| /run-
|
|
611
|
-
| /run-
|
|
612
|
-
| /review-code | `/smoke-test {UC-ID}` or create PR |
|
|
613
|
-
| /smoke-test | Create PR and link to ticket |
|
|
614
|
-
| /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/
|
|
609
|
+
| /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
|
|
610
|
+
| /dev-gen-test | `/dev-run-test {UC-ID}` |
|
|
611
|
+
| /dev-run-test (passing) | `/review-code {UC-ID}` |
|
|
612
|
+
| /dev-run-test (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
|
|
613
|
+
| /review-code | `/dev-smoke-test {UC-ID}` or create PR |
|
|
614
|
+
| /dev-smoke-test | Create PR and link to ticket |
|
|
615
|
+
| /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; all OK → create PR |
|
|
615
616
|
| /fix-bug | Create PR and link to ticket |
|
|
616
617
|
| /debug | `/fix-bug {ticket-id}` if fix needed |
|
|
617
618
|
| /report-bug | Send to dev (`/fix-bug {BUG-ID}`); if coverage gap → `/propose-scenario {UC-ID}` |
|
|
@@ -722,7 +723,7 @@ If `lessons_path` does not exist, create it with this header first:
|
|
|
722
723
|
| code-gen | /generate-code output |
|
|
723
724
|
| bdd | /generate-bdd output |
|
|
724
725
|
| tech-docs | /generate-tech-docs output |
|
|
725
|
-
| tests | /
|
|
726
|
+
| tests | /dev-gen-test output |
|
|
726
727
|
| prd | /generate-prd, /refine-prd output |
|
|
727
728
|
| general | every command |
|
|
728
729
|
|
|
@@ -163,7 +163,7 @@ If `services` section is present:
|
|
|
163
163
|
|
|
164
164
|
**2. Route to service** — if active domain matches a key in `services`:
|
|
165
165
|
- Override `paths.specs_dir` → `services.{domain}.specs_dir`
|
|
166
|
-
- Override `paths.tech_docs_dir` → `services.{domain}.tech_docs_dir`
|
|
166
|
+
- Override `paths.tech_docs_dir` → `services.{domain}.tech_docs_dir` — **only if `setup.spec_source` is NOT set.** When `spec_source` IS set, the tech-design (API contract) is a cross-team artifact and must live in the shared spec repo (handled in step 4), so leave `tech_docs_dir` for step 4 to route — do NOT pin it per-service here.
|
|
167
167
|
- Store `active_service` = `services.{domain}.path`
|
|
168
168
|
- Store `active_service_module` = `services.{domain}.module`
|
|
169
169
|
- If service has its own `module` → use it as `active_module` (overrides `tech_stack.module`)
|
|
@@ -175,13 +175,14 @@ If `services` section is present:
|
|
|
175
175
|
**4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
|
|
176
176
|
- Override `paths.prd_dir` → `{spec_source}/specs/prd`
|
|
177
177
|
- Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
|
|
178
|
+
- Override `paths.tech_docs_dir` → `{spec_source}/specs/tech-docs` — **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.)*
|
|
178
179
|
- Override `paths.domain_knowledge_dir` → `{spec_source}/specs/domain-knowledge`
|
|
179
180
|
- Override `paths.business_dictionary` → `{spec_source}/specs/domain-knowledge/business-dictionary.md`
|
|
180
181
|
- Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
|
|
181
182
|
- Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
|
|
182
183
|
- Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
|
|
183
184
|
|
|
184
|
-
> **Why under `spec_source`:**
|
|
185
|
+
> **Why under `spec_source`:** PRD, design-spec, domain knowledge, the **API contract (tech-docs)**, and tester feedback are all **cross-team artifacts** — they must live in the **shared spec repo** so every umbrella (FE/App/BE) reads the same source via `/sync`. Tech-docs specifically: BE authors the tech-design (API contract), commits + pushes it into the spec submodule (2-layer commit), and FE/App pull it on their next `/sync` to wire the real API in `/generate-code --phase=integration`. In single-service mode (no `spec_source`), these default under the repo root — still shared, same repo.
|
|
185
186
|
|
|
186
187
|
---
|
|
187
188
|
|
|
@@ -205,7 +206,7 @@ When `active_service` has been resolved to a real path in Step 1.5 (e.g., `user-
|
|
|
205
206
|
| `paths.specs_dir` | `{active_service}/{service paths.specs_dir}` (if set in service config, else keep Step 1.5 override) |
|
|
206
207
|
|
|
207
208
|
**3. Store** `service_root = {active_service}` as the working directory anchor for all downstream commands:
|
|
208
|
-
- Shell commands (`/run-
|
|
209
|
+
- Shell commands (`/dev-run-test`, `/dev-gen-test`) run **from within** `service_root`
|
|
209
210
|
- File write operations (test files, trace TSVs) use paths **relative to** `service_root`
|
|
210
211
|
|
|
211
212
|
**4. If service config not found** — keep umbrella defaults, still set `service_root = {active_service}` (path anchor is always needed even without a config override).
|
|
@@ -298,7 +299,7 @@ active_module = tech_stack.module (e.g. "java-spring", "react", "flutter")
|
|
|
298
299
|
|
|
299
300
|
If `tech_stack.module` is blank or not recognized → set `platform_type = "unknown"` and flag as ⚠️ in the Step 7 recap.
|
|
300
301
|
|
|
301
|
-
These two variables (`active_module`, `platform_type`) are the canonical source for all branching logic in commands that need platform-specific behavior (
|
|
302
|
+
These two variables (`active_module`, `platform_type`) are the canonical source for all branching logic in commands that need platform-specific behavior (dev-gen-test, debug, fix-bug, dev-smoke-test).
|
|
302
303
|
|
|
303
304
|
---
|
|
304
305
|
|
|
@@ -539,13 +540,13 @@ Suggest the logical next command based on workflow phase:
|
|
|
539
540
|
| /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
|
|
540
541
|
| /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
|
|
541
542
|
| /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
|
|
542
|
-
| /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/
|
|
543
|
-
| /
|
|
544
|
-
| /run-
|
|
545
|
-
| /run-
|
|
546
|
-
| /review-code | `/smoke-test {UC-ID}` or create PR |
|
|
547
|
-
| /smoke-test | Create PR and link to ticket |
|
|
548
|
-
| /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/
|
|
543
|
+
| /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
|
|
544
|
+
| /dev-gen-test | `/dev-run-test {UC-ID}` |
|
|
545
|
+
| /dev-run-test (passing) | `/review-code {UC-ID}` |
|
|
546
|
+
| /dev-run-test (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
|
|
547
|
+
| /review-code | `/dev-smoke-test {UC-ID}` or create PR |
|
|
548
|
+
| /dev-smoke-test | Create PR and link to ticket |
|
|
549
|
+
| /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; all OK → create PR |
|
|
549
550
|
| /fix-bug | Create PR and link to ticket |
|
|
550
551
|
| /debug | `/fix-bug {ticket-id}` if fix needed |
|
|
551
552
|
| /report-bug | Send to dev (`/fix-bug {BUG-ID}`); if coverage gap → `/propose-scenario {UC-ID}` |
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
# /
|
|
1
|
+
# /dev-gen-test — Generate Dev Self-Check Tests
|
|
2
|
+
|
|
3
|
+
> **Scope — dev self-check (smoke), not the official test suite.** These tests let the
|
|
4
|
+
> developer quickly verify their own generated code against the BDD scenarios. They are a
|
|
5
|
+
> developer self-check, **not** the QC/dev-team's authoritative test suite (that has its
|
|
6
|
+
> own separate flow, implemented elsewhere). Results surface to the Living Docs dashboard
|
|
7
|
+
> as a **dev self-test** signal so QC can see the dev already ran their own checks.
|
|
2
8
|
|
|
3
9
|
## Gate
|
|
4
10
|
# Gate — Universal Entry Procedure
|
|
@@ -163,7 +169,7 @@ If `services` section is present:
|
|
|
163
169
|
|
|
164
170
|
**2. Route to service** — if active domain matches a key in `services`:
|
|
165
171
|
- Override `paths.specs_dir` → `services.{domain}.specs_dir`
|
|
166
|
-
- Override `paths.tech_docs_dir` → `services.{domain}.tech_docs_dir`
|
|
172
|
+
- Override `paths.tech_docs_dir` → `services.{domain}.tech_docs_dir` — **only if `setup.spec_source` is NOT set.** When `spec_source` IS set, the tech-design (API contract) is a cross-team artifact and must live in the shared spec repo (handled in step 4), so leave `tech_docs_dir` for step 4 to route — do NOT pin it per-service here.
|
|
167
173
|
- Store `active_service` = `services.{domain}.path`
|
|
168
174
|
- Store `active_service_module` = `services.{domain}.module`
|
|
169
175
|
- If service has its own `module` → use it as `active_module` (overrides `tech_stack.module`)
|
|
@@ -175,13 +181,14 @@ If `services` section is present:
|
|
|
175
181
|
**4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
|
|
176
182
|
- Override `paths.prd_dir` → `{spec_source}/specs/prd`
|
|
177
183
|
- Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
|
|
184
|
+
- 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.)*
|
|
178
185
|
- Override `paths.domain_knowledge_dir` → `{spec_source}/specs/domain-knowledge`
|
|
179
186
|
- Override `paths.business_dictionary` → `{spec_source}/specs/domain-knowledge/business-dictionary.md`
|
|
180
187
|
- Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
|
|
181
188
|
- Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
|
|
182
189
|
- Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
|
|
183
190
|
|
|
184
|
-
> **Why under `spec_source`:**
|
|
191
|
+
> **Why under `spec_source`:** PRD, design-spec, domain knowledge, the **API contract (tech-docs)**, and tester feedback are all **cross-team artifacts** — they must live in the **shared spec repo** so every umbrella (FE/App/BE) reads the same source via `/sync`. Tech-docs specifically: BE authors the tech-design (API contract), commits + pushes it into the spec submodule (2-layer commit), and FE/App pull it on their next `/sync` to wire the real API in `/generate-code --phase=integration`. In single-service mode (no `spec_source`), these default under the repo root — still shared, same repo.
|
|
185
192
|
|
|
186
193
|
---
|
|
187
194
|
|
|
@@ -205,7 +212,7 @@ When `active_service` has been resolved to a real path in Step 1.5 (e.g., `user-
|
|
|
205
212
|
| `paths.specs_dir` | `{active_service}/{service paths.specs_dir}` (if set in service config, else keep Step 1.5 override) |
|
|
206
213
|
|
|
207
214
|
**3. Store** `service_root = {active_service}` as the working directory anchor for all downstream commands:
|
|
208
|
-
- Shell commands (`/run-
|
|
215
|
+
- Shell commands (`/dev-run-test`, `/dev-gen-test`) run **from within** `service_root`
|
|
209
216
|
- File write operations (test files, trace TSVs) use paths **relative to** `service_root`
|
|
210
217
|
|
|
211
218
|
**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).
|
|
@@ -298,7 +305,7 @@ active_module = tech_stack.module (e.g. "java-spring", "react", "flutter")
|
|
|
298
305
|
|
|
299
306
|
If `tech_stack.module` is blank or not recognized → set `platform_type = "unknown"` and flag as ⚠️ in the Step 7 recap.
|
|
300
307
|
|
|
301
|
-
These two variables (`active_module`, `platform_type`) are the canonical source for all branching logic in commands that need platform-specific behavior (
|
|
308
|
+
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).
|
|
302
309
|
|
|
303
310
|
---
|
|
304
311
|
|
|
@@ -809,9 +816,33 @@ After generating all test files, update `{paths.trace_dir}/{UC-ID}.tsv` — for
|
|
|
809
816
|
|--------|-------|
|
|
810
817
|
| `test_count` | number of test methods covering this SC |
|
|
811
818
|
| `test_classes` | comma-separated test class / describe-block names |
|
|
819
|
+
| `dev_selftest` | `not_run` (tests now exist but have not been executed — `/dev-run-test` sets pass/fail) |
|
|
812
820
|
| `last_updated` | today `YYYY-MM-DD` |
|
|
813
821
|
|
|
814
|
-
Leave all other columns unchanged.
|
|
822
|
+
Leave all other columns unchanged (including `dev_selftest_at`, which `/dev-run-test` owns).
|
|
823
|
+
|
|
824
|
+
---
|
|
825
|
+
|
|
826
|
+
## Refresh Panel Mirror
|
|
827
|
+
# Refresh Living Docs panel mirror *(local, umbrella mode)*
|
|
828
|
+
|
|
829
|
+
*Skip entirely in single-service mode (no `services` and no `setup.spec_source`) — there
|
|
830
|
+
the service `.trace/` IS the panel location, so nothing to mirror.*
|
|
831
|
+
|
|
832
|
+
After updating the authoritative service TSV(s) at `{paths.trace_dir}`:
|
|
833
|
+
|
|
834
|
+
1. Resolve `panel_mirror = ./.trace` at the **current workspace root** (where this command runs).
|
|
835
|
+
2. If `panel_mirror` resolves to a different path than `{paths.trace_dir}`, copy each
|
|
836
|
+
just-updated `{UC-ID}.tsv` → `{panel_mirror}/{service-name}/{UC-ID}.tsv`
|
|
837
|
+
(create the dir; overwrite). Use `active_service` for `{service-name}`.
|
|
838
|
+
|
|
839
|
+
This keeps the open workspace's Living Docs panel current **between syncs** — it is a
|
|
840
|
+
**local convenience mirror only**. The *canonical* report in the spec module
|
|
841
|
+
(`{spec_source}/.living-docs/`) and the merged `trace-report.json` are rebuilt by
|
|
842
|
+
`/sync` or `/validate-traces` (those need every service's data, so a single per-UC
|
|
843
|
+
command cannot produce them). For orchestrated commands, do this once in the orchestrator
|
|
844
|
+
after all sub-agents return — not inside each sub-agent.
|
|
845
|
+
|
|
815
846
|
|
|
816
847
|
---
|
|
817
848
|
|
|
@@ -855,13 +886,13 @@ Suggest the logical next command based on workflow phase:
|
|
|
855
886
|
| /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
|
|
856
887
|
| /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
|
|
857
888
|
| /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
|
|
858
|
-
| /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/
|
|
859
|
-
| /
|
|
860
|
-
| /run-
|
|
861
|
-
| /run-
|
|
862
|
-
| /review-code | `/smoke-test {UC-ID}` or create PR |
|
|
863
|
-
| /smoke-test | Create PR and link to ticket |
|
|
864
|
-
| /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/
|
|
889
|
+
| /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
|
|
890
|
+
| /dev-gen-test | `/dev-run-test {UC-ID}` |
|
|
891
|
+
| /dev-run-test (passing) | `/review-code {UC-ID}` |
|
|
892
|
+
| /dev-run-test (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
|
|
893
|
+
| /review-code | `/dev-smoke-test {UC-ID}` or create PR |
|
|
894
|
+
| /dev-smoke-test | Create PR and link to ticket |
|
|
895
|
+
| /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; all OK → create PR |
|
|
865
896
|
| /fix-bug | Create PR and link to ticket |
|
|
866
897
|
| /debug | `/fix-bug {ticket-id}` if fix needed |
|
|
867
898
|
| /report-bug | Send to dev (`/fix-bug {BUG-ID}`); if coverage gap → `/propose-scenario {UC-ID}` |
|
|
@@ -880,9 +911,11 @@ Next : {suggested command with example arguments}
|
|
|
880
911
|
|
|
881
912
|
|
|
882
913
|
```
|
|
883
|
-
/
|
|
914
|
+
/dev-gen-test Complete — {UC-ID} ({active_module})
|
|
884
915
|
✅ {TestClass1} ({N} tests)
|
|
885
916
|
✅ {TestClass2} ({N} tests)
|
|
886
917
|
Trace: {paths.trace_dir}/{UC-ID}.tsv updated
|
|
887
|
-
Next: /run-
|
|
918
|
+
Next: /dev-run-test {UC-ID}
|
|
919
|
+
|
|
920
|
+
📊 Living Docs: run /validate-traces (or /sync) to push this trace to the spec-module dashboard.
|
|
888
921
|
```
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
# /
|
|
1
|
+
# /dev-gen-test — Generate Dev Self-Check Tests
|
|
2
|
+
|
|
3
|
+
> **Scope — dev self-check (smoke), not the official test suite.** These tests let the
|
|
4
|
+
> developer quickly verify their own generated code against the BDD scenarios. They are a
|
|
5
|
+
> developer self-check, **not** the QC/dev-team's authoritative test suite (that has its
|
|
6
|
+
> own separate flow, implemented elsewhere). Results surface to the Living Docs dashboard
|
|
7
|
+
> as a **dev self-test** signal so QC can see the dev already ran their own checks.
|
|
2
8
|
|
|
3
9
|
## Gate
|
|
4
10
|
{{include:steps/gate.md}}
|
|
@@ -457,9 +463,15 @@ After generating all test files, update `{paths.trace_dir}/{UC-ID}.tsv` — for
|
|
|
457
463
|
|--------|-------|
|
|
458
464
|
| `test_count` | number of test methods covering this SC |
|
|
459
465
|
| `test_classes` | comma-separated test class / describe-block names |
|
|
466
|
+
| `dev_selftest` | `not_run` (tests now exist but have not been executed — `/dev-run-test` sets pass/fail) |
|
|
460
467
|
| `last_updated` | today `YYYY-MM-DD` |
|
|
461
468
|
|
|
462
|
-
Leave all other columns unchanged.
|
|
469
|
+
Leave all other columns unchanged (including `dev_selftest_at`, which `/dev-run-test` owns).
|
|
470
|
+
|
|
471
|
+
---
|
|
472
|
+
|
|
473
|
+
## Refresh Panel Mirror
|
|
474
|
+
{{include:steps/trace-mirror.md}}
|
|
463
475
|
|
|
464
476
|
---
|
|
465
477
|
|
|
@@ -468,9 +480,11 @@ Leave all other columns unchanged.
|
|
|
468
480
|
{{include:steps/report-footer.md}}
|
|
469
481
|
|
|
470
482
|
```
|
|
471
|
-
/
|
|
483
|
+
/dev-gen-test Complete — {UC-ID} ({active_module})
|
|
472
484
|
✅ {TestClass1} ({N} tests)
|
|
473
485
|
✅ {TestClass2} ({N} tests)
|
|
474
486
|
Trace: {paths.trace_dir}/{UC-ID}.tsv updated
|
|
475
|
-
Next: /run-
|
|
487
|
+
Next: /dev-run-test {UC-ID}
|
|
488
|
+
|
|
489
|
+
📊 Living Docs: run /validate-traces (or /sync) to push this trace to the spec-module dashboard.
|
|
476
490
|
```
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
# /run-
|
|
1
|
+
# /dev-run-test — Run Dev Self-Check Tests & Report Results
|
|
2
|
+
|
|
3
|
+
> **Scope — dev self-check (smoke), not the official test suite.** Runs the tests produced
|
|
4
|
+
> by `/dev-gen-test` so the developer can confirm their own code works before review. This
|
|
5
|
+
> is a developer self-check, **not** the QC/dev-team's authoritative test run (separate flow).
|
|
6
|
+
> The pass/fail is published to Living Docs as a **dev self-test** signal — it tells QC the
|
|
7
|
+
> dev ran their checks; it is NOT a statement of official test coverage.
|
|
2
8
|
|
|
3
9
|
## Gate
|
|
4
10
|
# Gate — Universal Entry Procedure
|
|
@@ -163,7 +169,7 @@ If `services` section is present:
|
|
|
163
169
|
|
|
164
170
|
**2. Route to service** — if active domain matches a key in `services`:
|
|
165
171
|
- Override `paths.specs_dir` → `services.{domain}.specs_dir`
|
|
166
|
-
- Override `paths.tech_docs_dir` → `services.{domain}.tech_docs_dir`
|
|
172
|
+
- Override `paths.tech_docs_dir` → `services.{domain}.tech_docs_dir` — **only if `setup.spec_source` is NOT set.** When `spec_source` IS set, the tech-design (API contract) is a cross-team artifact and must live in the shared spec repo (handled in step 4), so leave `tech_docs_dir` for step 4 to route — do NOT pin it per-service here.
|
|
167
173
|
- Store `active_service` = `services.{domain}.path`
|
|
168
174
|
- Store `active_service_module` = `services.{domain}.module`
|
|
169
175
|
- If service has its own `module` → use it as `active_module` (overrides `tech_stack.module`)
|
|
@@ -175,13 +181,14 @@ If `services` section is present:
|
|
|
175
181
|
**4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
|
|
176
182
|
- Override `paths.prd_dir` → `{spec_source}/specs/prd`
|
|
177
183
|
- Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
|
|
184
|
+
- 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.)*
|
|
178
185
|
- Override `paths.domain_knowledge_dir` → `{spec_source}/specs/domain-knowledge`
|
|
179
186
|
- Override `paths.business_dictionary` → `{spec_source}/specs/domain-knowledge/business-dictionary.md`
|
|
180
187
|
- Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
|
|
181
188
|
- Override `paths.bug_reports_dir` → `{spec_source}/feedback/bug-reports`
|
|
182
189
|
- Override `paths.bdd_proposals_dir` → `{spec_source}/feedback/bdd-proposals`
|
|
183
190
|
|
|
184
|
-
> **Why under `spec_source`:**
|
|
191
|
+
> **Why under `spec_source`:** PRD, design-spec, domain knowledge, the **API contract (tech-docs)**, and tester feedback are all **cross-team artifacts** — they must live in the **shared spec repo** so every umbrella (FE/App/BE) reads the same source via `/sync`. Tech-docs specifically: BE authors the tech-design (API contract), commits + pushes it into the spec submodule (2-layer commit), and FE/App pull it on their next `/sync` to wire the real API in `/generate-code --phase=integration`. In single-service mode (no `spec_source`), these default under the repo root — still shared, same repo.
|
|
185
192
|
|
|
186
193
|
---
|
|
187
194
|
|
|
@@ -205,7 +212,7 @@ When `active_service` has been resolved to a real path in Step 1.5 (e.g., `user-
|
|
|
205
212
|
| `paths.specs_dir` | `{active_service}/{service paths.specs_dir}` (if set in service config, else keep Step 1.5 override) |
|
|
206
213
|
|
|
207
214
|
**3. Store** `service_root = {active_service}` as the working directory anchor for all downstream commands:
|
|
208
|
-
- Shell commands (`/run-
|
|
215
|
+
- Shell commands (`/dev-run-test`, `/dev-gen-test`) run **from within** `service_root`
|
|
209
216
|
- File write operations (test files, trace TSVs) use paths **relative to** `service_root`
|
|
210
217
|
|
|
211
218
|
**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).
|
|
@@ -298,7 +305,7 @@ active_module = tech_stack.module (e.g. "java-spring", "react", "flutter")
|
|
|
298
305
|
|
|
299
306
|
If `tech_stack.module` is blank or not recognized → set `platform_type = "unknown"` and flag as ⚠️ in the Step 7 recap.
|
|
300
307
|
|
|
301
|
-
These two variables (`active_module`, `platform_type`) are the canonical source for all branching logic in commands that need platform-specific behavior (
|
|
308
|
+
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).
|
|
302
309
|
|
|
303
310
|
---
|
|
304
311
|
|
|
@@ -522,6 +529,44 @@ xcodebuild test -scheme {Scheme} -destination 'platform=iOS Simulator,name=iPhon
|
|
|
522
529
|
|
|
523
530
|
---
|
|
524
531
|
|
|
532
|
+
## Write Trace State
|
|
533
|
+
|
|
534
|
+
After the run, persist results to the **authoritative TSV** in the service so they reach
|
|
535
|
+
the Living Docs report at the spec module (via `/sync` + `/validate-traces`). The test
|
|
536
|
+
files themselves stay in the service — only the run *status* is reported.
|
|
537
|
+
|
|
538
|
+
Update `{paths.trace_dir}/{UC-ID}.tsv` — for each scenario row (matched by `sc_id` via its
|
|
539
|
+
test's `@trace.verifies={UC-ID}-SC{N}` tag):
|
|
540
|
+
|
|
541
|
+
| Column | Value |
|
|
542
|
+
|--------|-------|
|
|
543
|
+
| `dev_selftest` | `pass` if all tests for this SC passed · `fail` if any failed · `not_run` if its tests were skipped/absent |
|
|
544
|
+
| `dev_selftest_at` | today `YYYY-MM-DD` |
|
|
545
|
+
|
|
546
|
+
Leave all other columns unchanged. `dev_selftest`/`dev_selftest_at` are orthogonal to `status`
|
|
547
|
+
(OK/GAP/DRIFT/UNTRACKED): `status` tracks *coverage*, `dev_selftest` tracks the latest *run result*.
|
|
548
|
+
|
|
549
|
+
## Refresh Panel Mirror
|
|
550
|
+
# Refresh Living Docs panel mirror *(local, umbrella mode)*
|
|
551
|
+
|
|
552
|
+
*Skip entirely in single-service mode (no `services` and no `setup.spec_source`) — there
|
|
553
|
+
the service `.trace/` IS the panel location, so nothing to mirror.*
|
|
554
|
+
|
|
555
|
+
After updating the authoritative service TSV(s) at `{paths.trace_dir}`:
|
|
556
|
+
|
|
557
|
+
1. Resolve `panel_mirror = ./.trace` at the **current workspace root** (where this command runs).
|
|
558
|
+
2. If `panel_mirror` resolves to a different path than `{paths.trace_dir}`, copy each
|
|
559
|
+
just-updated `{UC-ID}.tsv` → `{panel_mirror}/{service-name}/{UC-ID}.tsv`
|
|
560
|
+
(create the dir; overwrite). Use `active_service` for `{service-name}`.
|
|
561
|
+
|
|
562
|
+
This keeps the open workspace's Living Docs panel current **between syncs** — it is a
|
|
563
|
+
**local convenience mirror only**. The *canonical* report in the spec module
|
|
564
|
+
(`{spec_source}/.living-docs/`) and the merged `trace-report.json` are rebuilt by
|
|
565
|
+
`/sync` or `/validate-traces` (those need every service's data, so a single per-UC
|
|
566
|
+
command cannot produce them). For orchestrated commands, do this once in the orchestrator
|
|
567
|
+
after all sub-agents return — not inside each sub-agent.
|
|
568
|
+
|
|
569
|
+
|
|
525
570
|
## Output
|
|
526
571
|
|
|
527
572
|
# Report Footer — Standard Command Output Format
|
|
@@ -562,13 +607,13 @@ Suggest the logical next command based on workflow phase:
|
|
|
562
607
|
| /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
|
|
563
608
|
| /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
|
|
564
609
|
| /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
|
|
565
|
-
| /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/
|
|
566
|
-
| /
|
|
567
|
-
| /run-
|
|
568
|
-
| /run-
|
|
569
|
-
| /review-code | `/smoke-test {UC-ID}` or create PR |
|
|
570
|
-
| /smoke-test | Create PR and link to ticket |
|
|
571
|
-
| /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/
|
|
610
|
+
| /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
|
|
611
|
+
| /dev-gen-test | `/dev-run-test {UC-ID}` |
|
|
612
|
+
| /dev-run-test (passing) | `/review-code {UC-ID}` |
|
|
613
|
+
| /dev-run-test (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
|
|
614
|
+
| /review-code | `/dev-smoke-test {UC-ID}` or create PR |
|
|
615
|
+
| /dev-smoke-test | Create PR and link to ticket |
|
|
616
|
+
| /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; all OK → create PR |
|
|
572
617
|
| /fix-bug | Create PR and link to ticket |
|
|
573
618
|
| /debug | `/fix-bug {ticket-id}` if fix needed |
|
|
574
619
|
| /report-bug | Send to dev (`/fix-bug {BUG-ID}`); if coverage gap → `/propose-scenario {UC-ID}` |
|
|
@@ -587,7 +632,7 @@ Next : {suggested command with example arguments}
|
|
|
587
632
|
|
|
588
633
|
|
|
589
634
|
```
|
|
590
|
-
/run-
|
|
635
|
+
/dev-run-test Report — {UC-ID} ({active_module})
|
|
591
636
|
✅ Passed: {N} | ❌ Failed: {M} | ⏭️ Skipped: {K} | Duration: {X}s
|
|
592
637
|
|
|
593
638
|
## Failed Tests
|
|
@@ -597,7 +642,11 @@ Next : {suggested command with example arguments}
|
|
|
597
642
|
## Recommendations
|
|
598
643
|
{specific fix per failure}
|
|
599
644
|
|
|
645
|
+
Trace: {paths.trace_dir}/{UC-ID}.tsv updated (dev_selftest, dev_selftest_at)
|
|
646
|
+
|
|
600
647
|
Next:
|
|
601
648
|
All tests pass → /review-code {UC-ID}
|
|
602
649
|
Tests fail → /fix-bug {TICKET_ID} (real bug) or fix test (wrong expectation)
|
|
650
|
+
|
|
651
|
+
📊 Living Docs: run /validate-traces (or /sync) to push this trace to the spec-module dashboard.
|
|
603
652
|
```
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
# /run-
|
|
1
|
+
# /dev-run-test — Run Dev Self-Check Tests & Report Results
|
|
2
|
+
|
|
3
|
+
> **Scope — dev self-check (smoke), not the official test suite.** Runs the tests produced
|
|
4
|
+
> by `/dev-gen-test` so the developer can confirm their own code works before review. This
|
|
5
|
+
> is a developer self-check, **not** the QC/dev-team's authoritative test run (separate flow).
|
|
6
|
+
> The pass/fail is published to Living Docs as a **dev self-test** signal — it tells QC the
|
|
7
|
+
> dev ran their checks; it is NOT a statement of official test coverage.
|
|
2
8
|
|
|
3
9
|
## Gate
|
|
4
10
|
{{include:steps/gate.md}}
|
|
@@ -170,12 +176,32 @@ xcodebuild test -scheme {Scheme} -destination 'platform=iOS Simulator,name=iPhon
|
|
|
170
176
|
|
|
171
177
|
---
|
|
172
178
|
|
|
179
|
+
## Write Trace State
|
|
180
|
+
|
|
181
|
+
After the run, persist results to the **authoritative TSV** in the service so they reach
|
|
182
|
+
the Living Docs report at the spec module (via `/sync` + `/validate-traces`). The test
|
|
183
|
+
files themselves stay in the service — only the run *status* is reported.
|
|
184
|
+
|
|
185
|
+
Update `{paths.trace_dir}/{UC-ID}.tsv` — for each scenario row (matched by `sc_id` via its
|
|
186
|
+
test's `@trace.verifies={UC-ID}-SC{N}` tag):
|
|
187
|
+
|
|
188
|
+
| Column | Value |
|
|
189
|
+
|--------|-------|
|
|
190
|
+
| `dev_selftest` | `pass` if all tests for this SC passed · `fail` if any failed · `not_run` if its tests were skipped/absent |
|
|
191
|
+
| `dev_selftest_at` | today `YYYY-MM-DD` |
|
|
192
|
+
|
|
193
|
+
Leave all other columns unchanged. `dev_selftest`/`dev_selftest_at` are orthogonal to `status`
|
|
194
|
+
(OK/GAP/DRIFT/UNTRACKED): `status` tracks *coverage*, `dev_selftest` tracks the latest *run result*.
|
|
195
|
+
|
|
196
|
+
## Refresh Panel Mirror
|
|
197
|
+
{{include:steps/trace-mirror.md}}
|
|
198
|
+
|
|
173
199
|
## Output
|
|
174
200
|
|
|
175
201
|
{{include:steps/report-footer.md}}
|
|
176
202
|
|
|
177
203
|
```
|
|
178
|
-
/run-
|
|
204
|
+
/dev-run-test Report — {UC-ID} ({active_module})
|
|
179
205
|
✅ Passed: {N} | ❌ Failed: {M} | ⏭️ Skipped: {K} | Duration: {X}s
|
|
180
206
|
|
|
181
207
|
## Failed Tests
|
|
@@ -185,7 +211,11 @@ xcodebuild test -scheme {Scheme} -destination 'platform=iOS Simulator,name=iPhon
|
|
|
185
211
|
## Recommendations
|
|
186
212
|
{specific fix per failure}
|
|
187
213
|
|
|
214
|
+
Trace: {paths.trace_dir}/{UC-ID}.tsv updated (dev_selftest, dev_selftest_at)
|
|
215
|
+
|
|
188
216
|
Next:
|
|
189
217
|
All tests pass → /review-code {UC-ID}
|
|
190
218
|
Tests fail → /fix-bug {TICKET_ID} (real bug) or fix test (wrong expectation)
|
|
219
|
+
|
|
220
|
+
📊 Living Docs: run /validate-traces (or /sync) to push this trace to the spec-module dashboard.
|
|
191
221
|
```
|