@bovinphang/frontend-craft 2.8.0 → 3.0.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 +64 -0
- package/CHANGELOG.zh-CN.md +64 -0
- package/CONTRIBUTING.md +74 -54
- package/CONTRIBUTING.zh-CN.md +75 -53
- package/README.md +150 -38
- package/README.openclaw.md +86 -11
- package/README.openclaw.zh-CN.md +86 -11
- package/README.zh-CN.md +147 -35
- package/agents/fec-code-reviewer.md +24 -3
- package/agents/fec-debugger.md +1 -1
- package/agents/fec-doc-updater.md +1 -1
- package/agents/fec-e2e-runner.md +1 -1
- package/agents/fec-figma-implementer.md +1 -1
- package/agents/fec-performance-optimizer.md +1 -1
- package/agents/fec-refactor-cleaner.md +4 -1
- package/agents/fec-refactoring-expert.md +81 -0
- package/agents/fec-security-reviewer.md +17 -1
- package/agents/fec-test-planner.md +1 -1
- package/agents/fec-typescript-reviewer.md +25 -9
- package/agents/fec-ui-checker.md +11 -11
- package/commands/fec-debug.md +1 -1
- package/commands/fec-refactor-plan.md +17 -0
- package/commands/fec-refactor.md +18 -0
- package/commands/fec-review.md +40 -10
- package/commands/fec-scaffold.md +1 -1
- package/commands/fec-smell.md +17 -0
- package/commands/fec-tdd.md +6 -2
- package/common-content.lock.json +3795 -0
- package/dist/bin/frontend-craft.js +386 -55
- package/dist/hooks/fec-run-tests.js +5 -1
- package/dist/hooks/fec-session-start.js +1 -1
- package/docs/common-migration.md +61 -0
- package/docs/example-prompts.md +29 -12
- package/docs/ja-JP/README.md +129 -34
- package/docs/ko-KR/README.md +129 -34
- package/docs/project-structure.md +49 -14
- 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 +13 -5
- package/docs/runtimes/augment.md +13 -5
- package/docs/runtimes/claude.md +26 -10
- package/docs/runtimes/claude.zh-CN.md +26 -10
- package/docs/runtimes/cline.md +13 -5
- package/docs/runtimes/codebuddy.md +13 -5
- package/docs/runtimes/codex.md +13 -5
- package/docs/runtimes/compatibility.md +42 -0
- package/docs/runtimes/copilot.md +13 -5
- package/docs/runtimes/cursor.md +13 -5
- package/docs/runtimes/gemini.md +13 -5
- package/docs/runtimes/kilo.md +13 -5
- package/docs/runtimes/openclaw.md +13 -5
- package/docs/runtimes/opencode.md +13 -5
- package/docs/runtimes/qoder.md +11 -12
- package/docs/runtimes/trae.md +13 -5
- package/docs/runtimes/windsurf.md +13 -5
- 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/common-migration.md +57 -0
- package/docs/zh-CN/example-prompts.md +29 -12
- package/docs/zh-CN/project-structure.md +49 -11
- package/docs/zh-CN/review-and-diagram-workflows.md +39 -0
- package/docs/zh-TW/README.md +129 -34
- package/localized/zh-CN/agents/fec-code-reviewer.md +22 -3
- package/localized/zh-CN/agents/fec-refactor-cleaner.md +3 -0
- package/localized/zh-CN/agents/fec-refactoring-expert.md +53 -0
- package/localized/zh-CN/agents/fec-security-reviewer.md +16 -0
- package/localized/zh-CN/agents/fec-typescript-reviewer.md +24 -8
- 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 +40 -9
- package/localized/zh-CN/commands/fec-smell.md +13 -0
- package/localized/zh-CN/commands/fec-tdd.md +4 -0
- package/localized/zh-CN/skills/cc-c-project-standard/SKILL.md +25 -0
- package/localized/zh-CN/skills/cc-c-project-standard/examples/engineering/README.md +7 -0
- package/localized/zh-CN/skills/cc-c-project-standard/examples/engineering/boundary.c +26 -0
- package/localized/zh-CN/skills/cc-c-project-standard/examples/engineering/boundary.h +15 -0
- package/localized/zh-CN/skills/cc-c-project-standard/examples/engineering/boundary_test.c +73 -0
- package/localized/zh-CN/skills/cc-c-project-standard/references/common/engineering-practices.md +237 -0
- package/localized/zh-CN/skills/cc-c-project-standard/references/common/engineering-practices.rules.json +121 -0
- package/localized/zh-CN/skills/cc-c-project-standard/references/common/engineering-practices.sources.json +377 -0
- package/localized/zh-CN/skills/cc-c-project-standard/references/engineering-practices.md +106 -0
- package/localized/zh-CN/skills/cc-c-project-standard/references/practice.md +37 -0
- package/localized/zh-CN/skills/cc-cpp-project-standard/SKILL.md +25 -0
- package/localized/zh-CN/skills/cc-cpp-project-standard/examples/engineering/README.md +7 -0
- package/localized/zh-CN/skills/cc-cpp-project-standard/examples/engineering/boundary.cpp +26 -0
- package/localized/zh-CN/skills/cc-cpp-project-standard/examples/engineering/boundary.hpp +12 -0
- package/localized/zh-CN/skills/cc-cpp-project-standard/examples/engineering/boundary_test.cpp +38 -0
- package/localized/zh-CN/skills/cc-cpp-project-standard/references/common/engineering-practices.md +237 -0
- package/localized/zh-CN/skills/cc-cpp-project-standard/references/common/engineering-practices.rules.json +121 -0
- package/localized/zh-CN/skills/cc-cpp-project-standard/references/common/engineering-practices.sources.json +377 -0
- package/localized/zh-CN/skills/cc-cpp-project-standard/references/engineering-practices.md +106 -0
- package/localized/zh-CN/skills/cc-cpp-project-standard/references/practice.md +37 -0
- package/localized/zh-CN/skills/cc-debug-methodology/SKILL.md +8 -0
- package/localized/zh-CN/skills/cc-debug-methodology/references/method.md +13 -0
- package/localized/zh-CN/skills/cc-doc-sync-core/SKILL.md +8 -0
- package/localized/zh-CN/skills/cc-doc-sync-core/references/method.md +12 -0
- package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/SKILL.md +5 -5
- package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/references/flowchart-quality.md +1 -1
- package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/references/layout-and-export.md +9 -9
- package/localized/zh-CN/skills/cc-electron-project-standard/SKILL.md +21 -0
- package/localized/zh-CN/skills/cc-electron-project-standard/examples/engineering/README.md +7 -0
- package/localized/zh-CN/skills/cc-electron-project-standard/examples/engineering/ipc-lifecycle.cjs +44 -0
- package/localized/zh-CN/skills/cc-electron-project-standard/examples/engineering/ipc-lifecycle.test.cjs +44 -0
- package/localized/zh-CN/skills/cc-electron-project-standard/examples/engineering/package.json +8 -0
- package/localized/zh-CN/skills/cc-electron-project-standard/examples/minimal/README.md +9 -0
- package/localized/zh-CN/skills/cc-electron-project-standard/examples/minimal/boundary.cjs +19 -0
- package/localized/zh-CN/skills/cc-electron-project-standard/examples/minimal/boundary.test.cjs +7 -0
- package/localized/zh-CN/skills/cc-electron-project-standard/examples/minimal/index.html +1 -0
- package/localized/zh-CN/skills/cc-electron-project-standard/examples/minimal/main.cjs +20 -0
- package/localized/zh-CN/skills/cc-electron-project-standard/examples/minimal/package.json +9 -0
- package/localized/zh-CN/skills/cc-electron-project-standard/examples/minimal/preload.cjs +2 -0
- package/localized/zh-CN/skills/cc-electron-project-standard/examples/minimal/renderer.js +4 -0
- package/localized/zh-CN/skills/cc-electron-project-standard/references/common/engineering-practices.md +237 -0
- package/localized/zh-CN/skills/cc-electron-project-standard/references/common/engineering-practices.rules.json +121 -0
- package/localized/zh-CN/skills/cc-electron-project-standard/references/common/engineering-practices.sources.json +377 -0
- package/localized/zh-CN/skills/cc-electron-project-standard/references/engineering-practices.md +73 -0
- package/localized/zh-CN/skills/cc-electron-project-standard/references/practice.md +19 -0
- package/localized/zh-CN/skills/cc-electron-project-standard/references/verification.md +17 -0
- package/localized/zh-CN/skills/cc-go-concurrency/SKILL.md +25 -0
- package/localized/zh-CN/skills/cc-go-concurrency/references/common/engineering-practices.md +237 -0
- package/localized/zh-CN/skills/cc-go-concurrency/references/common/engineering-practices.rules.json +121 -0
- package/localized/zh-CN/skills/cc-go-concurrency/references/common/engineering-practices.sources.json +377 -0
- package/localized/zh-CN/skills/cc-go-concurrency/references/engineering-practices.md +73 -0
- package/localized/zh-CN/skills/cc-go-concurrency/references/practice.md +37 -0
- package/localized/zh-CN/skills/cc-go-project-standard/SKILL.md +25 -0
- package/localized/zh-CN/skills/cc-go-project-standard/examples/engineering/README.md +7 -0
- package/localized/zh-CN/skills/cc-go-project-standard/examples/engineering/go.mod +3 -0
- package/localized/zh-CN/skills/cc-go-project-standard/examples/engineering/lifecycle.go +71 -0
- package/localized/zh-CN/skills/cc-go-project-standard/examples/engineering/lifecycle_test.go +22 -0
- package/localized/zh-CN/skills/cc-go-project-standard/references/common/engineering-practices.md +237 -0
- package/localized/zh-CN/skills/cc-go-project-standard/references/common/engineering-practices.rules.json +121 -0
- package/localized/zh-CN/skills/cc-go-project-standard/references/common/engineering-practices.sources.json +377 -0
- package/localized/zh-CN/skills/cc-go-project-standard/references/engineering-practices.md +106 -0
- package/localized/zh-CN/skills/cc-go-project-standard/references/practice.md +37 -0
- package/localized/zh-CN/skills/cc-java-project-standard/SKILL.md +25 -0
- package/localized/zh-CN/skills/cc-java-project-standard/examples/engineering/README.md +5 -0
- package/localized/zh-CN/skills/cc-java-project-standard/examples/engineering/ResourceBoundary.java +26 -0
- package/localized/zh-CN/skills/cc-java-project-standard/examples/engineering/ResourceBoundaryTest.java +41 -0
- package/localized/zh-CN/skills/cc-java-project-standard/references/common/engineering-practices.md +237 -0
- package/localized/zh-CN/skills/cc-java-project-standard/references/common/engineering-practices.rules.json +121 -0
- package/localized/zh-CN/skills/cc-java-project-standard/references/common/engineering-practices.sources.json +377 -0
- package/localized/zh-CN/skills/cc-java-project-standard/references/engineering-practices.md +106 -0
- package/localized/zh-CN/skills/cc-java-project-standard/references/practice.md +37 -0
- package/localized/zh-CN/skills/cc-java-runtime/SKILL.md +25 -0
- package/localized/zh-CN/skills/cc-java-runtime/references/common/engineering-practices.md +237 -0
- package/localized/zh-CN/skills/cc-java-runtime/references/common/engineering-practices.rules.json +121 -0
- package/localized/zh-CN/skills/cc-java-runtime/references/common/engineering-practices.sources.json +377 -0
- package/localized/zh-CN/skills/cc-java-runtime/references/engineering-practices.md +73 -0
- package/localized/zh-CN/skills/cc-java-runtime/references/practice.md +37 -0
- package/localized/zh-CN/skills/cc-native-memory-safety/SKILL.md +25 -0
- package/localized/zh-CN/skills/cc-native-memory-safety/references/common/engineering-practices.md +237 -0
- package/localized/zh-CN/skills/cc-native-memory-safety/references/common/engineering-practices.rules.json +121 -0
- package/localized/zh-CN/skills/cc-native-memory-safety/references/common/engineering-practices.sources.json +377 -0
- package/localized/zh-CN/skills/cc-native-memory-safety/references/engineering-practices.md +73 -0
- package/localized/zh-CN/skills/cc-native-memory-safety/references/practice.md +37 -0
- package/localized/zh-CN/skills/cc-python-async/SKILL.md +25 -0
- package/localized/zh-CN/skills/cc-python-async/references/common/engineering-practices.md +237 -0
- package/localized/zh-CN/skills/cc-python-async/references/common/engineering-practices.rules.json +121 -0
- package/localized/zh-CN/skills/cc-python-async/references/common/engineering-practices.sources.json +377 -0
- package/localized/zh-CN/skills/cc-python-async/references/engineering-practices.md +73 -0
- package/localized/zh-CN/skills/cc-python-async/references/practice.md +37 -0
- package/localized/zh-CN/skills/cc-python-project-standard/SKILL.md +25 -0
- package/localized/zh-CN/skills/cc-python-project-standard/examples/engineering/README.md +7 -0
- package/localized/zh-CN/skills/cc-python-project-standard/examples/engineering/resource_boundary.py +37 -0
- package/localized/zh-CN/skills/cc-python-project-standard/examples/engineering/test_resource_boundary.py +49 -0
- package/localized/zh-CN/skills/cc-python-project-standard/references/common/engineering-practices.md +237 -0
- package/localized/zh-CN/skills/cc-python-project-standard/references/common/engineering-practices.rules.json +121 -0
- package/localized/zh-CN/skills/cc-python-project-standard/references/common/engineering-practices.sources.json +377 -0
- package/localized/zh-CN/skills/cc-python-project-standard/references/engineering-practices.md +106 -0
- package/localized/zh-CN/skills/cc-python-project-standard/references/practice.md +37 -0
- package/localized/zh-CN/skills/cc-refactoring-core/SKILL.md +8 -0
- package/localized/zh-CN/skills/cc-refactoring-core/references/method.md +16 -0
- package/localized/zh-CN/skills/cc-rust-async/SKILL.md +25 -0
- package/localized/zh-CN/skills/cc-rust-async/references/common/engineering-practices.md +237 -0
- package/localized/zh-CN/skills/cc-rust-async/references/common/engineering-practices.rules.json +121 -0
- package/localized/zh-CN/skills/cc-rust-async/references/common/engineering-practices.sources.json +377 -0
- package/localized/zh-CN/skills/cc-rust-async/references/engineering-practices.md +73 -0
- package/localized/zh-CN/skills/cc-rust-async/references/practice.md +37 -0
- package/localized/zh-CN/skills/cc-rust-project-standard/SKILL.md +25 -0
- package/localized/zh-CN/skills/cc-rust-project-standard/examples/engineering/Cargo.lock +7 -0
- package/localized/zh-CN/skills/cc-rust-project-standard/examples/engineering/Cargo.toml +8 -0
- package/localized/zh-CN/skills/cc-rust-project-standard/examples/engineering/README.md +5 -0
- package/localized/zh-CN/skills/cc-rust-project-standard/examples/engineering/src/lib.rs +43 -0
- package/localized/zh-CN/skills/cc-rust-project-standard/references/common/engineering-practices.md +237 -0
- package/localized/zh-CN/skills/cc-rust-project-standard/references/common/engineering-practices.rules.json +121 -0
- package/localized/zh-CN/skills/cc-rust-project-standard/references/common/engineering-practices.sources.json +377 -0
- package/localized/zh-CN/skills/cc-rust-project-standard/references/engineering-practices.md +106 -0
- package/localized/zh-CN/skills/cc-rust-project-standard/references/practice.md +37 -0
- package/localized/zh-CN/skills/cc-source-driven-development/SKILL.md +8 -0
- package/localized/zh-CN/skills/cc-source-driven-development/references/method.md +19 -0
- package/localized/zh-CN/skills/cc-tauri-project-standard/SKILL.md +21 -0
- package/localized/zh-CN/skills/cc-tauri-project-standard/examples/minimal/README.md +9 -0
- package/localized/zh-CN/skills/cc-tauri-project-standard/examples/minimal/core/Cargo.lock +5 -0
- package/localized/zh-CN/skills/cc-tauri-project-standard/examples/minimal/core/Cargo.toml +9 -0
- package/localized/zh-CN/skills/cc-tauri-project-standard/examples/minimal/core/src/lib.rs +46 -0
- package/localized/zh-CN/skills/cc-tauri-project-standard/examples/minimal/src-tauri/Cargo.toml +12 -0
- package/localized/zh-CN/skills/cc-tauri-project-standard/examples/minimal/src-tauri/build.rs +5 -0
- package/localized/zh-CN/skills/cc-tauri-project-standard/examples/minimal/src-tauri/capabilities/main.json +6 -0
- package/localized/zh-CN/skills/cc-tauri-project-standard/examples/minimal/src-tauri/permissions/documents.toml +4 -0
- package/localized/zh-CN/skills/cc-tauri-project-standard/examples/minimal/src-tauri/src/main.rs +22 -0
- package/localized/zh-CN/skills/cc-tauri-project-standard/examples/minimal/src-tauri/tauri.conf.json +13 -0
- package/localized/zh-CN/skills/cc-tauri-project-standard/examples/minimal/ui/app.js +5 -0
- package/localized/zh-CN/skills/cc-tauri-project-standard/examples/minimal/ui/index.html +1 -0
- package/localized/zh-CN/skills/cc-tauri-project-standard/references/common/engineering-practices.md +237 -0
- package/localized/zh-CN/skills/cc-tauri-project-standard/references/common/engineering-practices.rules.json +121 -0
- package/localized/zh-CN/skills/cc-tauri-project-standard/references/common/engineering-practices.sources.json +377 -0
- package/localized/zh-CN/skills/cc-tauri-project-standard/references/engineering-practices.md +73 -0
- package/localized/zh-CN/skills/cc-tauri-project-standard/references/practice.md +20 -0
- package/localized/zh-CN/skills/cc-tauri-project-standard/references/verification.md +18 -0
- package/localized/zh-CN/skills/cc-tdd-methodology/SKILL.md +8 -0
- package/localized/zh-CN/skills/cc-tdd-methodology/references/method.md +13 -0
- package/localized/zh-CN/skills/cc-technical-diagrams/SKILL.md +34 -0
- package/localized/zh-CN/skills/{fec-image-generation → cc-technical-diagrams}/assets/interactive-diagram.html +371 -371
- package/localized/zh-CN/skills/cc-technical-diagrams/assets/quality-examples/README.md +14 -0
- package/localized/zh-CN/skills/cc-technical-diagrams/assets/quality-examples/architecture.json +121 -0
- package/localized/zh-CN/skills/cc-technical-diagrams/assets/quality-examples/invalid-explicit.json +41 -0
- package/localized/zh-CN/skills/cc-technical-diagrams/assets/quality-examples/sequence.json +53 -0
- package/localized/zh-CN/skills/cc-technical-diagrams/assets/quality-examples/sequence.mmd +21 -0
- package/localized/zh-CN/skills/cc-technical-diagrams/assets/quality-examples/workflow.json +98 -0
- package/localized/zh-CN/skills/cc-technical-diagrams/assets/quality-examples/workflow.mmd +7 -0
- package/localized/zh-CN/skills/{fec-image-generation → cc-technical-diagrams}/references/diagram-workflows.md +12 -5
- package/localized/zh-CN/skills/{fec-image-generation → cc-technical-diagrams}/references/html-technical-diagrams.md +14 -7
- package/localized/zh-CN/skills/cc-technical-diagrams/references/png-qa-autofix.md +37 -0
- package/localized/zh-CN/skills/cc-technical-diagrams/scripts/diagram-browser.mjs +153 -0
- package/localized/zh-CN/skills/cc-technical-diagrams/scripts/diagram-layout.mjs +176 -0
- package/{skills/fec-image-generation → localized/zh-CN/skills/cc-technical-diagrams}/scripts/export-diagram.mjs +48 -80
- package/localized/zh-CN/skills/cc-technical-diagrams/scripts/mermaid-render.mjs +64 -0
- package/localized/zh-CN/skills/cc-technical-diagrams/scripts/png-qa.mjs +462 -0
- package/localized/zh-CN/skills/{fec-image-generation → cc-technical-diagrams}/scripts/tech-diagram-render.mjs +193 -53
- package/localized/zh-CN/skills/{fec-typescript-project-standard → cc-typescript-project-standard}/SKILL.md +10 -4
- package/localized/zh-CN/skills/cc-typescript-project-standard/examples/engineering/README.md +7 -0
- package/localized/zh-CN/skills/cc-typescript-project-standard/examples/engineering/boundary.test.ts +16 -0
- package/localized/zh-CN/skills/cc-typescript-project-standard/examples/engineering/input.ts +12 -0
- package/localized/zh-CN/skills/cc-typescript-project-standard/examples/engineering/package.json +12 -0
- package/localized/zh-CN/skills/cc-typescript-project-standard/examples/engineering/pnpm-lock.yaml +39 -0
- package/localized/zh-CN/skills/cc-typescript-project-standard/examples/engineering/pnpm-workspace.yaml +1 -0
- package/localized/zh-CN/skills/cc-typescript-project-standard/examples/engineering/tsconfig.json +8 -0
- package/localized/zh-CN/skills/cc-typescript-project-standard/references/common/engineering-practices.md +237 -0
- package/localized/zh-CN/skills/cc-typescript-project-standard/references/common/engineering-practices.rules.json +121 -0
- package/localized/zh-CN/skills/cc-typescript-project-standard/references/common/engineering-practices.sources.json +377 -0
- package/localized/zh-CN/skills/cc-typescript-project-standard/references/engineering-practices.md +106 -0
- package/localized/zh-CN/skills/{fec-typescript-project-standard → cc-typescript-project-standard}/references/type-safety-patterns.md +5 -34
- package/localized/zh-CN/skills/{fec-typescript-project-standard → cc-typescript-project-standard}/references/type-safety.md +6 -0
- package/localized/zh-CN/skills/eval_queries.json +738 -72
- package/localized/zh-CN/skills/fec-api-integration/SKILL.md +5 -1
- package/localized/zh-CN/skills/fec-api-integration/references/common/engineering-practices.md +237 -0
- package/localized/zh-CN/skills/fec-api-integration/references/common/engineering-practices.rules.json +121 -0
- package/localized/zh-CN/skills/fec-api-integration/references/common/engineering-practices.sources.json +377 -0
- package/localized/zh-CN/skills/fec-api-integration/references/engineering-practices.md +73 -0
- package/localized/zh-CN/skills/fec-code-review/SKILL.md +24 -1
- package/localized/zh-CN/skills/fec-code-review/references/common/engineering-practices.md +237 -0
- package/localized/zh-CN/skills/fec-code-review/references/common/engineering-practices.rules.json +121 -0
- package/localized/zh-CN/skills/fec-code-review/references/common/engineering-practices.sources.json +377 -0
- package/localized/zh-CN/skills/fec-code-review/references/engineering-practices.md +73 -0
- package/localized/zh-CN/skills/fec-code-review/references/report-template.md +11 -1
- 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-data-fetching/SKILL.md +4 -0
- package/localized/zh-CN/skills/fec-data-fetching/references/common/engineering-practices.md +237 -0
- package/localized/zh-CN/skills/fec-data-fetching/references/common/engineering-practices.rules.json +121 -0
- package/localized/zh-CN/skills/fec-data-fetching/references/common/engineering-practices.sources.json +377 -0
- package/localized/zh-CN/skills/fec-data-fetching/references/engineering-practices.md +73 -0
- package/localized/zh-CN/skills/fec-debug-framework/SKILL.md +1 -50
- package/localized/zh-CN/skills/fec-debug-framework/references/common/debug.md +13 -0
- package/localized/zh-CN/skills/fec-dependency-upgrade/SKILL.md +4 -0
- package/localized/zh-CN/skills/fec-dependency-upgrade/references/common/engineering-practices.md +237 -0
- package/localized/zh-CN/skills/fec-dependency-upgrade/references/common/engineering-practices.rules.json +121 -0
- package/localized/zh-CN/skills/fec-dependency-upgrade/references/common/engineering-practices.sources.json +377 -0
- package/localized/zh-CN/skills/fec-dependency-upgrade/references/engineering-practices.md +73 -0
- package/localized/zh-CN/skills/fec-doc-sync/SKILL.md +7 -28
- package/localized/zh-CN/skills/fec-doc-sync/references/common/doc-sync.md +12 -0
- package/localized/zh-CN/skills/fec-image-generation/SKILL.md +7 -71
- package/localized/zh-CN/skills/fec-image-generation/references/png-qa-autofix.md +9 -2
- package/localized/zh-CN/skills/fec-image-generation/scripts/diagram-layout.mjs +176 -0
- package/localized/zh-CN/skills/fec-image-generation/scripts/png-qa.mjs +36 -5
- package/localized/zh-CN/skills/fec-react-project-standard/SKILL.md +6 -0
- package/localized/zh-CN/skills/fec-react-project-standard/examples/engineering/README.md +7 -0
- package/localized/zh-CN/skills/fec-react-project-standard/examples/engineering/package.json +15 -0
- package/localized/zh-CN/skills/fec-react-project-standard/examples/engineering/pnpm-lock.yaml +662 -0
- package/localized/zh-CN/skills/fec-react-project-standard/examples/engineering/pnpm-workspace.yaml +1 -0
- package/localized/zh-CN/skills/fec-react-project-standard/examples/engineering/request-view.mjs +24 -0
- package/localized/zh-CN/skills/fec-react-project-standard/examples/engineering/request-view.test.mjs +33 -0
- package/localized/zh-CN/skills/fec-react-project-standard/references/common/engineering-practices.md +237 -0
- package/localized/zh-CN/skills/fec-react-project-standard/references/common/engineering-practices.rules.json +121 -0
- package/localized/zh-CN/skills/fec-react-project-standard/references/common/engineering-practices.sources.json +377 -0
- package/localized/zh-CN/skills/fec-react-project-standard/references/engineering-practices.md +73 -0
- package/localized/zh-CN/skills/fec-react-project-standard/references/generic-component-types.md +37 -0
- package/localized/zh-CN/skills/fec-react-project-standard/references/react-quality-patterns.md +3 -3
- package/localized/zh-CN/skills/fec-react-project-standard/references/react-runtime-patterns.md +1 -1
- package/localized/zh-CN/skills/fec-refactor-clean/SKILL.md +3 -0
- package/localized/zh-CN/skills/fec-refactoring/SKILL.md +25 -0
- package/localized/zh-CN/skills/fec-refactoring/references/common/refactoring.md +16 -0
- package/localized/zh-CN/skills/fec-refactoring/references/principles.md +13 -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 +7 -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-security-review/SKILL.md +20 -0
- package/localized/zh-CN/skills/fec-security-review/references/common/engineering-practices.md +237 -0
- package/localized/zh-CN/skills/fec-security-review/references/common/engineering-practices.rules.json +121 -0
- package/localized/zh-CN/skills/fec-security-review/references/common/engineering-practices.sources.json +377 -0
- package/localized/zh-CN/skills/fec-security-review/references/engineering-practices.md +73 -0
- package/localized/zh-CN/skills/fec-security-review/references/report-template.md +10 -0
- package/localized/zh-CN/skills/fec-tdd-workflow/SKILL.md +12 -40
- package/localized/zh-CN/skills/fec-tdd-workflow/references/common/tdd.md +13 -0
- package/localized/zh-CN/skills/fec-testing-strategy/SKILL.md +4 -0
- package/localized/zh-CN/skills/fec-testing-strategy/references/common/engineering-practices.md +237 -0
- package/localized/zh-CN/skills/fec-testing-strategy/references/common/engineering-practices.rules.json +121 -0
- package/localized/zh-CN/skills/fec-testing-strategy/references/common/engineering-practices.sources.json +377 -0
- package/localized/zh-CN/skills/fec-testing-strategy/references/engineering-practices.md +73 -0
- package/localized/zh-CN/skills/fec-vue3-project-standard/SKILL.md +4 -0
- package/localized/zh-CN/skills/fec-vue3-project-standard/references/common/engineering-practices.md +237 -0
- package/localized/zh-CN/skills/fec-vue3-project-standard/references/common/engineering-practices.rules.json +121 -0
- package/localized/zh-CN/skills/fec-vue3-project-standard/references/common/engineering-practices.sources.json +377 -0
- package/localized/zh-CN/skills/fec-vue3-project-standard/references/engineering-practices.md +73 -0
- package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-project-structure.md +2 -2
- package/localized/zh-CN/skills/metadata.json +2222 -626
- package/localized/zh-CN/skills/relations.json +472 -75
- package/localized/zh-CN/templates/shared/rules/fec-agent-workflow.md +1 -0
- package/localized/zh-CN/templates/shared/rules/fec-source-driven-development.md +3 -29
- package/localized/zh-CN/templates/shared/rules/fec-typescript.md +4 -4
- package/localized/zh-CN/templates/shared/rules/references/common/source-driven-development.md +19 -0
- package/openclaw.plugin.json +2 -3
- package/package.json +34 -17
- package/skills/cc-c-project-standard/SKILL.md +25 -0
- package/skills/cc-c-project-standard/examples/engineering/README.md +7 -0
- package/skills/cc-c-project-standard/examples/engineering/boundary.c +26 -0
- package/skills/cc-c-project-standard/examples/engineering/boundary.h +15 -0
- package/skills/cc-c-project-standard/examples/engineering/boundary_test.c +73 -0
- package/skills/cc-c-project-standard/references/common/engineering-practices.md +237 -0
- package/skills/cc-c-project-standard/references/common/engineering-practices.rules.json +121 -0
- package/skills/cc-c-project-standard/references/common/engineering-practices.sources.json +377 -0
- package/skills/cc-c-project-standard/references/engineering-practices.md +106 -0
- package/skills/cc-c-project-standard/references/practice.md +37 -0
- package/skills/cc-cpp-project-standard/SKILL.md +25 -0
- package/skills/cc-cpp-project-standard/examples/engineering/README.md +7 -0
- package/skills/cc-cpp-project-standard/examples/engineering/boundary.cpp +26 -0
- package/skills/cc-cpp-project-standard/examples/engineering/boundary.hpp +12 -0
- package/skills/cc-cpp-project-standard/examples/engineering/boundary_test.cpp +38 -0
- package/skills/cc-cpp-project-standard/references/common/engineering-practices.md +237 -0
- package/skills/cc-cpp-project-standard/references/common/engineering-practices.rules.json +121 -0
- package/skills/cc-cpp-project-standard/references/common/engineering-practices.sources.json +377 -0
- package/skills/cc-cpp-project-standard/references/engineering-practices.md +106 -0
- package/skills/cc-cpp-project-standard/references/practice.md +37 -0
- package/skills/cc-debug-methodology/SKILL.md +8 -0
- package/skills/cc-debug-methodology/references/method.md +13 -0
- package/skills/cc-doc-sync-core/SKILL.md +8 -0
- package/skills/cc-doc-sync-core/references/method.md +12 -0
- package/skills/{fec-drawio-studio → cc-drawio-studio}/SKILL.md +5 -5
- package/skills/{fec-drawio-studio → cc-drawio-studio}/references/flowchart-quality.md +1 -1
- package/skills/{fec-drawio-studio → cc-drawio-studio}/references/layout-and-export.md +9 -9
- package/skills/cc-electron-project-standard/SKILL.md +21 -0
- package/skills/cc-electron-project-standard/examples/engineering/README.md +7 -0
- package/skills/cc-electron-project-standard/examples/engineering/ipc-lifecycle.cjs +44 -0
- package/skills/cc-electron-project-standard/examples/engineering/ipc-lifecycle.test.cjs +44 -0
- package/skills/cc-electron-project-standard/examples/engineering/package.json +8 -0
- package/skills/cc-electron-project-standard/examples/minimal/README.md +9 -0
- package/skills/cc-electron-project-standard/examples/minimal/boundary.cjs +19 -0
- package/skills/cc-electron-project-standard/examples/minimal/boundary.test.cjs +7 -0
- package/skills/cc-electron-project-standard/examples/minimal/index.html +1 -0
- package/skills/cc-electron-project-standard/examples/minimal/main.cjs +20 -0
- package/skills/cc-electron-project-standard/examples/minimal/package.json +9 -0
- package/skills/cc-electron-project-standard/examples/minimal/preload.cjs +2 -0
- package/skills/cc-electron-project-standard/examples/minimal/renderer.js +4 -0
- package/skills/cc-electron-project-standard/references/common/engineering-practices.md +237 -0
- package/skills/cc-electron-project-standard/references/common/engineering-practices.rules.json +121 -0
- package/skills/cc-electron-project-standard/references/common/engineering-practices.sources.json +377 -0
- package/skills/cc-electron-project-standard/references/engineering-practices.md +73 -0
- package/skills/cc-electron-project-standard/references/practice.md +19 -0
- package/skills/cc-electron-project-standard/references/verification.md +17 -0
- package/skills/cc-go-concurrency/SKILL.md +25 -0
- package/skills/cc-go-concurrency/references/common/engineering-practices.md +237 -0
- package/skills/cc-go-concurrency/references/common/engineering-practices.rules.json +121 -0
- package/skills/cc-go-concurrency/references/common/engineering-practices.sources.json +377 -0
- package/skills/cc-go-concurrency/references/engineering-practices.md +73 -0
- package/skills/cc-go-concurrency/references/practice.md +37 -0
- package/skills/cc-go-project-standard/SKILL.md +25 -0
- package/skills/cc-go-project-standard/examples/engineering/README.md +7 -0
- package/skills/cc-go-project-standard/examples/engineering/go.mod +3 -0
- package/skills/cc-go-project-standard/examples/engineering/lifecycle.go +71 -0
- package/skills/cc-go-project-standard/examples/engineering/lifecycle_test.go +22 -0
- package/skills/cc-go-project-standard/references/common/engineering-practices.md +237 -0
- package/skills/cc-go-project-standard/references/common/engineering-practices.rules.json +121 -0
- package/skills/cc-go-project-standard/references/common/engineering-practices.sources.json +377 -0
- package/skills/cc-go-project-standard/references/engineering-practices.md +106 -0
- package/skills/cc-go-project-standard/references/practice.md +37 -0
- package/skills/cc-java-project-standard/SKILL.md +25 -0
- package/skills/cc-java-project-standard/examples/engineering/README.md +7 -0
- package/skills/cc-java-project-standard/examples/engineering/ResourceBoundary.java +26 -0
- package/skills/cc-java-project-standard/examples/engineering/ResourceBoundaryTest.java +41 -0
- package/skills/cc-java-project-standard/references/common/engineering-practices.md +237 -0
- package/skills/cc-java-project-standard/references/common/engineering-practices.rules.json +121 -0
- package/skills/cc-java-project-standard/references/common/engineering-practices.sources.json +377 -0
- package/skills/cc-java-project-standard/references/engineering-practices.md +106 -0
- package/skills/cc-java-project-standard/references/practice.md +35 -0
- package/skills/cc-java-runtime/SKILL.md +25 -0
- package/skills/cc-java-runtime/references/common/engineering-practices.md +237 -0
- package/skills/cc-java-runtime/references/common/engineering-practices.rules.json +121 -0
- package/skills/cc-java-runtime/references/common/engineering-practices.sources.json +377 -0
- package/skills/cc-java-runtime/references/engineering-practices.md +73 -0
- package/skills/cc-java-runtime/references/practice.md +37 -0
- package/skills/cc-native-memory-safety/SKILL.md +25 -0
- package/skills/cc-native-memory-safety/references/common/engineering-practices.md +237 -0
- package/skills/cc-native-memory-safety/references/common/engineering-practices.rules.json +121 -0
- package/skills/cc-native-memory-safety/references/common/engineering-practices.sources.json +377 -0
- package/skills/cc-native-memory-safety/references/engineering-practices.md +73 -0
- package/skills/cc-native-memory-safety/references/practice.md +37 -0
- package/skills/cc-python-async/SKILL.md +25 -0
- package/skills/cc-python-async/references/common/engineering-practices.md +237 -0
- package/skills/cc-python-async/references/common/engineering-practices.rules.json +121 -0
- package/skills/cc-python-async/references/common/engineering-practices.sources.json +377 -0
- package/skills/cc-python-async/references/engineering-practices.md +73 -0
- package/skills/cc-python-async/references/practice.md +37 -0
- package/skills/cc-python-project-standard/SKILL.md +25 -0
- package/skills/cc-python-project-standard/examples/engineering/README.md +7 -0
- package/skills/cc-python-project-standard/examples/engineering/resource_boundary.py +37 -0
- package/skills/cc-python-project-standard/examples/engineering/test_resource_boundary.py +49 -0
- package/skills/cc-python-project-standard/references/common/engineering-practices.md +237 -0
- package/skills/cc-python-project-standard/references/common/engineering-practices.rules.json +121 -0
- package/skills/cc-python-project-standard/references/common/engineering-practices.sources.json +377 -0
- package/skills/cc-python-project-standard/references/engineering-practices.md +106 -0
- package/skills/cc-python-project-standard/references/practice.md +37 -0
- package/skills/cc-refactoring-core/SKILL.md +8 -0
- package/skills/cc-refactoring-core/references/method.md +16 -0
- package/skills/cc-rust-async/SKILL.md +25 -0
- package/skills/cc-rust-async/references/common/engineering-practices.md +237 -0
- package/skills/cc-rust-async/references/common/engineering-practices.rules.json +121 -0
- package/skills/cc-rust-async/references/common/engineering-practices.sources.json +377 -0
- package/skills/cc-rust-async/references/engineering-practices.md +73 -0
- package/skills/cc-rust-async/references/practice.md +37 -0
- package/skills/cc-rust-project-standard/SKILL.md +25 -0
- package/skills/cc-rust-project-standard/examples/engineering/Cargo.lock +7 -0
- package/skills/cc-rust-project-standard/examples/engineering/Cargo.toml +8 -0
- package/skills/cc-rust-project-standard/examples/engineering/README.md +5 -0
- package/skills/cc-rust-project-standard/examples/engineering/src/lib.rs +43 -0
- package/skills/cc-rust-project-standard/references/common/engineering-practices.md +237 -0
- package/skills/cc-rust-project-standard/references/common/engineering-practices.rules.json +121 -0
- package/skills/cc-rust-project-standard/references/common/engineering-practices.sources.json +377 -0
- package/skills/cc-rust-project-standard/references/engineering-practices.md +106 -0
- package/skills/cc-rust-project-standard/references/practice.md +37 -0
- package/skills/cc-source-driven-development/SKILL.md +8 -0
- package/skills/cc-source-driven-development/references/method.md +19 -0
- package/skills/cc-tauri-project-standard/SKILL.md +21 -0
- package/skills/cc-tauri-project-standard/examples/minimal/README.md +9 -0
- package/skills/cc-tauri-project-standard/examples/minimal/core/Cargo.lock +5 -0
- package/skills/cc-tauri-project-standard/examples/minimal/core/Cargo.toml +9 -0
- package/skills/cc-tauri-project-standard/examples/minimal/core/src/lib.rs +46 -0
- package/skills/cc-tauri-project-standard/examples/minimal/src-tauri/Cargo.toml +12 -0
- package/skills/cc-tauri-project-standard/examples/minimal/src-tauri/build.rs +5 -0
- package/skills/cc-tauri-project-standard/examples/minimal/src-tauri/capabilities/main.json +6 -0
- package/skills/cc-tauri-project-standard/examples/minimal/src-tauri/permissions/documents.toml +4 -0
- package/skills/cc-tauri-project-standard/examples/minimal/src-tauri/src/main.rs +22 -0
- package/skills/cc-tauri-project-standard/examples/minimal/src-tauri/tauri.conf.json +13 -0
- package/skills/cc-tauri-project-standard/examples/minimal/ui/app.js +5 -0
- package/skills/cc-tauri-project-standard/examples/minimal/ui/index.html +1 -0
- package/skills/cc-tauri-project-standard/references/common/engineering-practices.md +237 -0
- package/skills/cc-tauri-project-standard/references/common/engineering-practices.rules.json +121 -0
- package/skills/cc-tauri-project-standard/references/common/engineering-practices.sources.json +377 -0
- package/skills/cc-tauri-project-standard/references/engineering-practices.md +73 -0
- package/skills/cc-tauri-project-standard/references/practice.md +20 -0
- package/skills/cc-tauri-project-standard/references/verification.md +18 -0
- package/skills/cc-tdd-methodology/SKILL.md +8 -0
- package/skills/cc-tdd-methodology/references/method.md +13 -0
- package/skills/cc-technical-diagrams/SKILL.md +34 -0
- package/skills/{fec-image-generation → cc-technical-diagrams}/assets/interactive-diagram.html +371 -371
- package/skills/cc-technical-diagrams/assets/quality-examples/README.md +14 -0
- package/skills/cc-technical-diagrams/assets/quality-examples/architecture.json +121 -0
- package/skills/cc-technical-diagrams/assets/quality-examples/invalid-explicit.json +41 -0
- package/skills/cc-technical-diagrams/assets/quality-examples/sequence.json +53 -0
- package/skills/cc-technical-diagrams/assets/quality-examples/sequence.mmd +21 -0
- package/skills/cc-technical-diagrams/assets/quality-examples/workflow.json +98 -0
- package/skills/cc-technical-diagrams/assets/quality-examples/workflow.mmd +7 -0
- package/skills/{fec-image-generation → cc-technical-diagrams}/references/diagram-workflows.md +12 -5
- package/skills/{fec-image-generation → cc-technical-diagrams}/references/html-technical-diagrams.md +14 -7
- package/skills/cc-technical-diagrams/references/png-qa-autofix.md +37 -0
- package/skills/cc-technical-diagrams/scripts/diagram-browser.mjs +153 -0
- package/skills/cc-technical-diagrams/scripts/diagram-layout.mjs +176 -0
- package/{localized/zh-CN/skills/fec-image-generation → skills/cc-technical-diagrams}/scripts/export-diagram.mjs +48 -80
- package/skills/cc-technical-diagrams/scripts/mermaid-render.mjs +64 -0
- package/skills/cc-technical-diagrams/scripts/png-qa.mjs +462 -0
- package/skills/{fec-image-generation → cc-technical-diagrams}/scripts/tech-diagram-render.mjs +193 -53
- package/skills/{fec-typescript-project-standard → cc-typescript-project-standard}/SKILL.md +10 -4
- package/skills/cc-typescript-project-standard/examples/engineering/README.md +9 -0
- package/skills/cc-typescript-project-standard/examples/engineering/boundary.test.ts +16 -0
- package/skills/cc-typescript-project-standard/examples/engineering/input.ts +12 -0
- package/skills/cc-typescript-project-standard/examples/engineering/package.json +12 -0
- package/skills/cc-typescript-project-standard/examples/engineering/pnpm-lock.yaml +39 -0
- package/skills/cc-typescript-project-standard/examples/engineering/pnpm-workspace.yaml +1 -0
- package/skills/cc-typescript-project-standard/examples/engineering/tsconfig.json +8 -0
- package/skills/cc-typescript-project-standard/references/common/engineering-practices.md +237 -0
- package/skills/cc-typescript-project-standard/references/common/engineering-practices.rules.json +121 -0
- package/skills/cc-typescript-project-standard/references/common/engineering-practices.sources.json +377 -0
- package/skills/cc-typescript-project-standard/references/engineering-practices.md +106 -0
- package/skills/{fec-typescript-project-standard → cc-typescript-project-standard}/references/type-safety-patterns.md +6 -35
- package/skills/{fec-typescript-project-standard → cc-typescript-project-standard}/references/type-safety.md +7 -1
- package/skills/eval_queries.json +738 -72
- package/skills/fec-api-integration/SKILL.md +5 -1
- package/skills/fec-api-integration/references/common/engineering-practices.md +237 -0
- package/skills/fec-api-integration/references/common/engineering-practices.rules.json +121 -0
- package/skills/fec-api-integration/references/common/engineering-practices.sources.json +377 -0
- package/skills/fec-api-integration/references/engineering-practices.md +73 -0
- package/skills/fec-code-review/SKILL.md +24 -1
- package/skills/fec-code-review/references/common/engineering-practices.md +237 -0
- package/skills/fec-code-review/references/common/engineering-practices.rules.json +121 -0
- package/skills/fec-code-review/references/common/engineering-practices.sources.json +377 -0
- package/skills/fec-code-review/references/engineering-practices.md +73 -0
- package/skills/fec-code-review/references/report-template.md +11 -1
- 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-data-fetching/SKILL.md +5 -1
- package/skills/fec-data-fetching/references/common/engineering-practices.md +237 -0
- package/skills/fec-data-fetching/references/common/engineering-practices.rules.json +121 -0
- package/skills/fec-data-fetching/references/common/engineering-practices.sources.json +377 -0
- package/skills/fec-data-fetching/references/engineering-practices.md +73 -0
- package/skills/fec-debug-framework/SKILL.md +2 -51
- package/skills/fec-debug-framework/references/common/debug.md +13 -0
- package/skills/fec-dependency-upgrade/SKILL.md +4 -0
- package/skills/fec-dependency-upgrade/references/common/engineering-practices.md +237 -0
- package/skills/fec-dependency-upgrade/references/common/engineering-practices.rules.json +121 -0
- package/skills/fec-dependency-upgrade/references/common/engineering-practices.sources.json +377 -0
- package/skills/fec-dependency-upgrade/references/engineering-practices.md +73 -0
- package/skills/fec-doc-sync/SKILL.md +7 -28
- package/skills/fec-doc-sync/references/common/doc-sync.md +12 -0
- package/skills/fec-image-generation/SKILL.md +7 -72
- package/skills/fec-image-generation/references/png-qa-autofix.md +9 -2
- package/skills/fec-image-generation/scripts/diagram-layout.mjs +176 -0
- package/skills/fec-image-generation/scripts/png-qa.mjs +36 -5
- package/skills/fec-legacy-web-standard/SKILL.md +1 -1
- package/skills/fec-react-project-standard/SKILL.md +6 -0
- package/skills/fec-react-project-standard/examples/engineering/README.md +7 -0
- package/skills/fec-react-project-standard/examples/engineering/package.json +15 -0
- package/skills/fec-react-project-standard/examples/engineering/pnpm-lock.yaml +662 -0
- package/skills/fec-react-project-standard/examples/engineering/pnpm-workspace.yaml +1 -0
- package/skills/fec-react-project-standard/examples/engineering/request-view.mjs +24 -0
- package/skills/fec-react-project-standard/examples/engineering/request-view.test.mjs +33 -0
- package/skills/fec-react-project-standard/references/common/engineering-practices.md +237 -0
- package/skills/fec-react-project-standard/references/common/engineering-practices.rules.json +121 -0
- package/skills/fec-react-project-standard/references/common/engineering-practices.sources.json +377 -0
- package/skills/fec-react-project-standard/references/engineering-practices.md +73 -0
- package/skills/fec-react-project-standard/references/generic-component-types.md +37 -0
- package/skills/fec-react-project-standard/references/react-quality-patterns.md +3 -3
- package/skills/fec-react-project-standard/references/react-runtime-patterns.md +1 -1
- package/skills/fec-refactor-clean/SKILL.md +3 -0
- package/skills/fec-refactoring/SKILL.md +25 -0
- package/skills/fec-refactoring/references/common/refactoring.md +16 -0
- package/skills/fec-refactoring/references/principles.md +13 -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 +7 -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-security-review/SKILL.md +20 -0
- package/skills/fec-security-review/references/common/engineering-practices.md +237 -0
- package/skills/fec-security-review/references/common/engineering-practices.rules.json +121 -0
- package/skills/fec-security-review/references/common/engineering-practices.sources.json +377 -0
- package/skills/fec-security-review/references/engineering-practices.md +73 -0
- package/skills/fec-security-review/references/report-template.md +10 -0
- package/skills/fec-tdd-workflow/SKILL.md +14 -42
- package/skills/fec-tdd-workflow/references/common/tdd.md +13 -0
- package/skills/fec-testing-strategy/SKILL.md +4 -0
- package/skills/fec-testing-strategy/references/common/engineering-practices.md +237 -0
- package/skills/fec-testing-strategy/references/common/engineering-practices.rules.json +121 -0
- package/skills/fec-testing-strategy/references/common/engineering-practices.sources.json +377 -0
- package/skills/fec-testing-strategy/references/engineering-practices.md +73 -0
- package/skills/fec-vue3-project-standard/SKILL.md +4 -0
- package/skills/fec-vue3-project-standard/references/common/engineering-practices.md +237 -0
- package/skills/fec-vue3-project-standard/references/common/engineering-practices.rules.json +121 -0
- package/skills/fec-vue3-project-standard/references/common/engineering-practices.sources.json +377 -0
- package/skills/fec-vue3-project-standard/references/engineering-practices.md +73 -0
- package/skills/fec-vue3-project-standard/references/vue3-project-structure.md +2 -2
- package/skills/metadata.json +2230 -629
- package/skills/relations.json +467 -74
- package/templates/shared/rules/fec-agent-workflow.md +1 -0
- package/templates/shared/rules/fec-source-driven-development.md +3 -29
- package/templates/shared/rules/fec-typescript.md +4 -4
- package/templates/shared/rules/references/common/source-driven-development.md +19 -0
- 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/localized/zh-CN/skills/fec-source-driven-development/SKILL.md +0 -87
- package/skills/fec-source-driven-development/SKILL.md +0 -87
- /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/data/THIRD_PARTY_NOTICES.md +0 -0
- /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/data/brand-icons.json +0 -0
- /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/data/shape-index.json +0 -0
- /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/references/data-residency.md +0 -0
- /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/references/diagram-patterns.md +0 -0
- /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/references/troubleshooting.md +0 -0
- /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/references/xml-and-mermaid.md +0 -0
- /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/brand-symbols.mjs +0 -0
- /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/diagram-lint.mjs +0 -0
- /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/diagram-url.mjs +0 -0
- /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/drawio-export.mjs +0 -0
- /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/layout-graph.mjs +0 -0
- /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/png-embed-fix.mjs +0 -0
- /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/scan-go-packages.mjs +0 -0
- /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/scan-js-modules.mjs +0 -0
- /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/scan-python-classes.mjs +0 -0
- /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/scan-python-modules.mjs +0 -0
- /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/scan-rust-modules.mjs +0 -0
- /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/scan-ts-modules.mjs +0 -0
- /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/shape-query.mjs +0 -0
- /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/studio-core.mjs +0 -0
- /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/styles/built-in/corporate.json +0 -0
- /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/styles/built-in/default.json +0 -0
- /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/styles/built-in/handdrawn.json +0 -0
- /package/localized/zh-CN/skills/{fec-drawio-studio → cc-drawio-studio}/styles/schema.json +0 -0
- /package/localized/zh-CN/skills/{fec-image-generation → cc-technical-diagrams}/scripts/interactive-diagram-server.mjs +0 -0
- /package/skills/{fec-drawio-studio → cc-drawio-studio}/data/THIRD_PARTY_NOTICES.md +0 -0
- /package/skills/{fec-drawio-studio → cc-drawio-studio}/data/brand-icons.json +0 -0
- /package/skills/{fec-drawio-studio → cc-drawio-studio}/data/shape-index.json +0 -0
- /package/skills/{fec-drawio-studio → cc-drawio-studio}/references/data-residency.md +0 -0
- /package/skills/{fec-drawio-studio → cc-drawio-studio}/references/diagram-patterns.md +0 -0
- /package/skills/{fec-drawio-studio → cc-drawio-studio}/references/troubleshooting.md +0 -0
- /package/skills/{fec-drawio-studio → cc-drawio-studio}/references/xml-and-mermaid.md +0 -0
- /package/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/brand-symbols.mjs +0 -0
- /package/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/diagram-lint.mjs +0 -0
- /package/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/diagram-url.mjs +0 -0
- /package/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/drawio-export.mjs +0 -0
- /package/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/layout-graph.mjs +0 -0
- /package/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/png-embed-fix.mjs +0 -0
- /package/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/scan-go-packages.mjs +0 -0
- /package/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/scan-js-modules.mjs +0 -0
- /package/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/scan-python-classes.mjs +0 -0
- /package/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/scan-python-modules.mjs +0 -0
- /package/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/scan-rust-modules.mjs +0 -0
- /package/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/scan-ts-modules.mjs +0 -0
- /package/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/shape-query.mjs +0 -0
- /package/skills/{fec-drawio-studio → cc-drawio-studio}/scripts/studio-core.mjs +0 -0
- /package/skills/{fec-drawio-studio → cc-drawio-studio}/styles/built-in/corporate.json +0 -0
- /package/skills/{fec-drawio-studio → cc-drawio-studio}/styles/built-in/default.json +0 -0
- /package/skills/{fec-drawio-studio → cc-drawio-studio}/styles/built-in/handdrawn.json +0 -0
- /package/skills/{fec-drawio-studio → cc-drawio-studio}/styles/schema.json +0 -0
- /package/skills/{fec-image-generation → cc-technical-diagrams}/scripts/interactive-diagram-server.mjs +0 -0
|
@@ -0,0 +1,817 @@
|
|
|
1
|
+
# 代码坏味道目录
|
|
2
|
+
|
|
3
|
+
本目录基于用户提供资料第 3 章的 24 种坏味道分类,转换为面向前端工程的证据式诊断卡。标准中英文名称与 ID 保持稳定,说明文字为项目化重写。
|
|
4
|
+
|
|
5
|
+
## SMELL-MYSTERIOUS-NAME — 神秘命名(Mysterious Name)
|
|
6
|
+
|
|
7
|
+
### 诊断含义
|
|
8
|
+
命名无法直接说明程序元素的用途或使用方式。
|
|
9
|
+
|
|
10
|
+
### 强信号
|
|
11
|
+
- 在真实代码中能观察到与上述含义一致的重复依赖、职责混杂、接口不协调或变化耦合。
|
|
12
|
+
- 修改该区域时,需要额外追踪多个位置、隐含状态或实现细节才能保持正确。
|
|
13
|
+
|
|
14
|
+
### 弱信号
|
|
15
|
+
- 阅读者经常需要跨文件跳转才能解释当前意图。
|
|
16
|
+
- 该区域的结构性修改历史上容易遗漏关联点。
|
|
17
|
+
|
|
18
|
+
### 误判保护
|
|
19
|
+
- 缩写若是团队明确约定且领域内普遍理解,不应仅因缩写而判定坏味道。
|
|
20
|
+
|
|
21
|
+
### 必须提供的证据
|
|
22
|
+
- 指出具体文件/符号,并展示实际的重复关系、变化模式或结构负担;不能只依据行数或复杂度指标下结论。
|
|
23
|
+
|
|
24
|
+
### 可能影响
|
|
25
|
+
- 增加理解成本、变化耦合或结构演进时的回归风险。
|
|
26
|
+
|
|
27
|
+
### 候选重构
|
|
28
|
+
- `RF-CHANGE-FUNCTION-DECLARATION`
|
|
29
|
+
- `RF-RENAME-VARIABLE`
|
|
30
|
+
- `RF-RENAME-FIELD`
|
|
31
|
+
|
|
32
|
+
### 相关坏味道
|
|
33
|
+
- 相关坏味道必须独立取证,不因当前坏味道自动成立。
|
|
34
|
+
|
|
35
|
+
### 前端常见表现
|
|
36
|
+
- 可出现在 React/Vue 组件、Hook/Composable、Store、API Client、路由、表单或数据转换代码中;判断时优先检查真实数据所有权、生命周期和公共契约。
|
|
37
|
+
|
|
38
|
+
## SMELL-DUPLICATED-CODE — 重复代码(Duplicated Code)
|
|
39
|
+
|
|
40
|
+
### 诊断含义
|
|
41
|
+
相同或近似的代码结构在多个位置重复出现,并需要同步演进。
|
|
42
|
+
|
|
43
|
+
### 强信号
|
|
44
|
+
- 在真实代码中能观察到与上述含义一致的重复依赖、职责混杂、接口不协调或变化耦合。
|
|
45
|
+
- 修改该区域时,需要额外追踪多个位置、隐含状态或实现细节才能保持正确。
|
|
46
|
+
|
|
47
|
+
### 弱信号
|
|
48
|
+
- 阅读者经常需要跨文件跳转才能解释当前意图。
|
|
49
|
+
- 该区域的结构性修改历史上容易遗漏关联点。
|
|
50
|
+
|
|
51
|
+
### 误判保护
|
|
52
|
+
- 外观相似但业务变化原因不同的代码,不应机械合并。
|
|
53
|
+
|
|
54
|
+
### 必须提供的证据
|
|
55
|
+
- 指出具体文件/符号,并展示实际的重复关系、变化模式或结构负担;不能只依据行数或复杂度指标下结论。
|
|
56
|
+
|
|
57
|
+
### 可能影响
|
|
58
|
+
- 增加理解成本、变化耦合或结构演进时的回归风险。
|
|
59
|
+
|
|
60
|
+
### 候选重构
|
|
61
|
+
- `RF-EXTRACT-FUNCTION`
|
|
62
|
+
- `RF-SLIDE-STATEMENTS`
|
|
63
|
+
- `RF-PULL-UP-METHOD`
|
|
64
|
+
|
|
65
|
+
### 相关坏味道
|
|
66
|
+
- 相关坏味道必须独立取证,不因当前坏味道自动成立。
|
|
67
|
+
|
|
68
|
+
### 前端常见表现
|
|
69
|
+
- 可出现在 React/Vue 组件、Hook/Composable、Store、API Client、路由、表单或数据转换代码中;判断时优先检查真实数据所有权、生命周期和公共契约。
|
|
70
|
+
|
|
71
|
+
## SMELL-LONG-FUNCTION — 过长函数(Long Function)
|
|
72
|
+
|
|
73
|
+
### 诊断含义
|
|
74
|
+
函数混合了多个意图,必须深入阅读实现细节才能理解其职责。
|
|
75
|
+
|
|
76
|
+
### 强信号
|
|
77
|
+
- 在真实代码中能观察到与上述含义一致的重复依赖、职责混杂、接口不协调或变化耦合。
|
|
78
|
+
- 修改该区域时,需要额外追踪多个位置、隐含状态或实现细节才能保持正确。
|
|
79
|
+
|
|
80
|
+
### 弱信号
|
|
81
|
+
- 阅读者经常需要跨文件跳转才能解释当前意图。
|
|
82
|
+
- 该区域的结构性修改历史上容易遗漏关联点。
|
|
83
|
+
|
|
84
|
+
### 误判保护
|
|
85
|
+
- 不能只凭行数判定;内聚且需要连续阅读的算法可以合理地较长。
|
|
86
|
+
|
|
87
|
+
### 必须提供的证据
|
|
88
|
+
- 指出具体文件/符号,并展示实际的重复关系、变化模式或结构负担;不能只依据行数或复杂度指标下结论。
|
|
89
|
+
|
|
90
|
+
### 可能影响
|
|
91
|
+
- 增加理解成本、变化耦合或结构演进时的回归风险。
|
|
92
|
+
|
|
93
|
+
### 候选重构
|
|
94
|
+
- `RF-EXTRACT-FUNCTION`
|
|
95
|
+
- `RF-REPLACE-TEMP-WITH-QUERY`
|
|
96
|
+
- `RF-INTRODUCE-PARAMETER-OBJECT`
|
|
97
|
+
- `RF-PRESERVE-WHOLE-OBJECT`
|
|
98
|
+
- `RF-REPLACE-FUNCTION-WITH-COMMAND`
|
|
99
|
+
- `RF-DECOMPOSE-CONDITIONAL`
|
|
100
|
+
- `RF-REPLACE-CONDITIONAL-WITH-POLYMORPHISM`
|
|
101
|
+
- `RF-SPLIT-LOOP`
|
|
102
|
+
|
|
103
|
+
### 相关坏味道
|
|
104
|
+
- 相关坏味道必须独立取证,不因当前坏味道自动成立。
|
|
105
|
+
|
|
106
|
+
### 前端常见表现
|
|
107
|
+
- 可出现在 React/Vue 组件、Hook/Composable、Store、API Client、路由、表单或数据转换代码中;判断时优先检查真实数据所有权、生命周期和公共契约。
|
|
108
|
+
|
|
109
|
+
## SMELL-LONG-PARAMETER-LIST — 过长参数列表(Long Parameter List)
|
|
110
|
+
|
|
111
|
+
### 诊断含义
|
|
112
|
+
函数接收大量彼此分散的参数,使参数之间的关系和来源难以理解。
|
|
113
|
+
|
|
114
|
+
### 强信号
|
|
115
|
+
- 在真实代码中能观察到与上述含义一致的重复依赖、职责混杂、接口不协调或变化耦合。
|
|
116
|
+
- 修改该区域时,需要额外追踪多个位置、隐含状态或实现细节才能保持正确。
|
|
117
|
+
|
|
118
|
+
### 弱信号
|
|
119
|
+
- 阅读者经常需要跨文件跳转才能解释当前意图。
|
|
120
|
+
- 该区域的结构性修改历史上容易遗漏关联点。
|
|
121
|
+
|
|
122
|
+
### 误判保护
|
|
123
|
+
- 若边界确实需要多个独立值,参数对象反而掩盖含义,则不应强行包装。
|
|
124
|
+
|
|
125
|
+
### 必须提供的证据
|
|
126
|
+
- 指出具体文件/符号,并展示实际的重复关系、变化模式或结构负担;不能只依据行数或复杂度指标下结论。
|
|
127
|
+
|
|
128
|
+
### 可能影响
|
|
129
|
+
- 增加理解成本、变化耦合或结构演进时的回归风险。
|
|
130
|
+
|
|
131
|
+
### 候选重构
|
|
132
|
+
- `RF-REPLACE-PARAMETER-WITH-QUERY`
|
|
133
|
+
- `RF-PRESERVE-WHOLE-OBJECT`
|
|
134
|
+
- `RF-INTRODUCE-PARAMETER-OBJECT`
|
|
135
|
+
- `RF-REMOVE-FLAG-ARGUMENT`
|
|
136
|
+
- `RF-COMBINE-FUNCTIONS-INTO-CLASS`
|
|
137
|
+
|
|
138
|
+
### 相关坏味道
|
|
139
|
+
- 相关坏味道必须独立取证,不因当前坏味道自动成立。
|
|
140
|
+
|
|
141
|
+
### 前端常见表现
|
|
142
|
+
- 可出现在 React/Vue 组件、Hook/Composable、Store、API Client、路由、表单或数据转换代码中;判断时优先检查真实数据所有权、生命周期和公共契约。
|
|
143
|
+
|
|
144
|
+
## SMELL-GLOBAL-DATA — 全局数据(Global Data)
|
|
145
|
+
|
|
146
|
+
### 诊断含义
|
|
147
|
+
可被广泛访问的数据缺少受控的读取和修改边界。
|
|
148
|
+
|
|
149
|
+
### 强信号
|
|
150
|
+
- 在真实代码中能观察到与上述含义一致的重复依赖、职责混杂、接口不协调或变化耦合。
|
|
151
|
+
- 修改该区域时,需要额外追踪多个位置、隐含状态或实现细节才能保持正确。
|
|
152
|
+
|
|
153
|
+
### 弱信号
|
|
154
|
+
- 阅读者经常需要跨文件跳转才能解释当前意图。
|
|
155
|
+
- 该区域的结构性修改历史上容易遗漏关联点。
|
|
156
|
+
|
|
157
|
+
### 误判保护
|
|
158
|
+
- 启动后不可变的全局配置风险较低,但仍可通过封装明确所有权。
|
|
159
|
+
|
|
160
|
+
### 必须提供的证据
|
|
161
|
+
- 指出具体文件/符号,并展示实际的重复关系、变化模式或结构负担;不能只依据行数或复杂度指标下结论。
|
|
162
|
+
|
|
163
|
+
### 可能影响
|
|
164
|
+
- 增加理解成本、变化耦合或结构演进时的回归风险。
|
|
165
|
+
|
|
166
|
+
### 候选重构
|
|
167
|
+
- `RF-ENCAPSULATE-VARIABLE`
|
|
168
|
+
|
|
169
|
+
### 相关坏味道
|
|
170
|
+
- 相关坏味道必须独立取证,不因当前坏味道自动成立。
|
|
171
|
+
|
|
172
|
+
### 前端常见表现
|
|
173
|
+
- 可出现在 React/Vue 组件、Hook/Composable、Store、API Client、路由、表单或数据转换代码中;判断时优先检查真实数据所有权、生命周期和公共契约。
|
|
174
|
+
|
|
175
|
+
## SMELL-MUTABLE-DATA — 可变数据(Mutable Data)
|
|
176
|
+
|
|
177
|
+
### 诊断含义
|
|
178
|
+
数据可从多处被修改或同一变量承载多种含义,使状态变化难以推理。
|
|
179
|
+
|
|
180
|
+
### 强信号
|
|
181
|
+
- 在真实代码中能观察到与上述含义一致的重复依赖、职责混杂、接口不协调或变化耦合。
|
|
182
|
+
- 修改该区域时,需要额外追踪多个位置、隐含状态或实现细节才能保持正确。
|
|
183
|
+
|
|
184
|
+
### 弱信号
|
|
185
|
+
- 阅读者经常需要跨文件跳转才能解释当前意图。
|
|
186
|
+
- 该区域的结构性修改历史上容易遗漏关联点。
|
|
187
|
+
|
|
188
|
+
### 误判保护
|
|
189
|
+
- 清晰算法内部、作用域受控的局部可变状态并不自动构成坏味道。
|
|
190
|
+
|
|
191
|
+
### 必须提供的证据
|
|
192
|
+
- 指出具体文件/符号,并展示实际的重复关系、变化模式或结构负担;不能只依据行数或复杂度指标下结论。
|
|
193
|
+
|
|
194
|
+
### 可能影响
|
|
195
|
+
- 增加理解成本、变化耦合或结构演进时的回归风险。
|
|
196
|
+
|
|
197
|
+
### 候选重构
|
|
198
|
+
- `RF-ENCAPSULATE-VARIABLE`
|
|
199
|
+
- `RF-SPLIT-VARIABLE`
|
|
200
|
+
- `RF-SLIDE-STATEMENTS`
|
|
201
|
+
- `RF-EXTRACT-FUNCTION`
|
|
202
|
+
- `RF-SEPARATE-QUERY-FROM-MODIFIER`
|
|
203
|
+
- `RF-REMOVE-SETTING-METHOD`
|
|
204
|
+
- `RF-REPLACE-DERIVED-VARIABLE-WITH-QUERY`
|
|
205
|
+
- `RF-COMBINE-FUNCTIONS-INTO-CLASS`
|
|
206
|
+
- `RF-COMBINE-FUNCTIONS-INTO-TRANSFORM`
|
|
207
|
+
- `RF-CHANGE-REFERENCE-TO-VALUE`
|
|
208
|
+
|
|
209
|
+
### 相关坏味道
|
|
210
|
+
- 相关坏味道必须独立取证,不因当前坏味道自动成立。
|
|
211
|
+
|
|
212
|
+
### 前端常见表现
|
|
213
|
+
- 可出现在 React/Vue 组件、Hook/Composable、Store、API Client、路由、表单或数据转换代码中;判断时优先检查真实数据所有权、生命周期和公共契约。
|
|
214
|
+
|
|
215
|
+
## SMELL-DIVERGENT-CHANGE — 发散式变化(Divergent Change)
|
|
216
|
+
|
|
217
|
+
### 诊断含义
|
|
218
|
+
一个模块会因为多个彼此无关的原因或上下文而频繁变化。
|
|
219
|
+
|
|
220
|
+
### 强信号
|
|
221
|
+
- 在真实代码中能观察到与上述含义一致的重复依赖、职责混杂、接口不协调或变化耦合。
|
|
222
|
+
- 修改该区域时,需要额外追踪多个位置、隐含状态或实现细节才能保持正确。
|
|
223
|
+
|
|
224
|
+
### 弱信号
|
|
225
|
+
- 阅读者经常需要跨文件跳转才能解释当前意图。
|
|
226
|
+
- 该区域的结构性修改历史上容易遗漏关联点。
|
|
227
|
+
|
|
228
|
+
### 误判保护
|
|
229
|
+
- 小而内聚的模块可以合理响应多个紧密相关的变化。
|
|
230
|
+
|
|
231
|
+
### 必须提供的证据
|
|
232
|
+
- 指出具体文件/符号,并展示实际的重复关系、变化模式或结构负担;不能只依据行数或复杂度指标下结论。
|
|
233
|
+
|
|
234
|
+
### 可能影响
|
|
235
|
+
- 增加理解成本、变化耦合或结构演进时的回归风险。
|
|
236
|
+
|
|
237
|
+
### 候选重构
|
|
238
|
+
- `RF-SPLIT-PHASE`
|
|
239
|
+
- `RF-MOVE-FUNCTION`
|
|
240
|
+
- `RF-EXTRACT-FUNCTION`
|
|
241
|
+
- `RF-EXTRACT-CLASS`
|
|
242
|
+
|
|
243
|
+
### 相关坏味道
|
|
244
|
+
- 相关坏味道必须独立取证,不因当前坏味道自动成立。
|
|
245
|
+
|
|
246
|
+
### 前端常见表现
|
|
247
|
+
- 可出现在 React/Vue 组件、Hook/Composable、Store、API Client、路由、表单或数据转换代码中;判断时优先检查真实数据所有权、生命周期和公共契约。
|
|
248
|
+
|
|
249
|
+
## SMELL-SHOTGUN-SURGERY — 霰弹式修改(Shotgun Surgery)
|
|
250
|
+
|
|
251
|
+
### 诊断含义
|
|
252
|
+
一个概念性变化需要在代码库许多位置进行零散修改。
|
|
253
|
+
|
|
254
|
+
### 强信号
|
|
255
|
+
- 在真实代码中能观察到与上述含义一致的重复依赖、职责混杂、接口不协调或变化耦合。
|
|
256
|
+
- 修改该区域时,需要额外追踪多个位置、隐含状态或实现细节才能保持正确。
|
|
257
|
+
|
|
258
|
+
### 弱信号
|
|
259
|
+
- 阅读者经常需要跨文件跳转才能解释当前意图。
|
|
260
|
+
- 该区域的结构性修改历史上容易遗漏关联点。
|
|
261
|
+
|
|
262
|
+
### 误判保护
|
|
263
|
+
- 遥测等横切关注点可能有意跨边界,需结合基础设施设计判断。
|
|
264
|
+
|
|
265
|
+
### 必须提供的证据
|
|
266
|
+
- 指出具体文件/符号,并展示实际的重复关系、变化模式或结构负担;不能只依据行数或复杂度指标下结论。
|
|
267
|
+
|
|
268
|
+
### 可能影响
|
|
269
|
+
- 增加理解成本、变化耦合或结构演进时的回归风险。
|
|
270
|
+
|
|
271
|
+
### 候选重构
|
|
272
|
+
- `RF-MOVE-FUNCTION`
|
|
273
|
+
- `RF-MOVE-FIELD`
|
|
274
|
+
- `RF-COMBINE-FUNCTIONS-INTO-CLASS`
|
|
275
|
+
- `RF-COMBINE-FUNCTIONS-INTO-TRANSFORM`
|
|
276
|
+
- `RF-SPLIT-PHASE`
|
|
277
|
+
- `RF-INLINE-FUNCTION`
|
|
278
|
+
- `RF-INLINE-CLASS`
|
|
279
|
+
|
|
280
|
+
### 相关坏味道
|
|
281
|
+
- 相关坏味道必须独立取证,不因当前坏味道自动成立。
|
|
282
|
+
|
|
283
|
+
### 前端常见表现
|
|
284
|
+
- 可出现在 React/Vue 组件、Hook/Composable、Store、API Client、路由、表单或数据转换代码中;判断时优先检查真实数据所有权、生命周期和公共契约。
|
|
285
|
+
|
|
286
|
+
## SMELL-FEATURE-ENVY — 依恋情结(Feature Envy)
|
|
287
|
+
|
|
288
|
+
### 诊断含义
|
|
289
|
+
一个函数对其他模块的数据或行为依赖明显强于对自身模块的依赖。
|
|
290
|
+
|
|
291
|
+
### 强信号
|
|
292
|
+
- 在真实代码中能观察到与上述含义一致的重复依赖、职责混杂、接口不协调或变化耦合。
|
|
293
|
+
- 修改该区域时,需要额外追踪多个位置、隐含状态或实现细节才能保持正确。
|
|
294
|
+
|
|
295
|
+
### 弱信号
|
|
296
|
+
- 阅读者经常需要跨文件跳转才能解释当前意图。
|
|
297
|
+
- 该区域的结构性修改历史上容易遗漏关联点。
|
|
298
|
+
|
|
299
|
+
### 误判保护
|
|
300
|
+
- 编排函数本就可能协调多个所有者,不应仅因跨模块访问而整体搬移。
|
|
301
|
+
|
|
302
|
+
### 必须提供的证据
|
|
303
|
+
- 指出具体文件/符号,并展示实际的重复关系、变化模式或结构负担;不能只依据行数或复杂度指标下结论。
|
|
304
|
+
|
|
305
|
+
### 可能影响
|
|
306
|
+
- 增加理解成本、变化耦合或结构演进时的回归风险。
|
|
307
|
+
|
|
308
|
+
### 候选重构
|
|
309
|
+
- `RF-MOVE-FUNCTION`
|
|
310
|
+
- `RF-EXTRACT-FUNCTION`
|
|
311
|
+
|
|
312
|
+
### 相关坏味道
|
|
313
|
+
- 相关坏味道必须独立取证,不因当前坏味道自动成立。
|
|
314
|
+
|
|
315
|
+
### 前端常见表现
|
|
316
|
+
- 可出现在 React/Vue 组件、Hook/Composable、Store、API Client、路由、表单或数据转换代码中;判断时优先检查真实数据所有权、生命周期和公共契约。
|
|
317
|
+
|
|
318
|
+
## SMELL-DATA-CLUMPS — 数据泥团(Data Clumps)
|
|
319
|
+
|
|
320
|
+
### 诊断含义
|
|
321
|
+
同一组数据项反复以字段或参数形式成组出现。
|
|
322
|
+
|
|
323
|
+
### 强信号
|
|
324
|
+
- 在真实代码中能观察到与上述含义一致的重复依赖、职责混杂、接口不协调或变化耦合。
|
|
325
|
+
- 修改该区域时,需要额外追踪多个位置、隐含状态或实现细节才能保持正确。
|
|
326
|
+
|
|
327
|
+
### 弱信号
|
|
328
|
+
- 阅读者经常需要跨文件跳转才能解释当前意图。
|
|
329
|
+
- 该区域的结构性修改历史上容易遗漏关联点。
|
|
330
|
+
|
|
331
|
+
### 误判保护
|
|
332
|
+
- 一次性的临时传输结构未必值得建立领域抽象。
|
|
333
|
+
|
|
334
|
+
### 必须提供的证据
|
|
335
|
+
- 指出具体文件/符号,并展示实际的重复关系、变化模式或结构负担;不能只依据行数或复杂度指标下结论。
|
|
336
|
+
|
|
337
|
+
### 可能影响
|
|
338
|
+
- 增加理解成本、变化耦合或结构演进时的回归风险。
|
|
339
|
+
|
|
340
|
+
### 候选重构
|
|
341
|
+
- `RF-EXTRACT-CLASS`
|
|
342
|
+
- `RF-INTRODUCE-PARAMETER-OBJECT`
|
|
343
|
+
- `RF-PRESERVE-WHOLE-OBJECT`
|
|
344
|
+
|
|
345
|
+
### 相关坏味道
|
|
346
|
+
- 相关坏味道必须独立取证,不因当前坏味道自动成立。
|
|
347
|
+
|
|
348
|
+
### 前端常见表现
|
|
349
|
+
- 可出现在 React/Vue 组件、Hook/Composable、Store、API Client、路由、表单或数据转换代码中;判断时优先检查真实数据所有权、生命周期和公共契约。
|
|
350
|
+
|
|
351
|
+
## SMELL-PRIMITIVE-OBSESSION — 基本类型偏执(Primitive Obsession)
|
|
352
|
+
|
|
353
|
+
### 诊断含义
|
|
354
|
+
带有领域规则或不变量的概念仅使用普通字符串、数字或布尔值表达。
|
|
355
|
+
|
|
356
|
+
### 强信号
|
|
357
|
+
- 在真实代码中能观察到与上述含义一致的重复依赖、职责混杂、接口不协调或变化耦合。
|
|
358
|
+
- 修改该区域时,需要额外追踪多个位置、隐含状态或实现细节才能保持正确。
|
|
359
|
+
|
|
360
|
+
### 弱信号
|
|
361
|
+
- 阅读者经常需要跨文件跳转才能解释当前意图。
|
|
362
|
+
- 该区域的结构性修改历史上容易遗漏关联点。
|
|
363
|
+
|
|
364
|
+
### 误判保护
|
|
365
|
+
- 没有领域行为或不变量的普通值无需为了“对象化”而包装。
|
|
366
|
+
|
|
367
|
+
### 必须提供的证据
|
|
368
|
+
- 指出具体文件/符号,并展示实际的重复关系、变化模式或结构负担;不能只依据行数或复杂度指标下结论。
|
|
369
|
+
|
|
370
|
+
### 可能影响
|
|
371
|
+
- 增加理解成本、变化耦合或结构演进时的回归风险。
|
|
372
|
+
|
|
373
|
+
### 候选重构
|
|
374
|
+
- `RF-REPLACE-PRIMITIVE-WITH-OBJECT`
|
|
375
|
+
- `RF-REPLACE-TYPE-CODE-WITH-SUBCLASSES`
|
|
376
|
+
- `RF-REPLACE-CONDITIONAL-WITH-POLYMORPHISM`
|
|
377
|
+
- `RF-EXTRACT-CLASS`
|
|
378
|
+
- `RF-INTRODUCE-PARAMETER-OBJECT`
|
|
379
|
+
|
|
380
|
+
### 相关坏味道
|
|
381
|
+
- 相关坏味道必须独立取证,不因当前坏味道自动成立。
|
|
382
|
+
|
|
383
|
+
### 前端常见表现
|
|
384
|
+
- 可出现在 React/Vue 组件、Hook/Composable、Store、API Client、路由、表单或数据转换代码中;判断时优先检查真实数据所有权、生命周期和公共契约。
|
|
385
|
+
|
|
386
|
+
## SMELL-REPEATED-SWITCHES — 重复的 switch(Repeated Switches)
|
|
387
|
+
|
|
388
|
+
### 诊断含义
|
|
389
|
+
同一类型或变体判断在多个条件分支中重复出现并需要保持同步。
|
|
390
|
+
|
|
391
|
+
### 强信号
|
|
392
|
+
- 在真实代码中能观察到与上述含义一致的重复依赖、职责混杂、接口不协调或变化耦合。
|
|
393
|
+
- 修改该区域时,需要额外追踪多个位置、隐含状态或实现细节才能保持正确。
|
|
394
|
+
|
|
395
|
+
### 弱信号
|
|
396
|
+
- 阅读者经常需要跨文件跳转才能解释当前意图。
|
|
397
|
+
- 该区域的结构性修改历史上容易遗漏关联点。
|
|
398
|
+
|
|
399
|
+
### 误判保护
|
|
400
|
+
- 单个 switch 不能证明“重复的 switch”;集中且穷尽的分派器可能是合适设计。
|
|
401
|
+
|
|
402
|
+
### 必须提供的证据
|
|
403
|
+
- 指出具体文件/符号,并展示实际的重复关系、变化模式或结构负担;不能只依据行数或复杂度指标下结论。
|
|
404
|
+
|
|
405
|
+
### 可能影响
|
|
406
|
+
- 增加理解成本、变化耦合或结构演进时的回归风险。
|
|
407
|
+
|
|
408
|
+
### 候选重构
|
|
409
|
+
- `RF-REPLACE-CONDITIONAL-WITH-POLYMORPHISM`
|
|
410
|
+
|
|
411
|
+
### 相关坏味道
|
|
412
|
+
- 相关坏味道必须独立取证,不因当前坏味道自动成立。
|
|
413
|
+
|
|
414
|
+
### 前端常见表现
|
|
415
|
+
- 可出现在 React/Vue 组件、Hook/Composable、Store、API Client、路由、表单或数据转换代码中;判断时优先检查真实数据所有权、生命周期和公共契约。
|
|
416
|
+
|
|
417
|
+
## SMELL-LOOPS — 循环语句(Loops)
|
|
418
|
+
|
|
419
|
+
### 诊断含义
|
|
420
|
+
命令式循环掩盖了本可更直接表达意图的数据变换过程。
|
|
421
|
+
|
|
422
|
+
### 强信号
|
|
423
|
+
- 在真实代码中能观察到与上述含义一致的重复依赖、职责混杂、接口不协调或变化耦合。
|
|
424
|
+
- 修改该区域时,需要额外追踪多个位置、隐含状态或实现细节才能保持正确。
|
|
425
|
+
|
|
426
|
+
### 弱信号
|
|
427
|
+
- 阅读者经常需要跨文件跳转才能解释当前意图。
|
|
428
|
+
- 该区域的结构性修改历史上容易遗漏关联点。
|
|
429
|
+
|
|
430
|
+
### 误判保护
|
|
431
|
+
- 性能敏感、需要提前退出、带状态或异步控制的循环可能使用循环更清晰。
|
|
432
|
+
|
|
433
|
+
### 必须提供的证据
|
|
434
|
+
- 指出具体文件/符号,并展示实际的重复关系、变化模式或结构负担;不能只依据行数或复杂度指标下结论。
|
|
435
|
+
|
|
436
|
+
### 可能影响
|
|
437
|
+
- 增加理解成本、变化耦合或结构演进时的回归风险。
|
|
438
|
+
|
|
439
|
+
### 候选重构
|
|
440
|
+
- `RF-REPLACE-LOOP-WITH-PIPELINE`
|
|
441
|
+
|
|
442
|
+
### 相关坏味道
|
|
443
|
+
- 相关坏味道必须独立取证,不因当前坏味道自动成立。
|
|
444
|
+
|
|
445
|
+
### 前端常见表现
|
|
446
|
+
- 可出现在 React/Vue 组件、Hook/Composable、Store、API Client、路由、表单或数据转换代码中;判断时优先检查真实数据所有权、生命周期和公共契约。
|
|
447
|
+
|
|
448
|
+
## SMELL-LAZY-ELEMENT — 冗赘的元素(Lazy Element)
|
|
449
|
+
|
|
450
|
+
### 诊断含义
|
|
451
|
+
抽象层没有提供足够的命名、行为或变化隔离价值,却增加了间接层。
|
|
452
|
+
|
|
453
|
+
### 强信号
|
|
454
|
+
- 在真实代码中能观察到与上述含义一致的重复依赖、职责混杂、接口不协调或变化耦合。
|
|
455
|
+
- 修改该区域时,需要额外追踪多个位置、隐含状态或实现细节才能保持正确。
|
|
456
|
+
|
|
457
|
+
### 弱信号
|
|
458
|
+
- 阅读者经常需要跨文件跳转才能解释当前意图。
|
|
459
|
+
- 该区域的结构性修改历史上容易遗漏关联点。
|
|
460
|
+
|
|
461
|
+
### 误判保护
|
|
462
|
+
- 很小的命名函数只要能表达意图或提供稳定边界,仍可能有价值。
|
|
463
|
+
|
|
464
|
+
### 必须提供的证据
|
|
465
|
+
- 指出具体文件/符号,并展示实际的重复关系、变化模式或结构负担;不能只依据行数或复杂度指标下结论。
|
|
466
|
+
|
|
467
|
+
### 可能影响
|
|
468
|
+
- 增加理解成本、变化耦合或结构演进时的回归风险。
|
|
469
|
+
|
|
470
|
+
### 候选重构
|
|
471
|
+
- `RF-INLINE-FUNCTION`
|
|
472
|
+
- `RF-INLINE-CLASS`
|
|
473
|
+
- `RF-COLLAPSE-HIERARCHY`
|
|
474
|
+
|
|
475
|
+
### 相关坏味道
|
|
476
|
+
- 相关坏味道必须独立取证,不因当前坏味道自动成立。
|
|
477
|
+
|
|
478
|
+
### 前端常见表现
|
|
479
|
+
- 可出现在 React/Vue 组件、Hook/Composable、Store、API Client、路由、表单或数据转换代码中;判断时优先检查真实数据所有权、生命周期和公共契约。
|
|
480
|
+
|
|
481
|
+
## SMELL-SPECULATIVE-GENERALITY — 夸夸其谈通用性(Speculative Generality)
|
|
482
|
+
|
|
483
|
+
### 诊断含义
|
|
484
|
+
抽象、参数或扩展点主要服务于假设性的未来需求,而当前没有真实用例。
|
|
485
|
+
|
|
486
|
+
### 强信号
|
|
487
|
+
- 在真实代码中能观察到与上述含义一致的重复依赖、职责混杂、接口不协调或变化耦合。
|
|
488
|
+
- 修改该区域时,需要额外追踪多个位置、隐含状态或实现细节才能保持正确。
|
|
489
|
+
|
|
490
|
+
### 弱信号
|
|
491
|
+
- 阅读者经常需要跨文件跳转才能解释当前意图。
|
|
492
|
+
- 该区域的结构性修改历史上容易遗漏关联点。
|
|
493
|
+
|
|
494
|
+
### 误判保护
|
|
495
|
+
- 有明确证据支持的近期兼容需求可以合理保留扩展点。
|
|
496
|
+
|
|
497
|
+
### 必须提供的证据
|
|
498
|
+
- 指出具体文件/符号,并展示实际的重复关系、变化模式或结构负担;不能只依据行数或复杂度指标下结论。
|
|
499
|
+
|
|
500
|
+
### 可能影响
|
|
501
|
+
- 增加理解成本、变化耦合或结构演进时的回归风险。
|
|
502
|
+
|
|
503
|
+
### 候选重构
|
|
504
|
+
- `RF-COLLAPSE-HIERARCHY`
|
|
505
|
+
- `RF-INLINE-FUNCTION`
|
|
506
|
+
- `RF-INLINE-CLASS`
|
|
507
|
+
- `RF-CHANGE-FUNCTION-DECLARATION`
|
|
508
|
+
- `RF-REMOVE-DEAD-CODE`
|
|
509
|
+
|
|
510
|
+
### 相关坏味道
|
|
511
|
+
- 相关坏味道必须独立取证,不因当前坏味道自动成立。
|
|
512
|
+
|
|
513
|
+
### 前端常见表现
|
|
514
|
+
- 可出现在 React/Vue 组件、Hook/Composable、Store、API Client、路由、表单或数据转换代码中;判断时优先检查真实数据所有权、生命周期和公共契约。
|
|
515
|
+
|
|
516
|
+
## SMELL-TEMPORARY-FIELD — 临时字段(Temporary Field)
|
|
517
|
+
|
|
518
|
+
### 诊断含义
|
|
519
|
+
字段只在某个阶段或特殊条件下有意义,使对象在其他时刻处于难解释的半有效状态。
|
|
520
|
+
|
|
521
|
+
### 强信号
|
|
522
|
+
- 在真实代码中能观察到与上述含义一致的重复依赖、职责混杂、接口不协调或变化耦合。
|
|
523
|
+
- 修改该区域时,需要额外追踪多个位置、隐含状态或实现细节才能保持正确。
|
|
524
|
+
|
|
525
|
+
### 弱信号
|
|
526
|
+
- 阅读者经常需要跨文件跳转才能解释当前意图。
|
|
527
|
+
- 该区域的结构性修改历史上容易遗漏关联点。
|
|
528
|
+
|
|
529
|
+
### 误判保护
|
|
530
|
+
- 明确建模的部分状态或异步状态包含可选字段,并不自动构成坏味道。
|
|
531
|
+
|
|
532
|
+
### 必须提供的证据
|
|
533
|
+
- 指出具体文件/符号,并展示实际的重复关系、变化模式或结构负担;不能只依据行数或复杂度指标下结论。
|
|
534
|
+
|
|
535
|
+
### 可能影响
|
|
536
|
+
- 增加理解成本、变化耦合或结构演进时的回归风险。
|
|
537
|
+
|
|
538
|
+
### 候选重构
|
|
539
|
+
- `RF-EXTRACT-CLASS`
|
|
540
|
+
- `RF-MOVE-FUNCTION`
|
|
541
|
+
- `RF-INTRODUCE-SPECIAL-CASE`
|
|
542
|
+
|
|
543
|
+
### 相关坏味道
|
|
544
|
+
- 相关坏味道必须独立取证,不因当前坏味道自动成立。
|
|
545
|
+
|
|
546
|
+
### 前端常见表现
|
|
547
|
+
- 可出现在 React/Vue 组件、Hook/Composable、Store、API Client、路由、表单或数据转换代码中;判断时优先检查真实数据所有权、生命周期和公共契约。
|
|
548
|
+
|
|
549
|
+
## SMELL-MESSAGE-CHAINS — 过长的消息链(Message Chains)
|
|
550
|
+
|
|
551
|
+
### 诊断含义
|
|
552
|
+
客户端依赖穿过多个对象的导航路径才能取得真正需要的数据或行为。
|
|
553
|
+
|
|
554
|
+
### 强信号
|
|
555
|
+
- 在真实代码中能观察到与上述含义一致的重复依赖、职责混杂、接口不协调或变化耦合。
|
|
556
|
+
- 修改该区域时,需要额外追踪多个位置、隐含状态或实现细节才能保持正确。
|
|
557
|
+
|
|
558
|
+
### 弱信号
|
|
559
|
+
- 阅读者经常需要跨文件跳转才能解释当前意图。
|
|
560
|
+
- 该区域的结构性修改历史上容易遗漏关联点。
|
|
561
|
+
|
|
562
|
+
### 误判保护
|
|
563
|
+
- 函数/数组管道并不自动等于消息链;流式 API 可以是有意且内聚的。
|
|
564
|
+
|
|
565
|
+
### 必须提供的证据
|
|
566
|
+
- 指出具体文件/符号,并展示实际的重复关系、变化模式或结构负担;不能只依据行数或复杂度指标下结论。
|
|
567
|
+
|
|
568
|
+
### 可能影响
|
|
569
|
+
- 增加理解成本、变化耦合或结构演进时的回归风险。
|
|
570
|
+
|
|
571
|
+
### 候选重构
|
|
572
|
+
- `RF-HIDE-DELEGATE`
|
|
573
|
+
- `RF-EXTRACT-FUNCTION`
|
|
574
|
+
- `RF-MOVE-FUNCTION`
|
|
575
|
+
|
|
576
|
+
### 相关坏味道
|
|
577
|
+
- 相关坏味道必须独立取证,不因当前坏味道自动成立。
|
|
578
|
+
|
|
579
|
+
### 前端常见表现
|
|
580
|
+
- 可出现在 React/Vue 组件、Hook/Composable、Store、API Client、路由、表单或数据转换代码中;判断时优先检查真实数据所有权、生命周期和公共契约。
|
|
581
|
+
|
|
582
|
+
## SMELL-MIDDLE-MAN — 中间人(Middle Man)
|
|
583
|
+
|
|
584
|
+
### 诊断含义
|
|
585
|
+
一个抽象的大部分接口只是转发调用,没有增加有价值的策略或保护。
|
|
586
|
+
|
|
587
|
+
### 强信号
|
|
588
|
+
- 在真实代码中能观察到与上述含义一致的重复依赖、职责混杂、接口不协调或变化耦合。
|
|
589
|
+
- 修改该区域时,需要额外追踪多个位置、隐含状态或实现细节才能保持正确。
|
|
590
|
+
|
|
591
|
+
### 弱信号
|
|
592
|
+
- 阅读者经常需要跨文件跳转才能解释当前意图。
|
|
593
|
+
- 该区域的结构性修改历史上容易遗漏关联点。
|
|
594
|
+
|
|
595
|
+
### 误判保护
|
|
596
|
+
- React/Vue 的声明式组合不自动等于中间人;包装组件可能承担无障碍、样式或兼容策略。
|
|
597
|
+
|
|
598
|
+
### 必须提供的证据
|
|
599
|
+
- 指出具体文件/符号,并展示实际的重复关系、变化模式或结构负担;不能只依据行数或复杂度指标下结论。
|
|
600
|
+
|
|
601
|
+
### 可能影响
|
|
602
|
+
- 增加理解成本、变化耦合或结构演进时的回归风险。
|
|
603
|
+
|
|
604
|
+
### 候选重构
|
|
605
|
+
- `RF-REMOVE-MIDDLE-MAN`
|
|
606
|
+
- `RF-INLINE-FUNCTION`
|
|
607
|
+
- `RF-REPLACE-SUPERCLASS-WITH-DELEGATE`
|
|
608
|
+
- `RF-REPLACE-SUBCLASS-WITH-DELEGATE`
|
|
609
|
+
|
|
610
|
+
### 相关坏味道
|
|
611
|
+
- 相关坏味道必须独立取证,不因当前坏味道自动成立。
|
|
612
|
+
|
|
613
|
+
### 前端常见表现
|
|
614
|
+
- 可出现在 React/Vue 组件、Hook/Composable、Store、API Client、路由、表单或数据转换代码中;判断时优先检查真实数据所有权、生命周期和公共契约。
|
|
615
|
+
|
|
616
|
+
## SMELL-INSIDER-TRADING — 内幕交易(Insider Trading)
|
|
617
|
+
|
|
618
|
+
### 诊断含义
|
|
619
|
+
模块之间交换过多内部数据或知识,导致边界被侵蚀。
|
|
620
|
+
|
|
621
|
+
### 强信号
|
|
622
|
+
- 在真实代码中能观察到与上述含义一致的重复依赖、职责混杂、接口不协调或变化耦合。
|
|
623
|
+
- 修改该区域时,需要额外追踪多个位置、隐含状态或实现细节才能保持正确。
|
|
624
|
+
|
|
625
|
+
### 弱信号
|
|
626
|
+
- 阅读者经常需要跨文件跳转才能解释当前意图。
|
|
627
|
+
- 该区域的结构性修改历史上容易遗漏关联点。
|
|
628
|
+
|
|
629
|
+
### 误判保护
|
|
630
|
+
- 当职责确实跨模块时,显式且窄的协作是正常的。
|
|
631
|
+
|
|
632
|
+
### 必须提供的证据
|
|
633
|
+
- 指出具体文件/符号,并展示实际的重复关系、变化模式或结构负担;不能只依据行数或复杂度指标下结论。
|
|
634
|
+
|
|
635
|
+
### 可能影响
|
|
636
|
+
- 增加理解成本、变化耦合或结构演进时的回归风险。
|
|
637
|
+
|
|
638
|
+
### 候选重构
|
|
639
|
+
- `RF-MOVE-FUNCTION`
|
|
640
|
+
- `RF-MOVE-FIELD`
|
|
641
|
+
- `RF-HIDE-DELEGATE`
|
|
642
|
+
- `RF-REPLACE-SUBCLASS-WITH-DELEGATE`
|
|
643
|
+
- `RF-REPLACE-SUPERCLASS-WITH-DELEGATE`
|
|
644
|
+
|
|
645
|
+
### 相关坏味道
|
|
646
|
+
- 相关坏味道必须独立取证,不因当前坏味道自动成立。
|
|
647
|
+
|
|
648
|
+
### 前端常见表现
|
|
649
|
+
- 可出现在 React/Vue 组件、Hook/Composable、Store、API Client、路由、表单或数据转换代码中;判断时优先检查真实数据所有权、生命周期和公共契约。
|
|
650
|
+
|
|
651
|
+
## SMELL-LARGE-CLASS — 过大的类(Large Class)
|
|
652
|
+
|
|
653
|
+
### 诊断含义
|
|
654
|
+
类或等价模块拥有过多字段和职责,容易产生重复与无关变化。
|
|
655
|
+
|
|
656
|
+
### 强信号
|
|
657
|
+
- 在真实代码中能观察到与上述含义一致的重复依赖、职责混杂、接口不协调或变化耦合。
|
|
658
|
+
- 修改该区域时,需要额外追踪多个位置、隐含状态或实现细节才能保持正确。
|
|
659
|
+
|
|
660
|
+
### 弱信号
|
|
661
|
+
- 阅读者经常需要跨文件跳转才能解释当前意图。
|
|
662
|
+
- 该区域的结构性修改历史上容易遗漏关联点。
|
|
663
|
+
|
|
664
|
+
### 误判保护
|
|
665
|
+
- 不能仅凭行数判定过大的类;内聚的数据结构或生成型适配器可能本就较大。
|
|
666
|
+
|
|
667
|
+
### 必须提供的证据
|
|
668
|
+
- 指出具体文件/符号,并展示实际的重复关系、变化模式或结构负担;不能只依据行数或复杂度指标下结论。
|
|
669
|
+
|
|
670
|
+
### 可能影响
|
|
671
|
+
- 增加理解成本、变化耦合或结构演进时的回归风险。
|
|
672
|
+
|
|
673
|
+
### 候选重构
|
|
674
|
+
- `RF-EXTRACT-CLASS`
|
|
675
|
+
- `RF-EXTRACT-SUPERCLASS`
|
|
676
|
+
- `RF-REPLACE-TYPE-CODE-WITH-SUBCLASSES`
|
|
677
|
+
|
|
678
|
+
### 相关坏味道
|
|
679
|
+
- 相关坏味道必须独立取证,不因当前坏味道自动成立。
|
|
680
|
+
|
|
681
|
+
### 前端常见表现
|
|
682
|
+
- 可出现在 React/Vue 组件、Hook/Composable、Store、API Client、路由、表单或数据转换代码中;判断时优先检查真实数据所有权、生命周期和公共契约。
|
|
683
|
+
|
|
684
|
+
## SMELL-ALTERNATIVE-CLASSES-DIFFERENT-INTERFACES — 异曲同工的类(Alternative Classes with Different Interfaces)
|
|
685
|
+
|
|
686
|
+
### 诊断含义
|
|
687
|
+
两个概念上可替换的实现提供相似能力,却使用不一致的接口。
|
|
688
|
+
|
|
689
|
+
### 强信号
|
|
690
|
+
- 在真实代码中能观察到与上述含义一致的重复依赖、职责混杂、接口不协调或变化耦合。
|
|
691
|
+
- 修改该区域时,需要额外追踪多个位置、隐含状态或实现细节才能保持正确。
|
|
692
|
+
|
|
693
|
+
### 弱信号
|
|
694
|
+
- 阅读者经常需要跨文件跳转才能解释当前意图。
|
|
695
|
+
- 该区域的结构性修改历史上容易遗漏关联点。
|
|
696
|
+
|
|
697
|
+
### 误判保护
|
|
698
|
+
- 若两个概念本就不可替换,则不同接口是合理的。
|
|
699
|
+
|
|
700
|
+
### 必须提供的证据
|
|
701
|
+
- 指出具体文件/符号,并展示实际的重复关系、变化模式或结构负担;不能只依据行数或复杂度指标下结论。
|
|
702
|
+
|
|
703
|
+
### 可能影响
|
|
704
|
+
- 增加理解成本、变化耦合或结构演进时的回归风险。
|
|
705
|
+
|
|
706
|
+
### 候选重构
|
|
707
|
+
- `RF-CHANGE-FUNCTION-DECLARATION`
|
|
708
|
+
- `RF-MOVE-FUNCTION`
|
|
709
|
+
- `RF-EXTRACT-SUPERCLASS`
|
|
710
|
+
|
|
711
|
+
### 相关坏味道
|
|
712
|
+
- 相关坏味道必须独立取证,不因当前坏味道自动成立。
|
|
713
|
+
|
|
714
|
+
### 前端常见表现
|
|
715
|
+
- 可出现在 React/Vue 组件、Hook/Composable、Store、API Client、路由、表单或数据转换代码中;判断时优先检查真实数据所有权、生命周期和公共契约。
|
|
716
|
+
|
|
717
|
+
## SMELL-DATA-CLASS — 纯数据类(Data Class)
|
|
718
|
+
|
|
719
|
+
### 诊断含义
|
|
720
|
+
数据容器被其他模块细碎操控,而与数据相关的行为散落在外部。
|
|
721
|
+
|
|
722
|
+
### 强信号
|
|
723
|
+
- 在真实代码中能观察到与上述含义一致的重复依赖、职责混杂、接口不协调或变化耦合。
|
|
724
|
+
- 修改该区域时,需要额外追踪多个位置、隐含状态或实现细节才能保持正确。
|
|
725
|
+
|
|
726
|
+
### 弱信号
|
|
727
|
+
- 阅读者经常需要跨文件跳转才能解释当前意图。
|
|
728
|
+
- 该区域的结构性修改历史上容易遗漏关联点。
|
|
729
|
+
|
|
730
|
+
### 误判保护
|
|
731
|
+
- 不可变 DTO、API 响应和中间变换记录可以合理地保持纯数据形态。
|
|
732
|
+
|
|
733
|
+
### 必须提供的证据
|
|
734
|
+
- 指出具体文件/符号,并展示实际的重复关系、变化模式或结构负担;不能只依据行数或复杂度指标下结论。
|
|
735
|
+
|
|
736
|
+
### 可能影响
|
|
737
|
+
- 增加理解成本、变化耦合或结构演进时的回归风险。
|
|
738
|
+
|
|
739
|
+
### 候选重构
|
|
740
|
+
- `RF-ENCAPSULATE-RECORD`
|
|
741
|
+
- `RF-REMOVE-SETTING-METHOD`
|
|
742
|
+
- `RF-MOVE-FUNCTION`
|
|
743
|
+
- `RF-EXTRACT-FUNCTION`
|
|
744
|
+
- `RF-SPLIT-PHASE`
|
|
745
|
+
|
|
746
|
+
### 相关坏味道
|
|
747
|
+
- 相关坏味道必须独立取证,不因当前坏味道自动成立。
|
|
748
|
+
|
|
749
|
+
### 前端常见表现
|
|
750
|
+
- 可出现在 React/Vue 组件、Hook/Composable、Store、API Client、路由、表单或数据转换代码中;判断时优先检查真实数据所有权、生命周期和公共契约。
|
|
751
|
+
|
|
752
|
+
## SMELL-REFUSED-BEQUEST — 被拒绝的遗赠(Refused Bequest)
|
|
753
|
+
|
|
754
|
+
### 诊断含义
|
|
755
|
+
子类型继承了与自身真实替换关系或职责不匹配的数据和行为。
|
|
756
|
+
|
|
757
|
+
### 强信号
|
|
758
|
+
- 在真实代码中能观察到与上述含义一致的重复依赖、职责混杂、接口不协调或变化耦合。
|
|
759
|
+
- 修改该区域时,需要额外追踪多个位置、隐含状态或实现细节才能保持正确。
|
|
760
|
+
|
|
761
|
+
### 弱信号
|
|
762
|
+
- 阅读者经常需要跨文件跳转才能解释当前意图。
|
|
763
|
+
- 该区域的结构性修改历史上容易遗漏关联点。
|
|
764
|
+
|
|
765
|
+
### 误判保护
|
|
766
|
+
- 子类不必使用父类每个辅助成员;仅有未使用成员不足以证明被拒绝的遗赠。
|
|
767
|
+
|
|
768
|
+
### 必须提供的证据
|
|
769
|
+
- 指出具体文件/符号,并展示实际的重复关系、变化模式或结构负担;不能只依据行数或复杂度指标下结论。
|
|
770
|
+
|
|
771
|
+
### 可能影响
|
|
772
|
+
- 增加理解成本、变化耦合或结构演进时的回归风险。
|
|
773
|
+
|
|
774
|
+
### 候选重构
|
|
775
|
+
- `RF-PUSH-DOWN-METHOD`
|
|
776
|
+
- `RF-PUSH-DOWN-FIELD`
|
|
777
|
+
- `RF-REPLACE-SUBCLASS-WITH-DELEGATE`
|
|
778
|
+
- `RF-REPLACE-SUPERCLASS-WITH-DELEGATE`
|
|
779
|
+
|
|
780
|
+
### 相关坏味道
|
|
781
|
+
- 相关坏味道必须独立取证,不因当前坏味道自动成立。
|
|
782
|
+
|
|
783
|
+
### 前端常见表现
|
|
784
|
+
- 可出现在 React/Vue 组件、Hook/Composable、Store、API Client、路由、表单或数据转换代码中;判断时优先检查真实数据所有权、生命周期和公共契约。
|
|
785
|
+
|
|
786
|
+
## SMELL-COMMENTS — 注释(Comments)
|
|
787
|
+
|
|
788
|
+
### 诊断含义
|
|
789
|
+
注释被用来解释本可由代码结构直接表达的复杂意图;注释本身并不是缺陷。
|
|
790
|
+
|
|
791
|
+
### 强信号
|
|
792
|
+
- 在真实代码中能观察到与上述含义一致的重复依赖、职责混杂、接口不协调或变化耦合。
|
|
793
|
+
- 修改该区域时,需要额外追踪多个位置、隐含状态或实现细节才能保持正确。
|
|
794
|
+
|
|
795
|
+
### 弱信号
|
|
796
|
+
- 阅读者经常需要跨文件跳转才能解释当前意图。
|
|
797
|
+
- 该区域的结构性修改历史上容易遗漏关联点。
|
|
798
|
+
|
|
799
|
+
### 误判保护
|
|
800
|
+
- 注释本身不是缺陷;解释原因、约束和非显而易见决策的注释很有价值。
|
|
801
|
+
|
|
802
|
+
### 必须提供的证据
|
|
803
|
+
- 指出具体文件/符号,并展示实际的重复关系、变化模式或结构负担;不能只依据行数或复杂度指标下结论。
|
|
804
|
+
|
|
805
|
+
### 可能影响
|
|
806
|
+
- 增加理解成本、变化耦合或结构演进时的回归风险。
|
|
807
|
+
|
|
808
|
+
### 候选重构
|
|
809
|
+
- `RF-EXTRACT-FUNCTION`
|
|
810
|
+
- `RF-CHANGE-FUNCTION-DECLARATION`
|
|
811
|
+
- `RF-INTRODUCE-ASSERTION`
|
|
812
|
+
|
|
813
|
+
### 相关坏味道
|
|
814
|
+
- 相关坏味道必须独立取证,不因当前坏味道自动成立。
|
|
815
|
+
|
|
816
|
+
### 前端常见表现
|
|
817
|
+
- 可出现在 React/Vue 组件、Hook/Composable、Store、API Client、路由、表单或数据转换代码中;判断时优先检查真实数据所有权、生命周期和公共契约。
|