@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,8 +1,8 @@
1
- # Git 提交规范
1
+ # Git commit specifications
2
2
 
3
- 凡是创建 commit、编写 commit message 或准备提交代码时,都应用本文件。
3
+ This file should be used whenever creating a commit, writing a commit message, or preparing to submit code.
4
4
 
5
- ## Conventional Commits 格式
5
+ ## Conventional Commits Format
6
6
 
7
7
  ```
8
8
  <type>(<scope>): <subject>
@@ -12,62 +12,62 @@
12
12
  [footer]
13
13
  ```
14
14
 
15
- ### type 取值
15
+ ### type value
16
16
 
17
- | type | 用途 |
17
+ | type | purpose |
18
18
  |------|------|
19
- | `feat` | 新功能 |
20
- | `fix` | 修复 bug |
21
- | `refactor` | 重构(不改变行为) |
22
- | `style` | 代码格式调整(不影响逻辑) |
23
- | `docs` | 文档变更 |
24
- | `test` | 测试相关 |
25
- | `chore` | 构建、工具、依赖等杂项 |
26
- | `perf` | 性能优化 |
27
- | `ci` | CI/CD 配置变更 |
19
+ | `feat` | New features |
20
+ | `fix` | Fix bug |
21
+ | `refactor` | Refactor (does not change behavior) |
22
+ | `style` | Code format adjustment (does not affect logic) |
23
+ | `docs` | Documentation changes |
24
+ | `test` | Test related |
25
+ | `chore` | Build, tools, dependencies and other miscellaneous items |
26
+ | `perf` | Performance optimization |
27
+ | `ci` | CI/CD configuration changes |
28
28
 
29
29
  ### scope
30
30
 
31
- 可选,标明影响范围,如模块名、组件名或功能域:
31
+ Optional, indicate the scope of influence, such as module name, component name or functional domain:
32
32
 
33
- - `feat(auth): 新增手机号登录`
34
- - `fix(table): 修复排序列未高亮`
35
- - `refactor(api): 统一请求错误处理`
33
+ - `feat(auth): add new mobile phone number to log in`
34
+ - `fix(table): Fix sorting column not highlighted`
35
+ - `refactor(api): unified request error handling`
36
36
 
37
- ### subject 规范
37
+ ### subject specification
38
38
 
39
- - 使用祈使句("增加 xxx" 而非 "增加了 xxx")
40
- - 不超过 72 个字符
41
- - 不以句号结尾
42
- - 如果影响范围较大,在 body 中详细说明
39
+ - Use imperative sentences ("increased xxx" instead of "increased xxx")
40
+ - No more than 72 characters
41
+ - does not end with a period
42
+ - If the scope of impact is large, describe it in detail in the body
43
43
 
44
- ## 分支命名
44
+ ## Branch naming
45
45
 
46
- - `feature/xxx` — 新功能
47
- - `fix/xxx` — 修复
48
- - `refactor/xxx` — 重构
49
- - `hotfix/xxx` — 紧急修复
46
+ - `feature/xxx` — new features
47
+ - `fix/xxx` — fix
48
+ - `refactor/xxx` — Refactor
49
+ - `hotfix/xxx` — emergency fix
50
50
 
51
- ## 提交前检查
51
+ ## Check before submission
52
52
 
53
- 提交前必须通过:
53
+ Must pass before submission:
54
54
 
55
55
  1. lint
56
56
  2. type-check
57
- 3. 与变更相关的测试
57
+ 3. Testing related to changes
58
58
 
59
- 未经用户确认不要直接执行 `git commit`。
59
+ Do not execute `git commit` directly without user confirmation.
60
60
 
61
- ## 提交粒度
61
+ ## Submission granularity
62
62
 
63
- - 一个提交只包含一个清晰目的:功能、修复、测试、文档或清理。
64
- - 大型计划应拆成可验证的小批次,每批都有说明和命令结果。
65
- - 清理、格式化和行为变更不要混在同一提交中。
66
- - 推送或发 PR 前先复查 diff,确认没有本地配置、密钥、临时报告或调试输出。
63
+ - A commit only has one clear purpose: feature, fix, test, documentation or cleanup.
64
+ - Large programs should be broken into verifiable smaller batches, each with instructions and command results.
65
+ - Don't mix cleanup, formatting, and behavior changes in the same commit.
66
+ - Review the diff before pushing or sending a PR to make sure there are no local configurations, keys, temporary reports or debug output.
67
67
 
68
- ## 反模式
68
+ ## Anti-pattern
69
69
 
70
- - 一个 commit 混合不相关的改动
71
- - commit message 过于笼统(如 "update"、"fix bug"、"wip")
72
- - 在 commit 中包含调试代码、console.log 或临时 hack
73
- - 未说明验证命令或已知剩余风险就提交高风险改动
70
+ - A commit that mixes unrelated changes
71
+ - The commit message is too general (such as "update", "fix bug", "wip")
72
+ - Include debug code, console.log, or temporary hacks in commits
73
+ - Commit high-risk changes without specifying verification commands or knowing the remaining risk
@@ -1,112 +1,64 @@
1
- # 国际化 (i18n) 规则
1
+ # Internationalization (i18n) rules
2
2
 
3
- 凡是涉及用户可见文案、提示信息、表单标签、错误消息或 UI 文本时,都应用本文件。
3
+ This document applies whenever it involves user-visible copy, tooltips, form labels, error messages, or UI text. Please modify the locales path, library and key prefix according to the actual i18n solution of the project.
4
4
 
5
- <!-- 请根据项目实际 i18n 方案修改 locales 路径、库与 key 前缀 -->
5
+ ## Scope of application
6
6
 
7
- ## 适用范围
7
+ - **Modern stack (React/Vue/Next/Nuxt, etc.)**: New or modified user-visible copy must follow the project i18n solution.
8
+ - **Legacy HTML/JS, progressive migration or coexistence of old and new**: The new code path must still meet the core principles; the legacy layer adheres to migration constraints to avoid expanding hard coding and confusing keys.
8
9
 
9
- - **现代栈(纯 React / Vue 等)**:以下「核心原则」「文案规范」「实现指导」与通用检查清单优先适用。
10
- - **遗留 HTML/JS、渐进迁移或新旧并存**:新代码路径仍须满足核心原则;遗留层额外遵守「遗留代码与迁移场景」,避免扩大硬编码与混乱 key。
10
+ `src/locales/` is used below to refer to the actual copywriting resource directory of the project. Please replace it according to the warehouse convention.
11
11
 
12
- 下文用 **`src/locales/`** 指代项目实际文案资源目录,请按仓库约定替换(如 `public/locales`、`lang/`、`messages/` 等)。
12
+ ## Core Principles
13
13
 
14
- ## 核心原则
14
+ - User-visible copy in new application code must use i18n, and hardcoding Chinese or English strings is prohibited.
15
+ - i18n keys are organized by modules and named with dots, such as `order.list.empty`.
16
+ - Copies with the same semantics reuse the same key to avoid repeated definitions.
17
+ - Variables, plurals, dates, numbers and currencies are formatted using i18n capabilities without string concatenation.
18
+ - Search existing resources before modifying the copy, and give priority to reusing accurate keys.
15
19
 
16
- - 在新应用代码(组件、路由页、hooks、composables)中,用户可见文案须使用 i18n,**禁止**硬编码中文或英文字符串
17
- - i18n key 按模块组织,使用点分命名:`module.component.label`
18
- - 相同语义的文案复用同一个 key,避免重复定义
20
+ ## Copywriting and resource specifications
19
21
 
20
- ## 文案规范
22
+ - `common.*` is used for cross-module common copywriting, such as confirm, cancel, submit, and loading.
23
+ - `module.component.*` is used for module-level copy.
24
+ - `validation.*` is used for form validation prompts.
25
+ - `error.*` for error messages.
26
+ - Each natural language corresponds to an independent resource file, and multiple languages are prohibited from being mixed in the same file or the same top-level multi-language object.
27
+ - Copywriting files must be saved in UTF-8; when the team has an agreement, priority will be given to UTF-8 without BOM to avoid garbled non-ASCII copywriting in Chinese, Japanese and other languages.
28
+ - When adding a key, the main language files that should be covered by the current function are updated simultaneously; if a language is temporarily missing, the gap must be explicitly recorded.
21
29
 
22
- ### 命名约定
30
+ ## Legacy code and migration scenarios
23
31
 
24
- ```
25
- common.confirm → 通用确认
26
- common.cancel → 通用取消
27
- user.login.title → 用户登录标题
28
- order.list.empty → 订单列表空状态
29
- ```
32
+ - No new user-visible hardcoding is added in legacy HTML or JS, unless the segment is purely static and the repository does not yet have access to the i18n path.
33
+ - When new code paths such as React/Vue add prompts, errors, buttons, and form labels, i18n must be used.
34
+ - When adding new sub-applications or modules, they should be consistent with the existing language file structure, namespace and lazy loading strategy.
35
+ - Keys are organized by page, module and semantics to avoid continuing to use historical abbreviations or meaningless segments.
36
+ - If the old key is only "usable but inaccurate", priority will be given to renaming the key and rewriting the translation, and parallel compatibility will not be maintained for a long time.
37
+ - Only introduce mapping layer or alias transition when the old key has become an external contract (fixed reference in backend, buried points, external documents, third-party integration, etc.).
30
38
 
31
- ### 分类
39
+ ## Implement constraints
32
40
 
33
- - `common.*` — 跨模块通用文案(确认、取消、提交、加载中等)
34
- - `module.component.*` — 模块级文案
35
- - `validation.*` — 表单校验提示
36
- - `error.*` — 错误信息
41
+ - The specific calling methods of Vue, React, Next, and Nuxt are subject to the existing i18n library of the project, such as `vue-i18n`, `react-intl`, `react-i18next` or the framework's built-in solution.
42
+ - Do not directly write user-visible hard coding in components; tests can assert through key or final copywriting, but should avoid over-coupling with translation details.
43
+ - When lazily loading language packs, loading, fallback, and missing key behaviors must be predictable.
44
+ - Error, form, and empty state copy should express the user’s next step, not just translate technical errors.
37
45
 
38
- ### 语言文件
46
+ ## Checklist
39
47
 
40
- - **每种自然语言对应独立资源文件**(命名依项目约定,如 `en.json` 与 `zh-CN.json`,或 `en.ts` / `zh-CN.ts`),置于 `src/locales/`(或项目约定目录)下;**禁止**将多种语言的译文混写在同一文件或同一顶层多语言对象内,以免难以 diff、评审与按需加载。若仓库历史结构暂为混排,新增语言或新模块仍应优先采用分文件约定。
41
- - **编码**:文案文件须以 **UTF-8** 保存(团队有约定时优先 **UTF-8 无 BOM**),确保在 IDE 中打开时中文、日文等非 ASCII 字符**不出现乱码**;禁止用系统默认 ANSI、GBK 等与 UTF-8 混用导致编码误判。若仓库已有 `.editorconfig`,与其中 `charset = utf-8` 等声明保持一致。
48
+ - [ ] All newly added user-visible copy uses i18n key.
49
+ - [ ] The new key has been added to all language files that should be covered, and each language is maintained in separate files.
50
+ - [ ] The language resource file is UTF-8, and there will be no garbled characters when opened.
51
+ - [ ] key naming conforms to module, component, and usage conventions, and reuses existing semantics.
52
+ - [ ] Interpolation, complex numbers, dates, numbers, currencies are formatted using i18n.
53
+ - [ ] User-visible hardcoding not expanded in migration or hybrid stacks.
54
+ - [ ] The new code does not break existing namespaces, loading methods, and sub-app boundaries.
42
55
 
43
- ## 遗留代码与迁移场景
56
+ ## Anti-pattern
44
57
 
45
- 在渐进式迁移、微前端或新旧代码并存时:
46
-
47
- - **遗留层**:不在 legacy HTML 或 JS 中**新写**用户可见的中/英文硬编码,除非该段为纯静态展示且仓库**尚未**建立可接入的国际化路径(避免扩大技术债)。
48
- - **新代码路径**:React / Vue 等侧新增、修改的提示、错误、按钮、表单标签等,须走 i18n;新增子应用或模块时,须与现有语言文件结构、命名空间、懒加载策略一致,**不破坏**既有语言策略。
49
- - **复用优先**:同一语义优先复用已有 key 或已有资源项,避免同一含义多份翻译。
50
- - **多语言同步**:新增或修改条目后,至少核对当前功能已覆盖的**主要语言文件**是否一并更新。
51
- - **改动前检索**:改提示、错误、按钮、表单标签前,先在 `src/locales/`(或项目约定目录)中搜索是否已有对应文案。
52
- - **Key 与文案治理**:
53
- - key 按**页面 / 模块 / 语义**组织,避免继续沿用历史缩写或无意义分段。
54
- - 先按当前界面真实含义定 key,再写各语言译文。
55
- - 旧文案若仅「能用但不准」,优先**重命名 key 并重写译文**,不为劣质命名长期保留并行兼容。
56
- - 仅当某旧 key 已成为**对外契约**(后端、埋点、外部文档、第三方集成等固定引用)时,才引入映射层或别名过渡;否则不把历史包袱复制进新结构。
57
-
58
- ## 实现指导
59
-
60
- ### Vue(vue-i18n)
61
-
62
- ```vue
63
- <template>
64
- <!-- 正确 -->
65
- <span>{{ $t('order.status.pending') }}</span>
66
- <!-- 错误:硬编码 -->
67
- <span>待处理</span>
68
- </template>
69
- ```
70
-
71
- ### React(react-intl / react-i18next)
72
-
73
- ```tsx
74
- // 正确
75
- <FormattedMessage id="order.status.pending" />
76
- // 或
77
- const { t } = useTranslation();
78
- <span>{t('order.status.pending')}</span>
79
-
80
- // 错误:硬编码
81
- <span>待处理</span>
82
- ```
83
-
84
- ## 检查清单
85
-
86
- ### 通用
87
-
88
- - [ ] 所有新增用户可见文案使用 i18n key(新代码路径)
89
- - [ ] 新增 key 已添加到所有**应覆盖**的语言文件,且各语言仍分文件维护(未混写)
90
- - [ ] 语言资源文件为 UTF-8(无 BOM 或按仓库约定),在 IDE 中打开无乱码
91
- - [ ] key 命名符合模块.组件.用途 的约定
92
- - [ ] 包含变量的文案使用插值而非拼接
93
- - [ ] 复数形式使用 i18n 复数规则而非条件判断
94
- - [ ] 日期、数字、货币使用 i18n 格式化
95
-
96
- ### 迁移或混合栈时补充
97
-
98
- - [ ] 已检索 `src/locales/`(或项目约定目录)中是否已有可复用文案
99
- - [ ] 相关语言文件已同步更新
100
- - [ ] 未在可国际化路径上新增用户可见硬编码(遗留静态例外见「遗留代码与迁移场景」)
101
- - [ ] 新代码未破坏现有语言策略(命名空间、加载方式、子应用边界)
102
-
103
- ## 反模式
104
-
105
- - 在模板或 JSX 中直接写中文字符串(新代码路径)
106
- - 使用字符串拼接代替 i18n 插值(`"共" + count + "条"` → `t('common.total', { count })`)
107
- - 在 JS/TS 逻辑中硬编码提示信息(新代码路径)
108
- - 不同模块为相同含义的文案创建不同的 key
109
- - 多种语言混在同一资源文件或同一顶层对象内,导致 diff、评审与按需加载困难
110
- - 用非 UTF-8 或错误编码保存文案文件,在 IDE / CI / 协作环境下出现乱码
111
- - 为迁就历史缩写或劣质命名长期保留多套并行 key,而不做治理
112
- - 在非契约场景下继续沿用无意义旧 key,把混乱结构复制到新模块
58
+ - Write user-visible Chinese or English strings directly in templates or JSX.
59
+ - Use string concatenation instead of i18n interpolation.
60
+ - Hardcode toast, error or confirmation text in JS/TS logic.
61
+ - Different modules create different keys for the same meaning.
62
+ - Mixing multiple languages makes diffing, reviewing and on-demand loading difficult.
63
+ - Save copy files in non-UTF-8 or incorrect encoding.
64
+ - Long-term retention of multiple sets of parallel keys to accommodate historical abbreviations or poor naming.
@@ -1,33 +1,33 @@
1
- # 命名规范
1
+ # Naming convention
2
2
 
3
- ## 文件与目录命名
3
+ ## File and directory naming
4
4
 
5
- | 类型 | 命名风格 | 示例 |
5
+ | Type | Naming Style | Example |
6
6
  |------|----------|------|
7
- | 页面组件 | PascalCase + `Page` 后缀 | `UserDetailPage.tsx` / `UserDetailPage.vue` |
8
- | 布局组件 | PascalCase + `Layout` 后缀 | `MainLayout.tsx` / `MainLayout.vue` |
9
- | 通用组件 | PascalCase | `DataTable.tsx` / `AppButton.vue` |
10
- | Hooks / Composables | camelCase + `use` 前缀 | `useAuth.ts`、`useDebounce.ts` |
11
- | Store 文件 | camelCase + `Store` 后缀 | `authStore.ts`、`uiStore.ts` |
12
- | API 文件 | camelCase | `api.ts` 或按领域命名 `userApi.ts` |
13
- | 工具函数 | camelCase | `format.ts`、`validators.ts` |
14
- | 类型文件 | camelCase | `types.ts`、`models.ts` |
15
- | 常量文件 | camelCase | `constants.ts`、`config.ts` |
16
- | 测试文件 | 与源文件同名 + `.spec` / `.test` | `Button.spec.tsx`、`useAuth.spec.ts` |
17
- | 样式文件 | 组件名 + `.styles` + 扩展名 | `Button.styles.css`、`DataTable.styles.scss`;使用 styled-components 时为 `ComponentName.styles.ts` |
18
- | 语言包 | 语言代码(BCP 47) | `zh-CN.json`、`en-US.json` |
19
- | 目录名 | PascalCase(组件/页面)或 kebab-case(功能模块) | `UserDetail/`、`auth/`、`order/` |
20
-
21
- ## 组件命名
7
+ | Page component | PascalCase + `Page` suffix | `UserDetailPage.tsx` / `UserDetailPage.vue` |
8
+ | Layout component | PascalCase + `Layout` suffix | `MainLayout.tsx` / `MainLayout.vue` |
9
+ | Common components | PascalCase | `DataTable.tsx` / `AppButton.vue` |
10
+ | Hooks / Composables | camelCase + `use` prefix | `useAuth.ts`, `useDebounce.ts` |
11
+ | Store file | camelCase + `Store` suffix | `authStore.ts`, `uiStore.ts` |
12
+ | API documentation | camelCase | `api.ts` or by domain `userApi.ts` |
13
+ | Utility functions | camelCase | `format.ts`, `validators.ts` |
14
+ | Type files | camelCase | `types.ts`, `models.ts` |
15
+ | Constant files | camelCase | `constants.ts`, `config.ts` |
16
+ | Test file | Same name as source file + `.spec` / `.test` | `Button.spec.tsx`, `useAuth.spec.ts` |
17
+ | Style file | Component name + `.styles` + extension | `Button.styles.css`, `DataTable.styles.scss`; `ComponentName.styles.ts` when using styled-components |
18
+ | Language pack | Language code (BCP 47) | `zh-CN.json`, `en-US.json` |
19
+ | Directory name | PascalCase (component/page) or kebab-case (function module) | `UserDetail/`, `auth/`, `order/` |
20
+
21
+ ## Component naming
22
22
 
23
23
  ### React
24
24
 
25
25
  ```tsx
26
- // 文件名与组件名一致
26
+ //The file name is consistent with the component name
27
27
  // src/components/DataTable/DataTable.tsx
28
28
  export function DataTable({ data, columns }: DataTableProps) { ... }
29
29
 
30
- // 页面组件加 Page 后缀
30
+ //Add Page suffix to page component
31
31
  // src/pages/UserDetail/UserDetailPage.tsx
32
32
  export default function UserDetailPage() { ... }
33
33
  ```
@@ -35,86 +35,86 @@ export default function UserDetailPage() { ... }
35
35
  ### Vue
36
36
 
37
37
  ```vue
38
- <!-- 文件名与组件名一致 -->
38
+ <!-- The file name is consistent with the component name -->
39
39
  <!-- src/components/AppButton/AppButton.vue -->
40
40
  <script setup lang="ts">
41
- // 无需 defineOptions,文件名即组件名
41
+ // No need for defineOptions, the file name is the component name
42
42
  </script>
43
43
  ```
44
44
 
45
- - 多词组件名(避免与 HTML 原生标签冲突)
46
- - Vue 全局组件推荐使用 `App` 前缀(`AppButton`、`AppModal`)
47
- - 模板中使用 PascalCase 引用:`<AppButton>` 而非 `<app-button>`
45
+ - Multi-word component names (to avoid conflicts with HTML native tags)
46
+ - Vue global components are recommended to use the `App` prefix (`AppButton`, `AppModal`)
47
+ - Use PascalCase reference in template: `<AppButton>` instead of `<app-button>`
48
48
 
49
- ## 变量与函数命名
49
+ ## Variable and function naming
50
50
 
51
- | 类型 | 命名风格 | 示例 |
51
+ | Type | Naming Style | Example |
52
52
  |------|----------|------|
53
- | 普通变量 | camelCase | `userName`、`isLoading`、`pageSize` |
54
- | 常量 | UPPER_SNAKE_CASE | `MAX_RETRY_COUNT`、`DEFAULT_PAGE_SIZE` |
55
- | 布尔值 | `is` / `has` / `should` / `can` 前缀 | `isVisible`、`hasPermission`、`canEdit` |
56
- | 事件处理(组件内) | `handle` 前缀 | `handleClick`、`handleSubmit` |
57
- | 回调 Props | `on` 前缀 | `onClick`、`onSubmit`、`onChange` |
58
- | 数组 | 复数名词 | `users`、`orderItems`、`selectedIds` |
59
- | Map / Record | `xxxMap` 或 `xxxByYyy` | `userMap`、`permissionsById` |
60
- | Ref (Vue) | 不加 `Ref` 后缀 | `count`(不用 `countRef`) |
61
- | 接口 | PascalCase,不加 `I` 前缀 | `UserProfile`(不用 `IUserProfile`) |
62
- | Props 接口 | 组件名 + `Props` | `DataTableProps`、`UserFormProps` |
63
- | Emits 接口 | 组件名 + `Emits` | `UserFormEmits` |
64
- | 枚举 | PascalCase,成员用 PascalCase | `OrderStatus.Pending` |
65
- | 泛型参数 | 单字母大写或语义化 | `T`、`TData`、`TItem` |
66
-
67
- ## CSS 类命名
68
-
69
- - 与项目约定保持一致(BEM / CSS Modules / Tailwind / Atomic CSS)
70
- - 如果使用 CSS Modules,类名用 camelCase:`.headerTitle`、`.cardBody`
71
- - 如果使用 BEM,遵循 `block__element--modifier` 格式
72
- - CSS 变量使用 kebab-case:`--color-primary`、`--spacing-md`
73
-
74
- ## 路由命名
75
-
76
- | 类型 | 命名风格 | 示例 |
53
+ | Ordinary variables | camelCase | `userName`, `isLoading`, `pageSize` |
54
+ | Constants | UPPER_SNAKE_CASE | `MAX_RETRY_COUNT`, `DEFAULT_PAGE_SIZE` |
55
+ | Boolean value | `is` / `has` / `should` / `can` prefix | `isVisible`, `hasPermission`, `canEdit` |
56
+ | Event handling (inside component) | `handle` prefix | `handleClick`, `handleSubmit` |
57
+ | Callback Props | `on` prefix | `onClick`, `onSubmit`, `onChange` |
58
+ | Array | Plural noun | `users`, `orderItems`, `selectedIds` |
59
+ | Map / Record | `xxxMap` or `xxxByYyy` | `userMap`, `permissionsById` |
60
+ | Ref (Vue) | Without `Ref` suffix | `count` (without `countRef`) |
61
+ | Interface | PascalCase, without `I` prefix | `UserProfile` (without `IUserProfile`) |
62
+ | Props interface | component name + `Props` | `DataTableProps`, `UserFormProps` |
63
+ | Emits interface | component name + `Emits` | `UserFormEmits` |
64
+ | Enum | PascalCase, members use PascalCase | `OrderStatus.Pending` |
65
+ | Generic parameters | Single letter capitalization or semantic | `T`, `TData`, `TItem` |
66
+
67
+ ## CSS class naming
68
+
69
+ - Aligned with project conventions (BEM/CSS Modules/Tailwind/Atomic CSS)
70
+ - If using CSS Modules, use camelCase for class names: `.headerTitle`, `.cardBody`
71
+ - If using BEM, follow the `block__element--modifier` format
72
+ - CSS variables use kebab-case: `--color-primary`, `--spacing-md`
73
+
74
+ ## Route naming
75
+
76
+ | Type | Naming Style | Example |
77
77
  |------|----------|------|
78
- | 路由路径 | kebab-case | `/user-detail`、`/order-list` |
79
- | 路由名称 | PascalCase | `UserDetail`、`OrderList` |
80
- | 路由参数 | camelCase | `:userId`、`:orderId` |
81
- | 查询参数 | camelCase | `?pageSize=10&sortBy=name` |
82
- | 路径常量 | UPPER_SNAKE_CASE | `ROUTE_USER_DETAIL = '/user-detail'` |
78
+ | routing path | kebab-case | `/user-detail`, `/order-list` |
79
+ | Route name | PascalCase | `UserDetail`, `OrderList` |
80
+ | Routing parameters | camelCase | `:userId`, `:orderId` |
81
+ | Query parameters | camelCase | `?pageSize=10&sortBy=name` |
82
+ | Path constants | UPPER_SNAKE_CASE | `ROUTE_USER_DETAIL = '/user-detail'` |
83
83
 
84
- ## API 命名
84
+ ## API naming
85
85
 
86
- | 类型 | 命名风格 | 示例 |
86
+ | Type | Naming Style | Example |
87
87
  |------|----------|------|
88
- | GET 列表 | `getXxxList` | `getUserList(params)` |
89
- | GET 单条 | `getXxxDetail` / `getXxxById` | `getUserDetail(id)` |
90
- | POST 创建 | `createXxx` | `createOrder(data)` |
91
- | PUT 更新 | `updateXxx` | `updateUser(id, data)` |
92
- | DELETE 删除 | `deleteXxx` | `deleteOrder(id)` |
93
- | DTO 类型 | 动词 + 名词 + `DTO` | `CreateOrderDTO`、`UpdateUserDTO` |
94
- | 响应类型 | 名词 | `User`、`Order`、`PageResult<User>` |
95
-
96
- ## i18n Key 命名
97
-
98
- - 使用点分命名空间:`module.section.label`
99
- - 示例:`user.form.username`、`common.button.submit`、`error.network.timeout`
100
- - 不使用中文 / 拼音作为 key
101
-
102
- ## 反模式
103
-
104
- - 文件名和组件名不一致(`user-table.tsx` 导出 `DataGrid`)
105
- - 同一项目混用多种命名风格(有的 kebab-case 有的 PascalCase)
106
- - 使用缩写或不明确的名称(`btn`、`usr`、`tmp`、`handleA`)
107
- - 布尔值没有语义前缀(`visible` → 应为 `isVisible`)
108
- - 常量不用大写(`maxRetry` → 应为 `MAX_RETRY`)
109
- - CSS 变量硬编码在组件中而非使用统一变量
110
-
111
- ## 检查清单
112
-
113
- - [ ] 文件名与导出的组件/函数名一致
114
- - [ ] 页面组件有 `Page` 后缀,布局组件有 `Layout` 后缀
115
- - [ ] 布尔变量使用 `is` / `has` / `can` / `should` 前缀
116
- - [ ] 事件处理用 `handle` 前缀,回调 Props 用 `on` 前缀
117
- - [ ] 常量使用 UPPER_SNAKE_CASE
118
- - [ ] 路由路径使用 kebab-case,路由名使用 PascalCase
119
- - [ ] API 函数命名与 HTTP 方法语义一致
120
- - [ ] i18n key 使用点分命名空间,无硬编码文案
88
+ | GET list | `getXxxList` | `getUserList(params)` |
89
+ | GET single item | `getXxxDetail` / `getXxxById` | `getUserDetail(id)` |
90
+ | POST Create | `createXxx` | `createOrder(data)` |
91
+ | PUT update | `updateXxx` | `updateUser(id, data)` |
92
+ | DELETE delete | `deleteXxx` | `deleteOrder(id)` |
93
+ | DTO type | Verb + Noun + `DTO` | `CreateOrderDTO`, `UpdateUserDTO` |
94
+ | Response type | Noun | `User`, `Order`, `PageResult<User>` |
95
+
96
+ ## i18n Key naming
97
+
98
+ - Use dotted namespace: `module.section.label`
99
+ - Examples: `user.form.username`, `common.button.submit`, `error.network.timeout`
100
+ - Do not use Chinese/Pinyin as key
101
+
102
+ ## Anti-pattern
103
+
104
+ - File name and component name are inconsistent (`user-table.tsx` exports `DataGrid`)
105
+ - Mixing multiple naming styles (some kebab-case, some PascalCase) in the same project
106
+ - Use abbreviated or ambiguous names (`btn`, `usr`, `tmp`, `handleA`)
107
+ - Boolean values have no semantic prefix (`visible` → should be `isVisible`)
108
+ - Constants do not need to be capitalized (`maxRetry` → should be `MAX_RETRY`)
109
+ - CSS variables are hardcoded in components instead of using uniform variables
110
+
111
+ ## Checklist
112
+
113
+ - [ ] The file name is consistent with the exported component/function name
114
+ - [ ] Page components have the `Page` suffix, and layout components have the `Layout` suffix.
115
+ - [ ] Boolean variables use `is` / `has` / `can` / `should` prefixes
116
+ - [ ] Event handling is prefixed with `handle`, callback Props are prefixed with `on`
117
+ - [ ] constant using UPPER_SNAKE_CASE
118
+ - [ ] Use kebab-case for the routing path and PascalCase for the routing name.
119
+ - [ ] API function naming is consistent with HTTP method semantics
120
+ - [ ] i18n key uses dotted namespace, no hardcoded copy