@anhth2/spec-driven-dev-plugin 0.9.2 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (223) hide show
  1. package/commands/debug.md +50 -20
  2. package/commands/define-product.md +49 -19
  3. package/commands/{generate-tests.md → dev-gen-test.md} +85 -23
  4. package/commands/{generate-tests.tmpl → dev-gen-test.tmpl} +18 -4
  5. package/{core/commands/run-tests.md → commands/dev-run-test.md} +102 -21
  6. package/commands/{run-tests.tmpl → dev-run-test.tmpl} +35 -2
  7. package/commands/{smoke-test.md → dev-smoke-test.md} +54 -24
  8. package/commands/{smoke-test.tmpl → dev-smoke-test.tmpl} +5 -5
  9. package/commands/fix-bug.md +50 -20
  10. package/commands/generate-bdd.md +78 -21
  11. package/commands/generate-bdd.tmpl +11 -2
  12. package/commands/generate-code.md +123 -23
  13. package/commands/generate-code.tmpl +56 -4
  14. package/commands/generate-design-spec.md +142 -47
  15. package/commands/generate-design-spec.tmpl +93 -28
  16. package/commands/generate-prd.md +49 -19
  17. package/commands/generate-spec-manifest.md +49 -19
  18. package/commands/generate-tech-docs.md +50 -20
  19. package/commands/generate-tech-docs.tmpl +1 -1
  20. package/commands/learn.md +50 -20
  21. package/commands/propose-scenario.md +50 -20
  22. package/commands/propose-scenario.tmpl +1 -1
  23. package/commands/qc-analyze.md +514 -0
  24. package/commands/qc-analyze.tmpl +71 -0
  25. package/commands/qc-design-test.md +510 -0
  26. package/commands/qc-design-test.tmpl +67 -0
  27. package/commands/qc-plan.md +492 -0
  28. package/commands/qc-plan.tmpl +49 -0
  29. package/commands/qc-report.md +491 -0
  30. package/commands/qc-report.tmpl +48 -0
  31. package/commands/qc-review.md +496 -0
  32. package/commands/qc-review.tmpl +53 -0
  33. package/commands/qc-run-test.md +538 -0
  34. package/commands/qc-run-test.tmpl +77 -0
  35. package/commands/refine-prd.md +203 -24
  36. package/commands/refine-prd.tmpl +16 -5
  37. package/commands/report-bug.md +49 -19
  38. package/commands/review-code.md +51 -21
  39. package/commands/review-code.tmpl +1 -1
  40. package/commands/review-context.md +198 -20
  41. package/commands/review-context.tmpl +11 -1
  42. package/commands/review-tech-docs.md +49 -19
  43. package/commands/setup-ai-first.md +14 -7
  44. package/commands/sync.md +30 -20
  45. package/commands/sync.tmpl +16 -13
  46. package/commands/update-framework.md +14 -7
  47. package/commands/validate-traces.md +106 -45
  48. package/commands/validate-traces.tmpl +57 -26
  49. package/core/FRAMEWORK_VERSION +1 -1
  50. package/core/commands/debug.md +50 -20
  51. package/core/commands/define-product.md +49 -19
  52. package/core/commands/{generate-tests.md → dev-gen-test.md} +85 -23
  53. package/{commands/run-tests.md → core/commands/dev-run-test.md} +102 -21
  54. package/core/commands/{smoke-test.md → dev-smoke-test.md} +54 -24
  55. package/core/commands/fix-bug.md +50 -20
  56. package/core/commands/generate-bdd.md +78 -21
  57. package/core/commands/generate-code.md +123 -23
  58. package/core/commands/generate-design-spec.md +142 -47
  59. package/core/commands/generate-prd.md +49 -19
  60. package/core/commands/generate-spec-manifest.md +49 -19
  61. package/core/commands/generate-tech-docs.md +50 -20
  62. package/core/commands/learn.md +50 -20
  63. package/core/commands/propose-scenario.md +50 -20
  64. package/core/commands/qc-analyze.md +514 -0
  65. package/core/commands/qc-design-test.md +510 -0
  66. package/core/commands/qc-plan.md +492 -0
  67. package/core/commands/qc-report.md +491 -0
  68. package/core/commands/qc-review.md +496 -0
  69. package/core/commands/qc-run-test.md +538 -0
  70. package/core/commands/refine-prd.md +203 -24
  71. package/core/commands/report-bug.md +49 -19
  72. package/core/commands/review-code.md +51 -21
  73. package/core/commands/review-context.md +198 -20
  74. package/core/commands/review-tech-docs.md +49 -19
  75. package/core/commands/setup-ai-first.md +14 -7
  76. package/core/commands/sync.md +30 -20
  77. package/core/commands/update-framework.md +14 -7
  78. package/core/commands/validate-traces.md +106 -45
  79. package/core/modules/qc-playwright/stack-profile.yaml +65 -0
  80. package/core/skills/code/SKILL.md +63 -26
  81. package/core/skills/debug/SKILL.md +78 -34
  82. package/core/skills/design-spec/SKILL.md +49 -19
  83. package/core/skills/discovery/SKILL.md +49 -19
  84. package/core/skills/prd/SKILL.md +28 -14
  85. package/core/skills/qc/qa-analyst/DOC_GAPS.template.md +63 -0
  86. package/core/skills/qc/qa-analyst/acceptance-criteria.md +56 -0
  87. package/core/skills/qc/qa-analyst/business-rules.md +55 -0
  88. package/core/skills/qc/qa-analyst/data-flow.md +60 -0
  89. package/core/skills/qc/qa-analyst/spec-breakdown.md +57 -0
  90. package/core/skills/qc/qa-designer/e2e/journey.md +41 -0
  91. package/core/skills/qc/qa-designer/exploratory/charter.md +68 -0
  92. package/core/skills/qc/qa-designer/exploratory/explore-to-functional.md +43 -0
  93. package/core/skills/qc/qa-designer/functional/api.md +45 -0
  94. package/core/skills/qc/qa-designer/functional/gui-feature.md +46 -0
  95. package/core/skills/qc/qa-designer/functional/gui-screen.md +52 -0
  96. package/core/skills/qc/qa-designer/integration/api.md +42 -0
  97. package/core/skills/qc/qa-designer/integration/db.md +39 -0
  98. package/core/skills/qc/qa-designer/integration/gui.md +40 -0
  99. package/core/skills/qc/qa-designer/integration/kafka.md +40 -0
  100. package/core/skills/qc/qa-designer/non-functional.md +40 -0
  101. package/core/skills/qc/qa-planner/test-plan.md +120 -0
  102. package/core/skills/qc/qa-reviewer/script/e2e.md +87 -0
  103. package/core/skills/qc/qa-reviewer/script/exploratory.md +45 -0
  104. package/core/skills/qc/qa-reviewer/script/functional.md +101 -0
  105. package/core/skills/qc/qa-reviewer/script/integration.md +91 -0
  106. package/core/skills/qc/qa-reviewer/script/non-functional.md +126 -0
  107. package/core/skills/qc/qa-reviewer/test-case/e2e.md +73 -0
  108. package/core/skills/qc/qa-reviewer/test-case/exploratory.md +43 -0
  109. package/core/skills/qc/qa-reviewer/test-case/functional.md +76 -0
  110. package/core/skills/qc/qa-reviewer/test-case/integration.md +69 -0
  111. package/core/skills/qc/qa-reviewer/test-case/non-functional.md +73 -0
  112. package/core/skills/qc/qa-runner/e2e.md +49 -0
  113. package/core/skills/qc/qa-runner/exploratory/session.md +36 -0
  114. package/core/skills/qc/qa-runner/functional/api.md +35 -0
  115. package/core/skills/qc/qa-runner/functional/gui-feature.md +51 -0
  116. package/core/skills/qc/qa-runner/functional/gui-screen.md +55 -0
  117. package/core/skills/qc/qa-runner/integration.md +47 -0
  118. package/core/skills/qc/qa-runner/non-functional.md +49 -0
  119. package/core/skills/qc/qa-runner/report/report.md +37 -0
  120. package/core/skills/setup-ai-first/SKILL.md +14 -7
  121. package/core/skills/spec/SKILL.md +28 -14
  122. package/core/skills/test/SKILL.md +121 -54
  123. package/core/steps/capture-lesson.md +1 -1
  124. package/core/steps/context-loader.md +35 -12
  125. package/core/steps/report-footer.md +14 -7
  126. package/core/steps/review-fanout.md +138 -0
  127. package/core/steps/spawn-agent.md +1 -1
  128. package/core/steps/trace-mirror.md +18 -0
  129. package/core/templates/design-spec.template.md +16 -8
  130. package/core/templates/project-context.yaml +8 -0
  131. package/docs/01-getting-started/README.md +19 -0
  132. package/docs/01-getting-started/core-concepts.md +102 -0
  133. package/docs/01-getting-started/installation.md +154 -0
  134. package/docs/01-getting-started/quickstart.md +85 -0
  135. package/docs/02-guides/README.md +27 -0
  136. package/docs/02-guides/developer/README.md +46 -0
  137. package/docs/02-guides/developer/bdd-and-trace.md +123 -0
  138. package/docs/02-guides/developer/commands.md +76 -0
  139. package/docs/02-guides/developer/pr-checklist.md +15 -0
  140. package/docs/02-guides/developer/scenarios.md +448 -0
  141. package/docs/02-guides/developer/workflow.md +59 -0
  142. package/docs/02-guides/product-owner/README.md +77 -0
  143. package/docs/02-guides/product-owner/commands.md +30 -0
  144. package/docs/02-guides/product-owner/handoff-checklist.md +42 -0
  145. package/docs/02-guides/product-owner/prd-writing-rules.md +45 -0
  146. package/docs/02-guides/product-owner/scenarios.md +357 -0
  147. package/docs/02-guides/qc-automation.md +92 -0
  148. package/docs/02-guides/tester/README.md +72 -0
  149. package/docs/02-guides/tester/bug-reporting.md +117 -0
  150. package/docs/02-guides/tester/reading-specs.md +79 -0
  151. package/docs/02-guides/tester/scenarios.md +186 -0
  152. package/docs/02-guides/tester/spec-manifest.md +124 -0
  153. package/docs/02-guides/tester/test-checklist.md +31 -0
  154. package/docs/02-guides/tester/workflow.md +79 -0
  155. package/docs/03-concepts/README.md +19 -0
  156. package/docs/03-concepts/architecture.md +243 -0
  157. package/docs/03-concepts/pipeline.md +249 -0
  158. package/docs/03-concepts/traceability.md +148 -0
  159. package/docs/04-operations/README.md +33 -0
  160. package/docs/04-operations/bug-flow.md +321 -0
  161. package/docs/04-operations/publishing.md +137 -0
  162. package/docs/04-operations/sync-and-update.md +328 -0
  163. package/docs/05-reference/README.md +29 -0
  164. package/docs/05-reference/commands.md +229 -0
  165. package/docs/05-reference/modules.md +110 -0
  166. package/docs/05-reference/trace-schema.md +146 -0
  167. package/docs/README.md +51 -0
  168. package/modules/qc-playwright/stack-profile.yaml +65 -0
  169. package/package.json +2 -2
  170. package/skills/code/SKILL.md +63 -26
  171. package/skills/debug/SKILL.md +78 -34
  172. package/skills/debug/SKILL.tmpl +1 -1
  173. package/skills/design-spec/SKILL.md +49 -19
  174. package/skills/discovery/SKILL.md +49 -19
  175. package/skills/prd/SKILL.md +28 -14
  176. package/skills/qc/qa-analyst/DOC_GAPS.template.md +63 -0
  177. package/skills/qc/qa-analyst/acceptance-criteria.md +56 -0
  178. package/skills/qc/qa-analyst/business-rules.md +55 -0
  179. package/skills/qc/qa-analyst/data-flow.md +60 -0
  180. package/skills/qc/qa-analyst/spec-breakdown.md +57 -0
  181. package/skills/qc/qa-designer/e2e/journey.md +41 -0
  182. package/skills/qc/qa-designer/exploratory/charter.md +68 -0
  183. package/skills/qc/qa-designer/exploratory/explore-to-functional.md +43 -0
  184. package/skills/qc/qa-designer/functional/api.md +45 -0
  185. package/skills/qc/qa-designer/functional/gui-feature.md +46 -0
  186. package/skills/qc/qa-designer/functional/gui-screen.md +52 -0
  187. package/skills/qc/qa-designer/integration/api.md +42 -0
  188. package/skills/qc/qa-designer/integration/db.md +39 -0
  189. package/skills/qc/qa-designer/integration/gui.md +40 -0
  190. package/skills/qc/qa-designer/integration/kafka.md +40 -0
  191. package/skills/qc/qa-designer/non-functional.md +40 -0
  192. package/skills/qc/qa-planner/test-plan.md +120 -0
  193. package/skills/qc/qa-reviewer/script/e2e.md +87 -0
  194. package/skills/qc/qa-reviewer/script/exploratory.md +45 -0
  195. package/skills/qc/qa-reviewer/script/functional.md +101 -0
  196. package/skills/qc/qa-reviewer/script/integration.md +91 -0
  197. package/skills/qc/qa-reviewer/script/non-functional.md +126 -0
  198. package/skills/qc/qa-reviewer/test-case/e2e.md +73 -0
  199. package/skills/qc/qa-reviewer/test-case/exploratory.md +43 -0
  200. package/skills/qc/qa-reviewer/test-case/functional.md +76 -0
  201. package/skills/qc/qa-reviewer/test-case/integration.md +69 -0
  202. package/skills/qc/qa-reviewer/test-case/non-functional.md +73 -0
  203. package/skills/qc/qa-runner/e2e.md +49 -0
  204. package/skills/qc/qa-runner/exploratory/session.md +36 -0
  205. package/skills/qc/qa-runner/functional/api.md +35 -0
  206. package/skills/qc/qa-runner/functional/gui-feature.md +51 -0
  207. package/skills/qc/qa-runner/functional/gui-screen.md +55 -0
  208. package/skills/qc/qa-runner/integration.md +47 -0
  209. package/skills/qc/qa-runner/non-functional.md +49 -0
  210. package/skills/qc/qa-runner/report/report.md +37 -0
  211. package/skills/setup-ai-first/SKILL.md +14 -7
  212. package/skills/spec/SKILL.md +28 -14
  213. package/skills/test/SKILL.md +121 -54
  214. package/skills/test/SKILL.tmpl +9 -9
  215. package/steps/capture-lesson.md +1 -1
  216. package/steps/context-loader.md +35 -12
  217. package/steps/report-footer.md +14 -7
  218. package/steps/review-fanout.md +138 -0
  219. package/steps/spawn-agent.md +1 -1
  220. package/steps/trace-mirror.md +18 -0
  221. package/templates/design-spec.template.md +16 -8
  222. package/templates/project-context.yaml +8 -0
  223. package/ARCHITECTURE.md +0 -247
@@ -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` — **only if step 2 did not already route it to a service** (multi-service umbrellas keep per-service tech-docs). This publishes the BE-authored API contract into the shared spec repo so FE/App can read it via the spec submodule at `/generate-code --phase=integration`.
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-tests`, `/generate-tests`) run **from within** `service_root`
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).
@@ -221,19 +221,41 @@ If the file does not exist → skip silently.
221
221
 
222
222
  ---
223
223
 
224
- ## Step 3 — [CRITICAL] Load CLAUDE.md
224
+ ## Step 3 — [CRITICAL] Load CLAUDE.md (layered: root + service overlay)
225
225
 
226
226
  *This is the highest-priority context — it defines HOW to write code and documents for this project.*
227
227
 
228
- Read `CLAUDE.md`. Extract and store:
228
+ CLAUDE.md is loaded in **two layers** so umbrella-wide rules and service-specific
229
+ architecture/coding standards compose correctly. The agent always sits at the umbrella
230
+ root, but the implementation code lives in a service submodule with its OWN stack,
231
+ architecture, and conventions — so the service's CLAUDE.md must win for code generation.
232
+
233
+ **Layer 1 — [BASE] Root CLAUDE.md (umbrella-wide).**
234
+ Read `CLAUDE.md` at the repo root. Treat its contents as the **shared baseline** for the
235
+ whole umbrella — git conventions, data-protection posture, cross-cutting rules, and (in
236
+ single-service mode) the project's only architecture + coding standards.
237
+
238
+ **Layer 2 — [OVERLAY] Service CLAUDE.md (umbrella mode only).**
239
+ *Run only if `service_root` was set in Step 1.6 (i.e. a real service was routed to).*
240
+ Read `{service_root}/CLAUDE.md`. This file defines the architecture + coding standards of
241
+ the **actual stack being implemented** (e.g. `user-service` = java-spring, `web` = nextjs).
242
+ Overlay it on top of Layer 1: **on any conflict, the service value WINS** for architecture,
243
+ coding standards, and error handling. Layer-1 values that the service does not redefine
244
+ (e.g. git conventions, banned patterns shared org-wide) remain in effect.
245
+
246
+ From the **merged** result, extract and store:
229
247
 
230
248
  - **§1 Project Overview** → project name, language, framework, build/test commands, domains
231
- - **§2 Architecture** → layer order (e.g., Controller → Facade → Service → Repository), architectural rules
232
- - **§3 Coding Standards** → naming conventions (classes, methods), response wrapper type, forbidden patterns
233
- - **§5 Error Handling** → exception types, HTTP status code mapping, not-found exception class name
234
- - **§7 Git Conventions** → branch naming pattern, commit message format
249
+ - **§2 Architecture** → layer order (e.g., Controller → Facade → Service → Repository), architectural rules — *service overlay wins*
250
+ - **§3 Coding Standards** → naming conventions (classes, methods), response wrapper type, forbidden patterns — *service overlay wins*
251
+ - **§5 Error Handling** → exception types, HTTP status code mapping, not-found exception class name — *service overlay wins*
252
+ - **§7 Git Conventions** → branch naming pattern, commit message format — *root baseline unless service redefines*
235
253
 
236
- If `CLAUDE.md` does not exist → note it as missing and continue with project-context.yaml data only.
254
+ **Resolution rules:**
255
+ - If both layers exist → merge as above; record `claude_md_source = root + {service_root}`.
256
+ - If only the service overlay exists (no root CLAUDE.md) → use the service file alone; `claude_md_source = {service_root}`.
257
+ - If `service_root` is set but `{service_root}/CLAUDE.md` is **missing** → fall back to root CLAUDE.md and flag ⚠️ in the Step 7 recap (the service has no architecture/coding-standards definition — code generation will use umbrella defaults, which may be the wrong stack).
258
+ - If neither exists → note CLAUDE.md as missing and continue with project-context.yaml data only.
237
259
 
238
260
  ---
239
261
 
@@ -299,7 +321,7 @@ active_module = tech_stack.module (e.g. "java-spring", "react", "flutter")
299
321
 
300
322
  If `tech_stack.module` is blank or not recognized → set `platform_type = "unknown"` and flag as ⚠️ in the Step 7 recap.
301
323
 
302
- These two variables (`active_module`, `platform_type`) are the canonical source for all branching logic in commands that need platform-specific behavior (generate-tests, debug, fix-bug, smoke-test).
324
+ 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
325
 
304
326
  ---
305
327
 
@@ -333,7 +355,8 @@ Output exactly this block:
333
355
  [CTX LOADED]
334
356
  Stack : {language} / {framework} / {database}
335
357
  Platform : {active_module} ({platform_type})
336
- Layers : {layer order from CLAUDE.md §2, e.g., Controller → Facade → Service → Repository}
358
+ Layers : {layer order from merged CLAUDE.md §2, e.g., Controller → Facade → Service → Repository}
359
+ CLAUDE.md : {root + {service_root} | {service_root} only | root only | ⚠️ service overlay MISSING — using root | missing}
337
360
  Ticket : {ticket_prefix}-
338
361
  Dict : {loaded — N canonical terms, M banned terms | missing}
339
362
  Entities : {loaded — EntityA, EntityB, EntityC | missing}
@@ -399,19 +422,6 @@ Using `active_module` and `platform_type` derived from context loading:
399
422
 
400
423
  ---
401
424
 
402
- ## Figma Check
403
-
404
- Ask:
405
-
406
- ```
407
- Do you have a Figma link for this feature? (paste URL or press Enter to skip)
408
- ```
409
-
410
- - If URL provided → store as `figma_url`.
411
- - If skipped → `figma_url = "TBD"`. Add AI Assumption: "Figma link not provided — all screen descriptions are text-based. Link must be added and verified before Design Spec sign-off."
412
-
413
- ---
414
-
415
425
  ## Screen Discovery
416
426
 
417
427
  From the PRD's Section 4 (User Flow + Wireframe), extract all screen / page / modal names mentioned.
@@ -432,6 +442,54 @@ Wait for confirmation. Store the confirmed list as `screen_list`.
432
442
 
433
443
  ---
434
444
 
445
+ ## Figma Frame Links *(mandatory — one readable node-level link per screen)*
446
+
447
+ A Design Spec is only as good as the design it points to. The AI **cannot read a plain
448
+ file link** (`figma.com/design/{fileKey}/...` with no `node-id`) — it needs a
449
+ **node-level link to each specific frame** so it can fetch that frame's real layout,
450
+ components, and tokens via the Figma MCP. So collect one link **per screen**, not one
451
+ link for the whole feature.
452
+
453
+ **Ask the PO, listing every screen in `screen_list`:**
454
+
455
+ ```
456
+ Paste the Figma frame link for each screen below.
457
+
458
+ In Figma: select the frame → right-click → "Copy link to selection"
459
+ (the URL must contain ?node-id=... — that is the per-frame link the AI can read)
460
+
461
+ 1. {Screen 1} : ____
462
+ 2. {Screen 2} : ____
463
+ ...
464
+
465
+ If a screen has no design yet, type none for that screen.
466
+ ```
467
+
468
+ **For each answer:**
469
+
470
+ 1. **Validate format** — the URL must match `figma.com/design/{fileKey}/...?node-id={nodeId}`.
471
+ - Valid → store as `figma_frames[{screen}] = {url}`, parse out `fileKey` + `nodeId`.
472
+ - A file link with **no `node-id`** → reject it: "This link points to the whole file, not a frame. Re-copy via right-click → Copy link to selection." Re-ask for that screen.
473
+ - `none` → `figma_frames[{screen}] = "TBD"`, mark that screen ❌ Missing.
474
+
475
+ 2. **Fetch the frame via Figma MCP** (only for valid links) — call `get_design_context`
476
+ (and `get_screenshot` when useful) with the parsed `fileKey` + `nodeId` to read the
477
+ real layout, component names, and design tokens. Ground every Screen Spec in this
478
+ fetched data; do **not** invent layout the frame does not show. If a fetch fails
479
+ (permission / not found) → treat that screen as ❌ Missing and note the fetch error.
480
+
481
+ 3. Derive the feature-level `figma_url` = the file link (without `node-id`) shared by the
482
+ frames, for the Metadata row. If frames span multiple files, list each.
483
+
484
+ **Mandatory gate (does not abort — produces a draft):**
485
+ - If **any** screen is ❌ Missing → the spec is generated as a **draft** with those screens
486
+ flagged, but `Status` stays `draft` and **sign-off / `/generate-bdd` is blocked** until
487
+ every screen has a readable, fetched frame link. Record `missing_frames = [screens]`.
488
+ - Add one AI Assumption per missing screen: "No readable Figma frame for {screen} — spec
489
+ for this screen is text-only and must not be signed off until a `node-id` link is added."
490
+
491
+ ---
492
+
435
493
  ## CHECKPOINT
436
494
 
437
495
  ```
@@ -443,9 +501,13 @@ Module : {active_module}
443
501
  Service : {active_service}
444
502
  Domain : {domain}
445
503
  Screens : {N} — {comma-separated screen_list}
446
- Figma : {figma_url}
504
+ Figma : {linked}/{N} screens have readable frame links{; missing: comma-separated missing_frames}
447
505
  Output path : {paths.design_spec_dir}/{domain}/{TICKET-ID}-design-spec-{active_platform}-{slug}.md
448
506
 
507
+ {If missing_frames non-empty}:
508
+ ⚠️ {count} screen(s) without a readable Figma frame link — these will be generated as
509
+ text-only drafts and the spec cannot be signed off until their node-id links are added.
510
+
449
511
  Generate? (Y/N)
450
512
  ```
451
513
 
@@ -470,6 +532,15 @@ Apply these rules consistently when generating all sections:
470
532
  - `app` / `app-ios` / `app-android` → include gestures, safe area, minimum touch targets, navigation pattern, deep links, permissions, offline behavior.
471
533
  - Only generate the section relevant to `active_platform`. Omit the other platform's section entirely.
472
534
 
535
+ **Figma grounding (mandatory):**
536
+ - For every screen with a fetched frame (`figma_frames[screen]` is a valid link), base the
537
+ Layout, Component Inventory, and Screen States on the **fetched Figma data** — real
538
+ component names, real tokens, real frame structure. Do not contradict or invent layout.
539
+ - Use the exact per-screen `figma_frames[screen]` URL in the Screen Inventory, each Screen
540
+ Spec header, and the Figma Summary — never a synthetic `{figma_url}#screen1` fragment.
541
+ - For ❌ Missing screens: generate a text-only draft from the PRD, prefix the Screen Spec
542
+ with `> [DRAFT — no Figma frame; do not sign off]`, and leave the Figma cell as ❌ Missing.
543
+
473
544
  **Screen states (mandatory per screen):**
474
545
  - Every screen must document at minimum: `default`, `loading`, `error`.
475
546
  - Add `empty` when the screen can display zero-data state.
@@ -499,7 +570,7 @@ Write `{paths.design_spec_dir}/{domain}/{TICKET-ID}-design-spec-{active_platform
499
570
  | **Service** | {active_service} |
500
571
  | **Domain** | {domain} |
501
572
  | **Business PRD** | [{TICKET-ID}]({relative-path-to-prd.md}) |
502
- | **Figma** | {figma_url} |
573
+ | **Figma** | {figma_url — feature file link} ({linked}/{N} frames linked) |
503
574
  | **Author** | {PO name or "AI-assisted"} |
504
575
  | **Created** | {YYYY-MM-DD} |
505
576
  | **Updated** | {YYYY-MM-DD} |
@@ -510,8 +581,8 @@ Write `{paths.design_spec_dir}/{domain}/{TICKET-ID}-design-spec-{active_platform
510
581
 
511
582
  | # | Screen Name | Entry Point | Figma Frame | Notes |
512
583
  |---|-------------|-------------|-------------|-------|
513
- | 1 | {Screen 1} | {how user arrives — e.g., tap CTA on Home} | [Frame]({figma_url}#screen1) | |
514
- | 2 | {Screen 2} | {entry point} | [Frame]({figma_url}#screen2) | |
584
+ | 1 | {Screen 1} | {how user arrives — e.g., tap CTA on Home} | [Frame]({figma_frames[Screen 1]}) | |
585
+ | 2 | {Screen 2} | {entry point} | [Frame]({figma_frames[Screen 2]}) / ❌ Missing | |
515
586
 
516
587
  ---
517
588
 
@@ -524,7 +595,7 @@ Write `{paths.design_spec_dir}/{domain}/{TICKET-ID}-design-spec-{active_platform
524
595
 
525
596
  ## Screen 1: {Screen Name}
526
597
 
527
- **Figma**: [{Frame name}]({figma_frame_url})
598
+ **Figma**: [{Frame name}]({figma_frames[Screen 1]}) <!-- ❌ Missing → prefix this screen with `> [DRAFT — no Figma frame; do not sign off]` -->
528
599
 
529
600
  ### Layout
530
601
 
@@ -680,10 +751,10 @@ Exit: {how the user leaves — back stack / tab switch / deeplink out}
680
751
 
681
752
  ## Figma Summary
682
753
 
683
- | Screen | Figma Frame | Designer Status |
684
- |-----------------|-------------------------------|------------------------|
685
- | {Screen 1} | [Link]({figma_frame_url}) | ✅ Ready / ⏳ WIP / ❌ Missing |
686
- | {Screen 2} | [Link]({figma_frame_url}) | Ready / WIP / Missing |
754
+ | Screen | Figma Frame | Link / Fetch Status |
755
+ |-----------------|--------------------------------------|--------------------------------------|
756
+ | {Screen 1} | [Link]({figma_frames[Screen 1]}) | ✅ Linked & fetched |
757
+ | {Screen 2} | | Missing no node-id link provided |
687
758
 
688
759
  ## Design Tokens Referenced
689
760
 
@@ -705,6 +776,7 @@ Exit: {how the user leaves — back stack / tab switch / deeplink out}
705
776
  > PO must review and confirm before sign-off.
706
777
 
707
778
  - {Assumption 1 — [AI DRAFT]}
779
+ - {One per ❌ Missing screen: "No readable Figma frame for {screen} — text-only draft; blocks sign-off until a node-id link is added."}
708
780
 
709
781
  ---
710
782
 
@@ -716,9 +788,10 @@ Exit: {how the user leaves — back stack / tab switch / deeplink out}
716
788
 
717
789
  <!--
718
790
  NEXT STEPS:
719
- 1. Share with Designer verify Figma links, update component inventory.
720
- 2. PO + Designer sign off: change Status "approved".
721
- 3. Run /generate-bdd "{prd-file}" BDD uses AC-UI from this spec for FE scenarios.
791
+ 1. Fill any Missing Figma frame links (node-id links) — re-run to fetch & ground them.
792
+ 2. Share with Designer verify Figma links, update component inventory.
793
+ 3. PO + Designer sign off: change Status → "approved" (only allowed when 0 screens are Missing).
794
+ 4. Run /generate-bdd "{prd-file}" — BDD uses AC-UI from this spec for FE scenarios.
722
795
  -->
723
796
  ````
724
797
 
@@ -733,7 +806,9 @@ Exit: {how the user leaves — back stack / tab switch / deeplink out}
733
806
  - [ ] Only the platform-relevant section generated in Section 4
734
807
  - [ ] AC-UI items are testable (clear pass/fail, not "looks good")
735
808
  - [ ] Business PRD cross-reference link is valid relative path
736
- - [ ] If `figma_url = "TBD"` AI Assumption added in Appendix
809
+ - [ ] Every screen has a node-level Figma frame link (`?node-id=`) — and screens with a link were fetched via Figma MCP and used to ground the spec
810
+ - [ ] Each ❌ Missing screen is flagged in-spec (`> [DRAFT — no Figma frame...]`), listed in Figma Summary, and has an AI Assumption
811
+ - [ ] If any screen is ❌ Missing → Status stays `draft` and the Output below blocks `/generate-bdd`
737
812
 
738
813
  ---
739
814
 
@@ -775,15 +850,22 @@ Suggest the logical next command based on workflow phase:
775
850
  | /generate-design-spec | Designer review → Figma links confirmed → PO + Designer sign-off → `/generate-bdd {prd-file}` |
776
851
  | /generate-bdd | `/review-context {feature-file}` to verify coverage |
777
852
  | /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
853
+ | /qc-analyze | `/qc-plan {UC-ID}` (resolve 🔴 blocker gaps first) |
854
+ | /qc-plan | `/qc-design-test {UC-ID}` |
855
+ | /qc-design-test | `/qc-review {UC-ID}` (test-case review) |
856
+ | /qc-review (test-case) | `/qc-run-test {UC-ID}` if APPROVED; fix TCs if NEEDS_FIX |
857
+ | /qc-run-test | `/qc-report {UC-ID}` then `/qc-review {UC-ID}` (script review) |
858
+ | /qc-review (script) | `/qc-report {UC-ID}` then create PR if APPROVED |
859
+ | /qc-report | `/validate-traces {UC-ID}` to refresh Living Docs (qc_status) |
778
860
  | /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
779
861
  | /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
780
- | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/generate-tests {UC-ID}` |
781
- | /generate-tests | `/run-tests {UC-ID}` |
782
- | /run-tests (passing) | `/review-code {UC-ID}` |
783
- | /run-tests (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
784
- | /review-code | `/smoke-test {UC-ID}` or create PR |
785
- | /smoke-test | Create PR and link to ticket |
786
- | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/generate-tests {UC-ID}`; all OK → create PR |
862
+ | /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
863
+ | /dev-gen-test | `/dev-run-test {UC-ID}` |
864
+ | /dev-run-test (passing) | `/review-code {UC-ID}` |
865
+ | /dev-run-test (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
866
+ | /review-code | `/dev-smoke-test {UC-ID}` or create PR |
867
+ | /dev-smoke-test | Create PR and link to ticket |
868
+ | /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; all OK → create PR |
787
869
  | /fix-bug | Create PR and link to ticket |
788
870
  | /debug | `/fix-bug {ticket-id}` if fix needed |
789
871
  | /report-bug | Send to dev (`/fix-bug {BUG-ID}`); if coverage gap → `/propose-scenario {UC-ID}` |
@@ -801,12 +883,25 @@ Next : {suggested command with example arguments}
801
883
  ```
802
884
 
803
885
 
886
+ {If missing_frames is empty}:
804
887
  ```
805
888
  /generate-design-spec Complete — {TICKET-ID} [{active_platform}]
806
889
  ---
807
- Status : ✅ Complete
890
+ Status : ✅ Complete — all {N} screens linked & fetched from Figma
808
891
  Output Artifacts:
809
892
  created {paths.design_spec_dir}/{domain}/{TICKET-ID}-design-spec-{active_platform}-{slug}.md (v1.0)
810
- Next : Share with Designer → add Figma links → PO + Designer sign-off (Status: approved)
893
+ Next : Share with Designer → PO + Designer sign-off (Status: approved)
811
894
  → /generate-bdd {prd-file} (generates BDD per service; reads AC-UI from Design Spec)
812
895
  ```
896
+
897
+ {If missing_frames is non-empty}:
898
+ ```
899
+ /generate-design-spec Complete (DRAFT) — {TICKET-ID} [{active_platform}]
900
+ ---
901
+ Status : ⚠️ Warnings — {count} screen(s) without a readable Figma frame: {comma-separated missing_frames}
902
+ Output Artifacts:
903
+ created {paths.design_spec_dir}/{domain}/{TICKET-ID}-design-spec-{active_platform}-{slug}.md (v1.0, draft)
904
+ Next : 🔒 Sign-off & /generate-bdd are BLOCKED until every screen has a node-id Figma link.
905
+ 1. In Figma: select each missing frame → right-click → Copy link to selection
906
+ 2. Re-run /generate-design-spec {prd-file} → AI fetches & grounds the new frames
907
+ ```
@@ -46,19 +46,6 @@ Using `active_module` and `platform_type` derived from context loading:
46
46
 
47
47
  ---
48
48
 
49
- ## Figma Check
50
-
51
- Ask:
52
-
53
- ```
54
- Do you have a Figma link for this feature? (paste URL or press Enter to skip)
55
- ```
56
-
57
- - If URL provided → store as `figma_url`.
58
- - If skipped → `figma_url = "TBD"`. Add AI Assumption: "Figma link not provided — all screen descriptions are text-based. Link must be added and verified before Design Spec sign-off."
59
-
60
- ---
61
-
62
49
  ## Screen Discovery
63
50
 
64
51
  From the PRD's Section 4 (User Flow + Wireframe), extract all screen / page / modal names mentioned.
@@ -79,6 +66,54 @@ Wait for confirmation. Store the confirmed list as `screen_list`.
79
66
 
80
67
  ---
81
68
 
69
+ ## Figma Frame Links *(mandatory — one readable node-level link per screen)*
70
+
71
+ A Design Spec is only as good as the design it points to. The AI **cannot read a plain
72
+ file link** (`figma.com/design/{fileKey}/...` with no `node-id`) — it needs a
73
+ **node-level link to each specific frame** so it can fetch that frame's real layout,
74
+ components, and tokens via the Figma MCP. So collect one link **per screen**, not one
75
+ link for the whole feature.
76
+
77
+ **Ask the PO, listing every screen in `screen_list`:**
78
+
79
+ ```
80
+ Paste the Figma frame link for each screen below.
81
+
82
+ In Figma: select the frame → right-click → "Copy link to selection"
83
+ (the URL must contain ?node-id=... — that is the per-frame link the AI can read)
84
+
85
+ 1. {Screen 1} : ____
86
+ 2. {Screen 2} : ____
87
+ ...
88
+
89
+ If a screen has no design yet, type none for that screen.
90
+ ```
91
+
92
+ **For each answer:**
93
+
94
+ 1. **Validate format** — the URL must match `figma.com/design/{fileKey}/...?node-id={nodeId}`.
95
+ - Valid → store as `figma_frames[{screen}] = {url}`, parse out `fileKey` + `nodeId`.
96
+ - A file link with **no `node-id`** → reject it: "This link points to the whole file, not a frame. Re-copy via right-click → Copy link to selection." Re-ask for that screen.
97
+ - `none` → `figma_frames[{screen}] = "TBD"`, mark that screen ❌ Missing.
98
+
99
+ 2. **Fetch the frame via Figma MCP** (only for valid links) — call `get_design_context`
100
+ (and `get_screenshot` when useful) with the parsed `fileKey` + `nodeId` to read the
101
+ real layout, component names, and design tokens. Ground every Screen Spec in this
102
+ fetched data; do **not** invent layout the frame does not show. If a fetch fails
103
+ (permission / not found) → treat that screen as ❌ Missing and note the fetch error.
104
+
105
+ 3. Derive the feature-level `figma_url` = the file link (without `node-id`) shared by the
106
+ frames, for the Metadata row. If frames span multiple files, list each.
107
+
108
+ **Mandatory gate (does not abort — produces a draft):**
109
+ - If **any** screen is ❌ Missing → the spec is generated as a **draft** with those screens
110
+ flagged, but `Status` stays `draft` and **sign-off / `/generate-bdd` is blocked** until
111
+ every screen has a readable, fetched frame link. Record `missing_frames = [screens]`.
112
+ - Add one AI Assumption per missing screen: "No readable Figma frame for {screen} — spec
113
+ for this screen is text-only and must not be signed off until a `node-id` link is added."
114
+
115
+ ---
116
+
82
117
  ## CHECKPOINT
83
118
 
84
119
  ```
@@ -90,9 +125,13 @@ Module : {active_module}
90
125
  Service : {active_service}
91
126
  Domain : {domain}
92
127
  Screens : {N} — {comma-separated screen_list}
93
- Figma : {figma_url}
128
+ Figma : {linked}/{N} screens have readable frame links{; missing: comma-separated missing_frames}
94
129
  Output path : {paths.design_spec_dir}/{domain}/{TICKET-ID}-design-spec-{active_platform}-{slug}.md
95
130
 
131
+ {If missing_frames non-empty}:
132
+ ⚠️ {count} screen(s) without a readable Figma frame link — these will be generated as
133
+ text-only drafts and the spec cannot be signed off until their node-id links are added.
134
+
96
135
  Generate? (Y/N)
97
136
  ```
98
137
 
@@ -117,6 +156,15 @@ Apply these rules consistently when generating all sections:
117
156
  - `app` / `app-ios` / `app-android` → include gestures, safe area, minimum touch targets, navigation pattern, deep links, permissions, offline behavior.
118
157
  - Only generate the section relevant to `active_platform`. Omit the other platform's section entirely.
119
158
 
159
+ **Figma grounding (mandatory):**
160
+ - For every screen with a fetched frame (`figma_frames[screen]` is a valid link), base the
161
+ Layout, Component Inventory, and Screen States on the **fetched Figma data** — real
162
+ component names, real tokens, real frame structure. Do not contradict or invent layout.
163
+ - Use the exact per-screen `figma_frames[screen]` URL in the Screen Inventory, each Screen
164
+ Spec header, and the Figma Summary — never a synthetic `{figma_url}#screen1` fragment.
165
+ - For ❌ Missing screens: generate a text-only draft from the PRD, prefix the Screen Spec
166
+ with `> [DRAFT — no Figma frame; do not sign off]`, and leave the Figma cell as ❌ Missing.
167
+
120
168
  **Screen states (mandatory per screen):**
121
169
  - Every screen must document at minimum: `default`, `loading`, `error`.
122
170
  - Add `empty` when the screen can display zero-data state.
@@ -146,7 +194,7 @@ Write `{paths.design_spec_dir}/{domain}/{TICKET-ID}-design-spec-{active_platform
146
194
  | **Service** | {active_service} |
147
195
  | **Domain** | {domain} |
148
196
  | **Business PRD** | [{TICKET-ID}]({relative-path-to-prd.md}) |
149
- | **Figma** | {figma_url} |
197
+ | **Figma** | {figma_url — feature file link} ({linked}/{N} frames linked) |
150
198
  | **Author** | {PO name or "AI-assisted"} |
151
199
  | **Created** | {YYYY-MM-DD} |
152
200
  | **Updated** | {YYYY-MM-DD} |
@@ -157,8 +205,8 @@ Write `{paths.design_spec_dir}/{domain}/{TICKET-ID}-design-spec-{active_platform
157
205
 
158
206
  | # | Screen Name | Entry Point | Figma Frame | Notes |
159
207
  |---|-------------|-------------|-------------|-------|
160
- | 1 | {Screen 1} | {how user arrives — e.g., tap CTA on Home} | [Frame]({figma_url}#screen1) | |
161
- | 2 | {Screen 2} | {entry point} | [Frame]({figma_url}#screen2) | |
208
+ | 1 | {Screen 1} | {how user arrives — e.g., tap CTA on Home} | [Frame]({figma_frames[Screen 1]}) | |
209
+ | 2 | {Screen 2} | {entry point} | [Frame]({figma_frames[Screen 2]}) / ❌ Missing | |
162
210
 
163
211
  ---
164
212
 
@@ -171,7 +219,7 @@ Write `{paths.design_spec_dir}/{domain}/{TICKET-ID}-design-spec-{active_platform
171
219
 
172
220
  ## Screen 1: {Screen Name}
173
221
 
174
- **Figma**: [{Frame name}]({figma_frame_url})
222
+ **Figma**: [{Frame name}]({figma_frames[Screen 1]}) <!-- ❌ Missing → prefix this screen with `> [DRAFT — no Figma frame; do not sign off]` -->
175
223
 
176
224
  ### Layout
177
225
 
@@ -327,10 +375,10 @@ Exit: {how the user leaves — back stack / tab switch / deeplink out}
327
375
 
328
376
  ## Figma Summary
329
377
 
330
- | Screen | Figma Frame | Designer Status |
331
- |-----------------|-------------------------------|------------------------|
332
- | {Screen 1} | [Link]({figma_frame_url}) | ✅ Ready / ⏳ WIP / ❌ Missing |
333
- | {Screen 2} | [Link]({figma_frame_url}) | Ready / WIP / Missing |
378
+ | Screen | Figma Frame | Link / Fetch Status |
379
+ |-----------------|--------------------------------------|--------------------------------------|
380
+ | {Screen 1} | [Link]({figma_frames[Screen 1]}) | ✅ Linked & fetched |
381
+ | {Screen 2} | | Missing no node-id link provided |
334
382
 
335
383
  ## Design Tokens Referenced
336
384
 
@@ -352,6 +400,7 @@ Exit: {how the user leaves — back stack / tab switch / deeplink out}
352
400
  > PO must review and confirm before sign-off.
353
401
 
354
402
  - {Assumption 1 — [AI DRAFT]}
403
+ - {One per ❌ Missing screen: "No readable Figma frame for {screen} — text-only draft; blocks sign-off until a node-id link is added."}
355
404
 
356
405
  ---
357
406
 
@@ -363,9 +412,10 @@ Exit: {how the user leaves — back stack / tab switch / deeplink out}
363
412
 
364
413
  <!--
365
414
  NEXT STEPS:
366
- 1. Share with Designer verify Figma links, update component inventory.
367
- 2. PO + Designer sign off: change Status "approved".
368
- 3. Run /generate-bdd "{prd-file}" BDD uses AC-UI from this spec for FE scenarios.
415
+ 1. Fill any Missing Figma frame links (node-id links) — re-run to fetch & ground them.
416
+ 2. Share with Designer verify Figma links, update component inventory.
417
+ 3. PO + Designer sign off: change Status → "approved" (only allowed when 0 screens are Missing).
418
+ 4. Run /generate-bdd "{prd-file}" — BDD uses AC-UI from this spec for FE scenarios.
369
419
  -->
370
420
  ````
371
421
 
@@ -380,7 +430,9 @@ Exit: {how the user leaves — back stack / tab switch / deeplink out}
380
430
  - [ ] Only the platform-relevant section generated in Section 4
381
431
  - [ ] AC-UI items are testable (clear pass/fail, not "looks good")
382
432
  - [ ] Business PRD cross-reference link is valid relative path
383
- - [ ] If `figma_url = "TBD"` AI Assumption added in Appendix
433
+ - [ ] Every screen has a node-level Figma frame link (`?node-id=`) — and screens with a link were fetched via Figma MCP and used to ground the spec
434
+ - [ ] Each ❌ Missing screen is flagged in-spec (`> [DRAFT — no Figma frame...]`), listed in Figma Summary, and has an AI Assumption
435
+ - [ ] If any screen is ❌ Missing → Status stays `draft` and the Output below blocks `/generate-bdd`
384
436
 
385
437
  ---
386
438
 
@@ -388,12 +440,25 @@ Exit: {how the user leaves — back stack / tab switch / deeplink out}
388
440
 
389
441
  {{include:steps/report-footer.md}}
390
442
 
443
+ {If missing_frames is empty}:
391
444
  ```
392
445
  /generate-design-spec Complete — {TICKET-ID} [{active_platform}]
393
446
  ---
394
- Status : ✅ Complete
447
+ Status : ✅ Complete — all {N} screens linked & fetched from Figma
395
448
  Output Artifacts:
396
449
  created {paths.design_spec_dir}/{domain}/{TICKET-ID}-design-spec-{active_platform}-{slug}.md (v1.0)
397
- Next : Share with Designer → add Figma links → PO + Designer sign-off (Status: approved)
450
+ Next : Share with Designer → PO + Designer sign-off (Status: approved)
398
451
  → /generate-bdd {prd-file} (generates BDD per service; reads AC-UI from Design Spec)
399
452
  ```
453
+
454
+ {If missing_frames is non-empty}:
455
+ ```
456
+ /generate-design-spec Complete (DRAFT) — {TICKET-ID} [{active_platform}]
457
+ ---
458
+ Status : ⚠️ Warnings — {count} screen(s) without a readable Figma frame: {comma-separated missing_frames}
459
+ Output Artifacts:
460
+ created {paths.design_spec_dir}/{domain}/{TICKET-ID}-design-spec-{active_platform}-{slug}.md (v1.0, draft)
461
+ Next : 🔒 Sign-off & /generate-bdd are BLOCKED until every screen has a node-id Figma link.
462
+ 1. In Figma: select each missing frame → right-click → Copy link to selection
463
+ 2. Re-run /generate-design-spec {prd-file} → AI fetches & grounds the new frames
464
+ ```