@bovinphang/frontend-craft 2.7.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.
- package/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +34 -0
- package/CHANGELOG.zh-CN.md +34 -0
- package/README.md +1 -1
- package/README.openclaw.md +99 -43
- package/README.openclaw.zh-CN.md +99 -43
- package/README.zh-CN.md +1 -1
- package/agents/fec-architect.md +70 -70
- package/agents/fec-code-reviewer.md +82 -82
- package/agents/fec-debugger.md +20 -20
- package/agents/fec-design-token-mapper.md +36 -36
- package/agents/fec-doc-updater.md +13 -13
- package/agents/fec-e2e-runner.md +45 -45
- package/agents/fec-figma-implementer.md +59 -59
- package/agents/fec-performance-optimizer.md +128 -128
- package/agents/fec-refactor-cleaner.md +14 -14
- package/agents/fec-security-reviewer.md +66 -67
- package/agents/fec-test-planner.md +27 -27
- package/agents/fec-typescript-reviewer.md +87 -87
- package/agents/fec-ui-checker.md +74 -74
- package/commands/fec-debug.md +19 -19
- package/commands/fec-doc-sync.md +11 -11
- package/commands/fec-init.md +37 -38
- package/commands/fec-plan.md +58 -58
- package/commands/fec-refactor-clean.md +11 -11
- package/commands/fec-review.md +41 -41
- package/commands/fec-scaffold.md +41 -41
- package/commands/fec-tdd.md +13 -13
- package/dist/bin/frontend-craft.js +29 -27
- package/docs/example-prompts.md +3 -0
- package/docs/ja-JP/README.md +1 -1
- package/docs/ko-KR/README.md +1 -1
- package/docs/project-structure.md +13 -5
- package/docs/zh-CN/example-prompts.md +3 -0
- package/docs/zh-CN/project-structure.md +6 -1
- package/docs/zh-TW/README.md +1 -1
- package/localized/zh-CN/agents/fec-architect.md +125 -0
- package/localized/zh-CN/agents/fec-code-reviewer.md +152 -0
- package/localized/zh-CN/agents/fec-debugger.md +44 -0
- package/localized/zh-CN/agents/fec-design-token-mapper.md +75 -0
- package/localized/zh-CN/agents/fec-doc-updater.md +30 -0
- package/localized/zh-CN/agents/fec-e2e-runner.md +107 -0
- package/localized/zh-CN/agents/fec-figma-implementer.md +104 -0
- package/localized/zh-CN/agents/fec-performance-optimizer.md +293 -0
- package/localized/zh-CN/agents/fec-refactor-cleaner.md +32 -0
- package/localized/zh-CN/agents/fec-security-reviewer.md +116 -0
- package/localized/zh-CN/agents/fec-test-planner.md +50 -0
- package/localized/zh-CN/agents/fec-typescript-reviewer.md +142 -0
- package/localized/zh-CN/agents/fec-ui-checker.md +120 -0
- package/localized/zh-CN/commands/fec-debug.md +30 -0
- package/localized/zh-CN/commands/fec-doc-sync.md +19 -0
- package/localized/zh-CN/commands/fec-init.md +70 -0
- package/localized/zh-CN/commands/fec-plan.md +94 -0
- package/localized/zh-CN/commands/fec-refactor-clean.md +19 -0
- package/localized/zh-CN/commands/fec-review.md +66 -0
- package/localized/zh-CN/commands/fec-scaffold.md +205 -0
- package/localized/zh-CN/commands/fec-tdd.md +21 -0
- package/localized/zh-CN/skills/TEMPLATE.md +155 -0
- package/localized/zh-CN/skills/eval_queries.json +1013 -0
- package/localized/zh-CN/skills/fec-accessibility-check/SKILL.md +39 -0
- package/localized/zh-CN/skills/fec-accessibility-check/references/report-template.md +23 -0
- package/localized/zh-CN/skills/fec-accessibility-check/references/screen-reader-testing.md +33 -0
- package/localized/zh-CN/skills/fec-alchemy/SKILL.md +74 -0
- package/localized/zh-CN/skills/fec-alchemy/assets/absorption-plan-template.md +47 -0
- package/localized/zh-CN/skills/fec-alchemy/assets/intake-template.md +55 -0
- package/localized/zh-CN/skills/fec-alchemy/assets/review-checklist.md +31 -0
- package/localized/zh-CN/skills/fec-alchemy/references/methodology.md +94 -0
- package/localized/zh-CN/skills/fec-alchemy/references/originality-and-licensing.md +57 -0
- package/localized/zh-CN/skills/fec-api-integration/SKILL.md +78 -0
- package/localized/zh-CN/skills/fec-api-integration/references/integration-patterns.md +80 -0
- package/localized/zh-CN/skills/fec-backend-requirements-handoff/SKILL.md +45 -0
- package/localized/zh-CN/skills/fec-browser-storage/SKILL.md +34 -0
- package/localized/zh-CN/skills/fec-browser-storage/references/storage-patterns.md +65 -0
- package/localized/zh-CN/skills/fec-canvas-threejs/SKILL.md +66 -0
- package/localized/zh-CN/skills/fec-canvas-threejs/references/rendering-patterns.md +67 -0
- package/localized/zh-CN/skills/fec-canvas-threejs/references/shader-webgl-patterns.md +67 -0
- package/localized/zh-CN/skills/fec-code-review/SKILL.md +143 -0
- package/localized/zh-CN/skills/fec-code-review/references/report-template.md +29 -0
- package/localized/zh-CN/skills/fec-component-testing/SKILL.md +119 -0
- package/localized/zh-CN/skills/fec-data-fetching/SKILL.md +62 -0
- package/localized/zh-CN/skills/fec-data-fetching/references/query-patterns.md +103 -0
- package/localized/zh-CN/skills/fec-debug-framework/SKILL.md +157 -0
- package/localized/zh-CN/skills/fec-debug-framework/references/report-template.md +58 -0
- package/localized/zh-CN/skills/fec-dependency-upgrade/SKILL.md +34 -0
- package/localized/zh-CN/skills/fec-dependency-upgrade/references/dependency-upgrade-workflow.md +56 -0
- package/localized/zh-CN/skills/fec-doc-sync/SKILL.md +39 -0
- package/localized/zh-CN/skills/fec-drawio-studio/SKILL.md +73 -0
- package/localized/zh-CN/skills/fec-drawio-studio/data/THIRD_PARTY_NOTICES.md +10 -0
- package/localized/zh-CN/skills/fec-drawio-studio/data/brand-icons.json +878 -0
- package/localized/zh-CN/skills/fec-drawio-studio/data/shape-index.json +83570 -0
- package/localized/zh-CN/skills/fec-drawio-studio/references/data-residency.md +27 -0
- package/localized/zh-CN/skills/fec-drawio-studio/references/diagram-patterns.md +60 -0
- package/localized/zh-CN/skills/fec-drawio-studio/references/flowchart-quality.md +49 -0
- package/localized/zh-CN/skills/fec-drawio-studio/references/layout-and-export.md +72 -0
- package/localized/zh-CN/skills/fec-drawio-studio/references/troubleshooting.md +29 -0
- package/localized/zh-CN/skills/fec-drawio-studio/references/xml-and-mermaid.md +58 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/brand-symbols.mjs +99 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/diagram-lint.mjs +205 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/diagram-url.mjs +102 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/drawio-export.mjs +134 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/layout-graph.mjs +107 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/png-embed-fix.mjs +26 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-go-packages.mjs +36 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-js-modules.mjs +52 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-python-classes.mjs +30 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-python-modules.mjs +55 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-rust-modules.mjs +35 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-ts-modules.mjs +7 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/shape-query.mjs +121 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/studio-core.mjs +139 -0
- package/localized/zh-CN/skills/fec-drawio-studio/styles/built-in/corporate.json +49 -0
- package/localized/zh-CN/skills/fec-drawio-studio/styles/built-in/default.json +49 -0
- package/localized/zh-CN/skills/fec-drawio-studio/styles/built-in/handdrawn.json +49 -0
- package/localized/zh-CN/skills/fec-drawio-studio/styles/schema.json +112 -0
- package/localized/zh-CN/skills/fec-e2e-testing/SKILL.md +42 -0
- package/localized/zh-CN/skills/fec-e2e-testing/references/e2e-ci-reporting.md +62 -0
- package/localized/zh-CN/skills/fec-e2e-testing/references/e2e-special-scenarios.md +52 -0
- package/localized/zh-CN/skills/fec-e2e-testing/references/e2e-visual-regression.md +60 -0
- package/localized/zh-CN/skills/fec-e2e-testing/references/playwright-patterns.md +95 -0
- package/localized/zh-CN/skills/fec-form-handling/SKILL.md +76 -0
- package/localized/zh-CN/skills/fec-form-handling/references/advanced-form-patterns.md +101 -0
- package/localized/zh-CN/skills/fec-image-generation/SKILL.md +80 -0
- package/localized/zh-CN/skills/fec-image-generation/assets/interactive-diagram.html +371 -0
- package/localized/zh-CN/skills/fec-image-generation/references/artifact-routing.md +80 -0
- package/localized/zh-CN/skills/fec-image-generation/references/diagram-workflows.md +74 -0
- package/localized/zh-CN/skills/fec-image-generation/references/html-technical-diagrams.md +236 -0
- package/localized/zh-CN/skills/fec-image-generation/references/png-qa-autofix.md +30 -0
- package/localized/zh-CN/skills/fec-image-generation/scripts/export-diagram.mjs +364 -0
- package/localized/zh-CN/skills/fec-image-generation/scripts/interactive-diagram-server.mjs +654 -0
- package/localized/zh-CN/skills/fec-image-generation/scripts/png-qa.mjs +431 -0
- package/localized/zh-CN/skills/fec-image-generation/scripts/tech-diagram-render.mjs +1397 -0
- package/localized/zh-CN/skills/fec-implement-from-design/SKILL.md +129 -0
- package/localized/zh-CN/skills/fec-implement-from-design/references/design-plan-template.md +36 -0
- package/localized/zh-CN/skills/fec-legacy-to-modern-migration/SKILL.md +46 -0
- package/localized/zh-CN/skills/fec-legacy-to-modern-migration/references/migration-execution-checklist.md +110 -0
- package/localized/zh-CN/skills/fec-legacy-to-modern-migration/references/migration-report-template.md +41 -0
- package/localized/zh-CN/skills/fec-legacy-to-modern-migration/references/migration-strategy-and-mapping.md +48 -0
- package/localized/zh-CN/skills/fec-legacy-web-standard/SKILL.md +35 -0
- package/localized/zh-CN/skills/fec-legacy-web-standard/references/legacy-patterns.md +85 -0
- package/localized/zh-CN/skills/fec-list-virtualization/SKILL.md +34 -0
- package/localized/zh-CN/skills/fec-list-virtualization/references/virtualization-patterns.md +80 -0
- package/localized/zh-CN/skills/fec-monorepo-project-standard/SKILL.md +142 -0
- package/localized/zh-CN/skills/fec-motion-interaction/SKILL.md +73 -0
- package/localized/zh-CN/skills/fec-motion-interaction/references/motion-patterns.md +112 -0
- package/localized/zh-CN/skills/fec-nextjs-project-standard/SKILL.md +123 -0
- package/localized/zh-CN/skills/fec-nuxt-project-standard/SKILL.md +122 -0
- package/localized/zh-CN/skills/fec-performance-optimization/SKILL.md +80 -0
- package/localized/zh-CN/skills/fec-performance-optimization/references/framework-performance-patterns.md +38 -0
- package/localized/zh-CN/skills/fec-performance-optimization/references/report-template.md +59 -0
- package/localized/zh-CN/skills/fec-pwa-implementation/SKILL.md +35 -0
- package/localized/zh-CN/skills/fec-pwa-implementation/references/manifest-and-icons.md +53 -0
- package/localized/zh-CN/skills/fec-pwa-implementation/references/service-worker-workbox.md +68 -0
- package/localized/zh-CN/skills/fec-react-project-standard/SKILL.md +91 -0
- package/localized/zh-CN/skills/fec-react-project-standard/references/react-performance-patterns.md +35 -0
- package/localized/zh-CN/skills/fec-react-project-standard/references/react-project-structure.md +197 -0
- package/localized/zh-CN/skills/fec-react-project-standard/references/react-quality-patterns.md +131 -0
- package/localized/zh-CN/skills/fec-react-project-standard/references/react-runtime-patterns.md +293 -0
- package/localized/zh-CN/skills/fec-refactor-clean/SKILL.md +51 -0
- package/localized/zh-CN/skills/fec-refactor-clean/references/report-template.md +42 -0
- package/localized/zh-CN/skills/fec-responsive-layout/SKILL.md +34 -0
- package/localized/zh-CN/skills/fec-responsive-layout/references/responsive-layout-patterns.md +70 -0
- package/localized/zh-CN/skills/fec-route-protection/SKILL.md +135 -0
- package/localized/zh-CN/skills/fec-security-review/SKILL.md +38 -0
- package/localized/zh-CN/skills/fec-security-review/references/report-template.md +27 -0
- package/localized/zh-CN/skills/fec-security-review/references/security-checklist.md +64 -0
- package/localized/zh-CN/skills/fec-source-driven-development/SKILL.md +87 -0
- package/localized/zh-CN/skills/fec-state-management/SKILL.md +140 -0
- package/localized/zh-CN/skills/fec-state-management/references/state-patterns.md +109 -0
- package/localized/zh-CN/skills/fec-storybook-component-doc/SKILL.md +37 -0
- package/localized/zh-CN/skills/fec-storybook-component-doc/references/story-patterns.md +118 -0
- package/localized/zh-CN/skills/fec-svg-animation/SKILL.md +148 -0
- package/localized/zh-CN/skills/fec-tailwind-design-system/SKILL.md +34 -0
- package/localized/zh-CN/skills/fec-tailwind-design-system/references/tailwind-system-patterns.md +59 -0
- package/localized/zh-CN/skills/fec-tdd-workflow/SKILL.md +52 -0
- package/localized/zh-CN/skills/fec-testing-strategy/SKILL.md +45 -0
- package/localized/zh-CN/skills/fec-typescript-project-standard/SKILL.md +54 -0
- package/localized/zh-CN/skills/fec-typescript-project-standard/references/type-safety-patterns.md +102 -0
- package/localized/zh-CN/skills/fec-typescript-project-standard/references/type-safety.md +148 -0
- package/localized/zh-CN/skills/fec-ui-design/SKILL.md +108 -0
- package/localized/zh-CN/skills/fec-ui-design/data/product-rules.json +231 -0
- package/localized/zh-CN/skills/fec-ui-design/data/stack-ui-rules.json +146 -0
- package/localized/zh-CN/skills/fec-ui-design/data/style-archetypes.json +373 -0
- package/localized/zh-CN/skills/fec-ui-design/data/ux-quality-rules.json +203 -0
- package/localized/zh-CN/skills/fec-ui-design/references/design-intelligence.md +97 -0
- package/localized/zh-CN/skills/fec-ui-design/references/master-page-overrides.md +30 -0
- package/localized/zh-CN/skills/fec-ui-design/references/pre-delivery-checklist.md +39 -0
- package/localized/zh-CN/skills/fec-ui-design/scripts/design-system.mjs +648 -0
- package/localized/zh-CN/skills/fec-validation-fix/SKILL.md +51 -0
- package/localized/zh-CN/skills/fec-validation-fix/references/report-template.md +43 -0
- package/localized/zh-CN/skills/fec-vite-project-standard/SKILL.md +83 -0
- package/localized/zh-CN/skills/fec-vue3-project-standard/SKILL.md +58 -0
- package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-composables-routing.md +162 -0
- package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-performance-patterns.md +13 -0
- package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-project-structure.md +176 -0
- package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-state-api-quality.md +216 -0
- package/localized/zh-CN/skills/fec-web-video-presentation/SKILL.md +61 -0
- package/localized/zh-CN/skills/fec-web-video-presentation/data/starter-themes.json +59 -0
- package/localized/zh-CN/skills/fec-web-video-presentation/references/chapter-craft.md +37 -0
- package/localized/zh-CN/skills/fec-web-video-presentation/references/content-plan.md +38 -0
- package/localized/zh-CN/skills/fec-web-video-presentation/references/recording-and-audio.md +33 -0
- package/localized/zh-CN/skills/fec-web-video-presentation/references/theme-system.md +36 -0
- package/localized/zh-CN/skills/fec-web-video-presentation/scripts/create-video-presentation.mjs +430 -0
- package/localized/zh-CN/skills/fec-web-workers/SKILL.md +35 -0
- package/localized/zh-CN/skills/fec-web-workers/references/advanced-workers.md +54 -0
- package/localized/zh-CN/skills/fec-web-workers/references/basic-worker.md +67 -0
- package/localized/zh-CN/skills/metadata.json +1646 -0
- package/localized/zh-CN/skills/relations.json +755 -0
- package/localized/zh-CN/templates/claude/CLAUDE.md +106 -0
- package/localized/zh-CN/templates/claude/settings.json +62 -0
- package/localized/zh-CN/templates/codex/AGENTS.md +105 -0
- package/localized/zh-CN/templates/codex/config.toml +32 -0
- package/localized/zh-CN/templates/openclaw/AGENTS.md +101 -0
- package/localized/zh-CN/templates/openclaw/OPENCLAW-CONFIG.md +12 -0
- package/localized/zh-CN/templates/shared/rules/fec-agent-workflow.md +54 -0
- package/localized/zh-CN/templates/shared/rules/fec-api-layer.md +99 -0
- package/localized/zh-CN/templates/shared/rules/fec-ci-cd.md +40 -0
- package/localized/zh-CN/templates/shared/rules/fec-code-comments.md +33 -0
- package/localized/zh-CN/templates/shared/rules/fec-design-system.md +72 -0
- package/localized/zh-CN/templates/shared/rules/fec-error-handling.md +56 -0
- package/localized/zh-CN/templates/shared/rules/fec-git-conventions.md +73 -0
- package/localized/zh-CN/templates/shared/rules/fec-i18n.md +64 -0
- package/localized/zh-CN/templates/shared/rules/fec-naming-conventions.md +120 -0
- package/localized/zh-CN/templates/shared/rules/fec-performance.md +101 -0
- package/localized/zh-CN/templates/shared/rules/fec-react.md +82 -0
- package/localized/zh-CN/templates/shared/rules/fec-refactoring.md +47 -0
- package/localized/zh-CN/templates/shared/rules/fec-rendering-patterns.md +40 -0
- package/localized/zh-CN/templates/shared/rules/fec-responsive-design.md +50 -0
- package/localized/zh-CN/templates/shared/rules/fec-source-driven-development.md +31 -0
- package/localized/zh-CN/templates/shared/rules/fec-state-management.md +60 -0
- package/localized/zh-CN/templates/shared/rules/fec-testing.md +98 -0
- package/localized/zh-CN/templates/shared/rules/fec-typescript.md +112 -0
- package/localized/zh-CN/templates/shared/rules/fec-vue.md +64 -0
- package/localized/zh-CN/templates/shared/rules/fec-working-modes.md +50 -0
- package/openclaw.plugin.json +1 -1
- package/package.json +3 -2
- package/skills/TEMPLATE.md +74 -74
- package/skills/eval_queries.json +678 -678
- package/skills/fec-accessibility-check/SKILL.md +21 -21
- package/skills/fec-accessibility-check/references/report-template.md +12 -12
- package/skills/fec-accessibility-check/references/screen-reader-testing.md +24 -24
- package/skills/fec-alchemy/SKILL.md +50 -50
- package/skills/fec-alchemy/assets/absorption-plan-template.md +32 -32
- package/skills/fec-alchemy/assets/intake-template.md +55 -55
- package/skills/fec-alchemy/assets/review-checklist.md +23 -23
- package/skills/fec-alchemy/references/methodology.md +66 -66
- package/skills/fec-alchemy/references/originality-and-licensing.md +42 -42
- package/skills/fec-api-integration/SKILL.md +61 -61
- package/skills/fec-api-integration/references/integration-patterns.md +30 -30
- package/skills/fec-backend-requirements-handoff/SKILL.md +25 -25
- package/skills/fec-browser-storage/SKILL.md +16 -16
- package/skills/fec-browser-storage/references/storage-patterns.md +16 -16
- package/skills/fec-canvas-threejs/SKILL.md +21 -21
- package/skills/fec-canvas-threejs/references/rendering-patterns.md +10 -10
- package/skills/fec-canvas-threejs/references/shader-webgl-patterns.md +37 -37
- package/skills/fec-code-review/SKILL.md +94 -94
- package/skills/fec-code-review/references/report-template.md +13 -13
- package/skills/fec-component-testing/SKILL.md +39 -39
- package/skills/fec-data-fetching/SKILL.md +16 -16
- package/skills/fec-data-fetching/references/query-patterns.md +27 -27
- package/skills/fec-debug-framework/SKILL.md +95 -95
- package/skills/fec-debug-framework/references/report-template.md +34 -34
- package/skills/fec-dependency-upgrade/SKILL.md +17 -17
- package/skills/fec-dependency-upgrade/references/dependency-upgrade-workflow.md +31 -31
- package/skills/fec-doc-sync/SKILL.md +23 -23
- package/skills/fec-drawio-studio/SKILL.md +42 -38
- package/skills/fec-drawio-studio/data/THIRD_PARTY_NOTICES.md +1 -1
- package/skills/fec-drawio-studio/data/shape-index.json +83570 -0
- package/skills/fec-drawio-studio/references/diagram-patterns.md +19 -0
- package/skills/fec-drawio-studio/references/flowchart-quality.md +49 -0
- package/skills/fec-drawio-studio/references/layout-and-export.md +18 -3
- package/skills/fec-drawio-studio/references/xml-and-mermaid.md +5 -1
- package/skills/fec-drawio-studio/scripts/diagram-lint.mjs +62 -0
- package/skills/fec-drawio-studio/scripts/drawio-export.mjs +134 -0
- package/skills/fec-drawio-studio/scripts/shape-query.mjs +55 -15
- package/skills/fec-e2e-testing/SKILL.md +24 -24
- package/skills/fec-e2e-testing/references/e2e-ci-reporting.md +20 -20
- package/skills/fec-e2e-testing/references/e2e-special-scenarios.md +10 -10
- package/skills/fec-e2e-testing/references/e2e-visual-regression.md +17 -17
- package/skills/fec-e2e-testing/references/playwright-patterns.md +6 -6
- package/skills/fec-form-handling/SKILL.md +21 -21
- package/skills/fec-form-handling/references/advanced-form-patterns.md +41 -41
- package/skills/fec-image-generation/SKILL.md +54 -29
- package/skills/fec-image-generation/assets/interactive-diagram.html +371 -0
- package/skills/fec-image-generation/references/diagram-workflows.md +33 -2
- package/skills/fec-image-generation/references/html-technical-diagrams.md +236 -0
- package/skills/fec-image-generation/scripts/export-diagram.mjs +364 -0
- package/skills/fec-image-generation/scripts/interactive-diagram-server.mjs +654 -0
- package/skills/fec-image-generation/scripts/tech-diagram-render.mjs +1397 -0
- package/skills/fec-implement-from-design/SKILL.md +81 -81
- package/skills/fec-implement-from-design/references/design-plan-template.md +16 -16
- package/skills/fec-legacy-to-modern-migration/SKILL.md +29 -29
- package/skills/fec-legacy-to-modern-migration/references/migration-execution-checklist.md +81 -81
- package/skills/fec-legacy-to-modern-migration/references/migration-report-template.md +37 -37
- package/skills/fec-legacy-to-modern-migration/references/migration-strategy-and-mapping.md +31 -31
- package/skills/fec-legacy-web-standard/SKILL.md +17 -17
- package/skills/fec-legacy-web-standard/references/legacy-patterns.md +16 -16
- package/skills/fec-list-virtualization/SKILL.md +16 -16
- package/skills/fec-list-virtualization/references/virtualization-patterns.md +31 -31
- package/skills/fec-monorepo-project-standard/SKILL.md +52 -52
- package/skills/fec-motion-interaction/SKILL.md +51 -51
- package/skills/fec-motion-interaction/references/motion-patterns.md +11 -11
- package/skills/fec-nextjs-project-standard/SKILL.md +64 -64
- package/skills/fec-nuxt-project-standard/SKILL.md +57 -57
- package/skills/fec-performance-optimization/SKILL.md +54 -54
- package/skills/fec-performance-optimization/references/framework-performance-patterns.md +23 -23
- package/skills/fec-performance-optimization/references/report-template.md +31 -31
- package/skills/fec-pwa-implementation/SKILL.md +17 -17
- package/skills/fec-pwa-implementation/references/manifest-and-icons.md +12 -12
- package/skills/fec-pwa-implementation/references/service-worker-workbox.md +13 -13
- package/skills/fec-react-project-standard/SKILL.md +72 -72
- package/skills/fec-react-project-standard/references/react-performance-patterns.md +28 -28
- package/skills/fec-react-project-standard/references/react-project-structure.md +112 -112
- package/skills/fec-react-project-standard/references/react-quality-patterns.md +72 -72
- package/skills/fec-react-project-standard/references/react-runtime-patterns.md +94 -94
- package/skills/fec-refactor-clean/SKILL.md +30 -30
- package/skills/fec-refactor-clean/references/report-template.md +23 -23
- package/skills/fec-responsive-layout/SKILL.md +17 -17
- package/skills/fec-responsive-layout/references/responsive-layout-patterns.md +37 -37
- package/skills/fec-route-protection/SKILL.md +26 -26
- package/skills/fec-security-review/SKILL.md +20 -20
- package/skills/fec-security-review/references/report-template.md +12 -12
- package/skills/fec-security-review/references/security-checklist.md +27 -27
- package/skills/fec-source-driven-development/SKILL.md +59 -59
- package/skills/fec-state-management/SKILL.md +34 -34
- package/skills/fec-state-management/references/state-patterns.md +19 -19
- package/skills/fec-storybook-component-doc/SKILL.md +19 -19
- package/skills/fec-storybook-component-doc/references/story-patterns.md +12 -12
- package/skills/fec-svg-animation/SKILL.md +32 -32
- package/skills/fec-tailwind-design-system/SKILL.md +17 -17
- package/skills/fec-tailwind-design-system/references/tailwind-system-patterns.md +36 -36
- package/skills/fec-tdd-workflow/SKILL.md +28 -28
- package/skills/fec-testing-strategy/SKILL.md +29 -29
- package/skills/fec-typescript-project-standard/SKILL.md +38 -38
- package/skills/fec-typescript-project-standard/references/type-safety-patterns.md +20 -20
- package/skills/fec-typescript-project-standard/references/type-safety.md +18 -18
- package/skills/fec-ui-design/SKILL.md +90 -90
- package/skills/fec-ui-design/references/design-intelligence.md +61 -61
- package/skills/fec-ui-design/references/master-page-overrides.md +15 -15
- package/skills/fec-ui-design/references/pre-delivery-checklist.md +38 -38
- package/skills/fec-validation-fix/SKILL.md +26 -26
- package/skills/fec-validation-fix/references/report-template.md +25 -25
- package/skills/fec-vite-project-standard/SKILL.md +39 -39
- package/skills/fec-vue3-project-standard/SKILL.md +38 -38
- package/skills/fec-vue3-project-standard/references/vue3-composables-routing.md +36 -36
- package/skills/fec-vue3-project-standard/references/vue3-performance-patterns.md +8 -8
- package/skills/fec-vue3-project-standard/references/vue3-project-structure.md +112 -112
- package/skills/fec-vue3-project-standard/references/vue3-state-api-quality.md +74 -74
- package/skills/fec-web-video-presentation/SKILL.md +33 -33
- package/skills/fec-web-workers/SKILL.md +16 -16
- package/skills/fec-web-workers/references/advanced-workers.md +13 -13
- package/skills/fec-web-workers/references/basic-worker.md +8 -8
- package/skills/metadata.json +121 -115
- package/skills/relations.json +4 -0
- package/templates/claude/CLAUDE.md +60 -60
- package/templates/codex/AGENTS.md +76 -76
- package/templates/codex/config.toml +4 -4
- package/templates/openclaw/AGENTS.md +68 -68
- package/templates/openclaw/OPENCLAW-CONFIG.md +8 -8
- package/templates/shared/rules/fec-agent-workflow.md +40 -40
- package/templates/shared/rules/fec-api-layer.md +52 -52
- package/templates/shared/rules/fec-ci-cd.md +29 -29
- package/templates/shared/rules/fec-code-comments.md +22 -22
- package/templates/shared/rules/fec-design-system.md +53 -53
- package/templates/shared/rules/fec-error-handling.md +40 -40
- package/templates/shared/rules/fec-git-conventions.md +42 -42
- package/templates/shared/rules/fec-i18n.md +48 -48
- package/templates/shared/rules/fec-naming-conventions.md +91 -91
- package/templates/shared/rules/fec-performance.md +78 -78
- package/templates/shared/rules/fec-react.md +58 -58
- package/templates/shared/rules/fec-refactoring.md +34 -34
- package/templates/shared/rules/fec-rendering-patterns.md +36 -36
- package/templates/shared/rules/fec-responsive-design.md +37 -37
- package/templates/shared/rules/fec-source-driven-development.md +22 -22
- package/templates/shared/rules/fec-state-management.md +56 -56
- package/templates/shared/rules/fec-testing.md +64 -64
- package/templates/shared/rules/fec-typescript.md +75 -75
- package/templates/shared/rules/fec-vue.md +42 -42
- package/templates/shared/rules/fec-working-modes.md +34 -34
- package/skills/fec-drawio-studio/data/shape-index.json.gz +0 -0
|
@@ -6,8 +6,10 @@ Use these conventions when a user asks for a named technical diagram.
|
|
|
6
6
|
|
|
7
7
|
- Group nodes by tier: client, edge, service, data, external.
|
|
8
8
|
- Use swimlanes or grouped containers when boundaries matter.
|
|
9
|
+
- For layered block architecture, prefer horizontal tiers with left-side tier labels, content-driven containers, and optional cross-cutting sidebars for security, monitoring or governance.
|
|
9
10
|
- Put bus or event-stream nodes near the center of publisher/subscriber rows.
|
|
10
11
|
- Use cylinders for databases, rounded rectangles for services, dashed outlines for external systems.
|
|
12
|
+
- Use arrows only when data flow or dependency direction matters; use spatial grouping for pure capability stacks.
|
|
11
13
|
|
|
12
14
|
## ERD
|
|
13
15
|
|
|
@@ -15,18 +17,21 @@ Use these conventions when a user asks for a named technical diagram.
|
|
|
15
17
|
- Mark primary keys and foreign keys in labels.
|
|
16
18
|
- Use dashed relationship edges when cardinality is not fully known.
|
|
17
19
|
- Prefer top-to-bottom layout for schemas with multiple relation clusters.
|
|
20
|
+
- Use stable table widths and row heights so long column names wrap instead of resizing neighboring tables.
|
|
18
21
|
|
|
19
22
|
## UML Class
|
|
20
23
|
|
|
21
24
|
- Use a class box split into name, fields and methods.
|
|
22
25
|
- Use hollow triangle arrows for inheritance, dashed hollow triangle for interface implementation.
|
|
23
26
|
- Keep interfaces or abstract bases above concrete classes.
|
|
27
|
+
- Keep associations orthogonal and label multiplicity near the edge segment it describes.
|
|
24
28
|
|
|
25
29
|
## Sequence
|
|
26
30
|
|
|
27
31
|
- Lay participants left-to-right and time top-to-bottom.
|
|
28
32
|
- Keep request, response and async message styles visually distinct.
|
|
29
33
|
- Add activation boxes only when they clarify nested work.
|
|
34
|
+
- Leave enough horizontal spacing for message labels; if labels collide, wrap text or split the interaction into phases.
|
|
30
35
|
|
|
31
36
|
## ML / Deep Learning
|
|
32
37
|
|
|
@@ -39,3 +44,17 @@ Use these conventions when a user asks for a named technical diagram.
|
|
|
39
44
|
- Use ovals for start/end, rectangles for process, diamonds for decisions.
|
|
40
45
|
- Label decision branches.
|
|
41
46
|
- Merge branches back to a central path when possible.
|
|
47
|
+
- Keep the primary path vertical. Route alternate or error branches sideways and back to the main path with orthogonal edges.
|
|
48
|
+
- For editable draw.io flowcharts, follow [flowchart-quality.md](flowchart-quality.md) before final delivery.
|
|
49
|
+
|
|
50
|
+
## Mindmap
|
|
51
|
+
|
|
52
|
+
- Put the central concept in the middle and distribute first-level branches across quadrants.
|
|
53
|
+
- Use curved edges without arrowheads and keep each branch color consistent from parent to leaves.
|
|
54
|
+
- Fan leaves away from the center; do not let branches cross through the central label.
|
|
55
|
+
|
|
56
|
+
## Network Topology
|
|
57
|
+
|
|
58
|
+
- Use hierarchical rows such as internet, edge, switching/routing and devices.
|
|
59
|
+
- Distinguish wired and wireless links visually, usually solid for wired and dashed for wireless.
|
|
60
|
+
- Keep endpoint devices aligned in rows or columns so connection paths remain scannable.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Flowchart Quality
|
|
2
|
+
|
|
3
|
+
Use this reference when a draw.io / diagrams.net deliverable is a process, workflow, approval path, release path, incident response path, onboarding flow or other flowchart that must remain readable after opening in diagrams.net.
|
|
4
|
+
|
|
5
|
+
## Readability Contract
|
|
6
|
+
|
|
7
|
+
- Keep manually authored flowcharts narrow. Prefer `pageWidth` between 600 and 800; do not exceed 800 unless the diagram is intentionally a wide cross-functional table.
|
|
8
|
+
- Set `dx` and `dy` close to the page dimensions so diagrams.net does not initially zoom the drawing until labels become tiny.
|
|
9
|
+
- Put the primary path top-to-bottom. Use side branches only for alternatives, failures, retries and exceptions, then return them to the main path with orthogonal connectors.
|
|
10
|
+
- Split more than five dense stages into multiple diagrams or pages instead of making one oversized canvas.
|
|
11
|
+
|
|
12
|
+
## Stage Grouping
|
|
13
|
+
|
|
14
|
+
- Use `swimlane` containers for real stages, actors, phases or bounded groups; avoid loose rectangles when a title and containment relationship matter.
|
|
15
|
+
- Keep stage containers on a 10px grid, normally with a 20px outer page margin and 30-40px vertical breathing room between stages.
|
|
16
|
+
- Give container headers a readable hierarchy: stage labels around 14-16px, bold, with a clear border color.
|
|
17
|
+
- Set stage containers to `connectable="0"` and `collapsible=0` so connectors target intentional nodes and the diagram does not gain collapse controls.
|
|
18
|
+
- Size containers to fit their children with 15px or more bottom padding. A container with large one-sided blank space usually needs a layout pass.
|
|
19
|
+
|
|
20
|
+
## Labels
|
|
21
|
+
|
|
22
|
+
- Keep node text centered for process boxes unless a table-like artifact genuinely needs aligned rows.
|
|
23
|
+
- Use `whiteSpace=wrap;html=1` on process nodes, and keep normal body text at 12px or larger.
|
|
24
|
+
- Put the node title first, visually stronger than the body. Use concise labels and move long implementation detail into notes or metadata.
|
|
25
|
+
- Use the same language as the user's request, and escape XML attribute content before saving.
|
|
26
|
+
|
|
27
|
+
## Connectors
|
|
28
|
+
|
|
29
|
+
- Use `edgeStyle=orthogonalEdgeStyle` for normal flowchart connectors.
|
|
30
|
+
- Make the main stage-to-stage path visually stronger than secondary edges, for example with a thicker stroke and a consistent accent color.
|
|
31
|
+
- Label decision branches and exception paths close to the edge segment they describe.
|
|
32
|
+
- For fan-out from one node to several peers, use explicit `entryX`, `entryY`, `exitX` and `exitY` anchors so branches do not cross.
|
|
33
|
+
- Route retry, rollback and loop connectors around the left or right margin with explicit waypoints instead of diagonal shortcuts through content.
|
|
34
|
+
|
|
35
|
+
## Visual System
|
|
36
|
+
|
|
37
|
+
- Use a small palette with one color per stage type or actor group. Keep process node fills neutral and let borders or headers carry the stage color.
|
|
38
|
+
- Reserve warning, failure, pending and future states for exceptional nodes; do not use status colors as decoration.
|
|
39
|
+
- Keep container corners square when the stage boundary is structural; rounded corners are fine for ordinary process nodes.
|
|
40
|
+
|
|
41
|
+
## Final Review
|
|
42
|
+
|
|
43
|
+
Before delivery, run:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
node skills/fec-drawio-studio/scripts/diagram-lint.mjs diagram.drawio --format markdown --strict
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Then manually check that the opened diagram has no crossed main-path connectors, no clipped labels, no collapsed-looking stages, and no unreadably small text at the default diagrams.net zoom.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Auto Layout
|
|
4
4
|
|
|
5
|
-
Use `layout-graph.mjs` for dependency graphs, code structure maps and diagrams with more than about 15 nodes.
|
|
5
|
+
Use `layout-graph.mjs` for dependency graphs, code structure maps and diagrams with more than about 15 nodes. For smaller diagrams, manual XML is acceptable when the coordinates, containers and edge anchors can be reviewed directly.
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
node skills/fec-drawio-studio/scripts/layout-graph.mjs graph.json --output diagram.drawio --manifest layout.json
|
|
@@ -25,21 +25,36 @@ Input graph:
|
|
|
25
25
|
|
|
26
26
|
Graphviz `dot` is optional. If it is missing, hand-place the diagram or deliver XML plus a diagrams.net URL.
|
|
27
27
|
|
|
28
|
+
## Manual Layout
|
|
29
|
+
|
|
30
|
+
- Align visible vertex `x` and `y` values to the 10px grid.
|
|
31
|
+
- Keep at least 60px outer page margin and enough space that connectors do not cross labels.
|
|
32
|
+
- Use equal sizes and equal gaps for sibling nodes in the same row or column unless content requires a different size.
|
|
33
|
+
- Encode explicit label breaks as `
`; do not put literal `\n` in draw.io `value` attributes.
|
|
34
|
+
- Include `whiteSpace=wrap;html=1` on labels and use `fontSize=14` by default, with 12 as the smallest readable exception.
|
|
35
|
+
- Size containers, sidebars and swimlanes to their content plus balanced padding. If a final row is incomplete, center it or split the group instead of leaving a large empty tail.
|
|
36
|
+
|
|
28
37
|
## Export
|
|
29
38
|
|
|
30
39
|
Preview:
|
|
31
40
|
|
|
32
41
|
```bash
|
|
33
|
-
|
|
42
|
+
node skills/fec-drawio-studio/scripts/drawio-export.mjs diagram.drawio --format png --output diagram.png --width 2000
|
|
34
43
|
```
|
|
35
44
|
|
|
36
45
|
Final editable PNG:
|
|
37
46
|
|
|
38
47
|
```bash
|
|
39
|
-
|
|
48
|
+
node skills/fec-drawio-studio/scripts/drawio-export.mjs diagram.drawio --format png --output diagram.drawio.png --scale 2 --embed
|
|
40
49
|
node skills/fec-drawio-studio/scripts/png-embed-fix.mjs diagram.drawio.png
|
|
41
50
|
```
|
|
42
51
|
|
|
52
|
+
Preview export can be checked without draw.io side effects:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
node skills/fec-drawio-studio/scripts/drawio-export.mjs diagram.drawio --format png --output diagram.png --scale 2 --width 2000 --dry-run --json
|
|
56
|
+
```
|
|
57
|
+
|
|
43
58
|
Fallback URL:
|
|
44
59
|
|
|
45
60
|
```bash
|
|
@@ -16,6 +16,9 @@ Use this reference to choose the lightest editable diagram source that still mee
|
|
|
16
16
|
- Put child nodes inside their visual container by setting `parent` to the container id and using coordinates relative to that container.
|
|
17
17
|
- Put edges that cross container boundaries at `parent="1"` so they are not clipped by a lane or group.
|
|
18
18
|
- Every edge must contain `<mxGeometry relative="1" as="geometry"/>`; do not use self-closing edge cells.
|
|
19
|
+
- Use `
` for forced line breaks in `value` attributes. Literal `\n` renders as text in draw.io and should be treated as a quality issue.
|
|
20
|
+
- Keep manually placed vertices on a 10px grid, within `pageWidth` / `pageHeight`, and with stable dimensions so hover, labels and exports do not shift the layout.
|
|
21
|
+
- For manually authored flowcharts, keep `pageWidth` at or below 800 unless the diagram is deliberately a wide matrix or cross-functional table.
|
|
19
22
|
|
|
20
23
|
## Containers And Process Layout
|
|
21
24
|
|
|
@@ -35,6 +38,7 @@ Use this reference to choose the lightest editable diagram source that still mee
|
|
|
35
38
|
|
|
36
39
|
- Match diagram label language to the user's language.
|
|
37
40
|
- Add `html=1` whenever labels contain HTML markup or escaped `<br>` formatting.
|
|
41
|
+
- Include `whiteSpace=wrap;html=1` on normal shape labels so long text wraps consistently.
|
|
38
42
|
- Escape XML attribute values: `&`, `<`, `>`, and `"` must be entities.
|
|
39
43
|
- Prefer adaptive colors and simple palettes; specify dark-mode overrides only when automatic inversion makes labels or shapes unclear.
|
|
40
44
|
|
|
@@ -51,4 +55,4 @@ Use this reference to choose the lightest editable diagram source that still mee
|
|
|
51
55
|
- Do not leave raw ampersands or angle brackets inside attribute values.
|
|
52
56
|
- Do not use duplicate ids.
|
|
53
57
|
- Do not leave edges pointing to missing source or target cells.
|
|
54
|
-
- Run `diagram-lint.mjs` before final handoff.
|
|
58
|
+
- Run `diagram-lint.mjs` before final handoff. Use `--strict` when the exported artifact is a final deliverable so warnings such as overlaps, literal line breaks, missing wrapping styles, tiny fonts, grid drift and page overflow block the handoff.
|
|
@@ -8,6 +8,18 @@ export function lintDrawio(xml) {
|
|
|
8
8
|
if (!/<mx(Cell|file|GraphModel)\b/.test(xml)) warnings.push("No draw.io graph markers found");
|
|
9
9
|
if (/<mxCell\b[^>]*\bedge="1"[^>]*\/>/.test(xml)) errors.push("edge mxCell must not be self-closing; add mxGeometry relative=\"1\"");
|
|
10
10
|
|
|
11
|
+
const graphModel = attrsOf(xml.match(/<mxGraphModel\b([^>]*)>/)?.[1] ?? "");
|
|
12
|
+
const pageWidth = Number(graphModel.pageWidth);
|
|
13
|
+
const pageHeight = Number(graphModel.pageHeight);
|
|
14
|
+
const viewportWidth = Number(graphModel.dx);
|
|
15
|
+
const viewportHeight = Number(graphModel.dy);
|
|
16
|
+
if (Number.isFinite(pageWidth) && pageWidth > 800) warnings.push(`pageWidth ${pageWidth} is above the readable manual-flowchart maximum of 800`);
|
|
17
|
+
if (Number.isFinite(pageWidth) && Number.isFinite(viewportWidth) && viewportWidth < pageWidth * 0.75) {
|
|
18
|
+
warnings.push(`dx ${viewportWidth} is much smaller than pageWidth ${pageWidth}; diagrams.net may initially zoom labels too small`);
|
|
19
|
+
}
|
|
20
|
+
if (Number.isFinite(pageHeight) && Number.isFinite(viewportHeight) && viewportHeight < pageHeight * 0.5) {
|
|
21
|
+
warnings.push(`dy ${viewportHeight} is much smaller than pageHeight ${pageHeight}; diagrams.net may initially zoom labels too small`);
|
|
22
|
+
}
|
|
11
23
|
const cellRe = /<mxCell\b([^>]*?)(?:\/>|>([\s\S]*?)<\/mxCell>)/g;
|
|
12
24
|
const objectByCellIndex = objectsByCellIndex(xml);
|
|
13
25
|
const cells = [];
|
|
@@ -28,6 +40,7 @@ export function lintDrawio(xml) {
|
|
|
28
40
|
for (const [name, value] of rawAttrsOf(match[1])) {
|
|
29
41
|
if (hasUnescapedAmpersand(value)) errors.push(`cell ${id} attribute ${name} contains an unescaped ampersand`);
|
|
30
42
|
if (/[<>]/.test(value)) errors.push(`cell ${id} attribute ${name} contains an unescaped angle bracket`);
|
|
43
|
+
if (name === "value" && /\\n/.test(value)) warnings.push(`cell ${id} value contains literal \\n; use 
 for draw.io line breaks`);
|
|
31
44
|
}
|
|
32
45
|
const geom = body.match(/<mxGeometry\b([^>]*?)(?:\/>|>)/)?.[1];
|
|
33
46
|
cells.push({ id, attrs, body, geom: geom ? attrsOf(geom) : null });
|
|
@@ -49,14 +62,33 @@ export function lintDrawio(xml) {
|
|
|
49
62
|
}
|
|
50
63
|
if (attrs.edge === "1" && !geom) errors.push(`edge ${id} is missing mxGeometry`);
|
|
51
64
|
if (attrs.edge === "1" && (!attrs.source || !attrs.target)) warnings.push(`edge ${id} has no source or target`);
|
|
65
|
+
if (attrs.edge === "1" && attrs.style && !styleHas(attrs.style, "edgeStyle", "orthogonalEdgeStyle")) {
|
|
66
|
+
warnings.push(`edge ${id} should use orthogonalEdgeStyle for readable technical diagram routing`);
|
|
67
|
+
}
|
|
52
68
|
if (attrs.vertex === "1") {
|
|
53
69
|
if (looksLikeHtml(attrs.value) && !styleHas(attrs.style, "html", "1")) warnings.push(`cell ${id} label contains HTML but style does not include html=1`);
|
|
70
|
+
if (!styleHas(attrs.style, "whiteSpace", "wrap")) warnings.push(`cell ${id} style should include whiteSpace=wrap for label wrapping`);
|
|
71
|
+
if (!styleHas(attrs.style, "html", "1")) warnings.push(`cell ${id} style should include html=1 for predictable label rendering`);
|
|
72
|
+
const fontSize = styleNumber(attrs.style, "fontSize");
|
|
73
|
+
if (Number.isFinite(fontSize) && fontSize < 12) warnings.push(`cell ${id} fontSize ${fontSize} is below the readable minimum of 12`);
|
|
74
|
+
if (isSwimlane(attrs.style)) {
|
|
75
|
+
if (attrs.connectable !== "0") warnings.push(`swimlane ${id} should set connectable="0" so connectors target intentional nodes`);
|
|
76
|
+
if (styleValue(attrs.style, "collapsible") !== "0") warnings.push(`swimlane ${id} should set collapsible=0 to avoid collapse controls in deliverables`);
|
|
77
|
+
if (styleValue(attrs.style, "rounded") !== "0") warnings.push(`swimlane ${id} should use rounded=0 for clear structural stage boundaries`);
|
|
78
|
+
if (Number.isFinite(fontSize) && fontSize < 14) warnings.push(`swimlane ${id} title fontSize ${fontSize} is below the recommended flowchart stage range of 14-16`);
|
|
79
|
+
} else if (isLikelyProcessNode(attrs.style)) {
|
|
80
|
+
const align = styleValue(attrs.style, "align");
|
|
81
|
+
if (align && align !== "center") warnings.push(`process node ${id} should use align=center for flowchart readability`);
|
|
82
|
+
}
|
|
54
83
|
if (!geom) errors.push(`vertex ${id} is missing mxGeometry`);
|
|
55
84
|
else {
|
|
56
85
|
const rect = rectOf(geom);
|
|
57
86
|
if (!Number.isFinite(rect.w) || !Number.isFinite(rect.h)) errors.push(`vertex ${id} has invalid size`);
|
|
58
87
|
else if (rect.w <= 0 || rect.h <= 0) warnings.push(`vertex ${id} has non-positive size`);
|
|
59
88
|
if (rect.x < 0 || rect.y < 0) warnings.push(`vertex ${id} has negative position`);
|
|
89
|
+
if (!onGrid(rect.x) || !onGrid(rect.y)) warnings.push(`vertex ${id} position should align to the 10px grid`);
|
|
90
|
+
if (Number.isFinite(pageWidth) && rect.x + rect.w > pageWidth) warnings.push(`vertex ${id} extends beyond pageWidth ${pageWidth}`);
|
|
91
|
+
if (Number.isFinite(pageHeight) && rect.y + rect.h > pageHeight) warnings.push(`vertex ${id} extends beyond pageHeight ${pageHeight}`);
|
|
60
92
|
}
|
|
61
93
|
}
|
|
62
94
|
}
|
|
@@ -119,6 +151,32 @@ function styleHas(style = "", key, expected) {
|
|
|
119
151
|
});
|
|
120
152
|
}
|
|
121
153
|
|
|
154
|
+
function styleNumber(style = "", key) {
|
|
155
|
+
for (const part of style.split(";")) {
|
|
156
|
+
const [partKey, value] = part.split("=", 2);
|
|
157
|
+
if (partKey === key) return Number(value);
|
|
158
|
+
}
|
|
159
|
+
return NaN;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
function styleValue(style = "", key) {
|
|
163
|
+
for (const part of style.split(";")) {
|
|
164
|
+
const [partKey, value] = part.split("=", 2);
|
|
165
|
+
if (partKey === key) return value ?? "";
|
|
166
|
+
}
|
|
167
|
+
return undefined;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
function isSwimlane(style = "") {
|
|
171
|
+
return style.split(";").some((part) => part === "swimlane" || part === "shape=swimlane");
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
function isLikelyProcessNode(style = "") {
|
|
175
|
+
const shape = styleValue(style, "shape");
|
|
176
|
+
if (shape) return ["process", "rectangle", "rhombus", "terminator"].includes(shape);
|
|
177
|
+
return style.includes("rounded=1") || style.includes("whiteSpace=wrap");
|
|
178
|
+
}
|
|
179
|
+
|
|
122
180
|
function rectOf(geom) {
|
|
123
181
|
return {
|
|
124
182
|
x: Number(geom.x ?? 0),
|
|
@@ -128,6 +186,10 @@ function rectOf(geom) {
|
|
|
128
186
|
};
|
|
129
187
|
}
|
|
130
188
|
|
|
189
|
+
function onGrid(value, grid = 10) {
|
|
190
|
+
return Number.isFinite(value) && Math.abs(value / grid - Math.round(value / grid)) < 1e-9;
|
|
191
|
+
}
|
|
192
|
+
|
|
131
193
|
function overlaps(a, b) {
|
|
132
194
|
return a.x < b.x + b.w && b.x < a.x + a.w && a.y < b.y + b.h && b.y < a.y + a.h;
|
|
133
195
|
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import os from "node:os";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
import { spawnSync } from "node:child_process";
|
|
6
|
+
import { formatResult, parseArgs } from "./studio-core.mjs";
|
|
7
|
+
|
|
8
|
+
const INSTALL_HINTS = [
|
|
9
|
+
"draw.io desktop CLI was not found.",
|
|
10
|
+
"Install draw.io desktop, then rerun the export.",
|
|
11
|
+
"Windows: winget install JGraph.Draw",
|
|
12
|
+
"macOS: brew install --cask drawio",
|
|
13
|
+
"Linux: install drawio from your package manager or snap install drawio",
|
|
14
|
+
"Manual download: https://github.com/jgraph/drawio-desktop/releases",
|
|
15
|
+
];
|
|
16
|
+
|
|
17
|
+
export function buildExportPlan(input, args = {}, env = process.env, platform = process.platform) {
|
|
18
|
+
const drawio = findDrawio(args.drawio, env, platform);
|
|
19
|
+
if (!drawio) {
|
|
20
|
+
return {
|
|
21
|
+
ok: false,
|
|
22
|
+
title: "Draw.io Export",
|
|
23
|
+
errors: [INSTALL_HINTS.join("\n")],
|
|
24
|
+
command: null,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const format = String(args.format ?? "png");
|
|
29
|
+
const output = String(args.output ?? defaultOutput(input, format));
|
|
30
|
+
const commandArgs = ["-x", "-f", format];
|
|
31
|
+
if (args.embed) commandArgs.push("-e");
|
|
32
|
+
if (args.scale) commandArgs.push("-s", String(args.scale));
|
|
33
|
+
if (args.width) commandArgs.push("--width", String(args.width));
|
|
34
|
+
if (args.border) commandArgs.push("--border", String(args.border));
|
|
35
|
+
if (args.crop) commandArgs.push("--crop");
|
|
36
|
+
if (args.page !== undefined) commandArgs.push("-p", String(args.page));
|
|
37
|
+
commandArgs.push("-o", output, input);
|
|
38
|
+
|
|
39
|
+
return {
|
|
40
|
+
ok: true,
|
|
41
|
+
title: "Draw.io Export",
|
|
42
|
+
drawio,
|
|
43
|
+
command: [drawio, ...commandArgs],
|
|
44
|
+
output,
|
|
45
|
+
format,
|
|
46
|
+
dryRun: Boolean(args.dryRun),
|
|
47
|
+
errors: [],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function findDrawio(explicitPath, env = process.env, platform = process.platform) {
|
|
52
|
+
if (explicitPath) return existingFile(explicitPath);
|
|
53
|
+
|
|
54
|
+
for (const command of ["drawio", "draw.io"]) {
|
|
55
|
+
const found = findOnPath(command, env, platform);
|
|
56
|
+
if (found) return found;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
for (const candidate of defaultCandidates(env, platform)) {
|
|
60
|
+
const found = existingFile(candidate);
|
|
61
|
+
if (found) return found;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function findOnPath(command, env, platform) {
|
|
68
|
+
const pathValue = env.PATH ?? env.Path ?? "";
|
|
69
|
+
const dirs = pathValue.split(path.delimiter).filter(Boolean);
|
|
70
|
+
const extensions = platform === "win32" ? pathExtensions(env) : [""];
|
|
71
|
+
for (const dir of dirs) {
|
|
72
|
+
for (const ext of extensions) {
|
|
73
|
+
const candidate = path.join(dir, command.endsWith(ext) ? command : `${command}${ext}`);
|
|
74
|
+
const found = existingFile(candidate);
|
|
75
|
+
if (found) return found;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function pathExtensions(env) {
|
|
82
|
+
const configured = env.PATHEXT ? env.PATHEXT.split(";").filter(Boolean) : [".EXE", ".CMD", ".BAT", ""];
|
|
83
|
+
return [...new Set(["", ...configured, ...configured.map((item) => item.toLowerCase())])];
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function defaultCandidates(env, platform) {
|
|
87
|
+
if (platform === "win32") {
|
|
88
|
+
return [
|
|
89
|
+
path.join(env.ProgramFiles ?? "C:\\Program Files", "draw.io", "draw.io.exe"),
|
|
90
|
+
path.join(env["ProgramFiles(x86)"] ?? "C:\\Program Files (x86)", "draw.io", "draw.io.exe"),
|
|
91
|
+
path.join(env.LOCALAPPDATA ?? path.join(os.homedir(), "AppData", "Local"), "Programs", "draw.io", "draw.io.exe"),
|
|
92
|
+
];
|
|
93
|
+
}
|
|
94
|
+
if (platform === "darwin") {
|
|
95
|
+
return ["/Applications/draw.io.app/Contents/MacOS/draw.io"];
|
|
96
|
+
}
|
|
97
|
+
return ["/usr/bin/drawio", "/usr/local/bin/drawio", "/snap/bin/drawio"];
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function existingFile(candidate) {
|
|
101
|
+
if (!candidate) return null;
|
|
102
|
+
const resolved = path.resolve(candidate);
|
|
103
|
+
return fs.existsSync(resolved) && fs.statSync(resolved).isFile() ? resolved : null;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function defaultOutput(input, format) {
|
|
107
|
+
return `${input.replace(/\.(drawio|xml)$/i, "")}.${format}`;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function printFailure(plan, args) {
|
|
111
|
+
const output = formatResult(plan, args.formatOutput ?? (args.json ? "json" : "markdown"));
|
|
112
|
+
process.stderr.write(output);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
const args = parseArgs(process.argv.slice(2));
|
|
116
|
+
const input = args._[0];
|
|
117
|
+
if (!input) {
|
|
118
|
+
console.error("usage: node drawio-export.mjs <file.drawio> [--format png|svg|pdf] [--output file] [--scale 2] [--width 2000] [--border 20] [--dry-run] [--json]");
|
|
119
|
+
process.exit(2);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
const plan = buildExportPlan(input, args);
|
|
123
|
+
if (!plan.ok) {
|
|
124
|
+
printFailure(plan, args);
|
|
125
|
+
process.exit(1);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
if (args.dryRun) {
|
|
129
|
+
process.stdout.write(formatResult(plan, args.formatOutput ?? (args.json ? "json" : "markdown")));
|
|
130
|
+
process.exit(0);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
const result = spawnSync(plan.command[0], plan.command.slice(1), { stdio: "inherit" });
|
|
134
|
+
process.exit(result.status ?? 1);
|
|
@@ -1,28 +1,44 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import fs from "node:fs";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
import zlib from "node:zlib";
|
|
5
4
|
import { formatResult, parseArgs, skillDir } from "./studio-core.mjs";
|
|
6
5
|
|
|
7
|
-
const INDEX = path.join(skillDir, "data", "shape-index.json
|
|
6
|
+
const INDEX = path.join(skillDir, "data", "shape-index.json");
|
|
8
7
|
const ALIASES = new Map([
|
|
9
|
-
["亚马逊", "aws"],
|
|
10
|
-
["
|
|
11
|
-
["
|
|
12
|
-
["
|
|
13
|
-
["
|
|
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"],
|
|
14
27
|
]);
|
|
15
28
|
|
|
16
29
|
export function loadShapes() {
|
|
17
|
-
return JSON.parse(
|
|
30
|
+
return JSON.parse(fs.readFileSync(INDEX).toString("utf8"));
|
|
18
31
|
}
|
|
19
32
|
|
|
20
33
|
export function queryShapes(shapes, query, options = {}) {
|
|
21
34
|
const terms = expandTerms(query);
|
|
22
|
-
const category = options.category
|
|
35
|
+
const category = options.category
|
|
36
|
+
? String(options.category).toLowerCase()
|
|
37
|
+
: "";
|
|
23
38
|
const scored = [];
|
|
24
39
|
for (const [index, shape] of shapes.entries()) {
|
|
25
|
-
const haystack =
|
|
40
|
+
const haystack =
|
|
41
|
+
`${shape.title ?? ""} ${shape.tags ?? ""} ${shape.style ?? ""}`.toLowerCase();
|
|
26
42
|
if (category && !haystack.includes(category)) continue;
|
|
27
43
|
let score = 0;
|
|
28
44
|
const title = String(shape.title ?? "").toLowerCase();
|
|
@@ -34,12 +50,30 @@ export function queryShapes(shapes, query, options = {}) {
|
|
|
34
50
|
else if (tags.includes(term)) score += 12;
|
|
35
51
|
if (fuzzyContains(haystack, term)) score += 4;
|
|
36
52
|
}
|
|
37
|
-
if (score > 0)
|
|
53
|
+
if (score > 0)
|
|
54
|
+
scored.push({
|
|
55
|
+
index,
|
|
56
|
+
score,
|
|
57
|
+
titleHits: terms.filter((term) => title.includes(term)).length,
|
|
58
|
+
shape,
|
|
59
|
+
});
|
|
38
60
|
}
|
|
39
61
|
return scored
|
|
40
|
-
.sort(
|
|
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
|
+
)
|
|
41
69
|
.slice(0, Number(options.limit ?? 10))
|
|
42
|
-
.map(({ shape, score }) => ({
|
|
70
|
+
.map(({ shape, score }) => ({
|
|
71
|
+
title: shape.title,
|
|
72
|
+
w: shape.w,
|
|
73
|
+
h: shape.h,
|
|
74
|
+
style: shape.style,
|
|
75
|
+
score,
|
|
76
|
+
}));
|
|
43
77
|
}
|
|
44
78
|
|
|
45
79
|
function expandTerms(query) {
|
|
@@ -50,7 +84,11 @@ function expandTerms(query) {
|
|
|
50
84
|
expanded.push(ALIASES.get(term) ?? term);
|
|
51
85
|
if (term.includes("-")) expanded.push(...term.split("-"));
|
|
52
86
|
}
|
|
53
|
-
return [
|
|
87
|
+
return [
|
|
88
|
+
...new Set(
|
|
89
|
+
expanded.join(" ").match(/[a-z0-9._-]+|[\u4e00-\u9fff]+/g) ?? [],
|
|
90
|
+
),
|
|
91
|
+
].filter((term) => term.length >= 2);
|
|
54
92
|
}
|
|
55
93
|
|
|
56
94
|
function fuzzyContains(text, term) {
|
|
@@ -66,7 +104,9 @@ function fuzzyContains(text, term) {
|
|
|
66
104
|
const args = parseArgs(process.argv.slice(2));
|
|
67
105
|
const query = args._.join(" ");
|
|
68
106
|
if (!query) {
|
|
69
|
-
console.error(
|
|
107
|
+
console.error(
|
|
108
|
+
"usage: node shape-query.mjs <keywords> [--limit 10] [--category aws] [--format markdown|json]",
|
|
109
|
+
);
|
|
70
110
|
process.exit(2);
|
|
71
111
|
}
|
|
72
112
|
const results = queryShapes(loadShapes(), query, args);
|
|
@@ -1,42 +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,
|
|
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.
|
|
16
|
-
3.
|
|
17
|
-
4.
|
|
18
|
-
5. CI
|
|
19
|
-
6.
|
|
20
|
-
7.
|
|
21
|
-
8.
|
|
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
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
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).
|
|
29
29
|
|
|
30
30
|
## Constraints
|
|
31
31
|
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
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.
|
|
39
39
|
|
|
40
40
|
## Expected Output
|
|
41
41
|
|
|
42
|
-
|
|
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.
|