@bovinphang/frontend-craft 2.7.0 → 2.9.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 (502) hide show
  1. package/.claude-plugin/marketplace.json +3 -3
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +378 -305
  4. package/CHANGELOG.zh-CN.md +377 -304
  5. package/CONTRIBUTING.md +371 -361
  6. package/CONTRIBUTING.zh-CN.md +371 -361
  7. package/README.md +545 -493
  8. package/README.openclaw.md +359 -264
  9. package/README.openclaw.zh-CN.md +359 -264
  10. package/README.zh-CN.md +545 -493
  11. package/agents/fec-architect.md +70 -70
  12. package/agents/fec-code-reviewer.md +103 -82
  13. package/agents/fec-debugger.md +20 -20
  14. package/agents/fec-design-token-mapper.md +36 -36
  15. package/agents/fec-doc-updater.md +13 -13
  16. package/agents/fec-e2e-runner.md +45 -45
  17. package/agents/fec-figma-implementer.md +59 -59
  18. package/agents/fec-performance-optimizer.md +128 -128
  19. package/agents/fec-refactor-cleaner.md +17 -14
  20. package/agents/fec-refactoring-expert.md +81 -0
  21. package/agents/fec-security-reviewer.md +82 -67
  22. package/agents/fec-test-planner.md +27 -27
  23. package/agents/fec-typescript-reviewer.md +103 -87
  24. package/agents/fec-ui-checker.md +64 -64
  25. package/commands/fec-debug.md +19 -19
  26. package/commands/fec-doc-sync.md +11 -11
  27. package/commands/fec-init.md +37 -38
  28. package/commands/fec-plan.md +58 -58
  29. package/commands/fec-refactor-clean.md +11 -11
  30. package/commands/fec-refactor-plan.md +17 -0
  31. package/commands/fec-refactor.md +18 -0
  32. package/commands/fec-review.md +71 -41
  33. package/commands/fec-scaffold.md +41 -41
  34. package/commands/fec-smell.md +17 -0
  35. package/commands/fec-tdd.md +17 -13
  36. package/dist/bin/frontend-craft.js +190 -36
  37. package/dist/hooks/fec-run-tests.js +5 -1
  38. package/dist/hooks/fec-session-start.js +1 -1
  39. package/docs/example-prompts.md +157 -137
  40. package/docs/ja-JP/README.md +534 -493
  41. package/docs/ko-KR/README.md +534 -493
  42. package/docs/project-structure.md +151 -123
  43. package/docs/refactoring/README.md +50 -0
  44. package/docs/refactoring/catalog.md +105 -0
  45. package/docs/refactoring/smell-refactoring-matrix.md +41 -0
  46. package/docs/review-and-diagram-workflows.md +39 -0
  47. package/docs/runtimes/antigravity.md +18 -10
  48. package/docs/runtimes/augment.md +18 -10
  49. package/docs/runtimes/claude.md +191 -177
  50. package/docs/runtimes/claude.zh-CN.md +189 -175
  51. package/docs/runtimes/cline.md +18 -10
  52. package/docs/runtimes/codebuddy.md +18 -10
  53. package/docs/runtimes/codex.md +18 -10
  54. package/docs/runtimes/compatibility.md +27 -0
  55. package/docs/runtimes/copilot.md +18 -10
  56. package/docs/runtimes/cursor.md +18 -10
  57. package/docs/runtimes/gemini.md +18 -10
  58. package/docs/runtimes/kilo.md +18 -10
  59. package/docs/runtimes/openclaw.md +18 -10
  60. package/docs/runtimes/opencode.md +18 -10
  61. package/docs/runtimes/qoder.md +18 -19
  62. package/docs/runtimes/trae.md +18 -10
  63. package/docs/runtimes/windsurf.md +18 -10
  64. package/docs/superpowers/plans/2026-09-26-content-integrity.md +145 -0
  65. package/docs/superpowers/plans/2026-09-26-diagram-quality.md +170 -0
  66. package/docs/superpowers/specs/2026-09-26-diagram-quality-design.md +77 -0
  67. package/docs/superpowers/specs/2026-09-26-project-optimization-design.md +95 -0
  68. package/docs/zh-CN/example-prompts.md +157 -137
  69. package/docs/zh-CN/project-structure.md +148 -123
  70. package/docs/zh-CN/review-and-diagram-workflows.md +39 -0
  71. package/docs/zh-TW/README.md +534 -493
  72. package/localized/zh-CN/agents/fec-architect.md +125 -0
  73. package/localized/zh-CN/agents/fec-code-reviewer.md +171 -0
  74. package/localized/zh-CN/agents/fec-debugger.md +44 -0
  75. package/localized/zh-CN/agents/fec-design-token-mapper.md +75 -0
  76. package/localized/zh-CN/agents/fec-doc-updater.md +30 -0
  77. package/localized/zh-CN/agents/fec-e2e-runner.md +107 -0
  78. package/localized/zh-CN/agents/fec-figma-implementer.md +104 -0
  79. package/localized/zh-CN/agents/fec-performance-optimizer.md +293 -0
  80. package/localized/zh-CN/agents/fec-refactor-cleaner.md +35 -0
  81. package/localized/zh-CN/agents/fec-refactoring-expert.md +53 -0
  82. package/localized/zh-CN/agents/fec-security-reviewer.md +132 -0
  83. package/localized/zh-CN/agents/fec-test-planner.md +50 -0
  84. package/localized/zh-CN/agents/fec-typescript-reviewer.md +158 -0
  85. package/localized/zh-CN/agents/fec-ui-checker.md +120 -0
  86. package/localized/zh-CN/commands/fec-debug.md +30 -0
  87. package/localized/zh-CN/commands/fec-doc-sync.md +19 -0
  88. package/localized/zh-CN/commands/fec-init.md +70 -0
  89. package/localized/zh-CN/commands/fec-plan.md +94 -0
  90. package/localized/zh-CN/commands/fec-refactor-clean.md +19 -0
  91. package/localized/zh-CN/commands/fec-refactor-plan.md +15 -0
  92. package/localized/zh-CN/commands/fec-refactor.md +14 -0
  93. package/localized/zh-CN/commands/fec-review.md +97 -0
  94. package/localized/zh-CN/commands/fec-scaffold.md +205 -0
  95. package/localized/zh-CN/commands/fec-smell.md +13 -0
  96. package/localized/zh-CN/commands/fec-tdd.md +25 -0
  97. package/localized/zh-CN/skills/TEMPLATE.md +155 -0
  98. package/localized/zh-CN/skills/eval_queries.json +1257 -0
  99. package/localized/zh-CN/skills/fec-accessibility-check/SKILL.md +39 -0
  100. package/localized/zh-CN/skills/fec-accessibility-check/references/report-template.md +23 -0
  101. package/localized/zh-CN/skills/fec-accessibility-check/references/screen-reader-testing.md +33 -0
  102. package/localized/zh-CN/skills/fec-alchemy/SKILL.md +74 -0
  103. package/localized/zh-CN/skills/fec-alchemy/assets/absorption-plan-template.md +47 -0
  104. package/localized/zh-CN/skills/fec-alchemy/assets/intake-template.md +55 -0
  105. package/localized/zh-CN/skills/fec-alchemy/assets/review-checklist.md +31 -0
  106. package/localized/zh-CN/skills/fec-alchemy/references/methodology.md +94 -0
  107. package/localized/zh-CN/skills/fec-alchemy/references/originality-and-licensing.md +57 -0
  108. package/localized/zh-CN/skills/fec-api-integration/SKILL.md +78 -0
  109. package/localized/zh-CN/skills/fec-api-integration/references/integration-patterns.md +80 -0
  110. package/localized/zh-CN/skills/fec-backend-requirements-handoff/SKILL.md +45 -0
  111. package/localized/zh-CN/skills/fec-browser-storage/SKILL.md +34 -0
  112. package/localized/zh-CN/skills/fec-browser-storage/references/storage-patterns.md +65 -0
  113. package/localized/zh-CN/skills/fec-canvas-threejs/SKILL.md +66 -0
  114. package/localized/zh-CN/skills/fec-canvas-threejs/references/rendering-patterns.md +67 -0
  115. package/localized/zh-CN/skills/fec-canvas-threejs/references/shader-webgl-patterns.md +67 -0
  116. package/localized/zh-CN/skills/fec-code-review/SKILL.md +162 -0
  117. package/localized/zh-CN/skills/fec-code-review/references/report-template.md +39 -0
  118. package/localized/zh-CN/skills/fec-code-smells/SKILL.md +33 -0
  119. package/localized/zh-CN/skills/fec-code-smells/references/detection-guide.md +25 -0
  120. package/localized/zh-CN/skills/fec-code-smells/references/smell-catalog.md +817 -0
  121. package/localized/zh-CN/skills/fec-code-smells/references/smell-to-refactoring-map.md +265 -0
  122. package/localized/zh-CN/skills/fec-component-testing/SKILL.md +119 -0
  123. package/localized/zh-CN/skills/fec-data-fetching/SKILL.md +62 -0
  124. package/localized/zh-CN/skills/fec-data-fetching/references/query-patterns.md +103 -0
  125. package/localized/zh-CN/skills/fec-debug-framework/SKILL.md +157 -0
  126. package/localized/zh-CN/skills/fec-debug-framework/references/report-template.md +58 -0
  127. package/localized/zh-CN/skills/fec-dependency-upgrade/SKILL.md +34 -0
  128. package/localized/zh-CN/skills/fec-dependency-upgrade/references/dependency-upgrade-workflow.md +56 -0
  129. package/localized/zh-CN/skills/fec-doc-sync/SKILL.md +39 -0
  130. package/localized/zh-CN/skills/fec-drawio-studio/SKILL.md +73 -0
  131. package/localized/zh-CN/skills/fec-drawio-studio/data/THIRD_PARTY_NOTICES.md +10 -0
  132. package/localized/zh-CN/skills/fec-drawio-studio/data/brand-icons.json +878 -0
  133. package/localized/zh-CN/skills/fec-drawio-studio/data/shape-index.json +83570 -0
  134. package/localized/zh-CN/skills/fec-drawio-studio/references/data-residency.md +27 -0
  135. package/localized/zh-CN/skills/fec-drawio-studio/references/diagram-patterns.md +60 -0
  136. package/localized/zh-CN/skills/fec-drawio-studio/references/flowchart-quality.md +49 -0
  137. package/localized/zh-CN/skills/fec-drawio-studio/references/layout-and-export.md +72 -0
  138. package/localized/zh-CN/skills/fec-drawio-studio/references/troubleshooting.md +29 -0
  139. package/localized/zh-CN/skills/fec-drawio-studio/references/xml-and-mermaid.md +58 -0
  140. package/localized/zh-CN/skills/fec-drawio-studio/scripts/brand-symbols.mjs +99 -0
  141. package/localized/zh-CN/skills/fec-drawio-studio/scripts/diagram-lint.mjs +205 -0
  142. package/localized/zh-CN/skills/fec-drawio-studio/scripts/diagram-url.mjs +102 -0
  143. package/localized/zh-CN/skills/fec-drawio-studio/scripts/drawio-export.mjs +134 -0
  144. package/localized/zh-CN/skills/fec-drawio-studio/scripts/layout-graph.mjs +107 -0
  145. package/localized/zh-CN/skills/fec-drawio-studio/scripts/png-embed-fix.mjs +26 -0
  146. package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-go-packages.mjs +36 -0
  147. package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-js-modules.mjs +52 -0
  148. package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-python-classes.mjs +30 -0
  149. package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-python-modules.mjs +55 -0
  150. package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-rust-modules.mjs +35 -0
  151. package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-ts-modules.mjs +7 -0
  152. package/localized/zh-CN/skills/fec-drawio-studio/scripts/shape-query.mjs +121 -0
  153. package/localized/zh-CN/skills/fec-drawio-studio/scripts/studio-core.mjs +139 -0
  154. package/localized/zh-CN/skills/fec-drawio-studio/styles/built-in/corporate.json +49 -0
  155. package/localized/zh-CN/skills/fec-drawio-studio/styles/built-in/default.json +49 -0
  156. package/localized/zh-CN/skills/fec-drawio-studio/styles/built-in/handdrawn.json +49 -0
  157. package/localized/zh-CN/skills/fec-drawio-studio/styles/schema.json +112 -0
  158. package/localized/zh-CN/skills/fec-e2e-testing/SKILL.md +42 -0
  159. package/localized/zh-CN/skills/fec-e2e-testing/references/e2e-ci-reporting.md +62 -0
  160. package/localized/zh-CN/skills/fec-e2e-testing/references/e2e-special-scenarios.md +52 -0
  161. package/localized/zh-CN/skills/fec-e2e-testing/references/e2e-visual-regression.md +60 -0
  162. package/localized/zh-CN/skills/fec-e2e-testing/references/playwright-patterns.md +95 -0
  163. package/localized/zh-CN/skills/fec-form-handling/SKILL.md +76 -0
  164. package/localized/zh-CN/skills/fec-form-handling/references/advanced-form-patterns.md +101 -0
  165. package/localized/zh-CN/skills/fec-image-generation/SKILL.md +110 -0
  166. package/localized/zh-CN/skills/fec-image-generation/assets/interactive-diagram.html +371 -0
  167. package/localized/zh-CN/skills/fec-image-generation/assets/quality-examples/README.md +14 -0
  168. package/localized/zh-CN/skills/fec-image-generation/assets/quality-examples/architecture.json +121 -0
  169. package/localized/zh-CN/skills/fec-image-generation/assets/quality-examples/invalid-explicit.json +41 -0
  170. package/localized/zh-CN/skills/fec-image-generation/assets/quality-examples/sequence.json +53 -0
  171. package/localized/zh-CN/skills/fec-image-generation/assets/quality-examples/sequence.mmd +21 -0
  172. package/localized/zh-CN/skills/fec-image-generation/assets/quality-examples/workflow.json +98 -0
  173. package/localized/zh-CN/skills/fec-image-generation/assets/quality-examples/workflow.mmd +7 -0
  174. package/localized/zh-CN/skills/fec-image-generation/references/artifact-routing.md +80 -0
  175. package/localized/zh-CN/skills/fec-image-generation/references/diagram-workflows.md +81 -0
  176. package/localized/zh-CN/skills/fec-image-generation/references/html-technical-diagrams.md +243 -0
  177. package/localized/zh-CN/skills/fec-image-generation/references/png-qa-autofix.md +37 -0
  178. package/localized/zh-CN/skills/fec-image-generation/scripts/diagram-browser.mjs +90 -0
  179. package/localized/zh-CN/skills/fec-image-generation/scripts/diagram-layout.mjs +176 -0
  180. package/localized/zh-CN/skills/fec-image-generation/scripts/export-diagram.mjs +332 -0
  181. package/localized/zh-CN/skills/fec-image-generation/scripts/interactive-diagram-server.mjs +654 -0
  182. package/localized/zh-CN/skills/fec-image-generation/scripts/mermaid-render.mjs +64 -0
  183. package/localized/zh-CN/skills/fec-image-generation/scripts/png-qa.mjs +462 -0
  184. package/localized/zh-CN/skills/fec-image-generation/scripts/tech-diagram-render.mjs +1537 -0
  185. package/localized/zh-CN/skills/fec-implement-from-design/SKILL.md +129 -0
  186. package/localized/zh-CN/skills/fec-implement-from-design/references/design-plan-template.md +36 -0
  187. package/localized/zh-CN/skills/fec-legacy-to-modern-migration/SKILL.md +46 -0
  188. package/localized/zh-CN/skills/fec-legacy-to-modern-migration/references/migration-execution-checklist.md +110 -0
  189. package/localized/zh-CN/skills/fec-legacy-to-modern-migration/references/migration-report-template.md +41 -0
  190. package/localized/zh-CN/skills/fec-legacy-to-modern-migration/references/migration-strategy-and-mapping.md +48 -0
  191. package/localized/zh-CN/skills/fec-legacy-web-standard/SKILL.md +35 -0
  192. package/localized/zh-CN/skills/fec-legacy-web-standard/references/legacy-patterns.md +85 -0
  193. package/localized/zh-CN/skills/fec-list-virtualization/SKILL.md +34 -0
  194. package/localized/zh-CN/skills/fec-list-virtualization/references/virtualization-patterns.md +80 -0
  195. package/localized/zh-CN/skills/fec-monorepo-project-standard/SKILL.md +142 -0
  196. package/localized/zh-CN/skills/fec-motion-interaction/SKILL.md +73 -0
  197. package/localized/zh-CN/skills/fec-motion-interaction/references/motion-patterns.md +112 -0
  198. package/localized/zh-CN/skills/fec-nextjs-project-standard/SKILL.md +123 -0
  199. package/localized/zh-CN/skills/fec-nuxt-project-standard/SKILL.md +122 -0
  200. package/localized/zh-CN/skills/fec-performance-optimization/SKILL.md +80 -0
  201. package/localized/zh-CN/skills/fec-performance-optimization/references/framework-performance-patterns.md +38 -0
  202. package/localized/zh-CN/skills/fec-performance-optimization/references/report-template.md +59 -0
  203. package/localized/zh-CN/skills/fec-pwa-implementation/SKILL.md +35 -0
  204. package/localized/zh-CN/skills/fec-pwa-implementation/references/manifest-and-icons.md +53 -0
  205. package/localized/zh-CN/skills/fec-pwa-implementation/references/service-worker-workbox.md +68 -0
  206. package/localized/zh-CN/skills/fec-react-project-standard/SKILL.md +91 -0
  207. package/localized/zh-CN/skills/fec-react-project-standard/references/react-performance-patterns.md +35 -0
  208. package/localized/zh-CN/skills/fec-react-project-standard/references/react-project-structure.md +197 -0
  209. package/localized/zh-CN/skills/fec-react-project-standard/references/react-quality-patterns.md +131 -0
  210. package/localized/zh-CN/skills/fec-react-project-standard/references/react-runtime-patterns.md +293 -0
  211. package/localized/zh-CN/skills/fec-refactor-clean/SKILL.md +54 -0
  212. package/localized/zh-CN/skills/fec-refactor-clean/references/report-template.md +42 -0
  213. package/localized/zh-CN/skills/fec-refactoring/SKILL.md +83 -0
  214. package/localized/zh-CN/skills/fec-refactoring/references/principles.md +43 -0
  215. package/localized/zh-CN/skills/fec-refactoring/references/refactoring-vs-feature-change.md +25 -0
  216. package/localized/zh-CN/skills/fec-refactoring/references/when-to-refactor.md +17 -0
  217. package/localized/zh-CN/skills/fec-refactoring/references/workflow.md +59 -0
  218. package/localized/zh-CN/skills/fec-refactoring-api/SKILL.md +25 -0
  219. package/localized/zh-CN/skills/fec-refactoring-api/references/api-refactorings.md +496 -0
  220. package/localized/zh-CN/skills/fec-refactoring-catalog/SKILL.md +21 -0
  221. package/localized/zh-CN/skills/fec-refactoring-catalog/references/catalog-index.md +99 -0
  222. package/localized/zh-CN/skills/fec-refactoring-catalog/references/composition-guide.md +49 -0
  223. package/localized/zh-CN/skills/fec-refactoring-catalog/references/selection-guide.md +41 -0
  224. package/localized/zh-CN/skills/fec-refactoring-control/SKILL.md +25 -0
  225. package/localized/zh-CN/skills/fec-refactoring-control/references/conditional-refactorings.md +299 -0
  226. package/localized/zh-CN/skills/fec-refactoring-data/SKILL.md +25 -0
  227. package/localized/zh-CN/skills/fec-refactoring-data/references/data-refactorings.md +248 -0
  228. package/localized/zh-CN/skills/fec-refactoring-encapsulation/SKILL.md +25 -0
  229. package/localized/zh-CN/skills/fec-refactoring-encapsulation/references/encapsulation-refactorings.md +452 -0
  230. package/localized/zh-CN/skills/fec-refactoring-functions/SKILL.md +25 -0
  231. package/localized/zh-CN/skills/fec-refactoring-functions/references/function-refactorings.md +567 -0
  232. package/localized/zh-CN/skills/fec-refactoring-inheritance/SKILL.md +25 -0
  233. package/localized/zh-CN/skills/fec-refactoring-inheritance/references/inheritance-refactorings.md +550 -0
  234. package/localized/zh-CN/skills/fec-refactoring-move-features/SKILL.md +25 -0
  235. package/localized/zh-CN/skills/fec-refactoring-move-features/references/moving-refactorings.md +453 -0
  236. package/localized/zh-CN/skills/fec-refactoring-validation/SKILL.md +52 -0
  237. package/localized/zh-CN/skills/fec-refactoring-validation/references/behavior-preservation.md +15 -0
  238. package/localized/zh-CN/skills/fec-refactoring-validation/references/refactoring-test-checklist.md +25 -0
  239. package/localized/zh-CN/skills/fec-responsive-layout/SKILL.md +34 -0
  240. package/localized/zh-CN/skills/fec-responsive-layout/references/responsive-layout-patterns.md +70 -0
  241. package/localized/zh-CN/skills/fec-route-protection/SKILL.md +135 -0
  242. package/localized/zh-CN/skills/fec-security-review/SKILL.md +54 -0
  243. package/localized/zh-CN/skills/fec-security-review/references/report-template.md +37 -0
  244. package/localized/zh-CN/skills/fec-security-review/references/security-checklist.md +64 -0
  245. package/localized/zh-CN/skills/fec-source-driven-development/SKILL.md +87 -0
  246. package/localized/zh-CN/skills/fec-state-management/SKILL.md +140 -0
  247. package/localized/zh-CN/skills/fec-state-management/references/state-patterns.md +109 -0
  248. package/localized/zh-CN/skills/fec-storybook-component-doc/SKILL.md +37 -0
  249. package/localized/zh-CN/skills/fec-storybook-component-doc/references/story-patterns.md +118 -0
  250. package/localized/zh-CN/skills/fec-svg-animation/SKILL.md +148 -0
  251. package/localized/zh-CN/skills/fec-tailwind-design-system/SKILL.md +34 -0
  252. package/localized/zh-CN/skills/fec-tailwind-design-system/references/tailwind-system-patterns.md +59 -0
  253. package/localized/zh-CN/skills/fec-tdd-workflow/SKILL.md +55 -0
  254. package/localized/zh-CN/skills/fec-testing-strategy/SKILL.md +45 -0
  255. package/localized/zh-CN/skills/fec-typescript-project-standard/SKILL.md +54 -0
  256. package/localized/zh-CN/skills/fec-typescript-project-standard/references/type-safety-patterns.md +102 -0
  257. package/localized/zh-CN/skills/fec-typescript-project-standard/references/type-safety.md +148 -0
  258. package/localized/zh-CN/skills/fec-ui-design/SKILL.md +108 -0
  259. package/localized/zh-CN/skills/fec-ui-design/data/product-rules.json +231 -0
  260. package/localized/zh-CN/skills/fec-ui-design/data/stack-ui-rules.json +146 -0
  261. package/localized/zh-CN/skills/fec-ui-design/data/style-archetypes.json +373 -0
  262. package/localized/zh-CN/skills/fec-ui-design/data/ux-quality-rules.json +203 -0
  263. package/localized/zh-CN/skills/fec-ui-design/references/design-intelligence.md +97 -0
  264. package/localized/zh-CN/skills/fec-ui-design/references/master-page-overrides.md +30 -0
  265. package/localized/zh-CN/skills/fec-ui-design/references/pre-delivery-checklist.md +39 -0
  266. package/localized/zh-CN/skills/fec-ui-design/scripts/design-system.mjs +648 -0
  267. package/localized/zh-CN/skills/fec-validation-fix/SKILL.md +51 -0
  268. package/localized/zh-CN/skills/fec-validation-fix/references/report-template.md +43 -0
  269. package/localized/zh-CN/skills/fec-vite-project-standard/SKILL.md +83 -0
  270. package/localized/zh-CN/skills/fec-vue3-project-standard/SKILL.md +58 -0
  271. package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-composables-routing.md +162 -0
  272. package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-performance-patterns.md +13 -0
  273. package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-project-structure.md +176 -0
  274. package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-state-api-quality.md +216 -0
  275. package/localized/zh-CN/skills/fec-web-video-presentation/SKILL.md +61 -0
  276. package/localized/zh-CN/skills/fec-web-video-presentation/data/starter-themes.json +59 -0
  277. package/localized/zh-CN/skills/fec-web-video-presentation/references/chapter-craft.md +37 -0
  278. package/localized/zh-CN/skills/fec-web-video-presentation/references/content-plan.md +38 -0
  279. package/localized/zh-CN/skills/fec-web-video-presentation/references/recording-and-audio.md +33 -0
  280. package/localized/zh-CN/skills/fec-web-video-presentation/references/theme-system.md +36 -0
  281. package/localized/zh-CN/skills/fec-web-video-presentation/scripts/create-video-presentation.mjs +430 -0
  282. package/localized/zh-CN/skills/fec-web-workers/SKILL.md +35 -0
  283. package/localized/zh-CN/skills/fec-web-workers/references/advanced-workers.md +54 -0
  284. package/localized/zh-CN/skills/fec-web-workers/references/basic-worker.md +67 -0
  285. package/localized/zh-CN/skills/metadata.json +2004 -0
  286. package/localized/zh-CN/skills/relations.json +1023 -0
  287. package/localized/zh-CN/templates/claude/CLAUDE.md +106 -0
  288. package/localized/zh-CN/templates/claude/settings.json +62 -0
  289. package/localized/zh-CN/templates/codex/AGENTS.md +105 -0
  290. package/localized/zh-CN/templates/codex/config.toml +32 -0
  291. package/localized/zh-CN/templates/openclaw/AGENTS.md +101 -0
  292. package/localized/zh-CN/templates/openclaw/OPENCLAW-CONFIG.md +12 -0
  293. package/localized/zh-CN/templates/shared/rules/fec-agent-workflow.md +55 -0
  294. package/localized/zh-CN/templates/shared/rules/fec-api-layer.md +99 -0
  295. package/localized/zh-CN/templates/shared/rules/fec-ci-cd.md +40 -0
  296. package/localized/zh-CN/templates/shared/rules/fec-code-comments.md +33 -0
  297. package/localized/zh-CN/templates/shared/rules/fec-design-system.md +72 -0
  298. package/localized/zh-CN/templates/shared/rules/fec-error-handling.md +56 -0
  299. package/localized/zh-CN/templates/shared/rules/fec-git-conventions.md +73 -0
  300. package/localized/zh-CN/templates/shared/rules/fec-i18n.md +64 -0
  301. package/localized/zh-CN/templates/shared/rules/fec-naming-conventions.md +120 -0
  302. package/localized/zh-CN/templates/shared/rules/fec-performance.md +101 -0
  303. package/localized/zh-CN/templates/shared/rules/fec-react.md +82 -0
  304. package/localized/zh-CN/templates/shared/rules/fec-refactoring.md +47 -0
  305. package/localized/zh-CN/templates/shared/rules/fec-rendering-patterns.md +40 -0
  306. package/localized/zh-CN/templates/shared/rules/fec-responsive-design.md +50 -0
  307. package/localized/zh-CN/templates/shared/rules/fec-source-driven-development.md +31 -0
  308. package/localized/zh-CN/templates/shared/rules/fec-state-management.md +60 -0
  309. package/localized/zh-CN/templates/shared/rules/fec-testing.md +98 -0
  310. package/localized/zh-CN/templates/shared/rules/fec-typescript.md +112 -0
  311. package/localized/zh-CN/templates/shared/rules/fec-vue.md +64 -0
  312. package/localized/zh-CN/templates/shared/rules/fec-working-modes.md +50 -0
  313. package/openclaw.plugin.json +2 -3
  314. package/package.json +28 -17
  315. package/skills/TEMPLATE.md +74 -74
  316. package/skills/eval_queries.json +922 -678
  317. package/skills/fec-accessibility-check/SKILL.md +21 -21
  318. package/skills/fec-accessibility-check/references/report-template.md +12 -12
  319. package/skills/fec-accessibility-check/references/screen-reader-testing.md +24 -24
  320. package/skills/fec-alchemy/SKILL.md +50 -50
  321. package/skills/fec-alchemy/assets/absorption-plan-template.md +32 -32
  322. package/skills/fec-alchemy/assets/intake-template.md +55 -55
  323. package/skills/fec-alchemy/assets/review-checklist.md +23 -23
  324. package/skills/fec-alchemy/references/methodology.md +66 -66
  325. package/skills/fec-alchemy/references/originality-and-licensing.md +42 -42
  326. package/skills/fec-api-integration/SKILL.md +61 -61
  327. package/skills/fec-api-integration/references/integration-patterns.md +30 -30
  328. package/skills/fec-backend-requirements-handoff/SKILL.md +25 -25
  329. package/skills/fec-browser-storage/SKILL.md +16 -16
  330. package/skills/fec-browser-storage/references/storage-patterns.md +16 -16
  331. package/skills/fec-canvas-threejs/SKILL.md +21 -21
  332. package/skills/fec-canvas-threejs/references/rendering-patterns.md +10 -10
  333. package/skills/fec-canvas-threejs/references/shader-webgl-patterns.md +37 -37
  334. package/skills/fec-code-review/SKILL.md +113 -94
  335. package/skills/fec-code-review/references/report-template.md +23 -13
  336. package/skills/fec-code-smells/SKILL.md +33 -0
  337. package/skills/fec-code-smells/references/detection-guide.md +25 -0
  338. package/skills/fec-code-smells/references/smell-catalog.md +861 -0
  339. package/skills/fec-code-smells/references/smell-to-refactoring-map.md +265 -0
  340. package/skills/fec-component-testing/SKILL.md +39 -39
  341. package/skills/fec-data-fetching/SKILL.md +16 -16
  342. package/skills/fec-data-fetching/references/query-patterns.md +27 -27
  343. package/skills/fec-debug-framework/SKILL.md +95 -95
  344. package/skills/fec-debug-framework/references/report-template.md +34 -34
  345. package/skills/fec-dependency-upgrade/SKILL.md +17 -17
  346. package/skills/fec-dependency-upgrade/references/dependency-upgrade-workflow.md +31 -31
  347. package/skills/fec-doc-sync/SKILL.md +23 -23
  348. package/skills/fec-drawio-studio/SKILL.md +42 -38
  349. package/skills/fec-drawio-studio/data/THIRD_PARTY_NOTICES.md +1 -1
  350. package/skills/fec-drawio-studio/data/shape-index.json +83570 -0
  351. package/skills/fec-drawio-studio/references/diagram-patterns.md +19 -0
  352. package/skills/fec-drawio-studio/references/flowchart-quality.md +49 -0
  353. package/skills/fec-drawio-studio/references/layout-and-export.md +18 -3
  354. package/skills/fec-drawio-studio/references/xml-and-mermaid.md +5 -1
  355. package/skills/fec-drawio-studio/scripts/diagram-lint.mjs +62 -0
  356. package/skills/fec-drawio-studio/scripts/drawio-export.mjs +134 -0
  357. package/skills/fec-drawio-studio/scripts/shape-query.mjs +55 -15
  358. package/skills/fec-e2e-testing/SKILL.md +24 -24
  359. package/skills/fec-e2e-testing/references/e2e-ci-reporting.md +20 -20
  360. package/skills/fec-e2e-testing/references/e2e-special-scenarios.md +10 -10
  361. package/skills/fec-e2e-testing/references/e2e-visual-regression.md +17 -17
  362. package/skills/fec-e2e-testing/references/playwright-patterns.md +6 -6
  363. package/skills/fec-form-handling/SKILL.md +21 -21
  364. package/skills/fec-form-handling/references/advanced-form-patterns.md +41 -41
  365. package/skills/fec-image-generation/SKILL.md +84 -29
  366. package/skills/fec-image-generation/assets/interactive-diagram.html +371 -0
  367. package/skills/fec-image-generation/assets/quality-examples/README.md +14 -0
  368. package/skills/fec-image-generation/assets/quality-examples/architecture.json +121 -0
  369. package/skills/fec-image-generation/assets/quality-examples/invalid-explicit.json +41 -0
  370. package/skills/fec-image-generation/assets/quality-examples/sequence.json +53 -0
  371. package/skills/fec-image-generation/assets/quality-examples/sequence.mmd +21 -0
  372. package/skills/fec-image-generation/assets/quality-examples/workflow.json +98 -0
  373. package/skills/fec-image-generation/assets/quality-examples/workflow.mmd +7 -0
  374. package/skills/fec-image-generation/references/diagram-workflows.md +41 -3
  375. package/skills/fec-image-generation/references/html-technical-diagrams.md +243 -0
  376. package/skills/fec-image-generation/references/png-qa-autofix.md +9 -2
  377. package/skills/fec-image-generation/scripts/diagram-browser.mjs +90 -0
  378. package/skills/fec-image-generation/scripts/diagram-layout.mjs +176 -0
  379. package/skills/fec-image-generation/scripts/export-diagram.mjs +332 -0
  380. package/skills/fec-image-generation/scripts/interactive-diagram-server.mjs +654 -0
  381. package/skills/fec-image-generation/scripts/mermaid-render.mjs +64 -0
  382. package/skills/fec-image-generation/scripts/png-qa.mjs +35 -4
  383. package/skills/fec-image-generation/scripts/tech-diagram-render.mjs +1537 -0
  384. package/skills/fec-implement-from-design/SKILL.md +81 -81
  385. package/skills/fec-implement-from-design/references/design-plan-template.md +16 -16
  386. package/skills/fec-legacy-to-modern-migration/SKILL.md +29 -29
  387. package/skills/fec-legacy-to-modern-migration/references/migration-execution-checklist.md +81 -81
  388. package/skills/fec-legacy-to-modern-migration/references/migration-report-template.md +37 -37
  389. package/skills/fec-legacy-to-modern-migration/references/migration-strategy-and-mapping.md +31 -31
  390. package/skills/fec-legacy-web-standard/SKILL.md +17 -17
  391. package/skills/fec-legacy-web-standard/references/legacy-patterns.md +16 -16
  392. package/skills/fec-list-virtualization/SKILL.md +16 -16
  393. package/skills/fec-list-virtualization/references/virtualization-patterns.md +31 -31
  394. package/skills/fec-monorepo-project-standard/SKILL.md +52 -52
  395. package/skills/fec-motion-interaction/SKILL.md +51 -51
  396. package/skills/fec-motion-interaction/references/motion-patterns.md +11 -11
  397. package/skills/fec-nextjs-project-standard/SKILL.md +64 -64
  398. package/skills/fec-nuxt-project-standard/SKILL.md +57 -57
  399. package/skills/fec-performance-optimization/SKILL.md +54 -54
  400. package/skills/fec-performance-optimization/references/framework-performance-patterns.md +23 -23
  401. package/skills/fec-performance-optimization/references/report-template.md +31 -31
  402. package/skills/fec-pwa-implementation/SKILL.md +17 -17
  403. package/skills/fec-pwa-implementation/references/manifest-and-icons.md +12 -12
  404. package/skills/fec-pwa-implementation/references/service-worker-workbox.md +13 -13
  405. package/skills/fec-react-project-standard/SKILL.md +72 -72
  406. package/skills/fec-react-project-standard/references/react-performance-patterns.md +28 -28
  407. package/skills/fec-react-project-standard/references/react-project-structure.md +112 -112
  408. package/skills/fec-react-project-standard/references/react-quality-patterns.md +72 -72
  409. package/skills/fec-react-project-standard/references/react-runtime-patterns.md +94 -94
  410. package/skills/fec-refactor-clean/SKILL.md +33 -30
  411. package/skills/fec-refactor-clean/references/report-template.md +23 -23
  412. package/skills/fec-refactoring/SKILL.md +83 -0
  413. package/skills/fec-refactoring/references/principles.md +60 -0
  414. package/skills/fec-refactoring/references/refactoring-vs-feature-change.md +27 -0
  415. package/skills/fec-refactoring/references/when-to-refactor.md +31 -0
  416. package/skills/fec-refactoring/references/workflow.md +90 -0
  417. package/skills/fec-refactoring-api/SKILL.md +25 -0
  418. package/skills/fec-refactoring-api/references/api-refactorings.md +496 -0
  419. package/skills/fec-refactoring-catalog/SKILL.md +28 -0
  420. package/skills/fec-refactoring-catalog/references/catalog-index.md +99 -0
  421. package/skills/fec-refactoring-catalog/references/composition-guide.md +49 -0
  422. package/skills/fec-refactoring-catalog/references/selection-guide.md +47 -0
  423. package/skills/fec-refactoring-control/SKILL.md +25 -0
  424. package/skills/fec-refactoring-control/references/conditional-refactorings.md +299 -0
  425. package/skills/fec-refactoring-data/SKILL.md +25 -0
  426. package/skills/fec-refactoring-data/references/data-refactorings.md +248 -0
  427. package/skills/fec-refactoring-encapsulation/SKILL.md +25 -0
  428. package/skills/fec-refactoring-encapsulation/references/encapsulation-refactorings.md +452 -0
  429. package/skills/fec-refactoring-functions/SKILL.md +25 -0
  430. package/skills/fec-refactoring-functions/references/function-refactorings.md +567 -0
  431. package/skills/fec-refactoring-inheritance/SKILL.md +25 -0
  432. package/skills/fec-refactoring-inheritance/references/inheritance-refactorings.md +550 -0
  433. package/skills/fec-refactoring-move-features/SKILL.md +25 -0
  434. package/skills/fec-refactoring-move-features/references/moving-refactorings.md +453 -0
  435. package/skills/fec-refactoring-validation/SKILL.md +59 -0
  436. package/skills/fec-refactoring-validation/references/behavior-preservation.md +53 -0
  437. package/skills/fec-refactoring-validation/references/refactoring-test-checklist.md +42 -0
  438. package/skills/fec-responsive-layout/SKILL.md +17 -17
  439. package/skills/fec-responsive-layout/references/responsive-layout-patterns.md +37 -37
  440. package/skills/fec-route-protection/SKILL.md +26 -26
  441. package/skills/fec-security-review/SKILL.md +36 -20
  442. package/skills/fec-security-review/references/report-template.md +22 -12
  443. package/skills/fec-security-review/references/security-checklist.md +27 -27
  444. package/skills/fec-source-driven-development/SKILL.md +59 -59
  445. package/skills/fec-state-management/SKILL.md +34 -34
  446. package/skills/fec-state-management/references/state-patterns.md +19 -19
  447. package/skills/fec-storybook-component-doc/SKILL.md +19 -19
  448. package/skills/fec-storybook-component-doc/references/story-patterns.md +12 -12
  449. package/skills/fec-svg-animation/SKILL.md +32 -32
  450. package/skills/fec-tailwind-design-system/SKILL.md +17 -17
  451. package/skills/fec-tailwind-design-system/references/tailwind-system-patterns.md +36 -36
  452. package/skills/fec-tdd-workflow/SKILL.md +32 -28
  453. package/skills/fec-testing-strategy/SKILL.md +29 -29
  454. package/skills/fec-typescript-project-standard/SKILL.md +38 -38
  455. package/skills/fec-typescript-project-standard/references/type-safety-patterns.md +20 -20
  456. package/skills/fec-typescript-project-standard/references/type-safety.md +18 -18
  457. package/skills/fec-ui-design/SKILL.md +90 -90
  458. package/skills/fec-ui-design/references/design-intelligence.md +61 -61
  459. package/skills/fec-ui-design/references/master-page-overrides.md +15 -15
  460. package/skills/fec-ui-design/references/pre-delivery-checklist.md +38 -38
  461. package/skills/fec-validation-fix/SKILL.md +26 -26
  462. package/skills/fec-validation-fix/references/report-template.md +25 -25
  463. package/skills/fec-vite-project-standard/SKILL.md +39 -39
  464. package/skills/fec-vue3-project-standard/SKILL.md +38 -38
  465. package/skills/fec-vue3-project-standard/references/vue3-composables-routing.md +36 -36
  466. package/skills/fec-vue3-project-standard/references/vue3-performance-patterns.md +8 -8
  467. package/skills/fec-vue3-project-standard/references/vue3-project-structure.md +112 -112
  468. package/skills/fec-vue3-project-standard/references/vue3-state-api-quality.md +74 -74
  469. package/skills/fec-web-video-presentation/SKILL.md +33 -33
  470. package/skills/fec-web-workers/SKILL.md +16 -16
  471. package/skills/fec-web-workers/references/advanced-workers.md +13 -13
  472. package/skills/fec-web-workers/references/basic-worker.md +8 -8
  473. package/skills/metadata.json +485 -116
  474. package/skills/relations.json +268 -0
  475. package/templates/claude/CLAUDE.md +60 -60
  476. package/templates/codex/AGENTS.md +76 -76
  477. package/templates/codex/config.toml +4 -4
  478. package/templates/openclaw/AGENTS.md +68 -68
  479. package/templates/openclaw/OPENCLAW-CONFIG.md +8 -8
  480. package/templates/shared/rules/fec-agent-workflow.md +41 -40
  481. package/templates/shared/rules/fec-api-layer.md +52 -52
  482. package/templates/shared/rules/fec-ci-cd.md +29 -29
  483. package/templates/shared/rules/fec-code-comments.md +22 -22
  484. package/templates/shared/rules/fec-design-system.md +53 -53
  485. package/templates/shared/rules/fec-error-handling.md +40 -40
  486. package/templates/shared/rules/fec-git-conventions.md +42 -42
  487. package/templates/shared/rules/fec-i18n.md +48 -48
  488. package/templates/shared/rules/fec-naming-conventions.md +91 -91
  489. package/templates/shared/rules/fec-performance.md +78 -78
  490. package/templates/shared/rules/fec-react.md +58 -58
  491. package/templates/shared/rules/fec-refactoring.md +34 -34
  492. package/templates/shared/rules/fec-rendering-patterns.md +36 -36
  493. package/templates/shared/rules/fec-responsive-design.md +37 -37
  494. package/templates/shared/rules/fec-source-driven-development.md +22 -22
  495. package/templates/shared/rules/fec-state-management.md +56 -56
  496. package/templates/shared/rules/fec-testing.md +64 -64
  497. package/templates/shared/rules/fec-typescript.md +75 -75
  498. package/templates/shared/rules/fec-vue.md +42 -42
  499. package/templates/shared/rules/fec-working-modes.md +34 -34
  500. package/docs/superpowers/plans/2026-05-29-fec-debug.md +0 -491
  501. package/docs/superpowers/specs/2026-05-29-fec-debug-design.md +0 -340
  502. package/skills/fec-drawio-studio/data/shape-index.json.gz +0 -0
@@ -1,129 +1,129 @@
1
1
  ---
2
2
  name: fec-implement-from-design
3
- description: Use when implementing UI from Figma, Sketch, MasterGo, Pixso, Modao, MockingBot, screenshots, design selections, design tokens, or design-to-code tasks for production frontend components/pages; Chinese triggers include 设计稿, 按设计实现.
3
+ description: Use when implementing UI from Figma, Sketch, MasterGo, Pixso, Modao, MockingBot, screenshots, design selections, design tokens, or design-to-code tasks for production frontend components/pages; Chinese triggers include design draft, implementation by design.
4
4
  ---
5
5
 
6
- # 按设计稿实现
6
+ # Implement according to design draft
7
7
 
8
8
  ## Purpose
9
9
 
10
- 基于设计工具(Figma、Sketch、MasterGo、Pixso、墨刀、摹客)的设计上下文,高保真实现页面或组件,强调组件复用、设计 Token 映射、可访问性和面向生产的前端实现。
10
+ Based on the design context of design tools (Figma, Sketch, MasterGo, Pixso, Mokou, Mock), high-fidelity implementation of pages or components emphasizes component reuse, design token mapping, accessibility, and production-oriented front-end implementation.
11
11
 
12
- ## 支持的设计工具
12
+ ## Supported design tools
13
13
 
14
- | 工具 | MCP 集成 | 获取设计数据方式 |
14
+ | Tools | MCP Integration | How to obtain design data |
15
15
  | -------- | ------------------------- | ----------------------------------------- |
16
- | Figma | `figma` / `figma-desktop` | API 获取设计结构、变量定义 |
17
- | Sketch | `sketch` | MCP 获取设计选区截图 |
18
- | MasterGo | `mastergo` | API 获取 DSL 结构数据 |
19
- | Pixso | `pixso` | 本地 MCP 获取帧数据和代码 |
20
- | 墨刀 | `modao` | MCP 获取原型数据、生成设计描述 |
21
- | 摹客 | 无 MCP | 通过用户提供的截图、标注或导出的 CSS 获取 |
16
+ | Figma | `figma` / `figma-desktop` | API to obtain design structure and variable definitions |
17
+ | Sketch | `sketch` | MCP Get screenshot of design selection |
18
+ | MasterGo | `mastergo` | API to get DSL structure data |
19
+ | Pixso | `pixso` | Local MCP gets frame data and code |
20
+ | Mo Dao | `modao` | MCP obtains prototype data and generates design descriptions |
21
+ | Mocke | No MCP | Acquired via user-provided screenshots, annotations, or exported CSS |
22
22
 
23
- ## 目标
23
+ ## Target
24
24
 
25
- - 尽量高还原地实现设计稿
26
- - 在创建新组件前优先复用现有项目组件
27
- - 尽可能把设计变量映射到现有 Token
28
- - 保持实现结果可维护、类型明确、可测试且具备可访问性
29
- - 避免引入重复的基础组件或并行设计系统
25
+ - Realize the design draft as accurately as possible
26
+ - Prioritize reusing existing project components before creating new ones
27
+ - Map design variables to existing Tokens as much as possible
28
+ - Keep implementations maintainable, well-typed, testable, and accessible
29
+ - Avoid introducing duplication of basic components or parallel design systems
30
30
 
31
31
  ## Procedure
32
32
 
33
- ### 1. 识别设计来源
33
+ ### 1. Identify design sources
34
34
 
35
- 按优先级选择设计数据获取方式:
35
+ Select the design data acquisition method according to priority:
36
36
 
37
- - `figma` — Figma API 集成
38
- - `figma-desktop` — Figma 桌面端集成
39
- - `mastergo` — MasterGo DSL 数据
40
- - `pixso` — Pixso 本地 MCP
41
- - `modao` — 墨刀原型数据
42
- - `sketch` — Sketch 选区截图
43
- - 如以上 MCP 均不可用,请求用户提供设计截图或标注(适用于摹客等无 MCP 工具)
44
- - 如果没有权威设计稿,但任务明确要求视觉型网站、品牌页、作品集或高审美重设计,可把用户提供或本地生成的分区级参考图作为临时视觉事实来源;这种来源必须先分析后实现,并在计划中标明不是权威设计系统。
37
+ - `figma` — Figma API integration
38
+ - `figma-desktop` — Figma desktop integration
39
+ - `mastergo` — MasterGo DSL data
40
+ - `pixso` — Pixso local MCP
41
+ - `modao` — Ink knife prototype data
42
+ - `sketch` — Sketch selection screenshot
43
+ - If none of the above MCPs are available, ask the user to provide design screenshots or annotations (applicable to tools without MCP such as Mocke)
44
+ - If there is no authoritative design draft, but the task clearly requires a visual website, brand page, portfolio or high-aesthetic redesign, user-provided or locally generated section-level reference images can be used as a temporary source of visual truth; this source must be analyzed first and then implemented, and marked in the plan as not an authoritative design system.
45
45
 
46
- ### 2. 读取设计上下文
46
+ ### 2. Read the design context
47
47
 
48
- 通过 MCP 或用户提供的设计数据读取设计上下文:
48
+ Read the design context from the MCP or user-supplied design data:
49
49
 
50
- - 检查布局结构
51
- - 检查间距、字体、颜色、变量、状态、图标和组件层级
52
- - 如果 MCP 提供了资源文件或 SVG / 图片源,直接使用
53
- - 如果 MCP 已提供真实资源,不要自行造占位资源
54
- - 如果用户提供截图而非 MCP 数据,从截图中推断布局、颜色、字体等视觉信息
55
- - 如果使用图像/截图参考,先提取区块结构、视觉层级、主色和功能色、字体气质、间距节奏、媒体位置、交互状态暗示和响应式风险,再写代码。
56
- - 对多区块页面优先使用清晰的分区级参考图或局部细节图;不要从压缩长图里猜测按钮、字号、间距和组件状态。
57
- - 视觉参考中的不可读文字、假截图、不可检查素材或冲突状态不能直接照搬;需要转译成项目真实内容、真实状态或明确占位说明。
50
+ - Check layout structure
51
+ - Check spacing, fonts, colors, variables, states, icons and component hierarchy
52
+ - If MCP provides resource files or SVG/image sources, use them directly
53
+ - If MCP has provided real resources, do not create placeholder resources by yourself
54
+ - If the user provides screenshots instead of MCP data, infer visual information such as layout, color, font, etc. from the screenshots
55
+ - If using images/screenshots for reference, first extract block structure, visual hierarchy, main and functional colors, font temperament, spacing rhythm, media position, interaction status hints and responsive risks before writing code.
56
+ - Prioritize the use of clear section-level reference images or local detail images for multi-section pages; do not guess buttons, font sizes, spacing and component status from compressed long images.
57
+ - Unreadable text, fake screenshots, uninspectable materials or conflict status in visual references cannot be copied directly; they need to be translated into the real content, real status or clear placeholder description of the project.
58
58
 
59
- ### 3. 搜索可复用组件
59
+ ### 3. Search for reusable components
60
60
 
61
- 在创建新组件前先搜索代码库中的可复用组件,重点检查:
61
+ Before creating a new component, search the code base for reusable components, focusing on:
62
62
 
63
63
  - Button
64
64
  - Input / Select / Checkbox / Radio / Switch
65
65
  - Modal / Drawer / Dialog
66
66
  - Table / List / Card
67
67
  - Tabs / Breadcrumb / Pagination
68
- - 页面容器 / 区块容器 / 空状态 / Loading 状态
68
+ - Page Container/Block Container/Empty State/Loading State
69
69
 
70
- ### 4. 产出实现计划
70
+ ### 4. Output realization plan
71
71
 
72
- 在改文件前先产出一份简短实现计划,计划必须包含:
72
+ Before revising the document, produce a short implementation plan. The plan must include:
73
73
 
74
- - 需要改动的文件列表
75
- - 组件拆分方案
76
- - 状态 / 数据流
77
- - 响应式行为
78
- - 复用还是新建的决策
79
- - 设计缺口或歧义点
80
- - 图像/截图来源的可靠性,以及哪些视觉细节会被项目 token、组件约定或可访问性要求覆盖
74
+ - List of files that need to be changed
75
+ - Component splitting plan
76
+ - Status/data flow
77
+ - Responsive behavior
78
+ - The decision to reuse or create a new one
79
+ - Design gaps or points of ambiguity
80
+ - The authenticity of the source of the image/screenshot, and what visual details are covered by project tokens, component conventions, or accessibility requirements
81
81
 
82
- ### 5. 按框架实现
82
+ ### 5. Implementation by framework
83
83
 
84
- 按仓库当前使用的前端框架进行实现:
84
+ Implement according to the front-end framework currently used by the warehouse:
85
85
 
86
- - 严格遵循仓库现有约定
87
- - 优先使用明确类型的 props 和 interfaces/types
88
- - 保持组件小而可组合
89
- - 将重复逻辑提取为 hooks / composables / utilities
86
+ - Strictly follow the existing agreements in the warehouse
87
+ - Prefer explicitly typed props and interfaces/types
88
+ - Keep components small and composable
89
+ - Extract duplicate logic into hooks/composables/utilities
90
90
 
91
- ### 6. 设计 Token 映射
91
+ ### 6. Design Token Mapping
92
92
 
93
- - 优先使用现有 design token、CSS 变量、主题变量或工具类
94
- - 除非确实没有对应 Token,否则不要硬编码颜色、圆角和间距
95
- - 如果设计使用了新 Token,要明确指出,不要悄悄到处硬编码
93
+ - Prefer using existing design tokens, CSS variables, theme variables or tool classes
94
+ - Do not hardcode colors, rounded corners and spacing unless there is no corresponding token
95
+ - If the design uses a new Token, make it clear and don’t quietly hardcode it everywhere
96
96
 
97
- ### 7. 可访问性保障
97
+ ### 7. Accessibility guarantee
98
98
 
99
- - 优先使用语义化 HTML
100
- - 确保交互控件具有可访问名称
101
- - 保留可见的焦点样式
102
- - 检查对话框、菜单、标签页、表单控件的键盘可操作性
99
+ - Prioritize the use of semantic HTML
100
+ - Make sure interactive controls have accessible names
101
+ - Preserve visible focus styles
102
+ - Check the keyboard operability of dialog boxes, menus, tabs, and form controls
103
103
 
104
- ### 8. 编码后验证
104
+ ### 8. Verify after encoding
105
105
 
106
- - 如有 lint,执行 lint
107
- - 如有测试,执行测试
108
- - 如果缺少测试,说明建议补充的最小测试范围
106
+ - If there is lint, execute lint
107
+ - If there are tests, execute them
108
+ - If testing is missing, indicate the recommended minimum testing range
109
109
 
110
- ## 详细参考
110
+ ## Detailed reference
111
111
 
112
- 撰写实现计划报告时,加载 [references/design-plan-template.md](references/design-plan-template.md)。
112
+ When writing the implementation plan report, load [references/design-plan-template.md](references/design-plan-template.md).
113
113
 
114
114
  ## Constraints
115
115
 
116
- - 如果已有设计上下文(MCP 或截图),不要靠猜来实现 UI
117
- - 如果项目已有 UI 体系,不要再引入一套新的 UI Kit
118
- - 除非有合理理由,不要用硬编码替代已 Token 化的样式
119
- - 不要忽略 hover、active、disabled、loading、empty、error 等状态
120
- - 摹客等无 MCP 工具场景下,主动向用户索要关键截图和标注信息,不要凭空编造视觉数据
121
- - 不把生成图像当作可直接复制的代码规范;它只提供视觉证据,最终实现必须服从当前项目组件、token、可访问性和性能边界
122
- - 不用一张不可读整页图替代分区分析;关键区块、CTA、表单、导航和状态必须可检查
116
+ - If you already have a design context (MCP or screenshots), don’t rely on guesswork to implement the UI
117
+ - If the project already has a UI system, do not introduce a new UI Kit
118
+ - Do not replace tokenized styles with hard-coding unless there is a valid reason
119
+ - Don't ignore statuses such as hover, active, disabled, loading, empty, error, etc.
120
+ - In scenarios where MCP tools are not available, such as Mocke, proactively ask users for key screenshots and annotation information, and do not make up visual data out of thin air.
121
+ - Do not treat the generated image as a directly reproducible code specification; it only provides visual evidence, and the final implementation must obey the current project components, tokens, accessibility and performance boundaries
122
+ - Do not replace section analysis with an unreadable full-page image; key sections, CTAs, forms, navigation and status must be inspectable
123
123
 
124
124
  ## Expected Output
125
125
 
126
- - 设计实现计划报告保存为 `reports/design-plan-YYYY-MM-DD-HHmmss.md`,包含实现概要、组件拆分方案、状态/数据流、变更文件清单
127
- - 代码实现高保真还原设计稿,组件复用率最大化
128
- - 设计变量映射到现有 Token,无硬编码颜色/间距/圆角
129
- - 交互元素具备可访问名称和键盘支持,焦点样式可见
126
+ - The design implementation plan report is saved as `reports/design-plan-YYYY-MM-DD-HHmmss.md`, including implementation summary, component splitting plan, status/data flow, and change file list
127
+ - The code realizes high-fidelity restoration of the design draft, maximizing component reuse rate
128
+ - Design variables map to existing Tokens, no hard-coded colors/spacing/rounded corners
129
+ - Interactive elements have accessible names and keyboard support, and focus styles are visible
@@ -1,36 +1,36 @@
1
- # 设计实现计划模板
1
+ # Design implementation plan template
2
2
 
3
3
  ```markdown
4
- # 设计实现计划
4
+ # Design implementation plan
5
5
 
6
- > 生成时间: YYYY-MM-DD HH:mm
7
- > 评审工具: frontend-craft
8
- > 设计工具: Figma / Sketch / MasterGo / Pixso / 墨刀 / 摹客
6
+ > Generation time: YYYY-MM-DD HH:mm
7
+ > Review tool: frontend-craft
8
+ > Design tools: Figma / Sketch / MasterGo / Pixso / Ink Knife / Mockup
9
9
 
10
- ## 实现概要
11
- - 设计稿来源: ...
12
- - 目标页面/组件: ...
10
+ ## Implementation Summary
11
+ - Source of design draft: ...
12
+ - Target page/component: ...
13
13
 
14
- ## 复用的组件
14
+ ## Reused components
15
15
  - ...
16
16
 
17
- ## 新建的组件
17
+ ## New component
18
18
  - ...
19
19
 
20
- ## 组件拆分方案
20
+ ## Component splitting plan
21
21
  - ...
22
22
 
23
- ## 状态/数据流
23
+ ## Status/data flow
24
24
  - ...
25
25
 
26
- ## 与设计稿的偏差
26
+ ## Deviation from the design draft
27
27
  - ...
28
28
 
29
- ## 缺失的资源 / Token / 交互细节
29
+ ## Missing resources/Token/Interaction details
30
30
  - ...
31
31
 
32
- ## 变更文件清单
32
+ ## Change file list
33
33
  - ...
34
34
  ```
35
35
 
36
- 实现计划确定后,将报告保存到 `reports/design-plan-YYYY-MM-DD-HHmmss.md`,并告知用户报告路径。
36
+ After the implementation plan is determined, save the report to `reports/design-plan-YYYY-MM-DD-HHmmss.md` and inform the user of the report path.
@@ -1,46 +1,46 @@
1
1
  ---
2
2
  name: fec-legacy-to-modern-migration
3
- description: Use when planning or implementing an intentional migration from JavaScript, jQuery, HTML/CSS, server-rendered templates, MPA legacy frontend code, or older framework code toward a modern frontend stack while preserving behavior. Do not use for routine legacy bug fixes that stay in the old stack; Chinese triggers include 遗留项目, 技术栈升级, jQuery 迁移.
3
+ description: Use when planning or implementing an intentional migration from JavaScript, jQuery, HTML/CSS, server-rendered templates, MPA legacy frontend code, or older framework code toward a modern frontend stack while preserving behavior. Do not use for routine legacy bug fixes that stay in the old stack; Chinese triggers include legacy projects, technology stack upgrades, jQuery migration.
4
4
  ---
5
5
 
6
- # 传统前端到现代框架迁移
6
+ # Migration from traditional front-end to modern framework
7
7
 
8
- 适用于将 JavaScript + jQuery + HTML/CSS 多页面应用(MPA)、服务端模板渲染项目或旧框架代码,渐进迁移到 React、Vue、Next.js、Nuxt、TypeScript,或保留 MPA 形态但现代化模块、构建、类型和测试的场景。
8
+ Suitable for scenarios where you are gradually migrating JavaScript + jQuery + HTML/CSS multi-page applications (MPA), server-side template rendering projects, or legacy framework code to React, Vue, Next.js, Nuxt, TypeScript, or retaining MPA form but modernizing modules, builds, types, and tests.
9
9
 
10
10
  ## Purpose
11
11
 
12
- 指导传统前端项目渐进迁移到目标现代栈,提供迁移策略、概念映射、分阶段步骤和实施约束,确保功能等价和风险可控。
12
+ Guide the gradual migration of traditional front-end projects to the target modern stack, provide migration strategies, concept mapping, phased steps and implementation constraints to ensure functional equivalence and controllable risks.
13
13
 
14
14
  ## Procedure
15
15
 
16
- 1. 先识别目标栈、迁移边界和是否保留 MPA/服务端模板形态。
17
- 2. 加载 [references/migration-strategy-and-mapping.md](references/migration-strategy-and-mapping.md),选择渐进式或一次性重写策略,并明确遗留模式到目标栈的映射。
18
- 3. 加载 [references/migration-execution-checklist.md](references/migration-execution-checklist.md),完成存量盘点、依赖分析、优先级排序和分阶段迁移计划。
19
- 4. 撰写迁移分析或迁移计划报告时,加载 [references/migration-report-template.md](references/migration-report-template.md)。
20
- 5. 按准备、基础层、模块/页面迁移、收尾的顺序推进,每次迁移一个可验证单元。
21
- 6. 每个迁移单元验证功能等价、视觉一致、类型安全、可访问性、i18n、资源和样式边界。
16
+ 1. First identify the target stack, migration boundaries and whether to retain the MPA/server template form.
17
+ 2. Load [references/migration-strategy-and-mapping.md](references/migration-strategy-and-mapping.md), select a progressive or one-time rewrite strategy, and clarify the mapping of legacy patterns to the target stack.
18
+ 3. Load [references/migration-execution-checklist.md](references/migration-execution-checklist.md) to complete inventory inventory, dependency analysis, prioritization and phased migration plan.
19
+ 4. When writing a migration analysis or migration plan report, load [references/migration-report-template.md](references/migration-report-template.md).
20
+ 5. Advance in the order of preparation, base layer, module/page migration, and closing, migrating one verifiable unit at a time.
21
+ 6. Each migration unit verifies functional equivalence, visual consistency, type safety, accessibility, i18n, resource and style boundaries.
22
22
 
23
23
  ## Constraints
24
24
 
25
- - 迁移前必须先输出迁移分析报告,明确策略、优先级和风险。
26
- - 不要在一次迁移中同时改架构、改 UI、改接口。
27
- - 优先保证功能等价,再考虑优化和现代化。
28
- - 迁移过程中保持旧系统可运行,避免大爆炸式上线。
29
- - 遇到 jQuery 插件无现成替代时,可暂时用 iframe 或微前端方式嵌入,待后续替换。
30
- - 目标栈先识别 React/Vue/Next/Nuxt、现代 MPA 或局部现代化目标,不默认强制改成 SPA。
31
- - 图片使用原项目资源;图标体系优先沿用原项目或目标项目规范;内联 SVG 例外需有可访问性、组件化或维护理由。
32
- - 样式参考原项目效果但不照搬 CSS,优先使用目标项目样式体系;内联样式例外需局部、可解释。
33
- - 目标是视觉与交互一致、代码更简洁易维护,业务功能不得缺失。
34
- - 涉及页面、组件、路由、表单、弹窗、导航或关键用户流程的迁移,必须建立重构前后的行为清单,并使用 Playwright 或同等真实浏览器验证方式对关键路径做对比验证。
35
- - 对视觉敏感页面,应补充截图对比或人工截图验收;动态内容、动画、字体和环境差异需明确屏蔽、稳定化或说明。
36
- - 对纯逻辑、类型、构建或无 UI 的迁移,不强制 Playwright,应选择更贴近风险的验证层:type-check、unit test、component test、build 或 lint。
37
- - 验证目标不是像素级完全一致,而是确认业务功能无缺失、关键交互等价、主要视觉布局无非预期偏差,并且代码比旧实现更清晰、可维护。
25
+ - Before migration, a migration analysis report must be output to clarify strategies, priorities and risks.
26
+ - Do not change the architecture, UI, and interfaces at the same time in one migration.
27
+ - Prioritize functional equivalence before considering optimization and modernization.
28
+ - Keep the old system operational during the migration process to avoid a big bang rollout.
29
+ - When there is no ready replacement for the jQuery plug-in, you can temporarily embed it using iframe or micro-front-end and wait for subsequent replacement.
30
+ - The target stack first identifies React/Vue/Next/Nuxt, modern MPA or partial modernization targets, and does not force the change to SPA by default.
31
+ - Images use original project resources; the icon system prefers to use the original project or target project specifications; inline SVG exceptions must have accessibility, componentization or maintenance reasons.
32
+ - The style refers to the original project effect but does not copy CSS. The target project style system is preferred; inline style exceptions must be local and interpretable.
33
+ - The goal is to have consistent visuals and interactions, make the code simpler and easier to maintain, and business functions must not be missing.
34
+ - For migrations involving pages, components, routing, forms, pop-ups, navigation or key user processes, a list of behaviors before and after refactoring must be established, and the critical paths must be compared and verified using Playwright or an equivalent real browser verification method.
35
+ - For visually sensitive pages, screenshot comparison or manual screenshot acceptance should be supplemented; dynamic content, animation, fonts and environmental differences need to be clearly blocked, stabilized or explained.
36
+ - For pure logic, type, build or UI-less migrations, Playwright is not forced and a validation layer closer to risk should be chosen: type-check, unit test, component test, build or lint.
37
+ - The verification goal is not to be completely consistent at the pixel level, but to confirm that there are no missing business functions, key interactions are equivalent, there are no unexpected deviations in the main visual layout, and the code is clearer and maintainable than the old implementation.
38
38
 
39
39
  ## Expected Output
40
40
 
41
- - 迁移分析报告保存为 `reports/migration-plan-YYYY-MM-DD-HHmmss.md`,包含策略选择、存量盘点、依赖关系、分阶段步骤、风险与回滚方案。
42
- - 迁移后的业务功能与原项目完全等价,无功能缺失。
43
- - 视觉与交互与原项目一致,用户无感知差异。
44
- - 类型定义完整,无 `any` 滥用,API 调用统一且类型安全。
45
- - 图片使用原项目资源,样式进入目标项目样式体系,图标和内联样式例外有明确理由。
46
- - 新代码文案已 i18n,关键路径有测试覆盖。
41
+ - The migration analysis report is saved as `reports/migration-plan-YYYY-MM-DD-HHmmss.md`, including strategy selection, inventory inventory, dependencies, phased steps, risks and rollback plans.
42
+ - The migrated business functions are completely equivalent to those of the original project, with no missing functions.
43
+ - The visuals and interactions are consistent with the original project, and there is no perceived difference for users.
44
+ - Complete type definition, no `any` abuse, unified API calls and type safety.
45
+ - Images use original project resources, and styles enter the target project style system. Exceptions for icons and inline styles have clear reasons.
46
+ - The new code copy has been i18n, and the critical path is covered by tests.
@@ -1,110 +1,110 @@
1
- # 迁移执行与检查清单
1
+ # Migration execution and checklist
2
2
 
3
- ## 迁移前分析
3
+ ## Pre-migration analysis
4
4
 
5
- 在动手迁移前,必须完成以下分析并输出**迁移分析报告**:
5
+ Before starting the migration, the following analysis must be completed and a **migration analysis report** must be output:
6
6
 
7
- 1. **存量盘点**
8
- - 页面数量、功能模块数量
9
- - 依赖的 jQuery 插件及替代方案(如 DataTables → TanStack Table)
10
- - 现有 API 调用方式、是否有统一封装
11
- - 是否有服务端模板(JSP/Thymeleaf/EJS 等)需要保留、局部替换或改为纯前端渲染
12
- - 目标栈是 React/Vue/Next/Nuxt、现代 MPA,还是只做局部 TypeScript/构建/测试现代化
7
+ 1. **Inventory Count**
8
+ - Number of pages and number of functional modules
9
+ - Dependent jQuery plugins and alternatives (such as DataTables → TanStack Table)
10
+ - Existing API calling methods and whether there is unified encapsulation
11
+ - Are there any server-side templates (JSP/Thymeleaf/EJS, etc.) that need to be retained, partially replaced, or changed to pure front-end rendering?
12
+ - Is the target stack React/Vue/Next/Nuxt, modern MPA, or just partial TypeScript/build/test modernization?
13
13
 
14
- 2. **依赖关系**
15
- - 页面间共享的 JS/CSS 模块
16
- - 跨页面复用的业务逻辑
17
- - 与后端的接口契约(是否需调整)
14
+ 2. **Dependencies**
15
+ - JS/CSS modules shared between pages
16
+ - Business logic reused across pages
17
+ - Interface contract with the backend (whether it needs to be adjusted)
18
18
 
19
- 3. **迁移优先级**
20
- - 按业务价值、复杂度、耦合度排序
21
- - 优先迁移独立模块、低耦合页面
22
- - 识别可复用的工具函数、常量、类型定义
19
+ 3. **Migration Priority**
20
+ - Sort by business value, complexity, coupling degree
21
+ - Prioritize migrating independent modules and low-coupling pages
22
+ - Identify reusable utility functions, constants, and type definitions
23
23
 
24
- ## 分阶段迁移流程
24
+ ## Phased migration process
25
25
 
26
- ### 阶段 0:准备
26
+ ### Phase 0: Preparation
27
27
 
28
- - 搭建或识别目标项目骨架:React/Vue/Next/Nuxt、现代 MPA,或现有项目内的渐进式 TypeScript/构建入口
29
- - 配置 ESLint、Prettier、测试框架
30
- - 建立 `services/request.ts` 统一请求层,与现有 API 兼容
31
- - 将遗留项目中的 `utils`、`constants` 逐步迁移并补充类型
28
+ - Build or identify target project skeleton: React/Vue/Next/Nuxt, modern MPA, or progressive TypeScript/build entry within existing projects
29
+ - Configure ESLint, Prettier, and test framework
30
+ - Establish `services/request.ts` unified request layer, compatible with existing API
31
+ - Gradually migrate `utils` and `constants` in legacy projects and add types
32
32
 
33
- ### 阶段 1:基础层
33
+ ### Phase 1: Base Layer
34
34
 
35
- - 迁移并类型化 API 调用(`$.ajax` → `axios`/`fetch`)
36
- - 迁移工具函数(日期、格式化、校验等)
37
- - 迁移常量、枚举、类型定义
38
- - 建立目标导航/页面入口骨架;未迁移页面可继续走旧路由、重定向、iframe 或微前端嵌入
35
+ - Migrate and type API calls (`$.ajax` → `axios`/`fetch`)
36
+ - Migration tool functions (date, formatting, verification, etc.)
37
+ - Migrate constants, enumerations, and type definitions
38
+ - Establish target navigation/page entry skeleton; unmigrated pages can continue to use old routing, redirection, iframe or micro-front-end embedding
39
39
 
40
- ### 阶段 2:按模块/页面迁移
40
+ ### Phase 2: Migration by module/page
41
41
 
42
- - 每次迁移一个完整功能或页面
43
- - 从简单到复杂:静态页 → 列表页 → 表单页 → 复杂交互页
44
- - 迁移时提取可复用组件,遵循目标 React 或 Vue 项目的目录结构
45
- - 每完成一个模块,补充单元测试和 E2E 关键路径
42
+ - Migrate one complete feature or page at a time
43
+ - From simple to complex: static page → list page → form page → complex interactive page
44
+ - Extract reusable components during migration, following the directory structure of the target React or Vue project
45
+ - Supplementary unit testing and E2E critical path for each completed module
46
46
 
47
- ### 阶段 3:收尾
47
+ ### Phase 3: Closing
48
48
 
49
- - 按迁移策略移除或冻结旧代码入口;若保留 MPA,则收敛旧入口并完成现代化边界
50
- - 配置 404、错误边界、全局错误处理
51
- - 性能优化(懒加载、代码分割、缓存策略)
52
- - 文档更新、部署流程调整
49
+ - Remove or freeze old code entries according to the migration strategy; if MPA is retained, the old entries will be converged and the modernization boundary will be completed
50
+ - Configure 404, error boundaries, and global error handling
51
+ - Performance optimization (lazy loading, code splitting, caching strategy)
52
+ - Document updates and deployment process adjustments
53
53
 
54
- ## 重构实施要求
54
+ ## Refactoring implementation requirements
55
55
 
56
- 迁移时需遵循以下实施约束,确保视觉与交互一致、代码更简洁易维护。
56
+ The following implementation constraints need to be followed when migrating to ensure consistent vision and interaction, and the code is simpler and easier to maintain.
57
57
 
58
- ### 图片与图标
58
+ ### Pictures and Icons
59
59
 
60
- - 直接使用原项目的图片资源路径,不重新托管或替换
61
- - 可使用 SVG 图片(`<img src="*.svg" />` 或 CSS `background-image`);图标组件或可访问交互确需内联 SVG 时,应遵循目标项目图标规范并说明理由。
62
- - 若原项目使用了 iconfont 或 IcoMoon 图标,重构时优先继续使用,保持图标体系一致;替换为其他图标方案前需评估视觉一致性、包体和维护成本。
63
- - 图标优先使用原项目已有的图标文件(iconfont / IcoMoon / 已有 SVG),必要时可引入 SVG 文件作为独立资源
60
+ - Directly use the image resource path of the original project without rehosting or replacing it.
61
+ - SVG images (`<img src="*.svg" />` or CSS `background-image`) can be used; when icon components or accessible interactions require inline SVG, the target project icon specifications should be followed and the reasons should be explained.
62
+ - If the original project uses iconfont or IcoMoon icons, priority should be given to continuing to use them during reconstruction to keep the icon system consistent; visual consistency, packaging, and maintenance costs need to be evaluated before replacing with other icon schemes.
63
+ - For icons, priority is given to using existing icon files in the original project (iconfont / IcoMoon / existing SVG). If necessary, SVG files can be introduced as independent resources
64
64
 
65
- ### 国际化(i18n)
65
+ ### Internationalization (i18n)
66
66
 
67
- - 新栈代码(React / Vue 等)中的用户可见文案须走项目 i18n,不在新代码里硬编码中/英文案
68
- - 遗留 HTML/JS 中**不要新增**用户可见硬编码文案,除非纯静态且仓库尚无可用 i18n 接入点;改动文案前先查 locales 是否已有条目,并同步主要语言文件
69
- - key 按页面/模块/语义组织,复用既有 key;仅当旧 key 为对外契约时才做映射过渡,详见项目规则中的 **国际化 (i18n)**(`templates/shared/rules/fec-i18n.md` 内「遗留代码与迁移场景」)
67
+ - User-visible copy in the new stack code (React/Vue, etc.) must follow the project i18n, and do not hardcode Chinese/English copy in the new code
68
+ - **Do not add** user-visible hard-coded copy in legacy HTML/JS, unless it is purely static and the warehouse does not yet have an available i18n access point; before changing the copy, check whether locales already has an entry, and synchronize the main language files
69
+ - Keys are organized by page/module/semantics, and existing keys are reused; mapping transition is only done when the old key is an external contract. For details, see **Internationalization (i18n)** in the project rules ("Legacy Code and Migration Scenarios" in `templates/shared/rules/fec-i18n.md`)
70
70
 
71
- ### 样式
71
+ ### Style
72
72
 
73
- - 布局样式对齐原项目视觉效果,但**只参考原项目效果,不照搬其 CSS**
74
- - 优先使用 **flex 弹性布局**,避免 `float`、复杂 `position`、冗余嵌套
75
- - 避免不合理写法:如 `!important` 滥用、过深选择器、重复定义
76
- - 组件中优先避免内联样式(`style={{ ... }}` / `style="..."`);确需使用运行时动态值、第三方组件 API 或 CSS 变量桥接时,应保持局部、可解释,并优先放入目标项目样式体系。
73
+ - The layout style aligns with the visual effects of the original project, but **only refers to the original project effects and does not copy its CSS**
74
+ - Prioritize the use of **flex elastic layout** to avoid `float`, complex `position`, and redundant nesting
75
+ - Avoid unreasonable writing methods: such as `!important` abuse, excessively deep selectors, and repeated definitions
76
+ - Prioritize to avoid inline styles (`style={{ ... }}` / `style="..."`) in components; when it is necessary to use runtime dynamic values, third-party component APIs or CSS variable bridging, they should be kept local and interpretable and put into the target project style system first.
77
77
 
78
- ### 目标
78
+ ### Target
79
79
 
80
- - **视觉和交互**:与原项目一致,用户无感知差异
81
- - **代码质量**:更简洁、易维护,符合目标框架规范
82
- - **业务功能**:与原项目保持一致,**不得缺失功能**;迁移前后行为等价
80
+ - **Visual and interactive**: consistent with the original project, no perceived difference by users
81
+ - **Code Quality**: more concise, easier to maintain, and in line with the target framework specifications
82
+ - **Business functions**: consistent with the original project, **no missing functions**; behaviors before and after migration are equivalent
83
83
 
84
- ### 验证分层
84
+ ### Verification layering
85
85
 
86
- - 涉及页面、组件、路由、表单、弹窗、导航或关键用户流程的迁移,先建立重构前后的行为清单,再使用 Playwright 或同等真实浏览器验证方式对关键路径做对比验证。
87
- - 对视觉敏感页面,补充截图对比或人工截图验收;动态内容、动画、字体和环境差异需明确屏蔽、稳定化或说明。
88
- - 对纯逻辑、类型、构建或无 UI 的迁移,不强制 Playwright,应选择更贴近风险的验证层:type-check、unit test、component test、build 或 lint。
89
- - 验证目标不是像素级完全一致,而是确认业务功能无缺失、关键交互等价、主要视觉布局无非预期偏差,并且代码比旧实现更清晰、可维护。
86
+ - If it involves the migration of pages, components, routing, forms, pop-ups, navigation or key user processes, first establish a list of behaviors before and after refactoring, and then use Playwright or an equivalent real browser verification method to compare and verify the critical paths.
87
+ - For visually sensitive pages, supplement screenshot comparison or manual screenshot acceptance; dynamic content, animation, fonts and environmental differences need to be clearly blocked, stabilized or explained.
88
+ - For pure logic, type, build or UI-less migrations, Playwright is not forced and a validation layer closer to risk should be chosen: type-check, unit test, component test, build or lint.
89
+ - The verification goal is not to be completely consistent at the pixel level, but to confirm that there are no missing business functions, key interactions are equivalent, there are no unexpected deviations in the main visual layout, and the code is clearer and maintainable than the old implementation.
90
90
 
91
- ## 迁移检查清单
91
+ ## Migration Checklist
92
92
 
93
- 每个迁移单元完成后,确认:
93
+ After each migration unit is completed, confirm:
94
94
 
95
- - [ ] 已建立重构前后的行为清单,覆盖公共 API、路由、表单、权限、错误状态、缓存、埋点和关键交互
96
- - [ ] 业务逻辑与旧实现一致,无功能遗漏,功能完整等价
97
- - [ ] 涉及 UI、交互或关键流程的迁移已使用 Playwright 或同等真实浏览器验证方式完成关键路径对比
98
- - [ ] 视觉敏感页面已完成截图对比或人工截图验收,并说明动态内容、动画、字体和环境差异处理方式
99
- - [ ] 纯逻辑、类型、构建或无 UI 迁移已选择更贴近风险的验证层,不强制套用 Playwright
100
- - [ ] 类型定义完整,无 `any` 滥用
101
- - [ ] API 调用使用统一 request 层,错误处理完整
102
- - [ ] 表单校验、loading、空状态、错误状态已实现
103
- - [ ] 可访问性:表单有 label、交互可键盘操作
104
- - [ ] 无 XSS 风险(用户输入已转义或使用安全 API)
105
- - [ ] 关键路径有测试覆盖
106
- - [ ] 符合目标栈的项目规范(React / Vue / Next / Nuxt / MPA 现代化等)
107
- - [ ] 图片使用原项目资源;图标体系优先沿用原项目或目标项目规范,例外已说明
108
- - [ ] 样式参考原项目效果但不照搬 CSS,优先使用目标项目样式体系,内联样式例外已说明
109
- - [ ] 视觉与交互与原项目一致,代码更简洁易维护
110
- - [ ] 新代码路径文案已 i18n;遗留层未扩大硬编码;locales 检索与多语言同步已完成(参见 i18n 规则迁移补充清单)
95
+ - [ ] A behavioral list before and after refactoring has been established, covering public APIs, routing, forms, permissions, error status, cache, hidden points and key interactions
96
+ - [ ] The business logic is consistent with the old implementation, no functions are missing, and the functions are completely equivalent.
97
+ - [ ] Migration involving UI, interaction or critical processes has completed critical path comparison using Playwright or equivalent real browser verification
98
+ - [ ] For visually sensitive pages, screenshot comparison or manual screenshot acceptance has been completed, and the method of handling differences in dynamic content, animation, fonts and environment has been explained.
99
+ - [ ] Pure logic, type, build or no UI migrations have selected a validation layer that is closer to the risk and do not force the application of Playwright
100
+ - [ ] Type definition is complete, no `any` abuse
101
+ - [ ] API calls use a unified request layer, with complete error handling
102
+ - [ ] Form verification, loading, empty state, and error state have been implemented
103
+ - [ ] Accessibility: The form has a label and can be interacted with via the keyboard.
104
+ - [ ] No XSS risk (user input is escaped or secure API is used)
105
+ - [ ] Critical path has test coverage
106
+ - [ ] Comply with the project specifications of the target stack (React / Vue / Next / Nuxt / MPA modernization, etc.)
107
+ - [ ] Pictures use original project resources; icon systems give priority to the original project or target project specifications, exceptions have been explained
108
+ - [ ] The style refers to the original project effect but does not copy the CSS. The target project style system is used first. The inline style exception has been explained.
109
+ - [ ] The visual and interaction are consistent with the original project, and the code is simpler and easier to maintain.
110
+ - [ ] The new code path copy has been i18n; the legacy layer has not been expanded and hardcoded; locales retrieval and multi-language synchronization have been completed (see i18n rule migration supplementary list)