@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,453 @@
1
+ # Moving Feature Refactorings
2
+
3
+ These cards transform the supplied standard catalog into concise operational guidance for frontend agents. Standard IDs/names are preserved; examples and framework adaptations are original.
4
+
5
+ ## RF-MOVE-FUNCTION — Move Function
6
+
7
+ ### Intent
8
+ Move behavior to the module that owns most of the data it uses or the responsibility it represents.
9
+
10
+ ### Typical Signals
11
+ - A function depends more on another module’s data than its current home.
12
+
13
+ ### Avoid When
14
+ - Do not move orchestration merely because it calls several collaborators; coordination may be its responsibility.
15
+
16
+ ### Preconditions
17
+ - Current observable behavior and affected callers are understood.
18
+ - The target scope is inside a declared diff budget and can be verified after this one primary transformation.
19
+
20
+ ### Mechanics
21
+ 1. Identify data ownership and change responsibility.
22
+ 2. Create/copy the function at the destination with a narrow interface.
23
+ 3. Delegate from the old location while migrating callers.
24
+ 4. Remove the old location only when dependencies and public contracts permit.
25
+
26
+ ### Behavior-Preservation Checkpoints
27
+ - Compare inputs, outputs, exceptions, side effects, ordering, and public contracts before/after the step.
28
+ - For frontend code, also check UI state, events, focus, network behavior, lifecycle/state transitions, and relevant identity semantics.
29
+
30
+ ### Related Code Smells
31
+ - `SMELL-DIVERGENT-CHANGE`
32
+ - `SMELL-SHOTGUN-SURGERY`
33
+ - `SMELL-FEATURE-ENVY`
34
+ - `SMELL-TEMPORARY-FIELD`
35
+ - `SMELL-MESSAGE-CHAINS`
36
+ - `SMELL-INSIDER-TRADING`
37
+ - `SMELL-ALTERNATIVE-CLASSES-DIFFERENT-INTERFACES`
38
+ - `SMELL-DATA-CLASS`
39
+
40
+ ### Composes Well With
41
+ - Combine only with a separately justified next transformation; no fixed sequence is required.
42
+
43
+ ### JavaScript Notes
44
+ - Module initialization order, circular imports, closures, and dynamic imports can make a textual move behavior-changing.
45
+
46
+ ### TypeScript Notes
47
+ - Preserve exported types, path aliases, package boundaries, and type-only/runtime import distinctions.
48
+
49
+ ### React Notes
50
+ - Check Hook rules, Server/Client boundaries, lazy components, Suspense, router behavior, and event ordering when moving code.
51
+
52
+ ### Vue Notes
53
+ - Check composable lifecycle, Pinia ownership, async setup, route guards, and auto-import conventions.
54
+
55
+ ### Frontend-Craft Adaptation
56
+ - Place behavior with the data/change responsibility it serves, not merely in a “utilities” folder; prove dead code with the specialized cleanup lane.
57
+
58
+ ### Example Transformation
59
+ Before: a component-local mailbox quota calculation mostly reads account policy data. After: move it to the account policy module and keep UI code declarative.
60
+
61
+ ## RF-MOVE-FIELD — Move Field
62
+
63
+ ### Intent
64
+ Move data to the object/module that conceptually owns it and changes with it.
65
+
66
+ ### Typical Signals
67
+ - A field is read/updated mainly by another owner or repeatedly travels with another data cluster.
68
+
69
+ ### Avoid When
70
+ - Avoid moving a public serialized field without a compatibility plan.
71
+
72
+ ### Preconditions
73
+ - Current observable behavior and affected callers are understood.
74
+ - The target scope is inside a declared diff budget and can be verified after this one primary transformation.
75
+
76
+ ### Mechanics
77
+ 1. Identify the real owner and all reads/writes.
78
+ 2. Add storage/access at the destination.
79
+ 3. Redirect reads and writes incrementally.
80
+ 4. Remove old storage after state synchronization is no longer required.
81
+
82
+ ### Behavior-Preservation Checkpoints
83
+ - Compare inputs, outputs, exceptions, side effects, ordering, and public contracts before/after the step.
84
+ - For frontend code, also check UI state, events, focus, network behavior, lifecycle/state transitions, and relevant identity semantics.
85
+
86
+ ### Related Code Smells
87
+ - `SMELL-SHOTGUN-SURGERY`
88
+ - `SMELL-INSIDER-TRADING`
89
+
90
+ ### Composes Well With
91
+ - Combine only with a separately justified next transformation; no fixed sequence is required.
92
+
93
+ ### JavaScript Notes
94
+ - Module initialization order, circular imports, closures, and dynamic imports can make a textual move behavior-changing.
95
+
96
+ ### TypeScript Notes
97
+ - Preserve exported types, path aliases, package boundaries, and type-only/runtime import distinctions.
98
+
99
+ ### React Notes
100
+ - Check Hook rules, Server/Client boundaries, lazy components, Suspense, router behavior, and event ordering when moving code.
101
+
102
+ ### Vue Notes
103
+ - Check composable lifecycle, Pinia ownership, async setup, route guards, and auto-import conventions.
104
+
105
+ ### Frontend-Craft Adaptation
106
+ - Place behavior with the data/change responsibility it serves, not merely in a “utilities” folder; prove dead code with the specialized cleanup lane.
107
+
108
+ ### Example Transformation
109
+ Before: a view controller owns `quotaLimit` though policy service controls it. After: policy owns the field and UI reads through the policy boundary.
110
+
111
+ ## RF-MOVE-STATEMENTS-INTO-FUNCTION — Move Statements into Function
112
+
113
+ ### Intent
114
+ Move statements that always accompany a function call into that function so the shared operation is complete.
115
+
116
+ ### Typical Signals
117
+ - The same setup/teardown statement appears around many calls and belongs to the called operation.
118
+
119
+ ### Avoid When
120
+ - Do not move caller-specific policy into a generic function.
121
+
122
+ ### Preconditions
123
+ - Current observable behavior and affected callers are understood.
124
+ - The target scope is inside a declared diff budget and can be verified after this one primary transformation.
125
+
126
+ ### Mechanics
127
+ 1. Find repeated adjacent statements around the call.
128
+ 2. Move one shared statement into the callee.
129
+ 3. Verify callers and ordering.
130
+ 4. Repeat only for behavior truly common to all callers.
131
+
132
+ ### Behavior-Preservation Checkpoints
133
+ - Compare inputs, outputs, exceptions, side effects, ordering, and public contracts before/after the step.
134
+ - For frontend code, also check UI state, events, focus, network behavior, lifecycle/state transitions, and relevant identity semantics.
135
+
136
+ ### Related Code Smells
137
+ - No single code smell required; select from concrete structural evidence.
138
+
139
+ ### Composes Well With
140
+ - Combine only with a separately justified next transformation; no fixed sequence is required.
141
+
142
+ ### JavaScript Notes
143
+ - Module initialization order, circular imports, closures, and dynamic imports can make a textual move behavior-changing.
144
+
145
+ ### TypeScript Notes
146
+ - Preserve exported types, path aliases, package boundaries, and type-only/runtime import distinctions.
147
+
148
+ ### React Notes
149
+ - Check Hook rules, Server/Client boundaries, lazy components, Suspense, router behavior, and event ordering when moving code.
150
+
151
+ ### Vue Notes
152
+ - Check composable lifecycle, Pinia ownership, async setup, route guards, and auto-import conventions.
153
+
154
+ ### Frontend-Craft Adaptation
155
+ - Place behavior with the data/change responsibility it serves, not merely in a “utilities” folder; prove dead code with the specialized cleanup lane.
156
+
157
+ ### Example Transformation
158
+ Before: every caller formats a draft ID immediately before `saveDraft`. After: `saveDraft` owns canonical ID formatting if it is always required.
159
+
160
+ ## RF-MOVE-STATEMENTS-TO-CALLERS — Move Statements to Callers
161
+
162
+ ### Intent
163
+ Move behavior out of a function when only some callers need it or its policy varies by context.
164
+
165
+ ### Typical Signals
166
+ - A formerly common step is now caller-specific.
167
+
168
+ ### Avoid When
169
+ - Avoid duplicating logic when the behavior is still a stable invariant of every caller.
170
+
171
+ ### Preconditions
172
+ - Current observable behavior and affected callers are understood.
173
+ - The target scope is inside a declared diff budget and can be verified after this one primary transformation.
174
+
175
+ ### Mechanics
176
+ 1. Identify the statement whose policy varies.
177
+ 2. Expose or split the callee so callers can perform the varying step.
178
+ 3. Move the statement to one caller at a time.
179
+ 4. Verify ordering and shared invariants.
180
+
181
+ ### Behavior-Preservation Checkpoints
182
+ - Compare inputs, outputs, exceptions, side effects, ordering, and public contracts before/after the step.
183
+ - For frontend code, also check UI state, events, focus, network behavior, lifecycle/state transitions, and relevant identity semantics.
184
+
185
+ ### Related Code Smells
186
+ - No single code smell required; select from concrete structural evidence.
187
+
188
+ ### Composes Well With
189
+ - Combine only with a separately justified next transformation; no fixed sequence is required.
190
+
191
+ ### JavaScript Notes
192
+ - Module initialization order, circular imports, closures, and dynamic imports can make a textual move behavior-changing.
193
+
194
+ ### TypeScript Notes
195
+ - Preserve exported types, path aliases, package boundaries, and type-only/runtime import distinctions.
196
+
197
+ ### React Notes
198
+ - Check Hook rules, Server/Client boundaries, lazy components, Suspense, router behavior, and event ordering when moving code.
199
+
200
+ ### Vue Notes
201
+ - Check composable lifecycle, Pinia ownership, async setup, route guards, and auto-import conventions.
202
+
203
+ ### Frontend-Craft Adaptation
204
+ - Place behavior with the data/change responsibility it serves, not merely in a “utilities” folder; prove dead code with the specialized cleanup lane.
205
+
206
+ ### Example Transformation
207
+ Before: `loadMessages` always shows a toast, but background refresh must not. After: callers decide whether to notify after loading.
208
+
209
+ ## RF-REPLACE-INLINE-CODE-WITH-FUNCTION-CALL — Replace Inline Code with Function Call
210
+
211
+ ### Intent
212
+ Use an existing function instead of duplicating equivalent inline logic.
213
+
214
+ ### Typical Signals
215
+ - Inline logic already has a trustworthy named implementation elsewhere.
216
+
217
+ ### Avoid When
218
+ - Do not replace merely similar logic when semantics or edge cases differ.
219
+
220
+ ### Preconditions
221
+ - Current observable behavior and affected callers are understood.
222
+ - The target scope is inside a declared diff budget and can be verified after this one primary transformation.
223
+
224
+ ### Mechanics
225
+ 1. Prove equivalence between inline code and the existing function.
226
+ 2. Replace one occurrence with the call.
227
+ 3. Verify result, error, and evaluation semantics.
228
+ 4. Remove any now-unused local helpers.
229
+
230
+ ### Behavior-Preservation Checkpoints
231
+ - Compare inputs, outputs, exceptions, side effects, ordering, and public contracts before/after the step.
232
+ - For frontend code, also check UI state, events, focus, network behavior, lifecycle/state transitions, and relevant identity semantics.
233
+
234
+ ### Related Code Smells
235
+ - No single code smell required; select from concrete structural evidence.
236
+
237
+ ### Composes Well With
238
+ - Combine only with a separately justified next transformation; no fixed sequence is required.
239
+
240
+ ### JavaScript Notes
241
+ - Module initialization order, circular imports, closures, and dynamic imports can make a textual move behavior-changing.
242
+
243
+ ### TypeScript Notes
244
+ - Preserve exported types, path aliases, package boundaries, and type-only/runtime import distinctions.
245
+
246
+ ### React Notes
247
+ - Check Hook rules, Server/Client boundaries, lazy components, Suspense, router behavior, and event ordering when moving code.
248
+
249
+ ### Vue Notes
250
+ - Check composable lifecycle, Pinia ownership, async setup, route guards, and auto-import conventions.
251
+
252
+ ### Frontend-Craft Adaptation
253
+ - Place behavior with the data/change responsibility it serves, not merely in a “utilities” folder; prove dead code with the specialized cleanup lane.
254
+
255
+ ### Example Transformation
256
+ Before: an inline loop checks whether a folder is special. After: call the existing `isSpecialFolder(id)` helper when semantics match exactly.
257
+
258
+ ## RF-SLIDE-STATEMENTS — Slide Statements
259
+
260
+ ### Intent
261
+ Reorder statements so related code is adjacent and a later extraction or simplification becomes possible.
262
+
263
+ ### Typical Signals
264
+ - Statements that belong together are separated by unrelated work.
265
+
266
+ ### Avoid When
267
+ - Do not reorder across side effects, awaits, exceptions, subscriptions, or reads/writes whose order is observable.
268
+
269
+ ### Preconditions
270
+ - Current observable behavior and affected callers are understood.
271
+ - The target scope is inside a declared diff budget and can be verified after this one primary transformation.
272
+
273
+ ### Mechanics
274
+ 1. Map dependencies and side effects between statements.
275
+ 2. Move the smallest statement across only independent operations.
276
+ 3. Verify after each move.
277
+ 4. Stop when the intended cluster is adjacent.
278
+
279
+ ### Behavior-Preservation Checkpoints
280
+ - Compare inputs, outputs, exceptions, side effects, ordering, and public contracts before/after the step.
281
+ - For frontend code, also check UI state, events, focus, network behavior, lifecycle/state transitions, and relevant identity semantics.
282
+
283
+ ### Related Code Smells
284
+ - `SMELL-DUPLICATED-CODE`
285
+ - `SMELL-MUTABLE-DATA`
286
+
287
+ ### Composes Well With
288
+ - Combine only with a separately justified next transformation; no fixed sequence is required.
289
+
290
+ ### JavaScript Notes
291
+ - Module initialization order, circular imports, closures, and dynamic imports can make a textual move behavior-changing.
292
+
293
+ ### TypeScript Notes
294
+ - Preserve exported types, path aliases, package boundaries, and type-only/runtime import distinctions.
295
+
296
+ ### React Notes
297
+ - Check Hook rules, Server/Client boundaries, lazy components, Suspense, router behavior, and event ordering when moving code.
298
+
299
+ ### Vue Notes
300
+ - Check composable lifecycle, Pinia ownership, async setup, route guards, and auto-import conventions.
301
+
302
+ ### Frontend-Craft Adaptation
303
+ - Place behavior with the data/change responsibility it serves, not merely in a “utilities” folder; prove dead code with the specialized cleanup lane.
304
+
305
+ ### Example Transformation
306
+ Before: two normalization statements are separated by an unrelated analytics call. After: move only if analytics timing and data dependencies are unchanged.
307
+
308
+ ## RF-SPLIT-LOOP — Split Loop
309
+
310
+ ### Intent
311
+ Separate a loop that performs multiple independent tasks into focused passes.
312
+
313
+ ### Typical Signals
314
+ - One loop computes unrelated results with separate accumulators.
315
+
316
+ ### Avoid When
317
+ - Avoid when the extra pass is materially expensive or iteration order/side effects couple the tasks.
318
+
319
+ ### Preconditions
320
+ - Current observable behavior and affected callers are understood.
321
+ - The target scope is inside a declared diff budget and can be verified after this one primary transformation.
322
+
323
+ ### Mechanics
324
+ 1. Identify independent loop responsibilities.
325
+ 2. Duplicate the iteration and keep one responsibility in each pass.
326
+ 3. Verify outputs/order/performance.
327
+ 4. Then extract or pipeline individual loops if useful.
328
+
329
+ ### Behavior-Preservation Checkpoints
330
+ - Compare inputs, outputs, exceptions, side effects, ordering, and public contracts before/after the step.
331
+ - For frontend code, also check UI state, events, focus, network behavior, lifecycle/state transitions, and relevant identity semantics.
332
+
333
+ ### Related Code Smells
334
+ - `SMELL-LONG-FUNCTION`
335
+
336
+ ### Composes Well With
337
+ - Combine only with a separately justified next transformation; no fixed sequence is required.
338
+
339
+ ### JavaScript Notes
340
+ - Module initialization order, circular imports, closures, and dynamic imports can make a textual move behavior-changing.
341
+
342
+ ### TypeScript Notes
343
+ - Preserve exported types, path aliases, package boundaries, and type-only/runtime import distinctions.
344
+
345
+ ### React Notes
346
+ - Check Hook rules, Server/Client boundaries, lazy components, Suspense, router behavior, and event ordering when moving code.
347
+
348
+ ### Vue Notes
349
+ - Check composable lifecycle, Pinia ownership, async setup, route guards, and auto-import conventions.
350
+
351
+ ### Frontend-Craft Adaptation
352
+ - Place behavior with the data/change responsibility it serves, not merely in a “utilities” folder; prove dead code with the specialized cleanup lane.
353
+
354
+ ### Example Transformation
355
+ Before: one loop both counts unread messages and builds attachment names. After: split into two focused passes when collection size and order permit.
356
+
357
+ ## RF-REPLACE-LOOP-WITH-PIPELINE — Replace Loop with Pipeline
358
+
359
+ ### Intent
360
+ Express a collection transformation as a sequence of named filter/map/reduce-style operations.
361
+
362
+ ### Typical Signals
363
+ - An imperative loop mostly filters, maps, or accumulates data and bookkeeping hides intent.
364
+
365
+ ### Avoid When
366
+ - Keep loops for early exits, complex mutation, tight performance constraints, or async sequencing when clearer.
367
+
368
+ ### Preconditions
369
+ - Current observable behavior and affected callers are understood.
370
+ - The target scope is inside a declared diff budget and can be verified after this one primary transformation.
371
+
372
+ ### Mechanics
373
+ 1. Identify the element-level transformation stages.
374
+ 2. Replace one stage with an equivalent collection operation.
375
+ 3. Preserve ordering and callback semantics.
376
+ 4. Verify empty inputs, errors, and performance-sensitive paths.
377
+
378
+ ### Behavior-Preservation Checkpoints
379
+ - Compare inputs, outputs, exceptions, side effects, ordering, and public contracts before/after the step.
380
+ - For frontend code, also check UI state, events, focus, network behavior, lifecycle/state transitions, and relevant identity semantics.
381
+
382
+ ### Related Code Smells
383
+ - `SMELL-LOOPS`
384
+
385
+ ### Composes Well With
386
+ - Combine only with a separately justified next transformation; no fixed sequence is required.
387
+
388
+ ### JavaScript Notes
389
+ - Module initialization order, circular imports, closures, and dynamic imports can make a textual move behavior-changing.
390
+
391
+ ### TypeScript Notes
392
+ - Preserve exported types, path aliases, package boundaries, and type-only/runtime import distinctions.
393
+
394
+ ### React Notes
395
+ - Check Hook rules, Server/Client boundaries, lazy components, Suspense, router behavior, and event ordering when moving code.
396
+
397
+ ### Vue Notes
398
+ - Check composable lifecycle, Pinia ownership, async setup, route guards, and auto-import conventions.
399
+
400
+ ### Frontend-Craft Adaptation
401
+ - Place behavior with the data/change responsibility it serves, not merely in a “utilities” folder; prove dead code with the specialized cleanup lane.
402
+
403
+ ### Example Transformation
404
+ Before: push matching attachment names into an array inside a loop. After: `attachments.filter(isVisible).map(a => a.name)` when behavior matches.
405
+
406
+ ## RF-REMOVE-DEAD-CODE — Remove Dead Code
407
+
408
+ ### Intent
409
+ Remove code proven to have no reachable runtime or supported-tooling use.
410
+
411
+ ### Typical Signals
412
+ - A function, export, branch, asset, style, route, or dependency has no legitimate references.
413
+
414
+ ### Avoid When
415
+ - Do not infer deadness from grep alone when dynamic imports, routes, Storybook, i18n, Tailwind classes, runtime templates, or external consumers may reference it.
416
+
417
+ ### Preconditions
418
+ - Current observable behavior and affected callers are understood.
419
+ - The target scope is inside a declared diff budget and can be verified after this one primary transformation.
420
+
421
+ ### Mechanics
422
+ 1. Prove unused status across static and dynamic reference channels.
423
+ 2. Classify risk before deletion.
424
+ 3. Use the dedicated cleanup workflow for actual removal.
425
+ 4. Run relevant build/tests after deletion.
426
+
427
+ ### Behavior-Preservation Checkpoints
428
+ - Compare inputs, outputs, exceptions, side effects, ordering, and public contracts before/after the step.
429
+ - For frontend code, also check UI state, events, focus, network behavior, lifecycle/state transitions, and relevant identity semantics.
430
+
431
+ ### Related Code Smells
432
+ - `SMELL-SPECULATIVE-GENERALITY`
433
+
434
+ ### Composes Well With
435
+ - Combine only with a separately justified next transformation; no fixed sequence is required.
436
+
437
+ ### JavaScript Notes
438
+ - Module initialization order, circular imports, closures, and dynamic imports can make a textual move behavior-changing.
439
+
440
+ ### TypeScript Notes
441
+ - Preserve exported types, path aliases, package boundaries, and type-only/runtime import distinctions.
442
+
443
+ ### React Notes
444
+ - Check Hook rules, Server/Client boundaries, lazy components, Suspense, router behavior, and event ordering when moving code.
445
+
446
+ ### Vue Notes
447
+ - Check composable lifecycle, Pinia ownership, async setup, route guards, and auto-import conventions.
448
+
449
+ ### Frontend-Craft Adaptation
450
+ - Place behavior with the data/change responsibility it serves, not merely in a “utilities” folder; prove dead code with the specialized cleanup lane.
451
+
452
+ ### Example Transformation
453
+ Before: an obsolete component appears unused. After: route actual proof and deletion through `fec-refactor-clean`, including dynamic-reference checks.
@@ -0,0 +1,59 @@
1
+ ---
2
+ name: fec-refactoring-validation
3
+ description: Use when proving that a frontend refactoring preserved existing behavior, selecting an appropriate safety net, validating each structural step, or assigning a PASS, PARTIAL, or NOT PROVEN preservation verdict.
4
+ ---
5
+
6
+ # Skill: Refactoring Validation
7
+
8
+ ## Purpose
9
+
10
+ Define the observable contract and the smallest credible evidence needed to prove that structural edits preserved existing frontend behavior.
11
+
12
+ ## Procedure
13
+
14
+ 1. Record the relevant behavior contract before substantial edits.
15
+ 2. Classify safety-net coverage as A, B, or C.
16
+ 3. Run and record the pre-change baseline.
17
+ 4. Match verification to the current refactoring risk and affected boundary.
18
+ 5. After every structural step, run the narrowest sufficient check immediately.
19
+ 6. If a newly introduced failure appears, revert that step before broader repair.
20
+ 7. At the end, run the broad gates justified by the affected surface.
21
+ 8. Assign PASS, PARTIAL, or NOT PROVEN from evidence, not optimism.
22
+
23
+ Pure structural work uses **GREEN → REFACTOR → GREEN**.
24
+
25
+ ## Safety-Net Levels
26
+
27
+ | Level | Evidence | Execution guidance |
28
+ | --- | --- | --- |
29
+ | A — Strong | Existing tests cover relevant behavior | Use tests as the primary safety net |
30
+ | B — Partial | Important behavior is only partly covered | Add focused characterization of current behavior before risky steps |
31
+ | C — None | No useful automated behavior coverage | Do not auto-install a framework; keep CAUTION/DANGER plan-only unless a minimal safety net is authorized |
32
+
33
+ ## Frontend Contract Checklist
34
+
35
+ Check relevant items, not every item mechanically:
36
+
37
+ - function inputs, outputs, exceptions, and error mapping;
38
+ - DOM structure that consumers depend on, visible states, focus, keyboard flow, and accessibility semantics;
39
+ - props, emits, slots, hook/composable return values, and event ordering;
40
+ - requests, payloads, cancellation, retries, cache keys, and loading/error transitions;
41
+ - store state, persistence, object identity, memoization, refs/reactivity, and lifecycle timing;
42
+ - routes, URLs, guards, package exports, serialized fields, and backend-facing DTOs.
43
+
44
+ ## References
45
+
46
+ - Load [behavior-preservation.md](references/behavior-preservation.md) for contract construction and proof levels.
47
+ - Load [refactoring-test-checklist.md](references/refactoring-test-checklist.md) for targeted verification by frontend risk.
48
+
49
+ ## Constraints
50
+
51
+ - Passing unrelated tests does not prove preservation.
52
+ - A green test written only after the change is weaker evidence than a pre-change baseline or characterization test.
53
+ - Do not rewrite expected values simply because the refactor changed behavior.
54
+ - Do not hide missing proof behind a PASS label.
55
+ - Do not install a new test framework without explicit authorization.
56
+
57
+ ## Expected Output
58
+
59
+ A behavior-preservation record containing baseline status, safety-net level, per-step checks, final validation, unresolved coverage gaps, and a PASS/PARTIAL/NOT PROVEN verdict.
@@ -0,0 +1,53 @@
1
+ # Behavior Preservation
2
+
3
+ ## Build the Contract
4
+
5
+ Before changing structure, identify which observations must remain stable. Use the smallest contract that fully covers the affected boundary.
6
+
7
+ ### Functional contract
8
+
9
+ - accepted inputs and normalization;
10
+ - return values and output ordering;
11
+ - errors, exceptions, and fallback behavior;
12
+ - side effects and significant ordering.
13
+
14
+ ### UI contract
15
+
16
+ - rendered states and user-visible text/data;
17
+ - enabled/disabled behavior;
18
+ - focus and keyboard transitions;
19
+ - event/callback ordering;
20
+ - accessibility relationships that users or tests rely on.
21
+
22
+ ### State and async contract
23
+
24
+ - store transitions and persistence;
25
+ - request count, URL, method, payload, cancellation, retry, and error mapping;
26
+ - loading/error/empty state timing;
27
+ - React identity/memoization and hook dependency semantics;
28
+ - Vue `ref`, `reactive`, `computed`, `watch`, and lifecycle identity/timing.
29
+
30
+ ### Public contract
31
+
32
+ - exported symbols and call signatures;
33
+ - routes and URL parameters;
34
+ - serialized fields and API DTOs;
35
+ - extension, plugin, template, or runtime registration points.
36
+
37
+ ## Characterization Tests
38
+
39
+ When behavior is important but weakly covered, write a narrow test that captures current behavior before a risky structural edit. It may pass immediately because it records the existing contract. Do not broaden it into a new requirement.
40
+
41
+ ## Verdicts
42
+
43
+ ### PASS
44
+
45
+ Use only when the relevant contract is well identified, the before/after baseline is comparable, and all required checks pass.
46
+
47
+ ### PARTIAL
48
+
49
+ Use when checks pass but meaningful paths remain untested or only static/manual evidence covers an important boundary.
50
+
51
+ ### NOT PROVEN
52
+
53
+ Use when dependencies cannot be installed, required tools cannot run, the baseline is ambiguous, or the safety net cannot credibly distinguish preservation from accidental behavior change.
@@ -0,0 +1,42 @@
1
+ # Refactoring Test Checklist
2
+
3
+ ## Local Function or Module
4
+
5
+ - targeted unit tests for inputs, outputs, and errors;
6
+ - typecheck of affected package/module;
7
+ - callers compile with unchanged contracts;
8
+ - no public export change unless planned.
9
+
10
+ ## React
11
+
12
+ - hook order and dependency arrays remain valid;
13
+ - stale closure behavior is not introduced;
14
+ - controlled/uncontrolled ownership remains stable;
15
+ - memoization or referential equality assumptions are preserved;
16
+ - effect cleanup, request cancellation, and event order remain stable;
17
+ - Server/Client boundaries and hydration behavior are unchanged when relevant.
18
+
19
+ ## Vue
20
+
21
+ - `ref`/`reactive` identity and unwrapping semantics remain stable;
22
+ - computed values stay derived rather than duplicated mutable state;
23
+ - watchers keep intended source, flush timing, and cleanup;
24
+ - props, emits, slots, and expose contracts remain stable;
25
+ - Pinia store ownership and persistence remain stable.
26
+
27
+ ## API and Data
28
+
29
+ - request shape, headers, auth refresh, cancellation, retry, and errors remain stable;
30
+ - field renames do not cross DTO, storage, query-string, or backend contracts unintentionally;
31
+ - sorting/filtering transformations preserve order, duplicates, and edge cases;
32
+ - reference-to-value or value-to-reference changes preserve required identity semantics.
33
+
34
+ ## Routing and Runtime Registration
35
+
36
+ - route names/paths/guards remain stable;
37
+ - dynamic imports and lazy registrations remain discoverable;
38
+ - Storybook, i18n, CSS/Tailwind dynamic classes, runtime templates, and generated metadata are not broken by search-only reasoning.
39
+
40
+ ## Final Ladder
41
+
42
+ Run available checks from narrowest to broadest: targeted tests -> affected integration tests -> lint/typecheck -> full tests -> build -> E2E/SSR/visual/a11y/performance specialty gates when the refactoring touches those risks.
@@ -1,34 +1,34 @@
1
1
  ---
2
2
  name: fec-responsive-layout
3
- description: Use when designing, implementing, or reviewing responsive frontend layouts, mobile-first breakpoints, container queries, fluid grids, data-dense tables, touch targets, safe areas, orientation changes, viewport overflow, or cross-device UI behavior; Chinese triggers include 响应式布局, 移动端适配, 断点, 容器查询, 横竖屏, 触摸目标.
3
+ description: Use when designing, implementing, or reviewing responsive frontend layouts, mobile-first breakpoints, container queries, fluid grids, data-dense tables, touch targets, safe areas, orientation changes, viewport overflow, or cross-device UI behavior; Chinese triggers include responsive layouts, mobile-side adaptation, breakpoints, container queries, horizontal and vertical screens, touch targets.
4
4
  ---
5
5
 
6
- # 响应式布局
6
+ # Responsive layout
7
7
 
8
- 适用于需要让页面、工具界面、表格、仪表盘或组件在多设备上稳定工作的前端任务。需要布局模式和检查清单时加载 [references/responsive-layout-patterns.md](references/responsive-layout-patterns.md)。
8
+ Suitable for front-end tasks that require pages, tool interfaces, tables, dashboards or components to work stably on multiple devices. Load [references/responsive-layout-patterns.md](references/responsive-layout-patterns.md) when layout patterns and checklists are required.
9
9
 
10
10
  ## Purpose
11
11
 
12
- 用内容优先、移动优先和容器感知的方式设计响应式布局,避免只靠固定断点修补溢出。
12
+ Design responsive layouts in a content-first, mobile-first, and container-aware manner to avoid relying solely on fixed breakpoints to fix overflow.
13
13
 
14
14
  ## Procedure
15
15
 
16
- 1. 明确信息优先级:小屏先保留核心任务、关键操作和反馈;次要信息折叠、延后或移入详情层。
17
- 2. 选择布局策略:简单页面用 mobile-first 断点;嵌套组件、卡片网格和侧栏优先考虑 container query。
18
- 3. 设计流式尺寸:用 `minmax()`、`clamp()`、`aspect-ratio`、`max-width`、`min-width: 0` 和稳定网格轨道控制伸缩。
19
- 4. 处理数据密集界面:表格、列表、看板和编辑器需要明确横向滚动、列优先级、冻结列或移动端摘要视图。
20
- 5. 保证触摸与键盘:触摸目标、焦点路径、hover 替代、虚拟键盘、安全区域和横竖屏切换都要复核。
21
- 6. 关联性能与资源:移动端减少首屏大图、重型图表、同步动画和不必要列渲染。
22
- 7. 验证断点之间:检查 375px、768px、1024px、1440px,以及断点中间值是否溢出、遮挡或跳变。
16
+ 1. Clarify the priority of information: On small screens, core tasks, key operations and feedback are retained first; secondary information is folded, postponed or moved to the detail layer.
17
+ 2. Choose a layout strategy: use mobile-first breakpoints for simple pages; give priority to container query for nested components, card grids and sidebars.
18
+ 3. Design flow size: use `minmax()`, `clamp()`, `aspect-ratio`, `max-width`, `min-width: 0` and stable grid track to control scaling.
19
+ 4. Handle data-intensive interfaces: tables, lists, boards, and editors need to explicitly support horizontal scrolling, column prioritization, frozen columns, or mobile summary views.
20
+ 5. Ensure touch and keyboard: touch targets, focus paths, hover substitutions, virtual keyboards, safe areas, and horizontal and vertical screen switching should all be reviewed.
21
+ 6. Correlate performance and resources: The mobile terminal reduces first-screen large images, heavy charts, synchronized animations and unnecessary column rendering.
22
+ 7. Verify between breakpoints: check 375px, 768px, 1024px, 1440px, and whether the intermediate value of the breakpoint overflows, blocks, or jumps.
23
23
 
24
24
  ## Constraints
25
25
 
26
- - 不把桌面版缩小当作移动端设计。
27
- - 不让关键功能只依赖 hover 或宽屏侧栏。
28
- - 不用固定高度掩盖内容变化;需要固定格式时用稳定约束和可滚动区域。
29
- - 不用 viewport 字体缩放替代真实排版层级。
30
- - 不让移动端横向溢出成为默认解决方案;只有数据表、画布或编辑器等明确场景可以局部横滚。
26
+ - Don’t treat the desktop version downsized as a mobile design.
27
+ - Don’t make key features rely solely on hover or widescreen sidebars.
28
+ - Do not use fixed height to cover content changes; use stable constraints and scrollable areas when fixed format is required.
29
+ - Do not use viewport font scaling instead of real typography hierarchy.
30
+ - Do not make mobile horizontal overflow the default solution; only explicit scenes such as data tables, canvases or editors can partially scroll.
31
31
 
32
32
  ## Expected Output
33
33
 
34
- 输出响应式信息优先级、断点或容器策略、关键组件布局模式、触摸/键盘要求、数据密集区域处理方案和验证结果。完成后页面在常见视口和输入方式下不溢出、不遮挡、可操作。
34
+ Outputs responsive information prioritization, breakpoint or container strategies, key component layout patterns, touch/keyboard requirements, data-intensive area handling options, and validation results. After completion, the page will not overflow, not be blocked, and is operable under common viewports and input methods.