@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
|
@@ -1,87 +1,87 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: fec-source-driven-development
|
|
3
|
-
description: Use when frontend decisions depend on framework, library, browser, runtime, package, API, or platform behavior that may have changed, including official documentation checks, version-sensitive patterns, migration choices, or public interface assumptions; Chinese triggers include
|
|
3
|
+
description: Use when frontend decisions depend on framework, library, browser, runtime, package, API, or platform behavior that may have changed, including official documentation checks, version-sensitive patterns, migration choices, or public interface assumptions; Chinese triggers include Check official documentation, source code shall prevail, source-driven, version differences.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# Source driven development
|
|
7
7
|
|
|
8
8
|
## Purpose
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Prioritize the use of in-project facts, official documentation, and current version behavior in front-end implementation, review, and architecture decisions, and avoid relying on outdated experience or unverified assumptions.
|
|
11
11
|
|
|
12
12
|
## Procedure
|
|
13
13
|
|
|
14
|
-
1.
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
|
|
19
|
-
2.
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
|
|
25
|
-
3.
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
|
|
31
|
-
4.
|
|
32
|
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
|
|
36
|
-
5.
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
6.
|
|
40
|
-
-
|
|
14
|
+
1. Determine whether it is necessary to check the source
|
|
15
|
+
- Source checking is required when new versions of frameworks, routing, rendering modes, caches, build tools, browser APIs, package publishing formats, authentication protocols, or public interfaces are involved.
|
|
16
|
+
- When it comes to project commitments, read the README, configuration, templates, existing implementations, testing and migration records of this warehouse first.
|
|
17
|
+
- Use the project's existing schema as a source of truth when simply stabilizing the language syntax or significantly partial refactoring.
|
|
18
|
+
|
|
19
|
+
2. Collect authoritative materials
|
|
20
|
+
- Preferred official documentation, specifications, source code, release notes, migration guide, type definitions and in-project testing.
|
|
21
|
+
- Third-party articles can only be used as clues and cannot be used as the final basis.
|
|
22
|
+
- Record package name, version, document date or page title for rapidly changing libraries.
|
|
23
|
+
- When a user asks to answer a question from a local knowledge base, project repository or `knowledge/` directory, perform local knowledge retrieval first and do not use network search to fill in the facts.
|
|
24
|
+
|
|
25
|
+
3. Refine decisions
|
|
26
|
+
- Write down recommended practices, deprecated practices, limitations and migration considerations for the current version.
|
|
27
|
+
- Explain the reasons for selection, compatibility, maintenance costs and fallback methods for multiple feasible options.
|
|
28
|
+
- If there is a conflict between the document and the current status of the project, priority will be given to explaining the conflict and making incremental adjustments instead of directly overturning the running system.
|
|
29
|
+
- Record release notes, migration guide, version scope, breaking changes and rollback plans for dependency upgrades, framework migrations and public API changes.
|
|
30
|
+
|
|
31
|
+
4. Fall to implementation
|
|
32
|
+
- Isolate external behavior in the adaptation layer, configuration layer or small utility functions to avoid spreading version assumptions throughout the component.
|
|
33
|
+
- Public interface changes should keep naming, error shapes, default values, and compatibility policies clear.
|
|
34
|
+
- Code comments only record non-obvious source constraints and do not paste large sections of documentation.
|
|
35
|
+
|
|
36
|
+
5. Test your hypothesis
|
|
37
|
+
- Prove key assumptions with type checking, minimal reproduction, unit testing, component testing, E2E, build or browser validation.
|
|
38
|
+
- If verification is not possible, report uncertainty, risk range, and information that requires confirmation by the user or team.
|
|
39
|
+
6. Leave a lightweight record of decisions
|
|
40
|
+
- Supplement ADR/change records or hand off to the document sync process when conclusions impact public interfaces, dependency versions, catalog specifications or team workflows.
|
|
41
41
|
|
|
42
42
|
## Local Knowledge Retrieval
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
When the user specifies the local knowledge base path, or the default `knowledge/` directory exists, this process can be used to answer database questions, extract evidence, or assist decision-making.
|
|
45
45
|
|
|
46
|
-
1.
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
-
|
|
46
|
+
1. Locate the root directory
|
|
47
|
+
- Use this path when the user explicitly specifies the path.
|
|
48
|
+
- Otherwise, check whether `knowledge/` under the current project exists; if it does not exist, it means that the default knowledge base is not found and the path is requested.
|
|
49
|
+
- No need to use file glob to determine whether the directory exists.
|
|
50
50
|
|
|
51
|
-
2.
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
-
|
|
51
|
+
2. Hierarchical navigation
|
|
52
|
+
- Read `data_structure.md` in the root directory and subdirectories first.
|
|
53
|
+
- Select the most relevant few branches according to the directory description, without traversing the entire knowledge base at once.
|
|
54
|
+
- Document candidate files, topics, time/version range and why they are relevant.
|
|
55
55
|
|
|
56
|
-
3.
|
|
57
|
-
- Markdown
|
|
58
|
-
- PDF
|
|
59
|
-
- Excel
|
|
60
|
-
-
|
|
56
|
+
3. Progressive search
|
|
57
|
+
- Markdown, text, log: first search with keywords, and then partially read the hit context.
|
|
58
|
+
- PDF: Confirm the available tools and extraction routes before processing, and prioritize extraction of temporary text before retrieval to avoid putting the entire PDF into context.
|
|
59
|
+
- Excel: Confirm the read/analysis route before processing, first look at the worksheet, column names and a few samples, and then filter or aggregate by field.
|
|
60
|
+
- Default to up to 5 rounds of keyword iteration; each round adjusts synonyms, abbreviations, and scope based on found evidence.
|
|
61
61
|
|
|
62
|
-
4.
|
|
63
|
-
-
|
|
64
|
-
-
|
|
65
|
-
-
|
|
62
|
+
4. Answer and traceability
|
|
63
|
+
- Give the conclusion first, and then list the file path, chapter, page number, worksheet or line number as a basis.
|
|
64
|
+
- If there is insufficient evidence, explain which paths have been checked, what information is missing, and how the user can narrow down the scope.
|
|
65
|
+
- Do not mix online information from outside the knowledge base into answers unless the user requests otherwise to check external sources.
|
|
66
66
|
|
|
67
67
|
## Source Priority
|
|
68
68
|
|
|
69
69
|
| Priority | Source | Use |
|
|
70
70
|
| -------- | ------ | --- |
|
|
71
|
-
| 1 |
|
|
72
|
-
| 2 |
|
|
73
|
-
| 3 |
|
|
74
|
-
| 4 |
|
|
71
|
+
| 1 | Configuration, testing, and implementation within the project | Determine the true agreement of this warehouse |
|
|
72
|
+
| 2 | Official documents, source code, type definitions | Determine current recommended behavior |
|
|
73
|
+
| 3 | Standard specifications, browser compatibility data | Determine platform capabilities and compatibility boundaries |
|
|
74
|
+
| 4 | Issues, discussions, third-party articles | Auxiliary investigation, cannot be finalized alone |
|
|
75
75
|
|
|
76
76
|
## Constraints
|
|
77
77
|
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
-
|
|
81
|
-
-
|
|
82
|
-
-
|
|
83
|
-
-
|
|
78
|
+
- Don't give version-sensitive conclusions from memory.
|
|
79
|
+
- Do not treat outdated tutorials as current best practices.
|
|
80
|
+
- Do not cite sources that cannot be reviewed as critical evidence.
|
|
81
|
+
- Do not change the stable project agreement to pursue new developments; the benefits and migration costs must be explained.
|
|
82
|
+
- Do not copy long external documents in the delivery; keep only necessary conclusions and links or file paths.
|
|
83
|
+
- Don't just say "checked the documentation"; version-sensitive decisions need to be traceable to a specific version, path or official page.
|
|
84
84
|
|
|
85
85
|
## Expected Output
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
Output source lists, version or project facts, decision conclusions, implementation impacts, validation orders, and open risks. If code is modified, key behaviors should be supported by tests or build verification.
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: fec-state-management
|
|
3
|
-
description: Use when choosing, implementing, reviewing, or refactoring frontend state ownership across React, Vue, Next.js, Nuxt, URL state, server state, form state, browser persistence, or global stores. Prefer narrower skills for TanStack Query cache details, browser storage persistence, or form validation internals; Chinese triggers include
|
|
3
|
+
description: Use when choosing, implementing, reviewing, or refactoring frontend state ownership across React, Vue, Next.js, Nuxt, URL state, server state, form state, browser persistence, or global stores. Prefer narrower skills for TanStack Query cache details, browser storage persistence, or form validation internals; Chinese triggers include state management, state ownership, store selection.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# Front-end status management
|
|
7
7
|
|
|
8
8
|
## Purpose
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Determine clear ownership of front-end state to avoid global store bloat, duplicate caching, and derived state synchronization errors.
|
|
11
11
|
|
|
12
12
|
## Procedure
|
|
13
13
|
|
|
14
|
-
### 1.
|
|
14
|
+
### 1. Classify status sources first
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Don't choose Redux, Zustand, Pinia or Context first. First mark each state to its unique owner, and then decide on the tool.
|
|
17
17
|
|
|
18
|
-
|
|
|
18
|
+
| Status Type | Typical Example | Default Attribution |
|
|
19
19
|
| ---------------- | ------------------------------------ | ------------------------ |
|
|
20
|
-
|
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
| URL
|
|
24
|
-
|
|
|
25
|
-
|
|
|
20
|
+
| Local UI state | Pop-up window switch, tab, expand row, hover editing state | In-component state / ref |
|
|
21
|
+
| Form status | Input value, dirty field, validation error, submitting | Form library or form component |
|
|
22
|
+
| Server status | List, details, paging results, remote errors | Request cache library |
|
|
23
|
+
| URL status | Search terms, filter, sort, page number, selected tab | Routing parameters / search params |
|
|
24
|
+
| Global client status | Login users, topics, permission snapshots, shopping cart drafts | Global store |
|
|
25
|
+
| Browser persistent state | Drafts, preferences, offline queues retained across refreshes | Storage layer + state adapter |
|
|
26
26
|
|
|
27
27
|
```tsx
|
|
28
28
|
type ReportsStateMap = {
|
|
@@ -34,9 +34,9 @@ type ReportsStateMap = {
|
|
|
34
34
|
};
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
### 2.
|
|
37
|
+
### 2. Keep it minimal
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
Do not save a new copy of a value that can be inferred from props, server state, URL, or existing state.
|
|
40
40
|
|
|
41
41
|
```tsx
|
|
42
42
|
interface Invoice {
|
|
@@ -51,9 +51,9 @@ function InvoiceList({ invoices }: { invoices: Invoice[] }) {
|
|
|
51
51
|
}
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
### 3.
|
|
54
|
+
### 3. Select the React global state solution
|
|
55
55
|
|
|
56
|
-
React
|
|
56
|
+
Priority is given to localization and combination in React; the global store is only introduced when cross-page, cross-feature or unified actions are required.
|
|
57
57
|
|
|
58
58
|
```tsx
|
|
59
59
|
import { create } from "zustand";
|
|
@@ -69,17 +69,17 @@ export const useWorkspaceStore = create<WorkspaceState>((set) => ({
|
|
|
69
69
|
}));
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
Decision order:
|
|
73
73
|
|
|
74
|
-
1.
|
|
75
|
-
2.
|
|
76
|
-
3.
|
|
77
|
-
4.
|
|
78
|
-
5.
|
|
74
|
+
1. Use only in one component or a small subtree: `useState` / `useReducer`.
|
|
75
|
+
2. Low-frequency global configuration or dependency injection: Context.
|
|
76
|
+
3. Moderately complex business status: Zustand or Jotai, priority will be given based on the existing selection of the warehouse.
|
|
77
|
+
4. Large applications, strict action flow, auditing or time travel debugging: Redux Toolkit.
|
|
78
|
+
5. Remote data: Use the data acquisition skill to manage query keys, cache and invalidation policies.
|
|
79
79
|
|
|
80
|
-
### 4.
|
|
80
|
+
### 4. Select Vue global state solution
|
|
81
81
|
|
|
82
|
-
Vue 3
|
|
82
|
+
In Vue 3, use `provide/inject` for local cross-level transfer; use Pinia or the existing store of the project for global business status.
|
|
83
83
|
|
|
84
84
|
```ts
|
|
85
85
|
import { computed, readonly, ref } from "vue";
|
|
@@ -101,9 +101,9 @@ export const useSessionStore = defineStore("session", () => {
|
|
|
101
101
|
});
|
|
102
102
|
```
|
|
103
103
|
|
|
104
|
-
### 5.
|
|
104
|
+
### 5. Clarify status boundaries and migration steps
|
|
105
105
|
|
|
106
|
-
|
|
106
|
+
When reconstructing the state, first make a state list, and then gradually move the read and write entries. Each step should keep the behavior verifiable.
|
|
107
107
|
|
|
108
108
|
```ts
|
|
109
109
|
interface StateMigrationItem {
|
|
@@ -123,18 +123,18 @@ const migrationPlan: StateMigrationItem[] = [
|
|
|
123
123
|
];
|
|
124
124
|
```
|
|
125
125
|
|
|
126
|
-
##
|
|
126
|
+
## Detailed reference
|
|
127
127
|
|
|
128
|
-
|
|
128
|
+
Load [references/state-patterns.md](references/state-patterns.md) when you need Store shape examples, selector patterns, URL state synchronization, persistence adapters, SSR boundaries, or review checklists.
|
|
129
129
|
|
|
130
130
|
## Constraints
|
|
131
131
|
|
|
132
|
-
-
|
|
133
|
-
-
|
|
134
|
-
-
|
|
135
|
-
-
|
|
136
|
-
- SSR
|
|
132
|
+
- Do not copy the server response to the global store; caching, invalidation and retries belong to the data acquisition layer.
|
|
133
|
+
- Do not promote each field of the form to the global store; cross-step sharing is also handled first by the form context or submit draft adapter.
|
|
134
|
+
- No need to use Context to carry large objects that change frequently; it will expand the re-rendering range.
|
|
135
|
+
- Persistence state must specify field whitelist, version number, expiration policy and sensitive data exclusion.
|
|
136
|
+
- In SSR scenarios, do not create a singleton store with user data at the top level of the module.
|
|
137
137
|
|
|
138
138
|
## Expected Output
|
|
139
139
|
|
|
140
|
-
|
|
140
|
+
Output status attribution list, selection reasons, store/API boundaries and verification steps. Key behaviors such as loading/error/empty, refresh, rollback, cross-routing, and permission changes should be retained during implementation.
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
#
|
|
1
|
+
#State management mode
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Ownership Review Checklist
|
|
4
4
|
|
|
5
|
-
-
|
|
6
|
-
-
|
|
7
|
-
- URL
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
- Store
|
|
5
|
+
- Each status field has a unique ownership: local status, form status, server-side cache, URL status, global Store or browser persistence.
|
|
6
|
+
- Derived values are calculated from the source state rather than manually synchronized via effects or watchers.
|
|
7
|
+
- URL state is used for view states that are shareable and need to be retained after refresh, such as filtering, searching, sorting, and paging.
|
|
8
|
+
- Server-side data is kept in the request cache; the global Store only stores selected IDs, local preferences, or optimistic update prompts.
|
|
9
|
+
- Persistent client state requires a whitelist, schema version number, migration path and sensitive field exclusion rules.
|
|
10
|
+
- Store actions are named after domain events, not component processors.
|
|
11
11
|
|
|
12
|
-
## React Store
|
|
12
|
+
## React Store shape example
|
|
13
13
|
|
|
14
14
|
```tsx
|
|
15
15
|
import { create } from "zustand";
|
|
@@ -41,7 +41,7 @@ export const useCartStore = create<CartState>()(
|
|
|
41
41
|
);
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
Selectors should return stable raw values or memo-encoded slices whenever possible:
|
|
45
45
|
|
|
46
46
|
```tsx
|
|
47
47
|
const itemCount = useCartStore((state) =>
|
|
@@ -49,9 +49,9 @@ const itemCount = useCartStore((state) =>
|
|
|
49
49
|
);
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
-
## URL
|
|
52
|
+
## URL status boundaries
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
Use URL state when another user should be able to open the same view, or when the view needs to be preserved after a refresh.
|
|
55
55
|
|
|
56
56
|
```tsx
|
|
57
57
|
import { useSearchParams } from "react-router-dom";
|
|
@@ -72,9 +72,9 @@ export function useReportFilters() {
|
|
|
72
72
|
}
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
-
##
|
|
75
|
+
## Persistence adapter boundary
|
|
76
76
|
|
|
77
|
-
|
|
77
|
+
Only persist stable client preferences or non-sensitive drafts. Serialization logic is placed outside the component.
|
|
78
78
|
|
|
79
79
|
```ts
|
|
80
80
|
interface PersistedGridState {
|
|
@@ -101,9 +101,9 @@ export function writeGridState(state: PersistedGridState): void {
|
|
|
101
101
|
}
|
|
102
102
|
```
|
|
103
103
|
|
|
104
|
-
## SSR
|
|
104
|
+
## SSR is isolated from requests
|
|
105
105
|
|
|
106
|
-
-
|
|
107
|
-
-
|
|
108
|
-
-
|
|
109
|
-
-
|
|
106
|
+
- When the state may contain user data, a separate Store needs to be created for each request.
|
|
107
|
+
- Do not read `window`, `localStorage` or `document` during server rendering.
|
|
108
|
+
- Reload persistence preferences after hydration and provide deterministic defaults before hydration.
|
|
109
|
+
- Server-side cache dehydration is handled separately from pure client-side global Store.
|
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: fec-storybook-component-doc
|
|
3
|
-
description: Use when setting up or reviewing Storybook component documentation, design-system presentation, isolated component state previews, stories, addons, decorators, MDX docs, component-state interaction checks, visual baselines, or Chromatic. For real-browser cross-page journeys or broader coverage planning, choose the matching testing workflow first; Chinese triggers include Storybook,
|
|
3
|
+
description: Use when setting up or reviewing Storybook component documentation, design-system presentation, isolated component state previews, stories, addons, decorators, MDX docs, component-state interaction checks, visual baselines, or Chromatic. For real-browser cross-page journeys or broader coverage planning, choose the matching testing workflow first; Chinese triggers include Storybook, component documentation, Design System, visual regression.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Storybook
|
|
6
|
+
# Storybook component documentation
|
|
7
7
|
|
|
8
8
|
## Purpose
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Establish documentation, design system display and isolated state preview environment for UI components; interaction and visual testing only cover component states within the Storybook scene.
|
|
11
11
|
|
|
12
12
|
## Procedure
|
|
13
13
|
|
|
14
|
-
1.
|
|
15
|
-
2.
|
|
16
|
-
3.
|
|
17
|
-
4.
|
|
18
|
-
5.
|
|
19
|
-
6.
|
|
14
|
+
1. Initialize or identify an existing Storybook configuration, inheriting the project framework adapter, stories globs, themes, and build commands.
|
|
15
|
+
2. Each component's Story covers default state, main variant, size, semantic tone, disabled, loading, error, empty, selected, invalid and key edge states.
|
|
16
|
+
3. Components that rely on Router, Store, i18n, and ThemeProvider are wrapped with decorators and do not copy the application entry in Story.
|
|
17
|
+
4. Use MDX to supplement complex components with usage instructions, Props, slots/children, variant matrices, status examples, accessibility requirements and source code display.
|
|
18
|
+
5. When automation is required, connect interaction tests, addon-a11y, Chromatic or Storybook Test Runner; these capabilities serve component documentation and design system display and do not undertake cross-page business journeys.
|
|
19
|
+
6. Design system components should record token sources, Tailwind/class variants, dark modes, responsive sizes, and unsupported combinations to avoid consumers guessing at assembly.
|
|
20
20
|
|
|
21
|
-
##
|
|
21
|
+
## Detailed reference
|
|
22
22
|
|
|
23
|
-
-
|
|
23
|
+
- Load [references/story-patterns.md](references/story-patterns.md) when you need `main.ts`, `preview.ts`, stories, decorators, MDX, interaction tests and visual regression examples.
|
|
24
24
|
|
|
25
25
|
## Constraints
|
|
26
26
|
|
|
27
|
-
- Story
|
|
28
|
-
- Provider
|
|
29
|
-
- Storybook
|
|
30
|
-
- Storybook
|
|
31
|
-
- Storybook
|
|
32
|
-
-
|
|
33
|
-
-
|
|
27
|
+
- Story needs to be updated synchronously with component prop changes.
|
|
28
|
+
- Provider dependencies must be completed through decorators.
|
|
29
|
+
- Storybook build product `storybook-static/` should not be committed to Git.
|
|
30
|
+
- Storybook is used for development and component documentation and is not a replacement for production page SEO.
|
|
31
|
+
- Storybook visual baseline for component state; cross-page screenshots and real routing processes are offloaded to E2E workflow.
|
|
32
|
+
- Large component libraries need to control stories glob and addon overhead.
|
|
33
|
+
- Don’t use Storybook to hide component API issues; if variant combinations explode, you should first converge component responsibilities or split components.
|
|
34
34
|
|
|
35
35
|
## Expected Output
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
Interactive component documentation and design system showcase site with isolated previews of each component state, Props tables to generate, and key Storybook scenes with optional play testing or visual regression baselines.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Storybook
|
|
1
|
+
# Storybook configuration and examples
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Initialization
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
6
|
npx storybook@latest init
|
|
@@ -75,22 +75,22 @@ import * as InputStories from "./Input.stories";
|
|
|
75
75
|
|
|
76
76
|
<Meta of={InputStories} />
|
|
77
77
|
|
|
78
|
-
#
|
|
78
|
+
#Input input box
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
Used for user text input, supporting verification prompts, suffix and suffix icons, word count, etc.
|
|
81
81
|
|
|
82
|
-
###
|
|
82
|
+
### When to use
|
|
83
83
|
|
|
84
|
-
-
|
|
85
|
-
-
|
|
84
|
+
- Single line text input
|
|
85
|
+
- Form fields that require real-time verification feedback
|
|
86
86
|
|
|
87
87
|
<Canvas of={InputStories.Default} />
|
|
88
88
|
|
|
89
|
-
###
|
|
89
|
+
### Properties
|
|
90
90
|
|
|
91
91
|
<Controls />
|
|
92
92
|
|
|
93
|
-
###
|
|
93
|
+
### Source code
|
|
94
94
|
|
|
95
95
|
<Source of={InputStories.Default} />
|
|
96
96
|
```
|
|
@@ -103,9 +103,9 @@ import { expect, userEvent, within } from "@storybook/test";
|
|
|
103
103
|
export const FormSubmission: Story = {
|
|
104
104
|
play: async ({ canvasElement }) => {
|
|
105
105
|
const canvas = within(canvasElement);
|
|
106
|
-
|
|
107
|
-
await userEvent.click(canvas.getByRole("button", { name:
|
|
108
|
-
await expect(canvas.findByText("
|
|
106
|
+
await userEvent.type(canvas.getByLabelText("username"), "admin");
|
|
107
|
+
await userEvent.click(canvas.getByRole("button", { name: /login/ }));
|
|
108
|
+
await expect(canvas.findByText("Login successful")).resolves.toBeInTheDocument();
|
|
109
109
|
},
|
|
110
110
|
};
|
|
111
111
|
```
|
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: fec-svg-animation
|
|
3
|
-
description: Use when implementing or reviewing SVG animation, path drawing, icon motion, logo animation, illustration motion, micro-interactions, CSS/SMIL/Framer Motion/GSAP choices, motion accessibility, or fallback behavior; Chinese triggers include SVG
|
|
3
|
+
description: Use when implementing or reviewing SVG animation, path drawing, icon motion, logo animation, illustration motion, micro-interactions, CSS/SMIL/Framer Motion/GSAP choices, motion accessibility, or fallback behavior; Chinese triggers include SVG animation, path stroke, animation.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# SVG
|
|
6
|
+
# SVG animation implementation
|
|
7
7
|
|
|
8
8
|
## Purpose
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Provide maintainable, accessible, and performance-controllable animation solutions for SVG icons, illustrations, and data visualizations.
|
|
11
11
|
|
|
12
12
|
## When to Use
|
|
13
13
|
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
14
|
+
- SVG icon, logo, illustration or path stroke animation needs to be implemented.
|
|
15
|
+
- Framer Motion, GSAP or CSS animation needs to be connected to React/Vue components.
|
|
16
|
+
- Need to provide motion reduction according to `prefers-reduced-motion`.
|
|
17
|
+
- Not used for complex 3D/WebGL scenes; for such scenes, Canvas / Three.js workflow is preferred.
|
|
18
18
|
|
|
19
19
|
## Procedure
|
|
20
20
|
|
|
21
|
-
### 1.
|
|
21
|
+
### 1. Select animation mode
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
Choose based on complexity and runtime requirements:
|
|
24
24
|
|
|
25
|
-
|
|
|
25
|
+
| Scenario | Recommendation |
|
|
26
26
|
| --- | --- |
|
|
27
27
|
| hover/focus、opacity、transform | CSS animation/transition |
|
|
28
|
-
|
|
|
29
|
-
| React
|
|
30
|
-
|
|
|
31
|
-
|
|
|
28
|
+
| Path stroke, simple repeating animation | CSS + `stroke-dasharray` |
|
|
29
|
+
| React component state-driven animation | Framer Motion |
|
|
30
|
+
| Timeline, complex arrangement, scrolling trigger | GSAP |
|
|
31
|
+
| Need to keep static SVG with zero dependencies | CSS or SMIL |
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
If the animation spans page transitions, scrolling narratives, or complex component arrangements, you should first judge the intensity, lazy loading, and reduced-motion strategies according to the interactive effects workflow; this skill is only responsible for the path, deformation, and icon motion of the SVG graphics themselves.
|
|
34
34
|
|
|
35
|
-
### 2.
|
|
35
|
+
### 2. Use CSS to implement path strokes
|
|
36
36
|
|
|
37
37
|
```tsx
|
|
38
38
|
export function CheckmarkIcon() {
|
|
@@ -73,7 +73,7 @@ export function CheckmarkIcon() {
|
|
|
73
73
|
}
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
-
### 3.
|
|
76
|
+
### 3. Using Framer Motion in React
|
|
77
77
|
|
|
78
78
|
```tsx
|
|
79
79
|
import { motion, useReducedMotion } from "framer-motion";
|
|
@@ -82,7 +82,7 @@ export function AnimatedSparkline({ path }: { path: string }) {
|
|
|
82
82
|
const reduceMotion = useReducedMotion();
|
|
83
83
|
|
|
84
84
|
return (
|
|
85
|
-
<svg viewBox="0 0 120 40" role="img" aria-label="
|
|
85
|
+
<svg viewBox="0 0 120 40" role="img" aria-label="Trend Chart">
|
|
86
86
|
<motion.path
|
|
87
87
|
d={path}
|
|
88
88
|
fill="none"
|
|
@@ -97,7 +97,7 @@ export function AnimatedSparkline({ path }: { path: string }) {
|
|
|
97
97
|
}
|
|
98
98
|
```
|
|
99
99
|
|
|
100
|
-
### 4.
|
|
100
|
+
### 4. Use GSAP to orchestrate complex timelines
|
|
101
101
|
|
|
102
102
|
```tsx
|
|
103
103
|
import { useLayoutEffect, useRef } from "react";
|
|
@@ -126,23 +126,23 @@ export function LogoReveal() {
|
|
|
126
126
|
}
|
|
127
127
|
```
|
|
128
128
|
|
|
129
|
-
### 5.
|
|
129
|
+
### 5. Control operating costs
|
|
130
130
|
|
|
131
|
-
-
|
|
132
|
-
-
|
|
133
|
-
-
|
|
134
|
-
-
|
|
131
|
+
- Split large SVG into static basemaps and a small number of animatable nodes. Do not let each path participate in the timeline.
|
|
132
|
+
- Icon libraries or Lottie alternatives must be loaded on demand, without going into the base package for all pages.
|
|
133
|
+
- The loop animation only runs in the visible area and stops when the page is hidden or the component is unloaded.
|
|
134
|
+
- The mobile version reduces filters, masks, clipPaths and a large number of gradient overlays.
|
|
135
135
|
|
|
136
136
|
## Constraints
|
|
137
137
|
|
|
138
|
-
-
|
|
139
|
-
-
|
|
140
|
-
-
|
|
141
|
-
-
|
|
142
|
-
-
|
|
143
|
-
-
|
|
144
|
-
-
|
|
138
|
+
- Prioritize animation `transform`, `opacity` and SVG path attributes; avoid frequent modification of layout-related attributes.
|
|
139
|
+
- Interactive controls must retain the visible focus state, and animation cannot replace state expression.
|
|
140
|
+
- All non-decorative SVGs must have accessible names; decorative SVGs use `aria-hidden="true"`.
|
|
141
|
+
- Default respects `prefers-reduced-motion`, complex animations must provide static or weak motion degradation.
|
|
142
|
+
- Don't inline large SVGs into frequently re-rendered components; extract as memoized components or external resources.
|
|
143
|
+
- Change clickable area, reading order or focus position without animation.
|
|
144
|
+
- Don't let SVG filters, blur, mask or clipPath become the main cause of frame drops on mobile devices; complex effects require device downgrading.
|
|
145
145
|
|
|
146
146
|
## Expected Output
|
|
147
147
|
|
|
148
|
-
|
|
148
|
+
Produce a reusable SVG animation component or style solution, including selection reasons, animation degradation and accessibility processing. During verification, check that the animation is smooth, there is no layout jitter, and keyboard and reduced-motion scenes are available.
|