@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,94 +1,94 @@
1
- # 项目吸收方法论
1
+ # Project absorption methodology
2
2
 
3
- ## 目标
3
+ ## Target
4
4
 
5
- 本文档用于扩展 `SKILL.md` 中的核心流程,适合更大型的“参考系统到目标项目”能力吸收任务。参考系统可以是代码库、产品、服务、框架、库、CLI、插件、文档体系或 AI/Agent 工具链。
5
+ This document is used to extend the core process in `SKILL.md`, suitable for larger "reference system to target project" capability absorption tasks. A reference system can be a code base, product, service, framework, library, CLI, plug-in, documentation system, or AI/Agent toolchain.
6
6
 
7
- ## 阶段 1:建立目标项目基线
7
+ ## Phase 1: Establish Target Project Baseline
8
8
 
9
- 在深入研究参考项目之前,先为目标项目建立简短基线:
9
+ Before diving into the reference project, establish a brief baseline for the target project:
10
10
 
11
- - 目标项目声明的用途是什么?
12
- - 当前已有的顶层能力有哪些?
13
- - 已存在的入口、扩展点和用户工作流有哪些?
14
- - 哪些区域仍在活跃维护?
15
- - 哪些区域脆弱、复杂或过度设计?
16
- - 已有哪些测试和验证命令?
11
+ - What is the purpose of the target project statement?
12
+ - What are the current top-level capabilities?
13
+ - What entry points, extension points and user workflows already exist?
14
+ - Which areas are still under active maintenance?
15
+ - Which areas are fragile, complex or over-engineered?
16
+ - What testing and verification commands are in place?
17
17
 
18
- 在理解目标项目基线之前,不要过早形成改造建议。
18
+ Don’t prematurely formulate renovation recommendations before understanding the target project baseline.
19
19
 
20
- ## 阶段 2:扫描参考项目
20
+ ## Phase 2: Scan Reference Projects
21
21
 
22
- 扫描参考系统中的高信号材料:
22
+ Scan high-signal materials in reference systems:
23
23
 
24
- - README 和文档:项目定位、使用模型、安装、配置。
25
- - 包或构建元数据:技术选型、依赖范围、脚本命令。
26
- - 源码布局:架构、模块边界、命名约定。
27
- - 能力域:产品能力、架构模式、领域模型、接口协议、数据流、运行时行为、开发体验、质量体系、交付流程、文档知识、生态扩展。
28
- - 项目形态探针:按参考系统类型选择相关目录和行为入口,不假设所有项目都有相同结构。
29
- - 测试:预期行为和边界场景。
30
- - 示例:面向用户的工作流和上手体验质量。
24
+ - README and documentation: project location, usage model, installation, configuration.
25
+ - Package or build metadata: technology selection, dependency scope, script commands.
26
+ - Source code layout: architecture, module boundaries, naming conventions.
27
+ - Capability domain: product capabilities, architectural patterns, domain models, interface protocols, data flow, runtime behavior, development experience, quality system, delivery process, document knowledge, and ecological expansion.
28
+ - Project shape probe: select relevant directories and behavior entries according to the reference system type, without assuming that all projects have the same structure.
29
+ - Testing: expected behavior and edge scenarios.
30
+ - Example: User-facing workflow and quality of onboarding experience.
31
31
 
32
- 记录观察时,应记录为“能力”,而不是“文件”。例如写“具备带环境检查的引导式配置向导”,而不是写“复制 setup.ts”。
32
+ When recording observations, they should be recorded as “competencies,” not “documents.” For example, write "Has guided configuration wizard with environment checks" instead of "Copy setup.ts".
33
33
 
34
- ### 项目形态探针
34
+ ### Project shape probe
35
35
 
36
- 按目标和参考系统的实际形态选择扫描视角:
36
+ Select the scan angle according to the actual shape of the target and reference system:
37
37
 
38
- - 前端项目:页面、组件、路由、状态、数据请求、表单、设计系统、可访问性、性能、构建。
39
- - 后端项目:API、服务边界、数据库、队列、缓存、认证授权、任务调度、可观测性、部署。
40
- - 工具或 CLI 项目:命令模型、配置、插件机制、错误输出、安装分发、模板。
41
- - AI/Agent 项目:skills、commands、hooks、rules、agents、MCP、prompt、workflow。
42
- - 库项目:公开 API、类型、兼容性、构建产物、示例、版本策略。
43
- - 文档或知识库项目:信息架构、导航、示例、搜索、版本化、贡献流程、发布节奏。
38
+ - Front-end projects: pages, components, routing, state, data requests, forms, design systems, accessibility, performance, build.
39
+ - Backend projects: API, service boundary, database, queue, cache, authentication and authorization, task scheduling, observability, deployment.
40
+ - Tool or CLI project: command model, configuration, plugin mechanism, error output, installation distribution, templates.
41
+ - AI/Agent projects: skills, commands, hooks, rules, agents, MCP, prompts, workflow.
42
+ - Library project: public API, types, compatibility, build artifacts, examples, version policy.
43
+ - Documentation or knowledge base project: information architecture, navigation, examples, search, versioning, contribution process, release cadence.
44
44
 
45
- 如果项目横跨多种形态,优先选择与用户目标直接相关的 1 到 3 个视角,避免把吸收任务扩大成全仓库审计。
45
+ If the project spans multiple modalities, prioritize 1 to 3 perspectives that are directly related to user goals to avoid expanding the absorption task into a full warehouse audit.
46
46
 
47
- ## 阶段 3:候选能力评分
47
+ ## Phase 3: Candidate Ability Scoring
48
48
 
49
- 对每个候选项按 1 到 5 分评分。
49
+ Rate each candidate on a scale of 1 to 5.
50
50
 
51
- | 维度 | 问题 |
51
+ | Dimensions | Questions |
52
52
  |---|---|
53
- | 用户价值 | 是否能实质改善目标用户的工作流? |
54
- | 适配度 | 是否符合目标项目的架构和路线图? |
55
- | 原创化可行性 | 是否可以在不复制受保护表达的情况下重新创建? |
56
- | 复杂度 | 是否可以安全交付并长期维护? |
57
- | 可验证性 | 正确性是否可以通过测试或评审验证? |
53
+ | User value | Can it substantially improve the workflow of target users? |
54
+ | Fit | Is it consistent with the target project's architecture and roadmap? |
55
+ | Feasibility of originalization | Is it possible to recreate a protected expression without copying it? |
56
+ | Complexity | Can it be delivered safely and maintained over the long term? |
57
+ | Verifiability | Can correctness be verified through testing or review? |
58
58
 
59
- 优先处理高价值、高适配、低风险的候选项。
59
+ Prioritize high-value, high-fit, low-risk candidates.
60
60
 
61
- ## 阶段 4:吸收策略
61
+ ## Phase 4: Absorption Strategy
62
62
 
63
- 为每个候选项选择一种策略:
63
+ Choose a strategy for each candidate:
64
64
 
65
- - **增强**:改进目标项目已有能力。
66
- - **新增**:引入新的目标项目原生能力。
67
- - **拆分**:拆解过载的目标概念或参考概念。
68
- - **合并**:合并目标项目中重叠的概念。
69
- - **替换**:在更安全设计准备好后,移除较弱的目标实现。
70
- - **文档化**:只补充知识,不改代码。
71
- - **拒绝**:明确延后或放弃,并说明原因。
65
+ - **Enhancement**: Improve the existing abilities of the target item.
66
+ - **New**: Introducing new target project native capabilities.
67
+ - **Split**: Split an overloaded target concept or reference concept.
68
+ - **Merge**: Merge overlapping concepts in the target project.
69
+ - **Replace**: Remove weaker goal implementations once a more secure design is ready.
70
+ - **Documentation**: Only add knowledge, do not change the code.
71
+ - **Rejection**: Defer or give up clearly and explain the reasons.
72
72
 
73
- ## 阶段 5:实现顺序
73
+ ## Phase 5: Implementation Sequence
74
74
 
75
- 推荐按以下顺序推进:
75
+ It is recommended to proceed in the following order:
76
76
 
77
- 1. 文档和边界澄清。
78
- 2. 测试或验证脚手架。
79
- 3. 最小化的目标项目原生实现。
80
- 4. 与现有工作流集成。
81
- 5. 清理重复逻辑和废弃路径。
82
- 6. 面向用户的文档和示例。
77
+ 1. Documentation and boundary clarification.
78
+ 2. Test or validate scaffolding.
79
+ 3. Minimized target project native implementation.
80
+ 4. Integrate with existing workflows.
81
+ 5. Clean up duplicate logic and abandoned paths.
82
+ 6. User-oriented documentation and examples.
83
83
 
84
- ## 阶段 6:评审问题
84
+ ## Stage 6: Review Questions
85
85
 
86
- 最终完成前,回答以下问题:
86
+ Before finalizing, answer the following questions:
87
87
 
88
- - 吸收后目标项目是否仍保持一致性?
89
- - 模块边界是否被保留或改善?
90
- - 每个新增能力是否可被发现?
91
- - 是否存在重叠的能力、入口、抽象、配置、运行时流程、工具函数、文档承诺或用户工作流?
92
- - 新增依赖是否有充分理由?
93
- - 验证命令是否已记录?
94
- - 是否透明说明了灵感来源,同时又没有暗示复制代码?
88
+ - Will the target items remain consistent after assimilation?
89
+ - Are module boundaries preserved or improved?
90
+ - Is each new ability discoverable?
91
+ - Are there overlapping capabilities, portals, abstractions, configurations, runtime processes, tool functions, document commitments, or user workflows?
92
+ - Is there a good reason for adding new dependencies?
93
+ - Verify that the command was logged?
94
+ - Is the source of inspiration transparently stated without implying duplication of code?
@@ -1,57 +1,57 @@
1
- # 原创性与许可证约束
1
+ # Originality and license restrictions
2
2
 
3
- ## 目标
3
+ ## Target
4
4
 
5
- 本流程用于合法、合规、伦理且可维护的适配。它应帮助使用者提炼思想,并重新创建符合目标项目风格的设计,而不是伪装复制。
5
+ This process is used for legal, compliant, ethical, and maintainable adaptation. It should help users refine their ideas and recreate designs that fit the style of the target project, rather than pretending to be a copy.
6
6
 
7
- ## 通常可以安全吸收的内容
7
+ ## Content that is generally safe to absorb
8
8
 
9
- - 高层思想和产品概念。
10
- - 通用架构模式。
11
- - 公开文档化的工作流。
12
- - 用自己的语言表达的行为需求。
13
- - 标准的、不可保护的或已获得适当许可的算法和技术。
14
- - 为目标环境重新创建的配置概念。
9
+ - High-level thinking and product concepts.
10
+ - Common architectural patterns.
11
+ - Publicly documented workflow.
12
+ - Behavioral needs expressed in own words.
13
+ - Algorithms and technologies that are standard, unprotectable or properly licensed.
14
+ - Configuration concepts recreated for the target environment.
15
15
 
16
- ## 需要谨慎处理的内容
16
+ ## Content that needs to be handled with caution
17
17
 
18
- - 来自其他项目的大段代码。
19
- - 独特文本、提示词、示例、文档、图表、名称或品牌表达。
20
- - 与参考项目高度绑定且非显而易见的实现结构。
21
- - 包含许可证头或署名要求的生成文件。
22
- - 带有限制性许可证的依赖。
23
- - 私有或专有仓库。
18
+ - Large chunks of code from other projects.
19
+ - Unique text, prompts, examples, documents, graphics, names or brand expressions.
20
+ - Highly tied and non-obvious implementation structure to the reference project.
21
+ - Makefile containing license header or attribution requirements.
22
+ - Dependencies with restrictive license.
23
+ - Private or proprietary repositories.
24
24
 
25
- ## 安全适配流程
25
+ ## Security adaptation process
26
26
 
27
- 1. 用中性语言总结参考能力。
28
- 2. 识别它解决的问题。
29
- 3. 独立设计目标项目原生方案。
30
- 4. 使用目标项目约定实现新代码。
31
- 5. 将概念命名调整为目标项目语义。
32
- 6. 基于期望行为添加测试,而不是基于参考项目内部实现添加测试。
33
- 7. 当许可证要求署名时,保留必要署名。
34
- 8. 将许可证不确定性记录为风险,而不是忽略。
27
+ 1. Summarize reference capabilities in neutral language.
28
+ 2. Identify the problem it solves.
29
+ 3. Independently design the original solution for the target project.
30
+ 4. Implement new code using target project conventions.
31
+ 5. Adjust concept naming to target project semantics.
32
+ 6. Add tests based on desired behavior rather than on the internal implementation of the reference project.
33
+ 7. When a license requires a signature, retain the necessary signature.
34
+ 8. Document license uncertainty as a risk rather than ignoring it.
35
35
 
36
- ## 风险信号
36
+ ## Risk Signal
37
37
 
38
- - 输出在没有目标项目特定理由的情况下保留了参考项目相同的文件结构和命名。
39
- - 输出包含大量完全相同或近似相同的代码/文本。
40
- - Agent 无法解释目标设计为什么不同于参考设计。
41
- - 新模块与目标项目现有模块高度重叠。
42
- - 唯一理由只是“参考项目就是这样做的”。
38
+ - The output retains the same file structure and naming of the reference project without target project specific justification.
39
+ - The output contains a lot of identical or nearly identical code/text.
40
+ - The Agent cannot explain why the target design differs from the reference design.
41
+ - The new module has a high degree of overlap with the existing modules of the target project.
42
+ - The only reason is just "that's what the reference project does".
43
43
 
44
- ## 报告中的推荐表述
44
+ ## Recommended statements in reports
45
45
 
46
- 建议使用:
46
+ Recommended to use:
47
47
 
48
- - “受参考项目在……方面的处理方式启发。”
49
- - “已重新实现为符合目标项目风格的模块,用于……”
50
- - “参考项目通过 X 解决该问题;本项目选择 Y,因为……”
48
+ - "Inspired by the way reference projects are treated in..."
49
+ - "Reimplemented as a module that matches the style of the target project, for..."
50
+ - "The reference project solved this problem with X; this project chose Y because..."
51
51
 
52
- 避免使用:
52
+ Avoid using:
53
53
 
54
- - “复制自……”
55
- - “和……完全一样”
56
- - “隐藏式模仿……”
57
- - “让它看起来不相关……”
54
+ - "Copied from..."
55
+ - "Exactly the same as..."
56
+ - "Hidden imitation..."
57
+ - "Make it seem irrelevant..."
@@ -1,78 +1,78 @@
1
1
  ---
2
2
  name: fec-api-integration
3
- description: Use when designing, implementing, or reviewing frontend-to-backend API integration, typed API clients, REST/tRPC/OpenAPI client choices, auth refresh, API error mapping, upload flows, SSE/WebSocket/polling choices, CORS-facing frontend behavior, or cross-boundary loading/error states. Do not use for backend-only service architecture or TanStack Query cache policy alone; Chinese triggers include API 集成, 前后端联调, typed API client, 接口错误处理, SSE, WebSocket.
3
+ description: Use when designing, implementing, or reviewing frontend-to-backend API integration, typed API clients, REST/tRPC/OpenAPI client choices, auth refresh, API error mapping, upload flows, SSE/WebSocket/polling choices, CORS-facing frontend behavior, or cross-boundary loading/error states. Do not use for backend-only service architecture or TanStack Query cache policy alone; Chinese triggers include API integration, front-end and back-end joint debugging, typed API client, Interface error handling, SSE, WebSocket.
4
4
  ---
5
5
 
6
- # API 集成
6
+ # API integration
7
7
 
8
- 适用于前端与后端边界的类型、错误、鉴权、上传、实时通信和用户状态设计。需要具体代码模式时加载 [integration-patterns.md](references/integration-patterns.md)。
8
+ Suitable for front-end and back-end boundary types, errors, authentication, uploads, real-time communication and user status design. Load [integration-patterns.md](references/integration-patterns.md) when specific code patterns are required.
9
9
 
10
10
  ## Purpose
11
11
 
12
- 规范前端 API 集成边界,让请求、错误、鉴权和实时数据可维护。
12
+ Standardize front-end API integration boundaries to make requests, errors, authentication, and real-time data maintainable.
13
13
 
14
14
  ## Procedure
15
15
 
16
- 1. 明确接口所有权
17
- - 同团队 TypeScript 全栈可考虑 tRPC 或共享 schema。
18
- - 多语言或多消费者 API 优先 OpenAPI/GraphQL codegen。
19
- - 小型内部应用可用 typed fetch wrapper,但类型必须集中维护。
20
- - 不在组件里散落 `fetch`、URL、header、错误解析和 token 逻辑。
21
- - 公共接口需要明确版本、兼容窗口、废弃字段策略和调用方范围。
22
-
23
- 2. 建立客户端边界
24
- - 用一个 API client 处理 base URL、credentials、JSON 解析、超时、取消和统一错误。
25
- - 环境变量只读取公开前缀,私密 token 不进入客户端 bundle。
26
- - 组件只消费 domain 函数或 query/mutation hook,不直接拼接接口路径。
27
- - 204、空响应、非 JSON 错误和网络断开要有明确行为。
28
- - TypeScript contract 必须覆盖请求、响应、错误形状和分页/游标元数据。
29
-
30
- 3. 映射用户可理解的错误
31
- - 401:刷新失败后引导登录。
32
- - 403:说明权限不足,不重复重试。
33
- - 404:展示缺失状态或返回上级入口。
34
- - 409:提示冲突和下一步操作。
35
- - 422:映射字段级错误。
36
- - 429/5xx/网络错误:允许退避重试或展示稍后再试。
37
- - 未识别错误要落到统一 fallback,不把原始后端异常暴露给用户。
38
- - 所有错误都应归一到用户可恢复动作:重试、重新登录、修改输入、返回上级、联系支持或稍后再试。
39
- - 错误对象要保留面向日志的 trace id / request id,但 UI 不暴露内部堆栈、SQL、服务名或敏感字段。
40
-
41
- 4. 管理接口演进
42
- - 兼容新增字段;删除或改名字段必须走迁移期、适配层或双写/双读策略。
43
- - 用 schema、类型生成物或 contract test 捕捉破坏性变更。
44
- - 对前后端协作项记录状态码、错误码、幂等性、重试语义和时区/金额/枚举规则。
45
-
46
- 5. 处理鉴权刷新
47
- - Access token 生命周期短,refresh 优先放在 httpOnly cookie 或服务端会话。
48
- - 401 后只允许单次刷新队列,避免多个请求同时刷新。
49
- - 刷新失败要清理本地身份状态并跳转登录。
50
- - 不把 bearer token 放在 URL、localStorage 或日志里。
51
-
52
- 6. 选择上传与实时方案
53
- - 小文件可用 multipart;大文件优先预签名直传或分片上传。
54
- - 只需要服务端推送时用 SSE;双向协作、聊天或多人状态用 WebSocket。
55
- - 简单状态刷新、低频任务进度可用 polling,并设置停止条件。
56
- - 上传和实时连接都需要取消、重连、超时和错误 UI。
57
-
58
- 7. 验证集成质量
59
- - 检查 loading、empty、error、unauthorized、offline、retrying 状态。
60
- - 用浏览器网络面板确认 base URL、credentials、CORS 和状态码行为。
61
- - 用 mock 或测试服务覆盖 401、403、422、500、断网和取消请求。
62
- - 确认客户端 bundle 不包含私密环境变量、服务端密钥或内部地址。
63
- - 对关键 API client 行为补最小测试,证明超时、取消、错误映射和刷新队列可预期。
64
- - 验证错误边界与请求层协作:渲染异常进 Error Boundary,请求失败进可恢复 UI,不互相吞掉。
16
+ 1. Clarify interface ownership
17
+ - For TypeScript full stack in the same team, tRPC or shared schema can be considered.
18
+ - Multi-language or multi-consumer API preferred OpenAPI/GraphQL codegen.
19
+ - Typed fetch wrapper can be used for small internal applications, but types must be maintained centrally.
20
+ - Do not scatter `fetch`, URL, header, error parsing and token logic in components.
21
+ - Public interfaces need to specify versions, compatibility windows, obsolete field policies, and caller scope.
22
+
23
+ 2. Establish client boundaries
24
+ - Handle base URL, credentials, JSON parsing, timeouts, cancellation and unified errors with an API client.
25
+ - The environment variable only reads the public prefix, and the private token does not enter the client bundle.
26
+ - The component only consumes domain functions or query/mutation hooks, and does not directly splice interface paths.
27
+ - 204, empty response, non-JSON error and network disconnection must have clear behavior.
28
+ - TypeScript contracts must cover request, response, error shapes, and pagination/cursor metadata.
29
+
30
+ 3. Map user-understandable errors
31
+ - 401: Boot login after failed refresh.
32
+ - 403: Indicates insufficient permissions, do not retry.
33
+ - 404: Display missing status or return to the upper level entrance.
34
+ - 409: Prompt for conflict and next step.
35
+ - 422: Mapping field level error.
36
+ - 429/5xx/Network Error: Allow backoff to retry or show try again later.
37
+ - Unrecognized errors should fall into a unified fallback, and the original backend exception should not be exposed to the user.
38
+ - All errors should be attributed to user-recoverable actions: retry, log in again, modify input, return to the previous level, contact support, or try again later.
39
+ - The error object should retain the log-oriented trace id / request id, but the UI should not expose the internal stack, SQL, service name or sensitive fields.
40
+
41
+ 4. Management interface evolution
42
+ - Compatible with new fields; deleting or renaming fields must go through the migration period, adaptation layer or double-write/double-read strategy.
43
+ - Capture breaking changes using schema, type generators or contract tests.
44
+ - Record status codes, error codes, idempotence, retry semantics and time zone/amount/enumeration rules for front-end and back-end collaboration items.
45
+
46
+ 5. Handle authentication refresh
47
+ - Access token has a short life cycle, and refresh is prioritized in httpOnly cookies or server sessions.
48
+ - Only a single refresh of the queue is allowed after 401 to avoid multiple requests being refreshed at the same time.
49
+ - If the refresh fails, you need to clear the local identity status and jump to login.
50
+ - Do not put bearer token in URL, localStorage or logs.
51
+
52
+ 6. Select the upload and real-time plan
53
+ - Multipart is available for small files; large files are given priority for pre-signed direct upload or multipart upload.
54
+ - Only use SSE for server push; use WebSocket for two-way collaboration, chat or multi-person status.
55
+ - Simple status refresh, low-frequency task progress can be polled, and stop conditions can be set.
56
+ - Both uploads and live connections require cancellation, reconnection, timeout and error UI.
57
+
58
+ 7. Verify integration quality
59
+ - Check loading, empty, error, unauthorized, offline, retrying status.
60
+ - Confirm base URL, credentials, CORS, and status code behavior using the browser network panel.
61
+ - Use mock or test services to cover 401, 403, 422, 500, disconnection and cancellation requests.
62
+ - Verify that the client bundle does not contain private environment variables, server keys, or internal addresses.
63
+ - Add minimal testing for key API client behaviors to demonstrate that timeouts, cancellations, error mappings, and flush queues are expected.
64
+ - Verification error boundary cooperates with the request layer: rendering exceptions go to the Error Boundary, and request failures go to the recoverable UI, without swallowing each other.
65
65
 
66
66
  ## Constraints
67
67
 
68
- - 不在页面组件中直接管理 token refresh、错误格式解析或重试策略。
69
- - 不对 4xx 业务错误做盲目自动重试。
70
- - 不把后端异常栈、内部错误码或原始 SQL/服务名暴露给用户。
71
- - 不用 localStorage 存储高价值 token;若遗留系统无法避免,必须联动安全审查。
72
- - 不用 WebSocket 替代简单轮询,也不用轮询实现高频双向协作。
73
- - 不让上传经过 API 服务器转发大文件,除非有明确合规或扫描需求。
74
- - 不在公共接口里直接暴露临时字段、数据库字段名或后端内部错误结构。
68
+ - Do not manage token refresh, error format parsing, or retry strategies directly in page components.
69
+ - No blind automatic retries for 4xx business errors.
70
+ - Do not expose backend exception stacks, internal error codes or raw SQL/service names to users.
71
+ - Do not use localStorage to store high-value tokens; if legacy systems cannot be avoided, security review must be linked.
72
+ - No need to use WebSocket to replace simple polling, and no need to use polling to achieve high-frequency two-way collaboration.
73
+ - Do not allow uploads to be forwarded through the API server for large files unless there is an explicit compliance or scanning need.
74
+ - Do not directly expose temporary fields, database field names or backend internal error structures in the public interface.
75
75
 
76
76
  ## Expected Output
77
77
 
78
- 输出应包含 API client 边界、接口类型来源、错误映射、鉴权刷新策略、上传/实时方案和验证结果。完成后组件不散落请求细节,用户状态完整,失败场景可恢复,客户端不会泄露服务端密钥。
78
+ The output should include API client boundaries, interface type sources, error mappings, authentication refresh policies, upload/real-time schemes, and validation results. After completion, the component will not scatter request details, the user status will be intact, failure scenarios can be recovered, and the client will not leak the server key.
@@ -1,6 +1,6 @@
1
- # API 集成实现模式
1
+ # API integration implementation mode
2
2
 
3
- ## 类型化 Fetch 客户端
3
+ ## Typed Fetch client
4
4
 
5
5
  ```ts
6
6
  export class ApiError extends Error {
@@ -8,7 +8,7 @@ export class ApiError extends Error {
8
8
  public readonly status: number,
9
9
  public readonly body: unknown,
10
10
  ) {
11
- super(`API 请求失败,状态码 ${status}`);
11
+ super(`API request failed, status code ${status}`);
12
12
  }
13
13
  }
14
14
 
@@ -36,45 +36,45 @@ export async function requestJson<T>(
36
36
  }
37
37
  ```
38
38
 
39
- ## 用户端错误映射
39
+ ## User side error mapping
40
40
 
41
41
  ```ts
42
42
  export function getApiMessage(error: unknown): string {
43
- if (!(error instanceof ApiError)) return "操作失败,请稍后重试。";
43
+ if (!(error instanceof ApiError)) return "The operation failed, please try again later.";
44
44
 
45
- if (error.status === 401) return "请重新登录。";
46
- if (error.status === 403) return "您没有权限执行此操作。";
47
- if (error.status === 404) return "请求的资源已不存在。";
48
- if (error.status === 409) return "此变更与最新数据冲突。";
49
- if (error.status === 422) return "请检查标红字段。";
50
- if (error.status === 429) return "请求过于频繁,请稍后再试。";
45
+ if (error.status === 401) return "Please log in again.";
46
+ if (error.status === 403) return "You do not have permission to perform this operation.";
47
+ if (error.status === 404) return "The requested resource no longer exists.";
48
+ if (error.status === 409) return "This change conflicts with the latest data.";
49
+ if (error.status === 422) return "Please check the red fields.";
50
+ if (error.status === 429) return "The request is too frequent, please try again later.";
51
51
 
52
- return "服务暂不可用,请稍后重试。";
52
+ return "The service is temporarily unavailable, please try again later.";
53
53
  }
54
54
  ```
55
55
 
56
- ## 上传选型
56
+ ## Upload selection
57
57
 
58
- | 需求 | 推荐方案 |
58
+ | Requirements | Recommended solutions |
59
59
  | ---------------- | ----------------------------- |
60
- | 小头像或 CSV | Multipart 请求 |
61
- | 大视频或归档文件 | 预签名直传 |
62
- | 弱网环境大文件 | 分片断点续传 |
63
- | 入库前合规扫描 | 经 API 中介上传(含大小限制) |
60
+ | Avatar or CSV | Multipart request |
61
+ | Large video or archive file | Pre-signed direct transfer |
62
+ | Large files in weak network environment | Fragmented breakpoint resume download |
63
+ | Compliance scanning before warehousing | Uploading through API intermediary (including size limit) |
64
64
 
65
- ## 实时通信选型
65
+ ## Real-time communication selection
66
66
 
67
- | 需求 | 推荐方案 |
67
+ | Requirements | Recommended solutions |
68
68
  | -------------------- | ------------------------- |
69
- | 任务进度或通知 | SSE(Server-Sent Events) |
70
- | 聊天、在线状态、协作 | WebSocket |
71
- | 数秒一次的状态轮询 | 定时轮询(Polling) |
72
- | 服务端 AI Token 流 | SSE 或 fetch 流式响应 |
69
+ | Task progress or notification | SSE (Server-Sent Events) |
70
+ | Chat, Presence, Collaboration | WebSocket |
71
+ | Status polling every few seconds | Scheduled polling (Polling) |
72
+ | Server-side AI Token stream | SSE or fetch streaming response |
73
73
 
74
- ## 审查清单
74
+ ## Review Checklist
75
75
 
76
- - API 地址和凭证集中管理。
77
- - 客户端需处理 204、非 JSON 错误、取消和离线状态。
78
- - Token 刷新机制不能引发请求风暴。
79
- - 组件应消费 hooks/领域函数,而非直接调用原始 fetch。
80
- - 上传和实时流需暴露进度、取消、失败和重试状态。
76
+ - Centralized management of API addresses and credentials.
77
+ - The client needs to handle 204, non-JSON errors, cancellation and offline status.
78
+ - The Token refresh mechanism cannot trigger request storms.
79
+ - Components should consume hooks/domain functions rather than calling raw fetch directly.
80
+ - Uploads and live streams need to expose progress, cancellation, failure and retry status.
@@ -1,45 +1,45 @@
1
1
  ---
2
2
  name: fec-backend-requirements-handoff
3
- description: Use when frontend work needs to communicate data, action, state, permission, validation, or business-rule needs to backend teams without dictating endpoint design, field names, database shape, or implementation details; Chinese triggers include 前后端需求交接, 后端需求, API 需求澄清, 数据需求说明.
3
+ description: Use when frontend work needs to communicate data, action, state, permission, validation, or business-rule needs to backend teams without dictating endpoint design, field names, database shape, or implementation details; Chinese triggers include front-end and back-end requirements handover, back-end requirements, API requirements clarification, data requirements description.
4
4
  ---
5
5
 
6
- # 前后端需求交接
6
+ # Handover of front-end and back-end requirements
7
7
 
8
8
  ## Purpose
9
9
 
10
- 把前端页面和交互所需的数据、动作、状态和疑问整理成后端可讨论的需求说明。
10
+ Organize the data, actions, status, and questions required for front-end pages and interactions into discussion-ready requirements for the back-end.
11
11
 
12
12
  ## Procedure
13
13
 
14
- 1. 明确功能上下文
15
- - 说明页面、流程或组件是什么,面向哪类用户,以及用户完成任务的成功状态。
16
- - 如果已有设计稿、路由、用户故事或权限角色,先把它们作为事实来源。
14
+ 1. Clarify the functional context
15
+ - Describe what the page, process, or component is, what type of user it is intended for, and the success status of the user completing the task.
16
+ - If there are existing designs, routes, user stories, or permission roles, use them as sources of truth first.
17
17
 
18
- 2. 描述前端展示需求
19
- - 按屏幕或组件列出需要展示的信息、信息之间的关系、排序/过滤/分页需求和可见性规则。
20
- - 使用业务语言描述“需要展示什么”,不要提前规定 endpoint、字段名、DTO、数据库表或响应嵌套结构。
18
+ 2. Describe front-end display requirements
19
+ - List information to be displayed by screen or component, relationships between information, sorting/filtering/pagination requirements and visibility rules.
20
+ - Use business language to describe "what needs to be displayed" and do not specify endpoints, field names, DTOs, database tables or response nested structures in advance.
21
21
 
22
- 3. 描述用户动作和结果
23
- - 列出用户能执行的动作、期望结果、成功反馈、失败反馈和是否需要乐观更新。
24
- - 标出幂等性、撤销、确认、危险操作、批量操作或长任务进度等对 UI 有影响的行为。
22
+ 3. Describe user actions and results
23
+ - List the actions the user can perform, expected results, success feedback, failure feedback and whether optimistic updates are needed.
24
+ - Mark behaviors that affect the UI such as idempotence, undo, confirm, dangerous operations, batch operations, or long task progress.
25
25
 
26
- 4. 补齐状态和业务规则
27
- - 覆盖 loading、empty、error、partial、permission denied、expired、conflict、offline 和 retrying 等状态。
28
- - 记录影响 UI 的权限、生命周期、金额/时区/枚举、校验、可编辑条件和边界规则。
26
+ 4. Complete status and business rules
27
+ - Override the status of loading, empty, error, partial, permission denied, expired, conflict, offline and retrying.
28
+ - Document permissions, lifecycle, amounts/timezones/enumerations, validations, editable conditions, and boundary rules that affect the UI.
29
29
 
30
- 5. 输出讨论文档
31
- - 默认写到 `docs/backend-requirements/<feature-name>.md`;若仓库已有需求文档目录,沿用现有位置。
32
- - 文档包含 Context、Screens/Components、Data Needs、User Actions、UI States、Business Rules、Uncertainties、Questions for Backend 和 Decision Log。
33
- - 若用户只需要聊天回复,可以直接输出同样结构的 Markdown,不创建文件。
30
+ 5. Output discussion document
31
+ - By default, it is written to `docs/backend-requirements/<feature-name>.md`; if the warehouse already has a requirements document directory, the existing location will be used.
32
+ - Documentation includes Context, Screens/Components, Data Needs, User Actions, UI States, Business Rules, Uncertainties, Questions for Backend and Decision Log.
33
+ - If the user only needs chat replies, they can directly output Markdown with the same structure without creating a file.
34
34
 
35
35
  ## Constraints
36
36
 
37
- - 不替后端规定 URL、HTTP 方法、字段名、数据库 schema、缓存实现或服务拆分。
38
- - 不把前端猜测写成事实;不确定的业务规则必须进入 Uncertainties 或 Questions。
39
- - 不忽略错误、空态、权限和部分数据;这些状态决定接口协作质量。
40
- - 不把内部错误栈、数据库字段或敏感实现细节要求暴露给 UI。
41
- - 不与 API 集成流程重复:本 skill 描述需求,客户端边界、类型来源和错误映射实现应在后续实现阶段处理。
37
+ - Does not specify URLs, HTTP methods, field names, database schema, cache implementation, or service splitting for the backend.
38
+ - Don't write front-end guesses into facts; uncertain business rules must go into Uncertainties or Questions.
39
+ - Errors, empty states, permissions and partial data are not ignored; these states determine the quality of interface collaboration.
40
+ - Do not expose internal error stacks, database fields, or sensitive implementation details to the UI.
41
+ - Does not duplicate the API integration process: This skill describes the requirements, client boundaries, type sources and error mapping implementation should be handled in subsequent implementation phases.
42
42
 
43
43
  ## Expected Output
44
44
 
45
- 产出一份前端视角的后端需求交接说明,清楚描述 UI 需要什么数据和行为、哪些规则仍需确认,以及后续前后端需要共同决定的问题。
45
+ Produce a back-end requirements handover description from a front-end perspective, clearly describing what data and behaviors the UI requires, which rules still need to be confirmed, and subsequent issues that need to be decided jointly by the front-end and back-end.