@bovinphang/frontend-craft 2.7.0 → 2.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (502) hide show
  1. package/.claude-plugin/marketplace.json +3 -3
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +378 -305
  4. package/CHANGELOG.zh-CN.md +377 -304
  5. package/CONTRIBUTING.md +371 -361
  6. package/CONTRIBUTING.zh-CN.md +371 -361
  7. package/README.md +545 -493
  8. package/README.openclaw.md +359 -264
  9. package/README.openclaw.zh-CN.md +359 -264
  10. package/README.zh-CN.md +545 -493
  11. package/agents/fec-architect.md +70 -70
  12. package/agents/fec-code-reviewer.md +103 -82
  13. package/agents/fec-debugger.md +20 -20
  14. package/agents/fec-design-token-mapper.md +36 -36
  15. package/agents/fec-doc-updater.md +13 -13
  16. package/agents/fec-e2e-runner.md +45 -45
  17. package/agents/fec-figma-implementer.md +59 -59
  18. package/agents/fec-performance-optimizer.md +128 -128
  19. package/agents/fec-refactor-cleaner.md +17 -14
  20. package/agents/fec-refactoring-expert.md +81 -0
  21. package/agents/fec-security-reviewer.md +82 -67
  22. package/agents/fec-test-planner.md +27 -27
  23. package/agents/fec-typescript-reviewer.md +103 -87
  24. package/agents/fec-ui-checker.md +64 -64
  25. package/commands/fec-debug.md +19 -19
  26. package/commands/fec-doc-sync.md +11 -11
  27. package/commands/fec-init.md +37 -38
  28. package/commands/fec-plan.md +58 -58
  29. package/commands/fec-refactor-clean.md +11 -11
  30. package/commands/fec-refactor-plan.md +17 -0
  31. package/commands/fec-refactor.md +18 -0
  32. package/commands/fec-review.md +71 -41
  33. package/commands/fec-scaffold.md +41 -41
  34. package/commands/fec-smell.md +17 -0
  35. package/commands/fec-tdd.md +17 -13
  36. package/dist/bin/frontend-craft.js +190 -36
  37. package/dist/hooks/fec-run-tests.js +5 -1
  38. package/dist/hooks/fec-session-start.js +1 -1
  39. package/docs/example-prompts.md +157 -137
  40. package/docs/ja-JP/README.md +534 -493
  41. package/docs/ko-KR/README.md +534 -493
  42. package/docs/project-structure.md +151 -123
  43. package/docs/refactoring/README.md +50 -0
  44. package/docs/refactoring/catalog.md +105 -0
  45. package/docs/refactoring/smell-refactoring-matrix.md +41 -0
  46. package/docs/review-and-diagram-workflows.md +39 -0
  47. package/docs/runtimes/antigravity.md +18 -10
  48. package/docs/runtimes/augment.md +18 -10
  49. package/docs/runtimes/claude.md +191 -177
  50. package/docs/runtimes/claude.zh-CN.md +189 -175
  51. package/docs/runtimes/cline.md +18 -10
  52. package/docs/runtimes/codebuddy.md +18 -10
  53. package/docs/runtimes/codex.md +18 -10
  54. package/docs/runtimes/compatibility.md +27 -0
  55. package/docs/runtimes/copilot.md +18 -10
  56. package/docs/runtimes/cursor.md +18 -10
  57. package/docs/runtimes/gemini.md +18 -10
  58. package/docs/runtimes/kilo.md +18 -10
  59. package/docs/runtimes/openclaw.md +18 -10
  60. package/docs/runtimes/opencode.md +18 -10
  61. package/docs/runtimes/qoder.md +18 -19
  62. package/docs/runtimes/trae.md +18 -10
  63. package/docs/runtimes/windsurf.md +18 -10
  64. package/docs/superpowers/plans/2026-09-26-content-integrity.md +145 -0
  65. package/docs/superpowers/plans/2026-09-26-diagram-quality.md +170 -0
  66. package/docs/superpowers/specs/2026-09-26-diagram-quality-design.md +77 -0
  67. package/docs/superpowers/specs/2026-09-26-project-optimization-design.md +95 -0
  68. package/docs/zh-CN/example-prompts.md +157 -137
  69. package/docs/zh-CN/project-structure.md +148 -123
  70. package/docs/zh-CN/review-and-diagram-workflows.md +39 -0
  71. package/docs/zh-TW/README.md +534 -493
  72. package/localized/zh-CN/agents/fec-architect.md +125 -0
  73. package/localized/zh-CN/agents/fec-code-reviewer.md +171 -0
  74. package/localized/zh-CN/agents/fec-debugger.md +44 -0
  75. package/localized/zh-CN/agents/fec-design-token-mapper.md +75 -0
  76. package/localized/zh-CN/agents/fec-doc-updater.md +30 -0
  77. package/localized/zh-CN/agents/fec-e2e-runner.md +107 -0
  78. package/localized/zh-CN/agents/fec-figma-implementer.md +104 -0
  79. package/localized/zh-CN/agents/fec-performance-optimizer.md +293 -0
  80. package/localized/zh-CN/agents/fec-refactor-cleaner.md +35 -0
  81. package/localized/zh-CN/agents/fec-refactoring-expert.md +53 -0
  82. package/localized/zh-CN/agents/fec-security-reviewer.md +132 -0
  83. package/localized/zh-CN/agents/fec-test-planner.md +50 -0
  84. package/localized/zh-CN/agents/fec-typescript-reviewer.md +158 -0
  85. package/localized/zh-CN/agents/fec-ui-checker.md +120 -0
  86. package/localized/zh-CN/commands/fec-debug.md +30 -0
  87. package/localized/zh-CN/commands/fec-doc-sync.md +19 -0
  88. package/localized/zh-CN/commands/fec-init.md +70 -0
  89. package/localized/zh-CN/commands/fec-plan.md +94 -0
  90. package/localized/zh-CN/commands/fec-refactor-clean.md +19 -0
  91. package/localized/zh-CN/commands/fec-refactor-plan.md +15 -0
  92. package/localized/zh-CN/commands/fec-refactor.md +14 -0
  93. package/localized/zh-CN/commands/fec-review.md +97 -0
  94. package/localized/zh-CN/commands/fec-scaffold.md +205 -0
  95. package/localized/zh-CN/commands/fec-smell.md +13 -0
  96. package/localized/zh-CN/commands/fec-tdd.md +25 -0
  97. package/localized/zh-CN/skills/TEMPLATE.md +155 -0
  98. package/localized/zh-CN/skills/eval_queries.json +1257 -0
  99. package/localized/zh-CN/skills/fec-accessibility-check/SKILL.md +39 -0
  100. package/localized/zh-CN/skills/fec-accessibility-check/references/report-template.md +23 -0
  101. package/localized/zh-CN/skills/fec-accessibility-check/references/screen-reader-testing.md +33 -0
  102. package/localized/zh-CN/skills/fec-alchemy/SKILL.md +74 -0
  103. package/localized/zh-CN/skills/fec-alchemy/assets/absorption-plan-template.md +47 -0
  104. package/localized/zh-CN/skills/fec-alchemy/assets/intake-template.md +55 -0
  105. package/localized/zh-CN/skills/fec-alchemy/assets/review-checklist.md +31 -0
  106. package/localized/zh-CN/skills/fec-alchemy/references/methodology.md +94 -0
  107. package/localized/zh-CN/skills/fec-alchemy/references/originality-and-licensing.md +57 -0
  108. package/localized/zh-CN/skills/fec-api-integration/SKILL.md +78 -0
  109. package/localized/zh-CN/skills/fec-api-integration/references/integration-patterns.md +80 -0
  110. package/localized/zh-CN/skills/fec-backend-requirements-handoff/SKILL.md +45 -0
  111. package/localized/zh-CN/skills/fec-browser-storage/SKILL.md +34 -0
  112. package/localized/zh-CN/skills/fec-browser-storage/references/storage-patterns.md +65 -0
  113. package/localized/zh-CN/skills/fec-canvas-threejs/SKILL.md +66 -0
  114. package/localized/zh-CN/skills/fec-canvas-threejs/references/rendering-patterns.md +67 -0
  115. package/localized/zh-CN/skills/fec-canvas-threejs/references/shader-webgl-patterns.md +67 -0
  116. package/localized/zh-CN/skills/fec-code-review/SKILL.md +162 -0
  117. package/localized/zh-CN/skills/fec-code-review/references/report-template.md +39 -0
  118. package/localized/zh-CN/skills/fec-code-smells/SKILL.md +33 -0
  119. package/localized/zh-CN/skills/fec-code-smells/references/detection-guide.md +25 -0
  120. package/localized/zh-CN/skills/fec-code-smells/references/smell-catalog.md +817 -0
  121. package/localized/zh-CN/skills/fec-code-smells/references/smell-to-refactoring-map.md +265 -0
  122. package/localized/zh-CN/skills/fec-component-testing/SKILL.md +119 -0
  123. package/localized/zh-CN/skills/fec-data-fetching/SKILL.md +62 -0
  124. package/localized/zh-CN/skills/fec-data-fetching/references/query-patterns.md +103 -0
  125. package/localized/zh-CN/skills/fec-debug-framework/SKILL.md +157 -0
  126. package/localized/zh-CN/skills/fec-debug-framework/references/report-template.md +58 -0
  127. package/localized/zh-CN/skills/fec-dependency-upgrade/SKILL.md +34 -0
  128. package/localized/zh-CN/skills/fec-dependency-upgrade/references/dependency-upgrade-workflow.md +56 -0
  129. package/localized/zh-CN/skills/fec-doc-sync/SKILL.md +39 -0
  130. package/localized/zh-CN/skills/fec-drawio-studio/SKILL.md +73 -0
  131. package/localized/zh-CN/skills/fec-drawio-studio/data/THIRD_PARTY_NOTICES.md +10 -0
  132. package/localized/zh-CN/skills/fec-drawio-studio/data/brand-icons.json +878 -0
  133. package/localized/zh-CN/skills/fec-drawio-studio/data/shape-index.json +83570 -0
  134. package/localized/zh-CN/skills/fec-drawio-studio/references/data-residency.md +27 -0
  135. package/localized/zh-CN/skills/fec-drawio-studio/references/diagram-patterns.md +60 -0
  136. package/localized/zh-CN/skills/fec-drawio-studio/references/flowchart-quality.md +49 -0
  137. package/localized/zh-CN/skills/fec-drawio-studio/references/layout-and-export.md +72 -0
  138. package/localized/zh-CN/skills/fec-drawio-studio/references/troubleshooting.md +29 -0
  139. package/localized/zh-CN/skills/fec-drawio-studio/references/xml-and-mermaid.md +58 -0
  140. package/localized/zh-CN/skills/fec-drawio-studio/scripts/brand-symbols.mjs +99 -0
  141. package/localized/zh-CN/skills/fec-drawio-studio/scripts/diagram-lint.mjs +205 -0
  142. package/localized/zh-CN/skills/fec-drawio-studio/scripts/diagram-url.mjs +102 -0
  143. package/localized/zh-CN/skills/fec-drawio-studio/scripts/drawio-export.mjs +134 -0
  144. package/localized/zh-CN/skills/fec-drawio-studio/scripts/layout-graph.mjs +107 -0
  145. package/localized/zh-CN/skills/fec-drawio-studio/scripts/png-embed-fix.mjs +26 -0
  146. package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-go-packages.mjs +36 -0
  147. package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-js-modules.mjs +52 -0
  148. package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-python-classes.mjs +30 -0
  149. package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-python-modules.mjs +55 -0
  150. package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-rust-modules.mjs +35 -0
  151. package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-ts-modules.mjs +7 -0
  152. package/localized/zh-CN/skills/fec-drawio-studio/scripts/shape-query.mjs +121 -0
  153. package/localized/zh-CN/skills/fec-drawio-studio/scripts/studio-core.mjs +139 -0
  154. package/localized/zh-CN/skills/fec-drawio-studio/styles/built-in/corporate.json +49 -0
  155. package/localized/zh-CN/skills/fec-drawio-studio/styles/built-in/default.json +49 -0
  156. package/localized/zh-CN/skills/fec-drawio-studio/styles/built-in/handdrawn.json +49 -0
  157. package/localized/zh-CN/skills/fec-drawio-studio/styles/schema.json +112 -0
  158. package/localized/zh-CN/skills/fec-e2e-testing/SKILL.md +42 -0
  159. package/localized/zh-CN/skills/fec-e2e-testing/references/e2e-ci-reporting.md +62 -0
  160. package/localized/zh-CN/skills/fec-e2e-testing/references/e2e-special-scenarios.md +52 -0
  161. package/localized/zh-CN/skills/fec-e2e-testing/references/e2e-visual-regression.md +60 -0
  162. package/localized/zh-CN/skills/fec-e2e-testing/references/playwright-patterns.md +95 -0
  163. package/localized/zh-CN/skills/fec-form-handling/SKILL.md +76 -0
  164. package/localized/zh-CN/skills/fec-form-handling/references/advanced-form-patterns.md +101 -0
  165. package/localized/zh-CN/skills/fec-image-generation/SKILL.md +110 -0
  166. package/localized/zh-CN/skills/fec-image-generation/assets/interactive-diagram.html +371 -0
  167. package/localized/zh-CN/skills/fec-image-generation/assets/quality-examples/README.md +14 -0
  168. package/localized/zh-CN/skills/fec-image-generation/assets/quality-examples/architecture.json +121 -0
  169. package/localized/zh-CN/skills/fec-image-generation/assets/quality-examples/invalid-explicit.json +41 -0
  170. package/localized/zh-CN/skills/fec-image-generation/assets/quality-examples/sequence.json +53 -0
  171. package/localized/zh-CN/skills/fec-image-generation/assets/quality-examples/sequence.mmd +21 -0
  172. package/localized/zh-CN/skills/fec-image-generation/assets/quality-examples/workflow.json +98 -0
  173. package/localized/zh-CN/skills/fec-image-generation/assets/quality-examples/workflow.mmd +7 -0
  174. package/localized/zh-CN/skills/fec-image-generation/references/artifact-routing.md +80 -0
  175. package/localized/zh-CN/skills/fec-image-generation/references/diagram-workflows.md +81 -0
  176. package/localized/zh-CN/skills/fec-image-generation/references/html-technical-diagrams.md +243 -0
  177. package/localized/zh-CN/skills/fec-image-generation/references/png-qa-autofix.md +37 -0
  178. package/localized/zh-CN/skills/fec-image-generation/scripts/diagram-browser.mjs +90 -0
  179. package/localized/zh-CN/skills/fec-image-generation/scripts/diagram-layout.mjs +176 -0
  180. package/localized/zh-CN/skills/fec-image-generation/scripts/export-diagram.mjs +332 -0
  181. package/localized/zh-CN/skills/fec-image-generation/scripts/interactive-diagram-server.mjs +654 -0
  182. package/localized/zh-CN/skills/fec-image-generation/scripts/mermaid-render.mjs +64 -0
  183. package/localized/zh-CN/skills/fec-image-generation/scripts/png-qa.mjs +462 -0
  184. package/localized/zh-CN/skills/fec-image-generation/scripts/tech-diagram-render.mjs +1537 -0
  185. package/localized/zh-CN/skills/fec-implement-from-design/SKILL.md +129 -0
  186. package/localized/zh-CN/skills/fec-implement-from-design/references/design-plan-template.md +36 -0
  187. package/localized/zh-CN/skills/fec-legacy-to-modern-migration/SKILL.md +46 -0
  188. package/localized/zh-CN/skills/fec-legacy-to-modern-migration/references/migration-execution-checklist.md +110 -0
  189. package/localized/zh-CN/skills/fec-legacy-to-modern-migration/references/migration-report-template.md +41 -0
  190. package/localized/zh-CN/skills/fec-legacy-to-modern-migration/references/migration-strategy-and-mapping.md +48 -0
  191. package/localized/zh-CN/skills/fec-legacy-web-standard/SKILL.md +35 -0
  192. package/localized/zh-CN/skills/fec-legacy-web-standard/references/legacy-patterns.md +85 -0
  193. package/localized/zh-CN/skills/fec-list-virtualization/SKILL.md +34 -0
  194. package/localized/zh-CN/skills/fec-list-virtualization/references/virtualization-patterns.md +80 -0
  195. package/localized/zh-CN/skills/fec-monorepo-project-standard/SKILL.md +142 -0
  196. package/localized/zh-CN/skills/fec-motion-interaction/SKILL.md +73 -0
  197. package/localized/zh-CN/skills/fec-motion-interaction/references/motion-patterns.md +112 -0
  198. package/localized/zh-CN/skills/fec-nextjs-project-standard/SKILL.md +123 -0
  199. package/localized/zh-CN/skills/fec-nuxt-project-standard/SKILL.md +122 -0
  200. package/localized/zh-CN/skills/fec-performance-optimization/SKILL.md +80 -0
  201. package/localized/zh-CN/skills/fec-performance-optimization/references/framework-performance-patterns.md +38 -0
  202. package/localized/zh-CN/skills/fec-performance-optimization/references/report-template.md +59 -0
  203. package/localized/zh-CN/skills/fec-pwa-implementation/SKILL.md +35 -0
  204. package/localized/zh-CN/skills/fec-pwa-implementation/references/manifest-and-icons.md +53 -0
  205. package/localized/zh-CN/skills/fec-pwa-implementation/references/service-worker-workbox.md +68 -0
  206. package/localized/zh-CN/skills/fec-react-project-standard/SKILL.md +91 -0
  207. package/localized/zh-CN/skills/fec-react-project-standard/references/react-performance-patterns.md +35 -0
  208. package/localized/zh-CN/skills/fec-react-project-standard/references/react-project-structure.md +197 -0
  209. package/localized/zh-CN/skills/fec-react-project-standard/references/react-quality-patterns.md +131 -0
  210. package/localized/zh-CN/skills/fec-react-project-standard/references/react-runtime-patterns.md +293 -0
  211. package/localized/zh-CN/skills/fec-refactor-clean/SKILL.md +54 -0
  212. package/localized/zh-CN/skills/fec-refactor-clean/references/report-template.md +42 -0
  213. package/localized/zh-CN/skills/fec-refactoring/SKILL.md +83 -0
  214. package/localized/zh-CN/skills/fec-refactoring/references/principles.md +43 -0
  215. package/localized/zh-CN/skills/fec-refactoring/references/refactoring-vs-feature-change.md +25 -0
  216. package/localized/zh-CN/skills/fec-refactoring/references/when-to-refactor.md +17 -0
  217. package/localized/zh-CN/skills/fec-refactoring/references/workflow.md +59 -0
  218. package/localized/zh-CN/skills/fec-refactoring-api/SKILL.md +25 -0
  219. package/localized/zh-CN/skills/fec-refactoring-api/references/api-refactorings.md +496 -0
  220. package/localized/zh-CN/skills/fec-refactoring-catalog/SKILL.md +21 -0
  221. package/localized/zh-CN/skills/fec-refactoring-catalog/references/catalog-index.md +99 -0
  222. package/localized/zh-CN/skills/fec-refactoring-catalog/references/composition-guide.md +49 -0
  223. package/localized/zh-CN/skills/fec-refactoring-catalog/references/selection-guide.md +41 -0
  224. package/localized/zh-CN/skills/fec-refactoring-control/SKILL.md +25 -0
  225. package/localized/zh-CN/skills/fec-refactoring-control/references/conditional-refactorings.md +299 -0
  226. package/localized/zh-CN/skills/fec-refactoring-data/SKILL.md +25 -0
  227. package/localized/zh-CN/skills/fec-refactoring-data/references/data-refactorings.md +248 -0
  228. package/localized/zh-CN/skills/fec-refactoring-encapsulation/SKILL.md +25 -0
  229. package/localized/zh-CN/skills/fec-refactoring-encapsulation/references/encapsulation-refactorings.md +452 -0
  230. package/localized/zh-CN/skills/fec-refactoring-functions/SKILL.md +25 -0
  231. package/localized/zh-CN/skills/fec-refactoring-functions/references/function-refactorings.md +567 -0
  232. package/localized/zh-CN/skills/fec-refactoring-inheritance/SKILL.md +25 -0
  233. package/localized/zh-CN/skills/fec-refactoring-inheritance/references/inheritance-refactorings.md +550 -0
  234. package/localized/zh-CN/skills/fec-refactoring-move-features/SKILL.md +25 -0
  235. package/localized/zh-CN/skills/fec-refactoring-move-features/references/moving-refactorings.md +453 -0
  236. package/localized/zh-CN/skills/fec-refactoring-validation/SKILL.md +52 -0
  237. package/localized/zh-CN/skills/fec-refactoring-validation/references/behavior-preservation.md +15 -0
  238. package/localized/zh-CN/skills/fec-refactoring-validation/references/refactoring-test-checklist.md +25 -0
  239. package/localized/zh-CN/skills/fec-responsive-layout/SKILL.md +34 -0
  240. package/localized/zh-CN/skills/fec-responsive-layout/references/responsive-layout-patterns.md +70 -0
  241. package/localized/zh-CN/skills/fec-route-protection/SKILL.md +135 -0
  242. package/localized/zh-CN/skills/fec-security-review/SKILL.md +54 -0
  243. package/localized/zh-CN/skills/fec-security-review/references/report-template.md +37 -0
  244. package/localized/zh-CN/skills/fec-security-review/references/security-checklist.md +64 -0
  245. package/localized/zh-CN/skills/fec-source-driven-development/SKILL.md +87 -0
  246. package/localized/zh-CN/skills/fec-state-management/SKILL.md +140 -0
  247. package/localized/zh-CN/skills/fec-state-management/references/state-patterns.md +109 -0
  248. package/localized/zh-CN/skills/fec-storybook-component-doc/SKILL.md +37 -0
  249. package/localized/zh-CN/skills/fec-storybook-component-doc/references/story-patterns.md +118 -0
  250. package/localized/zh-CN/skills/fec-svg-animation/SKILL.md +148 -0
  251. package/localized/zh-CN/skills/fec-tailwind-design-system/SKILL.md +34 -0
  252. package/localized/zh-CN/skills/fec-tailwind-design-system/references/tailwind-system-patterns.md +59 -0
  253. package/localized/zh-CN/skills/fec-tdd-workflow/SKILL.md +55 -0
  254. package/localized/zh-CN/skills/fec-testing-strategy/SKILL.md +45 -0
  255. package/localized/zh-CN/skills/fec-typescript-project-standard/SKILL.md +54 -0
  256. package/localized/zh-CN/skills/fec-typescript-project-standard/references/type-safety-patterns.md +102 -0
  257. package/localized/zh-CN/skills/fec-typescript-project-standard/references/type-safety.md +148 -0
  258. package/localized/zh-CN/skills/fec-ui-design/SKILL.md +108 -0
  259. package/localized/zh-CN/skills/fec-ui-design/data/product-rules.json +231 -0
  260. package/localized/zh-CN/skills/fec-ui-design/data/stack-ui-rules.json +146 -0
  261. package/localized/zh-CN/skills/fec-ui-design/data/style-archetypes.json +373 -0
  262. package/localized/zh-CN/skills/fec-ui-design/data/ux-quality-rules.json +203 -0
  263. package/localized/zh-CN/skills/fec-ui-design/references/design-intelligence.md +97 -0
  264. package/localized/zh-CN/skills/fec-ui-design/references/master-page-overrides.md +30 -0
  265. package/localized/zh-CN/skills/fec-ui-design/references/pre-delivery-checklist.md +39 -0
  266. package/localized/zh-CN/skills/fec-ui-design/scripts/design-system.mjs +648 -0
  267. package/localized/zh-CN/skills/fec-validation-fix/SKILL.md +51 -0
  268. package/localized/zh-CN/skills/fec-validation-fix/references/report-template.md +43 -0
  269. package/localized/zh-CN/skills/fec-vite-project-standard/SKILL.md +83 -0
  270. package/localized/zh-CN/skills/fec-vue3-project-standard/SKILL.md +58 -0
  271. package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-composables-routing.md +162 -0
  272. package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-performance-patterns.md +13 -0
  273. package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-project-structure.md +176 -0
  274. package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-state-api-quality.md +216 -0
  275. package/localized/zh-CN/skills/fec-web-video-presentation/SKILL.md +61 -0
  276. package/localized/zh-CN/skills/fec-web-video-presentation/data/starter-themes.json +59 -0
  277. package/localized/zh-CN/skills/fec-web-video-presentation/references/chapter-craft.md +37 -0
  278. package/localized/zh-CN/skills/fec-web-video-presentation/references/content-plan.md +38 -0
  279. package/localized/zh-CN/skills/fec-web-video-presentation/references/recording-and-audio.md +33 -0
  280. package/localized/zh-CN/skills/fec-web-video-presentation/references/theme-system.md +36 -0
  281. package/localized/zh-CN/skills/fec-web-video-presentation/scripts/create-video-presentation.mjs +430 -0
  282. package/localized/zh-CN/skills/fec-web-workers/SKILL.md +35 -0
  283. package/localized/zh-CN/skills/fec-web-workers/references/advanced-workers.md +54 -0
  284. package/localized/zh-CN/skills/fec-web-workers/references/basic-worker.md +67 -0
  285. package/localized/zh-CN/skills/metadata.json +2004 -0
  286. package/localized/zh-CN/skills/relations.json +1023 -0
  287. package/localized/zh-CN/templates/claude/CLAUDE.md +106 -0
  288. package/localized/zh-CN/templates/claude/settings.json +62 -0
  289. package/localized/zh-CN/templates/codex/AGENTS.md +105 -0
  290. package/localized/zh-CN/templates/codex/config.toml +32 -0
  291. package/localized/zh-CN/templates/openclaw/AGENTS.md +101 -0
  292. package/localized/zh-CN/templates/openclaw/OPENCLAW-CONFIG.md +12 -0
  293. package/localized/zh-CN/templates/shared/rules/fec-agent-workflow.md +55 -0
  294. package/localized/zh-CN/templates/shared/rules/fec-api-layer.md +99 -0
  295. package/localized/zh-CN/templates/shared/rules/fec-ci-cd.md +40 -0
  296. package/localized/zh-CN/templates/shared/rules/fec-code-comments.md +33 -0
  297. package/localized/zh-CN/templates/shared/rules/fec-design-system.md +72 -0
  298. package/localized/zh-CN/templates/shared/rules/fec-error-handling.md +56 -0
  299. package/localized/zh-CN/templates/shared/rules/fec-git-conventions.md +73 -0
  300. package/localized/zh-CN/templates/shared/rules/fec-i18n.md +64 -0
  301. package/localized/zh-CN/templates/shared/rules/fec-naming-conventions.md +120 -0
  302. package/localized/zh-CN/templates/shared/rules/fec-performance.md +101 -0
  303. package/localized/zh-CN/templates/shared/rules/fec-react.md +82 -0
  304. package/localized/zh-CN/templates/shared/rules/fec-refactoring.md +47 -0
  305. package/localized/zh-CN/templates/shared/rules/fec-rendering-patterns.md +40 -0
  306. package/localized/zh-CN/templates/shared/rules/fec-responsive-design.md +50 -0
  307. package/localized/zh-CN/templates/shared/rules/fec-source-driven-development.md +31 -0
  308. package/localized/zh-CN/templates/shared/rules/fec-state-management.md +60 -0
  309. package/localized/zh-CN/templates/shared/rules/fec-testing.md +98 -0
  310. package/localized/zh-CN/templates/shared/rules/fec-typescript.md +112 -0
  311. package/localized/zh-CN/templates/shared/rules/fec-vue.md +64 -0
  312. package/localized/zh-CN/templates/shared/rules/fec-working-modes.md +50 -0
  313. package/openclaw.plugin.json +2 -3
  314. package/package.json +28 -17
  315. package/skills/TEMPLATE.md +74 -74
  316. package/skills/eval_queries.json +922 -678
  317. package/skills/fec-accessibility-check/SKILL.md +21 -21
  318. package/skills/fec-accessibility-check/references/report-template.md +12 -12
  319. package/skills/fec-accessibility-check/references/screen-reader-testing.md +24 -24
  320. package/skills/fec-alchemy/SKILL.md +50 -50
  321. package/skills/fec-alchemy/assets/absorption-plan-template.md +32 -32
  322. package/skills/fec-alchemy/assets/intake-template.md +55 -55
  323. package/skills/fec-alchemy/assets/review-checklist.md +23 -23
  324. package/skills/fec-alchemy/references/methodology.md +66 -66
  325. package/skills/fec-alchemy/references/originality-and-licensing.md +42 -42
  326. package/skills/fec-api-integration/SKILL.md +61 -61
  327. package/skills/fec-api-integration/references/integration-patterns.md +30 -30
  328. package/skills/fec-backend-requirements-handoff/SKILL.md +25 -25
  329. package/skills/fec-browser-storage/SKILL.md +16 -16
  330. package/skills/fec-browser-storage/references/storage-patterns.md +16 -16
  331. package/skills/fec-canvas-threejs/SKILL.md +21 -21
  332. package/skills/fec-canvas-threejs/references/rendering-patterns.md +10 -10
  333. package/skills/fec-canvas-threejs/references/shader-webgl-patterns.md +37 -37
  334. package/skills/fec-code-review/SKILL.md +113 -94
  335. package/skills/fec-code-review/references/report-template.md +23 -13
  336. package/skills/fec-code-smells/SKILL.md +33 -0
  337. package/skills/fec-code-smells/references/detection-guide.md +25 -0
  338. package/skills/fec-code-smells/references/smell-catalog.md +861 -0
  339. package/skills/fec-code-smells/references/smell-to-refactoring-map.md +265 -0
  340. package/skills/fec-component-testing/SKILL.md +39 -39
  341. package/skills/fec-data-fetching/SKILL.md +16 -16
  342. package/skills/fec-data-fetching/references/query-patterns.md +27 -27
  343. package/skills/fec-debug-framework/SKILL.md +95 -95
  344. package/skills/fec-debug-framework/references/report-template.md +34 -34
  345. package/skills/fec-dependency-upgrade/SKILL.md +17 -17
  346. package/skills/fec-dependency-upgrade/references/dependency-upgrade-workflow.md +31 -31
  347. package/skills/fec-doc-sync/SKILL.md +23 -23
  348. package/skills/fec-drawio-studio/SKILL.md +42 -38
  349. package/skills/fec-drawio-studio/data/THIRD_PARTY_NOTICES.md +1 -1
  350. package/skills/fec-drawio-studio/data/shape-index.json +83570 -0
  351. package/skills/fec-drawio-studio/references/diagram-patterns.md +19 -0
  352. package/skills/fec-drawio-studio/references/flowchart-quality.md +49 -0
  353. package/skills/fec-drawio-studio/references/layout-and-export.md +18 -3
  354. package/skills/fec-drawio-studio/references/xml-and-mermaid.md +5 -1
  355. package/skills/fec-drawio-studio/scripts/diagram-lint.mjs +62 -0
  356. package/skills/fec-drawio-studio/scripts/drawio-export.mjs +134 -0
  357. package/skills/fec-drawio-studio/scripts/shape-query.mjs +55 -15
  358. package/skills/fec-e2e-testing/SKILL.md +24 -24
  359. package/skills/fec-e2e-testing/references/e2e-ci-reporting.md +20 -20
  360. package/skills/fec-e2e-testing/references/e2e-special-scenarios.md +10 -10
  361. package/skills/fec-e2e-testing/references/e2e-visual-regression.md +17 -17
  362. package/skills/fec-e2e-testing/references/playwright-patterns.md +6 -6
  363. package/skills/fec-form-handling/SKILL.md +21 -21
  364. package/skills/fec-form-handling/references/advanced-form-patterns.md +41 -41
  365. package/skills/fec-image-generation/SKILL.md +84 -29
  366. package/skills/fec-image-generation/assets/interactive-diagram.html +371 -0
  367. package/skills/fec-image-generation/assets/quality-examples/README.md +14 -0
  368. package/skills/fec-image-generation/assets/quality-examples/architecture.json +121 -0
  369. package/skills/fec-image-generation/assets/quality-examples/invalid-explicit.json +41 -0
  370. package/skills/fec-image-generation/assets/quality-examples/sequence.json +53 -0
  371. package/skills/fec-image-generation/assets/quality-examples/sequence.mmd +21 -0
  372. package/skills/fec-image-generation/assets/quality-examples/workflow.json +98 -0
  373. package/skills/fec-image-generation/assets/quality-examples/workflow.mmd +7 -0
  374. package/skills/fec-image-generation/references/diagram-workflows.md +41 -3
  375. package/skills/fec-image-generation/references/html-technical-diagrams.md +243 -0
  376. package/skills/fec-image-generation/references/png-qa-autofix.md +9 -2
  377. package/skills/fec-image-generation/scripts/diagram-browser.mjs +90 -0
  378. package/skills/fec-image-generation/scripts/diagram-layout.mjs +176 -0
  379. package/skills/fec-image-generation/scripts/export-diagram.mjs +332 -0
  380. package/skills/fec-image-generation/scripts/interactive-diagram-server.mjs +654 -0
  381. package/skills/fec-image-generation/scripts/mermaid-render.mjs +64 -0
  382. package/skills/fec-image-generation/scripts/png-qa.mjs +35 -4
  383. package/skills/fec-image-generation/scripts/tech-diagram-render.mjs +1537 -0
  384. package/skills/fec-implement-from-design/SKILL.md +81 -81
  385. package/skills/fec-implement-from-design/references/design-plan-template.md +16 -16
  386. package/skills/fec-legacy-to-modern-migration/SKILL.md +29 -29
  387. package/skills/fec-legacy-to-modern-migration/references/migration-execution-checklist.md +81 -81
  388. package/skills/fec-legacy-to-modern-migration/references/migration-report-template.md +37 -37
  389. package/skills/fec-legacy-to-modern-migration/references/migration-strategy-and-mapping.md +31 -31
  390. package/skills/fec-legacy-web-standard/SKILL.md +17 -17
  391. package/skills/fec-legacy-web-standard/references/legacy-patterns.md +16 -16
  392. package/skills/fec-list-virtualization/SKILL.md +16 -16
  393. package/skills/fec-list-virtualization/references/virtualization-patterns.md +31 -31
  394. package/skills/fec-monorepo-project-standard/SKILL.md +52 -52
  395. package/skills/fec-motion-interaction/SKILL.md +51 -51
  396. package/skills/fec-motion-interaction/references/motion-patterns.md +11 -11
  397. package/skills/fec-nextjs-project-standard/SKILL.md +64 -64
  398. package/skills/fec-nuxt-project-standard/SKILL.md +57 -57
  399. package/skills/fec-performance-optimization/SKILL.md +54 -54
  400. package/skills/fec-performance-optimization/references/framework-performance-patterns.md +23 -23
  401. package/skills/fec-performance-optimization/references/report-template.md +31 -31
  402. package/skills/fec-pwa-implementation/SKILL.md +17 -17
  403. package/skills/fec-pwa-implementation/references/manifest-and-icons.md +12 -12
  404. package/skills/fec-pwa-implementation/references/service-worker-workbox.md +13 -13
  405. package/skills/fec-react-project-standard/SKILL.md +72 -72
  406. package/skills/fec-react-project-standard/references/react-performance-patterns.md +28 -28
  407. package/skills/fec-react-project-standard/references/react-project-structure.md +112 -112
  408. package/skills/fec-react-project-standard/references/react-quality-patterns.md +72 -72
  409. package/skills/fec-react-project-standard/references/react-runtime-patterns.md +94 -94
  410. package/skills/fec-refactor-clean/SKILL.md +33 -30
  411. package/skills/fec-refactor-clean/references/report-template.md +23 -23
  412. package/skills/fec-refactoring/SKILL.md +83 -0
  413. package/skills/fec-refactoring/references/principles.md +60 -0
  414. package/skills/fec-refactoring/references/refactoring-vs-feature-change.md +27 -0
  415. package/skills/fec-refactoring/references/when-to-refactor.md +31 -0
  416. package/skills/fec-refactoring/references/workflow.md +90 -0
  417. package/skills/fec-refactoring-api/SKILL.md +25 -0
  418. package/skills/fec-refactoring-api/references/api-refactorings.md +496 -0
  419. package/skills/fec-refactoring-catalog/SKILL.md +28 -0
  420. package/skills/fec-refactoring-catalog/references/catalog-index.md +99 -0
  421. package/skills/fec-refactoring-catalog/references/composition-guide.md +49 -0
  422. package/skills/fec-refactoring-catalog/references/selection-guide.md +47 -0
  423. package/skills/fec-refactoring-control/SKILL.md +25 -0
  424. package/skills/fec-refactoring-control/references/conditional-refactorings.md +299 -0
  425. package/skills/fec-refactoring-data/SKILL.md +25 -0
  426. package/skills/fec-refactoring-data/references/data-refactorings.md +248 -0
  427. package/skills/fec-refactoring-encapsulation/SKILL.md +25 -0
  428. package/skills/fec-refactoring-encapsulation/references/encapsulation-refactorings.md +452 -0
  429. package/skills/fec-refactoring-functions/SKILL.md +25 -0
  430. package/skills/fec-refactoring-functions/references/function-refactorings.md +567 -0
  431. package/skills/fec-refactoring-inheritance/SKILL.md +25 -0
  432. package/skills/fec-refactoring-inheritance/references/inheritance-refactorings.md +550 -0
  433. package/skills/fec-refactoring-move-features/SKILL.md +25 -0
  434. package/skills/fec-refactoring-move-features/references/moving-refactorings.md +453 -0
  435. package/skills/fec-refactoring-validation/SKILL.md +59 -0
  436. package/skills/fec-refactoring-validation/references/behavior-preservation.md +53 -0
  437. package/skills/fec-refactoring-validation/references/refactoring-test-checklist.md +42 -0
  438. package/skills/fec-responsive-layout/SKILL.md +17 -17
  439. package/skills/fec-responsive-layout/references/responsive-layout-patterns.md +37 -37
  440. package/skills/fec-route-protection/SKILL.md +26 -26
  441. package/skills/fec-security-review/SKILL.md +36 -20
  442. package/skills/fec-security-review/references/report-template.md +22 -12
  443. package/skills/fec-security-review/references/security-checklist.md +27 -27
  444. package/skills/fec-source-driven-development/SKILL.md +59 -59
  445. package/skills/fec-state-management/SKILL.md +34 -34
  446. package/skills/fec-state-management/references/state-patterns.md +19 -19
  447. package/skills/fec-storybook-component-doc/SKILL.md +19 -19
  448. package/skills/fec-storybook-component-doc/references/story-patterns.md +12 -12
  449. package/skills/fec-svg-animation/SKILL.md +32 -32
  450. package/skills/fec-tailwind-design-system/SKILL.md +17 -17
  451. package/skills/fec-tailwind-design-system/references/tailwind-system-patterns.md +36 -36
  452. package/skills/fec-tdd-workflow/SKILL.md +32 -28
  453. package/skills/fec-testing-strategy/SKILL.md +29 -29
  454. package/skills/fec-typescript-project-standard/SKILL.md +38 -38
  455. package/skills/fec-typescript-project-standard/references/type-safety-patterns.md +20 -20
  456. package/skills/fec-typescript-project-standard/references/type-safety.md +18 -18
  457. package/skills/fec-ui-design/SKILL.md +90 -90
  458. package/skills/fec-ui-design/references/design-intelligence.md +61 -61
  459. package/skills/fec-ui-design/references/master-page-overrides.md +15 -15
  460. package/skills/fec-ui-design/references/pre-delivery-checklist.md +38 -38
  461. package/skills/fec-validation-fix/SKILL.md +26 -26
  462. package/skills/fec-validation-fix/references/report-template.md +25 -25
  463. package/skills/fec-vite-project-standard/SKILL.md +39 -39
  464. package/skills/fec-vue3-project-standard/SKILL.md +38 -38
  465. package/skills/fec-vue3-project-standard/references/vue3-composables-routing.md +36 -36
  466. package/skills/fec-vue3-project-standard/references/vue3-performance-patterns.md +8 -8
  467. package/skills/fec-vue3-project-standard/references/vue3-project-structure.md +112 -112
  468. package/skills/fec-vue3-project-standard/references/vue3-state-api-quality.md +74 -74
  469. package/skills/fec-web-video-presentation/SKILL.md +33 -33
  470. package/skills/fec-web-workers/SKILL.md +16 -16
  471. package/skills/fec-web-workers/references/advanced-workers.md +13 -13
  472. package/skills/fec-web-workers/references/basic-worker.md +8 -8
  473. package/skills/metadata.json +485 -116
  474. package/skills/relations.json +268 -0
  475. package/templates/claude/CLAUDE.md +60 -60
  476. package/templates/codex/AGENTS.md +76 -76
  477. package/templates/codex/config.toml +4 -4
  478. package/templates/openclaw/AGENTS.md +68 -68
  479. package/templates/openclaw/OPENCLAW-CONFIG.md +8 -8
  480. package/templates/shared/rules/fec-agent-workflow.md +41 -40
  481. package/templates/shared/rules/fec-api-layer.md +52 -52
  482. package/templates/shared/rules/fec-ci-cd.md +29 -29
  483. package/templates/shared/rules/fec-code-comments.md +22 -22
  484. package/templates/shared/rules/fec-design-system.md +53 -53
  485. package/templates/shared/rules/fec-error-handling.md +40 -40
  486. package/templates/shared/rules/fec-git-conventions.md +42 -42
  487. package/templates/shared/rules/fec-i18n.md +48 -48
  488. package/templates/shared/rules/fec-naming-conventions.md +91 -91
  489. package/templates/shared/rules/fec-performance.md +78 -78
  490. package/templates/shared/rules/fec-react.md +58 -58
  491. package/templates/shared/rules/fec-refactoring.md +34 -34
  492. package/templates/shared/rules/fec-rendering-patterns.md +36 -36
  493. package/templates/shared/rules/fec-responsive-design.md +37 -37
  494. package/templates/shared/rules/fec-source-driven-development.md +22 -22
  495. package/templates/shared/rules/fec-state-management.md +56 -56
  496. package/templates/shared/rules/fec-testing.md +64 -64
  497. package/templates/shared/rules/fec-typescript.md +75 -75
  498. package/templates/shared/rules/fec-vue.md +42 -42
  499. package/templates/shared/rules/fec-working-modes.md +34 -34
  500. package/docs/superpowers/plans/2026-05-29-fec-debug.md +0 -491
  501. package/docs/superpowers/specs/2026-05-29-fec-debug-design.md +0 -340
  502. package/skills/fec-drawio-studio/data/shape-index.json.gz +0 -0
@@ -1,16 +1,16 @@
1
- # 响应式布局模式
1
+ # Responsive layout mode
2
2
 
3
- ## 策略选择
3
+ ## Strategy selection
4
4
 
5
- | 场景 | 策略 |
5
+ | Scenario | Strategy |
6
6
  | ---- | ---- |
7
- | 页面级结构 | 移动优先断点 |
8
- | 会被放进未知父容器的复用组件 | 容器查询 |
9
- | 卡片网格 | `repeat(auto-fit, minmax())`,并设置合理最小宽度 |
10
- | 数据表格 | 列优先级、横向滚动或移动端摘要行 |
11
- | 编辑器 / 画布 / dashboard | 稳定外壳 + 可滚动工作区 |
7
+ | Page-level structure | Mobile-first breakpoints |
8
+ | Reused components that will be put into unknown parent containers | Container query |
9
+ | Card grid | `repeat(auto-fit, minmax())` and set a reasonable minimum width |
10
+ | Data tables | Column priority, horizontal scrolling, or mobile summary rows |
11
+ | Editor / canvas / dashboard | Stable shell + scrollable workspace |
12
12
 
13
- ## CSS 模式
13
+ ## CSS Patterns
14
14
 
15
15
  ```css
16
16
  .card-grid {
@@ -32,39 +32,39 @@
32
32
  }
33
33
  ```
34
34
 
35
- 当 grid/flex 子项包含长文本、表格、代码、图表或媒体时,给子项设置 `min-width: 0`。
35
+ When grid/flex items contain long text, tables, code, charts, or media, set `min-width: 0` to the items.
36
36
 
37
- ## 数据密集型界面
37
+ ## Data-intensive interface
38
38
 
39
- - 编码前先确定移动端列优先级。
40
- - 主标识、状态和主要操作保持可见。
41
- - 低优先级元数据移入详情行、抽屉或可展开面板。
42
- - 小屏仍要保留排序、筛选、分页和选择能力。
43
- - 虚拟滚动只解决 DOM 数量问题,不能解决信息层级问题。
44
- - 表格可以局部横向滚动,但页面整体不应出现无意水平溢出。
39
+ - Prioritize mobile columns before coding.
40
+ - The main logo, status and main actions remain visible.
41
+ - Low priority metadata moved to details row, drawer or expandable panel.
42
+ - Small screens must still retain the ability to sort, filter, paging, and select.
43
+ - Virtual scrolling only solves the problem of DOM quantity, but cannot solve the problem of information hierarchy.
44
+ - The table can be partially scrolled horizontally, but the page as a whole should not have unintentional horizontal overflow.
45
45
 
46
- ## 响应式媒体
46
+ ## Responsive media
47
47
 
48
- - 图片和视频要有稳定尺寸、`aspect-ratio` 或容器约束,避免加载后推挤布局。
49
- - 需要多尺寸资源时使用 `srcset`、`sizes` 或 `<picture>`,不要让移动端下载桌面大图。
50
- - 非首屏图片默认懒加载;首屏主体图按框架能力设置明确优先级。
51
- - 媒体裁切必须保留主体信息;不要为了填满卡片裁掉产品、人物、图表关键区域。
48
+ - Images and videos must have stable size, `aspect-ratio` or container constraints to avoid pushing the layout after loading.
49
+ - Use `srcset`, `sizes` or `<picture>` when you need multi-size resources, and do not let the mobile client download desktop large images.
50
+ - Non-first-screen images are lazy-loaded by default; first-screen main images are prioritized clearly based on frame capabilities.
51
+ - Media cropping must retain the main information; do not crop key areas of products, people, or charts just to fill the card.
52
52
 
53
- ## 触控与视口检查
53
+ ## Touch and viewport inspection
54
54
 
55
- - 空间允许时,交互目标至少 44x44px。
56
- - 移动端输入框字号避免低于 16px。
57
- - 固定底部栏和操作条必须考虑 `env(safe-area-inset-bottom)`。
58
- - 对话框和抽屉需要适配虚拟键盘导致的视口变化。
59
- - 只在 hover 时出现的内容必须提供点击、焦点或常驻可见替代方案。
60
- - iOS/Android 横竖屏切换后,主操作、焦点位置和滚动容器仍应可达。
61
- - 需要局部滚动的区域应明确最大高度和滚动边界,避免页面和内部容器互相抢滚动。
55
+ - Interactive targets should be at least 44x44px, space permitting.
56
+ - Avoid lowering the font size of the mobile input box below 16px.
57
+ - Fixed bottom bars and action bars must consider `env(safe-area-inset-bottom)`.
58
+ - Dialog boxes and drawers need to adapt to viewport changes caused by the virtual keyboard.
59
+ - Content that only appears on hover must provide click, focus, or permanently visible alternatives.
60
+ - After switching between horizontal and vertical screens on iOS/Android, the main operation, focus position and scroll container should still be accessible.
61
+ - Areas that require partial scrolling should have a clear maximum height and scrolling boundary to prevent the page and internal containers from competing for scrolling.
62
62
 
63
- ## 验证清单
63
+ ## Verification list
64
64
 
65
- - 320-375px:页面级没有横向溢出。
66
- - 768px:布局切换后阅读顺序仍然合理。
67
- - 1024-1440px:内容宽度有约束,扫描路径清晰。
68
- - 长标签、翻译文本、数字以及 empty/error/loading 状态不会撑坏固定格式控件。
69
- - 横竖屏切换不会困住焦点或隐藏主操作。
70
- - 虚拟键盘弹出时,输入框、提交按钮和错误提示不被遮挡。
65
+ - 320-375px: No horizontal overflow at the page level.
66
+ - 768px: The reading order is still reasonable after the layout is switched.
67
+ - 1024-1440px: The content width is constrained and the scanning path is clear.
68
+ - Long labels, translated text, numbers, and empty/error/loading states will not break fixed format controls.
69
+ - Switching between horizontal and vertical screens will not trap focus or hide the main operation.
70
+ - When the virtual keyboard pops up, the input box, submit button and error prompt are not blocked.
@@ -1,24 +1,24 @@
1
1
  ---
2
2
  name: fec-route-protection
3
- description: Use when implementing or reviewing frontend route protection, auth guards, RBAC, permission routes, login state handling, redirects, middleware, React Router, Next.js, Vue Router, or Nuxt route middleware; Chinese triggers include 路由保护, 权限路由, 登录态.
3
+ description: Use when implementing or reviewing frontend route protection, auth guards, RBAC, permission routes, login state handling, redirects, middleware, React Router, Next.js, Vue Router, or Nuxt route middleware; Chinese triggers include route protection, permission routing, login state.
4
4
  ---
5
5
 
6
- # 路由保护
6
+ #Route protection
7
7
 
8
8
  ## Purpose
9
9
 
10
- 为前端应用建立清晰的认证、授权和重定向边界,避免越权访问与闪烁渲染。
10
+ Establish clear authentication, authorization and redirection boundaries for front-end applications to avoid unauthorized access and flickering rendering.
11
11
 
12
12
  ## When to Use
13
13
 
14
- - 页面需要登录后访问,或不同角色看到不同路由。
15
- - 需要实现 React Router、Next.js、Nuxt 或 Vue Router 的路由守卫。
16
- - 登录过期、权限不足、组织/租户切换需要统一处理。
17
- - 不用于替代服务端授权;前端路由保护只能改善体验,不能作为唯一安全边界。
14
+ - The page needs to be logged in to access, or different roles can see different routes.
15
+ - Requires implementing route guards for React Router, Next.js, Nuxt or Vue Router.
16
+ - Login expiration, insufficient permissions, and organization/tenant switching need to be handled uniformly.
17
+ - Not used to replace server-side authorization; front-end routing protection can only improve the experience and cannot be used as the only security boundary.
18
18
 
19
19
  ## Procedure
20
20
 
21
- ### 1. 定义认证与授权状态
21
+ ### 1. Define authentication and authorization status
22
22
 
23
23
  ```ts
24
24
  export type AuthStatus = "loading" | "anonymous" | "authenticated";
@@ -34,7 +34,7 @@ export function canAccess(user: CurrentUser, required: string[]) {
34
34
  }
35
35
  ```
36
36
 
37
- ### 2. React Router 使用布局守卫
37
+ ### 2. React Router uses layout guards
38
38
 
39
39
  ```tsx
40
40
  import { Navigate, Outlet, useLocation } from "react-router-dom";
@@ -68,7 +68,7 @@ const router = createBrowserRouter([
68
68
  ]);
69
69
  ```
70
70
 
71
- ### 3. Next.js 优先在服务端边界处理
71
+ ### 3. Next.js prioritizes processing at the server boundary
72
72
 
73
73
  ```ts
74
74
  // middleware.ts
@@ -92,9 +92,9 @@ export const config = {
92
92
  };
93
93
  ```
94
94
 
95
- 对需要精细权限的 App Router 页面,在 server component 或 server action 中重新校验权限,不依赖客户端状态。
95
+ For App Router pages that require fine-grained permissions, re-verify permissions in the server component or server action, regardless of client status.
96
96
 
97
- ### 4. Vue Router / Nuxt 使用导航守卫
97
+ ### 4. Vue Router / Nuxt uses navigation guards
98
98
 
99
99
  ```ts
100
100
  router.beforeEach(async (to) => {
@@ -112,24 +112,24 @@ router.beforeEach(async (to) => {
112
112
  });
113
113
  ```
114
114
 
115
- ### 5. 统一失败与跳转体验
115
+ ### 5. Unify failure and jump experience
116
116
 
117
- - `401`:清理过期会话,跳转登录页并保留 `redirect`。
118
- - `403`:进入无权限页,不反复重试。
119
- - `loading`:渲染稳定骨架屏,避免先显示私有内容再跳转。
120
- - 登录成功:只跳转到同源且允许的路径,防止 open redirect。
121
- - RBAC:权限矩阵来自可信会话或后端返回;前端只用于路由体验和 UI 裁剪,不能替代接口授权。
122
- - 会话刷新:401 刷新失败后统一清理状态;避免多个并发请求各自触发跳转或刷新风暴。
117
+ - `401`: Clean up expired sessions, jump to the login page and keep `redirect`.
118
+ - `403`: Enter the unauthorized page, do not try again.
119
+ - `loading`: Render a stable skeleton screen to avoid displaying private content first and then jumping.
120
+ - Successful login: only jump to the same origin and allowed path to prevent open redirect.
121
+ - RBAC: The permission matrix is returned from the trusted session or backend; the frontend is only used for routing experience and UI tailoring, and cannot replace interface authorization.
122
+ - Session refresh: Uniformly clean up status after 401 refresh failure; avoid multiple concurrent requests from triggering jumps or refresh storms.
123
123
 
124
124
  ## Constraints
125
125
 
126
- - 前端路由保护不是安全边界;API、SSR loader、server action 必须重复做授权校验。
127
- - 不要在组件渲染后用 `useEffect` 才跳转私有页面,否则会出现敏感内容闪烁。
128
- - redirect 参数必须限制为站内路径,不能直接信任 URL 输入。
129
- - 权限信息应来自可信会话或后端响应,不要只依赖 localStorage 中的角色字段。
130
- - 多租户应用必须把 tenant/org 上下文纳入权限判断。
131
- - 不把菜单隐藏视为授权完成;用户直接访问 URL、刷新页面、篡改 localStorage 和替换 tenant 都必须验证。
126
+ - Front-end routing protection is not a security boundary; API, SSR loader, and server actions must undergo repeated authorization verification.
127
+ - Do not use `useEffect` to jump to the private page after the component is rendered, otherwise sensitive content will flicker.
128
+ - The redirect parameter must be restricted to within-site paths and URL input cannot be trusted directly.
129
+ - Permission information should come from a trusted session or backend response, don't rely solely on role fields in localStorage.
130
+ - Multi-tenant applications must incorporate the tenant/org context into permission determinations.
131
+ - Menu hiding is not considered authorization completion; users must authenticate when accessing the URL directly, refreshing the page, tampering with localStorage, and replacing tenants.
132
132
 
133
133
  ## Expected Output
134
134
 
135
- 产出一套路由守卫实现,覆盖 loading、未登录、权限不足、登录后回跳和会话过期。验证时直接访问私有 URL、刷新页面、切换角色、篡改 redirect 参数,确认行为稳定且 API 仍有服务端授权。
135
+ Produce a set of routing guard implementations, covering loading, not logged in, insufficient permissions, bounce after login and session expiration. During verification, directly access the private URL, refresh the page, switch roles, and tamper with redirect parameters to confirm that the behavior is stable and the API still has server authorization.
@@ -1,38 +1,54 @@
1
1
  ---
2
2
  name: fec-security-review
3
- description: Use when reviewing frontend security risks such as XSS, CSRF, sensitive data exposure, unsafe DOM APIs, untrusted user input, authentication/token handling, payment flows, file upload, CSP, dependency risk, or third-party scripts; Chinese triggers include 安全审查, 安全检查.
3
+ description: Use when reviewing frontend security risks such as XSS, CSRF, sensitive data exposure, unsafe DOM APIs, untrusted user input, authentication/token handling, payment flows, file upload, CSP, dependency risk, or third-party scripts; Chinese triggers include security review, security check.
4
4
  ---
5
5
 
6
- # 前端安全审查
6
+ # Front-end security review
7
+
8
+ ## Review modes and coverage
9
+
10
+ User-specified scope takes precedence over the default. Use the following three review modes:
11
+
12
+ - **Change review**: only when recent changes, current edits, staged changes, a PR or a commit are explicitly requested or clearly established by the active task, review those changes and necessary context. For local changes, inspect staged and unstaged diffs and relevant untracked project files within the requested scope; a staged-only request reviews only staged changes. If there are no changes, report that there is nothing to review; do not switch to recent commits or expand scope automatically.
13
+ - **Targeted review**: when files or directories are specified, inventory and review existing code in that scope, including unchanged code; no Git diff is required.
14
+ - **Project review (default)**: when no scope or change context is specified, or when the entire project is requested, inventory project-owned frontend code, related tests, configuration and dependency declarations, then review in module batches, including unchanged code; no Git diff is required.
15
+
16
+ Select scope before collecting diffs. A file/directory alone means full review of that scope; a path combined with an explicit change request restricts incremental review to that path. An unqualified invocation defaults to project review even if Git changes exist. At review start, state the selected mode and target scope. When automatically delegating review after edits, pass the current change scope explicitly; do not trigger project review merely because the reviewer was called.
17
+
18
+ Exclude dependency directories, build outputs, caches, generated files and third-party code by default, and record exclusions. Keep the frontend responsibility boundary; this is not a backend audit. A nonexistent target or a scope with no relevant files must be reported explicitly, not replaced with another scope.
19
+
20
+ Merge findings with the same root cause across batches. Report **review mode, target scope, reviewed files/modules, exclusions, unreviewed files/modules, completion status and verification commands/results**. If context or execution limits prevent completion, mark the review partial and list remaining modules; never claim complete project coverage. Reading callers for context or running project-wide lint/typecheck does not count as manual review of those files.
21
+
22
+ Change reviews retain merge recommendations. Targeted and project reviews use a risk assessment (Low / Medium / High, with blocking findings), not a claim of merge readiness. Preserve severity levels, evidence requirements and report filenames. Output reports only unless repairs are explicitly requested.
7
23
 
8
24
  ## Purpose
9
25
 
10
- 识别前端代码中的客户端安全风险,并给出可执行修复建议。
26
+ Identify client-side security risks in front-end code and recommend actionable fixes.
11
27
 
12
28
  ## Procedure
13
29
 
14
- 1. 先确认审查面:用户输入、动态 HTML、URL 跳转、认证态、RBAC、文件上传、支付/删除等敏感操作、第三方脚本和依赖。
15
- 2. 搜索高危模式:`dangerouslySetInnerHTML`、`v-html`、`innerHTML`、`document.write`、动态 script、未校验 redirect、明文 token。
16
- 3. 按风险类型审查:XSS、CSP、敏感数据、CSRF、依赖、输入校验、文件上传、开放重定向、认证授权和第三方脚本。
17
- 4. 用边界模型判断责任:客户端只能改善体验和减少误用,鉴权、授权、上传信任和敏感操作必须由服务端最终裁决。
18
- 5. 高危问题标记为阻塞合并;前端校验只能改善体验,不能作为唯一安全边界。
19
- 6. 输出分级安全报告;报告格式见 [references/report-template.md](references/report-template.md)。
30
+ 1. First confirm the review areas: user input, dynamic HTML, URL jump, authentication status, RBAC, file upload, payment/deletion and other sensitive operations, third-party scripts and dependencies.
31
+ 2. Search for high-risk patterns: `dangerouslySetInnerHTML`, `v-html`, `innerHTML`, `document.write`, dynamic script, unverified redirect, and plain text token.
32
+ 3. Review by risk type: XSS, CSP, sensitive data, CSRF, dependencies, input validation, file upload, open redirection, authentication authorization and third-party scripts.
33
+ 4. Use the boundary model to determine responsibility: The client can only improve the experience and reduce misuse. Authentication, authorization, upload trust and sensitive operations must be finalized by the server.
34
+ 5. High-risk issues are marked as blocking merges; front-end verification can only improve the experience and cannot be used as the only security boundary.
35
+ 6. Output a hierarchical security report; see [references/report-template.md](references/report-template.md) for the report format.
20
36
 
21
- ## 详细参考
37
+ ## Detailed reference
22
38
 
23
- - 需要 XSS、CSP、敏感数据、CSRF、依赖和输入校验细节时,加载 [references/security-checklist.md](references/security-checklist.md)。
24
- - 撰写安全审查报告时,加载 [references/report-template.md](references/report-template.md)。
39
+ - Load [references/security-checklist.md](references/security-checklist.md) when XSS, CSP, sensitive data, CSRF, dependencies and input validation details are required.
40
+ - When writing a security review report, load [references/report-template.md](references/report-template.md).
25
41
 
26
42
  ## Constraints
27
43
 
28
- - 不要为了方便开发而绕过安全机制。
29
- - 不要依赖前端校验作为唯一安全防线。
30
- - 不要信任任何来自客户端的数据。
31
- - 发现高危问题时必须标记为阻塞合并。
32
- - 与通用代码质量 review 分工:本 skill 关注威胁、攻击面和数据泄露。
33
- - 不把依赖审计结果机械等同为可利用漏洞;需要结合运行路径、暴露面和修复成本判断。
34
- - 不把隐藏按钮、前端路由守卫或本地角色字段当作授权边界;API、SSR loader、server action 和敏感操作必须有服务端裁决。
44
+ - Don't bypass security mechanisms to facilitate development.
45
+ - Don't rely on front-end validation as your only line of security.
46
+ - Do not trust any data coming from the client.
47
+ - High-risk issues must be marked as blocking merges when found.
48
+ - Separated from general code quality review: This skill focuses on threats, attack surfaces, and data breaches.
49
+ - Do not mechanically equate dependence on audit results with exploitable vulnerabilities; judgments need to be made based on the running path, exposure surface and repair cost.
50
+ - Do not treat hidden buttons, front-end route guards, or local role fields as authorization boundaries; APIs, SSR loaders, server actions, and sensitive operations must have server-side arbitration.
35
51
 
36
52
  ## Expected Output
37
53
 
38
- 输出 CRITICAL/HIGH/MEDIUM/LOW 分级安全审查报告,每个问题关联具体文件和行号,给出修复建议;报告保存为 `reports/security-review-YYYY-MM-DD-HHmmss.md`。
54
+ Output a CRITICAL/HIGH/MEDIUM/LOW graded security review report. Each issue is associated with a specific file and line number, and repair suggestions are given; the report is saved as `reports/security-review-YYYY-MM-DD-HHmmss.md`.
@@ -1,27 +1,37 @@
1
- # 安全审查报告模板
1
+ # Security review report template
2
2
 
3
3
  ```markdown
4
- # 安全审查报告
4
+ # Security Review Report
5
5
 
6
- > 生成时间: YYYY-MM-DD HH:mm
7
- > 评审工具: frontend-craft
6
+ > Generation time: YYYY-MM-DD HH:mm
7
+ > Review tool: frontend-craft
8
8
 
9
- ## CRITICAL / 高危 (N项)
10
- - **[文件:行号]** 风险描述 -> 修复建议
9
+ > Review mode: change / targeted / project
10
+ > Target scope: paths or PR/commit
11
+ > Reviewed: file or module inventory
12
+ > Exclusions: paths and reasons
13
+ > Unreviewed: remaining files or modules (state none if complete)
14
+ > Completion: complete / partial
15
+ > Verification: commands, results and reasons for skipped checks
11
16
 
12
- ## HIGH / 中高危 (N项)
17
+ ## CRITICAL / HIGH RISK (N items)
18
+ - **[File:line number]** Risk description -> Repair suggestions
19
+
20
+ ## HIGH / Medium to high risk (N items)
13
21
  - ...
14
22
 
15
- ## MEDIUM / 中危 (N项)
23
+ ## MEDIUM / medium risk (N items)
16
24
  - ...
17
25
 
18
- ## LOW / 低危或建议 (N项)
26
+ ## LOW / low risk or recommended (N items)
19
27
  - ...
20
28
 
21
- ## 已通过的安全检查
29
+ ## Passed security check
22
30
  - ...
23
31
 
24
- **整体安全等级**: 安全 / 存在风险 / 高危需修复
32
+ **Overall security level**: safe / risky / high risk and needs to be repaired
25
33
  ```
26
34
 
27
- 审查完成后,将报告保存到 `reports/security-review-YYYY-MM-DD-HHmmss.md`,并告知用户报告路径。
35
+ After the review is completed, save the report to `reports/security-review-YYYY-MM-DD-HHmmss.md` and inform the user of the report path.
36
+
37
+ Retain merge recommendations for change review; use risk assessments for targeted and project reviews. For partial reviews, conclusions apply only to reviewed scope and do not establish project-wide approval.
@@ -1,12 +1,12 @@
1
- # 前端安全审查清单
1
+ # Front-end security review checklist
2
2
 
3
3
  ## XSS
4
4
 
5
- - `dangerouslySetInnerHTML` 和 `v-html` 必须有明确理由和输入净化。
6
- - 用户输入不得直接插入 DOM、`innerHTML`、`document.write`。
7
- - URL 参数不得直接用于页面渲染。
8
- - 动态生成的 `<script>` 标签必须审查来源。
9
- - 富文本使用 DOMPurify 等库,并配置标签、属性、协议白名单。
5
+ - `dangerouslySetInnerHTML` and `v-html` must have explicit reason and input sanitization.
6
+ - User input must not be inserted directly into the DOM, `innerHTML`, `document.write`.
7
+ - URL parameters must not be used directly in page rendering.
8
+ - Dynamically generated `<script>` tags must be sourced.
9
+ - Rich text uses libraries such as DOMPurify and configures tags, attributes, and protocol whitelists.
10
10
 
11
11
  ```ts
12
12
  import DOMPurify from "dompurify";
@@ -18,7 +18,7 @@ const clean = DOMPurify.sanitize(dirtyHtml, {
18
18
  });
19
19
  ```
20
20
 
21
- ## 安全重定向
21
+ ## Safe redirection
22
22
 
23
23
  ```ts
24
24
  function safeRedirect(url: string): string {
@@ -29,36 +29,36 @@ function safeRedirect(url: string): string {
29
29
 
30
30
  ## CSP
31
31
 
32
- - 推荐先用 `Content-Security-Policy-Report-Only` 验证。
33
- - `default-src 'self'`、`object-src 'none'`、`frame-ancestors 'none'`、`base-uri 'self'` 是常见底线。
34
- - 避免 `'unsafe-eval'`;内联脚本优先 nonce。
32
+ - It is recommended to verify with `Content-Security-Policy-Report-Only` first.
33
+ - `default-src 'self'`, `object-src 'none'`, `frame-ancestors 'none'`, `base-uri 'self'` are common bottom lines.
34
+ - Avoid `'unsafe-eval''; inline scripts take precedence over nonce.
35
35
 
36
36
  ```http
37
37
  Content-Security-Policy: default-src 'self'; script-src 'self'; object-src 'none'; frame-ancestors 'none'; base-uri 'self'; form-action 'self';
38
38
  ```
39
39
 
40
- ## 敏感数据
40
+ ## Sensitive data
41
41
 
42
- - 禁止前端硬编码 API Key、Secret、密码。
43
- - 禁止 localStorage/sessionStorage/IndexedDB 存明文 token、密码、信用卡信息。
44
- - 禁止 URL query 参数传 token 或密码。
45
- - 禁止 console.log 或错误上报携带隐私数据。
46
- - Token 优先 httpOnly + Secure + SameSite cookie。
42
+ - It is prohibited to hard-code API Key, Secret, and password on the front end.
43
+ - LocalStorage/sessionStorage/IndexedDB is prohibited from storing plain text tokens, passwords, and credit card information.
44
+ - Prohibit URL query parameters from passing token or password.
45
+ - Console.log or error reports are prohibited from carrying private data.
46
+ - Token priority httpOnly + Secure + SameSite cookie.
47
47
 
48
48
  ## CSRF
49
49
 
50
- - 变更操作必须携带 CSRF token 或使用同等后端防护。
51
- - 关键操作不要使用 GET。
52
- - 检查后端是否校验 `Origin` / `Referer`。
50
+ - Change operations must carry CSRF tokens or use equivalent backend protection.
51
+ - Do not use GET for critical operations.
52
+ - Check whether the backend verifies `Origin` / `Referer`.
53
53
 
54
- ## 依赖与第三方脚本
54
+ ## Dependencies and third-party scripts
55
55
 
56
- - 定期审查依赖安全公告。
57
- - 禁止从非官方 CDN 加载脚本,除非有 SRI 和来源审查。
58
- - 动态加载第三方脚本必须有业务必要性和降级策略。
56
+ - Regularly review dependency security bulletins.
57
+ - Disallow script loading from unofficial CDNs unless SRI and source vetted.
58
+ - Dynamically loading third-party scripts must have business necessity and a downgrade strategy.
59
59
 
60
- ## 输入校验与文件上传
60
+ ## Input verification and file upload
61
61
 
62
- - 前端校验不是安全边界,后端必须二次校验。
63
- - 文件上传校验 MIME、大小、扩展名和内容;不能只看扩展名。
64
- - 正则校验注意 ReDoS 风险。
62
+ - Front-end verification is not a security boundary, and the back-end must be verified twice.
63
+ - File uploads verify MIME, size, extension and content; don't just look at the extension.
64
+ - Pay attention to ReDoS risks in regular verification.
@@ -1,87 +1,87 @@
1
1
  ---
2
2
  name: fec-source-driven-development
3
- description: Use when frontend decisions depend on framework, library, browser, runtime, package, API, or platform behavior that may have changed, including official documentation checks, version-sensitive patterns, migration choices, or public interface assumptions; Chinese triggers include 查官方文档, 以源码为准, source-driven, 版本差异.
3
+ description: Use when frontend decisions depend on framework, library, browser, runtime, package, API, or platform behavior that may have changed, including official documentation checks, version-sensitive patterns, migration choices, or public interface assumptions; Chinese triggers include Check official documentation, source code shall prevail, source-driven, version differences.
4
4
  ---
5
5
 
6
- # 来源驱动开发
6
+ # Source driven development
7
7
 
8
8
  ## Purpose
9
9
 
10
- 在前端实现、评审和架构决策中优先依据项目内事实、官方文档和当前版本行为,避免沿用过时经验或未经验证的假设。
10
+ Prioritize the use of in-project facts, official documentation, and current version behavior in front-end implementation, review, and architecture decisions, and avoid relying on outdated experience or unverified assumptions.
11
11
 
12
12
  ## Procedure
13
13
 
14
- 1. 判断是否需要查源
15
- - 涉及框架新版本、路由、渲染模式、缓存、构建工具、浏览器 API、包发布格式、鉴权协议或公共接口时必须查源。
16
- - 涉及项目约定时先读本仓库 README、配置、模板、已有实现、测试和迁移记录。
17
- - 只是稳定语言语法或明显局部重构时,可使用项目现有模式作为事实来源。
18
-
19
- 2. 收集权威材料
20
- - 首选官方文档、规范、源码、release notes、migration guide、类型定义和项目内测试。
21
- - 第三方文章只能作为线索,不能作为最终依据。
22
- - 对快速变化的库记录包名、版本、文档日期或页面标题。
23
- - 当用户要求从本地知识库、项目资料库或 `knowledge/` 目录回答问题时,先走本地知识检索,不使用网络搜索补事实。
24
-
25
- 3. 提炼决策
26
- - 写清当前版本推荐做法、弃用做法、限制条件和迁移注意事项。
27
- - 对多个可行方案说明选择理由、兼容性、维护成本和回退方式。
28
- - 若文档和项目现状冲突,优先解释冲突并给出渐进调整,不直接推翻已运行系统。
29
- - 对依赖升级、框架迁移和公共 API 变化,记录 release notes、migration guide、版本范围、破坏性变更和回滚方案。
30
-
31
- 4. 落到实现
32
- - 将外部行为隔离在适配层、配置层或小型工具函数中,避免在组件里散落版本假设。
33
- - 公共接口变化要保持命名、错误形状、默认值和兼容策略清晰。
34
- - 代码注释只记录非显而易见的来源约束,不粘贴大段文档。
35
-
36
- 5. 验证假设
37
- - 用类型检查、最小复现、单元测试、组件测试、E2E、构建或浏览器验证证明关键假设。
38
- - 如果无法验证,报告不确定性、风险范围和需要用户或团队确认的信息。
39
- 6. 留下轻量决策记录
40
- - 当结论会影响公共接口、依赖版本、目录规范或团队工作流时,补充 ADR/变更记录或交给文档同步流程。
14
+ 1. Determine whether it is necessary to check the source
15
+ - Source checking is required when new versions of frameworks, routing, rendering modes, caches, build tools, browser APIs, package publishing formats, authentication protocols, or public interfaces are involved.
16
+ - When it comes to project commitments, read the README, configuration, templates, existing implementations, testing and migration records of this warehouse first.
17
+ - Use the project's existing schema as a source of truth when simply stabilizing the language syntax or significantly partial refactoring.
18
+
19
+ 2. Collect authoritative materials
20
+ - Preferred official documentation, specifications, source code, release notes, migration guide, type definitions and in-project testing.
21
+ - Third-party articles can only be used as clues and cannot be used as the final basis.
22
+ - Record package name, version, document date or page title for rapidly changing libraries.
23
+ - When a user asks to answer a question from a local knowledge base, project repository or `knowledge/` directory, perform local knowledge retrieval first and do not use network search to fill in the facts.
24
+
25
+ 3. Refine decisions
26
+ - Write down recommended practices, deprecated practices, limitations and migration considerations for the current version.
27
+ - Explain the reasons for selection, compatibility, maintenance costs and fallback methods for multiple feasible options.
28
+ - If there is a conflict between the document and the current status of the project, priority will be given to explaining the conflict and making incremental adjustments instead of directly overturning the running system.
29
+ - Record release notes, migration guide, version scope, breaking changes and rollback plans for dependency upgrades, framework migrations and public API changes.
30
+
31
+ 4. Fall to implementation
32
+ - Isolate external behavior in the adaptation layer, configuration layer or small utility functions to avoid spreading version assumptions throughout the component.
33
+ - Public interface changes should keep naming, error shapes, default values, and compatibility policies clear.
34
+ - Code comments only record non-obvious source constraints and do not paste large sections of documentation.
35
+
36
+ 5. Test your hypothesis
37
+ - Prove key assumptions with type checking, minimal reproduction, unit testing, component testing, E2E, build or browser validation.
38
+ - If verification is not possible, report uncertainty, risk range, and information that requires confirmation by the user or team.
39
+ 6. Leave a lightweight record of decisions
40
+ - Supplement ADR/change records or hand off to the document sync process when conclusions impact public interfaces, dependency versions, catalog specifications or team workflows.
41
41
 
42
42
  ## Local Knowledge Retrieval
43
43
 
44
- 当用户指定本地知识库路径,或默认 `knowledge/` 目录存在时,可用本流程回答资料库问题、抽取证据或辅助决策。
44
+ When the user specifies the local knowledge base path, or the default `knowledge/` directory exists, this process can be used to answer database questions, extract evidence, or assist decision-making.
45
45
 
46
- 1. 定位根目录
47
- - 用户明确指定路径时使用该路径。
48
- - 否则检查当前项目下 `knowledge/` 是否存在;不存在时说明未找到默认知识库并请求路径。
49
- - 不用文件 glob 判断目录是否存在。
46
+ 1. Locate the root directory
47
+ - Use this path when the user explicitly specifies the path.
48
+ - Otherwise, check whether `knowledge/` under the current project exists; if it does not exist, it means that the default knowledge base is not found and the path is requested.
49
+ - No need to use file glob to determine whether the directory exists.
50
50
 
51
- 2. 分层导航
52
- - 优先读取根目录和子目录中的 `data_structure.md`。
53
- - 根据目录说明选择最相关的少量分支,不一次性遍历整个知识库。
54
- - 记录候选文件、主题、时间/版本范围和为什么相关。
51
+ 2. Hierarchical navigation
52
+ - Read `data_structure.md` in the root directory and subdirectories first.
53
+ - Select the most relevant few branches according to the directory description, without traversing the entire knowledge base at once.
54
+ - Document candidate files, topics, time/version range and why they are relevant.
55
55
 
56
- 3. 渐进检索
57
- - Markdown、文本、日志:先用关键词搜索,再局部读取命中上下文。
58
- - PDF:处理前先确认可用工具和提取路线,优先提取到临时文本后再检索,避免把整份 PDF 打进上下文。
59
- - Excel:处理前先确认读取/分析路线,先看工作表、列名和少量样例,再按字段过滤或聚合。
60
- - 默认最多 5 轮关键词迭代;每轮根据已找到证据调整同义词、缩写和范围。
56
+ 3. Progressive search
57
+ - Markdown, text, log: first search with keywords, and then partially read the hit context.
58
+ - PDF: Confirm the available tools and extraction routes before processing, and prioritize extraction of temporary text before retrieval to avoid putting the entire PDF into context.
59
+ - Excel: Confirm the read/analysis route before processing, first look at the worksheet, column names and a few samples, and then filter or aggregate by field.
60
+ - Default to up to 5 rounds of keyword iteration; each round adjusts synonyms, abbreviations, and scope based on found evidence.
61
61
 
62
- 4. 回答与溯源
63
- - 先给结论,再列文件路径、章节、页码、工作表或行号附近作为依据。
64
- - 证据不足时说明查过哪些路径、缺什么信息,以及用户如何缩小范围。
65
- - 不把知识库外的网络信息混入答案,除非用户另行要求查外部来源。
62
+ 4. Answer and traceability
63
+ - Give the conclusion first, and then list the file path, chapter, page number, worksheet or line number as a basis.
64
+ - If there is insufficient evidence, explain which paths have been checked, what information is missing, and how the user can narrow down the scope.
65
+ - Do not mix online information from outside the knowledge base into answers unless the user requests otherwise to check external sources.
66
66
 
67
67
  ## Source Priority
68
68
 
69
69
  | Priority | Source | Use |
70
70
  | -------- | ------ | --- |
71
- | 1 | 项目内配置、测试、已有实现 | 判断本仓库真实约定 |
72
- | 2 | 官方文档、源码、类型定义 | 判断当前推荐行为 |
73
- | 3 | 标准规范、浏览器兼容数据 | 判断平台能力和兼容边界 |
74
- | 4 | Issue、讨论、第三方文章 | 辅助排查,不能单独定案 |
71
+ | 1 | Configuration, testing, and implementation within the project | Determine the true agreement of this warehouse |
72
+ | 2 | Official documents, source code, type definitions | Determine current recommended behavior |
73
+ | 3 | Standard specifications, browser compatibility data | Determine platform capabilities and compatibility boundaries |
74
+ | 4 | Issues, discussions, third-party articles | Auxiliary investigation, cannot be finalized alone |
75
75
 
76
76
  ## Constraints
77
77
 
78
- - 不凭记忆给版本敏感结论。
79
- - 不把过时教程当作当前最佳实践。
80
- - 不引用无法复核的来源作为关键依据。
81
- - 不为追新而改动稳定项目约定;必须说明收益和迁移成本。
82
- - 不在交付中复制长篇外部文档;只保留必要结论和链接或文件路径。
83
- - 不把“查过文档”停留在口头;版本敏感决策需要能追溯到具体版本、路径或官方页面。
78
+ - Don't give version-sensitive conclusions from memory.
79
+ - Do not treat outdated tutorials as current best practices.
80
+ - Do not cite sources that cannot be reviewed as critical evidence.
81
+ - Do not change the stable project agreement to pursue new developments; the benefits and migration costs must be explained.
82
+ - Do not copy long external documents in the delivery; keep only necessary conclusions and links or file paths.
83
+ - Don't just say "checked the documentation"; version-sensitive decisions need to be traceable to a specific version, path or official page.
84
84
 
85
85
  ## Expected Output
86
86
 
87
- 输出来源清单、版本或项目事实、决策结论、实现影响、验证命令和未决风险。若修改代码,关键行为应有测试或构建验证支撑。
87
+ Output source lists, version or project facts, decision conclusions, implementation impacts, validation orders, and open risks. If code is modified, key behaviors should be supported by tests or build verification.