@bovinphang/frontend-craft 2.6.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 (414) hide show
  1. package/.claude-plugin/marketplace.json +3 -3
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +72 -1
  4. package/CHANGELOG.zh-CN.md +71 -1
  5. package/README.md +10 -6
  6. package/README.openclaw.md +100 -42
  7. package/README.openclaw.zh-CN.md +100 -42
  8. package/README.zh-CN.md +10 -6
  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 +88 -88
  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 +84 -69
  32. package/docs/ja-JP/README.md +56 -52
  33. package/docs/ko-KR/README.md +45 -41
  34. package/docs/project-structure.md +19 -7
  35. package/docs/superpowers/plans/2026-05-29-fec-debug.md +491 -0
  36. package/docs/superpowers/specs/2026-05-29-fec-debug-design.md +340 -0
  37. package/docs/zh-CN/example-prompts.md +84 -69
  38. package/docs/zh-CN/project-structure.md +14 -5
  39. package/docs/zh-TW/README.md +33 -29
  40. package/localized/zh-CN/agents/fec-architect.md +125 -0
  41. package/localized/zh-CN/agents/fec-code-reviewer.md +152 -0
  42. package/localized/zh-CN/agents/fec-debugger.md +44 -0
  43. package/localized/zh-CN/agents/fec-design-token-mapper.md +75 -0
  44. package/localized/zh-CN/agents/fec-doc-updater.md +30 -0
  45. package/localized/zh-CN/agents/fec-e2e-runner.md +107 -0
  46. package/localized/zh-CN/agents/fec-figma-implementer.md +104 -0
  47. package/localized/zh-CN/agents/fec-performance-optimizer.md +293 -0
  48. package/localized/zh-CN/agents/fec-refactor-cleaner.md +32 -0
  49. package/localized/zh-CN/agents/fec-security-reviewer.md +116 -0
  50. package/localized/zh-CN/agents/fec-test-planner.md +50 -0
  51. package/localized/zh-CN/agents/fec-typescript-reviewer.md +142 -0
  52. package/localized/zh-CN/agents/fec-ui-checker.md +120 -0
  53. package/localized/zh-CN/commands/fec-debug.md +30 -0
  54. package/localized/zh-CN/commands/fec-doc-sync.md +19 -0
  55. package/localized/zh-CN/commands/fec-init.md +70 -0
  56. package/localized/zh-CN/commands/fec-plan.md +94 -0
  57. package/localized/zh-CN/commands/fec-refactor-clean.md +19 -0
  58. package/localized/zh-CN/commands/fec-review.md +66 -0
  59. package/localized/zh-CN/commands/fec-scaffold.md +205 -0
  60. package/localized/zh-CN/commands/fec-tdd.md +21 -0
  61. package/localized/zh-CN/skills/TEMPLATE.md +155 -0
  62. package/localized/zh-CN/skills/eval_queries.json +1013 -0
  63. package/localized/zh-CN/skills/fec-accessibility-check/SKILL.md +39 -0
  64. package/localized/zh-CN/skills/fec-accessibility-check/references/report-template.md +23 -0
  65. package/localized/zh-CN/skills/fec-accessibility-check/references/screen-reader-testing.md +33 -0
  66. package/localized/zh-CN/skills/fec-alchemy/SKILL.md +74 -0
  67. package/localized/zh-CN/skills/fec-alchemy/assets/absorption-plan-template.md +47 -0
  68. package/localized/zh-CN/skills/fec-alchemy/assets/intake-template.md +55 -0
  69. package/localized/zh-CN/skills/fec-alchemy/assets/review-checklist.md +31 -0
  70. package/localized/zh-CN/skills/fec-alchemy/references/methodology.md +94 -0
  71. package/localized/zh-CN/skills/fec-alchemy/references/originality-and-licensing.md +57 -0
  72. package/localized/zh-CN/skills/fec-api-integration/SKILL.md +78 -0
  73. package/localized/zh-CN/skills/fec-api-integration/references/integration-patterns.md +80 -0
  74. package/localized/zh-CN/skills/fec-backend-requirements-handoff/SKILL.md +45 -0
  75. package/localized/zh-CN/skills/fec-browser-storage/SKILL.md +34 -0
  76. package/localized/zh-CN/skills/fec-browser-storage/references/storage-patterns.md +65 -0
  77. package/localized/zh-CN/skills/fec-canvas-threejs/SKILL.md +66 -0
  78. package/localized/zh-CN/skills/fec-canvas-threejs/references/rendering-patterns.md +67 -0
  79. package/localized/zh-CN/skills/fec-canvas-threejs/references/shader-webgl-patterns.md +67 -0
  80. package/localized/zh-CN/skills/fec-code-review/SKILL.md +143 -0
  81. package/localized/zh-CN/skills/fec-code-review/references/report-template.md +29 -0
  82. package/localized/zh-CN/skills/fec-component-testing/SKILL.md +119 -0
  83. package/localized/zh-CN/skills/fec-data-fetching/SKILL.md +62 -0
  84. package/localized/zh-CN/skills/fec-data-fetching/references/query-patterns.md +103 -0
  85. package/localized/zh-CN/skills/fec-debug-framework/SKILL.md +157 -0
  86. package/localized/zh-CN/skills/fec-debug-framework/references/report-template.md +58 -0
  87. package/localized/zh-CN/skills/fec-dependency-upgrade/SKILL.md +34 -0
  88. package/localized/zh-CN/skills/fec-dependency-upgrade/references/dependency-upgrade-workflow.md +56 -0
  89. package/localized/zh-CN/skills/fec-doc-sync/SKILL.md +39 -0
  90. package/localized/zh-CN/skills/fec-drawio-studio/SKILL.md +73 -0
  91. package/localized/zh-CN/skills/fec-drawio-studio/data/THIRD_PARTY_NOTICES.md +10 -0
  92. package/localized/zh-CN/skills/fec-drawio-studio/data/brand-icons.json +878 -0
  93. package/localized/zh-CN/skills/fec-drawio-studio/data/shape-index.json +83570 -0
  94. package/localized/zh-CN/skills/fec-drawio-studio/references/data-residency.md +27 -0
  95. package/localized/zh-CN/skills/fec-drawio-studio/references/diagram-patterns.md +60 -0
  96. package/localized/zh-CN/skills/fec-drawio-studio/references/flowchart-quality.md +49 -0
  97. package/localized/zh-CN/skills/fec-drawio-studio/references/layout-and-export.md +72 -0
  98. package/localized/zh-CN/skills/fec-drawio-studio/references/troubleshooting.md +29 -0
  99. package/localized/zh-CN/skills/fec-drawio-studio/references/xml-and-mermaid.md +58 -0
  100. package/localized/zh-CN/skills/fec-drawio-studio/scripts/brand-symbols.mjs +99 -0
  101. package/localized/zh-CN/skills/fec-drawio-studio/scripts/diagram-lint.mjs +205 -0
  102. package/localized/zh-CN/skills/fec-drawio-studio/scripts/diagram-url.mjs +102 -0
  103. package/localized/zh-CN/skills/fec-drawio-studio/scripts/drawio-export.mjs +134 -0
  104. package/localized/zh-CN/skills/fec-drawio-studio/scripts/layout-graph.mjs +107 -0
  105. package/localized/zh-CN/skills/fec-drawio-studio/scripts/png-embed-fix.mjs +26 -0
  106. package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-go-packages.mjs +36 -0
  107. package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-js-modules.mjs +52 -0
  108. package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-python-classes.mjs +30 -0
  109. package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-python-modules.mjs +55 -0
  110. package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-rust-modules.mjs +35 -0
  111. package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-ts-modules.mjs +7 -0
  112. package/localized/zh-CN/skills/fec-drawio-studio/scripts/shape-query.mjs +121 -0
  113. package/localized/zh-CN/skills/fec-drawio-studio/scripts/studio-core.mjs +139 -0
  114. package/localized/zh-CN/skills/fec-drawio-studio/styles/built-in/corporate.json +49 -0
  115. package/localized/zh-CN/skills/fec-drawio-studio/styles/built-in/default.json +49 -0
  116. package/localized/zh-CN/skills/fec-drawio-studio/styles/built-in/handdrawn.json +49 -0
  117. package/localized/zh-CN/skills/fec-drawio-studio/styles/schema.json +112 -0
  118. package/localized/zh-CN/skills/fec-e2e-testing/SKILL.md +42 -0
  119. package/localized/zh-CN/skills/fec-e2e-testing/references/e2e-ci-reporting.md +62 -0
  120. package/localized/zh-CN/skills/fec-e2e-testing/references/e2e-special-scenarios.md +52 -0
  121. package/localized/zh-CN/skills/fec-e2e-testing/references/e2e-visual-regression.md +60 -0
  122. package/localized/zh-CN/skills/fec-e2e-testing/references/playwright-patterns.md +95 -0
  123. package/localized/zh-CN/skills/fec-form-handling/SKILL.md +76 -0
  124. package/localized/zh-CN/skills/fec-form-handling/references/advanced-form-patterns.md +101 -0
  125. package/localized/zh-CN/skills/fec-image-generation/SKILL.md +80 -0
  126. package/localized/zh-CN/skills/fec-image-generation/assets/interactive-diagram.html +371 -0
  127. package/localized/zh-CN/skills/fec-image-generation/references/artifact-routing.md +80 -0
  128. package/localized/zh-CN/skills/fec-image-generation/references/diagram-workflows.md +74 -0
  129. package/localized/zh-CN/skills/fec-image-generation/references/html-technical-diagrams.md +236 -0
  130. package/localized/zh-CN/skills/fec-image-generation/references/png-qa-autofix.md +30 -0
  131. package/localized/zh-CN/skills/fec-image-generation/scripts/export-diagram.mjs +364 -0
  132. package/localized/zh-CN/skills/fec-image-generation/scripts/interactive-diagram-server.mjs +654 -0
  133. package/localized/zh-CN/skills/fec-image-generation/scripts/png-qa.mjs +431 -0
  134. package/localized/zh-CN/skills/fec-image-generation/scripts/tech-diagram-render.mjs +1397 -0
  135. package/localized/zh-CN/skills/fec-implement-from-design/SKILL.md +129 -0
  136. package/localized/zh-CN/skills/fec-implement-from-design/references/design-plan-template.md +36 -0
  137. package/localized/zh-CN/skills/fec-legacy-to-modern-migration/SKILL.md +46 -0
  138. package/localized/zh-CN/skills/fec-legacy-to-modern-migration/references/migration-execution-checklist.md +110 -0
  139. package/localized/zh-CN/skills/fec-legacy-to-modern-migration/references/migration-report-template.md +41 -0
  140. package/localized/zh-CN/skills/fec-legacy-to-modern-migration/references/migration-strategy-and-mapping.md +48 -0
  141. package/localized/zh-CN/skills/fec-legacy-web-standard/SKILL.md +35 -0
  142. package/localized/zh-CN/skills/fec-legacy-web-standard/references/legacy-patterns.md +85 -0
  143. package/localized/zh-CN/skills/fec-list-virtualization/SKILL.md +34 -0
  144. package/localized/zh-CN/skills/fec-list-virtualization/references/virtualization-patterns.md +80 -0
  145. package/localized/zh-CN/skills/fec-monorepo-project-standard/SKILL.md +142 -0
  146. package/localized/zh-CN/skills/fec-motion-interaction/SKILL.md +73 -0
  147. package/localized/zh-CN/skills/fec-motion-interaction/references/motion-patterns.md +112 -0
  148. package/localized/zh-CN/skills/fec-nextjs-project-standard/SKILL.md +123 -0
  149. package/localized/zh-CN/skills/fec-nuxt-project-standard/SKILL.md +122 -0
  150. package/localized/zh-CN/skills/fec-performance-optimization/SKILL.md +80 -0
  151. package/localized/zh-CN/skills/fec-performance-optimization/references/framework-performance-patterns.md +38 -0
  152. package/localized/zh-CN/skills/fec-performance-optimization/references/report-template.md +59 -0
  153. package/localized/zh-CN/skills/fec-pwa-implementation/SKILL.md +35 -0
  154. package/localized/zh-CN/skills/fec-pwa-implementation/references/manifest-and-icons.md +53 -0
  155. package/localized/zh-CN/skills/fec-pwa-implementation/references/service-worker-workbox.md +68 -0
  156. package/localized/zh-CN/skills/fec-react-project-standard/SKILL.md +91 -0
  157. package/localized/zh-CN/skills/fec-react-project-standard/references/react-performance-patterns.md +35 -0
  158. package/localized/zh-CN/skills/fec-react-project-standard/references/react-project-structure.md +197 -0
  159. package/localized/zh-CN/skills/fec-react-project-standard/references/react-quality-patterns.md +131 -0
  160. package/localized/zh-CN/skills/fec-react-project-standard/references/react-runtime-patterns.md +293 -0
  161. package/localized/zh-CN/skills/fec-refactor-clean/SKILL.md +51 -0
  162. package/localized/zh-CN/skills/fec-refactor-clean/references/report-template.md +42 -0
  163. package/localized/zh-CN/skills/fec-responsive-layout/SKILL.md +34 -0
  164. package/localized/zh-CN/skills/fec-responsive-layout/references/responsive-layout-patterns.md +70 -0
  165. package/localized/zh-CN/skills/fec-route-protection/SKILL.md +135 -0
  166. package/localized/zh-CN/skills/fec-security-review/SKILL.md +38 -0
  167. package/localized/zh-CN/skills/fec-security-review/references/report-template.md +27 -0
  168. package/localized/zh-CN/skills/fec-security-review/references/security-checklist.md +64 -0
  169. package/localized/zh-CN/skills/fec-source-driven-development/SKILL.md +87 -0
  170. package/localized/zh-CN/skills/fec-state-management/SKILL.md +140 -0
  171. package/localized/zh-CN/skills/fec-state-management/references/state-patterns.md +109 -0
  172. package/localized/zh-CN/skills/fec-storybook-component-doc/SKILL.md +37 -0
  173. package/localized/zh-CN/skills/fec-storybook-component-doc/references/story-patterns.md +118 -0
  174. package/localized/zh-CN/skills/fec-svg-animation/SKILL.md +148 -0
  175. package/localized/zh-CN/skills/fec-tailwind-design-system/SKILL.md +34 -0
  176. package/localized/zh-CN/skills/fec-tailwind-design-system/references/tailwind-system-patterns.md +59 -0
  177. package/localized/zh-CN/skills/fec-tdd-workflow/SKILL.md +52 -0
  178. package/localized/zh-CN/skills/fec-testing-strategy/SKILL.md +45 -0
  179. package/localized/zh-CN/skills/fec-typescript-project-standard/SKILL.md +54 -0
  180. package/{skills/fec-typescript-type-safety → localized/zh-CN/skills/fec-typescript-project-standard}/references/type-safety-patterns.md +1 -1
  181. package/{skills/fec-typescript-type-safety/SKILL.md → localized/zh-CN/skills/fec-typescript-project-standard/references/type-safety.md} +5 -14
  182. package/localized/zh-CN/skills/fec-ui-design/SKILL.md +108 -0
  183. package/localized/zh-CN/skills/fec-ui-design/data/product-rules.json +231 -0
  184. package/localized/zh-CN/skills/fec-ui-design/data/stack-ui-rules.json +146 -0
  185. package/localized/zh-CN/skills/fec-ui-design/data/style-archetypes.json +373 -0
  186. package/localized/zh-CN/skills/fec-ui-design/data/ux-quality-rules.json +203 -0
  187. package/localized/zh-CN/skills/fec-ui-design/references/design-intelligence.md +97 -0
  188. package/localized/zh-CN/skills/fec-ui-design/references/master-page-overrides.md +30 -0
  189. package/localized/zh-CN/skills/fec-ui-design/references/pre-delivery-checklist.md +39 -0
  190. package/localized/zh-CN/skills/fec-ui-design/scripts/design-system.mjs +648 -0
  191. package/localized/zh-CN/skills/fec-validation-fix/SKILL.md +51 -0
  192. package/localized/zh-CN/skills/fec-validation-fix/references/report-template.md +43 -0
  193. package/localized/zh-CN/skills/fec-vite-project-standard/SKILL.md +83 -0
  194. package/localized/zh-CN/skills/fec-vue3-project-standard/SKILL.md +58 -0
  195. package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-composables-routing.md +162 -0
  196. package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-performance-patterns.md +13 -0
  197. package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-project-structure.md +176 -0
  198. package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-state-api-quality.md +216 -0
  199. package/localized/zh-CN/skills/fec-web-video-presentation/SKILL.md +61 -0
  200. package/localized/zh-CN/skills/fec-web-video-presentation/data/starter-themes.json +59 -0
  201. package/localized/zh-CN/skills/fec-web-video-presentation/references/chapter-craft.md +37 -0
  202. package/localized/zh-CN/skills/fec-web-video-presentation/references/content-plan.md +38 -0
  203. package/localized/zh-CN/skills/fec-web-video-presentation/references/recording-and-audio.md +33 -0
  204. package/localized/zh-CN/skills/fec-web-video-presentation/references/theme-system.md +36 -0
  205. package/localized/zh-CN/skills/fec-web-video-presentation/scripts/create-video-presentation.mjs +430 -0
  206. package/localized/zh-CN/skills/fec-web-workers/SKILL.md +35 -0
  207. package/localized/zh-CN/skills/fec-web-workers/references/advanced-workers.md +54 -0
  208. package/localized/zh-CN/skills/fec-web-workers/references/basic-worker.md +67 -0
  209. package/localized/zh-CN/skills/metadata.json +1646 -0
  210. package/localized/zh-CN/skills/relations.json +755 -0
  211. package/localized/zh-CN/templates/claude/CLAUDE.md +106 -0
  212. package/localized/zh-CN/templates/claude/settings.json +62 -0
  213. package/localized/zh-CN/templates/codex/AGENTS.md +105 -0
  214. package/localized/zh-CN/templates/codex/config.toml +32 -0
  215. package/localized/zh-CN/templates/openclaw/AGENTS.md +101 -0
  216. package/localized/zh-CN/templates/openclaw/OPENCLAW-CONFIG.md +12 -0
  217. package/localized/zh-CN/templates/shared/rules/fec-agent-workflow.md +54 -0
  218. package/localized/zh-CN/templates/shared/rules/fec-api-layer.md +99 -0
  219. package/localized/zh-CN/templates/shared/rules/fec-ci-cd.md +40 -0
  220. package/localized/zh-CN/templates/shared/rules/fec-code-comments.md +33 -0
  221. package/localized/zh-CN/templates/shared/rules/fec-design-system.md +72 -0
  222. package/localized/zh-CN/templates/shared/rules/fec-error-handling.md +56 -0
  223. package/localized/zh-CN/templates/shared/rules/fec-git-conventions.md +73 -0
  224. package/localized/zh-CN/templates/shared/rules/fec-i18n.md +64 -0
  225. package/localized/zh-CN/templates/shared/rules/fec-naming-conventions.md +120 -0
  226. package/localized/zh-CN/templates/shared/rules/fec-performance.md +101 -0
  227. package/localized/zh-CN/templates/shared/rules/fec-react.md +82 -0
  228. package/localized/zh-CN/templates/shared/rules/fec-refactoring.md +47 -0
  229. package/localized/zh-CN/templates/shared/rules/fec-rendering-patterns.md +40 -0
  230. package/localized/zh-CN/templates/shared/rules/fec-responsive-design.md +50 -0
  231. package/localized/zh-CN/templates/shared/rules/fec-source-driven-development.md +31 -0
  232. package/localized/zh-CN/templates/shared/rules/fec-state-management.md +60 -0
  233. package/localized/zh-CN/templates/shared/rules/fec-testing.md +98 -0
  234. package/localized/zh-CN/templates/shared/rules/fec-typescript.md +112 -0
  235. package/localized/zh-CN/templates/shared/rules/fec-vue.md +64 -0
  236. package/localized/zh-CN/templates/shared/rules/fec-working-modes.md +50 -0
  237. package/openclaw.plugin.json +1 -1
  238. package/package.json +4 -3
  239. package/skills/TEMPLATE.md +74 -74
  240. package/skills/eval_queries.json +717 -619
  241. package/skills/fec-accessibility-check/SKILL.md +21 -21
  242. package/skills/fec-accessibility-check/references/report-template.md +12 -12
  243. package/skills/fec-accessibility-check/references/screen-reader-testing.md +24 -24
  244. package/skills/fec-alchemy/SKILL.md +50 -50
  245. package/skills/fec-alchemy/assets/absorption-plan-template.md +32 -32
  246. package/skills/fec-alchemy/assets/intake-template.md +55 -55
  247. package/skills/fec-alchemy/assets/review-checklist.md +23 -23
  248. package/skills/fec-alchemy/references/methodology.md +66 -66
  249. package/skills/fec-alchemy/references/originality-and-licensing.md +42 -42
  250. package/skills/fec-api-integration/SKILL.md +61 -61
  251. package/skills/fec-api-integration/references/integration-patterns.md +30 -30
  252. package/skills/fec-backend-requirements-handoff/SKILL.md +45 -0
  253. package/skills/fec-browser-storage/SKILL.md +16 -16
  254. package/skills/fec-browser-storage/references/storage-patterns.md +16 -16
  255. package/skills/fec-canvas-threejs/SKILL.md +21 -21
  256. package/skills/fec-canvas-threejs/references/rendering-patterns.md +10 -10
  257. package/skills/fec-canvas-threejs/references/shader-webgl-patterns.md +37 -37
  258. package/skills/fec-code-review/SKILL.md +94 -94
  259. package/skills/fec-code-review/references/report-template.md +13 -13
  260. package/skills/fec-component-testing/SKILL.md +39 -39
  261. package/skills/fec-data-fetching/SKILL.md +16 -16
  262. package/skills/fec-data-fetching/references/query-patterns.md +27 -27
  263. package/skills/fec-debug-framework/SKILL.md +95 -95
  264. package/skills/fec-debug-framework/references/report-template.md +34 -34
  265. package/skills/fec-dependency-upgrade/SKILL.md +17 -17
  266. package/skills/fec-dependency-upgrade/references/dependency-upgrade-workflow.md +31 -31
  267. package/skills/fec-doc-sync/SKILL.md +23 -23
  268. package/skills/fec-drawio-studio/SKILL.md +73 -0
  269. package/skills/fec-drawio-studio/data/THIRD_PARTY_NOTICES.md +10 -0
  270. package/skills/fec-drawio-studio/data/brand-icons.json +878 -0
  271. package/skills/fec-drawio-studio/data/shape-index.json +83570 -0
  272. package/skills/fec-drawio-studio/references/data-residency.md +27 -0
  273. package/skills/fec-drawio-studio/references/diagram-patterns.md +60 -0
  274. package/skills/fec-drawio-studio/references/flowchart-quality.md +49 -0
  275. package/skills/fec-drawio-studio/references/layout-and-export.md +72 -0
  276. package/skills/fec-drawio-studio/references/troubleshooting.md +29 -0
  277. package/skills/fec-drawio-studio/references/xml-and-mermaid.md +58 -0
  278. package/skills/fec-drawio-studio/scripts/brand-symbols.mjs +99 -0
  279. package/skills/fec-drawio-studio/scripts/diagram-lint.mjs +205 -0
  280. package/skills/fec-drawio-studio/scripts/diagram-url.mjs +102 -0
  281. package/skills/fec-drawio-studio/scripts/drawio-export.mjs +134 -0
  282. package/skills/fec-drawio-studio/scripts/layout-graph.mjs +107 -0
  283. package/skills/fec-drawio-studio/scripts/png-embed-fix.mjs +26 -0
  284. package/skills/fec-drawio-studio/scripts/scan-go-packages.mjs +36 -0
  285. package/skills/fec-drawio-studio/scripts/scan-js-modules.mjs +52 -0
  286. package/skills/fec-drawio-studio/scripts/scan-python-classes.mjs +30 -0
  287. package/skills/fec-drawio-studio/scripts/scan-python-modules.mjs +55 -0
  288. package/skills/fec-drawio-studio/scripts/scan-rust-modules.mjs +35 -0
  289. package/skills/fec-drawio-studio/scripts/scan-ts-modules.mjs +7 -0
  290. package/skills/fec-drawio-studio/scripts/shape-query.mjs +121 -0
  291. package/skills/fec-drawio-studio/scripts/studio-core.mjs +139 -0
  292. package/skills/fec-drawio-studio/styles/built-in/corporate.json +49 -0
  293. package/skills/fec-drawio-studio/styles/built-in/default.json +49 -0
  294. package/skills/fec-drawio-studio/styles/built-in/handdrawn.json +49 -0
  295. package/skills/fec-drawio-studio/styles/schema.json +112 -0
  296. package/skills/fec-e2e-testing/SKILL.md +24 -22
  297. package/skills/fec-e2e-testing/references/e2e-ci-reporting.md +62 -0
  298. package/skills/fec-e2e-testing/references/e2e-special-scenarios.md +52 -0
  299. package/skills/fec-e2e-testing/references/e2e-visual-regression.md +60 -0
  300. package/skills/fec-e2e-testing/references/playwright-patterns.md +6 -6
  301. package/skills/fec-form-handling/SKILL.md +21 -21
  302. package/skills/fec-form-handling/references/advanced-form-patterns.md +41 -41
  303. package/skills/fec-image-generation/SKILL.md +81 -0
  304. package/skills/fec-image-generation/assets/interactive-diagram.html +371 -0
  305. package/skills/fec-image-generation/references/artifact-routing.md +80 -0
  306. package/skills/fec-image-generation/references/diagram-workflows.md +74 -0
  307. package/skills/fec-image-generation/references/html-technical-diagrams.md +236 -0
  308. package/skills/fec-image-generation/references/png-qa-autofix.md +30 -0
  309. package/skills/fec-image-generation/scripts/export-diagram.mjs +364 -0
  310. package/skills/fec-image-generation/scripts/interactive-diagram-server.mjs +654 -0
  311. package/skills/fec-image-generation/scripts/png-qa.mjs +431 -0
  312. package/skills/fec-image-generation/scripts/tech-diagram-render.mjs +1397 -0
  313. package/skills/fec-implement-from-design/SKILL.md +81 -74
  314. package/skills/fec-implement-from-design/references/design-plan-template.md +16 -16
  315. package/skills/fec-legacy-to-modern-migration/SKILL.md +29 -173
  316. package/skills/fec-legacy-to-modern-migration/references/migration-execution-checklist.md +110 -0
  317. package/skills/fec-legacy-to-modern-migration/references/migration-report-template.md +37 -37
  318. package/skills/fec-legacy-to-modern-migration/references/migration-strategy-and-mapping.md +48 -0
  319. package/skills/fec-legacy-web-standard/SKILL.md +17 -17
  320. package/skills/fec-legacy-web-standard/references/legacy-patterns.md +16 -16
  321. package/skills/fec-list-virtualization/SKILL.md +16 -16
  322. package/skills/fec-list-virtualization/references/virtualization-patterns.md +31 -31
  323. package/skills/fec-monorepo-project-standard/SKILL.md +52 -52
  324. package/skills/fec-motion-interaction/SKILL.md +51 -44
  325. package/skills/fec-motion-interaction/references/motion-patterns.md +11 -11
  326. package/skills/fec-nextjs-project-standard/SKILL.md +64 -58
  327. package/skills/fec-nuxt-project-standard/SKILL.md +57 -57
  328. package/skills/fec-performance-optimization/SKILL.md +54 -50
  329. package/skills/fec-performance-optimization/references/framework-performance-patterns.md +38 -0
  330. package/skills/fec-performance-optimization/references/report-template.md +34 -28
  331. package/skills/fec-pwa-implementation/SKILL.md +17 -17
  332. package/skills/fec-pwa-implementation/references/manifest-and-icons.md +12 -12
  333. package/skills/fec-pwa-implementation/references/service-worker-workbox.md +13 -13
  334. package/skills/fec-react-project-standard/SKILL.md +72 -64
  335. package/skills/fec-react-project-standard/references/react-performance-patterns.md +35 -0
  336. package/skills/fec-react-project-standard/references/react-project-structure.md +197 -0
  337. package/skills/fec-react-project-standard/references/react-quality-patterns.md +131 -0
  338. package/skills/fec-react-project-standard/references/react-runtime-patterns.md +293 -0
  339. package/skills/fec-refactor-clean/SKILL.md +30 -30
  340. package/skills/fec-refactor-clean/references/report-template.md +23 -23
  341. package/skills/fec-responsive-layout/SKILL.md +17 -17
  342. package/skills/fec-responsive-layout/references/responsive-layout-patterns.md +39 -28
  343. package/skills/fec-route-protection/SKILL.md +26 -26
  344. package/skills/fec-security-review/SKILL.md +20 -20
  345. package/skills/fec-security-review/references/report-template.md +12 -12
  346. package/skills/fec-security-review/references/security-checklist.md +27 -27
  347. package/skills/fec-source-driven-development/SKILL.md +66 -40
  348. package/skills/fec-state-management/SKILL.md +34 -34
  349. package/skills/fec-state-management/references/state-patterns.md +19 -19
  350. package/skills/fec-storybook-component-doc/SKILL.md +19 -19
  351. package/skills/fec-storybook-component-doc/references/story-patterns.md +12 -12
  352. package/skills/fec-svg-animation/SKILL.md +32 -32
  353. package/skills/fec-tailwind-design-system/SKILL.md +17 -17
  354. package/skills/fec-tailwind-design-system/references/tailwind-system-patterns.md +36 -32
  355. package/skills/fec-tdd-workflow/SKILL.md +28 -28
  356. package/skills/fec-testing-strategy/SKILL.md +29 -29
  357. package/skills/fec-typescript-project-standard/SKILL.md +54 -0
  358. package/skills/fec-typescript-project-standard/references/type-safety-patterns.md +102 -0
  359. package/skills/fec-typescript-project-standard/references/type-safety.md +148 -0
  360. package/skills/fec-ui-design/SKILL.md +90 -72
  361. package/skills/fec-ui-design/data/style-archetypes.json +40 -0
  362. package/skills/fec-ui-design/data/ux-quality-rules.json +35 -0
  363. package/skills/fec-ui-design/references/design-intelligence.md +81 -21
  364. package/skills/fec-ui-design/references/master-page-overrides.md +15 -15
  365. package/skills/fec-ui-design/references/pre-delivery-checklist.md +38 -32
  366. package/skills/fec-ui-design/scripts/design-system.mjs +119 -1
  367. package/skills/fec-validation-fix/SKILL.md +26 -26
  368. package/skills/fec-validation-fix/references/report-template.md +25 -25
  369. package/skills/fec-vite-project-standard/SKILL.md +39 -39
  370. package/skills/fec-vue3-project-standard/SKILL.md +39 -30
  371. package/skills/fec-vue3-project-standard/references/vue3-composables-routing.md +163 -0
  372. package/skills/fec-vue3-project-standard/references/vue3-performance-patterns.md +13 -0
  373. package/skills/fec-vue3-project-standard/references/vue3-project-structure.md +177 -0
  374. package/skills/fec-vue3-project-standard/references/vue3-state-api-quality.md +216 -0
  375. package/skills/fec-web-video-presentation/SKILL.md +61 -0
  376. package/skills/fec-web-video-presentation/data/starter-themes.json +59 -0
  377. package/skills/fec-web-video-presentation/references/chapter-craft.md +37 -0
  378. package/skills/fec-web-video-presentation/references/content-plan.md +38 -0
  379. package/skills/fec-web-video-presentation/references/recording-and-audio.md +33 -0
  380. package/skills/fec-web-video-presentation/references/theme-system.md +36 -0
  381. package/skills/fec-web-video-presentation/scripts/create-video-presentation.mjs +430 -0
  382. package/skills/fec-web-workers/SKILL.md +16 -16
  383. package/skills/fec-web-workers/references/advanced-workers.md +13 -13
  384. package/skills/fec-web-workers/references/basic-worker.md +8 -8
  385. package/skills/metadata.json +402 -220
  386. package/skills/relations.json +120 -25
  387. package/templates/claude/CLAUDE.md +60 -60
  388. package/templates/codex/AGENTS.md +76 -76
  389. package/templates/codex/config.toml +4 -4
  390. package/templates/openclaw/AGENTS.md +68 -68
  391. package/templates/openclaw/OPENCLAW-CONFIG.md +8 -8
  392. package/templates/shared/rules/fec-agent-workflow.md +40 -40
  393. package/templates/shared/rules/fec-api-layer.md +52 -52
  394. package/templates/shared/rules/fec-ci-cd.md +29 -117
  395. package/templates/shared/rules/fec-code-comments.md +22 -22
  396. package/templates/shared/rules/fec-design-system.md +65 -241
  397. package/templates/shared/rules/fec-error-handling.md +41 -185
  398. package/templates/shared/rules/fec-git-conventions.md +42 -42
  399. package/templates/shared/rules/fec-i18n.md +48 -96
  400. package/templates/shared/rules/fec-naming-conventions.md +91 -91
  401. package/templates/shared/rules/fec-performance.md +78 -78
  402. package/templates/shared/rules/fec-react.md +58 -58
  403. package/templates/shared/rules/fec-refactoring.md +34 -30
  404. package/templates/shared/rules/fec-rendering-patterns.md +40 -183
  405. package/templates/shared/rules/fec-responsive-design.md +37 -214
  406. package/templates/shared/rules/fec-source-driven-development.md +22 -22
  407. package/templates/shared/rules/fec-state-management.md +45 -148
  408. package/templates/shared/rules/fec-testing.md +64 -64
  409. package/templates/shared/rules/fec-typescript.md +98 -341
  410. package/templates/shared/rules/fec-vue.md +42 -42
  411. package/templates/shared/rules/fec-working-modes.md +34 -34
  412. package/skills/fec-e2e-testing/references/e2e-advanced.md +0 -176
  413. package/skills/fec-react-project-standard/references/react-project-details.md +0 -642
  414. package/skills/fec-vue3-project-standard/references/vue3-project-details.md +0 -547
@@ -1,41 +1,41 @@
1
- # 迁移分析报告模板
1
+ # Migration analysis report template
2
2
 
3
3
  ```markdown
4
- # 迁移分析报告
5
-
6
- > 生成时间: YYYY-MM-DD HH:mm
7
- > 评审工具: frontend-craft
8
-
9
- ## 策略选择
10
- - 渐进式 / 一次性重写:
11
- - 理由:
12
-
13
- ## 存量盘点
14
- - 页面数量:
15
- - 功能模块:
16
- - jQuery 插件:
17
- - 服务端模板:
18
- - API 调用方式:
19
-
20
- ## 依赖关系
21
- - 共享 JS/CSS:
22
- - 跨页面逻辑:
23
- - 后端接口契约:
24
-
25
- ## 迁移优先级
26
- - 第一批:
27
- - 第二批:
28
- - 暂缓:
29
-
30
- ## 分阶段步骤
31
- - 阶段 0:
32
- - 阶段 1:
33
- - 阶段 2:
34
- - 阶段 3:
35
-
36
- ## 风险与回滚
37
- - 风险:
38
- - 回滚方案:
4
+ # Migration analysis report
5
+
6
+ > Generation time: YYYY-MM-DD HH:mm
7
+ > Review tool: frontend-craft
8
+
9
+ ## Strategy selection
10
+ - Progressive/one-time rewrite:
11
+ - Reason:
12
+
13
+ ## Inventory inventory
14
+ - Number of pages:
15
+ - Function modules:
16
+ - jQuery plugin:
17
+ - Server template:
18
+ - API calling method:
19
+
20
+ ## Dependencies
21
+ - Share JS/CSS:
22
+ - Cross-page logic:
23
+ - Backend interface contract:
24
+
25
+ ## Migration priority
26
+ - First batch:
27
+ - Second batch:
28
+ - Suspension:
29
+
30
+ ## Phased steps
31
+ - Stage 0:
32
+ - Stage 1:
33
+ - Stage 2:
34
+ - Stage 3:
35
+
36
+ ## Risk and rollback
37
+ - Risk:
38
+ - Rollback plan:
39
39
  ```
40
40
 
41
- 迁移分析或计划完成后,将报告保存到 `reports/migration-plan-YYYY-MM-DD-HHmmss.md`,并告知用户报告路径。
41
+ After migration analysis or planning is completed, save the report to `reports/migration-plan-YYYY-MM-DD-HHmmss.md` and inform the user of the report path.
@@ -0,0 +1,48 @@
1
+ # Migration strategy and concept mapping
2
+
3
+ ## Migration strategy selection
4
+
5
+ | Strategy | Applicability | Advantages | Risks |
6
+ | --------------------------- | ------------------------------------ | ---------------------------- | ---------------------------- |
7
+ | **Progressive (Strangler Fig)** | Large-scale projects, requiring continuous delivery, and insufficient team familiarity | Risks are controllable, can be launched in batches, and can be rolled back | Old and new coexist for a long time, and two sets of codes need to be maintained |
8
+ | **One-time rewrite** | Small and medium-sized projects, stable business, sufficient time window | Clear target architecture, no historical baggage | Long cycle, high pressure to go online, difficult rollback |
9
+
10
+ **Recommendation**: Prioritize the incremental approach unless the project is small and the business is simple.
11
+
12
+ ## Concept mapping
13
+
14
+ ### jQuery → React
15
+
16
+ | Legacy Patterns | React Correspondence |
17
+ | ------------------------------------------ | -------------------------------------- |
18
+ | `$(selector).html(content)` | Declarative JSX + state-driven rendering |
19
+ | `$(document).on('click', '.btn', handler)` | `onClick` + event delegation is handled by React |
20
+ | `$.ajax()` / `$.get()` | Project request layer, `fetch` / `axios`, can be connected to TanStack Query or SWR on demand |
21
+ | Global variables/namespace storage state | Local state, Context or the existing store of the project can be used as needed Zustand/Redux |
22
+ | `$(el).show()` / `$(el).hide()` | Conditional rendering `{visible && <Component />}` |
23
+ | Manual DOM operations `append` / `remove` | Data-driven, triggering re-rendering through setState |
24
+ | Template string concatenation HTML | JSX component + props |
25
+ | Multiple pages + server-side routing | React Router client-side routing |
26
+
27
+ ### jQuery → Vue 3
28
+
29
+ | Legacy Mode | Vue 3 Compatibility |
30
+ | ------------------------------------------ | -------------------------------------------------- |
31
+ | `$(selector).html(content)` | Template + `ref` / `reactive` driven rendering |
32
+ | `$(document).on('click', '.btn', handler)` | `@click` + event modifier |
33
+ | `$.ajax()` / `$.get()` | Project request layer, `fetch` / `axios`, can be connected to VueUse, Nuxt `useFetch` or TanStack Query Vue adapter as needed |
34
+ | Global variables / Namespace storage state | `ref` / `reactive` / Pinia |
35
+ | `$(el).show()` / `$(el).hide()` | `v-show` / `v-if` |
36
+ | Manual DOM manipulation | Data-driven, with responsive view updates |
37
+ | Template string concatenation HTML | Single file component `<template>` + props |
38
+ | Multiple pages + server-side routing | Vue Router client-side routing |
39
+
40
+ ### Universal mapping
41
+
42
+ | Legacy Concepts | Modern Correspondence |
43
+ | --------------------------------- | ------------------------------------------ |
44
+ | Page-level JS entry (one script per page) | Routing/page entry + lazy loading module, or retain MPA entry and modernize packaging |
45
+ | Public JS modules (utils, ajax packaging) | `services/`, `utils/`, typed API layer |
46
+ | Inline styles / page-level CSS | Target project style system, such as CSS Modules, Tailwind, global style layering or component library styles |
47
+ | Server-side template variables | Obtain via API, SSR/loader injection, or preserve server-side template boundaries and typed data |
48
+ | Form submission + full page refresh | Form library + client verification + API call |
@@ -1,35 +1,35 @@
1
1
  ---
2
2
  name: fec-legacy-web-standard
3
- description: Use when maintaining or safely modifying existing non-framework frontend code: vanilla JavaScript, jQuery, HTML/CSS, MPA pages, server-rendered templates, legacy plugins, or long-lived code that should stay in its current stack. Use migration skill when planning a move to React/Vue/TypeScript; Chinese triggers include 传统前端, 原生 JS, jQuery.
3
+ description: Use when maintaining or safely modifying existing non-framework frontend code: vanilla JavaScript, jQuery, HTML/CSS, MPA pages, server-rendered templates, legacy plugins, or long-lived code that should stay in its current stack. Use migration skill when planning a move to React/Vue/TypeScript; Chinese triggers include traditional frontend, native JS, jQuery.
4
4
  ---
5
5
 
6
- # 传统前端项目规范(JS + jQuery + HTML)
6
+ # Traditional front-end project specifications (JS + jQuery + HTML)
7
7
 
8
8
  ## Purpose
9
9
 
10
- 在不重写技术栈的前提下安全维护 vanilla JS、jQuery、HTML/CSS 和服务端模板项目。
10
+ Safely maintain vanilla JS, jQuery, HTML/CSS and server-side template projects without rewriting the technology stack.
11
11
 
12
12
  ## Procedure
13
13
 
14
- 1. 先确认本次改动是维护旧栈还是迁移;迁移到 React/Vue/TypeScript 时切换到现代化迁移 workflow。
15
- 2. 沿用现有架构和代码风格,优先修复问题,不在一次改动中引入多项现代化。
16
- 3. JavaScript 用 IIFE/命名空间减少全局污染,事件绑定优先委托到合理容器。
17
- 4. DOM 更新缓存选择器、批量操作、转义用户输入;Ajax 必须处理 loading、error、空状态和防重复提交。
18
- 5. HTML/CSS 保持语义、label、alt、BEM/既有命名和低选择器深度。
19
- 6. 安全重点检查 `.html()`、`innerHTML`、URL 参数渲染、CSRF token 和文件上传。
14
+ 1. First confirm whether this change is to maintain the old stack or migrate; switch to the modern migration workflow when migrating to React/Vue/TypeScript.
15
+ 2. Use the existing architecture and coding style, prioritize fixing problems, and do not introduce multiple modernizations in one change.
16
+ 3. JavaScript uses IIFE/namespace to reduce global pollution, and event binding is delegated to reasonable containers first.
17
+ 4. DOM updates cache selectors, batch operations, and escapes user input; Ajax must handle loading, error, empty status, and prevention of repeated submissions.
18
+ 5. HTML/CSS maintains semantics, label, alt, BEM/existing naming and low selector depth.
19
+ 6. Key security checks: `.html()`, `innerHTML`, URL parameter rendering, CSRF token and file upload.
20
20
 
21
- ## 详细参考
21
+ ## Detailed reference
22
22
 
23
- 涉及 jQuery 命名空间、事件绑定、Ajax、XSS 转义、文件组织和维护清单示例时,加载 [references/legacy-patterns.md](references/legacy-patterns.md)。
23
+ Load [references/legacy-patterns.md](references/legacy-patterns.md) when it comes to jQuery namespaces, event binding, Ajax, XSS escaping, file organization, and maintenance checklist examples.
24
24
 
25
25
  ## Constraints
26
26
 
27
- - 在现有架构内改进,不要引入与项目格格不入的现代框架。
28
- - 渐进增强优于推倒重来。
29
- - 禁止用 `innerHTML` / `.html()` 直接插入用户输入。
30
- - 避免全局变量污染。
31
- - 每次聚焦一个维护点,避免顺手重构整个模块。
27
+ - Improve within the existing architecture and do not introduce modern frameworks that are incompatible with the project.
28
+ - Progressive enhancement is better than reinventing the wheel.
29
+ - Disable using `innerHTML` / `.html()` to directly insert user input.
30
+ - Avoid global variable pollution.
31
+ - Focus on one maintenance point at a time to avoid rebuilding the entire module.
32
32
 
33
33
  ## Expected Output
34
34
 
35
- 改动与旧项目风格一致,无全局变量泄漏,事件和 DOM 操作可维护,Ajax 状态完整,用户输入已转义,渐进改进不破坏现有功能。
35
+ The changes are consistent with the style of the old project, no global variables are leaked, events and DOM operations are maintainable, Ajax state is intact, user input has been escaped, and incremental improvements do not destroy existing functionality.
@@ -1,6 +1,6 @@
1
- # 传统前端维护模式
1
+ # Traditional front-end maintenance mode
2
2
 
3
- ## 命名空间
3
+ ## Namespace
4
4
 
5
5
  ```javascript
6
6
  var App = App || {};
@@ -20,12 +20,12 @@ App.UserModule = (function ($) {
20
20
  })(jQuery);
21
21
  ```
22
22
 
23
- ## 事件与 DOM
23
+ ## Events and DOM
24
24
 
25
- - 事件触发元素用 `.js-*` class,与样式 class 分离。
26
- - 缓存频繁使用的选择器。
27
- - 批量 DOM 操作用 `DocumentFragment` 或一次性插入。
28
- - 页面卸载或模块销毁时解绑事件或调用插件 destroy。
25
+ - Event triggering elements use `.js-*` classes, separated from style classes.
26
+ - Cache frequently used selectors.
27
+ - Batch DOM manipulation with `DocumentFragment` or one-time insertion.
28
+ - Unbind the event or call the plug-in destroy when the page is unloaded or the module is destroyed.
29
29
 
30
30
  ## Ajax
31
31
 
@@ -42,7 +42,7 @@ function fetchUserList(params) {
42
42
  else showError(res.message);
43
43
  })
44
44
  .fail(function () {
45
- showError("网络错误,请稍后重试");
45
+ showError("Network error, please try again later");
46
46
  })
47
47
  .always(function () {
48
48
  hideLoading();
@@ -50,7 +50,7 @@ function fetchUserList(params) {
50
50
  }
51
51
  ```
52
52
 
53
- ## XSS 转义
53
+ ## XSS escaping
54
54
 
55
55
  ```javascript
56
56
  $(".username").text(userData.name);
@@ -62,7 +62,7 @@ function escapeHtml(str) {
62
62
  }
63
63
  ```
64
64
 
65
- ## 文件组织
65
+ ## File organization
66
66
 
67
67
  ```text
68
68
  project/
@@ -76,10 +76,10 @@ project/
76
76
  └── pages/
77
77
  ```
78
78
 
79
- ## 检查清单
79
+ ## Checklist
80
80
 
81
- - 没有全局变量泄漏。
82
- - 事件绑定在合理容器上。
83
- - Ajax 处理 loading/error/empty。
84
- - 用户输入已转义。
85
- - 未扩大第三方库或框架依赖。
81
+ - No global variables leaked.
82
+ - Events are bound to reasonable containers.
83
+ - Ajax handling loading/error/empty.
84
+ - User input is escaped.
85
+ - No third-party library or framework dependencies have been expanded.
@@ -1,34 +1,34 @@
1
1
  ---
2
2
  name: fec-list-virtualization
3
- description: Use when optimizing or reviewing large lists, virtual scrolling, windowing, react-window, TanStack Virtual, variable-height rows, dynamic measurement, infinite scroll, grid virtualization, or scroll performance; Chinese triggers include 虚拟列表, 大列表优化, 滚动性能.
3
+ description: Use when optimizing or reviewing large lists, virtual scrolling, windowing, react-window, TanStack Virtual, variable-height rows, dynamic measurement, infinite scroll, grid virtualization, or scroll performance; Chinese triggers include virtual lists, large list optimization, scroll performance.
4
4
  ---
5
5
 
6
- # 列表虚拟化优化
6
+ # List virtualization optimization
7
7
 
8
8
  ## Purpose
9
9
 
10
- 通过窗口化只渲染可视区域,解决大列表 DOM 过多和滚动卡顿。
10
+ Only the visible area is rendered through windowing, which solves the problem of excessive DOM and stuck scrolling in large lists.
11
11
 
12
12
  ## Procedure
13
13
 
14
- 1. 先确认列表规模和瓶颈:500+ 项、滚动掉帧、DOM 节点过多或内存飙升才引入虚拟化。
15
- 2. 先遵循项目现有框架、依赖和设计系统约束,再按场景选库:React 可考虑 `react-window` 或 TanStack Virtual;Vue/Solid/Svelte、动态测量、网格或跨框架场景优先考虑 TanStack Virtual;遗留 `react-virtualized` 只维护不新增。
16
- 3. 明确 item size、overscan、容器高度、key、滚动容器和 resize 行为。
17
- 4. 无限滚动时分离数据分页和 DOM 虚拟化;数据获取可联用数据获取 workflow。
18
- 5. 验证 DOM 节点数、滚动 FPS、键盘/屏幕阅读器体验和 Ctrl+F/SEO 限制。
14
+ 1. First confirm the list size and bottleneck: 500+ items, scrolling frame drops, too many DOM nodes, or memory surge before introducing virtualization.
15
+ 2. First follow the existing framework, dependencies and design system constraints of the project, and then select the library according to the scenario: React can consider `react-window` or TanStack Virtual; Vue/Solid/Svelte, dynamic measurement, grid or cross-framework scenarios give priority to TanStack Virtual; the legacy `react-virtualized` is only maintained and not added.
16
+ 3. Clarify item size, overscan, container height, key, rolling container and resize behavior.
17
+ 4. Separate data paging and DOM virtualization during infinite scrolling; data acquisition can be combined with the data acquisition workflow.
18
+ 5. Verify DOM node count, scrolling FPS, keyboard/screen reader experience, and Ctrl+F/SEO limitations.
19
19
 
20
- ## 详细参考
20
+ ## Detailed reference
21
21
 
22
- 涉及是否需要虚拟化、库选型、固定高度、可变/动态高度、无限滚动、网格虚拟化和性能注意事项时,加载 [references/virtualization-patterns.md](references/virtualization-patterns.md)。
22
+ Load [references/virtualization-patterns.md](references/virtualization-patterns.md) when it comes to the need for virtualization, library selection, fixed height, variable/dynamic height, infinite scrolling, grid virtualization, and performance considerations.
23
23
 
24
24
  ## Constraints
25
25
 
26
- - SEO 关键内容不要只存在于虚拟项中。
27
- - 浏览器原生 Ctrl+F 无法搜索未挂载项目。
28
- - Row 根元素必须透传虚拟库提供的 style/measure ref。
29
- - overscan 过大会浪费内存,过小会白屏。
30
- - 动态高度测量要处理 ResizeObserver 和布局抖动。
26
+ - SEO key content doesn’t exist only in dummy items.
27
+ - Browser native Ctrl+F cannot search for unmounted items.
28
+ - The Row root element must transparently transmit the style/measure ref provided by the virtual library.
29
+ - If overscan is too high, memory will be wasted; if overscan is too low, the screen will be white.
30
+ - Dynamic height measurement to handle ResizeObserver and layout jitter.
31
31
 
32
32
  ## Expected Output
33
33
 
34
- 10000+ 项列表滚动接近 60fps,DOM 节点数稳定在可视区域及缓冲区范围,内存从 O(n) 降至 O(visible)。
34
+ The scrolling of the 10,000+ item list is close to 60fps, the number of DOM nodes is stable within the visible area and buffer range, and the memory is reduced from O(n) to O(visible).
@@ -1,34 +1,34 @@
1
- # 虚拟列表模式
1
+ # Virtual list mode
2
2
 
3
- ## 先判断是否需要虚拟化
3
+ ## First determine whether virtualization is required
4
4
 
5
- - 只有列表规模、渲染成本或滚动性能已经形成瓶颈时才引入虚拟化;小列表、轻量静态列表和分页后可控的列表不需要。
6
- - SEO 关键内容、依赖浏览器原生 Ctrl+F 的全文内容、需要一次性打印/导出的内容,不要只存在于虚拟项中。
7
- - 虚拟化只减少 DOM 渲染成本,不替代数据分页、接口缓存、图片懒加载或复杂行组件的渲染优化。
5
+ - Introduce virtualization only when list size, rendering cost, or scrolling performance have become a bottleneck; not required for small lists, lightweight static lists, and controllable lists after paging.
6
+ - SEO-critical content, full-text content that relies on the browser's native Ctrl+F, and content that needs to be printed/exported once, do not exist only in virtual items.
7
+ - Virtualization only reduces DOM rendering costs and does not replace data paging, interface caching, lazy loading of images, or rendering optimization of complex row components.
8
8
 
9
- ## 选型参考
9
+ ## Selection reference
10
10
 
11
- 先沿用项目已有虚拟列表库和框架约定;新增依赖时再按场景选择。
11
+ First, use the existing virtual list library and framework conventions of the project; when adding new dependencies, select them according to the scenario.
12
12
 
13
- | 场景 | 候选方案 | 注意点 |
13
+ | Scenarios | Alternative solutions | Notes |
14
14
  | --- | --- | --- |
15
- | React 固定高度列表 | `react-window` 或 TanStack Virtual | `react-window` 轻量稳定;TanStack Virtual 更适合统一复杂场景。 |
16
- | React 可变高度列表 | `react-window` 的 `VariableSizeList` 或 TanStack Virtual | 高度可计算时两者都可用;内容真实高度会变化时需要测量和重置。 |
17
- | 动态测量、聊天流、展开行 | TanStack Virtual | 配合 `measureElement` / ResizeObserver,处理布局抖动和滚动锚点。 |
18
- | Vue / Solid / Svelte / 跨框架 | TanStack Virtual 或项目既有生态库 | 不要为非 React 项目引入 React-only 虚拟列表库。 |
19
- | 二维网格、表格、列虚拟化 | TanStack Virtual row/column 双轴方案或现有表格库虚拟化能力 | 固定列、粘性表头和键盘导航需要单独验证。 |
20
- | 遗留 `react-virtualized` 项目 | 维护现有实现 | 不建议新功能继续扩散;大改时评估迁移成本。 |
15
+ | React fixed-height list | `react-window` or TanStack Virtual | `react-window` is lightweight and stable; TanStack Virtual is more suitable for unifying complex scenes. |
16
+ | React Variable Height List | `VariableSizeList` of `react-window` or TanStack Virtual | Both are available when the height can be calculated; measurement and reset are required when the real height of the content changes. |
17
+ | Dynamic measurement, chat flow, expanded rows | TanStack Virtual | Works with `measureElement` / ResizeObserver to handle layout jitter and scroll anchor points. |
18
+ | Vue / Solid / Svelte / Cross-framework | TanStack Virtual or the project's existing ecological library | Do not introduce React-only virtual list libraries for non-React projects. |
19
+ | Two-dimensional grid, table, column virtualization | TanStack Virtual row/column Dual-axis solution or existing table library virtualization capability | Fixed columns, sticky headers and keyboard navigation need to be verified separately. |
20
+ | Legacy `react-virtualized` project | Maintain existing implementation | It is not recommended that new features continue to spread; evaluate migration costs when making major changes. |
21
21
 
22
- ## 通用实现原则
22
+ ## General implementation principles
23
23
 
24
- - 容器高度必须稳定,滚动容器必须明确,item key 必须来自稳定业务标识。
25
- - 行根元素必须透传虚拟库提供的 `style`、定位属性和测量 ref。
26
- - `overscan` 按设备和行渲染成本调节:过小会白屏,过大会接近全量渲染。
27
- - 动态高度需要估算高度、真实测量、resize 更新和滚动锚点策略。
28
- - 无限滚动要分离“数据分页”和“DOM 虚拟化”;不要在 render 阶段无条件触发请求。
29
- - 验证键盘导航、屏幕阅读器语义、焦点保持、滚动恢复、空态/加载态和错误态。
24
+ - The container height must be stable, the rolling container must be clear, and the item key must come from a stable business identity.
25
+ - The row root element must transparently pass the `style`, positioning attributes and measurement ref provided by the virtual library.
26
+ - `overscan` adjusts the rendering cost by device and row: if it is too small, the screen will be white, if it is too large, it will be close to full rendering.
27
+ - Dynamic height requires estimated height, real measurements, resize updates and scroll anchor strategy.
28
+ - Infinite scrolling must separate "data paging" and "DOM virtualization"; do not trigger requests unconditionally in the render phase.
29
+ - Validate keyboard navigation, screen reader semantics, focus maintenance, scroll recovery, empty/loading states, and error states.
30
30
 
31
- ## React 固定高度示例
31
+ ## React fixed height example
32
32
 
33
33
  ```tsx
34
34
  import { FixedSizeList as List } from "react-window";
@@ -44,7 +44,7 @@ export const UserList = ({ users }: { users: User[] }) => (
44
44
  );
45
45
  ```
46
46
 
47
- ## React 可变高度示例
47
+ ## React variable height example
48
48
 
49
49
  ```tsx
50
50
  import { VariableSizeList as List } from "react-window";
@@ -56,7 +56,7 @@ const getItemSize = (index: number) => (items[index].hasSummary ? 120 : 60);
56
56
  </List>;
57
57
  ```
58
58
 
59
- ## TanStack Virtual 动态高度示例
59
+ ## TanStack Virtual dynamic height example
60
60
 
61
61
  ```tsx
62
62
  const virtualizer = useVirtualizer({
@@ -67,14 +67,14 @@ const virtualizer = useVirtualizer({
67
67
  });
68
68
  ```
69
69
 
70
- 动态内容需要测量元素并处理 ResizeObserver;Vue/Solid/Svelte 项目使用 TanStack Virtual 对应框架 adapter,核心选项保持一致。
70
+ Dynamic content requires measuring elements and processing ResizeObserver; Vue/Solid/Svelte projects use the TanStack Virtual corresponding framework adapter, and the core options remain the same.
71
71
 
72
- ## 无限滚动
72
+ ## infinite scroll
73
73
 
74
- - `count` 包含 loader 占位项。
75
- - 最后一个虚拟项进入视口时调用 `fetchNextPage()`。
76
- - 不要在 render 中无条件触发请求,使用 effect 或明确状态保护。
74
+ - `count` contains loader placeholders.
75
+ - `fetchNextPage()` is called when the last virtual item enters the viewport.
76
+ - Do not trigger requests unconditionally in render, use effects or explicit state protection.
77
77
 
78
- ## 网格虚拟化
78
+ ## Grid virtualization
79
79
 
80
- 二维网格使用 `FixedSizeGrid` 或 TanStack Virtual 的 row/column 双轴方案,确保单元格 style 透传。
80
+ The two-dimensional grid uses `FixedSizeGrid` or TanStack Virtual's row/column dual-axis solution to ensure that the cell style is transparently transmitted.
@@ -1,58 +1,58 @@
1
1
  ---
2
2
  name: fec-monorepo-project-standard
3
- description: Use when creating, reviewing, or restructuring frontend monorepos with pnpm workspace, Turborepo, Nx, multi-package dependency boundaries, task orchestration, package naming, or package publishing; Chinese triggers include monorepo, workspace, 多包.
3
+ description: Use when creating, reviewing, or restructuring frontend monorepos with pnpm workspace, Turborepo, Nx, multi-package dependency boundaries, task orchestration, package naming, or package publishing; Chinese triggers include monorepo, workspace, multi-package.
4
4
  ---
5
5
 
6
- # Monorepo 项目规范
6
+ # Monorepo Project Specifications
7
7
 
8
- 适用于使用 pnpm workspace、Turborepo 或 Nx 的多包前端仓库。
8
+ For multi-package front-end repositories using pnpm workspace, Turborepo or Nx.
9
9
 
10
10
  ## Purpose
11
11
 
12
- 规范 Monorepo 项目的目录结构、依赖管理、任务编排和包发布流程,确保多包协作的构建效率和版本一致性。
12
+ Standardize the directory structure, dependency management, task orchestration and package release process of the Monorepo project to ensure the build efficiency and version consistency of multi-package collaboration.
13
13
 
14
14
  ## Procedure
15
15
 
16
- 1. 先确认仓库是否已使用 pnpm workspace、Turborepo 或 Nx,并沿用现有包命名与任务约定。
17
- 2. 将应用放在 `apps/`,共享库、配置和工具放在 `packages/` 或既有等价目录。
18
- 3. 内部依赖使用 `workspace:*`,通过依赖图驱动构建顺序。
19
- 4. 为 build、lint、test 配置可缓存、可并行、可增量的根任务,并明确输入、输出和环境变量。
20
- 5. 在 Turborepo/Nx 中配置 affected/changed 范围命令,CI 优先跑受影响包,同时保留主干全量验证入口。
21
- 6. 发布包前检查包边界、循环依赖、exports、peer dependencies 和版本策略。
16
+ 1. First confirm whether the repository has used pnpm workspace, Turborepo or Nx, and continue to use the existing package naming and task conventions.
17
+ 2. Place applications in `apps/` and shared libraries, configuration and tools in `packages/` or existing equivalent directories.
18
+ 3. Internal dependencies use `workspace:*` to drive the build sequence through the dependency graph.
19
+ 4. Configure cacheable, parallelizable, and incremental root tasks for build, lint, and test, and specify input, output, and environment variables.
20
+ 5. Configure the affected/changed range command in Turborepo/Nx. CI will run the affected packages first while retaining the backbone full verification entry.
21
+ 6. Check package boundaries, circular dependencies, exports, peer dependencies and version policies before publishing the package.
22
22
 
23
- ## 工具选择
23
+ ## Tool selection
24
24
 
25
- | 工具 | 适用 | 特点 |
25
+ | Tools | Applicability | Features |
26
26
  | ------------------ | ---- | -------------------------- |
27
- | **pnpm workspace** | 基础 | 依赖提升、链接、脚本聚合 |
28
- | **Turborepo** | 推荐 | 缓存、并行、依赖图 |
29
- | **Nx** | 大型 | 增量构建、云缓存、插件生态 |
27
+ | **pnpm workspace** | Basics | Dependency promotion, linking, script aggregation |
28
+ | **Turborepo** | Recommended | Caching, parallelism, dependency graph |
29
+ | **Nx** | Large | Incremental build, cloud cache, plug-in ecology |
30
30
 
31
- ## 目录结构
31
+ ## Directory structure
32
32
 
33
33
  ### pnpm + Turborepo
34
34
 
35
35
  ```
36
- ├── package.json # 根 package,workspace 配置
37
- ├── pnpm-workspace.yaml # workspace 包列表
38
- ├── turbo.json # Turborepo 配置
36
+ ├── package.json # Root package, workspace configuration
37
+ ├── pnpm-workspace.yaml # workspace package list
38
+ ├── turbo.json # Turborepo configuration
39
39
  │
40
40
  ├── apps/
41
- │ ├── web/ # 主应用
41
+ │ ├── web/ # Main application
42
42
  │ │ ├── package.json
43
43
  │ │ └── ...
44
- │ ├── admin/ # 管理后台
45
- │ └── docs/ # 文档站
44
+ │ ├── admin/ # Management background
45
+ │ └── docs/ # Documentation site
46
46
  │
47
47
  ├── packages/
48
- │ ├── ui/ # 共享 UI 组件
48
+ │ ├── ui/ # Shared UI components
49
49
  │ │ ├── package.json
50
50
  │ │ └── src/
51
- │ ├── utils/ # 工具函数
52
- │ ├── config-eslint/ # 共享 ESLint 配置
53
- │ └── config-typescript/ # 共享 TS 配置
51
+ │ ├── utils/ # Utility function
52
+ │ ├── config-eslint/ # Shared ESLint configuration
53
+ │ └── config-typescript/ # Shared TS configuration
54
54
  │
55
- └── tooling/ # 构建/测试工具(可选)
55
+ └── tooling/ # Build/test tools (optional)
56
56
  └── scripts/
57
57
  ```
58
58
 
@@ -64,11 +64,11 @@ packages:
64
64
  - "packages/*"
65
65
  ```
66
66
 
67
- ## 依赖管理
67
+ ## Dependency management
68
68
 
69
- - 内部包使用 `workspace:*` 协议
70
- - 根 `package.json` 统一部分依赖版本,子包可覆盖
71
- - 禁止循环依赖,通过 `pnpm why` 检查
69
+ - Internal packages use the `workspace:*` protocol
70
+ - The root `package.json` unifies some dependency versions and can be overridden by sub-packages
71
+ - Disable circular dependencies, check via `pnpm why`
72
72
 
73
73
  ```json
74
74
  {
@@ -79,7 +79,7 @@ packages:
79
79
  }
80
80
  ```
81
81
 
82
- ## Turborepo 任务编排
82
+ ## Turborepo task orchestration
83
83
 
84
84
  ```json
85
85
  {
@@ -99,12 +99,12 @@ packages:
99
99
  }
100
100
  ```
101
101
 
102
- - `^build` 表示先执行依赖包的 build
103
- - `outputs` 用于缓存命中判断
104
- - `inputs` 应包含源码、配置、锁文件和环境相关文件;不要把 `.env` secret 值写入缓存 key
105
- - 远程缓存要区分可信 CI 与本地开发,避免把含敏感信息的产物上传
102
+ - `^build` means executing the build of dependent packages first
103
+ - `outputs` is used for cache hit judgment
104
+ - `inputs` should include source code, configuration, lock files and environment-related files; do not write the `.env` secret value into the cache key
105
+ - Remote caching should distinguish between trusted CI and local development to avoid uploading products containing sensitive information.
106
106
 
107
- ## Nx 任务编排
107
+ ## Nx task orchestration
108
108
 
109
109
  ```json
110
110
  {
@@ -118,25 +118,25 @@ packages:
118
118
  }
119
119
  ```
120
120
 
121
- ## 包命名
121
+ ## Package naming
122
122
 
123
- - 内部包:`@org/package-name` 或 `@repo/package-name`
124
- - 发布到 npm:遵循 `@scope/name` 规范
123
+ - Internal package: `@org/package-name` or `@repo/package-name`
124
+ - Publish to npm: follow the `@scope/name` specification
125
125
 
126
126
  ## Constraints
127
127
 
128
- - 子包之间通过 `workspace:*` 引用,不发布到 npm 再安装
129
- - 共享配置(ESLint、TS)放在 `packages/config-*`,子包 extends
130
- - 构建顺序由依赖图决定,不手动指定无关依赖
131
- - 根目录执行 `pnpm -r build` 或 `turbo run build` 时,所有包按序构建
132
- - 禁止循环依赖,新增包时通过 `pnpm why` 检查依赖链
133
- - CI cache 只缓存依赖安装目录和任务产物,不缓存未验证的构建状态
134
- - affected 构建不能替代发布前全量验证;主干或 release 分支仍需完整质量门禁
128
+ - Sub-packages are referenced through `workspace:*` and are not published to npm and then installed.
129
+ - Shared configurations (ESLint, TS) are placed in `packages/config-*`, and sub-packages extend
130
+ - The build order is determined by the dependency graph, without manually specifying irrelevant dependencies
131
+ - When executing `pnpm -r build` or `turbo run build` in the root directory, all packages will be built in order
132
+ - Disable circular dependencies, use `pnpm why` to check the dependency chain when adding a new package
133
+ - CI cache only caches dependent installation directories and task products, and does not cache unverified build status
134
+ - Affected builds cannot replace full verification before release; the trunk or release branch still requires complete quality control
135
135
 
136
136
  ## Expected Output
137
137
 
138
- - Monorepo 目录结构清晰(`apps/` 应用、`packages/` 共享包、`tooling/` 工具)
139
- - `pnpm-workspace.yaml` 和 `turbo.json` / `nx.json` 配置正确
140
- - 内部包使用 `workspace:*` 协议,无循环依赖
141
- - 构建、lint、test 任务可通过根命令一键执行,缓存命中率高
142
- - CI 能区分 affected 快速反馈和 release 全量验证,缓存配置不会泄露密钥或隐藏依赖边界问题
138
+ - Monorepo directory structure is clear (`apps/` applications, `packages/` shared packages, `tooling/` tools)
139
+ - `pnpm-workspace.yaml` and `turbo.json` / `nx.json` are configured correctly
140
+ - Internal packages use `workspace:*` protocol, no circular dependencies
141
+ - Build, lint, and test tasks can be executed with one click through the root command, and the cache hit rate is high
142
+ - CI can distinguish between affected quick feedback and release full verification, and the cache configuration will not leak keys or hide dependency boundary issues