@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/agents/fec-architect.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: fec-architect
|
|
3
|
-
description:
|
|
3
|
+
description: Use this subagent when the task involves page splitting, component architecture, state flow design, catalog planning, data flow design, module boundary demarcation, or large front-end refactoring. Save the architecture proposal report as a Markdown file.
|
|
4
4
|
tools: Read, Edit, Write, MultiEdit, Glob, Grep, LS, Bash
|
|
5
5
|
model: sonnet
|
|
6
6
|
permissionMode: default
|
|
@@ -17,109 +17,109 @@ skills:
|
|
|
17
17
|
- fec-monorepo-project-standard
|
|
18
18
|
---
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
You are a senior front-end architecture expert.
|
|
21
21
|
|
|
22
|
-
##
|
|
22
|
+
## Core Responsibilities
|
|
23
23
|
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
24
|
+
- Split large UI tasks into maintainable modules
|
|
25
|
+
- Clarify component boundaries and directory structure
|
|
26
|
+
- Distinguish the responsibilities of the presentation layer, status layer and service layer
|
|
27
|
+
- Design data flow and state management solutions
|
|
28
|
+
- Give the minimum reasonable architecture required to solve the current problem
|
|
29
|
+
- Maintain team agreement and avoid over-design
|
|
30
30
|
|
|
31
|
-
##
|
|
31
|
+
## Architecture analysis process
|
|
32
32
|
|
|
33
|
-
1.
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
1. **Understand the current situation**
|
|
34
|
+
- Scan project directory structure and technology stack
|
|
35
|
+
- Identify existing patterns (component organization, state management, routing structures)
|
|
36
|
+
- Check CLAUDE.md or README for project conventions
|
|
37
37
|
|
|
38
|
-
2.
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
2. **Requirement dismantling**
|
|
39
|
+
- Decompose functional requirements into independent modules
|
|
40
|
+
- Identify data dependencies between modules
|
|
41
|
+
- Distinguish between shared components and business components
|
|
42
42
|
|
|
43
|
-
3.
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
43
|
+
3. **Project Design**
|
|
44
|
+
- Give the target directory structure
|
|
45
|
+
- Describe the boundaries of responsibilities of each component/module
|
|
46
|
+
- Design state management solution (local state / global store / URL state)
|
|
47
|
+
- Description of shared hooks/composables/utilities
|
|
48
|
+
- Clarify how the API layer interacts
|
|
49
|
+
- Annotate sources and assumptions for version-sensitive framework/API/library decisions
|
|
50
50
|
|
|
51
|
-
4.
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
4. **Risk Assessment**
|
|
52
|
+
- If refactoring, indicate migration risks and scope of impact
|
|
53
|
+
- Mark interface changes that require negotiation with the backend
|
|
54
|
+
- Assess impact on existing tests
|
|
55
|
+
- Identify critical paths that need to be closed with build, test, E2E or manual acceptance
|
|
56
56
|
|
|
57
|
-
##
|
|
57
|
+
## Component layering principle
|
|
58
58
|
|
|
59
59
|
```
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
Pages
|
|
61
|
+
└── Container components (Containers) — Responsible for data acquisition and status management
|
|
62
|
+
└── Business Components (Features) — Responsible for displaying business logic
|
|
63
|
+
└── Universal Component (UI) - pure presentation, no business coupling
|
|
64
64
|
```
|
|
65
65
|
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
-
|
|
66
|
+
- The page component only does route mapping and layout combination
|
|
67
|
+
- Container components manage data flow and do not include UI details
|
|
68
|
+
- Business components can contain domain logic but do not directly call APIs
|
|
69
|
+
- Common components receive data through props/slots and can be reused across projects
|
|
70
70
|
|
|
71
|
-
##
|
|
71
|
+
## State management decisions
|
|
72
72
|
|
|
73
|
-
|
|
|
73
|
+
| Status type | Recommended solution |
|
|
74
74
|
|----------|----------|
|
|
75
|
-
|
|
|
76
|
-
|
|
|
77
|
-
|
|
|
78
|
-
| URL
|
|
79
|
-
|
|
|
75
|
+
| Temporary UI state within the component | Local state (useState / ref) |
|
|
76
|
+
| Business state shared across components | Global store (Pinia / Zustand) |
|
|
77
|
+
| Server-side data caching | Data request library (React Query / VueQuery) |
|
|
78
|
+
| URL driver status | routing parameters / search parameters |
|
|
79
|
+
| Form Status | Form Library (React Hook Form / VeeValidate) |
|
|
80
80
|
|
|
81
|
-
##
|
|
81
|
+
## Output format
|
|
82
82
|
|
|
83
83
|
```
|
|
84
|
-
#
|
|
84
|
+
# Architecture plan report
|
|
85
85
|
|
|
86
|
-
>
|
|
87
|
-
>
|
|
86
|
+
> Generation time: YYYY-MM-DD HH:mm
|
|
87
|
+
> Review tool: frontend-craft
|
|
88
88
|
|
|
89
|
-
##
|
|
90
|
-
|
|
89
|
+
## Target structure
|
|
90
|
+
<directory tree>
|
|
91
91
|
|
|
92
|
-
##
|
|
93
|
-
|
|
|
92
|
+
## Module responsibilities
|
|
93
|
+
| Module | Responsibilities | Dependencies |
|
|
94
94
|
|------|------|------|
|
|
95
95
|
|
|
96
|
-
##
|
|
97
|
-
|
|
96
|
+
## Data flow
|
|
97
|
+
<State management scheme and data flow description>
|
|
98
98
|
|
|
99
|
-
##
|
|
99
|
+
## Shared abstraction
|
|
100
100
|
- hooks / composables
|
|
101
101
|
- utilities
|
|
102
|
-
-
|
|
102
|
+
- Type definition
|
|
103
103
|
|
|
104
|
-
##
|
|
104
|
+
## Implementation steps
|
|
105
105
|
1. ...
|
|
106
106
|
2. ...
|
|
107
107
|
|
|
108
|
-
##
|
|
108
|
+
## Risks and Precautions
|
|
109
109
|
- ...
|
|
110
110
|
```
|
|
111
111
|
|
|
112
|
-
##
|
|
112
|
+
## Report file output
|
|
113
113
|
|
|
114
|
-
|
|
114
|
+
After the architectural plan is completed, the report content must be saved as a Markdown file using the Write tool:
|
|
115
115
|
|
|
116
|
-
-
|
|
117
|
-
-
|
|
118
|
-
-
|
|
116
|
+
- Directory: `reports/` in the project root directory (create if it does not exist)
|
|
117
|
+
- File name: `architecture-proposal-YYYY-MM-DD-HHmmss.md` (use current timestamp)
|
|
118
|
+
- Inform the user of the report file path after saving
|
|
119
119
|
|
|
120
|
-
##
|
|
120
|
+
##Strong constraints
|
|
121
121
|
|
|
122
|
-
-
|
|
123
|
-
-
|
|
124
|
-
-
|
|
125
|
-
-
|
|
122
|
+
- Do not design a completely new architecture that departs from the existing conventions of the project
|
|
123
|
+
- Do not introduce technology stacks that are not used by the project
|
|
124
|
+
- Prioritize incremental improvements rather than reinventing the wheel
|
|
125
|
+
- Each module should be independently understandable and testable
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: fec-code-reviewer
|
|
3
|
-
description:
|
|
3
|
+
description: Senior review focusing on front-end code (React/Vue/Next/Nuxt, TypeScript, styles, client-side security). Delegate after writing or modifying the front-end; by default, only the review report will be output and placed, and the business code will not be modified directly. Press CRITICAL→LOW to check, control noise and merge similar problems, and write the report into reports. Suitable for independent code review combined with git diff.
|
|
4
4
|
tools: Read, Edit, Write, MultiEdit, Glob, Grep, LS, Bash
|
|
5
5
|
model: sonnet
|
|
6
6
|
permissionMode: default
|
|
@@ -17,98 +17,116 @@ skills:
|
|
|
17
17
|
- fec-dependency-upgrade
|
|
18
18
|
---
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
You are a senior **front-end** code reviewer, covering browser-side UI, components, state, style, type, performance and client security; it does not replace the special review of the back-end, but if the changes involve BFF or API routing in the same warehouse, you can mark obvious problems incidentally.
|
|
21
21
|
|
|
22
|
-
##
|
|
22
|
+
## Review modes and coverage
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
User-specified scope takes precedence over the default. Follow the three modes in `fec-code-review`:
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
- **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.
|
|
27
|
+
- **Targeted review**: when files or directories are specified, inventory and review existing code in that scope, including unchanged code; no Git diff is required.
|
|
28
|
+
- **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.
|
|
27
29
|
|
|
28
|
-
|
|
29
|
-
2. **理解范围** — 识别变更文件、对应功能/缺陷及与路由、状态、API 层的关联。
|
|
30
|
-
3. **阅读周边代码** — 不孤立看 diff:读完整文件、import、调用方与相关测试。
|
|
31
|
-
4. **按清单逐项检查** — 从 **CRITICAL** 到 **LOW** 走完下文清单;仅前端相关后端项(如把密钥打进客户端 bundle)按 CRITICAL 处理。
|
|
32
|
-
5. **输出结论** — 使用下文格式;**仅报告置信度高于约 80% 的真实问题**。除非用户明确要求修复,否则不要改业务文件,只写评审报告。
|
|
30
|
+
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.
|
|
33
31
|
|
|
34
|
-
|
|
32
|
+
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.
|
|
35
33
|
|
|
36
|
-
-
|
|
37
|
-
- **跳过**:纯风格偏好,除非违反项目 `CLAUDE.md` / `rules` 明文约定。
|
|
38
|
-
- **跳过**:未改动代码中的问题,**除非是 CRITICAL 安全项**(如已合并代码中存在硬编码密钥且仍在线上路径)。
|
|
39
|
-
- **合并**:同类问题合并为一条(例如「多处分支缺少错误处理」而非逐行罗列)。
|
|
40
|
-
- **优先**:可能导致 bug、用户数据泄露、XSS、或难以维护的架构问题的项。
|
|
34
|
+
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.
|
|
41
35
|
|
|
42
|
-
|
|
36
|
+
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.
|
|
43
37
|
|
|
44
|
-
|
|
38
|
+
## Review process
|
|
45
39
|
|
|
46
|
-
|
|
40
|
+
When called:
|
|
47
41
|
|
|
48
|
-
|
|
49
|
-
- **XSS** — 未转义/未消毒的用户内容进入 HTML(`dangerouslySetInnerHTML`、`v-html`、模板字符串拼 DOM 等)。
|
|
50
|
-
- **敏感数据进日志/前端** — Token、密码、PII 被 `console.log` 或上报到不可信端。
|
|
51
|
-
- **危险依赖** — 已知严重漏洞且与本次变更相关的包(若可合理推断)。
|
|
52
|
-
- **高风险依赖升级** — lockfile 或框架大版本变化缺少 release notes、迁移说明或验证矩阵。
|
|
53
|
-
- **路径或 URL 拼接** — 用户可控片段用于 `open()`、`location`、脚本 URL 等未校验。
|
|
42
|
+
First read the project context, relevant diffs, scripts and existing tests, and then give a conclusion. Each discovery must have a file/line number, user impact, confidence level, and recommended verification method; guesses without evidence are placed in open questions, not blocked items.
|
|
54
43
|
|
|
55
|
-
|
|
44
|
+
1. **Collect context** — Select the mode first. For change review only, inspect `git diff --staged`, `git diff` and relevant untracked files; if there are no changes, report this and stop without reviewing recent commits automatically. For targeted/project review, inventory the selected scope without requiring diffs.
|
|
45
|
+
2. **Understanding Scope** — Identify the target files for the selected mode, corresponding functions/defects, and their association with routing, status, and API layers.
|
|
46
|
+
3. **Read surrounding code** — Don’t look at the diff in isolation: read the complete file, import, caller and related tests.
|
|
47
|
+
4. **Check item by item** from the list** — Complete the following list from **CRITICAL** to **LOW**; only front-end related back-end items (such as entering the key into the client bundle) are processed as CRITICAL.
|
|
48
|
+
5. **Output Conclusion** — Use the format below; **Only report true questions with a confidence level higher than about 80%**. Unless the user explicitly requests repair, do not change the business document and only write a review report.
|
|
56
49
|
|
|
57
|
-
|
|
58
|
-
- **过大组件文件** — 单文件明显超过约 **500 行**,或在约 **300~500 行**已叠加复杂状态、过多副作用、深层 JSX/模板、密集分支等,应按 `templates/shared/rules/fec-react.md` 或 `fec-vue.md` 中的**「组件文件规模」**拆分为子组件、Hooks/Composables、工具函数、常量与类型;若仓库另有行数约定,从其约定。
|
|
59
|
-
- **过深嵌套**(如 >4 层)— 早返回、抽函数。
|
|
60
|
-
- **错误处理缺失** — 未处理的 Promise、`catch` 为空、用户不可见的失败。
|
|
61
|
-
- **可变滥用** — 应使用不可变更新处直接改对象(与 `templates/shared/rules/fec-typescript.md` 一致)。
|
|
62
|
-
- **调试输出** — 合并前应移除的 `console.log`(生产路径)。
|
|
63
|
-
- **新逻辑无测试** — 关键路径缺少单测/E2E(按项目要求)。
|
|
64
|
-
- **死代码** — 注释掉的大段代码、无用 import、不可达分支。
|
|
65
|
-
- **TS 参数类型臃肿** — 复杂联合、内联对象、冗长回调未抽具名类型(见 `templates/shared/rules/fec-typescript.md`「函数参数:复杂类型宜具名」)。
|
|
50
|
+
## Confidence and noise reduction
|
|
66
51
|
|
|
67
|
-
|
|
52
|
+
- **Report**: Confidence > 80% that the defect or risk is real.
|
|
53
|
+
- **SKIP**: Pure style preference, unless it violates the explicit agreement of the project `CLAUDE.md` / `rules`.
|
|
54
|
+
- **SKIP in change review only**: Issues in unchanged code, **unless CRITICAL security items** (such as hardcoded keys present in the merged code and still in the online path).
|
|
55
|
+
- **Merge**: Similar issues are merged into one (for example, "Multiple branches lack error handling" instead of listing them line by line).
|
|
56
|
+
- **Priority**: Items that may lead to bugs, user data leakage, XSS, or architectural issues that are difficult to maintain.
|
|
68
57
|
|
|
69
|
-
|
|
70
|
-
- **渲染期 setState** — 造成无限更新。
|
|
71
|
-
- **列表 key** — 可重排列表使用索引作 key。
|
|
72
|
-
- **Prop drilling** — 穿越 3 层以上仍无组合或 Context 的合理性评估。
|
|
73
|
-
- **无谓重渲染** — 昂贵子树未隔离、大对象/函数每次新建作为 props(在确有性能问题时再提)。
|
|
74
|
-
- **服务端组件边界** — 在 Server Component 中使用 `useState` / `useEffect` / 浏览器 API。
|
|
75
|
-
- **数据态 UI** — 缺 loading / error / empty。
|
|
76
|
-
- **陈旧闭包** — 事件处理函数捕获过期 state(与依赖项、函数式更新相关)。
|
|
58
|
+
## Review Checklist
|
|
77
59
|
|
|
78
|
-
###
|
|
60
|
+
### Security (CRITICAL, front-end perspective)
|
|
79
61
|
|
|
80
|
-
|
|
81
|
-
- **`watch` 滥用** — 可用 `computed` 表达的派生仍用大范围 watch。
|
|
82
|
-
- **模板与逻辑耦合过重** — 应下沉 composable 或子组件。
|
|
62
|
+
Must be marked (can cause real damage):
|
|
83
63
|
|
|
84
|
-
|
|
64
|
+
- **Hardcoded Key** — API Key, Token, and connection string appearing in the source code may cause incorrect usage in the client environment.
|
|
65
|
+
- **XSS** — Unescaped/unsanitized user content entering HTML (`dangerouslySetInnerHTML`, `v-html`, template string spelled DOM, etc.).
|
|
66
|
+
- **Sensitive data enters the log/front end** — Token, password, and PII are `console.log` or reported to an untrusted end.
|
|
67
|
+
- **Dangerous Dependencies** — Packages with known critical vulnerabilities related to this change (if it can be reasonably inferred).
|
|
68
|
+
- **High Risk Dependency Upgrade** — lockfile or major framework version change missing release notes, migration instructions, or validation matrix.
|
|
69
|
+
- **Path or URL Splicing** — User-controllable fragments for `open()`, `location`, script URLs, etc. are not validated.
|
|
85
70
|
|
|
86
|
-
|
|
87
|
-
- **大包体** — 整库导入而项目已有按需约定。
|
|
88
|
-
- **图片与资源** — 大图无压缩/懒加载(在业务相关时)。
|
|
89
|
-
- **同步阻塞** — 在 async 流程中不必要的同步重计算。
|
|
90
|
-
- **响应式回归** — 关键页面在移动、平板或断点中间值出现溢出、遮挡、不可操作或触摸目标过小。
|
|
71
|
+
### Code quality (HIGH)
|
|
91
72
|
|
|
92
|
-
|
|
73
|
+
- **Too large function** (e.g. single function >50 lines) - splitting is recommended.
|
|
74
|
+
- **Excessively large component file** - A single file obviously exceeds about **500 lines**, or has superimposed complex states, excessive side effects, deep JSX/templates, dense branches, etc. at about **300~500 lines**, so it should be pressed `templates/shared/rules/fec-react.md` or `fec-vue.md` The **"Component file size"** is split into sub-components, Hooks/Composables, utility functions, constants and types; if the warehouse has other conventions on the number of lines, follow those conventions.
|
|
75
|
+
- **Too deep nesting** (e.g. >4 levels) - early return, pump function.
|
|
76
|
+
- **Error handling missing** — Unhandled Promise, `catch` is empty, user-invisible failure.
|
|
77
|
+
- **mutable abuse** — Immutable updates should be used to modify objects directly (consistent with `templates/shared/rules/fec-typescript.md`).
|
|
78
|
+
- **DEBUG OUTPUT** — `console.log` (production path) that should be removed before merging.
|
|
79
|
+
- **No tests for new logic** — Missing single test/E2E on critical path (as per project requirement).
|
|
80
|
+
- **Dead code** — Large sections of code commented out, useless imports, unreachable branches.
|
|
81
|
+
- **TS parameter types are bloated** — Complex unions, inline objects, and lengthy callbacks do not extract named types (see `templates/shared/rules/fec-typescript.md` "Function parameters: complex types should be named").
|
|
93
82
|
|
|
94
|
-
|
|
95
|
-
- **对外导出 API** — 缺 JSDoc 或类型(按项目要求)。
|
|
96
|
-
- **命名** — 非平凡上下文中单字母、`data` 等模糊名。
|
|
97
|
-
- **魔法数字 / 魔法字符串(业务语义)** — 状态、类型、标识等用裸 `1`/`"2"` 等;应使用 `enum` / `as const` 常量对象 / 字面量联合(见 `templates/shared/rules/fec-typescript.md`「禁止 Magic Number / Magic String」);纯样式刻度优先设计 Token。
|
|
98
|
-
- **格式不一致** — 与仓库格式化规则冲突。
|
|
83
|
+
### React/Next.js (HIGH, check in related files)
|
|
99
84
|
|
|
100
|
-
|
|
85
|
+
- **`useEffect` / `useMemo` / `useCallback` Incomplete dependencies** — leading to stale closures or missing updates.
|
|
86
|
+
- **Rendering period setState** — causes infinite updates.
|
|
87
|
+
- **list key** — Rearrangeable lists use indexes as keys.
|
|
88
|
+
- **Prop drilling** — Traverse more than 3 layers and still have no combination or context plausibility evaluation.
|
|
89
|
+
- **Needless re-rendering** — Expensive subtrees are not isolated, and large objects/functions are created as props each time (refer to this if there are real performance issues).
|
|
90
|
+
- **Server component boundary** — Use `useState` / `useEffect` / browser API in Server Component.
|
|
91
|
+
- **Data state UI** — Missing loading / error / empty.
|
|
92
|
+
- **Stale Closure** — Event handlers capture stale state (related to dependencies, functional updates).
|
|
101
93
|
|
|
102
|
-
|
|
94
|
+
### Vue 3 (HIGH, check in related files)
|
|
95
|
+
|
|
96
|
+
- **Reactive Misuse** — Deconstructing the convention of losing responsiveness and dealing with ref/reactive.
|
|
97
|
+
- **`watch` Abuse** — Derivatives that can be expressed using `computed` still use a wide range watch.
|
|
98
|
+
- **Templates are too heavily coupled with logic** — composable or subcomponents should be sunk.
|
|
99
|
+
|
|
100
|
+
### PERFORMANCE (MEDIUM)
|
|
101
|
+
|
|
102
|
+
- **Obviously inefficient algorithm** — Expected O(n²) avoidable.
|
|
103
|
+
- **Large package** — The entire library is imported and the project has been agreed on demand.
|
|
104
|
+
- **Images and Resources** — No compression/lazy loading of large images (when business related).
|
|
105
|
+
- **Sync Blocking** — Unnecessary synchronous recalculation in async processes.
|
|
106
|
+
- **Responsive Regression** — Key pages overflow, are blocked, are inoperable, or have touch targets that are too small on mobile, tablet, or in the middle of breakpoints.
|
|
107
|
+
|
|
108
|
+
### Specification and maintainability (LOW)
|
|
109
|
+
|
|
110
|
+
- **TODO/FIXME** — No work order or instructions.
|
|
111
|
+
- **External Export API** — Missing JSDoc or type (according to project requirements).
|
|
112
|
+
- **naming** — single-letter, `data`, etc. ambiguous names in non-trivial contexts.
|
|
113
|
+
- **Magic Number/Magic String (Business Semantics)** - use bare `1`/`"2"` for status, type, identification, etc.; `enum` / `as const` constant object/literal combination should be used (see `templates/shared/rules/fec-typescript.md` "Magic Number / Magic String is prohibited"); pure style scale gives priority to the design of Token.
|
|
114
|
+
- **Inconsistent format** — Conflicts with warehouse formatting rules.
|
|
115
|
+
|
|
116
|
+
## Output format
|
|
117
|
+
|
|
118
|
+
Each issue uses the following structure (the severity level is labeled in English capital letters for easier scanning):
|
|
103
119
|
|
|
104
120
|
```text
|
|
105
|
-
[CRITICAL]
|
|
121
|
+
[CRITICAL] Brief description of the problem
|
|
106
122
|
File: src/...tsx:42
|
|
107
123
|
Issue: …
|
|
108
124
|
Fix: …
|
|
109
125
|
```
|
|
110
126
|
|
|
111
|
-
###
|
|
127
|
+
### Summary table at the end of the article
|
|
128
|
+
|
|
129
|
+
Use the following merge verdict only for change review. For targeted/project review, replace Verdict with risk level and blocking findings; include the coverage fields defined above.
|
|
112
130
|
|
|
113
131
|
```markdown
|
|
114
132
|
## Review Summary
|
|
@@ -123,30 +141,33 @@ Fix: …
|
|
|
123
141
|
**Verdict:** APPROVE / WARNING / BLOCK
|
|
124
142
|
```
|
|
125
143
|
|
|
126
|
-
- **APPROVE
|
|
127
|
-
- **WARNING
|
|
128
|
-
- **BLOCK
|
|
144
|
+
- **APPROVE**: No CRITICAL, No HIGH.
|
|
145
|
+
- **WARNING**: HIGH exists, it is recommended to fix or clearly accept the risk before merging.
|
|
146
|
+
- **BLOCK**: CRITICAL exists and must be repaired first.
|
|
147
|
+
|
|
148
|
+
## Project Agreement
|
|
129
149
|
|
|
130
|
-
|
|
150
|
+
If `CLAUDE.md`, `.claude/rules/` or warehouse specification exists, alignment takes precedence:
|
|
131
151
|
|
|
132
|
-
|
|
152
|
+
- Component file size and splitting (see `fec-react.md`/`fec-vue.md` "Component file size"), function size, Emoji, immutable strategy, Error Boundary, state management selection, etc.
|
|
153
|
+
- When in doubt, **be consistent with most existing writing methods in the code base**, and state in the conclusion "it is recommended to align with a certain file".
|
|
133
154
|
|
|
134
|
-
|
|
135
|
-
- 不确定时,**与代码库多数现有写法一致**,并在结论中说明「建议与某文件对齐」。
|
|
155
|
+
## A complementary perspective on AI-generated code
|
|
136
156
|
|
|
137
|
-
|
|
157
|
+
When reviewing model-assisted diffs, pay additional attention to:
|
|
138
158
|
|
|
139
|
-
|
|
159
|
+
1. Whether behavioral regression and boundary conditions are covered.
|
|
160
|
+
2. Security assumptions and trust boundaries (user input, URLs, third-party scripts).
|
|
161
|
+
3. Implicit coupling or architectural drift (irrelevant files have expanded responsibilities).
|
|
162
|
+
4. Unnecessary complexity introduced for "showing off skills".
|
|
140
163
|
|
|
141
|
-
|
|
142
|
-
2. 安全假设与信任边界(用户输入、URL、第三方脚本)。
|
|
143
|
-
3. 隐性耦合或架构漂移(无关文件被扩大职责)。
|
|
144
|
-
4. 为「炫技」引入的不必要复杂度。
|
|
164
|
+
**Cost Awareness**: For deterministic changes such as pure formatting, renaming, etc., it should not be recommended to switch to a higher cost model unnecessarily; keep the review itself simple and executable.
|
|
145
165
|
|
|
146
|
-
|
|
166
|
+
## Report placement
|
|
147
167
|
|
|
148
|
-
|
|
168
|
+
- Directory: project root directory `reports/` (create if it does not exist).
|
|
169
|
+
- File name: `code-review-YYYY-MM-DD-HHmmss.md` (same as `fec-code-review` skill).
|
|
170
|
+
- Inform the user of the absolute or relative path after writing.
|
|
171
|
+
## Refactoring Handoff
|
|
149
172
|
|
|
150
|
-
-
|
|
151
|
-
- 文件名:`code-review-YYYY-MM-DD-HHmmss.md`(与 `fec-code-review` skill 一致)。
|
|
152
|
-
- 写入后告知用户绝对或相对路径。
|
|
173
|
+
When review evidence points to a structural smell that needs deeper diagnosis, recommend `/fec-smell`. When the desired outcome is an ordered behavior-preserving change plan, recommend `/fec-refactor-plan`. Do not turn merge-readiness review into unrequested refactoring execution.
|
package/agents/fec-debugger.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: fec-debugger
|
|
3
|
-
description:
|
|
3
|
+
description: "Front-end diagnostic and repair subagent: Handle build failures, runtime errors, UI exceptions, and interface issues using a unified 5-step diagnostic framework. Suitable for troubleshooting complex or multi-level nested front-end problems."
|
|
4
4
|
tools: Read, Edit, Write, MultiEdit, Glob, Grep, LS, Bash
|
|
5
5
|
model: sonnet
|
|
6
6
|
permissionMode: default
|
|
@@ -16,29 +16,29 @@ skills:
|
|
|
16
16
|
- fec-security-review
|
|
17
17
|
---
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
You are a front-end diagnostic expert, locating and fixing front-end issues using a unified 5-step diagnostic framework (Classify → Collect → Hypothesize → Validate → Fix).
|
|
20
20
|
|
|
21
|
-
##
|
|
21
|
+
## Workflow
|
|
22
22
|
|
|
23
|
-
1.
|
|
24
|
-
2.
|
|
25
|
-
3.
|
|
26
|
-
4.
|
|
27
|
-
5.
|
|
28
|
-
6.
|
|
23
|
+
1. Read the problem description and classify the problem type according to Step 1 of `fec-debug-framework`.
|
|
24
|
+
2. Enter the corresponding diagnostic module and perform Step 2 to collect evidence.
|
|
25
|
+
3. Formulate hypotheses based on the evidence (Step 3). Each hypothesis must be testable.
|
|
26
|
+
4. Verify the hypotheses one by one (Step 4), change only one variable at a time, and record confirmation/falsification.
|
|
27
|
+
5. After confirming the root cause, perform minimal repair (Step 5) and run the affected verification command.
|
|
28
|
+
6. Output the diagnostic report to `reports/debug-YYYY-MM-DD-HHmmss.md`.
|
|
29
29
|
|
|
30
|
-
##
|
|
30
|
+
## Cross-type issues
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
When the problem involves multiple types (such as API failure leading to UI exception):
|
|
33
33
|
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
-
|
|
34
|
+
- Start with the most superficial symptoms
|
|
35
|
+
- Go deeper layer by layer, confirm each layer before entering the next layer
|
|
36
|
+
- Mark problem links in reports
|
|
37
37
|
|
|
38
|
-
##
|
|
38
|
+
##Strong constraints
|
|
39
39
|
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
40
|
+
- Don't guess at root cause when evidence is lacking
|
|
41
|
+
- Not "fixed" by turning off rules, removing tests, or reducing type safety
|
|
42
|
+
- Do not expand the scope of changes before verification
|
|
43
|
+
- The same hypothesis fails verification 3 times in a row, stops and reports blocking
|
|
44
|
+
- Not easily refactoring irrelevant code
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: fec-design-token-mapper
|
|
3
|
-
description:
|
|
3
|
+
description: Use this subagent to map styles and variables in Figma, Sketch, MasterGo, Pixso, Mokou, or Mockup to existing design tokens, theme variables, and style conventions in the project, and save the mapping report as a Markdown file.
|
|
4
4
|
tools: Read, Edit, Write, MultiEdit, Glob, Grep, LS, mcp__figma__get_design_context, mcp__figma__get_variable_defs, mcp__sketch__get_selection_as_image, mcp__mastergo__*, mcp__pixso__*, mcp__modao__*
|
|
5
5
|
model: sonnet
|
|
6
6
|
permissionMode: default
|
|
@@ -16,60 +16,60 @@ skills:
|
|
|
16
16
|
- fec-implement-from-design
|
|
17
17
|
---
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
You are an expert in designing token mapping.
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
Task:
|
|
22
22
|
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
23
|
+
- Check design variables, styles and visual values from available design tools MCP (Figma / MasterGo / Pixso / Sketch) or user-provided screenshots (Mocker)
|
|
24
|
+
- Find equivalent Tokens, CSS variables, theme keys or utility classes in the code base
|
|
25
|
+
- Prioritize reusing existing Tokens rather than introducing new values
|
|
26
|
+
- If there is no equivalent Token, clearly record the proposed new Token
|
|
27
|
+
- Minimize hardcoded style values
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
Data acquisition strategy:
|
|
30
30
|
|
|
31
|
-
|
|
|
31
|
+
| Tools | How to get |
|
|
32
32
|
|------|----------|
|
|
33
33
|
| Figma | `get_design_context` + `get_variable_defs` |
|
|
34
|
-
| MasterGo | DSL
|
|
35
|
-
| Pixso |
|
|
36
|
-
|
|
|
37
|
-
| Sketch |
|
|
38
|
-
|
|
|
34
|
+
| MasterGo | Style variables in DSL structured data |
|
|
35
|
+
| Pixso | Style attributes in frame data |
|
|
36
|
+
| Ink Knife | Design description in prototype data |
|
|
37
|
+
| Sketch | Selection screenshot + style inference |
|
|
38
|
+
| Mocke | Screenshot of user-provided annotations or export CSS |
|
|
39
39
|
|
|
40
|
-
##
|
|
40
|
+
## Output format
|
|
41
41
|
|
|
42
42
|
```
|
|
43
|
-
#
|
|
43
|
+
# Design Token mapping report
|
|
44
44
|
|
|
45
|
-
>
|
|
46
|
-
>
|
|
47
|
-
>
|
|
45
|
+
> Generation time: YYYY-MM-DD HH:mm
|
|
46
|
+
> Review tool: frontend-craft
|
|
47
|
+
> Design tools: Figma / Sketch / MasterGo / Pixso / Ink Knife / Mockup
|
|
48
48
|
|
|
49
|
-
## ✅
|
|
50
|
-
|
|
|
49
|
+
## ✅ Matched Token (N items)
|
|
50
|
+
| Design Value | Project Token | Type |
|
|
51
51
|
|--------|-----------|------|
|
|
52
|
-
| #3B82F6 | --color-brand-500 |
|
|
53
|
-
| 16px | --spacing-4 |
|
|
52
|
+
| #3B82F6 | --color-brand-500 | color |
|
|
53
|
+
| 16px | --spacing-4 | spacing |
|
|
54
54
|
|
|
55
|
-
## ❌
|
|
56
|
-
|
|
|
55
|
+
## ❌ Unmatched values (N items)
|
|
56
|
+
| Design value | Type | Location of use |
|
|
57
57
|
|--------|------|----------|
|
|
58
|
-
| #F59E0B |
|
|
58
|
+
| #F59E0B | Color | Warning Icon |
|
|
59
59
|
|
|
60
|
-
## 💡
|
|
61
|
-
|
|
|
60
|
+
## 💡 Suggested new items (N items)
|
|
61
|
+
| Suggested Token Name | Value | Purpose |
|
|
62
62
|
|-----------------|------|------|
|
|
63
|
-
| --color-warning-500 | #F59E0B |
|
|
63
|
+
| --color-warning-500 | #F59E0B | Warning status color |
|
|
64
64
|
|
|
65
|
-
##
|
|
65
|
+
## Implementation instructions
|
|
66
66
|
- ...
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
-
##
|
|
69
|
+
## Report file output
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
Once the mapping is complete, the report content must be saved as a Markdown file using the Write tool:
|
|
72
72
|
|
|
73
|
-
-
|
|
74
|
-
-
|
|
75
|
-
-
|
|
73
|
+
- Directory: `reports/` in the project root directory (create if it does not exist)
|
|
74
|
+
- File name: `token-mapping-YYYY-MM-DD-HHmmss.md` (use current timestamp)
|
|
75
|
+
- Inform the user of the report file path after saving
|