@bovinphang/frontend-craft 2.7.0 → 2.9.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 +378 -305
- package/CHANGELOG.zh-CN.md +377 -304
- package/CONTRIBUTING.md +371 -361
- package/CONTRIBUTING.zh-CN.md +371 -361
- package/README.md +545 -493
- package/README.openclaw.md +359 -264
- package/README.openclaw.zh-CN.md +359 -264
- package/README.zh-CN.md +545 -493
- package/agents/fec-architect.md +70 -70
- package/agents/fec-code-reviewer.md +103 -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 +17 -14
- package/agents/fec-refactoring-expert.md +81 -0
- package/agents/fec-security-reviewer.md +82 -67
- package/agents/fec-test-planner.md +27 -27
- package/agents/fec-typescript-reviewer.md +103 -87
- package/agents/fec-ui-checker.md +64 -64
- 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-refactor-plan.md +17 -0
- package/commands/fec-refactor.md +18 -0
- package/commands/fec-review.md +71 -41
- package/commands/fec-scaffold.md +41 -41
- package/commands/fec-smell.md +17 -0
- package/commands/fec-tdd.md +17 -13
- package/dist/bin/frontend-craft.js +190 -36
- package/dist/hooks/fec-run-tests.js +5 -1
- package/dist/hooks/fec-session-start.js +1 -1
- package/docs/example-prompts.md +157 -137
- package/docs/ja-JP/README.md +534 -493
- package/docs/ko-KR/README.md +534 -493
- package/docs/project-structure.md +151 -123
- package/docs/refactoring/README.md +50 -0
- package/docs/refactoring/catalog.md +105 -0
- package/docs/refactoring/smell-refactoring-matrix.md +41 -0
- package/docs/review-and-diagram-workflows.md +39 -0
- package/docs/runtimes/antigravity.md +18 -10
- package/docs/runtimes/augment.md +18 -10
- package/docs/runtimes/claude.md +191 -177
- package/docs/runtimes/claude.zh-CN.md +189 -175
- package/docs/runtimes/cline.md +18 -10
- package/docs/runtimes/codebuddy.md +18 -10
- package/docs/runtimes/codex.md +18 -10
- package/docs/runtimes/compatibility.md +27 -0
- package/docs/runtimes/copilot.md +18 -10
- package/docs/runtimes/cursor.md +18 -10
- package/docs/runtimes/gemini.md +18 -10
- package/docs/runtimes/kilo.md +18 -10
- package/docs/runtimes/openclaw.md +18 -10
- package/docs/runtimes/opencode.md +18 -10
- package/docs/runtimes/qoder.md +18 -19
- package/docs/runtimes/trae.md +18 -10
- package/docs/runtimes/windsurf.md +18 -10
- package/docs/superpowers/plans/2026-09-26-content-integrity.md +145 -0
- package/docs/superpowers/plans/2026-09-26-diagram-quality.md +170 -0
- package/docs/superpowers/specs/2026-09-26-diagram-quality-design.md +77 -0
- package/docs/superpowers/specs/2026-09-26-project-optimization-design.md +95 -0
- package/docs/zh-CN/example-prompts.md +157 -137
- package/docs/zh-CN/project-structure.md +148 -123
- package/docs/zh-CN/review-and-diagram-workflows.md +39 -0
- package/docs/zh-TW/README.md +534 -493
- package/localized/zh-CN/agents/fec-architect.md +125 -0
- package/localized/zh-CN/agents/fec-code-reviewer.md +171 -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 +35 -0
- package/localized/zh-CN/agents/fec-refactoring-expert.md +53 -0
- package/localized/zh-CN/agents/fec-security-reviewer.md +132 -0
- package/localized/zh-CN/agents/fec-test-planner.md +50 -0
- package/localized/zh-CN/agents/fec-typescript-reviewer.md +158 -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-refactor-plan.md +15 -0
- package/localized/zh-CN/commands/fec-refactor.md +14 -0
- package/localized/zh-CN/commands/fec-review.md +97 -0
- package/localized/zh-CN/commands/fec-scaffold.md +205 -0
- package/localized/zh-CN/commands/fec-smell.md +13 -0
- package/localized/zh-CN/commands/fec-tdd.md +25 -0
- package/localized/zh-CN/skills/TEMPLATE.md +155 -0
- package/localized/zh-CN/skills/eval_queries.json +1257 -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 +162 -0
- package/localized/zh-CN/skills/fec-code-review/references/report-template.md +39 -0
- package/localized/zh-CN/skills/fec-code-smells/SKILL.md +33 -0
- package/localized/zh-CN/skills/fec-code-smells/references/detection-guide.md +25 -0
- package/localized/zh-CN/skills/fec-code-smells/references/smell-catalog.md +817 -0
- package/localized/zh-CN/skills/fec-code-smells/references/smell-to-refactoring-map.md +265 -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 +110 -0
- package/localized/zh-CN/skills/fec-image-generation/assets/interactive-diagram.html +371 -0
- package/localized/zh-CN/skills/fec-image-generation/assets/quality-examples/README.md +14 -0
- package/localized/zh-CN/skills/fec-image-generation/assets/quality-examples/architecture.json +121 -0
- package/localized/zh-CN/skills/fec-image-generation/assets/quality-examples/invalid-explicit.json +41 -0
- package/localized/zh-CN/skills/fec-image-generation/assets/quality-examples/sequence.json +53 -0
- package/localized/zh-CN/skills/fec-image-generation/assets/quality-examples/sequence.mmd +21 -0
- package/localized/zh-CN/skills/fec-image-generation/assets/quality-examples/workflow.json +98 -0
- package/localized/zh-CN/skills/fec-image-generation/assets/quality-examples/workflow.mmd +7 -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 +81 -0
- package/localized/zh-CN/skills/fec-image-generation/references/html-technical-diagrams.md +243 -0
- package/localized/zh-CN/skills/fec-image-generation/references/png-qa-autofix.md +37 -0
- package/localized/zh-CN/skills/fec-image-generation/scripts/diagram-browser.mjs +90 -0
- package/localized/zh-CN/skills/fec-image-generation/scripts/diagram-layout.mjs +176 -0
- package/localized/zh-CN/skills/fec-image-generation/scripts/export-diagram.mjs +332 -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/mermaid-render.mjs +64 -0
- package/localized/zh-CN/skills/fec-image-generation/scripts/png-qa.mjs +462 -0
- package/localized/zh-CN/skills/fec-image-generation/scripts/tech-diagram-render.mjs +1537 -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 +54 -0
- package/localized/zh-CN/skills/fec-refactor-clean/references/report-template.md +42 -0
- package/localized/zh-CN/skills/fec-refactoring/SKILL.md +83 -0
- package/localized/zh-CN/skills/fec-refactoring/references/principles.md +43 -0
- package/localized/zh-CN/skills/fec-refactoring/references/refactoring-vs-feature-change.md +25 -0
- package/localized/zh-CN/skills/fec-refactoring/references/when-to-refactor.md +17 -0
- package/localized/zh-CN/skills/fec-refactoring/references/workflow.md +59 -0
- package/localized/zh-CN/skills/fec-refactoring-api/SKILL.md +25 -0
- package/localized/zh-CN/skills/fec-refactoring-api/references/api-refactorings.md +496 -0
- package/localized/zh-CN/skills/fec-refactoring-catalog/SKILL.md +21 -0
- package/localized/zh-CN/skills/fec-refactoring-catalog/references/catalog-index.md +99 -0
- package/localized/zh-CN/skills/fec-refactoring-catalog/references/composition-guide.md +49 -0
- package/localized/zh-CN/skills/fec-refactoring-catalog/references/selection-guide.md +41 -0
- package/localized/zh-CN/skills/fec-refactoring-control/SKILL.md +25 -0
- package/localized/zh-CN/skills/fec-refactoring-control/references/conditional-refactorings.md +299 -0
- package/localized/zh-CN/skills/fec-refactoring-data/SKILL.md +25 -0
- package/localized/zh-CN/skills/fec-refactoring-data/references/data-refactorings.md +248 -0
- package/localized/zh-CN/skills/fec-refactoring-encapsulation/SKILL.md +25 -0
- package/localized/zh-CN/skills/fec-refactoring-encapsulation/references/encapsulation-refactorings.md +452 -0
- package/localized/zh-CN/skills/fec-refactoring-functions/SKILL.md +25 -0
- package/localized/zh-CN/skills/fec-refactoring-functions/references/function-refactorings.md +567 -0
- package/localized/zh-CN/skills/fec-refactoring-inheritance/SKILL.md +25 -0
- package/localized/zh-CN/skills/fec-refactoring-inheritance/references/inheritance-refactorings.md +550 -0
- package/localized/zh-CN/skills/fec-refactoring-move-features/SKILL.md +25 -0
- package/localized/zh-CN/skills/fec-refactoring-move-features/references/moving-refactorings.md +453 -0
- package/localized/zh-CN/skills/fec-refactoring-validation/SKILL.md +52 -0
- package/localized/zh-CN/skills/fec-refactoring-validation/references/behavior-preservation.md +15 -0
- package/localized/zh-CN/skills/fec-refactoring-validation/references/refactoring-test-checklist.md +25 -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 +54 -0
- package/localized/zh-CN/skills/fec-security-review/references/report-template.md +37 -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 +55 -0
- package/localized/zh-CN/skills/fec-testing-strategy/SKILL.md +45 -0
- package/localized/zh-CN/skills/fec-typescript-project-standard/SKILL.md +54 -0
- package/localized/zh-CN/skills/fec-typescript-project-standard/references/type-safety-patterns.md +102 -0
- package/localized/zh-CN/skills/fec-typescript-project-standard/references/type-safety.md +148 -0
- package/localized/zh-CN/skills/fec-ui-design/SKILL.md +108 -0
- package/localized/zh-CN/skills/fec-ui-design/data/product-rules.json +231 -0
- package/localized/zh-CN/skills/fec-ui-design/data/stack-ui-rules.json +146 -0
- package/localized/zh-CN/skills/fec-ui-design/data/style-archetypes.json +373 -0
- package/localized/zh-CN/skills/fec-ui-design/data/ux-quality-rules.json +203 -0
- package/localized/zh-CN/skills/fec-ui-design/references/design-intelligence.md +97 -0
- package/localized/zh-CN/skills/fec-ui-design/references/master-page-overrides.md +30 -0
- package/localized/zh-CN/skills/fec-ui-design/references/pre-delivery-checklist.md +39 -0
- package/localized/zh-CN/skills/fec-ui-design/scripts/design-system.mjs +648 -0
- package/localized/zh-CN/skills/fec-validation-fix/SKILL.md +51 -0
- package/localized/zh-CN/skills/fec-validation-fix/references/report-template.md +43 -0
- package/localized/zh-CN/skills/fec-vite-project-standard/SKILL.md +83 -0
- package/localized/zh-CN/skills/fec-vue3-project-standard/SKILL.md +58 -0
- package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-composables-routing.md +162 -0
- package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-performance-patterns.md +13 -0
- package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-project-structure.md +176 -0
- package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-state-api-quality.md +216 -0
- package/localized/zh-CN/skills/fec-web-video-presentation/SKILL.md +61 -0
- package/localized/zh-CN/skills/fec-web-video-presentation/data/starter-themes.json +59 -0
- package/localized/zh-CN/skills/fec-web-video-presentation/references/chapter-craft.md +37 -0
- package/localized/zh-CN/skills/fec-web-video-presentation/references/content-plan.md +38 -0
- package/localized/zh-CN/skills/fec-web-video-presentation/references/recording-and-audio.md +33 -0
- package/localized/zh-CN/skills/fec-web-video-presentation/references/theme-system.md +36 -0
- package/localized/zh-CN/skills/fec-web-video-presentation/scripts/create-video-presentation.mjs +430 -0
- package/localized/zh-CN/skills/fec-web-workers/SKILL.md +35 -0
- package/localized/zh-CN/skills/fec-web-workers/references/advanced-workers.md +54 -0
- package/localized/zh-CN/skills/fec-web-workers/references/basic-worker.md +67 -0
- package/localized/zh-CN/skills/metadata.json +2004 -0
- package/localized/zh-CN/skills/relations.json +1023 -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 +55 -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 +2 -3
- package/package.json +28 -17
- package/skills/TEMPLATE.md +74 -74
- package/skills/eval_queries.json +922 -678
- package/skills/fec-accessibility-check/SKILL.md +21 -21
- package/skills/fec-accessibility-check/references/report-template.md +12 -12
- package/skills/fec-accessibility-check/references/screen-reader-testing.md +24 -24
- package/skills/fec-alchemy/SKILL.md +50 -50
- package/skills/fec-alchemy/assets/absorption-plan-template.md +32 -32
- package/skills/fec-alchemy/assets/intake-template.md +55 -55
- package/skills/fec-alchemy/assets/review-checklist.md +23 -23
- package/skills/fec-alchemy/references/methodology.md +66 -66
- package/skills/fec-alchemy/references/originality-and-licensing.md +42 -42
- package/skills/fec-api-integration/SKILL.md +61 -61
- package/skills/fec-api-integration/references/integration-patterns.md +30 -30
- package/skills/fec-backend-requirements-handoff/SKILL.md +25 -25
- package/skills/fec-browser-storage/SKILL.md +16 -16
- package/skills/fec-browser-storage/references/storage-patterns.md +16 -16
- package/skills/fec-canvas-threejs/SKILL.md +21 -21
- package/skills/fec-canvas-threejs/references/rendering-patterns.md +10 -10
- package/skills/fec-canvas-threejs/references/shader-webgl-patterns.md +37 -37
- package/skills/fec-code-review/SKILL.md +113 -94
- package/skills/fec-code-review/references/report-template.md +23 -13
- package/skills/fec-code-smells/SKILL.md +33 -0
- package/skills/fec-code-smells/references/detection-guide.md +25 -0
- package/skills/fec-code-smells/references/smell-catalog.md +861 -0
- package/skills/fec-code-smells/references/smell-to-refactoring-map.md +265 -0
- package/skills/fec-component-testing/SKILL.md +39 -39
- package/skills/fec-data-fetching/SKILL.md +16 -16
- package/skills/fec-data-fetching/references/query-patterns.md +27 -27
- package/skills/fec-debug-framework/SKILL.md +95 -95
- package/skills/fec-debug-framework/references/report-template.md +34 -34
- package/skills/fec-dependency-upgrade/SKILL.md +17 -17
- package/skills/fec-dependency-upgrade/references/dependency-upgrade-workflow.md +31 -31
- package/skills/fec-doc-sync/SKILL.md +23 -23
- package/skills/fec-drawio-studio/SKILL.md +42 -38
- package/skills/fec-drawio-studio/data/THIRD_PARTY_NOTICES.md +1 -1
- package/skills/fec-drawio-studio/data/shape-index.json +83570 -0
- package/skills/fec-drawio-studio/references/diagram-patterns.md +19 -0
- package/skills/fec-drawio-studio/references/flowchart-quality.md +49 -0
- package/skills/fec-drawio-studio/references/layout-and-export.md +18 -3
- package/skills/fec-drawio-studio/references/xml-and-mermaid.md +5 -1
- package/skills/fec-drawio-studio/scripts/diagram-lint.mjs +62 -0
- package/skills/fec-drawio-studio/scripts/drawio-export.mjs +134 -0
- package/skills/fec-drawio-studio/scripts/shape-query.mjs +55 -15
- package/skills/fec-e2e-testing/SKILL.md +24 -24
- package/skills/fec-e2e-testing/references/e2e-ci-reporting.md +20 -20
- package/skills/fec-e2e-testing/references/e2e-special-scenarios.md +10 -10
- package/skills/fec-e2e-testing/references/e2e-visual-regression.md +17 -17
- package/skills/fec-e2e-testing/references/playwright-patterns.md +6 -6
- package/skills/fec-form-handling/SKILL.md +21 -21
- package/skills/fec-form-handling/references/advanced-form-patterns.md +41 -41
- package/skills/fec-image-generation/SKILL.md +84 -29
- package/skills/fec-image-generation/assets/interactive-diagram.html +371 -0
- package/skills/fec-image-generation/assets/quality-examples/README.md +14 -0
- package/skills/fec-image-generation/assets/quality-examples/architecture.json +121 -0
- package/skills/fec-image-generation/assets/quality-examples/invalid-explicit.json +41 -0
- package/skills/fec-image-generation/assets/quality-examples/sequence.json +53 -0
- package/skills/fec-image-generation/assets/quality-examples/sequence.mmd +21 -0
- package/skills/fec-image-generation/assets/quality-examples/workflow.json +98 -0
- package/skills/fec-image-generation/assets/quality-examples/workflow.mmd +7 -0
- package/skills/fec-image-generation/references/diagram-workflows.md +41 -3
- package/skills/fec-image-generation/references/html-technical-diagrams.md +243 -0
- package/skills/fec-image-generation/references/png-qa-autofix.md +9 -2
- package/skills/fec-image-generation/scripts/diagram-browser.mjs +90 -0
- package/skills/fec-image-generation/scripts/diagram-layout.mjs +176 -0
- package/skills/fec-image-generation/scripts/export-diagram.mjs +332 -0
- package/skills/fec-image-generation/scripts/interactive-diagram-server.mjs +654 -0
- package/skills/fec-image-generation/scripts/mermaid-render.mjs +64 -0
- package/skills/fec-image-generation/scripts/png-qa.mjs +35 -4
- package/skills/fec-image-generation/scripts/tech-diagram-render.mjs +1537 -0
- package/skills/fec-implement-from-design/SKILL.md +81 -81
- package/skills/fec-implement-from-design/references/design-plan-template.md +16 -16
- package/skills/fec-legacy-to-modern-migration/SKILL.md +29 -29
- package/skills/fec-legacy-to-modern-migration/references/migration-execution-checklist.md +81 -81
- package/skills/fec-legacy-to-modern-migration/references/migration-report-template.md +37 -37
- package/skills/fec-legacy-to-modern-migration/references/migration-strategy-and-mapping.md +31 -31
- package/skills/fec-legacy-web-standard/SKILL.md +17 -17
- package/skills/fec-legacy-web-standard/references/legacy-patterns.md +16 -16
- package/skills/fec-list-virtualization/SKILL.md +16 -16
- package/skills/fec-list-virtualization/references/virtualization-patterns.md +31 -31
- package/skills/fec-monorepo-project-standard/SKILL.md +52 -52
- package/skills/fec-motion-interaction/SKILL.md +51 -51
- package/skills/fec-motion-interaction/references/motion-patterns.md +11 -11
- package/skills/fec-nextjs-project-standard/SKILL.md +64 -64
- package/skills/fec-nuxt-project-standard/SKILL.md +57 -57
- package/skills/fec-performance-optimization/SKILL.md +54 -54
- package/skills/fec-performance-optimization/references/framework-performance-patterns.md +23 -23
- package/skills/fec-performance-optimization/references/report-template.md +31 -31
- package/skills/fec-pwa-implementation/SKILL.md +17 -17
- package/skills/fec-pwa-implementation/references/manifest-and-icons.md +12 -12
- package/skills/fec-pwa-implementation/references/service-worker-workbox.md +13 -13
- package/skills/fec-react-project-standard/SKILL.md +72 -72
- package/skills/fec-react-project-standard/references/react-performance-patterns.md +28 -28
- package/skills/fec-react-project-standard/references/react-project-structure.md +112 -112
- package/skills/fec-react-project-standard/references/react-quality-patterns.md +72 -72
- package/skills/fec-react-project-standard/references/react-runtime-patterns.md +94 -94
- package/skills/fec-refactor-clean/SKILL.md +33 -30
- package/skills/fec-refactor-clean/references/report-template.md +23 -23
- package/skills/fec-refactoring/SKILL.md +83 -0
- package/skills/fec-refactoring/references/principles.md +60 -0
- package/skills/fec-refactoring/references/refactoring-vs-feature-change.md +27 -0
- package/skills/fec-refactoring/references/when-to-refactor.md +31 -0
- package/skills/fec-refactoring/references/workflow.md +90 -0
- package/skills/fec-refactoring-api/SKILL.md +25 -0
- package/skills/fec-refactoring-api/references/api-refactorings.md +496 -0
- package/skills/fec-refactoring-catalog/SKILL.md +28 -0
- package/skills/fec-refactoring-catalog/references/catalog-index.md +99 -0
- package/skills/fec-refactoring-catalog/references/composition-guide.md +49 -0
- package/skills/fec-refactoring-catalog/references/selection-guide.md +47 -0
- package/skills/fec-refactoring-control/SKILL.md +25 -0
- package/skills/fec-refactoring-control/references/conditional-refactorings.md +299 -0
- package/skills/fec-refactoring-data/SKILL.md +25 -0
- package/skills/fec-refactoring-data/references/data-refactorings.md +248 -0
- package/skills/fec-refactoring-encapsulation/SKILL.md +25 -0
- package/skills/fec-refactoring-encapsulation/references/encapsulation-refactorings.md +452 -0
- package/skills/fec-refactoring-functions/SKILL.md +25 -0
- package/skills/fec-refactoring-functions/references/function-refactorings.md +567 -0
- package/skills/fec-refactoring-inheritance/SKILL.md +25 -0
- package/skills/fec-refactoring-inheritance/references/inheritance-refactorings.md +550 -0
- package/skills/fec-refactoring-move-features/SKILL.md +25 -0
- package/skills/fec-refactoring-move-features/references/moving-refactorings.md +453 -0
- package/skills/fec-refactoring-validation/SKILL.md +59 -0
- package/skills/fec-refactoring-validation/references/behavior-preservation.md +53 -0
- package/skills/fec-refactoring-validation/references/refactoring-test-checklist.md +42 -0
- package/skills/fec-responsive-layout/SKILL.md +17 -17
- package/skills/fec-responsive-layout/references/responsive-layout-patterns.md +37 -37
- package/skills/fec-route-protection/SKILL.md +26 -26
- package/skills/fec-security-review/SKILL.md +36 -20
- package/skills/fec-security-review/references/report-template.md +22 -12
- package/skills/fec-security-review/references/security-checklist.md +27 -27
- package/skills/fec-source-driven-development/SKILL.md +59 -59
- package/skills/fec-state-management/SKILL.md +34 -34
- package/skills/fec-state-management/references/state-patterns.md +19 -19
- package/skills/fec-storybook-component-doc/SKILL.md +19 -19
- package/skills/fec-storybook-component-doc/references/story-patterns.md +12 -12
- package/skills/fec-svg-animation/SKILL.md +32 -32
- package/skills/fec-tailwind-design-system/SKILL.md +17 -17
- package/skills/fec-tailwind-design-system/references/tailwind-system-patterns.md +36 -36
- package/skills/fec-tdd-workflow/SKILL.md +32 -28
- package/skills/fec-testing-strategy/SKILL.md +29 -29
- package/skills/fec-typescript-project-standard/SKILL.md +38 -38
- package/skills/fec-typescript-project-standard/references/type-safety-patterns.md +20 -20
- package/skills/fec-typescript-project-standard/references/type-safety.md +18 -18
- package/skills/fec-ui-design/SKILL.md +90 -90
- package/skills/fec-ui-design/references/design-intelligence.md +61 -61
- package/skills/fec-ui-design/references/master-page-overrides.md +15 -15
- package/skills/fec-ui-design/references/pre-delivery-checklist.md +38 -38
- package/skills/fec-validation-fix/SKILL.md +26 -26
- package/skills/fec-validation-fix/references/report-template.md +25 -25
- package/skills/fec-vite-project-standard/SKILL.md +39 -39
- package/skills/fec-vue3-project-standard/SKILL.md +38 -38
- package/skills/fec-vue3-project-standard/references/vue3-composables-routing.md +36 -36
- package/skills/fec-vue3-project-standard/references/vue3-performance-patterns.md +8 -8
- package/skills/fec-vue3-project-standard/references/vue3-project-structure.md +112 -112
- package/skills/fec-vue3-project-standard/references/vue3-state-api-quality.md +74 -74
- package/skills/fec-web-video-presentation/SKILL.md +33 -33
- package/skills/fec-web-workers/SKILL.md +16 -16
- package/skills/fec-web-workers/references/advanced-workers.md +13 -13
- package/skills/fec-web-workers/references/basic-worker.md +8 -8
- package/skills/metadata.json +485 -116
- package/skills/relations.json +268 -0
- package/templates/claude/CLAUDE.md +60 -60
- package/templates/codex/AGENTS.md +76 -76
- package/templates/codex/config.toml +4 -4
- package/templates/openclaw/AGENTS.md +68 -68
- package/templates/openclaw/OPENCLAW-CONFIG.md +8 -8
- package/templates/shared/rules/fec-agent-workflow.md +41 -40
- package/templates/shared/rules/fec-api-layer.md +52 -52
- package/templates/shared/rules/fec-ci-cd.md +29 -29
- package/templates/shared/rules/fec-code-comments.md +22 -22
- package/templates/shared/rules/fec-design-system.md +53 -53
- package/templates/shared/rules/fec-error-handling.md +40 -40
- package/templates/shared/rules/fec-git-conventions.md +42 -42
- package/templates/shared/rules/fec-i18n.md +48 -48
- package/templates/shared/rules/fec-naming-conventions.md +91 -91
- package/templates/shared/rules/fec-performance.md +78 -78
- package/templates/shared/rules/fec-react.md +58 -58
- package/templates/shared/rules/fec-refactoring.md +34 -34
- package/templates/shared/rules/fec-rendering-patterns.md +36 -36
- package/templates/shared/rules/fec-responsive-design.md +37 -37
- package/templates/shared/rules/fec-source-driven-development.md +22 -22
- package/templates/shared/rules/fec-state-management.md +56 -56
- package/templates/shared/rules/fec-testing.md +64 -64
- package/templates/shared/rules/fec-typescript.md +75 -75
- package/templates/shared/rules/fec-vue.md +42 -42
- package/templates/shared/rules/fec-working-modes.md +34 -34
- package/docs/superpowers/plans/2026-05-29-fec-debug.md +0 -491
- package/docs/superpowers/specs/2026-05-29-fec-debug-design.md +0 -340
- package/skills/fec-drawio-studio/data/shape-index.json.gz +0 -0
package/commands/fec-review.md
CHANGED
|
@@ -1,66 +1,96 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: fec-review
|
|
3
|
-
description:
|
|
3
|
+
description: Conduct a standardized review of the frontend changes, specified files/directories, or the whole project, output a graded review report and save it as a Markdown file.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
Conduct a comprehensive review of the front-end code. Read the project status and selected scope first (diffs only for change review), and then output the findings with evidence; do not write guesses as blocking items. If you need to **combine git diff, reduce noise output by severity level (CRITICAL→LOW), and explicitly give Approve/Warning/Block conclusions**, you can entrust the **`fec-code-reviewer`** subagent to execute; if the changes are mainly **`.ts` / `.tsx` / `.js` / `.jsx`** and you need to run **typecheck/eslint**, PR merge readiness check and Special conclusions on TS/JS idioms can be delegated to **`fec-typescript-reviewer`** (reported as `typescript-review-*.md`). Otherwise, continue to press this command and the `fec-code-review` Skill process.
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## Review modes and coverage
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
User-specified scope takes precedence over the default. Follow the three modes in `fec-code-review`:
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
- **Change review**: only when recent changes, current edits, staged changes, a PR or a commit are explicitly requested or clearly established by the active task, review those changes and necessary context. For local changes, inspect staged and unstaged diffs and relevant untracked project files within the requested scope; a staged-only request reviews only staged changes. If there are no changes, report that there is nothing to review; do not switch to recent commits or expand scope automatically.
|
|
13
|
+
- **Targeted review**: when files or directories are specified, inventory and review existing code in that scope, including unchanged code; no Git diff is required.
|
|
14
|
+
- **Project review (default)**: when no scope or change context is specified, or when the entire project is requested, inventory project-owned frontend code, related tests, configuration and dependency declarations, then review in module batches, including unchanged code; no Git diff is required.
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Select scope before collecting diffs. A file/directory alone means full review of that scope; a path combined with an explicit change request restricts incremental review to that path. An unqualified invocation defaults to project review even if Git changes exist. At review start, state the selected mode and target scope. When automatically delegating review after edits, pass the current change scope explicitly; do not trigger project review merely because the reviewer was called.
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
Exclude dependency directories, build outputs, caches, generated files and third-party code by default, and record exclusions. Keep the frontend responsibility boundary; this is not a backend audit. A nonexistent target or a scope with no relevant files must be reported explicitly, not replaced with another scope.
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
- 类型安全(any 使用、props 类型)
|
|
22
|
-
- 渲染与状态(重复渲染、key 稳定性)
|
|
23
|
-
- 样式(Token 使用、响应式)
|
|
24
|
-
- Tailwind / 设计系统(token、variant、暗色模式、动态 class)
|
|
25
|
-
- 可访问性(语义化、ARIA、键盘操作)
|
|
26
|
-
- 可维护性(文件体积、命名、重复逻辑)
|
|
27
|
-
- 测试(关键覆盖、测试模式)
|
|
28
|
-
- 安全(XSS、敏感信息、输入校验)
|
|
29
|
-
- 性能(首屏依赖、重复请求、长任务、大列表)
|
|
30
|
-
- 依赖升级(lockfile、peer dependency、CVE、大版本迁移验证)
|
|
20
|
+
Merge findings with the same root cause across batches. Report **review mode, target scope, reviewed files/modules, exclusions, unreviewed files/modules, completion status and verification commands/results**. If context or execution limits prevent completion, mark the review partial and list remaining modules; never claim complete project coverage. Reading callers for context or running project-wide lint/typecheck does not count as manual review of those files.
|
|
31
21
|
|
|
32
|
-
|
|
22
|
+
Change reviews retain merge recommendations. Targeted and project reviews use a risk assessment (Low / Medium / High, with blocking findings), not a claim of merge readiness. Preserve severity levels, evidence requirements and report filenames. Output reports only unless repairs are explicitly requested.
|
|
33
23
|
|
|
34
|
-
|
|
24
|
+
## Execution steps
|
|
25
|
+
|
|
26
|
+
1. Select one of the three modes above and inventory target files. Default to project review when no scope or change context is specified; an incremental request with no changes must not trigger scope expansion.
|
|
27
|
+
|
|
28
|
+
2. Include frontend source, related tests, configuration and dependency declarations, rather than filtering only by source extensions; record default exclusions.
|
|
29
|
+
|
|
30
|
+
3. Use the review dimensions of `fec-code-review` Skill to check item by item:
|
|
31
|
+
|
|
32
|
+
- Architecture (component boundaries, separation of responsibilities)
|
|
33
|
+
- Type safety (any usage, props type)
|
|
34
|
+
- Rendering and status (repeated rendering, key stability)
|
|
35
|
+
- Style (Token usage, responsiveness)
|
|
36
|
+
- Tailwind / design system (token, variant, dark mode, dynamic class)
|
|
37
|
+
- Accessibility (semantics, ARIA, keyboard operation)
|
|
38
|
+
- Maintainability (file size, naming, repetitive logic)
|
|
39
|
+
- Testing (critical coverage, test patterns)
|
|
40
|
+
- Security (XSS, sensitive information, input validation)
|
|
41
|
+
- Performance (first screen dependencies, repeated requests, long tasks, large lists)
|
|
42
|
+
- Dependency upgrade (lockfile, peer dependency, CVE, major version migration verification)
|
|
43
|
+
|
|
44
|
+
Each question must include file location, impact, confidence level, and recommended verification method.
|
|
45
|
+
|
|
46
|
+
4. Output the review report in the following format:
|
|
35
47
|
|
|
36
48
|
```
|
|
37
|
-
#
|
|
49
|
+
# Code review report
|
|
50
|
+
|
|
51
|
+
> Generation time: YYYY-MM-DD HH:mm
|
|
52
|
+
> Review tool: frontend-craft
|
|
38
53
|
|
|
39
|
-
>
|
|
40
|
-
>
|
|
54
|
+
> Review mode: change / targeted / project
|
|
55
|
+
> Target scope: paths or PR/commit
|
|
56
|
+
> Reviewed: file or module inventory
|
|
57
|
+
> Exclusions: paths and reasons
|
|
58
|
+
> Unreviewed: remaining files or modules (state none if complete)
|
|
59
|
+
> Completion: complete / partial
|
|
60
|
+
> Verification: commands, results and reasons for skipped checks
|
|
41
61
|
|
|
42
|
-
|
|
62
|
+
**Review Scope**: N documents
|
|
43
63
|
|
|
44
|
-
## 🔴
|
|
45
|
-
- **[
|
|
64
|
+
## 🔴 Must be modified (N items)
|
|
65
|
+
- **[File:line number]** Problem description → Suggested changes
|
|
46
66
|
|
|
47
|
-
## 🟡
|
|
48
|
-
- **[
|
|
67
|
+
## 🟡 Suggested optimizations (N items)
|
|
68
|
+
- **[File:line number]** Problem description → Suggested modifications
|
|
49
69
|
|
|
50
|
-
## 🔵
|
|
51
|
-
- **[
|
|
70
|
+
## 🔵 Optional optimization items (N items)
|
|
71
|
+
- **[File:line number]** Problem description
|
|
52
72
|
|
|
53
|
-
## 🟢
|
|
54
|
-
|
|
73
|
+
## 🟢 Things done well
|
|
74
|
+
-...
|
|
55
75
|
|
|
56
|
-
##
|
|
76
|
+
## Risk Level: Low / Medium / High
|
|
57
77
|
|
|
58
|
-
|
|
78
|
+
**Conclusion**: Change review: merge recommendation; targeted/project review: Low / Medium / High risk and blocking findings
|
|
59
79
|
```
|
|
60
80
|
|
|
61
|
-
5.
|
|
62
|
-
-
|
|
63
|
-
-
|
|
64
|
-
-
|
|
81
|
+
5. Use the Write tool to save the report content as a Markdown file:
|
|
82
|
+
- Directory: `reports/` in the project root directory (create it if it does not exist)
|
|
83
|
+
- Filename: `code-review-YYYY-MM-DD-HHmmss.md` (use current timestamp)
|
|
84
|
+
- Inform the user of the report file path after saving
|
|
85
|
+
|
|
86
|
+
6. If the user agrees to the modification, directly repair the items that can be automatically repaired in "Must Modify".
|
|
87
|
+
|
|
88
|
+
## Usage examples
|
|
89
|
+
|
|
90
|
+
- `/fec-review`: review the entire project by default.
|
|
91
|
+
- `/fec-review review recent changes`: review only current changes.
|
|
92
|
+
- `/fec-review review src/components/Button.tsx`: review the specified file, including unchanged code.
|
|
93
|
+
- `/fec-review review src/features/`: review the specified directory.
|
|
94
|
+
- `/fec-review review the entire project`: inventory and review project-owned frontend code by module.
|
|
65
95
|
|
|
66
|
-
|
|
96
|
+
These are natural-language instructions, not new CLI flags.
|
package/commands/fec-scaffold.md
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: fec-scaffold
|
|
3
|
-
description:
|
|
3
|
+
description: "Create a standard directory structure and template files for pages, features, or components according to project specifications. Usage: /fec-scaffold <type> <Name>, such as /fec-scaffold page UserDetail"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
Create new pages, features or components according to the directory structure agreed upon by the project.
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## Dependencies and versions
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
If this scaffolding involves adding or recommending `package.json` dependencies, follow the "version and dependency" conventions in the project `.claude/rules/fec-react.md` or `.claude/rules/fec-vue.md`; if there is no corresponding rule in the project, priority will be given to mainstream stable versions that are compatible with each other (align with official documents, scaffolding default values or package manager recommendations).
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## Parameter analysis
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
- **type**: `page` | `feature` | `component
|
|
16
|
-
- **name**:
|
|
14
|
+
Parse two arguments from `$ARGUMENTS`:
|
|
15
|
+
- **type**: `page` | `feature` | `component` (required)
|
|
16
|
+
- **name**: module name, using PascalCase (required)
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
If a parameter is missing, a usage example is prompted and the user is asked to add:
|
|
19
19
|
```
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
Usage: /fec-scaffold <type> <Name>
|
|
21
|
+
Example:
|
|
22
22
|
/fec-scaffold page UserDetail
|
|
23
23
|
/fec-scaffold feature payment
|
|
24
24
|
/fec-scaffold component DataTable
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
##
|
|
27
|
+
## Execution steps
|
|
28
28
|
|
|
29
|
-
### 1.
|
|
29
|
+
### 1. Detection project framework
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
31
|
+
Check `package.json` for `dependencies`:
|
|
32
|
+
- Contains `react` → React project
|
|
33
|
+
- Contains `vue` → Vue project
|
|
34
|
+
- None → Prompt user to specify manually
|
|
35
35
|
|
|
36
|
-
### 2.
|
|
36
|
+
### 2. Detect project conventions and determine target paths
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
Check `src/`, `app/`, `pages/`, `features/`, `components/`, `__tests__/`, `tests/`, `vitest.config.*`, `jest.config.*`, `playwright.config.*` and existing component naming. Give priority to reusing existing directories of the project; only use the default path when there is no existing agreement:
|
|
39
39
|
- page → `src/pages/<Name>/`
|
|
40
|
-
- feature → `src/features/<name
|
|
40
|
+
- feature → `src/features/<name>/` (name is converted to kebab-case)
|
|
41
41
|
- component → `src/components/<Name>/`
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
If the target directory already exists, the user is prompted to confirm whether to continue.
|
|
44
44
|
|
|
45
|
-
### 3.
|
|
45
|
+
### 3. Create directories and files
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
Depending on the frame and type, create the following structures:
|
|
48
48
|
|
|
49
49
|
#### React page
|
|
50
50
|
|
|
@@ -52,12 +52,12 @@ description: 按项目规范创建 page、feature 或 component 的标准目录
|
|
|
52
52
|
src/pages/<Name>/
|
|
53
53
|
├── <Name>Page.tsx
|
|
54
54
|
├── components/
|
|
55
|
-
│
|
|
55
|
+
│ └── .gitkeep
|
|
56
56
|
└── hooks/
|
|
57
57
|
└── .gitkeep
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
-
`<Name>Page.tsx`
|
|
60
|
+
`<Name>Page.tsx` Content:
|
|
61
61
|
|
|
62
62
|
```tsx
|
|
63
63
|
export default function <Name>Page() {
|
|
@@ -74,29 +74,29 @@ export default function <Name>Page() {
|
|
|
74
74
|
```
|
|
75
75
|
src/features/<name>/
|
|
76
76
|
├── components/
|
|
77
|
-
│
|
|
77
|
+
│ └── .gitkeep
|
|
78
78
|
├── hooks/
|
|
79
|
-
│
|
|
79
|
+
│ └── .gitkeep
|
|
80
80
|
├── api.ts
|
|
81
81
|
├── types.ts
|
|
82
82
|
├── constants.ts
|
|
83
83
|
└── index.ts
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
-
`index.ts`
|
|
86
|
+
`index.ts` content:
|
|
87
87
|
|
|
88
88
|
```typescript
|
|
89
89
|
export * from './types';
|
|
90
90
|
export * from './constants';
|
|
91
91
|
```
|
|
92
92
|
|
|
93
|
-
`api.ts`
|
|
93
|
+
`api.ts` content (only import the corresponding client when the project already has `src/services/request.*`, `src/lib/request.*`, `src/api/client.*` or a similar API client; otherwise, keep the empty export to avoid creating non-existent alias dependencies):
|
|
94
94
|
|
|
95
95
|
```typescript
|
|
96
96
|
export {};
|
|
97
97
|
```
|
|
98
98
|
|
|
99
|
-
`types.ts`
|
|
99
|
+
`types.ts` and `constants.ts` are created as empty files or minimally empty exports.
|
|
100
100
|
|
|
101
101
|
#### React component
|
|
102
102
|
|
|
@@ -108,7 +108,7 @@ src/components/<Name>/
|
|
|
108
108
|
└── <Name>.spec.tsx
|
|
109
109
|
```
|
|
110
110
|
|
|
111
|
-
`<Name>.tsx`
|
|
111
|
+
`<Name>.tsx` Content:
|
|
112
112
|
|
|
113
113
|
```tsx
|
|
114
114
|
import './<Name>.styles.css';
|
|
@@ -132,12 +132,12 @@ export function <Name>({ children }: <Name>Props) {
|
|
|
132
132
|
src/pages/<Name>/
|
|
133
133
|
├── <Name>Page.vue
|
|
134
134
|
├── components/
|
|
135
|
-
│
|
|
135
|
+
│ └── .gitkeep
|
|
136
136
|
└── composables/
|
|
137
137
|
└── .gitkeep
|
|
138
138
|
```
|
|
139
139
|
|
|
140
|
-
`<Name>Page.vue`
|
|
140
|
+
`<Name>Page.vue` Content:
|
|
141
141
|
|
|
142
142
|
```vue
|
|
143
143
|
<script setup lang="ts">
|
|
@@ -158,16 +158,16 @@ src/pages/<Name>/
|
|
|
158
158
|
```
|
|
159
159
|
src/features/<name>/
|
|
160
160
|
├── components/
|
|
161
|
-
│
|
|
161
|
+
│ └── .gitkeep
|
|
162
162
|
├── composables/
|
|
163
|
-
│
|
|
163
|
+
│ └── .gitkeep
|
|
164
164
|
├── api.ts
|
|
165
165
|
├── types.ts
|
|
166
166
|
├── constants.ts
|
|
167
167
|
└── index.ts
|
|
168
168
|
```
|
|
169
169
|
|
|
170
|
-
`index.ts`
|
|
170
|
+
`index.ts` content is the same as React.
|
|
171
171
|
|
|
172
172
|
#### Vue component
|
|
173
173
|
|
|
@@ -178,7 +178,7 @@ src/components/<Name>/
|
|
|
178
178
|
└── <Name>.spec.ts
|
|
179
179
|
```
|
|
180
180
|
|
|
181
|
-
`<Name>.vue`
|
|
181
|
+
`<Name>.vue` Content:
|
|
182
182
|
|
|
183
183
|
```vue
|
|
184
184
|
<script setup lang="ts">
|
|
@@ -198,8 +198,8 @@ const props = defineProps<Props>();
|
|
|
198
198
|
</style>
|
|
199
199
|
```
|
|
200
200
|
|
|
201
|
-
### 4.
|
|
201
|
+
### 4. Output confirmation
|
|
202
202
|
|
|
203
|
-
|
|
204
|
-
-
|
|
205
|
-
-
|
|
203
|
+
After creation is completed, output:
|
|
204
|
+
- List of files created
|
|
205
|
+
- Next step suggestions (such as "Register new page in routing configuration", "Export public API in index.ts")
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: fec-smell
|
|
3
|
+
description: Diagnose frontend code smells with evidence and candidate refactorings without changing business code.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Use this command for **DIAGNOSE ONLY** analysis. Do not modify business code.
|
|
7
|
+
|
|
8
|
+
## Workflow
|
|
9
|
+
|
|
10
|
+
1. Discover the requested scope, project/framework facts, and current diff.
|
|
11
|
+
2. Collect concrete evidence about ownership, duplication, change coupling, data flow, control flow, and public boundaries.
|
|
12
|
+
3. Match evidence against the 24-smell catalog and run false-positive checks.
|
|
13
|
+
4. For each finding report: `Location`, `Evidence`, `Impact`, `Smell`, `Confidence`, `Candidates`, `Priority`, and `False-positive check`.
|
|
14
|
+
5. LOW-confidence findings remain open questions and must not become automatic edits.
|
|
15
|
+
6. Save the result to `reports/refactoring/smell-YYYY-MM-DD-HHmmss.md`.
|
|
16
|
+
|
|
17
|
+
Metrics such as LOC or complexity may focus investigation but are not sufficient proof by themselves.
|
package/commands/fec-tdd.md
CHANGED
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: fec-tdd
|
|
3
|
-
description:
|
|
3
|
+
description: "Use front-end TDD workflow to implement functions, fix bugs, or refactor logic: first write failing tests, then implement minimal code, and then refactor."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
Perform test-driven development as per `fec-tdd-workflow`.
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## Execution steps
|
|
9
9
|
|
|
10
|
-
1.
|
|
11
|
-
2.
|
|
12
|
-
3.
|
|
13
|
-
4.
|
|
14
|
-
5.
|
|
15
|
-
6.
|
|
10
|
+
1. Identify the front-end behavior to be verified.
|
|
11
|
+
2. Select the test layer for the nearest risk: Unit, Component, Lightweight Integration, or E2E.
|
|
12
|
+
3. Write a minimum failure test and run it to confirm that the failure reason is correct.
|
|
13
|
+
4. Write the minimum implementation to make the test pass.
|
|
14
|
+
5. Keep the tests passed before refactoring.
|
|
15
|
+
6. Summarize test orders, coverage actions, and remaining risks.
|
|
16
16
|
|
|
17
|
-
##
|
|
17
|
+
## Diversion
|
|
18
18
|
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
19
|
+
- Component and hook testing: `fec-component-testing`
|
|
20
|
+
- Cross-page browser process: `fec-e2e-testing`
|
|
21
|
+
- Test layering strategy: `fec-testing-strategy`
|
|
22
|
+
|
|
23
|
+
## Boundary
|
|
24
|
+
|
|
25
|
+
Use this command for new observable behavior and behavior-changing bug fixes. For pure behavior-preserving refactoring, do not invent a RED test: characterize the already-correct behavior and keep it GREEN → REFACTOR → GREEN.
|