@bovinphang/frontend-craft 2.6.0 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (414) hide show
  1. package/.claude-plugin/marketplace.json +3 -3
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +72 -1
  4. package/CHANGELOG.zh-CN.md +71 -1
  5. package/README.md +10 -6
  6. package/README.openclaw.md +100 -42
  7. package/README.openclaw.zh-CN.md +100 -42
  8. package/README.zh-CN.md +10 -6
  9. package/agents/fec-architect.md +70 -70
  10. package/agents/fec-code-reviewer.md +82 -82
  11. package/agents/fec-debugger.md +20 -20
  12. package/agents/fec-design-token-mapper.md +36 -36
  13. package/agents/fec-doc-updater.md +13 -13
  14. package/agents/fec-e2e-runner.md +45 -45
  15. package/agents/fec-figma-implementer.md +59 -59
  16. package/agents/fec-performance-optimizer.md +128 -128
  17. package/agents/fec-refactor-cleaner.md +14 -14
  18. package/agents/fec-security-reviewer.md +66 -67
  19. package/agents/fec-test-planner.md +27 -27
  20. package/agents/fec-typescript-reviewer.md +88 -88
  21. package/agents/fec-ui-checker.md +74 -74
  22. package/commands/fec-debug.md +19 -19
  23. package/commands/fec-doc-sync.md +11 -11
  24. package/commands/fec-init.md +37 -38
  25. package/commands/fec-plan.md +58 -58
  26. package/commands/fec-refactor-clean.md +11 -11
  27. package/commands/fec-review.md +41 -41
  28. package/commands/fec-scaffold.md +41 -41
  29. package/commands/fec-tdd.md +13 -13
  30. package/dist/bin/frontend-craft.js +29 -27
  31. package/docs/example-prompts.md +84 -69
  32. package/docs/ja-JP/README.md +56 -52
  33. package/docs/ko-KR/README.md +45 -41
  34. package/docs/project-structure.md +19 -7
  35. package/docs/superpowers/plans/2026-05-29-fec-debug.md +491 -0
  36. package/docs/superpowers/specs/2026-05-29-fec-debug-design.md +340 -0
  37. package/docs/zh-CN/example-prompts.md +84 -69
  38. package/docs/zh-CN/project-structure.md +14 -5
  39. package/docs/zh-TW/README.md +33 -29
  40. package/localized/zh-CN/agents/fec-architect.md +125 -0
  41. package/localized/zh-CN/agents/fec-code-reviewer.md +152 -0
  42. package/localized/zh-CN/agents/fec-debugger.md +44 -0
  43. package/localized/zh-CN/agents/fec-design-token-mapper.md +75 -0
  44. package/localized/zh-CN/agents/fec-doc-updater.md +30 -0
  45. package/localized/zh-CN/agents/fec-e2e-runner.md +107 -0
  46. package/localized/zh-CN/agents/fec-figma-implementer.md +104 -0
  47. package/localized/zh-CN/agents/fec-performance-optimizer.md +293 -0
  48. package/localized/zh-CN/agents/fec-refactor-cleaner.md +32 -0
  49. package/localized/zh-CN/agents/fec-security-reviewer.md +116 -0
  50. package/localized/zh-CN/agents/fec-test-planner.md +50 -0
  51. package/localized/zh-CN/agents/fec-typescript-reviewer.md +142 -0
  52. package/localized/zh-CN/agents/fec-ui-checker.md +120 -0
  53. package/localized/zh-CN/commands/fec-debug.md +30 -0
  54. package/localized/zh-CN/commands/fec-doc-sync.md +19 -0
  55. package/localized/zh-CN/commands/fec-init.md +70 -0
  56. package/localized/zh-CN/commands/fec-plan.md +94 -0
  57. package/localized/zh-CN/commands/fec-refactor-clean.md +19 -0
  58. package/localized/zh-CN/commands/fec-review.md +66 -0
  59. package/localized/zh-CN/commands/fec-scaffold.md +205 -0
  60. package/localized/zh-CN/commands/fec-tdd.md +21 -0
  61. package/localized/zh-CN/skills/TEMPLATE.md +155 -0
  62. package/localized/zh-CN/skills/eval_queries.json +1013 -0
  63. package/localized/zh-CN/skills/fec-accessibility-check/SKILL.md +39 -0
  64. package/localized/zh-CN/skills/fec-accessibility-check/references/report-template.md +23 -0
  65. package/localized/zh-CN/skills/fec-accessibility-check/references/screen-reader-testing.md +33 -0
  66. package/localized/zh-CN/skills/fec-alchemy/SKILL.md +74 -0
  67. package/localized/zh-CN/skills/fec-alchemy/assets/absorption-plan-template.md +47 -0
  68. package/localized/zh-CN/skills/fec-alchemy/assets/intake-template.md +55 -0
  69. package/localized/zh-CN/skills/fec-alchemy/assets/review-checklist.md +31 -0
  70. package/localized/zh-CN/skills/fec-alchemy/references/methodology.md +94 -0
  71. package/localized/zh-CN/skills/fec-alchemy/references/originality-and-licensing.md +57 -0
  72. package/localized/zh-CN/skills/fec-api-integration/SKILL.md +78 -0
  73. package/localized/zh-CN/skills/fec-api-integration/references/integration-patterns.md +80 -0
  74. package/localized/zh-CN/skills/fec-backend-requirements-handoff/SKILL.md +45 -0
  75. package/localized/zh-CN/skills/fec-browser-storage/SKILL.md +34 -0
  76. package/localized/zh-CN/skills/fec-browser-storage/references/storage-patterns.md +65 -0
  77. package/localized/zh-CN/skills/fec-canvas-threejs/SKILL.md +66 -0
  78. package/localized/zh-CN/skills/fec-canvas-threejs/references/rendering-patterns.md +67 -0
  79. package/localized/zh-CN/skills/fec-canvas-threejs/references/shader-webgl-patterns.md +67 -0
  80. package/localized/zh-CN/skills/fec-code-review/SKILL.md +143 -0
  81. package/localized/zh-CN/skills/fec-code-review/references/report-template.md +29 -0
  82. package/localized/zh-CN/skills/fec-component-testing/SKILL.md +119 -0
  83. package/localized/zh-CN/skills/fec-data-fetching/SKILL.md +62 -0
  84. package/localized/zh-CN/skills/fec-data-fetching/references/query-patterns.md +103 -0
  85. package/localized/zh-CN/skills/fec-debug-framework/SKILL.md +157 -0
  86. package/localized/zh-CN/skills/fec-debug-framework/references/report-template.md +58 -0
  87. package/localized/zh-CN/skills/fec-dependency-upgrade/SKILL.md +34 -0
  88. package/localized/zh-CN/skills/fec-dependency-upgrade/references/dependency-upgrade-workflow.md +56 -0
  89. package/localized/zh-CN/skills/fec-doc-sync/SKILL.md +39 -0
  90. package/localized/zh-CN/skills/fec-drawio-studio/SKILL.md +73 -0
  91. package/localized/zh-CN/skills/fec-drawio-studio/data/THIRD_PARTY_NOTICES.md +10 -0
  92. package/localized/zh-CN/skills/fec-drawio-studio/data/brand-icons.json +878 -0
  93. package/localized/zh-CN/skills/fec-drawio-studio/data/shape-index.json +83570 -0
  94. package/localized/zh-CN/skills/fec-drawio-studio/references/data-residency.md +27 -0
  95. package/localized/zh-CN/skills/fec-drawio-studio/references/diagram-patterns.md +60 -0
  96. package/localized/zh-CN/skills/fec-drawio-studio/references/flowchart-quality.md +49 -0
  97. package/localized/zh-CN/skills/fec-drawio-studio/references/layout-and-export.md +72 -0
  98. package/localized/zh-CN/skills/fec-drawio-studio/references/troubleshooting.md +29 -0
  99. package/localized/zh-CN/skills/fec-drawio-studio/references/xml-and-mermaid.md +58 -0
  100. package/localized/zh-CN/skills/fec-drawio-studio/scripts/brand-symbols.mjs +99 -0
  101. package/localized/zh-CN/skills/fec-drawio-studio/scripts/diagram-lint.mjs +205 -0
  102. package/localized/zh-CN/skills/fec-drawio-studio/scripts/diagram-url.mjs +102 -0
  103. package/localized/zh-CN/skills/fec-drawio-studio/scripts/drawio-export.mjs +134 -0
  104. package/localized/zh-CN/skills/fec-drawio-studio/scripts/layout-graph.mjs +107 -0
  105. package/localized/zh-CN/skills/fec-drawio-studio/scripts/png-embed-fix.mjs +26 -0
  106. package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-go-packages.mjs +36 -0
  107. package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-js-modules.mjs +52 -0
  108. package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-python-classes.mjs +30 -0
  109. package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-python-modules.mjs +55 -0
  110. package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-rust-modules.mjs +35 -0
  111. package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-ts-modules.mjs +7 -0
  112. package/localized/zh-CN/skills/fec-drawio-studio/scripts/shape-query.mjs +121 -0
  113. package/localized/zh-CN/skills/fec-drawio-studio/scripts/studio-core.mjs +139 -0
  114. package/localized/zh-CN/skills/fec-drawio-studio/styles/built-in/corporate.json +49 -0
  115. package/localized/zh-CN/skills/fec-drawio-studio/styles/built-in/default.json +49 -0
  116. package/localized/zh-CN/skills/fec-drawio-studio/styles/built-in/handdrawn.json +49 -0
  117. package/localized/zh-CN/skills/fec-drawio-studio/styles/schema.json +112 -0
  118. package/localized/zh-CN/skills/fec-e2e-testing/SKILL.md +42 -0
  119. package/localized/zh-CN/skills/fec-e2e-testing/references/e2e-ci-reporting.md +62 -0
  120. package/localized/zh-CN/skills/fec-e2e-testing/references/e2e-special-scenarios.md +52 -0
  121. package/localized/zh-CN/skills/fec-e2e-testing/references/e2e-visual-regression.md +60 -0
  122. package/localized/zh-CN/skills/fec-e2e-testing/references/playwright-patterns.md +95 -0
  123. package/localized/zh-CN/skills/fec-form-handling/SKILL.md +76 -0
  124. package/localized/zh-CN/skills/fec-form-handling/references/advanced-form-patterns.md +101 -0
  125. package/localized/zh-CN/skills/fec-image-generation/SKILL.md +80 -0
  126. package/localized/zh-CN/skills/fec-image-generation/assets/interactive-diagram.html +371 -0
  127. package/localized/zh-CN/skills/fec-image-generation/references/artifact-routing.md +80 -0
  128. package/localized/zh-CN/skills/fec-image-generation/references/diagram-workflows.md +74 -0
  129. package/localized/zh-CN/skills/fec-image-generation/references/html-technical-diagrams.md +236 -0
  130. package/localized/zh-CN/skills/fec-image-generation/references/png-qa-autofix.md +30 -0
  131. package/localized/zh-CN/skills/fec-image-generation/scripts/export-diagram.mjs +364 -0
  132. package/localized/zh-CN/skills/fec-image-generation/scripts/interactive-diagram-server.mjs +654 -0
  133. package/localized/zh-CN/skills/fec-image-generation/scripts/png-qa.mjs +431 -0
  134. package/localized/zh-CN/skills/fec-image-generation/scripts/tech-diagram-render.mjs +1397 -0
  135. package/localized/zh-CN/skills/fec-implement-from-design/SKILL.md +129 -0
  136. package/localized/zh-CN/skills/fec-implement-from-design/references/design-plan-template.md +36 -0
  137. package/localized/zh-CN/skills/fec-legacy-to-modern-migration/SKILL.md +46 -0
  138. package/localized/zh-CN/skills/fec-legacy-to-modern-migration/references/migration-execution-checklist.md +110 -0
  139. package/localized/zh-CN/skills/fec-legacy-to-modern-migration/references/migration-report-template.md +41 -0
  140. package/localized/zh-CN/skills/fec-legacy-to-modern-migration/references/migration-strategy-and-mapping.md +48 -0
  141. package/localized/zh-CN/skills/fec-legacy-web-standard/SKILL.md +35 -0
  142. package/localized/zh-CN/skills/fec-legacy-web-standard/references/legacy-patterns.md +85 -0
  143. package/localized/zh-CN/skills/fec-list-virtualization/SKILL.md +34 -0
  144. package/localized/zh-CN/skills/fec-list-virtualization/references/virtualization-patterns.md +80 -0
  145. package/localized/zh-CN/skills/fec-monorepo-project-standard/SKILL.md +142 -0
  146. package/localized/zh-CN/skills/fec-motion-interaction/SKILL.md +73 -0
  147. package/localized/zh-CN/skills/fec-motion-interaction/references/motion-patterns.md +112 -0
  148. package/localized/zh-CN/skills/fec-nextjs-project-standard/SKILL.md +123 -0
  149. package/localized/zh-CN/skills/fec-nuxt-project-standard/SKILL.md +122 -0
  150. package/localized/zh-CN/skills/fec-performance-optimization/SKILL.md +80 -0
  151. package/localized/zh-CN/skills/fec-performance-optimization/references/framework-performance-patterns.md +38 -0
  152. package/localized/zh-CN/skills/fec-performance-optimization/references/report-template.md +59 -0
  153. package/localized/zh-CN/skills/fec-pwa-implementation/SKILL.md +35 -0
  154. package/localized/zh-CN/skills/fec-pwa-implementation/references/manifest-and-icons.md +53 -0
  155. package/localized/zh-CN/skills/fec-pwa-implementation/references/service-worker-workbox.md +68 -0
  156. package/localized/zh-CN/skills/fec-react-project-standard/SKILL.md +91 -0
  157. package/localized/zh-CN/skills/fec-react-project-standard/references/react-performance-patterns.md +35 -0
  158. package/localized/zh-CN/skills/fec-react-project-standard/references/react-project-structure.md +197 -0
  159. package/localized/zh-CN/skills/fec-react-project-standard/references/react-quality-patterns.md +131 -0
  160. package/localized/zh-CN/skills/fec-react-project-standard/references/react-runtime-patterns.md +293 -0
  161. package/localized/zh-CN/skills/fec-refactor-clean/SKILL.md +51 -0
  162. package/localized/zh-CN/skills/fec-refactor-clean/references/report-template.md +42 -0
  163. package/localized/zh-CN/skills/fec-responsive-layout/SKILL.md +34 -0
  164. package/localized/zh-CN/skills/fec-responsive-layout/references/responsive-layout-patterns.md +70 -0
  165. package/localized/zh-CN/skills/fec-route-protection/SKILL.md +135 -0
  166. package/localized/zh-CN/skills/fec-security-review/SKILL.md +38 -0
  167. package/localized/zh-CN/skills/fec-security-review/references/report-template.md +27 -0
  168. package/localized/zh-CN/skills/fec-security-review/references/security-checklist.md +64 -0
  169. package/localized/zh-CN/skills/fec-source-driven-development/SKILL.md +87 -0
  170. package/localized/zh-CN/skills/fec-state-management/SKILL.md +140 -0
  171. package/localized/zh-CN/skills/fec-state-management/references/state-patterns.md +109 -0
  172. package/localized/zh-CN/skills/fec-storybook-component-doc/SKILL.md +37 -0
  173. package/localized/zh-CN/skills/fec-storybook-component-doc/references/story-patterns.md +118 -0
  174. package/localized/zh-CN/skills/fec-svg-animation/SKILL.md +148 -0
  175. package/localized/zh-CN/skills/fec-tailwind-design-system/SKILL.md +34 -0
  176. package/localized/zh-CN/skills/fec-tailwind-design-system/references/tailwind-system-patterns.md +59 -0
  177. package/localized/zh-CN/skills/fec-tdd-workflow/SKILL.md +52 -0
  178. package/localized/zh-CN/skills/fec-testing-strategy/SKILL.md +45 -0
  179. package/localized/zh-CN/skills/fec-typescript-project-standard/SKILL.md +54 -0
  180. package/{skills/fec-typescript-type-safety → localized/zh-CN/skills/fec-typescript-project-standard}/references/type-safety-patterns.md +1 -1
  181. package/{skills/fec-typescript-type-safety/SKILL.md → localized/zh-CN/skills/fec-typescript-project-standard/references/type-safety.md} +5 -14
  182. package/localized/zh-CN/skills/fec-ui-design/SKILL.md +108 -0
  183. package/localized/zh-CN/skills/fec-ui-design/data/product-rules.json +231 -0
  184. package/localized/zh-CN/skills/fec-ui-design/data/stack-ui-rules.json +146 -0
  185. package/localized/zh-CN/skills/fec-ui-design/data/style-archetypes.json +373 -0
  186. package/localized/zh-CN/skills/fec-ui-design/data/ux-quality-rules.json +203 -0
  187. package/localized/zh-CN/skills/fec-ui-design/references/design-intelligence.md +97 -0
  188. package/localized/zh-CN/skills/fec-ui-design/references/master-page-overrides.md +30 -0
  189. package/localized/zh-CN/skills/fec-ui-design/references/pre-delivery-checklist.md +39 -0
  190. package/localized/zh-CN/skills/fec-ui-design/scripts/design-system.mjs +648 -0
  191. package/localized/zh-CN/skills/fec-validation-fix/SKILL.md +51 -0
  192. package/localized/zh-CN/skills/fec-validation-fix/references/report-template.md +43 -0
  193. package/localized/zh-CN/skills/fec-vite-project-standard/SKILL.md +83 -0
  194. package/localized/zh-CN/skills/fec-vue3-project-standard/SKILL.md +58 -0
  195. package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-composables-routing.md +162 -0
  196. package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-performance-patterns.md +13 -0
  197. package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-project-structure.md +176 -0
  198. package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-state-api-quality.md +216 -0
  199. package/localized/zh-CN/skills/fec-web-video-presentation/SKILL.md +61 -0
  200. package/localized/zh-CN/skills/fec-web-video-presentation/data/starter-themes.json +59 -0
  201. package/localized/zh-CN/skills/fec-web-video-presentation/references/chapter-craft.md +37 -0
  202. package/localized/zh-CN/skills/fec-web-video-presentation/references/content-plan.md +38 -0
  203. package/localized/zh-CN/skills/fec-web-video-presentation/references/recording-and-audio.md +33 -0
  204. package/localized/zh-CN/skills/fec-web-video-presentation/references/theme-system.md +36 -0
  205. package/localized/zh-CN/skills/fec-web-video-presentation/scripts/create-video-presentation.mjs +430 -0
  206. package/localized/zh-CN/skills/fec-web-workers/SKILL.md +35 -0
  207. package/localized/zh-CN/skills/fec-web-workers/references/advanced-workers.md +54 -0
  208. package/localized/zh-CN/skills/fec-web-workers/references/basic-worker.md +67 -0
  209. package/localized/zh-CN/skills/metadata.json +1646 -0
  210. package/localized/zh-CN/skills/relations.json +755 -0
  211. package/localized/zh-CN/templates/claude/CLAUDE.md +106 -0
  212. package/localized/zh-CN/templates/claude/settings.json +62 -0
  213. package/localized/zh-CN/templates/codex/AGENTS.md +105 -0
  214. package/localized/zh-CN/templates/codex/config.toml +32 -0
  215. package/localized/zh-CN/templates/openclaw/AGENTS.md +101 -0
  216. package/localized/zh-CN/templates/openclaw/OPENCLAW-CONFIG.md +12 -0
  217. package/localized/zh-CN/templates/shared/rules/fec-agent-workflow.md +54 -0
  218. package/localized/zh-CN/templates/shared/rules/fec-api-layer.md +99 -0
  219. package/localized/zh-CN/templates/shared/rules/fec-ci-cd.md +40 -0
  220. package/localized/zh-CN/templates/shared/rules/fec-code-comments.md +33 -0
  221. package/localized/zh-CN/templates/shared/rules/fec-design-system.md +72 -0
  222. package/localized/zh-CN/templates/shared/rules/fec-error-handling.md +56 -0
  223. package/localized/zh-CN/templates/shared/rules/fec-git-conventions.md +73 -0
  224. package/localized/zh-CN/templates/shared/rules/fec-i18n.md +64 -0
  225. package/localized/zh-CN/templates/shared/rules/fec-naming-conventions.md +120 -0
  226. package/localized/zh-CN/templates/shared/rules/fec-performance.md +101 -0
  227. package/localized/zh-CN/templates/shared/rules/fec-react.md +82 -0
  228. package/localized/zh-CN/templates/shared/rules/fec-refactoring.md +47 -0
  229. package/localized/zh-CN/templates/shared/rules/fec-rendering-patterns.md +40 -0
  230. package/localized/zh-CN/templates/shared/rules/fec-responsive-design.md +50 -0
  231. package/localized/zh-CN/templates/shared/rules/fec-source-driven-development.md +31 -0
  232. package/localized/zh-CN/templates/shared/rules/fec-state-management.md +60 -0
  233. package/localized/zh-CN/templates/shared/rules/fec-testing.md +98 -0
  234. package/localized/zh-CN/templates/shared/rules/fec-typescript.md +112 -0
  235. package/localized/zh-CN/templates/shared/rules/fec-vue.md +64 -0
  236. package/localized/zh-CN/templates/shared/rules/fec-working-modes.md +50 -0
  237. package/openclaw.plugin.json +1 -1
  238. package/package.json +4 -3
  239. package/skills/TEMPLATE.md +74 -74
  240. package/skills/eval_queries.json +717 -619
  241. package/skills/fec-accessibility-check/SKILL.md +21 -21
  242. package/skills/fec-accessibility-check/references/report-template.md +12 -12
  243. package/skills/fec-accessibility-check/references/screen-reader-testing.md +24 -24
  244. package/skills/fec-alchemy/SKILL.md +50 -50
  245. package/skills/fec-alchemy/assets/absorption-plan-template.md +32 -32
  246. package/skills/fec-alchemy/assets/intake-template.md +55 -55
  247. package/skills/fec-alchemy/assets/review-checklist.md +23 -23
  248. package/skills/fec-alchemy/references/methodology.md +66 -66
  249. package/skills/fec-alchemy/references/originality-and-licensing.md +42 -42
  250. package/skills/fec-api-integration/SKILL.md +61 -61
  251. package/skills/fec-api-integration/references/integration-patterns.md +30 -30
  252. package/skills/fec-backend-requirements-handoff/SKILL.md +45 -0
  253. package/skills/fec-browser-storage/SKILL.md +16 -16
  254. package/skills/fec-browser-storage/references/storage-patterns.md +16 -16
  255. package/skills/fec-canvas-threejs/SKILL.md +21 -21
  256. package/skills/fec-canvas-threejs/references/rendering-patterns.md +10 -10
  257. package/skills/fec-canvas-threejs/references/shader-webgl-patterns.md +37 -37
  258. package/skills/fec-code-review/SKILL.md +94 -94
  259. package/skills/fec-code-review/references/report-template.md +13 -13
  260. package/skills/fec-component-testing/SKILL.md +39 -39
  261. package/skills/fec-data-fetching/SKILL.md +16 -16
  262. package/skills/fec-data-fetching/references/query-patterns.md +27 -27
  263. package/skills/fec-debug-framework/SKILL.md +95 -95
  264. package/skills/fec-debug-framework/references/report-template.md +34 -34
  265. package/skills/fec-dependency-upgrade/SKILL.md +17 -17
  266. package/skills/fec-dependency-upgrade/references/dependency-upgrade-workflow.md +31 -31
  267. package/skills/fec-doc-sync/SKILL.md +23 -23
  268. package/skills/fec-drawio-studio/SKILL.md +73 -0
  269. package/skills/fec-drawio-studio/data/THIRD_PARTY_NOTICES.md +10 -0
  270. package/skills/fec-drawio-studio/data/brand-icons.json +878 -0
  271. package/skills/fec-drawio-studio/data/shape-index.json +83570 -0
  272. package/skills/fec-drawio-studio/references/data-residency.md +27 -0
  273. package/skills/fec-drawio-studio/references/diagram-patterns.md +60 -0
  274. package/skills/fec-drawio-studio/references/flowchart-quality.md +49 -0
  275. package/skills/fec-drawio-studio/references/layout-and-export.md +72 -0
  276. package/skills/fec-drawio-studio/references/troubleshooting.md +29 -0
  277. package/skills/fec-drawio-studio/references/xml-and-mermaid.md +58 -0
  278. package/skills/fec-drawio-studio/scripts/brand-symbols.mjs +99 -0
  279. package/skills/fec-drawio-studio/scripts/diagram-lint.mjs +205 -0
  280. package/skills/fec-drawio-studio/scripts/diagram-url.mjs +102 -0
  281. package/skills/fec-drawio-studio/scripts/drawio-export.mjs +134 -0
  282. package/skills/fec-drawio-studio/scripts/layout-graph.mjs +107 -0
  283. package/skills/fec-drawio-studio/scripts/png-embed-fix.mjs +26 -0
  284. package/skills/fec-drawio-studio/scripts/scan-go-packages.mjs +36 -0
  285. package/skills/fec-drawio-studio/scripts/scan-js-modules.mjs +52 -0
  286. package/skills/fec-drawio-studio/scripts/scan-python-classes.mjs +30 -0
  287. package/skills/fec-drawio-studio/scripts/scan-python-modules.mjs +55 -0
  288. package/skills/fec-drawio-studio/scripts/scan-rust-modules.mjs +35 -0
  289. package/skills/fec-drawio-studio/scripts/scan-ts-modules.mjs +7 -0
  290. package/skills/fec-drawio-studio/scripts/shape-query.mjs +121 -0
  291. package/skills/fec-drawio-studio/scripts/studio-core.mjs +139 -0
  292. package/skills/fec-drawio-studio/styles/built-in/corporate.json +49 -0
  293. package/skills/fec-drawio-studio/styles/built-in/default.json +49 -0
  294. package/skills/fec-drawio-studio/styles/built-in/handdrawn.json +49 -0
  295. package/skills/fec-drawio-studio/styles/schema.json +112 -0
  296. package/skills/fec-e2e-testing/SKILL.md +24 -22
  297. package/skills/fec-e2e-testing/references/e2e-ci-reporting.md +62 -0
  298. package/skills/fec-e2e-testing/references/e2e-special-scenarios.md +52 -0
  299. package/skills/fec-e2e-testing/references/e2e-visual-regression.md +60 -0
  300. package/skills/fec-e2e-testing/references/playwright-patterns.md +6 -6
  301. package/skills/fec-form-handling/SKILL.md +21 -21
  302. package/skills/fec-form-handling/references/advanced-form-patterns.md +41 -41
  303. package/skills/fec-image-generation/SKILL.md +81 -0
  304. package/skills/fec-image-generation/assets/interactive-diagram.html +371 -0
  305. package/skills/fec-image-generation/references/artifact-routing.md +80 -0
  306. package/skills/fec-image-generation/references/diagram-workflows.md +74 -0
  307. package/skills/fec-image-generation/references/html-technical-diagrams.md +236 -0
  308. package/skills/fec-image-generation/references/png-qa-autofix.md +30 -0
  309. package/skills/fec-image-generation/scripts/export-diagram.mjs +364 -0
  310. package/skills/fec-image-generation/scripts/interactive-diagram-server.mjs +654 -0
  311. package/skills/fec-image-generation/scripts/png-qa.mjs +431 -0
  312. package/skills/fec-image-generation/scripts/tech-diagram-render.mjs +1397 -0
  313. package/skills/fec-implement-from-design/SKILL.md +81 -74
  314. package/skills/fec-implement-from-design/references/design-plan-template.md +16 -16
  315. package/skills/fec-legacy-to-modern-migration/SKILL.md +29 -173
  316. package/skills/fec-legacy-to-modern-migration/references/migration-execution-checklist.md +110 -0
  317. package/skills/fec-legacy-to-modern-migration/references/migration-report-template.md +37 -37
  318. package/skills/fec-legacy-to-modern-migration/references/migration-strategy-and-mapping.md +48 -0
  319. package/skills/fec-legacy-web-standard/SKILL.md +17 -17
  320. package/skills/fec-legacy-web-standard/references/legacy-patterns.md +16 -16
  321. package/skills/fec-list-virtualization/SKILL.md +16 -16
  322. package/skills/fec-list-virtualization/references/virtualization-patterns.md +31 -31
  323. package/skills/fec-monorepo-project-standard/SKILL.md +52 -52
  324. package/skills/fec-motion-interaction/SKILL.md +51 -44
  325. package/skills/fec-motion-interaction/references/motion-patterns.md +11 -11
  326. package/skills/fec-nextjs-project-standard/SKILL.md +64 -58
  327. package/skills/fec-nuxt-project-standard/SKILL.md +57 -57
  328. package/skills/fec-performance-optimization/SKILL.md +54 -50
  329. package/skills/fec-performance-optimization/references/framework-performance-patterns.md +38 -0
  330. package/skills/fec-performance-optimization/references/report-template.md +34 -28
  331. package/skills/fec-pwa-implementation/SKILL.md +17 -17
  332. package/skills/fec-pwa-implementation/references/manifest-and-icons.md +12 -12
  333. package/skills/fec-pwa-implementation/references/service-worker-workbox.md +13 -13
  334. package/skills/fec-react-project-standard/SKILL.md +72 -64
  335. package/skills/fec-react-project-standard/references/react-performance-patterns.md +35 -0
  336. package/skills/fec-react-project-standard/references/react-project-structure.md +197 -0
  337. package/skills/fec-react-project-standard/references/react-quality-patterns.md +131 -0
  338. package/skills/fec-react-project-standard/references/react-runtime-patterns.md +293 -0
  339. package/skills/fec-refactor-clean/SKILL.md +30 -30
  340. package/skills/fec-refactor-clean/references/report-template.md +23 -23
  341. package/skills/fec-responsive-layout/SKILL.md +17 -17
  342. package/skills/fec-responsive-layout/references/responsive-layout-patterns.md +39 -28
  343. package/skills/fec-route-protection/SKILL.md +26 -26
  344. package/skills/fec-security-review/SKILL.md +20 -20
  345. package/skills/fec-security-review/references/report-template.md +12 -12
  346. package/skills/fec-security-review/references/security-checklist.md +27 -27
  347. package/skills/fec-source-driven-development/SKILL.md +66 -40
  348. package/skills/fec-state-management/SKILL.md +34 -34
  349. package/skills/fec-state-management/references/state-patterns.md +19 -19
  350. package/skills/fec-storybook-component-doc/SKILL.md +19 -19
  351. package/skills/fec-storybook-component-doc/references/story-patterns.md +12 -12
  352. package/skills/fec-svg-animation/SKILL.md +32 -32
  353. package/skills/fec-tailwind-design-system/SKILL.md +17 -17
  354. package/skills/fec-tailwind-design-system/references/tailwind-system-patterns.md +36 -32
  355. package/skills/fec-tdd-workflow/SKILL.md +28 -28
  356. package/skills/fec-testing-strategy/SKILL.md +29 -29
  357. package/skills/fec-typescript-project-standard/SKILL.md +54 -0
  358. package/skills/fec-typescript-project-standard/references/type-safety-patterns.md +102 -0
  359. package/skills/fec-typescript-project-standard/references/type-safety.md +148 -0
  360. package/skills/fec-ui-design/SKILL.md +90 -72
  361. package/skills/fec-ui-design/data/style-archetypes.json +40 -0
  362. package/skills/fec-ui-design/data/ux-quality-rules.json +35 -0
  363. package/skills/fec-ui-design/references/design-intelligence.md +81 -21
  364. package/skills/fec-ui-design/references/master-page-overrides.md +15 -15
  365. package/skills/fec-ui-design/references/pre-delivery-checklist.md +38 -32
  366. package/skills/fec-ui-design/scripts/design-system.mjs +119 -1
  367. package/skills/fec-validation-fix/SKILL.md +26 -26
  368. package/skills/fec-validation-fix/references/report-template.md +25 -25
  369. package/skills/fec-vite-project-standard/SKILL.md +39 -39
  370. package/skills/fec-vue3-project-standard/SKILL.md +39 -30
  371. package/skills/fec-vue3-project-standard/references/vue3-composables-routing.md +163 -0
  372. package/skills/fec-vue3-project-standard/references/vue3-performance-patterns.md +13 -0
  373. package/skills/fec-vue3-project-standard/references/vue3-project-structure.md +177 -0
  374. package/skills/fec-vue3-project-standard/references/vue3-state-api-quality.md +216 -0
  375. package/skills/fec-web-video-presentation/SKILL.md +61 -0
  376. package/skills/fec-web-video-presentation/data/starter-themes.json +59 -0
  377. package/skills/fec-web-video-presentation/references/chapter-craft.md +37 -0
  378. package/skills/fec-web-video-presentation/references/content-plan.md +38 -0
  379. package/skills/fec-web-video-presentation/references/recording-and-audio.md +33 -0
  380. package/skills/fec-web-video-presentation/references/theme-system.md +36 -0
  381. package/skills/fec-web-video-presentation/scripts/create-video-presentation.mjs +430 -0
  382. package/skills/fec-web-workers/SKILL.md +16 -16
  383. package/skills/fec-web-workers/references/advanced-workers.md +13 -13
  384. package/skills/fec-web-workers/references/basic-worker.md +8 -8
  385. package/skills/metadata.json +402 -220
  386. package/skills/relations.json +120 -25
  387. package/templates/claude/CLAUDE.md +60 -60
  388. package/templates/codex/AGENTS.md +76 -76
  389. package/templates/codex/config.toml +4 -4
  390. package/templates/openclaw/AGENTS.md +68 -68
  391. package/templates/openclaw/OPENCLAW-CONFIG.md +8 -8
  392. package/templates/shared/rules/fec-agent-workflow.md +40 -40
  393. package/templates/shared/rules/fec-api-layer.md +52 -52
  394. package/templates/shared/rules/fec-ci-cd.md +29 -117
  395. package/templates/shared/rules/fec-code-comments.md +22 -22
  396. package/templates/shared/rules/fec-design-system.md +65 -241
  397. package/templates/shared/rules/fec-error-handling.md +41 -185
  398. package/templates/shared/rules/fec-git-conventions.md +42 -42
  399. package/templates/shared/rules/fec-i18n.md +48 -96
  400. package/templates/shared/rules/fec-naming-conventions.md +91 -91
  401. package/templates/shared/rules/fec-performance.md +78 -78
  402. package/templates/shared/rules/fec-react.md +58 -58
  403. package/templates/shared/rules/fec-refactoring.md +34 -30
  404. package/templates/shared/rules/fec-rendering-patterns.md +40 -183
  405. package/templates/shared/rules/fec-responsive-design.md +37 -214
  406. package/templates/shared/rules/fec-source-driven-development.md +22 -22
  407. package/templates/shared/rules/fec-state-management.md +45 -148
  408. package/templates/shared/rules/fec-testing.md +64 -64
  409. package/templates/shared/rules/fec-typescript.md +98 -341
  410. package/templates/shared/rules/fec-vue.md +42 -42
  411. package/templates/shared/rules/fec-working-modes.md +34 -34
  412. package/skills/fec-e2e-testing/references/e2e-advanced.md +0 -176
  413. package/skills/fec-react-project-standard/references/react-project-details.md +0 -642
  414. package/skills/fec-vue3-project-standard/references/vue3-project-details.md +0 -547
@@ -0,0 +1,121 @@
1
+ #!/usr/bin/env node
2
+ import fs from "node:fs";
3
+ import path from "node:path";
4
+ import { formatResult, parseArgs, skillDir } from "./studio-core.mjs";
5
+
6
+ const INDEX = path.join(skillDir, "data", "shape-index.json");
7
+ const ALIASES = new Map([
8
+ ["亚马逊", "aws"],
9
+ ["阿里云", "alibaba cloud"],
10
+ ["微软云", "azure"],
11
+ ["谷歌云", "gcp"],
12
+ ["云", "cloud"],
13
+ ["数据库", "database"],
14
+ ["队列", "queue"],
15
+ ["网关", "gateway"],
16
+ ["服务", "service"],
17
+ ["用户", "user"],
18
+ ["角色", "actor"],
19
+ ["流程", "flowchart"],
20
+ ["容器", "container"],
21
+ ["网络", "network"],
22
+ ["交换机", "switch"],
23
+ ["路由器", "router"],
24
+ ["函数", "lambda"],
25
+ ["对象存储", "storage"],
26
+ ["消息", "message"],
27
+ ]);
28
+
29
+ export function loadShapes() {
30
+ return JSON.parse(fs.readFileSync(INDEX).toString("utf8"));
31
+ }
32
+
33
+ export function queryShapes(shapes, query, options = {}) {
34
+ const terms = expandTerms(query);
35
+ const category = options.category
36
+ ? String(options.category).toLowerCase()
37
+ : "";
38
+ const scored = [];
39
+ for (const [index, shape] of shapes.entries()) {
40
+ const haystack =
41
+ `${shape.title ?? ""} ${shape.tags ?? ""} ${shape.style ?? ""}`.toLowerCase();
42
+ if (category && !haystack.includes(category)) continue;
43
+ let score = 0;
44
+ const title = String(shape.title ?? "").toLowerCase();
45
+ const tags = String(shape.tags ?? "").toLowerCase();
46
+ for (const term of terms) {
47
+ if (title === term) score += 80;
48
+ else if (title.includes(term)) score += 45;
49
+ if (tags.split(/\s+/).includes(term)) score += 30;
50
+ else if (tags.includes(term)) score += 12;
51
+ if (fuzzyContains(haystack, term)) score += 4;
52
+ }
53
+ if (score > 0)
54
+ scored.push({
55
+ index,
56
+ score,
57
+ titleHits: terms.filter((term) => title.includes(term)).length,
58
+ shape,
59
+ });
60
+ }
61
+ return scored
62
+ .sort(
63
+ (a, b) =>
64
+ b.score - a.score ||
65
+ b.titleHits - a.titleHits ||
66
+ String(a.shape.title).localeCompare(String(b.shape.title)) ||
67
+ a.index - b.index,
68
+ )
69
+ .slice(0, Number(options.limit ?? 10))
70
+ .map(({ shape, score }) => ({
71
+ title: shape.title,
72
+ w: shape.w,
73
+ h: shape.h,
74
+ style: shape.style,
75
+ score,
76
+ }));
77
+ }
78
+
79
+ function expandTerms(query) {
80
+ const normalized = String(query ?? "").toLowerCase();
81
+ const raw = normalized.match(/[\p{L}\p{N}._-]+/gu) ?? [];
82
+ const expanded = [];
83
+ for (const term of raw) {
84
+ expanded.push(ALIASES.get(term) ?? term);
85
+ if (term.includes("-")) expanded.push(...term.split("-"));
86
+ }
87
+ return [
88
+ ...new Set(
89
+ expanded.join(" ").match(/[a-z0-9._-]+|[\u4e00-\u9fff]+/g) ?? [],
90
+ ),
91
+ ].filter((term) => term.length >= 2);
92
+ }
93
+
94
+ function fuzzyContains(text, term) {
95
+ if (term.length < 4) return false;
96
+ let cursor = 0;
97
+ for (const ch of text) {
98
+ if (ch === term[cursor]) cursor += 1;
99
+ if (cursor === term.length) return true;
100
+ }
101
+ return false;
102
+ }
103
+
104
+ const args = parseArgs(process.argv.slice(2));
105
+ const query = args._.join(" ");
106
+ if (!query) {
107
+ console.error(
108
+ "usage: node shape-query.mjs <keywords> [--limit 10] [--category aws] [--format markdown|json]",
109
+ );
110
+ process.exit(2);
111
+ }
112
+ const results = queryShapes(loadShapes(), query, args);
113
+ if (results.length === 0) {
114
+ console.error(`no shapes matched ${JSON.stringify(query)}`);
115
+ process.exit(1);
116
+ }
117
+ if ((args.format ?? (args.json ? "json" : "markdown")) === "json") {
118
+ process.stdout.write(`${JSON.stringify(results, null, 2)}\n`);
119
+ } else {
120
+ process.stdout.write(formatResult({ title: "Shape Query", query, results }));
121
+ }
@@ -0,0 +1,139 @@
1
+ #!/usr/bin/env node
2
+ import fs from "node:fs";
3
+ import path from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+
6
+ export const scriptDir = path.dirname(fileURLToPath(import.meta.url));
7
+ export const skillDir = path.resolve(scriptDir, "..");
8
+
9
+ export function readText(filePath) {
10
+ return fs.readFileSync(filePath, "utf8");
11
+ }
12
+
13
+ export function writeText(filePath, body) {
14
+ fs.mkdirSync(path.dirname(path.resolve(filePath)), { recursive: true });
15
+ fs.writeFileSync(filePath, body, "utf8");
16
+ }
17
+
18
+ export function parseArgs(argv) {
19
+ const args = { _: [] };
20
+ for (let i = 0; i < argv.length; i += 1) {
21
+ const token = argv[i];
22
+ if (!token.startsWith("--")) {
23
+ args._.push(token);
24
+ continue;
25
+ }
26
+ const [rawKey, inline] = token.slice(2).split("=", 2);
27
+ const key = rawKey.replace(/-([a-z])/g, (_, ch) => ch.toUpperCase());
28
+ if (inline !== undefined) {
29
+ args[key] = inline;
30
+ } else if (argv[i + 1] && !argv[i + 1].startsWith("--")) {
31
+ args[key] = argv[i + 1];
32
+ i += 1;
33
+ } else {
34
+ args[key] = true;
35
+ }
36
+ }
37
+ return args;
38
+ }
39
+
40
+ export function formatResult(result, format = "markdown") {
41
+ if (format === "json") return `${JSON.stringify(result, null, 2)}\n`;
42
+ const lines = [`# ${result.title ?? "Drawio Studio Result"}`, ""];
43
+ for (const [key, value] of Object.entries(result)) {
44
+ if (key === "title") continue;
45
+ if (Array.isArray(value)) {
46
+ lines.push(`## ${label(key)}`, "");
47
+ if (value.length === 0) lines.push("- None");
48
+ else for (const item of value) lines.push(`- ${typeof item === "string" ? item : JSON.stringify(item)}`);
49
+ lines.push("");
50
+ } else if (value && typeof value === "object") {
51
+ lines.push(`## ${label(key)}`, "", "```json", JSON.stringify(value, null, 2), "```", "");
52
+ } else {
53
+ lines.push(`- ${label(key)}: ${String(value)}`);
54
+ }
55
+ }
56
+ return `${lines.join("\n").trimEnd()}\n`;
57
+ }
58
+
59
+ export function label(value) {
60
+ return value.replace(/([A-Z])/g, " $1").replace(/^./, (ch) => ch.toUpperCase());
61
+ }
62
+
63
+ export function xmlEscape(value) {
64
+ return String(value)
65
+ .replaceAll("&", "&amp;")
66
+ .replaceAll("<", "&lt;")
67
+ .replaceAll(">", "&gt;")
68
+ .replaceAll('"', "&quot;");
69
+ }
70
+
71
+ export function snap(value, grid = 10) {
72
+ return Math.round(value / grid) * grid;
73
+ }
74
+
75
+ export function walkFiles(root, predicate) {
76
+ const out = [];
77
+ const skip = new Set([".git", "node_modules", "dist", "target", "vendor", ".next", ".nuxt", "coverage"]);
78
+ function visit(dir) {
79
+ for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
80
+ if (skip.has(entry.name)) continue;
81
+ const full = path.join(dir, entry.name);
82
+ if (entry.isDirectory()) visit(full);
83
+ else if (!predicate || predicate(full)) out.push(full);
84
+ }
85
+ }
86
+ visit(path.resolve(root));
87
+ return out.sort();
88
+ }
89
+
90
+ export function toPosix(value) {
91
+ return value.split(path.sep).join("/");
92
+ }
93
+
94
+ export function commonPrefix(values) {
95
+ if (values.length === 0) return "";
96
+ let prefix = values[0];
97
+ for (const value of values.slice(1)) {
98
+ while (prefix && !value.startsWith(prefix)) prefix = prefix.slice(0, -1);
99
+ }
100
+ return prefix.replace(/[^/]*$/, "");
101
+ }
102
+
103
+ export function reduceTransitive(nodes, edges) {
104
+ const ids = new Set(nodes.map((node) => node.id));
105
+ const unique = [];
106
+ const seen = new Set();
107
+ for (const edge of edges) {
108
+ if (!ids.has(edge.source) || !ids.has(edge.target) || edge.source === edge.target) continue;
109
+ const key = `${edge.source}\0${edge.target}`;
110
+ if (!seen.has(key)) {
111
+ seen.add(key);
112
+ unique.push({ source: edge.source, target: edge.target });
113
+ }
114
+ }
115
+ const adjacency = new Map();
116
+ for (const edge of unique) {
117
+ if (!adjacency.has(edge.source)) adjacency.set(edge.source, new Set());
118
+ adjacency.get(edge.source).add(edge.target);
119
+ }
120
+ return unique.filter((edge) => !hasAlternatePath(edge.source, edge.target, adjacency, edge));
121
+ }
122
+
123
+ function hasAlternatePath(source, target, adjacency, skipped) {
124
+ const stack = [...(adjacency.get(source) ?? [])].filter((next) => !(source === skipped.source && next === skipped.target));
125
+ const seen = new Set();
126
+ while (stack.length) {
127
+ const next = stack.pop();
128
+ if (next === target) return true;
129
+ if (!next || seen.has(next)) continue;
130
+ seen.add(next);
131
+ for (const child of adjacency.get(next) ?? []) stack.push(child);
132
+ }
133
+ return false;
134
+ }
135
+
136
+ export function printOrWrite(body, output) {
137
+ if (output) writeText(output, body);
138
+ else process.stdout.write(body);
139
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "$schema": "../schema.json",
3
+ "name": "corporate",
4
+ "version": 1,
5
+ "default": false,
6
+ "source": { "type": "built-in" },
7
+ "confidence": "high",
8
+ "palette": {
9
+ "primary": { "fillColor": "#e3f2fd", "strokeColor": "#1565c0" },
10
+ "success": { "fillColor": "#e8f5e9", "strokeColor": "#2e7d32" },
11
+ "warning": { "fillColor": "#fff9c4", "strokeColor": "#f57c00" },
12
+ "accent": { "fillColor": "#fff3e0", "strokeColor": "#e65100" },
13
+ "danger": { "fillColor": "#ffebee", "strokeColor": "#c62828" },
14
+ "neutral": { "fillColor": "#eceff1", "strokeColor": "#455a64" },
15
+ "secondary": { "fillColor": "#f3e5f5", "strokeColor": "#6a1b9a" }
16
+ },
17
+ "roles": {
18
+ "service": "primary",
19
+ "database": "success",
20
+ "queue": "warning",
21
+ "gateway": "accent",
22
+ "error": "danger",
23
+ "external": "neutral",
24
+ "security": "secondary"
25
+ },
26
+ "shapes": {
27
+ "service": "rounded=0",
28
+ "database": "shape=cylinder3",
29
+ "queue": "rounded=0",
30
+ "decision": "rhombus",
31
+ "external": "rounded=0;dashed=1",
32
+ "container": "swimlane;startSize=30"
33
+ },
34
+ "font": {
35
+ "fontFamily": "Arial",
36
+ "fontSize": 11,
37
+ "titleFontSize": 13,
38
+ "titleBold": true
39
+ },
40
+ "edges": {
41
+ "style": "edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1",
42
+ "arrow": "endArrow=classic;endFill=1",
43
+ "dashedFor": ["optional", "async"]
44
+ },
45
+ "extras": {
46
+ "sketch": false,
47
+ "globalStrokeWidth": 1
48
+ }
49
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "$schema": "../schema.json",
3
+ "name": "default",
4
+ "version": 1,
5
+ "default": false,
6
+ "source": { "type": "built-in" },
7
+ "confidence": "high",
8
+ "palette": {
9
+ "primary": { "fillColor": "#dae8fc", "strokeColor": "#6c8ebf" },
10
+ "success": { "fillColor": "#d5e8d4", "strokeColor": "#82b366" },
11
+ "warning": { "fillColor": "#fff2cc", "strokeColor": "#d6b656" },
12
+ "accent": { "fillColor": "#ffe6cc", "strokeColor": "#d79b00" },
13
+ "danger": { "fillColor": "#f8cecc", "strokeColor": "#b85450" },
14
+ "neutral": { "fillColor": "#f5f5f5", "strokeColor": "#666666" },
15
+ "secondary": { "fillColor": "#e1d5e7", "strokeColor": "#9673a6" }
16
+ },
17
+ "roles": {
18
+ "service": "primary",
19
+ "database": "success",
20
+ "queue": "warning",
21
+ "gateway": "accent",
22
+ "error": "danger",
23
+ "external": "neutral",
24
+ "security": "secondary"
25
+ },
26
+ "shapes": {
27
+ "service": "rounded=1",
28
+ "database": "shape=cylinder3",
29
+ "queue": "rounded=1",
30
+ "decision": "rhombus",
31
+ "external": "rounded=1;dashed=1",
32
+ "container": "swimlane;startSize=30"
33
+ },
34
+ "font": {
35
+ "fontFamily": "Helvetica",
36
+ "fontSize": 12,
37
+ "titleFontSize": 14,
38
+ "titleBold": true
39
+ },
40
+ "edges": {
41
+ "style": "edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1",
42
+ "arrow": "endArrow=classic;endFill=1",
43
+ "dashedFor": []
44
+ },
45
+ "extras": {
46
+ "sketch": false,
47
+ "globalStrokeWidth": 1
48
+ }
49
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "$schema": "../schema.json",
3
+ "name": "handdrawn",
4
+ "version": 1,
5
+ "default": false,
6
+ "source": { "type": "built-in" },
7
+ "confidence": "high",
8
+ "palette": {
9
+ "primary": { "fillColor": "#ffe4b5", "strokeColor": "#b8651e" },
10
+ "success": { "fillColor": "#def0dc", "strokeColor": "#5c8a49" },
11
+ "warning": { "fillColor": "#fff4cc", "strokeColor": "#b8901a" },
12
+ "accent": { "fillColor": "#ffd9b3", "strokeColor": "#c25100" },
13
+ "danger": { "fillColor": "#ffcdbf", "strokeColor": "#a53d3d" },
14
+ "neutral": { "fillColor": "#f5e6d3", "strokeColor": "#8b7355" },
15
+ "secondary": { "fillColor": "#e6d7e8", "strokeColor": "#7b4397" }
16
+ },
17
+ "roles": {
18
+ "service": "primary",
19
+ "database": "success",
20
+ "queue": "warning",
21
+ "gateway": "accent",
22
+ "error": "danger",
23
+ "external": "neutral",
24
+ "security": "secondary"
25
+ },
26
+ "shapes": {
27
+ "service": "rounded=1",
28
+ "database": "shape=cylinder3",
29
+ "queue": "rounded=1",
30
+ "decision": "rhombus",
31
+ "external": "rounded=1;dashed=1",
32
+ "container": "swimlane;startSize=30"
33
+ },
34
+ "font": {
35
+ "fontFamily": "Helvetica",
36
+ "fontSize": 12,
37
+ "titleFontSize": 14,
38
+ "titleBold": true
39
+ },
40
+ "edges": {
41
+ "style": "edgeStyle=orthogonalEdgeStyle;curved=1;rounded=1;orthogonalLoop=1;jettySize=auto;html=1",
42
+ "arrow": "endArrow=classic;endFill=1",
43
+ "dashedFor": ["optional"]
44
+ },
45
+ "extras": {
46
+ "sketch": true,
47
+ "globalStrokeWidth": 2
48
+ }
49
+ }
@@ -0,0 +1,112 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://github.com/Agents365-ai/drawio-skill/styles/schema.json",
4
+ "title": "drawio-skill preset",
5
+ "type": "object",
6
+ "required": ["name", "version", "palette", "roles", "shapes", "font", "edges"],
7
+ "additionalProperties": false,
8
+ "properties": {
9
+ "$schema": { "type": "string" },
10
+ "name": { "type": "string", "pattern": "^[a-z0-9][a-z0-9_-]*$" },
11
+ "version": { "type": "integer", "const": 1 },
12
+ "default": { "type": "boolean" },
13
+ "confidence": { "type": "string", "enum": ["low", "medium", "high"] },
14
+ "source": {
15
+ "type": "object",
16
+ "additionalProperties": false,
17
+ "properties": {
18
+ "type": { "type": "string", "enum": ["xml", "image", "built-in", "hand-authored"] },
19
+ "path": { "type": "string" },
20
+ "extracted_at": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$" }
21
+ }
22
+ },
23
+ "palette": {
24
+ "type": "object",
25
+ "additionalProperties": false,
26
+ "required": ["primary", "success", "warning", "accent", "danger", "neutral", "secondary"],
27
+ "properties": {
28
+ "primary": { "$ref": "#/$defs/colorPair" },
29
+ "success": { "$ref": "#/$defs/colorPair" },
30
+ "warning": { "$ref": "#/$defs/colorPair" },
31
+ "accent": { "$ref": "#/$defs/colorPair" },
32
+ "danger": { "$ref": "#/$defs/colorPair" },
33
+ "neutral": { "$ref": "#/$defs/colorPair" },
34
+ "secondary": { "$ref": "#/$defs/colorPair" }
35
+ }
36
+ },
37
+ "roles": {
38
+ "type": "object",
39
+ "additionalProperties": false,
40
+ "properties": {
41
+ "service": { "$ref": "#/$defs/slotName" },
42
+ "database": { "$ref": "#/$defs/slotName" },
43
+ "queue": { "$ref": "#/$defs/slotName" },
44
+ "gateway": { "$ref": "#/$defs/slotName" },
45
+ "error": { "$ref": "#/$defs/slotName" },
46
+ "external": { "$ref": "#/$defs/slotName" },
47
+ "security": { "$ref": "#/$defs/slotName" }
48
+ }
49
+ },
50
+ "shapes": {
51
+ "type": "object",
52
+ "additionalProperties": { "type": "string" },
53
+ "properties": {
54
+ "service": { "type": "string" },
55
+ "database": { "type": "string" },
56
+ "queue": { "type": "string" },
57
+ "decision": { "type": "string" },
58
+ "external": { "type": "string" },
59
+ "container": { "type": "string" }
60
+ }
61
+ },
62
+ "font": {
63
+ "type": "object",
64
+ "additionalProperties": false,
65
+ "required": ["fontFamily", "fontSize"],
66
+ "properties": {
67
+ "fontFamily": { "type": "string" },
68
+ "fontSize": { "type": "integer", "minimum": 8, "maximum": 36 },
69
+ "titleFontSize": { "type": "integer", "minimum": 8, "maximum": 48 },
70
+ "titleBold": { "type": "boolean" }
71
+ }
72
+ },
73
+ "edges": {
74
+ "type": "object",
75
+ "additionalProperties": false,
76
+ "required": ["style", "arrow"],
77
+ "properties": {
78
+ "style": { "type": "string" },
79
+ "arrow": { "type": "string" },
80
+ "dashedFor": { "type": "array", "items": { "type": "string" } }
81
+ }
82
+ },
83
+ "extras": {
84
+ "type": "object",
85
+ "additionalProperties": false,
86
+ "properties": {
87
+ "sketch": { "type": "boolean" },
88
+ "globalStrokeWidth": { "type": "number", "minimum": 0.5, "maximum": 6 }
89
+ }
90
+ }
91
+ },
92
+ "$defs": {
93
+ "colorPair": {
94
+ "oneOf": [
95
+ { "type": "null" },
96
+ {
97
+ "type": "object",
98
+ "additionalProperties": false,
99
+ "required": ["fillColor", "strokeColor"],
100
+ "properties": {
101
+ "fillColor": { "type": "string", "pattern": "^#[0-9A-Fa-f]{6}$" },
102
+ "strokeColor": { "type": "string", "pattern": "^#[0-9A-Fa-f]{6}$" }
103
+ }
104
+ }
105
+ ]
106
+ },
107
+ "slotName": {
108
+ "type": "string",
109
+ "enum": ["primary", "success", "warning", "accent", "danger", "neutral", "secondary"]
110
+ }
111
+ }
112
+ }
@@ -1,40 +1,42 @@
1
1
  ---
2
2
  name: fec-e2e-testing
3
- description: Use when creating, maintaining, debugging, or reviewing real-browser end-to-end tests with Playwright or Cypress, including Page Object models, CI artifacts, traces, flaky tests, cross-page visual regression, and critical user journeys such as login, payment, permissions, or CRUD. For layer planning or tests close to UI components, choose the matching testing workflow first; Chinese triggers include E2E, 端到端测试, Playwright, Cypress.
3
+ description: Use when creating, maintaining, debugging, or reviewing real-browser end-to-end tests with Playwright or Cypress, including Page Object models, CI artifacts, traces, flaky tests, cross-page visual regression, and critical user journeys such as login, payment, permissions, or CRUD. For layer planning or tests close to UI components, choose the matching testing workflow first; Chinese triggers include E2E, end-to-end testing, Playwright, Cypress.
4
4
  ---
5
5
 
6
- # E2E 测试规范
6
+ # E2E Test Specification
7
7
 
8
8
  ## Purpose
9
9
 
10
- 用真实浏览器验证关键用户旅程,发现单元测试无法覆盖的集成风险。
10
+ Validate key user journeys with real browsers and uncover integration risks not covered by unit tests.
11
11
 
12
12
  ## Procedure
13
13
 
14
- 1. 明确关键旅程:登录、购买、创建、搜索、权限、支付等跨页面流程优先;若只是选择测试层级,先做测试分层规划。
15
- 2. 新项目优先 Playwright;已有 Cypress 项目沿用 Cypress,不为迁移而迁移。
16
- 3. 用 Page Object 或 fixtures 封装登录、页面定位器和共享数据,spec 中避免裸选择器。
17
- 4. 断言用户可见结果,依赖 Locator 自动等待、网络响应或可见状态,不使用固定 sleep。
18
- 5. CI 必须上传 HTML report、截图、trace 或视频;flaky 用例要隔离、复现、标注来源并关联 issue。
19
- 6. 调试失败时先读 trace、console、network 和截图,再改测试;不要把真实产品缺陷误判成 flaky。
20
- 7. 对关键浏览器能力、支付、权限、上传和实时通信流程,记录测试环境、种子数据和清理策略。
21
- 8. 测试数据必须可重复:优先使用 API seed、数据库 fixture、测试账号或 mock 服务;随机数据需带唯一前缀并在 teardown 清理。
14
+ 1. Clarify the key journeys: cross-page processes such as login, purchase, creation, search, permissions, payment, etc. are given priority; if you only choose the test level, do the test hierarchical planning first.
15
+ 2. New projects will be given priority by Playwright; existing Cypress projects will continue to use Cypress and will not be migrated for the sake of migration.
16
+ 3. Use Page Object or fixtures to encapsulate login, page locator and shared data, and avoid naked selectors in the spec.
17
+ 4. Assert that the user can see the results, relying on Locator automatic waiting, network response or visible status, without using fixed sleep.
18
+ 5. CI must upload HTML report, screenshots, trace or video; Flaky use cases must be isolated, reproduced, marked with sources and associated with issues.
19
+ 6. When debugging fails, read the trace, console, network and screenshots first, and then change the test; do not misjudge real product defects as flaky.
20
+ 7. Record the test environment, seed data and cleanup strategies for key browser capabilities, payment, permissions, uploads and real-time communication processes.
21
+ 8. Test data must be repeatable: API seeds, database fixtures, test accounts or mock services are preferred; random data must have a unique prefix and be cleaned in teardown.
22
22
 
23
- ## 详细参考
23
+ ## Detailed reference
24
24
 
25
- - 需要目录结构、Page Object、spec 组织、配置、flaky 调试和产物示例时,加载 [references/playwright-patterns.md](references/playwright-patterns.md)。
26
- - 需要 CI 示例、Markdown 报告模板、Web3/钱包流程、高风险金融流程或视觉回归配置时,加载 [references/e2e-advanced.md](references/e2e-advanced.md)。
25
+ - Load [references/playwright-patterns.md](references/playwright-patterns.md) when you need directory structure, Page Object, spec organization, configuration, flaky debugging and production examples.
26
+ - Load [references/e2e-ci-reporting.md](references/e2e-ci-reporting.md) when you need CI examples and Markdown report templates.
27
+ - Load [references/e2e-special-scenarios.md](references/e2e-special-scenarios.md) when Web3/wallet flows or high-risk financial flows are required.
28
+ - When cross-page screenshots or visual regression configuration are required, load [references/e2e-visual-regression.md](references/e2e-visual-regression.md).
27
29
 
28
30
  ## Constraints
29
31
 
30
- - 禁止依赖 `sleep` / 固定 `setTimeout` 作为主要同步手段。
31
- - 不在生产环境跑真实 E2E。
32
- - 避免在 E2E 中断言组件内部像素级样式;跨页面截图/视觉回归仅覆盖用户旅程中的关键页面状态。
33
- - 失败必须能靠截图、trace 或视频定位。
34
- - 组件内部契约测试分流到组件测试 workflow。
35
- - 不把不稳定等待、随机数据或依赖测试顺序带入 CI。
36
- - 不把重试次数当作 flaky 治理;重试只能保留证据,根因仍需定位。
32
+ - Disable reliance on `sleep` / fixed `setTimeout` as primary synchronization means.
33
+ - Do not run real E2E in production environment.
34
+ - Avoid asserting component internal pixel-level styles in E2E; cross-page screenshots/visual regressions only cover key page states in the user journey.
35
+ - Failure must be able to be located by taking screenshots, traces or videos.
36
+ - Component internal contract testing is offloaded to component testing workflow.
37
+ - Do not bring unstable waits, random data, or dependent test order into CI.
38
+ - Do not treat the number of retries as flaky management; retries can only retain evidence, and the root cause still needs to be located.
37
39
 
38
40
  ## Expected Output
39
41
 
40
- 关键用户旅程有稳定 E2E 覆盖,失败产物可定位问题,CI 中报告和 trace 可下载;flaky 用例有复现命令、隔离策略和后续 issue。
42
+ Key user journeys have stable E2E coverage, failed products can locate problems, and reports and traces in CI can be downloaded; flaky use cases include recurrence commands, isolation strategies, and follow-up issues.
@@ -0,0 +1,62 @@
1
+ #E2E CI & Reporting
2
+
3
+ ## CI integration (example)
4
+
5
+ ```yaml
6
+ # .github/workflows/e2e.yml
7
+ name: E2E Tests
8
+ on: [push, pull_request]
9
+
10
+ jobs:
11
+ test:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ - uses: actions/setup-node@v4
16
+ with:
17
+ node-version: 20
18
+ - run: npm ci
19
+ - run: npx playwright install --with-deps
20
+ - run: npx playwright test
21
+ env:
22
+ CI: true
23
+ BASE_URL: ${{ vars.STAGING_URL }}
24
+ - uses: actions/upload-artifact@v4
25
+ if: always()
26
+ with:
27
+ name: playwright-report
28
+ path: playwright-report/
29
+ retention-days: 30
30
+ ```
31
+
32
+ Cypress: Fixed `CYPRESS_baseUrl` or `baseUrl` in the configuration file. Failure screenshots/videos are also recommended to upload artifacts.
33
+
34
+ ## E2E report template (Markdown)
35
+
36
+ The following structure can be used when outputting or archiving test reports to facilitate review:
37
+
38
+ ```markdown
39
+ # E2E test report
40
+
41
+ **Date:** YYYY-MM-DD HH:mm
42
+ **Time taken:** X minutes Y seconds
43
+ **Result:** Pass/Fail
44
+
45
+ ## Summary
46
+
47
+ - Total X | Pass Y | Fail Z | Unstable/Skip Description
48
+
49
+ ## Failed use case
50
+
51
+ ### Use case name
52
+
53
+ - **File:** `tests/e2e/xxx.spec.ts:line number`
54
+ - **ERROR:** Brief assertion or timeout information
55
+ - **Screenshot/Trace:** path or artifact name
56
+ - **Suggested fix:** Executable conclusion
57
+
58
+ ## Product
59
+
60
+ - HTML report: `playwright-report/index.html`
61
+ - Trace / Video / Screenshot: CI artifact or local `test-results/`
62
+ ```