@bovinphang/frontend-craft 2.7.0 → 2.8.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 (380) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +34 -0
  4. package/CHANGELOG.zh-CN.md +34 -0
  5. package/README.md +1 -1
  6. package/README.openclaw.md +99 -43
  7. package/README.openclaw.zh-CN.md +99 -43
  8. package/README.zh-CN.md +1 -1
  9. package/agents/fec-architect.md +70 -70
  10. package/agents/fec-code-reviewer.md +82 -82
  11. package/agents/fec-debugger.md +20 -20
  12. package/agents/fec-design-token-mapper.md +36 -36
  13. package/agents/fec-doc-updater.md +13 -13
  14. package/agents/fec-e2e-runner.md +45 -45
  15. package/agents/fec-figma-implementer.md +59 -59
  16. package/agents/fec-performance-optimizer.md +128 -128
  17. package/agents/fec-refactor-cleaner.md +14 -14
  18. package/agents/fec-security-reviewer.md +66 -67
  19. package/agents/fec-test-planner.md +27 -27
  20. package/agents/fec-typescript-reviewer.md +87 -87
  21. package/agents/fec-ui-checker.md +74 -74
  22. package/commands/fec-debug.md +19 -19
  23. package/commands/fec-doc-sync.md +11 -11
  24. package/commands/fec-init.md +37 -38
  25. package/commands/fec-plan.md +58 -58
  26. package/commands/fec-refactor-clean.md +11 -11
  27. package/commands/fec-review.md +41 -41
  28. package/commands/fec-scaffold.md +41 -41
  29. package/commands/fec-tdd.md +13 -13
  30. package/dist/bin/frontend-craft.js +29 -27
  31. package/docs/example-prompts.md +3 -0
  32. package/docs/ja-JP/README.md +1 -1
  33. package/docs/ko-KR/README.md +1 -1
  34. package/docs/project-structure.md +13 -5
  35. package/docs/zh-CN/example-prompts.md +3 -0
  36. package/docs/zh-CN/project-structure.md +6 -1
  37. package/docs/zh-TW/README.md +1 -1
  38. package/localized/zh-CN/agents/fec-architect.md +125 -0
  39. package/localized/zh-CN/agents/fec-code-reviewer.md +152 -0
  40. package/localized/zh-CN/agents/fec-debugger.md +44 -0
  41. package/localized/zh-CN/agents/fec-design-token-mapper.md +75 -0
  42. package/localized/zh-CN/agents/fec-doc-updater.md +30 -0
  43. package/localized/zh-CN/agents/fec-e2e-runner.md +107 -0
  44. package/localized/zh-CN/agents/fec-figma-implementer.md +104 -0
  45. package/localized/zh-CN/agents/fec-performance-optimizer.md +293 -0
  46. package/localized/zh-CN/agents/fec-refactor-cleaner.md +32 -0
  47. package/localized/zh-CN/agents/fec-security-reviewer.md +116 -0
  48. package/localized/zh-CN/agents/fec-test-planner.md +50 -0
  49. package/localized/zh-CN/agents/fec-typescript-reviewer.md +142 -0
  50. package/localized/zh-CN/agents/fec-ui-checker.md +120 -0
  51. package/localized/zh-CN/commands/fec-debug.md +30 -0
  52. package/localized/zh-CN/commands/fec-doc-sync.md +19 -0
  53. package/localized/zh-CN/commands/fec-init.md +70 -0
  54. package/localized/zh-CN/commands/fec-plan.md +94 -0
  55. package/localized/zh-CN/commands/fec-refactor-clean.md +19 -0
  56. package/localized/zh-CN/commands/fec-review.md +66 -0
  57. package/localized/zh-CN/commands/fec-scaffold.md +205 -0
  58. package/localized/zh-CN/commands/fec-tdd.md +21 -0
  59. package/localized/zh-CN/skills/TEMPLATE.md +155 -0
  60. package/localized/zh-CN/skills/eval_queries.json +1013 -0
  61. package/localized/zh-CN/skills/fec-accessibility-check/SKILL.md +39 -0
  62. package/localized/zh-CN/skills/fec-accessibility-check/references/report-template.md +23 -0
  63. package/localized/zh-CN/skills/fec-accessibility-check/references/screen-reader-testing.md +33 -0
  64. package/localized/zh-CN/skills/fec-alchemy/SKILL.md +74 -0
  65. package/localized/zh-CN/skills/fec-alchemy/assets/absorption-plan-template.md +47 -0
  66. package/localized/zh-CN/skills/fec-alchemy/assets/intake-template.md +55 -0
  67. package/localized/zh-CN/skills/fec-alchemy/assets/review-checklist.md +31 -0
  68. package/localized/zh-CN/skills/fec-alchemy/references/methodology.md +94 -0
  69. package/localized/zh-CN/skills/fec-alchemy/references/originality-and-licensing.md +57 -0
  70. package/localized/zh-CN/skills/fec-api-integration/SKILL.md +78 -0
  71. package/localized/zh-CN/skills/fec-api-integration/references/integration-patterns.md +80 -0
  72. package/localized/zh-CN/skills/fec-backend-requirements-handoff/SKILL.md +45 -0
  73. package/localized/zh-CN/skills/fec-browser-storage/SKILL.md +34 -0
  74. package/localized/zh-CN/skills/fec-browser-storage/references/storage-patterns.md +65 -0
  75. package/localized/zh-CN/skills/fec-canvas-threejs/SKILL.md +66 -0
  76. package/localized/zh-CN/skills/fec-canvas-threejs/references/rendering-patterns.md +67 -0
  77. package/localized/zh-CN/skills/fec-canvas-threejs/references/shader-webgl-patterns.md +67 -0
  78. package/localized/zh-CN/skills/fec-code-review/SKILL.md +143 -0
  79. package/localized/zh-CN/skills/fec-code-review/references/report-template.md +29 -0
  80. package/localized/zh-CN/skills/fec-component-testing/SKILL.md +119 -0
  81. package/localized/zh-CN/skills/fec-data-fetching/SKILL.md +62 -0
  82. package/localized/zh-CN/skills/fec-data-fetching/references/query-patterns.md +103 -0
  83. package/localized/zh-CN/skills/fec-debug-framework/SKILL.md +157 -0
  84. package/localized/zh-CN/skills/fec-debug-framework/references/report-template.md +58 -0
  85. package/localized/zh-CN/skills/fec-dependency-upgrade/SKILL.md +34 -0
  86. package/localized/zh-CN/skills/fec-dependency-upgrade/references/dependency-upgrade-workflow.md +56 -0
  87. package/localized/zh-CN/skills/fec-doc-sync/SKILL.md +39 -0
  88. package/localized/zh-CN/skills/fec-drawio-studio/SKILL.md +73 -0
  89. package/localized/zh-CN/skills/fec-drawio-studio/data/THIRD_PARTY_NOTICES.md +10 -0
  90. package/localized/zh-CN/skills/fec-drawio-studio/data/brand-icons.json +878 -0
  91. package/localized/zh-CN/skills/fec-drawio-studio/data/shape-index.json +83570 -0
  92. package/localized/zh-CN/skills/fec-drawio-studio/references/data-residency.md +27 -0
  93. package/localized/zh-CN/skills/fec-drawio-studio/references/diagram-patterns.md +60 -0
  94. package/localized/zh-CN/skills/fec-drawio-studio/references/flowchart-quality.md +49 -0
  95. package/localized/zh-CN/skills/fec-drawio-studio/references/layout-and-export.md +72 -0
  96. package/localized/zh-CN/skills/fec-drawio-studio/references/troubleshooting.md +29 -0
  97. package/localized/zh-CN/skills/fec-drawio-studio/references/xml-and-mermaid.md +58 -0
  98. package/localized/zh-CN/skills/fec-drawio-studio/scripts/brand-symbols.mjs +99 -0
  99. package/localized/zh-CN/skills/fec-drawio-studio/scripts/diagram-lint.mjs +205 -0
  100. package/localized/zh-CN/skills/fec-drawio-studio/scripts/diagram-url.mjs +102 -0
  101. package/localized/zh-CN/skills/fec-drawio-studio/scripts/drawio-export.mjs +134 -0
  102. package/localized/zh-CN/skills/fec-drawio-studio/scripts/layout-graph.mjs +107 -0
  103. package/localized/zh-CN/skills/fec-drawio-studio/scripts/png-embed-fix.mjs +26 -0
  104. package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-go-packages.mjs +36 -0
  105. package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-js-modules.mjs +52 -0
  106. package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-python-classes.mjs +30 -0
  107. package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-python-modules.mjs +55 -0
  108. package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-rust-modules.mjs +35 -0
  109. package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-ts-modules.mjs +7 -0
  110. package/localized/zh-CN/skills/fec-drawio-studio/scripts/shape-query.mjs +121 -0
  111. package/localized/zh-CN/skills/fec-drawio-studio/scripts/studio-core.mjs +139 -0
  112. package/localized/zh-CN/skills/fec-drawio-studio/styles/built-in/corporate.json +49 -0
  113. package/localized/zh-CN/skills/fec-drawio-studio/styles/built-in/default.json +49 -0
  114. package/localized/zh-CN/skills/fec-drawio-studio/styles/built-in/handdrawn.json +49 -0
  115. package/localized/zh-CN/skills/fec-drawio-studio/styles/schema.json +112 -0
  116. package/localized/zh-CN/skills/fec-e2e-testing/SKILL.md +42 -0
  117. package/localized/zh-CN/skills/fec-e2e-testing/references/e2e-ci-reporting.md +62 -0
  118. package/localized/zh-CN/skills/fec-e2e-testing/references/e2e-special-scenarios.md +52 -0
  119. package/localized/zh-CN/skills/fec-e2e-testing/references/e2e-visual-regression.md +60 -0
  120. package/localized/zh-CN/skills/fec-e2e-testing/references/playwright-patterns.md +95 -0
  121. package/localized/zh-CN/skills/fec-form-handling/SKILL.md +76 -0
  122. package/localized/zh-CN/skills/fec-form-handling/references/advanced-form-patterns.md +101 -0
  123. package/localized/zh-CN/skills/fec-image-generation/SKILL.md +80 -0
  124. package/localized/zh-CN/skills/fec-image-generation/assets/interactive-diagram.html +371 -0
  125. package/localized/zh-CN/skills/fec-image-generation/references/artifact-routing.md +80 -0
  126. package/localized/zh-CN/skills/fec-image-generation/references/diagram-workflows.md +74 -0
  127. package/localized/zh-CN/skills/fec-image-generation/references/html-technical-diagrams.md +236 -0
  128. package/localized/zh-CN/skills/fec-image-generation/references/png-qa-autofix.md +30 -0
  129. package/localized/zh-CN/skills/fec-image-generation/scripts/export-diagram.mjs +364 -0
  130. package/localized/zh-CN/skills/fec-image-generation/scripts/interactive-diagram-server.mjs +654 -0
  131. package/localized/zh-CN/skills/fec-image-generation/scripts/png-qa.mjs +431 -0
  132. package/localized/zh-CN/skills/fec-image-generation/scripts/tech-diagram-render.mjs +1397 -0
  133. package/localized/zh-CN/skills/fec-implement-from-design/SKILL.md +129 -0
  134. package/localized/zh-CN/skills/fec-implement-from-design/references/design-plan-template.md +36 -0
  135. package/localized/zh-CN/skills/fec-legacy-to-modern-migration/SKILL.md +46 -0
  136. package/localized/zh-CN/skills/fec-legacy-to-modern-migration/references/migration-execution-checklist.md +110 -0
  137. package/localized/zh-CN/skills/fec-legacy-to-modern-migration/references/migration-report-template.md +41 -0
  138. package/localized/zh-CN/skills/fec-legacy-to-modern-migration/references/migration-strategy-and-mapping.md +48 -0
  139. package/localized/zh-CN/skills/fec-legacy-web-standard/SKILL.md +35 -0
  140. package/localized/zh-CN/skills/fec-legacy-web-standard/references/legacy-patterns.md +85 -0
  141. package/localized/zh-CN/skills/fec-list-virtualization/SKILL.md +34 -0
  142. package/localized/zh-CN/skills/fec-list-virtualization/references/virtualization-patterns.md +80 -0
  143. package/localized/zh-CN/skills/fec-monorepo-project-standard/SKILL.md +142 -0
  144. package/localized/zh-CN/skills/fec-motion-interaction/SKILL.md +73 -0
  145. package/localized/zh-CN/skills/fec-motion-interaction/references/motion-patterns.md +112 -0
  146. package/localized/zh-CN/skills/fec-nextjs-project-standard/SKILL.md +123 -0
  147. package/localized/zh-CN/skills/fec-nuxt-project-standard/SKILL.md +122 -0
  148. package/localized/zh-CN/skills/fec-performance-optimization/SKILL.md +80 -0
  149. package/localized/zh-CN/skills/fec-performance-optimization/references/framework-performance-patterns.md +38 -0
  150. package/localized/zh-CN/skills/fec-performance-optimization/references/report-template.md +59 -0
  151. package/localized/zh-CN/skills/fec-pwa-implementation/SKILL.md +35 -0
  152. package/localized/zh-CN/skills/fec-pwa-implementation/references/manifest-and-icons.md +53 -0
  153. package/localized/zh-CN/skills/fec-pwa-implementation/references/service-worker-workbox.md +68 -0
  154. package/localized/zh-CN/skills/fec-react-project-standard/SKILL.md +91 -0
  155. package/localized/zh-CN/skills/fec-react-project-standard/references/react-performance-patterns.md +35 -0
  156. package/localized/zh-CN/skills/fec-react-project-standard/references/react-project-structure.md +197 -0
  157. package/localized/zh-CN/skills/fec-react-project-standard/references/react-quality-patterns.md +131 -0
  158. package/localized/zh-CN/skills/fec-react-project-standard/references/react-runtime-patterns.md +293 -0
  159. package/localized/zh-CN/skills/fec-refactor-clean/SKILL.md +51 -0
  160. package/localized/zh-CN/skills/fec-refactor-clean/references/report-template.md +42 -0
  161. package/localized/zh-CN/skills/fec-responsive-layout/SKILL.md +34 -0
  162. package/localized/zh-CN/skills/fec-responsive-layout/references/responsive-layout-patterns.md +70 -0
  163. package/localized/zh-CN/skills/fec-route-protection/SKILL.md +135 -0
  164. package/localized/zh-CN/skills/fec-security-review/SKILL.md +38 -0
  165. package/localized/zh-CN/skills/fec-security-review/references/report-template.md +27 -0
  166. package/localized/zh-CN/skills/fec-security-review/references/security-checklist.md +64 -0
  167. package/localized/zh-CN/skills/fec-source-driven-development/SKILL.md +87 -0
  168. package/localized/zh-CN/skills/fec-state-management/SKILL.md +140 -0
  169. package/localized/zh-CN/skills/fec-state-management/references/state-patterns.md +109 -0
  170. package/localized/zh-CN/skills/fec-storybook-component-doc/SKILL.md +37 -0
  171. package/localized/zh-CN/skills/fec-storybook-component-doc/references/story-patterns.md +118 -0
  172. package/localized/zh-CN/skills/fec-svg-animation/SKILL.md +148 -0
  173. package/localized/zh-CN/skills/fec-tailwind-design-system/SKILL.md +34 -0
  174. package/localized/zh-CN/skills/fec-tailwind-design-system/references/tailwind-system-patterns.md +59 -0
  175. package/localized/zh-CN/skills/fec-tdd-workflow/SKILL.md +52 -0
  176. package/localized/zh-CN/skills/fec-testing-strategy/SKILL.md +45 -0
  177. package/localized/zh-CN/skills/fec-typescript-project-standard/SKILL.md +54 -0
  178. package/localized/zh-CN/skills/fec-typescript-project-standard/references/type-safety-patterns.md +102 -0
  179. package/localized/zh-CN/skills/fec-typescript-project-standard/references/type-safety.md +148 -0
  180. package/localized/zh-CN/skills/fec-ui-design/SKILL.md +108 -0
  181. package/localized/zh-CN/skills/fec-ui-design/data/product-rules.json +231 -0
  182. package/localized/zh-CN/skills/fec-ui-design/data/stack-ui-rules.json +146 -0
  183. package/localized/zh-CN/skills/fec-ui-design/data/style-archetypes.json +373 -0
  184. package/localized/zh-CN/skills/fec-ui-design/data/ux-quality-rules.json +203 -0
  185. package/localized/zh-CN/skills/fec-ui-design/references/design-intelligence.md +97 -0
  186. package/localized/zh-CN/skills/fec-ui-design/references/master-page-overrides.md +30 -0
  187. package/localized/zh-CN/skills/fec-ui-design/references/pre-delivery-checklist.md +39 -0
  188. package/localized/zh-CN/skills/fec-ui-design/scripts/design-system.mjs +648 -0
  189. package/localized/zh-CN/skills/fec-validation-fix/SKILL.md +51 -0
  190. package/localized/zh-CN/skills/fec-validation-fix/references/report-template.md +43 -0
  191. package/localized/zh-CN/skills/fec-vite-project-standard/SKILL.md +83 -0
  192. package/localized/zh-CN/skills/fec-vue3-project-standard/SKILL.md +58 -0
  193. package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-composables-routing.md +162 -0
  194. package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-performance-patterns.md +13 -0
  195. package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-project-structure.md +176 -0
  196. package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-state-api-quality.md +216 -0
  197. package/localized/zh-CN/skills/fec-web-video-presentation/SKILL.md +61 -0
  198. package/localized/zh-CN/skills/fec-web-video-presentation/data/starter-themes.json +59 -0
  199. package/localized/zh-CN/skills/fec-web-video-presentation/references/chapter-craft.md +37 -0
  200. package/localized/zh-CN/skills/fec-web-video-presentation/references/content-plan.md +38 -0
  201. package/localized/zh-CN/skills/fec-web-video-presentation/references/recording-and-audio.md +33 -0
  202. package/localized/zh-CN/skills/fec-web-video-presentation/references/theme-system.md +36 -0
  203. package/localized/zh-CN/skills/fec-web-video-presentation/scripts/create-video-presentation.mjs +430 -0
  204. package/localized/zh-CN/skills/fec-web-workers/SKILL.md +35 -0
  205. package/localized/zh-CN/skills/fec-web-workers/references/advanced-workers.md +54 -0
  206. package/localized/zh-CN/skills/fec-web-workers/references/basic-worker.md +67 -0
  207. package/localized/zh-CN/skills/metadata.json +1646 -0
  208. package/localized/zh-CN/skills/relations.json +755 -0
  209. package/localized/zh-CN/templates/claude/CLAUDE.md +106 -0
  210. package/localized/zh-CN/templates/claude/settings.json +62 -0
  211. package/localized/zh-CN/templates/codex/AGENTS.md +105 -0
  212. package/localized/zh-CN/templates/codex/config.toml +32 -0
  213. package/localized/zh-CN/templates/openclaw/AGENTS.md +101 -0
  214. package/localized/zh-CN/templates/openclaw/OPENCLAW-CONFIG.md +12 -0
  215. package/localized/zh-CN/templates/shared/rules/fec-agent-workflow.md +54 -0
  216. package/localized/zh-CN/templates/shared/rules/fec-api-layer.md +99 -0
  217. package/localized/zh-CN/templates/shared/rules/fec-ci-cd.md +40 -0
  218. package/localized/zh-CN/templates/shared/rules/fec-code-comments.md +33 -0
  219. package/localized/zh-CN/templates/shared/rules/fec-design-system.md +72 -0
  220. package/localized/zh-CN/templates/shared/rules/fec-error-handling.md +56 -0
  221. package/localized/zh-CN/templates/shared/rules/fec-git-conventions.md +73 -0
  222. package/localized/zh-CN/templates/shared/rules/fec-i18n.md +64 -0
  223. package/localized/zh-CN/templates/shared/rules/fec-naming-conventions.md +120 -0
  224. package/localized/zh-CN/templates/shared/rules/fec-performance.md +101 -0
  225. package/localized/zh-CN/templates/shared/rules/fec-react.md +82 -0
  226. package/localized/zh-CN/templates/shared/rules/fec-refactoring.md +47 -0
  227. package/localized/zh-CN/templates/shared/rules/fec-rendering-patterns.md +40 -0
  228. package/localized/zh-CN/templates/shared/rules/fec-responsive-design.md +50 -0
  229. package/localized/zh-CN/templates/shared/rules/fec-source-driven-development.md +31 -0
  230. package/localized/zh-CN/templates/shared/rules/fec-state-management.md +60 -0
  231. package/localized/zh-CN/templates/shared/rules/fec-testing.md +98 -0
  232. package/localized/zh-CN/templates/shared/rules/fec-typescript.md +112 -0
  233. package/localized/zh-CN/templates/shared/rules/fec-vue.md +64 -0
  234. package/localized/zh-CN/templates/shared/rules/fec-working-modes.md +50 -0
  235. package/openclaw.plugin.json +1 -1
  236. package/package.json +3 -2
  237. package/skills/TEMPLATE.md +74 -74
  238. package/skills/eval_queries.json +678 -678
  239. package/skills/fec-accessibility-check/SKILL.md +21 -21
  240. package/skills/fec-accessibility-check/references/report-template.md +12 -12
  241. package/skills/fec-accessibility-check/references/screen-reader-testing.md +24 -24
  242. package/skills/fec-alchemy/SKILL.md +50 -50
  243. package/skills/fec-alchemy/assets/absorption-plan-template.md +32 -32
  244. package/skills/fec-alchemy/assets/intake-template.md +55 -55
  245. package/skills/fec-alchemy/assets/review-checklist.md +23 -23
  246. package/skills/fec-alchemy/references/methodology.md +66 -66
  247. package/skills/fec-alchemy/references/originality-and-licensing.md +42 -42
  248. package/skills/fec-api-integration/SKILL.md +61 -61
  249. package/skills/fec-api-integration/references/integration-patterns.md +30 -30
  250. package/skills/fec-backend-requirements-handoff/SKILL.md +25 -25
  251. package/skills/fec-browser-storage/SKILL.md +16 -16
  252. package/skills/fec-browser-storage/references/storage-patterns.md +16 -16
  253. package/skills/fec-canvas-threejs/SKILL.md +21 -21
  254. package/skills/fec-canvas-threejs/references/rendering-patterns.md +10 -10
  255. package/skills/fec-canvas-threejs/references/shader-webgl-patterns.md +37 -37
  256. package/skills/fec-code-review/SKILL.md +94 -94
  257. package/skills/fec-code-review/references/report-template.md +13 -13
  258. package/skills/fec-component-testing/SKILL.md +39 -39
  259. package/skills/fec-data-fetching/SKILL.md +16 -16
  260. package/skills/fec-data-fetching/references/query-patterns.md +27 -27
  261. package/skills/fec-debug-framework/SKILL.md +95 -95
  262. package/skills/fec-debug-framework/references/report-template.md +34 -34
  263. package/skills/fec-dependency-upgrade/SKILL.md +17 -17
  264. package/skills/fec-dependency-upgrade/references/dependency-upgrade-workflow.md +31 -31
  265. package/skills/fec-doc-sync/SKILL.md +23 -23
  266. package/skills/fec-drawio-studio/SKILL.md +42 -38
  267. package/skills/fec-drawio-studio/data/THIRD_PARTY_NOTICES.md +1 -1
  268. package/skills/fec-drawio-studio/data/shape-index.json +83570 -0
  269. package/skills/fec-drawio-studio/references/diagram-patterns.md +19 -0
  270. package/skills/fec-drawio-studio/references/flowchart-quality.md +49 -0
  271. package/skills/fec-drawio-studio/references/layout-and-export.md +18 -3
  272. package/skills/fec-drawio-studio/references/xml-and-mermaid.md +5 -1
  273. package/skills/fec-drawio-studio/scripts/diagram-lint.mjs +62 -0
  274. package/skills/fec-drawio-studio/scripts/drawio-export.mjs +134 -0
  275. package/skills/fec-drawio-studio/scripts/shape-query.mjs +55 -15
  276. package/skills/fec-e2e-testing/SKILL.md +24 -24
  277. package/skills/fec-e2e-testing/references/e2e-ci-reporting.md +20 -20
  278. package/skills/fec-e2e-testing/references/e2e-special-scenarios.md +10 -10
  279. package/skills/fec-e2e-testing/references/e2e-visual-regression.md +17 -17
  280. package/skills/fec-e2e-testing/references/playwright-patterns.md +6 -6
  281. package/skills/fec-form-handling/SKILL.md +21 -21
  282. package/skills/fec-form-handling/references/advanced-form-patterns.md +41 -41
  283. package/skills/fec-image-generation/SKILL.md +54 -29
  284. package/skills/fec-image-generation/assets/interactive-diagram.html +371 -0
  285. package/skills/fec-image-generation/references/diagram-workflows.md +33 -2
  286. package/skills/fec-image-generation/references/html-technical-diagrams.md +236 -0
  287. package/skills/fec-image-generation/scripts/export-diagram.mjs +364 -0
  288. package/skills/fec-image-generation/scripts/interactive-diagram-server.mjs +654 -0
  289. package/skills/fec-image-generation/scripts/tech-diagram-render.mjs +1397 -0
  290. package/skills/fec-implement-from-design/SKILL.md +81 -81
  291. package/skills/fec-implement-from-design/references/design-plan-template.md +16 -16
  292. package/skills/fec-legacy-to-modern-migration/SKILL.md +29 -29
  293. package/skills/fec-legacy-to-modern-migration/references/migration-execution-checklist.md +81 -81
  294. package/skills/fec-legacy-to-modern-migration/references/migration-report-template.md +37 -37
  295. package/skills/fec-legacy-to-modern-migration/references/migration-strategy-and-mapping.md +31 -31
  296. package/skills/fec-legacy-web-standard/SKILL.md +17 -17
  297. package/skills/fec-legacy-web-standard/references/legacy-patterns.md +16 -16
  298. package/skills/fec-list-virtualization/SKILL.md +16 -16
  299. package/skills/fec-list-virtualization/references/virtualization-patterns.md +31 -31
  300. package/skills/fec-monorepo-project-standard/SKILL.md +52 -52
  301. package/skills/fec-motion-interaction/SKILL.md +51 -51
  302. package/skills/fec-motion-interaction/references/motion-patterns.md +11 -11
  303. package/skills/fec-nextjs-project-standard/SKILL.md +64 -64
  304. package/skills/fec-nuxt-project-standard/SKILL.md +57 -57
  305. package/skills/fec-performance-optimization/SKILL.md +54 -54
  306. package/skills/fec-performance-optimization/references/framework-performance-patterns.md +23 -23
  307. package/skills/fec-performance-optimization/references/report-template.md +31 -31
  308. package/skills/fec-pwa-implementation/SKILL.md +17 -17
  309. package/skills/fec-pwa-implementation/references/manifest-and-icons.md +12 -12
  310. package/skills/fec-pwa-implementation/references/service-worker-workbox.md +13 -13
  311. package/skills/fec-react-project-standard/SKILL.md +72 -72
  312. package/skills/fec-react-project-standard/references/react-performance-patterns.md +28 -28
  313. package/skills/fec-react-project-standard/references/react-project-structure.md +112 -112
  314. package/skills/fec-react-project-standard/references/react-quality-patterns.md +72 -72
  315. package/skills/fec-react-project-standard/references/react-runtime-patterns.md +94 -94
  316. package/skills/fec-refactor-clean/SKILL.md +30 -30
  317. package/skills/fec-refactor-clean/references/report-template.md +23 -23
  318. package/skills/fec-responsive-layout/SKILL.md +17 -17
  319. package/skills/fec-responsive-layout/references/responsive-layout-patterns.md +37 -37
  320. package/skills/fec-route-protection/SKILL.md +26 -26
  321. package/skills/fec-security-review/SKILL.md +20 -20
  322. package/skills/fec-security-review/references/report-template.md +12 -12
  323. package/skills/fec-security-review/references/security-checklist.md +27 -27
  324. package/skills/fec-source-driven-development/SKILL.md +59 -59
  325. package/skills/fec-state-management/SKILL.md +34 -34
  326. package/skills/fec-state-management/references/state-patterns.md +19 -19
  327. package/skills/fec-storybook-component-doc/SKILL.md +19 -19
  328. package/skills/fec-storybook-component-doc/references/story-patterns.md +12 -12
  329. package/skills/fec-svg-animation/SKILL.md +32 -32
  330. package/skills/fec-tailwind-design-system/SKILL.md +17 -17
  331. package/skills/fec-tailwind-design-system/references/tailwind-system-patterns.md +36 -36
  332. package/skills/fec-tdd-workflow/SKILL.md +28 -28
  333. package/skills/fec-testing-strategy/SKILL.md +29 -29
  334. package/skills/fec-typescript-project-standard/SKILL.md +38 -38
  335. package/skills/fec-typescript-project-standard/references/type-safety-patterns.md +20 -20
  336. package/skills/fec-typescript-project-standard/references/type-safety.md +18 -18
  337. package/skills/fec-ui-design/SKILL.md +90 -90
  338. package/skills/fec-ui-design/references/design-intelligence.md +61 -61
  339. package/skills/fec-ui-design/references/master-page-overrides.md +15 -15
  340. package/skills/fec-ui-design/references/pre-delivery-checklist.md +38 -38
  341. package/skills/fec-validation-fix/SKILL.md +26 -26
  342. package/skills/fec-validation-fix/references/report-template.md +25 -25
  343. package/skills/fec-vite-project-standard/SKILL.md +39 -39
  344. package/skills/fec-vue3-project-standard/SKILL.md +38 -38
  345. package/skills/fec-vue3-project-standard/references/vue3-composables-routing.md +36 -36
  346. package/skills/fec-vue3-project-standard/references/vue3-performance-patterns.md +8 -8
  347. package/skills/fec-vue3-project-standard/references/vue3-project-structure.md +112 -112
  348. package/skills/fec-vue3-project-standard/references/vue3-state-api-quality.md +74 -74
  349. package/skills/fec-web-video-presentation/SKILL.md +33 -33
  350. package/skills/fec-web-workers/SKILL.md +16 -16
  351. package/skills/fec-web-workers/references/advanced-workers.md +13 -13
  352. package/skills/fec-web-workers/references/basic-worker.md +8 -8
  353. package/skills/metadata.json +121 -115
  354. package/skills/relations.json +4 -0
  355. package/templates/claude/CLAUDE.md +60 -60
  356. package/templates/codex/AGENTS.md +76 -76
  357. package/templates/codex/config.toml +4 -4
  358. package/templates/openclaw/AGENTS.md +68 -68
  359. package/templates/openclaw/OPENCLAW-CONFIG.md +8 -8
  360. package/templates/shared/rules/fec-agent-workflow.md +40 -40
  361. package/templates/shared/rules/fec-api-layer.md +52 -52
  362. package/templates/shared/rules/fec-ci-cd.md +29 -29
  363. package/templates/shared/rules/fec-code-comments.md +22 -22
  364. package/templates/shared/rules/fec-design-system.md +53 -53
  365. package/templates/shared/rules/fec-error-handling.md +40 -40
  366. package/templates/shared/rules/fec-git-conventions.md +42 -42
  367. package/templates/shared/rules/fec-i18n.md +48 -48
  368. package/templates/shared/rules/fec-naming-conventions.md +91 -91
  369. package/templates/shared/rules/fec-performance.md +78 -78
  370. package/templates/shared/rules/fec-react.md +58 -58
  371. package/templates/shared/rules/fec-refactoring.md +34 -34
  372. package/templates/shared/rules/fec-rendering-patterns.md +36 -36
  373. package/templates/shared/rules/fec-responsive-design.md +37 -37
  374. package/templates/shared/rules/fec-source-driven-development.md +22 -22
  375. package/templates/shared/rules/fec-state-management.md +56 -56
  376. package/templates/shared/rules/fec-testing.md +64 -64
  377. package/templates/shared/rules/fec-typescript.md +75 -75
  378. package/templates/shared/rules/fec-vue.md +42 -42
  379. package/templates/shared/rules/fec-working-modes.md +34 -34
  380. package/skills/fec-drawio-studio/data/shape-index.json.gz +0 -0
@@ -1,87 +1,87 @@
1
1
  ---
2
2
  name: fec-source-driven-development
3
- description: Use when frontend decisions depend on framework, library, browser, runtime, package, API, or platform behavior that may have changed, including official documentation checks, version-sensitive patterns, migration choices, or public interface assumptions; Chinese triggers include 查官方文档, 以源码为准, source-driven, 版本差异.
3
+ description: Use when frontend decisions depend on framework, library, browser, runtime, package, API, or platform behavior that may have changed, including official documentation checks, version-sensitive patterns, migration choices, or public interface assumptions; Chinese triggers include Check official documentation, source code shall prevail, source-driven, version differences.
4
4
  ---
5
5
 
6
- # 来源驱动开发
6
+ # Source driven development
7
7
 
8
8
  ## Purpose
9
9
 
10
- 在前端实现、评审和架构决策中优先依据项目内事实、官方文档和当前版本行为,避免沿用过时经验或未经验证的假设。
10
+ Prioritize the use of in-project facts, official documentation, and current version behavior in front-end implementation, review, and architecture decisions, and avoid relying on outdated experience or unverified assumptions.
11
11
 
12
12
  ## Procedure
13
13
 
14
- 1. 判断是否需要查源
15
- - 涉及框架新版本、路由、渲染模式、缓存、构建工具、浏览器 API、包发布格式、鉴权协议或公共接口时必须查源。
16
- - 涉及项目约定时先读本仓库 README、配置、模板、已有实现、测试和迁移记录。
17
- - 只是稳定语言语法或明显局部重构时,可使用项目现有模式作为事实来源。
18
-
19
- 2. 收集权威材料
20
- - 首选官方文档、规范、源码、release notes、migration guide、类型定义和项目内测试。
21
- - 第三方文章只能作为线索,不能作为最终依据。
22
- - 对快速变化的库记录包名、版本、文档日期或页面标题。
23
- - 当用户要求从本地知识库、项目资料库或 `knowledge/` 目录回答问题时,先走本地知识检索,不使用网络搜索补事实。
24
-
25
- 3. 提炼决策
26
- - 写清当前版本推荐做法、弃用做法、限制条件和迁移注意事项。
27
- - 对多个可行方案说明选择理由、兼容性、维护成本和回退方式。
28
- - 若文档和项目现状冲突,优先解释冲突并给出渐进调整,不直接推翻已运行系统。
29
- - 对依赖升级、框架迁移和公共 API 变化,记录 release notes、migration guide、版本范围、破坏性变更和回滚方案。
30
-
31
- 4. 落到实现
32
- - 将外部行为隔离在适配层、配置层或小型工具函数中,避免在组件里散落版本假设。
33
- - 公共接口变化要保持命名、错误形状、默认值和兼容策略清晰。
34
- - 代码注释只记录非显而易见的来源约束,不粘贴大段文档。
35
-
36
- 5. 验证假设
37
- - 用类型检查、最小复现、单元测试、组件测试、E2E、构建或浏览器验证证明关键假设。
38
- - 如果无法验证,报告不确定性、风险范围和需要用户或团队确认的信息。
39
- 6. 留下轻量决策记录
40
- - 当结论会影响公共接口、依赖版本、目录规范或团队工作流时,补充 ADR/变更记录或交给文档同步流程。
14
+ 1. Determine whether it is necessary to check the source
15
+ - Source checking is required when new versions of frameworks, routing, rendering modes, caches, build tools, browser APIs, package publishing formats, authentication protocols, or public interfaces are involved.
16
+ - When it comes to project commitments, read the README, configuration, templates, existing implementations, testing and migration records of this warehouse first.
17
+ - Use the project's existing schema as a source of truth when simply stabilizing the language syntax or significantly partial refactoring.
18
+
19
+ 2. Collect authoritative materials
20
+ - Preferred official documentation, specifications, source code, release notes, migration guide, type definitions and in-project testing.
21
+ - Third-party articles can only be used as clues and cannot be used as the final basis.
22
+ - Record package name, version, document date or page title for rapidly changing libraries.
23
+ - When a user asks to answer a question from a local knowledge base, project repository or `knowledge/` directory, perform local knowledge retrieval first and do not use network search to fill in the facts.
24
+
25
+ 3. Refine decisions
26
+ - Write down recommended practices, deprecated practices, limitations and migration considerations for the current version.
27
+ - Explain the reasons for selection, compatibility, maintenance costs and fallback methods for multiple feasible options.
28
+ - If there is a conflict between the document and the current status of the project, priority will be given to explaining the conflict and making incremental adjustments instead of directly overturning the running system.
29
+ - Record release notes, migration guide, version scope, breaking changes and rollback plans for dependency upgrades, framework migrations and public API changes.
30
+
31
+ 4. Fall to implementation
32
+ - Isolate external behavior in the adaptation layer, configuration layer or small utility functions to avoid spreading version assumptions throughout the component.
33
+ - Public interface changes should keep naming, error shapes, default values, and compatibility policies clear.
34
+ - Code comments only record non-obvious source constraints and do not paste large sections of documentation.
35
+
36
+ 5. Test your hypothesis
37
+ - Prove key assumptions with type checking, minimal reproduction, unit testing, component testing, E2E, build or browser validation.
38
+ - If verification is not possible, report uncertainty, risk range, and information that requires confirmation by the user or team.
39
+ 6. Leave a lightweight record of decisions
40
+ - Supplement ADR/change records or hand off to the document sync process when conclusions impact public interfaces, dependency versions, catalog specifications or team workflows.
41
41
 
42
42
  ## Local Knowledge Retrieval
43
43
 
44
- 当用户指定本地知识库路径,或默认 `knowledge/` 目录存在时,可用本流程回答资料库问题、抽取证据或辅助决策。
44
+ When the user specifies the local knowledge base path, or the default `knowledge/` directory exists, this process can be used to answer database questions, extract evidence, or assist decision-making.
45
45
 
46
- 1. 定位根目录
47
- - 用户明确指定路径时使用该路径。
48
- - 否则检查当前项目下 `knowledge/` 是否存在;不存在时说明未找到默认知识库并请求路径。
49
- - 不用文件 glob 判断目录是否存在。
46
+ 1. Locate the root directory
47
+ - Use this path when the user explicitly specifies the path.
48
+ - Otherwise, check whether `knowledge/` under the current project exists; if it does not exist, it means that the default knowledge base is not found and the path is requested.
49
+ - No need to use file glob to determine whether the directory exists.
50
50
 
51
- 2. 分层导航
52
- - 优先读取根目录和子目录中的 `data_structure.md`。
53
- - 根据目录说明选择最相关的少量分支,不一次性遍历整个知识库。
54
- - 记录候选文件、主题、时间/版本范围和为什么相关。
51
+ 2. Hierarchical navigation
52
+ - Read `data_structure.md` in the root directory and subdirectories first.
53
+ - Select the most relevant few branches according to the directory description, without traversing the entire knowledge base at once.
54
+ - Document candidate files, topics, time/version range and why they are relevant.
55
55
 
56
- 3. 渐进检索
57
- - Markdown、文本、日志:先用关键词搜索,再局部读取命中上下文。
58
- - PDF:处理前先确认可用工具和提取路线,优先提取到临时文本后再检索,避免把整份 PDF 打进上下文。
59
- - Excel:处理前先确认读取/分析路线,先看工作表、列名和少量样例,再按字段过滤或聚合。
60
- - 默认最多 5 轮关键词迭代;每轮根据已找到证据调整同义词、缩写和范围。
56
+ 3. Progressive search
57
+ - Markdown, text, log: first search with keywords, and then partially read the hit context.
58
+ - PDF: Confirm the available tools and extraction routes before processing, and prioritize extraction of temporary text before retrieval to avoid putting the entire PDF into context.
59
+ - Excel: Confirm the read/analysis route before processing, first look at the worksheet, column names and a few samples, and then filter or aggregate by field.
60
+ - Default to up to 5 rounds of keyword iteration; each round adjusts synonyms, abbreviations, and scope based on found evidence.
61
61
 
62
- 4. 回答与溯源
63
- - 先给结论,再列文件路径、章节、页码、工作表或行号附近作为依据。
64
- - 证据不足时说明查过哪些路径、缺什么信息,以及用户如何缩小范围。
65
- - 不把知识库外的网络信息混入答案,除非用户另行要求查外部来源。
62
+ 4. Answer and traceability
63
+ - Give the conclusion first, and then list the file path, chapter, page number, worksheet or line number as a basis.
64
+ - If there is insufficient evidence, explain which paths have been checked, what information is missing, and how the user can narrow down the scope.
65
+ - Do not mix online information from outside the knowledge base into answers unless the user requests otherwise to check external sources.
66
66
 
67
67
  ## Source Priority
68
68
 
69
69
  | Priority | Source | Use |
70
70
  | -------- | ------ | --- |
71
- | 1 | 项目内配置、测试、已有实现 | 判断本仓库真实约定 |
72
- | 2 | 官方文档、源码、类型定义 | 判断当前推荐行为 |
73
- | 3 | 标准规范、浏览器兼容数据 | 判断平台能力和兼容边界 |
74
- | 4 | Issue、讨论、第三方文章 | 辅助排查,不能单独定案 |
71
+ | 1 | Configuration, testing, and implementation within the project | Determine the true agreement of this warehouse |
72
+ | 2 | Official documents, source code, type definitions | Determine current recommended behavior |
73
+ | 3 | Standard specifications, browser compatibility data | Determine platform capabilities and compatibility boundaries |
74
+ | 4 | Issues, discussions, third-party articles | Auxiliary investigation, cannot be finalized alone |
75
75
 
76
76
  ## Constraints
77
77
 
78
- - 不凭记忆给版本敏感结论。
79
- - 不把过时教程当作当前最佳实践。
80
- - 不引用无法复核的来源作为关键依据。
81
- - 不为追新而改动稳定项目约定;必须说明收益和迁移成本。
82
- - 不在交付中复制长篇外部文档;只保留必要结论和链接或文件路径。
83
- - 不把“查过文档”停留在口头;版本敏感决策需要能追溯到具体版本、路径或官方页面。
78
+ - Don't give version-sensitive conclusions from memory.
79
+ - Do not treat outdated tutorials as current best practices.
80
+ - Do not cite sources that cannot be reviewed as critical evidence.
81
+ - Do not change the stable project agreement to pursue new developments; the benefits and migration costs must be explained.
82
+ - Do not copy long external documents in the delivery; keep only necessary conclusions and links or file paths.
83
+ - Don't just say "checked the documentation"; version-sensitive decisions need to be traceable to a specific version, path or official page.
84
84
 
85
85
  ## Expected Output
86
86
 
87
- 输出来源清单、版本或项目事实、决策结论、实现影响、验证命令和未决风险。若修改代码,关键行为应有测试或构建验证支撑。
87
+ Output source lists, version or project facts, decision conclusions, implementation impacts, validation orders, and open risks. If code is modified, key behaviors should be supported by tests or build verification.
@@ -1,28 +1,28 @@
1
1
  ---
2
2
  name: fec-state-management
3
- description: Use when choosing, implementing, reviewing, or refactoring frontend state ownership across React, Vue, Next.js, Nuxt, URL state, server state, form state, browser persistence, or global stores. Prefer narrower skills for TanStack Query cache details, browser storage persistence, or form validation internals; Chinese triggers include 状态管理, 状态归属, store 选型.
3
+ description: Use when choosing, implementing, reviewing, or refactoring frontend state ownership across React, Vue, Next.js, Nuxt, URL state, server state, form state, browser persistence, or global stores. Prefer narrower skills for TanStack Query cache details, browser storage persistence, or form validation internals; Chinese triggers include state management, state ownership, store selection.
4
4
  ---
5
5
 
6
- # 前端状态管理
6
+ # Front-end status management
7
7
 
8
8
  ## Purpose
9
9
 
10
- 为前端状态确定清晰归属,避免全局 store 膨胀、重复缓存和派生状态同步错误。
10
+ Determine clear ownership of front-end state to avoid global store bloat, duplicate caching, and derived state synchronization errors.
11
11
 
12
12
  ## Procedure
13
13
 
14
- ### 1. 先分类状态来源
14
+ ### 1. Classify status sources first
15
15
 
16
- 不要先选 Redux、Zustand、Pinia 或 Context。先把每个状态标到唯一归属,再决定工具。
16
+ Don't choose Redux, Zustand, Pinia or Context first. First mark each state to its unique owner, and then decide on the tool.
17
17
 
18
- | 状态类型 | 典型例子 | 默认归属 |
18
+ | Status Type | Typical Example | Default Attribution |
19
19
  | ---------------- | ------------------------------------ | ------------------------ |
20
- | 本地 UI 状态 | 弹窗开关、tab、展开行、hover 编辑态 | 组件内 state / ref |
21
- | 表单状态 | 输入值、脏字段、校验错误、提交中 | 表单库或表单组件 |
22
- | 服务端状态 | 列表、详情、分页结果、远程错误 | 请求缓存库 |
23
- | URL 状态 | 搜索词、筛选、排序、页码、选中 tab | 路由参数 / search params |
24
- | 全局客户端状态 | 登录用户、主题、权限快照、购物车草稿 | 全局 store |
25
- | 浏览器持久化状态 | 跨刷新保留的草稿、偏好、离线队列 | 存储层 + 状态适配器 |
20
+ | Local UI state | Pop-up window switch, tab, expand row, hover editing state | In-component state / ref |
21
+ | Form status | Input value, dirty field, validation error, submitting | Form library or form component |
22
+ | Server status | List, details, paging results, remote errors | Request cache library |
23
+ | URL status | Search terms, filter, sort, page number, selected tab | Routing parameters / search params |
24
+ | Global client status | Login users, topics, permission snapshots, shopping cart drafts | Global store |
25
+ | Browser persistent state | Drafts, preferences, offline queues retained across refreshes | Storage layer + state adapter |
26
26
 
27
27
  ```tsx
28
28
  type ReportsStateMap = {
@@ -34,9 +34,9 @@ type ReportsStateMap = {
34
34
  };
35
35
  ```
36
36
 
37
- ### 2. 保持最小状态
37
+ ### 2. Keep it minimal
38
38
 
39
- 可从 props、server state、URL 或已有 state 推导出来的值,不要另存一份。
39
+ Do not save a new copy of a value that can be inferred from props, server state, URL, or existing state.
40
40
 
41
41
  ```tsx
42
42
  interface Invoice {
@@ -51,9 +51,9 @@ function InvoiceList({ invoices }: { invoices: Invoice[] }) {
51
51
  }
52
52
  ```
53
53
 
54
- ### 3. 选择 React 全局状态方案
54
+ ### 3. Select the React global state solution
55
55
 
56
- React 中优先本地化和组合;只有跨页面、跨 feature 或需要统一动作时才引入全局 store。
56
+ Priority is given to localization and combination in React; the global store is only introduced when cross-page, cross-feature or unified actions are required.
57
57
 
58
58
  ```tsx
59
59
  import { create } from "zustand";
@@ -69,17 +69,17 @@ export const useWorkspaceStore = create<WorkspaceState>((set) => ({
69
69
  }));
70
70
  ```
71
71
 
72
- 决策顺序:
72
+ Decision order:
73
73
 
74
- 1. 只在一个组件或一个小子树使用:`useState` / `useReducer`。
75
- 2. 低频全局配置或依赖注入:Context。
76
- 3. 中等复杂业务状态:Zustand 或 Jotai,按仓库现有选型优先。
77
- 4. 大型应用、严格动作流、审计或时间旅行调试:Redux Toolkit。
78
- 5. 远程数据:使用数据获取 skill 管理 query key、缓存和失效策略。
74
+ 1. Use only in one component or a small subtree: `useState` / `useReducer`.
75
+ 2. Low-frequency global configuration or dependency injection: Context.
76
+ 3. Moderately complex business status: Zustand or Jotai, priority will be given based on the existing selection of the warehouse.
77
+ 4. Large applications, strict action flow, auditing or time travel debugging: Redux Toolkit.
78
+ 5. Remote data: Use the data acquisition skill to manage query keys, cache and invalidation policies.
79
79
 
80
- ### 4. 选择 Vue 全局状态方案
80
+ ### 4. Select Vue global state solution
81
81
 
82
- Vue 3 中,局部跨层级传递使用 `provide/inject`;全局业务状态使用 Pinia 或项目既有 store。
82
+ In Vue 3, use `provide/inject` for local cross-level transfer; use Pinia or the existing store of the project for global business status.
83
83
 
84
84
  ```ts
85
85
  import { computed, readonly, ref } from "vue";
@@ -101,9 +101,9 @@ export const useSessionStore = defineStore("session", () => {
101
101
  });
102
102
  ```
103
103
 
104
- ### 5. 明确状态边界和迁移步骤
104
+ ### 5. Clarify status boundaries and migration steps
105
105
 
106
- 重构状态时先做状态清单,再逐步移动读写入口。每一步都应保持行为可验证。
106
+ When reconstructing the state, first make a state list, and then gradually move the read and write entries. Each step should keep the behavior verifiable.
107
107
 
108
108
  ```ts
109
109
  interface StateMigrationItem {
@@ -123,18 +123,18 @@ const migrationPlan: StateMigrationItem[] = [
123
123
  ];
124
124
  ```
125
125
 
126
- ## 详细参考
126
+ ## Detailed reference
127
127
 
128
- 需要 Store 形状示例、选择器模式、URL 状态同步、持久化适配器、SSR 边界或审查清单时,加载 [references/state-patterns.md](references/state-patterns.md)。
128
+ Load [references/state-patterns.md](references/state-patterns.md) when you need Store shape examples, selector patterns, URL state synchronization, persistence adapters, SSR boundaries, or review checklists.
129
129
 
130
130
  ## Constraints
131
131
 
132
- - 不把服务端响应复制到全局 store;缓存、失效和重试归数据获取层。
133
- - 不把表单每个字段提升到全局 store;跨步骤共享也优先由表单上下文或提交草稿适配器处理。
134
- - 不用 Context 承载高频变化的大对象;会扩大重渲染范围。
135
- - 持久化状态必须明确字段白名单、版本号、过期策略和敏感数据排除。
136
- - SSR 场景不要在模块顶层创建带用户数据的单例 store。
132
+ - Do not copy the server response to the global store; caching, invalidation and retries belong to the data acquisition layer.
133
+ - Do not promote each field of the form to the global store; cross-step sharing is also handled first by the form context or submit draft adapter.
134
+ - No need to use Context to carry large objects that change frequently; it will expand the re-rendering range.
135
+ - Persistence state must specify field whitelist, version number, expiration policy and sensitive data exclusion.
136
+ - In SSR scenarios, do not create a singleton store with user data at the top level of the module.
137
137
 
138
138
  ## Expected Output
139
139
 
140
- 产出状态归属清单、选型理由、store/API 边界和验证步骤。实现时应保留 loading/error/empty、刷新、回退、跨路由和权限变化等关键行为。
140
+ Output status attribution list, selection reasons, store/API boundaries and verification steps. Key behaviors such as loading/error/empty, refresh, rollback, cross-routing, and permission changes should be retained during implementation.
@@ -1,15 +1,15 @@
1
- # 状态管理模式
1
+ #State management mode
2
2
 
3
- ## 所有权审查清单
3
+ ## Ownership Review Checklist
4
4
 
5
- - 每个状态字段有唯一归属:本地状态、表单状态、服务端缓存、URL 状态、全局 Store 或浏览器持久化。
6
- - 派生值由源状态计算得出,而不是通过 effect 或 watcher 手动同步。
7
- - URL 状态用于可分享、刷新后需保留的视图状态,如筛选、搜索、排序和分页。
8
- - 服务端数据保留在请求缓存中;全局 Store 仅存放选中的 ID、本地偏好或乐观更新提示。
9
- - 持久化的客户端状态需有白名单、schema 版本号、迁移路径和敏感字段排除规则。
10
- - Store 的 action 以领域事件命名,而非组件处理器命名。
5
+ - Each status field has a unique ownership: local status, form status, server-side cache, URL status, global Store or browser persistence.
6
+ - Derived values are calculated from the source state rather than manually synchronized via effects or watchers.
7
+ - URL state is used for view states that are shareable and need to be retained after refresh, such as filtering, searching, sorting, and paging.
8
+ - Server-side data is kept in the request cache; the global Store only stores selected IDs, local preferences, or optimistic update prompts.
9
+ - Persistent client state requires a whitelist, schema version number, migration path and sensitive field exclusion rules.
10
+ - Store actions are named after domain events, not component processors.
11
11
 
12
- ## React Store 形状示例
12
+ ## React Store shape example
13
13
 
14
14
  ```tsx
15
15
  import { create } from "zustand";
@@ -41,7 +41,7 @@ export const useCartStore = create<CartState>()(
41
41
  );
42
42
  ```
43
43
 
44
- 选择器应尽可能返回稳定的原始值或经过 memo 的切片:
44
+ Selectors should return stable raw values or memo-encoded slices whenever possible:
45
45
 
46
46
  ```tsx
47
47
  const itemCount = useCartStore((state) =>
@@ -49,9 +49,9 @@ const itemCount = useCartStore((state) =>
49
49
  );
50
50
  ```
51
51
 
52
- ## URL 状态边界
52
+ ## URL status boundaries
53
53
 
54
- 当另一个用户应能打开相同视图,或刷新后需要保留视图时,使用 URL 状态。
54
+ Use URL state when another user should be able to open the same view, or when the view needs to be preserved after a refresh.
55
55
 
56
56
  ```tsx
57
57
  import { useSearchParams } from "react-router-dom";
@@ -72,9 +72,9 @@ export function useReportFilters() {
72
72
  }
73
73
  ```
74
74
 
75
- ## 持久化适配器边界
75
+ ## Persistence adapter boundary
76
76
 
77
- 仅持久化稳定的客户端偏好设置或非敏感草稿。序列化逻辑放在组件外部。
77
+ Only persist stable client preferences or non-sensitive drafts. Serialization logic is placed outside the component.
78
78
 
79
79
  ```ts
80
80
  interface PersistedGridState {
@@ -101,9 +101,9 @@ export function writeGridState(state: PersistedGridState): void {
101
101
  }
102
102
  ```
103
103
 
104
- ## SSR 与请求隔离
104
+ ## SSR is isolated from requests
105
105
 
106
- - 当状态可能包含用户数据时,每次请求需创建独立的 Store。
107
- - 服务端渲染期间不要读取 `window`、`localStorage` 或 `document`。
108
- - 水合后再加载持久化偏好,并在水合前提供确定性默认值。
109
- - 服务端缓存脱水与纯客户端全局 Store 分开处理。
106
+ - When the state may contain user data, a separate Store needs to be created for each request.
107
+ - Do not read `window`, `localStorage` or `document` during server rendering.
108
+ - Reload persistence preferences after hydration and provide deterministic defaults before hydration.
109
+ - Server-side cache dehydration is handled separately from pure client-side global Store.
@@ -1,37 +1,37 @@
1
1
  ---
2
2
  name: fec-storybook-component-doc
3
- description: Use when setting up or reviewing Storybook component documentation, design-system presentation, isolated component state previews, stories, addons, decorators, MDX docs, component-state interaction checks, visual baselines, or Chromatic. For real-browser cross-page journeys or broader coverage planning, choose the matching testing workflow first; Chinese triggers include Storybook, 组件文档, Design System, 视觉回归.
3
+ description: Use when setting up or reviewing Storybook component documentation, design-system presentation, isolated component state previews, stories, addons, decorators, MDX docs, component-state interaction checks, visual baselines, or Chromatic. For real-browser cross-page journeys or broader coverage planning, choose the matching testing workflow first; Chinese triggers include Storybook, component documentation, Design System, visual regression.
4
4
  ---
5
5
 
6
- # Storybook 组件文档化
6
+ # Storybook component documentation
7
7
 
8
8
  ## Purpose
9
9
 
10
- 为 UI 组件建立文档化、设计系统展示和隔离状态预览环境;交互与视觉测试只覆盖 Storybook 场景内的组件状态。
10
+ Establish documentation, design system display and isolated state preview environment for UI components; interaction and visual testing only cover component states within the Storybook scene.
11
11
 
12
12
  ## Procedure
13
13
 
14
- 1. 初始化或识别现有 Storybook 配置,沿用项目框架适配器、stories glob、主题和构建命令。
15
- 2. 每个组件的 Story 覆盖默认态、主要变体、尺寸、语义 tone、disabled、loading、error、empty、selected、invalid 和关键边缘状态。
16
- 3. 依赖 Router、Store、i18n、ThemeProvider 的组件用 decorators 包裹,不在 Story 中复制应用入口。
17
- 4. 复杂组件用 MDX 补充使用说明、Props、slots/children、variant 矩阵、状态示例、可访问性要求和源码展示。
18
- 5. 需要自动化时接入 interaction tests、addon-a11y、Chromatic 或 Storybook Test Runner;这些能力服务于组件文档和设计系统展示,不承接跨页业务旅程。
19
- 6. 设计系统组件应记录 token 来源、Tailwind/class 变体、暗色模式、响应式尺寸和不支持的组合,避免消费者靠猜测拼装。
14
+ 1. Initialize or identify an existing Storybook configuration, inheriting the project framework adapter, stories globs, themes, and build commands.
15
+ 2. Each component's Story covers default state, main variant, size, semantic tone, disabled, loading, error, empty, selected, invalid and key edge states.
16
+ 3. Components that rely on Router, Store, i18n, and ThemeProvider are wrapped with decorators and do not copy the application entry in Story.
17
+ 4. Use MDX to supplement complex components with usage instructions, Props, slots/children, variant matrices, status examples, accessibility requirements and source code display.
18
+ 5. When automation is required, connect interaction tests, addon-a11y, Chromatic or Storybook Test Runner; these capabilities serve component documentation and design system display and do not undertake cross-page business journeys.
19
+ 6. Design system components should record token sources, Tailwind/class variants, dark modes, responsive sizes, and unsupported combinations to avoid consumers guessing at assembly.
20
20
 
21
- ## 详细参考
21
+ ## Detailed reference
22
22
 
23
- - 需要 `main.ts`、`preview.ts`、stories、decorators、MDX、交互测试和视觉回归示例时,加载 [references/story-patterns.md](references/story-patterns.md)。
23
+ - Load [references/story-patterns.md](references/story-patterns.md) when you need `main.ts`, `preview.ts`, stories, decorators, MDX, interaction tests and visual regression examples.
24
24
 
25
25
  ## Constraints
26
26
 
27
- - Story 需随组件 prop 变更同步更新。
28
- - Provider 依赖必须通过 decorator 补齐。
29
- - Storybook 构建产物 `storybook-static/` 不应提交到 Git。
30
- - Storybook 用于开发和组件文档,不替代生产页面 SEO。
31
- - Storybook 视觉基线用于组件状态;跨页面截图和真实路由流程分流到 E2E workflow。
32
- - 大型组件库需控制 stories glob 和 addon 开销。
33
- - 不用 Storybook 隐藏组件 API 问题;若变体组合爆炸,应先收敛组件职责或拆分组件。
27
+ - Story needs to be updated synchronously with component prop changes.
28
+ - Provider dependencies must be completed through decorators.
29
+ - Storybook build product `storybook-static/` should not be committed to Git.
30
+ - Storybook is used for development and component documentation and is not a replacement for production page SEO.
31
+ - Storybook visual baseline for component state; cross-page screenshots and real routing processes are offloaded to E2E workflow.
32
+ - Large component libraries need to control stories glob and addon overhead.
33
+ - Don’t use Storybook to hide component API issues; if variant combinations explode, you should first converge component responsibilities or split components.
34
34
 
35
35
  ## Expected Output
36
36
 
37
- 可交互的组件文档和设计系统展示站点,每个组件状态都有隔离预览,Props 表格可生成,关键 Storybook 场景有可选 play 测试或视觉回归基线。
37
+ Interactive component documentation and design system showcase site with isolated previews of each component state, Props tables to generate, and key Storybook scenes with optional play testing or visual regression baselines.
@@ -1,6 +1,6 @@
1
- # Storybook 配置与示例
1
+ # Storybook configuration and examples
2
2
 
3
- ## 初始化
3
+ ## Initialization
4
4
 
5
5
  ```bash
6
6
  npx storybook@latest init
@@ -75,22 +75,22 @@ import * as InputStories from "./Input.stories";
75
75
 
76
76
  <Meta of={InputStories} />
77
77
 
78
- # Input 输入框
78
+ #Input input box
79
79
 
80
- 用于用户文本输入,支持校验提示、前后缀图标、字数统计等。
80
+ Used for user text input, supporting verification prompts, suffix and suffix icons, word count, etc.
81
81
 
82
- ### 何时使用
82
+ ### When to use
83
83
 
84
- - 单行文本输入
85
- - 需要实时校验反馈的表单字段
84
+ - Single line text input
85
+ - Form fields that require real-time verification feedback
86
86
 
87
87
  <Canvas of={InputStories.Default} />
88
88
 
89
- ### 属性
89
+ ### Properties
90
90
 
91
91
  <Controls />
92
92
 
93
- ### 源码
93
+ ### Source code
94
94
 
95
95
  <Source of={InputStories.Default} />
96
96
  ```
@@ -103,9 +103,9 @@ import { expect, userEvent, within } from "@storybook/test";
103
103
  export const FormSubmission: Story = {
104
104
  play: async ({ canvasElement }) => {
105
105
  const canvas = within(canvasElement);
106
- await userEvent.type(canvas.getByLabelText("用户名"), "admin");
107
- await userEvent.click(canvas.getByRole("button", { name: /登录/ }));
108
- await expect(canvas.findByText("登录成功")).resolves.toBeInTheDocument();
106
+ await userEvent.type(canvas.getByLabelText("username"), "admin");
107
+ await userEvent.click(canvas.getByRole("button", { name: /login/ }));
108
+ await expect(canvas.findByText("Login successful")).resolves.toBeInTheDocument();
109
109
  },
110
110
  };
111
111
  ```
@@ -1,38 +1,38 @@
1
1
  ---
2
2
  name: fec-svg-animation
3
- description: Use when implementing or reviewing SVG animation, path drawing, icon motion, logo animation, illustration motion, micro-interactions, CSS/SMIL/Framer Motion/GSAP choices, motion accessibility, or fallback behavior; Chinese triggers include SVG 动画, 路径描边, 动效.
3
+ description: Use when implementing or reviewing SVG animation, path drawing, icon motion, logo animation, illustration motion, micro-interactions, CSS/SMIL/Framer Motion/GSAP choices, motion accessibility, or fallback behavior; Chinese triggers include SVG animation, path stroke, animation.
4
4
  ---
5
5
 
6
- # SVG 动画实现
6
+ # SVG animation implementation
7
7
 
8
8
  ## Purpose
9
9
 
10
- 为 SVG 图标、插画和数据可视化提供可维护、可访问、性能可控的动画方案。
10
+ Provide maintainable, accessible, and performance-controllable animation solutions for SVG icons, illustrations, and data visualizations.
11
11
 
12
12
  ## When to Use
13
13
 
14
- - 需要实现 SVG 图标、Logo、插画或路径描边动画。
15
- - 需要在 React/Vue 组件中接入 Framer Motion、GSAP 或 CSS 动画。
16
- - 需要根据 `prefers-reduced-motion` 提供动效降级。
17
- - 不用于复杂 3D/WebGL 场景;此类场景优先使用 Canvas / Three.js workflow。
14
+ - SVG icon, logo, illustration or path stroke animation needs to be implemented.
15
+ - Framer Motion, GSAP or CSS animation needs to be connected to React/Vue components.
16
+ - Need to provide motion reduction according to `prefers-reduced-motion`.
17
+ - Not used for complex 3D/WebGL scenes; for such scenes, Canvas / Three.js workflow is preferred.
18
18
 
19
19
  ## Procedure
20
20
 
21
- ### 1. 选择动画方式
21
+ ### 1. Select animation mode
22
22
 
23
- 按复杂度和运行时需求选型:
23
+ Choose based on complexity and runtime requirements:
24
24
 
25
- | 场景 | 推荐 |
25
+ | Scenario | Recommendation |
26
26
  | --- | --- |
27
27
  | hover/focus、opacity、transform | CSS animation/transition |
28
- | 路径描边、简单重复动效 | CSS + `stroke-dasharray` |
29
- | React 组件状态驱动动画 | Framer Motion |
30
- | 时间轴、复杂编排、滚动触发 | GSAP |
31
- | 需要保持零依赖的静态 SVG | CSS 或 SMIL |
28
+ | Path stroke, simple repeating animation | CSS + `stroke-dasharray` |
29
+ | React component state-driven animation | Framer Motion |
30
+ | Timeline, complex arrangement, scrolling trigger | GSAP |
31
+ | Need to keep static SVG with zero dependencies | CSS or SMIL |
32
32
 
33
- 如果动效跨越页面转场、滚动叙事或复杂组件编排,应先按交互动效 workflow 判断强度、懒加载和 reduced-motion 策略;本 skill 只负责 SVG 图形本身的路径、形变和图标 motion。
33
+ If the animation spans page transitions, scrolling narratives, or complex component arrangements, you should first judge the intensity, lazy loading, and reduced-motion strategies according to the interactive effects workflow; this skill is only responsible for the path, deformation, and icon motion of the SVG graphics themselves.
34
34
 
35
- ### 2. 使用 CSS 实现路径描边
35
+ ### 2. Use CSS to implement path strokes
36
36
 
37
37
  ```tsx
38
38
  export function CheckmarkIcon() {
@@ -73,7 +73,7 @@ export function CheckmarkIcon() {
73
73
  }
74
74
  ```
75
75
 
76
- ### 3. 在 React 中使用 Framer Motion
76
+ ### 3. Using Framer Motion in React
77
77
 
78
78
  ```tsx
79
79
  import { motion, useReducedMotion } from "framer-motion";
@@ -82,7 +82,7 @@ export function AnimatedSparkline({ path }: { path: string }) {
82
82
  const reduceMotion = useReducedMotion();
83
83
 
84
84
  return (
85
- <svg viewBox="0 0 120 40" role="img" aria-label="趋势图">
85
+ <svg viewBox="0 0 120 40" role="img" aria-label="Trend Chart">
86
86
  <motion.path
87
87
  d={path}
88
88
  fill="none"
@@ -97,7 +97,7 @@ export function AnimatedSparkline({ path }: { path: string }) {
97
97
  }
98
98
  ```
99
99
 
100
- ### 4. 使用 GSAP 编排复杂时间轴
100
+ ### 4. Use GSAP to orchestrate complex timelines
101
101
 
102
102
  ```tsx
103
103
  import { useLayoutEffect, useRef } from "react";
@@ -126,23 +126,23 @@ export function LogoReveal() {
126
126
  }
127
127
  ```
128
128
 
129
- ### 5. 控制运行成本
129
+ ### 5. Control operating costs
130
130
 
131
- - 大型 SVG 拆成静态底图和少量可动画节点,不要让每个 path 都参与时间轴。
132
- - 图标库或 Lottie 替代方案必须按需加载,不进入所有页面的基础包。
133
- - 循环动画只在可见区域运行,页面隐藏或组件卸载时停止。
134
- - 移动端减少滤镜、mask、clipPath 和大量渐变叠加。
131
+ - Split large SVG into static basemaps and a small number of animatable nodes. Do not let each path participate in the timeline.
132
+ - Icon libraries or Lottie alternatives must be loaded on demand, without going into the base package for all pages.
133
+ - The loop animation only runs in the visible area and stops when the page is hidden or the component is unloaded.
134
+ - The mobile version reduces filters, masks, clipPaths and a large number of gradient overlays.
135
135
 
136
136
  ## Constraints
137
137
 
138
- - 优先动画 `transform`、`opacity` 和 SVG 路径属性;避免高频修改 layout 相关属性。
139
- - 交互控件必须保留可见 focus 状态,动画不能替代状态表达。
140
- - 所有非装饰性 SVG 必须有可访问名称;装饰性 SVG 使用 `aria-hidden="true"`。
141
- - 默认尊重 `prefers-reduced-motion`,复杂动效必须提供静态或弱动效降级。
142
- - 不要把大型 SVG 内联到频繁重渲染的组件中;提取为 memoized 组件或外部资源。
143
- - 不用动画改变可点击区域、阅读顺序或焦点位置。
144
- - 不让 SVG 滤镜、模糊、mask 或 clipPath 成为移动端掉帧主因;复杂效果需要设备降级。
138
+ - Prioritize animation `transform`, `opacity` and SVG path attributes; avoid frequent modification of layout-related attributes.
139
+ - Interactive controls must retain the visible focus state, and animation cannot replace state expression.
140
+ - All non-decorative SVGs must have accessible names; decorative SVGs use `aria-hidden="true"`.
141
+ - Default respects `prefers-reduced-motion`, complex animations must provide static or weak motion degradation.
142
+ - Don't inline large SVGs into frequently re-rendered components; extract as memoized components or external resources.
143
+ - Change clickable area, reading order or focus position without animation.
144
+ - Don't let SVG filters, blur, mask or clipPath become the main cause of frame drops on mobile devices; complex effects require device downgrading.
145
145
 
146
146
  ## Expected Output
147
147
 
148
- 产出一个可复用的 SVG 动画组件或样式方案,包含选型理由、动效降级和可访问性处理。验证时检查动画流畅、无布局抖动、键盘与 reduced-motion 场景可用。
148
+ Produce a reusable SVG animation component or style solution, including selection reasons, animation degradation and accessibility processing. During verification, check that the animation is smooth, there is no layout jitter, and keyboard and reduced-motion scenes are available.