@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,34 +1,34 @@
1
1
  ---
2
2
  name: fec-browser-storage
3
- description: Use when choosing, implementing, or reviewing browser storage such as localStorage, sessionStorage, IndexedDB, cookies, client persistence, offline data, secure storage, or cleanup strategy; Chinese triggers include 浏览器存储, 客户端持久化.
3
+ description: Use when choosing, implementing, or reviewing browser storage such as localStorage, sessionStorage, IndexedDB, cookies, client persistence, offline data, secure storage, or cleanup strategy; Chinese triggers include browser storage, client persistence.
4
4
  ---
5
5
 
6
- # 浏览器存储
6
+ # Browser storage
7
7
 
8
8
  ## Purpose
9
9
 
10
- 根据数据大小、安全要求和生命周期选择合适的客户端存储方案。
10
+ Choose the appropriate client storage solution based on data size, security requirements, and lifecycle.
11
11
 
12
12
  ## Procedure
13
13
 
14
- 1. 先判断数据敏感度、体积、生命周期、是否需要跨 Tab、是否需要随请求发送。
15
- 2. 小量非敏感偏好用 localStorage;Tab 级临时数据用 sessionStorage;大量结构化数据或离线缓存用 IndexedDB;认证态优先 httpOnly cookie。
16
- 3. 封装统一 key 前缀、JSON parse/stringify、异常处理、过期清理和 quota 兜底。
17
- 4. 敏感数据按安全规则处理,不把明文 token、密码、信用卡信息放进可被 JS 读取的存储。
18
- 5. 审查隐私模式、存储配额、清理策略和跨浏览器兼容性。
14
+ 1. First determine the data sensitivity, volume, life cycle, whether it needs to be spread across tabs, and whether it needs to be sent with the request.
15
+ 2. Use localStorage for a small amount of non-sensitive preferences; use sessionStorage for tab-level temporary data; use IndexedDB for large amounts of structured data or offline caching; prioritize httpOnly cookies for authentication status.
16
+ 3. Encapsulate unified key prefix, JSON parse/stringify, exception handling, expiration cleanup and quota protection.
17
+ 4. Sensitive data is processed according to security rules, and plain text tokens, passwords, and credit card information are not put into storage that can be read by JS.
18
+ 5. Review privacy mode, storage quotas, sanitization policies, and cross-browser compatibility.
19
19
 
20
- ## 详细参考
20
+ ## Detailed reference
21
21
 
22
- 涉及存储选型表、localStorage/sessionStorage 封装、IndexedDB 示例、Cookie 辅助方法和敏感数据规则时,加载 [references/storage-patterns.md](references/storage-patterns.md)。
22
+ Load [references/storage-patterns.md](references/storage-patterns.md) when it comes to storage selection tables, localStorage/sessionStorage wrappers, IndexedDB examples, cookie helpers, and sensitive data rules.
23
23
 
24
24
  ## Constraints
25
25
 
26
- - localStorage/sessionStorage 是同步 API,大数据读写会阻塞主线程。
27
- - 除 httpOnly cookie 外,客户端存储都可被 XSS 读取。
28
- - Cookie 每次请求自动携带,不适合大数据。
29
- - IndexedDB 配额和隐私模式行为有浏览器差异。
30
- - URL 中不要传 token 或敏感数据。
26
+ - localStorage/sessionStorage is a synchronous API, and big data reading and writing will block the main thread.
27
+ - Except for httpOnly cookies, client-side storage can be read by XSS.
28
+ - Cookies are automatically carried with each request and are not suitable for big data.
29
+ - There are browser differences in IndexedDB quota and privacy mode behavior.
30
+ - Do not pass token or sensitive data in the URL.
31
31
 
32
32
  ## Expected Output
33
33
 
34
- 产出统一的 storage/cookie/db 封装,key 有命名空间,数据有过期或清理策略,敏感数据只进入合适的安全边界。
34
+ Produce a unified storage/cookie/db package, the key has a namespace, the data has an expiration or cleanup policy, and sensitive data only enters the appropriate security boundary.
@@ -1,15 +1,15 @@
1
- # 浏览器存储模式
1
+ # Browser storage mode
2
2
 
3
- ## 选型表
3
+ ## Selection table
4
4
 
5
- | 存储 | 容量 | API | 是否发送服务端 | 适用场景 | 安全性 |
5
+ | Storage | Capacity | API | Whether to send to the server | Applicable scenarios | Security |
6
6
  | --- | --- | --- | --- | --- | --- |
7
- | LocalStorage | ~5MB | 同步 | 否 | 用户偏好、非敏感持久数据 | XSS 可读取 |
8
- | SessionStorage | ~5MB | 同步 | 否 | Tab 级临时数据 | XSS 可读取 |
9
- | IndexedDB | 大 | 异步 | 否 | 大数据、文件、离线缓存 | XSS 可读取 |
10
- | Cookie | ~4KB | 同步 | 是 | 认证 Session/httpOnly token | httpOnly 可防 JS 读取 |
7
+ | LocalStorage | ~5MB | Sync | No | User preferences, non-sensitive persistent data | XSS Readable |
8
+ | SessionStorage | ~5MB | Sync | No | Tab-sized temporary data | XSS Readable |
9
+ | IndexedDB | Large | Asynchronous | No | Big data, file, offline cache | XSS readable |
10
+ | Cookie | ~4KB | Synchronization | Yes | Authentication Session/httpOnly token | httpOnly can prevent JS reading |
11
11
 
12
- ## localStorage 封装
12
+ ## localStorage encapsulation
13
13
 
14
14
  ```ts
15
15
  const STORAGE_PREFIX = "app:";
@@ -53,13 +53,13 @@ export const db = openDB("app-offline-db", 1, {
53
53
 
54
54
  ## Cookie
55
55
 
56
- - httpOnly 只能由服务端设置。
57
- - 认证 Cookie 使用 `Secure`、`SameSite=Lax/Strict`。
58
- - 需要跨站点嵌入时才考虑 `SameSite=None; Secure`。
56
+ - httpOnly can only be set by the server.
57
+ - Authentication Cookie uses `Secure`, `SameSite=Lax/Strict`.
58
+ - Only consider `SameSite=None; Secure` when cross-site embedding is required.
59
59
 
60
- ## 敏感数据规则
60
+ ## Sensitive data rules
61
61
 
62
- - 认证 token、刷新 token、Session ID:优先 httpOnly cookie。
63
- - 用户偏好:localStorage。
64
- - 表单草稿:sessionStorage 或 IndexedDB,避免敏感字段。
65
- - 离线数据:IndexedDB,但不要缓存隐私或高价值敏感数据。
62
+ - Authentication token, refresh token, Session ID: priority is given to httpOnly cookie.
63
+ - User preference: localStorage.
64
+ - Form draft: sessionStorage or IndexedDB, avoid sensitive fields.
65
+ - Offline data: IndexedDB, but do not cache private or high-value sensitive data.
@@ -1,23 +1,23 @@
1
1
  ---
2
2
  name: fec-canvas-threejs
3
- description: Use when building or reviewing Canvas 2D, Three.js/WebGL, React Three Fiber, GLSL shaders, ShaderToy-to-WebGL adaptation, 2D/3D visualization, game rendering, animation loops, GPU resource cleanup, or rendering performance. Do not use for standard DOM UI, charts already covered by a chart library, or non-graphical performance work; Chinese triggers include Canvas, Three.js, WebGL, GLSL, Shader, 3D, 数据可视化, 游戏.
3
+ description: Use when building or reviewing Canvas 2D, Three.js/WebGL, React Three Fiber, GLSL shaders, ShaderToy-to-WebGL adaptation, 2D/3D visualization, game rendering, animation loops, GPU resource cleanup, or rendering performance. Do not use for standard DOM UI, charts already covered by a chart library, or non-graphical performance work; Chinese triggers include Canvas, Three.js, WebGL, GLSL, Shader, 3D, data visualization, games.
4
4
  ---
5
5
 
6
- # Canvas 与 Three.js
6
+ # Canvas and Three.js
7
7
 
8
8
  ## Purpose
9
9
 
10
- 在浏览器中实现高性能 2D/3D 图形渲染。
10
+ Enable high-performance 2D/3D graphics rendering in the browser.
11
11
 
12
12
  ## Procedure
13
13
 
14
- 1. 先选渲染层:标准 UI 用 DOM;简单 2D 图形/签名/粒子用 Canvas 2D;3D 模型、空间交互和复杂粒子用 Three.js/WebGL;React 项目中的声明式 3D 用 React Three Fiber。
15
- 2. 为渲染容器定义稳定尺寸、DPI 适配和 resize 行为;Canvas 不会自动随 CSS 清晰缩放。
16
- 3. 动画循环使用 `requestAnimationFrame`,不可见或无变化时暂停,卸载时取消。
17
- 4. Three.js 必须释放 geometry/material/texture/renderer,并移除事件监听和 observer。
18
- 5. Shader/WebGL 任务先识别是 SDF、ray marching、noise、particle、post-processing、multipass 还是调试问题,再决定是否需要原生 WebGL2、Three.js ShaderMaterial 或 R3F。
19
- 6. WebGL2 适配时检查 GLSL 版本、入口函数、varying/in-out、texture API、uniform 使用和函数声明顺序,避免白屏只留控制台错误。
20
- 7. 对不可访问的图形内容提供 `aria-label`、替代文本或 DOM 版摘要;交互式图形要有键盘兜底。
14
+ 1. First select the rendering layer: DOM for standard UI; Canvas 2D for simple 2D graphics/signatures/particles; Three.js/WebGL for 3D models, spatial interactions and complex particles; React Three Fiber for declarative 3D in React projects.
15
+ 2. Define stable size, DPI adaptation, and resize behavior for the render container; Canvas does not automatically scale cleanly with CSS.
16
+ 3. The animation loop uses `requestAnimationFrame`, which is paused when it is invisible or has no changes, and canceled when it is uninstalled.
17
+ 4. Three.js must release geometry/material/texture/renderer and remove event listeners and observers.
18
+ 5. Shader/WebGL tasks first identify whether it is an SDF, ray marching, noise, particle, post-processing, multipass or debugging issue, and then decide whether native WebGL2, Three.js ShaderMaterial or R3F is required.
19
+ 6. Check the GLSL version, entry function, varying/in-out, texture API, uniform usage and function declaration order when adapting to WebGL2 to avoid white screen leaving only console errors.
20
+ 7. Provide `aria-label`, alternative text or DOM summary for inaccessible graphic content; interactive graphics must have keyboard support.
21
21
 
22
22
  ## Core Patterns
23
23
 
@@ -45,22 +45,22 @@ return () => {
45
45
  };
46
46
  ```
47
47
 
48
- ## 详细参考
48
+ ## Detailed reference
49
49
 
50
- 涉及 Canvas 2D 绘图、动画循环、Three.js 场景搭建、React Three Fiber、InstancedMesh 和性能清理时,加载 [references/rendering-patterns.md](references/rendering-patterns.md)。
50
+ Load [references/rendering-patterns.md](references/rendering-patterns.md) when it comes to Canvas 2D drawing, animation loops, Three.js scene building, React Three Fiber, InstancedMesh, and performance cleanup.
51
51
 
52
- 涉及着色器路由、WebGL2 适配、GLSL 调试、多 pass 预算和视觉验证时,加载 [references/shader-webgl-patterns.md](references/shader-webgl-patterns.md)。
52
+ Load [references/shader-webgl-patterns.md](references/shader-webgl-patterns.md) when it comes to shader routing, WebGL2 adaptation, GLSL debugging, multi-pass budgeting, and visual verification.
53
53
 
54
54
  ## Constraints
55
55
 
56
- - Canvas/WebGL 内容对屏幕阅读器不可见,必须提供替代语义。
57
- - WebGL 消耗 GPU,低端设备需限制像素比、面数和纹理大小。
58
- - Three.js 资源不会自动释放,遗漏 `dispose()` 会造成 GPU 内存泄漏。
59
- - Canvas 响应式必须同步 CSS 尺寸、绘图尺寸和相机/viewport。
60
- - 复杂布局/路径规划可联用后台线程 workflow,但渲染本身仍在主线程/渲染线程协调。
61
- - Shader 主循环、采样层数和多 pass 数量必须有预算;低端设备上要降低 DPR、步数、粒子数或禁用重后处理。
62
- - 交付前必须确认 canvas 非空、尺寸正确、resize 后不拉伸、控制台无 shader compile/link 错误。
56
+ - Canvas/WebGL content is not visible to screen readers and alternative semantics must be provided.
57
+ - WebGL consumes GPU, and low-end devices need to limit the pixel ratio, number of faces and texture size.
58
+ - Three.js resources will not be released automatically, and missing `dispose()` will cause GPU memory leaks.
59
+ - Canvas responsive must synchronize CSS dimensions, drawing dimensions, and camera/viewport.
60
+ - Complex layout/path planning can be combined with the background thread workflow, but the rendering itself is still coordinated on the main thread/rendering thread.
61
+ - The Shader main loop, number of sampling layers, and number of multi-passes must be budgeted; on low-end devices, reduce the DPR, number of steps, number of particles, or disable heavy post-processing.
62
+ - Before delivery, you must confirm that the canvas is not empty, has the correct size, is not stretched after resize, and has no shader compile/link errors in the console.
63
63
 
64
64
  ## Expected Output
65
65
 
66
- 2D/3D 场景清晰、响应式、可清理,关键设备上接近 60fps;用户能通过替代文本或键盘路径理解/操作核心内容。
66
+ 2D/3D scenes are crisp, responsive, cleanable, and close to 60fps on key devices; users can understand/operate with core content via alt text or keyboard paths.
@@ -1,4 +1,4 @@
1
- # Canvas、Three.js 与 R3F 模式
1
+ # Canvas, Three.js and R3F mode
2
2
 
3
3
  ## Canvas 2D
4
4
 
@@ -14,7 +14,7 @@ ctx.arc(100, 100, 30, 0, Math.PI * 2);
14
14
  ctx.fill();
15
15
  ```
16
16
 
17
- ## 动画循环
17
+ ## Animation loop
18
18
 
19
19
  ```ts
20
20
  let animationId = 0;
@@ -30,7 +30,7 @@ animate();
30
30
  return () => cancelAnimationFrame(animationId);
31
31
  ```
32
32
 
33
- ## Three.js 基础场景
33
+ ## Three.js basic scenario
34
34
 
35
35
  ```ts
36
36
  const scene = new THREE.Scene();
@@ -47,7 +47,7 @@ scene.add(cube);
47
47
  ## React Three Fiber
48
48
 
49
49
  ```tsx
50
- <Canvas camera={{ position: [0, 0, 5], fov: 75 }} role="img" aria-label="3D 产品预览">
50
+ <Canvas camera={{ position: [0, 0, 5], fov: 75 }} role="img" aria-label="3D Product Preview">
51
51
  <ambientLight intensity={0.5} />
52
52
  <directionalLight position={[5, 5, 5]} />
53
53
  <mesh>
@@ -58,10 +58,10 @@ scene.add(cube);
58
58
  </Canvas>
59
59
  ```
60
60
 
61
- ## 性能与清理
61
+ ## Performance and cleanup
62
62
 
63
- - 纹理尽量压缩并限制尺寸,常规上限先按 2048px 评估。
64
- - 重复几何体用 `InstancedMesh`。
65
- - 不需要持续重绘时暂停 animation loop。
66
- - 卸载时释放 geometry、material、texture、renderer、controls。
67
- - ResizeObserver 更新相机 aspect 和 renderer size。
63
+ - Textures are compressed as much as possible and the size is limited. The normal upper limit is first evaluated at 2048px.
64
+ - Use `InstancedMesh` for repeated geometry.
65
+ - Pause animation loop when continuous redrawing is not required.
66
+ - Release geometry, material, texture, renderer, and controls when uninstalling.
67
+ - ResizeObserver updates camera aspect and renderer size.
@@ -1,28 +1,28 @@
1
- # Shader 与 WebGL 模式
1
+ # Shader and WebGL mode
2
2
 
3
- ## 技术选型参考
3
+ ## Technical selection reference
4
4
 
5
- | 目标 | 推荐起点 | 注意事项 |
5
+ | Goals | Recommended starting points | Notes |
6
6
  | ------------------ | ------------------ | ------------------------------ |
7
- | 数学几何 3D 形态 | SDF + 光线步进 | 步数上限、法线质量、软阴影开销 |
8
- | 有机运动效果 | 噪声 + 域扭曲 | 过度绘制、重复噪声调用 |
9
- | 粒子效果 | 实例化或着色器粒子 | 移动端粒子数量上限、混合开销 |
10
- | 泛光/故障/色彩调整 | 后处理通道 | 额外帧缓冲区显存 |
11
- | 持续模拟 | 乒乓帧缓冲区 | 纹理格式支持 |
12
- | 白屏调试 | 编译/链接日志 | 函数顺序、被优化掉的 uniform |
7
+ | Mathematical Geometry 3D Shape | SDF + Ray Stepping | Step Limit, Normal Quality, Soft Shadow Overhead |
8
+ | Organic motion effects | Noise + domain distortion | Overdraw, repeated noise calls |
9
+ | Particle effects | Instanced or shader particles | Mobile particle limit, blending overhead |
10
+ | Bloom/Glitch/Color Adjustments | Post-Processing Passes | Extra Frame Buffer Video Memory |
11
+ | Continuous Simulation | Ping Pong Frame Buffer | Texture Format Support |
12
+ | White screen debugging | Compilation/link log | Function order, optimized uniform |
13
13
 
14
- ## WebGL2 适配清单
14
+ ## WebGL2 adaptation list
15
15
 
16
- - 片元着色器以 `#version 300 es` 开头。
17
- - 添加 `precision highp float;` 和 `out vec4 fragColor;`。
18
- - 用 `in`/`out` 替代旧版 `varying`。
19
- - 用 `texture()` 替代 `texture2D()`。
20
- - 将 ShaderToy 风格的 `mainImage` 包装为标准 `main`。
21
- - 使用 `gl_FragCoord.xy` 获取片元坐标。
22
- - 辅助函数必须在被调用前声明。
23
- - 预计算常量,不要在宏定义中放函数调用。
16
+ - Fragment shaders start with `#version 300 es`.
17
+ - Added `precision highp float;` and `out vec4 fragColor;`.
18
+ - Replace old `varying` with `in`/`out`.
19
+ - Use `texture()` instead of `texture2D()`.
20
+ - Wrap ShaderToy style `mainImage` into standard `main`.
21
+ - Use `gl_FragCoord.xy` to obtain fragment coordinates.
22
+ - Helper functions must be declared before being called.
23
+ - Precompute constants, don't put function calls in macro definitions.
24
24
 
25
- ## 运行时骨架
25
+ ## Runtime skeleton
26
26
 
27
27
  ```ts
28
28
  const gl = canvas.getContext("webgl2");
@@ -42,26 +42,26 @@ function compile(type: number, source: string) {
42
42
  }
43
43
  ```
44
44
 
45
- ## 性能预算
45
+ ## Performance budget
46
46
 
47
- - 光线步进步数:从 64 起步,仅在出现伪影且证明必要时再提升。
48
- - 体积采样:桌面端每条射线 16-24 次,移动端酌情降低。
49
- - FBM 倍频:从 4 开始;避免在光线循环内嵌套 FBM。
50
- - DPR:桌面端上限 2,移动端重度场景上限 1.5。
51
- - 纹理尺寸:使用压缩或缩放资源;不要假设 4K 纹理是安全的。
47
+ - Ray Steps: Start at 64 and only increase if artifacts appear and prove necessary.
48
+ - Volume sampling: 16-24 times per ray on desktop, lower as appropriate on mobile.
49
+ - FBM multiplier: starts from 4; avoid nesting FBMs inside ray loops.
50
+ - DPR: The upper limit is 2 on desktop and 1.5 in severe scenarios on mobile.
51
+ - Texture dimensions: Use compressed or scaled assets; don't assume 4K textures are safe.
52
52
 
53
- ## 调试视图
53
+ ## Debug view
54
54
 
55
- - 法线:输出归一化后的法线,映射到 0-1 范围。
56
- - 步数:输出当前步数除以最大步数。
57
- - 距离/深度:以灰度输出命中距离。
58
- - UV:映射后输出 `vec3(uv, 0.0)`。
59
- - 材质 ID:将 ID 映射到少量固定调色板。
55
+ - Normal: Outputs the normalized normal, mapped to the 0-1 range.
56
+ - Number of steps: Output the current number of steps divided by the maximum number of steps.
57
+ - Distance/Depth: Outputs hit distance in grayscale.
58
+ - UV: Output `vec3(uv, 0.0)` after mapping.
59
+ - Material IDs: Map IDs to a small number of fixed palettes.
60
60
 
61
- ## 视觉验证
61
+ ## Visual verification
62
62
 
63
- - 桌面端和移动端尺寸下 Canvas 不为空白。
64
- - 缩放时更新绘制缓冲区、视口、相机纵横比和 uniform。
65
- - 低功耗模式下仍能响应,或有静态降级方案。
66
- - 控制台无着色器编译/链接错误。
67
- - 卸载或场景隐藏时停止动画。
63
+ - Canvas is not blank in desktop and mobile sizes.
64
+ - Update draw buffer, viewport, camera aspect ratio and uniform when zooming.
65
+ - Still responsive in low power mode, or there may be a static degradation solution.
66
+ - No shader compilation/linking errors in the console.
67
+ - Stop animation when unloading or scene hidden.
@@ -1,143 +1,162 @@
1
1
  ---
2
2
  name: fec-code-review
3
- description: Use when the user asks for general frontend code review, PR review, merge-readiness assessment, architecture maintainability, type-safety, rendering/state risks, style consistency, testability gaps, or a cross-cutting review summary. Delegate deep security, accessibility, E2E, or performance investigations to their specialized skills; Chinese triggers include 代码审查, 代码评审, review.
3
+ description: Use when the user asks for general frontend code review, PR review, merge-readiness assessment, architecture maintainability, type-safety, rendering/state risks, style consistency, testability gaps, or a cross-cutting review summary. Delegate deep security, accessibility, E2E, or performance investigations to their specialized skills; Chinese triggers include code review, code review, review.
4
4
  ---
5
5
 
6
- # 前端代码评审
6
+ # Front-end code review
7
+
8
+ ## Review modes and coverage
9
+
10
+ User-specified scope takes precedence over the default. Use the following three review modes:
11
+
12
+ - **Change review**: only when recent changes, current edits, staged changes, a PR or a commit are explicitly requested or clearly established by the active task, review those changes and necessary context. For local changes, inspect staged and unstaged diffs and relevant untracked project files within the requested scope; a staged-only request reviews only staged changes. If there are no changes, report that there is nothing to review; do not switch to recent commits or expand scope automatically.
13
+ - **Targeted review**: when files or directories are specified, inventory and review existing code in that scope, including unchanged code; no Git diff is required.
14
+ - **Project review (default)**: when no scope or change context is specified, or when the entire project is requested, inventory project-owned frontend code, related tests, configuration and dependency declarations, then review in module batches, including unchanged code; no Git diff is required.
15
+
16
+ Select scope before collecting diffs. A file/directory alone means full review of that scope; a path combined with an explicit change request restricts incremental review to that path. An unqualified invocation defaults to project review even if Git changes exist. At review start, state the selected mode and target scope. When automatically delegating review after edits, pass the current change scope explicitly; do not trigger project review merely because the reviewer was called.
17
+
18
+ Exclude dependency directories, build outputs, caches, generated files and third-party code by default, and record exclusions. Keep the frontend responsibility boundary; this is not a backend audit. A nonexistent target or a scope with no relevant files must be reported explicitly, not replaced with another scope.
19
+
20
+ Merge findings with the same root cause across batches. Report **review mode, target scope, reviewed files/modules, exclusions, unreviewed files/modules, completion status and verification commands/results**. If context or execution limits prevent completion, mark the review partial and list remaining modules; never claim complete project coverage. Reading callers for context or running project-wide lint/typecheck does not count as manual review of those files.
21
+
22
+ Change reviews retain merge recommendations. Targeted and project reviews use a risk assessment (Low / Medium / High, with blocking findings), not a claim of merge readiness. Preserve severity levels, evidence requirements and report filenames. Output reports only unless repairs are explicitly requested.
7
23
 
8
24
  ## Purpose
9
25
 
10
- 从架构、类型安全、可访问性、样式一致性、性能和可测试性等 8 个维度审查前端代码质量,输出分级评审报告。
26
+ Review the front-end code quality from 8 dimensions including architecture, type safety, accessibility, style consistency, performance and testability, and output a graded review report.
11
27
 
12
28
  ## Procedure
13
29
 
14
- 1. 先读项目事实:package scripts、框架、目录约定、最近 diff、现有测试和相关规则。
15
- 2. 按风险找问题,而不是按个人偏好挑风格;每个发现都要能指向具体文件、行号和用户影响。
16
- 3. 用五轴收敛结论:正确性、可维护性、类型/接口、用户体验、验证覆盖。
17
- 4. 对安全、无障碍、E2E、性能等深水区只做初筛;需要专项调查时明确分流。
18
- 5. 多维评审时先按职责拆分,再合并同类发现;同一文件同一根因只保留一条主发现,避免重复噪声。
19
- 6. 报告先列阻塞问题,再列建议项;没有证据的问题不要写成确定结论。
30
+ 1. Read the project facts first: package scripts, frameworks, directory conventions, recent diffs, existing tests and related rules.
31
+ 2. Find problems based on risk, rather than picking styles based on personal preference; each finding must be able to point to specific files, line numbers, and user impacts.
32
+ 3. Use five axes to converge conclusions: correctness, maintainability, type/interface, user experience, and verification coverage.
33
+ 4. Only preliminary screening will be done for deep water areas such as safety, accessibility, E2E, and performance; diversion will be clearly defined when special investigation is needed.
34
+ 5. During multi-dimensional review, first split according to responsibilities, and then merge similar findings; only one main finding for the same root cause of the same file is retained to avoid repeated noise.
35
+ 6. List blocking issues first in the report, then recommendations; do not write firm conclusions on issues without evidence.
20
36
 
21
- ## 多维评审编排
37
+ ## Multi-dimensional review arrangement
22
38
 
23
- 当改动跨越多个质量维度时,按“主评审 + 专项分流”组织,而不是让所有维度重复检查同一处代码。
39
+ When changes span multiple quality dimensions, organize them according to "main review + special diversion" instead of having all dimensions repeatedly check the same code.
24
40
 
25
- | 维度 | 触发条件 | 分流边界 |
41
+ | Dimension | Trigger condition | Diversion boundary |
26
42
  | ------------------- | ---------------------------------------------------- | ------------------------------------ |
27
- | TypeScript 工程与类型契约 | DTO、泛型、公共类型、类型守卫、`any`、断言、tsconfig | 深入类型建模和 TS 配置交给 TypeScript 流程 |
28
- | 状态管理 | 状态归属、全局 store、URL 状态、派生状态、跨页面同步 | 状态选型与迁移交给状态管理专项流程 |
29
- | 安全 | 用户输入、HTML 渲染、token、上传、第三方脚本 | 漏洞级分析交给安全专项流程 |
30
- | 无障碍 | 弹窗、菜单、表单、键盘操作、焦点管理 | WCAG 细查交给无障碍专项流程 |
31
- | 性能 | 大列表、重依赖、重复请求、长任务、包体积 | 性能证据与预算交给性能专项流程 |
32
- | E2E | 关键用户路径、登录态、支付、跨页面流程 | 浏览器用例与 trace 交给 E2E 专项流程 |
43
+ | TypeScript Projects and Type Contracts | DTOs, generics, public types, type guards, `any`, assertions, tsconfig | In-depth type modeling and TS configuration handed over to the TypeScript process |
44
+ | State management | State attribution, global store, URL state, derived state, cross-page synchronization | State selection and migration are handed over to the state management special process |
45
+ | Security | User input, HTML rendering, token, upload, third-party script | Vulnerability level analysis is handed over to the security-specific process |
46
+ | Accessibility | Pop-up windows, menus, forms, keyboard operations, focus management | WCAG scrutinizes the special accessibility process |
47
+ | Performance | Large lists, heavy dependencies, repeated requests, long tasks, package sizes | Handle performance evidence and budget to the performance-specific process |
48
+ | E2E | Key user path, login status, payment, cross-page process | Browser use cases and traces are handed over to E2E special process |
33
49
 
34
- 发现合并规则:
50
+ Discover merge rules:
35
51
 
36
- - 同一根因出现在多个维度时,只保留最高严重级别,并在 `Dimension` 中列出相关维度。
37
- - 同一文件多处重复模式,合并为一条模式级发现,列出代表性位置。
38
- - 置信度不足的问题放入 Open Questions,不升级为阻塞项。
39
- - 自动化可稳定捕获的格式问题交给 lint/format,不作为人工评审主发现。
52
+ - When the same root cause appears in multiple dimensions, only the highest severity level is retained and the related dimensions are listed in `Dimension`.
53
+ - Repeated patterns in multiple places in the same file are merged into one pattern-level discovery, and representative locations are listed.
54
+ - Questions with insufficient confidence are placed in Open Questions and will not be upgraded to blocked items.
55
+ - Format issues that can be stably captured by automation are handed over to lint/format and are not discovered by human reviewers.
40
56
 
41
- ## 评审维度
57
+ ## Review dimensions
42
58
 
43
- 1. 架构
59
+ 1. Architecture
44
60
 
45
- - 组件边界是否清晰
46
- - 展示逻辑与业务逻辑是否分离
47
- - 是否有可复用抽象
48
- - 是否存在上帝组件
61
+ - Is the component boundary clear?
62
+ - Whether display logic and business logic are separated
63
+ - Is there a reusable abstraction?
64
+ - Whether there is a God component
49
65
 
50
- 2. 类型安全
66
+ 2. Type safety
51
67
 
52
- - 是否存在不必要的 `any`
53
- - props 类型是否明确
54
- - hooks/composables 返回值是否稳定
55
- - 在可行情况下 API 契约是否有类型约束
68
+ - Whether there is unnecessary `any`
69
+ - Is the props type clear?
70
+ - Is the return value of hooks/composables stable?
71
+ - Whether the API contract has type constraints where feasible
56
72
 
57
- 3. 渲染与状态
73
+ 3. Rendering and status
58
74
 
59
- - 是否存在不必要的重复渲染
60
- - key 的使用是否稳定
61
- - 可推导状态是否被重复存储
62
- - 本地状态是否耦合过深
63
- - 全局 store 是否只保存真正跨边界共享的客户端状态
64
- - URL 状态、服务端状态、表单状态和浏览器持久化是否边界清晰
75
+ - Is there unnecessary repeated rendering?
76
+ - Is the use of key stable?
77
+ - Whether the deducible state is stored repeatedly
78
+ - Is the local state coupled too deeply?
79
+ - Whether the global store only saves client state that is truly shared across borders
80
+ - Whether the boundaries between URL state, server state, form state and browser persistence are clear
65
81
 
66
- 4. 样式
82
+ 4. Style
67
83
 
68
- - 已有 Token 时是否还在使用 magic number
69
- - 类名是否与仓库约定一致
70
- - 响应式处理是否明确
71
- - 是否无必要地混用了多套样式体系
84
+ - Whether the magic number is still used when there is already a Token
85
+ - Whether the class name is consistent with the warehouse convention
86
+ - Is responsive processing clear?
87
+ - Are multiple style systems being mixed unnecessarily?
72
88
 
73
- 5. 可访问性
89
+ 5. Accessibility
74
90
 
75
- - 语义结构是否合理
76
- - 是否在需要时正确使用 label 和 aria
77
- - 是否支持键盘操作
78
- - 浮层和菜单的焦点管理是否正确
91
+ - Is the semantic structure reasonable?
92
+ - Whether label and aria are used correctly when needed
93
+ - Whether to support keyboard operation
94
+ - Is the focus management of floating layers and menus correct?
79
95
 
80
- 6. 可维护性
96
+ 6. Maintainability
81
97
 
82
- - 组件/页面文件规模是否合理(宜约 **300 行**内;逾 **500 行**或复杂度过高须拆分,见共享 React / Vue 规则中的「组件文件规模」)
83
- - 命名质量是否良好
84
- - 是否有应该提取的重复逻辑
85
- - 是否存在死代码、过期注释或临时性 hack
86
- - 业务状态、类型、标识是否用裸数字/裸字符串(应对齐 `templates/shared/rules/fec-typescript.md`「禁止 Magic Number / Magic String」)
98
+ - Is the component/page file size reasonable (it should be within **300 lines**; if it exceeds **500 lines** or is too complex, it must be split. See "Component file size" in the shared React/Vue rules)
99
+ - Is the naming quality good?
100
+ - Is there any repetitive logic that should be extracted
101
+ - Whether there is dead code, outdated comments or temporary hacks
102
+ - Whether the business status, type, and identification use bare numbers/naked strings (should be aligned with `templates/shared/rules/fec-typescript.md` "Magic Number / Magic String is prohibited")
87
103
 
88
- 7. 测试
104
+ 7. Test
89
105
 
90
- - 是否缺少关键测试覆盖
91
- - 是否存在脆弱的选择器或不稳定的测试模式
106
+ - Is critical test coverage missing?
107
+ - Is there a fragile selector or unstable test mode?
92
108
 
93
- 8. 安全
109
+ 8. Security
94
110
 
95
- - 无明显 XSS 风险(dangerouslySetInnerHTML / v-html 必须审查)
96
- - 无敏感信息硬编码
97
- - 无未校验的用户输入直接渲染
111
+ - No obvious XSS risks (dangerouslySetInnerHTML/v-html must be reviewed)
112
+ - No sensitive information hardcoded
113
+ - Direct rendering without unvalidated user input
98
114
 
99
- 9. 性能与体验证据
115
+ 9. Performance and experience evidence
100
116
 
101
- - 是否引入首屏重依赖、重复请求、大列表渲染或长任务
102
- - loading、empty、error、disabled、focus 等状态是否完整
103
- - 响应式布局是否有可验证断点和文本溢出保护
117
+ - Whether to introduce heavy dependencies on the first screen, repeated requests, large list rendering or long tasks
118
+ - Whether the status of loading, empty, error, disabled, focus, etc. is complete
119
+ - Whether the responsive layout has verifiable breakpoints and text overflow protection
104
120
 
105
- 10. 必检项(阻塞合并)
121
+ 10. Must-check items (blocking merge)
106
122
 
107
- - [ ] TypeScript 类型完整,无 `any`
108
- - [ ] 外部输入、DTO、公共类型边界无无守卫断言
109
- - [ ] 无 XSS 风险
110
- - [ ] 无敏感信息硬编码
111
- - [ ] 核心逻辑有单元测试
123
+ - [ ] TypeScript complete type, no `any`
124
+ - [ ] No guardless assertions for external input, DTO, and public type boundaries
125
+ - [ ] No XSS risk
126
+ - [ ] No sensitive information hardcoded
127
+ - [ ] Core logic has unit tests
112
128
 
113
- 11. 质量项(建议修改)
129
+ 11. Quality items (suggested modifications)
114
130
 
115
- - [ ] 组件文件规模符合约定(约 300 行内为佳;逾 500 行或高复杂度已拆子组件 / Hooks / Composables / utils)
116
- - [ ] 无重复代码(DRY 原则)
117
- - [ ] 无未使用的 import
131
+ - [ ] The size of the component file complies with the agreement (within about 300 lines is preferred; if it exceeds 500 lines or is highly complex, the sub-components/Hooks/Composables/utils have been disassembled)
132
+ - [ ] No duplicate code (DRY principle)
133
+ - [ ] No unused imports
118
134
 
119
- 12. 规范项(风格建议)
135
+ 12. Normative items (style suggestions)
120
136
 
121
- - [ ] 命名语义清晰
122
- - [ ] 注释覆盖复杂逻辑
137
+ - [ ] clear naming semantics
138
+ - [ ] comments cover complex logic
123
139
 
124
- ## 详细参考
140
+ ## Detailed reference
125
141
 
126
- 撰写代码评审报告时,加载 [references/report-template.md](references/report-template.md)。发现必须具体且可操作;不要写"优化性能"等空泛建议而不指出具体代码模式。
142
+ When writing a code review report, load [references/report-template.md](references/report-template.md). Findings must be specific and actionable; don't write general recommendations such as "optimize performance" without pointing out specific code patterns.
127
143
 
128
144
  ## Constraints
129
145
 
130
- - 不把个人风格偏好写成阻塞问题;阻塞项必须有明确用户影响、运行时风险、安全风险或维护成本证据。
131
- - 不在缺少 diff、文件位置或复现线索时给确定结论。
132
- - 深度安全、无障碍、E2E 和性能问题只做初筛;需要证据链时分流到专项 skill。
133
- - 同一根因不要重复报多条;合并为一条代表性发现并列出影响范围。
134
- - 自动化工具稳定覆盖的格式问题交给 lint/format,不作为人工评审主发现。
146
+ - Do not write personal style preferences as blocking issues; blocking items must have clear evidence of user impact, runtime risk, security risk, or maintenance cost.
147
+ - Do not give findings without file locations and supporting evidence; a diff is required only for change review.
148
+ - In-depth security, accessibility, E2E and performance issues are only screened initially; when an evidence chain is needed, they will be diverted to special skills.
149
+ - Do not report multiple reports for the same root cause; merge them into one representative finding and list the scope of impact.
150
+ - Format issues that are stably covered by automated tools are handed over to lint/format and are not discovered by human reviewers.
135
151
 
136
152
  ## Expected Output
137
153
 
138
- - 分级评审报告(CRITICAL / HIGH / MEDIUM / LOW)
139
- - 每个问题关联具体文件和行号,附修复建议
140
- - 阻塞项(CRITICAL)修复前不建议合并
141
- - 评审报告保存为 `reports/code-review-YYYY-MM-DD-HHmmss.md`
142
- - 多维评审要合并重复发现,并说明已分流到哪些专项能力
143
- - 对不确定项标注需要的验证命令或补充上下文,不把猜测写成事实
154
+ - Grading review report (CRITICAL / HIGH / MEDIUM / LOW)
155
+ - Each problem is associated with a specific file and line number, with suggestions for repairing it.
156
+ - It is not recommended to merge the blocking item (CRITICAL) until it is repaired
157
+ - The review report is saved as `reports/code-review-YYYY-MM-DD-HHmmss.md`
158
+ - Multi-dimensional reviews should consolidate duplicate findings and explain which special capabilities have been diverted to
159
+ - Label uncertain items with required verification commands or supplementary context, and do not write guesses into facts
160
+ ## Refactoring Boundary
161
+
162
+ A general review may flag maintainability evidence, but dedicated smell diagnosis or a behavior-preserving refactoring plan owns deeper structural analysis. Review should not silently execute structural changes; it can recommend diagnosis/planning when a finding needs systematic transformation.