@bovinphang/frontend-craft 2.9.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 (579) hide show
  1. package/.claude-plugin/marketplace.json +3 -3
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +403 -378
  4. package/CHANGELOG.zh-CN.md +402 -377
  5. package/CONTRIBUTING.md +381 -371
  6. package/CONTRIBUTING.zh-CN.md +383 -371
  7. package/README.md +605 -545
  8. package/README.openclaw.md +395 -359
  9. package/README.openclaw.zh-CN.md +395 -359
  10. package/README.zh-CN.md +605 -545
  11. package/agents/fec-typescript-reviewer.md +1 -1
  12. package/common-content.lock.json +3795 -0
  13. package/dist/bin/frontend-craft.js +353 -174
  14. package/docs/common-migration.md +61 -0
  15. package/docs/example-prompts.md +157 -157
  16. package/docs/ja-JP/README.md +588 -534
  17. package/docs/ko-KR/README.md +588 -534
  18. package/docs/project-structure.md +166 -151
  19. package/docs/review-and-diagram-workflows.md +5 -5
  20. package/docs/runtimes/antigravity.md +18 -18
  21. package/docs/runtimes/augment.md +18 -18
  22. package/docs/runtimes/claude.md +193 -191
  23. package/docs/runtimes/claude.zh-CN.md +191 -189
  24. package/docs/runtimes/cline.md +18 -18
  25. package/docs/runtimes/codebuddy.md +18 -18
  26. package/docs/runtimes/codex.md +18 -18
  27. package/docs/runtimes/compatibility.md +42 -27
  28. package/docs/runtimes/copilot.md +18 -18
  29. package/docs/runtimes/cursor.md +18 -18
  30. package/docs/runtimes/gemini.md +18 -18
  31. package/docs/runtimes/kilo.md +18 -18
  32. package/docs/runtimes/openclaw.md +18 -18
  33. package/docs/runtimes/opencode.md +18 -18
  34. package/docs/runtimes/qoder.md +18 -18
  35. package/docs/runtimes/trae.md +18 -18
  36. package/docs/runtimes/windsurf.md +18 -18
  37. package/docs/zh-CN/common-migration.md +57 -0
  38. package/docs/zh-CN/example-prompts.md +157 -157
  39. package/docs/zh-CN/project-structure.md +166 -148
  40. package/docs/zh-CN/review-and-diagram-workflows.md +5 -5
  41. package/docs/zh-TW/README.md +588 -534
  42. package/localized/zh-CN/agents/fec-typescript-reviewer.md +1 -1
  43. package/localized/zh-CN/skills/cc-c-project-standard/SKILL.md +25 -0
  44. package/localized/zh-CN/skills/cc-c-project-standard/examples/engineering/README.md +7 -0
  45. package/localized/zh-CN/skills/cc-c-project-standard/examples/engineering/boundary.c +26 -0
  46. package/localized/zh-CN/skills/cc-c-project-standard/examples/engineering/boundary.h +15 -0
  47. package/localized/zh-CN/skills/cc-c-project-standard/examples/engineering/boundary_test.c +73 -0
  48. package/localized/zh-CN/skills/cc-c-project-standard/references/common/engineering-practices.md +237 -0
  49. package/localized/zh-CN/skills/cc-c-project-standard/references/common/engineering-practices.rules.json +121 -0
  50. package/localized/zh-CN/skills/cc-c-project-standard/references/common/engineering-practices.sources.json +377 -0
  51. package/localized/zh-CN/skills/cc-c-project-standard/references/engineering-practices.md +106 -0
  52. package/localized/zh-CN/skills/cc-c-project-standard/references/practice.md +37 -0
  53. package/localized/zh-CN/skills/cc-cpp-project-standard/SKILL.md +25 -0
  54. package/localized/zh-CN/skills/cc-cpp-project-standard/examples/engineering/README.md +7 -0
  55. package/localized/zh-CN/skills/cc-cpp-project-standard/examples/engineering/boundary.cpp +26 -0
  56. package/localized/zh-CN/skills/cc-cpp-project-standard/examples/engineering/boundary.hpp +12 -0
  57. package/localized/zh-CN/skills/cc-cpp-project-standard/examples/engineering/boundary_test.cpp +38 -0
  58. package/localized/zh-CN/skills/cc-cpp-project-standard/references/common/engineering-practices.md +237 -0
  59. package/localized/zh-CN/skills/cc-cpp-project-standard/references/common/engineering-practices.rules.json +121 -0
  60. package/localized/zh-CN/skills/cc-cpp-project-standard/references/common/engineering-practices.sources.json +377 -0
  61. package/localized/zh-CN/skills/cc-cpp-project-standard/references/engineering-practices.md +106 -0
  62. package/localized/zh-CN/skills/cc-cpp-project-standard/references/practice.md +37 -0
  63. package/localized/zh-CN/skills/cc-debug-methodology/SKILL.md +8 -0
  64. package/localized/zh-CN/skills/cc-debug-methodology/references/method.md +13 -0
  65. package/localized/zh-CN/skills/cc-doc-sync-core/SKILL.md +8 -0
  66. package/localized/zh-CN/skills/cc-doc-sync-core/references/method.md +12 -0
  67. package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/SKILL.md +5 -5
  68. package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/references/flowchart-quality.md +1 -1
  69. package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/references/layout-and-export.md +9 -9
  70. package/localized/zh-CN/skills/cc-electron-project-standard/SKILL.md +21 -0
  71. package/localized/zh-CN/skills/cc-electron-project-standard/examples/engineering/README.md +7 -0
  72. package/localized/zh-CN/skills/cc-electron-project-standard/examples/engineering/ipc-lifecycle.cjs +44 -0
  73. package/localized/zh-CN/skills/cc-electron-project-standard/examples/engineering/ipc-lifecycle.test.cjs +44 -0
  74. package/localized/zh-CN/skills/cc-electron-project-standard/examples/engineering/package.json +8 -0
  75. package/localized/zh-CN/skills/cc-electron-project-standard/examples/minimal/README.md +9 -0
  76. package/localized/zh-CN/skills/cc-electron-project-standard/examples/minimal/boundary.cjs +19 -0
  77. package/localized/zh-CN/skills/cc-electron-project-standard/examples/minimal/boundary.test.cjs +7 -0
  78. package/localized/zh-CN/skills/cc-electron-project-standard/examples/minimal/index.html +1 -0
  79. package/localized/zh-CN/skills/cc-electron-project-standard/examples/minimal/main.cjs +20 -0
  80. package/localized/zh-CN/skills/cc-electron-project-standard/examples/minimal/package.json +9 -0
  81. package/localized/zh-CN/skills/cc-electron-project-standard/examples/minimal/preload.cjs +2 -0
  82. package/localized/zh-CN/skills/cc-electron-project-standard/examples/minimal/renderer.js +4 -0
  83. package/localized/zh-CN/skills/cc-electron-project-standard/references/common/engineering-practices.md +237 -0
  84. package/localized/zh-CN/skills/cc-electron-project-standard/references/common/engineering-practices.rules.json +121 -0
  85. package/localized/zh-CN/skills/cc-electron-project-standard/references/common/engineering-practices.sources.json +377 -0
  86. package/localized/zh-CN/skills/cc-electron-project-standard/references/engineering-practices.md +73 -0
  87. package/localized/zh-CN/skills/cc-electron-project-standard/references/practice.md +19 -0
  88. package/localized/zh-CN/skills/cc-electron-project-standard/references/verification.md +17 -0
  89. package/localized/zh-CN/skills/cc-go-concurrency/SKILL.md +25 -0
  90. package/localized/zh-CN/skills/cc-go-concurrency/references/common/engineering-practices.md +237 -0
  91. package/localized/zh-CN/skills/cc-go-concurrency/references/common/engineering-practices.rules.json +121 -0
  92. package/localized/zh-CN/skills/cc-go-concurrency/references/common/engineering-practices.sources.json +377 -0
  93. package/localized/zh-CN/skills/cc-go-concurrency/references/engineering-practices.md +73 -0
  94. package/localized/zh-CN/skills/cc-go-concurrency/references/practice.md +37 -0
  95. package/localized/zh-CN/skills/cc-go-project-standard/SKILL.md +25 -0
  96. package/localized/zh-CN/skills/cc-go-project-standard/examples/engineering/README.md +7 -0
  97. package/localized/zh-CN/skills/cc-go-project-standard/examples/engineering/go.mod +3 -0
  98. package/localized/zh-CN/skills/cc-go-project-standard/examples/engineering/lifecycle.go +71 -0
  99. package/localized/zh-CN/skills/cc-go-project-standard/examples/engineering/lifecycle_test.go +22 -0
  100. package/localized/zh-CN/skills/cc-go-project-standard/references/common/engineering-practices.md +237 -0
  101. package/localized/zh-CN/skills/cc-go-project-standard/references/common/engineering-practices.rules.json +121 -0
  102. package/localized/zh-CN/skills/cc-go-project-standard/references/common/engineering-practices.sources.json +377 -0
  103. package/localized/zh-CN/skills/cc-go-project-standard/references/engineering-practices.md +106 -0
  104. package/localized/zh-CN/skills/cc-go-project-standard/references/practice.md +37 -0
  105. package/localized/zh-CN/skills/cc-java-project-standard/SKILL.md +25 -0
  106. package/localized/zh-CN/skills/cc-java-project-standard/examples/engineering/README.md +5 -0
  107. package/localized/zh-CN/skills/cc-java-project-standard/examples/engineering/ResourceBoundary.java +26 -0
  108. package/localized/zh-CN/skills/cc-java-project-standard/examples/engineering/ResourceBoundaryTest.java +41 -0
  109. package/localized/zh-CN/skills/cc-java-project-standard/references/common/engineering-practices.md +237 -0
  110. package/localized/zh-CN/skills/cc-java-project-standard/references/common/engineering-practices.rules.json +121 -0
  111. package/localized/zh-CN/skills/cc-java-project-standard/references/common/engineering-practices.sources.json +377 -0
  112. package/localized/zh-CN/skills/cc-java-project-standard/references/engineering-practices.md +106 -0
  113. package/localized/zh-CN/skills/cc-java-project-standard/references/practice.md +37 -0
  114. package/localized/zh-CN/skills/cc-java-runtime/SKILL.md +25 -0
  115. package/localized/zh-CN/skills/cc-java-runtime/references/common/engineering-practices.md +237 -0
  116. package/localized/zh-CN/skills/cc-java-runtime/references/common/engineering-practices.rules.json +121 -0
  117. package/localized/zh-CN/skills/cc-java-runtime/references/common/engineering-practices.sources.json +377 -0
  118. package/localized/zh-CN/skills/cc-java-runtime/references/engineering-practices.md +73 -0
  119. package/localized/zh-CN/skills/cc-java-runtime/references/practice.md +37 -0
  120. package/localized/zh-CN/skills/cc-native-memory-safety/SKILL.md +25 -0
  121. package/localized/zh-CN/skills/cc-native-memory-safety/references/common/engineering-practices.md +237 -0
  122. package/localized/zh-CN/skills/cc-native-memory-safety/references/common/engineering-practices.rules.json +121 -0
  123. package/localized/zh-CN/skills/cc-native-memory-safety/references/common/engineering-practices.sources.json +377 -0
  124. package/localized/zh-CN/skills/cc-native-memory-safety/references/engineering-practices.md +73 -0
  125. package/localized/zh-CN/skills/cc-native-memory-safety/references/practice.md +37 -0
  126. package/localized/zh-CN/skills/cc-python-async/SKILL.md +25 -0
  127. package/localized/zh-CN/skills/cc-python-async/references/common/engineering-practices.md +237 -0
  128. package/localized/zh-CN/skills/cc-python-async/references/common/engineering-practices.rules.json +121 -0
  129. package/localized/zh-CN/skills/cc-python-async/references/common/engineering-practices.sources.json +377 -0
  130. package/localized/zh-CN/skills/cc-python-async/references/engineering-practices.md +73 -0
  131. package/localized/zh-CN/skills/cc-python-async/references/practice.md +37 -0
  132. package/localized/zh-CN/skills/cc-python-project-standard/SKILL.md +25 -0
  133. package/localized/zh-CN/skills/cc-python-project-standard/examples/engineering/README.md +7 -0
  134. package/localized/zh-CN/skills/cc-python-project-standard/examples/engineering/resource_boundary.py +37 -0
  135. package/localized/zh-CN/skills/cc-python-project-standard/examples/engineering/test_resource_boundary.py +49 -0
  136. package/localized/zh-CN/skills/cc-python-project-standard/references/common/engineering-practices.md +237 -0
  137. package/localized/zh-CN/skills/cc-python-project-standard/references/common/engineering-practices.rules.json +121 -0
  138. package/localized/zh-CN/skills/cc-python-project-standard/references/common/engineering-practices.sources.json +377 -0
  139. package/localized/zh-CN/skills/cc-python-project-standard/references/engineering-practices.md +106 -0
  140. package/localized/zh-CN/skills/cc-python-project-standard/references/practice.md +37 -0
  141. package/localized/zh-CN/skills/cc-refactoring-core/SKILL.md +8 -0
  142. package/localized/zh-CN/skills/cc-refactoring-core/references/method.md +16 -0
  143. package/localized/zh-CN/skills/cc-rust-async/SKILL.md +25 -0
  144. package/localized/zh-CN/skills/cc-rust-async/references/common/engineering-practices.md +237 -0
  145. package/localized/zh-CN/skills/cc-rust-async/references/common/engineering-practices.rules.json +121 -0
  146. package/localized/zh-CN/skills/cc-rust-async/references/common/engineering-practices.sources.json +377 -0
  147. package/localized/zh-CN/skills/cc-rust-async/references/engineering-practices.md +73 -0
  148. package/localized/zh-CN/skills/cc-rust-async/references/practice.md +37 -0
  149. package/localized/zh-CN/skills/cc-rust-project-standard/SKILL.md +25 -0
  150. package/localized/zh-CN/skills/cc-rust-project-standard/examples/engineering/Cargo.lock +7 -0
  151. package/localized/zh-CN/skills/cc-rust-project-standard/examples/engineering/Cargo.toml +8 -0
  152. package/localized/zh-CN/skills/cc-rust-project-standard/examples/engineering/README.md +5 -0
  153. package/localized/zh-CN/skills/cc-rust-project-standard/examples/engineering/src/lib.rs +43 -0
  154. package/localized/zh-CN/skills/cc-rust-project-standard/references/common/engineering-practices.md +237 -0
  155. package/localized/zh-CN/skills/cc-rust-project-standard/references/common/engineering-practices.rules.json +121 -0
  156. package/localized/zh-CN/skills/cc-rust-project-standard/references/common/engineering-practices.sources.json +377 -0
  157. package/localized/zh-CN/skills/cc-rust-project-standard/references/engineering-practices.md +106 -0
  158. package/localized/zh-CN/skills/cc-rust-project-standard/references/practice.md +37 -0
  159. package/localized/zh-CN/skills/cc-source-driven-development/SKILL.md +8 -0
  160. package/localized/zh-CN/skills/cc-source-driven-development/references/method.md +19 -0
  161. package/localized/zh-CN/skills/cc-tauri-project-standard/SKILL.md +21 -0
  162. package/localized/zh-CN/skills/cc-tauri-project-standard/examples/minimal/README.md +9 -0
  163. package/localized/zh-CN/skills/cc-tauri-project-standard/examples/minimal/core/Cargo.lock +5 -0
  164. package/localized/zh-CN/skills/cc-tauri-project-standard/examples/minimal/core/Cargo.toml +9 -0
  165. package/localized/zh-CN/skills/cc-tauri-project-standard/examples/minimal/core/src/lib.rs +46 -0
  166. package/localized/zh-CN/skills/cc-tauri-project-standard/examples/minimal/src-tauri/Cargo.toml +12 -0
  167. package/localized/zh-CN/skills/cc-tauri-project-standard/examples/minimal/src-tauri/build.rs +5 -0
  168. package/localized/zh-CN/skills/cc-tauri-project-standard/examples/minimal/src-tauri/capabilities/main.json +6 -0
  169. package/localized/zh-CN/skills/cc-tauri-project-standard/examples/minimal/src-tauri/permissions/documents.toml +4 -0
  170. package/localized/zh-CN/skills/cc-tauri-project-standard/examples/minimal/src-tauri/src/main.rs +22 -0
  171. package/localized/zh-CN/skills/cc-tauri-project-standard/examples/minimal/src-tauri/tauri.conf.json +13 -0
  172. package/localized/zh-CN/skills/cc-tauri-project-standard/examples/minimal/ui/app.js +5 -0
  173. package/localized/zh-CN/skills/cc-tauri-project-standard/examples/minimal/ui/index.html +1 -0
  174. package/localized/zh-CN/skills/cc-tauri-project-standard/references/common/engineering-practices.md +237 -0
  175. package/localized/zh-CN/skills/cc-tauri-project-standard/references/common/engineering-practices.rules.json +121 -0
  176. package/localized/zh-CN/skills/cc-tauri-project-standard/references/common/engineering-practices.sources.json +377 -0
  177. package/localized/zh-CN/skills/cc-tauri-project-standard/references/engineering-practices.md +73 -0
  178. package/localized/zh-CN/skills/cc-tauri-project-standard/references/practice.md +20 -0
  179. package/localized/zh-CN/skills/cc-tauri-project-standard/references/verification.md +18 -0
  180. package/localized/zh-CN/skills/cc-tdd-methodology/SKILL.md +8 -0
  181. package/localized/zh-CN/skills/cc-tdd-methodology/references/method.md +13 -0
  182. package/localized/zh-CN/skills/cc-technical-diagrams/SKILL.md +34 -0
  183. package/localized/zh-CN/skills/{fec-image-generation → cc-technical-diagrams}/assets/interactive-diagram.html +371 -371
  184. package/localized/zh-CN/skills/cc-technical-diagrams/assets/quality-examples/README.md +14 -0
  185. package/localized/zh-CN/skills/{fec-image-generation → cc-technical-diagrams}/assets/quality-examples/sequence.mmd +21 -21
  186. package/localized/zh-CN/skills/{fec-image-generation → cc-technical-diagrams}/assets/quality-examples/workflow.mmd +7 -7
  187. package/localized/zh-CN/skills/{fec-image-generation → cc-technical-diagrams}/references/diagram-workflows.md +3 -3
  188. package/localized/zh-CN/skills/{fec-image-generation → cc-technical-diagrams}/references/html-technical-diagrams.md +7 -7
  189. package/localized/zh-CN/skills/cc-technical-diagrams/references/png-qa-autofix.md +37 -0
  190. package/{skills/fec-image-generation → localized/zh-CN/skills/cc-technical-diagrams}/scripts/diagram-browser.mjs +77 -14
  191. package/localized/zh-CN/skills/cc-technical-diagrams/scripts/diagram-layout.mjs +176 -0
  192. package/localized/zh-CN/skills/cc-technical-diagrams/scripts/png-qa.mjs +462 -0
  193. package/localized/zh-CN/skills/{fec-typescript-project-standard → cc-typescript-project-standard}/SKILL.md +10 -4
  194. package/localized/zh-CN/skills/cc-typescript-project-standard/examples/engineering/README.md +7 -0
  195. package/localized/zh-CN/skills/cc-typescript-project-standard/examples/engineering/boundary.test.ts +16 -0
  196. package/localized/zh-CN/skills/cc-typescript-project-standard/examples/engineering/input.ts +12 -0
  197. package/localized/zh-CN/skills/cc-typescript-project-standard/examples/engineering/package.json +12 -0
  198. package/localized/zh-CN/skills/cc-typescript-project-standard/examples/engineering/pnpm-lock.yaml +39 -0
  199. package/localized/zh-CN/skills/cc-typescript-project-standard/examples/engineering/pnpm-workspace.yaml +1 -0
  200. package/localized/zh-CN/skills/cc-typescript-project-standard/examples/engineering/tsconfig.json +8 -0
  201. package/localized/zh-CN/skills/cc-typescript-project-standard/references/common/engineering-practices.md +237 -0
  202. package/localized/zh-CN/skills/cc-typescript-project-standard/references/common/engineering-practices.rules.json +121 -0
  203. package/localized/zh-CN/skills/cc-typescript-project-standard/references/common/engineering-practices.sources.json +377 -0
  204. package/localized/zh-CN/skills/cc-typescript-project-standard/references/engineering-practices.md +106 -0
  205. package/localized/zh-CN/skills/{fec-typescript-project-standard → cc-typescript-project-standard}/references/type-safety-patterns.md +5 -34
  206. package/localized/zh-CN/skills/{fec-typescript-project-standard → cc-typescript-project-standard}/references/type-safety.md +6 -0
  207. package/localized/zh-CN/skills/eval_queries.json +741 -319
  208. package/localized/zh-CN/skills/fec-api-integration/SKILL.md +5 -1
  209. package/localized/zh-CN/skills/fec-api-integration/references/common/engineering-practices.md +237 -0
  210. package/localized/zh-CN/skills/fec-api-integration/references/common/engineering-practices.rules.json +121 -0
  211. package/localized/zh-CN/skills/fec-api-integration/references/common/engineering-practices.sources.json +377 -0
  212. package/localized/zh-CN/skills/fec-api-integration/references/engineering-practices.md +73 -0
  213. package/localized/zh-CN/skills/fec-code-review/SKILL.md +4 -0
  214. package/localized/zh-CN/skills/fec-code-review/references/common/engineering-practices.md +237 -0
  215. package/localized/zh-CN/skills/fec-code-review/references/common/engineering-practices.rules.json +121 -0
  216. package/localized/zh-CN/skills/fec-code-review/references/common/engineering-practices.sources.json +377 -0
  217. package/localized/zh-CN/skills/fec-code-review/references/engineering-practices.md +73 -0
  218. package/localized/zh-CN/skills/fec-data-fetching/SKILL.md +4 -0
  219. package/localized/zh-CN/skills/fec-data-fetching/references/common/engineering-practices.md +237 -0
  220. package/localized/zh-CN/skills/fec-data-fetching/references/common/engineering-practices.rules.json +121 -0
  221. package/localized/zh-CN/skills/fec-data-fetching/references/common/engineering-practices.sources.json +377 -0
  222. package/localized/zh-CN/skills/fec-data-fetching/references/engineering-practices.md +73 -0
  223. package/localized/zh-CN/skills/fec-debug-framework/SKILL.md +1 -50
  224. package/localized/zh-CN/skills/fec-debug-framework/references/common/debug.md +13 -0
  225. package/localized/zh-CN/skills/fec-dependency-upgrade/SKILL.md +4 -0
  226. package/localized/zh-CN/skills/fec-dependency-upgrade/references/common/engineering-practices.md +237 -0
  227. package/localized/zh-CN/skills/fec-dependency-upgrade/references/common/engineering-practices.rules.json +121 -0
  228. package/localized/zh-CN/skills/fec-dependency-upgrade/references/common/engineering-practices.sources.json +377 -0
  229. package/localized/zh-CN/skills/fec-dependency-upgrade/references/engineering-practices.md +73 -0
  230. package/localized/zh-CN/skills/fec-doc-sync/SKILL.md +7 -28
  231. package/localized/zh-CN/skills/fec-doc-sync/references/common/doc-sync.md +12 -0
  232. package/localized/zh-CN/skills/fec-image-generation/SKILL.md +7 -101
  233. package/localized/zh-CN/skills/fec-image-generation/references/png-qa-autofix.md +1 -1
  234. package/localized/zh-CN/skills/fec-image-generation/scripts/png-qa.mjs +1 -1
  235. package/localized/zh-CN/skills/fec-react-project-standard/SKILL.md +6 -0
  236. package/localized/zh-CN/skills/fec-react-project-standard/examples/engineering/README.md +7 -0
  237. package/localized/zh-CN/skills/fec-react-project-standard/examples/engineering/package.json +15 -0
  238. package/localized/zh-CN/skills/fec-react-project-standard/examples/engineering/pnpm-lock.yaml +662 -0
  239. package/localized/zh-CN/skills/fec-react-project-standard/examples/engineering/pnpm-workspace.yaml +1 -0
  240. package/localized/zh-CN/skills/fec-react-project-standard/examples/engineering/request-view.mjs +24 -0
  241. package/localized/zh-CN/skills/fec-react-project-standard/examples/engineering/request-view.test.mjs +33 -0
  242. package/localized/zh-CN/skills/fec-react-project-standard/references/common/engineering-practices.md +237 -0
  243. package/localized/zh-CN/skills/fec-react-project-standard/references/common/engineering-practices.rules.json +121 -0
  244. package/localized/zh-CN/skills/fec-react-project-standard/references/common/engineering-practices.sources.json +377 -0
  245. package/localized/zh-CN/skills/fec-react-project-standard/references/engineering-practices.md +73 -0
  246. package/localized/zh-CN/skills/fec-react-project-standard/references/generic-component-types.md +37 -0
  247. package/localized/zh-CN/skills/fec-react-project-standard/references/react-quality-patterns.md +3 -3
  248. package/localized/zh-CN/skills/fec-react-project-standard/references/react-runtime-patterns.md +1 -1
  249. package/localized/zh-CN/skills/fec-refactoring/SKILL.md +12 -70
  250. package/localized/zh-CN/skills/fec-refactoring/references/common/refactoring.md +16 -0
  251. package/localized/zh-CN/skills/fec-refactoring/references/principles.md +9 -39
  252. package/localized/zh-CN/skills/fec-refactoring/references/workflow.md +4 -56
  253. package/localized/zh-CN/skills/fec-security-review/SKILL.md +4 -0
  254. package/localized/zh-CN/skills/fec-security-review/references/common/engineering-practices.md +237 -0
  255. package/localized/zh-CN/skills/fec-security-review/references/common/engineering-practices.rules.json +121 -0
  256. package/localized/zh-CN/skills/fec-security-review/references/common/engineering-practices.sources.json +377 -0
  257. package/localized/zh-CN/skills/fec-security-review/references/engineering-practices.md +73 -0
  258. package/localized/zh-CN/skills/fec-tdd-workflow/SKILL.md +12 -43
  259. package/localized/zh-CN/skills/fec-tdd-workflow/references/common/tdd.md +13 -0
  260. package/localized/zh-CN/skills/fec-testing-strategy/SKILL.md +4 -0
  261. package/localized/zh-CN/skills/fec-testing-strategy/references/common/engineering-practices.md +237 -0
  262. package/localized/zh-CN/skills/fec-testing-strategy/references/common/engineering-practices.rules.json +121 -0
  263. package/localized/zh-CN/skills/fec-testing-strategy/references/common/engineering-practices.sources.json +377 -0
  264. package/localized/zh-CN/skills/fec-testing-strategy/references/engineering-practices.md +73 -0
  265. package/localized/zh-CN/skills/fec-vue3-project-standard/SKILL.md +4 -0
  266. package/localized/zh-CN/skills/fec-vue3-project-standard/references/common/engineering-practices.md +237 -0
  267. package/localized/zh-CN/skills/fec-vue3-project-standard/references/common/engineering-practices.rules.json +121 -0
  268. package/localized/zh-CN/skills/fec-vue3-project-standard/references/common/engineering-practices.sources.json +377 -0
  269. package/localized/zh-CN/skills/fec-vue3-project-standard/references/engineering-practices.md +73 -0
  270. package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-project-structure.md +2 -2
  271. package/localized/zh-CN/skills/metadata.json +2246 -1008
  272. package/localized/zh-CN/skills/relations.json +501 -372
  273. package/localized/zh-CN/templates/shared/rules/fec-source-driven-development.md +3 -29
  274. package/localized/zh-CN/templates/shared/rules/fec-typescript.md +4 -4
  275. package/localized/zh-CN/templates/shared/rules/references/common/source-driven-development.md +19 -0
  276. package/openclaw.plugin.json +1 -1
  277. package/package.json +11 -4
  278. package/skills/cc-c-project-standard/SKILL.md +25 -0
  279. package/skills/cc-c-project-standard/examples/engineering/README.md +7 -0
  280. package/skills/cc-c-project-standard/examples/engineering/boundary.c +26 -0
  281. package/skills/cc-c-project-standard/examples/engineering/boundary.h +15 -0
  282. package/skills/cc-c-project-standard/examples/engineering/boundary_test.c +73 -0
  283. package/skills/cc-c-project-standard/references/common/engineering-practices.md +237 -0
  284. package/skills/cc-c-project-standard/references/common/engineering-practices.rules.json +121 -0
  285. package/skills/cc-c-project-standard/references/common/engineering-practices.sources.json +377 -0
  286. package/skills/cc-c-project-standard/references/engineering-practices.md +106 -0
  287. package/skills/cc-c-project-standard/references/practice.md +37 -0
  288. package/skills/cc-cpp-project-standard/SKILL.md +25 -0
  289. package/skills/cc-cpp-project-standard/examples/engineering/README.md +7 -0
  290. package/skills/cc-cpp-project-standard/examples/engineering/boundary.cpp +26 -0
  291. package/skills/cc-cpp-project-standard/examples/engineering/boundary.hpp +12 -0
  292. package/skills/cc-cpp-project-standard/examples/engineering/boundary_test.cpp +38 -0
  293. package/skills/cc-cpp-project-standard/references/common/engineering-practices.md +237 -0
  294. package/skills/cc-cpp-project-standard/references/common/engineering-practices.rules.json +121 -0
  295. package/skills/cc-cpp-project-standard/references/common/engineering-practices.sources.json +377 -0
  296. package/skills/cc-cpp-project-standard/references/engineering-practices.md +106 -0
  297. package/skills/cc-cpp-project-standard/references/practice.md +37 -0
  298. package/skills/cc-debug-methodology/SKILL.md +8 -0
  299. package/skills/cc-debug-methodology/references/method.md +13 -0
  300. package/skills/cc-doc-sync-core/SKILL.md +8 -0
  301. package/skills/cc-doc-sync-core/references/method.md +12 -0
  302. package/skills/{fec-drawio-studio → cc-drawio-studio}/SKILL.md +5 -5
  303. package/skills/{fec-drawio-studio → cc-drawio-studio}/references/flowchart-quality.md +1 -1
  304. package/skills/{fec-drawio-studio → cc-drawio-studio}/references/layout-and-export.md +9 -9
  305. package/skills/cc-electron-project-standard/SKILL.md +21 -0
  306. package/skills/cc-electron-project-standard/examples/engineering/README.md +7 -0
  307. package/skills/cc-electron-project-standard/examples/engineering/ipc-lifecycle.cjs +44 -0
  308. package/skills/cc-electron-project-standard/examples/engineering/ipc-lifecycle.test.cjs +44 -0
  309. package/skills/cc-electron-project-standard/examples/engineering/package.json +8 -0
  310. package/skills/cc-electron-project-standard/examples/minimal/README.md +9 -0
  311. package/skills/cc-electron-project-standard/examples/minimal/boundary.cjs +19 -0
  312. package/skills/cc-electron-project-standard/examples/minimal/boundary.test.cjs +7 -0
  313. package/skills/cc-electron-project-standard/examples/minimal/index.html +1 -0
  314. package/skills/cc-electron-project-standard/examples/minimal/main.cjs +20 -0
  315. package/skills/cc-electron-project-standard/examples/minimal/package.json +9 -0
  316. package/skills/cc-electron-project-standard/examples/minimal/preload.cjs +2 -0
  317. package/skills/cc-electron-project-standard/examples/minimal/renderer.js +4 -0
  318. package/skills/cc-electron-project-standard/references/common/engineering-practices.md +237 -0
  319. package/skills/cc-electron-project-standard/references/common/engineering-practices.rules.json +121 -0
  320. package/skills/cc-electron-project-standard/references/common/engineering-practices.sources.json +377 -0
  321. package/skills/cc-electron-project-standard/references/engineering-practices.md +73 -0
  322. package/skills/cc-electron-project-standard/references/practice.md +19 -0
  323. package/skills/cc-electron-project-standard/references/verification.md +17 -0
  324. package/skills/cc-go-concurrency/SKILL.md +25 -0
  325. package/skills/cc-go-concurrency/references/common/engineering-practices.md +237 -0
  326. package/skills/cc-go-concurrency/references/common/engineering-practices.rules.json +121 -0
  327. package/skills/cc-go-concurrency/references/common/engineering-practices.sources.json +377 -0
  328. package/skills/cc-go-concurrency/references/engineering-practices.md +73 -0
  329. package/skills/cc-go-concurrency/references/practice.md +37 -0
  330. package/skills/cc-go-project-standard/SKILL.md +25 -0
  331. package/skills/cc-go-project-standard/examples/engineering/README.md +7 -0
  332. package/skills/cc-go-project-standard/examples/engineering/go.mod +3 -0
  333. package/skills/cc-go-project-standard/examples/engineering/lifecycle.go +71 -0
  334. package/skills/cc-go-project-standard/examples/engineering/lifecycle_test.go +22 -0
  335. package/skills/cc-go-project-standard/references/common/engineering-practices.md +237 -0
  336. package/skills/cc-go-project-standard/references/common/engineering-practices.rules.json +121 -0
  337. package/skills/cc-go-project-standard/references/common/engineering-practices.sources.json +377 -0
  338. package/skills/cc-go-project-standard/references/engineering-practices.md +106 -0
  339. package/skills/cc-go-project-standard/references/practice.md +37 -0
  340. package/skills/cc-java-project-standard/SKILL.md +25 -0
  341. package/skills/cc-java-project-standard/examples/engineering/README.md +7 -0
  342. package/skills/cc-java-project-standard/examples/engineering/ResourceBoundary.java +26 -0
  343. package/skills/cc-java-project-standard/examples/engineering/ResourceBoundaryTest.java +41 -0
  344. package/skills/cc-java-project-standard/references/common/engineering-practices.md +237 -0
  345. package/skills/cc-java-project-standard/references/common/engineering-practices.rules.json +121 -0
  346. package/skills/cc-java-project-standard/references/common/engineering-practices.sources.json +377 -0
  347. package/skills/cc-java-project-standard/references/engineering-practices.md +106 -0
  348. package/skills/cc-java-project-standard/references/practice.md +35 -0
  349. package/skills/cc-java-runtime/SKILL.md +25 -0
  350. package/skills/cc-java-runtime/references/common/engineering-practices.md +237 -0
  351. package/skills/cc-java-runtime/references/common/engineering-practices.rules.json +121 -0
  352. package/skills/cc-java-runtime/references/common/engineering-practices.sources.json +377 -0
  353. package/skills/cc-java-runtime/references/engineering-practices.md +73 -0
  354. package/skills/cc-java-runtime/references/practice.md +37 -0
  355. package/skills/cc-native-memory-safety/SKILL.md +25 -0
  356. package/skills/cc-native-memory-safety/references/common/engineering-practices.md +237 -0
  357. package/skills/cc-native-memory-safety/references/common/engineering-practices.rules.json +121 -0
  358. package/skills/cc-native-memory-safety/references/common/engineering-practices.sources.json +377 -0
  359. package/skills/cc-native-memory-safety/references/engineering-practices.md +73 -0
  360. package/skills/cc-native-memory-safety/references/practice.md +37 -0
  361. package/skills/cc-python-async/SKILL.md +25 -0
  362. package/skills/cc-python-async/references/common/engineering-practices.md +237 -0
  363. package/skills/cc-python-async/references/common/engineering-practices.rules.json +121 -0
  364. package/skills/cc-python-async/references/common/engineering-practices.sources.json +377 -0
  365. package/skills/cc-python-async/references/engineering-practices.md +73 -0
  366. package/skills/cc-python-async/references/practice.md +37 -0
  367. package/skills/cc-python-project-standard/SKILL.md +25 -0
  368. package/skills/cc-python-project-standard/examples/engineering/README.md +7 -0
  369. package/skills/cc-python-project-standard/examples/engineering/resource_boundary.py +37 -0
  370. package/skills/cc-python-project-standard/examples/engineering/test_resource_boundary.py +49 -0
  371. package/skills/cc-python-project-standard/references/common/engineering-practices.md +237 -0
  372. package/skills/cc-python-project-standard/references/common/engineering-practices.rules.json +121 -0
  373. package/skills/cc-python-project-standard/references/common/engineering-practices.sources.json +377 -0
  374. package/skills/cc-python-project-standard/references/engineering-practices.md +106 -0
  375. package/skills/cc-python-project-standard/references/practice.md +37 -0
  376. package/skills/cc-refactoring-core/SKILL.md +8 -0
  377. package/skills/cc-refactoring-core/references/method.md +16 -0
  378. package/skills/cc-rust-async/SKILL.md +25 -0
  379. package/skills/cc-rust-async/references/common/engineering-practices.md +237 -0
  380. package/skills/cc-rust-async/references/common/engineering-practices.rules.json +121 -0
  381. package/skills/cc-rust-async/references/common/engineering-practices.sources.json +377 -0
  382. package/skills/cc-rust-async/references/engineering-practices.md +73 -0
  383. package/skills/cc-rust-async/references/practice.md +37 -0
  384. package/skills/cc-rust-project-standard/SKILL.md +25 -0
  385. package/skills/cc-rust-project-standard/examples/engineering/Cargo.lock +7 -0
  386. package/skills/cc-rust-project-standard/examples/engineering/Cargo.toml +8 -0
  387. package/skills/cc-rust-project-standard/examples/engineering/README.md +5 -0
  388. package/skills/cc-rust-project-standard/examples/engineering/src/lib.rs +43 -0
  389. package/skills/cc-rust-project-standard/references/common/engineering-practices.md +237 -0
  390. package/skills/cc-rust-project-standard/references/common/engineering-practices.rules.json +121 -0
  391. package/skills/cc-rust-project-standard/references/common/engineering-practices.sources.json +377 -0
  392. package/skills/cc-rust-project-standard/references/engineering-practices.md +106 -0
  393. package/skills/cc-rust-project-standard/references/practice.md +37 -0
  394. package/skills/cc-source-driven-development/SKILL.md +8 -0
  395. package/skills/cc-source-driven-development/references/method.md +19 -0
  396. package/skills/cc-tauri-project-standard/SKILL.md +21 -0
  397. package/skills/cc-tauri-project-standard/examples/minimal/README.md +9 -0
  398. package/skills/cc-tauri-project-standard/examples/minimal/core/Cargo.lock +5 -0
  399. package/skills/cc-tauri-project-standard/examples/minimal/core/Cargo.toml +9 -0
  400. package/skills/cc-tauri-project-standard/examples/minimal/core/src/lib.rs +46 -0
  401. package/skills/cc-tauri-project-standard/examples/minimal/src-tauri/Cargo.toml +12 -0
  402. package/skills/cc-tauri-project-standard/examples/minimal/src-tauri/build.rs +5 -0
  403. package/skills/cc-tauri-project-standard/examples/minimal/src-tauri/capabilities/main.json +6 -0
  404. package/skills/cc-tauri-project-standard/examples/minimal/src-tauri/permissions/documents.toml +4 -0
  405. package/skills/cc-tauri-project-standard/examples/minimal/src-tauri/src/main.rs +22 -0
  406. package/skills/cc-tauri-project-standard/examples/minimal/src-tauri/tauri.conf.json +13 -0
  407. package/skills/cc-tauri-project-standard/examples/minimal/ui/app.js +5 -0
  408. package/skills/cc-tauri-project-standard/examples/minimal/ui/index.html +1 -0
  409. package/skills/cc-tauri-project-standard/references/common/engineering-practices.md +237 -0
  410. package/skills/cc-tauri-project-standard/references/common/engineering-practices.rules.json +121 -0
  411. package/skills/cc-tauri-project-standard/references/common/engineering-practices.sources.json +377 -0
  412. package/skills/cc-tauri-project-standard/references/engineering-practices.md +73 -0
  413. package/skills/cc-tauri-project-standard/references/practice.md +20 -0
  414. package/skills/cc-tauri-project-standard/references/verification.md +18 -0
  415. package/skills/cc-tdd-methodology/SKILL.md +8 -0
  416. package/skills/cc-tdd-methodology/references/method.md +13 -0
  417. package/skills/cc-technical-diagrams/SKILL.md +34 -0
  418. package/skills/{fec-image-generation → cc-technical-diagrams}/assets/interactive-diagram.html +371 -371
  419. package/skills/{fec-image-generation → cc-technical-diagrams}/assets/quality-examples/README.md +5 -5
  420. package/skills/{fec-image-generation → cc-technical-diagrams}/assets/quality-examples/sequence.mmd +21 -21
  421. package/skills/{fec-image-generation → cc-technical-diagrams}/assets/quality-examples/workflow.mmd +7 -7
  422. package/skills/{fec-image-generation → cc-technical-diagrams}/references/diagram-workflows.md +3 -3
  423. package/skills/{fec-image-generation → cc-technical-diagrams}/references/html-technical-diagrams.md +7 -7
  424. package/skills/cc-technical-diagrams/references/png-qa-autofix.md +37 -0
  425. package/{localized/zh-CN/skills/fec-image-generation → skills/cc-technical-diagrams}/scripts/diagram-browser.mjs +77 -14
  426. package/skills/cc-technical-diagrams/scripts/diagram-layout.mjs +176 -0
  427. package/skills/cc-technical-diagrams/scripts/png-qa.mjs +462 -0
  428. package/skills/{fec-typescript-project-standard → cc-typescript-project-standard}/SKILL.md +10 -4
  429. package/skills/cc-typescript-project-standard/examples/engineering/README.md +9 -0
  430. package/skills/cc-typescript-project-standard/examples/engineering/boundary.test.ts +16 -0
  431. package/skills/cc-typescript-project-standard/examples/engineering/input.ts +12 -0
  432. package/skills/cc-typescript-project-standard/examples/engineering/package.json +12 -0
  433. package/skills/cc-typescript-project-standard/examples/engineering/pnpm-lock.yaml +39 -0
  434. package/skills/cc-typescript-project-standard/examples/engineering/pnpm-workspace.yaml +1 -0
  435. package/skills/cc-typescript-project-standard/examples/engineering/tsconfig.json +8 -0
  436. package/skills/cc-typescript-project-standard/references/common/engineering-practices.md +237 -0
  437. package/skills/cc-typescript-project-standard/references/common/engineering-practices.rules.json +121 -0
  438. package/skills/cc-typescript-project-standard/references/common/engineering-practices.sources.json +377 -0
  439. package/skills/cc-typescript-project-standard/references/engineering-practices.md +106 -0
  440. package/skills/{fec-typescript-project-standard → cc-typescript-project-standard}/references/type-safety-patterns.md +6 -35
  441. package/skills/{fec-typescript-project-standard → cc-typescript-project-standard}/references/type-safety.md +7 -1
  442. package/skills/eval_queries.json +741 -319
  443. package/skills/fec-api-integration/SKILL.md +5 -1
  444. package/skills/fec-api-integration/references/common/engineering-practices.md +237 -0
  445. package/skills/fec-api-integration/references/common/engineering-practices.rules.json +121 -0
  446. package/skills/fec-api-integration/references/common/engineering-practices.sources.json +377 -0
  447. package/skills/fec-api-integration/references/engineering-practices.md +73 -0
  448. package/skills/fec-code-review/SKILL.md +4 -0
  449. package/skills/fec-code-review/references/common/engineering-practices.md +237 -0
  450. package/skills/fec-code-review/references/common/engineering-practices.rules.json +121 -0
  451. package/skills/fec-code-review/references/common/engineering-practices.sources.json +377 -0
  452. package/skills/fec-code-review/references/engineering-practices.md +73 -0
  453. package/skills/fec-data-fetching/SKILL.md +4 -0
  454. package/skills/fec-data-fetching/references/common/engineering-practices.md +237 -0
  455. package/skills/fec-data-fetching/references/common/engineering-practices.rules.json +121 -0
  456. package/skills/fec-data-fetching/references/common/engineering-practices.sources.json +377 -0
  457. package/skills/fec-data-fetching/references/engineering-practices.md +73 -0
  458. package/skills/fec-debug-framework/SKILL.md +2 -51
  459. package/skills/fec-debug-framework/references/common/debug.md +13 -0
  460. package/skills/fec-dependency-upgrade/SKILL.md +4 -0
  461. package/skills/fec-dependency-upgrade/references/common/engineering-practices.md +237 -0
  462. package/skills/fec-dependency-upgrade/references/common/engineering-practices.rules.json +121 -0
  463. package/skills/fec-dependency-upgrade/references/common/engineering-practices.sources.json +377 -0
  464. package/skills/fec-dependency-upgrade/references/engineering-practices.md +73 -0
  465. package/skills/fec-doc-sync/SKILL.md +7 -28
  466. package/skills/fec-doc-sync/references/common/doc-sync.md +12 -0
  467. package/skills/fec-image-generation/SKILL.md +7 -102
  468. package/skills/fec-image-generation/references/png-qa-autofix.md +1 -1
  469. package/skills/fec-image-generation/scripts/png-qa.mjs +1 -1
  470. package/skills/fec-react-project-standard/SKILL.md +6 -0
  471. package/skills/fec-react-project-standard/examples/engineering/README.md +7 -0
  472. package/skills/fec-react-project-standard/examples/engineering/package.json +15 -0
  473. package/skills/fec-react-project-standard/examples/engineering/pnpm-lock.yaml +662 -0
  474. package/skills/fec-react-project-standard/examples/engineering/pnpm-workspace.yaml +1 -0
  475. package/skills/fec-react-project-standard/examples/engineering/request-view.mjs +24 -0
  476. package/skills/fec-react-project-standard/examples/engineering/request-view.test.mjs +33 -0
  477. package/skills/fec-react-project-standard/references/common/engineering-practices.md +237 -0
  478. package/skills/fec-react-project-standard/references/common/engineering-practices.rules.json +121 -0
  479. package/skills/fec-react-project-standard/references/common/engineering-practices.sources.json +377 -0
  480. package/skills/fec-react-project-standard/references/engineering-practices.md +73 -0
  481. package/skills/fec-react-project-standard/references/generic-component-types.md +37 -0
  482. package/skills/fec-react-project-standard/references/react-quality-patterns.md +3 -3
  483. package/skills/fec-react-project-standard/references/react-runtime-patterns.md +1 -1
  484. package/skills/fec-refactoring/SKILL.md +12 -70
  485. package/skills/fec-refactoring/references/common/refactoring.md +16 -0
  486. package/skills/fec-refactoring/references/principles.md +9 -56
  487. package/skills/fec-refactoring/references/workflow.md +4 -87
  488. package/skills/fec-security-review/SKILL.md +4 -0
  489. package/skills/fec-security-review/references/common/engineering-practices.md +237 -0
  490. package/skills/fec-security-review/references/common/engineering-practices.rules.json +121 -0
  491. package/skills/fec-security-review/references/common/engineering-practices.sources.json +377 -0
  492. package/skills/fec-security-review/references/engineering-practices.md +73 -0
  493. package/skills/fec-tdd-workflow/SKILL.md +13 -45
  494. package/skills/fec-tdd-workflow/references/common/tdd.md +13 -0
  495. package/skills/fec-testing-strategy/SKILL.md +4 -0
  496. package/skills/fec-testing-strategy/references/common/engineering-practices.md +237 -0
  497. package/skills/fec-testing-strategy/references/common/engineering-practices.rules.json +121 -0
  498. package/skills/fec-testing-strategy/references/common/engineering-practices.sources.json +377 -0
  499. package/skills/fec-testing-strategy/references/engineering-practices.md +73 -0
  500. package/skills/fec-vue3-project-standard/SKILL.md +4 -0
  501. package/skills/fec-vue3-project-standard/references/common/engineering-practices.md +237 -0
  502. package/skills/fec-vue3-project-standard/references/common/engineering-practices.rules.json +121 -0
  503. package/skills/fec-vue3-project-standard/references/common/engineering-practices.sources.json +377 -0
  504. package/skills/fec-vue3-project-standard/references/engineering-practices.md +73 -0
  505. package/skills/fec-vue3-project-standard/references/vue3-project-structure.md +2 -2
  506. package/skills/metadata.json +2246 -1008
  507. package/skills/relations.json +501 -372
  508. package/templates/shared/rules/fec-source-driven-development.md +3 -29
  509. package/templates/shared/rules/fec-typescript.md +4 -4
  510. package/templates/shared/rules/references/common/source-driven-development.md +19 -0
  511. package/localized/zh-CN/skills/fec-image-generation/assets/quality-examples/README.md +0 -14
  512. package/localized/zh-CN/skills/fec-source-driven-development/SKILL.md +0 -87
  513. package/skills/fec-source-driven-development/SKILL.md +0 -87
  514. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/data/THIRD_PARTY_NOTICES.md +0 -0
  515. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/data/brand-icons.json +0 -0
  516. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/data/shape-index.json +0 -0
  517. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/references/data-residency.md +0 -0
  518. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/references/diagram-patterns.md +0 -0
  519. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/references/troubleshooting.md +0 -0
  520. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/references/xml-and-mermaid.md +0 -0
  521. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/brand-symbols.mjs +0 -0
  522. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/diagram-lint.mjs +0 -0
  523. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/diagram-url.mjs +0 -0
  524. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/drawio-export.mjs +0 -0
  525. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/layout-graph.mjs +0 -0
  526. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/png-embed-fix.mjs +0 -0
  527. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/scan-go-packages.mjs +0 -0
  528. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/scan-js-modules.mjs +0 -0
  529. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/scan-python-classes.mjs +0 -0
  530. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/scan-python-modules.mjs +0 -0
  531. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/scan-rust-modules.mjs +0 -0
  532. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/scan-ts-modules.mjs +0 -0
  533. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/shape-query.mjs +0 -0
  534. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/studio-core.mjs +0 -0
  535. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/styles/built-in/corporate.json +0 -0
  536. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/styles/built-in/default.json +0 -0
  537. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/styles/built-in/handdrawn.json +0 -0
  538. /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/styles/schema.json +0 -0
  539. /package/localized/zh-CN/skills/{fec-image-generation → cc-technical-diagrams}/assets/quality-examples/architecture.json +0 -0
  540. /package/localized/zh-CN/skills/{fec-image-generation → cc-technical-diagrams}/assets/quality-examples/invalid-explicit.json +0 -0
  541. /package/localized/zh-CN/skills/{fec-image-generation → cc-technical-diagrams}/assets/quality-examples/sequence.json +0 -0
  542. /package/localized/zh-CN/skills/{fec-image-generation → cc-technical-diagrams}/assets/quality-examples/workflow.json +0 -0
  543. /package/localized/zh-CN/skills/{fec-image-generation → cc-technical-diagrams}/scripts/export-diagram.mjs +0 -0
  544. /package/localized/zh-CN/skills/{fec-image-generation → cc-technical-diagrams}/scripts/interactive-diagram-server.mjs +0 -0
  545. /package/localized/zh-CN/skills/{fec-image-generation → cc-technical-diagrams}/scripts/mermaid-render.mjs +0 -0
  546. /package/localized/zh-CN/skills/{fec-image-generation → cc-technical-diagrams}/scripts/tech-diagram-render.mjs +0 -0
  547. /package/skills/{fec-drawio-studio → cc-drawio-studio}/data/THIRD_PARTY_NOTICES.md +0 -0
  548. /package/skills/{fec-drawio-studio → cc-drawio-studio}/data/brand-icons.json +0 -0
  549. /package/skills/{fec-drawio-studio → cc-drawio-studio}/data/shape-index.json +0 -0
  550. /package/skills/{fec-drawio-studio → cc-drawio-studio}/references/data-residency.md +0 -0
  551. /package/skills/{fec-drawio-studio → cc-drawio-studio}/references/diagram-patterns.md +0 -0
  552. /package/skills/{fec-drawio-studio → cc-drawio-studio}/references/troubleshooting.md +0 -0
  553. /package/skills/{fec-drawio-studio → cc-drawio-studio}/references/xml-and-mermaid.md +0 -0
  554. /package/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/brand-symbols.mjs +0 -0
  555. /package/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/diagram-lint.mjs +0 -0
  556. /package/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/diagram-url.mjs +0 -0
  557. /package/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/drawio-export.mjs +0 -0
  558. /package/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/layout-graph.mjs +0 -0
  559. /package/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/png-embed-fix.mjs +0 -0
  560. /package/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/scan-go-packages.mjs +0 -0
  561. /package/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/scan-js-modules.mjs +0 -0
  562. /package/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/scan-python-classes.mjs +0 -0
  563. /package/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/scan-python-modules.mjs +0 -0
  564. /package/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/scan-rust-modules.mjs +0 -0
  565. /package/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/scan-ts-modules.mjs +0 -0
  566. /package/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/shape-query.mjs +0 -0
  567. /package/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/studio-core.mjs +0 -0
  568. /package/skills/{fec-drawio-studio → cc-drawio-studio}/styles/built-in/corporate.json +0 -0
  569. /package/skills/{fec-drawio-studio → cc-drawio-studio}/styles/built-in/default.json +0 -0
  570. /package/skills/{fec-drawio-studio → cc-drawio-studio}/styles/built-in/handdrawn.json +0 -0
  571. /package/skills/{fec-drawio-studio → cc-drawio-studio}/styles/schema.json +0 -0
  572. /package/skills/{fec-image-generation → cc-technical-diagrams}/assets/quality-examples/architecture.json +0 -0
  573. /package/skills/{fec-image-generation → cc-technical-diagrams}/assets/quality-examples/invalid-explicit.json +0 -0
  574. /package/skills/{fec-image-generation → cc-technical-diagrams}/assets/quality-examples/sequence.json +0 -0
  575. /package/skills/{fec-image-generation → cc-technical-diagrams}/assets/quality-examples/workflow.json +0 -0
  576. /package/skills/{fec-image-generation → cc-technical-diagrams}/scripts/export-diagram.mjs +0 -0
  577. /package/skills/{fec-image-generation → cc-technical-diagrams}/scripts/interactive-diagram-server.mjs +0 -0
  578. /package/skills/{fec-image-generation → cc-technical-diagrams}/scripts/mermaid-render.mjs +0 -0
  579. /package/skills/{fec-image-generation → cc-technical-diagrams}/scripts/tech-diagram-render.mjs +0 -0
@@ -3,12 +3,12 @@
3
3
  The JSON fixtures cover sequence self calls, workflow decisions and loops, and architecture groups with reverse/data/async edges. The Mermaid sources are equivalent text-first examples for standard sequence/workflow rendering. Preserve their labels and relationships when changing layout.
4
4
 
5
5
  ```sh
6
- node skills/fec-image-generation/scripts/tech-diagram-render.mjs --input skills/fec-image-generation/assets/quality-examples/workflow.json --type workflow --output workflow.html --manifest workflow.layout.json
7
- node skills/fec-image-generation/scripts/export-diagram.mjs --input workflow.html --format png --output workflow.png --theme light --scale 2 --manifest workflow.layout.json --output-manifest workflow.actual.json
8
- node skills/fec-image-generation/scripts/png-qa.mjs --png workflow.png --manifest workflow.actual.json --format json
9
- node skills/fec-image-generation/scripts/mermaid-render.mjs --input skills/fec-image-generation/assets/quality-examples/sequence.mmd --output sequence.svg --report sequence.render.json
6
+ node skills/cc-technical-diagrams/scripts/tech-diagram-render.mjs --input skills/cc-technical-diagrams/assets/quality-examples/workflow.json --type workflow --output workflow.html --manifest workflow.layout.json
7
+ node skills/cc-technical-diagrams/scripts/export-diagram.mjs --input workflow.html --format png --output workflow.png --theme light --scale 2 --manifest workflow.layout.json --output-manifest workflow.actual.json
8
+ node skills/cc-technical-diagrams/scripts/png-qa.mjs --png workflow.png --manifest workflow.actual.json --format json
9
+ node skills/cc-technical-diagrams/scripts/mermaid-render.mjs --input skills/cc-technical-diagrams/assets/quality-examples/sequence.mmd --output sequence.svg --report sequence.render.json
10
10
  ```
11
11
 
12
- Use a local Chromium browser for PNG; set FEC_BROWSER_PATH to its executable when detection fails. Mermaid needs an already installed mmdc; no automatic install or CDN is used. Missing Mermaid must be recorded as unavailable and the HTML route selected. Architecture editing uses the existing fec-drawio-studio skill when available, otherwise the JSON/HTML fixture. Graphviz is optional for dense topology and is not installed automatically.
12
+ Use a local Chromium browser for PNG; set FEC_BROWSER_PATH to its executable when detection fails. Mermaid needs an already installed mmdc; no automatic install or CDN is used. Missing Mermaid must be recorded as unavailable and the HTML route selected. Architecture editing uses the existing cc-drawio-studio skill when available, otherwise the JSON/HTML fixture. Graphviz is optional for dense topology and is not installed automatically.
13
13
 
14
14
  Inspect final PNGs at intended reading size. Check node text against shape interiors, edge labels against arrowheads, branch/return directions, loop visibility, group boundaries and light/dark contrast. Run at 1x and 2x and inspect both. Geometry QA is evidence, not a substitute for visual review. Small explicit node sizes, overlapping explicit coordinates or obstructed explicit waypoints are reported; change the source with user intent preserved. Limit automatic source repairs to two rounds (five only when requested), and report partial acceptance if unresolved.
@@ -1,21 +1,21 @@
1
- sequenceDiagram
2
- participant Web as Browser client
3
- participant API as Order service API
4
- participant DB as Persistent database
5
- Web->>API: Query order details and current payment status
6
- API->>API: Validate identity and order access
7
- API->>DB: Cache miss: read order records
8
- DB-->>API: Return order records and payment status
9
- API-->>Web: Return results and update the page
10
-
11
- activate API
12
- alt Cache hit
13
- API-->>Web: Return cached result
14
- else Cache miss
15
- loop Retry failed query
16
- API->>DB: Read records
17
- DB-->>API: Return result
18
- end
19
- end
20
- API-)Web: Async update notification
21
- deactivate API
1
+ sequenceDiagram
2
+ participant Web as Browser client
3
+ participant API as Order service API
4
+ participant DB as Persistent database
5
+ Web->>API: Query order details and current payment status
6
+ API->>API: Validate identity and order access
7
+ API->>DB: Cache miss: read order records
8
+ DB-->>API: Return order records and payment status
9
+ API-->>Web: Return results and update the page
10
+
11
+ activate API
12
+ alt Cache hit
13
+ API-->>Web: Return cached result
14
+ else Cache miss
15
+ loop Retry failed query
16
+ API->>DB: Read records
17
+ DB-->>API: Return result
18
+ end
19
+ end
20
+ API-)Web: Async update notification
21
+ deactivate API
@@ -1,7 +1,7 @@
1
- flowchart TD
2
- A([Submit order request]) --> B{Check order completeness and approval eligibility}
3
- B -->|Complete information| C[Review manually and record the decision]
4
- B -->|More evidence needed| D[Add missing evidence and resubmit]
5
- D -->|Review again| B
6
- C -->|Approved| E[(Save approval and notify the applicant asynchronously)]
7
- E -->|Notification sent| F([Completed])
1
+ flowchart TD
2
+ A([Submit order request]) --> B{Check order completeness and approval eligibility}
3
+ B -->|Complete information| C[Review manually and record the decision]
4
+ B -->|More evidence needed| D[Add missing evidence and resubmit]
5
+ D -->|Review again| B
6
+ C -->|Approved| E[(Save approval and notify the applicant asynchronously)]
7
+ E -->|Notification sent| F([Completed])
@@ -20,7 +20,7 @@ Use the live route when the diagram is part of the conversation and the user ben
20
20
  Run the local server with:
21
21
 
22
22
  ```bash
23
- node skills/fec-image-generation/scripts/interactive-diagram-server.mjs --port 6100
23
+ node skills/cc-technical-diagrams/scripts/interactive-diagram-server.mjs --port 6100
24
24
  ```
25
25
 
26
26
  Open `http://127.0.0.1:6100/?s=meaningful-session-id`, then send commands to `/cmd?s=meaningful-session-id`. Always use a unique session id for each diagram. Start with `init`, add nodes before edges, and keep each command small enough that the browser can update incrementally.
@@ -67,7 +67,7 @@ For UML coverage, route class, ER, state-machine, activity, and sequence needs t
67
67
 
68
68
  ## Process workflows
69
69
 
70
- Use HTML `workflow` IR when the user wants a browser-ready process map, approval flow, automation runbook, incident workflow, or cyclical operating loop with lanes, numbered steps, actors, decisions, exception paths, and summary cards. Use `fec-drawio-studio` instead when the workflow must remain a `.drawio` file for diagrams.net editing, official shape libraries, manual swimlane maintenance, or stakeholder edits after handoff.
70
+ Use HTML `workflow` IR when the user wants a browser-ready process map, approval flow, automation runbook, incident workflow, or cyclical operating loop with lanes, numbered steps, actors, decisions, exception paths, and summary cards. Use `cc-drawio-studio` instead when the workflow must remain a `.drawio` file for diagrams.net editing, official shape libraries, manual swimlane maintenance, or stakeholder edits after handoff.
71
71
 
72
72
  ## Export guidance
73
73
 
@@ -76,6 +76,6 @@ Prefer exporting at 2x scale for raster PNGs, then downsample only if text remai
76
76
 
77
77
  ## Quality delivery contract
78
78
 
79
- Prefer local Mermaid for standard sequence/workflow diagrams, reuse fec-drawio-studio for manually editable architecture, and optionally use Graphviz for dense topology. Fall back to compatible JSON/HTML if local tools are missing, without automatic installation/downloads. Preview, standalone SVG and PNG share source theme styles; export with `--theme light|dark`. PNG export waits for fonts and measures text; use `--manifest source.layout.json --output-manifest image.actual.json` for scaled pixel coordinates. QA must read the actual manifest, not reuse estimated coordinates unchanged for a 2x PNG.
79
+ Prefer local Mermaid for standard sequence/workflow diagrams, reuse cc-drawio-studio for manually editable architecture, and optionally use Graphviz for dense topology. Fall back to compatible JSON/HTML if local tools are missing, without automatic installation/downloads. Preview, standalone SVG and PNG share source theme styles; export with `--theme light|dark`. PNG export waits for fonts and measures text; use `--manifest source.layout.json --output-manifest image.actual.json` for scaled pixel coordinates. QA must read the actual manifest, not reuse estimated coordinates unchanged for a 2x PNG.
80
80
 
81
81
  The extended manifest retains canvas/boxes/connectors and adds coordinateSpace, scale, measurement, groups, labels and issues. Group containment is not node overlap. New checks include node-text-overflow, label-content-loss, label-out-of-bounds, edge-label-collision, text-overlap and degenerate-connector. Legacy manifests retain estimated checks. Diagnose constrained explicit sizes/waypoints without dropping text, changing relationships or silently moving coordinates. Increasing export resolution cannot fix source overflow. Visually review the final PNG and record tool availability/version, theme, scale, repair rounds and remaining defects; report partial acceptance when unresolved.
@@ -7,7 +7,7 @@ This route complements, but does not replace, other diagram sources:
7
7
  | Need | Prefer |
8
8
  | ---- | ------ |
9
9
  | Small markdown-maintained diagram | Mermaid, Graphviz, or SVG |
10
- | Editable source for future manual changes | `fec-drawio-studio` and `.drawio` |
10
+ | Editable source for future manual changes | `cc-drawio-studio` and `.drawio` |
11
11
  | Browser-ready themed technical diagram | HTML technical diagram route |
12
12
  | Raster-first visual, poster, concept art, or image edit | Image generation or editing route |
13
13
 
@@ -19,7 +19,7 @@ This route complements, but does not replace, other diagram sources:
19
19
  - `dataflow`: sources, ingest, processing, storage, consumers, PII boundaries, governance, analytics, and lineage.
20
20
  - `lifecycle`: object states, terminal states, retries, waits, cancellation, timeout, deployment or order status transitions.
21
21
 
22
- Use the `architecture` mode for browser-ready overview diagrams with explicit coordinates. Use `fec-drawio-studio` instead when the priority is `.drawio` source, official vendor icons, diagrams.net manual editing, or complex auto-layout.
22
+ Use the `architecture` mode for browser-ready overview diagrams with explicit coordinates. Use `cc-drawio-studio` instead when the priority is `.drawio` source, official vendor icons, diagrams.net manual editing, or complex auto-layout.
23
23
 
24
24
  ## Themed Semantic Diagrams
25
25
 
@@ -65,8 +65,8 @@ Keep the first blueprint readable:
65
65
  For README or stakeholder handoff, keep the JSON IR and HTML as the editable source, then export SVG/PNG/JPG artifacts:
66
66
 
67
67
  ```bash
68
- node skills/fec-image-generation/scripts/export-diagram.mjs --input docs/architecture/system-blueprint.html --format svg
69
- node skills/fec-image-generation/scripts/export-diagram.mjs --input docs/architecture/system-blueprint.html --format png --scale 2
68
+ node skills/cc-technical-diagrams/scripts/export-diagram.mjs --input docs/architecture/system-blueprint.html --format svg
69
+ node skills/cc-technical-diagrams/scripts/export-diagram.mjs --input docs/architecture/system-blueprint.html --format png --scale 2
70
70
  ```
71
71
 
72
72
  Raster export uses an existing Chromium-family browser when available. If the environment cannot rasterize SVG, deliver the generated HTML/SVG and state that PNG/JPG export needs a local browser.
@@ -198,7 +198,7 @@ Architecture output includes an automatic legend unless `legend` is set to `fals
198
198
  ## Render Command
199
199
 
200
200
  ```bash
201
- node skills/fec-image-generation/scripts/tech-diagram-render.mjs \
201
+ node skills/cc-technical-diagrams/scripts/tech-diagram-render.mjs \
202
202
  --input diagram.json \
203
203
  --output diagram.html \
204
204
  --type architecture \
@@ -217,7 +217,7 @@ The generated HTML is self-contained and includes:
217
217
  After exporting a PNG from the browser, run:
218
218
 
219
219
  ```bash
220
- node skills/fec-image-generation/scripts/png-qa.mjs \
220
+ node skills/cc-technical-diagrams/scripts/png-qa.mjs \
221
221
  --png diagram.png \
222
222
  --manifest diagram.layout.json \
223
223
  --format markdown
@@ -238,6 +238,6 @@ Deliver the `.html` source together with any exported SVG/PNG/JPG requested by t
238
238
 
239
239
  ## Quality delivery contract
240
240
 
241
- Prefer local Mermaid for standard sequence/workflow diagrams, reuse fec-drawio-studio for manually editable architecture, and optionally use Graphviz for dense topology. Fall back to compatible JSON/HTML if local tools are missing, without automatic installation/downloads. Preview, standalone SVG and PNG share source theme styles; export with `--theme light|dark`. PNG export waits for fonts and measures text; use `--manifest source.layout.json --output-manifest image.actual.json` for scaled pixel coordinates. QA must read the actual manifest, not reuse estimated coordinates unchanged for a 2x PNG.
241
+ Prefer local Mermaid for standard sequence/workflow diagrams, reuse cc-drawio-studio for manually editable architecture, and optionally use Graphviz for dense topology. Fall back to compatible JSON/HTML if local tools are missing, without automatic installation/downloads. Preview, standalone SVG and PNG share source theme styles; export with `--theme light|dark`. PNG export waits for fonts and measures text; use `--manifest source.layout.json --output-manifest image.actual.json` for scaled pixel coordinates. QA must read the actual manifest, not reuse estimated coordinates unchanged for a 2x PNG.
242
242
 
243
243
  The extended manifest retains canvas/boxes/connectors and adds coordinateSpace, scale, measurement, groups, labels and issues. Group containment is not node overlap. New checks include node-text-overflow, label-content-loss, label-out-of-bounds, edge-label-collision, text-overlap and degenerate-connector. Legacy manifests retain estimated checks. Diagnose constrained explicit sizes/waypoints without dropping text, changing relationships or silently moving coordinates. Increasing export resolution cannot fix source overflow. Visually review the final PNG and record tool availability/version, theme, scale, repair rounds and remaining defects; report partial acceptance when unresolved.
@@ -0,0 +1,37 @@
1
+ # PNG QA And Autofix
2
+
3
+ ## Loop
4
+
5
+ 1. Export PNG from the editable source or image workflow.
6
+ 2. Inspect the PNG visually.
7
+ 3. Run `png-qa.mjs` with a manifest when available.
8
+ 4. Convert each issue into source, prompt, or layout changes.
9
+ 5. Repeat for 2 rounds by default, up to 5 when the user asks for more repair attempts.
10
+
11
+ ## Issue mapping
12
+
13
+ | Issue | Repair |
14
+ | ----- | ------ |
15
+ | `blank-image` | Check export target, renderer errors, hidden layers, transparent fill, or failed image generation. |
16
+ | `edge-clipping` | Add canvas padding, expand SVG viewBox, reduce subject scale, or export a larger frame. |
17
+ | `box-overlap` | Increase spacing, reflow to grid/layers, split clusters, or wrap complete labels. |
18
+ | `box-out-of-bounds` | Move the node inside canvas or increase canvas dimensions. |
19
+ | `label-overflow` | Wrap text, widen the box, preserve complete copy, and increase font/container size together. |
20
+ | `connector-through-label` | Add waypoints around boxes, move labels, or use orthogonal routing. |
21
+ | `connector-stacking` | Offset parallel connectors or replace repeated lines with a labeled grouped path. |
22
+ | `manifest-canvas-mismatch` | Regenerate the manifest from final export dimensions. |
23
+
24
+ ## Manifest quality
25
+
26
+ The helper can only reason about overlaps and connectors when the manifest coordinates match the exported PNG. If the manifest is stale, repair the manifest first, then rerun QA.
27
+
28
+ ## Reporting
29
+
30
+ Report the number of QA rounds and the final issue list. If issues remain because the source renderer cannot expose layout coordinates, say which checks were image-only and which require manual visual review.
31
+
32
+
33
+ ## Quality delivery contract
34
+
35
+ Prefer local Mermaid for standard sequence/workflow diagrams, reuse cc-drawio-studio for manually editable architecture, and optionally use Graphviz for dense topology. Fall back to compatible JSON/HTML if local tools are missing, without automatic installation/downloads. Preview, standalone SVG and PNG share source theme styles; export with `--theme light|dark`. PNG export waits for fonts and measures text; use `--manifest source.layout.json --output-manifest image.actual.json` for scaled pixel coordinates. QA must read the actual manifest, not reuse estimated coordinates unchanged for a 2x PNG.
36
+
37
+ The extended manifest retains canvas/boxes/connectors and adds coordinateSpace, scale, measurement, groups, labels and issues. Group containment is not node overlap. New checks include node-text-overflow, label-content-loss, label-out-of-bounds, edge-label-collision, text-overlap and degenerate-connector. Legacy manifests retain estimated checks. Diagnose constrained explicit sizes/waypoints without dropping text, changing relationships or silently moving coordinates. Increasing export resolution cannot fix source overflow. Visually review the final PNG and record tool availability/version, theme, scale, repair rounds and remaining defects; report partial acceptance when unresolved.
@@ -22,6 +22,61 @@ export function findBrowser() {
22
22
 
23
23
  /** @typedef {{evaluate:(expression:string)=>Promise<unknown>,screenshot:(width:number,height:number,scale?:number)=>Promise<Buffer>}} DiagramSession */
24
24
 
25
+ /**
26
+ * Export failures must stay within the wording callers match on, so CDP details are wrapped here.
27
+ * @param {string} detail @returns {Error}
28
+ */
29
+ const exportFailure = (detail) => new Error(`Browser raster export failed: ${detail}`);
30
+
31
+ /** @param {()=>string} read @param {number} deadline @returns {Promise<number>} */
32
+ export async function waitForDebuggingPort(read, deadline) {
33
+ while (Date.now() < deadline) {
34
+ try {
35
+ const value = read().split("\n")[0].trim();
36
+ const port = Number(value);
37
+ if (/^\d+$/.test(value) && Number.isInteger(port) && port > 0 && port <= 65535) return port;
38
+ } catch (error) {
39
+ const code = error && typeof error === "object" && "code" in error ? String(error.code) : "";
40
+ if (!["EBUSY", "ENOENT", "EPERM"].includes(code)) throw exportFailure(error instanceof Error ? error.message : String(error));
41
+ }
42
+ await new Promise((resolve) => setTimeout(resolve, Math.min(50, Math.max(0, deadline - Date.now()))));
43
+ }
44
+ throw exportFailure("browser debugging port did not become readable before the initialization deadline.");
45
+ }
46
+
47
+ /**
48
+ * The target URL can be advertised before its execution context has finished navigating.
49
+ * Retry only that initialization window; action failures must propagate without replaying exports.
50
+ * @param {DiagramSession['evaluate']} evaluate @param {string} url @param {number} deadline
51
+ */
52
+ export async function waitForDiagramReady(evaluate, url, deadline) {
53
+ while (Date.now() < deadline) {
54
+ try {
55
+ const ready = await evaluate(`(async()=>{if(location.href!==${JSON.stringify(url)})return false;if(document.readyState!=="complete")await new Promise(r=>window.addEventListener("load",r,{once:true}));await document.fonts.ready;await new Promise(r=>requestAnimationFrame(()=>requestAnimationFrame(r)));return true;})()`);
56
+ if (ready === true) return;
57
+ } catch (error) {
58
+ if (!(error instanceof Error) || !/^Browser raster export failed: (?:Execution context was destroyed|Cannot find default execution context)\.?$/.test(error.message)) throw error;
59
+ }
60
+ await new Promise((resolve) => setTimeout(resolve, Math.min(50, Math.max(0, deadline - Date.now()))));
61
+ }
62
+ throw exportFailure("diagram page did not become ready before the initialization deadline.");
63
+ }
64
+
65
+ /**
66
+ * Chromium keeps profile files locked until its whole process tree is gone, so cleanup waits for
67
+ * the process instead of sleeping a fixed amount. @param {ReturnType<typeof spawn>} child @param {number} ms @returns {Promise<void>}
68
+ */
69
+ const waitForExit = async (child, ms) => {
70
+ if (child.exitCode !== null) return;
71
+ /** @type {ReturnType<typeof setTimeout> | undefined} */
72
+ let timer;
73
+ await new Promise((resolve) => {
74
+ const finish = () => { if (timer) clearTimeout(timer); child.off("exit", finish); resolve(undefined); };
75
+ timer = setTimeout(finish, ms);
76
+ child.once("exit", finish);
77
+ });
78
+ };
79
+
25
80
  /** @template T @param {string} html @param {{theme:'light'|'dark',timeoutMs:number}} options @param {(session:DiagramSession)=>Promise<T>} action @returns {Promise<T>} */
26
81
  export async function withDiagramPage(html, options, action) {
27
82
  const browser = findBrowser();
@@ -38,26 +93,33 @@ export async function withDiagramPage(html, options, action) {
38
93
  let timer;
39
94
  try {
40
95
  const work = async () => {
41
- const deadline = Date.now() + Math.min(5000, options.timeoutMs);
96
+ const deadline = Date.now() + Math.min(15000, options.timeoutMs);
42
97
  const portFile = path.join(profile, "DevToolsActivePort");
43
98
  while (!fs.existsSync(portFile) && Date.now() < deadline && (child.exitCode === null || child.exitCode === 0) && !childError) await new Promise((resolve) => setTimeout(resolve, 50));
44
- if (!fs.existsSync(portFile)) throw new Error(`Browser raster export failed: browser did not start a debugging session${childError ? ` (${childError})` : ""}.`);
45
- const port = Number(fs.readFileSync(portFile, "utf8").split("\n")[0]);
46
- const pages = await (await fetch(`http://127.0.0.1:${port}/json/list`, { signal: AbortSignal.timeout(Math.min(5000, options.timeoutMs)) })).json();
47
- const target = pages.find(/** @param {{type:string}} p */ (p) => p.type === "page");
48
- if (!target?.webSocketDebuggerUrl) throw new Error("Browser did not create a diagram page.");
99
+ if (!fs.existsSync(portFile)) throw exportFailure(`browser did not start a debugging session${childError ? ` (${childError})` : ""}.`);
100
+ const port = await waitForDebuggingPort(() => fs.readFileSync(portFile, "utf8"), deadline);
101
+ // Select the intended target first; the readiness handshake below also waits for its context.
102
+ /** @type {{webSocketDebuggerUrl?:string}|undefined} */
103
+ let target;
104
+ while (Date.now() < deadline) {
105
+ const pages = await (await fetch(`http://127.0.0.1:${port}/json/list`, { signal: AbortSignal.timeout(Math.min(5000, options.timeoutMs)) })).json();
106
+ target = pages.find(/** @param {{type:string,url:string}} p */ (p) => p.type === "page" && p.url === pathToFileURL(page).href);
107
+ if (target) break;
108
+ await new Promise((resolve) => setTimeout(resolve, 50));
109
+ }
110
+ if (!target?.webSocketDebuggerUrl) throw exportFailure("browser did not create a diagram page.");
49
111
  socket = new WebSocket(target.webSocketDebuggerUrl);
50
112
  await new Promise((resolve, reject) => { socket?.addEventListener("open", resolve, { once: true }); socket?.addEventListener("error", reject, { once: true }); });
51
113
  /** @type {Map<number,{resolve:(value:Record<string,unknown>)=>void,reject:(reason:Error)=>void}>} */
52
114
  const pending = new Map();
53
- socket.addEventListener("close", () => { for (const entry of pending.values()) entry.reject(new Error("Browser session closed before export completed.")); pending.clear(); });
115
+ socket.addEventListener("close", () => { for (const entry of pending.values()) entry.reject(exportFailure("session closed before export completed.")); pending.clear(); });
54
116
  let serial = 0;
55
117
  socket.addEventListener("message", (event) => {
56
118
  const message = JSON.parse(String(event.data));
57
119
  const entry = pending.get(message.id);
58
120
  if (!entry) return;
59
121
  pending.delete(message.id);
60
- if (message.error) entry.reject(new Error(message.error.message)); else entry.resolve(message.result ?? {});
122
+ if (message.error) entry.reject(exportFailure(message.error.message)); else entry.resolve(message.result ?? {});
61
123
  });
62
124
  /** @param {string} method @param {Record<string,unknown>} [params] @returns {Promise<Record<string,unknown>>} */
63
125
  const call = (method, params = {}) => new Promise((resolve, reject) => { const id = ++serial; pending.set(id, { resolve, reject }); socket?.send(JSON.stringify({ id, method, params })); });
@@ -73,18 +135,19 @@ export async function withDiagramPage(html, options, action) {
73
135
  const result = await call("Page.captureScreenshot", { format: "png", captureBeyondViewport: true, clip: { x: 0, y: 0, width, height, scale: 1 } });
74
136
  return Buffer.from(String(result.data), "base64");
75
137
  } };
76
- await evaluate(`(async()=>{if(document.readyState!=="complete")await new Promise(r=>window.addEventListener("load",r,{once:true}));await document.fonts.ready;await new Promise(r=>requestAnimationFrame(()=>requestAnimationFrame(r)));})()`);
138
+ await waitForDiagramReady(evaluate, pathToFileURL(page).href, deadline);
77
139
  return await action(session);
78
140
  };
79
- return await Promise.race([work(), new Promise(/** @param {(reason:Error)=>void} reject */ (_, reject) => { timer = setTimeout(() => reject(new Error("Browser export timed out.")), options.timeoutMs); })]);
141
+ return await Promise.race([work(), new Promise(/** @param {(reason:Error)=>void} reject */ (_, reject) => { timer = setTimeout(() => reject(exportFailure("export timed out.")), options.timeoutMs); })]);
80
142
  } finally {
81
143
  if (timer) clearTimeout(timer);
82
144
  if (socket?.readyState === WebSocket.OPEN) socket.send(JSON.stringify({ id: 999999, method: "Browser.close" }));
83
- await new Promise((resolve) => setTimeout(resolve, 120));
145
+ // Browser.close is graceful, so wait for the process rather than guessing with a fixed sleep:
146
+ // Chromium's child processes keep profile files locked until the tree is gone.
147
+ await waitForExit(child, 2000);
84
148
  socket?.close();
85
- child.kill();
149
+ if (child.exitCode === null) child.kill();
86
150
  // The Chromium profile is owned by this invocation only. Windows may release locks after exit.
87
- await new Promise((resolve) => setTimeout(resolve, 120));
88
- try { fs.rmSync(dir, { recursive: true, force: true, maxRetries: 5, retryDelay: 100 }); } catch { /* A locked temporary profile can be removed by OS cleanup. */ }
151
+ try { fs.rmSync(dir, { recursive: true, force: true, maxRetries: 10, retryDelay: 200 }); } catch { /* A locked temporary profile can be removed by OS cleanup. */ }
89
152
  }
90
153
  }
@@ -0,0 +1,176 @@
1
+ // @ts-check
2
+
3
+ /** @typedef {{x:number,y:number,width:number,height:number}} Rect */
4
+ /** @typedef {[number,number]} Point */
5
+ /** @typedef {{code:string,id:string,message:string}} QualityIssue */
6
+ /** @typedef {{lines:string[],width:number,height:number,fontSize:number,lineHeight:number}} TextLayout */
7
+ /** @typedef {Rect & {id:string,label:string,sublabel:string,type:string,actor?:string,step?:string,shape?:"box"|"diamond"|"terminal"}} Box */
8
+
9
+ /** @param {string} text @param {number} fontSize */
10
+ function textWidth(text, fontSize) {
11
+ return [...new Intl.Segmenter(undefined, { granularity: "grapheme" }).segment(text)]
12
+ .reduce((sum, item) => sum + (/^[\x00-\x7f]+$/.test(item.segment) ? fontSize * 0.6 : fontSize), 0);
13
+ }
14
+
15
+ /** @param {string} text @param {number} maxWidth @param {number} [fontSize] @param {number} [lineHeight] @returns {TextLayout} */
16
+ export function layoutText(text, maxWidth, fontSize = 14, lineHeight = 20) {
17
+ const limit = Math.max(fontSize, maxWidth);
18
+ /** @type {string[]} */
19
+ const lines = [];
20
+ for (const paragraph of text.split(/\r?\n/)) {
21
+ let line = "";
22
+ for (const { segment: word } of new Intl.Segmenter(undefined, { granularity: "word" }).segment(paragraph)) {
23
+ if (line && textWidth(word,fontSize) <= limit && textWidth(line+word,fontSize)>limit) {lines.push(line);line="";}
24
+ for (const { segment } of new Intl.Segmenter(undefined, { granularity: "grapheme" }).segment(word)) {
25
+ if (line && textWidth(line + segment, fontSize) > limit) {
26
+ lines.push(line);
27
+ line = "";
28
+ }
29
+ line += segment;
30
+ }
31
+ }
32
+ lines.push(line);
33
+ }
34
+ return { lines, width: Math.max(0, ...lines.map((line) => textWidth(line, fontSize))), height: lines.length * lineHeight, fontSize, lineHeight };
35
+ }
36
+
37
+ /** @param {Box} source @param {{width:boolean,height:boolean}} explicit */
38
+ export function fitNodeText(source, explicit) {
39
+ const box = { ...source };
40
+ if (![box.width, box.height].every((v) => Number.isFinite(v) && v > 0)) throw new Error(`Invalid size for node "${box.id}".`);
41
+ const diamond = box.shape === "diamond" || box.type === "decision";
42
+ const semantic = ["agent", "model", "memory", "vectorstore", "graphdb", "tool", "document", "queue", "browser", "user", "gateway"].includes(box.type);
43
+ if (!explicit.width) box.width = Math.max(box.width, diamond ? 240 : 200);
44
+ const available = diamond ? box.width * 0.5 - 12 : (box.type === "queue" ? box.width - 64 : box.width - 32);
45
+ const main = layoutText(box.label, available);
46
+ const sub = layoutText(box.sublabel, available, 12, 16);
47
+ const header = ["database", "vectorstore"].includes(box.type) ? 30 : box.type === "queue" ? 20 : semantic ? 46 : box.actor ? 40 : 20;
48
+ const contentHeight = main.height + (box.sublabel ? sub.height + 6 : 0);
49
+ const needed = diamond ? (contentHeight + 24) * 2 : header + contentHeight + (["database", "vectorstore"].includes(box.type) ? 30 : 18);
50
+ if (!explicit.height) box.height = Math.max(box.height, needed, 72);
51
+ /** @type {QualityIssue[]} */
52
+ const issues = [];
53
+ if (box.height < needed || available < main.width) issues.push({ code: "node-text-overflow", id: box.id, message: `Node "${box.id}" has an explicit size too small for its complete text.` });
54
+ return { box, labels: [main, sub], issues };
55
+ }
56
+
57
+ /** @param {Rect} box @param {'top'|'right'|'bottom'|'left'} side @returns {Point} */
58
+ export function boundaryPort(box, side) {
59
+ if (side === "top") return [box.x + box.width / 2, box.y];
60
+ if (side === "bottom") return [box.x + box.width / 2, box.y + box.height];
61
+ if (side === "left") return [box.x, box.y + box.height / 2];
62
+ return [box.x + box.width, box.y + box.height / 2];
63
+ }
64
+
65
+ /** Strict interior intersection; boundary contact is allowed. @param {Point} a @param {Point} b @param {Rect} r */
66
+ export function segmentHits(a, b, r) {
67
+ let lo = 0, hi = 1;
68
+ for (const axis of [0, 1]) {
69
+ const start = axis === 0 ? r.x : r.y;
70
+ const end = start + (axis === 0 ? r.width : r.height);
71
+ const delta = b[axis] - a[axis];
72
+ if (Math.abs(delta) < 1e-8) {
73
+ if (a[axis] <= start + 1e-6 || a[axis] >= end - 1e-6) return false;
74
+ } else {
75
+ const t1 = (start - a[axis]) / delta, t2 = (end - a[axis]) / delta;
76
+ lo = Math.max(lo, Math.min(t1, t2)); hi = Math.min(hi, Math.max(t1, t2));
77
+ }
78
+ }
79
+ return hi - lo > 1e-6;
80
+ }
81
+
82
+ /** @param {Rect} a @param {Rect} b */
83
+ export function overlaps(a, b) {
84
+ return Math.min(a.x + a.width, b.x + b.width) > Math.max(a.x, b.x) + 1e-6 && Math.min(a.y + a.height, b.y + b.height) > Math.max(a.y, b.y) + 1e-6;
85
+ }
86
+
87
+ /** @param {Point[]} points @returns {Point[]} */
88
+ function simplify(points) {
89
+ return points.filter((p, i) => {
90
+ if (i && p[0] === points[i - 1][0] && p[1] === points[i - 1][1]) return false;
91
+ if (!i || i === points.length - 1) return true;
92
+ const prev = points[i - 1], next = points[i + 1];
93
+ return !((prev[0] === p[0] && next[0] === p[0]) || (prev[1] === p[1] && next[1] === p[1]));
94
+ });
95
+ }
96
+
97
+ /** @param {Rect & {id:string}} from @param {Rect & {id:string}} to @param {Rect[]} obstacles @param {Point[][]} occupied @param {Point[]} [waypoints] */
98
+ export function routeConnector(from, to, obstacles, occupied, waypoints) {
99
+ const horizontal = Math.abs(to.x - from.x) >= Math.abs(to.y - from.y);
100
+ const forward = horizontal ? to.x >= from.x : to.y >= from.y;
101
+ const start = boundaryPort(from, horizontal ? (forward ? "right" : "left") : (forward ? "bottom" : "top"));
102
+ const end = boundaryPort(to, horizontal ? (forward ? "left" : "right") : (forward ? "top" : "bottom"));
103
+ /** @type {QualityIssue[]} */
104
+ const issues = [];
105
+ if (waypoints) {
106
+ const points = [start, ...waypoints, end];
107
+ if (points.some((p, i) => i > 0 && obstacles.some((r) => segmentHits(points[i - 1], p, r)))) issues.push({ code: "route-obstructed", id: `${from.id}-${to.id}`, message: "Explicit waypoints cross a non-endpoint node." });
108
+ return { points, issues };
109
+ }
110
+ if (from.id === to.id) {
111
+ const x = from.x + from.width + 40 + occupied.length * 4;
112
+ return { points: /** @type {Point[]} */ ([[from.x + from.width, from.y + from.height / 3], [x, from.y + from.height / 3], [x, from.y + from.height * 2 / 3], [from.x + from.width, from.y + from.height * 2 / 3]]), issues };
113
+ }
114
+ const padded = obstacles.map((r) => ({ x: r.x - 12, y: r.y - 12, width: r.width + 24, height: r.height + 24 }));
115
+ const xSet = new Set([start[0], end[0], 28]), ySet = new Set([start[1], end[1], 28]);
116
+ for (const r of [...padded, from, to]) { xSet.add(r.x - 16); xSet.add(r.x + r.width + 16); ySet.add(r.y - 16); ySet.add(r.y + r.height + 16); }
117
+ for (const route of occupied) for (const [x, y] of route) { xSet.add(x - 16); xSet.add(x + 16); ySet.add(y - 16); ySet.add(y + 16); }
118
+ const xs = [...xSet].filter((x) => x >= 24).sort((a, b) => a - b), ys = [...ySet].filter((y) => y >= 24).sort((a, b) => a - b);
119
+ if (xs.length > 128 || ys.length > 128) return { points: [start, end], issues: [{ code: "route-unresolved", id: `${from.id}-${to.id}`, message: "Routing grid exceeded its bounded search budget." }] };
120
+ const nx = xs.length, ny = ys.length;
121
+ const startId = ys.indexOf(start[1]) * nx + xs.indexOf(start[0]), endId = ys.indexOf(end[1]) * nx + xs.indexOf(end[0]);
122
+ /** @param {number} id @returns {Point} */
123
+ const point = (id) => [xs[id % nx], ys[Math.floor(id / nx)]];
124
+ /** @type {Array<{node:number,dir:number,cost:number,key:string}>} */
125
+ const pending = [{ node: startId, dir: 0, cost: 0, key: `${startId}:0` }];
126
+ const best = new Map([[`${startId}:0`, 0]]), previous = new Map();
127
+ let finish = "";
128
+ while (pending.length) {
129
+ pending.sort((a, b) => a.cost - b.cost || a.node - b.node || a.dir - b.dir);
130
+ const current = pending.shift();
131
+ if (!current || current.cost !== best.get(current.key)) continue;
132
+ if (current.node === endId) { finish = current.key; break; }
133
+ const ix = current.node % nx, iy = Math.floor(current.node / nx);
134
+ for (const [dx, dy] of [[-1, 0], [1, 0], [0, -1], [0, 1]]) {
135
+ if (ix + dx < 0 || ix + dx >= nx || iy + dy < 0 || iy + dy >= ny) continue;
136
+ const next = (iy + dy) * nx + ix + dx, a = point(current.node), b = point(next);
137
+ if ([...padded, from, to].some((r) => segmentHits(a, b, r))) continue;
138
+ const dir = dx ? 1 : 2;
139
+ let penalty = 0;
140
+ for (const route of occupied) for (let i = 1; i < route.length; i++) {
141
+ const p = route[i - 1], q = route[i];
142
+ if ((a[0] === b[0] && p[0] === q[0] && a[0] === p[0] && Math.min(b[1], a[1]) < Math.max(p[1], q[1]) && Math.max(b[1], a[1]) > Math.min(p[1], q[1])) || (a[1] === b[1] && p[1] === q[1] && a[1] === p[1] && Math.min(b[0], a[0]) < Math.max(p[0], q[0]) && Math.max(b[0], a[0]) > Math.min(p[0], q[0]))) penalty += 80;
143
+ }
144
+ const cost = current.cost + Math.abs(b[0] - a[0]) + Math.abs(b[1] - a[1]) + (current.dir && current.dir !== dir ? 24 : 0) + penalty;
145
+ const key = `${next}:${dir}`;
146
+ if (cost < (best.get(key) ?? Infinity)) { best.set(key, cost); previous.set(key, current.key); pending.push({ node: next, dir, cost, key }); }
147
+ }
148
+ }
149
+ if (!finish) return { points: [start, end], issues: [{ code: "route-unresolved", id: `${from.id}-${to.id}`, message: "No obstacle-free route exists without moving explicit nodes." }] };
150
+ /** @type {Point[]} */
151
+ const route = [];
152
+ for (let key = finish; key; key = previous.get(key)) route.unshift(point(Number(key.split(":")[0])));
153
+ return { points: simplify(route), issues };
154
+ }
155
+
156
+ /** @param {Point[]} points @param {TextLayout} layout @param {Rect[]} obstacles @param {Point[][]} [routes] */
157
+ export function placeEdgeLabel(points, layout, obstacles, routes = []) {
158
+ const lengths = points.slice(1).map((p, i) => Math.hypot(p[0] - points[i][0], p[1] - points[i][1]));
159
+ let remaining = lengths.reduce((a, b) => a + b, 0) / 2;
160
+ let cx = points[0][0], cy = points[0][1];
161
+ for (let i = 0; i < lengths.length; i++) {
162
+ if (remaining <= lengths[i]) {
163
+ const ratio = lengths[i] ? remaining / lengths[i] : 0;
164
+ cx = points[i][0] + (points[i + 1][0] - points[i][0]) * ratio;
165
+ cy = points[i][1] + (points[i + 1][1] - points[i][1]) * ratio;
166
+ break;
167
+ }
168
+ remaining -= lengths[i];
169
+ }
170
+ let rect = { x: cx - layout.width / 2, y: cy - layout.height - 12, width: layout.width, height: layout.height };
171
+ for (const offset of [12,24,36,52,72,96]) for (const direction of ["above","below","left","right"]) {
172
+ const candidate = direction === "above" ? {...rect,y:cy-layout.height-offset} : direction === "below" ? {...rect,y:cy+offset} : direction === "left" ? {...rect,x:cx-layout.width-offset,y:cy-layout.height/2} : {...rect,x:cx+offset,y:cy-layout.height/2};
173
+ if (candidate.x >= 24 && candidate.y >= 24 && !obstacles.some((r) => overlaps(candidate, r)) && !routes.some(route=>route.slice(1).some((point,index)=>segmentHits(route[index],point,{x:candidate.x-4,y:candidate.y-4,width:candidate.width+8,height:candidate.height+8})))) return { rect: candidate, issues: /** @type {QualityIssue[]} */ ([]) };
174
+ }
175
+ return { rect, issues: [{ code: "edge-label-collision", id: "edge", message: "No free label position near route midpoint." }] };
176
+ }