@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,550 @@
1
+ # Inheritance 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-PULL-UP-METHOD — Pull Up Method
6
+
7
+ ### Intent
8
+ Move equivalent subclass behavior to a superclass when it is truly shared.
9
+
10
+ ### Typical Signals
11
+ - Sibling subclasses contain the same behavior or behavior that can be generalized without type checks.
12
+
13
+ ### Avoid When
14
+ - Do not pull up code that only looks similar but depends on subtype-specific semantics.
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. Compare implementations and make differences explicit.
22
+ 2. Align signatures/fields needed by the shared method.
23
+ 3. Move one shared implementation to the superclass.
24
+ 4. Remove duplicates and verify substitutability.
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-DUPLICATED-CODE`
32
+
33
+ ### Composes Well With
34
+ - `RF-PUSH-DOWN-METHOD` when its preconditions independently hold.
35
+
36
+ ### JavaScript Notes
37
+ - Preserve prototype behavior, constructor order, `instanceof`, method binding, and super calls in legacy OO code.
38
+
39
+ ### TypeScript Notes
40
+ - Track structural typing, discriminated unions, abstract contracts, visibility, and public subtype APIs.
41
+
42
+ ### React Notes
43
+ - React components should normally use composition, hooks, render props, or delegates rather than class inheritance.
44
+
45
+ ### Vue Notes
46
+ - Vue components should normally use composition, composables, slots, and delegation rather than inheritance.
47
+
48
+ ### Frontend-Craft Adaptation
49
+ - These techniques primarily serve genuine legacy OO JS/TS, domain models, SDKs, and editor engines; translate intent to composition when frontend architecture is composition-first.
50
+
51
+ ### Example Transformation
52
+ Before: two legacy editor subclasses implement identical `isDirty()`. After: the base editor owns it if both contracts are truly the same.
53
+
54
+ ## RF-PULL-UP-FIELD — Pull Up Field
55
+
56
+ ### Intent
57
+ Move duplicated subclass state to a superclass when every relevant subtype owns the same concept.
58
+
59
+ ### Typical Signals
60
+ - Sibling subclasses declare the same field with the same meaning.
61
+
62
+ ### Avoid When
63
+ - Do not pull up fields that merely share a name but have different invariants or lifecycles.
64
+
65
+ ### Preconditions
66
+ - Current observable behavior and affected callers are understood.
67
+ - The target scope is inside a declared diff budget and can be verified after this one primary transformation.
68
+
69
+ ### Mechanics
70
+ 1. Confirm semantic equivalence and initialization.
71
+ 2. Add the field to the superclass.
72
+ 3. Redirect subclass initialization/access.
73
+ 4. Remove duplicate fields.
74
+
75
+ ### Behavior-Preservation Checkpoints
76
+ - Compare inputs, outputs, exceptions, side effects, ordering, and public contracts before/after the step.
77
+ - For frontend code, also check UI state, events, focus, network behavior, lifecycle/state transitions, and relevant identity semantics.
78
+
79
+ ### Related Code Smells
80
+ - No single code smell required; select from concrete structural evidence.
81
+
82
+ ### Composes Well With
83
+ - `RF-PUSH-DOWN-FIELD` when its preconditions independently hold.
84
+
85
+ ### JavaScript Notes
86
+ - Preserve prototype behavior, constructor order, `instanceof`, method binding, and super calls in legacy OO code.
87
+
88
+ ### TypeScript Notes
89
+ - Track structural typing, discriminated unions, abstract contracts, visibility, and public subtype APIs.
90
+
91
+ ### React Notes
92
+ - React components should normally use composition, hooks, render props, or delegates rather than class inheritance.
93
+
94
+ ### Vue Notes
95
+ - Vue components should normally use composition, composables, slots, and delegation rather than inheritance.
96
+
97
+ ### Frontend-Craft Adaptation
98
+ - These techniques primarily serve genuine legacy OO JS/TS, domain models, SDKs, and editor engines; translate intent to composition when frontend architecture is composition-first.
99
+
100
+ ### Example Transformation
101
+ Before: several legacy transport subclasses keep the same `endpoint` state. After: the common base owns it if semantics match.
102
+
103
+ ## RF-PULL-UP-CONSTRUCTOR-BODY — Pull Up Constructor Body
104
+
105
+ ### Intent
106
+ Move common subclass initialization into the superclass while leaving variant initialization in subclasses.
107
+
108
+ ### Typical Signals
109
+ - Subclass constructors repeat the same base-field setup.
110
+
111
+ ### Avoid When
112
+ - Avoid moving initialization that depends on subtype-only state before it is ready.
113
+
114
+ ### Preconditions
115
+ - Current observable behavior and affected callers are understood.
116
+ - The target scope is inside a declared diff budget and can be verified after this one primary transformation.
117
+
118
+ ### Mechanics
119
+ 1. Align common constructor parameters.
120
+ 2. Move one common initialization step to `super`/base initialization.
121
+ 3. Keep subtype-specific steps after the base is valid.
122
+ 4. Verify construction order and overridden-method hazards.
123
+
124
+ ### Behavior-Preservation Checkpoints
125
+ - Compare inputs, outputs, exceptions, side effects, ordering, and public contracts before/after the step.
126
+ - For frontend code, also check UI state, events, focus, network behavior, lifecycle/state transitions, and relevant identity semantics.
127
+
128
+ ### Related Code Smells
129
+ - No single code smell required; select from concrete structural evidence.
130
+
131
+ ### Composes Well With
132
+ - Combine only with a separately justified next transformation; no fixed sequence is required.
133
+
134
+ ### JavaScript Notes
135
+ - Preserve prototype behavior, constructor order, `instanceof`, method binding, and super calls in legacy OO code.
136
+
137
+ ### TypeScript Notes
138
+ - Track structural typing, discriminated unions, abstract contracts, visibility, and public subtype APIs.
139
+
140
+ ### React Notes
141
+ - React components should normally use composition, hooks, render props, or delegates rather than class inheritance.
142
+
143
+ ### Vue Notes
144
+ - Vue components should normally use composition, composables, slots, and delegation rather than inheritance.
145
+
146
+ ### Frontend-Craft Adaptation
147
+ - These techniques primarily serve genuine legacy OO JS/TS, domain models, SDKs, and editor engines; translate intent to composition when frontend architecture is composition-first.
148
+
149
+ ### Example Transformation
150
+ Before: two legacy provider subclasses both initialize id/name before provider-specific config. After: base construction handles common identity.
151
+
152
+ ## RF-PUSH-DOWN-METHOD — Push Down Method
153
+
154
+ ### Intent
155
+ Move behavior from a superclass to the subclass(es) that actually need it.
156
+
157
+ ### Typical Signals
158
+ - A superclass method is meaningful only for a subset of subtypes.
159
+
160
+ ### Avoid When
161
+ - Do not push down merely because some subclasses do not call a valid shared method.
162
+
163
+ ### Preconditions
164
+ - Current observable behavior and affected callers are understood.
165
+ - The target scope is inside a declared diff budget and can be verified after this one primary transformation.
166
+
167
+ ### Mechanics
168
+ 1. Identify the true owning subtype set.
169
+ 2. Move/copy the method to those subtypes.
170
+ 3. Update base contract if necessary.
171
+ 4. Verify callers no longer rely on the broad superclass API.
172
+
173
+ ### Behavior-Preservation Checkpoints
174
+ - Compare inputs, outputs, exceptions, side effects, ordering, and public contracts before/after the step.
175
+ - For frontend code, also check UI state, events, focus, network behavior, lifecycle/state transitions, and relevant identity semantics.
176
+
177
+ ### Related Code Smells
178
+ - `SMELL-REFUSED-BEQUEST`
179
+
180
+ ### Composes Well With
181
+ - `RF-PULL-UP-METHOD` when its preconditions independently hold.
182
+
183
+ ### JavaScript Notes
184
+ - Preserve prototype behavior, constructor order, `instanceof`, method binding, and super calls in legacy OO code.
185
+
186
+ ### TypeScript Notes
187
+ - Track structural typing, discriminated unions, abstract contracts, visibility, and public subtype APIs.
188
+
189
+ ### React Notes
190
+ - React components should normally use composition, hooks, render props, or delegates rather than class inheritance.
191
+
192
+ ### Vue Notes
193
+ - Vue components should normally use composition, composables, slots, and delegation rather than inheritance.
194
+
195
+ ### Frontend-Craft Adaptation
196
+ - These techniques primarily serve genuine legacy OO JS/TS, domain models, SDKs, and editor engines; translate intent to composition when frontend architecture is composition-first.
197
+
198
+ ### Example Transformation
199
+ Before: a base editor exposes `exportToPdf()` but only document editors support it. After: move it to the appropriate subtype or capability delegate.
200
+
201
+ ## RF-PUSH-DOWN-FIELD — Push Down Field
202
+
203
+ ### Intent
204
+ Move state from a superclass to only the subclasses that require it.
205
+
206
+ ### Typical Signals
207
+ - A base field is unused or invalid for most subtypes.
208
+
209
+ ### Avoid When
210
+ - Do not narrow a field that is part of a valid shared contract even if some subtypes rarely use it.
211
+
212
+ ### Preconditions
213
+ - Current observable behavior and affected callers are understood.
214
+ - The target scope is inside a declared diff budget and can be verified after this one primary transformation.
215
+
216
+ ### Mechanics
217
+ 1. Map field reads/writes by subtype.
218
+ 2. Add the field to the real owner subtype.
219
+ 3. Move initialization/access.
220
+ 4. Remove the base field and verify construction/serialization.
221
+
222
+ ### Behavior-Preservation Checkpoints
223
+ - Compare inputs, outputs, exceptions, side effects, ordering, and public contracts before/after the step.
224
+ - For frontend code, also check UI state, events, focus, network behavior, lifecycle/state transitions, and relevant identity semantics.
225
+
226
+ ### Related Code Smells
227
+ - `SMELL-REFUSED-BEQUEST`
228
+
229
+ ### Composes Well With
230
+ - `RF-PULL-UP-FIELD` when its preconditions independently hold.
231
+
232
+ ### JavaScript Notes
233
+ - Preserve prototype behavior, constructor order, `instanceof`, method binding, and super calls in legacy OO code.
234
+
235
+ ### TypeScript Notes
236
+ - Track structural typing, discriminated unions, abstract contracts, visibility, and public subtype APIs.
237
+
238
+ ### React Notes
239
+ - React components should normally use composition, hooks, render props, or delegates rather than class inheritance.
240
+
241
+ ### Vue Notes
242
+ - Vue components should normally use composition, composables, slots, and delegation rather than inheritance.
243
+
244
+ ### Frontend-Craft Adaptation
245
+ - These techniques primarily serve genuine legacy OO JS/TS, domain models, SDKs, and editor engines; translate intent to composition when frontend architecture is composition-first.
246
+
247
+ ### Example Transformation
248
+ Before: base transport stores `imapFolder` though only IMAP transport uses it. After: the IMAP subtype owns that field.
249
+
250
+ ## RF-REPLACE-TYPE-CODE-WITH-SUBCLASSES — Replace Type Code with Subclasses
251
+
252
+ ### Intent
253
+ Represent stable variant-specific behavior with subtype-like alternatives instead of repeated type-code branching.
254
+
255
+ ### Typical Signals
256
+ - A type code controls substantial behavior and new variants repeatedly change the same branch sets.
257
+
258
+ ### Avoid When
259
+ - In modern frontend code, do not force inheritance; discriminated unions, strategy maps, component registries, or delegates may be the better subtype mechanism.
260
+
261
+ ### Preconditions
262
+ - Current observable behavior and affected callers are understood.
263
+ - The target scope is inside a declared diff budget and can be verified after this one primary transformation.
264
+
265
+ ### Mechanics
266
+ 1. Identify the stable type discriminator and variant boundaries.
267
+ 2. Introduce one variant representation at a time.
268
+ 3. Move type-specific behavior behind variant dispatch.
269
+ 4. Remove repeated type-code checks only after exhaustive handling is proven.
270
+
271
+ ### Behavior-Preservation Checkpoints
272
+ - Compare inputs, outputs, exceptions, side effects, ordering, and public contracts before/after the step.
273
+ - For frontend code, also check UI state, events, focus, network behavior, lifecycle/state transitions, and relevant identity semantics.
274
+
275
+ ### Related Code Smells
276
+ - `SMELL-PRIMITIVE-OBSESSION`
277
+ - `SMELL-LARGE-CLASS`
278
+
279
+ ### Composes Well With
280
+ - Replace Conditional with Polymorphism when its preconditions independently hold.
281
+ - `RF-REMOVE-SUBCLASS` when its preconditions independently hold.
282
+
283
+ ### JavaScript Notes
284
+ - Preserve prototype behavior, constructor order, `instanceof`, method binding, and super calls in legacy OO code.
285
+
286
+ ### TypeScript Notes
287
+ - Track structural typing, discriminated unions, abstract contracts, visibility, and public subtype APIs.
288
+
289
+ ### React Notes
290
+ - React components should normally use composition, hooks, render props, or delegates rather than class inheritance.
291
+
292
+ ### Vue Notes
293
+ - Vue components should normally use composition, composables, slots, and delegation rather than inheritance.
294
+
295
+ ### Frontend-Craft Adaptation
296
+ - These techniques primarily serve genuine legacy OO JS/TS, domain models, SDKs, and editor engines; translate intent to composition when frontend architecture is composition-first.
297
+
298
+ ### Example Transformation
299
+ Before: editor mode strings drive repeated switches. After: use a discriminated union + strategy registry, or subclasses only in a genuine OO domain model.
300
+
301
+ ## RF-REMOVE-SUBCLASS — Remove Subclass
302
+
303
+ ### Intent
304
+ Remove subclasses whose variation no longer warrants separate types, preserving the distinction as data or simpler behavior when needed.
305
+
306
+ ### Typical Signals
307
+ - Subclasses differ only trivially or a former behavior distinction has disappeared.
308
+
309
+ ### Avoid When
310
+ - Keep subclasses when substitutable behavior remains materially different and the hierarchy is useful.
311
+
312
+ ### Preconditions
313
+ - Current observable behavior and affected callers are understood.
314
+ - The target scope is inside a declared diff budget and can be verified after this one primary transformation.
315
+
316
+ ### Mechanics
317
+ 1. Move unique behavior/state to the superclass or an explicit field/strategy.
318
+ 2. Migrate construction to the unified type.
319
+ 3. Update callers that inspect subtype identity.
320
+ 4. Remove subclass declarations after behavior is covered.
321
+
322
+ ### Behavior-Preservation Checkpoints
323
+ - Compare inputs, outputs, exceptions, side effects, ordering, and public contracts before/after the step.
324
+ - For frontend code, also check UI state, events, focus, network behavior, lifecycle/state transitions, and relevant identity semantics.
325
+
326
+ ### Related Code Smells
327
+ - No single code smell required; select from concrete structural evidence.
328
+
329
+ ### Composes Well With
330
+ - Combine only with a separately justified next transformation; no fixed sequence is required.
331
+
332
+ ### JavaScript Notes
333
+ - Preserve prototype behavior, constructor order, `instanceof`, method binding, and super calls in legacy OO code.
334
+
335
+ ### TypeScript Notes
336
+ - Track structural typing, discriminated unions, abstract contracts, visibility, and public subtype APIs.
337
+
338
+ ### React Notes
339
+ - React components should normally use composition, hooks, render props, or delegates rather than class inheritance.
340
+
341
+ ### Vue Notes
342
+ - Vue components should normally use composition, composables, slots, and delegation rather than inheritance.
343
+
344
+ ### Frontend-Craft Adaptation
345
+ - These techniques primarily serve genuine legacy OO JS/TS, domain models, SDKs, and editor engines; translate intent to composition when frontend architecture is composition-first.
346
+
347
+ ### Example Transformation
348
+ Before: two legacy account subclasses differ only by a display label. After: one account type stores the label/type value when no variant behavior remains.
349
+
350
+ ## RF-EXTRACT-SUPERCLASS — Extract Superclass
351
+
352
+ ### Intent
353
+ Factor genuinely shared data/behavior from classes into a common abstraction.
354
+
355
+ ### Typical Signals
356
+ - Two or more classes independently implement the same concept and substitutability is useful.
357
+
358
+ ### Avoid When
359
+ - Do not create inheritance solely to deduplicate a few lines; composition may be clearer.
360
+
361
+ ### Preconditions
362
+ - Current observable behavior and affected callers are understood.
363
+ - The target scope is inside a declared diff budget and can be verified after this one primary transformation.
364
+
365
+ ### Mechanics
366
+ 1. Identify shared responsibilities and compatible contracts.
367
+ 2. Introduce the superclass/abstract contract.
368
+ 3. Move one shared member at a time.
369
+ 4. Verify subtype behavior and external substitution.
370
+
371
+ ### Behavior-Preservation Checkpoints
372
+ - Compare inputs, outputs, exceptions, side effects, ordering, and public contracts before/after the step.
373
+ - For frontend code, also check UI state, events, focus, network behavior, lifecycle/state transitions, and relevant identity semantics.
374
+
375
+ ### Related Code Smells
376
+ - `SMELL-LARGE-CLASS`
377
+ - `SMELL-ALTERNATIVE-CLASSES-DIFFERENT-INTERFACES`
378
+
379
+ ### Composes Well With
380
+ - Combine only with a separately justified next transformation; no fixed sequence is required.
381
+
382
+ ### JavaScript Notes
383
+ - Preserve prototype behavior, constructor order, `instanceof`, method binding, and super calls in legacy OO code.
384
+
385
+ ### TypeScript Notes
386
+ - Track structural typing, discriminated unions, abstract contracts, visibility, and public subtype APIs.
387
+
388
+ ### React Notes
389
+ - React components should normally use composition, hooks, render props, or delegates rather than class inheritance.
390
+
391
+ ### Vue Notes
392
+ - Vue components should normally use composition, composables, slots, and delegation rather than inheritance.
393
+
394
+ ### Frontend-Craft Adaptation
395
+ - These techniques primarily serve genuine legacy OO JS/TS, domain models, SDKs, and editor engines; translate intent to composition when frontend architecture is composition-first.
396
+
397
+ ### Example Transformation
398
+ Before: two legacy parser classes share identity and diagnostics. After: extract a base only if callers benefit from the common contract; otherwise prefer a shared module.
399
+
400
+ ## RF-COLLAPSE-HIERARCHY — Collapse Hierarchy
401
+
402
+ ### Intent
403
+ Merge a superclass/subclass pair when the distinction no longer carries meaningful behavior or substitution value.
404
+
405
+ ### Typical Signals
406
+ - A hierarchy level is empty, nearly empty, or adds only indirection.
407
+
408
+ ### Avoid When
409
+ - Do not collapse a public subtype boundary without checking external consumers and serialization/type contracts.
410
+
411
+ ### Preconditions
412
+ - Current observable behavior and affected callers are understood.
413
+ - The target scope is inside a declared diff budget and can be verified after this one primary transformation.
414
+
415
+ ### Mechanics
416
+ 1. Choose the surviving type.
417
+ 2. Move fields/methods across the boundary.
418
+ 3. Update construction and type checks.
419
+ 4. Remove the redundant class after verification.
420
+
421
+ ### Behavior-Preservation Checkpoints
422
+ - Compare inputs, outputs, exceptions, side effects, ordering, and public contracts before/after the step.
423
+ - For frontend code, also check UI state, events, focus, network behavior, lifecycle/state transitions, and relevant identity semantics.
424
+
425
+ ### Related Code Smells
426
+ - `SMELL-LAZY-ELEMENT`
427
+ - `SMELL-SPECULATIVE-GENERALITY`
428
+
429
+ ### Composes Well With
430
+ - Combine only with a separately justified next transformation; no fixed sequence is required.
431
+
432
+ ### JavaScript Notes
433
+ - Preserve prototype behavior, constructor order, `instanceof`, method binding, and super calls in legacy OO code.
434
+
435
+ ### TypeScript Notes
436
+ - Track structural typing, discriminated unions, abstract contracts, visibility, and public subtype APIs.
437
+
438
+ ### React Notes
439
+ - React components should normally use composition, hooks, render props, or delegates rather than class inheritance.
440
+
441
+ ### Vue Notes
442
+ - Vue components should normally use composition, composables, slots, and delegation rather than inheritance.
443
+
444
+ ### Frontend-Craft Adaptation
445
+ - These techniques primarily serve genuine legacy OO JS/TS, domain models, SDKs, and editor engines; translate intent to composition when frontend architecture is composition-first.
446
+
447
+ ### Example Transformation
448
+ Before: an old `SpecialMailbox` subclass has no unique behavior after earlier cleanup. After: merge it into `Mailbox` if no public subtype contract remains.
449
+
450
+ ## RF-REPLACE-SUBCLASS-WITH-DELEGATE — Replace Subclass with Delegate
451
+
452
+ ### Intent
453
+ Move one axis of variation from inheritance into a delegate so an object can combine behaviors more flexibly.
454
+
455
+ ### Typical Signals
456
+ - Subclasses exist for a variation that conflicts with other inheritance needs or multiplies combinations.
457
+
458
+ ### Avoid When
459
+ - Avoid delegation when the hierarchy is simple, stable, and accurately models substitutability.
460
+
461
+ ### Preconditions
462
+ - Current observable behavior and affected callers are understood.
463
+ - The target scope is inside a declared diff budget and can be verified after this one primary transformation.
464
+
465
+ ### Mechanics
466
+ 1. Create a delegate/strategy for the varying behavior.
467
+ 2. Have the base object forward one behavior to it.
468
+ 3. Migrate subtype-specific state/behavior.
469
+ 4. Remove subclasses when no unique responsibility remains.
470
+
471
+ ### Behavior-Preservation Checkpoints
472
+ - Compare inputs, outputs, exceptions, side effects, ordering, and public contracts before/after the step.
473
+ - For frontend code, also check UI state, events, focus, network behavior, lifecycle/state transitions, and relevant identity semantics.
474
+
475
+ ### Related Code Smells
476
+ - `SMELL-MIDDLE-MAN`
477
+ - `SMELL-INSIDER-TRADING`
478
+ - `SMELL-REFUSED-BEQUEST`
479
+
480
+ ### Composes Well With
481
+ - `RF-REPLACE-SUPERCLASS-WITH-DELEGATE` when its preconditions independently hold.
482
+
483
+ ### JavaScript Notes
484
+ - Preserve prototype behavior, constructor order, `instanceof`, method binding, and super calls in legacy OO code.
485
+
486
+ ### TypeScript Notes
487
+ - Track structural typing, discriminated unions, abstract contracts, visibility, and public subtype APIs.
488
+
489
+ ### React Notes
490
+ - React components should normally use composition, hooks, render props, or delegates rather than class inheritance.
491
+
492
+ ### Vue Notes
493
+ - Vue components should normally use composition, composables, slots, and delegation rather than inheritance.
494
+
495
+ ### Frontend-Craft Adaptation
496
+ - These techniques primarily serve genuine legacy OO JS/TS, domain models, SDKs, and editor engines; translate intent to composition when frontend architecture is composition-first.
497
+
498
+ ### Example Transformation
499
+ Before: message renderer subclasses differ only by formatting strategy. After: renderer delegates to a format strategy/component map where composition is clearer.
500
+
501
+ ## RF-REPLACE-SUPERCLASS-WITH-DELEGATE — Replace Superclass with Delegate
502
+
503
+ ### Intent
504
+ Replace an inaccurate inheritance relationship with delegation to the reused capability.
505
+
506
+ ### Typical Signals
507
+ - A subclass inherits a broad API only to reuse implementation and is not truly substitutable for the superclass.
508
+
509
+ ### Avoid When
510
+ - Keep inheritance when the subtype contract is semantically valid and clients depend on substitution.
511
+
512
+ ### Preconditions
513
+ - Current observable behavior and affected callers are understood.
514
+ - The target scope is inside a declared diff budget and can be verified after this one primary transformation.
515
+
516
+ ### Mechanics
517
+ 1. Create a field holding the former superclass capability.
518
+ 2. Forward only the operations the object actually needs.
519
+ 3. Remove `extends` and inherited assumptions.
520
+ 4. Verify public type compatibility and composition behavior.
521
+
522
+ ### Behavior-Preservation Checkpoints
523
+ - Compare inputs, outputs, exceptions, side effects, ordering, and public contracts before/after the step.
524
+ - For frontend code, also check UI state, events, focus, network behavior, lifecycle/state transitions, and relevant identity semantics.
525
+
526
+ ### Related Code Smells
527
+ - `SMELL-MIDDLE-MAN`
528
+ - `SMELL-INSIDER-TRADING`
529
+ - `SMELL-REFUSED-BEQUEST`
530
+
531
+ ### Composes Well With
532
+ - Combine only with a separately justified next transformation; no fixed sequence is required.
533
+
534
+ ### JavaScript Notes
535
+ - Preserve prototype behavior, constructor order, `instanceof`, method binding, and super calls in legacy OO code.
536
+
537
+ ### TypeScript Notes
538
+ - Track structural typing, discriminated unions, abstract contracts, visibility, and public subtype APIs.
539
+
540
+ ### React Notes
541
+ - React components should normally use composition, hooks, render props, or delegates rather than class inheritance.
542
+
543
+ ### Vue Notes
544
+ - Vue components should normally use composition, composables, slots, and delegation rather than inheritance.
545
+
546
+ ### Frontend-Craft Adaptation
547
+ - These techniques primarily serve genuine legacy OO JS/TS, domain models, SDKs, and editor engines; translate intent to composition when frontend architecture is composition-first.
548
+
549
+ ### Example Transformation
550
+ Before: an editor extends a collection class merely to reuse storage methods. After: the editor owns a collection delegate and exposes only editor-relevant operations.
@@ -0,0 +1,25 @@
1
+ ---
2
+ name: fec-refactoring-move-features
3
+ description: Use when behavior-preserving frontend refactoring focuses on behavior/data ownership, statement placement, loops, or dead-code knowledge, and the selected technique needs family-specific mechanics, risks, and JavaScript/TypeScript/React/Vue adaptation.
4
+ ---
5
+
6
+ # Moving Feature Refactorings
7
+
8
+ ## Overview
9
+ Use this family after evidence identifies a fitting structural transformation. Apply one primary technique at a time and verify immediately.
10
+
11
+ ## Procedure
12
+ 1. Confirm the selected technique and its preconditions in [Moving Feature Refactorings](references/moving-refactorings.md).
13
+ 2. Record affected behavior and a diff budget.
14
+ 3. Apply only the selected technique's smallest viable step.
15
+ 4. Verify the step before composing another transformation.
16
+ 5. Stop and reassess when public contracts, lifecycle, state identity, or actual scope exceed expectations.
17
+
18
+ ## Quick Reference
19
+ The family reference contains 9 canonical techniques with intent, signals, avoid conditions, mechanics, preservation checkpoints, smell links, composition hints, JavaScript/TypeScript notes, React/Vue notes, adaptation guidance, and original frontend examples.
20
+
21
+ ## Common Mistakes
22
+ - Choosing a technique by name without checking its preconditions.
23
+ - Combining several structural intentions in one diff.
24
+ - Assuming a classical class-based form is mandatory in modern frontend code.
25
+ - Treating passing tests as proof when the relevant behavior is not covered.