@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,27 +1,27 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: fec-component-testing
|
|
3
|
-
description: Use when authoring or reviewing frontend unit, component, or light integration tests close to UI code, including React Testing Library, Vue Test Utils, hooks/composables, props/emits, callbacks, accessible queries, user-event interactions, mocks, loading/error/empty states, and regression coverage. For layer planning, real-browser journeys, or existing validation failures, choose the matching testing or validation workflow first; Chinese triggers include
|
|
3
|
+
description: Use when authoring or reviewing frontend unit, component, or light integration tests close to UI code, including React Testing Library, Vue Test Utils, hooks/composables, props/emits, callbacks, accessible queries, user-event interactions, mocks, loading/error/empty states, and regression coverage. For layer planning, real-browser journeys, or existing validation failures, choose the matching testing or validation workflow first; Chinese triggers include component testing, Component unit testing, unit testing, lightweight integration testing.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
#Component testing
|
|
7
7
|
|
|
8
8
|
## Purpose
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Use tests close to the code and user behavior to verify pure logic, component contracts, and lightweight module collaboration to reduce refactoring and UI interaction regression.
|
|
11
11
|
|
|
12
12
|
## Procedure
|
|
13
13
|
|
|
14
|
-
### 1.
|
|
14
|
+
### 1. First determine the test level
|
|
15
15
|
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
16
|
+
- Unit testing: pure functions, hooks/composables, utils, state logic, schema.
|
|
17
|
+
- Component testing: props/emis, callbacks, user interaction, loading/error/empty, mock boundaries.
|
|
18
|
+
- Lightweight integration testing: form + API mock + Router/Store/Provider context.
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
The cross-page real browser process is offloaded to the E2E workflow; if the test layer selection is unclear, do the test layering planning first.
|
|
21
21
|
|
|
22
|
-
### 2.
|
|
22
|
+
### 2. Prioritize testing based on user-perceivable behavior
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
Each test keeps Arrange / Act / Assert clearly segmented: preparing data and rendering, performing user actions, asserting user-visible results or exposing contracts.
|
|
25
25
|
|
|
26
26
|
```tsx
|
|
27
27
|
import { render, screen } from "@testing-library/react";
|
|
@@ -41,7 +41,7 @@ test("submits the entered keyword", async () => {
|
|
|
41
41
|
});
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
### 3. Vue
|
|
44
|
+
### 3. Vue components use accessible queries or explicit text assertions
|
|
45
45
|
|
|
46
46
|
```ts
|
|
47
47
|
import { mount } from "@vue/test-utils";
|
|
@@ -58,9 +58,9 @@ test("emits logout when the logout item is clicked", async () => {
|
|
|
58
58
|
});
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
Prefer roles, labels, and visible text; only use `data-testid` when there is no stable semantics.
|
|
62
62
|
|
|
63
|
-
### 4.
|
|
63
|
+
### 4. Control mock boundaries
|
|
64
64
|
|
|
65
65
|
```ts
|
|
66
66
|
vi.mock("../api/users", () => ({
|
|
@@ -68,24 +68,24 @@ vi.mock("../api/users", () => ({
|
|
|
68
68
|
}));
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
-
-
|
|
72
|
-
-
|
|
73
|
-
-
|
|
74
|
-
-
|
|
75
|
-
-
|
|
76
|
-
-
|
|
71
|
+
- Mock network, time, routing and browser APIs.
|
|
72
|
+
- Do not mock the internal functions of the component under test.
|
|
73
|
+
- Only make light mocks of the basic components of the design system to retain accessible behaviors.
|
|
74
|
+
- Mock data should express the business scenario and not use arbitrary strings that only the test author can understand.
|
|
75
|
+
- Shared fixtures should remain readable, and complex objects should use builders to fill in default values; each test only covers the fields relevant to the scenario.
|
|
76
|
+
- When mocking the network, give priority to simulating user-visible results and error shapes, and do not copy back-end implementation details.
|
|
77
77
|
|
|
78
|
-
### 5.
|
|
78
|
+
### 5. Override key status
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
Each complex component covers at least:
|
|
81
81
|
|
|
82
|
-
-
|
|
83
|
-
-
|
|
82
|
+
- Default rendering.
|
|
83
|
+
- User interaction and callbacks.
|
|
84
84
|
- loading / empty / error。
|
|
85
|
-
-
|
|
86
|
-
-
|
|
85
|
+
- Permission or disabled status.
|
|
86
|
+
- Keyboard interaction and focus behavior (when applicable).
|
|
87
87
|
|
|
88
|
-
### 6.
|
|
88
|
+
### 6. Keep tests maintainable
|
|
89
89
|
|
|
90
90
|
```ts
|
|
91
91
|
function setup() {
|
|
@@ -96,24 +96,24 @@ function setup() {
|
|
|
96
96
|
}
|
|
97
97
|
```
|
|
98
98
|
|
|
99
|
-
|
|
99
|
+
Put the repetitive rendering logic into `setup`, but don't hide the core actions and assertions of the test.
|
|
100
100
|
|
|
101
|
-
### 7.
|
|
101
|
+
### 7. Regression testing proves the problem first
|
|
102
102
|
|
|
103
|
-
- Bug
|
|
104
|
-
-
|
|
105
|
-
-
|
|
103
|
+
- Bug fixes should be written first to create the smallest test that can reproduce the failure.
|
|
104
|
+
- Reasons for failure should point to user behavior or public contracts, not import errors, test environments, or wait methods.
|
|
105
|
+
- Keep regression testing after fixing to avoid leaving verification only in manual steps.
|
|
106
106
|
|
|
107
107
|
## Constraints
|
|
108
108
|
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
-
-
|
|
112
|
-
-
|
|
113
|
-
-
|
|
114
|
-
-
|
|
115
|
-
-
|
|
109
|
+
- Avoid testing implementation details such as internal state names, private function calls, DOM hierarchy snapshots.
|
|
110
|
+
- Do not use snapshot as the main assertion for interactive components; it can only assist in checking stable static output.
|
|
111
|
+
- Use `findBy*` or `waitFor` for asynchronous assertions, do not use fixed delays.
|
|
112
|
+
- Test names should describe user scenarios, not function names.
|
|
113
|
+
- Component testing is not a replacement for E2E; routing, real-browser compatibility, and cross-page flows still require E2E.
|
|
114
|
+
- Do not copy component implementation logic in tests; otherwise the test will pass with the wrong implementation.
|
|
115
|
+
- No mutable fixtures, global store or fake timer state shared between tests; each use case has independent setup and cleanup.
|
|
116
116
|
|
|
117
117
|
## Expected Output
|
|
118
118
|
|
|
119
|
-
|
|
119
|
+
Produce test files in the same directory as the component or in the directory agreed upon by the project, covering core interactions, status and regression scenarios. During verification, run the existing test command of the project to confirm that the failure information can be located to user behavior or component contract.
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: fec-data-fetching
|
|
3
|
-
description: Use when implementing or reviewing frontend server-state flows: typed queries, request caching, invalidation, mutations, optimistic updates, infinite queries, prefetch, SSR hydration, or API-layer integration. Do not use for local UI state or Service Worker caching; Chinese triggers include
|
|
3
|
+
description: Use when implementing or reviewing frontend server-state flows: typed queries, request caching, invalidation, mutations, optimistic updates, infinite queries, prefetch, SSR hydration, or API-layer integration. Do not use for local UI state or Service Worker caching; Chinese triggers include data fetch, cache, optimistic updates.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Server State
|
|
6
|
+
# Server State data acquisition
|
|
7
7
|
|
|
8
8
|
## Purpose
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Establish clear data acquisition, caching, invalidation and submission boundaries for front-end server state to avoid request state being scattered among page components.
|
|
11
11
|
|
|
12
12
|
## Procedure
|
|
13
13
|
|
|
14
|
-
1.
|
|
15
|
-
2.
|
|
16
|
-
3.
|
|
17
|
-
4. API
|
|
18
|
-
5. mutation
|
|
14
|
+
1. Determine the source of the state: use the request caching scheme when it comes from the server and needs caching, deduplication, refreshing, paging or mutation; use component state or store for purely local UI state.
|
|
15
|
+
2. First use the existing data acquisition library of the project; when adding dependencies, you can consider TanStack Query for React/Vue/Solid/Svelte, or you can also use SWR, Nuxt/Nitro data acquisition or project encapsulation.
|
|
16
|
+
3. Stable design cache key/query key: The structure contains entities, actions and all parameters that affect the results.
|
|
17
|
+
4. The API function remains a pure request function, and the data hook/composable is responsible for cache, select, loading/error/empty status.
|
|
18
|
+
5. Invalidation after mutation succeeds; use optimistic update when immediate feedback is needed and rollback when failure occurs.
|
|
19
19
|
|
|
20
20
|
## React Quick Start
|
|
21
21
|
|
|
@@ -45,18 +45,18 @@ export function useCreateUser() {
|
|
|
45
45
|
}
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
##
|
|
48
|
+
## Detailed reference
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
Load [references/query-patterns.md](references/query-patterns.md) when it comes to whether you need a query library, QueryClient default configuration, Vue adapter, optimistic updates, infinite scroll queries, prefetching, SSR hydration, and API layer integration.
|
|
51
51
|
|
|
52
52
|
## Constraints
|
|
53
53
|
|
|
54
|
-
-
|
|
55
|
-
- `staleTime`
|
|
56
|
-
-
|
|
57
|
-
-
|
|
58
|
-
- SSR/SSG
|
|
54
|
+
- The same data must reuse the same cache key/query key; missing parameters will cause cache string reading.
|
|
55
|
+
- If `staleTime` is too long, old data will be displayed, and if it is too short, it will cause frequent requests.
|
|
56
|
+
- The request cache library does not manage local UI state; do not put modal and input box values into the query cache.
|
|
57
|
+
- Optimistic updates must save snapshots and rollback on failure.
|
|
58
|
+
- SSR/SSG scenarios must use framework-supported prefetching, hydration, or server-side data boundaries.
|
|
59
59
|
|
|
60
60
|
## Expected Output
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
The data acquisition layer has loading/error/empty/data status, repeated requests are automatically deduplicated, the cache is correctly invalidated or rolled back after mutation, and the boundary between the API layer and the UI layer is clear.
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
# Server State
|
|
1
|
+
# Server State data acquisition mode
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## First determine whether a query library is needed
|
|
4
4
|
|
|
5
|
-
-
|
|
6
|
-
-
|
|
7
|
-
-
|
|
5
|
+
- Simple static requests, one-time submissions, or pages with sufficient expression in the existing framework loader do not need to introduce the query library by default.
|
|
6
|
+
- When cross-component caching, deduplication, background refresh, paging, optimistic updates, prefetching or SSR hydration are required, use TanStack Query, SWR, Nuxt data acquisition or the project's existing request caching solution.
|
|
7
|
+
- The query library only manages server state and does not replace local UI state, form state, permission judgment or Service Worker cache.
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Selection reference
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
First, use the existing request layer and caching solution in the warehouse; when adding new dependencies, choose based on the framework and complexity.
|
|
12
12
|
|
|
13
|
-
|
|
|
13
|
+
| Scenarios | Alternative solutions | Notes |
|
|
14
14
|
| --- | --- | --- |
|
|
15
|
-
| React server state | TanStack Query / SWR /
|
|
16
|
-
| Vue server state | TanStack Query Vue adapter / VueUse / Nuxt `useFetch` /
|
|
17
|
-
| Solid / Svelte /
|
|
18
|
-
|
|
|
19
|
-
| SSR / SSG |
|
|
15
|
+
| React server state | TanStack Query / SWR / Project existing package | TanStack Query is suitable for mutation, invalidation and infinite queries; SWR is suitable for lightweight read caching. |
|
|
16
|
+
| Vue server state | TanStack Query Vue adapter / VueUse / Nuxt `useFetch` / Project existing package | Don’t let Vue projects copy React-only hook examples. |
|
|
17
|
+
| Solid / Svelte / Cross-framework | TanStack Query corresponds to the existing resource layer of the adapter or project | The cache key, staleTime, and mutation rollback principles are consistent. |
|
|
18
|
+
| Simple page requests | Framework loaders, lightweight requests within components, or API composable | Still have to handle loading/error/empty and cancellation or expiration responses. |
|
|
19
|
+
| SSR / SSG | Framework prefetching, hydration or server-side data boundaries | Ensure that the server key is consistent with the client key to avoid repeated requests and hydration mismatches. |
|
|
20
20
|
|
|
21
|
-
##
|
|
21
|
+
## Universal Boundary
|
|
22
22
|
|
|
23
|
-
- API
|
|
24
|
-
- cache key/query key
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
23
|
+
- API functions are only responsible for requesting, parsing and error normalization, and do not include UI toast, loading or caching logic.
|
|
24
|
+
- The cache key/query key must contain all parameters that affect the response.
|
|
25
|
+
- Mutation fails by entity or list after success; optimistic update must save the snapshot first and roll back when it fails.
|
|
26
|
+
- Infinite queries only handle data paging; DOM virtualization is handled by the list virtualization process.
|
|
27
|
+
- Prefetching must have a clear user path or above-the-fold revenue, and do not request all possible data in advance.
|
|
28
28
|
|
|
29
|
-
## QueryClient
|
|
29
|
+
## QueryClient default configuration
|
|
30
30
|
|
|
31
31
|
```tsx
|
|
32
32
|
const queryClient = new QueryClient({
|
|
@@ -43,11 +43,11 @@ const queryClient = new QueryClient({
|
|
|
43
43
|
|
|
44
44
|
## Query Key
|
|
45
45
|
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
46
|
+
- Recommended: `["users", "list", { page, status }]`
|
|
47
|
+
- Details: `["users", "detail", userId]`
|
|
48
|
+
- All parameters that affect the request result must enter key.
|
|
49
49
|
|
|
50
|
-
##
|
|
50
|
+
## Optimistic update
|
|
51
51
|
|
|
52
52
|
```tsx
|
|
53
53
|
const mutation = useMutation({
|
|
@@ -82,9 +82,9 @@ const feed = useInfiniteQuery({
|
|
|
82
82
|
});
|
|
83
83
|
```
|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
The virtual list scenario is designed to separate data paging and DOM virtualization.
|
|
86
86
|
|
|
87
|
-
## API
|
|
87
|
+
## API layer integration
|
|
88
88
|
|
|
89
89
|
```ts
|
|
90
90
|
export async function getUserList(params: GetUserListParams): Promise<GetUserListResponse> {
|
|
@@ -100,4 +100,4 @@ export function useUsers(params: GetUserListParams) {
|
|
|
100
100
|
}
|
|
101
101
|
```
|
|
102
102
|
|
|
103
|
-
API
|
|
103
|
+
API functions do not contain UI toast, loading or caching logic.
|
|
@@ -1,157 +1,157 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: fec-debug-framework
|
|
3
|
-
description: Use when diagnosing frontend build failures, runtime errors, UI anomalies, API/data problems, white screens, request failures, or unexplained production exceptions; Chinese triggers include
|
|
3
|
+
description: Use when diagnosing frontend build failures, runtime errors, UI anomalies, API/data problems, white screens, request failures, or unexplained production exceptions; Chinese triggers include debugging, debug, troubleshooting, positioning, error reporting, exceptions, white screens, request failures.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# Front-end diagnostic framework
|
|
7
7
|
|
|
8
8
|
## Purpose
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Use an evidence-driven triage, collection, hypothesis, verification, and remediation process to locate front-end faults and avoid relying on intuition to expand the scope of changes.
|
|
11
11
|
|
|
12
12
|
## Procedure
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
All front-end problem diagnosis follows a unified process:
|
|
15
15
|
|
|
16
|
-
### Step 1:
|
|
16
|
+
### Step 1: Classify
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
Identify problem type and scope of impact:
|
|
19
19
|
|
|
20
|
-
|
|
|
20
|
+
| Type | Judgment basis | Diagnosis entrance |
|
|
21
21
|
| ------- | ---------------------------- | -------------- |
|
|
22
|
-
| build
|
|
23
|
-
| runtime |
|
|
24
|
-
| ui
|
|
25
|
-
| api
|
|
22
|
+
| build | Command exit is non-zero, stderr has error | → Build module |
|
|
23
|
+
| runtime | Console exception, white screen, function unavailable | → Runtime module |
|
|
24
|
+
| ui | Visual deviation, interaction not as expected | → UI module |
|
|
25
|
+
| api | Request status code exception, data inconsistency | → API module |
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
Cross-type problems (such as API failure leading to UI exceptions) start with the most superficial symptoms and drill down layer by layer.
|
|
28
28
|
|
|
29
|
-
### Step 2:
|
|
29
|
+
### Step 2: Collect
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
Collect evidence by type (specific strategies for each module, see below).
|
|
32
32
|
|
|
33
|
-
### Step 3:
|
|
33
|
+
### Step 3: Hypothesize
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
Propose possible root causes based on evidence, ranked by likelihood:
|
|
36
36
|
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
37
|
+
- Every hypothesis must be testable (have clear verification methods)
|
|
38
|
+
- Keep at most 3 hypotheses to avoid divergence
|
|
39
|
+
- Format: "Because X leads to Y, which can be verified by Z"
|
|
40
40
|
|
|
41
|
-
### Step 4:
|
|
41
|
+
### Step 4: Verify
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
Test the hypotheses one by one:
|
|
44
44
|
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
45
|
+
- Start with the most likely hypothesis
|
|
46
|
+
- Only change one variable at a time
|
|
47
|
+
- Verification result record: confirmed / falsified / pending
|
|
48
|
+
- If all assumptions are falsified, return to Step 2 and collect again.
|
|
49
49
|
|
|
50
|
-
### Step 5:
|
|
50
|
+
### Step 5: Fix & Validate
|
|
51
51
|
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
-
|
|
55
|
-
-
|
|
52
|
+
- Apply minimal fixes
|
|
53
|
+
- Run affected verification commands
|
|
54
|
+
- Confirmed no regression
|
|
55
|
+
- Output repair report
|
|
56
56
|
|
|
57
57
|
---
|
|
58
58
|
|
|
59
|
-
##
|
|
59
|
+
## Diagnostic module
|
|
60
60
|
|
|
61
|
-
### Build
|
|
61
|
+
### Build module
|
|
62
62
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
**Collect**: Run minimal failing commands, capture full stderr/stdout
|
|
64
|
+
**Assumptions**: Grouped by error type (type error, import failure, configuration resolution, missing dependency), match known patterns
|
|
65
|
+
**Verification**: Fix a type of root cause → rerun the command → confirm that errors are reduced
|
|
66
|
+
**Special handling**:
|
|
67
67
|
|
|
68
|
-
-
|
|
69
|
-
-
|
|
70
|
-
-
|
|
71
|
-
-
|
|
72
|
-
- CI
|
|
68
|
+
- Collect evidence for dependency version, peer dependency, ESM/CJS, and lockfile related failures first as build compatibility issues
|
|
69
|
+
- Log package manager, Node version, lockfile diff, related package version and full error log
|
|
70
|
+
- No longer upgrade dependencies, manually edit lockfiles when evidence is lacking, or mix dependency migrations with normal debug fixes in the same batch of changes
|
|
71
|
+
- If the task goal itself is version upgrade, CVE repair or lockfile risk review, it should be transferred to the dependency upgrade workflow
|
|
72
|
+
- CI exclusive failure check Node version, package manager, environment variable differences
|
|
73
73
|
|
|
74
|
-
### Runtime
|
|
74
|
+
### Runtime module
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
**Collect**:
|
|
77
77
|
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
-
|
|
81
|
-
-
|
|
78
|
+
- Recurrence path (sequence of user operations)
|
|
79
|
+
- Console errors and stack
|
|
80
|
+
- Component rendering tree status (check whether key components are mounted correctly)
|
|
81
|
+
- Relevant store/state snapshot
|
|
82
82
|
|
|
83
|
-
|
|
83
|
+
**Assumptions**:
|
|
84
84
|
|
|
85
|
-
-
|
|
86
|
-
-
|
|
87
|
-
-
|
|
85
|
+
- Stack reverse tracing: trace back from the exception location to the trigger source
|
|
86
|
+
- State flow analysis: Check whether state changes are as expected
|
|
87
|
+
- Life cycle analysis: whether uninitialized data is accessed at the wrong time
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
**Verification**:
|
|
90
90
|
|
|
91
|
-
-
|
|
92
|
-
-
|
|
93
|
-
-
|
|
91
|
+
- Add temporary log confirmation status value
|
|
92
|
+
- Add assertions on suspicious paths
|
|
93
|
+
- Recurrence path verification fix
|
|
94
94
|
|
|
95
|
-
### UI
|
|
95
|
+
### UI module
|
|
96
96
|
|
|
97
|
-
|
|
97
|
+
**Collect**:
|
|
98
98
|
|
|
99
|
-
-
|
|
100
|
-
- DOM
|
|
101
|
-
-
|
|
102
|
-
-
|
|
99
|
+
- Current screenshot vs desired effect
|
|
100
|
+
- DOM structure check (whether the element exists and whether the level is correct)
|
|
101
|
+
- Computed style checks (actual applied CSS values)
|
|
102
|
+
- Responsive breakpoint testing
|
|
103
103
|
|
|
104
|
-
|
|
104
|
+
**Assumptions**:
|
|
105
105
|
|
|
106
|
-
- CSS
|
|
107
|
-
-
|
|
108
|
-
-
|
|
109
|
-
-
|
|
106
|
+
- CSS specificity conflict (selector weight is not enough to be overridden)
|
|
107
|
+
- Component state mismatch (props/state not passed correctly)
|
|
108
|
+
- Layout model problem (flex/grid configuration error)
|
|
109
|
+
- Missing responsive breakpoints
|
|
110
110
|
|
|
111
|
-
|
|
111
|
+
**Verification**:
|
|
112
112
|
|
|
113
|
-
-
|
|
114
|
-
-
|
|
115
|
-
-
|
|
113
|
+
- Browser DevTools real-time adjustment verification
|
|
114
|
+
- Isolated component testing (excluding external style interference)
|
|
115
|
+
- Multiple breakpoints to verify one by one
|
|
116
116
|
|
|
117
|
-
### API
|
|
117
|
+
### API module
|
|
118
118
|
|
|
119
|
-
|
|
119
|
+
**Collect**:
|
|
120
120
|
|
|
121
|
-
-
|
|
122
|
-
-
|
|
123
|
-
-
|
|
124
|
-
-
|
|
121
|
+
- Request URL, method, headers, body
|
|
122
|
+
- Respond to status, headers, body
|
|
123
|
+
- Network waterfall timing
|
|
124
|
+
- Cache data in related store/state
|
|
125
125
|
|
|
126
|
-
|
|
126
|
+
**Assumptions**:
|
|
127
127
|
|
|
128
|
-
-
|
|
129
|
-
-
|
|
130
|
-
-
|
|
131
|
-
-
|
|
128
|
+
- Request link hop-by-hop inspection (URL → Middleware → Interceptor → Server)
|
|
129
|
+
- Data conversion checks (response parsing, type mapping)
|
|
130
|
+
- Cache policy check (expiration, invalidation, race condition)
|
|
131
|
+
- Concurrent request race condition (race condition)
|
|
132
132
|
|
|
133
|
-
|
|
133
|
+
**Verification**:
|
|
134
134
|
|
|
135
|
-
- curl
|
|
136
|
-
-
|
|
137
|
-
-
|
|
135
|
+
- curl independent reproduction (excluding front-end interference)
|
|
136
|
+
- Mock layer by layer to locate the problem level
|
|
137
|
+
- End-to-end request validation fixes
|
|
138
138
|
|
|
139
139
|
---
|
|
140
140
|
|
|
141
|
-
##
|
|
141
|
+
## Detailed reference
|
|
142
142
|
|
|
143
|
-
|
|
143
|
+
When writing a diagnostic report, load [references/report-template.md](references/report-template.md).
|
|
144
144
|
|
|
145
145
|
## Constraints
|
|
146
146
|
|
|
147
|
-
-
|
|
148
|
-
-
|
|
149
|
-
-
|
|
150
|
-
-
|
|
151
|
-
-
|
|
147
|
+
- Don't guess at root cause when evidence is lacking
|
|
148
|
+
- Not "fixed" by turning off rules, removing tests, or reducing type safety
|
|
149
|
+
- Change only one variable at a time to test your hypothesis
|
|
150
|
+
- Do not expand the scope of changes before verification
|
|
151
|
+
- The same hypothesis fails verification 3 times in a row, stops and reports blocking
|
|
152
152
|
|
|
153
153
|
## Expected Output
|
|
154
154
|
|
|
155
|
-
-
|
|
156
|
-
-
|
|
157
|
-
-
|
|
155
|
+
- The diagnostic report is saved as `reports/debug-YYYY-MM-DD-HHmmss.md`
|
|
156
|
+
- The report includes issue type, key evidence, hypothesis verification records, root cause, fix content, verification results and remaining risk
|
|
157
|
+
- Build/runtime/ui/api problems can explain the reproduction path, verification command or next blocking point
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Diagnostic report template
|
|
2
2
|
|
|
3
3
|
```markdown
|
|
4
|
-
#
|
|
4
|
+
# Front-end diagnostic report
|
|
5
5
|
|
|
6
|
-
>
|
|
7
|
-
>
|
|
8
|
-
>
|
|
6
|
+
> Generation time: YYYY-MM-DD HH:mm
|
|
7
|
+
> Question type: build/runtime/ui/api
|
|
8
|
+
> Scope of influence: page, feature, user group or environment
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## Problem description
|
|
11
11
|
|
|
12
|
-
-
|
|
13
|
-
-
|
|
12
|
+
- Phenomenon reported or observed by users
|
|
13
|
+
- First appearance time, environment, branch or version
|
|
14
14
|
|
|
15
|
-
##
|
|
15
|
+
## Reproduction path
|
|
16
16
|
|
|
17
|
-
1.
|
|
18
|
-
2.
|
|
19
|
-
3.
|
|
17
|
+
1. Operation steps or trigger commands
|
|
18
|
+
2. Desired results
|
|
19
|
+
3. Actual results
|
|
20
20
|
|
|
21
|
-
##
|
|
21
|
+
## Evidence collected
|
|
22
22
|
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
23
|
+
- log/stderr/console stack
|
|
24
|
+
- Screenshot, DOM, style, network request or trace
|
|
25
|
+
- Related configurations, dependency versions, environment variables or status snapshots
|
|
26
26
|
|
|
27
|
-
##
|
|
27
|
+
## Hypothesis and Verification
|
|
28
28
|
|
|
29
|
-
|
|
|
29
|
+
| Hypothesis | Verification Method | Results |
|
|
30
30
|
| --- | --- | --- |
|
|
31
|
-
|
|
|
31
|
+
| Because X, causes Y | Verified by Z | Confirmed / Falsified / Pending |
|
|
32
32
|
|
|
33
|
-
##
|
|
33
|
+
## Root cause
|
|
34
34
|
|
|
35
|
-
-
|
|
36
|
-
-
|
|
35
|
+
- Final confirmed root cause
|
|
36
|
+
- Why the existing evidence supports this conclusion
|
|
37
37
|
|
|
38
|
-
##
|
|
38
|
+
## Fix content
|
|
39
39
|
|
|
40
|
-
-
|
|
41
|
-
-
|
|
40
|
+
- Modified files and behavior
|
|
41
|
+
- Why this is a minimal effective fix
|
|
42
42
|
|
|
43
|
-
##
|
|
43
|
+
## Verification results
|
|
44
44
|
|
|
45
|
-
-
|
|
46
|
-
-
|
|
45
|
+
- Executed command, manual path or browser verification
|
|
46
|
+
- Observed results after fix
|
|
47
47
|
|
|
48
|
-
##
|
|
48
|
+
## Residual risk
|
|
49
49
|
|
|
50
|
-
-
|
|
51
|
-
-
|
|
50
|
+
- Uncovered borders
|
|
51
|
+
- Areas of possible return
|
|
52
52
|
|
|
53
|
-
##
|
|
53
|
+
## Next step
|
|
54
54
|
|
|
55
|
-
-
|
|
55
|
+
- Requires user decisions, follow-up tasks or monitoring items
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
After the diagnosis is completed, save the report to `reports/debug-YYYY-MM-DD-HHmmss.md` and inform the user of the report path.
|