@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.
- package/.claude-plugin/marketplace.json +3 -3
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +72 -1
- package/CHANGELOG.zh-CN.md +71 -1
- package/README.md +10 -6
- package/README.openclaw.md +100 -42
- package/README.openclaw.zh-CN.md +100 -42
- package/README.zh-CN.md +10 -6
- 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 +88 -88
- 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 +84 -69
- package/docs/ja-JP/README.md +56 -52
- package/docs/ko-KR/README.md +45 -41
- package/docs/project-structure.md +19 -7
- package/docs/superpowers/plans/2026-05-29-fec-debug.md +491 -0
- package/docs/superpowers/specs/2026-05-29-fec-debug-design.md +340 -0
- package/docs/zh-CN/example-prompts.md +84 -69
- package/docs/zh-CN/project-structure.md +14 -5
- package/docs/zh-TW/README.md +33 -29
- 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/{skills/fec-typescript-type-safety → localized/zh-CN/skills/fec-typescript-project-standard}/references/type-safety-patterns.md +1 -1
- package/{skills/fec-typescript-type-safety/SKILL.md → localized/zh-CN/skills/fec-typescript-project-standard/references/type-safety.md} +5 -14
- 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 +4 -3
- package/skills/TEMPLATE.md +74 -74
- package/skills/eval_queries.json +717 -619
- 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 +45 -0
- 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 +73 -0
- package/skills/fec-drawio-studio/data/THIRD_PARTY_NOTICES.md +10 -0
- package/skills/fec-drawio-studio/data/brand-icons.json +878 -0
- package/skills/fec-drawio-studio/data/shape-index.json +83570 -0
- package/skills/fec-drawio-studio/references/data-residency.md +27 -0
- package/skills/fec-drawio-studio/references/diagram-patterns.md +60 -0
- package/skills/fec-drawio-studio/references/flowchart-quality.md +49 -0
- package/skills/fec-drawio-studio/references/layout-and-export.md +72 -0
- package/skills/fec-drawio-studio/references/troubleshooting.md +29 -0
- package/skills/fec-drawio-studio/references/xml-and-mermaid.md +58 -0
- package/skills/fec-drawio-studio/scripts/brand-symbols.mjs +99 -0
- package/skills/fec-drawio-studio/scripts/diagram-lint.mjs +205 -0
- package/skills/fec-drawio-studio/scripts/diagram-url.mjs +102 -0
- package/skills/fec-drawio-studio/scripts/drawio-export.mjs +134 -0
- package/skills/fec-drawio-studio/scripts/layout-graph.mjs +107 -0
- package/skills/fec-drawio-studio/scripts/png-embed-fix.mjs +26 -0
- package/skills/fec-drawio-studio/scripts/scan-go-packages.mjs +36 -0
- package/skills/fec-drawio-studio/scripts/scan-js-modules.mjs +52 -0
- package/skills/fec-drawio-studio/scripts/scan-python-classes.mjs +30 -0
- package/skills/fec-drawio-studio/scripts/scan-python-modules.mjs +55 -0
- package/skills/fec-drawio-studio/scripts/scan-rust-modules.mjs +35 -0
- package/skills/fec-drawio-studio/scripts/scan-ts-modules.mjs +7 -0
- package/skills/fec-drawio-studio/scripts/shape-query.mjs +121 -0
- package/skills/fec-drawio-studio/scripts/studio-core.mjs +139 -0
- package/skills/fec-drawio-studio/styles/built-in/corporate.json +49 -0
- package/skills/fec-drawio-studio/styles/built-in/default.json +49 -0
- package/skills/fec-drawio-studio/styles/built-in/handdrawn.json +49 -0
- package/skills/fec-drawio-studio/styles/schema.json +112 -0
- package/skills/fec-e2e-testing/SKILL.md +24 -22
- package/skills/fec-e2e-testing/references/e2e-ci-reporting.md +62 -0
- package/skills/fec-e2e-testing/references/e2e-special-scenarios.md +52 -0
- package/skills/fec-e2e-testing/references/e2e-visual-regression.md +60 -0
- 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 +81 -0
- package/skills/fec-image-generation/assets/interactive-diagram.html +371 -0
- package/skills/fec-image-generation/references/artifact-routing.md +80 -0
- package/skills/fec-image-generation/references/diagram-workflows.md +74 -0
- package/skills/fec-image-generation/references/html-technical-diagrams.md +236 -0
- package/skills/fec-image-generation/references/png-qa-autofix.md +30 -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/png-qa.mjs +431 -0
- package/skills/fec-image-generation/scripts/tech-diagram-render.mjs +1397 -0
- package/skills/fec-implement-from-design/SKILL.md +81 -74
- package/skills/fec-implement-from-design/references/design-plan-template.md +16 -16
- package/skills/fec-legacy-to-modern-migration/SKILL.md +29 -173
- package/skills/fec-legacy-to-modern-migration/references/migration-execution-checklist.md +110 -0
- 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 +48 -0
- 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 -44
- package/skills/fec-motion-interaction/references/motion-patterns.md +11 -11
- package/skills/fec-nextjs-project-standard/SKILL.md +64 -58
- package/skills/fec-nuxt-project-standard/SKILL.md +57 -57
- package/skills/fec-performance-optimization/SKILL.md +54 -50
- package/skills/fec-performance-optimization/references/framework-performance-patterns.md +38 -0
- package/skills/fec-performance-optimization/references/report-template.md +34 -28
- 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 -64
- package/skills/fec-react-project-standard/references/react-performance-patterns.md +35 -0
- package/skills/fec-react-project-standard/references/react-project-structure.md +197 -0
- package/skills/fec-react-project-standard/references/react-quality-patterns.md +131 -0
- package/skills/fec-react-project-standard/references/react-runtime-patterns.md +293 -0
- 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 +39 -28
- 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 +66 -40
- 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 -32
- 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 +54 -0
- package/skills/fec-typescript-project-standard/references/type-safety-patterns.md +102 -0
- package/skills/fec-typescript-project-standard/references/type-safety.md +148 -0
- package/skills/fec-ui-design/SKILL.md +90 -72
- package/skills/fec-ui-design/data/style-archetypes.json +40 -0
- package/skills/fec-ui-design/data/ux-quality-rules.json +35 -0
- package/skills/fec-ui-design/references/design-intelligence.md +81 -21
- package/skills/fec-ui-design/references/master-page-overrides.md +15 -15
- package/skills/fec-ui-design/references/pre-delivery-checklist.md +38 -32
- package/skills/fec-ui-design/scripts/design-system.mjs +119 -1
- 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 +39 -30
- package/skills/fec-vue3-project-standard/references/vue3-composables-routing.md +163 -0
- package/skills/fec-vue3-project-standard/references/vue3-performance-patterns.md +13 -0
- package/skills/fec-vue3-project-standard/references/vue3-project-structure.md +177 -0
- package/skills/fec-vue3-project-standard/references/vue3-state-api-quality.md +216 -0
- package/skills/fec-web-video-presentation/SKILL.md +61 -0
- package/skills/fec-web-video-presentation/data/starter-themes.json +59 -0
- package/skills/fec-web-video-presentation/references/chapter-craft.md +37 -0
- package/skills/fec-web-video-presentation/references/content-plan.md +38 -0
- package/skills/fec-web-video-presentation/references/recording-and-audio.md +33 -0
- package/skills/fec-web-video-presentation/references/theme-system.md +36 -0
- package/skills/fec-web-video-presentation/scripts/create-video-presentation.mjs +430 -0
- 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 +402 -220
- package/skills/relations.json +120 -25
- 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 -117
- package/templates/shared/rules/fec-code-comments.md +22 -22
- package/templates/shared/rules/fec-design-system.md +65 -241
- package/templates/shared/rules/fec-error-handling.md +41 -185
- package/templates/shared/rules/fec-git-conventions.md +42 -42
- package/templates/shared/rules/fec-i18n.md +48 -96
- 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 -30
- package/templates/shared/rules/fec-rendering-patterns.md +40 -183
- package/templates/shared/rules/fec-responsive-design.md +37 -214
- package/templates/shared/rules/fec-source-driven-development.md +22 -22
- package/templates/shared/rules/fec-state-management.md +45 -148
- package/templates/shared/rules/fec-testing.md +64 -64
- package/templates/shared/rules/fec-typescript.md +98 -341
- package/templates/shared/rules/fec-vue.md +42 -42
- package/templates/shared/rules/fec-working-modes.md +34 -34
- package/skills/fec-e2e-testing/references/e2e-advanced.md +0 -176
- package/skills/fec-react-project-standard/references/react-project-details.md +0 -642
- 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("&", "&")
|
|
66
|
+
.replaceAll("<", "<")
|
|
67
|
+
.replaceAll(">", ">")
|
|
68
|
+
.replaceAll('"', """);
|
|
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,
|
|
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
|
-
-
|
|
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
|
-
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
-
|
|
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
|
-
|
|
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
|
+
```
|