@bovinphang/frontend-craft 2.6.0 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +3 -3
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +72 -1
- package/CHANGELOG.zh-CN.md +71 -1
- package/README.md +10 -6
- package/README.openclaw.md +100 -42
- package/README.openclaw.zh-CN.md +100 -42
- package/README.zh-CN.md +10 -6
- package/agents/fec-architect.md +70 -70
- package/agents/fec-code-reviewer.md +82 -82
- package/agents/fec-debugger.md +20 -20
- package/agents/fec-design-token-mapper.md +36 -36
- package/agents/fec-doc-updater.md +13 -13
- package/agents/fec-e2e-runner.md +45 -45
- package/agents/fec-figma-implementer.md +59 -59
- package/agents/fec-performance-optimizer.md +128 -128
- package/agents/fec-refactor-cleaner.md +14 -14
- package/agents/fec-security-reviewer.md +66 -67
- package/agents/fec-test-planner.md +27 -27
- package/agents/fec-typescript-reviewer.md +88 -88
- package/agents/fec-ui-checker.md +74 -74
- package/commands/fec-debug.md +19 -19
- package/commands/fec-doc-sync.md +11 -11
- package/commands/fec-init.md +37 -38
- package/commands/fec-plan.md +58 -58
- package/commands/fec-refactor-clean.md +11 -11
- package/commands/fec-review.md +41 -41
- package/commands/fec-scaffold.md +41 -41
- package/commands/fec-tdd.md +13 -13
- package/dist/bin/frontend-craft.js +29 -27
- package/docs/example-prompts.md +84 -69
- package/docs/ja-JP/README.md +56 -52
- package/docs/ko-KR/README.md +45 -41
- package/docs/project-structure.md +19 -7
- package/docs/superpowers/plans/2026-05-29-fec-debug.md +491 -0
- package/docs/superpowers/specs/2026-05-29-fec-debug-design.md +340 -0
- package/docs/zh-CN/example-prompts.md +84 -69
- package/docs/zh-CN/project-structure.md +14 -5
- package/docs/zh-TW/README.md +33 -29
- package/localized/zh-CN/agents/fec-architect.md +125 -0
- package/localized/zh-CN/agents/fec-code-reviewer.md +152 -0
- package/localized/zh-CN/agents/fec-debugger.md +44 -0
- package/localized/zh-CN/agents/fec-design-token-mapper.md +75 -0
- package/localized/zh-CN/agents/fec-doc-updater.md +30 -0
- package/localized/zh-CN/agents/fec-e2e-runner.md +107 -0
- package/localized/zh-CN/agents/fec-figma-implementer.md +104 -0
- package/localized/zh-CN/agents/fec-performance-optimizer.md +293 -0
- package/localized/zh-CN/agents/fec-refactor-cleaner.md +32 -0
- package/localized/zh-CN/agents/fec-security-reviewer.md +116 -0
- package/localized/zh-CN/agents/fec-test-planner.md +50 -0
- package/localized/zh-CN/agents/fec-typescript-reviewer.md +142 -0
- package/localized/zh-CN/agents/fec-ui-checker.md +120 -0
- package/localized/zh-CN/commands/fec-debug.md +30 -0
- package/localized/zh-CN/commands/fec-doc-sync.md +19 -0
- package/localized/zh-CN/commands/fec-init.md +70 -0
- package/localized/zh-CN/commands/fec-plan.md +94 -0
- package/localized/zh-CN/commands/fec-refactor-clean.md +19 -0
- package/localized/zh-CN/commands/fec-review.md +66 -0
- package/localized/zh-CN/commands/fec-scaffold.md +205 -0
- package/localized/zh-CN/commands/fec-tdd.md +21 -0
- package/localized/zh-CN/skills/TEMPLATE.md +155 -0
- package/localized/zh-CN/skills/eval_queries.json +1013 -0
- package/localized/zh-CN/skills/fec-accessibility-check/SKILL.md +39 -0
- package/localized/zh-CN/skills/fec-accessibility-check/references/report-template.md +23 -0
- package/localized/zh-CN/skills/fec-accessibility-check/references/screen-reader-testing.md +33 -0
- package/localized/zh-CN/skills/fec-alchemy/SKILL.md +74 -0
- package/localized/zh-CN/skills/fec-alchemy/assets/absorption-plan-template.md +47 -0
- package/localized/zh-CN/skills/fec-alchemy/assets/intake-template.md +55 -0
- package/localized/zh-CN/skills/fec-alchemy/assets/review-checklist.md +31 -0
- package/localized/zh-CN/skills/fec-alchemy/references/methodology.md +94 -0
- package/localized/zh-CN/skills/fec-alchemy/references/originality-and-licensing.md +57 -0
- package/localized/zh-CN/skills/fec-api-integration/SKILL.md +78 -0
- package/localized/zh-CN/skills/fec-api-integration/references/integration-patterns.md +80 -0
- package/localized/zh-CN/skills/fec-backend-requirements-handoff/SKILL.md +45 -0
- package/localized/zh-CN/skills/fec-browser-storage/SKILL.md +34 -0
- package/localized/zh-CN/skills/fec-browser-storage/references/storage-patterns.md +65 -0
- package/localized/zh-CN/skills/fec-canvas-threejs/SKILL.md +66 -0
- package/localized/zh-CN/skills/fec-canvas-threejs/references/rendering-patterns.md +67 -0
- package/localized/zh-CN/skills/fec-canvas-threejs/references/shader-webgl-patterns.md +67 -0
- package/localized/zh-CN/skills/fec-code-review/SKILL.md +143 -0
- package/localized/zh-CN/skills/fec-code-review/references/report-template.md +29 -0
- package/localized/zh-CN/skills/fec-component-testing/SKILL.md +119 -0
- package/localized/zh-CN/skills/fec-data-fetching/SKILL.md +62 -0
- package/localized/zh-CN/skills/fec-data-fetching/references/query-patterns.md +103 -0
- package/localized/zh-CN/skills/fec-debug-framework/SKILL.md +157 -0
- package/localized/zh-CN/skills/fec-debug-framework/references/report-template.md +58 -0
- package/localized/zh-CN/skills/fec-dependency-upgrade/SKILL.md +34 -0
- package/localized/zh-CN/skills/fec-dependency-upgrade/references/dependency-upgrade-workflow.md +56 -0
- package/localized/zh-CN/skills/fec-doc-sync/SKILL.md +39 -0
- package/localized/zh-CN/skills/fec-drawio-studio/SKILL.md +73 -0
- package/localized/zh-CN/skills/fec-drawio-studio/data/THIRD_PARTY_NOTICES.md +10 -0
- package/localized/zh-CN/skills/fec-drawio-studio/data/brand-icons.json +878 -0
- package/localized/zh-CN/skills/fec-drawio-studio/data/shape-index.json +83570 -0
- package/localized/zh-CN/skills/fec-drawio-studio/references/data-residency.md +27 -0
- package/localized/zh-CN/skills/fec-drawio-studio/references/diagram-patterns.md +60 -0
- package/localized/zh-CN/skills/fec-drawio-studio/references/flowchart-quality.md +49 -0
- package/localized/zh-CN/skills/fec-drawio-studio/references/layout-and-export.md +72 -0
- package/localized/zh-CN/skills/fec-drawio-studio/references/troubleshooting.md +29 -0
- package/localized/zh-CN/skills/fec-drawio-studio/references/xml-and-mermaid.md +58 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/brand-symbols.mjs +99 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/diagram-lint.mjs +205 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/diagram-url.mjs +102 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/drawio-export.mjs +134 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/layout-graph.mjs +107 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/png-embed-fix.mjs +26 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-go-packages.mjs +36 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-js-modules.mjs +52 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-python-classes.mjs +30 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-python-modules.mjs +55 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-rust-modules.mjs +35 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-ts-modules.mjs +7 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/shape-query.mjs +121 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/studio-core.mjs +139 -0
- package/localized/zh-CN/skills/fec-drawio-studio/styles/built-in/corporate.json +49 -0
- package/localized/zh-CN/skills/fec-drawio-studio/styles/built-in/default.json +49 -0
- package/localized/zh-CN/skills/fec-drawio-studio/styles/built-in/handdrawn.json +49 -0
- package/localized/zh-CN/skills/fec-drawio-studio/styles/schema.json +112 -0
- package/localized/zh-CN/skills/fec-e2e-testing/SKILL.md +42 -0
- package/localized/zh-CN/skills/fec-e2e-testing/references/e2e-ci-reporting.md +62 -0
- package/localized/zh-CN/skills/fec-e2e-testing/references/e2e-special-scenarios.md +52 -0
- package/localized/zh-CN/skills/fec-e2e-testing/references/e2e-visual-regression.md +60 -0
- package/localized/zh-CN/skills/fec-e2e-testing/references/playwright-patterns.md +95 -0
- package/localized/zh-CN/skills/fec-form-handling/SKILL.md +76 -0
- package/localized/zh-CN/skills/fec-form-handling/references/advanced-form-patterns.md +101 -0
- package/localized/zh-CN/skills/fec-image-generation/SKILL.md +80 -0
- package/localized/zh-CN/skills/fec-image-generation/assets/interactive-diagram.html +371 -0
- package/localized/zh-CN/skills/fec-image-generation/references/artifact-routing.md +80 -0
- package/localized/zh-CN/skills/fec-image-generation/references/diagram-workflows.md +74 -0
- package/localized/zh-CN/skills/fec-image-generation/references/html-technical-diagrams.md +236 -0
- package/localized/zh-CN/skills/fec-image-generation/references/png-qa-autofix.md +30 -0
- package/localized/zh-CN/skills/fec-image-generation/scripts/export-diagram.mjs +364 -0
- package/localized/zh-CN/skills/fec-image-generation/scripts/interactive-diagram-server.mjs +654 -0
- package/localized/zh-CN/skills/fec-image-generation/scripts/png-qa.mjs +431 -0
- package/localized/zh-CN/skills/fec-image-generation/scripts/tech-diagram-render.mjs +1397 -0
- package/localized/zh-CN/skills/fec-implement-from-design/SKILL.md +129 -0
- package/localized/zh-CN/skills/fec-implement-from-design/references/design-plan-template.md +36 -0
- package/localized/zh-CN/skills/fec-legacy-to-modern-migration/SKILL.md +46 -0
- package/localized/zh-CN/skills/fec-legacy-to-modern-migration/references/migration-execution-checklist.md +110 -0
- package/localized/zh-CN/skills/fec-legacy-to-modern-migration/references/migration-report-template.md +41 -0
- package/localized/zh-CN/skills/fec-legacy-to-modern-migration/references/migration-strategy-and-mapping.md +48 -0
- package/localized/zh-CN/skills/fec-legacy-web-standard/SKILL.md +35 -0
- package/localized/zh-CN/skills/fec-legacy-web-standard/references/legacy-patterns.md +85 -0
- package/localized/zh-CN/skills/fec-list-virtualization/SKILL.md +34 -0
- package/localized/zh-CN/skills/fec-list-virtualization/references/virtualization-patterns.md +80 -0
- package/localized/zh-CN/skills/fec-monorepo-project-standard/SKILL.md +142 -0
- package/localized/zh-CN/skills/fec-motion-interaction/SKILL.md +73 -0
- package/localized/zh-CN/skills/fec-motion-interaction/references/motion-patterns.md +112 -0
- package/localized/zh-CN/skills/fec-nextjs-project-standard/SKILL.md +123 -0
- package/localized/zh-CN/skills/fec-nuxt-project-standard/SKILL.md +122 -0
- package/localized/zh-CN/skills/fec-performance-optimization/SKILL.md +80 -0
- package/localized/zh-CN/skills/fec-performance-optimization/references/framework-performance-patterns.md +38 -0
- package/localized/zh-CN/skills/fec-performance-optimization/references/report-template.md +59 -0
- package/localized/zh-CN/skills/fec-pwa-implementation/SKILL.md +35 -0
- package/localized/zh-CN/skills/fec-pwa-implementation/references/manifest-and-icons.md +53 -0
- package/localized/zh-CN/skills/fec-pwa-implementation/references/service-worker-workbox.md +68 -0
- package/localized/zh-CN/skills/fec-react-project-standard/SKILL.md +91 -0
- package/localized/zh-CN/skills/fec-react-project-standard/references/react-performance-patterns.md +35 -0
- package/localized/zh-CN/skills/fec-react-project-standard/references/react-project-structure.md +197 -0
- package/localized/zh-CN/skills/fec-react-project-standard/references/react-quality-patterns.md +131 -0
- package/localized/zh-CN/skills/fec-react-project-standard/references/react-runtime-patterns.md +293 -0
- package/localized/zh-CN/skills/fec-refactor-clean/SKILL.md +51 -0
- package/localized/zh-CN/skills/fec-refactor-clean/references/report-template.md +42 -0
- package/localized/zh-CN/skills/fec-responsive-layout/SKILL.md +34 -0
- package/localized/zh-CN/skills/fec-responsive-layout/references/responsive-layout-patterns.md +70 -0
- package/localized/zh-CN/skills/fec-route-protection/SKILL.md +135 -0
- package/localized/zh-CN/skills/fec-security-review/SKILL.md +38 -0
- package/localized/zh-CN/skills/fec-security-review/references/report-template.md +27 -0
- package/localized/zh-CN/skills/fec-security-review/references/security-checklist.md +64 -0
- package/localized/zh-CN/skills/fec-source-driven-development/SKILL.md +87 -0
- package/localized/zh-CN/skills/fec-state-management/SKILL.md +140 -0
- package/localized/zh-CN/skills/fec-state-management/references/state-patterns.md +109 -0
- package/localized/zh-CN/skills/fec-storybook-component-doc/SKILL.md +37 -0
- package/localized/zh-CN/skills/fec-storybook-component-doc/references/story-patterns.md +118 -0
- package/localized/zh-CN/skills/fec-svg-animation/SKILL.md +148 -0
- package/localized/zh-CN/skills/fec-tailwind-design-system/SKILL.md +34 -0
- package/localized/zh-CN/skills/fec-tailwind-design-system/references/tailwind-system-patterns.md +59 -0
- package/localized/zh-CN/skills/fec-tdd-workflow/SKILL.md +52 -0
- package/localized/zh-CN/skills/fec-testing-strategy/SKILL.md +45 -0
- package/localized/zh-CN/skills/fec-typescript-project-standard/SKILL.md +54 -0
- package/{skills/fec-typescript-type-safety → localized/zh-CN/skills/fec-typescript-project-standard}/references/type-safety-patterns.md +1 -1
- package/{skills/fec-typescript-type-safety/SKILL.md → localized/zh-CN/skills/fec-typescript-project-standard/references/type-safety.md} +5 -14
- package/localized/zh-CN/skills/fec-ui-design/SKILL.md +108 -0
- package/localized/zh-CN/skills/fec-ui-design/data/product-rules.json +231 -0
- package/localized/zh-CN/skills/fec-ui-design/data/stack-ui-rules.json +146 -0
- package/localized/zh-CN/skills/fec-ui-design/data/style-archetypes.json +373 -0
- package/localized/zh-CN/skills/fec-ui-design/data/ux-quality-rules.json +203 -0
- package/localized/zh-CN/skills/fec-ui-design/references/design-intelligence.md +97 -0
- package/localized/zh-CN/skills/fec-ui-design/references/master-page-overrides.md +30 -0
- package/localized/zh-CN/skills/fec-ui-design/references/pre-delivery-checklist.md +39 -0
- package/localized/zh-CN/skills/fec-ui-design/scripts/design-system.mjs +648 -0
- package/localized/zh-CN/skills/fec-validation-fix/SKILL.md +51 -0
- package/localized/zh-CN/skills/fec-validation-fix/references/report-template.md +43 -0
- package/localized/zh-CN/skills/fec-vite-project-standard/SKILL.md +83 -0
- package/localized/zh-CN/skills/fec-vue3-project-standard/SKILL.md +58 -0
- package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-composables-routing.md +162 -0
- package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-performance-patterns.md +13 -0
- package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-project-structure.md +176 -0
- package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-state-api-quality.md +216 -0
- package/localized/zh-CN/skills/fec-web-video-presentation/SKILL.md +61 -0
- package/localized/zh-CN/skills/fec-web-video-presentation/data/starter-themes.json +59 -0
- package/localized/zh-CN/skills/fec-web-video-presentation/references/chapter-craft.md +37 -0
- package/localized/zh-CN/skills/fec-web-video-presentation/references/content-plan.md +38 -0
- package/localized/zh-CN/skills/fec-web-video-presentation/references/recording-and-audio.md +33 -0
- package/localized/zh-CN/skills/fec-web-video-presentation/references/theme-system.md +36 -0
- package/localized/zh-CN/skills/fec-web-video-presentation/scripts/create-video-presentation.mjs +430 -0
- package/localized/zh-CN/skills/fec-web-workers/SKILL.md +35 -0
- package/localized/zh-CN/skills/fec-web-workers/references/advanced-workers.md +54 -0
- package/localized/zh-CN/skills/fec-web-workers/references/basic-worker.md +67 -0
- package/localized/zh-CN/skills/metadata.json +1646 -0
- package/localized/zh-CN/skills/relations.json +755 -0
- package/localized/zh-CN/templates/claude/CLAUDE.md +106 -0
- package/localized/zh-CN/templates/claude/settings.json +62 -0
- package/localized/zh-CN/templates/codex/AGENTS.md +105 -0
- package/localized/zh-CN/templates/codex/config.toml +32 -0
- package/localized/zh-CN/templates/openclaw/AGENTS.md +101 -0
- package/localized/zh-CN/templates/openclaw/OPENCLAW-CONFIG.md +12 -0
- package/localized/zh-CN/templates/shared/rules/fec-agent-workflow.md +54 -0
- package/localized/zh-CN/templates/shared/rules/fec-api-layer.md +99 -0
- package/localized/zh-CN/templates/shared/rules/fec-ci-cd.md +40 -0
- package/localized/zh-CN/templates/shared/rules/fec-code-comments.md +33 -0
- package/localized/zh-CN/templates/shared/rules/fec-design-system.md +72 -0
- package/localized/zh-CN/templates/shared/rules/fec-error-handling.md +56 -0
- package/localized/zh-CN/templates/shared/rules/fec-git-conventions.md +73 -0
- package/localized/zh-CN/templates/shared/rules/fec-i18n.md +64 -0
- package/localized/zh-CN/templates/shared/rules/fec-naming-conventions.md +120 -0
- package/localized/zh-CN/templates/shared/rules/fec-performance.md +101 -0
- package/localized/zh-CN/templates/shared/rules/fec-react.md +82 -0
- package/localized/zh-CN/templates/shared/rules/fec-refactoring.md +47 -0
- package/localized/zh-CN/templates/shared/rules/fec-rendering-patterns.md +40 -0
- package/localized/zh-CN/templates/shared/rules/fec-responsive-design.md +50 -0
- package/localized/zh-CN/templates/shared/rules/fec-source-driven-development.md +31 -0
- package/localized/zh-CN/templates/shared/rules/fec-state-management.md +60 -0
- package/localized/zh-CN/templates/shared/rules/fec-testing.md +98 -0
- package/localized/zh-CN/templates/shared/rules/fec-typescript.md +112 -0
- package/localized/zh-CN/templates/shared/rules/fec-vue.md +64 -0
- package/localized/zh-CN/templates/shared/rules/fec-working-modes.md +50 -0
- package/openclaw.plugin.json +1 -1
- package/package.json +4 -3
- package/skills/TEMPLATE.md +74 -74
- package/skills/eval_queries.json +717 -619
- package/skills/fec-accessibility-check/SKILL.md +21 -21
- package/skills/fec-accessibility-check/references/report-template.md +12 -12
- package/skills/fec-accessibility-check/references/screen-reader-testing.md +24 -24
- package/skills/fec-alchemy/SKILL.md +50 -50
- package/skills/fec-alchemy/assets/absorption-plan-template.md +32 -32
- package/skills/fec-alchemy/assets/intake-template.md +55 -55
- package/skills/fec-alchemy/assets/review-checklist.md +23 -23
- package/skills/fec-alchemy/references/methodology.md +66 -66
- package/skills/fec-alchemy/references/originality-and-licensing.md +42 -42
- package/skills/fec-api-integration/SKILL.md +61 -61
- package/skills/fec-api-integration/references/integration-patterns.md +30 -30
- package/skills/fec-backend-requirements-handoff/SKILL.md +45 -0
- package/skills/fec-browser-storage/SKILL.md +16 -16
- package/skills/fec-browser-storage/references/storage-patterns.md +16 -16
- package/skills/fec-canvas-threejs/SKILL.md +21 -21
- package/skills/fec-canvas-threejs/references/rendering-patterns.md +10 -10
- package/skills/fec-canvas-threejs/references/shader-webgl-patterns.md +37 -37
- package/skills/fec-code-review/SKILL.md +94 -94
- package/skills/fec-code-review/references/report-template.md +13 -13
- package/skills/fec-component-testing/SKILL.md +39 -39
- package/skills/fec-data-fetching/SKILL.md +16 -16
- package/skills/fec-data-fetching/references/query-patterns.md +27 -27
- package/skills/fec-debug-framework/SKILL.md +95 -95
- package/skills/fec-debug-framework/references/report-template.md +34 -34
- package/skills/fec-dependency-upgrade/SKILL.md +17 -17
- package/skills/fec-dependency-upgrade/references/dependency-upgrade-workflow.md +31 -31
- package/skills/fec-doc-sync/SKILL.md +23 -23
- package/skills/fec-drawio-studio/SKILL.md +73 -0
- package/skills/fec-drawio-studio/data/THIRD_PARTY_NOTICES.md +10 -0
- package/skills/fec-drawio-studio/data/brand-icons.json +878 -0
- package/skills/fec-drawio-studio/data/shape-index.json +83570 -0
- package/skills/fec-drawio-studio/references/data-residency.md +27 -0
- package/skills/fec-drawio-studio/references/diagram-patterns.md +60 -0
- package/skills/fec-drawio-studio/references/flowchart-quality.md +49 -0
- package/skills/fec-drawio-studio/references/layout-and-export.md +72 -0
- package/skills/fec-drawio-studio/references/troubleshooting.md +29 -0
- package/skills/fec-drawio-studio/references/xml-and-mermaid.md +58 -0
- package/skills/fec-drawio-studio/scripts/brand-symbols.mjs +99 -0
- package/skills/fec-drawio-studio/scripts/diagram-lint.mjs +205 -0
- package/skills/fec-drawio-studio/scripts/diagram-url.mjs +102 -0
- package/skills/fec-drawio-studio/scripts/drawio-export.mjs +134 -0
- package/skills/fec-drawio-studio/scripts/layout-graph.mjs +107 -0
- package/skills/fec-drawio-studio/scripts/png-embed-fix.mjs +26 -0
- package/skills/fec-drawio-studio/scripts/scan-go-packages.mjs +36 -0
- package/skills/fec-drawio-studio/scripts/scan-js-modules.mjs +52 -0
- package/skills/fec-drawio-studio/scripts/scan-python-classes.mjs +30 -0
- package/skills/fec-drawio-studio/scripts/scan-python-modules.mjs +55 -0
- package/skills/fec-drawio-studio/scripts/scan-rust-modules.mjs +35 -0
- package/skills/fec-drawio-studio/scripts/scan-ts-modules.mjs +7 -0
- package/skills/fec-drawio-studio/scripts/shape-query.mjs +121 -0
- package/skills/fec-drawio-studio/scripts/studio-core.mjs +139 -0
- package/skills/fec-drawio-studio/styles/built-in/corporate.json +49 -0
- package/skills/fec-drawio-studio/styles/built-in/default.json +49 -0
- package/skills/fec-drawio-studio/styles/built-in/handdrawn.json +49 -0
- package/skills/fec-drawio-studio/styles/schema.json +112 -0
- package/skills/fec-e2e-testing/SKILL.md +24 -22
- package/skills/fec-e2e-testing/references/e2e-ci-reporting.md +62 -0
- package/skills/fec-e2e-testing/references/e2e-special-scenarios.md +52 -0
- package/skills/fec-e2e-testing/references/e2e-visual-regression.md +60 -0
- package/skills/fec-e2e-testing/references/playwright-patterns.md +6 -6
- package/skills/fec-form-handling/SKILL.md +21 -21
- package/skills/fec-form-handling/references/advanced-form-patterns.md +41 -41
- package/skills/fec-image-generation/SKILL.md +81 -0
- package/skills/fec-image-generation/assets/interactive-diagram.html +371 -0
- package/skills/fec-image-generation/references/artifact-routing.md +80 -0
- package/skills/fec-image-generation/references/diagram-workflows.md +74 -0
- package/skills/fec-image-generation/references/html-technical-diagrams.md +236 -0
- package/skills/fec-image-generation/references/png-qa-autofix.md +30 -0
- package/skills/fec-image-generation/scripts/export-diagram.mjs +364 -0
- package/skills/fec-image-generation/scripts/interactive-diagram-server.mjs +654 -0
- package/skills/fec-image-generation/scripts/png-qa.mjs +431 -0
- package/skills/fec-image-generation/scripts/tech-diagram-render.mjs +1397 -0
- package/skills/fec-implement-from-design/SKILL.md +81 -74
- package/skills/fec-implement-from-design/references/design-plan-template.md +16 -16
- package/skills/fec-legacy-to-modern-migration/SKILL.md +29 -173
- package/skills/fec-legacy-to-modern-migration/references/migration-execution-checklist.md +110 -0
- package/skills/fec-legacy-to-modern-migration/references/migration-report-template.md +37 -37
- package/skills/fec-legacy-to-modern-migration/references/migration-strategy-and-mapping.md +48 -0
- package/skills/fec-legacy-web-standard/SKILL.md +17 -17
- package/skills/fec-legacy-web-standard/references/legacy-patterns.md +16 -16
- package/skills/fec-list-virtualization/SKILL.md +16 -16
- package/skills/fec-list-virtualization/references/virtualization-patterns.md +31 -31
- package/skills/fec-monorepo-project-standard/SKILL.md +52 -52
- package/skills/fec-motion-interaction/SKILL.md +51 -44
- package/skills/fec-motion-interaction/references/motion-patterns.md +11 -11
- package/skills/fec-nextjs-project-standard/SKILL.md +64 -58
- package/skills/fec-nuxt-project-standard/SKILL.md +57 -57
- package/skills/fec-performance-optimization/SKILL.md +54 -50
- package/skills/fec-performance-optimization/references/framework-performance-patterns.md +38 -0
- package/skills/fec-performance-optimization/references/report-template.md +34 -28
- package/skills/fec-pwa-implementation/SKILL.md +17 -17
- package/skills/fec-pwa-implementation/references/manifest-and-icons.md +12 -12
- package/skills/fec-pwa-implementation/references/service-worker-workbox.md +13 -13
- package/skills/fec-react-project-standard/SKILL.md +72 -64
- package/skills/fec-react-project-standard/references/react-performance-patterns.md +35 -0
- package/skills/fec-react-project-standard/references/react-project-structure.md +197 -0
- package/skills/fec-react-project-standard/references/react-quality-patterns.md +131 -0
- package/skills/fec-react-project-standard/references/react-runtime-patterns.md +293 -0
- package/skills/fec-refactor-clean/SKILL.md +30 -30
- package/skills/fec-refactor-clean/references/report-template.md +23 -23
- package/skills/fec-responsive-layout/SKILL.md +17 -17
- package/skills/fec-responsive-layout/references/responsive-layout-patterns.md +39 -28
- package/skills/fec-route-protection/SKILL.md +26 -26
- package/skills/fec-security-review/SKILL.md +20 -20
- package/skills/fec-security-review/references/report-template.md +12 -12
- package/skills/fec-security-review/references/security-checklist.md +27 -27
- package/skills/fec-source-driven-development/SKILL.md +66 -40
- package/skills/fec-state-management/SKILL.md +34 -34
- package/skills/fec-state-management/references/state-patterns.md +19 -19
- package/skills/fec-storybook-component-doc/SKILL.md +19 -19
- package/skills/fec-storybook-component-doc/references/story-patterns.md +12 -12
- package/skills/fec-svg-animation/SKILL.md +32 -32
- package/skills/fec-tailwind-design-system/SKILL.md +17 -17
- package/skills/fec-tailwind-design-system/references/tailwind-system-patterns.md +36 -32
- package/skills/fec-tdd-workflow/SKILL.md +28 -28
- package/skills/fec-testing-strategy/SKILL.md +29 -29
- package/skills/fec-typescript-project-standard/SKILL.md +54 -0
- package/skills/fec-typescript-project-standard/references/type-safety-patterns.md +102 -0
- package/skills/fec-typescript-project-standard/references/type-safety.md +148 -0
- package/skills/fec-ui-design/SKILL.md +90 -72
- package/skills/fec-ui-design/data/style-archetypes.json +40 -0
- package/skills/fec-ui-design/data/ux-quality-rules.json +35 -0
- package/skills/fec-ui-design/references/design-intelligence.md +81 -21
- package/skills/fec-ui-design/references/master-page-overrides.md +15 -15
- package/skills/fec-ui-design/references/pre-delivery-checklist.md +38 -32
- package/skills/fec-ui-design/scripts/design-system.mjs +119 -1
- package/skills/fec-validation-fix/SKILL.md +26 -26
- package/skills/fec-validation-fix/references/report-template.md +25 -25
- package/skills/fec-vite-project-standard/SKILL.md +39 -39
- package/skills/fec-vue3-project-standard/SKILL.md +39 -30
- package/skills/fec-vue3-project-standard/references/vue3-composables-routing.md +163 -0
- package/skills/fec-vue3-project-standard/references/vue3-performance-patterns.md +13 -0
- package/skills/fec-vue3-project-standard/references/vue3-project-structure.md +177 -0
- package/skills/fec-vue3-project-standard/references/vue3-state-api-quality.md +216 -0
- package/skills/fec-web-video-presentation/SKILL.md +61 -0
- package/skills/fec-web-video-presentation/data/starter-themes.json +59 -0
- package/skills/fec-web-video-presentation/references/chapter-craft.md +37 -0
- package/skills/fec-web-video-presentation/references/content-plan.md +38 -0
- package/skills/fec-web-video-presentation/references/recording-and-audio.md +33 -0
- package/skills/fec-web-video-presentation/references/theme-system.md +36 -0
- package/skills/fec-web-video-presentation/scripts/create-video-presentation.mjs +430 -0
- package/skills/fec-web-workers/SKILL.md +16 -16
- package/skills/fec-web-workers/references/advanced-workers.md +13 -13
- package/skills/fec-web-workers/references/basic-worker.md +8 -8
- package/skills/metadata.json +402 -220
- package/skills/relations.json +120 -25
- package/templates/claude/CLAUDE.md +60 -60
- package/templates/codex/AGENTS.md +76 -76
- package/templates/codex/config.toml +4 -4
- package/templates/openclaw/AGENTS.md +68 -68
- package/templates/openclaw/OPENCLAW-CONFIG.md +8 -8
- package/templates/shared/rules/fec-agent-workflow.md +40 -40
- package/templates/shared/rules/fec-api-layer.md +52 -52
- package/templates/shared/rules/fec-ci-cd.md +29 -117
- package/templates/shared/rules/fec-code-comments.md +22 -22
- package/templates/shared/rules/fec-design-system.md +65 -241
- package/templates/shared/rules/fec-error-handling.md +41 -185
- package/templates/shared/rules/fec-git-conventions.md +42 -42
- package/templates/shared/rules/fec-i18n.md +48 -96
- package/templates/shared/rules/fec-naming-conventions.md +91 -91
- package/templates/shared/rules/fec-performance.md +78 -78
- package/templates/shared/rules/fec-react.md +58 -58
- package/templates/shared/rules/fec-refactoring.md +34 -30
- package/templates/shared/rules/fec-rendering-patterns.md +40 -183
- package/templates/shared/rules/fec-responsive-design.md +37 -214
- package/templates/shared/rules/fec-source-driven-development.md +22 -22
- package/templates/shared/rules/fec-state-management.md +45 -148
- package/templates/shared/rules/fec-testing.md +64 -64
- package/templates/shared/rules/fec-typescript.md +98 -341
- package/templates/shared/rules/fec-vue.md +42 -42
- package/templates/shared/rules/fec-working-modes.md +34 -34
- package/skills/fec-e2e-testing/references/e2e-advanced.md +0 -176
- package/skills/fec-react-project-standard/references/react-project-details.md +0 -642
- package/skills/fec-vue3-project-standard/references/vue3-project-details.md +0 -547
|
@@ -0,0 +1,491 @@
|
|
|
1
|
+
# fec-debug Implementation Plan
|
|
2
|
+
|
|
3
|
+
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
|
|
4
|
+
|
|
5
|
+
**Goal:** Replace `fec-build-fix` / `fec-build-fixer` with a unified `fec-debug` / `fec-debugger` system that covers build failures, runtime errors, UI anomalies, and API/data problems via a 5-step diagnostic framework.
|
|
6
|
+
|
|
7
|
+
**Architecture:** A single command (`fec-debug`) routes problems by type. A core skill (`fec-debug-framework`) defines the 5-step methodology (Classify → Collect → Hypothesize → Verify → Fix & Validate) with four diagnostic modules (build, runtime, ui, api). A subagent (`fec-debugger`) handles complex or cross-type cases.
|
|
8
|
+
|
|
9
|
+
**Tech Stack:** Markdown skill/command/agent definitions (no code changes). Existing `fec-validation-fix` skill is retained and referenced by the Build module.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## File Map
|
|
14
|
+
|
|
15
|
+
| Action | Path | Responsibility |
|
|
16
|
+
| ------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
|
17
|
+
| Create | `skills/fec-debug-framework/SKILL.md` | Core diagnostic framework: 5-step methodology + 4 modules + report format |
|
|
18
|
+
| Create | `commands/fec-debug.md` | Entry command: type routing + delegation to skill/agent |
|
|
19
|
+
| Create | `agents/fec-debugger.md` | Subagent: executes complex multi-type diagnostics |
|
|
20
|
+
| Delete | `commands/fec-build-fix.md` | Superseded by `fec-debug` |
|
|
21
|
+
| Delete | `agents/fec-build-fixer.md` | Superseded by `fec-debugger` |
|
|
22
|
+
| Rename+Update | `npm-packages/openclaw/commands/fec-build-fix.md` → `npm-packages/openclaw/commands/fec-debug.md` | npm-side command sync |
|
|
23
|
+
| Keep | `skills/fec-validation-fix/SKILL.md` | Retained as Build module reference |
|
|
24
|
+
| Keep | `npm-packages/openclaw/skills/fec-validation-fix/SKILL.md` | Retained (npm-side mirror) |
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
### Task 1: Create Core Skill — `fec-debug-framework`
|
|
29
|
+
|
|
30
|
+
**Files:**
|
|
31
|
+
|
|
32
|
+
- Create: `skills/fec-debug-framework/SKILL.md`
|
|
33
|
+
|
|
34
|
+
- [ ] **Step 1: Create the skill directory and file**
|
|
35
|
+
|
|
36
|
+
Create `skills/fec-debug-framework/SKILL.md` with the full content below. This is the central piece — command and agent both reference it.
|
|
37
|
+
|
|
38
|
+
```markdown
|
|
39
|
+
---
|
|
40
|
+
name: fec-debug-framework
|
|
41
|
+
description: Use when diagnosing and fixing frontend issues including build failures, runtime errors, UI anomalies, and API/data problems. Provides a unified 5-step diagnostic methodology with type-specific modules. Chinese triggers: 调试, debug, 排查, 定位, 报错, 异常, 白屏, 请求失败.
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
# 前端诊断框架
|
|
45
|
+
|
|
46
|
+
## 核心方法论(5 步法)
|
|
47
|
+
|
|
48
|
+
所有前端问题诊断遵循统一流程:
|
|
49
|
+
|
|
50
|
+
### Step 1: 分类(Classify)
|
|
51
|
+
|
|
52
|
+
识别问题类型和影响范围:
|
|
53
|
+
|
|
54
|
+
| 类型 | 判断依据 | 诊断入口 |
|
|
55
|
+
| ------- | ---------------------------- | -------------- |
|
|
56
|
+
| build | 命令退出非零、stderr 有错误 | → Build 模块 |
|
|
57
|
+
| runtime | 控制台异常、白屏、功能不可用 | → Runtime 模块 |
|
|
58
|
+
| ui | 视觉偏差、交互不符预期 | → UI 模块 |
|
|
59
|
+
| api | 请求状态码异常、数据不一致 | → API 模块 |
|
|
60
|
+
|
|
61
|
+
跨类型问题(如 API 失败导致 UI 异常)从最表层症状入手,逐层深入。
|
|
62
|
+
|
|
63
|
+
### Step 2: 收集(Collect)
|
|
64
|
+
|
|
65
|
+
按类型收集证据(各模块有具体策略,见下方)。
|
|
66
|
+
|
|
67
|
+
### Step 3: 假设(Hypothesize)
|
|
68
|
+
|
|
69
|
+
基于证据提出可能根因,按可能性排序:
|
|
70
|
+
|
|
71
|
+
- 每个假设必须可测试(有明确的验证方法)
|
|
72
|
+
- 最多保留 3 个假设,避免发散
|
|
73
|
+
- 格式:「因为 X,导致 Y,可通过 Z 验证」
|
|
74
|
+
|
|
75
|
+
### Step 4: 验证(Verify)
|
|
76
|
+
|
|
77
|
+
逐一测试假设:
|
|
78
|
+
|
|
79
|
+
- 从最可能的假设开始
|
|
80
|
+
- 每次只改一个变量
|
|
81
|
+
- 验证结果记录:证实 / 证伪 / 待定
|
|
82
|
+
- 假设全部证伪时回到 Step 2 重新收集
|
|
83
|
+
|
|
84
|
+
### Step 5: 修复与确认(Fix & Validate)
|
|
85
|
+
|
|
86
|
+
- 应用最小修复
|
|
87
|
+
- 运行受影响验证命令
|
|
88
|
+
- 确认无回归
|
|
89
|
+
- 输出修复报告
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## 诊断模块
|
|
94
|
+
|
|
95
|
+
### Build 模块
|
|
96
|
+
|
|
97
|
+
**收集**:运行最小失败命令,捕获完整 stderr/stdout
|
|
98
|
+
**假设**:按错误类型分组(类型错误、导入失败、配置解析、依赖缺失),匹配已知模式
|
|
99
|
+
**验证**:修一类根因 → 重跑命令 → 确认错误减少
|
|
100
|
+
**特殊处理**:
|
|
101
|
+
|
|
102
|
+
- 依赖升级/peer dependency/ESM/CJS 问题同时参考 `fec-dependency-upgrade`
|
|
103
|
+
- CI 专属失败检查 Node 版本、包管理器、环境变量差异
|
|
104
|
+
|
|
105
|
+
### Runtime 模块
|
|
106
|
+
|
|
107
|
+
**收集**:
|
|
108
|
+
|
|
109
|
+
- 复现路径(用户操作序列)
|
|
110
|
+
- 控制台错误和堆栈
|
|
111
|
+
- 组件渲染树状态(检查关键组件是否正确挂载)
|
|
112
|
+
- 相关 store/state 快照
|
|
113
|
+
|
|
114
|
+
**假设**:
|
|
115
|
+
|
|
116
|
+
- 堆栈反向追踪:从异常位置回溯到触发源
|
|
117
|
+
- 状态流分析:检查 state 变化是否符合预期
|
|
118
|
+
- 生命周期分析:是否在错误的时机访问了未初始化的数据
|
|
119
|
+
|
|
120
|
+
**验证**:
|
|
121
|
+
|
|
122
|
+
- 添加临时日志确认状态值
|
|
123
|
+
- 在可疑路径添加断言
|
|
124
|
+
- 复现路径验证修复
|
|
125
|
+
|
|
126
|
+
### UI 模块
|
|
127
|
+
|
|
128
|
+
**收集**:
|
|
129
|
+
|
|
130
|
+
- 当前截图 vs 期望效果
|
|
131
|
+
- DOM 结构检查(元素是否存在、层级是否正确)
|
|
132
|
+
- 计算样式检查(实际应用的 CSS 值)
|
|
133
|
+
- 响应式断点测试
|
|
134
|
+
|
|
135
|
+
**假设**:
|
|
136
|
+
|
|
137
|
+
- CSS 特异性冲突(选择器权重不够被覆盖)
|
|
138
|
+
- 组件状态不匹配(props/state 未正确传递)
|
|
139
|
+
- 布局模型问题(flex/grid 配置错误)
|
|
140
|
+
- 响应式断点遗漏
|
|
141
|
+
|
|
142
|
+
**验证**:
|
|
143
|
+
|
|
144
|
+
- 浏览器 DevTools 实时调整验证
|
|
145
|
+
- 隔离组件测试(排除外部样式干扰)
|
|
146
|
+
- 多断点逐一验证
|
|
147
|
+
|
|
148
|
+
### API 模块
|
|
149
|
+
|
|
150
|
+
**收集**:
|
|
151
|
+
|
|
152
|
+
- 请求 URL、method、headers、body
|
|
153
|
+
- 响应 status、headers、body
|
|
154
|
+
- 网络瀑布时序
|
|
155
|
+
- 相关 store/state 中的缓存数据
|
|
156
|
+
|
|
157
|
+
**假设**:
|
|
158
|
+
|
|
159
|
+
- 请求链路逐跳检查(URL → 中间件 → 拦截器 → 服务端)
|
|
160
|
+
- 数据转换检查(响应解析、类型映射)
|
|
161
|
+
- 缓存策略检查(过期、失效、竞态)
|
|
162
|
+
- 并发请求竞态(race condition)
|
|
163
|
+
|
|
164
|
+
**验证**:
|
|
165
|
+
|
|
166
|
+
- curl 独立复现(排除前端干扰)
|
|
167
|
+
- 逐层 mock 定位问题层级
|
|
168
|
+
- 端到端请求验证修复
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## 报告格式
|
|
173
|
+
|
|
174
|
+
保存至 `reports/debug-YYYY-MM-DD-HHmmss.md`:
|
|
175
|
+
|
|
176
|
+
### 诊断报告
|
|
177
|
+
|
|
178
|
+
| 项目 | 内容 |
|
|
179
|
+
| ---------- | -------------------------- |
|
|
180
|
+
| 问题类型 | build / runtime / ui / api |
|
|
181
|
+
| 问题描述 | 用户报告的现象 |
|
|
182
|
+
| 收集的证据 | 关键日志、截图、请求记录 |
|
|
183
|
+
| 假设与验证 | 每个假设的验证结果 |
|
|
184
|
+
| 根因 | 最终确认的根本原因 |
|
|
185
|
+
| 修复内容 | 修改的文件和具体改动 |
|
|
186
|
+
| 验证结果 | 修复后的验证命令和结果 |
|
|
187
|
+
| 剩余风险 | 未覆盖的边界或潜在回归 |
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## 强约束
|
|
192
|
+
|
|
193
|
+
- 不在缺少证据时猜测根因
|
|
194
|
+
- 不通过关闭规则、删除测试或降低类型安全来「修复」
|
|
195
|
+
- 每次只改一个变量来验证假设
|
|
196
|
+
- 不在验证前扩大改动范围
|
|
197
|
+
- 同一假设连续 3 次验证失败,停止并报告阻塞
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
- [ ] **Step 2: Verify file was created**
|
|
201
|
+
|
|
202
|
+
Run: `cat skills/fec-debug-framework/SKILL.md | head -5`
|
|
203
|
+
Expected: First 5 lines show the frontmatter with `name: fec-debug-framework`
|
|
204
|
+
|
|
205
|
+
- [ ] **Step 3: Commit**
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
git add skills/fec-debug-framework/SKILL.md
|
|
209
|
+
git commit -m "feat(debug): add fec-debug-framework skill with 5-step diagnostic methodology"
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
### Task 2: Create Command — `fec-debug`
|
|
215
|
+
|
|
216
|
+
**Files:**
|
|
217
|
+
|
|
218
|
+
- Create: `commands/fec-debug.md`
|
|
219
|
+
|
|
220
|
+
- [ ] **Step 1: Create the command file**
|
|
221
|
+
|
|
222
|
+
Create `commands/fec-debug.md` with the content below. This is the user-facing entry point that routes to the framework skill.
|
|
223
|
+
|
|
224
|
+
```markdown
|
|
225
|
+
---
|
|
226
|
+
name: fec-debug
|
|
227
|
+
description: 前端问题诊断与修复:覆盖构建失败、运行时错误、UI 异常、接口问题,使用统一诊断框架按类型分流。
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
按 `fec-debug-framework` 执行前端问题诊断与修复。先分类问题类型(build / runtime / ui / api),再进入对应诊断模块执行 5 步法(分类→收集→假设→验证→修复)。复杂或跨类型问题可委托 **`fec-debugger`** 子代理。
|
|
231
|
+
|
|
232
|
+
## 问题类型速查
|
|
233
|
+
|
|
234
|
+
| 类型 | 典型场景 |
|
|
235
|
+
| ------- | ----------------------------------------------- |
|
|
236
|
+
| build | lint/type-check/test/build/CI 失败 |
|
|
237
|
+
| runtime | JS 异常、白屏、组件渲染错误、路由异常、状态丢失 |
|
|
238
|
+
| ui | 样式错位、交互异常、动画卡顿、响应式问题 |
|
|
239
|
+
| api | 请求失败、超时、数据不一致、CORS、缓存问题 |
|
|
240
|
+
|
|
241
|
+
## 执行步骤
|
|
242
|
+
|
|
243
|
+
1. 读取用户描述的问题,按 `fec-debug-framework` Step 1 分类问题类型。
|
|
244
|
+
2. 进入对应诊断模块,执行 Step 2 收集证据。
|
|
245
|
+
3. 基于证据提出假设(Step 3),逐一验证(Step 4)。
|
|
246
|
+
4. 确认根因后执行最小修复(Step 5),运行受影响验证命令。
|
|
247
|
+
5. 输出诊断报告到 `reports/debug-YYYY-MM-DD-HHmmss.md`。
|
|
248
|
+
|
|
249
|
+
## 强约束
|
|
250
|
+
|
|
251
|
+
- 不通过关闭规则、删除测试或降低类型安全来「修复」问题
|
|
252
|
+
- 不顺手重构无关代码
|
|
253
|
+
- 不在缺少证据时猜测根因
|
|
254
|
+
- 修复后必须验证,不能只改不测
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
- [ ] **Step 2: Verify file was created**
|
|
258
|
+
|
|
259
|
+
Run: `cat commands/fec-debug.md | head -5`
|
|
260
|
+
Expected: First 5 lines show the frontmatter with `name: fec-debug`
|
|
261
|
+
|
|
262
|
+
- [ ] **Step 3: Commit**
|
|
263
|
+
|
|
264
|
+
```bash
|
|
265
|
+
git add commands/fec-debug.md
|
|
266
|
+
git commit -m "feat(debug): add fec-debug command with type-based routing"
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
### Task 3: Create Agent — `fec-debugger`
|
|
272
|
+
|
|
273
|
+
**Files:**
|
|
274
|
+
|
|
275
|
+
- Create: `agents/fec-debugger.md`
|
|
276
|
+
|
|
277
|
+
- [ ] **Step 1: Create the agent file**
|
|
278
|
+
|
|
279
|
+
Create `agents/fec-debugger.md` with the content below. This subagent handles complex or cross-type diagnostic scenarios.
|
|
280
|
+
|
|
281
|
+
```markdown
|
|
282
|
+
---
|
|
283
|
+
name: fec-debugger
|
|
284
|
+
description: 前端诊断与修复子代理:使用统一 5 步诊断框架处理构建失败、运行时错误、UI 异常、接口问题。适合复杂或多层嵌套的前端问题排查。
|
|
285
|
+
tools: Read, Edit, Write, MultiEdit, Glob, Grep, LS, Bash
|
|
286
|
+
model: sonnet
|
|
287
|
+
permissionMode: default
|
|
288
|
+
maxTurns: 16
|
|
289
|
+
skills:
|
|
290
|
+
- fec-debug-framework
|
|
291
|
+
- fec-validation-fix
|
|
292
|
+
- fec-vite-project-standard
|
|
293
|
+
- fec-react-project-standard
|
|
294
|
+
- fec-vue3-project-standard
|
|
295
|
+
- fec-testing-strategy
|
|
296
|
+
- fec-dependency-upgrade
|
|
297
|
+
- fec-security-review
|
|
298
|
+
---
|
|
299
|
+
|
|
300
|
+
你是一名前端诊断专家,使用统一 5 步诊断框架(分类→收集→假设→验证→修复)定位和修复前端问题。
|
|
301
|
+
|
|
302
|
+
## 工作流
|
|
303
|
+
|
|
304
|
+
1. 读取问题描述,按 `fec-debug-framework` 的 Step 1 分类问题类型。
|
|
305
|
+
2. 进入对应诊断模块,执行 Step 2 收集证据。
|
|
306
|
+
3. 基于证据提出假设(Step 3),每个假设必须可测试。
|
|
307
|
+
4. 逐一验证假设(Step 4),每次只改一个变量,记录证实/证伪。
|
|
308
|
+
5. 确认根因后执行最小修复(Step 5),运行受影响验证命令。
|
|
309
|
+
6. 输出诊断报告到 `reports/debug-YYYY-MM-DD-HHmmss.md`。
|
|
310
|
+
|
|
311
|
+
## 跨类型问题
|
|
312
|
+
|
|
313
|
+
当问题涉及多个类型(如 API 失败导致 UI 异常):
|
|
314
|
+
|
|
315
|
+
- 从最表层症状入手
|
|
316
|
+
- 逐层深入,每层确认后再进入下一层
|
|
317
|
+
- 在报告中标注问题链路
|
|
318
|
+
|
|
319
|
+
## 强约束
|
|
320
|
+
|
|
321
|
+
- 不在缺少证据时猜测根因
|
|
322
|
+
- 不通过关闭规则、删除测试或降低类型安全来"修复"
|
|
323
|
+
- 不在验证前扩大改动范围
|
|
324
|
+
- 同一假设连续 3 次验证失败,停止并报告阻塞
|
|
325
|
+
- 不顺手重构无关代码
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
- [ ] **Step 2: Verify file was created**
|
|
329
|
+
|
|
330
|
+
Run: `cat agents/fec-debugger.md | head -5`
|
|
331
|
+
Expected: First 5 lines show the frontmatter with `name: fec-debugger` and `maxTurns: 16`
|
|
332
|
+
|
|
333
|
+
- [ ] **Step 3: Commit**
|
|
334
|
+
|
|
335
|
+
```bash
|
|
336
|
+
git add agents/fec-debugger.md
|
|
337
|
+
git commit -m "feat(debug): add fec-debugger agent for complex diagnostic scenarios"
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
---
|
|
341
|
+
|
|
342
|
+
### Task 4: Delete Old Files
|
|
343
|
+
|
|
344
|
+
**Files:**
|
|
345
|
+
|
|
346
|
+
- Delete: `commands/fec-build-fix.md`
|
|
347
|
+
- Delete: `agents/fec-build-fixer.md`
|
|
348
|
+
|
|
349
|
+
- [ ] **Step 1: Remove old command and agent**
|
|
350
|
+
|
|
351
|
+
```bash
|
|
352
|
+
git rm commands/fec-build-fix.md
|
|
353
|
+
git rm agents/fec-build-fixer.md
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
- [ ] **Step 2: Verify deletion**
|
|
357
|
+
|
|
358
|
+
Run: `ls commands/fec-build-fix.md agents/fec-build-fixer.md 2>&1`
|
|
359
|
+
Expected: Both files show "No such file or directory"
|
|
360
|
+
|
|
361
|
+
- [ ] **Step 3: Verify `fec-validation-fix` still exists (intentionally retained)**
|
|
362
|
+
|
|
363
|
+
Run: `ls skills/fec-validation-fix/SKILL.md`
|
|
364
|
+
Expected: File exists
|
|
365
|
+
|
|
366
|
+
- [ ] **Step 4: Commit**
|
|
367
|
+
|
|
368
|
+
```bash
|
|
369
|
+
git commit -m "chore(debug): remove superseded fec-build-fix command and fec-build-fixer agent"
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
---
|
|
373
|
+
|
|
374
|
+
### Task 5: Sync npm-packages Side
|
|
375
|
+
|
|
376
|
+
**Files:**
|
|
377
|
+
|
|
378
|
+
- Delete: `npm-packages/openclaw/commands/fec-build-fix.md`
|
|
379
|
+
- Create: `npm-packages/openclaw/commands/fec-debug.md`
|
|
380
|
+
|
|
381
|
+
Note: The npm-packages side has no `agents/` directory, so no agent sync is needed.
|
|
382
|
+
|
|
383
|
+
- [ ] **Step 1: Remove old npm-side command**
|
|
384
|
+
|
|
385
|
+
```bash
|
|
386
|
+
git rm npm-packages/openclaw/commands/fec-build-fix.md
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
- [ ] **Step 2: Create new npm-side command**
|
|
390
|
+
|
|
391
|
+
Create `npm-packages/openclaw/commands/fec-debug.md` with content matching the source-side command (Task 2 content):
|
|
392
|
+
|
|
393
|
+
```markdown
|
|
394
|
+
---
|
|
395
|
+
name: fec-debug
|
|
396
|
+
description: 前端问题诊断与修复:覆盖构建失败、运行时错误、UI 异常、接口问题,使用统一诊断框架按类型分流。
|
|
397
|
+
---
|
|
398
|
+
|
|
399
|
+
按 `fec-debug-framework` 执行前端问题诊断与修复。先分类问题类型(build / runtime / ui / api),再进入对应诊断模块执行 5 步法(分类→收集→假设→验证→修复)。复杂或跨类型问题可委托 **`fec-debugger`** 子代理。
|
|
400
|
+
|
|
401
|
+
## 问题类型速查
|
|
402
|
+
|
|
403
|
+
| 类型 | 典型场景 |
|
|
404
|
+
| ------- | ----------------------------------------------- |
|
|
405
|
+
| build | lint/type-check/test/build/CI 失败 |
|
|
406
|
+
| runtime | JS 异常、白屏、组件渲染错误、路由异常、状态丢失 |
|
|
407
|
+
| ui | 样式错位、交互异常、动画卡顿、响应式问题 |
|
|
408
|
+
| api | 请求失败、超时、数据不一致、CORS、缓存问题 |
|
|
409
|
+
|
|
410
|
+
## 执行步骤
|
|
411
|
+
|
|
412
|
+
1. 读取用户描述的问题,按 `fec-debug-framework` Step 1 分类问题类型。
|
|
413
|
+
2. 进入对应诊断模块,执行 Step 2 收集证据。
|
|
414
|
+
3. 基于证据提出假设(Step 3),逐一验证(Step 4)。
|
|
415
|
+
4. 确认根因后执行最小修复(Step 5),运行受影响验证命令。
|
|
416
|
+
5. 输出诊断报告到 `reports/debug-YYYY-MM-DD-HHmmss.md`。
|
|
417
|
+
|
|
418
|
+
## 强约束
|
|
419
|
+
|
|
420
|
+
- 不通过关闭规则、删除测试或降低类型安全来「修复」问题
|
|
421
|
+
- 不顺手重构无关代码
|
|
422
|
+
- 不在缺少证据时猜测根因
|
|
423
|
+
- 修复后必须验证,不能只改不测
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
- [ ] **Step 3: Verify npm-side sync**
|
|
427
|
+
|
|
428
|
+
Run: `ls npm-packages/openclaw/commands/fec-build-fix.md 2>&1 && echo "STILL EXISTS" || echo "REMOVED"`
|
|
429
|
+
Expected: `REMOVED`
|
|
430
|
+
|
|
431
|
+
Run: `cat npm-packages/openclaw/commands/fec-debug.md | head -3`
|
|
432
|
+
Expected: Frontmatter with `name: fec-debug`
|
|
433
|
+
|
|
434
|
+
- [ ] **Step 4: Commit**
|
|
435
|
+
|
|
436
|
+
```bash
|
|
437
|
+
git add npm-packages/openclaw/commands/fec-debug.md
|
|
438
|
+
git commit -m "chore(debug): sync npm-packages command from fec-build-fix to fec-debug"
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
---
|
|
442
|
+
|
|
443
|
+
### Task 6: Final Verification
|
|
444
|
+
|
|
445
|
+
- [ ] **Step 1: Verify all new files exist**
|
|
446
|
+
|
|
447
|
+
```bash
|
|
448
|
+
ls -la commands/fec-debug.md skills/fec-debug-framework/SKILL.md agents/fec-debugger.md
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
Expected: All three files exist with non-zero size.
|
|
452
|
+
|
|
453
|
+
- [ ] **Step 2: Verify all old files are gone**
|
|
454
|
+
|
|
455
|
+
```bash
|
|
456
|
+
ls commands/fec-build-fix.md agents/fec-build-fixer.md npm-packages/openclaw/commands/fec-build-fix.md 2>&1
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
Expected: All three paths show "No such file or directory".
|
|
460
|
+
|
|
461
|
+
- [ ] **Step 3: Verify retained files still exist**
|
|
462
|
+
|
|
463
|
+
```bash
|
|
464
|
+
ls skills/fec-validation-fix/SKILL.md npm-packages/openclaw/skills/fec-validation-fix/SKILL.md
|
|
465
|
+
```
|
|
466
|
+
|
|
467
|
+
Expected: Both files exist.
|
|
468
|
+
|
|
469
|
+
- [ ] **Step 4: Verify cross-references are consistent**
|
|
470
|
+
|
|
471
|
+
Run: `grep -r "fec-build-fix\|fec-build-fixer" commands/ agents/ skills/ npm-packages/`
|
|
472
|
+
Expected: No matches (all references to old names should be gone).
|
|
473
|
+
|
|
474
|
+
- [ ] **Step 5: Verify new cross-references resolve**
|
|
475
|
+
|
|
476
|
+
Run: `grep -r "fec-debug-framework" commands/ agents/ skills/fec-debug-framework/`
|
|
477
|
+
Expected: At least 2 matches — command references skill, agent references skill.
|
|
478
|
+
|
|
479
|
+
Run: `grep -r "fec-debugger" commands/ agents/`
|
|
480
|
+
Expected: At least 1 match — command mentions agent delegation.
|
|
481
|
+
|
|
482
|
+
- [ ] **Step 6: Final commit (if any fixups were needed)**
|
|
483
|
+
|
|
484
|
+
Only if steps 1-5 revealed issues that needed fixing:
|
|
485
|
+
|
|
486
|
+
```bash
|
|
487
|
+
git add -A
|
|
488
|
+
git commit -m "fix(debug): resolve cross-reference issues found during verification"
|
|
489
|
+
```
|
|
490
|
+
|
|
491
|
+
If no fixups needed, skip this step.
|