@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# TypeScript / JavaScript 规则
|
|
2
2
|
|
|
3
|
-
编写、修改或评审 `.ts`、`.tsx`、`.js`、`.jsx` 时应用本文件。本文只保留项目常驻硬约束;复杂类型建模、`tsconfig` 分层、声明产物、DTO / view model 边界、类型测试与发布入口设计,交给 `
|
|
3
|
+
编写、修改或评审 `.ts`、`.tsx`、`.js`、`.jsx` 时应用本文件。本文只保留项目常驻硬约束;复杂类型建模、`tsconfig` 分层、声明产物、DTO / view model 边界、类型测试与发布入口设计,交给 `cc-typescript-project-standard` skill 或专项评审处理。注释风格另见 `fec-code-comments.md`;E2E 与校验流程另见 `fec-testing.md`。
|
|
4
4
|
|
|
5
5
|
## 类型与接口
|
|
6
6
|
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
- 对**导出**的函数、共享工具函数、公开类方法,写明参数与返回值类型。
|
|
12
12
|
- **局部**变量在类型显而易见时交给 TypeScript 推断,不为显而易见的中间变量重复标注。
|
|
13
13
|
- 重复出现的内联对象形状抽成具名 `interface` 或 `type`,避免同一契约散落在多个签名中。
|
|
14
|
-
- 外部数据、API DTO、路由参数、表单值与组件 props 的边界要显式命名;复杂建模分流到 `
|
|
14
|
+
- 外部数据、API DTO、路由参数、表单值与组件 props 的边界要显式命名;复杂建模分流到 `cc-typescript-project-standard`。
|
|
15
15
|
|
|
16
16
|
### `interface` 与 `type`
|
|
17
17
|
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
- 用具名 `interface` 或 `type` 定义 props,复杂公共 props 分流到类型模块。
|
|
38
38
|
- 回调 props 写清参数与返回值;事件 payload 不用裸对象长期内联。
|
|
39
39
|
- 无特殊理由不使用 `React.FC`,避免隐式 `children` 等差异。
|
|
40
|
-
- TSX 泛型、复杂组件 props 或外部 DTO 映射问题,交给 React 规则与 `
|
|
40
|
+
- TSX 泛型、复杂组件 props 或外部 DTO 映射问题,交给 React 规则与 `cc-typescript-project-standard` 共同收敛。
|
|
41
41
|
|
|
42
42
|
## 单文件规模与模块拆分
|
|
43
43
|
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
|
|
75
75
|
- 外部输入(表单、API、URL 参数、localStorage、postMessage、第三方 SDK 回调等)必须在边界处校验或收窄。
|
|
76
76
|
- 可使用 Zod、Valibot、Yup 或项目选用的同类 schema 工具;不要把具体库作为无条件新依赖引入。
|
|
77
|
-
- schema 推导类型可作为输入类型单一真源;复杂 DTO、领域模型与 UI view model 的分层交给 `
|
|
77
|
+
- schema 推导类型可作为输入类型单一真源;复杂 DTO、领域模型与 UI view model 的分层交给 `cc-typescript-project-standard`。
|
|
78
78
|
|
|
79
79
|
## 类型资产分层与命名
|
|
80
80
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# 以事实来源驱动开发
|
|
2
|
+
|
|
3
|
+
使用项目事实、权威资料和对应版本的证据做工程决策。
|
|
4
|
+
|
|
5
|
+
1. 明确问题、版本和本地契约。先读项目清单、配置、实现、调用方和测试;稳定的本地变换可依赖这些事实,运行时、依赖和公共 API 的变化假设需要权威核验。
|
|
6
|
+
2. 收集实际版本的官方文档、源码、类型定义、发布记录、规范和迁移指南。第三方讨论只作线索。记录路径或链接、版本、日期和相关结论。
|
|
7
|
+
3. 对照运行中的项目说明兼容性、维护成本、迁移范围和回退。通过小的适配边界隔离易变化的外部假设,不为追新直接推翻稳定约定。
|
|
8
|
+
4. 使用项目现有校验或最小复现证明关键假设,按实际技术栈选择工具。记录命令和结果;无法验证时明确不确定性,不宣称支持。
|
|
9
|
+
5. 公共接口、依赖或团队约定改变时同步轻量 ADR、迁移记录或事实文档,不复制大段外部资料。
|
|
10
|
+
|
|
11
|
+
## 本地知识请求
|
|
12
|
+
|
|
13
|
+
用户将来源限制在本地仓库或知识目录时,先检索指定来源,不用网络猜测补齐。使用明确路径,否则检查 `knowledge/` 是否存在;不存在则说明缺失来源,不虚构目录。
|
|
14
|
+
|
|
15
|
+
有 `data_structure.md` 时先读导航并选择相关分支,渐进搜索而不加载全库。默认最多五轮关键词调整;记录文件、章节/页码/工作表、版本范围与证据缺口。PDF 和表格先选择合适提取工具。只有用户范围允许时才使用外部来源。
|
|
16
|
+
|
|
17
|
+
## 证据优先级与交付
|
|
18
|
+
|
|
19
|
+
实现、配置和测试确定本地契约;官方版本化文档与源码确定外部行为;规范确定平台约束;Issue 和文章仅作辅助。交付决策、来源、实现影响、验证结果及剩余不确定性,不能只说“已查文档”。
|
package/openclaw.plugin.json
CHANGED
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
"id": "frontend-craft",
|
|
3
3
|
"name": "Frontend Craft",
|
|
4
4
|
"description": "Frontend team skills, OpenClaw workspace templates, optional init tool, exec safety hooks, and design MCP reference.",
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "3.0.0",
|
|
6
6
|
"skills": [
|
|
7
|
-
"skills"
|
|
8
|
-
"commands"
|
|
7
|
+
"skills"
|
|
9
8
|
],
|
|
10
9
|
"configSchema": {
|
|
11
10
|
"type": "object",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bovinphang/frontend-craft",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Universal frontend plugin for Claude Code, Codex, Cursor, OpenCode, Gemini CLI, Qoder, Windsurf, Copilot, OpenClaw, and more — skills, agents, commands, hooks, and MCP templates.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"localized",
|
|
36
36
|
"hooks",
|
|
37
37
|
"templates",
|
|
38
|
+
"common-content.lock.json",
|
|
38
39
|
".mcp.json",
|
|
39
40
|
".claude-plugin",
|
|
40
41
|
"openclaw.plugin.json",
|
|
@@ -52,35 +53,47 @@
|
|
|
52
53
|
"docs"
|
|
53
54
|
],
|
|
54
55
|
"scripts": {
|
|
56
|
+
"sync:common": "tsx scripts/sync-common.ts",
|
|
57
|
+
"check:common": "tsx scripts/sync-common.ts --check",
|
|
55
58
|
"clean": "node scripts/clean-dist.mjs",
|
|
56
|
-
"typecheck": "
|
|
59
|
+
"typecheck": "pnpm run typecheck:ts && pnpm run typecheck:skill-scripts",
|
|
57
60
|
"typecheck:ts": "tsc --noEmit -p tsconfig.json",
|
|
58
|
-
"typecheck:skill-scripts": "tsc --allowJs --checkJs --noEmit --strict --module NodeNext --moduleResolution NodeNext --target ES2022 skills/fec-ui-design/scripts/design-system.mjs skills/
|
|
59
|
-
"build": "
|
|
60
|
-
"test:only": "
|
|
61
|
-
"test": "
|
|
61
|
+
"typecheck:skill-scripts": "tsc --allowJs --checkJs --noEmit --strict --module NodeNext --moduleResolution NodeNext --target ES2022 skills/fec-ui-design/scripts/design-system.mjs skills/cc-technical-diagrams/scripts/png-qa.mjs skills/cc-technical-diagrams/scripts/tech-diagram-render.mjs skills/cc-technical-diagrams/scripts/interactive-diagram-server.mjs skills/cc-technical-diagrams/scripts/export-diagram.mjs skills/cc-technical-diagrams/scripts/diagram-layout.mjs skills/cc-technical-diagrams/scripts/diagram-browser.mjs skills/cc-technical-diagrams/scripts/mermaid-render.mjs",
|
|
62
|
+
"build": "pnpm run clean && pnpm run typecheck && tsx scripts/build-dist.ts",
|
|
63
|
+
"test:only": "tsx scripts/run-tests.ts",
|
|
64
|
+
"test": "pnpm run build && pnpm run test:only",
|
|
62
65
|
"build:openclaw:bundle": "tsx scripts/openclaw/build.ts",
|
|
63
|
-
"build:openclaw": "
|
|
64
|
-
"audit:skills": "
|
|
66
|
+
"build:openclaw": "pnpm run build && pnpm run build:openclaw:bundle",
|
|
67
|
+
"audit:skills": "pnpm run build && tsx scripts/audit-skills.ts",
|
|
65
68
|
"typecheck:openclaw": "tsc --noEmit -p tsconfig.openclaw.json",
|
|
66
69
|
"check:openclaw-dist": "tsx scripts/openclaw/verify-openclaw-dist.ts",
|
|
67
|
-
"pack:openclaw": "
|
|
68
|
-
"pack:skills": "
|
|
69
|
-
"check:skills-publish": "
|
|
70
|
-
"pack:all": "
|
|
71
|
-
"prepack": "
|
|
70
|
+
"pack:openclaw": "pnpm run build:openclaw && pnpm run check:openclaw-dist && tsx scripts/openclaw/pack-openclaw.ts",
|
|
71
|
+
"pack:skills": "pnpm run build && tsx scripts/pack-skills.ts",
|
|
72
|
+
"check:skills-publish": "pnpm run build && tsx scripts/check-skills-publish.ts",
|
|
73
|
+
"pack:all": "pnpm run build && pnpm run test:only && pnpm run build:openclaw:bundle && pnpm run check:openclaw-dist && tsx scripts/openclaw/pack-openclaw.ts && tsx scripts/pack-skills.ts && tsx scripts/check-skills-publish.ts",
|
|
74
|
+
"prepack": "pnpm run build",
|
|
72
75
|
"sync:version": "tsx scripts/sync-version.ts",
|
|
73
|
-
"version": "
|
|
74
|
-
"prepublishOnly": "
|
|
76
|
+
"version": "pnpm run sync:version",
|
|
77
|
+
"prepublishOnly": "pnpm run sync:version && pnpm test",
|
|
78
|
+
"check:content": "tsx scripts/check-content.ts",
|
|
79
|
+
"lint:code": "eslint bin src scripts tests eslint.config.mjs --max-warnings=0",
|
|
80
|
+
"lint": "pnpm run lint:code && pnpm run check:content",
|
|
81
|
+
"format:check": "tsx scripts/check-format.ts",
|
|
82
|
+
"verify:engineering": "tsx scripts/verify-engineering.ts"
|
|
75
83
|
},
|
|
76
84
|
"devDependencies": {
|
|
85
|
+
"@eslint/js": "9.39.5",
|
|
77
86
|
"@sinclair/typebox": "^0.34.49",
|
|
78
87
|
"@types/node": "^22.19.15",
|
|
79
88
|
"esbuild": "^0.28.0",
|
|
89
|
+
"eslint": "9.39.4",
|
|
90
|
+
"globals": "17.12.0",
|
|
80
91
|
"openclaw": "^2026.4.20",
|
|
81
92
|
"prettier": "^3.5.0",
|
|
82
93
|
"tsx": "^4.22.3",
|
|
83
|
-
"typescript": "^5.7.3"
|
|
94
|
+
"typescript": "^5.7.3",
|
|
95
|
+
"typescript-eslint": "8.70.1",
|
|
96
|
+
"yaml": "2.9.0"
|
|
84
97
|
},
|
|
85
98
|
"keywords": [
|
|
86
99
|
"frontend",
|
|
@@ -98,5 +111,9 @@
|
|
|
98
111
|
"i18n",
|
|
99
112
|
"playwright",
|
|
100
113
|
"eslint"
|
|
101
|
-
]
|
|
114
|
+
],
|
|
115
|
+
"packageManager": "pnpm@12.4.1",
|
|
116
|
+
"dependencies": {
|
|
117
|
+
"@bovinphang/craft-common": "2.0.0"
|
|
118
|
+
}
|
|
102
119
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cc-c-project-standard
|
|
3
|
+
description: "Use when Pure C module interfaces, ownership contracts, error-code cleanup paths, build conventions or C engineering validation need design or review."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# C project engineering
|
|
7
|
+
|
|
8
|
+
Apply to libraries, CLI tools, desktop cores and services. Determine the application role from the actual project; a frontend/backend product name does not constrain the language.
|
|
9
|
+
|
|
10
|
+
Read the existing C standard, compiler flags, build system and exported ABI. Preserve symbol visibility, calling conventions and error codes.
|
|
11
|
+
|
|
12
|
+
## Apply the workflow
|
|
13
|
+
|
|
14
|
+
1. Locate the actual project, task boundary and existing contracts; load only the language and domain material needed now.
|
|
15
|
+
2. Apply the [specialist checks](references/practice.md), establishing the input evidence before selecting the smallest change.
|
|
16
|
+
3. Verify affected behavior with existing repository tools. Explicitly report missing tools, environments or execution; a plan is not a passing result.
|
|
17
|
+
4. Deliver scope, specialist decisions, actual verification and remaining risk. A review-only task stays read-only.
|
|
18
|
+
|
|
19
|
+
## Task boundary
|
|
20
|
+
|
|
21
|
+
C++ resource abstractions and exceptions are not a replacement for a pure C contract; cross-language memory incidents have a dedicated specialty.
|
|
22
|
+
|
|
23
|
+
## Engineering practices
|
|
24
|
+
|
|
25
|
+
Read the [local engineering decisions](references/engineering-practices.md) for this task and follow their links to relevant shared principles. Apply levels and exceptions against actual project contracts; product frontend/backend labels do not constrain language or role.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Pure C size and cleanup contract — EP-C-01
|
|
2
|
+
|
|
3
|
+
In a writable copy compile `cc -std=c11 -Wall -Wextra -Werror boundary.c boundary_test.c -o boundary-test`. Run the executable with CRAFT_ENGINEERING_DEFECTIVE=1 and then =0 (default). POSIX: `CRAFT_ENGINEERING_DEFECTIVE=1 ./boundary-test`; PowerShell sets `$env:CRAFT_ENGINEERING_DEFECTIVE` and invokes the built executable. A missing compiler is MISSING; use the explicitly prepared Docker verifier if needed.
|
|
4
|
+
|
|
5
|
+
Two named test bodies perform always-active checks, including when NDEBUG is defined. The allocator uses actual malloc/free and records ownership, rejects huge requests, and cleans remaining test allocations. Overflow is checked before allocation; partial second-allocation failure releases the first header; success transfers only the payload. Valid output slots are initialized even on invalid arguments. The defect intentionally omits overflow/partial-cleanup protection. Its unsigned wrap is defined C behavior; no unstable UB crash is needed to observe the error.
|
|
6
|
+
|
|
7
|
+
C11 is this isolated sample target, not a project upgrade or a demand to use C++. No SAL, external library, parent source or database is required. The case does not prove sanitizer coverage, arbitrary foreign-buffer validity or every ABI/platform; run those checks explicitly when relevant. Keep executable/log output outside the source directory.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
#include "boundary.h"
|
|
2
|
+
#include <stdint.h>
|
|
3
|
+
#include <stdlib.h>
|
|
4
|
+
#include <string.h>
|
|
5
|
+
|
|
6
|
+
int build_payload(size_t count, size_t width, const Allocator *allocator,
|
|
7
|
+
unsigned char **output, size_t *output_size) {
|
|
8
|
+
if (output) *output = NULL;
|
|
9
|
+
if (output_size) *output_size = 0;
|
|
10
|
+
if (!output || !output_size || !allocator || !allocator->allocate || !allocator->release) return -1;
|
|
11
|
+
const char *switch_value = getenv("CRAFT_ENGINEERING_DEFECTIVE");
|
|
12
|
+
const int defective = switch_value && strcmp(switch_value, "1") == 0;
|
|
13
|
+
if (!count || !width || (!defective && count > SIZE_MAX / width)) return -1;
|
|
14
|
+
const size_t bytes = count * width; /* Unsigned wrap is defined, but not a valid allocation contract. */
|
|
15
|
+
void *header = allocator->allocate(allocator->context, 16);
|
|
16
|
+
if (!header) return -1;
|
|
17
|
+
unsigned char *payload = allocator->allocate(allocator->context, bytes);
|
|
18
|
+
if (!payload) {
|
|
19
|
+
if (!defective) allocator->release(allocator->context, header);
|
|
20
|
+
return -1;
|
|
21
|
+
}
|
|
22
|
+
allocator->release(allocator->context, header);
|
|
23
|
+
*output = payload;
|
|
24
|
+
*output_size = bytes;
|
|
25
|
+
return 0;
|
|
26
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#ifndef ENGINEERING_BOUNDARY_H
|
|
2
|
+
#define ENGINEERING_BOUNDARY_H
|
|
3
|
+
#include <stddef.h>
|
|
4
|
+
|
|
5
|
+
typedef struct {
|
|
6
|
+
void *context;
|
|
7
|
+
void *(*allocate)(void *context, size_t bytes);
|
|
8
|
+
void (*release)(void *context, void *pointer);
|
|
9
|
+
} Allocator;
|
|
10
|
+
|
|
11
|
+
/* On failure, valid output slots are NULL/0. Success transfers only *output.
|
|
12
|
+
* Release success output with this same allocator; caller retains input ownership. */
|
|
13
|
+
int build_payload(size_t count, size_t width, const Allocator *allocator,
|
|
14
|
+
unsigned char **output, size_t *output_size);
|
|
15
|
+
#endif
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
#include "boundary.h"
|
|
2
|
+
#include <stdint.h>
|
|
3
|
+
#include <stdio.h>
|
|
4
|
+
#include <stdlib.h>
|
|
5
|
+
|
|
6
|
+
typedef struct {
|
|
7
|
+
void *live[8];
|
|
8
|
+
int calls;
|
|
9
|
+
int releases;
|
|
10
|
+
int fail_at;
|
|
11
|
+
} Probe;
|
|
12
|
+
|
|
13
|
+
static void *allocate(void *context, size_t bytes) {
|
|
14
|
+
Probe *probe = context;
|
|
15
|
+
++probe->calls;
|
|
16
|
+
if (probe->calls == probe->fail_at || bytes > 1024) return NULL;
|
|
17
|
+
void *pointer = malloc(bytes ? bytes : 1);
|
|
18
|
+
for (size_t i = 0; i < 8; ++i) if (!probe->live[i]) { probe->live[i] = pointer; return pointer; }
|
|
19
|
+
free(pointer);
|
|
20
|
+
return NULL;
|
|
21
|
+
}
|
|
22
|
+
static void release(void *context, void *pointer) {
|
|
23
|
+
Probe *probe = context;
|
|
24
|
+
for (size_t i = 0; i < 8; ++i) if (probe->live[i] == pointer && pointer) {
|
|
25
|
+
probe->live[i] = NULL; ++probe->releases; free(pointer); return;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
static int active(const Probe *probe) {
|
|
29
|
+
int count = 0;
|
|
30
|
+
for (size_t i = 0; i < 8; ++i) if (probe->live[i]) ++count;
|
|
31
|
+
return count;
|
|
32
|
+
}
|
|
33
|
+
static void cleanup(Probe *probe) {
|
|
34
|
+
for (size_t i = 0; i < 8; ++i) if (probe->live[i]) release(probe, probe->live[i]);
|
|
35
|
+
}
|
|
36
|
+
static int check(int condition, const char *message) {
|
|
37
|
+
if (!condition) fprintf(stderr, "CRAFT_ASSERTION: EP-C-01 %s\n", message);
|
|
38
|
+
return condition; /* Never compiled away by NDEBUG. */
|
|
39
|
+
}
|
|
40
|
+
static int overflow_and_partial_cleanup(void) {
|
|
41
|
+
Probe probe = {0};
|
|
42
|
+
Allocator allocator = { &probe, allocate, release };
|
|
43
|
+
unsigned char *output = NULL;
|
|
44
|
+
size_t size = 99;
|
|
45
|
+
int status = build_payload(SIZE_MAX / 2 + 1, 2, &allocator, &output, &size);
|
|
46
|
+
int ok = check(status != 0 && output == NULL && size == 0 && probe.calls == 0, "overflow rejected before allocation");
|
|
47
|
+
cleanup(&probe); /* Keep even the intentionally faulty run free of unobserved survivors. */
|
|
48
|
+
probe = (Probe){0}; probe.fail_at = 2;
|
|
49
|
+
status = build_payload(4, 2, &allocator, &output, &size);
|
|
50
|
+
ok = check(status != 0 && output == NULL && size == 0 && active(&probe) == 0 && probe.releases == 1, "partial failure releases acquired header") && ok;
|
|
51
|
+
cleanup(&probe);
|
|
52
|
+
return ok;
|
|
53
|
+
}
|
|
54
|
+
static int valid_input_and_outputs(void) {
|
|
55
|
+
Probe probe = {0};
|
|
56
|
+
Allocator allocator = { &probe, allocate, release };
|
|
57
|
+
unsigned char *output = NULL; size_t size = 0;
|
|
58
|
+
int status = build_payload(4, 2, &allocator, &output, &size);
|
|
59
|
+
int ok = check(status == 0 && output != NULL && size == 8 && active(&probe) == 1, "successful transfer exposes one owned payload");
|
|
60
|
+
if (output) release(&probe, output);
|
|
61
|
+
ok = check(active(&probe) == 0 && probe.releases == 2, "allocator pair releases all acquired memory") && ok;
|
|
62
|
+
ok = check(build_payload(4, 2, &allocator, NULL, &size) != 0 && size == 0, "valid output slot initialized on invalid arguments") && ok;
|
|
63
|
+
cleanup(&probe); return ok;
|
|
64
|
+
}
|
|
65
|
+
int main(void) {
|
|
66
|
+
int passed = 0, failed = 0;
|
|
67
|
+
int result = overflow_and_partial_cleanup(); passed += result; failed += !result;
|
|
68
|
+
printf("CRAFT_TEST {\"name\":\"overflow_and_partial_cleanup\",\"status\":\"%s\"}\n", result ? "pass" : "fail");
|
|
69
|
+
result = valid_input_and_outputs(); passed += result; failed += !result;
|
|
70
|
+
printf("CRAFT_TEST {\"name\":\"valid_input_and_outputs\",\"status\":\"%s\"}\n", result ? "pass" : "fail");
|
|
71
|
+
printf("CRAFT_SUMMARY {\"total\":2,\"passed\":%d,\"failed\":%d,\"skipped\":0}\n", passed, failed);
|
|
72
|
+
return failed ? 1 : 0;
|
|
73
|
+
}
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
# Engineering practices
|
|
2
|
+
|
|
3
|
+
Read project contracts first, then only the relevant core sections and local language/scenario cards. These are project-native decisions informed by the linked primary sources, not certification by those organizations. `required` protects stated correctness/safety contracts; `recommended` is a default with reasoned alternatives; `conditional` activates only when its stated predicate holds. Project safety/compatibility and actual toolchain facts take priority over corporate style.
|
|
4
|
+
|
|
5
|
+
<a id="ENG-CONTRACT"></a>
|
|
6
|
+
## ENG-CONTRACT — Contracts before representation
|
|
7
|
+
|
|
8
|
+
Level: required
|
|
9
|
+
|
|
10
|
+
### Risk
|
|
11
|
+
An accepted input can still violate the caller’s operation or output contract.
|
|
12
|
+
|
|
13
|
+
### Applies
|
|
14
|
+
Applies at public APIs, files, IPC and serialized input. Internal trusted values can rely on a proven invariant; rechecking everything is not the goal.
|
|
15
|
+
|
|
16
|
+
### Decision
|
|
17
|
+
Name the caller, accepted values, units, failure/output state and compatibility promise. Validate unknown data once at the boundary before effects; keep protocol mapping outside pure domain logic.
|
|
18
|
+
|
|
19
|
+
### Exceptions
|
|
20
|
+
If a trusted upstream validator owns the invariant, record its scope instead of adding a second schema. Type assertions and generated types alone provide no runtime guarantee.
|
|
21
|
+
|
|
22
|
+
### Examples
|
|
23
|
+
Better: reject a malformed amount before charging. Worse: cast JSON and let a partial effect reveal invalid input.
|
|
24
|
+
|
|
25
|
+
### Verification
|
|
26
|
+
Check invalid, boundary and successful inputs, plus effects/output state; exercise a real packed consumer when shipping a package.
|
|
27
|
+
|
|
28
|
+
### Sources
|
|
29
|
+
- [Publishing declaration files](https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html) (typescript-publishing)
|
|
30
|
+
- [Rust API Guidelines](https://rust-lang.github.io/api-guidelines/) (rust-api)
|
|
31
|
+
|
|
32
|
+
Case evidence IDs: EP-TS-01, EP-SVC-01. Identifiers are not cross-entry file dependencies; consult local examples and the coverage report for execution status.
|
|
33
|
+
|
|
34
|
+
<a id="ENG-ERROR"></a>
|
|
35
|
+
## ENG-ERROR — Observable failure
|
|
36
|
+
|
|
37
|
+
Level: required
|
|
38
|
+
|
|
39
|
+
### Risk
|
|
40
|
+
A fallback can erase the cause or report success after partial work.
|
|
41
|
+
|
|
42
|
+
### Applies
|
|
43
|
+
Applies when a failure crosses an abstraction or process boundary. Expected absence may use an explicit optional result rather than an exception.
|
|
44
|
+
|
|
45
|
+
### Decision
|
|
46
|
+
Preserve the cause and operation context, return a typed/declared failure, and let the owning boundary choose recovery. Cleanup failure must not silently replace the primary failure.
|
|
47
|
+
|
|
48
|
+
### Exceptions
|
|
49
|
+
Translate sensitive internal details into a safe public error while preserving a correlation path in permitted diagnostics. Do not log credentials or raw private payloads.
|
|
50
|
+
|
|
51
|
+
### Examples
|
|
52
|
+
Better: failure plus original cause and released owned resources. Worse: catch everything and return an empty successful object.
|
|
53
|
+
|
|
54
|
+
### Verification
|
|
55
|
+
Inject a downstream failure; assert the caller observes failure, its cause and the agreed cleanup outcome.
|
|
56
|
+
|
|
57
|
+
### Sources
|
|
58
|
+
- [Try-with-resources](https://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html) (oracle-resources)
|
|
59
|
+
- [Go Style Guide](https://github.com/uber-go/guide/blob/master/style.md) (uber-go)
|
|
60
|
+
|
|
61
|
+
Case evidence IDs: EP-RS-01, EP-JAVA-01. Identifiers are not cross-entry file dependencies; consult local examples and the coverage report for execution status.
|
|
62
|
+
|
|
63
|
+
<a id="ENG-RESOURCE"></a>
|
|
64
|
+
## ENG-RESOURCE — Own the full lifecycle
|
|
65
|
+
|
|
66
|
+
Level: required
|
|
67
|
+
|
|
68
|
+
### Risk
|
|
69
|
+
Partial acquisition, borrowed handles and teardown create leaks or double release.
|
|
70
|
+
|
|
71
|
+
### Applies
|
|
72
|
+
Applies when code acquires files, allocations, tasks, subscriptions or external handles. Pure value transformations need no invented resource manager.
|
|
73
|
+
|
|
74
|
+
### Decision
|
|
75
|
+
Identify acquire/use/transfer/release owners. Release acquired resources on every exit, in dependency order; borrowed values stay with their owner. Importing a library should not acquire unrelated external resources.
|
|
76
|
+
|
|
77
|
+
### Exceptions
|
|
78
|
+
A documented transfer or process-lifetime resource needs an explicit recipient or lifetime contract. Finalizers and process exit alone do not prove orderly shutdown.
|
|
79
|
+
|
|
80
|
+
### Examples
|
|
81
|
+
Better: fail the second allocation and release only the first owned allocation. Worse: free the caller’s borrowed buffer.
|
|
82
|
+
|
|
83
|
+
### Verification
|
|
84
|
+
Count acquisitions/releases under each failure point and successful transfer. Record untested drivers, GUI shutdown and sanitizer coverage separately.
|
|
85
|
+
|
|
86
|
+
### Sources
|
|
87
|
+
- [MEM00-C allocation and release](https://cmu-sei.github.io/secure-coding-standards/sei-cert-c-coding-standard/recommendations/memory-management-mem/mem00-c/) (cert-c)
|
|
88
|
+
- [C++ Core Guidelines](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines) (cpp-core)
|
|
89
|
+
|
|
90
|
+
Case evidence IDs: EP-C-01, EP-CPP-01, EP-PY-01. Identifiers are not cross-entry file dependencies; consult local examples and the coverage report for execution status.
|
|
91
|
+
|
|
92
|
+
<a id="ENG-CONCURRENCY"></a>
|
|
93
|
+
## ENG-CONCURRENCY — Cancellation and completion differ
|
|
94
|
+
|
|
95
|
+
Level: conditional
|
|
96
|
+
|
|
97
|
+
### Risk
|
|
98
|
+
Detached work can outlive owners; an old result may overwrite current state.
|
|
99
|
+
|
|
100
|
+
### Applies
|
|
101
|
+
Applies if the unit starts concurrent work or receives asynchronous results. Sequential pure code need not gain a scheduler.
|
|
102
|
+
|
|
103
|
+
### Decision
|
|
104
|
+
Keep completion handles, cancellation ownership and bounded in-flight work. Stop accepting work, request cancellation/drain, then observe termination. Check request identity/liveness before publishing results.
|
|
105
|
+
|
|
106
|
+
### Exceptions
|
|
107
|
+
Some blocking operations ignore cancellation; expose incomplete shutdown or a caller-owned forced-exit policy. Arc, channel capacity and an abort request are not completion evidence.
|
|
108
|
+
|
|
109
|
+
### Examples
|
|
110
|
+
Better: controlled B-before-A responses keep B visible. Worse: a timed-out caller frees resources while workers still use them.
|
|
111
|
+
|
|
112
|
+
### Verification
|
|
113
|
+
Use barriers/events and controlled futures for cancellation, saturation and late results; arbitrary sleeps are not ordering proof.
|
|
114
|
+
|
|
115
|
+
### Sources
|
|
116
|
+
- [context package](https://pkg.go.dev/context) (go-context)
|
|
117
|
+
- [JoinHandle](https://docs.rs/tokio/latest/tokio/task/struct.JoinHandle.html) (tokio-join)
|
|
118
|
+
- [Coroutines and tasks](https://docs.python.org/3/library/asyncio-task.html) (python-asyncio)
|
|
119
|
+
|
|
120
|
+
Case evidence IDs: EP-GO-01, EP-IPC-01, EP-UI-01. Identifiers are not cross-entry file dependencies; consult local examples and the coverage report for execution status.
|
|
121
|
+
|
|
122
|
+
<a id="ENG-BOUNDARY"></a>
|
|
123
|
+
## ENG-BOUNDARY — Trust is established at an actual boundary
|
|
124
|
+
|
|
125
|
+
Level: required
|
|
126
|
+
|
|
127
|
+
### Risk
|
|
128
|
+
A frontend/backend label can hide privileged operations or untrusted callers.
|
|
129
|
+
|
|
130
|
+
### Applies
|
|
131
|
+
Applies to external input, authorization and privilege changes across UI, IPC, library and service roles. A private pure helper is not a new authentication layer.
|
|
132
|
+
|
|
133
|
+
### Decision
|
|
134
|
+
Verify sender/identity through the actual trusted mechanism, validate operation-specific data and scope permissions. A renderer-provided role or hidden button is not authority.
|
|
135
|
+
|
|
136
|
+
### Exceptions
|
|
137
|
+
Offline/local-only tools still have a caller and data boundary. Do not add network authentication where the contract needs only a constrained local capability.
|
|
138
|
+
|
|
139
|
+
### Examples
|
|
140
|
+
Better: expose one validated IPC operation with sender checks. Worse: expose arbitrary filesystem methods to a renderer.
|
|
141
|
+
|
|
142
|
+
### Verification
|
|
143
|
+
Exercise denied and allowed calls and zero effects after rejection. Native permission activation/signing needs its own actual environment evidence.
|
|
144
|
+
|
|
145
|
+
### Sources
|
|
146
|
+
- [Security](https://www.electronjs.org/docs/latest/tutorial/security) (electron-security)
|
|
147
|
+
- [Permissions](https://v2.tauri.app/security/permissions/) (tauri-permissions)
|
|
148
|
+
|
|
149
|
+
Case evidence IDs: EP-TS-01, EP-IPC-01. Identifiers are not cross-entry file dependencies; consult local examples and the coverage report for execution status.
|
|
150
|
+
|
|
151
|
+
<a id="ENG-DEPENDENCY"></a>
|
|
152
|
+
## ENG-DEPENDENCY — Ship a usable consumer contract
|
|
153
|
+
|
|
154
|
+
Level: recommended
|
|
155
|
+
|
|
156
|
+
### Risk
|
|
157
|
+
Working inside a repository can conceal undeclared dependencies or incompatible artifacts.
|
|
158
|
+
|
|
159
|
+
### Applies
|
|
160
|
+
Applies when publishing, upgrading dependencies or changing exported APIs. A content-only note does not require changing every tool version.
|
|
161
|
+
|
|
162
|
+
### Decision
|
|
163
|
+
Read manifests, locks, supported targets and exports first. Keep dependencies explicit, changes scoped and migration reversible; validate the artifact from an independent consumer.
|
|
164
|
+
|
|
165
|
+
### Exceptions
|
|
166
|
+
Adopt a dependency or compiler change only for an evidenced need and compatible policy. A corporate guide’s preferred build system is not such evidence.
|
|
167
|
+
|
|
168
|
+
### Examples
|
|
169
|
+
Better: declarations resolve with the packed files and declared dependencies. Worse: publish types that only resolve through adjacent source aliases.
|
|
170
|
+
|
|
171
|
+
### Verification
|
|
172
|
+
Inspect real archive bytes, install away from sibling sources and run supported consumer checks; record the exact version/integrity and untested platforms.
|
|
173
|
+
|
|
174
|
+
### Sources
|
|
175
|
+
- [Publishing declaration files](https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html) (typescript-publishing)
|
|
176
|
+
- [Code review standard](https://google.github.io/eng-practices/review/reviewer/standard.html) (google-review)
|
|
177
|
+
|
|
178
|
+
Case evidence IDs: EP-TS-01. Identifiers are not cross-entry file dependencies; consult local examples and the coverage report for execution status.
|
|
179
|
+
|
|
180
|
+
<a id="ENG-VERIFICATION"></a>
|
|
181
|
+
## ENG-VERIFICATION — Evidence matches the claimed behavior
|
|
182
|
+
|
|
183
|
+
Level: required
|
|
184
|
+
|
|
185
|
+
### Risk
|
|
186
|
+
A green structural check or missing tool can be mistaken for behavioral proof.
|
|
187
|
+
|
|
188
|
+
### Applies
|
|
189
|
+
Applies to implementation, review and delivery claims. Read-only advice can state proposed checks without pretending execution.
|
|
190
|
+
|
|
191
|
+
### Decision
|
|
192
|
+
Choose tests by risk and observable boundaries. Separate environment preparation from execution; keep fixed assertions for faulty/fixed variants and report actual commands, counts and limitations.
|
|
193
|
+
|
|
194
|
+
### Exceptions
|
|
195
|
+
When tools are absent, report MISSING; when intentionally unexecuted, NOT RUN. Compile errors and zero/all-skipped suites do not prove business RED/GREEN.
|
|
196
|
+
|
|
197
|
+
### Examples
|
|
198
|
+
Better: failure injection breaks a named effect assertion, then the fixed version passes it. Worse: only grep for a PASS string.
|
|
199
|
+
|
|
200
|
+
### Verification
|
|
201
|
+
Retain raw output, input/tool hashes and scope. Structure, native behavior and model-task decisions are distinct evidence.
|
|
202
|
+
|
|
203
|
+
### Sources
|
|
204
|
+
- [Test planning](https://microsoft.github.io/code-with-engineering-playbook/automated-testing/test-planning/) (ms-playbook)
|
|
205
|
+
- [Fault injection testing](https://microsoft.github.io/code-with-engineering-playbook/automated-testing/fault-injection-testing/) (ms-faults)
|
|
206
|
+
- [Code review standard](https://google.github.io/eng-practices/review/reviewer/standard.html) (google-review)
|
|
207
|
+
|
|
208
|
+
Case evidence IDs: EP-TS-01, EP-C-01, EP-SVC-01. Identifiers are not cross-entry file dependencies; consult local examples and the coverage report for execution status.
|
|
209
|
+
|
|
210
|
+
<a id="ENG-OPERABILITY"></a>
|
|
211
|
+
## ENG-OPERABILITY — Make recovery explicit and bounded
|
|
212
|
+
|
|
213
|
+
Level: conditional
|
|
214
|
+
|
|
215
|
+
### Risk
|
|
216
|
+
Partial failure, retry amplification and unsafe diagnostics can worsen an incident.
|
|
217
|
+
|
|
218
|
+
### Applies
|
|
219
|
+
Applies where this unit owns an external operation, background lifecycle or recovery decision. Libraries should expose signals, not force service dashboards or HTTP layers.
|
|
220
|
+
|
|
221
|
+
### Decision
|
|
222
|
+
Classify failure and commit uncertainty; make operation intent, total timeout/retry budget and recovery owner explicit. Use a stable idempotency contract for writes before replay. Emit safe correlation and actionable failure state.
|
|
223
|
+
|
|
224
|
+
### Exceptions
|
|
225
|
+
Without server-side safety, leave a write pending confirmation and offer reconciliation. A timeout/cancel is not proof that no effect occurred; 429/5xx alone do not authorize replay.
|
|
226
|
+
|
|
227
|
+
### Examples
|
|
228
|
+
Better: repeat the same key/intent and reuse the committed result. Worse: generate a new key after a payment timeout.
|
|
229
|
+
|
|
230
|
+
### Verification
|
|
231
|
+
Inject failure after commit but before response, replay concurrently and reject a changed intent; separate process-local tests from database or distributed guarantees.
|
|
232
|
+
|
|
233
|
+
### Sources
|
|
234
|
+
- [Timeouts, retries and backoff with jitter](https://aws.amazon.com/builders-library/timeouts-retries-and-backoff-with-jitter/) (aws-retry)
|
|
235
|
+
- [Making retries safe with idempotent APIs](https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/) (aws-idempotency)
|
|
236
|
+
|
|
237
|
+
Case evidence IDs: EP-SVC-01, EP-UI-01. Identifiers are not cross-entry file dependencies; consult local examples and the coverage report for execution status.
|