@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
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Migration analysis report template
|
|
2
2
|
|
|
3
3
|
```markdown
|
|
4
|
-
#
|
|
5
|
-
|
|
6
|
-
>
|
|
7
|
-
>
|
|
8
|
-
|
|
9
|
-
##
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
|
|
13
|
-
##
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
- jQuery
|
|
17
|
-
-
|
|
18
|
-
- API
|
|
19
|
-
|
|
20
|
-
##
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
|
|
25
|
-
##
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
|
|
30
|
-
##
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
|
|
36
|
-
##
|
|
37
|
-
-
|
|
38
|
-
-
|
|
4
|
+
# Migration analysis report
|
|
5
|
+
|
|
6
|
+
> Generation time: YYYY-MM-DD HH:mm
|
|
7
|
+
> Review tool: frontend-craft
|
|
8
|
+
|
|
9
|
+
## Strategy selection
|
|
10
|
+
- Progressive/one-time rewrite:
|
|
11
|
+
- Reason:
|
|
12
|
+
|
|
13
|
+
## Inventory inventory
|
|
14
|
+
- Number of pages:
|
|
15
|
+
- Function modules:
|
|
16
|
+
- jQuery plugin:
|
|
17
|
+
- Server template:
|
|
18
|
+
- API calling method:
|
|
19
|
+
|
|
20
|
+
## Dependencies
|
|
21
|
+
- Share JS/CSS:
|
|
22
|
+
- Cross-page logic:
|
|
23
|
+
- Backend interface contract:
|
|
24
|
+
|
|
25
|
+
## Migration priority
|
|
26
|
+
- First batch:
|
|
27
|
+
- Second batch:
|
|
28
|
+
- Suspension:
|
|
29
|
+
|
|
30
|
+
## Phased steps
|
|
31
|
+
- Stage 0:
|
|
32
|
+
- Stage 1:
|
|
33
|
+
- Stage 2:
|
|
34
|
+
- Stage 3:
|
|
35
|
+
|
|
36
|
+
## Risk and rollback
|
|
37
|
+
- Risk:
|
|
38
|
+
- Rollback plan:
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
After migration analysis or planning is completed, save the report to `reports/migration-plan-YYYY-MM-DD-HHmmss.md` and inform the user of the report path.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Migration strategy and concept mapping
|
|
2
|
+
|
|
3
|
+
## Migration strategy selection
|
|
4
|
+
|
|
5
|
+
| Strategy | Applicability | Advantages | Risks |
|
|
6
|
+
| --------------------------- | ------------------------------------ | ---------------------------- | ---------------------------- |
|
|
7
|
+
| **Progressive (Strangler Fig)** | Large-scale projects, requiring continuous delivery, and insufficient team familiarity | Risks are controllable, can be launched in batches, and can be rolled back | Old and new coexist for a long time, and two sets of codes need to be maintained |
|
|
8
|
+
| **One-time rewrite** | Small and medium-sized projects, stable business, sufficient time window | Clear target architecture, no historical baggage | Long cycle, high pressure to go online, difficult rollback |
|
|
9
|
+
|
|
10
|
+
**Recommendation**: Prioritize the incremental approach unless the project is small and the business is simple.
|
|
11
|
+
|
|
12
|
+
## Concept mapping
|
|
13
|
+
|
|
14
|
+
### jQuery → React
|
|
15
|
+
|
|
16
|
+
| Legacy Patterns | React Correspondence |
|
|
17
|
+
| ------------------------------------------ | -------------------------------------- |
|
|
18
|
+
| `$(selector).html(content)` | Declarative JSX + state-driven rendering |
|
|
19
|
+
| `$(document).on('click', '.btn', handler)` | `onClick` + event delegation is handled by React |
|
|
20
|
+
| `$.ajax()` / `$.get()` | Project request layer, `fetch` / `axios`, can be connected to TanStack Query or SWR on demand |
|
|
21
|
+
| Global variables/namespace storage state | Local state, Context or the existing store of the project can be used as needed Zustand/Redux |
|
|
22
|
+
| `$(el).show()` / `$(el).hide()` | Conditional rendering `{visible && <Component />}` |
|
|
23
|
+
| Manual DOM operations `append` / `remove` | Data-driven, triggering re-rendering through setState |
|
|
24
|
+
| Template string concatenation HTML | JSX component + props |
|
|
25
|
+
| Multiple pages + server-side routing | React Router client-side routing |
|
|
26
|
+
|
|
27
|
+
### jQuery → Vue 3
|
|
28
|
+
|
|
29
|
+
| Legacy Mode | Vue 3 Compatibility |
|
|
30
|
+
| ------------------------------------------ | -------------------------------------------------- |
|
|
31
|
+
| `$(selector).html(content)` | Template + `ref` / `reactive` driven rendering |
|
|
32
|
+
| `$(document).on('click', '.btn', handler)` | `@click` + event modifier |
|
|
33
|
+
| `$.ajax()` / `$.get()` | Project request layer, `fetch` / `axios`, can be connected to VueUse, Nuxt `useFetch` or TanStack Query Vue adapter as needed |
|
|
34
|
+
| Global variables / Namespace storage state | `ref` / `reactive` / Pinia |
|
|
35
|
+
| `$(el).show()` / `$(el).hide()` | `v-show` / `v-if` |
|
|
36
|
+
| Manual DOM manipulation | Data-driven, with responsive view updates |
|
|
37
|
+
| Template string concatenation HTML | Single file component `<template>` + props |
|
|
38
|
+
| Multiple pages + server-side routing | Vue Router client-side routing |
|
|
39
|
+
|
|
40
|
+
### Universal mapping
|
|
41
|
+
|
|
42
|
+
| Legacy Concepts | Modern Correspondence |
|
|
43
|
+
| --------------------------------- | ------------------------------------------ |
|
|
44
|
+
| Page-level JS entry (one script per page) | Routing/page entry + lazy loading module, or retain MPA entry and modernize packaging |
|
|
45
|
+
| Public JS modules (utils, ajax packaging) | `services/`, `utils/`, typed API layer |
|
|
46
|
+
| Inline styles / page-level CSS | Target project style system, such as CSS Modules, Tailwind, global style layering or component library styles |
|
|
47
|
+
| Server-side template variables | Obtain via API, SSR/loader injection, or preserve server-side template boundaries and typed data |
|
|
48
|
+
| Form submission + full page refresh | Form library + client verification + API call |
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: fec-legacy-web-standard
|
|
3
|
-
description: Use when maintaining or safely modifying existing non-framework frontend code: vanilla JavaScript, jQuery, HTML/CSS, MPA pages, server-rendered templates, legacy plugins, or long-lived code that should stay in its current stack. Use migration skill when planning a move to React/Vue/TypeScript; Chinese triggers include
|
|
3
|
+
description: Use when maintaining or safely modifying existing non-framework frontend code: vanilla JavaScript, jQuery, HTML/CSS, MPA pages, server-rendered templates, legacy plugins, or long-lived code that should stay in its current stack. Use migration skill when planning a move to React/Vue/TypeScript; Chinese triggers include traditional frontend, native JS, jQuery.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# Traditional front-end project specifications (JS + jQuery + HTML)
|
|
7
7
|
|
|
8
8
|
## Purpose
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Safely maintain vanilla JS, jQuery, HTML/CSS and server-side template projects without rewriting the technology stack.
|
|
11
11
|
|
|
12
12
|
## Procedure
|
|
13
13
|
|
|
14
|
-
1.
|
|
15
|
-
2.
|
|
16
|
-
3. JavaScript
|
|
17
|
-
4. DOM
|
|
18
|
-
5. HTML/CSS
|
|
19
|
-
6.
|
|
14
|
+
1. First confirm whether this change is to maintain the old stack or migrate; switch to the modern migration workflow when migrating to React/Vue/TypeScript.
|
|
15
|
+
2. Use the existing architecture and coding style, prioritize fixing problems, and do not introduce multiple modernizations in one change.
|
|
16
|
+
3. JavaScript uses IIFE/namespace to reduce global pollution, and event binding is delegated to reasonable containers first.
|
|
17
|
+
4. DOM updates cache selectors, batch operations, and escapes user input; Ajax must handle loading, error, empty status, and prevention of repeated submissions.
|
|
18
|
+
5. HTML/CSS maintains semantics, label, alt, BEM/existing naming and low selector depth.
|
|
19
|
+
6. Key security checks: `.html()`, `innerHTML`, URL parameter rendering, CSRF token and file upload.
|
|
20
20
|
|
|
21
|
-
##
|
|
21
|
+
## Detailed reference
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
Load [references/legacy-patterns.md](references/legacy-patterns.md) when it comes to jQuery namespaces, event binding, Ajax, XSS escaping, file organization, and maintenance checklist examples.
|
|
24
24
|
|
|
25
25
|
## Constraints
|
|
26
26
|
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
27
|
+
- Improve within the existing architecture and do not introduce modern frameworks that are incompatible with the project.
|
|
28
|
+
- Progressive enhancement is better than reinventing the wheel.
|
|
29
|
+
- Disable using `innerHTML` / `.html()` to directly insert user input.
|
|
30
|
+
- Avoid global variable pollution.
|
|
31
|
+
- Focus on one maintenance point at a time to avoid rebuilding the entire module.
|
|
32
32
|
|
|
33
33
|
## Expected Output
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
The changes are consistent with the style of the old project, no global variables are leaked, events and DOM operations are maintainable, Ajax state is intact, user input has been escaped, and incremental improvements do not destroy existing functionality.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Traditional front-end maintenance mode
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Namespace
|
|
4
4
|
|
|
5
5
|
```javascript
|
|
6
6
|
var App = App || {};
|
|
@@ -20,12 +20,12 @@ App.UserModule = (function ($) {
|
|
|
20
20
|
})(jQuery);
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
##
|
|
23
|
+
## Events and DOM
|
|
24
24
|
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
25
|
+
- Event triggering elements use `.js-*` classes, separated from style classes.
|
|
26
|
+
- Cache frequently used selectors.
|
|
27
|
+
- Batch DOM manipulation with `DocumentFragment` or one-time insertion.
|
|
28
|
+
- Unbind the event or call the plug-in destroy when the page is unloaded or the module is destroyed.
|
|
29
29
|
|
|
30
30
|
## Ajax
|
|
31
31
|
|
|
@@ -42,7 +42,7 @@ function fetchUserList(params) {
|
|
|
42
42
|
else showError(res.message);
|
|
43
43
|
})
|
|
44
44
|
.fail(function () {
|
|
45
|
-
showError("
|
|
45
|
+
showError("Network error, please try again later");
|
|
46
46
|
})
|
|
47
47
|
.always(function () {
|
|
48
48
|
hideLoading();
|
|
@@ -50,7 +50,7 @@ function fetchUserList(params) {
|
|
|
50
50
|
}
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
-
## XSS
|
|
53
|
+
## XSS escaping
|
|
54
54
|
|
|
55
55
|
```javascript
|
|
56
56
|
$(".username").text(userData.name);
|
|
@@ -62,7 +62,7 @@ function escapeHtml(str) {
|
|
|
62
62
|
}
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
##
|
|
65
|
+
## File organization
|
|
66
66
|
|
|
67
67
|
```text
|
|
68
68
|
project/
|
|
@@ -76,10 +76,10 @@ project/
|
|
|
76
76
|
└── pages/
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
-
##
|
|
79
|
+
## Checklist
|
|
80
80
|
|
|
81
|
-
-
|
|
82
|
-
-
|
|
83
|
-
- Ajax
|
|
84
|
-
-
|
|
85
|
-
-
|
|
81
|
+
- No global variables leaked.
|
|
82
|
+
- Events are bound to reasonable containers.
|
|
83
|
+
- Ajax handling loading/error/empty.
|
|
84
|
+
- User input is escaped.
|
|
85
|
+
- No third-party library or framework dependencies have been expanded.
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: fec-list-virtualization
|
|
3
|
-
description: Use when optimizing or reviewing large lists, virtual scrolling, windowing, react-window, TanStack Virtual, variable-height rows, dynamic measurement, infinite scroll, grid virtualization, or scroll performance; Chinese triggers include
|
|
3
|
+
description: Use when optimizing or reviewing large lists, virtual scrolling, windowing, react-window, TanStack Virtual, variable-height rows, dynamic measurement, infinite scroll, grid virtualization, or scroll performance; Chinese triggers include virtual lists, large list optimization, scroll performance.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# List virtualization optimization
|
|
7
7
|
|
|
8
8
|
## Purpose
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Only the visible area is rendered through windowing, which solves the problem of excessive DOM and stuck scrolling in large lists.
|
|
11
11
|
|
|
12
12
|
## Procedure
|
|
13
13
|
|
|
14
|
-
1.
|
|
15
|
-
2.
|
|
16
|
-
3.
|
|
17
|
-
4.
|
|
18
|
-
5.
|
|
14
|
+
1. First confirm the list size and bottleneck: 500+ items, scrolling frame drops, too many DOM nodes, or memory surge before introducing virtualization.
|
|
15
|
+
2. First follow the existing framework, dependencies and design system constraints of the project, and then select the library according to the scenario: React can consider `react-window` or TanStack Virtual; Vue/Solid/Svelte, dynamic measurement, grid or cross-framework scenarios give priority to TanStack Virtual; the legacy `react-virtualized` is only maintained and not added.
|
|
16
|
+
3. Clarify item size, overscan, container height, key, rolling container and resize behavior.
|
|
17
|
+
4. Separate data paging and DOM virtualization during infinite scrolling; data acquisition can be combined with the data acquisition workflow.
|
|
18
|
+
5. Verify DOM node count, scrolling FPS, keyboard/screen reader experience, and Ctrl+F/SEO limitations.
|
|
19
19
|
|
|
20
|
-
##
|
|
20
|
+
## Detailed reference
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
Load [references/virtualization-patterns.md](references/virtualization-patterns.md) when it comes to the need for virtualization, library selection, fixed height, variable/dynamic height, infinite scrolling, grid virtualization, and performance considerations.
|
|
23
23
|
|
|
24
24
|
## Constraints
|
|
25
25
|
|
|
26
|
-
- SEO
|
|
27
|
-
-
|
|
28
|
-
- Row
|
|
29
|
-
- overscan
|
|
30
|
-
-
|
|
26
|
+
- SEO key content doesn’t exist only in dummy items.
|
|
27
|
+
- Browser native Ctrl+F cannot search for unmounted items.
|
|
28
|
+
- The Row root element must transparently transmit the style/measure ref provided by the virtual library.
|
|
29
|
+
- If overscan is too high, memory will be wasted; if overscan is too low, the screen will be white.
|
|
30
|
+
- Dynamic height measurement to handle ResizeObserver and layout jitter.
|
|
31
31
|
|
|
32
32
|
## Expected Output
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
The scrolling of the 10,000+ item list is close to 60fps, the number of DOM nodes is stable within the visible area and buffer range, and the memory is reduced from O(n) to O(visible).
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Virtual list mode
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## First determine whether virtualization is required
|
|
4
4
|
|
|
5
|
-
-
|
|
6
|
-
- SEO
|
|
7
|
-
-
|
|
5
|
+
- Introduce virtualization only when list size, rendering cost, or scrolling performance have become a bottleneck; not required for small lists, lightweight static lists, and controllable lists after paging.
|
|
6
|
+
- SEO-critical content, full-text content that relies on the browser's native Ctrl+F, and content that needs to be printed/exported once, do not exist only in virtual items.
|
|
7
|
+
- Virtualization only reduces DOM rendering costs and does not replace data paging, interface caching, lazy loading of images, or rendering optimization of complex row components.
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Selection reference
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
First, use the existing virtual list library and framework conventions of the project; when adding new dependencies, select them according to the scenario.
|
|
12
12
|
|
|
13
|
-
|
|
|
13
|
+
| Scenarios | Alternative solutions | Notes |
|
|
14
14
|
| --- | --- | --- |
|
|
15
|
-
| React
|
|
16
|
-
| React
|
|
17
|
-
|
|
|
18
|
-
| Vue / Solid / Svelte /
|
|
19
|
-
|
|
|
20
|
-
|
|
|
15
|
+
| React fixed-height list | `react-window` or TanStack Virtual | `react-window` is lightweight and stable; TanStack Virtual is more suitable for unifying complex scenes. |
|
|
16
|
+
| React Variable Height List | `VariableSizeList` of `react-window` or TanStack Virtual | Both are available when the height can be calculated; measurement and reset are required when the real height of the content changes. |
|
|
17
|
+
| Dynamic measurement, chat flow, expanded rows | TanStack Virtual | Works with `measureElement` / ResizeObserver to handle layout jitter and scroll anchor points. |
|
|
18
|
+
| Vue / Solid / Svelte / Cross-framework | TanStack Virtual or the project's existing ecological library | Do not introduce React-only virtual list libraries for non-React projects. |
|
|
19
|
+
| Two-dimensional grid, table, column virtualization | TanStack Virtual row/column Dual-axis solution or existing table library virtualization capability | Fixed columns, sticky headers and keyboard navigation need to be verified separately. |
|
|
20
|
+
| Legacy `react-virtualized` project | Maintain existing implementation | It is not recommended that new features continue to spread; evaluate migration costs when making major changes. |
|
|
21
21
|
|
|
22
|
-
##
|
|
22
|
+
## General implementation principles
|
|
23
23
|
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
- `overscan`
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
24
|
+
- The container height must be stable, the rolling container must be clear, and the item key must come from a stable business identity.
|
|
25
|
+
- The row root element must transparently pass the `style`, positioning attributes and measurement ref provided by the virtual library.
|
|
26
|
+
- `overscan` adjusts the rendering cost by device and row: if it is too small, the screen will be white, if it is too large, it will be close to full rendering.
|
|
27
|
+
- Dynamic height requires estimated height, real measurements, resize updates and scroll anchor strategy.
|
|
28
|
+
- Infinite scrolling must separate "data paging" and "DOM virtualization"; do not trigger requests unconditionally in the render phase.
|
|
29
|
+
- Validate keyboard navigation, screen reader semantics, focus maintenance, scroll recovery, empty/loading states, and error states.
|
|
30
30
|
|
|
31
|
-
## React
|
|
31
|
+
## React fixed height example
|
|
32
32
|
|
|
33
33
|
```tsx
|
|
34
34
|
import { FixedSizeList as List } from "react-window";
|
|
@@ -44,7 +44,7 @@ export const UserList = ({ users }: { users: User[] }) => (
|
|
|
44
44
|
);
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
## React
|
|
47
|
+
## React variable height example
|
|
48
48
|
|
|
49
49
|
```tsx
|
|
50
50
|
import { VariableSizeList as List } from "react-window";
|
|
@@ -56,7 +56,7 @@ const getItemSize = (index: number) => (items[index].hasSummary ? 120 : 60);
|
|
|
56
56
|
</List>;
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
-
## TanStack Virtual
|
|
59
|
+
## TanStack Virtual dynamic height example
|
|
60
60
|
|
|
61
61
|
```tsx
|
|
62
62
|
const virtualizer = useVirtualizer({
|
|
@@ -67,14 +67,14 @@ const virtualizer = useVirtualizer({
|
|
|
67
67
|
});
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
Dynamic content requires measuring elements and processing ResizeObserver; Vue/Solid/Svelte projects use the TanStack Virtual corresponding framework adapter, and the core options remain the same.
|
|
71
71
|
|
|
72
|
-
##
|
|
72
|
+
## infinite scroll
|
|
73
73
|
|
|
74
|
-
- `count`
|
|
75
|
-
-
|
|
76
|
-
-
|
|
74
|
+
- `count` contains loader placeholders.
|
|
75
|
+
- `fetchNextPage()` is called when the last virtual item enters the viewport.
|
|
76
|
+
- Do not trigger requests unconditionally in render, use effects or explicit state protection.
|
|
77
77
|
|
|
78
|
-
##
|
|
78
|
+
## Grid virtualization
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
The two-dimensional grid uses `FixedSizeGrid` or TanStack Virtual's row/column dual-axis solution to ensure that the cell style is transparently transmitted.
|
|
@@ -1,58 +1,58 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: fec-monorepo-project-standard
|
|
3
|
-
description: Use when creating, reviewing, or restructuring frontend monorepos with pnpm workspace, Turborepo, Nx, multi-package dependency boundaries, task orchestration, package naming, or package publishing; Chinese triggers include monorepo, workspace,
|
|
3
|
+
description: Use when creating, reviewing, or restructuring frontend monorepos with pnpm workspace, Turborepo, Nx, multi-package dependency boundaries, task orchestration, package naming, or package publishing; Chinese triggers include monorepo, workspace, multi-package.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Monorepo
|
|
6
|
+
# Monorepo Project Specifications
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
For multi-package front-end repositories using pnpm workspace, Turborepo or Nx.
|
|
9
9
|
|
|
10
10
|
## Purpose
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Standardize the directory structure, dependency management, task orchestration and package release process of the Monorepo project to ensure the build efficiency and version consistency of multi-package collaboration.
|
|
13
13
|
|
|
14
14
|
## Procedure
|
|
15
15
|
|
|
16
|
-
1.
|
|
17
|
-
2.
|
|
18
|
-
3.
|
|
19
|
-
4.
|
|
20
|
-
5.
|
|
21
|
-
6.
|
|
16
|
+
1. First confirm whether the repository has used pnpm workspace, Turborepo or Nx, and continue to use the existing package naming and task conventions.
|
|
17
|
+
2. Place applications in `apps/` and shared libraries, configuration and tools in `packages/` or existing equivalent directories.
|
|
18
|
+
3. Internal dependencies use `workspace:*` to drive the build sequence through the dependency graph.
|
|
19
|
+
4. Configure cacheable, parallelizable, and incremental root tasks for build, lint, and test, and specify input, output, and environment variables.
|
|
20
|
+
5. Configure the affected/changed range command in Turborepo/Nx. CI will run the affected packages first while retaining the backbone full verification entry.
|
|
21
|
+
6. Check package boundaries, circular dependencies, exports, peer dependencies and version policies before publishing the package.
|
|
22
22
|
|
|
23
|
-
##
|
|
23
|
+
## Tool selection
|
|
24
24
|
|
|
25
|
-
|
|
|
25
|
+
| Tools | Applicability | Features |
|
|
26
26
|
| ------------------ | ---- | -------------------------- |
|
|
27
|
-
| **pnpm workspace** |
|
|
28
|
-
| **Turborepo**
|
|
29
|
-
| **Nx**
|
|
27
|
+
| **pnpm workspace** | Basics | Dependency promotion, linking, script aggregation |
|
|
28
|
+
| **Turborepo** | Recommended | Caching, parallelism, dependency graph |
|
|
29
|
+
| **Nx** | Large | Incremental build, cloud cache, plug-in ecology |
|
|
30
30
|
|
|
31
|
-
##
|
|
31
|
+
## Directory structure
|
|
32
32
|
|
|
33
33
|
### pnpm + Turborepo
|
|
34
34
|
|
|
35
35
|
```
|
|
36
|
-
├── package.json
|
|
37
|
-
├── pnpm-workspace.yaml
|
|
38
|
-
├── turbo.json
|
|
36
|
+
├── package.json # Root package, workspace configuration
|
|
37
|
+
├── pnpm-workspace.yaml # workspace package list
|
|
38
|
+
├── turbo.json # Turborepo configuration
|
|
39
39
|
│
|
|
40
40
|
├── apps/
|
|
41
|
-
│
|
|
41
|
+
│ ├── web/ # Main application
|
|
42
42
|
│ │ ├── package.json
|
|
43
43
|
│ │ └── ...
|
|
44
|
-
│
|
|
45
|
-
│
|
|
44
|
+
│ ├── admin/ # Management background
|
|
45
|
+
│ └── docs/ # Documentation site
|
|
46
46
|
│
|
|
47
47
|
├── packages/
|
|
48
|
-
│
|
|
48
|
+
│ ├── ui/ # Shared UI components
|
|
49
49
|
│ │ ├── package.json
|
|
50
50
|
│ │ └── src/
|
|
51
|
-
│
|
|
52
|
-
│
|
|
53
|
-
│
|
|
51
|
+
│ ├── utils/ # Utility function
|
|
52
|
+
│ ├── config-eslint/ # Shared ESLint configuration
|
|
53
|
+
│ └── config-typescript/ # Shared TS configuration
|
|
54
54
|
│
|
|
55
|
-
└── tooling/
|
|
55
|
+
└── tooling/ # Build/test tools (optional)
|
|
56
56
|
└── scripts/
|
|
57
57
|
```
|
|
58
58
|
|
|
@@ -64,11 +64,11 @@ packages:
|
|
|
64
64
|
- "packages/*"
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
-
##
|
|
67
|
+
## Dependency management
|
|
68
68
|
|
|
69
|
-
-
|
|
70
|
-
-
|
|
71
|
-
-
|
|
69
|
+
- Internal packages use the `workspace:*` protocol
|
|
70
|
+
- The root `package.json` unifies some dependency versions and can be overridden by sub-packages
|
|
71
|
+
- Disable circular dependencies, check via `pnpm why`
|
|
72
72
|
|
|
73
73
|
```json
|
|
74
74
|
{
|
|
@@ -79,7 +79,7 @@ packages:
|
|
|
79
79
|
}
|
|
80
80
|
```
|
|
81
81
|
|
|
82
|
-
## Turborepo
|
|
82
|
+
## Turborepo task orchestration
|
|
83
83
|
|
|
84
84
|
```json
|
|
85
85
|
{
|
|
@@ -99,12 +99,12 @@ packages:
|
|
|
99
99
|
}
|
|
100
100
|
```
|
|
101
101
|
|
|
102
|
-
- `^build`
|
|
103
|
-
- `outputs`
|
|
104
|
-
- `inputs`
|
|
105
|
-
-
|
|
102
|
+
- `^build` means executing the build of dependent packages first
|
|
103
|
+
- `outputs` is used for cache hit judgment
|
|
104
|
+
- `inputs` should include source code, configuration, lock files and environment-related files; do not write the `.env` secret value into the cache key
|
|
105
|
+
- Remote caching should distinguish between trusted CI and local development to avoid uploading products containing sensitive information.
|
|
106
106
|
|
|
107
|
-
## Nx
|
|
107
|
+
## Nx task orchestration
|
|
108
108
|
|
|
109
109
|
```json
|
|
110
110
|
{
|
|
@@ -118,25 +118,25 @@ packages:
|
|
|
118
118
|
}
|
|
119
119
|
```
|
|
120
120
|
|
|
121
|
-
##
|
|
121
|
+
## Package naming
|
|
122
122
|
|
|
123
|
-
-
|
|
124
|
-
-
|
|
123
|
+
- Internal package: `@org/package-name` or `@repo/package-name`
|
|
124
|
+
- Publish to npm: follow the `@scope/name` specification
|
|
125
125
|
|
|
126
126
|
## Constraints
|
|
127
127
|
|
|
128
|
-
-
|
|
129
|
-
-
|
|
130
|
-
-
|
|
131
|
-
-
|
|
132
|
-
-
|
|
133
|
-
- CI cache
|
|
134
|
-
-
|
|
128
|
+
- Sub-packages are referenced through `workspace:*` and are not published to npm and then installed.
|
|
129
|
+
- Shared configurations (ESLint, TS) are placed in `packages/config-*`, and sub-packages extend
|
|
130
|
+
- The build order is determined by the dependency graph, without manually specifying irrelevant dependencies
|
|
131
|
+
- When executing `pnpm -r build` or `turbo run build` in the root directory, all packages will be built in order
|
|
132
|
+
- Disable circular dependencies, use `pnpm why` to check the dependency chain when adding a new package
|
|
133
|
+
- CI cache only caches dependent installation directories and task products, and does not cache unverified build status
|
|
134
|
+
- Affected builds cannot replace full verification before release; the trunk or release branch still requires complete quality control
|
|
135
135
|
|
|
136
136
|
## Expected Output
|
|
137
137
|
|
|
138
|
-
- Monorepo
|
|
139
|
-
- `pnpm-workspace.yaml`
|
|
140
|
-
-
|
|
141
|
-
-
|
|
142
|
-
- CI
|
|
138
|
+
- Monorepo directory structure is clear (`apps/` applications, `packages/` shared packages, `tooling/` tools)
|
|
139
|
+
- `pnpm-workspace.yaml` and `turbo.json` / `nx.json` are configured correctly
|
|
140
|
+
- Internal packages use `workspace:*` protocol, no circular dependencies
|
|
141
|
+
- Build, lint, and test tasks can be executed with one click through the root command, and the cache hit rate is high
|
|
142
|
+
- CI can distinguish between affected quick feedback and release full verification, and the cache configuration will not leak keys or hide dependency boundary issues
|