@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,34 +1,34 @@
1
1
  ---
2
2
  name: fec-tailwind-design-system
3
- description: Use when designing, implementing, or reviewing Tailwind CSS design systems, token mapping, theme extension, utility class governance, component variants, dark mode, responsive utilities, safelists, or maintainable class composition; Chinese triggers include Tailwind, 设计 Token, 组件变体, 暗色模式, class 管理.
3
+ description: Use when designing, implementing, or reviewing Tailwind CSS design systems, token mapping, theme extension, utility class governance, component variants, dark mode, responsive utilities, safelists, or maintainable class composition; Chinese triggers include Tailwind, design Token, component variants, dark mode, class management.
4
4
  ---
5
5
 
6
- # Tailwind 设计系统
6
+ #Tailwind Design System
7
7
 
8
- 适用于用 Tailwind CSS 承载产品设计系统、组件变体和主题规则的前端任务。需要具体配置、variant、class 组织和迁移细节时加载 [references/tailwind-system-patterns.md](references/tailwind-system-patterns.md)。
8
+ Suitable for front-end tasks hosting product design systems, component variations, and theme rules with Tailwind CSS. Load [references/tailwind-system-patterns.md](references/tailwind-system-patterns.md) when specific configuration, variant, class organization and migration details are needed.
9
9
 
10
10
  ## Purpose
11
11
 
12
- 让 Tailwind 项目中的 token、主题、组件变体和响应式样式可维护,而不是把一次性 utility class 散落到业务代码里。
12
+ Make the tokens, themes, component variations, and responsive styles in the Tailwind project maintainable instead of scattering one-off utility classes into business code.
13
13
 
14
14
  ## Procedure
15
15
 
16
- 1. 识别现状:确认 Tailwind 版本、配置位置、暗色模式策略、组件库、CSS 变量、设计 token 和 class 合并工具。
17
- 2. 建立 token 边界:颜色、间距、圆角、阴影、字体、z-index 和断点优先从项目 token 或 `theme.extend` 派生。
18
- 3. 设计组件变体:按钮、输入框、卡片、弹窗、表格等基础组件用集中 variant API 表达尺寸、语义、状态和密度。
19
- 4. 控制 class 复杂度:重复组合沉淀为组件、slot、variant 或局部 helper;不要把长 class 字符串复制到多个页面。
20
- 5. 处理主题和暗色模式:明确 `class`、`data-theme` 或 CSS 变量方案,避免首次渲染闪烁和对比度回归。
21
- 6. 接入响应式:移动优先组织 utility;复杂布局交给响应式布局工作流,不要只靠堆叠断点前缀碰运气。
22
- 7. 验证样式结果:检查 hover、active、focus-visible、disabled、loading、selected、invalid、dark 和不同断点。
16
+ 1. Identify the current situation: Confirm Tailwind version, configuration location, dark mode strategy, component library, CSS variables, design token and class merging tool.
17
+ 2. Establish token boundaries: color, spacing, rounded corners, shadow, font, z-index and breakpoints are first derived from the project token or `theme.extend`.
18
+ 3. Design component variants: Basic components such as buttons, input boxes, cards, pop-up windows, and tables use centralized variant APIs to express size, semantics, status, and density.
19
+ 4. Control class complexity: Repeated combinations are precipitated into components, slots, variants or local helpers; do not copy long class strings to multiple pages.
20
+ 5. Handle themes and dark modes: Explicit `class`, `data-theme` or CSS variable schemes to avoid first render flickering and contrast regression.
21
+ 6. Access responsiveness: mobile-first organization utility; leave complex layouts to responsive layout workflow, don’t just rely on stacked breakpoint prefixes to try your luck.
22
+ 7. Verify style results: check hover, active, focus-visible, disabled, loading, selected, invalid, dark and different breakpoints.
23
23
 
24
24
  ## Constraints
25
25
 
26
- - 不把 Tailwind class 当作设计系统本身;真正的系统是 token、组件 API、状态矩阵和使用约束。
27
- - 不为单个页面随意扩展全局 token;新增 token 必须有语义名称和复用场景。
28
- - 不使用拼接的动态 class 破坏构建扫描;必要时使用 safelist、映射表或 variant 工具。
29
- - 不在组件外部覆盖基础组件内部结构来实现变体。
30
- - 不让暗色模式只靠反色;状态色、边框、阴影、图表和图片都要重新检查。
26
+ - Don't think of the Tailwind class as the design system itself; the real system is the token, component API, state matrix, and usage constraints.
27
+ - Do not expand global tokens arbitrarily for a single page; new tokens must have semantic names and reuse scenarios.
28
+ - Do not use spliced dynamic classes to break build scans; use safelist, mapping table or variant tools when necessary.
29
+ - Do not override base component internals outside the component to implement variations.
30
+ - Don't let dark mode rely solely on inverse colors; status colors, borders, shadows, charts, and images are all re-examined.
31
31
 
32
32
  ## Expected Output
33
33
 
34
- 输出 Tailwind token 映射、主题配置边界、组件 variant 设计、class 复用策略、暗色模式和响应式验证结果。完成后样式应能被项目组件复用、可搜索、可测试,并与设计系统规则一致。
34
+ Output Tailwind token mapping, theme configuration boundaries, component variant design, class reuse strategy, dark mode and responsive validation results. After completion, the style should be reusable by project components, searchable, testable, and consistent with the design system rules.
@@ -1,28 +1,28 @@
1
- # Tailwind 系统模式
1
+ # Tailwind system mode
2
2
 
3
- ## Token 映射
3
+ ## Token mapping
4
4
 
5
- 优先使用语义化名称:
5
+ Prefer using semantic names:
6
6
 
7
- | 需求 | 推荐 | 避免 |
7
+ | Need | Recommend | Avoid |
8
8
  | ---- | ---- | ---- |
9
- | 品牌色 | `brand.600`, `--color-brand-primary` | 到处复制 `blue-600` |
10
- | 表面层级 | `surface.canvas`, `surface.panel` | 一次性灰色值 |
11
- | 圆角 | `radius.control`, `radius.panel` | 随意重复的具体值 |
12
- | 阴影 | `shadow.floating`, `shadow.focus` | 没有状态含义的装饰阴影 |
9
+ | Brand color | `brand.600`, `--color-brand-primary` | Copy everywhere `blue-600` |
10
+ | Surface level | `surface.canvas`, `surface.panel` | One-time gray value |
11
+ | rounded corners | `radius.control`, `radius.panel` | optionally repeated specific values |
12
+ | Shadow | `shadow.floating`, `shadow.focus` | Decorative shadow with no state meaning |
13
13
 
14
- 如果项目已有 CSS 变量,把 Tailwind token 映射到这些变量,而不是重复维护字面量。
14
+ If the project already has CSS variables, map Tailwind tokens to these variables instead of repeatedly maintaining literals.
15
15
 
16
- ## Variant 归属
16
+ ## Variant Attribution
17
17
 
18
- 长 class 组合应收敛到以下位置之一:
18
+ Long class combinations should converge to one of the following locations:
19
19
 
20
- - 带 `variant`、`size`、`tone`、`density`、`state` props 的共享组件。
21
- - 复合组件的 slot 映射表。
22
- - CVA、tailwind-variants 或本地 `classNames` 映射等类型化 helper。
23
- - 只在一个模块内复用时,使用局部常量。
20
+ - Shared components with `variant`, `size`, `tone`, `density`, `state` props.
21
+ - Slot mapping table of composite components.
22
+ - Typed helpers such as CVA, tailwind-variants or local `classNames` mappings.
23
+ - Use local constants when reusing them within only one module.
24
24
 
25
- 不要根据不受控的用户输入拼接 class 名。使用显式映射:
25
+ Don't splice class names based on uncontrolled user input. Use explicit mapping:
26
26
 
27
27
  ```ts
28
28
  const toneClass = {
@@ -32,28 +32,28 @@ const toneClass = {
32
32
  } as const;
33
33
  ```
34
34
 
35
- ## 暗色模式
35
+ ## Dark mode
36
36
 
37
- - 优先选择单一的项目级策略:`class`、`data-theme` 或 CSS 变量。
38
- - 如果应用支持手动切换主题,在 body 绘制前初始化已选主题,避免首屏先亮后暗或先暗后亮的主题闪烁。
39
- - 在亮色和暗色主题下都测试 disabled、focus、selected、invalid、chart 和 skeleton 状态。
40
- - 不要把降低透明度作为 disabled 的唯一提示;要保留对比度和可感知性。
41
- - Tailwind 项目使用 `darkMode: "class"` 或等价配置时,主题切换逻辑应同时维护根节点 class / data attribute,并持久化用户偏好。
42
- - CSS 变量方案中,Tailwind token 应引用语义变量;不要为亮色和暗色分别散落两套工具类字面量。
43
- - 在 `<head>` 或框架等价入口中放置极小同步初始化脚本时,只读取本地主题偏好和系统偏好,不执行业务逻辑、不访问服务端数据。
44
- - 暗色模式需复核图片亮度、阴影层级、表单控件、第三方组件、图表色板和 focus ring;不要只补背景色。
37
+ - Prefer a single project-level strategy: `class`, `data-theme` or CSS variables.
38
+ - If the application supports manual theme switching, initialize the selected theme before the body is drawn to avoid flickering of the first screen that first lights up and then darkens or first darkens and then lights up.
39
+ - Test disabled, focus, selected, invalid, chart and skeleton states in both light and dark themes.
40
+ - Don't use lowering transparency as the only hint of disabled; preserve contrast and perceptibility.
41
+ - When the Tailwind project uses `darkMode: "class"` or equivalent configuration, the theme switching logic should maintain the root node class / data attribute and persist user preferences.
42
+ - In the CSS variable scheme, Tailwind token should refer to semantic variables; do not scatter two sets of utility literals for light and dark colors.
43
+ - When placing a minimal synchronization initialization script in `<head>` or a framework equivalent entry, only local theme preferences and system preferences are read, no business logic is executed, and no server-side data is accessed.
44
+ - In dark mode, you need to review the image brightness, shadow level, form controls, third-party components, chart color palette and focus ring; don't just add the background color.
45
45
 
46
- ## 响应式工具类
46
+ ## Responsive tool class
47
47
 
48
- - 默认 class 列表从移动端布局开始。
49
- - 只有信息架构变化时,才增加更大断点前缀。
50
- - 重复出现的响应式区块应沉淀为布局组件或 CSS 容器查询,不要反复复制同一串断点。
51
- - 控件、标签页、看板和数据单元格使用稳定尺寸,避免 hover 和 loading 状态造成布局跳动。
48
+ - The default class list starts with mobile layout.
49
+ - Only add larger breakpoint prefixes when the information architecture changes.
50
+ - Recurring responsive blocks should be precipitated into layout components or CSS container queries, and do not duplicate the same string of breakpoints repeatedly.
51
+ - Controls, tabs, dashboards and data cells use stable sizes to avoid layout jumps caused by hover and loading states.
52
52
 
53
- ## 评审清单
53
+ ## Review Checklist
54
54
 
55
- - Token 值有语义角色,并且没有分叉既有设计规则。
56
- - 组件 variants 覆盖 loading、disabled、selected、invalid、focus-visible 和暗色模式。
57
- - 动态 class 可被静态扫描识别,或已安全加入 safelist。
58
- - Tailwind 工具类没有破坏可访问性、点击目标或 reduced-motion 要求。
59
- - 最终 UI 已在移动端、平板和桌面宽度检查过。
55
+ - Token values have semantic roles and do not fork existing design rules.
56
+ - Component variants cover loading, disabled, selected, invalid, focus-visible and dark mode.
57
+ - Dynamic classes can be recognized by static scans, or have been safely added to the safelist.
58
+ - Tailwind utility classes have no accessibility-breaking, click-targeting, or reduced-motion requirements.
59
+ - Final UI checked in mobile, tablet and desktop widths.
@@ -1,52 +1,52 @@
1
1
  ---
2
2
  name: fec-tdd-workflow
3
- description: Use when implementing new frontend behavior, fixing bugs, or refactoring logic where tests can describe the expected behavior first. Apply to components, hooks/composables, utilities, API clients, route guards, or user workflows; Chinese triggers include TDD, 测试驱动, 先写测试, 红绿重构, 回归测试.
3
+ description: Use when implementing new frontend behavior, fixing bugs, or refactoring logic where tests can describe the expected behavior first. Apply to components, hooks/composables, utilities, API clients, route guards, or user workflows; Chinese triggers include TDD, test-driven, write tests first, red-green refactoring, regression testing.
4
4
  ---
5
5
 
6
- # 前端 TDD 工作流
6
+ # Front-end TDD workflow
7
7
 
8
8
  ## Purpose
9
9
 
10
- 用“先写失败测试,再实现最小代码,再重构”的节奏交付前端功能,避免只在实现后补覆盖率。
10
+ Use the rhythm of "write failing tests first, then implement the minimum code, and then refactor" to deliver front-end functions to avoid supplementing coverage only after implementation.
11
11
 
12
12
  ## Procedure
13
13
 
14
- 1. 识别可观察行为:用户能看到的 UI、组件契约、hook/composable 返回值、路由守卫结果、API client 输出或错误状态。
15
- 2. 先写一个最小失败测试:
16
- - 纯逻辑优先单元测试。
17
- - 组件交互优先 Testing Library / Vue Test Utils。
18
- - 跨页关键流程优先 Playwright / Cypress。
19
- 3. 运行该测试并确认失败原因正确,失败应来自行为尚未实现,而不是语法、导入或测试环境错误。
20
- 4. 写刚好能通过测试的最小实现,不顺手扩大范围。
21
- 5. 重新运行测试,确认变绿。
22
- 6. 在测试保持通过的前提下重构命名、边界和重复逻辑。
23
- 7. 对 bug 修复,保留能复现问题的回归测试。
24
- 8. 每轮只扩大一个可观察行为;新需求、新边界和新异常路径各自进入下一轮。
14
+ 1. Identify observable behaviors: UI, component contracts, hook/composable return values, route guard results, API client output or error status that users can see.
15
+ 2. First write a minimum failure test:
16
+ - Pure logic first unit testing.
17
+ - Prioritize component interaction Testing Library / Vue Test Utils.
18
+ - Prioritize critical processes across pages Playwright/Cypress.
19
+ 3. Run the test and confirm that the failure reason is correct and should come from behavior that has not yet been implemented, rather than a syntax, import, or test environment error.
20
+ 4. Write the minimum implementation that can just pass the test, and do not expand the scope easily.
21
+ 5. Rerun the test and confirm it turns green.
22
+ 6. Refactor naming, boundaries and duplication logic while keeping tests passing.
23
+ 7. Fix bugs and retain regression tests that can reproduce the problem.
24
+ 8. Only one observable behavior is expanded in each round; new requirements, new boundaries and new abnormal paths enter the next round respectively.
25
25
 
26
26
  ## Prove-It Pattern
27
27
 
28
- 修复缺陷时先让测试失败,再让它通过。若无法先失败,说明测试没有覆盖原始问题,需要收窄输入、断言或测试层级。
28
+ When fixing a defect, make the test fail first, then make it pass. If it cannot fail first, it means that the test does not cover the original problem, and the input, assertion or test level needs to be narrowed.
29
29
 
30
30
  ## Frontend Test Selection
31
31
 
32
32
  | Risk | Preferred Test |
33
33
  | ---- | -------------- |
34
- | utils、schema、状态计算 | 单元测试 |
35
- | hooks / composables | 单元或轻量集成测试 |
36
- | 组件 props、emits、交互、状态 | 组件测试 |
37
- | Router、Provider、Store 协作 | 轻量集成测试 |
38
- | 登录、支付、权限、关键 CRUD | E2E 测试 |
34
+ | utils, schema, status calculation | unit testing |
35
+ | hooks / composables | unit or lightweight integration testing |
36
+ | Component props, emits, interactions, status | Component testing |
37
+ | Router, Provider, Store collaboration | Lightweight integration testing |
38
+ | Login, payment, permissions, key CRUD | E2E testing |
39
39
 
40
40
  ## Constraints
41
41
 
42
- - 不为了 TDD 引入项目没有使用且收益不清晰的新测试框架。
43
- - 不测试实现细节、私有状态或脆弱 DOM 结构。
44
- - 不把 E2E 当作所有风险的默认答案;优先选择离风险最近的测试层。
45
- - 如果现有仓库没有测试基础设施,先输出最小测试落地建议,再请求用户确认是否引入。
46
- - 不在红灯阶段同时重构;先证明问题,再最小修复,再整理结构。
42
+ - Do not introduce new testing frameworks for the sake of TDD that are not used by the project and whose benefits are not clear.
43
+ - Does not test implementation details, private state, or fragile DOM structures.
44
+ - Don’t treat E2E as the default answer for all risks; prioritize the test layer closest to the risk.
45
+ - If the existing warehouse does not have testing infrastructure, output the minimum test implementation suggestions first, and then ask the user to confirm whether to introduce it.
46
+ - Do not refactor at the same time during the red light stage; prove the problem first, then make minimal repairs, and then organize the structure.
47
47
 
48
48
  ## Expected Output
49
49
 
50
- - 至少一个先失败后通过的测试覆盖新增或修复行为。
51
- - 实现保持最小范围,重构只在测试通过后进行。
52
- - 总结运行过的测试命令、覆盖的行为和未覆盖风险。
50
+ - At least one fail-then-pass test covering the new or fixed behavior.
51
+ - Implementation is kept to a minimum scope and refactoring is done only after the tests pass.
52
+ - Summarize the test commands run, behaviors covered, and risks not covered.
@@ -1,45 +1,45 @@
1
1
  ---
2
2
  name: fec-testing-strategy
3
- description: Use when planning or reviewing a frontend testing strategy, selecting the right test layer by risk, mapping coverage across static checks, unit tests, component tests, integration tests, E2E, Storybook/visual regression, a11y, security, performance, or CI gates. Do not use to write individual component/E2E tests or merely run existing validation commands; Chinese triggers include 测试策略, 测试分层, 测试计划, 覆盖矩阵.
3
+ description: Use when planning or reviewing a frontend testing strategy, selecting the right test layer by risk, mapping coverage across static checks, unit tests, component tests, integration tests, E2E, Storybook/visual regression, a11y, security, performance, or CI gates. Do not use to write individual component/E2E tests or merely run existing validation commands; Chinese triggers include test strategy, test layering, test plan, coverage matrix.
4
4
  ---
5
5
 
6
- # 前端测试策略
6
+ # Front-end testing strategy
7
7
 
8
8
  ## Purpose
9
9
 
10
- 按“离代码多近 / 覆盖风险层级”选择测试方法,避免把所有风险都塞进组件测试或 E2E。
10
+ Choose your testing approach by “closeness to code/level of risk coverage” to avoid cramming all risks into component tests or E2E.
11
11
 
12
12
  ## Procedure
13
13
 
14
- 1. 识别改动类型:纯逻辑、UI 组件、跨模块流程、浏览器能力、视觉稳定性、专项质量风险或发布门禁。
15
- 2. 建立测试层级矩阵,至少区分:
16
- - 静态检查:TypeScript、ESLint、格式、依赖安全、构建。
17
- - 单元测试:utils、hooks/composables、状态逻辑、schema、纯函数。
18
- - 组件测试:props/emits、用户交互、loading/error/empty、mock 边界。
19
- - 轻量集成测试:表单 + API mock + 路由/Store/Provider 上下文。
20
- - E2E:真实浏览器、跨页面关键旅程、鉴权、支付、权限、CI artifacts。
21
- - 视觉/交互文档:Storybook interaction、Chromatic、视觉回归基线。
22
- - 专项质量:a11y、安全、性能、兼容性。
23
- 3. 按风险分配覆盖:高频核心路径优先 E2E,复杂组件状态优先组件测试,纯逻辑优先单元测试,跨 provider 协作用轻量集成测试。
24
- 4. 用测试金字塔控制维护成本:
25
- - 越靠近纯逻辑,测试越多、越快、越稳定。
26
- - E2E 只覆盖用户关键旅程和真实浏览器风险,不覆盖每个分支。
27
- - 视觉、a11y、安全和性能属于专项质量层,不塞进普通组件测试。
28
- 5. 检查是否已有命令、测试框架、目录约定和 CI 门禁;沿用项目现状,不为策略文档引入不必要工具。
29
- 6. 规划失败证据:每个高风险项要说明失败时如何定位,例如断言、截图、trace、coverage、日志或报告。
30
- 7. 设计测试数据与 mock 策略:共享 fixture 表达业务场景,测试数据 builder 只封装噪声字段,避免每个测试手写随机对象。
31
- 8. 管理 flaky 风险:把时间、网络、动画、随机数、并发和外部服务标为不稳定来源,并指定隔离、重试和证据产物。
32
- 9. 输出可执行的最小测试计划:每层覆盖什么、不覆盖什么、优先级、建议命令和责任 skill。
14
+ 1. Identify the type of change: pure logic, UI components, cross-module processes, browser capabilities, visual stability, dedicated quality risks, or release gates.
15
+ 2. Establish a test level matrix, at least distinguish:
16
+ - Static checking: TypeScript, ESLint, format, dependency security, build.
17
+ - Unit testing: utils, hooks/composables, state logic, schema, pure functions.
18
+ - Component testing: props/emits, user interaction, loading/error/empty, mock boundaries.
19
+ - Lightweight integration testing: form + API mock + routing/Store/Provider context.
20
+ - E2E: real browser, cross-page key journeys, authentication, payments, permissions, CI artifacts.
21
+ - Visual/interactive documentation: Storybook interaction, Chromatic, visual regression baseline.
22
+ - Special quality: a11y, security, performance, compatibility.
23
+ 3. Allocate coverage by risk: high-frequency core paths prioritize E2E, complex component status prioritizes component testing, pure logic prioritizes unit testing, and lightweight integration testing is used for cross-provider collaboration.
24
+ 4. Use the testing pyramid to control maintenance costs:
25
+ - The closer to pure logic, the more tests, the faster, and the more stable it is.
26
+ - E2E only covers key user journeys and real browser risks, not every branch.
27
+ - Vision, a11y, safety and performance belong to dedicated quality layers and are not included in ordinary component tests.
28
+ 5. Check whether commands, test frameworks, directory conventions, and CI gates already exist; use the current status of the project and do not introduce unnecessary tools to the policy document.
29
+ 6. Plan failure evidence: Each high-risk item should describe how to locate it when it fails, such as assertions, screenshots, traces, coverage, logs, or reports.
30
+ 7. Design test data and mock strategies: share fixtures to express business scenarios, and the test data builder only encapsulates noise fields to avoid handwriting random objects for each test.
31
+ 8. Manage flaky risks: Mark time, network, animation, nonce, concurrency, and external services as sources of instability, and specify isolation, retries, and evidence artifacts.
32
+ 9. Output the minimum executable test plan: what is covered by each layer, what is not covered, priority, recommended commands and responsibility skills.
33
33
 
34
34
  ## Constraints
35
35
 
36
- - 不把测试策略写成泛泛的“多写测试”;每个建议必须对应具体风险。
37
- - 不要求所有项目都补齐完整测试金字塔;按业务风险和团队维护能力裁剪。
38
- - 不把 E2E 当作单元/组件测试的替代品;不把组件测试当作真实浏览器兼容保证。
39
- - 不为小改动强制引入新框架;优先复用仓库已有工具和脚本。
40
- - 不追求没有风险说明的覆盖率数字;覆盖率只能辅助判断,不能替代场景覆盖。
41
- - 不把随机 fixture、共享全局状态或依赖执行顺序的测试纳入主干门禁。
36
+ - Don't write the test strategy as a general "write more tests"; each suggestion must correspond to a specific risk.
37
+ - All projects are not required to complete the complete testing pyramid; they are tailored according to business risks and team maintenance capabilities.
38
+ - Do not consider E2E as a replacement for unit/component testing; do not consider component testing as a guarantee of true browser compatibility.
39
+ - Do not force the introduction of new frameworks for small changes; give priority to reusing existing tools and scripts in the warehouse.
40
+ - Do not pursue coverage figures without risk explanation; coverage can only assist judgment and cannot replace scene coverage.
41
+ - Do not include random fixtures, shared global state, or tests that depend on execution order into trunk gates.
42
42
 
43
43
  ## Expected Output
44
44
 
45
- 输出测试分层建议、风险到测试层的映射、优先级、建议命令、需新增或调整的测试文件范围,以及明确分流到哪些专项 skill 或 agent。
45
+ Output test layering recommendations, mapping of risks to test layers, priorities, recommended commands, the scope of test files that need to be added or adjusted, and the specific skills or agents that need to be clearly diverted.
@@ -1,54 +1,54 @@
1
1
  ---
2
2
  name: fec-typescript-project-standard
3
- description: Use when creating, configuring, reviewing, or debugging TypeScript project standards across frontend apps, libraries, SDKs, CLIs, monorepo packages, tsconfig, strictness, module/moduleResolution, path aliases, project references, declaration files, package exports, public API types, DTOs, advanced generics, discriminated unions, type guards, type narrowing, or type-level regressions. Prefer framework project skills for React/Vue/Next/Nuxt component architecture; Chinese triggers include TypeScript 项目规范, TS 项目规范, TypeScript 类型安全, 类型建模, 泛型, 判别联合, 类型收窄, tsconfig, 声明文件.
3
+ description: Use when creating, configuring, reviewing, or debugging TypeScript project standards across frontend apps, libraries, SDKs, CLIs, monorepo packages, tsconfig, strictness, module/moduleResolution, path aliases, project references, declaration files, package exports, public API types, DTOs, advanced generics, discriminated unions, type guards, type narrowing, or type-level regressions. Prefer framework project skills for React/Vue/Next/Nuxt component architecture; Chinese triggers include TypeScript project specification, TS project specification, TypeScript type safety, type modeling, generics, discriminative unions, type narrowing, tsconfig, declaration files.
4
4
  ---
5
5
 
6
- # TypeScript 项目规范
6
+ # TypeScript project specifications
7
7
 
8
8
  ## Purpose
9
9
 
10
- 统一 TypeScript 层的工程配置、类型边界和发布产物规则。适用于前端应用、组件库、SDK、CLI、monorepo package 和纯 TypeScript 工具库,但不接管 React、Vue、Next.js、Nuxt 或 Vite 的框架架构职责。
10
+ Unify project configuration, type boundaries, and release product rules for the TypeScript layer. Works with front-end applications, component libraries, SDKs, CLIs, monorepo packages, and pure TypeScript tool libraries, but does not take over the framework architecture responsibilities of React, Vue, Next.js, Nuxt, or Vite.
11
11
 
12
12
  ## Procedure
13
13
 
14
- 1. 识别 TypeScript 上下文
15
- - 应用项目:优先检查 `tsconfig` 分层、strictness、路径别名、类型检查脚本和框架生成类型。
16
- - 组件库或 SDK:优先检查 public API、声明文件、package exports、peer dependencies 类型边界和发布前 pack 校验。
17
- - CLI 或 Node 工具:优先检查 Node 目标版本、ESM/CJS 策略、`moduleResolution`、shebang 产物和 `process.env` 类型边界。
18
- - Monorepo package:优先检查 project references、composite build、包间导入边界和 workspace 路径别名是否泄漏到发布产物。
19
- - React、Vue、Next.js、Nuxt 等框架的组件架构、路由组织和状态管理归对应框架 skill;本流程只处理跨框架 TypeScript 契约和工程边界。
20
-
21
- 2. 收敛 `tsconfig`
22
- - 默认开启 `strict`,不要为通过构建关闭 `noImplicitAny`、`strictNullChecks` 或 `exactOptionalPropertyTypes` 等关键约束。
23
- - 按运行环境选择 `target`、`lib`、`module` 和 `moduleResolution`;浏览器应用、Node 脚本、库包不要共用一份含混配置。
24
- - 将基础配置、应用配置、测试配置和构建声明配置拆开,避免测试全局类型污染生产代码。
25
- - 路径别名必须同时被 TypeScript、bundler、test runner 和发布产物理解;库包不得发布无法解析的源码别名。
26
-
27
- 3. 设计类型边界
28
- - 外部输入、DTO、领域模型、UI view model、组件 props 和工具函数 API 分层命名。
29
- - public API 的参数和返回值显式标注,内部局部变量优先依赖推断。
30
- - 外部数据先以 `unknown` 接收,再通过 schema 或 type guard 收窄。
31
- - 复杂泛型、判别联合、DTO 映射、类型守卫和类型测试加载 [类型安全参考](references/type-safety.md);需要高级模式时加载 [类型安全模式](references/type-safety-patterns.md)。
32
-
33
- 4. 固定发布与声明产物
34
- - 库包必须确认 `package.json` 的 `exports`、`types`、`files` 和实际构建产物一致。
35
- - 不默认双包发布;只有明确消费方需要时才同时产出 ESM/CJS,并验证类型入口不分叉。
36
- - 通过 `tsc --emitDeclarationOnly`、构建工具声明插件或 API extractor 产出 `.d.ts`,并在发布前检查声明文件可被消费方解析。
37
- - 不把测试、fixture、内部工具、未稳定类型或私有路径暴露到 package exports。
38
-
39
- 5. 验证 TypeScript 质量
40
- - 优先使用仓库已有脚本,如 `typecheck`、`build`、`test`、`lint` 和 package pack dry-run。
41
- - Vite、Next、Nuxt 等构建不等于完整类型检查;CI 必须有独立 typecheck 或等效验证。
42
- - 类型改动影响 public API 时补类型测试、编译期断言或消费方 fixture。
14
+ 1. Identify TypeScript context
15
+ - Application projects: Prioritize checking of `tsconfig` layering, strictness, path aliases, type checking scripts and framework generation types.
16
+ - Component library or SDK: Prioritize checking public API, declaration files, package exports, peer dependencies type boundaries and pre-release pack verification.
17
+ - CLI or Node tools: Prioritize checking Node target versions, ESM/CJS policies, `moduleResolution`, shebang artifacts, and `process.env` type boundaries.
18
+ - Monorepo package: Prioritize checking whether project references, composite builds, inter-package import boundaries, and workspace path aliases leak into release products.
19
+ - The component architecture, routing organization, and state management of frameworks such as React, Vue, Next.js, and Nuxt belong to the corresponding framework skills; this process only deals with cross-framework TypeScript contracts and project boundaries.
20
+
21
+ 2. Convergence `tsconfig`
22
+ - Turn on `strict` by default, do not turn off key constraints such as `noImplicitAny`, `strictNullChecks` or `exactOptionalPropertyTypes` for pass builds.
23
+ - Select `target`, `lib`, `module` and `moduleResolution` according to the running environment; browser applications, Node scripts, and library packages should not share an ambiguous configuration.
24
+ - Separate basic configuration, application configuration, test configuration and build declaration configuration to avoid testing global types from polluting production code.
25
+ - Path aliases must be understood by TypeScript, bundler, test runner, and published products at the same time; library packages must not publish source code aliases that cannot be resolved.
26
+
27
+ 3. Design type boundaries
28
+ - Hierarchical naming of external input, DTO, domain model, UI view model, component props and tool function API.
29
+ - The parameters and return values of the public API are explicitly marked, and internal local variables are inferred first.
30
+ - External data is received as `unknown` first, and then narrowed by schema or type guard.
31
+ - Complex generics, discriminative unions, DTO mappings, type guards and type tests are loaded [Type Safety Reference](references/type-safety.md); [Type Safety Patterns](references/type-safety-patterns.md) is loaded when advanced patterns are required.
32
+
33
+ 4. Fixed release and announcement of products
34
+ - The library package must confirm that the `exports`, `types`, and `files` of `package.json` are consistent with the actual build product.
35
+ - Do not default to dual-package publishing; only produce ESM/CJS at the same time when the consumer clearly needs it, and verify that the type entry does not fork.
36
+ - Produce `.d.ts` through `tsc --emitDeclarationOnly`, build tool declaration plug-in or API extractor, and check that the declaration file can be parsed by the consumer before publishing.
37
+ - Do not expose tests, fixtures, internal tools, unstable types, or private paths to package exports.
38
+
39
+ 5. Verify TypeScript quality
40
+ - Prioritize the use of existing scripts in the repository, such as `typecheck`, `build`, `test`, `lint` and package pack dry-run.
41
+ - Vite, Next, Nuxt, etc. builds do not equal full type checking; CI must have standalone typecheck or equivalent verification.
42
+ - Type changes affect public API time-filling type tests, compile-time assertions, or consumer fixtures.
43
43
 
44
44
  ## Constraints
45
45
 
46
- - 不用 `skipLibCheck`、`any`、无守卫非空断言或宽泛 `as` 掩盖真实边界问题。
47
- - 不在应用代码中依赖发布包私有深层路径。
48
- - 不把框架目录结构、组件分层、路由组织或状态管理决策放进本流程;这些交给对应框架或专项流程。
49
- - 不让生成类型、测试类型或 Node-only 类型污染浏览器运行代码。
50
- - 不发布只能在源码仓库内解析的路径别名、ambient 声明或隐式全局类型。
46
+ - Don't use `skipLibCheck`, `any`, unguarded non-null assertions or the wide `as` to mask real boundary issues.
47
+ - Do not rely on release package private deep paths in application code.
48
+ - Do not put framework directory structure, component layering, routing organization or state management decisions into this process; these are left to the corresponding framework or dedicated process.
49
+ - Don't pollute browser running code with generated, test, or Node-only types.
50
+ - Do not publish path aliases, ambient declarations, or implicit global types that can only be resolved within the source code repository.
51
51
 
52
52
  ## Expected Output
53
53
 
54
- 输出应包含 TypeScript 上下文判断、关键 `tsconfig`/package 类型入口建议、类型边界方案、声明文件或 public API 风险、验证命令。完成后项目应能独立 typecheck,公开类型可被消费方解析,类型安全问题有明确收窄或建模方案。
54
+ The output should include TypeScript context determinations, key `tsconfig`/package type entry suggestions, type boundary schemes, declaration file or public API risks, and verification commands. After completion, the project should be able to independently typecheck, public types can be parsed by consumers, and type safety issues should have clear narrowing or modeling solutions.
@@ -1,15 +1,15 @@
1
- # 类型安全模式
1
+ # Type safety mode
2
2
 
3
- ## 类型边界审查清单
3
+ ## Type Boundary Review Checklist
4
4
 
5
- - DTO 应与外部载荷对应,并在 API 边界处进行转换。
6
- - 领域模型或视图模型使用前端命名和稳定的联合类型。
7
- - 组件 props 需命名明确,仅在该文件外复用时才导出。
8
- - 公开函数必须有显式的参数和返回值类型。
9
- - 外部输入必须从 `unknown` 开始,通过 schema 校验或类型守卫逐步收窄。
10
- - 配置映射表优先使用 `as const` 和 `satisfies`,避免宽泛断言。
5
+ - DTOs should correspond to external loads and be converted at API boundaries.
6
+ - Domain model or view model uses front-end naming and stable union types.
7
+ - Component props need to be named clearly and exported only when reused outside this file.
8
+ - Public functions must have explicit parameter and return value types.
9
+ - External input must start from `unknown` and be gradually narrowed through schema verification or type guarding.
10
+ - Configure mapping tables using `as const` and `satisfies` first to avoid broad assertions.
11
11
 
12
- ## 使用 `satisfies` 的配置映射表
12
+ ## Use the configuration mapping table of `satisfies`
13
13
 
14
14
  ```ts
15
15
  type Tone = "neutral" | "success" | "warning" | "danger";
@@ -23,9 +23,9 @@ const STATUS_TONE = {
23
23
  type InvoiceStatus = keyof typeof STATUS_TONE;
24
24
  ```
25
25
 
26
- 这样既保留了字面量值,又验证了映射表符合预期的值域。
26
+ This not only preserves the literal value, but also verifies that the mapping table conforms to the expected value range.
27
27
 
28
- ## 映射类型用于表单错误
28
+ ## Mapping type used for form errors
29
29
 
30
30
  ```ts
31
31
  type FieldErrors<TValues extends Record<string, unknown>> = {
@@ -40,7 +40,7 @@ interface ProfileFormValues {
40
40
  type ProfileFormErrors = FieldErrors<ProfileFormValues>;
41
41
  ```
42
42
 
43
- ## 模板字面量类型用于事件命名
43
+ ## Template literal type is used for event naming
44
44
 
45
45
  ```ts
46
46
  interface AnalyticsPayloads {
@@ -52,9 +52,9 @@ type AnalyticsEventName = keyof AnalyticsPayloads;
52
52
  type AnalyticsHandlerName = `on${Capitalize<string & AnalyticsEventName>}`;
53
53
  ```
54
54
 
55
- 当项目中已有事件命名规范时使用此模式。不要为一次性字符串引入。
55
+ Use this pattern when there is already an event naming convention in the project. Don't introduce it for one-time strings.
56
56
 
57
- ## 更安全的泛型组件模式
57
+ ## Safer generic component pattern
58
58
 
59
59
  ```tsx
60
60
  interface Entity {
@@ -92,11 +92,11 @@ export function EntityPicker<TEntity extends Entity>({
92
92
  }
93
93
  ```
94
94
 
95
- ## 类型审查反馈
95
+ ## Type Review Feedback
96
96
 
97
- 报告类型安全问题时,需包含:
97
+ When reporting a type safety issue, include:
98
98
 
99
- - 过于宽泛、过于狭窄或不合理的类型边界。
100
- - 尽管通过 TypeScript 但可能在运行时失败的行为。
101
- - 最小替换类型或守卫方案。
102
- - 该变更是否需要测试或类型测试。
99
+ - Type boundaries that are too broad, too narrow, or unreasonable.
100
+ - Behavior that may fail at runtime despite passing TypeScript.
101
+ - Minimal replacement type or guard scheme.
102
+ - Whether the change requires testing or type testing.
@@ -1,14 +1,14 @@
1
- # TypeScript 类型安全
1
+ #TypeScript type safety
2
2
 
3
3
  ## Purpose
4
4
 
5
- 为前端和 TypeScript 工程建立可演进的类型契约,减少 `any`、断言和运行时形状漂移。
5
+ Establish evolvable type contracts for front-end and TypeScript projects, reducing `any`, assertions, and runtime shape drift.
6
6
 
7
7
  ## Procedure
8
8
 
9
- ### 1. 先确定类型边界
9
+ ### 1. First determine the type boundary
10
10
 
11
- 把类型分为外部输入、领域模型、UI view model、组件 props、工具函数 API。不要让后端 DTO、表单模型和 UI 展示模型互相冒充。
11
+ Divide types into external input, domain model, UI view model, component props, and tool function API. Don't let backend DTOs, form models, and UI presentation models pretend to be each other.
12
12
 
13
13
  ```ts
14
14
  interface UserDto {
@@ -32,9 +32,9 @@ export function mapUserDto(dto: UserDto): UserViewModel {
32
32
  }
33
33
  ```
34
34
 
35
- ### 2. 用 `unknown` 和收窄处理不可信数据
35
+ ### 2. Use `unknown` and narrowing to handle untrusted data
36
36
 
37
- 外部输入先校验再使用。不要用 `as` 让编译器闭嘴。
37
+ External input must be verified before use. Don't use `as` to shut up the compiler.
38
38
 
39
39
  ```ts
40
40
  interface ApiErrorBody {
@@ -55,9 +55,9 @@ export function getApiErrorMessage(value: unknown): string {
55
55
  }
56
56
  ```
57
57
 
58
- ### 3. 用判别联合表达状态机
58
+ ### 3. Express state machine using discriminant union
59
59
 
60
- 异步状态、权限分支、支付状态等有限状态,用判别字段让新增分支在编译期暴露。
60
+ Limited states such as asynchronous status, permission branches, payment status, etc. use discriminant fields to expose new branches during compilation.
61
61
 
62
62
  ```ts
63
63
  type Loadable<T> =
@@ -86,9 +86,9 @@ export function renderUserState(user: Loadable<{ name: string }>): string {
86
86
  }
87
87
  ```
88
88
 
89
- ### 4. 让泛型服务调用方,而不是炫技
89
+ ### 4. Let generics serve callers, not show off their skills
90
90
 
91
- 泛型应减少重复并保持调用方推断清晰。复杂类型超过阅读成本时,优先拆具名类型。
91
+ Generics should reduce duplication and keep caller inference clear. When the complex type exceeds the reading cost, the named type will be demolished first.
92
92
 
93
93
  ```ts
94
94
  interface SelectOption<TValue extends string | number> {
@@ -119,9 +119,9 @@ export function Select<TValue extends string | number>({
119
119
  }
120
120
  ```
121
121
 
122
- ### 5. 用类型测试保护公共类型
122
+ ### 5. Protect public types with type testing
123
123
 
124
- 公共工具类型、组件库类型和 SDK 类型,应有轻量类型测试或编译期断言。
124
+ Public tool types, component library types, and SDK types should have lightweight type tests or compile-time assertions.
125
125
 
126
126
  ```ts
127
127
  type Equal<TLeft, TRight> =
@@ -137,12 +137,12 @@ type _UserStatusTest = Expect<Equal<UserStatus, "active" | "disabled">>;
137
137
 
138
138
  ## Constraints
139
139
 
140
- - 避免 `any`、无守卫的非空断言和不相关类型之间的强制 `as`。
141
- - 不把大型匿名类型堆在函数参数或 JSX props 上;提取具名类型表达业务含义。
142
- - 不为简单业务过度设计递归条件类型;类型复杂度应服务可维护性。
143
- - 公共 API 的输入输出必须显式标注,局部变量可依赖推断。
144
- - 类型建模不能替代运行时校验;外部数据仍需 schema 或 type guard。
140
+ - Avoid `any`, unguarded non-null assertions and coercion `as` between unrelated types.
141
+ - Don’t pile large anonymous types on function parameters or JSX props; extract named types to express business meaning.
142
+ - Do not over-design recursive conditional types for simple business; type complexity should serve maintainability.
143
+ - The input and output of the public API must be explicitly annotated, and local variables can be relied upon for inference.
144
+ - Type modeling does not replace runtime validation; external data still requires schema or type guard.
145
145
 
146
146
  ## Expected Output
147
147
 
148
- 产出清晰的类型边界、可收窄的数据模型、必要的类型测试和验证命令。评审时应列出类型风险、运行时影响、推荐建模方式和是否需要专项修复。
148
+ Produce clear type boundaries, narrowable data models, and necessary type testing and verification commands. The review should list type risks, runtime impacts, recommended modeling methods, and whether special fixes are needed.