@bovinphang/frontend-craft 2.7.0 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (380) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +34 -0
  4. package/CHANGELOG.zh-CN.md +34 -0
  5. package/README.md +1 -1
  6. package/README.openclaw.md +99 -43
  7. package/README.openclaw.zh-CN.md +99 -43
  8. package/README.zh-CN.md +1 -1
  9. package/agents/fec-architect.md +70 -70
  10. package/agents/fec-code-reviewer.md +82 -82
  11. package/agents/fec-debugger.md +20 -20
  12. package/agents/fec-design-token-mapper.md +36 -36
  13. package/agents/fec-doc-updater.md +13 -13
  14. package/agents/fec-e2e-runner.md +45 -45
  15. package/agents/fec-figma-implementer.md +59 -59
  16. package/agents/fec-performance-optimizer.md +128 -128
  17. package/agents/fec-refactor-cleaner.md +14 -14
  18. package/agents/fec-security-reviewer.md +66 -67
  19. package/agents/fec-test-planner.md +27 -27
  20. package/agents/fec-typescript-reviewer.md +87 -87
  21. package/agents/fec-ui-checker.md +74 -74
  22. package/commands/fec-debug.md +19 -19
  23. package/commands/fec-doc-sync.md +11 -11
  24. package/commands/fec-init.md +37 -38
  25. package/commands/fec-plan.md +58 -58
  26. package/commands/fec-refactor-clean.md +11 -11
  27. package/commands/fec-review.md +41 -41
  28. package/commands/fec-scaffold.md +41 -41
  29. package/commands/fec-tdd.md +13 -13
  30. package/dist/bin/frontend-craft.js +29 -27
  31. package/docs/example-prompts.md +3 -0
  32. package/docs/ja-JP/README.md +1 -1
  33. package/docs/ko-KR/README.md +1 -1
  34. package/docs/project-structure.md +13 -5
  35. package/docs/zh-CN/example-prompts.md +3 -0
  36. package/docs/zh-CN/project-structure.md +6 -1
  37. package/docs/zh-TW/README.md +1 -1
  38. package/localized/zh-CN/agents/fec-architect.md +125 -0
  39. package/localized/zh-CN/agents/fec-code-reviewer.md +152 -0
  40. package/localized/zh-CN/agents/fec-debugger.md +44 -0
  41. package/localized/zh-CN/agents/fec-design-token-mapper.md +75 -0
  42. package/localized/zh-CN/agents/fec-doc-updater.md +30 -0
  43. package/localized/zh-CN/agents/fec-e2e-runner.md +107 -0
  44. package/localized/zh-CN/agents/fec-figma-implementer.md +104 -0
  45. package/localized/zh-CN/agents/fec-performance-optimizer.md +293 -0
  46. package/localized/zh-CN/agents/fec-refactor-cleaner.md +32 -0
  47. package/localized/zh-CN/agents/fec-security-reviewer.md +116 -0
  48. package/localized/zh-CN/agents/fec-test-planner.md +50 -0
  49. package/localized/zh-CN/agents/fec-typescript-reviewer.md +142 -0
  50. package/localized/zh-CN/agents/fec-ui-checker.md +120 -0
  51. package/localized/zh-CN/commands/fec-debug.md +30 -0
  52. package/localized/zh-CN/commands/fec-doc-sync.md +19 -0
  53. package/localized/zh-CN/commands/fec-init.md +70 -0
  54. package/localized/zh-CN/commands/fec-plan.md +94 -0
  55. package/localized/zh-CN/commands/fec-refactor-clean.md +19 -0
  56. package/localized/zh-CN/commands/fec-review.md +66 -0
  57. package/localized/zh-CN/commands/fec-scaffold.md +205 -0
  58. package/localized/zh-CN/commands/fec-tdd.md +21 -0
  59. package/localized/zh-CN/skills/TEMPLATE.md +155 -0
  60. package/localized/zh-CN/skills/eval_queries.json +1013 -0
  61. package/localized/zh-CN/skills/fec-accessibility-check/SKILL.md +39 -0
  62. package/localized/zh-CN/skills/fec-accessibility-check/references/report-template.md +23 -0
  63. package/localized/zh-CN/skills/fec-accessibility-check/references/screen-reader-testing.md +33 -0
  64. package/localized/zh-CN/skills/fec-alchemy/SKILL.md +74 -0
  65. package/localized/zh-CN/skills/fec-alchemy/assets/absorption-plan-template.md +47 -0
  66. package/localized/zh-CN/skills/fec-alchemy/assets/intake-template.md +55 -0
  67. package/localized/zh-CN/skills/fec-alchemy/assets/review-checklist.md +31 -0
  68. package/localized/zh-CN/skills/fec-alchemy/references/methodology.md +94 -0
  69. package/localized/zh-CN/skills/fec-alchemy/references/originality-and-licensing.md +57 -0
  70. package/localized/zh-CN/skills/fec-api-integration/SKILL.md +78 -0
  71. package/localized/zh-CN/skills/fec-api-integration/references/integration-patterns.md +80 -0
  72. package/localized/zh-CN/skills/fec-backend-requirements-handoff/SKILL.md +45 -0
  73. package/localized/zh-CN/skills/fec-browser-storage/SKILL.md +34 -0
  74. package/localized/zh-CN/skills/fec-browser-storage/references/storage-patterns.md +65 -0
  75. package/localized/zh-CN/skills/fec-canvas-threejs/SKILL.md +66 -0
  76. package/localized/zh-CN/skills/fec-canvas-threejs/references/rendering-patterns.md +67 -0
  77. package/localized/zh-CN/skills/fec-canvas-threejs/references/shader-webgl-patterns.md +67 -0
  78. package/localized/zh-CN/skills/fec-code-review/SKILL.md +143 -0
  79. package/localized/zh-CN/skills/fec-code-review/references/report-template.md +29 -0
  80. package/localized/zh-CN/skills/fec-component-testing/SKILL.md +119 -0
  81. package/localized/zh-CN/skills/fec-data-fetching/SKILL.md +62 -0
  82. package/localized/zh-CN/skills/fec-data-fetching/references/query-patterns.md +103 -0
  83. package/localized/zh-CN/skills/fec-debug-framework/SKILL.md +157 -0
  84. package/localized/zh-CN/skills/fec-debug-framework/references/report-template.md +58 -0
  85. package/localized/zh-CN/skills/fec-dependency-upgrade/SKILL.md +34 -0
  86. package/localized/zh-CN/skills/fec-dependency-upgrade/references/dependency-upgrade-workflow.md +56 -0
  87. package/localized/zh-CN/skills/fec-doc-sync/SKILL.md +39 -0
  88. package/localized/zh-CN/skills/fec-drawio-studio/SKILL.md +73 -0
  89. package/localized/zh-CN/skills/fec-drawio-studio/data/THIRD_PARTY_NOTICES.md +10 -0
  90. package/localized/zh-CN/skills/fec-drawio-studio/data/brand-icons.json +878 -0
  91. package/localized/zh-CN/skills/fec-drawio-studio/data/shape-index.json +83570 -0
  92. package/localized/zh-CN/skills/fec-drawio-studio/references/data-residency.md +27 -0
  93. package/localized/zh-CN/skills/fec-drawio-studio/references/diagram-patterns.md +60 -0
  94. package/localized/zh-CN/skills/fec-drawio-studio/references/flowchart-quality.md +49 -0
  95. package/localized/zh-CN/skills/fec-drawio-studio/references/layout-and-export.md +72 -0
  96. package/localized/zh-CN/skills/fec-drawio-studio/references/troubleshooting.md +29 -0
  97. package/localized/zh-CN/skills/fec-drawio-studio/references/xml-and-mermaid.md +58 -0
  98. package/localized/zh-CN/skills/fec-drawio-studio/scripts/brand-symbols.mjs +99 -0
  99. package/localized/zh-CN/skills/fec-drawio-studio/scripts/diagram-lint.mjs +205 -0
  100. package/localized/zh-CN/skills/fec-drawio-studio/scripts/diagram-url.mjs +102 -0
  101. package/localized/zh-CN/skills/fec-drawio-studio/scripts/drawio-export.mjs +134 -0
  102. package/localized/zh-CN/skills/fec-drawio-studio/scripts/layout-graph.mjs +107 -0
  103. package/localized/zh-CN/skills/fec-drawio-studio/scripts/png-embed-fix.mjs +26 -0
  104. package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-go-packages.mjs +36 -0
  105. package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-js-modules.mjs +52 -0
  106. package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-python-classes.mjs +30 -0
  107. package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-python-modules.mjs +55 -0
  108. package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-rust-modules.mjs +35 -0
  109. package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-ts-modules.mjs +7 -0
  110. package/localized/zh-CN/skills/fec-drawio-studio/scripts/shape-query.mjs +121 -0
  111. package/localized/zh-CN/skills/fec-drawio-studio/scripts/studio-core.mjs +139 -0
  112. package/localized/zh-CN/skills/fec-drawio-studio/styles/built-in/corporate.json +49 -0
  113. package/localized/zh-CN/skills/fec-drawio-studio/styles/built-in/default.json +49 -0
  114. package/localized/zh-CN/skills/fec-drawio-studio/styles/built-in/handdrawn.json +49 -0
  115. package/localized/zh-CN/skills/fec-drawio-studio/styles/schema.json +112 -0
  116. package/localized/zh-CN/skills/fec-e2e-testing/SKILL.md +42 -0
  117. package/localized/zh-CN/skills/fec-e2e-testing/references/e2e-ci-reporting.md +62 -0
  118. package/localized/zh-CN/skills/fec-e2e-testing/references/e2e-special-scenarios.md +52 -0
  119. package/localized/zh-CN/skills/fec-e2e-testing/references/e2e-visual-regression.md +60 -0
  120. package/localized/zh-CN/skills/fec-e2e-testing/references/playwright-patterns.md +95 -0
  121. package/localized/zh-CN/skills/fec-form-handling/SKILL.md +76 -0
  122. package/localized/zh-CN/skills/fec-form-handling/references/advanced-form-patterns.md +101 -0
  123. package/localized/zh-CN/skills/fec-image-generation/SKILL.md +80 -0
  124. package/localized/zh-CN/skills/fec-image-generation/assets/interactive-diagram.html +371 -0
  125. package/localized/zh-CN/skills/fec-image-generation/references/artifact-routing.md +80 -0
  126. package/localized/zh-CN/skills/fec-image-generation/references/diagram-workflows.md +74 -0
  127. package/localized/zh-CN/skills/fec-image-generation/references/html-technical-diagrams.md +236 -0
  128. package/localized/zh-CN/skills/fec-image-generation/references/png-qa-autofix.md +30 -0
  129. package/localized/zh-CN/skills/fec-image-generation/scripts/export-diagram.mjs +364 -0
  130. package/localized/zh-CN/skills/fec-image-generation/scripts/interactive-diagram-server.mjs +654 -0
  131. package/localized/zh-CN/skills/fec-image-generation/scripts/png-qa.mjs +431 -0
  132. package/localized/zh-CN/skills/fec-image-generation/scripts/tech-diagram-render.mjs +1397 -0
  133. package/localized/zh-CN/skills/fec-implement-from-design/SKILL.md +129 -0
  134. package/localized/zh-CN/skills/fec-implement-from-design/references/design-plan-template.md +36 -0
  135. package/localized/zh-CN/skills/fec-legacy-to-modern-migration/SKILL.md +46 -0
  136. package/localized/zh-CN/skills/fec-legacy-to-modern-migration/references/migration-execution-checklist.md +110 -0
  137. package/localized/zh-CN/skills/fec-legacy-to-modern-migration/references/migration-report-template.md +41 -0
  138. package/localized/zh-CN/skills/fec-legacy-to-modern-migration/references/migration-strategy-and-mapping.md +48 -0
  139. package/localized/zh-CN/skills/fec-legacy-web-standard/SKILL.md +35 -0
  140. package/localized/zh-CN/skills/fec-legacy-web-standard/references/legacy-patterns.md +85 -0
  141. package/localized/zh-CN/skills/fec-list-virtualization/SKILL.md +34 -0
  142. package/localized/zh-CN/skills/fec-list-virtualization/references/virtualization-patterns.md +80 -0
  143. package/localized/zh-CN/skills/fec-monorepo-project-standard/SKILL.md +142 -0
  144. package/localized/zh-CN/skills/fec-motion-interaction/SKILL.md +73 -0
  145. package/localized/zh-CN/skills/fec-motion-interaction/references/motion-patterns.md +112 -0
  146. package/localized/zh-CN/skills/fec-nextjs-project-standard/SKILL.md +123 -0
  147. package/localized/zh-CN/skills/fec-nuxt-project-standard/SKILL.md +122 -0
  148. package/localized/zh-CN/skills/fec-performance-optimization/SKILL.md +80 -0
  149. package/localized/zh-CN/skills/fec-performance-optimization/references/framework-performance-patterns.md +38 -0
  150. package/localized/zh-CN/skills/fec-performance-optimization/references/report-template.md +59 -0
  151. package/localized/zh-CN/skills/fec-pwa-implementation/SKILL.md +35 -0
  152. package/localized/zh-CN/skills/fec-pwa-implementation/references/manifest-and-icons.md +53 -0
  153. package/localized/zh-CN/skills/fec-pwa-implementation/references/service-worker-workbox.md +68 -0
  154. package/localized/zh-CN/skills/fec-react-project-standard/SKILL.md +91 -0
  155. package/localized/zh-CN/skills/fec-react-project-standard/references/react-performance-patterns.md +35 -0
  156. package/localized/zh-CN/skills/fec-react-project-standard/references/react-project-structure.md +197 -0
  157. package/localized/zh-CN/skills/fec-react-project-standard/references/react-quality-patterns.md +131 -0
  158. package/localized/zh-CN/skills/fec-react-project-standard/references/react-runtime-patterns.md +293 -0
  159. package/localized/zh-CN/skills/fec-refactor-clean/SKILL.md +51 -0
  160. package/localized/zh-CN/skills/fec-refactor-clean/references/report-template.md +42 -0
  161. package/localized/zh-CN/skills/fec-responsive-layout/SKILL.md +34 -0
  162. package/localized/zh-CN/skills/fec-responsive-layout/references/responsive-layout-patterns.md +70 -0
  163. package/localized/zh-CN/skills/fec-route-protection/SKILL.md +135 -0
  164. package/localized/zh-CN/skills/fec-security-review/SKILL.md +38 -0
  165. package/localized/zh-CN/skills/fec-security-review/references/report-template.md +27 -0
  166. package/localized/zh-CN/skills/fec-security-review/references/security-checklist.md +64 -0
  167. package/localized/zh-CN/skills/fec-source-driven-development/SKILL.md +87 -0
  168. package/localized/zh-CN/skills/fec-state-management/SKILL.md +140 -0
  169. package/localized/zh-CN/skills/fec-state-management/references/state-patterns.md +109 -0
  170. package/localized/zh-CN/skills/fec-storybook-component-doc/SKILL.md +37 -0
  171. package/localized/zh-CN/skills/fec-storybook-component-doc/references/story-patterns.md +118 -0
  172. package/localized/zh-CN/skills/fec-svg-animation/SKILL.md +148 -0
  173. package/localized/zh-CN/skills/fec-tailwind-design-system/SKILL.md +34 -0
  174. package/localized/zh-CN/skills/fec-tailwind-design-system/references/tailwind-system-patterns.md +59 -0
  175. package/localized/zh-CN/skills/fec-tdd-workflow/SKILL.md +52 -0
  176. package/localized/zh-CN/skills/fec-testing-strategy/SKILL.md +45 -0
  177. package/localized/zh-CN/skills/fec-typescript-project-standard/SKILL.md +54 -0
  178. package/localized/zh-CN/skills/fec-typescript-project-standard/references/type-safety-patterns.md +102 -0
  179. package/localized/zh-CN/skills/fec-typescript-project-standard/references/type-safety.md +148 -0
  180. package/localized/zh-CN/skills/fec-ui-design/SKILL.md +108 -0
  181. package/localized/zh-CN/skills/fec-ui-design/data/product-rules.json +231 -0
  182. package/localized/zh-CN/skills/fec-ui-design/data/stack-ui-rules.json +146 -0
  183. package/localized/zh-CN/skills/fec-ui-design/data/style-archetypes.json +373 -0
  184. package/localized/zh-CN/skills/fec-ui-design/data/ux-quality-rules.json +203 -0
  185. package/localized/zh-CN/skills/fec-ui-design/references/design-intelligence.md +97 -0
  186. package/localized/zh-CN/skills/fec-ui-design/references/master-page-overrides.md +30 -0
  187. package/localized/zh-CN/skills/fec-ui-design/references/pre-delivery-checklist.md +39 -0
  188. package/localized/zh-CN/skills/fec-ui-design/scripts/design-system.mjs +648 -0
  189. package/localized/zh-CN/skills/fec-validation-fix/SKILL.md +51 -0
  190. package/localized/zh-CN/skills/fec-validation-fix/references/report-template.md +43 -0
  191. package/localized/zh-CN/skills/fec-vite-project-standard/SKILL.md +83 -0
  192. package/localized/zh-CN/skills/fec-vue3-project-standard/SKILL.md +58 -0
  193. package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-composables-routing.md +162 -0
  194. package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-performance-patterns.md +13 -0
  195. package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-project-structure.md +176 -0
  196. package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-state-api-quality.md +216 -0
  197. package/localized/zh-CN/skills/fec-web-video-presentation/SKILL.md +61 -0
  198. package/localized/zh-CN/skills/fec-web-video-presentation/data/starter-themes.json +59 -0
  199. package/localized/zh-CN/skills/fec-web-video-presentation/references/chapter-craft.md +37 -0
  200. package/localized/zh-CN/skills/fec-web-video-presentation/references/content-plan.md +38 -0
  201. package/localized/zh-CN/skills/fec-web-video-presentation/references/recording-and-audio.md +33 -0
  202. package/localized/zh-CN/skills/fec-web-video-presentation/references/theme-system.md +36 -0
  203. package/localized/zh-CN/skills/fec-web-video-presentation/scripts/create-video-presentation.mjs +430 -0
  204. package/localized/zh-CN/skills/fec-web-workers/SKILL.md +35 -0
  205. package/localized/zh-CN/skills/fec-web-workers/references/advanced-workers.md +54 -0
  206. package/localized/zh-CN/skills/fec-web-workers/references/basic-worker.md +67 -0
  207. package/localized/zh-CN/skills/metadata.json +1646 -0
  208. package/localized/zh-CN/skills/relations.json +755 -0
  209. package/localized/zh-CN/templates/claude/CLAUDE.md +106 -0
  210. package/localized/zh-CN/templates/claude/settings.json +62 -0
  211. package/localized/zh-CN/templates/codex/AGENTS.md +105 -0
  212. package/localized/zh-CN/templates/codex/config.toml +32 -0
  213. package/localized/zh-CN/templates/openclaw/AGENTS.md +101 -0
  214. package/localized/zh-CN/templates/openclaw/OPENCLAW-CONFIG.md +12 -0
  215. package/localized/zh-CN/templates/shared/rules/fec-agent-workflow.md +54 -0
  216. package/localized/zh-CN/templates/shared/rules/fec-api-layer.md +99 -0
  217. package/localized/zh-CN/templates/shared/rules/fec-ci-cd.md +40 -0
  218. package/localized/zh-CN/templates/shared/rules/fec-code-comments.md +33 -0
  219. package/localized/zh-CN/templates/shared/rules/fec-design-system.md +72 -0
  220. package/localized/zh-CN/templates/shared/rules/fec-error-handling.md +56 -0
  221. package/localized/zh-CN/templates/shared/rules/fec-git-conventions.md +73 -0
  222. package/localized/zh-CN/templates/shared/rules/fec-i18n.md +64 -0
  223. package/localized/zh-CN/templates/shared/rules/fec-naming-conventions.md +120 -0
  224. package/localized/zh-CN/templates/shared/rules/fec-performance.md +101 -0
  225. package/localized/zh-CN/templates/shared/rules/fec-react.md +82 -0
  226. package/localized/zh-CN/templates/shared/rules/fec-refactoring.md +47 -0
  227. package/localized/zh-CN/templates/shared/rules/fec-rendering-patterns.md +40 -0
  228. package/localized/zh-CN/templates/shared/rules/fec-responsive-design.md +50 -0
  229. package/localized/zh-CN/templates/shared/rules/fec-source-driven-development.md +31 -0
  230. package/localized/zh-CN/templates/shared/rules/fec-state-management.md +60 -0
  231. package/localized/zh-CN/templates/shared/rules/fec-testing.md +98 -0
  232. package/localized/zh-CN/templates/shared/rules/fec-typescript.md +112 -0
  233. package/localized/zh-CN/templates/shared/rules/fec-vue.md +64 -0
  234. package/localized/zh-CN/templates/shared/rules/fec-working-modes.md +50 -0
  235. package/openclaw.plugin.json +1 -1
  236. package/package.json +3 -2
  237. package/skills/TEMPLATE.md +74 -74
  238. package/skills/eval_queries.json +678 -678
  239. package/skills/fec-accessibility-check/SKILL.md +21 -21
  240. package/skills/fec-accessibility-check/references/report-template.md +12 -12
  241. package/skills/fec-accessibility-check/references/screen-reader-testing.md +24 -24
  242. package/skills/fec-alchemy/SKILL.md +50 -50
  243. package/skills/fec-alchemy/assets/absorption-plan-template.md +32 -32
  244. package/skills/fec-alchemy/assets/intake-template.md +55 -55
  245. package/skills/fec-alchemy/assets/review-checklist.md +23 -23
  246. package/skills/fec-alchemy/references/methodology.md +66 -66
  247. package/skills/fec-alchemy/references/originality-and-licensing.md +42 -42
  248. package/skills/fec-api-integration/SKILL.md +61 -61
  249. package/skills/fec-api-integration/references/integration-patterns.md +30 -30
  250. package/skills/fec-backend-requirements-handoff/SKILL.md +25 -25
  251. package/skills/fec-browser-storage/SKILL.md +16 -16
  252. package/skills/fec-browser-storage/references/storage-patterns.md +16 -16
  253. package/skills/fec-canvas-threejs/SKILL.md +21 -21
  254. package/skills/fec-canvas-threejs/references/rendering-patterns.md +10 -10
  255. package/skills/fec-canvas-threejs/references/shader-webgl-patterns.md +37 -37
  256. package/skills/fec-code-review/SKILL.md +94 -94
  257. package/skills/fec-code-review/references/report-template.md +13 -13
  258. package/skills/fec-component-testing/SKILL.md +39 -39
  259. package/skills/fec-data-fetching/SKILL.md +16 -16
  260. package/skills/fec-data-fetching/references/query-patterns.md +27 -27
  261. package/skills/fec-debug-framework/SKILL.md +95 -95
  262. package/skills/fec-debug-framework/references/report-template.md +34 -34
  263. package/skills/fec-dependency-upgrade/SKILL.md +17 -17
  264. package/skills/fec-dependency-upgrade/references/dependency-upgrade-workflow.md +31 -31
  265. package/skills/fec-doc-sync/SKILL.md +23 -23
  266. package/skills/fec-drawio-studio/SKILL.md +42 -38
  267. package/skills/fec-drawio-studio/data/THIRD_PARTY_NOTICES.md +1 -1
  268. package/skills/fec-drawio-studio/data/shape-index.json +83570 -0
  269. package/skills/fec-drawio-studio/references/diagram-patterns.md +19 -0
  270. package/skills/fec-drawio-studio/references/flowchart-quality.md +49 -0
  271. package/skills/fec-drawio-studio/references/layout-and-export.md +18 -3
  272. package/skills/fec-drawio-studio/references/xml-and-mermaid.md +5 -1
  273. package/skills/fec-drawio-studio/scripts/diagram-lint.mjs +62 -0
  274. package/skills/fec-drawio-studio/scripts/drawio-export.mjs +134 -0
  275. package/skills/fec-drawio-studio/scripts/shape-query.mjs +55 -15
  276. package/skills/fec-e2e-testing/SKILL.md +24 -24
  277. package/skills/fec-e2e-testing/references/e2e-ci-reporting.md +20 -20
  278. package/skills/fec-e2e-testing/references/e2e-special-scenarios.md +10 -10
  279. package/skills/fec-e2e-testing/references/e2e-visual-regression.md +17 -17
  280. package/skills/fec-e2e-testing/references/playwright-patterns.md +6 -6
  281. package/skills/fec-form-handling/SKILL.md +21 -21
  282. package/skills/fec-form-handling/references/advanced-form-patterns.md +41 -41
  283. package/skills/fec-image-generation/SKILL.md +54 -29
  284. package/skills/fec-image-generation/assets/interactive-diagram.html +371 -0
  285. package/skills/fec-image-generation/references/diagram-workflows.md +33 -2
  286. package/skills/fec-image-generation/references/html-technical-diagrams.md +236 -0
  287. package/skills/fec-image-generation/scripts/export-diagram.mjs +364 -0
  288. package/skills/fec-image-generation/scripts/interactive-diagram-server.mjs +654 -0
  289. package/skills/fec-image-generation/scripts/tech-diagram-render.mjs +1397 -0
  290. package/skills/fec-implement-from-design/SKILL.md +81 -81
  291. package/skills/fec-implement-from-design/references/design-plan-template.md +16 -16
  292. package/skills/fec-legacy-to-modern-migration/SKILL.md +29 -29
  293. package/skills/fec-legacy-to-modern-migration/references/migration-execution-checklist.md +81 -81
  294. package/skills/fec-legacy-to-modern-migration/references/migration-report-template.md +37 -37
  295. package/skills/fec-legacy-to-modern-migration/references/migration-strategy-and-mapping.md +31 -31
  296. package/skills/fec-legacy-web-standard/SKILL.md +17 -17
  297. package/skills/fec-legacy-web-standard/references/legacy-patterns.md +16 -16
  298. package/skills/fec-list-virtualization/SKILL.md +16 -16
  299. package/skills/fec-list-virtualization/references/virtualization-patterns.md +31 -31
  300. package/skills/fec-monorepo-project-standard/SKILL.md +52 -52
  301. package/skills/fec-motion-interaction/SKILL.md +51 -51
  302. package/skills/fec-motion-interaction/references/motion-patterns.md +11 -11
  303. package/skills/fec-nextjs-project-standard/SKILL.md +64 -64
  304. package/skills/fec-nuxt-project-standard/SKILL.md +57 -57
  305. package/skills/fec-performance-optimization/SKILL.md +54 -54
  306. package/skills/fec-performance-optimization/references/framework-performance-patterns.md +23 -23
  307. package/skills/fec-performance-optimization/references/report-template.md +31 -31
  308. package/skills/fec-pwa-implementation/SKILL.md +17 -17
  309. package/skills/fec-pwa-implementation/references/manifest-and-icons.md +12 -12
  310. package/skills/fec-pwa-implementation/references/service-worker-workbox.md +13 -13
  311. package/skills/fec-react-project-standard/SKILL.md +72 -72
  312. package/skills/fec-react-project-standard/references/react-performance-patterns.md +28 -28
  313. package/skills/fec-react-project-standard/references/react-project-structure.md +112 -112
  314. package/skills/fec-react-project-standard/references/react-quality-patterns.md +72 -72
  315. package/skills/fec-react-project-standard/references/react-runtime-patterns.md +94 -94
  316. package/skills/fec-refactor-clean/SKILL.md +30 -30
  317. package/skills/fec-refactor-clean/references/report-template.md +23 -23
  318. package/skills/fec-responsive-layout/SKILL.md +17 -17
  319. package/skills/fec-responsive-layout/references/responsive-layout-patterns.md +37 -37
  320. package/skills/fec-route-protection/SKILL.md +26 -26
  321. package/skills/fec-security-review/SKILL.md +20 -20
  322. package/skills/fec-security-review/references/report-template.md +12 -12
  323. package/skills/fec-security-review/references/security-checklist.md +27 -27
  324. package/skills/fec-source-driven-development/SKILL.md +59 -59
  325. package/skills/fec-state-management/SKILL.md +34 -34
  326. package/skills/fec-state-management/references/state-patterns.md +19 -19
  327. package/skills/fec-storybook-component-doc/SKILL.md +19 -19
  328. package/skills/fec-storybook-component-doc/references/story-patterns.md +12 -12
  329. package/skills/fec-svg-animation/SKILL.md +32 -32
  330. package/skills/fec-tailwind-design-system/SKILL.md +17 -17
  331. package/skills/fec-tailwind-design-system/references/tailwind-system-patterns.md +36 -36
  332. package/skills/fec-tdd-workflow/SKILL.md +28 -28
  333. package/skills/fec-testing-strategy/SKILL.md +29 -29
  334. package/skills/fec-typescript-project-standard/SKILL.md +38 -38
  335. package/skills/fec-typescript-project-standard/references/type-safety-patterns.md +20 -20
  336. package/skills/fec-typescript-project-standard/references/type-safety.md +18 -18
  337. package/skills/fec-ui-design/SKILL.md +90 -90
  338. package/skills/fec-ui-design/references/design-intelligence.md +61 -61
  339. package/skills/fec-ui-design/references/master-page-overrides.md +15 -15
  340. package/skills/fec-ui-design/references/pre-delivery-checklist.md +38 -38
  341. package/skills/fec-validation-fix/SKILL.md +26 -26
  342. package/skills/fec-validation-fix/references/report-template.md +25 -25
  343. package/skills/fec-vite-project-standard/SKILL.md +39 -39
  344. package/skills/fec-vue3-project-standard/SKILL.md +38 -38
  345. package/skills/fec-vue3-project-standard/references/vue3-composables-routing.md +36 -36
  346. package/skills/fec-vue3-project-standard/references/vue3-performance-patterns.md +8 -8
  347. package/skills/fec-vue3-project-standard/references/vue3-project-structure.md +112 -112
  348. package/skills/fec-vue3-project-standard/references/vue3-state-api-quality.md +74 -74
  349. package/skills/fec-web-video-presentation/SKILL.md +33 -33
  350. package/skills/fec-web-workers/SKILL.md +16 -16
  351. package/skills/fec-web-workers/references/advanced-workers.md +13 -13
  352. package/skills/fec-web-workers/references/basic-worker.md +8 -8
  353. package/skills/metadata.json +121 -115
  354. package/skills/relations.json +4 -0
  355. package/templates/claude/CLAUDE.md +60 -60
  356. package/templates/codex/AGENTS.md +76 -76
  357. package/templates/codex/config.toml +4 -4
  358. package/templates/openclaw/AGENTS.md +68 -68
  359. package/templates/openclaw/OPENCLAW-CONFIG.md +8 -8
  360. package/templates/shared/rules/fec-agent-workflow.md +40 -40
  361. package/templates/shared/rules/fec-api-layer.md +52 -52
  362. package/templates/shared/rules/fec-ci-cd.md +29 -29
  363. package/templates/shared/rules/fec-code-comments.md +22 -22
  364. package/templates/shared/rules/fec-design-system.md +53 -53
  365. package/templates/shared/rules/fec-error-handling.md +40 -40
  366. package/templates/shared/rules/fec-git-conventions.md +42 -42
  367. package/templates/shared/rules/fec-i18n.md +48 -48
  368. package/templates/shared/rules/fec-naming-conventions.md +91 -91
  369. package/templates/shared/rules/fec-performance.md +78 -78
  370. package/templates/shared/rules/fec-react.md +58 -58
  371. package/templates/shared/rules/fec-refactoring.md +34 -34
  372. package/templates/shared/rules/fec-rendering-patterns.md +36 -36
  373. package/templates/shared/rules/fec-responsive-design.md +37 -37
  374. package/templates/shared/rules/fec-source-driven-development.md +22 -22
  375. package/templates/shared/rules/fec-state-management.md +56 -56
  376. package/templates/shared/rules/fec-testing.md +64 -64
  377. package/templates/shared/rules/fec-typescript.md +75 -75
  378. package/templates/shared/rules/fec-vue.md +42 -42
  379. package/templates/shared/rules/fec-working-modes.md +34 -34
  380. package/skills/fec-drawio-studio/data/shape-index.json.gz +0 -0
@@ -1,80 +1,80 @@
1
1
  ---
2
2
  name: fec-performance-optimization
3
- description: Use when diagnosing or improving frontend performance, Core Web Vitals, bundle size, runtime rendering cost, network waterfalls, memory leaks, long tasks, Lighthouse findings, or performance budgets; Chinese triggers include 性能优化, 页面卡顿, 首屏慢, 包体积, Web Vitals.
3
+ description: Use when diagnosing or improving frontend performance, Core Web Vitals, bundle size, runtime rendering cost, network waterfalls, memory leaks, long tasks, Lighthouse findings, or performance budgets; Chinese triggers include performance optimization, page freeze, slow first screen, bundle volume, Web Vitals.
4
4
  ---
5
5
 
6
- # 前端性能优化
6
+ # Front-end performance optimization
7
7
 
8
8
  ## Purpose
9
9
 
10
- 用可度量的方式定位前端性能瓶颈,并把优化建议收敛到用户主路径、构建产物和运行时证据。
10
+ Use measurable methods to locate front-end performance bottlenecks, and converge optimization suggestions to the user's main path, build products, and runtime evidence.
11
11
 
12
12
  ## Procedure
13
13
 
14
- 1. 锁定体验目标
15
- - 明确问题属于首屏加载、交互延迟、滚动卡顿、内存上涨、网络瀑布、包体积,还是视觉稳定性。
16
- - 记录路由、设备、网络条件、浏览器、复现步骤和当前可用指标。
17
- - 没有指标时先建立基线,不直接给出“优化一切”的泛化建议。
18
-
19
- 2. 建立度量基线
20
- - 读取项目脚本、构建配置、依赖和已有性能报告。
21
- - 对页面体验优先使用 Lighthouse、Performance trace、React Profiler、Vue Devtools、Memory snapshot 或 RUM 数据。
22
- - 对包体优先看构建产物、source map、依赖重复、首屏 chunk 和动态 import 边界。
23
- - 对运行时卡顿优先看长任务、重复渲染、昂贵计算、同步循环、布局抖动和大列表。
24
- - 如果已有线上监控、平台指标或 CI 产物,先用它们确认受影响路由、设备、时间窗和用户主路径,再决定读哪些源码。
25
-
26
- 3. 分层定位
27
- - 加载层:关键 CSS、字体、图片、脚本阻塞、预加载和缓存。
28
- - 渲染层:不稳定 key、过宽 Context、无意义 effect、重复计算、组件树过大。
29
- - 数据层:串行请求、重复请求、过大 payload、缺少分页或缓存策略。
30
- - 主线程:JSON/CSV 解析、图片处理、复杂排序过滤、同步压缩和大对象深拷贝。
31
- - 资源层:事件监听、定时器、订阅、WebGL/Canvas 资源和对象 URL 未释放。
32
-
33
- 4. 形成优化方案
34
- - 每个建议必须绑定位置、影响、改法和验证方式。
35
- - 优先处理高频主路径和 P95 体验;低频后台任务不抢占首屏预算。
36
- - 先做低风险高收益改动,如懒加载、去重、缓存、尺寸预留、虚拟列表、稳定引用和释放资源。
37
- - 对会牺牲可维护性的技巧,必须说明收益证据和替代方案。
38
- - 建议进入实现前先过候选门禁:是否有指标支撑、能否定位到路由/组件/chunk/请求、是否可由前端验证、是否存在更小改动。
39
-
40
- 5. 验证回归
41
- - 重新运行受影响构建、测试和性能采集命令。
42
- - 对比优化前后指标或产物体积。
43
- - 确认 loading、empty、error、offline、reduced-motion 和移动端状态未被优化破坏。
14
+ 1. Lock in experience goals
15
+ - Clarify whether the problem is first screen loading, interaction delay, scrolling lag, memory increase, network waterfall, packet size, or visual stability.
16
+ - Document routes, devices, network conditions, browsers, replication steps, and currently available metrics.
17
+ - When there are no indicators, establish a baseline first and do not directly give generalized suggestions of "optimizing everything".
18
+
19
+ 2. Establish a measurement baseline
20
+ - Read project scripts, build configurations, dependencies and existing performance reports.
21
+ - Prioritize the use of Lighthouse, Performance trace, React Profiler, Vue Devtools, Memory snapshot or RUM data for page experience.
22
+ - Prioritize build products, source maps, dependency duplication, first-screen chunks and dynamic import boundaries for package bodies.
23
+ - Prioritize long tasks, repeated renderings, expensive calculations, synchronized loops, layout jitters and large lists for runtime lags.
24
+ - If there are online monitoring, platform indicators or CI products, first use them to confirm the affected routes, devices, time windows and user main paths, and then decide which source code to read.
25
+
26
+ 3. Hierarchical positioning
27
+ - Loading layers: critical CSS, fonts, images, script blocking, preloading and caching.
28
+ - Rendering layer: unstable keys, too wide Context, meaningless effects, repeated calculations, and component trees that are too large.
29
+ - Data layer: serial requests, repeated requests, too large payload, lack of paging or caching strategy.
30
+ - Main thread: JSON/CSV parsing, image processing, complex sorting and filtering, synchronous compression and large object deep copy.
31
+ - Resource layer: event listeners, timers, subscriptions, WebGL/Canvas resources and object URLs are not released.
32
+
33
+ 4. Form an optimization plan
34
+ - Each suggestion must be bound to location, impact, modification and verification method.
35
+ - Prioritize the high-frequency main path and P95 experience; low-frequency background tasks do not occupy the first screen budget.
36
+ - Make low-risk, high-yield changes first, such as lazy loading, deduplication, caching, size reservation, virtual lists, stable references and releasing resources.
37
+ - For techniques that sacrifice maintainability, evidence of benefits and alternatives must be stated.
38
+ - It is recommended to go through the candidate access control before entering the implementation: whether there is indicator support, whether the route/component/chunk/request can be located, whether it can be verified by the front end, and whether there are smaller changes.
39
+
40
+ 5. Verify regression
41
+ - Rerun affected build, test, and performance collection commands.
42
+ - Compare indicators or product volumes before and after optimization.
43
+ - Confirm that loading, empty, error, offline, reduced-motion and mobile state are not destroyed by optimization.
44
44
 
45
45
  ## Budgets
46
46
 
47
47
  | Area | Default Target | Notes |
48
48
  | ---- | -------------- | ----- |
49
- | LCP | 约 2.5s 内 | 以核心页面、目标地区网络和真实设备为准 |
50
- | CLS | 低于 0.1 | 媒体、广告、异步内容需要预留空间 |
51
- | INP | 约 200ms 内 | 优先拆分长任务和降低交互路径重渲染 |
52
- | Initial JS | 遵循项目预算 | 没有预算时先报告当前 gzip / brotli 体积 |
53
- | Main thread | 避免连续长任务 | 大计算考虑分片、缓存或 Worker |
49
+ | LCP | Within about 2.5s | Subject to core page, target area network and real device |
50
+ | CLS | Less than 0.1 | Media, advertising, and asynchronous content require reserved space |
51
+ | INP | Within about 200ms | Prioritize splitting long tasks and reduce interaction path re-rendering |
52
+ | Initial JS | Follow project budget | Report current gzip / brotli size first if there is no budget |
53
+ | Main thread | Avoid continuous long tasks | Consider sharding, caching or Worker for large calculations |
54
54
 
55
55
  ## Checks
56
56
 
57
- - 首屏资源是否包含非首屏组件、图表、编辑器、地图或全量图标库。
58
- - 图片是否有明确尺寸、合适格式、懒加载和首屏优先级。
59
- - 列表、表格、时间线是否需要虚拟化或分页。
60
- - 搜索、筛选、排序是否在热路径重复 O(n*m) 扫描。
61
- - 请求是否可并行、可缓存、可取消、可复用。
62
- - 监听、订阅、定时器、AbortController、Object URL、Canvas/WebGL 资源是否对称清理。
57
+ - Whether the above-the-fold resources include non-above-the-fold components, charts, editors, maps, or full icon libraries.
58
+ - Whether the image has clear size, appropriate format, lazy loading and first screen priority.
59
+ - Whether lists, tables, and timelines require virtualization or paging.
60
+ - Whether searching, filtering, and sorting repeat O(n*m) scans on the hot path.
61
+ - Whether the request can be parallelized, cached, cancelled, and reusable.
62
+ - Whether listening, subscription, timer, AbortController, Object URL, Canvas/WebGL resources are cleaned symmetrically.
63
63
 
64
64
  ## Constraints
65
65
 
66
- - 不做没有目标和证据的过早优化。
67
- - 不靠关闭功能、删除状态反馈或降低可访问性来换性能分数。
68
- - 不为一次 Lighthouse 分数牺牲真实用户主路径。
69
- - 不引入大型新依赖解决小问题;先利用项目已有工具和浏览器能力。
70
- - 不把后端、网络和浏览器侧问题混为一谈;前端能验证的部分要单独列证据。
71
- - 不从 repo-wide grep 直接跳到优化结论;先用指标或复现路径收窄候选,再读相关源码。
66
+ - Don’t do premature optimization without goals and evidence.
67
+ - Don’t trade off features, remove status feedback, or reduce accessibility in exchange for performance points.
68
+ - Do not sacrifice real user home paths for a single Lighthouse score.
69
+ - Solve small problems without introducing large new dependencies; first use the existing tools and browser capabilities of the project.
70
+ - Do not confuse back-end, network and browser-side issues; the parts that can be verified on the front-end should be separately documented.
71
+ - Do not jump directly from repo-wide grep to the optimization conclusion; first use indicators or recurrence paths to narrow down candidates, and then read the relevant source code.
72
72
 
73
- ## 详细参考
73
+ ## Detailed reference
74
74
 
75
- 撰写性能分析报告时,加载 [references/report-template.md](references/report-template.md)。
76
- 需要按 React、Vue、Next.js 或 Nuxt 分类定位框架专项性能风险时,加载 [references/framework-performance-patterns.md](references/framework-performance-patterns.md)。
75
+ When writing a performance analysis report, load [references/report-template.md](references/report-template.md).
76
+ When you need to locate framework-specific performance risks classified by React, Vue, Next.js or Nuxt, load [references/framework-performance-patterns.md](references/framework-performance-patterns.md).
77
77
 
78
78
  ## Expected Output
79
79
 
80
- 输出有证据链的性能分析报告,说明基线、候选门禁、瓶颈、优化建议、验证方式和剩余风险。报告保存为 `reports/performance-review-YYYY-MM-DD-HHmmss.md`。
80
+ Output a performance analysis report with an evidence chain, describing the baseline, candidate access control, bottlenecks, optimization suggestions, verification methods and remaining risks. The report is saved as `reports/performance-review-YYYY-MM-DD-HHmmss.md`.
@@ -1,38 +1,38 @@
1
- # 框架专项性能诊断模式
1
+ #Framework-specific performance diagnostic mode
2
2
 
3
- 本参考用于已经进入性能优化流程后的专项定位。先建立目标、基线和候选门禁,再按框架读取对应分类;不要从这些清单直接跳到结论。
3
+ This reference is used for special positioning after entering the performance optimization process. Establish goals, baselines, and candidate gates first, then read corresponding categories by framework; don't jump directly from these lists to conclusions.
4
4
 
5
5
  ## React / Client React
6
6
 
7
- - **Waterfall**:独立请求、权限检查、feature flag 或子组件数据是否被串行等待。用 Network waterfall、React Profiler 或用户路径日志确认依赖关系。
8
- - **Bundle**:首屏是否同步引入图表、编辑器、地图、3D、全量图标、重型日期库或 barrel export。用构建产物、source map 或 bundle analyzer 定位 chunk。
9
- - **Rerender**:Context 是否过宽,selector 是否过粗,默认对象/数组 props 是否每次新建,昂贵派生是否在热路径重复执行。用 React Profiler 或可复现交互证明。
10
- - **Effect**:是否用 effect 保存可直接推导的数据,是否把交互逻辑放进 effect,是否缺少取消、清理或稳定依赖。用渲染次数、请求次数或内存/订阅证据确认。
11
- - **Lazy boundary**:Suspense、动态 import、错误 fallback、loading/empty/error 状态是否成对出现,懒加载是否破坏焦点或首屏布局稳定性。
7
+ - **Waterfall**: Whether independent requests, permission checks, feature flags, or subcomponent data are waited for serially. Confirm dependencies using Network waterfall, React Profiler, or user path logs.
8
+ - **Bundle**: Whether to simultaneously introduce charts, editors, maps, 3D, full icons, heavy date libraries or barrel exports on the first screen. Locate chunks using build products, source maps, or bundle analyzers.
9
+ - **Rerender**: Whether the Context is too wide, whether the selector is too thick, whether the default object/array props are created every time, and whether expensive derivation is executed repeatedly in the hot path. Use React Profiler or reproducible interactive proofs.
10
+ - **Effect**: Whether to use effect to save data that can be directly deduced, whether to put interaction logic into effect, whether to lack cancellation, cleanup or stable dependencies. Confirm with render count, request count, or memory/subscription evidence.
11
+ - **Lazy boundary**: Whether Suspense, dynamic import, error fallback, loading/empty/error status appear in pairs, whether lazy loading destroys focus or first screen layout stability.
12
12
 
13
13
  ## Vue 3 / Nuxt Client
14
14
 
15
- - **Reactive payload size**:大型对象、表格数据或第三方实例是否被深层响应式代理。用组件更新、内存快照或长任务证据判断是否需要浅响应式或不可变边界。
16
- - **Computed/watch**:本该 computed 的派生值是否用大范围 watcher 手动同步,watch 是否监听过宽对象,异步 watch 是否缺少取消和竞态处理。
17
- - **Template hot path**:`v-for` 中是否混用 `v-if`、内联重计算、缺少稳定 `:key`,或在大列表中渲染非视区节点。
18
- - **Async component boundary**:重型组件是否使用异步组件或路由级动态导入,加载状态是否稳定,错误态是否可恢复。
19
- - **Store fan-out**:Pinia store 是否把高频 UI 临时状态扩散到大范围订阅者,或把服务端缓存复制到全局 store。
15
+ - **Reactive payload size**: Whether large objects, tabular data, or third-party instances are deeply reactively proxied. Use component updates, memory snapshots, or evidence of long tasks to determine whether shallow reactive or immutable boundaries are needed.
16
+ - **Computed/watch**: Whether the computed derived value is manually synchronized with a wide range watcher, whether the watch monitors wide objects, and whether the asynchronous watch lacks cancellation and race handling.
17
+ - **Template hot path**: Mixed `v-if` in `v-for`, inline recalculation, missing stable `:key`, or rendering non-viewport nodes in a large list.
18
+ - **Async component boundary**: Whether heavy-duty components use asynchronous components or route-level dynamic import, whether the loading state is stable, and whether the error state is recoverable.
19
+ - **Store fan-out**: Whether the Pinia store spreads high-frequency UI temporary state to a wide range of subscribers, or copies the server cache to the global store.
20
20
 
21
21
  ## Next.js
22
22
 
23
- - **Dynamic route drift**:cookies、headers、searchParams 或未缓存 fetch 是否让静态路由变动态。用构建输出、响应头或路由行为确认。
24
- - **RSC serialization**:Server Component 是否向 Client Component 传递过大 props、重复数据或不可序列化结构。
25
- - **Fetch/cache policy**:`force-cache`、`no-store`、`revalidate`、tag/path revalidation 是否与数据私有性和更新频率匹配。
26
- - **Client boundary leakage**:根布局或高层客户端边界是否同步带入重型浏览器库、Provider 或不必要状态。
27
- - **Middleware cost**:middleware 是否承载重型查询、日志批处理或可放到 route handler 的业务逻辑。
23
+ - **Dynamic route drift**: Whether cookies, headers, searchParams or uncached fetch make static routes dynamic. Confirm with build output, response headers, or route behavior.
24
+ - **RSC serialization**: Whether the Server Component passes too large props, duplicate data or unserializable structures to the Client Component.
25
+ - **Fetch/cache policy**: Whether `force-cache`, `no-store`, `revalidate`, tag/path revalidation match the data privacy and update frequency.
26
+ - **Client boundary leakage**: Whether the root layout or high-level client boundary is synchronized with heavy browser libraries, providers or unnecessary state.
27
+ - **Middleware cost**: Whether the middleware carries heavy queries, log batch processing, or business logic that can be placed in the route handler.
28
28
 
29
29
  ## Nuxt 3
30
30
 
31
- - **Rendering mode mismatch**:页面是否应为 SSR、SSG、ISR/route rules 或 SPA,实际行为是否和部署目标一致。
32
- - **Data duplication**:`useFetch` / `useAsyncData` 是否重复请求,key 是否稳定,客户端 hydration 是否重复拉取同一数据。
33
- - **Route middleware cost**:路由中间件是否做重型异步工作、重复鉴权请求或不可缓存的全局阻塞逻辑。
34
- - **Client-only islands**:只在浏览器运行的图表、编辑器、地图或 WebGL 是否被隔离到 client-only 或异步边界。
31
+ - **Rendering mode mismatch**: Whether the page should be SSR, SSG, ISR/route rules or SPA, and whether the actual behavior is consistent with the deployment target.
32
+ - **Data duplication**: `useFetch` / `useAsyncData` Whether the request is repeated, whether the key is stable, whether the client hydration repeatedly pulls the same data.
33
+ - **Route middleware cost**: Whether the routing middleware does heavy asynchronous work, repeated authentication requests or non-cacheable global blocking logic.
34
+ - **Client-only islands**: Whether charts, editors, maps or WebGL that run only in the browser are isolated to client-only or async boundaries.
35
35
 
36
- ## 输出要求
36
+ ## Output requirements
37
37
 
38
- 每个框架专项建议都要写清楚:证据来源、受影响路由/组件/chunk/请求、建议改法、验证命令和可能影响的 loading、error、empty、offline、reduced-motion 或移动端状态。
38
+ Each framework-specific proposal must be written clearly: source of evidence, affected routes/components/chunks/requests, recommended changes, verification commands and possible impact on loading, error, empty, offline, reduced-motion or mobile status.
@@ -1,59 +1,59 @@
1
- # 性能分析报告模板
1
+ #Performance analysis report template
2
2
 
3
3
  ```markdown
4
- # 前端性能分析报告
4
+ # Front-end performance analysis report
5
5
 
6
- > 生成时间: YYYY-MM-DD HH:mm
7
- > 目标页面/流程: ...
8
- > 环境: 设备、浏览器、网络、分支或版本
6
+ > Generation time: YYYY-MM-DD HH:mm
7
+ > Target page/process: ...
8
+ > Environment: Device, Browser, Network, Branch or Version
9
9
 
10
- ## 性能目标
10
+ ## Performance target
11
11
 
12
- - 关注指标: LCP / CLS / INP / TBT / bundle size / memory / FPS
13
- - 项目预算或目标阈值
14
- - 用户主路径和 P95 场景
12
+ - Focus on metrics: LCP / CLS / INP / TBT / bundle size / memory / FPS
13
+ - Project budget or target threshold
14
+ - User home path and P95 scene
15
15
 
16
- ## 基线数据
16
+ ## Baseline data
17
17
 
18
- | 指标 | 当前值 | 采集方式 | 备注 |
18
+ | Indicator | Current value | Collection method | Remarks |
19
19
  | --- | --- | --- | --- |
20
20
  | LCP | ... | Lighthouse / RUM / trace | ... |
21
21
 
22
- ## 瓶颈定位
22
+ ## Bottleneck location
23
23
 
24
- - 加载层、渲染层、数据层、主线程或资源层问题
25
- - 关联文件、路由、chunk、组件或请求
26
- - 支持该判断的 trace、bundle、日志或截图证据
24
+ - Problems with loading layer, rendering layer, data layer, main thread or resource layer
25
+ - Associated files, routes, chunks, components or requests
26
+ - Trace, bundle, log or screenshot evidence to support this judgment
27
27
 
28
- ## 候选门禁
28
+ ## Candidate access control
29
29
 
30
- | 候选问题 | 指标支撑 | 定位范围 | 前端可验证性 | 结论 |
30
+ | Candidate questions | Indicator support | Positioning scope | Front-end verifiability | Conclusion |
31
31
  | --- | --- | --- | --- | --- |
32
- | ... | RUM / trace / bundle / network | route / component / chunk / request | 是 / 否 / 需协作 | investigate / defer / reject |
32
+ | ... | RUM / trace / bundle / network | route / component / chunk / request | Yes / No / Collaboration required | investigate / defer / reject |
33
33
 
34
- ## 优先级
34
+ ## Priority
35
35
 
36
- | 优先级 | 问题 | 用户影响 | 风险 |
36
+ | Priority | Issues | User Impact | Risks |
37
37
  | --- | --- | --- | --- |
38
38
  | P0 / P1 / P2 | ... | ... | ... |
39
39
 
40
- ## 优化方案
40
+ ## Optimization plan
41
41
 
42
- - 具体改法
43
- - 替代方案
44
- - 可维护性、可访问性和产品行为影响
42
+ - Specific changes to the law
43
+ - Alternatives
44
+ - Maintainability, accessibility and product behavior impacts
45
45
 
46
- ## 验证对比
46
+ ## Verification comparison
47
47
 
48
- | 指标 | 优化前 | 优化后 | 采集方式 |
48
+ | Indicators | Before optimization | After optimization | Collection method |
49
49
  | --- | --- | --- | --- |
50
50
  | ... | ... | ... | ... |
51
51
 
52
- ## 剩余风险
52
+ ## Residual risk
53
53
 
54
- - 未覆盖设备、网络或浏览器
55
- - 需要后端、设计、产品或基础设施协作的部分
56
- - 建议监控或后续任务
54
+ - No device, network or browser coverage
55
+ - Parts that require backend, design, product or infrastructure collaboration
56
+ - Suggest monitoring or follow-up tasks
57
57
  ```
58
58
 
59
- 分析完成后,将报告保存到 `reports/performance-review-YYYY-MM-DD-HHmmss.md`,并告知用户报告路径。
59
+ After the analysis is completed, save the report to `reports/performance-review-YYYY-MM-DD-HHmmss.md` and inform the user of the report path.
@@ -1,35 +1,35 @@
1
1
  ---
2
2
  name: fec-pwa-implementation
3
- description: Use when adding or reviewing Progressive Web App capabilities such as installability, manifest metadata, Service Worker registration, Workbox caching, offline fallback, app update prompts, maskable icons, or iOS PWA compatibility. Do not use for general API caching or non-installable performance tuning; Chinese triggers include PWA, 离线, Service Worker.
3
+ description: Use when adding or reviewing Progressive Web App capabilities such as installability, manifest metadata, Service Worker registration, Workbox caching, offline fallback, app update prompts, maskable icons, or iOS PWA compatibility. Do not use for general API caching or non-installable performance tuning; Chinese triggers include PWA, offline, Service Worker.
4
4
  ---
5
5
 
6
- # PWA 实现
6
+ # PWA implementation
7
7
 
8
8
  ## Purpose
9
9
 
10
- 让 Web 应用具备可安装、离线兜底和可控更新能力。
10
+ Make web applications installable, offline and controllable to update.
11
11
 
12
12
  ## Procedure
13
13
 
14
- 1. 确认 PWA 是否值得做:面向移动端/桌面安装、弱网离线、重复访问场景时优先;纯内部后台、强实时流媒体或只需要普通缓存时不要强行 PWA。
15
- 2. 先补齐 manifest、图标、主题色和 HTML 引用;图标至少覆盖 192/512,Android 需 maskable,iOS 需 apple touch icon。
16
- 3. 注册 Service Worker,并设计更新提示;不要静默 `skipWaiting()` 后强刷用户页面。
17
- 4. 用 Workbox 或框架插件管理 precache/runtime cache;登录、支付、权限变更等敏感请求必须走网络。
18
- 5. 提供 offline fallback 页面和安装提示 UI,并验证首次加载、离线访问、更新激活、卸载重装。
14
+ 1. Confirm whether PWA is worth doing: priority is given to mobile/desktop installations, weak network offline, and repeated access scenarios; do not force PWA when it is purely internal backend, has strong real-time streaming media, or only requires ordinary caching.
15
+ 2. First complete the manifest, icon, theme color and HTML reference; the icon covers at least 192/512, Android needs to be maskable, and iOS needs apple touch icon.
16
+ 3. Register the Service Worker and design an update prompt; do not forcefully refresh the user page after silently `skipWaiting()`.
17
+ 4. Use Workbox or framework plug-in to manage precache/runtime cache; sensitive requests such as login, payment, and permission changes must go through the network.
18
+ 5. Provide offline fallback page and installation prompt UI, and verify initial loading, offline access, update activation, uninstallation and reinstallation.
19
19
 
20
- ## 详细参考
20
+ ## Detailed reference
21
21
 
22
- - 需要 manifest 字段、HTML 引用、图标要求、截图和 iOS 注意事项时,加载 [references/manifest-and-icons.md](references/manifest-and-icons.md)。
23
- - 需要 Service Worker 注册、Workbox 策略、Vite 集成、离线兜底和更新流程时,加载 [references/service-worker-workbox.md](references/service-worker-workbox.md)。
22
+ - Load [references/manifest-and-icons.md](references/manifest-and-icons.md) when manifest fields, HTML references, icon requirements, screenshots, and iOS notes are required.
23
+ - Load [references/service-worker-workbox.md](references/service-worker-workbox.md) when Service Worker registration, Workbox policy, Vite integration, offline backup and update process are required.
24
24
 
25
25
  ## Constraints
26
26
 
27
- - Service Worker 仅在 HTTPS 下工作(localhost 除外)。
28
- - 缓存策略必须区分页面、静态资源、API 与敏感操作;不要把登录、支付、权限接口缓存起来。
29
- - Service Worker 更新有生命周期延迟;用户可见刷新提示优先于强制刷新。
30
- - iOS PWA 能力弱于 Android,安装、推送和生命周期都要单独验证。
31
- - 缓存有配额和逐出机制,必须设置 max entries / max age。
27
+ - Service Worker only works under HTTPS (except localhost).
28
+ - The caching strategy must distinguish between pages, static resources, APIs and sensitive operations; do not cache login, payment, and permission interfaces.
29
+ - Service Worker updates have a lifecycle delay; user-visible refresh prompts take precedence over forced refreshes.
30
+ - iOS PWA capabilities are weaker than Android, and installation, push and life cycle must be verified separately.
31
+ - The cache has quotas and eviction mechanisms, and max entries / max age must be set.
32
32
 
33
33
  ## Expected Output
34
34
 
35
- 产出可安装的 Web 应用、离线 fallback、可见更新提示和明确缓存策略。验证 Lighthouse PWA、DevTools Application 面板、离线模式、更新发布和移动端安装流程。
35
+ Produce installable web apps, offline fallbacks, visible update prompts, and explicit caching policies. Validate Lighthouse PWA, DevTools Application panel, offline mode, update release and mobile installation process.
@@ -1,16 +1,16 @@
1
- # Manifest、图标与安装入口
1
+ # Manifest, icon and installation entrance
2
2
 
3
- ## Manifest 示例
3
+ ## Manifest Example
4
4
 
5
5
  ```json
6
6
  {
7
- "name": "我的应用",
8
- "short_name": "应用",
7
+ "name": "My App",
8
+ "short_name": "Application",
9
9
  "start_url": "/",
10
10
  "display": "standalone",
11
11
  "background_color": "#ffffff",
12
12
  "theme_color": "#0052cc",
13
- "description": "应用描述",
13
+ "description": "Application description",
14
14
  "icons": [
15
15
  {
16
16
  "src": "/icon-192.png",
@@ -36,7 +36,7 @@
36
36
  }
37
37
  ```
38
38
 
39
- ## HTML 引用
39
+ ## HTML Quote
40
40
 
41
41
  ```html
42
42
  <link rel="manifest" href="/manifest.json" />
@@ -44,10 +44,10 @@
44
44
  <link rel="apple-touch-icon" href="/icon-192.png" />
45
45
  ```
46
46
 
47
- ## 检查要点
47
+ ## Check Points
48
48
 
49
- - `display: "standalone"` 才有接近原生应用的启动体验。
50
- - `purpose: "any maskable"` 避免 Android 自适应图标被裁剪。
51
- - `start_url` 应指向登录后或游客可安全进入的入口。
52
- - `screenshots` 会影响安装对话框质量。
53
- - iOS 仍依赖 `apple-touch-icon`,安装提示也通常需要用户手动完成。
49
+ - `display: "standalone"` will have a startup experience close to native applications.
50
+ - `purpose: "any maskable"` prevents Android adaptive icons from being cropped.
51
+ - `start_url` should point to a login or entry point that is safe for visitors.
52
+ - `screenshots` can affect the quality of the installation dialog.
53
+ - iOS still relies on `apple-touch-icon`, and installation prompts usually require users to complete it manually.
@@ -1,6 +1,6 @@
1
- # Service Worker、Workbox 与更新流
1
+ # Service Worker, Workbox and update flow
2
2
 
3
- ## 注册 Service Worker
3
+ ## Register Service Worker
4
4
 
5
5
  ```ts
6
6
  export function registerServiceWorker() {
@@ -23,16 +23,16 @@ export function registerServiceWorker() {
23
23
  }
24
24
  ```
25
25
 
26
- ## 缓存策略
26
+ ## Caching strategy
27
27
 
28
- | 策略 | 适用 | 注意 |
28
+ | Policy | Applicable | Note |
29
29
  | --- | --- | --- |
30
- | `CacheFirst` | 带 hash 的图片、字体、CSS/JS | 必须设置过期策略 |
31
- | `NetworkFirst` | 页面导航、低风险 GET API | 网络失败才降级缓存 |
32
- | `StaleWhileRevalidate` | 字体、头像、低风险静态数据 | 用户会先看到旧数据 |
33
- | `NetworkOnly` | 登录、支付、权限、写操作 | 不进入 SW 缓存 |
30
+ | `CacheFirst` | Images, fonts, CSS/JS with hash | Expiration policy must be set |
31
+ | `NetworkFirst` | Page navigation, low-risk GET API | Downgrade cache only when network fails |
32
+ | `StaleWhileRevalidate` | Fonts, avatars, low-risk static data | Users will see old data first |
33
+ | `NetworkOnly` | Login, payment, permissions, write operations | Do not enter SW cache |
34
34
 
35
- ## Vite 集成
35
+ ## Vite integration
36
36
 
37
37
  ```ts
38
38
  import { VitePWA } from "vite-plugin-pwa";
@@ -61,8 +61,8 @@ export default defineConfig({
61
61
  });
62
62
  ```
63
63
 
64
- ## 离线与更新
64
+ ## Offline and Updates
65
65
 
66
- - 为未缓存页面准备 `/offline.html`,不要让用户只看到浏览器错误页。
67
- - 更新提示应说明“新版本已可用”,由用户确认刷新。
68
- - 调试时使用 DevTools Application 面板,必要时清理旧 Service Worker 和 Cache Storage。
66
+ - Prepare `/offline.html` for uncached pages, don't let users only see browser error pages.
67
+ - The update prompt should state "New version is available" and it is up to the user to confirm the refresh.
68
+ - Use the DevTools Application panel when debugging and clean up old Service Workers and Cache Storage if necessary.