@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,112 +1,112 @@
1
- # TypeScript / JavaScript 规则
1
+ # TypeScript / JavaScript rules
2
2
 
3
- 编写、修改或评审 `.ts`、`.tsx`、`.js`、`.jsx` 时应用本文件。本文只保留项目常驻硬约束;复杂类型建模、`tsconfig` 分层、声明产物、DTO / view model 边界、类型测试与发布入口设计,交给 `fec-typescript-project-standard` skill 或专项评审处理。注释风格另见 `fec-code-comments.md`;E2E 与校验流程另见 `fec-testing.md`。
3
+ Use this file when writing, modifying or reviewing `.ts`, `.tsx`, `.js`, `.jsx`. This article only retains the permanent hard constraints of the project; complex type modeling, `tsconfig` layering, declared products, DTO / view model boundaries, type testing and release entry design are left to the `fec-typescript-project-standard` skill or special review. See also `fec-code-comments.md` for comment style; see `fec-testing.md` for E2E and verification process.
4
4
 
5
- ## 类型与接口
5
+ ## Types and interfaces
6
6
 
7
- 用类型让对外 API、共享模型与组件 props 显式、可读、可复用。
7
+ Use types to make external APIs, shared models, and component props explicit, readable, and reusable.
8
8
 
9
- ### 对外导出的 API
9
+ ### Externally exported API
10
10
 
11
- - 对**导出**的函数、共享工具函数、公开类方法,写明参数与返回值类型。
12
- - **局部**变量在类型显而易见时交给 TypeScript 推断,不为显而易见的中间变量重复标注。
13
- - 重复出现的内联对象形状抽成具名 `interface` 或 `type`,避免同一契约散落在多个签名中。
14
- - 外部数据、API DTO、路由参数、表单值与组件 props 的边界要显式命名;复杂建模分流到 `fec-typescript-project-standard`。
11
+ - For **export** functions, shared tool functions, and public class methods, indicate the parameter and return value types.
12
+ - **Local** variables are handed over to TypeScript for inference when the type is obvious, and obvious intermediate variables are not repeatedly annotated.
13
+ - Recurring inline object shapes are extracted into named `interface` or `type` to avoid the same contract being scattered in multiple signatures.
14
+ - The boundaries of external data, API DTOs, routing parameters, form values and component props must be explicitly named; complex modeling is offloaded to `fec-typescript-project-standard`.
15
15
 
16
- ### `interface` 与 `type`
16
+ ### `interface` and `type`
17
17
 
18
- - 可能被扩展或 `implements` 的**对象形状**优先用 `interface`。
19
- - **联合、交叉、元组、映射类型、工具类型组合**用 `type`。
20
- - 状态、类型、角色等有限业务取值优先用字符串字面量联合;仅在互操作或团队统一要求时使用 `enum`。
18
+ - Object shapes that may be extended or `implements` take precedence over `interface`.
19
+ - **Union, intersection, tuple, map type, tool type combination** use `type`.
20
+ - Limited business values such as status, type, role, etc. are first combined with string literals; `enum` is only used when interoperability or team unified requirements are met.
21
21
 
22
- ### 函数参数:复杂类型宜具名
22
+ ### Function parameters: complex types should be named
23
23
 
24
- - 参数上的**复杂联合**、**内联对象类型**、**较复杂的回调签名**等,应优先提取为具名 `type` / `interface`,再在函数签名中引用。
25
- - 仅当类型简单、短小、一眼可读,且明显无复用价值时,允许在参数位置内联。
26
- - 回调参数与返回值必须表达清楚;不要用 `Function`、宽泛对象或隐式 `any` 承接业务契约。
24
+ - **Complex unions**, **inline object types**, **more complex callback signatures**, etc. on parameters should be extracted as named `type` / `interface` first, and then referenced in the function signature.
25
+ - Inlining in parameter positions is only allowed if the type is simple, short, readable at a glance, and has obvious no reuse value.
26
+ - Callback parameters and return values must be expressed clearly; do not use `Function`, wide objects or implicit `any` to undertake business contracts.
27
27
 
28
- ### 避免 `any`
28
+ ### Avoid `any`
29
29
 
30
- - 业务代码中避免 `any`;已有遗留 `any` 不随手扩散。
31
- - 外部或不可信数据用 `unknown`,通过 `typeof`、`in`、`instanceof`、schema parse 或自定义 predicate 安全收窄。
32
- - 类型随调用方变化时用泛型,但不要为简单场景引入难以理解的泛型层。
33
- - `as` 类型断言只用于明确的边界互操作或已验证收窄后的补充表达,不用于压制类型错误。
30
+ - Avoid `any` in business code; existing `any` should not be spread casually.
31
+ - Use `unknown` for external or untrusted data, safely narrowed through `typeof`, `in`, `instanceof`, schema parse or custom predicate.
32
+ - Use generics when the type changes from caller to caller, but don’t introduce an incomprehensible layer of generics for simple scenarios.
33
+ - `as` type assertions are only used for explicit boundary interoperation or supplementary expressions after verified narrowing, and are not used to suppress type errors.
34
34
 
35
- ### React 组件 Props
35
+ ### React Component Props
36
36
 
37
- - 用具名 `interface` 或 `type` 定义 props,复杂公共 props 分流到类型模块。
38
- - 回调 props 写清参数与返回值;事件 payload 不用裸对象长期内联。
39
- - 无特殊理由不使用 `React.FC`,避免隐式 `children` 等差异。
40
- - TSX 泛型、复杂组件 props 或外部 DTO 映射问题,交给 React 规则与 `fec-typescript-project-standard` 共同收敛。
37
+ - Define props with named `interface` or `type`, and offload complex public props to type modules.
38
+ - Write clear parameters and return values in callback props; event payload does not require long-term inlining of bare objects.
39
+ - Don't use `React.FC` without special reason, avoid differences such as implicit `children`.
40
+ - TSX generics, complex component props or external DTO mapping issues are left to React rules and `fec-typescript-project-standard` to converge together.
41
41
 
42
- ## 单文件规模与模块拆分
42
+ ## Single file size and module splitting
43
43
 
44
- - `.ts` / `.tsx` / `.js` / `.jsx` 单文件建议控制在**约 300 行以内**。该阈值是可维护性与评审效率的经验上限,不是机械硬限制。
45
- - 当文件明显超过该规模且承担多重职责时,应优先按职责拆分:数据访问、业务规则、视图渲染、适配层、常量与映射、类型定义。
46
- - 超阈值优先提取纯函数、子组件、自定义 Hook、`*.types.ts` 类型模块、常量表;不要仅为压行数做无意义切分。
47
- - 可接受例外:生成代码、极薄的 re-export 聚合文件、经团队评审确认的高内聚模块;例外建议在文件头简短注明原因。
44
+ - `.ts` / `.tsx` / `.js` / `.jsx` It is recommended that a single file be controlled within **about 300 lines**. This threshold is an empirical upper limit for maintainability and review efficiency, not a mechanical hard limit.
45
+ - When the file obviously exceeds this size and bears multiple responsibilities, priority should be given to splitting it by responsibility: data access, business rules, view rendering, adaptation layer, constants and mapping, and type definition.
46
+ - Prioritize extraction of pure functions, subcomponents, custom Hooks, `*.types.ts` type modules, and constant tables above the threshold; do not make meaningless segmentation just for the number of pressed lines.
47
+ - Acceptable exceptions: generated code, very thin re-export aggregation files, high cohesion modules confirmed by team review; exceptions are recommended to briefly indicate the reasons in the file header.
48
48
 
49
- ### 仍为 JavaScript 的文件
49
+ ### Still a JavaScript file
50
50
 
51
- - 在 `.js` / `.jsx` 中,若短期无法迁 TS,可用 JSDoc 补类型,并与运行时行为一致。
52
- - 不为迁移方便引入新的隐式全局、宽松对象或未验证外部输入。
51
+ - In `.js` / `.jsx`, if TS cannot be migrated in the short term, JSDoc can be used to complement the type, and the behavior will be consistent with the runtime.
52
+ - Do not introduce new implicit globals, loose objects, or unvalidated external inputs for migration convenience.
53
53
 
54
- ## 禁止 Magic Number / Magic String
54
+ ## Disable Magic Number / Magic String
55
55
 
56
- - **业务代码中禁止**使用**无语义**的硬编码数字或字符串直接表示状态、类型、标识或业务含义,包括 `if` / `switch` / 赋值 / API 字段映射。
57
- - 固定且有限的取值范围须在单一真源处定义,并在全仓引用名称,避免裸值散落。
58
- - 前端主路径优先使用 `as const` 常量对象配合字面量联合;与后端协议或团队约定强绑定时可使用 `enum`。
59
- - 不属本条的典型例外仍应保持可读:纯算法下标、明显的 `0` / `1` 长度判断、与业务无关的 UI 刻度;视觉值若已有设计 Token,应改走 `fec-design-system.md`。
56
+ - **It is prohibited** in business code to use **semantic** hard-coded numbers or strings to directly represent status, type, identity or business meaning, including `if` / `switch` / assignment / API field mapping.
57
+ - The fixed and limited value range must be defined at a single true source, and the name must be referenced in the entire warehouse to avoid the scattering of bare values.
58
+ - The front-end main path preferentially uses `as const` constant objects with literal unions; `enum` can be used when strongly bound to the back-end protocol or team agreement.
59
+ - Typical exceptions that do not fall under this article should still remain readable: pure algorithm subscripts, obvious `0` / `1` length judgments, UI scales that have nothing to do with business; if the visual value already has a design token, it should be changed to `fec-design-system.md`.
60
60
 
61
- ## 不可变更新
61
+ ## Immutable updates
62
62
 
63
- - 优先返回新对象或新数组,避免直接改写入参、props、store 快照或缓存对象。
64
- - 对不应被修改的数据优先建模为 `readonly` / `Readonly<T>`。
65
- - 大型嵌套更新应使用项目既有状态方案或清晰的 reducer / helper,不在组件中堆叠临时可变逻辑。
63
+ - Prioritize returning new objects or new arrays and avoid directly modifying parameters, props, store snapshots or cache objects.
64
+ - Data that should not be modified is first modeled as `readonly` / `Readonly<T>`.
65
+ - Large nested updates should use the project's existing state scheme or a clear reducer/helper, without stacking temporary mutable logic in components.
66
66
 
67
- ## 异步与错误处理
67
+ ## Asynchronous and error handling
68
68
 
69
- - 使用 `async` / `await` 与明确的错误边界;不要吞掉 promise rejection。
70
- - `catch` 中将错误视为 `unknown` 再收窄,统一映射为用户可见错误、日志错误或调用方可处理的领域错误。
71
- - API、认证、上传、支付等跨边界错误遵循 `fec-api-layer.md`、`fec-error-handling.md` 和安全规则,不在业务组件中散落裸处理。
69
+ - Use `async` / `await` with clear error boundaries; don't swallow promise rejections.
70
+ - In `catch`, errors are treated as `unknown` and then narrowed down, and uniformly mapped to user-visible errors, log errors or domain errors that can be handled by the caller.
71
+ - Cross-border errors such as API, authentication, upload, and payment follow `fec-api-layer.md`, `fec-error-handling.md` and security rules, and are not handled nakedly in business components.
72
72
 
73
- ## 输入校验
73
+ ## Input verification
74
74
 
75
- - 外部输入(表单、API、URL 参数、localStorage、postMessage、第三方 SDK 回调等)必须在边界处校验或收窄。
76
- - 可使用 Zod、Valibot、Yup 或项目选用的同类 schema 工具;不要把具体库作为无条件新依赖引入。
77
- - schema 推导类型可作为输入类型单一真源;复杂 DTO、领域模型与 UI view model 的分层交给 `fec-typescript-project-standard`。
75
+ - External input (forms, APIs, URL parameters, localStorage, postMessage, third-party SDK callbacks, etc.) must be validated or narrowed at boundaries.
76
+ - You can use Zod, Valibot, Yup or similar schema tools selected by the project; do not introduce specific libraries as unconditional new dependencies.
77
+ - Schema derived types serve as a single source of truth for input types; layering of complex DTOs, domain models and UI view models is left to `fec-typescript-project-standard`.
78
78
 
79
- ## 类型资产分层与命名
79
+ ## Type asset layering and naming
80
80
 
81
- - 模块或特性专属类型使用 `*.types.ts`,并与实现文件同目录或同 feature 目录放置。
82
- - 全局与环境相关声明放在 `global.d.ts`、`env.d.ts` 或 `types/*.d.ts`,仅用于真全局或 ambient 声明,不将可模块化类型放入全局。
83
- - 仅用于类型的导入导出优先使用 `import type` 与 `export type`,减少值空间歧义并提升编译语义清晰度。
84
- - 与 API DTO 同源的类型,放在对应 feature 或 API 子目录,避免在页面或组件实现内散落大型匿名类型。
85
- - `index.ts` 聚合导出应保持浅层且按 feature 边界组织,避免深层 barrel 引发循环依赖与不必要耦合。
81
+ - Module or feature-specific types use `*.types.ts` and are placed in the same directory as the implementation file or in the same feature directory.
82
+ - Global and environment-related declarations are placed in `global.d.ts`, `env.d.ts` or `types/*.d.ts`, only for true global or ambient declarations, and do not put modular types into globals.
83
+ - For import and export of types only, use `import type` and `export type` first to reduce value space ambiguity and improve compilation semantic clarity.
84
+ - Types that have the same origin as the API DTO are placed in the corresponding feature or API subdirectory to avoid scattering large anonymous types within the page or component implementation.
85
+ - `index.ts` aggregate exports should be kept shallow and organized according to feature boundaries to avoid deep barrels causing circular dependencies and unnecessary coupling.
86
86
 
87
- ## 工程化与惯用法补充
87
+ ## Engineering and idiom additions
88
88
 
89
- - 需要同时满足字面量保留与结构校验时优先使用 `satisfies`,再考虑类型断言。
90
- - 使用判别式联合表达清晰状态;关键分支需要穷尽性时用 `never` 检查。
91
- - 新业务代码默认采用 ES Module;`namespace` 与三斜线指令仅用于声明合并或遗留互操作场景。
92
- - 扩展第三方类型时使用独立声明文件并通过局部 `declare module` 扩展,避免污染全局实现文件。
93
- - `tsconfig`、package exports、声明文件、路径别名和 public API 类型属于 TypeScript 项目规范深水区,不在本规则内展开。
89
+ - When both literal preservation and structure verification need to be met, use `satisfies` first, and then consider type assertions.
90
+ - Use discriminant unions to express clear states; use `never` checks when exhaustiveness is required for critical branches.
91
+ - New business code uses ES Module by default; `namespace` and triple slash directives are only used to declare merge or legacy interop scenarios.
92
+ - When extending third-party types, use independent declaration files and extend them through local `declare module` to avoid polluting the global implementation file.
93
+ - `tsconfig`, package exports, declaration files, path aliases and public API types belong to the deep water area of TypeScript project specifications and are not expanded within this rule.
94
94
 
95
- ## 日志与 `console.log`
95
+ ## Logs and `console.log`
96
96
 
97
- - 生产路径避免遗留 `console.log`;使用项目统一的日志方案。
98
- - 调试日志提交前应删除,或按团队工具链通过 lint / hook / CI 提示。
97
+ - Avoid legacy `console.log` in the production path; use the project's unified logging scheme.
98
+ - Debug logs should be deleted before submission, or prompted by the team toolchain via lint/hook/CI.
99
99
 
100
- ## 密钥与敏感配置
100
+ ## Keys and sensitive configurations
101
101
 
102
- - **禁止**在源码中硬编码密钥、Token、私钥或真实凭证示例。
103
- - 必须通过环境变量或构建期注入读取配置,并在缺失时显式失败或提供清晰降级策略。
104
- - 涉及认证、支付、上传、第三方脚本或敏感数据处理时,结合项目安全规范做专项评审。
102
+ - **Prohibited** Hardcoding keys, tokens, private keys, or real credential examples in source code.
103
+ - Configuration must be read via environment variables or build-time injection, and fail explicitly if missing or provide a clear downgrade strategy.
104
+ - When authentication, payment, uploading, third-party scripts or sensitive data processing are involved, special reviews will be conducted in conjunction with project security specifications.
105
105
 
106
- ## 与测试规则的关系
106
+ ## Relationship with test rules
107
107
 
108
- 类型改动影响 public API、DTO、外部输入收窄或关键业务分支时,应补充 typecheck、类型测试、组件测试或消费方 fixture。关键用户路径的端到端覆盖方式(Playwright、Cypress、Page Object 等)以 `fec-testing.md` 为准;本文件不重复展开 E2E 细则。
108
+ When type changes affect public APIs, DTOs, external input narrowing, or business-critical branches, typechecks, type tests, component tests, or consumer fixtures should be supplemented. The end-to-end coverage method of key user paths (Playwright, Cypress, Page Object, etc.) is subject to `fec-testing.md`; this document does not repeat the E2E details.
109
109
 
110
- ## 与 `typescript-reviewer` 子代理
110
+ ## With the `typescript-reviewer` subagent
111
111
 
112
- 对 **`.ts` / `.tsx` / `.js` / `.jsx`** 进行专项评审(先跑 typecheck / eslint、PR 合并就绪检查、分级结论)时,可委托插件内置的 **`typescript-reviewer`** 子代理;其报告默认写入 `reports/typescript-review-YYYY-MM-DD-HHmmss.md`,规则底线仍以本文件与项目 `CLAUDE.md` 为准。
112
+ When conducting a special review of **`.ts` / `.tsx` / `.js` / `.jsx`** (run typecheck / eslint first, PR merge readiness check, graded conclusion), you can entrust the plug-in's built-in **`typescript-reviewer`** subagent; its report is written by default `reports/typescript-review-YYYY-MM-DD-HHmmss.md`, the bottom line of the rules is still based on this file and the project `CLAUDE.md`.
@@ -1,64 +1,64 @@
1
- # Vue 规则
1
+ # Vue rules
2
2
 
3
- 当仓库或目标模块使用 Vue 时,应用本文件。
3
+ This file applies when the repository or target module uses Vue.
4
4
 
5
- ## 技术栈
5
+ ## Technology stack
6
6
 
7
- <!-- 请根据项目实际情况修改 -->
7
+ <!-- Please modify according to the actual situation of the project -->
8
8
 
9
- - 框架: Vue 3 + TypeScript
10
- - 状态管理: Pinia
11
- - UI 组件库: 按项目实际选择(如 Element Plus、Naive UI、Vant 或内部 Design System)
12
- - 版本与依赖:新建模块、补充 `package.json` 或更新本节前,优先采用彼此兼容的主流稳定版本(对齐官方文档、脚手架默认值或包管理器推荐),避免混用已停止维护或与仓库主线 major 不匹配的依赖。
9
+ - Framework: Vue 3 + TypeScript
10
+ - Status management: Pinia
11
+ - UI component library: Actual selection by project (e.g. Element Plus, Naive UI, Vant or in-house Design System)
12
+ - Versions and dependencies: Before creating a new module, supplementing `package.json` or updating this section, give priority to using mainstream stable versions that are compatible with each other (align with official documents, scaffolding defaults or package manager recommendations) to avoid mixing dependencies that have stopped maintaining or do not match the major of the mainline of the warehouse.
13
13
 
14
- ## Vue 组件规范
14
+ ## Vue component specification
15
15
 
16
- - 使用 `<script setup lang="ts">`
17
- - 明确使用 `defineProps` 和 `defineEmits`
18
- - 保持模板逻辑简单、可读
19
- - 将可复用逻辑提取到 composables
20
- - 优先使用 computed,而不是大范围 watcher
21
- - 保持组件职责聚焦,避免上帝组件
22
- - props、emits、refs 和 expose 方法尽量使用强类型
16
+ - Use `<script setup lang="ts">`
17
+ - Explicit use of `defineProps` and `defineEmits`
18
+ - Keep template logic simple and readable
19
+ - Extract reusable logic into composables
20
+ - Prefer computed over large-scale watchers
21
+ - Keep component responsibilities focused and avoid god components
22
+ - Try to use strong types for props, emits, refs and expose methods
23
23
 
24
- ## Vue 实现指导
24
+ ## Vue Implementation Guide
25
25
 
26
- 创建新组件前:
26
+ Before creating a new component:
27
27
 
28
- 1. 先搜索项目中是否已有可复用组件
29
- 2. 判断逻辑是否适合提取到 composable
30
- 3. 检查样式是否应沿用周边现有模式
28
+ 1. First search whether there are reusable components in the project
29
+ 2. Determine whether the logic is suitable for extraction into composable
30
+ 3. Check whether the style should inherit surrounding existing patterns
31
31
 
32
- 编辑 Vue 组件时:
32
+ When editing a Vue component:
33
33
 
34
- - 在可能的情况下,不要把 API 调用直接放进纯展示组件
35
- - 不要在组件文件中内联大段业务逻辑
36
- - 不要重复维护可从 props 或 store 推导出的状态
37
- - 事件 payload 要明确且有类型约束
34
+ - Where possible, don’t put API calls directly into purely presentational components
35
+ - Do not inline large sections of business logic in component files
36
+ - Don't repeatedly maintain state that can be derived from props or stores
37
+ - Event payload should be clear and type-constrained
38
38
 
39
- ## Vue 文件组织
39
+ ## Vue file organization
40
40
 
41
- 优先遵循项目已有约定。
42
- 常见输出可能包括:
41
+ Prioritize compliance with existing project agreements.
42
+ Common output may include:
43
43
 
44
44
  - `ComponentName.vue`
45
45
  - `types.ts`
46
46
  - `useXxx.ts`
47
- - 只有在符合仓库模式时才新增本地样式文件
47
+ - Add local style files only if they conform to the warehouse mode
48
48
 
49
- ## 组件文件规模
49
+ ## Component file size
50
50
 
51
- - 单个 `.vue` 文件或同一组件模块保持**职责单一**、语义清晰、易于维护。
52
- - **行数参考**:优先控制在约 **300 行**以内;超过 **500 行**应视为**强烈拆分信号**。
53
- - **未到 500 行也应拆分**的情形:同时存在**复杂响应式状态**、**过多副作用 / watch**、**模板嵌套过深**、**`<script setup>` 内逻辑过长**、密集条件分支等,应拆为**子组件**、**Composables**、**工具模块**、**常量**与**类型定义**等(与上文「Vue 组件规范」「Vue 文件组织」一致)。
51
+ - A single `.vue` file or the same component module maintains a single responsibility, clear semantics, and easy maintenance.
52
+ - **Row number reference**: Prioritize control within about **300 lines**; more than **500 lines** should be regarded as a **strong split signal**.
53
+ - **Situations that should be split even if it is less than 500 lines**: if there are **complex responsive states**, **too many side effects/watch**, **templates nested too deeply**, **`<script setup>` internal logic is too long**, dense conditional branches, etc., they should be split into **subcomponents**, **Composables**, **tool modules**, **constants** and **type definitions**, etc. (consistent with the "Vue component specification" and "Vue file organization" above).
54
54
 
55
- ## Vue 反模式
55
+ ## Vue anti-patterns
56
56
 
57
- 避免:
57
+ Avoid:
58
58
 
59
- - 本该使用 computed 却使用大范围 watcher
60
- - 对 props、emits 或 refs 无理由使用 `any`
61
- - 模板分支层级过深却不提取
62
- - 在一个组件中混入无关职责
63
- - 单 `.vue` **逾 500 行或复杂度已高**仍拒不拆分(参见上文「组件文件规模」)
64
- - 用大范围全局样式覆盖去解决局部 UI 问题
59
+ - Used wide range watcher instead of computed
60
+ - Use `any` for props, emits or refs without reason
61
+ - The template branch level is too deep but not extracted
62
+ - Mixing unrelated responsibilities into a component
63
+ - A single `.vue` **exceeds 500 lines or is too complex** and still refuses to be split (see "Component file size" above)
64
+ - Use large-scale global style coverage to solve local UI problems
@@ -1,50 +1,50 @@
1
- # 工作模式规则
1
+ # Working mode rules
2
2
 
3
- 根据任务阶段选择合适的工作模式,避免一边探索一边大改代码。
3
+ Choose the appropriate working mode according to the task stage to avoid making major changes to the code while exploring.
4
4
 
5
- ## 调研模式
5
+ ## Research mode
6
6
 
7
- 适用于需求不清、现状复杂、需要比较方案或定位风险时。
7
+ It is suitable when the requirements are unclear, the current situation is complex, and it is necessary to compare plans or locate risks.
8
8
 
9
- - 先阅读 README、项目规则、相关源码和最近变更。
10
- - 用 `rg` 查找已有模式、组件、工具函数和测试。
11
- - 先列发现,再给建议。
12
- - 在证据不足时不要下确定结论。
13
- - 涉及版本敏感框架、库或平台行为时,先查项目内事实和官方来源。
9
+ - Read the README, project rules, relevant source code and recent changes first.
10
+ - Use `rg` to find existing patterns, components, utility functions and tests.
11
+ - List findings first, then give suggestions.
12
+ - Do not draw firm conclusions when there is insufficient evidence.
13
+ - When version-sensitive frameworks, libraries, or platform behaviors are involved, check the facts within the project and official sources first.
14
14
 
15
- ## 计划模式
15
+ ## Planning mode
16
16
 
17
- 适用于复杂功能、架构调整、跨文件重构和高风险修复。
17
+ Suitable for complex features, architecture adjustments, cross-file refactoring, and high-risk fixes.
18
18
 
19
- - 重述目标、成功标准和不做什么。
20
- - 标出影响范围、文件边界、依赖关系、风险和验证方式。
21
- - 计划应能分批执行,每批都有可验证结果。
22
- - 用户未确认前,不执行大范围实现。
19
+ - Restate goals, success criteria, and what not to do.
20
+ - Map out scope of impact, file boundaries, dependencies, risks and verification methods.
21
+ - The plan should be able to be executed in batches, with verifiable results for each batch.
22
+ - Large-scale implementation will not be performed before the user confirms.
23
23
 
24
- ## 开发模式
24
+ ## Development mode
25
25
 
26
- 适用于目标明确且已有计划或范围很小的实现。
26
+ Suitable for implementations with clear goals and plans or a small scope.
27
27
 
28
- - 优先复用现有模式。
29
- - 行为变更优先使用 TDD:先失败测试,再最小实现,再重构。
30
- - 每次关键修改后运行最近的验证命令。
31
- - 完成时总结改动、命令和剩余风险。
32
- - 行为、接口或性能假设必须能被类型、测试、构建、浏览器观察或文档来源支撑。
28
+ - Prioritize reuse of existing patterns.
29
+ - Use TDD first for behavior changes: fail the test first, then implement the minimum, and then refactor.
30
+ - Run the latest verification command after every critical modification.
31
+ - Summarize changes, orders, and remaining risks upon completion.
32
+ - Behavior, interface, or performance assumptions must be supported by types, tests, builds, browser observations, or documentation sources.
33
33
 
34
- ## 评审模式
34
+ ## Review mode
35
35
 
36
- 适用于 PR、最近变更、合并前检查和专项审查。
36
+ Applies to PRs, recent changes, pre-merger checks, and ad hoc reviews.
37
37
 
38
- - 先通读上下文,再按严重程度列问题。
39
- - 优先报告会导致 bug、安全风险、回归或维护成本明显上升的问题。
40
- - 每个问题给出文件位置、影响、建议修复方式和置信度。
41
- - 无问题时明确说明剩余测试缺口。
38
+ - Read through the context first, then list the issues in order of severity.
39
+ - Prioritize reporting of issues that result in bugs, security risks, regressions, or significant increases in maintenance costs.
40
+ - Each issue gives the file location, impact, recommended fix and confidence level.
41
+ - Clear indication of remaining test gaps when no issues arise.
42
42
 
43
- ## 收尾模式
43
+ ## Ending mode
44
44
 
45
- 适用于提交前或交付前。
45
+ Applies to pre-submission or delivery.
46
46
 
47
- - 运行 lint、type-check、test、build 中与改动相关的命令。
48
- - 检查是否有调试代码、临时文件、未同步文档或未说明的风险。
49
- - 不在未经确认时提交或推送。
50
- - 不用“应该可以”作为交付依据;交付前报告实际运行过的命令和结果。
47
+ - Run commands related to changes in lint, type-check, test, and build.
48
+ - Check for debug code, temporary files, unsynced documentation, or unaccounted for risks.
49
+ - Don't commit or push without confirmation.
50
+ - Do not use "should be able" as the basis for delivery; report the actual run commands and results before delivery.