@bovinphang/frontend-craft 2.8.0 → 3.0.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 (681) hide show
  1. package/.claude-plugin/marketplace.json +3 -3
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +64 -0
  4. package/CHANGELOG.zh-CN.md +64 -0
  5. package/CONTRIBUTING.md +74 -54
  6. package/CONTRIBUTING.zh-CN.md +75 -53
  7. package/README.md +150 -38
  8. package/README.openclaw.md +86 -11
  9. package/README.openclaw.zh-CN.md +86 -11
  10. package/README.zh-CN.md +147 -35
  11. package/agents/fec-code-reviewer.md +24 -3
  12. package/agents/fec-debugger.md +1 -1
  13. package/agents/fec-doc-updater.md +1 -1
  14. package/agents/fec-e2e-runner.md +1 -1
  15. package/agents/fec-figma-implementer.md +1 -1
  16. package/agents/fec-performance-optimizer.md +1 -1
  17. package/agents/fec-refactor-cleaner.md +4 -1
  18. package/agents/fec-refactoring-expert.md +81 -0
  19. package/agents/fec-security-reviewer.md +17 -1
  20. package/agents/fec-test-planner.md +1 -1
  21. package/agents/fec-typescript-reviewer.md +25 -9
  22. package/agents/fec-ui-checker.md +11 -11
  23. package/commands/fec-debug.md +1 -1
  24. package/commands/fec-refactor-plan.md +17 -0
  25. package/commands/fec-refactor.md +18 -0
  26. package/commands/fec-review.md +40 -10
  27. package/commands/fec-scaffold.md +1 -1
  28. package/commands/fec-smell.md +17 -0
  29. package/commands/fec-tdd.md +6 -2
  30. package/common-content.lock.json +3795 -0
  31. package/dist/bin/frontend-craft.js +386 -55
  32. package/dist/hooks/fec-run-tests.js +5 -1
  33. package/dist/hooks/fec-session-start.js +1 -1
  34. package/docs/common-migration.md +61 -0
  35. package/docs/example-prompts.md +29 -12
  36. package/docs/ja-JP/README.md +129 -34
  37. package/docs/ko-KR/README.md +129 -34
  38. package/docs/project-structure.md +49 -14
  39. package/docs/refactoring/README.md +50 -0
  40. package/docs/refactoring/catalog.md +105 -0
  41. package/docs/refactoring/smell-refactoring-matrix.md +41 -0
  42. package/docs/review-and-diagram-workflows.md +39 -0
  43. package/docs/runtimes/antigravity.md +13 -5
  44. package/docs/runtimes/augment.md +13 -5
  45. package/docs/runtimes/claude.md +26 -10
  46. package/docs/runtimes/claude.zh-CN.md +26 -10
  47. package/docs/runtimes/cline.md +13 -5
  48. package/docs/runtimes/codebuddy.md +13 -5
  49. package/docs/runtimes/codex.md +13 -5
  50. package/docs/runtimes/compatibility.md +42 -0
  51. package/docs/runtimes/copilot.md +13 -5
  52. package/docs/runtimes/cursor.md +13 -5
  53. package/docs/runtimes/gemini.md +13 -5
  54. package/docs/runtimes/kilo.md +13 -5
  55. package/docs/runtimes/openclaw.md +13 -5
  56. package/docs/runtimes/opencode.md +13 -5
  57. package/docs/runtimes/qoder.md +11 -12
  58. package/docs/runtimes/trae.md +13 -5
  59. package/docs/runtimes/windsurf.md +13 -5
  60. package/docs/superpowers/plans/2026-09-26-content-integrity.md +145 -0
  61. package/docs/superpowers/plans/2026-09-26-diagram-quality.md +170 -0
  62. package/docs/superpowers/specs/2026-09-26-diagram-quality-design.md +77 -0
  63. package/docs/superpowers/specs/2026-09-26-project-optimization-design.md +95 -0
  64. package/docs/zh-CN/common-migration.md +57 -0
  65. package/docs/zh-CN/example-prompts.md +29 -12
  66. package/docs/zh-CN/project-structure.md +49 -11
  67. package/docs/zh-CN/review-and-diagram-workflows.md +39 -0
  68. package/docs/zh-TW/README.md +129 -34
  69. package/localized/zh-CN/agents/fec-code-reviewer.md +22 -3
  70. package/localized/zh-CN/agents/fec-refactor-cleaner.md +3 -0
  71. package/localized/zh-CN/agents/fec-refactoring-expert.md +53 -0
  72. package/localized/zh-CN/agents/fec-security-reviewer.md +16 -0
  73. package/localized/zh-CN/agents/fec-typescript-reviewer.md +24 -8
  74. package/localized/zh-CN/commands/fec-refactor-plan.md +15 -0
  75. package/localized/zh-CN/commands/fec-refactor.md +14 -0
  76. package/localized/zh-CN/commands/fec-review.md +40 -9
  77. package/localized/zh-CN/commands/fec-smell.md +13 -0
  78. package/localized/zh-CN/commands/fec-tdd.md +4 -0
  79. package/localized/zh-CN/skills/cc-c-project-standard/SKILL.md +25 -0
  80. package/localized/zh-CN/skills/cc-c-project-standard/examples/engineering/README.md +7 -0
  81. package/localized/zh-CN/skills/cc-c-project-standard/examples/engineering/boundary.c +26 -0
  82. package/localized/zh-CN/skills/cc-c-project-standard/examples/engineering/boundary.h +15 -0
  83. package/localized/zh-CN/skills/cc-c-project-standard/examples/engineering/boundary_test.c +73 -0
  84. package/localized/zh-CN/skills/cc-c-project-standard/references/common/engineering-practices.md +237 -0
  85. package/localized/zh-CN/skills/cc-c-project-standard/references/common/engineering-practices.rules.json +121 -0
  86. package/localized/zh-CN/skills/cc-c-project-standard/references/common/engineering-practices.sources.json +377 -0
  87. package/localized/zh-CN/skills/cc-c-project-standard/references/engineering-practices.md +106 -0
  88. package/localized/zh-CN/skills/cc-c-project-standard/references/practice.md +37 -0
  89. package/localized/zh-CN/skills/cc-cpp-project-standard/SKILL.md +25 -0
  90. package/localized/zh-CN/skills/cc-cpp-project-standard/examples/engineering/README.md +7 -0
  91. package/localized/zh-CN/skills/cc-cpp-project-standard/examples/engineering/boundary.cpp +26 -0
  92. package/localized/zh-CN/skills/cc-cpp-project-standard/examples/engineering/boundary.hpp +12 -0
  93. package/localized/zh-CN/skills/cc-cpp-project-standard/examples/engineering/boundary_test.cpp +38 -0
  94. package/localized/zh-CN/skills/cc-cpp-project-standard/references/common/engineering-practices.md +237 -0
  95. package/localized/zh-CN/skills/cc-cpp-project-standard/references/common/engineering-practices.rules.json +121 -0
  96. package/localized/zh-CN/skills/cc-cpp-project-standard/references/common/engineering-practices.sources.json +377 -0
  97. package/localized/zh-CN/skills/cc-cpp-project-standard/references/engineering-practices.md +106 -0
  98. package/localized/zh-CN/skills/cc-cpp-project-standard/references/practice.md +37 -0
  99. package/localized/zh-CN/skills/cc-debug-methodology/SKILL.md +8 -0
  100. package/localized/zh-CN/skills/cc-debug-methodology/references/method.md +13 -0
  101. package/localized/zh-CN/skills/cc-doc-sync-core/SKILL.md +8 -0
  102. package/localized/zh-CN/skills/cc-doc-sync-core/references/method.md +12 -0
  103. package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/SKILL.md +5 -5
  104. package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/references/flowchart-quality.md +1 -1
  105. package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/references/layout-and-export.md +9 -9
  106. package/localized/zh-CN/skills/cc-electron-project-standard/SKILL.md +21 -0
  107. package/localized/zh-CN/skills/cc-electron-project-standard/examples/engineering/README.md +7 -0
  108. package/localized/zh-CN/skills/cc-electron-project-standard/examples/engineering/ipc-lifecycle.cjs +44 -0
  109. package/localized/zh-CN/skills/cc-electron-project-standard/examples/engineering/ipc-lifecycle.test.cjs +44 -0
  110. package/localized/zh-CN/skills/cc-electron-project-standard/examples/engineering/package.json +8 -0
  111. package/localized/zh-CN/skills/cc-electron-project-standard/examples/minimal/README.md +9 -0
  112. package/localized/zh-CN/skills/cc-electron-project-standard/examples/minimal/boundary.cjs +19 -0
  113. package/localized/zh-CN/skills/cc-electron-project-standard/examples/minimal/boundary.test.cjs +7 -0
  114. package/localized/zh-CN/skills/cc-electron-project-standard/examples/minimal/index.html +1 -0
  115. package/localized/zh-CN/skills/cc-electron-project-standard/examples/minimal/main.cjs +20 -0
  116. package/localized/zh-CN/skills/cc-electron-project-standard/examples/minimal/package.json +9 -0
  117. package/localized/zh-CN/skills/cc-electron-project-standard/examples/minimal/preload.cjs +2 -0
  118. package/localized/zh-CN/skills/cc-electron-project-standard/examples/minimal/renderer.js +4 -0
  119. package/localized/zh-CN/skills/cc-electron-project-standard/references/common/engineering-practices.md +237 -0
  120. package/localized/zh-CN/skills/cc-electron-project-standard/references/common/engineering-practices.rules.json +121 -0
  121. package/localized/zh-CN/skills/cc-electron-project-standard/references/common/engineering-practices.sources.json +377 -0
  122. package/localized/zh-CN/skills/cc-electron-project-standard/references/engineering-practices.md +73 -0
  123. package/localized/zh-CN/skills/cc-electron-project-standard/references/practice.md +19 -0
  124. package/localized/zh-CN/skills/cc-electron-project-standard/references/verification.md +17 -0
  125. package/localized/zh-CN/skills/cc-go-concurrency/SKILL.md +25 -0
  126. package/localized/zh-CN/skills/cc-go-concurrency/references/common/engineering-practices.md +237 -0
  127. package/localized/zh-CN/skills/cc-go-concurrency/references/common/engineering-practices.rules.json +121 -0
  128. package/localized/zh-CN/skills/cc-go-concurrency/references/common/engineering-practices.sources.json +377 -0
  129. package/localized/zh-CN/skills/cc-go-concurrency/references/engineering-practices.md +73 -0
  130. package/localized/zh-CN/skills/cc-go-concurrency/references/practice.md +37 -0
  131. package/localized/zh-CN/skills/cc-go-project-standard/SKILL.md +25 -0
  132. package/localized/zh-CN/skills/cc-go-project-standard/examples/engineering/README.md +7 -0
  133. package/localized/zh-CN/skills/cc-go-project-standard/examples/engineering/go.mod +3 -0
  134. package/localized/zh-CN/skills/cc-go-project-standard/examples/engineering/lifecycle.go +71 -0
  135. package/localized/zh-CN/skills/cc-go-project-standard/examples/engineering/lifecycle_test.go +22 -0
  136. package/localized/zh-CN/skills/cc-go-project-standard/references/common/engineering-practices.md +237 -0
  137. package/localized/zh-CN/skills/cc-go-project-standard/references/common/engineering-practices.rules.json +121 -0
  138. package/localized/zh-CN/skills/cc-go-project-standard/references/common/engineering-practices.sources.json +377 -0
  139. package/localized/zh-CN/skills/cc-go-project-standard/references/engineering-practices.md +106 -0
  140. package/localized/zh-CN/skills/cc-go-project-standard/references/practice.md +37 -0
  141. package/localized/zh-CN/skills/cc-java-project-standard/SKILL.md +25 -0
  142. package/localized/zh-CN/skills/cc-java-project-standard/examples/engineering/README.md +5 -0
  143. package/localized/zh-CN/skills/cc-java-project-standard/examples/engineering/ResourceBoundary.java +26 -0
  144. package/localized/zh-CN/skills/cc-java-project-standard/examples/engineering/ResourceBoundaryTest.java +41 -0
  145. package/localized/zh-CN/skills/cc-java-project-standard/references/common/engineering-practices.md +237 -0
  146. package/localized/zh-CN/skills/cc-java-project-standard/references/common/engineering-practices.rules.json +121 -0
  147. package/localized/zh-CN/skills/cc-java-project-standard/references/common/engineering-practices.sources.json +377 -0
  148. package/localized/zh-CN/skills/cc-java-project-standard/references/engineering-practices.md +106 -0
  149. package/localized/zh-CN/skills/cc-java-project-standard/references/practice.md +37 -0
  150. package/localized/zh-CN/skills/cc-java-runtime/SKILL.md +25 -0
  151. package/localized/zh-CN/skills/cc-java-runtime/references/common/engineering-practices.md +237 -0
  152. package/localized/zh-CN/skills/cc-java-runtime/references/common/engineering-practices.rules.json +121 -0
  153. package/localized/zh-CN/skills/cc-java-runtime/references/common/engineering-practices.sources.json +377 -0
  154. package/localized/zh-CN/skills/cc-java-runtime/references/engineering-practices.md +73 -0
  155. package/localized/zh-CN/skills/cc-java-runtime/references/practice.md +37 -0
  156. package/localized/zh-CN/skills/cc-native-memory-safety/SKILL.md +25 -0
  157. package/localized/zh-CN/skills/cc-native-memory-safety/references/common/engineering-practices.md +237 -0
  158. package/localized/zh-CN/skills/cc-native-memory-safety/references/common/engineering-practices.rules.json +121 -0
  159. package/localized/zh-CN/skills/cc-native-memory-safety/references/common/engineering-practices.sources.json +377 -0
  160. package/localized/zh-CN/skills/cc-native-memory-safety/references/engineering-practices.md +73 -0
  161. package/localized/zh-CN/skills/cc-native-memory-safety/references/practice.md +37 -0
  162. package/localized/zh-CN/skills/cc-python-async/SKILL.md +25 -0
  163. package/localized/zh-CN/skills/cc-python-async/references/common/engineering-practices.md +237 -0
  164. package/localized/zh-CN/skills/cc-python-async/references/common/engineering-practices.rules.json +121 -0
  165. package/localized/zh-CN/skills/cc-python-async/references/common/engineering-practices.sources.json +377 -0
  166. package/localized/zh-CN/skills/cc-python-async/references/engineering-practices.md +73 -0
  167. package/localized/zh-CN/skills/cc-python-async/references/practice.md +37 -0
  168. package/localized/zh-CN/skills/cc-python-project-standard/SKILL.md +25 -0
  169. package/localized/zh-CN/skills/cc-python-project-standard/examples/engineering/README.md +7 -0
  170. package/localized/zh-CN/skills/cc-python-project-standard/examples/engineering/resource_boundary.py +37 -0
  171. package/localized/zh-CN/skills/cc-python-project-standard/examples/engineering/test_resource_boundary.py +49 -0
  172. package/localized/zh-CN/skills/cc-python-project-standard/references/common/engineering-practices.md +237 -0
  173. package/localized/zh-CN/skills/cc-python-project-standard/references/common/engineering-practices.rules.json +121 -0
  174. package/localized/zh-CN/skills/cc-python-project-standard/references/common/engineering-practices.sources.json +377 -0
  175. package/localized/zh-CN/skills/cc-python-project-standard/references/engineering-practices.md +106 -0
  176. package/localized/zh-CN/skills/cc-python-project-standard/references/practice.md +37 -0
  177. package/localized/zh-CN/skills/cc-refactoring-core/SKILL.md +8 -0
  178. package/localized/zh-CN/skills/cc-refactoring-core/references/method.md +16 -0
  179. package/localized/zh-CN/skills/cc-rust-async/SKILL.md +25 -0
  180. package/localized/zh-CN/skills/cc-rust-async/references/common/engineering-practices.md +237 -0
  181. package/localized/zh-CN/skills/cc-rust-async/references/common/engineering-practices.rules.json +121 -0
  182. package/localized/zh-CN/skills/cc-rust-async/references/common/engineering-practices.sources.json +377 -0
  183. package/localized/zh-CN/skills/cc-rust-async/references/engineering-practices.md +73 -0
  184. package/localized/zh-CN/skills/cc-rust-async/references/practice.md +37 -0
  185. package/localized/zh-CN/skills/cc-rust-project-standard/SKILL.md +25 -0
  186. package/localized/zh-CN/skills/cc-rust-project-standard/examples/engineering/Cargo.lock +7 -0
  187. package/localized/zh-CN/skills/cc-rust-project-standard/examples/engineering/Cargo.toml +8 -0
  188. package/localized/zh-CN/skills/cc-rust-project-standard/examples/engineering/README.md +5 -0
  189. package/localized/zh-CN/skills/cc-rust-project-standard/examples/engineering/src/lib.rs +43 -0
  190. package/localized/zh-CN/skills/cc-rust-project-standard/references/common/engineering-practices.md +237 -0
  191. package/localized/zh-CN/skills/cc-rust-project-standard/references/common/engineering-practices.rules.json +121 -0
  192. package/localized/zh-CN/skills/cc-rust-project-standard/references/common/engineering-practices.sources.json +377 -0
  193. package/localized/zh-CN/skills/cc-rust-project-standard/references/engineering-practices.md +106 -0
  194. package/localized/zh-CN/skills/cc-rust-project-standard/references/practice.md +37 -0
  195. package/localized/zh-CN/skills/cc-source-driven-development/SKILL.md +8 -0
  196. package/localized/zh-CN/skills/cc-source-driven-development/references/method.md +19 -0
  197. package/localized/zh-CN/skills/cc-tauri-project-standard/SKILL.md +21 -0
  198. package/localized/zh-CN/skills/cc-tauri-project-standard/examples/minimal/README.md +9 -0
  199. package/localized/zh-CN/skills/cc-tauri-project-standard/examples/minimal/core/Cargo.lock +5 -0
  200. package/localized/zh-CN/skills/cc-tauri-project-standard/examples/minimal/core/Cargo.toml +9 -0
  201. package/localized/zh-CN/skills/cc-tauri-project-standard/examples/minimal/core/src/lib.rs +46 -0
  202. package/localized/zh-CN/skills/cc-tauri-project-standard/examples/minimal/src-tauri/Cargo.toml +12 -0
  203. package/localized/zh-CN/skills/cc-tauri-project-standard/examples/minimal/src-tauri/build.rs +5 -0
  204. package/localized/zh-CN/skills/cc-tauri-project-standard/examples/minimal/src-tauri/capabilities/main.json +6 -0
  205. package/localized/zh-CN/skills/cc-tauri-project-standard/examples/minimal/src-tauri/permissions/documents.toml +4 -0
  206. package/localized/zh-CN/skills/cc-tauri-project-standard/examples/minimal/src-tauri/src/main.rs +22 -0
  207. package/localized/zh-CN/skills/cc-tauri-project-standard/examples/minimal/src-tauri/tauri.conf.json +13 -0
  208. package/localized/zh-CN/skills/cc-tauri-project-standard/examples/minimal/ui/app.js +5 -0
  209. package/localized/zh-CN/skills/cc-tauri-project-standard/examples/minimal/ui/index.html +1 -0
  210. package/localized/zh-CN/skills/cc-tauri-project-standard/references/common/engineering-practices.md +237 -0
  211. package/localized/zh-CN/skills/cc-tauri-project-standard/references/common/engineering-practices.rules.json +121 -0
  212. package/localized/zh-CN/skills/cc-tauri-project-standard/references/common/engineering-practices.sources.json +377 -0
  213. package/localized/zh-CN/skills/cc-tauri-project-standard/references/engineering-practices.md +73 -0
  214. package/localized/zh-CN/skills/cc-tauri-project-standard/references/practice.md +20 -0
  215. package/localized/zh-CN/skills/cc-tauri-project-standard/references/verification.md +18 -0
  216. package/localized/zh-CN/skills/cc-tdd-methodology/SKILL.md +8 -0
  217. package/localized/zh-CN/skills/cc-tdd-methodology/references/method.md +13 -0
  218. package/localized/zh-CN/skills/cc-technical-diagrams/SKILL.md +34 -0
  219. package/localized/zh-CN/skills/{fec-image-generation → cc-technical-diagrams}/assets/interactive-diagram.html +371 -371
  220. package/localized/zh-CN/skills/cc-technical-diagrams/assets/quality-examples/README.md +14 -0
  221. package/localized/zh-CN/skills/cc-technical-diagrams/assets/quality-examples/architecture.json +121 -0
  222. package/localized/zh-CN/skills/cc-technical-diagrams/assets/quality-examples/invalid-explicit.json +41 -0
  223. package/localized/zh-CN/skills/cc-technical-diagrams/assets/quality-examples/sequence.json +53 -0
  224. package/localized/zh-CN/skills/cc-technical-diagrams/assets/quality-examples/sequence.mmd +21 -0
  225. package/localized/zh-CN/skills/cc-technical-diagrams/assets/quality-examples/workflow.json +98 -0
  226. package/localized/zh-CN/skills/cc-technical-diagrams/assets/quality-examples/workflow.mmd +7 -0
  227. package/localized/zh-CN/skills/{fec-image-generation → cc-technical-diagrams}/references/diagram-workflows.md +12 -5
  228. package/localized/zh-CN/skills/{fec-image-generation → cc-technical-diagrams}/references/html-technical-diagrams.md +14 -7
  229. package/localized/zh-CN/skills/cc-technical-diagrams/references/png-qa-autofix.md +37 -0
  230. package/localized/zh-CN/skills/cc-technical-diagrams/scripts/diagram-browser.mjs +153 -0
  231. package/localized/zh-CN/skills/cc-technical-diagrams/scripts/diagram-layout.mjs +176 -0
  232. package/{skills/fec-image-generation → localized/zh-CN/skills/cc-technical-diagrams}/scripts/export-diagram.mjs +48 -80
  233. package/localized/zh-CN/skills/cc-technical-diagrams/scripts/mermaid-render.mjs +64 -0
  234. package/localized/zh-CN/skills/cc-technical-diagrams/scripts/png-qa.mjs +462 -0
  235. package/localized/zh-CN/skills/{fec-image-generation → cc-technical-diagrams}/scripts/tech-diagram-render.mjs +193 -53
  236. package/localized/zh-CN/skills/{fec-typescript-project-standard → cc-typescript-project-standard}/SKILL.md +10 -4
  237. package/localized/zh-CN/skills/cc-typescript-project-standard/examples/engineering/README.md +7 -0
  238. package/localized/zh-CN/skills/cc-typescript-project-standard/examples/engineering/boundary.test.ts +16 -0
  239. package/localized/zh-CN/skills/cc-typescript-project-standard/examples/engineering/input.ts +12 -0
  240. package/localized/zh-CN/skills/cc-typescript-project-standard/examples/engineering/package.json +12 -0
  241. package/localized/zh-CN/skills/cc-typescript-project-standard/examples/engineering/pnpm-lock.yaml +39 -0
  242. package/localized/zh-CN/skills/cc-typescript-project-standard/examples/engineering/pnpm-workspace.yaml +1 -0
  243. package/localized/zh-CN/skills/cc-typescript-project-standard/examples/engineering/tsconfig.json +8 -0
  244. package/localized/zh-CN/skills/cc-typescript-project-standard/references/common/engineering-practices.md +237 -0
  245. package/localized/zh-CN/skills/cc-typescript-project-standard/references/common/engineering-practices.rules.json +121 -0
  246. package/localized/zh-CN/skills/cc-typescript-project-standard/references/common/engineering-practices.sources.json +377 -0
  247. package/localized/zh-CN/skills/cc-typescript-project-standard/references/engineering-practices.md +106 -0
  248. package/localized/zh-CN/skills/{fec-typescript-project-standard → cc-typescript-project-standard}/references/type-safety-patterns.md +5 -34
  249. package/localized/zh-CN/skills/{fec-typescript-project-standard → cc-typescript-project-standard}/references/type-safety.md +6 -0
  250. package/localized/zh-CN/skills/eval_queries.json +738 -72
  251. package/localized/zh-CN/skills/fec-api-integration/SKILL.md +5 -1
  252. package/localized/zh-CN/skills/fec-api-integration/references/common/engineering-practices.md +237 -0
  253. package/localized/zh-CN/skills/fec-api-integration/references/common/engineering-practices.rules.json +121 -0
  254. package/localized/zh-CN/skills/fec-api-integration/references/common/engineering-practices.sources.json +377 -0
  255. package/localized/zh-CN/skills/fec-api-integration/references/engineering-practices.md +73 -0
  256. package/localized/zh-CN/skills/fec-code-review/SKILL.md +24 -1
  257. package/localized/zh-CN/skills/fec-code-review/references/common/engineering-practices.md +237 -0
  258. package/localized/zh-CN/skills/fec-code-review/references/common/engineering-practices.rules.json +121 -0
  259. package/localized/zh-CN/skills/fec-code-review/references/common/engineering-practices.sources.json +377 -0
  260. package/localized/zh-CN/skills/fec-code-review/references/engineering-practices.md +73 -0
  261. package/localized/zh-CN/skills/fec-code-review/references/report-template.md +11 -1
  262. package/localized/zh-CN/skills/fec-code-smells/SKILL.md +33 -0
  263. package/localized/zh-CN/skills/fec-code-smells/references/detection-guide.md +25 -0
  264. package/localized/zh-CN/skills/fec-code-smells/references/smell-catalog.md +817 -0
  265. package/localized/zh-CN/skills/fec-code-smells/references/smell-to-refactoring-map.md +265 -0
  266. package/localized/zh-CN/skills/fec-data-fetching/SKILL.md +4 -0
  267. package/localized/zh-CN/skills/fec-data-fetching/references/common/engineering-practices.md +237 -0
  268. package/localized/zh-CN/skills/fec-data-fetching/references/common/engineering-practices.rules.json +121 -0
  269. package/localized/zh-CN/skills/fec-data-fetching/references/common/engineering-practices.sources.json +377 -0
  270. package/localized/zh-CN/skills/fec-data-fetching/references/engineering-practices.md +73 -0
  271. package/localized/zh-CN/skills/fec-debug-framework/SKILL.md +1 -50
  272. package/localized/zh-CN/skills/fec-debug-framework/references/common/debug.md +13 -0
  273. package/localized/zh-CN/skills/fec-dependency-upgrade/SKILL.md +4 -0
  274. package/localized/zh-CN/skills/fec-dependency-upgrade/references/common/engineering-practices.md +237 -0
  275. package/localized/zh-CN/skills/fec-dependency-upgrade/references/common/engineering-practices.rules.json +121 -0
  276. package/localized/zh-CN/skills/fec-dependency-upgrade/references/common/engineering-practices.sources.json +377 -0
  277. package/localized/zh-CN/skills/fec-dependency-upgrade/references/engineering-practices.md +73 -0
  278. package/localized/zh-CN/skills/fec-doc-sync/SKILL.md +7 -28
  279. package/localized/zh-CN/skills/fec-doc-sync/references/common/doc-sync.md +12 -0
  280. package/localized/zh-CN/skills/fec-image-generation/SKILL.md +7 -71
  281. package/localized/zh-CN/skills/fec-image-generation/references/png-qa-autofix.md +9 -2
  282. package/localized/zh-CN/skills/fec-image-generation/scripts/diagram-layout.mjs +176 -0
  283. package/localized/zh-CN/skills/fec-image-generation/scripts/png-qa.mjs +36 -5
  284. package/localized/zh-CN/skills/fec-react-project-standard/SKILL.md +6 -0
  285. package/localized/zh-CN/skills/fec-react-project-standard/examples/engineering/README.md +7 -0
  286. package/localized/zh-CN/skills/fec-react-project-standard/examples/engineering/package.json +15 -0
  287. package/localized/zh-CN/skills/fec-react-project-standard/examples/engineering/pnpm-lock.yaml +662 -0
  288. package/localized/zh-CN/skills/fec-react-project-standard/examples/engineering/pnpm-workspace.yaml +1 -0
  289. package/localized/zh-CN/skills/fec-react-project-standard/examples/engineering/request-view.mjs +24 -0
  290. package/localized/zh-CN/skills/fec-react-project-standard/examples/engineering/request-view.test.mjs +33 -0
  291. package/localized/zh-CN/skills/fec-react-project-standard/references/common/engineering-practices.md +237 -0
  292. package/localized/zh-CN/skills/fec-react-project-standard/references/common/engineering-practices.rules.json +121 -0
  293. package/localized/zh-CN/skills/fec-react-project-standard/references/common/engineering-practices.sources.json +377 -0
  294. package/localized/zh-CN/skills/fec-react-project-standard/references/engineering-practices.md +73 -0
  295. package/localized/zh-CN/skills/fec-react-project-standard/references/generic-component-types.md +37 -0
  296. package/localized/zh-CN/skills/fec-react-project-standard/references/react-quality-patterns.md +3 -3
  297. package/localized/zh-CN/skills/fec-react-project-standard/references/react-runtime-patterns.md +1 -1
  298. package/localized/zh-CN/skills/fec-refactor-clean/SKILL.md +3 -0
  299. package/localized/zh-CN/skills/fec-refactoring/SKILL.md +25 -0
  300. package/localized/zh-CN/skills/fec-refactoring/references/common/refactoring.md +16 -0
  301. package/localized/zh-CN/skills/fec-refactoring/references/principles.md +13 -0
  302. package/localized/zh-CN/skills/fec-refactoring/references/refactoring-vs-feature-change.md +25 -0
  303. package/localized/zh-CN/skills/fec-refactoring/references/when-to-refactor.md +17 -0
  304. package/localized/zh-CN/skills/fec-refactoring/references/workflow.md +7 -0
  305. package/localized/zh-CN/skills/fec-refactoring-api/SKILL.md +25 -0
  306. package/localized/zh-CN/skills/fec-refactoring-api/references/api-refactorings.md +496 -0
  307. package/localized/zh-CN/skills/fec-refactoring-catalog/SKILL.md +21 -0
  308. package/localized/zh-CN/skills/fec-refactoring-catalog/references/catalog-index.md +99 -0
  309. package/localized/zh-CN/skills/fec-refactoring-catalog/references/composition-guide.md +49 -0
  310. package/localized/zh-CN/skills/fec-refactoring-catalog/references/selection-guide.md +41 -0
  311. package/localized/zh-CN/skills/fec-refactoring-control/SKILL.md +25 -0
  312. package/localized/zh-CN/skills/fec-refactoring-control/references/conditional-refactorings.md +299 -0
  313. package/localized/zh-CN/skills/fec-refactoring-data/SKILL.md +25 -0
  314. package/localized/zh-CN/skills/fec-refactoring-data/references/data-refactorings.md +248 -0
  315. package/localized/zh-CN/skills/fec-refactoring-encapsulation/SKILL.md +25 -0
  316. package/localized/zh-CN/skills/fec-refactoring-encapsulation/references/encapsulation-refactorings.md +452 -0
  317. package/localized/zh-CN/skills/fec-refactoring-functions/SKILL.md +25 -0
  318. package/localized/zh-CN/skills/fec-refactoring-functions/references/function-refactorings.md +567 -0
  319. package/localized/zh-CN/skills/fec-refactoring-inheritance/SKILL.md +25 -0
  320. package/localized/zh-CN/skills/fec-refactoring-inheritance/references/inheritance-refactorings.md +550 -0
  321. package/localized/zh-CN/skills/fec-refactoring-move-features/SKILL.md +25 -0
  322. package/localized/zh-CN/skills/fec-refactoring-move-features/references/moving-refactorings.md +453 -0
  323. package/localized/zh-CN/skills/fec-refactoring-validation/SKILL.md +52 -0
  324. package/localized/zh-CN/skills/fec-refactoring-validation/references/behavior-preservation.md +15 -0
  325. package/localized/zh-CN/skills/fec-refactoring-validation/references/refactoring-test-checklist.md +25 -0
  326. package/localized/zh-CN/skills/fec-security-review/SKILL.md +20 -0
  327. package/localized/zh-CN/skills/fec-security-review/references/common/engineering-practices.md +237 -0
  328. package/localized/zh-CN/skills/fec-security-review/references/common/engineering-practices.rules.json +121 -0
  329. package/localized/zh-CN/skills/fec-security-review/references/common/engineering-practices.sources.json +377 -0
  330. package/localized/zh-CN/skills/fec-security-review/references/engineering-practices.md +73 -0
  331. package/localized/zh-CN/skills/fec-security-review/references/report-template.md +10 -0
  332. package/localized/zh-CN/skills/fec-tdd-workflow/SKILL.md +12 -40
  333. package/localized/zh-CN/skills/fec-tdd-workflow/references/common/tdd.md +13 -0
  334. package/localized/zh-CN/skills/fec-testing-strategy/SKILL.md +4 -0
  335. package/localized/zh-CN/skills/fec-testing-strategy/references/common/engineering-practices.md +237 -0
  336. package/localized/zh-CN/skills/fec-testing-strategy/references/common/engineering-practices.rules.json +121 -0
  337. package/localized/zh-CN/skills/fec-testing-strategy/references/common/engineering-practices.sources.json +377 -0
  338. package/localized/zh-CN/skills/fec-testing-strategy/references/engineering-practices.md +73 -0
  339. package/localized/zh-CN/skills/fec-vue3-project-standard/SKILL.md +4 -0
  340. package/localized/zh-CN/skills/fec-vue3-project-standard/references/common/engineering-practices.md +237 -0
  341. package/localized/zh-CN/skills/fec-vue3-project-standard/references/common/engineering-practices.rules.json +121 -0
  342. package/localized/zh-CN/skills/fec-vue3-project-standard/references/common/engineering-practices.sources.json +377 -0
  343. package/localized/zh-CN/skills/fec-vue3-project-standard/references/engineering-practices.md +73 -0
  344. package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-project-structure.md +2 -2
  345. package/localized/zh-CN/skills/metadata.json +2222 -626
  346. package/localized/zh-CN/skills/relations.json +472 -75
  347. package/localized/zh-CN/templates/shared/rules/fec-agent-workflow.md +1 -0
  348. package/localized/zh-CN/templates/shared/rules/fec-source-driven-development.md +3 -29
  349. package/localized/zh-CN/templates/shared/rules/fec-typescript.md +4 -4
  350. package/localized/zh-CN/templates/shared/rules/references/common/source-driven-development.md +19 -0
  351. package/openclaw.plugin.json +2 -3
  352. package/package.json +34 -17
  353. package/skills/cc-c-project-standard/SKILL.md +25 -0
  354. package/skills/cc-c-project-standard/examples/engineering/README.md +7 -0
  355. package/skills/cc-c-project-standard/examples/engineering/boundary.c +26 -0
  356. package/skills/cc-c-project-standard/examples/engineering/boundary.h +15 -0
  357. package/skills/cc-c-project-standard/examples/engineering/boundary_test.c +73 -0
  358. package/skills/cc-c-project-standard/references/common/engineering-practices.md +237 -0
  359. package/skills/cc-c-project-standard/references/common/engineering-practices.rules.json +121 -0
  360. package/skills/cc-c-project-standard/references/common/engineering-practices.sources.json +377 -0
  361. package/skills/cc-c-project-standard/references/engineering-practices.md +106 -0
  362. package/skills/cc-c-project-standard/references/practice.md +37 -0
  363. package/skills/cc-cpp-project-standard/SKILL.md +25 -0
  364. package/skills/cc-cpp-project-standard/examples/engineering/README.md +7 -0
  365. package/skills/cc-cpp-project-standard/examples/engineering/boundary.cpp +26 -0
  366. package/skills/cc-cpp-project-standard/examples/engineering/boundary.hpp +12 -0
  367. package/skills/cc-cpp-project-standard/examples/engineering/boundary_test.cpp +38 -0
  368. package/skills/cc-cpp-project-standard/references/common/engineering-practices.md +237 -0
  369. package/skills/cc-cpp-project-standard/references/common/engineering-practices.rules.json +121 -0
  370. package/skills/cc-cpp-project-standard/references/common/engineering-practices.sources.json +377 -0
  371. package/skills/cc-cpp-project-standard/references/engineering-practices.md +106 -0
  372. package/skills/cc-cpp-project-standard/references/practice.md +37 -0
  373. package/skills/cc-debug-methodology/SKILL.md +8 -0
  374. package/skills/cc-debug-methodology/references/method.md +13 -0
  375. package/skills/cc-doc-sync-core/SKILL.md +8 -0
  376. package/skills/cc-doc-sync-core/references/method.md +12 -0
  377. package/skills/{fec-drawio-studio → cc-drawio-studio}/SKILL.md +5 -5
  378. package/skills/{fec-drawio-studio → cc-drawio-studio}/references/flowchart-quality.md +1 -1
  379. package/skills/{fec-drawio-studio → cc-drawio-studio}/references/layout-and-export.md +9 -9
  380. package/skills/cc-electron-project-standard/SKILL.md +21 -0
  381. package/skills/cc-electron-project-standard/examples/engineering/README.md +7 -0
  382. package/skills/cc-electron-project-standard/examples/engineering/ipc-lifecycle.cjs +44 -0
  383. package/skills/cc-electron-project-standard/examples/engineering/ipc-lifecycle.test.cjs +44 -0
  384. package/skills/cc-electron-project-standard/examples/engineering/package.json +8 -0
  385. package/skills/cc-electron-project-standard/examples/minimal/README.md +9 -0
  386. package/skills/cc-electron-project-standard/examples/minimal/boundary.cjs +19 -0
  387. package/skills/cc-electron-project-standard/examples/minimal/boundary.test.cjs +7 -0
  388. package/skills/cc-electron-project-standard/examples/minimal/index.html +1 -0
  389. package/skills/cc-electron-project-standard/examples/minimal/main.cjs +20 -0
  390. package/skills/cc-electron-project-standard/examples/minimal/package.json +9 -0
  391. package/skills/cc-electron-project-standard/examples/minimal/preload.cjs +2 -0
  392. package/skills/cc-electron-project-standard/examples/minimal/renderer.js +4 -0
  393. package/skills/cc-electron-project-standard/references/common/engineering-practices.md +237 -0
  394. package/skills/cc-electron-project-standard/references/common/engineering-practices.rules.json +121 -0
  395. package/skills/cc-electron-project-standard/references/common/engineering-practices.sources.json +377 -0
  396. package/skills/cc-electron-project-standard/references/engineering-practices.md +73 -0
  397. package/skills/cc-electron-project-standard/references/practice.md +19 -0
  398. package/skills/cc-electron-project-standard/references/verification.md +17 -0
  399. package/skills/cc-go-concurrency/SKILL.md +25 -0
  400. package/skills/cc-go-concurrency/references/common/engineering-practices.md +237 -0
  401. package/skills/cc-go-concurrency/references/common/engineering-practices.rules.json +121 -0
  402. package/skills/cc-go-concurrency/references/common/engineering-practices.sources.json +377 -0
  403. package/skills/cc-go-concurrency/references/engineering-practices.md +73 -0
  404. package/skills/cc-go-concurrency/references/practice.md +37 -0
  405. package/skills/cc-go-project-standard/SKILL.md +25 -0
  406. package/skills/cc-go-project-standard/examples/engineering/README.md +7 -0
  407. package/skills/cc-go-project-standard/examples/engineering/go.mod +3 -0
  408. package/skills/cc-go-project-standard/examples/engineering/lifecycle.go +71 -0
  409. package/skills/cc-go-project-standard/examples/engineering/lifecycle_test.go +22 -0
  410. package/skills/cc-go-project-standard/references/common/engineering-practices.md +237 -0
  411. package/skills/cc-go-project-standard/references/common/engineering-practices.rules.json +121 -0
  412. package/skills/cc-go-project-standard/references/common/engineering-practices.sources.json +377 -0
  413. package/skills/cc-go-project-standard/references/engineering-practices.md +106 -0
  414. package/skills/cc-go-project-standard/references/practice.md +37 -0
  415. package/skills/cc-java-project-standard/SKILL.md +25 -0
  416. package/skills/cc-java-project-standard/examples/engineering/README.md +7 -0
  417. package/skills/cc-java-project-standard/examples/engineering/ResourceBoundary.java +26 -0
  418. package/skills/cc-java-project-standard/examples/engineering/ResourceBoundaryTest.java +41 -0
  419. package/skills/cc-java-project-standard/references/common/engineering-practices.md +237 -0
  420. package/skills/cc-java-project-standard/references/common/engineering-practices.rules.json +121 -0
  421. package/skills/cc-java-project-standard/references/common/engineering-practices.sources.json +377 -0
  422. package/skills/cc-java-project-standard/references/engineering-practices.md +106 -0
  423. package/skills/cc-java-project-standard/references/practice.md +35 -0
  424. package/skills/cc-java-runtime/SKILL.md +25 -0
  425. package/skills/cc-java-runtime/references/common/engineering-practices.md +237 -0
  426. package/skills/cc-java-runtime/references/common/engineering-practices.rules.json +121 -0
  427. package/skills/cc-java-runtime/references/common/engineering-practices.sources.json +377 -0
  428. package/skills/cc-java-runtime/references/engineering-practices.md +73 -0
  429. package/skills/cc-java-runtime/references/practice.md +37 -0
  430. package/skills/cc-native-memory-safety/SKILL.md +25 -0
  431. package/skills/cc-native-memory-safety/references/common/engineering-practices.md +237 -0
  432. package/skills/cc-native-memory-safety/references/common/engineering-practices.rules.json +121 -0
  433. package/skills/cc-native-memory-safety/references/common/engineering-practices.sources.json +377 -0
  434. package/skills/cc-native-memory-safety/references/engineering-practices.md +73 -0
  435. package/skills/cc-native-memory-safety/references/practice.md +37 -0
  436. package/skills/cc-python-async/SKILL.md +25 -0
  437. package/skills/cc-python-async/references/common/engineering-practices.md +237 -0
  438. package/skills/cc-python-async/references/common/engineering-practices.rules.json +121 -0
  439. package/skills/cc-python-async/references/common/engineering-practices.sources.json +377 -0
  440. package/skills/cc-python-async/references/engineering-practices.md +73 -0
  441. package/skills/cc-python-async/references/practice.md +37 -0
  442. package/skills/cc-python-project-standard/SKILL.md +25 -0
  443. package/skills/cc-python-project-standard/examples/engineering/README.md +7 -0
  444. package/skills/cc-python-project-standard/examples/engineering/resource_boundary.py +37 -0
  445. package/skills/cc-python-project-standard/examples/engineering/test_resource_boundary.py +49 -0
  446. package/skills/cc-python-project-standard/references/common/engineering-practices.md +237 -0
  447. package/skills/cc-python-project-standard/references/common/engineering-practices.rules.json +121 -0
  448. package/skills/cc-python-project-standard/references/common/engineering-practices.sources.json +377 -0
  449. package/skills/cc-python-project-standard/references/engineering-practices.md +106 -0
  450. package/skills/cc-python-project-standard/references/practice.md +37 -0
  451. package/skills/cc-refactoring-core/SKILL.md +8 -0
  452. package/skills/cc-refactoring-core/references/method.md +16 -0
  453. package/skills/cc-rust-async/SKILL.md +25 -0
  454. package/skills/cc-rust-async/references/common/engineering-practices.md +237 -0
  455. package/skills/cc-rust-async/references/common/engineering-practices.rules.json +121 -0
  456. package/skills/cc-rust-async/references/common/engineering-practices.sources.json +377 -0
  457. package/skills/cc-rust-async/references/engineering-practices.md +73 -0
  458. package/skills/cc-rust-async/references/practice.md +37 -0
  459. package/skills/cc-rust-project-standard/SKILL.md +25 -0
  460. package/skills/cc-rust-project-standard/examples/engineering/Cargo.lock +7 -0
  461. package/skills/cc-rust-project-standard/examples/engineering/Cargo.toml +8 -0
  462. package/skills/cc-rust-project-standard/examples/engineering/README.md +5 -0
  463. package/skills/cc-rust-project-standard/examples/engineering/src/lib.rs +43 -0
  464. package/skills/cc-rust-project-standard/references/common/engineering-practices.md +237 -0
  465. package/skills/cc-rust-project-standard/references/common/engineering-practices.rules.json +121 -0
  466. package/skills/cc-rust-project-standard/references/common/engineering-practices.sources.json +377 -0
  467. package/skills/cc-rust-project-standard/references/engineering-practices.md +106 -0
  468. package/skills/cc-rust-project-standard/references/practice.md +37 -0
  469. package/skills/cc-source-driven-development/SKILL.md +8 -0
  470. package/skills/cc-source-driven-development/references/method.md +19 -0
  471. package/skills/cc-tauri-project-standard/SKILL.md +21 -0
  472. package/skills/cc-tauri-project-standard/examples/minimal/README.md +9 -0
  473. package/skills/cc-tauri-project-standard/examples/minimal/core/Cargo.lock +5 -0
  474. package/skills/cc-tauri-project-standard/examples/minimal/core/Cargo.toml +9 -0
  475. package/skills/cc-tauri-project-standard/examples/minimal/core/src/lib.rs +46 -0
  476. package/skills/cc-tauri-project-standard/examples/minimal/src-tauri/Cargo.toml +12 -0
  477. package/skills/cc-tauri-project-standard/examples/minimal/src-tauri/build.rs +5 -0
  478. package/skills/cc-tauri-project-standard/examples/minimal/src-tauri/capabilities/main.json +6 -0
  479. package/skills/cc-tauri-project-standard/examples/minimal/src-tauri/permissions/documents.toml +4 -0
  480. package/skills/cc-tauri-project-standard/examples/minimal/src-tauri/src/main.rs +22 -0
  481. package/skills/cc-tauri-project-standard/examples/minimal/src-tauri/tauri.conf.json +13 -0
  482. package/skills/cc-tauri-project-standard/examples/minimal/ui/app.js +5 -0
  483. package/skills/cc-tauri-project-standard/examples/minimal/ui/index.html +1 -0
  484. package/skills/cc-tauri-project-standard/references/common/engineering-practices.md +237 -0
  485. package/skills/cc-tauri-project-standard/references/common/engineering-practices.rules.json +121 -0
  486. package/skills/cc-tauri-project-standard/references/common/engineering-practices.sources.json +377 -0
  487. package/skills/cc-tauri-project-standard/references/engineering-practices.md +73 -0
  488. package/skills/cc-tauri-project-standard/references/practice.md +20 -0
  489. package/skills/cc-tauri-project-standard/references/verification.md +18 -0
  490. package/skills/cc-tdd-methodology/SKILL.md +8 -0
  491. package/skills/cc-tdd-methodology/references/method.md +13 -0
  492. package/skills/cc-technical-diagrams/SKILL.md +34 -0
  493. package/skills/{fec-image-generation → cc-technical-diagrams}/assets/interactive-diagram.html +371 -371
  494. package/skills/cc-technical-diagrams/assets/quality-examples/README.md +14 -0
  495. package/skills/cc-technical-diagrams/assets/quality-examples/architecture.json +121 -0
  496. package/skills/cc-technical-diagrams/assets/quality-examples/invalid-explicit.json +41 -0
  497. package/skills/cc-technical-diagrams/assets/quality-examples/sequence.json +53 -0
  498. package/skills/cc-technical-diagrams/assets/quality-examples/sequence.mmd +21 -0
  499. package/skills/cc-technical-diagrams/assets/quality-examples/workflow.json +98 -0
  500. package/skills/cc-technical-diagrams/assets/quality-examples/workflow.mmd +7 -0
  501. package/skills/{fec-image-generation → cc-technical-diagrams}/references/diagram-workflows.md +12 -5
  502. package/skills/{fec-image-generation → cc-technical-diagrams}/references/html-technical-diagrams.md +14 -7
  503. package/skills/cc-technical-diagrams/references/png-qa-autofix.md +37 -0
  504. package/skills/cc-technical-diagrams/scripts/diagram-browser.mjs +153 -0
  505. package/skills/cc-technical-diagrams/scripts/diagram-layout.mjs +176 -0
  506. package/{localized/zh-CN/skills/fec-image-generation → skills/cc-technical-diagrams}/scripts/export-diagram.mjs +48 -80
  507. package/skills/cc-technical-diagrams/scripts/mermaid-render.mjs +64 -0
  508. package/skills/cc-technical-diagrams/scripts/png-qa.mjs +462 -0
  509. package/skills/{fec-image-generation → cc-technical-diagrams}/scripts/tech-diagram-render.mjs +193 -53
  510. package/skills/{fec-typescript-project-standard → cc-typescript-project-standard}/SKILL.md +10 -4
  511. package/skills/cc-typescript-project-standard/examples/engineering/README.md +9 -0
  512. package/skills/cc-typescript-project-standard/examples/engineering/boundary.test.ts +16 -0
  513. package/skills/cc-typescript-project-standard/examples/engineering/input.ts +12 -0
  514. package/skills/cc-typescript-project-standard/examples/engineering/package.json +12 -0
  515. package/skills/cc-typescript-project-standard/examples/engineering/pnpm-lock.yaml +39 -0
  516. package/skills/cc-typescript-project-standard/examples/engineering/pnpm-workspace.yaml +1 -0
  517. package/skills/cc-typescript-project-standard/examples/engineering/tsconfig.json +8 -0
  518. package/skills/cc-typescript-project-standard/references/common/engineering-practices.md +237 -0
  519. package/skills/cc-typescript-project-standard/references/common/engineering-practices.rules.json +121 -0
  520. package/skills/cc-typescript-project-standard/references/common/engineering-practices.sources.json +377 -0
  521. package/skills/cc-typescript-project-standard/references/engineering-practices.md +106 -0
  522. package/skills/{fec-typescript-project-standard → cc-typescript-project-standard}/references/type-safety-patterns.md +6 -35
  523. package/skills/{fec-typescript-project-standard → cc-typescript-project-standard}/references/type-safety.md +7 -1
  524. package/skills/eval_queries.json +738 -72
  525. package/skills/fec-api-integration/SKILL.md +5 -1
  526. package/skills/fec-api-integration/references/common/engineering-practices.md +237 -0
  527. package/skills/fec-api-integration/references/common/engineering-practices.rules.json +121 -0
  528. package/skills/fec-api-integration/references/common/engineering-practices.sources.json +377 -0
  529. package/skills/fec-api-integration/references/engineering-practices.md +73 -0
  530. package/skills/fec-code-review/SKILL.md +24 -1
  531. package/skills/fec-code-review/references/common/engineering-practices.md +237 -0
  532. package/skills/fec-code-review/references/common/engineering-practices.rules.json +121 -0
  533. package/skills/fec-code-review/references/common/engineering-practices.sources.json +377 -0
  534. package/skills/fec-code-review/references/engineering-practices.md +73 -0
  535. package/skills/fec-code-review/references/report-template.md +11 -1
  536. package/skills/fec-code-smells/SKILL.md +33 -0
  537. package/skills/fec-code-smells/references/detection-guide.md +25 -0
  538. package/skills/fec-code-smells/references/smell-catalog.md +861 -0
  539. package/skills/fec-code-smells/references/smell-to-refactoring-map.md +265 -0
  540. package/skills/fec-data-fetching/SKILL.md +5 -1
  541. package/skills/fec-data-fetching/references/common/engineering-practices.md +237 -0
  542. package/skills/fec-data-fetching/references/common/engineering-practices.rules.json +121 -0
  543. package/skills/fec-data-fetching/references/common/engineering-practices.sources.json +377 -0
  544. package/skills/fec-data-fetching/references/engineering-practices.md +73 -0
  545. package/skills/fec-debug-framework/SKILL.md +2 -51
  546. package/skills/fec-debug-framework/references/common/debug.md +13 -0
  547. package/skills/fec-dependency-upgrade/SKILL.md +4 -0
  548. package/skills/fec-dependency-upgrade/references/common/engineering-practices.md +237 -0
  549. package/skills/fec-dependency-upgrade/references/common/engineering-practices.rules.json +121 -0
  550. package/skills/fec-dependency-upgrade/references/common/engineering-practices.sources.json +377 -0
  551. package/skills/fec-dependency-upgrade/references/engineering-practices.md +73 -0
  552. package/skills/fec-doc-sync/SKILL.md +7 -28
  553. package/skills/fec-doc-sync/references/common/doc-sync.md +12 -0
  554. package/skills/fec-image-generation/SKILL.md +7 -72
  555. package/skills/fec-image-generation/references/png-qa-autofix.md +9 -2
  556. package/skills/fec-image-generation/scripts/diagram-layout.mjs +176 -0
  557. package/skills/fec-image-generation/scripts/png-qa.mjs +36 -5
  558. package/skills/fec-legacy-web-standard/SKILL.md +1 -1
  559. package/skills/fec-react-project-standard/SKILL.md +6 -0
  560. package/skills/fec-react-project-standard/examples/engineering/README.md +7 -0
  561. package/skills/fec-react-project-standard/examples/engineering/package.json +15 -0
  562. package/skills/fec-react-project-standard/examples/engineering/pnpm-lock.yaml +662 -0
  563. package/skills/fec-react-project-standard/examples/engineering/pnpm-workspace.yaml +1 -0
  564. package/skills/fec-react-project-standard/examples/engineering/request-view.mjs +24 -0
  565. package/skills/fec-react-project-standard/examples/engineering/request-view.test.mjs +33 -0
  566. package/skills/fec-react-project-standard/references/common/engineering-practices.md +237 -0
  567. package/skills/fec-react-project-standard/references/common/engineering-practices.rules.json +121 -0
  568. package/skills/fec-react-project-standard/references/common/engineering-practices.sources.json +377 -0
  569. package/skills/fec-react-project-standard/references/engineering-practices.md +73 -0
  570. package/skills/fec-react-project-standard/references/generic-component-types.md +37 -0
  571. package/skills/fec-react-project-standard/references/react-quality-patterns.md +3 -3
  572. package/skills/fec-react-project-standard/references/react-runtime-patterns.md +1 -1
  573. package/skills/fec-refactor-clean/SKILL.md +3 -0
  574. package/skills/fec-refactoring/SKILL.md +25 -0
  575. package/skills/fec-refactoring/references/common/refactoring.md +16 -0
  576. package/skills/fec-refactoring/references/principles.md +13 -0
  577. package/skills/fec-refactoring/references/refactoring-vs-feature-change.md +27 -0
  578. package/skills/fec-refactoring/references/when-to-refactor.md +31 -0
  579. package/skills/fec-refactoring/references/workflow.md +7 -0
  580. package/skills/fec-refactoring-api/SKILL.md +25 -0
  581. package/skills/fec-refactoring-api/references/api-refactorings.md +496 -0
  582. package/skills/fec-refactoring-catalog/SKILL.md +28 -0
  583. package/skills/fec-refactoring-catalog/references/catalog-index.md +99 -0
  584. package/skills/fec-refactoring-catalog/references/composition-guide.md +49 -0
  585. package/skills/fec-refactoring-catalog/references/selection-guide.md +47 -0
  586. package/skills/fec-refactoring-control/SKILL.md +25 -0
  587. package/skills/fec-refactoring-control/references/conditional-refactorings.md +299 -0
  588. package/skills/fec-refactoring-data/SKILL.md +25 -0
  589. package/skills/fec-refactoring-data/references/data-refactorings.md +248 -0
  590. package/skills/fec-refactoring-encapsulation/SKILL.md +25 -0
  591. package/skills/fec-refactoring-encapsulation/references/encapsulation-refactorings.md +452 -0
  592. package/skills/fec-refactoring-functions/SKILL.md +25 -0
  593. package/skills/fec-refactoring-functions/references/function-refactorings.md +567 -0
  594. package/skills/fec-refactoring-inheritance/SKILL.md +25 -0
  595. package/skills/fec-refactoring-inheritance/references/inheritance-refactorings.md +550 -0
  596. package/skills/fec-refactoring-move-features/SKILL.md +25 -0
  597. package/skills/fec-refactoring-move-features/references/moving-refactorings.md +453 -0
  598. package/skills/fec-refactoring-validation/SKILL.md +59 -0
  599. package/skills/fec-refactoring-validation/references/behavior-preservation.md +53 -0
  600. package/skills/fec-refactoring-validation/references/refactoring-test-checklist.md +42 -0
  601. package/skills/fec-security-review/SKILL.md +20 -0
  602. package/skills/fec-security-review/references/common/engineering-practices.md +237 -0
  603. package/skills/fec-security-review/references/common/engineering-practices.rules.json +121 -0
  604. package/skills/fec-security-review/references/common/engineering-practices.sources.json +377 -0
  605. package/skills/fec-security-review/references/engineering-practices.md +73 -0
  606. package/skills/fec-security-review/references/report-template.md +10 -0
  607. package/skills/fec-tdd-workflow/SKILL.md +14 -42
  608. package/skills/fec-tdd-workflow/references/common/tdd.md +13 -0
  609. package/skills/fec-testing-strategy/SKILL.md +4 -0
  610. package/skills/fec-testing-strategy/references/common/engineering-practices.md +237 -0
  611. package/skills/fec-testing-strategy/references/common/engineering-practices.rules.json +121 -0
  612. package/skills/fec-testing-strategy/references/common/engineering-practices.sources.json +377 -0
  613. package/skills/fec-testing-strategy/references/engineering-practices.md +73 -0
  614. package/skills/fec-vue3-project-standard/SKILL.md +4 -0
  615. package/skills/fec-vue3-project-standard/references/common/engineering-practices.md +237 -0
  616. package/skills/fec-vue3-project-standard/references/common/engineering-practices.rules.json +121 -0
  617. package/skills/fec-vue3-project-standard/references/common/engineering-practices.sources.json +377 -0
  618. package/skills/fec-vue3-project-standard/references/engineering-practices.md +73 -0
  619. package/skills/fec-vue3-project-standard/references/vue3-project-structure.md +2 -2
  620. package/skills/metadata.json +2230 -629
  621. package/skills/relations.json +467 -74
  622. package/templates/shared/rules/fec-agent-workflow.md +1 -0
  623. package/templates/shared/rules/fec-source-driven-development.md +3 -29
  624. package/templates/shared/rules/fec-typescript.md +4 -4
  625. package/templates/shared/rules/references/common/source-driven-development.md +19 -0
  626. package/docs/superpowers/plans/2026-05-29-fec-debug.md +0 -491
  627. package/docs/superpowers/specs/2026-05-29-fec-debug-design.md +0 -340
  628. package/localized/zh-CN/skills/fec-source-driven-development/SKILL.md +0 -87
  629. package/skills/fec-source-driven-development/SKILL.md +0 -87
  630. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/data/THIRD_PARTY_NOTICES.md +0 -0
  631. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/data/brand-icons.json +0 -0
  632. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/data/shape-index.json +0 -0
  633. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/references/data-residency.md +0 -0
  634. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/references/diagram-patterns.md +0 -0
  635. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/references/troubleshooting.md +0 -0
  636. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/references/xml-and-mermaid.md +0 -0
  637. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/brand-symbols.mjs +0 -0
  638. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/diagram-lint.mjs +0 -0
  639. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/diagram-url.mjs +0 -0
  640. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/drawio-export.mjs +0 -0
  641. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/layout-graph.mjs +0 -0
  642. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/png-embed-fix.mjs +0 -0
  643. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/scan-go-packages.mjs +0 -0
  644. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/scan-js-modules.mjs +0 -0
  645. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/scan-python-classes.mjs +0 -0
  646. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/scan-python-modules.mjs +0 -0
  647. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/scan-rust-modules.mjs +0 -0
  648. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/scan-ts-modules.mjs +0 -0
  649. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/shape-query.mjs +0 -0
  650. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/studio-core.mjs +0 -0
  651. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/styles/built-in/corporate.json +0 -0
  652. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/styles/built-in/default.json +0 -0
  653. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/styles/built-in/handdrawn.json +0 -0
  654. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/styles/schema.json +0 -0
  655. /package/localized/zh-CN/skills/{fec-image-generation → cc-technical-diagrams}/scripts/interactive-diagram-server.mjs +0 -0
  656. /package/skills/{fec-drawio-studio → cc-drawio-studio}/data/THIRD_PARTY_NOTICES.md +0 -0
  657. /package/skills/{fec-drawio-studio → cc-drawio-studio}/data/brand-icons.json +0 -0
  658. /package/skills/{fec-drawio-studio → cc-drawio-studio}/data/shape-index.json +0 -0
  659. /package/skills/{fec-drawio-studio → cc-drawio-studio}/references/data-residency.md +0 -0
  660. /package/skills/{fec-drawio-studio → cc-drawio-studio}/references/diagram-patterns.md +0 -0
  661. /package/skills/{fec-drawio-studio → cc-drawio-studio}/references/troubleshooting.md +0 -0
  662. /package/skills/{fec-drawio-studio → cc-drawio-studio}/references/xml-and-mermaid.md +0 -0
  663. /package/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/brand-symbols.mjs +0 -0
  664. /package/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/diagram-lint.mjs +0 -0
  665. /package/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/diagram-url.mjs +0 -0
  666. /package/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/drawio-export.mjs +0 -0
  667. /package/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/layout-graph.mjs +0 -0
  668. /package/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/png-embed-fix.mjs +0 -0
  669. /package/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/scan-go-packages.mjs +0 -0
  670. /package/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/scan-js-modules.mjs +0 -0
  671. /package/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/scan-python-classes.mjs +0 -0
  672. /package/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/scan-python-modules.mjs +0 -0
  673. /package/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/scan-rust-modules.mjs +0 -0
  674. /package/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/scan-ts-modules.mjs +0 -0
  675. /package/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/shape-query.mjs +0 -0
  676. /package/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/studio-core.mjs +0 -0
  677. /package/skills/{fec-drawio-studio → cc-drawio-studio}/styles/built-in/corporate.json +0 -0
  678. /package/skills/{fec-drawio-studio → cc-drawio-studio}/styles/built-in/default.json +0 -0
  679. /package/skills/{fec-drawio-studio → cc-drawio-studio}/styles/built-in/handdrawn.json +0 -0
  680. /package/skills/{fec-drawio-studio → cc-drawio-studio}/styles/schema.json +0 -0
  681. /package/skills/{fec-image-generation → cc-technical-diagrams}/scripts/interactive-diagram-server.mjs +0 -0
@@ -0,0 +1,453 @@
1
+ # Moving Feature Refactorings
2
+
3
+ These cards transform the supplied standard catalog into concise operational guidance for frontend agents. Standard IDs/names are preserved; examples and framework adaptations are original.
4
+
5
+ ## RF-MOVE-FUNCTION — Move Function
6
+
7
+ ### Intent
8
+ Move behavior to the module that owns most of the data it uses or the responsibility it represents.
9
+
10
+ ### Typical Signals
11
+ - A function depends more on another module’s data than its current home.
12
+
13
+ ### Avoid When
14
+ - Do not move orchestration merely because it calls several collaborators; coordination may be its responsibility.
15
+
16
+ ### Preconditions
17
+ - Current observable behavior and affected callers are understood.
18
+ - The target scope is inside a declared diff budget and can be verified after this one primary transformation.
19
+
20
+ ### Mechanics
21
+ 1. Identify data ownership and change responsibility.
22
+ 2. Create/copy the function at the destination with a narrow interface.
23
+ 3. Delegate from the old location while migrating callers.
24
+ 4. Remove the old location only when dependencies and public contracts permit.
25
+
26
+ ### Behavior-Preservation Checkpoints
27
+ - Compare inputs, outputs, exceptions, side effects, ordering, and public contracts before/after the step.
28
+ - For frontend code, also check UI state, events, focus, network behavior, lifecycle/state transitions, and relevant identity semantics.
29
+
30
+ ### Related Code Smells
31
+ - `SMELL-DIVERGENT-CHANGE`
32
+ - `SMELL-SHOTGUN-SURGERY`
33
+ - `SMELL-FEATURE-ENVY`
34
+ - `SMELL-TEMPORARY-FIELD`
35
+ - `SMELL-MESSAGE-CHAINS`
36
+ - `SMELL-INSIDER-TRADING`
37
+ - `SMELL-ALTERNATIVE-CLASSES-DIFFERENT-INTERFACES`
38
+ - `SMELL-DATA-CLASS`
39
+
40
+ ### Composes Well With
41
+ - Combine only with a separately justified next transformation; no fixed sequence is required.
42
+
43
+ ### JavaScript Notes
44
+ - Module initialization order, circular imports, closures, and dynamic imports can make a textual move behavior-changing.
45
+
46
+ ### TypeScript Notes
47
+ - Preserve exported types, path aliases, package boundaries, and type-only/runtime import distinctions.
48
+
49
+ ### React Notes
50
+ - Check Hook rules, Server/Client boundaries, lazy components, Suspense, router behavior, and event ordering when moving code.
51
+
52
+ ### Vue Notes
53
+ - Check composable lifecycle, Pinia ownership, async setup, route guards, and auto-import conventions.
54
+
55
+ ### Frontend-Craft Adaptation
56
+ - Place behavior with the data/change responsibility it serves, not merely in a “utilities” folder; prove dead code with the specialized cleanup lane.
57
+
58
+ ### Example Transformation
59
+ Before: a component-local mailbox quota calculation mostly reads account policy data. After: move it to the account policy module and keep UI code declarative.
60
+
61
+ ## RF-MOVE-FIELD — Move Field
62
+
63
+ ### Intent
64
+ Move data to the object/module that conceptually owns it and changes with it.
65
+
66
+ ### Typical Signals
67
+ - A field is read/updated mainly by another owner or repeatedly travels with another data cluster.
68
+
69
+ ### Avoid When
70
+ - Avoid moving a public serialized field without a compatibility plan.
71
+
72
+ ### Preconditions
73
+ - Current observable behavior and affected callers are understood.
74
+ - The target scope is inside a declared diff budget and can be verified after this one primary transformation.
75
+
76
+ ### Mechanics
77
+ 1. Identify the real owner and all reads/writes.
78
+ 2. Add storage/access at the destination.
79
+ 3. Redirect reads and writes incrementally.
80
+ 4. Remove old storage after state synchronization is no longer required.
81
+
82
+ ### Behavior-Preservation Checkpoints
83
+ - Compare inputs, outputs, exceptions, side effects, ordering, and public contracts before/after the step.
84
+ - For frontend code, also check UI state, events, focus, network behavior, lifecycle/state transitions, and relevant identity semantics.
85
+
86
+ ### Related Code Smells
87
+ - `SMELL-SHOTGUN-SURGERY`
88
+ - `SMELL-INSIDER-TRADING`
89
+
90
+ ### Composes Well With
91
+ - Combine only with a separately justified next transformation; no fixed sequence is required.
92
+
93
+ ### JavaScript Notes
94
+ - Module initialization order, circular imports, closures, and dynamic imports can make a textual move behavior-changing.
95
+
96
+ ### TypeScript Notes
97
+ - Preserve exported types, path aliases, package boundaries, and type-only/runtime import distinctions.
98
+
99
+ ### React Notes
100
+ - Check Hook rules, Server/Client boundaries, lazy components, Suspense, router behavior, and event ordering when moving code.
101
+
102
+ ### Vue Notes
103
+ - Check composable lifecycle, Pinia ownership, async setup, route guards, and auto-import conventions.
104
+
105
+ ### Frontend-Craft Adaptation
106
+ - Place behavior with the data/change responsibility it serves, not merely in a “utilities” folder; prove dead code with the specialized cleanup lane.
107
+
108
+ ### Example Transformation
109
+ Before: a view controller owns `quotaLimit` though policy service controls it. After: policy owns the field and UI reads through the policy boundary.
110
+
111
+ ## RF-MOVE-STATEMENTS-INTO-FUNCTION — Move Statements into Function
112
+
113
+ ### Intent
114
+ Move statements that always accompany a function call into that function so the shared operation is complete.
115
+
116
+ ### Typical Signals
117
+ - The same setup/teardown statement appears around many calls and belongs to the called operation.
118
+
119
+ ### Avoid When
120
+ - Do not move caller-specific policy into a generic function.
121
+
122
+ ### Preconditions
123
+ - Current observable behavior and affected callers are understood.
124
+ - The target scope is inside a declared diff budget and can be verified after this one primary transformation.
125
+
126
+ ### Mechanics
127
+ 1. Find repeated adjacent statements around the call.
128
+ 2. Move one shared statement into the callee.
129
+ 3. Verify callers and ordering.
130
+ 4. Repeat only for behavior truly common to all callers.
131
+
132
+ ### Behavior-Preservation Checkpoints
133
+ - Compare inputs, outputs, exceptions, side effects, ordering, and public contracts before/after the step.
134
+ - For frontend code, also check UI state, events, focus, network behavior, lifecycle/state transitions, and relevant identity semantics.
135
+
136
+ ### Related Code Smells
137
+ - No single code smell required; select from concrete structural evidence.
138
+
139
+ ### Composes Well With
140
+ - Combine only with a separately justified next transformation; no fixed sequence is required.
141
+
142
+ ### JavaScript Notes
143
+ - Module initialization order, circular imports, closures, and dynamic imports can make a textual move behavior-changing.
144
+
145
+ ### TypeScript Notes
146
+ - Preserve exported types, path aliases, package boundaries, and type-only/runtime import distinctions.
147
+
148
+ ### React Notes
149
+ - Check Hook rules, Server/Client boundaries, lazy components, Suspense, router behavior, and event ordering when moving code.
150
+
151
+ ### Vue Notes
152
+ - Check composable lifecycle, Pinia ownership, async setup, route guards, and auto-import conventions.
153
+
154
+ ### Frontend-Craft Adaptation
155
+ - Place behavior with the data/change responsibility it serves, not merely in a “utilities” folder; prove dead code with the specialized cleanup lane.
156
+
157
+ ### Example Transformation
158
+ Before: every caller formats a draft ID immediately before `saveDraft`. After: `saveDraft` owns canonical ID formatting if it is always required.
159
+
160
+ ## RF-MOVE-STATEMENTS-TO-CALLERS — Move Statements to Callers
161
+
162
+ ### Intent
163
+ Move behavior out of a function when only some callers need it or its policy varies by context.
164
+
165
+ ### Typical Signals
166
+ - A formerly common step is now caller-specific.
167
+
168
+ ### Avoid When
169
+ - Avoid duplicating logic when the behavior is still a stable invariant of every caller.
170
+
171
+ ### Preconditions
172
+ - Current observable behavior and affected callers are understood.
173
+ - The target scope is inside a declared diff budget and can be verified after this one primary transformation.
174
+
175
+ ### Mechanics
176
+ 1. Identify the statement whose policy varies.
177
+ 2. Expose or split the callee so callers can perform the varying step.
178
+ 3. Move the statement to one caller at a time.
179
+ 4. Verify ordering and shared invariants.
180
+
181
+ ### Behavior-Preservation Checkpoints
182
+ - Compare inputs, outputs, exceptions, side effects, ordering, and public contracts before/after the step.
183
+ - For frontend code, also check UI state, events, focus, network behavior, lifecycle/state transitions, and relevant identity semantics.
184
+
185
+ ### Related Code Smells
186
+ - No single code smell required; select from concrete structural evidence.
187
+
188
+ ### Composes Well With
189
+ - Combine only with a separately justified next transformation; no fixed sequence is required.
190
+
191
+ ### JavaScript Notes
192
+ - Module initialization order, circular imports, closures, and dynamic imports can make a textual move behavior-changing.
193
+
194
+ ### TypeScript Notes
195
+ - Preserve exported types, path aliases, package boundaries, and type-only/runtime import distinctions.
196
+
197
+ ### React Notes
198
+ - Check Hook rules, Server/Client boundaries, lazy components, Suspense, router behavior, and event ordering when moving code.
199
+
200
+ ### Vue Notes
201
+ - Check composable lifecycle, Pinia ownership, async setup, route guards, and auto-import conventions.
202
+
203
+ ### Frontend-Craft Adaptation
204
+ - Place behavior with the data/change responsibility it serves, not merely in a “utilities” folder; prove dead code with the specialized cleanup lane.
205
+
206
+ ### Example Transformation
207
+ Before: `loadMessages` always shows a toast, but background refresh must not. After: callers decide whether to notify after loading.
208
+
209
+ ## RF-REPLACE-INLINE-CODE-WITH-FUNCTION-CALL — Replace Inline Code with Function Call
210
+
211
+ ### Intent
212
+ Use an existing function instead of duplicating equivalent inline logic.
213
+
214
+ ### Typical Signals
215
+ - Inline logic already has a trustworthy named implementation elsewhere.
216
+
217
+ ### Avoid When
218
+ - Do not replace merely similar logic when semantics or edge cases differ.
219
+
220
+ ### Preconditions
221
+ - Current observable behavior and affected callers are understood.
222
+ - The target scope is inside a declared diff budget and can be verified after this one primary transformation.
223
+
224
+ ### Mechanics
225
+ 1. Prove equivalence between inline code and the existing function.
226
+ 2. Replace one occurrence with the call.
227
+ 3. Verify result, error, and evaluation semantics.
228
+ 4. Remove any now-unused local helpers.
229
+
230
+ ### Behavior-Preservation Checkpoints
231
+ - Compare inputs, outputs, exceptions, side effects, ordering, and public contracts before/after the step.
232
+ - For frontend code, also check UI state, events, focus, network behavior, lifecycle/state transitions, and relevant identity semantics.
233
+
234
+ ### Related Code Smells
235
+ - No single code smell required; select from concrete structural evidence.
236
+
237
+ ### Composes Well With
238
+ - Combine only with a separately justified next transformation; no fixed sequence is required.
239
+
240
+ ### JavaScript Notes
241
+ - Module initialization order, circular imports, closures, and dynamic imports can make a textual move behavior-changing.
242
+
243
+ ### TypeScript Notes
244
+ - Preserve exported types, path aliases, package boundaries, and type-only/runtime import distinctions.
245
+
246
+ ### React Notes
247
+ - Check Hook rules, Server/Client boundaries, lazy components, Suspense, router behavior, and event ordering when moving code.
248
+
249
+ ### Vue Notes
250
+ - Check composable lifecycle, Pinia ownership, async setup, route guards, and auto-import conventions.
251
+
252
+ ### Frontend-Craft Adaptation
253
+ - Place behavior with the data/change responsibility it serves, not merely in a “utilities” folder; prove dead code with the specialized cleanup lane.
254
+
255
+ ### Example Transformation
256
+ Before: an inline loop checks whether a folder is special. After: call the existing `isSpecialFolder(id)` helper when semantics match exactly.
257
+
258
+ ## RF-SLIDE-STATEMENTS — Slide Statements
259
+
260
+ ### Intent
261
+ Reorder statements so related code is adjacent and a later extraction or simplification becomes possible.
262
+
263
+ ### Typical Signals
264
+ - Statements that belong together are separated by unrelated work.
265
+
266
+ ### Avoid When
267
+ - Do not reorder across side effects, awaits, exceptions, subscriptions, or reads/writes whose order is observable.
268
+
269
+ ### Preconditions
270
+ - Current observable behavior and affected callers are understood.
271
+ - The target scope is inside a declared diff budget and can be verified after this one primary transformation.
272
+
273
+ ### Mechanics
274
+ 1. Map dependencies and side effects between statements.
275
+ 2. Move the smallest statement across only independent operations.
276
+ 3. Verify after each move.
277
+ 4. Stop when the intended cluster is adjacent.
278
+
279
+ ### Behavior-Preservation Checkpoints
280
+ - Compare inputs, outputs, exceptions, side effects, ordering, and public contracts before/after the step.
281
+ - For frontend code, also check UI state, events, focus, network behavior, lifecycle/state transitions, and relevant identity semantics.
282
+
283
+ ### Related Code Smells
284
+ - `SMELL-DUPLICATED-CODE`
285
+ - `SMELL-MUTABLE-DATA`
286
+
287
+ ### Composes Well With
288
+ - Combine only with a separately justified next transformation; no fixed sequence is required.
289
+
290
+ ### JavaScript Notes
291
+ - Module initialization order, circular imports, closures, and dynamic imports can make a textual move behavior-changing.
292
+
293
+ ### TypeScript Notes
294
+ - Preserve exported types, path aliases, package boundaries, and type-only/runtime import distinctions.
295
+
296
+ ### React Notes
297
+ - Check Hook rules, Server/Client boundaries, lazy components, Suspense, router behavior, and event ordering when moving code.
298
+
299
+ ### Vue Notes
300
+ - Check composable lifecycle, Pinia ownership, async setup, route guards, and auto-import conventions.
301
+
302
+ ### Frontend-Craft Adaptation
303
+ - Place behavior with the data/change responsibility it serves, not merely in a “utilities” folder; prove dead code with the specialized cleanup lane.
304
+
305
+ ### Example Transformation
306
+ Before: two normalization statements are separated by an unrelated analytics call. After: move only if analytics timing and data dependencies are unchanged.
307
+
308
+ ## RF-SPLIT-LOOP — Split Loop
309
+
310
+ ### Intent
311
+ Separate a loop that performs multiple independent tasks into focused passes.
312
+
313
+ ### Typical Signals
314
+ - One loop computes unrelated results with separate accumulators.
315
+
316
+ ### Avoid When
317
+ - Avoid when the extra pass is materially expensive or iteration order/side effects couple the tasks.
318
+
319
+ ### Preconditions
320
+ - Current observable behavior and affected callers are understood.
321
+ - The target scope is inside a declared diff budget and can be verified after this one primary transformation.
322
+
323
+ ### Mechanics
324
+ 1. Identify independent loop responsibilities.
325
+ 2. Duplicate the iteration and keep one responsibility in each pass.
326
+ 3. Verify outputs/order/performance.
327
+ 4. Then extract or pipeline individual loops if useful.
328
+
329
+ ### Behavior-Preservation Checkpoints
330
+ - Compare inputs, outputs, exceptions, side effects, ordering, and public contracts before/after the step.
331
+ - For frontend code, also check UI state, events, focus, network behavior, lifecycle/state transitions, and relevant identity semantics.
332
+
333
+ ### Related Code Smells
334
+ - `SMELL-LONG-FUNCTION`
335
+
336
+ ### Composes Well With
337
+ - Combine only with a separately justified next transformation; no fixed sequence is required.
338
+
339
+ ### JavaScript Notes
340
+ - Module initialization order, circular imports, closures, and dynamic imports can make a textual move behavior-changing.
341
+
342
+ ### TypeScript Notes
343
+ - Preserve exported types, path aliases, package boundaries, and type-only/runtime import distinctions.
344
+
345
+ ### React Notes
346
+ - Check Hook rules, Server/Client boundaries, lazy components, Suspense, router behavior, and event ordering when moving code.
347
+
348
+ ### Vue Notes
349
+ - Check composable lifecycle, Pinia ownership, async setup, route guards, and auto-import conventions.
350
+
351
+ ### Frontend-Craft Adaptation
352
+ - Place behavior with the data/change responsibility it serves, not merely in a “utilities” folder; prove dead code with the specialized cleanup lane.
353
+
354
+ ### Example Transformation
355
+ Before: one loop both counts unread messages and builds attachment names. After: split into two focused passes when collection size and order permit.
356
+
357
+ ## RF-REPLACE-LOOP-WITH-PIPELINE — Replace Loop with Pipeline
358
+
359
+ ### Intent
360
+ Express a collection transformation as a sequence of named filter/map/reduce-style operations.
361
+
362
+ ### Typical Signals
363
+ - An imperative loop mostly filters, maps, or accumulates data and bookkeeping hides intent.
364
+
365
+ ### Avoid When
366
+ - Keep loops for early exits, complex mutation, tight performance constraints, or async sequencing when clearer.
367
+
368
+ ### Preconditions
369
+ - Current observable behavior and affected callers are understood.
370
+ - The target scope is inside a declared diff budget and can be verified after this one primary transformation.
371
+
372
+ ### Mechanics
373
+ 1. Identify the element-level transformation stages.
374
+ 2. Replace one stage with an equivalent collection operation.
375
+ 3. Preserve ordering and callback semantics.
376
+ 4. Verify empty inputs, errors, and performance-sensitive paths.
377
+
378
+ ### Behavior-Preservation Checkpoints
379
+ - Compare inputs, outputs, exceptions, side effects, ordering, and public contracts before/after the step.
380
+ - For frontend code, also check UI state, events, focus, network behavior, lifecycle/state transitions, and relevant identity semantics.
381
+
382
+ ### Related Code Smells
383
+ - `SMELL-LOOPS`
384
+
385
+ ### Composes Well With
386
+ - Combine only with a separately justified next transformation; no fixed sequence is required.
387
+
388
+ ### JavaScript Notes
389
+ - Module initialization order, circular imports, closures, and dynamic imports can make a textual move behavior-changing.
390
+
391
+ ### TypeScript Notes
392
+ - Preserve exported types, path aliases, package boundaries, and type-only/runtime import distinctions.
393
+
394
+ ### React Notes
395
+ - Check Hook rules, Server/Client boundaries, lazy components, Suspense, router behavior, and event ordering when moving code.
396
+
397
+ ### Vue Notes
398
+ - Check composable lifecycle, Pinia ownership, async setup, route guards, and auto-import conventions.
399
+
400
+ ### Frontend-Craft Adaptation
401
+ - Place behavior with the data/change responsibility it serves, not merely in a “utilities” folder; prove dead code with the specialized cleanup lane.
402
+
403
+ ### Example Transformation
404
+ Before: push matching attachment names into an array inside a loop. After: `attachments.filter(isVisible).map(a => a.name)` when behavior matches.
405
+
406
+ ## RF-REMOVE-DEAD-CODE — Remove Dead Code
407
+
408
+ ### Intent
409
+ Remove code proven to have no reachable runtime or supported-tooling use.
410
+
411
+ ### Typical Signals
412
+ - A function, export, branch, asset, style, route, or dependency has no legitimate references.
413
+
414
+ ### Avoid When
415
+ - Do not infer deadness from grep alone when dynamic imports, routes, Storybook, i18n, Tailwind classes, runtime templates, or external consumers may reference it.
416
+
417
+ ### Preconditions
418
+ - Current observable behavior and affected callers are understood.
419
+ - The target scope is inside a declared diff budget and can be verified after this one primary transformation.
420
+
421
+ ### Mechanics
422
+ 1. Prove unused status across static and dynamic reference channels.
423
+ 2. Classify risk before deletion.
424
+ 3. Use the dedicated cleanup workflow for actual removal.
425
+ 4. Run relevant build/tests after deletion.
426
+
427
+ ### Behavior-Preservation Checkpoints
428
+ - Compare inputs, outputs, exceptions, side effects, ordering, and public contracts before/after the step.
429
+ - For frontend code, also check UI state, events, focus, network behavior, lifecycle/state transitions, and relevant identity semantics.
430
+
431
+ ### Related Code Smells
432
+ - `SMELL-SPECULATIVE-GENERALITY`
433
+
434
+ ### Composes Well With
435
+ - Combine only with a separately justified next transformation; no fixed sequence is required.
436
+
437
+ ### JavaScript Notes
438
+ - Module initialization order, circular imports, closures, and dynamic imports can make a textual move behavior-changing.
439
+
440
+ ### TypeScript Notes
441
+ - Preserve exported types, path aliases, package boundaries, and type-only/runtime import distinctions.
442
+
443
+ ### React Notes
444
+ - Check Hook rules, Server/Client boundaries, lazy components, Suspense, router behavior, and event ordering when moving code.
445
+
446
+ ### Vue Notes
447
+ - Check composable lifecycle, Pinia ownership, async setup, route guards, and auto-import conventions.
448
+
449
+ ### Frontend-Craft Adaptation
450
+ - Place behavior with the data/change responsibility it serves, not merely in a “utilities” folder; prove dead code with the specialized cleanup lane.
451
+
452
+ ### Example Transformation
453
+ Before: an obsolete component appears unused. After: route actual proof and deletion through `fec-refactor-clean`, including dynamic-reference checks.
@@ -0,0 +1,59 @@
1
+ ---
2
+ name: fec-refactoring-validation
3
+ description: Use when proving that a frontend refactoring preserved existing behavior, selecting an appropriate safety net, validating each structural step, or assigning a PASS, PARTIAL, or NOT PROVEN preservation verdict.
4
+ ---
5
+
6
+ # Skill: Refactoring Validation
7
+
8
+ ## Purpose
9
+
10
+ Define the observable contract and the smallest credible evidence needed to prove that structural edits preserved existing frontend behavior.
11
+
12
+ ## Procedure
13
+
14
+ 1. Record the relevant behavior contract before substantial edits.
15
+ 2. Classify safety-net coverage as A, B, or C.
16
+ 3. Run and record the pre-change baseline.
17
+ 4. Match verification to the current refactoring risk and affected boundary.
18
+ 5. After every structural step, run the narrowest sufficient check immediately.
19
+ 6. If a newly introduced failure appears, revert that step before broader repair.
20
+ 7. At the end, run the broad gates justified by the affected surface.
21
+ 8. Assign PASS, PARTIAL, or NOT PROVEN from evidence, not optimism.
22
+
23
+ Pure structural work uses **GREEN → REFACTOR → GREEN**.
24
+
25
+ ## Safety-Net Levels
26
+
27
+ | Level | Evidence | Execution guidance |
28
+ | --- | --- | --- |
29
+ | A — Strong | Existing tests cover relevant behavior | Use tests as the primary safety net |
30
+ | B — Partial | Important behavior is only partly covered | Add focused characterization of current behavior before risky steps |
31
+ | C — None | No useful automated behavior coverage | Do not auto-install a framework; keep CAUTION/DANGER plan-only unless a minimal safety net is authorized |
32
+
33
+ ## Frontend Contract Checklist
34
+
35
+ Check relevant items, not every item mechanically:
36
+
37
+ - function inputs, outputs, exceptions, and error mapping;
38
+ - DOM structure that consumers depend on, visible states, focus, keyboard flow, and accessibility semantics;
39
+ - props, emits, slots, hook/composable return values, and event ordering;
40
+ - requests, payloads, cancellation, retries, cache keys, and loading/error transitions;
41
+ - store state, persistence, object identity, memoization, refs/reactivity, and lifecycle timing;
42
+ - routes, URLs, guards, package exports, serialized fields, and backend-facing DTOs.
43
+
44
+ ## References
45
+
46
+ - Load [behavior-preservation.md](references/behavior-preservation.md) for contract construction and proof levels.
47
+ - Load [refactoring-test-checklist.md](references/refactoring-test-checklist.md) for targeted verification by frontend risk.
48
+
49
+ ## Constraints
50
+
51
+ - Passing unrelated tests does not prove preservation.
52
+ - A green test written only after the change is weaker evidence than a pre-change baseline or characterization test.
53
+ - Do not rewrite expected values simply because the refactor changed behavior.
54
+ - Do not hide missing proof behind a PASS label.
55
+ - Do not install a new test framework without explicit authorization.
56
+
57
+ ## Expected Output
58
+
59
+ A behavior-preservation record containing baseline status, safety-net level, per-step checks, final validation, unresolved coverage gaps, and a PASS/PARTIAL/NOT PROVEN verdict.
@@ -0,0 +1,53 @@
1
+ # Behavior Preservation
2
+
3
+ ## Build the Contract
4
+
5
+ Before changing structure, identify which observations must remain stable. Use the smallest contract that fully covers the affected boundary.
6
+
7
+ ### Functional contract
8
+
9
+ - accepted inputs and normalization;
10
+ - return values and output ordering;
11
+ - errors, exceptions, and fallback behavior;
12
+ - side effects and significant ordering.
13
+
14
+ ### UI contract
15
+
16
+ - rendered states and user-visible text/data;
17
+ - enabled/disabled behavior;
18
+ - focus and keyboard transitions;
19
+ - event/callback ordering;
20
+ - accessibility relationships that users or tests rely on.
21
+
22
+ ### State and async contract
23
+
24
+ - store transitions and persistence;
25
+ - request count, URL, method, payload, cancellation, retry, and error mapping;
26
+ - loading/error/empty state timing;
27
+ - React identity/memoization and hook dependency semantics;
28
+ - Vue `ref`, `reactive`, `computed`, `watch`, and lifecycle identity/timing.
29
+
30
+ ### Public contract
31
+
32
+ - exported symbols and call signatures;
33
+ - routes and URL parameters;
34
+ - serialized fields and API DTOs;
35
+ - extension, plugin, template, or runtime registration points.
36
+
37
+ ## Characterization Tests
38
+
39
+ When behavior is important but weakly covered, write a narrow test that captures current behavior before a risky structural edit. It may pass immediately because it records the existing contract. Do not broaden it into a new requirement.
40
+
41
+ ## Verdicts
42
+
43
+ ### PASS
44
+
45
+ Use only when the relevant contract is well identified, the before/after baseline is comparable, and all required checks pass.
46
+
47
+ ### PARTIAL
48
+
49
+ Use when checks pass but meaningful paths remain untested or only static/manual evidence covers an important boundary.
50
+
51
+ ### NOT PROVEN
52
+
53
+ Use when dependencies cannot be installed, required tools cannot run, the baseline is ambiguous, or the safety net cannot credibly distinguish preservation from accidental behavior change.
@@ -0,0 +1,42 @@
1
+ # Refactoring Test Checklist
2
+
3
+ ## Local Function or Module
4
+
5
+ - targeted unit tests for inputs, outputs, and errors;
6
+ - typecheck of affected package/module;
7
+ - callers compile with unchanged contracts;
8
+ - no public export change unless planned.
9
+
10
+ ## React
11
+
12
+ - hook order and dependency arrays remain valid;
13
+ - stale closure behavior is not introduced;
14
+ - controlled/uncontrolled ownership remains stable;
15
+ - memoization or referential equality assumptions are preserved;
16
+ - effect cleanup, request cancellation, and event order remain stable;
17
+ - Server/Client boundaries and hydration behavior are unchanged when relevant.
18
+
19
+ ## Vue
20
+
21
+ - `ref`/`reactive` identity and unwrapping semantics remain stable;
22
+ - computed values stay derived rather than duplicated mutable state;
23
+ - watchers keep intended source, flush timing, and cleanup;
24
+ - props, emits, slots, and expose contracts remain stable;
25
+ - Pinia store ownership and persistence remain stable.
26
+
27
+ ## API and Data
28
+
29
+ - request shape, headers, auth refresh, cancellation, retry, and errors remain stable;
30
+ - field renames do not cross DTO, storage, query-string, or backend contracts unintentionally;
31
+ - sorting/filtering transformations preserve order, duplicates, and edge cases;
32
+ - reference-to-value or value-to-reference changes preserve required identity semantics.
33
+
34
+ ## Routing and Runtime Registration
35
+
36
+ - route names/paths/guards remain stable;
37
+ - dynamic imports and lazy registrations remain discoverable;
38
+ - Storybook, i18n, CSS/Tailwind dynamic classes, runtime templates, and generated metadata are not broken by search-only reasoning.
39
+
40
+ ## Final Ladder
41
+
42
+ Run available checks from narrowest to broadest: targeted tests -> affected integration tests -> lint/typecheck -> full tests -> build -> E2E/SSR/visual/a11y/performance specialty gates when the refactoring touches those risks.
@@ -5,6 +5,22 @@ description: Use when reviewing frontend security risks such as XSS, CSRF, sensi
5
5
 
6
6
  # Front-end security review
7
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.
23
+
8
24
  ## Purpose
9
25
 
10
26
  Identify client-side security risks in front-end code and recommend actionable fixes.
@@ -36,3 +52,7 @@ Identify client-side security risks in front-end code and recommend actionable f
36
52
  ## Expected Output
37
53
 
38
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`.
55
+
56
+ ## Engineering practices
57
+
58
+ Read the [local engineering decisions](references/engineering-practices.md) for this task and follow their links to relevant shared principles. Apply levels and exceptions against actual project contracts; product frontend/backend labels do not constrain language or role.