@anhth2/spec-driven-dev-plugin 0.9.2 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ARCHITECTURE.md +20 -9
- package/commands/debug.md +12 -12
- package/commands/define-product.md +11 -11
- package/commands/{generate-tests.md → dev-gen-test.md} +47 -15
- package/commands/{generate-tests.tmpl → dev-gen-test.tmpl} +18 -4
- package/{core/commands/run-tests.md → commands/dev-run-test.md} +61 -13
- package/commands/{run-tests.tmpl → dev-run-test.tmpl} +32 -2
- package/{core/commands/smoke-test.md → commands/dev-smoke-test.md} +16 -16
- package/commands/{smoke-test.tmpl → dev-smoke-test.tmpl} +5 -5
- package/commands/fix-bug.md +12 -12
- package/commands/generate-bdd.md +38 -13
- package/commands/generate-bdd.tmpl +9 -2
- package/commands/generate-code.md +85 -15
- package/commands/generate-code.tmpl +56 -4
- package/commands/generate-design-spec.md +104 -39
- package/commands/generate-design-spec.tmpl +93 -28
- package/commands/generate-prd.md +11 -11
- package/commands/generate-spec-manifest.md +11 -11
- package/commands/generate-tech-docs.md +12 -12
- package/commands/generate-tech-docs.tmpl +1 -1
- package/commands/learn.md +12 -12
- package/commands/propose-scenario.md +12 -12
- package/commands/propose-scenario.tmpl +1 -1
- package/commands/refine-prd.md +165 -16
- package/commands/refine-prd.tmpl +16 -5
- package/commands/report-bug.md +11 -11
- package/commands/review-code.md +13 -13
- package/commands/review-code.tmpl +1 -1
- package/commands/review-context.md +160 -12
- package/commands/review-context.tmpl +11 -1
- package/commands/review-tech-docs.md +11 -11
- 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 +56 -37
- package/commands/validate-traces.tmpl +45 -26
- package/core/FRAMEWORK_VERSION +1 -1
- package/core/commands/debug.md +12 -12
- package/core/commands/define-product.md +11 -11
- package/core/commands/{generate-tests.md → dev-gen-test.md} +47 -15
- package/{commands/run-tests.md → core/commands/dev-run-test.md} +61 -13
- package/{commands/smoke-test.md → core/commands/dev-smoke-test.md} +16 -16
- package/core/commands/fix-bug.md +12 -12
- package/core/commands/generate-bdd.md +38 -13
- package/core/commands/generate-code.md +85 -15
- package/core/commands/generate-design-spec.md +104 -39
- package/core/commands/generate-prd.md +11 -11
- package/core/commands/generate-spec-manifest.md +11 -11
- package/core/commands/generate-tech-docs.md +12 -12
- package/core/commands/learn.md +12 -12
- package/core/commands/propose-scenario.md +12 -12
- package/core/commands/refine-prd.md +165 -16
- package/core/commands/report-bug.md +11 -11
- package/core/commands/review-code.md +13 -13
- package/core/commands/review-context.md +160 -12
- package/core/commands/review-tech-docs.md +11 -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 +56 -37
- package/core/skills/code/SKILL.md +18 -18
- package/core/skills/debug/SKILL.md +26 -26
- package/core/skills/design-spec/SKILL.md +11 -11
- package/core/skills/discovery/SKILL.md +11 -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 +38 -38
- package/core/steps/capture-lesson.md +1 -1
- package/core/steps/context-loader.md +4 -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/package.json +1 -1
- package/skills/code/SKILL.md +18 -18
- package/skills/debug/SKILL.md +26 -26
- package/skills/debug/SKILL.tmpl +1 -1
- package/skills/design-spec/SKILL.md +11 -11
- package/skills/discovery/SKILL.md +11 -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 +38 -38
- package/skills/test/SKILL.tmpl +9 -9
- package/steps/capture-lesson.md +1 -1
- package/steps/context-loader.md +4 -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
|
@@ -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,7 +181,7 @@ 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`
|
|
178
|
-
- Override `paths.tech_docs_dir` → `{spec_source}/specs/tech-docs` — **
|
|
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.)*
|
|
179
185
|
- Override `paths.domain_knowledge_dir` → `{spec_source}/specs/domain-knowledge`
|
|
180
186
|
- Override `paths.business_dictionary` → `{spec_source}/specs/domain-knowledge/business-dictionary.md`
|
|
181
187
|
- Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
|
|
@@ -206,7 +212,7 @@ When `active_service` has been resolved to a real path in Step 1.5 (e.g., `user-
|
|
|
206
212
|
| `paths.specs_dir` | `{active_service}/{service paths.specs_dir}` (if set in service config, else keep Step 1.5 override) |
|
|
207
213
|
|
|
208
214
|
**3. Store** `service_root = {active_service}` as the working directory anchor for all downstream commands:
|
|
209
|
-
- Shell commands (`/run-
|
|
215
|
+
- Shell commands (`/dev-run-test`, `/dev-gen-test`) run **from within** `service_root`
|
|
210
216
|
- File write operations (test files, trace TSVs) use paths **relative to** `service_root`
|
|
211
217
|
|
|
212
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).
|
|
@@ -299,7 +305,7 @@ active_module = tech_stack.module (e.g. "java-spring", "react", "flutter")
|
|
|
299
305
|
|
|
300
306
|
If `tech_stack.module` is blank or not recognized → set `platform_type = "unknown"` and flag as ⚠️ in the Step 7 recap.
|
|
301
307
|
|
|
302
|
-
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).
|
|
303
309
|
|
|
304
310
|
---
|
|
305
311
|
|
|
@@ -523,6 +529,44 @@ xcodebuild test -scheme {Scheme} -destination 'platform=iOS Simulator,name=iPhon
|
|
|
523
529
|
|
|
524
530
|
---
|
|
525
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
|
+
|
|
526
570
|
## Output
|
|
527
571
|
|
|
528
572
|
# Report Footer — Standard Command Output Format
|
|
@@ -563,13 +607,13 @@ Suggest the logical next command based on workflow phase:
|
|
|
563
607
|
| /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
|
|
564
608
|
| /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
|
|
565
609
|
| /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
|
|
566
|
-
| /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/
|
|
567
|
-
| /
|
|
568
|
-
| /run-
|
|
569
|
-
| /run-
|
|
570
|
-
| /review-code | `/smoke-test {UC-ID}` or create PR |
|
|
571
|
-
| /smoke-test | Create PR and link to ticket |
|
|
572
|
-
| /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 |
|
|
573
617
|
| /fix-bug | Create PR and link to ticket |
|
|
574
618
|
| /debug | `/fix-bug {ticket-id}` if fix needed |
|
|
575
619
|
| /report-bug | Send to dev (`/fix-bug {BUG-ID}`); if coverage gap → `/propose-scenario {UC-ID}` |
|
|
@@ -588,7 +632,7 @@ Next : {suggested command with example arguments}
|
|
|
588
632
|
|
|
589
633
|
|
|
590
634
|
```
|
|
591
|
-
/run-
|
|
635
|
+
/dev-run-test Report — {UC-ID} ({active_module})
|
|
592
636
|
✅ Passed: {N} | ❌ Failed: {M} | ⏭️ Skipped: {K} | Duration: {X}s
|
|
593
637
|
|
|
594
638
|
## Failed Tests
|
|
@@ -598,7 +642,11 @@ Next : {suggested command with example arguments}
|
|
|
598
642
|
## Recommendations
|
|
599
643
|
{specific fix per failure}
|
|
600
644
|
|
|
645
|
+
Trace: {paths.trace_dir}/{UC-ID}.tsv updated (dev_selftest, dev_selftest_at)
|
|
646
|
+
|
|
601
647
|
Next:
|
|
602
648
|
All tests pass → /review-code {UC-ID}
|
|
603
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.
|
|
604
652
|
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# /smoke-test — Smoke Test Live Service or App
|
|
1
|
+
# /dev-smoke-test — Smoke Test Live Service or App
|
|
2
2
|
|
|
3
|
-
Use when service/app is **already running**. Different from `/run-
|
|
3
|
+
Use when service/app is **already running**. Different from `/dev-run-test` (no live server needed).
|
|
4
4
|
|
|
5
5
|
## Gate
|
|
6
6
|
# Gate — Universal Entry Procedure
|
|
@@ -165,7 +165,7 @@ If `services` section is present:
|
|
|
165
165
|
|
|
166
166
|
**2. Route to service** — if active domain matches a key in `services`:
|
|
167
167
|
- Override `paths.specs_dir` → `services.{domain}.specs_dir`
|
|
168
|
-
- Override `paths.tech_docs_dir` → `services.{domain}.tech_docs_dir`
|
|
168
|
+
- Override `paths.tech_docs_dir` → `services.{domain}.tech_docs_dir` — **only if `setup.spec_source` is NOT set.** When `spec_source` IS set, the tech-design (API contract) is a cross-team artifact and must live in the shared spec repo (handled in step 4), so leave `tech_docs_dir` for step 4 to route — do NOT pin it per-service here.
|
|
169
169
|
- Store `active_service` = `services.{domain}.path`
|
|
170
170
|
- Store `active_service_module` = `services.{domain}.module`
|
|
171
171
|
- If service has its own `module` → use it as `active_module` (overrides `tech_stack.module`)
|
|
@@ -177,7 +177,7 @@ If `services` section is present:
|
|
|
177
177
|
**4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
|
|
178
178
|
- Override `paths.prd_dir` → `{spec_source}/specs/prd`
|
|
179
179
|
- Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
|
|
180
|
-
- Override `paths.tech_docs_dir` → `{spec_source}/specs/tech-docs` — **
|
|
180
|
+
- Override `paths.tech_docs_dir` → `{spec_source}/specs/tech-docs` — **always when `spec_source` is set** (step 2 no longer pins tech-docs per-service in this case). The tech-design IS the cross-team API contract: BE authors it here, and FE/App read it from the same spec submodule at `/generate-code --phase=integration`. *(Per-service tech-docs only happen when there is no `spec_source` — a pure multi-service BE repo with no shared spec module.)*
|
|
181
181
|
- Override `paths.domain_knowledge_dir` → `{spec_source}/specs/domain-knowledge`
|
|
182
182
|
- Override `paths.business_dictionary` → `{spec_source}/specs/domain-knowledge/business-dictionary.md`
|
|
183
183
|
- Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
|
|
@@ -208,7 +208,7 @@ When `active_service` has been resolved to a real path in Step 1.5 (e.g., `user-
|
|
|
208
208
|
| `paths.specs_dir` | `{active_service}/{service paths.specs_dir}` (if set in service config, else keep Step 1.5 override) |
|
|
209
209
|
|
|
210
210
|
**3. Store** `service_root = {active_service}` as the working directory anchor for all downstream commands:
|
|
211
|
-
- Shell commands (`/run-
|
|
211
|
+
- Shell commands (`/dev-run-test`, `/dev-gen-test`) run **from within** `service_root`
|
|
212
212
|
- File write operations (test files, trace TSVs) use paths **relative to** `service_root`
|
|
213
213
|
|
|
214
214
|
**4. If service config not found** — keep umbrella defaults, still set `service_root = {active_service}` (path anchor is always needed even without a config override).
|
|
@@ -301,7 +301,7 @@ active_module = tech_stack.module (e.g. "java-spring", "react", "flutter")
|
|
|
301
301
|
|
|
302
302
|
If `tech_stack.module` is blank or not recognized → set `platform_type = "unknown"` and flag as ⚠️ in the Step 7 recap.
|
|
303
303
|
|
|
304
|
-
These two variables (`active_module`, `platform_type`) are the canonical source for all branching logic in commands that need platform-specific behavior (
|
|
304
|
+
These two variables (`active_module`, `platform_type`) are the canonical source for all branching logic in commands that need platform-specific behavior (dev-gen-test, debug, fix-bug, dev-smoke-test).
|
|
305
305
|
|
|
306
306
|
---
|
|
307
307
|
|
|
@@ -367,7 +367,7 @@ Proceed to the next step of the calling command.
|
|
|
367
367
|
|
|
368
368
|
## Service Detection
|
|
369
369
|
|
|
370
|
-
Read `active_module` from context. Use to select the correct smoke-test approach.
|
|
370
|
+
Read `active_module` from context. Use to select the correct dev-smoke-test approach.
|
|
371
371
|
|
|
372
372
|
| Platform | Modules |
|
|
373
373
|
|---|---|
|
|
@@ -527,7 +527,7 @@ npx react-native run-ios # build + install on iOS simulator
|
|
|
527
527
|
# Open Xcode → select simulator → Product → Run
|
|
528
528
|
```
|
|
529
529
|
|
|
530
|
-
### Phase 2 — Manual smoke-test checklist
|
|
530
|
+
### Phase 2 — Manual dev-smoke-test checklist
|
|
531
531
|
|
|
532
532
|
For the UC under test, verify on device:
|
|
533
533
|
1. Navigate to the screen for this UC
|
|
@@ -592,13 +592,13 @@ Suggest the logical next command based on workflow phase:
|
|
|
592
592
|
| /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
|
|
593
593
|
| /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
|
|
594
594
|
| /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
|
|
595
|
-
| /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/
|
|
596
|
-
| /
|
|
597
|
-
| /run-
|
|
598
|
-
| /run-
|
|
599
|
-
| /review-code | `/smoke-test {UC-ID}` or create PR |
|
|
600
|
-
| /smoke-test | Create PR and link to ticket |
|
|
601
|
-
| /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/
|
|
595
|
+
| /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
|
|
596
|
+
| /dev-gen-test | `/dev-run-test {UC-ID}` |
|
|
597
|
+
| /dev-run-test (passing) | `/review-code {UC-ID}` |
|
|
598
|
+
| /dev-run-test (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
|
|
599
|
+
| /review-code | `/dev-smoke-test {UC-ID}` or create PR |
|
|
600
|
+
| /dev-smoke-test | Create PR and link to ticket |
|
|
601
|
+
| /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; all OK → create PR |
|
|
602
602
|
| /fix-bug | Create PR and link to ticket |
|
|
603
603
|
| /debug | `/fix-bug {ticket-id}` if fix needed |
|
|
604
604
|
| /report-bug | Send to dev (`/fix-bug {BUG-ID}`); if coverage gap → `/propose-scenario {UC-ID}` |
|
|
@@ -617,7 +617,7 @@ Next : {suggested command with example arguments}
|
|
|
617
617
|
|
|
618
618
|
|
|
619
619
|
```
|
|
620
|
-
/smoke-test Report — {UC-ID}
|
|
620
|
+
/dev-smoke-test Report — {UC-ID}
|
|
621
621
|
Platform: {backend | web-frontend | mobile}
|
|
622
622
|
| Endpoint / Flow | Status | Result |
|
|
623
623
|
|-----------------------|-------------|---------|
|
package/core/commands/fix-bug.md
CHANGED
|
@@ -163,7 +163,7 @@ If `services` section is present:
|
|
|
163
163
|
|
|
164
164
|
**2. Route to service** — if active domain matches a key in `services`:
|
|
165
165
|
- Override `paths.specs_dir` → `services.{domain}.specs_dir`
|
|
166
|
-
- Override `paths.tech_docs_dir` → `services.{domain}.tech_docs_dir`
|
|
166
|
+
- Override `paths.tech_docs_dir` → `services.{domain}.tech_docs_dir` — **only if `setup.spec_source` is NOT set.** When `spec_source` IS set, the tech-design (API contract) is a cross-team artifact and must live in the shared spec repo (handled in step 4), so leave `tech_docs_dir` for step 4 to route — do NOT pin it per-service here.
|
|
167
167
|
- Store `active_service` = `services.{domain}.path`
|
|
168
168
|
- Store `active_service_module` = `services.{domain}.module`
|
|
169
169
|
- If service has its own `module` → use it as `active_module` (overrides `tech_stack.module`)
|
|
@@ -175,7 +175,7 @@ If `services` section is present:
|
|
|
175
175
|
**4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
|
|
176
176
|
- Override `paths.prd_dir` → `{spec_source}/specs/prd`
|
|
177
177
|
- Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
|
|
178
|
-
- Override `paths.tech_docs_dir` → `{spec_source}/specs/tech-docs` — **
|
|
178
|
+
- Override `paths.tech_docs_dir` → `{spec_source}/specs/tech-docs` — **always when `spec_source` is set** (step 2 no longer pins tech-docs per-service in this case). The tech-design IS the cross-team API contract: BE authors it here, and FE/App read it from the same spec submodule at `/generate-code --phase=integration`. *(Per-service tech-docs only happen when there is no `spec_source` — a pure multi-service BE repo with no shared spec module.)*
|
|
179
179
|
- Override `paths.domain_knowledge_dir` → `{spec_source}/specs/domain-knowledge`
|
|
180
180
|
- Override `paths.business_dictionary` → `{spec_source}/specs/domain-knowledge/business-dictionary.md`
|
|
181
181
|
- Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
|
|
@@ -206,7 +206,7 @@ When `active_service` has been resolved to a real path in Step 1.5 (e.g., `user-
|
|
|
206
206
|
| `paths.specs_dir` | `{active_service}/{service paths.specs_dir}` (if set in service config, else keep Step 1.5 override) |
|
|
207
207
|
|
|
208
208
|
**3. Store** `service_root = {active_service}` as the working directory anchor for all downstream commands:
|
|
209
|
-
- Shell commands (`/run-
|
|
209
|
+
- Shell commands (`/dev-run-test`, `/dev-gen-test`) run **from within** `service_root`
|
|
210
210
|
- File write operations (test files, trace TSVs) use paths **relative to** `service_root`
|
|
211
211
|
|
|
212
212
|
**4. If service config not found** — keep umbrella defaults, still set `service_root = {active_service}` (path anchor is always needed even without a config override).
|
|
@@ -299,7 +299,7 @@ active_module = tech_stack.module (e.g. "java-spring", "react", "flutter")
|
|
|
299
299
|
|
|
300
300
|
If `tech_stack.module` is blank or not recognized → set `platform_type = "unknown"` and flag as ⚠️ in the Step 7 recap.
|
|
301
301
|
|
|
302
|
-
These two variables (`active_module`, `platform_type`) are the canonical source for all branching logic in commands that need platform-specific behavior (
|
|
302
|
+
These two variables (`active_module`, `platform_type`) are the canonical source for all branching logic in commands that need platform-specific behavior (dev-gen-test, debug, fix-bug, dev-smoke-test).
|
|
303
303
|
|
|
304
304
|
---
|
|
305
305
|
|
|
@@ -533,7 +533,7 @@ If `lessons_path` does not exist, create it with this header first:
|
|
|
533
533
|
| code-gen | /generate-code output |
|
|
534
534
|
| bdd | /generate-bdd output |
|
|
535
535
|
| tech-docs | /generate-tech-docs output |
|
|
536
|
-
| tests | /
|
|
536
|
+
| tests | /dev-gen-test output |
|
|
537
537
|
| prd | /generate-prd, /refine-prd output |
|
|
538
538
|
| general | every command |
|
|
539
539
|
|
|
@@ -598,13 +598,13 @@ Suggest the logical next command based on workflow phase:
|
|
|
598
598
|
| /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
|
|
599
599
|
| /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
|
|
600
600
|
| /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
|
|
601
|
-
| /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/
|
|
602
|
-
| /
|
|
603
|
-
| /run-
|
|
604
|
-
| /run-
|
|
605
|
-
| /review-code | `/smoke-test {UC-ID}` or create PR |
|
|
606
|
-
| /smoke-test | Create PR and link to ticket |
|
|
607
|
-
| /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/
|
|
601
|
+
| /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
|
|
602
|
+
| /dev-gen-test | `/dev-run-test {UC-ID}` |
|
|
603
|
+
| /dev-run-test (passing) | `/review-code {UC-ID}` |
|
|
604
|
+
| /dev-run-test (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
|
|
605
|
+
| /review-code | `/dev-smoke-test {UC-ID}` or create PR |
|
|
606
|
+
| /dev-smoke-test | Create PR and link to ticket |
|
|
607
|
+
| /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; all OK → create PR |
|
|
608
608
|
| /fix-bug | Create PR and link to ticket |
|
|
609
609
|
| /debug | `/fix-bug {ticket-id}` if fix needed |
|
|
610
610
|
| /report-bug | Send to dev (`/fix-bug {BUG-ID}`); if coverage gap → `/propose-scenario {UC-ID}` |
|
|
@@ -161,7 +161,7 @@ If `services` section is present:
|
|
|
161
161
|
|
|
162
162
|
**2. Route to service** — if active domain matches a key in `services`:
|
|
163
163
|
- Override `paths.specs_dir` → `services.{domain}.specs_dir`
|
|
164
|
-
- Override `paths.tech_docs_dir` → `services.{domain}.tech_docs_dir`
|
|
164
|
+
- 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.
|
|
165
165
|
- Store `active_service` = `services.{domain}.path`
|
|
166
166
|
- Store `active_service_module` = `services.{domain}.module`
|
|
167
167
|
- If service has its own `module` → use it as `active_module` (overrides `tech_stack.module`)
|
|
@@ -173,7 +173,7 @@ If `services` section is present:
|
|
|
173
173
|
**4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
|
|
174
174
|
- Override `paths.prd_dir` → `{spec_source}/specs/prd`
|
|
175
175
|
- Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
|
|
176
|
-
- Override `paths.tech_docs_dir` → `{spec_source}/specs/tech-docs` — **
|
|
176
|
+
- 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.)*
|
|
177
177
|
- Override `paths.domain_knowledge_dir` → `{spec_source}/specs/domain-knowledge`
|
|
178
178
|
- Override `paths.business_dictionary` → `{spec_source}/specs/domain-knowledge/business-dictionary.md`
|
|
179
179
|
- Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
|
|
@@ -204,7 +204,7 @@ When `active_service` has been resolved to a real path in Step 1.5 (e.g., `user-
|
|
|
204
204
|
| `paths.specs_dir` | `{active_service}/{service paths.specs_dir}` (if set in service config, else keep Step 1.5 override) |
|
|
205
205
|
|
|
206
206
|
**3. Store** `service_root = {active_service}` as the working directory anchor for all downstream commands:
|
|
207
|
-
- Shell commands (`/run-
|
|
207
|
+
- Shell commands (`/dev-run-test`, `/dev-gen-test`) run **from within** `service_root`
|
|
208
208
|
- File write operations (test files, trace TSVs) use paths **relative to** `service_root`
|
|
209
209
|
|
|
210
210
|
**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).
|
|
@@ -297,7 +297,7 @@ active_module = tech_stack.module (e.g. "java-spring", "react", "flutter")
|
|
|
297
297
|
|
|
298
298
|
If `tech_stack.module` is blank or not recognized → set `platform_type = "unknown"` and flag as ⚠️ in the Step 7 recap.
|
|
299
299
|
|
|
300
|
-
These two variables (`active_module`, `platform_type`) are the canonical source for all branching logic in commands that need platform-specific behavior (
|
|
300
|
+
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).
|
|
301
301
|
|
|
302
302
|
---
|
|
303
303
|
|
|
@@ -811,7 +811,7 @@ After generating all `.feature` files, create or update `{paths.trace_dir}/{UC-I
|
|
|
811
811
|
|
|
812
812
|
**TSV columns (tab-separated, one header row + one data row per scenario):**
|
|
813
813
|
```
|
|
814
|
-
sc_id\tsc_title\tspec_ver\tgen_ver\timplemented_by\ttest_count\ttest_classes\tprd_version\tbdd_version\ttech_doc_revision\tprd_status\tuc_status\tfe_phase\tstatus\tlast_updated
|
|
814
|
+
sc_id\tsc_title\tspec_ver\tgen_ver\timplemented_by\ttest_count\ttest_classes\tdev_selftest\tdev_selftest_at\tprd_version\tbdd_version\ttech_doc_revision\tprd_status\tuc_status\tfe_phase\tstatus\tlast_updated
|
|
815
815
|
```
|
|
816
816
|
|
|
817
817
|
**Rules:**
|
|
@@ -819,7 +819,7 @@ sc_id\tsc_title\tspec_ver\tgen_ver\timplemented_by\ttest_count\ttest_classes\tpr
|
|
|
819
819
|
- If file exists (re-generation) → for each SC in the new `.feature`:
|
|
820
820
|
- SC already in `.tsv` AND `spec_ver` is unchanged → update only: `sc_title`, `prd_version`, `bdd_version`, `prd_status`, `uc_status`, `last_updated`. Leave all other columns unchanged.
|
|
821
821
|
- SC already in `.tsv` AND `spec_ver` changed (scenario was modified) → update: `sc_title`, `spec_ver`, `prd_version`, `bdd_version`, `prd_status`, `uc_status`, `last_updated` AND set `status = DRIFT` immediately (so the TSV reflects drift without waiting for `/validate-traces`). Leave `gen_ver`, `implemented_by`, `test_count`, `test_classes`, `tech_doc_revision` unchanged.
|
|
822
|
-
- SC is new (added in this re-gen) → append new row with `gen_ver`, `implemented_by`, `test_count`, `test_classes`, `tech_doc_revision` all set to `—`.
|
|
822
|
+
- SC is new (added in this re-gen) → append new row with `gen_ver`, `implemented_by`, `test_count`, `test_classes`, `dev_selftest`, `dev_selftest_at`, `tech_doc_revision` all set to `—`.
|
|
823
823
|
- SC no longer in `.feature` (removed) → delete its row.
|
|
824
824
|
|
|
825
825
|
**Values to write for each scenario:**
|
|
@@ -833,6 +833,8 @@ sc_id\tsc_title\tspec_ver\tgen_ver\timplemented_by\ttest_count\ttest_classes\tpr
|
|
|
833
833
|
| `implemented_by` | `—` |
|
|
834
834
|
| `test_count` | `—` |
|
|
835
835
|
| `test_classes` | `—` |
|
|
836
|
+
| `dev_selftest` | `—` (no tests run yet) |
|
|
837
|
+
| `dev_selftest_at` | `—` |
|
|
836
838
|
| `prd_version` | `@trace.prd_version` from `.feature` header |
|
|
837
839
|
| `bdd_version` | `@trace.bdd_version` from `.feature` header |
|
|
838
840
|
| `tech_doc_revision` | `—` |
|
|
@@ -842,6 +844,27 @@ sc_id\tsc_title\tspec_ver\tgen_ver\timplemented_by\ttest_count\ttest_classes\tpr
|
|
|
842
844
|
| `status` | `UNTRACKED` |
|
|
843
845
|
| `last_updated` | today `YYYY-MM-DD` |
|
|
844
846
|
|
|
847
|
+
## Refresh Panel Mirror
|
|
848
|
+
# Refresh Living Docs panel mirror *(local, umbrella mode)*
|
|
849
|
+
|
|
850
|
+
*Skip entirely in single-service mode (no `services` and no `setup.spec_source`) — there
|
|
851
|
+
the service `.trace/` IS the panel location, so nothing to mirror.*
|
|
852
|
+
|
|
853
|
+
After updating the authoritative service TSV(s) at `{paths.trace_dir}`:
|
|
854
|
+
|
|
855
|
+
1. Resolve `panel_mirror = ./.trace` at the **current workspace root** (where this command runs).
|
|
856
|
+
2. If `panel_mirror` resolves to a different path than `{paths.trace_dir}`, copy each
|
|
857
|
+
just-updated `{UC-ID}.tsv` → `{panel_mirror}/{service-name}/{UC-ID}.tsv`
|
|
858
|
+
(create the dir; overwrite). Use `active_service` for `{service-name}`.
|
|
859
|
+
|
|
860
|
+
This keeps the open workspace's Living Docs panel current **between syncs** — it is a
|
|
861
|
+
**local convenience mirror only**. The *canonical* report in the spec module
|
|
862
|
+
(`{spec_source}/.living-docs/`) and the merged `trace-report.json` are rebuilt by
|
|
863
|
+
`/sync` or `/validate-traces` (those need every service's data, so a single per-UC
|
|
864
|
+
command cannot produce them). For orchestrated commands, do this once in the orchestrator
|
|
865
|
+
after all sub-agents return — not inside each sub-agent.
|
|
866
|
+
|
|
867
|
+
|
|
845
868
|
## Output
|
|
846
869
|
|
|
847
870
|
# Report Footer — Standard Command Output Format
|
|
@@ -882,13 +905,13 @@ Suggest the logical next command based on workflow phase:
|
|
|
882
905
|
| /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
|
|
883
906
|
| /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
|
|
884
907
|
| /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
|
|
885
|
-
| /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/
|
|
886
|
-
| /
|
|
887
|
-
| /run-
|
|
888
|
-
| /run-
|
|
889
|
-
| /review-code | `/smoke-test {UC-ID}` or create PR |
|
|
890
|
-
| /smoke-test | Create PR and link to ticket |
|
|
891
|
-
| /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/
|
|
908
|
+
| /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
|
|
909
|
+
| /dev-gen-test | `/dev-run-test {UC-ID}` |
|
|
910
|
+
| /dev-run-test (passing) | `/review-code {UC-ID}` |
|
|
911
|
+
| /dev-run-test (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
|
|
912
|
+
| /review-code | `/dev-smoke-test {UC-ID}` or create PR |
|
|
913
|
+
| /dev-smoke-test | Create PR and link to ticket |
|
|
914
|
+
| /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; all OK → create PR |
|
|
892
915
|
| /fix-bug | Create PR and link to ticket |
|
|
893
916
|
| /debug | `/fix-bug {ticket-id}` if fix needed |
|
|
894
917
|
| /report-bug | Send to dev (`/fix-bug {BUG-ID}`); if coverage gap → `/propose-scenario {UC-ID}` |
|
|
@@ -930,4 +953,6 @@ Next (umbrella):
|
|
|
930
953
|
→ /review-context {feature-file} to verify coverage
|
|
931
954
|
→ /generate-tech-docs {feature-file}
|
|
932
955
|
→ /generate-code {feature-file}
|
|
956
|
+
|
|
957
|
+
📊 Living Docs: run /validate-traces (or /sync) to push this trace to the spec-module dashboard.
|
|
933
958
|
```
|
|
@@ -163,7 +163,7 @@ If `services` section is present:
|
|
|
163
163
|
|
|
164
164
|
**2. Route to service** — if active domain matches a key in `services`:
|
|
165
165
|
- Override `paths.specs_dir` → `services.{domain}.specs_dir`
|
|
166
|
-
- Override `paths.tech_docs_dir` → `services.{domain}.tech_docs_dir`
|
|
166
|
+
- Override `paths.tech_docs_dir` → `services.{domain}.tech_docs_dir` — **only if `setup.spec_source` is NOT set.** When `spec_source` IS set, the tech-design (API contract) is a cross-team artifact and must live in the shared spec repo (handled in step 4), so leave `tech_docs_dir` for step 4 to route — do NOT pin it per-service here.
|
|
167
167
|
- Store `active_service` = `services.{domain}.path`
|
|
168
168
|
- Store `active_service_module` = `services.{domain}.module`
|
|
169
169
|
- If service has its own `module` → use it as `active_module` (overrides `tech_stack.module`)
|
|
@@ -175,7 +175,7 @@ If `services` section is present:
|
|
|
175
175
|
**4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
|
|
176
176
|
- Override `paths.prd_dir` → `{spec_source}/specs/prd`
|
|
177
177
|
- Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
|
|
178
|
-
- Override `paths.tech_docs_dir` → `{spec_source}/specs/tech-docs` — **
|
|
178
|
+
- Override `paths.tech_docs_dir` → `{spec_source}/specs/tech-docs` — **always when `spec_source` is set** (step 2 no longer pins tech-docs per-service in this case). The tech-design IS the cross-team API contract: BE authors it here, and FE/App read it from the same spec submodule at `/generate-code --phase=integration`. *(Per-service tech-docs only happen when there is no `spec_source` — a pure multi-service BE repo with no shared spec module.)*
|
|
179
179
|
- Override `paths.domain_knowledge_dir` → `{spec_source}/specs/domain-knowledge`
|
|
180
180
|
- Override `paths.business_dictionary` → `{spec_source}/specs/domain-knowledge/business-dictionary.md`
|
|
181
181
|
- Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
|
|
@@ -206,7 +206,7 @@ When `active_service` has been resolved to a real path in Step 1.5 (e.g., `user-
|
|
|
206
206
|
| `paths.specs_dir` | `{active_service}/{service paths.specs_dir}` (if set in service config, else keep Step 1.5 override) |
|
|
207
207
|
|
|
208
208
|
**3. Store** `service_root = {active_service}` as the working directory anchor for all downstream commands:
|
|
209
|
-
- Shell commands (`/run-
|
|
209
|
+
- Shell commands (`/dev-run-test`, `/dev-gen-test`) run **from within** `service_root`
|
|
210
210
|
- File write operations (test files, trace TSVs) use paths **relative to** `service_root`
|
|
211
211
|
|
|
212
212
|
**4. If service config not found** — keep umbrella defaults, still set `service_root = {active_service}` (path anchor is always needed even without a config override).
|
|
@@ -299,7 +299,7 @@ active_module = tech_stack.module (e.g. "java-spring", "react", "flutter")
|
|
|
299
299
|
|
|
300
300
|
If `tech_stack.module` is blank or not recognized → set `platform_type = "unknown"` and flag as ⚠️ in the Step 7 recap.
|
|
301
301
|
|
|
302
|
-
These two variables (`active_module`, `platform_type`) are the canonical source for all branching logic in commands that need platform-specific behavior (
|
|
302
|
+
These two variables (`active_module`, `platform_type`) are the canonical source for all branching logic in commands that need platform-specific behavior (dev-gen-test, debug, fix-bug, dev-smoke-test).
|
|
303
303
|
|
|
304
304
|
---
|
|
305
305
|
|
|
@@ -380,6 +380,7 @@ Read:
|
|
|
380
380
|
1. The scoped `.feature` file only
|
|
381
381
|
2. Tech-doc at `{paths.tech_docs_dir}/{domain}/{UC-ID}-tech-design.md` (if exists)
|
|
382
382
|
3. CLAUDE.md §architecture + §coding_standards
|
|
383
|
+
4. **(FE/App only)** Design Spec at `{paths.design_spec_dir}/{domain}/{TICKET-ID}-design-spec-*{slug}.md` (if exists) — source of screens, component inventory, and the per-screen Figma frame links.
|
|
383
384
|
|
|
384
385
|
---
|
|
385
386
|
|
|
@@ -403,6 +404,51 @@ Load System BDD for this UC: find `{specs_dir}/{domain}/system/{TICKET-ID}*.feat
|
|
|
403
404
|
Extract all `Then` clauses → collect implied response shapes and error states.
|
|
404
405
|
If System BDD not found → warn: "System BDD not found — mock layer will use placeholder fixtures." Continue.
|
|
405
406
|
|
|
407
|
+
**Then run the Figma Dev Mode MCP Check below** before generating any UI — the Design
|
|
408
|
+
Spec's frame links are the visual contract, and the local MCP reads them with far more
|
|
409
|
+
fidelity than a plain web link.
|
|
410
|
+
|
|
411
|
+
---
|
|
412
|
+
|
|
413
|
+
## Figma Dev Mode MCP Check *(FE/App UI generation only)*
|
|
414
|
+
|
|
415
|
+
*Run this only when `platform` is `web`/`app` AND generating UI (`--phase=ui`, or default
|
|
416
|
+
mode for an FE/App feature). Skip entirely for BE / `system` platform.*
|
|
417
|
+
|
|
418
|
+
The PO authored the Design Spec from **Figma web links** (read-only, limited). For
|
|
419
|
+
codegen, the **local Figma Dev Mode MCP server** (built into the Figma **desktop app**)
|
|
420
|
+
gives far more: exact layout, design **variables/tokens**, **Code Connect** component
|
|
421
|
+
mappings, selection context, and code snippets — things a web URL alone cannot return.
|
|
422
|
+
|
|
423
|
+
**Step 1 — Detect the local MCP.** Check whether a Figma Dev Mode MCP server is connected
|
|
424
|
+
(a `get_design_context` / `get_code` style Figma tool is available via MCP).
|
|
425
|
+
|
|
426
|
+
**Step 2 — If NOT connected → suggest the dev enable it, then wait:**
|
|
427
|
+
|
|
428
|
+
```
|
|
429
|
+
🎨 Figma Dev Mode MCP not detected.
|
|
430
|
+
For accurate FE code (real tokens, components, Code Connect), use the LOCAL server:
|
|
431
|
+
|
|
432
|
+
1. Open the Figma DESKTOP app (not the browser)
|
|
433
|
+
2. Open the file/frame for this feature
|
|
434
|
+
3. Enable the Dev Mode MCP server:
|
|
435
|
+
Figma menu → Preferences → "Enable Dev Mode MCP Server"
|
|
436
|
+
(requires Dev or Full seat; server runs at http://127.0.0.1:3845)
|
|
437
|
+
4. Make sure this MCP server is added in your Claude Code MCP config
|
|
438
|
+
5. Select the frame for the screen you're implementing, then continue
|
|
439
|
+
|
|
440
|
+
Type C to continue once enabled, or S to skip (fall back to web links + text spec).
|
|
441
|
+
```
|
|
442
|
+
|
|
443
|
+
- `C` → re-detect; if now connected → proceed using the local MCP.
|
|
444
|
+
- `S` → proceed in **fallback mode**: use the Design Spec's web frame links + textual spec
|
|
445
|
+
only; add a ⚠️ note in the final report that UI was generated without local Figma fidelity.
|
|
446
|
+
|
|
447
|
+
**Step 3 — When the local MCP IS connected:** for each screen being implemented, pull the
|
|
448
|
+
selected frame via the Figma MCP and ground the UI on the returned layout, variables, and
|
|
449
|
+
Code Connect mappings. Prefer Code-Connect-mapped components over inventing markup; use the
|
|
450
|
+
real token names, not hardcoded values.
|
|
451
|
+
|
|
406
452
|
**If `--phase=integration`:**
|
|
407
453
|
Read tech-doc `@trace.status` from `{paths.tech_docs_dir}/{domain}/{UC-ID}-tech-design.md`.
|
|
408
454
|
If `draft` or `in-review` → warn:
|
|
@@ -425,7 +471,7 @@ Read `{paths.trace_dir}/{UC-ID}.tsv` if it exists. For each scenario row, note i
|
|
|
425
471
|
| `UNTRACKED` | `implemented_by == —` | Generate — scenario has no code yet |
|
|
426
472
|
| `DRIFT` | `spec_ver != gen_ver` | Regenerate — scenario updated since last codegen |
|
|
427
473
|
| `OK` | implemented + tested | Skip unless explicitly re-generating |
|
|
428
|
-
| `GAP` | implemented, no tests | Skip codegen — already coded; run `/
|
|
474
|
+
| `GAP` | implemented, no tests | Skip codegen — already coded; run `/dev-gen-test` instead |
|
|
429
475
|
|
|
430
476
|
Use these statuses to populate the **Scenarios** count in the CHECKPOINT plan (`{X} new, {Y} drifted, {Z} synced-skip`).
|
|
431
477
|
If `.tsv` does not exist → treat all scenarios as `UNTRACKED`.
|
|
@@ -579,9 +625,30 @@ Update `{paths.trace_dir}/{UC-ID}.tsv` — for each implemented scenario, find t
|
|
|
579
625
|
| `fe_phase` | `ui` if `--phase=ui` \| `integrated` if `--phase=integration` \| `—` if no phase flag |
|
|
580
626
|
| `last_updated` | today `YYYY-MM-DD` |
|
|
581
627
|
|
|
582
|
-
Leave all other columns (`sc_title`, `spec_ver`, `prd_version`, `prd_status`, `uc_status`, `test_count`, `test_classes`) unchanged.
|
|
628
|
+
Leave all other columns (`sc_title`, `spec_ver`, `prd_version`, `prd_status`, `uc_status`, `test_count`, `test_classes`, `dev_selftest`, `dev_selftest_at`) unchanged.
|
|
583
629
|
`status` is computed by `/validate-traces` — do not set here.
|
|
584
630
|
|
|
631
|
+
## Refresh Panel Mirror
|
|
632
|
+
# Refresh Living Docs panel mirror *(local, umbrella mode)*
|
|
633
|
+
|
|
634
|
+
*Skip entirely in single-service mode (no `services` and no `setup.spec_source`) — there
|
|
635
|
+
the service `.trace/` IS the panel location, so nothing to mirror.*
|
|
636
|
+
|
|
637
|
+
After updating the authoritative service TSV(s) at `{paths.trace_dir}`:
|
|
638
|
+
|
|
639
|
+
1. Resolve `panel_mirror = ./.trace` at the **current workspace root** (where this command runs).
|
|
640
|
+
2. If `panel_mirror` resolves to a different path than `{paths.trace_dir}`, copy each
|
|
641
|
+
just-updated `{UC-ID}.tsv` → `{panel_mirror}/{service-name}/{UC-ID}.tsv`
|
|
642
|
+
(create the dir; overwrite). Use `active_service` for `{service-name}`.
|
|
643
|
+
|
|
644
|
+
This keeps the open workspace's Living Docs panel current **between syncs** — it is a
|
|
645
|
+
**local convenience mirror only**. The *canonical* report in the spec module
|
|
646
|
+
(`{spec_source}/.living-docs/`) and the merged `trace-report.json` are rebuilt by
|
|
647
|
+
`/sync` or `/validate-traces` (those need every service's data, so a single per-UC
|
|
648
|
+
command cannot produce them). For orchestrated commands, do this once in the orchestrator
|
|
649
|
+
after all sub-agents return — not inside each sub-agent.
|
|
650
|
+
|
|
651
|
+
|
|
585
652
|
## Commit
|
|
586
653
|
```bash
|
|
587
654
|
git add {files}
|
|
@@ -628,13 +695,13 @@ Suggest the logical next command based on workflow phase:
|
|
|
628
695
|
| /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
|
|
629
696
|
| /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
|
|
630
697
|
| /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
|
|
631
|
-
| /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/
|
|
632
|
-
| /
|
|
633
|
-
| /run-
|
|
634
|
-
| /run-
|
|
635
|
-
| /review-code | `/smoke-test {UC-ID}` or create PR |
|
|
636
|
-
| /smoke-test | Create PR and link to ticket |
|
|
637
|
-
| /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/
|
|
698
|
+
| /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
|
|
699
|
+
| /dev-gen-test | `/dev-run-test {UC-ID}` |
|
|
700
|
+
| /dev-run-test (passing) | `/review-code {UC-ID}` |
|
|
701
|
+
| /dev-run-test (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
|
|
702
|
+
| /review-code | `/dev-smoke-test {UC-ID}` or create PR |
|
|
703
|
+
| /dev-smoke-test | Create PR and link to ticket |
|
|
704
|
+
| /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; all OK → create PR |
|
|
638
705
|
| /fix-bug | Create PR and link to ticket |
|
|
639
706
|
| /debug | `/fix-bug {ticket-id}` if fix needed |
|
|
640
707
|
| /report-bug | Send to dev (`/fix-bug {BUG-ID}`); if coverage gap → `/propose-scenario {UC-ID}` |
|
|
@@ -658,6 +725,7 @@ Files: created={N}, extended={M}, skipped={K} | Build: SUCCESS
|
|
|
658
725
|
Branch: feature/{TICKET_ID}-{slug}
|
|
659
726
|
Phase : {UI (mock layer) | Integration (real API) | Default (full)}
|
|
660
727
|
fe_phase : {ui | integrated | —}
|
|
728
|
+
Figma : {local Dev Mode MCP (grounded) | ⚠️ web links + text spec only (no local MCP) | n/a for BE} ← FE/App UI only
|
|
661
729
|
|
|
662
730
|
Next:
|
|
663
731
|
--phase=ui done:
|
|
@@ -667,9 +735,11 @@ Next:
|
|
|
667
735
|
|
|
668
736
|
--phase=integration done:
|
|
669
737
|
→ /review-code {UC-ID} ← code review required
|
|
670
|
-
→ /
|
|
738
|
+
→ /dev-gen-test {UC-ID} ← integration test suite
|
|
671
739
|
|
|
672
740
|
Default (no phase flag):
|
|
673
741
|
→ /review-code {UC-ID} ← code review required before tests
|
|
674
|
-
→ /
|
|
742
|
+
→ /dev-gen-test {UC-ID}
|
|
743
|
+
|
|
744
|
+
📊 Living Docs: run /validate-traces (or /sync) to push this trace to the spec-module dashboard.
|
|
675
745
|
```
|