@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
@@ -0,0 +1,265 @@
1
+ # Smell-to-Refactoring Map
2
+
3
+ Candidate techniques are advisory. Select by observed cause, preconditions, risk, and the smallest safe transformation; never reduce diagnosis to keyword lookup.
4
+
5
+ ## SMELL-MYSTERIOUS-NAME — Mysterious Name
6
+
7
+ **Primary/Supporting Candidates**
8
+ - `RF-CHANGE-FUNCTION-DECLARATION`
9
+ - `RF-RENAME-VARIABLE`
10
+ - `RF-RENAME-FIELD`
11
+
12
+ **Selection Note**
13
+ - Confirm the diagnosed cause of Mysterious Name and choose only a technique whose preconditions fit the current ownership and behavior contract.
14
+
15
+ ## SMELL-DUPLICATED-CODE — Duplicated Code
16
+
17
+ **Primary/Supporting Candidates**
18
+ - `RF-EXTRACT-FUNCTION`
19
+ - `RF-SLIDE-STATEMENTS`
20
+ - `RF-PULL-UP-METHOD`
21
+
22
+ **Selection Note**
23
+ - Confirm the diagnosed cause of Duplicated Code and choose only a technique whose preconditions fit the current ownership and behavior contract.
24
+
25
+ ## SMELL-LONG-FUNCTION — Long Function
26
+
27
+ **Primary/Supporting Candidates**
28
+ - `RF-EXTRACT-FUNCTION`
29
+ - `RF-REPLACE-TEMP-WITH-QUERY`
30
+ - `RF-INTRODUCE-PARAMETER-OBJECT`
31
+ - `RF-PRESERVE-WHOLE-OBJECT`
32
+ - `RF-REPLACE-FUNCTION-WITH-COMMAND`
33
+ - `RF-DECOMPOSE-CONDITIONAL`
34
+ - `RF-REPLACE-CONDITIONAL-WITH-POLYMORPHISM`
35
+ - `RF-SPLIT-LOOP`
36
+
37
+ **Selection Note**
38
+ - Confirm the diagnosed cause of Long Function and choose only a technique whose preconditions fit the current ownership and behavior contract.
39
+
40
+ ## SMELL-LONG-PARAMETER-LIST — Long Parameter List
41
+
42
+ **Primary/Supporting Candidates**
43
+ - `RF-REPLACE-PARAMETER-WITH-QUERY`
44
+ - `RF-PRESERVE-WHOLE-OBJECT`
45
+ - `RF-INTRODUCE-PARAMETER-OBJECT`
46
+ - `RF-REMOVE-FLAG-ARGUMENT`
47
+ - `RF-COMBINE-FUNCTIONS-INTO-CLASS`
48
+
49
+ **Selection Note**
50
+ - Confirm the diagnosed cause of Long Parameter List and choose only a technique whose preconditions fit the current ownership and behavior contract.
51
+
52
+ ## SMELL-GLOBAL-DATA — Global Data
53
+
54
+ **Primary/Supporting Candidates**
55
+ - `RF-ENCAPSULATE-VARIABLE`
56
+
57
+ **Selection Note**
58
+ - Confirm the diagnosed cause of Global Data and choose only a technique whose preconditions fit the current ownership and behavior contract.
59
+
60
+ ## SMELL-MUTABLE-DATA — Mutable Data
61
+
62
+ **Primary/Supporting Candidates**
63
+ - `RF-ENCAPSULATE-VARIABLE`
64
+ - `RF-SPLIT-VARIABLE`
65
+ - `RF-SLIDE-STATEMENTS`
66
+ - `RF-EXTRACT-FUNCTION`
67
+ - `RF-SEPARATE-QUERY-FROM-MODIFIER`
68
+ - `RF-REMOVE-SETTING-METHOD`
69
+ - `RF-REPLACE-DERIVED-VARIABLE-WITH-QUERY`
70
+ - `RF-COMBINE-FUNCTIONS-INTO-CLASS`
71
+ - `RF-COMBINE-FUNCTIONS-INTO-TRANSFORM`
72
+ - `RF-CHANGE-REFERENCE-TO-VALUE`
73
+
74
+ **Selection Note**
75
+ - Confirm the diagnosed cause of Mutable Data and choose only a technique whose preconditions fit the current ownership and behavior contract.
76
+
77
+ ## SMELL-DIVERGENT-CHANGE — Divergent Change
78
+
79
+ **Primary/Supporting Candidates**
80
+ - `RF-SPLIT-PHASE`
81
+ - `RF-MOVE-FUNCTION`
82
+ - `RF-EXTRACT-FUNCTION`
83
+ - `RF-EXTRACT-CLASS`
84
+
85
+ **Selection Note**
86
+ - Confirm the diagnosed cause of Divergent Change and choose only a technique whose preconditions fit the current ownership and behavior contract.
87
+
88
+ ## SMELL-SHOTGUN-SURGERY — Shotgun Surgery
89
+
90
+ **Primary/Supporting Candidates**
91
+ - `RF-MOVE-FUNCTION`
92
+ - `RF-MOVE-FIELD`
93
+ - `RF-COMBINE-FUNCTIONS-INTO-CLASS`
94
+ - `RF-COMBINE-FUNCTIONS-INTO-TRANSFORM`
95
+ - `RF-SPLIT-PHASE`
96
+ - `RF-INLINE-FUNCTION`
97
+ - `RF-INLINE-CLASS`
98
+
99
+ **Selection Note**
100
+ - Confirm the diagnosed cause of Shotgun Surgery and choose only a technique whose preconditions fit the current ownership and behavior contract.
101
+
102
+ ## SMELL-FEATURE-ENVY — Feature Envy
103
+
104
+ **Primary/Supporting Candidates**
105
+ - `RF-MOVE-FUNCTION`
106
+ - `RF-EXTRACT-FUNCTION`
107
+
108
+ **Selection Note**
109
+ - Confirm the diagnosed cause of Feature Envy and choose only a technique whose preconditions fit the current ownership and behavior contract.
110
+
111
+ ## SMELL-DATA-CLUMPS — Data Clumps
112
+
113
+ **Primary/Supporting Candidates**
114
+ - `RF-EXTRACT-CLASS`
115
+ - `RF-INTRODUCE-PARAMETER-OBJECT`
116
+ - `RF-PRESERVE-WHOLE-OBJECT`
117
+
118
+ **Selection Note**
119
+ - Confirm the diagnosed cause of Data Clumps and choose only a technique whose preconditions fit the current ownership and behavior contract.
120
+
121
+ ## SMELL-PRIMITIVE-OBSESSION — Primitive Obsession
122
+
123
+ **Primary/Supporting Candidates**
124
+ - `RF-REPLACE-PRIMITIVE-WITH-OBJECT`
125
+ - `RF-REPLACE-TYPE-CODE-WITH-SUBCLASSES`
126
+ - `RF-REPLACE-CONDITIONAL-WITH-POLYMORPHISM`
127
+ - `RF-EXTRACT-CLASS`
128
+ - `RF-INTRODUCE-PARAMETER-OBJECT`
129
+
130
+ **Selection Note**
131
+ - Confirm the diagnosed cause of Primitive Obsession and choose only a technique whose preconditions fit the current ownership and behavior contract.
132
+
133
+ ## SMELL-REPEATED-SWITCHES — Repeated Switches
134
+
135
+ **Primary/Supporting Candidates**
136
+ - `RF-REPLACE-CONDITIONAL-WITH-POLYMORPHISM`
137
+
138
+ **Selection Note**
139
+ - Confirm the diagnosed cause of Repeated Switches and choose only a technique whose preconditions fit the current ownership and behavior contract.
140
+
141
+ ## SMELL-LOOPS — Loops
142
+
143
+ **Primary/Supporting Candidates**
144
+ - `RF-REPLACE-LOOP-WITH-PIPELINE`
145
+
146
+ **Selection Note**
147
+ - Confirm the diagnosed cause of Loops and choose only a technique whose preconditions fit the current ownership and behavior contract.
148
+
149
+ ## SMELL-LAZY-ELEMENT — Lazy Element
150
+
151
+ **Primary/Supporting Candidates**
152
+ - `RF-INLINE-FUNCTION`
153
+ - `RF-INLINE-CLASS`
154
+ - `RF-COLLAPSE-HIERARCHY`
155
+
156
+ **Selection Note**
157
+ - Confirm the diagnosed cause of Lazy Element and choose only a technique whose preconditions fit the current ownership and behavior contract.
158
+
159
+ ## SMELL-SPECULATIVE-GENERALITY — Speculative Generality
160
+
161
+ **Primary/Supporting Candidates**
162
+ - `RF-COLLAPSE-HIERARCHY`
163
+ - `RF-INLINE-FUNCTION`
164
+ - `RF-INLINE-CLASS`
165
+ - `RF-CHANGE-FUNCTION-DECLARATION`
166
+ - `RF-REMOVE-DEAD-CODE`
167
+
168
+ **Selection Note**
169
+ - Confirm the diagnosed cause of Speculative Generality and choose only a technique whose preconditions fit the current ownership and behavior contract.
170
+
171
+ ## SMELL-TEMPORARY-FIELD — Temporary Field
172
+
173
+ **Primary/Supporting Candidates**
174
+ - `RF-EXTRACT-CLASS`
175
+ - `RF-MOVE-FUNCTION`
176
+ - `RF-INTRODUCE-SPECIAL-CASE`
177
+
178
+ **Selection Note**
179
+ - Confirm the diagnosed cause of Temporary Field and choose only a technique whose preconditions fit the current ownership and behavior contract.
180
+
181
+ ## SMELL-MESSAGE-CHAINS — Message Chains
182
+
183
+ **Primary/Supporting Candidates**
184
+ - `RF-HIDE-DELEGATE`
185
+ - `RF-EXTRACT-FUNCTION`
186
+ - `RF-MOVE-FUNCTION`
187
+
188
+ **Selection Note**
189
+ - Confirm the diagnosed cause of Message Chains and choose only a technique whose preconditions fit the current ownership and behavior contract.
190
+
191
+ ## SMELL-MIDDLE-MAN — Middle Man
192
+
193
+ **Primary/Supporting Candidates**
194
+ - `RF-REMOVE-MIDDLE-MAN`
195
+ - `RF-INLINE-FUNCTION`
196
+ - `RF-REPLACE-SUPERCLASS-WITH-DELEGATE`
197
+ - `RF-REPLACE-SUBCLASS-WITH-DELEGATE`
198
+
199
+ **Selection Note**
200
+ - Confirm the diagnosed cause of Middle Man and choose only a technique whose preconditions fit the current ownership and behavior contract.
201
+
202
+ ## SMELL-INSIDER-TRADING — Insider Trading
203
+
204
+ **Primary/Supporting Candidates**
205
+ - `RF-MOVE-FUNCTION`
206
+ - `RF-MOVE-FIELD`
207
+ - `RF-HIDE-DELEGATE`
208
+ - `RF-REPLACE-SUBCLASS-WITH-DELEGATE`
209
+ - `RF-REPLACE-SUPERCLASS-WITH-DELEGATE`
210
+
211
+ **Selection Note**
212
+ - Confirm the diagnosed cause of Insider Trading and choose only a technique whose preconditions fit the current ownership and behavior contract.
213
+
214
+ ## SMELL-LARGE-CLASS — Large Class
215
+
216
+ **Primary/Supporting Candidates**
217
+ - `RF-EXTRACT-CLASS`
218
+ - `RF-EXTRACT-SUPERCLASS`
219
+ - `RF-REPLACE-TYPE-CODE-WITH-SUBCLASSES`
220
+
221
+ **Selection Note**
222
+ - Confirm the diagnosed cause of Large Class and choose only a technique whose preconditions fit the current ownership and behavior contract.
223
+
224
+ ## SMELL-ALTERNATIVE-CLASSES-DIFFERENT-INTERFACES — Alternative Classes with Different Interfaces
225
+
226
+ **Primary/Supporting Candidates**
227
+ - `RF-CHANGE-FUNCTION-DECLARATION`
228
+ - `RF-MOVE-FUNCTION`
229
+ - `RF-EXTRACT-SUPERCLASS`
230
+
231
+ **Selection Note**
232
+ - Confirm the diagnosed cause of Alternative Classes with Different Interfaces and choose only a technique whose preconditions fit the current ownership and behavior contract.
233
+
234
+ ## SMELL-DATA-CLASS — Data Class
235
+
236
+ **Primary/Supporting Candidates**
237
+ - `RF-ENCAPSULATE-RECORD`
238
+ - `RF-REMOVE-SETTING-METHOD`
239
+ - `RF-MOVE-FUNCTION`
240
+ - `RF-EXTRACT-FUNCTION`
241
+ - `RF-SPLIT-PHASE`
242
+
243
+ **Selection Note**
244
+ - Confirm the diagnosed cause of Data Class and choose only a technique whose preconditions fit the current ownership and behavior contract.
245
+
246
+ ## SMELL-REFUSED-BEQUEST — Refused Bequest
247
+
248
+ **Primary/Supporting Candidates**
249
+ - `RF-PUSH-DOWN-METHOD`
250
+ - `RF-PUSH-DOWN-FIELD`
251
+ - `RF-REPLACE-SUBCLASS-WITH-DELEGATE`
252
+ - `RF-REPLACE-SUPERCLASS-WITH-DELEGATE`
253
+
254
+ **Selection Note**
255
+ - Confirm the diagnosed cause of Refused Bequest and choose only a technique whose preconditions fit the current ownership and behavior contract.
256
+
257
+ ## SMELL-COMMENTS — Comments
258
+
259
+ **Primary/Supporting Candidates**
260
+ - `RF-EXTRACT-FUNCTION`
261
+ - `RF-CHANGE-FUNCTION-DECLARATION`
262
+ - `RF-INTRODUCE-ASSERTION`
263
+
264
+ **Selection Note**
265
+ - Confirm the diagnosed cause of Comments and choose only a technique whose preconditions fit the current ownership and behavior contract.
@@ -1,27 +1,27 @@
1
1
  ---
2
2
  name: fec-component-testing
3
- description: Use when authoring or reviewing frontend unit, component, or light integration tests close to UI code, including React Testing Library, Vue Test Utils, hooks/composables, props/emits, callbacks, accessible queries, user-event interactions, mocks, loading/error/empty states, and regression coverage. For layer planning, real-browser journeys, or existing validation failures, choose the matching testing or validation workflow first; Chinese triggers include 组件测试, 组件单测, 单元测试, 轻量集成测试.
3
+ description: Use when authoring or reviewing frontend unit, component, or light integration tests close to UI code, including React Testing Library, Vue Test Utils, hooks/composables, props/emits, callbacks, accessible queries, user-event interactions, mocks, loading/error/empty states, and regression coverage. For layer planning, real-browser journeys, or existing validation failures, choose the matching testing or validation workflow first; Chinese triggers include component testing, Component unit testing, unit testing, lightweight integration testing.
4
4
  ---
5
5
 
6
- # 组件测试
6
+ #Component testing
7
7
 
8
8
  ## Purpose
9
9
 
10
- 用贴近代码和用户行为的测试验证纯逻辑、组件契约与轻量模块协作,减少重构和 UI 交互回归。
10
+ Use tests close to the code and user behavior to verify pure logic, component contracts, and lightweight module collaboration to reduce refactoring and UI interaction regression.
11
11
 
12
12
  ## Procedure
13
13
 
14
- ### 1. 先确定测试层级
14
+ ### 1. First determine the test level
15
15
 
16
- - 单元测试:纯函数、hooks/composables、utils、状态逻辑、schema。
17
- - 组件测试:props/emits、回调、用户交互、loading/error/empty、mock 边界。
18
- - 轻量集成测试:表单 + API mock + Router/Store/Provider 上下文。
16
+ - Unit testing: pure functions, hooks/composables, utils, state logic, schema.
17
+ - Component testing: props/emis, callbacks, user interaction, loading/error/empty, mock boundaries.
18
+ - Lightweight integration testing: form + API mock + Router/Store/Provider context.
19
19
 
20
- 跨页面真实浏览器流程分流到 E2E workflow;测试层选择不清楚时先做测试分层规划。
20
+ The cross-page real browser process is offloaded to the E2E workflow; if the test layer selection is unclear, do the test layering planning first.
21
21
 
22
- ### 2. 优先按用户可感知行为测试
22
+ ### 2. Prioritize testing based on user-perceivable behavior
23
23
 
24
- 每个测试保持 Arrange / Act / Assert 清晰分段:准备数据和渲染、执行用户动作、断言用户可见结果或公开契约。
24
+ Each test keeps Arrange / Act / Assert clearly segmented: preparing data and rendering, performing user actions, asserting user-visible results or exposing contracts.
25
25
 
26
26
  ```tsx
27
27
  import { render, screen } from "@testing-library/react";
@@ -41,7 +41,7 @@ test("submits the entered keyword", async () => {
41
41
  });
42
42
  ```
43
43
 
44
- ### 3. Vue 组件使用可访问查询或明确文本断言
44
+ ### 3. Vue components use accessible queries or explicit text assertions
45
45
 
46
46
  ```ts
47
47
  import { mount } from "@vue/test-utils";
@@ -58,9 +58,9 @@ test("emits logout when the logout item is clicked", async () => {
58
58
  });
59
59
  ```
60
60
 
61
- 优先使用角色、标签和可见文本;仅在没有稳定语义时使用 `data-testid`。
61
+ Prefer roles, labels, and visible text; only use `data-testid` when there is no stable semantics.
62
62
 
63
- ### 4. 控制 mock 边界
63
+ ### 4. Control mock boundaries
64
64
 
65
65
  ```ts
66
66
  vi.mock("../api/users", () => ({
@@ -68,24 +68,24 @@ vi.mock("../api/users", () => ({
68
68
  }));
69
69
  ```
70
70
 
71
- - mock 网络、时间、路由和浏览器 API。
72
- - 不 mock 被测组件的内部函数。
73
- - 对设计系统基础组件只做轻量 mock,保留可访问行为。
74
- - mock 数据应表达业务场景,不使用只有测试作者能理解的随意字符串。
75
- - 共享 fixture 应保持可读,复杂对象用 builder 补默认值;每个测试只覆盖与场景相关的字段。
76
- - mock 网络时优先模拟用户可见结果和错误形状,不复制后端实现细节。
71
+ - Mock network, time, routing and browser APIs.
72
+ - Do not mock the internal functions of the component under test.
73
+ - Only make light mocks of the basic components of the design system to retain accessible behaviors.
74
+ - Mock data should express the business scenario and not use arbitrary strings that only the test author can understand.
75
+ - Shared fixtures should remain readable, and complex objects should use builders to fill in default values; each test only covers the fields relevant to the scenario.
76
+ - When mocking the network, give priority to simulating user-visible results and error shapes, and do not copy back-end implementation details.
77
77
 
78
- ### 5. 覆盖关键状态
78
+ ### 5. Override key status
79
79
 
80
- 每个复杂组件至少覆盖:
80
+ Each complex component covers at least:
81
81
 
82
- - 默认渲染。
83
- - 用户交互和回调。
82
+ - Default rendering.
83
+ - User interaction and callbacks.
84
84
  - loading / empty / error。
85
- - 权限或禁用态。
86
- - 键盘交互和焦点行为(适用时)。
85
+ - Permission or disabled status.
86
+ - Keyboard interaction and focus behavior (when applicable).
87
87
 
88
- ### 6. 保持测试可维护
88
+ ### 6. Keep tests maintainable
89
89
 
90
90
  ```ts
91
91
  function setup() {
@@ -96,24 +96,24 @@ function setup() {
96
96
  }
97
97
  ```
98
98
 
99
- 将重复渲染逻辑放入 `setup`,但不要隐藏测试的核心操作和断言。
99
+ Put the repetitive rendering logic into `setup`, but don't hide the core actions and assertions of the test.
100
100
 
101
- ### 7. 回归测试先证明问题
101
+ ### 7. Regression testing proves the problem first
102
102
 
103
- - Bug 修复先写能复现失败的最小测试。
104
- - 失败原因应指向用户行为或公开契约,而不是导入错误、测试环境或等待方式。
105
- - 修复后保留回归测试,避免把验证只留在手工步骤里。
103
+ - Bug fixes should be written first to create the smallest test that can reproduce the failure.
104
+ - Reasons for failure should point to user behavior or public contracts, not import errors, test environments, or wait methods.
105
+ - Keep regression testing after fixing to avoid leaving verification only in manual steps.
106
106
 
107
107
  ## Constraints
108
108
 
109
- - 避免测试实现细节,例如内部 state 名称、私有函数调用、DOM 层级快照。
110
- - 不把 snapshot 作为交互组件的主要断言;它只能辅助检查稳定静态输出。
111
- - 异步断言使用 `findBy*` 或 `waitFor`,不要用固定延迟。
112
- - 测试名称应描述用户场景,而不是函数名。
113
- - 组件测试不能替代 E2E;路由、真实浏览器兼容和跨页流程仍需 E2E。
114
- - 不在测试里复制组件实现逻辑;否则测试会和错误实现一起通过。
115
- - 不在测试间共享可变 fixture、全局 store 或 fake timer 状态;每个用例独立 setup 和 cleanup。
109
+ - Avoid testing implementation details such as internal state names, private function calls, DOM hierarchy snapshots.
110
+ - Do not use snapshot as the main assertion for interactive components; it can only assist in checking stable static output.
111
+ - Use `findBy*` or `waitFor` for asynchronous assertions, do not use fixed delays.
112
+ - Test names should describe user scenarios, not function names.
113
+ - Component testing is not a replacement for E2E; routing, real-browser compatibility, and cross-page flows still require E2E.
114
+ - Do not copy component implementation logic in tests; otherwise the test will pass with the wrong implementation.
115
+ - No mutable fixtures, global store or fake timer state shared between tests; each use case has independent setup and cleanup.
116
116
 
117
117
  ## Expected Output
118
118
 
119
- 产出与组件同目录或项目约定目录下的测试文件,覆盖核心交互、状态和回归场景。验证时运行项目现有 test 命令,确认失败信息能定位到用户行为或组件契约。
119
+ Produce test files in the same directory as the component or in the directory agreed upon by the project, covering core interactions, status and regression scenarios. During verification, run the existing test command of the project to confirm that the failure information can be located to user behavior or component contract.
@@ -1,21 +1,21 @@
1
1
  ---
2
2
  name: fec-data-fetching
3
- description: Use when implementing or reviewing frontend server-state flows: typed queries, request caching, invalidation, mutations, optimistic updates, infinite queries, prefetch, SSR hydration, or API-layer integration. Do not use for local UI state or Service Worker caching; Chinese triggers include 数据获取, 缓存, 乐观更新.
3
+ description: "Use when implementing or reviewing frontend server-state flows: typed queries, request caching, invalidation, mutations, optimistic updates, infinite queries, prefetch, SSR hydration, or API-layer integration. Do not use for local UI state or Service Worker caching; Chinese triggers include data fetch, cache, optimistic updates."
4
4
  ---
5
5
 
6
- # Server State 数据获取
6
+ # Server State data acquisition
7
7
 
8
8
  ## Purpose
9
9
 
10
- 为前端 server state 建立清晰的数据获取、缓存、失效和提交边界,避免请求状态散落在页面组件中。
10
+ Establish clear data acquisition, caching, invalidation and submission boundaries for front-end server state to avoid request state being scattered among page components.
11
11
 
12
12
  ## Procedure
13
13
 
14
- 1. 判断状态来源:来自服务端且需要缓存、去重、刷新、分页或 mutation 时使用请求缓存方案;纯本地 UI 状态用组件 state 或 store。
15
- 2. 先沿用项目已有数据获取库;新增依赖时 React/Vue/Solid/Svelte 可考虑 TanStack Query,也可沿用 SWR、Nuxt/Nitro 数据获取或项目封装。
16
- 3. 设计稳定 cache key/query key:结构包含实体、动作和所有影响结果的参数。
17
- 4. API 函数保持纯请求函数,数据 hook/composable 负责缓存、select、loading/error/empty 状态。
18
- 5. mutation 成功后 invalidation;需要即时反馈时使用 optimistic update 并在失败时回滚。
14
+ 1. Determine the source of the state: use the request caching scheme when it comes from the server and needs caching, deduplication, refreshing, paging or mutation; use component state or store for purely local UI state.
15
+ 2. First use the existing data acquisition library of the project; when adding dependencies, you can consider TanStack Query for React/Vue/Solid/Svelte, or you can also use SWR, Nuxt/Nitro data acquisition or project encapsulation.
16
+ 3. Stable design cache key/query key: The structure contains entities, actions and all parameters that affect the results.
17
+ 4. The API function remains a pure request function, and the data hook/composable is responsible for cache, select, loading/error/empty status.
18
+ 5. Invalidation after mutation succeeds; use optimistic update when immediate feedback is needed and rollback when failure occurs.
19
19
 
20
20
  ## React Quick Start
21
21
 
@@ -45,18 +45,18 @@ export function useCreateUser() {
45
45
  }
46
46
  ```
47
47
 
48
- ## 详细参考
48
+ ## Detailed reference
49
49
 
50
- 涉及是否需要查询库、QueryClient 默认配置、Vue adapter、乐观更新、无限滚动查询、预取、SSR 水合和 API 层整合时,加载 [references/query-patterns.md](references/query-patterns.md)。
50
+ Load [references/query-patterns.md](references/query-patterns.md) when it comes to whether you need a query library, QueryClient default configuration, Vue adapter, optimistic updates, infinite scroll queries, prefetching, SSR hydration, and API layer integration.
51
51
 
52
52
  ## Constraints
53
53
 
54
- - 相同数据必须复用相同 cache key/query key;参数缺失会造成缓存串读。
55
- - `staleTime` 过长会显示旧数据,过短会造成频繁请求。
56
- - 请求缓存库不管理本地 UI 状态;不要把 modal、输入框值放进 query cache。
57
- - 乐观更新必须保存快照并在失败时回滚。
58
- - SSR/SSG 场景必须使用框架支持的预取、水合或服务端数据边界。
54
+ - The same data must reuse the same cache key/query key; missing parameters will cause cache string reading.
55
+ - If `staleTime` is too long, old data will be displayed, and if it is too short, it will cause frequent requests.
56
+ - The request cache library does not manage local UI state; do not put modal and input box values into the query cache.
57
+ - Optimistic updates must save snapshots and rollback on failure.
58
+ - SSR/SSG scenarios must use framework-supported prefetching, hydration, or server-side data boundaries.
59
59
 
60
60
  ## Expected Output
61
61
 
62
- 数据获取层具备 loading/error/empty/data 状态,重复请求自动去重,mutation 后缓存正确失效或回滚,API 层与 UI 层边界清晰。
62
+ The data acquisition layer has loading/error/empty/data status, repeated requests are automatically deduplicated, the cache is correctly invalidated or rolled back after mutation, and the boundary between the API layer and the UI layer is clear.
@@ -1,32 +1,32 @@
1
- # Server State 数据获取模式
1
+ # Server State data acquisition mode
2
2
 
3
- ## 先判断是否需要查询库
3
+ ## First determine whether a query library is needed
4
4
 
5
- - 简单静态请求、一次性提交或已有框架 loader 足够表达的页面,不必默认引入查询库。
6
- - 需要跨组件缓存、去重、后台刷新、分页、乐观更新、预取或 SSR hydration 时,再使用 TanStack Query、SWR、Nuxt 数据获取或项目既有请求缓存方案。
7
- - 查询库只管理 server state,不替代本地 UI 状态、表单状态、权限判断或 Service Worker 缓存。
5
+ - Simple static requests, one-time submissions, or pages with sufficient expression in the existing framework loader do not need to introduce the query library by default.
6
+ - When cross-component caching, deduplication, background refresh, paging, optimistic updates, prefetching or SSR hydration are required, use TanStack Query, SWR, Nuxt data acquisition or the project's existing request caching solution.
7
+ - The query library only manages server state and does not replace local UI state, form state, permission judgment or Service Worker cache.
8
8
 
9
- ## 选型参考
9
+ ## Selection reference
10
10
 
11
- 先沿用仓库已有请求层和缓存方案;新增依赖时再按框架与复杂度选择。
11
+ First, use the existing request layer and caching solution in the warehouse; when adding new dependencies, choose based on the framework and complexity.
12
12
 
13
- | 场景 | 候选方案 | 注意点 |
13
+ | Scenarios | Alternative solutions | Notes |
14
14
  | --- | --- | --- |
15
- | React server state | TanStack Query / SWR / 项目既有封装 | TanStack Query 适合 mutation、invalidation 和无限查询;SWR 适合轻量读取缓存。 |
16
- | Vue server state | TanStack Query Vue adapter / VueUse / Nuxt `useFetch` / 项目既有封装 | 不要让 Vue 项目照搬 React-only hook 示例。 |
17
- | Solid / Svelte / 跨框架 | TanStack Query 对应 adapter 或项目既有资源层 | cache key、staleTime、mutation 回滚原则保持一致。 |
18
- | 简单页面请求 | 框架 loader、组件内轻量请求或 API composable | 仍要处理 loading/error/empty 和取消或过期响应。 |
19
- | SSR / SSG | 框架预取、水合或服务端数据边界 | 确保服务端 key 与客户端 key 一致,避免重复请求和水合错配。 |
15
+ | React server state | TanStack Query / SWR / Project existing package | TanStack Query is suitable for mutation, invalidation and infinite queries; SWR is suitable for lightweight read caching. |
16
+ | Vue server state | TanStack Query Vue adapter / VueUse / Nuxt `useFetch` / Project existing package | Don’t let Vue projects copy React-only hook examples. |
17
+ | Solid / Svelte / Cross-framework | TanStack Query corresponds to the existing resource layer of the adapter or project | The cache key, staleTime, and mutation rollback principles are consistent. |
18
+ | Simple page requests | Framework loaders, lightweight requests within components, or API composable | Still have to handle loading/error/empty and cancellation or expiration responses. |
19
+ | SSR / SSG | Framework prefetching, hydration or server-side data boundaries | Ensure that the server key is consistent with the client key to avoid repeated requests and hydration mismatches. |
20
20
 
21
- ## 通用边界
21
+ ## Universal Boundary
22
22
 
23
- - API 函数只负责请求、解析和错误归一化,不包含 UI toast、loading 或缓存逻辑。
24
- - cache key/query key 必须包含所有影响响应的参数。
25
- - mutation 成功后按实体或列表失效;乐观更新必须先保存快照,失败时回滚。
26
- - 无限查询只处理数据分页;DOM 虚拟化由列表虚拟化流程处理。
27
- - 预取要有明确用户路径或首屏收益,不为所有可能数据提前请求。
23
+ - API functions are only responsible for requesting, parsing and error normalization, and do not include UI toast, loading or caching logic.
24
+ - The cache key/query key must contain all parameters that affect the response.
25
+ - Mutation fails by entity or list after success; optimistic update must save the snapshot first and roll back when it fails.
26
+ - Infinite queries only handle data paging; DOM virtualization is handled by the list virtualization process.
27
+ - Prefetching must have a clear user path or above-the-fold revenue, and do not request all possible data in advance.
28
28
 
29
- ## QueryClient 默认配置
29
+ ## QueryClient default configuration
30
30
 
31
31
  ```tsx
32
32
  const queryClient = new QueryClient({
@@ -43,11 +43,11 @@ const queryClient = new QueryClient({
43
43
 
44
44
  ## Query Key
45
45
 
46
- - 推荐:`["users", "list", { page, status }]`
47
- - 详情:`["users", "detail", userId]`
48
- - 所有影响请求结果的参数都必须进入 key。
46
+ - Recommended: `["users", "list", { page, status }]`
47
+ - Details: `["users", "detail", userId]`
48
+ - All parameters that affect the request result must enter key.
49
49
 
50
- ## 乐观更新
50
+ ## Optimistic update
51
51
 
52
52
  ```tsx
53
53
  const mutation = useMutation({
@@ -82,9 +82,9 @@ const feed = useInfiniteQuery({
82
82
  });
83
83
  ```
84
84
 
85
- 虚拟列表场景将数据分页与 DOM 虚拟化分开设计。
85
+ The virtual list scenario is designed to separate data paging and DOM virtualization.
86
86
 
87
- ## API 层整合
87
+ ## API layer integration
88
88
 
89
89
  ```ts
90
90
  export async function getUserList(params: GetUserListParams): Promise<GetUserListResponse> {
@@ -100,4 +100,4 @@ export function useUsers(params: GetUserListParams) {
100
100
  }
101
101
  ```
102
102
 
103
- API 函数不包含 UI toast、loading 或缓存逻辑。
103
+ API functions do not contain UI toast, loading or caching logic.