@design-ai/cli 4.55.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 (529) hide show
  1. package/.claude-plugin/plugin.json +164 -0
  2. package/AGENTS.ko.md +126 -0
  3. package/AGENTS.md +182 -0
  4. package/CHANGELOG.md +6883 -0
  5. package/CLAUDE.md +39 -0
  6. package/LICENSE +21 -0
  7. package/README.ko.md +245 -0
  8. package/README.md +277 -0
  9. package/agents/README.md +14 -0
  10. package/agents/a11y-reviewer.md +121 -0
  11. package/agents/component-architect.md +57 -0
  12. package/agents/design-critic.md +46 -0
  13. package/agents/token-extractor.md +63 -0
  14. package/cli/bin/design-ai-mcp.mjs +6 -0
  15. package/cli/bin/design-ai.mjs +40 -0
  16. package/cli/commands/audit.mjs +111 -0
  17. package/cli/commands/check.mjs +226 -0
  18. package/cli/commands/doctor.mjs +141 -0
  19. package/cli/commands/examples.mjs +58 -0
  20. package/cli/commands/help.mjs +271 -0
  21. package/cli/commands/install.mjs +161 -0
  22. package/cli/commands/learn.mjs +1871 -0
  23. package/cli/commands/list.mjs +143 -0
  24. package/cli/commands/mcp.mjs +27 -0
  25. package/cli/commands/pack.mjs +211 -0
  26. package/cli/commands/prompt.mjs +199 -0
  27. package/cli/commands/route.mjs +247 -0
  28. package/cli/commands/search.mjs +60 -0
  29. package/cli/commands/show.mjs +52 -0
  30. package/cli/commands/site.mjs +558 -0
  31. package/cli/commands/status.mjs +161 -0
  32. package/cli/commands/uninstall.mjs +119 -0
  33. package/cli/commands/update.mjs +184 -0
  34. package/cli/commands/version.mjs +94 -0
  35. package/cli/commands/workspace.mjs +176 -0
  36. package/cli/lib/brief.mjs +52 -0
  37. package/cli/lib/check.mjs +642 -0
  38. package/cli/lib/dispatch.mjs +109 -0
  39. package/cli/lib/doctor.mjs +505 -0
  40. package/cli/lib/examples.mjs +258 -0
  41. package/cli/lib/exec.mjs +63 -0
  42. package/cli/lib/help-flags.mjs +5 -0
  43. package/cli/lib/learn.mjs +3694 -0
  44. package/cli/lib/log.mjs +47 -0
  45. package/cli/lib/mcp-server.mjs +426 -0
  46. package/cli/lib/output.mjs +101 -0
  47. package/cli/lib/pack.mjs +599 -0
  48. package/cli/lib/paths.mjs +63 -0
  49. package/cli/lib/prompt.mjs +603 -0
  50. package/cli/lib/route.mjs +740 -0
  51. package/cli/lib/search.mjs +158 -0
  52. package/cli/lib/show.mjs +161 -0
  53. package/cli/lib/signals.mjs +2337 -0
  54. package/cli/lib/site.mjs +6617 -0
  55. package/cli/lib/skill-proposals.mjs +2046 -0
  56. package/cli/lib/suggest.mjs +66 -0
  57. package/cli/lib/workspace.mjs +1056 -0
  58. package/commands/README.md +25 -0
  59. package/commands/component-spec.md +34 -0
  60. package/commands/conversational.md +44 -0
  61. package/commands/design-from-brief.md +141 -0
  62. package/commands/design-review.md +62 -0
  63. package/commands/document-from-brief.md +47 -0
  64. package/commands/extract-tokens.md +38 -0
  65. package/commands/game-ui.md +40 -0
  66. package/commands/illustration.md +37 -0
  67. package/commands/iterate.md +167 -0
  68. package/commands/motion-design.md +54 -0
  69. package/commands/palette-from-brand.md +50 -0
  70. package/commands/print.md +49 -0
  71. package/commands/slide-deck.md +46 -0
  72. package/commands/spatial.md +47 -0
  73. package/commands/stability-review.md +74 -0
  74. package/commands/video.md +42 -0
  75. package/commands/website-improvement.md +77 -0
  76. package/docs/AGENT-DEVELOPMENT.md +658 -0
  77. package/docs/AI-LEARNING.md +429 -0
  78. package/docs/AIDER-INTEGRATION.md +224 -0
  79. package/docs/ARCHITECTURE.ko.md +183 -0
  80. package/docs/ARCHITECTURE.md +105 -0
  81. package/docs/CODEX-INTEGRATION.md +311 -0
  82. package/docs/COMPANY-WEBSITE-DOGFOOD.ko.md +144 -0
  83. package/docs/COMPANY-WEBSITE-DOGFOOD.md +150 -0
  84. package/docs/COMPANY-WEBSITE-INTAKE-TEMPLATE.ko.md +153 -0
  85. package/docs/COMPANY-WEBSITE-INTAKE-TEMPLATE.md +154 -0
  86. package/docs/CONTRIBUTING.ko.md +203 -0
  87. package/docs/CONTRIBUTING.md +242 -0
  88. package/docs/CURSOR-INTEGRATION.md +220 -0
  89. package/docs/DISTRIBUTION.ko.md +248 -0
  90. package/docs/DISTRIBUTION.md +253 -0
  91. package/docs/DOGFOOD-FINDINGS.md +180 -0
  92. package/docs/DOGFOOD-V4-FINDINGS.md +139 -0
  93. package/docs/DOGFOOD-V4-MKDOCS-FINDINGS.md +233 -0
  94. package/docs/DOGFOOD-V4-NPM-FINDINGS.md +157 -0
  95. package/docs/DOGFOOD-V4-VSCODE-FINDINGS.md +135 -0
  96. package/docs/FIGMA-INTEGRATION.md +222 -0
  97. package/docs/MCP-INTEGRATION.md +243 -0
  98. package/docs/MIGRATION-v4.md +121 -0
  99. package/docs/PLUGIN-PACKAGING.md +240 -0
  100. package/docs/PRODUCT-READINESS.md +66 -0
  101. package/docs/QUICKSTART.ko.md +178 -0
  102. package/docs/QUICKSTART.md +179 -0
  103. package/docs/RELEASE-CHECKLIST.md +292 -0
  104. package/docs/ROADMAP.md +19495 -0
  105. package/docs/SESSION-LOG.md +940 -0
  106. package/docs/TOKEN-SYNC.md +237 -0
  107. package/docs/USING.ko.md +206 -0
  108. package/docs/USING.md +218 -0
  109. package/docs/WEBSITE-IMPROVEMENT.ko.md +75 -0
  110. package/docs/WEBSITE-IMPROVEMENT.md +89 -0
  111. package/docs/announcements/README.md +56 -0
  112. package/docs/announcements/dev-to-korea.md +206 -0
  113. package/docs/announcements/hashnode-post.ko.md +232 -0
  114. package/docs/announcements/okky-post.ko.md +158 -0
  115. package/docs/announcements/press-kit.md +101 -0
  116. package/docs/announcements/reddit-r-korea.md +196 -0
  117. package/docs/announcements/show-hn.md +114 -0
  118. package/docs/announcements/twitter-thread.md +255 -0
  119. package/docs/external-status.md +34 -0
  120. package/docs/integrations/aider-walkthrough.ko.md +275 -0
  121. package/docs/integrations/aider-walkthrough.md +274 -0
  122. package/docs/integrations/codex-walkthrough.ko.md +297 -0
  123. package/docs/integrations/codex-walkthrough.md +297 -0
  124. package/docs/integrations/cursor-walkthrough.ko.md +281 -0
  125. package/docs/integrations/cursor-walkthrough.md +284 -0
  126. package/docs/integrations/design-ai-mcp-server.md +169 -0
  127. package/docs/integrations/figma-mcp.md +149 -0
  128. package/docs/integrations/github-mcp.md +178 -0
  129. package/docs/integrations/linear-mcp.md +215 -0
  130. package/docs/integrations/notion-mcp.md +174 -0
  131. package/docs/integrations/sdk-walkthrough.ko.md +375 -0
  132. package/docs/integrations/sdk-walkthrough.md +375 -0
  133. package/docs/integrations/slack-mcp.md +208 -0
  134. package/docs/integrations/vscode-walkthrough.ko.md +202 -0
  135. package/docs/integrations/vscode-walkthrough.md +205 -0
  136. package/docs/requirements.txt +16 -0
  137. package/docs/site-overrides/extra.css +83 -0
  138. package/docs/site-overrides/favicon.svg +4 -0
  139. package/docs/site-overrides/logo.svg +10 -0
  140. package/docs/site-overrides/main.html +18 -0
  141. package/docs/website-console/app.js +2540 -0
  142. package/docs/website-console/index.html +24 -0
  143. package/docs/website-console/styles.css +975 -0
  144. package/examples/README.md +252 -0
  145. package/examples/cases/dogfood-v4-korean-hr-onboarding.md +356 -0
  146. package/examples/component-accordion-actions.md +153 -0
  147. package/examples/component-accordion-details.md +147 -0
  148. package/examples/component-accordion-summary.md +180 -0
  149. package/examples/component-accordion.md +229 -0
  150. package/examples/component-account-card.md +284 -0
  151. package/examples/component-address-input.md +260 -0
  152. package/examples/component-affix.md +190 -0
  153. package/examples/component-alert-dialog.md +210 -0
  154. package/examples/component-alert-title.md +77 -0
  155. package/examples/component-alert.md +192 -0
  156. package/examples/component-amount-input.md +278 -0
  157. package/examples/component-anchor.md +198 -0
  158. package/examples/component-app-bar.md +249 -0
  159. package/examples/component-aspect-ratio.md +156 -0
  160. package/examples/component-auto-complete.md +199 -0
  161. package/examples/component-avatar-group.md +170 -0
  162. package/examples/component-avatar.md +191 -0
  163. package/examples/component-back-top.md +123 -0
  164. package/examples/component-backdrop.md +148 -0
  165. package/examples/component-badge.md +181 -0
  166. package/examples/component-banner.md +237 -0
  167. package/examples/component-biometric-gate.md +281 -0
  168. package/examples/component-blockquote.md +153 -0
  169. package/examples/component-border-beam.md +207 -0
  170. package/examples/component-bottom-navigation.md +226 -0
  171. package/examples/component-box.md +112 -0
  172. package/examples/component-breadcrumb.md +222 -0
  173. package/examples/component-button-base.md +190 -0
  174. package/examples/component-button-group.md +117 -0
  175. package/examples/component-button.md +213 -0
  176. package/examples/component-calendar.md +280 -0
  177. package/examples/component-callout.md +131 -0
  178. package/examples/component-card-actions.md +101 -0
  179. package/examples/component-card-content.md +90 -0
  180. package/examples/component-card-header.md +122 -0
  181. package/examples/component-card-media.md +79 -0
  182. package/examples/component-card.md +233 -0
  183. package/examples/component-carousel.md +266 -0
  184. package/examples/component-cascader.md +135 -0
  185. package/examples/component-category-picker.md +271 -0
  186. package/examples/component-chart.md +237 -0
  187. package/examples/component-chat-interface.md +399 -0
  188. package/examples/component-checkbox.md +149 -0
  189. package/examples/component-click-away-listener.md +87 -0
  190. package/examples/component-code.md +213 -0
  191. package/examples/component-collapsible.md +219 -0
  192. package/examples/component-color-picker.md +110 -0
  193. package/examples/component-combobox.md +267 -0
  194. package/examples/component-command.md +299 -0
  195. package/examples/component-config-provider.md +190 -0
  196. package/examples/component-context-menu.md +179 -0
  197. package/examples/component-css-baseline.md +148 -0
  198. package/examples/component-date-picker.md +249 -0
  199. package/examples/component-descriptions.md +242 -0
  200. package/examples/component-dialog-actions.md +111 -0
  201. package/examples/component-dialog-content-text.md +76 -0
  202. package/examples/component-dialog-content.md +105 -0
  203. package/examples/component-dialog-title.md +104 -0
  204. package/examples/component-dialog.md +176 -0
  205. package/examples/component-divider.md +182 -0
  206. package/examples/component-doc-page.md +217 -0
  207. package/examples/component-drawer.md +257 -0
  208. package/examples/component-dropdown.md +220 -0
  209. package/examples/component-email-layout.md +253 -0
  210. package/examples/component-empty-state.md +269 -0
  211. package/examples/component-empty.md +172 -0
  212. package/examples/component-fade.md +87 -0
  213. package/examples/component-feature-grid.md +201 -0
  214. package/examples/component-field.md +266 -0
  215. package/examples/component-filled-input.md +114 -0
  216. package/examples/component-flex.md +117 -0
  217. package/examples/component-float-button.md +214 -0
  218. package/examples/component-form-control-label.md +134 -0
  219. package/examples/component-form-control.md +113 -0
  220. package/examples/component-form-controls.md +251 -0
  221. package/examples/component-form-group.md +86 -0
  222. package/examples/component-form-helper-text.md +95 -0
  223. package/examples/component-form-label.md +98 -0
  224. package/examples/component-form.md +291 -0
  225. package/examples/component-game-hud.md +362 -0
  226. package/examples/component-game-menu.md +327 -0
  227. package/examples/component-grid.md +140 -0
  228. package/examples/component-grow.md +79 -0
  229. package/examples/component-hero-block.md +252 -0
  230. package/examples/component-hover-card.md +211 -0
  231. package/examples/component-icon-button.md +142 -0
  232. package/examples/component-icon.md +102 -0
  233. package/examples/component-illustration.md +280 -0
  234. package/examples/component-image-list.md +107 -0
  235. package/examples/component-image.md +282 -0
  236. package/examples/component-input-adornment.md +101 -0
  237. package/examples/component-input-base.md +134 -0
  238. package/examples/component-input-number.md +141 -0
  239. package/examples/component-input-otp.md +271 -0
  240. package/examples/component-input.md +213 -0
  241. package/examples/component-item.md +243 -0
  242. package/examples/component-kbd.md +197 -0
  243. package/examples/component-krw-amount.md +219 -0
  244. package/examples/component-label.md +118 -0
  245. package/examples/component-layout.md +217 -0
  246. package/examples/component-link.md +223 -0
  247. package/examples/component-list-item-avatar.md +72 -0
  248. package/examples/component-list-item-button.md +139 -0
  249. package/examples/component-list-item-icon.md +82 -0
  250. package/examples/component-list-item-text.md +98 -0
  251. package/examples/component-list-item.md +116 -0
  252. package/examples/component-list-subheader.md +70 -0
  253. package/examples/component-list.md +198 -0
  254. package/examples/component-loading-button.md +125 -0
  255. package/examples/component-loading-sequence.md +254 -0
  256. package/examples/component-lottie-player.md +279 -0
  257. package/examples/component-masonry.md +191 -0
  258. package/examples/component-mentions.md +189 -0
  259. package/examples/component-menu-item.md +102 -0
  260. package/examples/component-menu-list.md +98 -0
  261. package/examples/component-menu.md +139 -0
  262. package/examples/component-menubar.md +259 -0
  263. package/examples/component-message.md +162 -0
  264. package/examples/component-mobile-stepper.md +155 -0
  265. package/examples/component-modal.md +220 -0
  266. package/examples/component-navigation-menu.md +295 -0
  267. package/examples/component-notification.md +166 -0
  268. package/examples/component-otp-countdown.md +245 -0
  269. package/examples/component-outlined-input.md +145 -0
  270. package/examples/component-page-transition.md +281 -0
  271. package/examples/component-pagination.md +226 -0
  272. package/examples/component-paper.md +199 -0
  273. package/examples/component-pass-auth.md +265 -0
  274. package/examples/component-payment-brand-button.md +253 -0
  275. package/examples/component-payment-method-selector.md +272 -0
  276. package/examples/component-payment-receipt.md +277 -0
  277. package/examples/component-popconfirm.md +144 -0
  278. package/examples/component-popover.md +239 -0
  279. package/examples/component-popper.md +129 -0
  280. package/examples/component-pricing-cards.md +247 -0
  281. package/examples/component-progress.md +195 -0
  282. package/examples/component-qr-code.md +201 -0
  283. package/examples/component-radio.md +167 -0
  284. package/examples/component-rate.md +202 -0
  285. package/examples/component-resizable.md +163 -0
  286. package/examples/component-result.md +270 -0
  287. package/examples/component-scroll-area.md +199 -0
  288. package/examples/component-scroll-reveal.md +320 -0
  289. package/examples/component-segmented.md +178 -0
  290. package/examples/component-select.md +258 -0
  291. package/examples/component-separator.md +177 -0
  292. package/examples/component-sheet.md +277 -0
  293. package/examples/component-sidebar.md +257 -0
  294. package/examples/component-skeleton.md +178 -0
  295. package/examples/component-slide.md +89 -0
  296. package/examples/component-slider.md +208 -0
  297. package/examples/component-snackbar-content.md +92 -0
  298. package/examples/component-snackbar.md +121 -0
  299. package/examples/component-sonner.md +165 -0
  300. package/examples/component-space.md +125 -0
  301. package/examples/component-spatial-locomotion.md +373 -0
  302. package/examples/component-spatial-panel.md +330 -0
  303. package/examples/component-speed-dial-action.md +78 -0
  304. package/examples/component-speed-dial.md +177 -0
  305. package/examples/component-spin.md +173 -0
  306. package/examples/component-spinner.md +204 -0
  307. package/examples/component-splitter.md +210 -0
  308. package/examples/component-stack.md +130 -0
  309. package/examples/component-statistic.md +282 -0
  310. package/examples/component-step-button.md +157 -0
  311. package/examples/component-step-connector.md +157 -0
  312. package/examples/component-step-content.md +121 -0
  313. package/examples/component-step-icon.md +115 -0
  314. package/examples/component-step-label.md +101 -0
  315. package/examples/component-step.md +84 -0
  316. package/examples/component-steps.md +264 -0
  317. package/examples/component-stock-chart.md +251 -0
  318. package/examples/component-swipeable-drawer.md +149 -0
  319. package/examples/component-switch.md +99 -0
  320. package/examples/component-tab-scroll-button.md +180 -0
  321. package/examples/component-tab.md +120 -0
  322. package/examples/component-table-body.md +82 -0
  323. package/examples/component-table-cell.md +118 -0
  324. package/examples/component-table-container.md +75 -0
  325. package/examples/component-table-footer.md +72 -0
  326. package/examples/component-table-head.md +78 -0
  327. package/examples/component-table-pagination.md +137 -0
  328. package/examples/component-table-row.md +113 -0
  329. package/examples/component-table-sort-label.md +109 -0
  330. package/examples/component-table.md +202 -0
  331. package/examples/component-tabs.md +184 -0
  332. package/examples/component-tag-badge.md +309 -0
  333. package/examples/component-tag.md +102 -0
  334. package/examples/component-testimonial-carousel.md +218 -0
  335. package/examples/component-textarea-autosize.md +114 -0
  336. package/examples/component-textarea.md +173 -0
  337. package/examples/component-time-picker.md +205 -0
  338. package/examples/component-timeline.md +170 -0
  339. package/examples/component-toast.md +224 -0
  340. package/examples/component-toggle-button.md +129 -0
  341. package/examples/component-toggle.md +220 -0
  342. package/examples/component-toolbar.md +104 -0
  343. package/examples/component-tooltip.md +178 -0
  344. package/examples/component-tour.md +176 -0
  345. package/examples/component-transaction-list-item.md +243 -0
  346. package/examples/component-transfer.md +156 -0
  347. package/examples/component-tree-select.md +202 -0
  348. package/examples/component-tree.md +297 -0
  349. package/examples/component-typography.md +215 -0
  350. package/examples/component-upload.md +295 -0
  351. package/examples/component-video-hero.md +409 -0
  352. package/examples/component-video-player.md +340 -0
  353. package/examples/component-voice-input.md +408 -0
  354. package/examples/component-watermark.md +217 -0
  355. package/examples/component-zoom.md +92 -0
  356. package/examples/doc-explanation-example.md +196 -0
  357. package/examples/doc-how-to-example.md +205 -0
  358. package/examples/doc-tutorial-example.md +162 -0
  359. package/examples/dogfood-korean-fintech-system.md +433 -0
  360. package/examples/email-transactional-example.md +259 -0
  361. package/examples/palette-saas-violet.md +235 -0
  362. package/examples/print-business-card-spec.md +205 -0
  363. package/examples/print-packaging-spec.md +285 -0
  364. package/examples/report-example.md +228 -0
  365. package/examples/slide-deck-example.md +237 -0
  366. package/examples/website-improvement-report.md +128 -0
  367. package/examples/website-improvement-workspace.json +126 -0
  368. package/install.sh +189 -0
  369. package/knowledge/COVERAGE.md +740 -0
  370. package/knowledge/PRINCIPLES.md +108 -0
  371. package/knowledge/a11y/contrast.md +70 -0
  372. package/knowledge/a11y/keyboard-and-focus.md +108 -0
  373. package/knowledge/colors/color-theory.md +90 -0
  374. package/knowledge/colors/mui-palette-structure.md +105 -0
  375. package/knowledge/colors/palettes-by-product-type.md +876 -0
  376. package/knowledge/components/INDEX.md +231 -0
  377. package/knowledge/components/index.json +1470 -0
  378. package/knowledge/components/shadcn-registry.md +159 -0
  379. package/knowledge/conversational/ai-chat-interfaces.md +323 -0
  380. package/knowledge/conversational/chatbot-design.md +312 -0
  381. package/knowledge/conversational/conversational-ui-fundamentals.md +299 -0
  382. package/knowledge/conversational/korean-voice-conventions.md +281 -0
  383. package/knowledge/conversational/voice-ui-patterns.md +297 -0
  384. package/knowledge/design-tokens/ant-design.md +124 -0
  385. package/knowledge/design-tokens/material-3.md +235 -0
  386. package/knowledge/design-tokens/polaris-and-carbon.md +231 -0
  387. package/knowledge/design-tokens/tailwind-v4.md +284 -0
  388. package/knowledge/game-ui/game-accessibility.md +317 -0
  389. package/knowledge/game-ui/game-ui-fundamentals.md +281 -0
  390. package/knowledge/game-ui/hud-design.md +324 -0
  391. package/knowledge/game-ui/korean-gaming-conventions.md +312 -0
  392. package/knowledge/game-ui/menu-systems.md +388 -0
  393. package/knowledge/i18n/korean-app-store-visual.md +223 -0
  394. package/knowledge/i18n/korean-document-style.md +301 -0
  395. package/knowledge/i18n/korean-payments.md +211 -0
  396. package/knowledge/i18n/korean-product-conventions.md +96 -0
  397. package/knowledge/i18n/korean-publishing.md +139 -0
  398. package/knowledge/i18n/korean-typography.md +123 -0
  399. package/knowledge/icons/curated-sets.md +225 -0
  400. package/knowledge/illustration/hero-illustrations.md +234 -0
  401. package/knowledge/illustration/illustration-systems.md +221 -0
  402. package/knowledge/illustration/mascot-design.md +208 -0
  403. package/knowledge/illustration/spot-illustrations.md +246 -0
  404. package/knowledge/illustration/svg-optimization.md +308 -0
  405. package/knowledge/layout/spacing-and-grid.md +119 -0
  406. package/knowledge/motion/app-loading-sequences.md +277 -0
  407. package/knowledge/motion/choreography-depth.md +297 -0
  408. package/knowledge/motion/marketing-motion.md +223 -0
  409. package/knowledge/motion/micro-interactions.md +266 -0
  410. package/knowledge/motion/motion-tools.md +281 -0
  411. package/knowledge/motion/principles.md +126 -0
  412. package/knowledge/patterns/auth-flow-design.md +316 -0
  413. package/knowledge/patterns/b2b-onboarding-flows.md +182 -0
  414. package/knowledge/patterns/brand-identity.md +238 -0
  415. package/knowledge/patterns/brand-references.md +97 -0
  416. package/knowledge/patterns/chart-color-encoding.md +269 -0
  417. package/knowledge/patterns/chart-types.md +344 -0
  418. package/knowledge/patterns/dashboard-composition.md +299 -0
  419. package/knowledge/patterns/design-system-qa.md +356 -0
  420. package/knowledge/patterns/document-typography.md +248 -0
  421. package/knowledge/patterns/email-design.md +338 -0
  422. package/knowledge/patterns/empty-states.md +263 -0
  423. package/knowledge/patterns/error-states.md +318 -0
  424. package/knowledge/patterns/form-design.md +237 -0
  425. package/knowledge/patterns/information-architecture.md +341 -0
  426. package/knowledge/patterns/landing-hero-design.md +283 -0
  427. package/knowledge/patterns/landing-page-patterns.md +681 -0
  428. package/knowledge/patterns/list-and-feed.md +371 -0
  429. package/knowledge/patterns/mobile-navigation.md +278 -0
  430. package/knowledge/patterns/money-and-amount.md +301 -0
  431. package/knowledge/patterns/onboarding.md +300 -0
  432. package/knowledge/patterns/pricing-page-design.md +261 -0
  433. package/knowledge/patterns/realtime-data.md +280 -0
  434. package/knowledge/patterns/report-design.md +330 -0
  435. package/knowledge/patterns/search-ux.md +373 -0
  436. package/knowledge/patterns/settings-page.md +325 -0
  437. package/knowledge/patterns/slide-deck-design.md +316 -0
  438. package/knowledge/patterns/styles-catalog.md +2599 -0
  439. package/knowledge/patterns/technical-writing.md +306 -0
  440. package/knowledge/patterns/ui-reasoning.md +1853 -0
  441. package/knowledge/patterns/ux-guidelines.md +1454 -0
  442. package/knowledge/platforms/react-native.md +395 -0
  443. package/knowledge/print/brochures-and-flyers.md +276 -0
  444. package/knowledge/print/korean-print-conventions.md +284 -0
  445. package/knowledge/print/packaging.md +321 -0
  446. package/knowledge/print/print-fundamentals.md +238 -0
  447. package/knowledge/print/signage-and-posters.md +235 -0
  448. package/knowledge/print/stationery.md +262 -0
  449. package/knowledge/spatial/ar-patterns.md +253 -0
  450. package/knowledge/spatial/comfort-and-accessibility.md +245 -0
  451. package/knowledge/spatial/spatial-design-fundamentals.md +346 -0
  452. package/knowledge/spatial/spatial-ui-elements.md +343 -0
  453. package/knowledge/spatial/vr-patterns.md +302 -0
  454. package/knowledge/typography/font-pairings.md +332 -0
  455. package/knowledge/typography/mui-type-scale.md +57 -0
  456. package/knowledge/typography/type-scale-fundamentals.md +105 -0
  457. package/knowledge/video/in-product-video.md +277 -0
  458. package/knowledge/video/korean-video-conventions.md +247 -0
  459. package/knowledge/video/marketing-video.md +258 -0
  460. package/knowledge/video/social-and-short-form.md +257 -0
  461. package/knowledge/video/video-fundamentals.md +296 -0
  462. package/package.json +106 -0
  463. package/skills/README.md +39 -0
  464. package/skills/color-palette/PLAYBOOK.md +175 -0
  465. package/skills/color-palette/SKILL.md +6 -0
  466. package/skills/color-palette/TEMPLATE.md +103 -0
  467. package/skills/component-spec-writer/PLAYBOOK.md +169 -0
  468. package/skills/component-spec-writer/SKILL.md +6 -0
  469. package/skills/component-spec-writer/TEMPLATE.md +115 -0
  470. package/skills/conversational-ui-designer/PLAYBOOK.md +231 -0
  471. package/skills/conversational-ui-designer/SKILL.md +6 -0
  472. package/skills/design-broadcast/PLAYBOOK.md +146 -0
  473. package/skills/design-broadcast/SKILL.md +6 -0
  474. package/skills/design-critique/PLAYBOOK.md +137 -0
  475. package/skills/design-critique/SKILL.md +6 -0
  476. package/skills/design-pr-review/PLAYBOOK.md +171 -0
  477. package/skills/design-pr-review/SKILL.md +6 -0
  478. package/skills/design-system-builder/PLAYBOOK.md +218 -0
  479. package/skills/design-system-builder/SKILL.md +6 -0
  480. package/skills/design-system-qa/PLAYBOOK.md +163 -0
  481. package/skills/design-system-qa/SKILL.md +6 -0
  482. package/skills/document-author/PLAYBOOK.md +167 -0
  483. package/skills/document-author/SKILL.md +6 -0
  484. package/skills/figma-token-sync/PLAYBOOK.md +149 -0
  485. package/skills/figma-token-sync/SKILL.md +6 -0
  486. package/skills/game-ui-designer/PLAYBOOK.md +209 -0
  487. package/skills/game-ui-designer/SKILL.md +6 -0
  488. package/skills/handoff-spec/PLAYBOOK.md +170 -0
  489. package/skills/handoff-spec/SKILL.md +6 -0
  490. package/skills/illustration-designer/PLAYBOOK.md +166 -0
  491. package/skills/illustration-designer/SKILL.md +6 -0
  492. package/skills/motion-designer/PLAYBOOK.md +223 -0
  493. package/skills/motion-designer/SKILL.md +6 -0
  494. package/skills/print-designer/PLAYBOOK.md +209 -0
  495. package/skills/print-designer/SKILL.md +6 -0
  496. package/skills/slide-deck-author/PLAYBOOK.md +198 -0
  497. package/skills/slide-deck-author/SKILL.md +6 -0
  498. package/skills/spatial-designer/PLAYBOOK.md +238 -0
  499. package/skills/spatial-designer/SKILL.md +6 -0
  500. package/skills/ux-audit/PLAYBOOK.md +142 -0
  501. package/skills/ux-audit/SKILL.md +6 -0
  502. package/skills/video-designer/PLAYBOOK.md +240 -0
  503. package/skills/video-designer/SKILL.md +6 -0
  504. package/skills/website-improvement/PLAYBOOK.md +118 -0
  505. package/skills/website-improvement/SKILL.md +6 -0
  506. package/skills/website-improvement/TEMPLATE.md +103 -0
  507. package/tools/audit/changelog-generate.py +176 -0
  508. package/tools/audit/check-coverage.py +483 -0
  509. package/tools/audit/doctor_assertions.py +256 -0
  510. package/tools/audit/example-qa.py +108 -0
  511. package/tools/audit/frontmatter-check.py +199 -0
  512. package/tools/audit/integration-check.py +95 -0
  513. package/tools/audit/korean-copy-check.py +161 -0
  514. package/tools/audit/link-check.py +146 -0
  515. package/tools/audit/local-ci.py +558 -0
  516. package/tools/audit/package-contents.py +723 -0
  517. package/tools/audit/package-smoke.py +22443 -0
  518. package/tools/audit/raw-hex-check.py +252 -0
  519. package/tools/audit/registry-smoke.py +8188 -0
  520. package/tools/audit/release-metadata.py +9832 -0
  521. package/tools/audit/run-all.py +351 -0
  522. package/tools/audit/smoke_assertions.py +12742 -0
  523. package/tools/audit/stability-review.py +332 -0
  524. package/tools/audit/stale-check.py +156 -0
  525. package/tools/migrations/add-version-frontmatter.py +132 -0
  526. package/tools/migrations/bump-last-updated.py +131 -0
  527. package/tools/migrations/promote-stability.py +172 -0
  528. package/tools/preview/README.md +58 -0
  529. package/tools/preview/render-tokens.py +454 -0
@@ -0,0 +1,157 @@
1
+ # Dogfood findings - npm fresh install (Phase 41, refreshed for v4.13)
2
+
3
+ End-to-end test of the npm distribution path. Pack the package, install into a clean temp project, run the full CLI lifecycle, and verify symlinks are created and removed against a fake `CLAUDE_HOME`.
4
+
5
+ **Scope**: real `npm pack` -> real `npm install <tarball>` -> real `design-ai` package bin -> real symlink farm against a temporary Claude Code home.
6
+
7
+ ## Automated procedure
8
+
9
+ ```bash
10
+ npm run package:smoke
11
+ ```
12
+
13
+ `tools/audit/package-smoke.py` now performs the manual dogfood path:
14
+
15
+ - reuses `tools/audit/smoke_assertions.py` for doctor JSON parsing, `doctor --strict` human diagnostics, ANSI detection, and required-check assertions
16
+ - installs the packed `.tgz` into a fresh temp npm project
17
+ - verifies `node_modules/.bin/design-ai` exists
18
+ - runs human and JSON `version`, top-level `help`, `help --json`, every expected public `design-ai help <command>` topic with usage assertions, every documented help alias, every documented command alias with output assertions, functional aliases (`find`, `cat`, `recommend`, `example`, `ex`, `ls`, `lint`), human and JSON `list skills` / `list commands` / `list agents`, human and JSON `search` / `show` / `examples` / `check` output, explicit `show --lines` ranges and `route --explain` output, unknown route-id/option/value suggestion and numeric range failures, `install`, `doctor --json`, `doctor --strict`, human and JSON `status`, and `uninstall` with lifecycle output assertions
19
+ - verifies prompt/pack `--out --force` file writes by seeding an existing file, then checking both the generated artifact content and the `Wrote <path>` confirmation output
20
+ - asserts every required `doctor --json` package/release/install check reports `PASS` and `doctor --strict` prints the complete clean diagnostics summary
21
+ - uses a fake `CLAUDE_HOME` and `DESIGN_AI_PREFIX=smoke-design-`
22
+ - sets `NO_COLOR=1` and fails if wrapped commands emit ANSI escape sequences
23
+ - runs a local tarball `npm exec --package ... -- design-ai ...` path to simulate one-shot `npx`, including its own human/JSON version and top-level help checks, `help --json` catalog read, help topic usage, help alias, command alias, functional alias output, human and JSON list catalog, corpus discovery smoke, explicit `show --lines` ranges, `route --explain` output, JSON `check` report smoke, unknown route-id/option/value suggestion and numeric range failures, prompt/pack forced file-write confirmation smoke, and install/`doctor --strict`/human+JSON status/uninstall lifecycle output assertions
24
+ - asserts the `doctor --json` required PASS set for both direct install and one-shot `npm exec` install
25
+
26
+ The local `npm run release:check` gate and the GitHub audit/publish/release workflows call `npm run release:self-test`, which runs the audit runner, coverage timestamp preservation, doctor, shared smoke, package smoke, registry smoke, and release metadata assertion self-tests before package contents or tarball smoke checks. The same package smoke runs in publish/release workflows after `npm pack`. Release metadata also fails with structured bullet errors if a required release policy doc drops out of the checked set, an unexpected policy doc enters it, the checked docs order drifts, a required policy doc is missing from disk, a core release input is missing, unreadable, or invalid JSON, or the audit-count source cannot be loaded or parsed. Its JSON output keeps stable summary keys, checked-doc order, and readable Korean structured errors. `design-ai check`, `design-ai route`, `design-ai prompt`, `design-ai pack`, `design-ai examples`, `design-ai search`, `design-ai show`, `design-ai help`, `design-ai doctor`, `design-ai list`, `design-ai status`, `design-ai audit`, and `design-ai version` now also route machine-readable reports through self-tested JSON formatters so smoke assertions keep validating the same automation-facing shape.
27
+
28
+ ## Current result
29
+
30
+ Latest local tarball smoke:
31
+
32
+ ```text
33
+ @design-ai/cli@4.13.0
34
+ package size: 1.4 MB
35
+ unpacked size: 4.5 MB
36
+ total files: 500
37
+ Smoke assertions self-test passed
38
+ Release metadata self-test passed
39
+ Package smoke passed
40
+ ```
41
+
42
+ The installed-package doctor reported:
43
+
44
+ ```text
45
+ Summary: 16 pass, 0 warning(s), 0 failure(s)
46
+ Audit scripts: 8 repository audit script(s) found
47
+ Doctor assertions helper: tools/audit/doctor_assertions.py found
48
+ Smoke assertions helper: tools/audit/smoke_assertions.py found
49
+ Package contents check: tools/audit/package-contents.py found
50
+ Package smoke check: tools/audit/package-smoke.py found
51
+ Registry smoke check: tools/audit/registry-smoke.py found
52
+ Installed skills: 19/19 installed
53
+ Installed agents: 4/4 installed
54
+ Installed slash commands: 16/16 installed
55
+ ```
56
+
57
+ Uninstall removed 39 symlinks: 19 skills + 4 agents + 16 slash commands.
58
+
59
+ ## What worked
60
+
61
+ ### 1. `npm pack` allowlist is release-safe
62
+
63
+ Shipped: `cli/`, `install.sh`, `AGENTS.md`, `CLAUDE.md`, `CHANGELOG.md`, `LICENSE`, `README.md`, `.claude-plugin/`, `knowledge/`, `examples/`, `skills/`, `agents/`, `commands/`, `docs/`, `tools/audit/`, `tools/migrations/`, and `tools/preview/`.
64
+
65
+ Not shipped:
66
+
67
+ - `refs/` (large upstream source material)
68
+ - `tools/extractors/` (dev-only extraction tooling)
69
+ - `vscode-extension/` (separate package surface)
70
+ - `node_modules/`, `.git/`, packed `*.tgz` outputs
71
+ - `cli/**/*.test.mjs` and other test/spec files
72
+
73
+ ### 2. Version alignment resolves end-to-end
74
+
75
+ `design-ai version` reports both CLI and plugin/corpus version as `4.13.0`. The installer banner also reads the package plugin manifest through the JS wrapper, so the user-facing install path no longer shows a stale legacy version.
76
+
77
+ ### 3. Catalog commands enumerate the shipped corpus
78
+
79
+ `list skills`, `list commands`, and `list agents` read the packed plugin manifest and enumerate 19 skills, 16 commands, and 4 agents. The smoke assertions verify the section count and expected item names for each domain. `doctor --strict` confirms the installed package has all 39 expected symlink targets.
80
+
81
+ ### 4. Install lifecycle works against fake `CLAUDE_HOME`
82
+
83
+ Package smoke installs into a temp Claude home, verifies all source/runtime checks are clean, then uninstalls the same symlink set. The symlinks point into the npm-installed package, so package upgrades refresh the installed design corpus without copying stale files.
84
+
85
+ ### 5. `NO_COLOR` behavior is covered
86
+
87
+ The smoke path sets `NO_COLOR=1` and checks captured CLI output for ANSI escape sequences. This covers CI logs, package smoke logs, and non-interactive install usage.
88
+
89
+ ### 6. Shared smoke assertions are independently covered
90
+
91
+ `npm run release:self-test` now includes `npm run smoke:assertions:self-test`, which exercises the common helper used by package and registry smoke tests. It proves that ANSI escape detection, malformed doctor JSON handling, and required doctor check failures fail closed before the helper is used inside tarball or registry smoke paths.
92
+
93
+ ### 7. Coverage timestamp preservation is covered
94
+
95
+ `npm run release:self-test` now includes `npm run coverage:self-test`, which exercises `check-coverage.py` without touching `knowledge/COVERAGE.md`. It proves unchanged reports preserve the existing `generated_at` value while real report content changes refresh the date.
96
+
97
+ ### 8. Audit runner exit-code behavior is covered
98
+
99
+ `npm run release:self-test` now includes `npm run audit:runner:self-test`, which exercises `run-all.py` without invoking the repository audits. It proves strict mode exits non-zero on failures, warn-only mode keeps exit code 0 while naming failed audits, and the eight-audit release gate count stays explicit.
100
+
101
+ ### 9. Release metadata drift is covered
102
+
103
+ `npm run release:metadata` now verifies package/plugin version alignment, the top CHANGELOG entry, the current ROADMAP phase, required release sections, the documented eight-audit count, and the release-facing docs' `ci:local` MkDocs warning-policy baseline guidance across README, RELEASE-CHECKLIST, and Distribution docs. It also fails with structured bullet errors if the policy-doc coverage set or audit-count source drifts, and its JSON summary shape is self-tested. This prevents a release from passing when the implementation version and release narrative drift apart, or when English/Korean release guidance loses the docs warning-policy contract, its executable pre-push command, coverage membership, or audit-count grounding.
104
+
105
+ ## Issues surfaced
106
+
107
+ ### 1. `tools/migrations/` missing from npm package - resolved
108
+
109
+ **Original severity**: MEDIUM.
110
+
111
+ The v4.7 package omitted `tools/migrations/`, which blocked the documented `/stability-review` workflow for npm adopters. The package allowlist now includes `tools/migrations/`, and the v4.13 dry-run tarball includes those scripts.
112
+
113
+ ### 2. Legacy `install.sh` banner version - resolved
114
+
115
+ **Original severity**: LOW.
116
+
117
+ The old install path showed a hardcoded `v3.1` banner. The JS install command now reads `.claude-plugin/plugin.json` and prints `v4.13.0`; the package smoke verifies the shipped install path.
118
+
119
+ ### 3. ANSI color leaked into package smoke logs - resolved
120
+
121
+ **Original severity**: LOW.
122
+
123
+ The shell installer previously emitted color escapes in non-interactive smoke output. `install.sh` now disables color when `NO_COLOR` is set or stdout is not a TTY, and `package-smoke.py` fails if wrapped commands emit ANSI escapes.
124
+
125
+ ### 4. `npm test` remains repo-only in installed package - accepted
126
+
127
+ **Severity**: INFO.
128
+
129
+ The package intentionally excludes test files. Adopter health is covered by `tools/audit/package-smoke.py` and `design-ai doctor --strict`, while repository correctness remains covered by `npm test` before packing.
130
+
131
+ ## Verified fresh-install path
132
+
133
+ This dogfood approximates what a clean adopter sees:
134
+
135
+ 1. Install the packed CLI package.
136
+ 2. Run human and JSON `design-ai version`, top-level `help`, `help --json`, every expected command-specific help topic from the catalog with usage assertions, every documented help alias, every documented command alias with output assertions, functional aliases (`find`, `cat`, `recommend`, `example`, `ex`, `ls`, `lint`), all three `list` catalog domains in human and JSON mode, human / JSON `search`, `show`, `examples`, and `check`, explicit `show --lines` ranges and `route --explain` output, unknown route-id/option/value suggestion and numeric range failures, and prompt/pack forced file-output flows.
137
+ 3. Run `design-ai install` against an empty Claude Code home and assert the installer reports 19 skills, 4 agents, and 16 slash commands.
138
+ 4. Run `design-ai audit --strict --quiet`, `design-ai audit --strict --quiet --json`, `design-ai doctor --strict`, `design-ai status`, and `design-ai status --json`, asserting the audit reports all 8 checks passing, doctor reports 16 pass / 0 warnings / 0 failures, and status reports the same installed counts in human and JSON mode.
139
+ 5. Run `design-ai uninstall` and assert the symlink farm removal reports 39 removed links.
140
+ 6. Run the same lifecycle through local tarball `npm exec --package ...` to cover the `npx`-style bin path, including independent human/JSON version and top-level help checks, `help --json` catalog read, documented help topic usage and alias smoke, command alias smoke, functional alias smoke, human and JSON list catalog smoke, corpus discovery smoke, explicit `show --lines` ranges and `route --explain` output, unknown route-id/option/value suggestion and numeric range failures, prompt/pack forced file-write confirmation smoke, lifecycle output smoke, `doctor --strict` human diagnostics assertions, status JSON assertions, and the same `doctor --json` PASS assertions.
141
+
142
+ The path confirms package contents, bin shim creation, one-shot npm execution, version alignment, machine-readable version metadata JSON shape, machine-readable help-topic catalog JSON shape, route recommendation JSON shape, prompt-plan JSON shape, prompt-context bundle JSON shape, worked-example discovery JSON shape, corpus search JSON shape, corpus file JSON shape, doctor diagnostics JSON shape, manifest list catalog JSON shape, install-status JSON shape, manifest catalog enumeration, human-readable corpus discovery, artifact quality check JSON shape, explicit line-range display, route explanation details, route-id, option, search-directory value typo recovery, and numeric range validation, prompt/pack forced file-write UX, symlink creation, symlink cleanup, Korean character handling in catalog output, and no-color smoke logs.
143
+
144
+ ## What this does not validate
145
+
146
+ - Windows install behavior; POSIX symlinks may need a separate implementation.
147
+ - Corporate npm proxy, sandboxed shell, or restricted filesystem environments.
148
+ - Concurrent `design-ai install` executions.
149
+ - Actual `npm publish`, which would push to the public registry.
150
+ - Public-registry `npx @design-ai/cli install`; package smoke covers the equivalent local tarball `npm exec --package` path before publish.
151
+
152
+ ## Cross-reference
153
+
154
+ - [`docs/DOGFOOD-V4-FINDINGS.md`](DOGFOOD-V4-FINDINGS.md) - Phase 39 corpus content dogfood
155
+ - [`docs/DOGFOOD-V4-VSCODE-FINDINGS.md`](DOGFOOD-V4-VSCODE-FINDINGS.md) - Phase 40 VS Code extension dogfood
156
+ - [`docs/RELEASE-CHECKLIST.md`](RELEASE-CHECKLIST.md) - pre-release verification checklist
157
+ - `tools/audit/package-smoke.py` - automated npm tarball smoke
@@ -0,0 +1,135 @@
1
+ # Dogfood findings — VS Code extension (Phase 40)
2
+
3
+ Headless validation of the VS Code extension that was scaffolded in v3.8 and extended in v4.3 / v4.6 with new commands.
4
+
5
+ **Scope of this dogfood**: extension's pure logic (search algorithm, walkthrough pairing, README picking, manifest reading, glob/path utilities), shippability check via `.vsix` packaging, and command-manifest ↔ implementation parity.
6
+
7
+ **Out of scope**: an actual VS Code instance running the extension. That requires `@vscode/test-electron` (boots a headless VS Code) and was deferred to a future pass — the pure-logic surface tested here exercises the parts that historically had bugs.
8
+
9
+ ## What worked
10
+
11
+ ### 1. Pure logic was 100% extractable
12
+
13
+ The `vscode` API touches surface (window dialogs, quick-pick UI, document opening) is *small* relative to the work each command does. The work itself — file traversal, search matching, language-pair resolution, glob conversion — is pure Node.js. Extracted to `src/lib.ts`.
14
+
15
+ After extraction:
16
+ - `src/commands.ts` shrank from 423 → 310 lines (27% smaller).
17
+ - All non-`vscode` logic is now testable via `node --test`.
18
+ - 25 unit tests pass against `out/lib.js` (the *exact JS that ships*, not a transpiled shadow).
19
+
20
+ ### 2. .vsix builds cleanly
21
+
22
+ After 2 fixes (below), `npx @vscode/vsce package` produces `design-ai-vscode-0.2.0.vsix`:
23
+ - 13 files, 19.65 KB packed.
24
+ - 5 compiled JS files + 2 icons + LICENSE + CHANGELOG + README + manifest.
25
+ - No `src/`, `test/`, `*.map`, `node_modules/`, or `.vsix` regressions.
26
+
27
+ ### 3. Command-manifest ↔ implementation parity verified
28
+
29
+ 10 commands in `package.json` `contributes.commands`, 10 commands registered via `vscode.commands.registerCommand` in source. Zero drift.
30
+
31
+ ### 4. Compile remains clean
32
+
33
+ `tsc --noEmit` zero errors after the lib extraction. TypeScript types caught two small issues during the refactor (one `null` vs `undefined`, one missing return type) before tests ran.
34
+
35
+ ## Bugs surfaced — and fixed
36
+
37
+ ### 1. Search preview lost the matching keyword
38
+
39
+ **Found by**: writing `searchCorpus("Pretendard")` test asserting the preview contains "pretendard".
40
+
41
+ **Symptom**: 6 of ~20 hits had previews that didn't contain the search term. The preview was always `line.trim().slice(0, 120)` from line *start*. If the match appeared past character 120, the user saw context but not the match.
42
+
43
+ **Example before**:
44
+ ```
45
+ file: docs/QUICKSTART.md:57
46
+ preview: /design-from-brief Korean fintech for freelancers — invoice, expense tracking, tax estimation. Trustworthy, calm, mobile
47
+ ^^^ truncated; actual match "Pretendard" was at column 142 ^^^
48
+ ```
49
+
50
+ **Fix**: introduced `buildPreview(line, query)` that centers the preview on the match. ~50 chars before + match + remainder, with `…` markers on either side.
51
+
52
+ **After**:
53
+ ```
54
+ preview: …calm, mobile-first. **Pretendard** typography. Compliance with…
55
+ ```
56
+
57
+ This is a real adopter-facing improvement — search results that don't show the matched term are confusing.
58
+
59
+ ### 2. Missing icon.png
60
+
61
+ **Found by**: `vsce package` failure with `ERROR The specified icon 'extension/media/icon.png' wasn't found in the extension.`
62
+
63
+ **Symptom**: `package.json` declared `"icon": "media/icon.png"` but only `media/icon.svg` existed. The extension would have failed to publish to the marketplace.
64
+
65
+ **Fix**: generated a 128x128 PNG via PIL, matching the SVG's brand-teal gradient + white "D".
66
+
67
+ This is a **must-fix** before VS Code marketplace publish.
68
+
69
+ ### 3. test/ directory leaked into .vsix
70
+
71
+ **Found by**: inspecting the `.vsix` content listing — `test/lib.test.mjs` was in the package.
72
+
73
+ **Symptom**: tests bloat the package by ~2KB and ship test fixtures to adopters.
74
+
75
+ **Fix**: added `test/**` and `*.vsix` to `.vscodeignore`.
76
+
77
+ After fix: 14 files → 13 files, 21.96 KB → 19.65 KB.
78
+
79
+ ## Bugs not fixed (deferred)
80
+
81
+ ### 4. No headless VS Code integration test
82
+
83
+ The pure-logic tests are necessary but not sufficient. The `vscode` API surface (window.showQuickPick, workspace.openTextDocument, configuration.get) isn't covered. A real adopter session could surface bugs in:
84
+ - Quick-pick item rendering (long labels truncating).
85
+ - Configuration change propagation.
86
+ - Tree provider refresh on file changes.
87
+
88
+ **Action**: add `@vscode/test-electron` in a future phase. ~150 LOC + a CI matrix entry (Linux + macOS).
89
+
90
+ ### 5. No icon at intended quality
91
+
92
+ The PIL-generated icon is functional but not the polished brand icon a real launch would ship. It looks like a placeholder.
93
+
94
+ **Action**: replace with a designer-rendered 128x128 PNG before marketplace publish. This is launch-blocker-only.
95
+
96
+ ### 6. Configuration onChange handler edge cases
97
+
98
+ `vscode.workspace.onDidChangeConfiguration` triggers a full tree refresh when `design-ai.path` changes — but if the new path is invalid, the trees clear without surfacing an error. Adopters might think the extension broke.
99
+
100
+ **Action**: surface a warning in the new path is invalid (re-run `findDesignAiPath()` and message if it returns undefined).
101
+
102
+ ## What this validates
103
+
104
+ - Extension code shape is correct — lib/cmds split is testable.
105
+ - Manifest is internally consistent.
106
+ - `.vsix` ships clean (after gitignore fix).
107
+ - All 10 commands route to actual handlers.
108
+ - Search algorithm now correct.
109
+
110
+ ## What this does NOT validate
111
+
112
+ - Actual UI rendering inside VS Code.
113
+ - Configuration change handling under real VS Code load.
114
+ - Tree providers' performance on large knowledge corpora.
115
+ - Marketplace publish flow (needs Azure DevOps PAT setup).
116
+
117
+ These are real-VS-Code-instance concerns — Phase 40 stops at the boundary.
118
+
119
+ ## File-level summary
120
+
121
+ | File | Status |
122
+ | --- | --- |
123
+ | `vscode-extension/src/extension.ts` | Unchanged |
124
+ | `vscode-extension/src/commands.ts` | Refactored to import from lib.ts (310 lines, was 423) |
125
+ | `vscode-extension/src/lib.ts` | **New** — 8 pure helpers (searchCorpus / pairWalkthroughs / chooseWalkthrough / readManifest / pickReadme / walkMd / globToRegex / splitGlob) |
126
+ | `vscode-extension/src/paths.ts` | Unchanged |
127
+ | `vscode-extension/test/lib.test.mjs` | **New** — 25 unit tests |
128
+ | `vscode-extension/.vscodeignore` | Updated — exclude `test/`, `*.vsix` |
129
+ | `vscode-extension/media/icon.png` | **New** — 128x128 placeholder (designer should replace) |
130
+
131
+ ## Cross-reference
132
+
133
+ - [`docs/DOGFOOD-V4-FINDINGS.md`](DOGFOOD-V4-FINDINGS.md) — Phase 39 dogfood (corpus content)
134
+ - Phase 41 — npm fresh-install test (next)
135
+ - Phase 42 — mkdocs site build verification (after npm)
@@ -0,0 +1,222 @@
1
+ # Figma integration
2
+
3
+ How design-ai outputs flow into and out of Figma. This is the bridge between agent-generated artifacts (markdown specs, JSON tokens) and the visual surface designers actually edit in.
4
+
5
+ ## The two-way relationship
6
+
7
+ ```
8
+ ┌────────────────────────────┐
9
+ │ design-ai (this repo) │
10
+ │ knowledge/, skills/, │
11
+ │ examples/, refs/ │
12
+ └────────────────────────────┘
13
+ ▲ │
14
+ │ extract │ generate
15
+ │ ▼
16
+ ┌────────────────────────────┐
17
+ │ Figma │
18
+ │ Variables · Components │
19
+ │ Styles · Code Connect │
20
+ └────────────────────────────┘
21
+ ```
22
+
23
+ Two flows:
24
+
25
+ 1. **design-ai → Figma**: agent generates tokens / specs; designer applies them in Figma as variables, styles, and component documentation.
26
+ 2. **Figma → design-ai**: agent reads existing Figma file; extracts tokens or specs; cross-checks against the knowledge base.
27
+
28
+ ## Tooling layers
29
+
30
+ ### Figma MCP (Model Context Protocol)
31
+
32
+ The official Figma MCP server lets any AI agent that supports MCP read Figma files structurally. In Claude Code:
33
+
34
+ - `mcp__Figma__get_metadata` — file structure
35
+ - `mcp__Figma__get_design_context` — selected node's design context (tokens, styles, components used)
36
+ - `mcp__Figma__get_variable_defs` — extract Figma Variables (the closest thing to design tokens in Figma's model)
37
+ - `mcp__Figma__get_screenshot` — render a frame as an image
38
+ - `mcp__Figma__get_code_connect_map` / `add_code_connect_map` — Code Connect mapping between Figma components and code
39
+
40
+ Codex CLI: install the Figma MCP server in your `~/.codex/mcp.json` (Anthropic-compatible MCP config). Same tool names.
41
+
42
+ ### Figma Variables (design tokens)
43
+
44
+ Figma Variables are Figma's first-class design token system (introduced 2023). They support:
45
+
46
+ - **Color** (with mode/theme support — light/dark)
47
+ - **Number** (spacing, radius, sizes)
48
+ - **String** (text — labels, content)
49
+ - **Boolean** (visibility, switch state)
50
+
51
+ Variables are **the bridge token format**. Agent generates a token JSON (Style Dictionary or W3C DTCG); a designer (or a plugin) imports into Figma Variables.
52
+
53
+ ### Code Connect
54
+
55
+ Figma Code Connect lets you map a Figma component to a real code component. Once mapped, `Inspect` panel shows the actual code snippet, including imports.
56
+
57
+ For design-ai: when the agent specs a component (via `component-spec-writer`), include a `Code Connect mapping` section pointing at the production component. The designer then connects in Figma.
58
+
59
+ ## Workflow A: Token export from design-ai → Figma
60
+
61
+ Goal: a palette/token set generated by `color-palette` skill lands in Figma as Variables.
62
+
63
+ ### Step 1 — Generate tokens
64
+
65
+ Use the `color-palette` skill. Output should be Style Dictionary JSON (this is the most importable format).
66
+
67
+ Reference: [examples/palette-saas-violet.md](../examples/palette-saas-violet.md)
68
+
69
+ ### Step 2 — Convert to Figma Variables JSON
70
+
71
+ Figma Variables can be imported via:
72
+ - The official **Tokens Studio plugin** ([free tier](https://tokens.studio/)) — supports Style Dictionary imports.
73
+ - **Variables2CSS / variables-from-json plugins** — reverse direction.
74
+ - **Figma's REST API** — programmatic import, requires a Figma access token.
75
+
76
+ Tokens Studio JSON shape (compatible target for our extractor):
77
+
78
+ ```json
79
+ {
80
+ "global": {
81
+ "color": {
82
+ "primary": {
83
+ "50": { "value": "#F5F3FF", "type": "color" },
84
+ "500": { "value": "#8B5CF6", "type": "color" },
85
+ "600": { "value": "#7C3AED", "type": "color" }
86
+ }
87
+ }
88
+ }
89
+ }
90
+ ```
91
+
92
+ Our `Style Dictionary` output already matches this shape.
93
+
94
+ ### Step 3 — Import in Figma
95
+
96
+ 1. Open the target Figma file.
97
+ 2. Install the **Tokens Studio for Figma** plugin.
98
+ 3. `Plugins → Tokens Studio → Import` → paste JSON → choose theme set.
99
+ 4. `Apply to Figma` — creates/updates Variables. The variables are ready to assign to layers.
100
+
101
+ ### Step 4 — Roundtrip verification
102
+
103
+ After Tokens Studio imports, verify in Figma:
104
+ - Open `Local variables` panel (right sidebar → Variables).
105
+ - Confirm each token name + value matches.
106
+ - For multi-mode (light/dark): switch modes; values update.
107
+
108
+ ## Workflow B: Figma → design-ai (read existing design)
109
+
110
+ Goal: an existing Figma file's tokens/components feed back into the knowledge base or get audited by the agent.
111
+
112
+ ### Step 1 — Connect
113
+
114
+ Claude Code: invoke `mcp__plugin_design_figma__authenticate` first time. After auth, the file is readable.
115
+
116
+ Codex CLI: per-session OAuth flow.
117
+
118
+ ### Step 2 — Extract tokens
119
+
120
+ ```
121
+ mcp__Figma__get_variable_defs(file_key="...")
122
+ ```
123
+
124
+ Returns a JSON of all Variables. Store under `refs/figma/<file-name>-variables.json` (gitignored — Figma tokens are private).
125
+
126
+ ### Step 3 — Audit against knowledge
127
+
128
+ The agent compares the extracted tokens to:
129
+ - [`knowledge/colors/color-theory.md`](../knowledge/colors/color-theory.md) — ramp construction rules
130
+ - [`knowledge/a11y/contrast.md`](../knowledge/a11y/contrast.md) — contrast requirements
131
+ - [`knowledge/design-tokens/ant-design.md`](../knowledge/design-tokens/ant-design.md) — naming conventions
132
+
133
+ Output: a `ux-audit`-style report identifying missing semantic aliases, weak contrast pairs, naming inconsistencies.
134
+
135
+ ## Workflow C: Component spec → Figma component documentation
136
+
137
+ Goal: a spec authored by `component-spec-writer` becomes the Description text on the Figma main component.
138
+
139
+ ### Step 1 — Generate the spec
140
+
141
+ Use the skill. Reference: [examples/component-button.md](../examples/component-button.md).
142
+
143
+ ### Step 2 — Manual paste (current state)
144
+
145
+ Figma's Component Description supports markdown-flavored text. Paste the full spec body. Figma renders headings, lists, links, code blocks.
146
+
147
+ ### Step 3 — Code Connect (optional but recommended)
148
+
149
+ Map the Figma main component to the production component. Once mapped:
150
+
151
+ ```ts
152
+ // in your repo, e.g., src/components/Button/Button.figma.tsx
153
+ import { Button } from "./Button";
154
+ import figma from "@figma/code-connect";
155
+
156
+ figma.connect(Button, "https://figma.com/file/.../Button", {
157
+ props: {
158
+ intent: figma.enum("Intent", {
159
+ Primary: "primary",
160
+ Danger: "danger",
161
+ }),
162
+ size: figma.enum("Size", {
163
+ Small: "sm",
164
+ Medium: "md",
165
+ Large: "lg",
166
+ }),
167
+ children: figma.children("Label"),
168
+ },
169
+ example: ({ intent, size, children }) => (
170
+ <Button intent={intent} size={size}>{children}</Button>
171
+ ),
172
+ });
173
+ ```
174
+
175
+ After running `npx figma connect publish`, the Figma `Inspect` panel shows the actual Button code snippet with the prop values matched to the variant the designer selected.
176
+
177
+ ### Step 4 — Cross-link in spec
178
+
179
+ The component spec should include a Code Connect section pointing both directions:
180
+
181
+ ```markdown
182
+ ## Code Connect
183
+
184
+ - Figma component: `https://figma.com/file/abc123/...?node-id=4:567`
185
+ - Production code: [`src/components/Button/Button.tsx`](../../../src/components/Button/Button.tsx)
186
+ - Code Connect manifest: [`src/components/Button/Button.figma.tsx`](../../../src/components/Button/Button.figma.tsx)
187
+ ```
188
+
189
+ ## Tooling matrix
190
+
191
+ | Need | Tool |
192
+ | --- | --- |
193
+ | Generate tokens (this repo → JSON) | `color-palette` skill, `design-system-builder` skill |
194
+ | Import tokens into Figma | Tokens Studio plugin, `figma-tokens` CLI, Figma REST API |
195
+ | Read Figma file structurally | Figma MCP (`mcp__Figma__*`), Figma REST API |
196
+ | Generate component code from Figma node | Figma Dev Mode + Code Connect |
197
+ | Sync component code back to Figma | Code Connect (`@figma/code-connect`) |
198
+ | Render frame as image (for visual diff/audit) | `mcp__Figma__get_screenshot` |
199
+ | Apply design-system rules to a Figma file | `mcp__Figma__create_design_system_rules` |
200
+
201
+ ## Limitations / caveats
202
+
203
+ - **Figma MCP requires the file to be open in Figma desktop / web** in the same account. It's not a server-side reader.
204
+ - **Figma Variables ≠ design tokens 1:1**: Figma doesn't support all token types (no shadow tokens — those go in Effect Styles separately; no motion tokens at all).
205
+ - **Roundtrip is lossy**: importing tokens → exporting back may lose comments and grouping. Treat one direction as authoritative (usually: code/JSON is canonical, Figma is a mirror).
206
+ - **Code Connect mapping is per-component manual work** — no auto-generation. Budget ~10 minutes per component for the initial map.
207
+ - **Figma file URLs are sensitive** — they imply file access. Don't commit Figma URLs to public repos for unreleased designs.
208
+
209
+ ## Recommended setup for this repo
210
+
211
+ 1. Keep canonical tokens in code (this repo's `knowledge/design-tokens/` and `examples/`).
212
+ 2. Mirror to Figma via Tokens Studio when designs need them.
213
+ 3. Author component specs here (using `component-spec-writer`); paste into Figma component descriptions.
214
+ 4. Add Code Connect manifests in the consuming product repo (not here — design-ai stays generic).
215
+ 5. Use Figma MCP to read a designer's file when the agent needs to audit, not as a daily workflow tool.
216
+
217
+ ## Cross-reference
218
+
219
+ - [docs/USING.md](USING.md) — running design-ai with various AI agents
220
+ - [skills/color-palette/PLAYBOOK.md](../skills/color-palette/PLAYBOOK.md) — palette generator
221
+ - [skills/component-spec-writer/PLAYBOOK.md](../skills/component-spec-writer/PLAYBOOK.md) — component spec authoring
222
+ - [examples/palette-saas-violet.md](../examples/palette-saas-violet.md) — Style Dictionary JSON output ready for Tokens Studio import