@bovinphang/craft-common 1.0.0 → 2.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/CHANGELOG.md +39 -0
- package/CHANGELOG.zh-CN.md +39 -0
- package/README.md +17 -3
- package/dist/content/applicability.d.ts +17 -0
- package/dist/content/catalog.d.ts +1 -1
- package/dist/content/snapshot.d.ts +32 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +10876 -211
- package/dist/install/file-transition.d.ts +10 -0
- package/dist/install/product/lifecycle.d.ts +17 -0
- package/dist/install/product/locks.d.ts +2 -0
- package/dist/install/product/ownership.d.ts +3 -0
- package/dist/install/product/paths.d.ts +17 -0
- package/dist/install/product/runtime-descriptors.d.ts +109 -0
- package/dist/install/product/session.d.ts +31 -0
- package/dist/install/product/shared-config/hash.d.ts +9 -0
- package/dist/install/product/shared-config/index.d.ts +16 -0
- package/dist/install/product/shared-config/json.d.ts +11 -0
- package/dist/install/product/shared-config/text.d.ts +5 -0
- package/dist/install/product/shared-config/toml.d.ts +7 -0
- package/dist/install/product/shared-config/types.d.ts +21 -0
- package/dist/install/product/transaction.d.ts +10 -0
- package/dist/install/product/types.d.ts +65 -0
- package/dist/project/discover.d.ts +2 -0
- package/dist/project/evidence.d.ts +37 -0
- package/dist/project/frameworks.d.ts +5 -0
- package/dist/project/recommend.d.ts +17 -0
- package/dist/project/types.d.ts +42 -0
- package/docs/consuming-common.md +65 -6
- package/docs/releases/2.0.0.md +58 -0
- package/localized/zh-CN/methods/engineering-practices.md +237 -0
- package/localized/zh-CN/methods/engineering-practices.rules.json +121 -0
- package/localized/zh-CN/methods/engineering-practices.sources.json +377 -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-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-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-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-typescript-project-standard/SKILL.md +60 -0
- 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/cc-typescript-project-standard/references/type-safety-patterns.md +73 -0
- package/localized/zh-CN/skills/cc-typescript-project-standard/references/type-safety.md +154 -0
- package/localized/zh-CN/skills/eval_queries.json +336 -0
- package/localized/zh-CN/skills/metadata.json +545 -7
- package/localized/zh-CN/skills/relations.json +143 -0
- package/methods/engineering-practices.md +237 -0
- package/methods/engineering-practices.rules.json +121 -0
- package/methods/engineering-practices.sources.json +377 -0
- package/package.json +10 -2
- 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-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-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-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-typescript-project-standard/SKILL.md +60 -0
- 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/cc-typescript-project-standard/references/type-safety-patterns.md +73 -0
- package/skills/cc-typescript-project-standard/references/type-safety.md +154 -0
- package/skills/eval_queries.json +336 -0
- package/skills/metadata.json +545 -7
- package/skills/relations.json +143 -0
|
@@ -0,0 +1,377 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"sources": [
|
|
4
|
+
{
|
|
5
|
+
"id": "google-review",
|
|
6
|
+
"publisher": "Google",
|
|
7
|
+
"title": "Code review standard",
|
|
8
|
+
"url": "https://google.github.io/eng-practices/review/reviewer/standard.html",
|
|
9
|
+
"section": "Engineering principles and code health",
|
|
10
|
+
"checkedAt": "2026-11-08",
|
|
11
|
+
"versionScope": "Living public guidance; revision unknown",
|
|
12
|
+
"licenseStatus": "unknown",
|
|
13
|
+
"adoption": "adopt",
|
|
14
|
+
"limits": "Use evidence and project standards; personal preference alone is not a blocker."
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"id": "ms-playbook",
|
|
18
|
+
"publisher": "Microsoft ISE",
|
|
19
|
+
"title": "Test planning",
|
|
20
|
+
"url": "https://microsoft.github.io/code-with-engineering-playbook/automated-testing/test-planning/",
|
|
21
|
+
"section": "Risk, test scope and responsibilities",
|
|
22
|
+
"checkedAt": "2026-11-08",
|
|
23
|
+
"versionScope": "Living ISE playbook; revision unknown",
|
|
24
|
+
"licenseStatus": "unknown",
|
|
25
|
+
"adoption": "adopt",
|
|
26
|
+
"limits": "Team practice, not a company-wide mandate; retain existing tools."
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "ms-faults",
|
|
30
|
+
"publisher": "Microsoft ISE",
|
|
31
|
+
"title": "Fault injection testing",
|
|
32
|
+
"url": "https://microsoft.github.io/code-with-engineering-playbook/automated-testing/fault-injection-testing/",
|
|
33
|
+
"section": "Controlled failure and observations",
|
|
34
|
+
"checkedAt": "2026-11-08",
|
|
35
|
+
"versionScope": "Living ISE playbook; revision unknown",
|
|
36
|
+
"licenseStatus": "unknown",
|
|
37
|
+
"adoption": "adopt",
|
|
38
|
+
"limits": "Run scoped, controlled failures; do not infer production reliability from a small example."
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"id": "google-ts",
|
|
42
|
+
"publisher": "Google",
|
|
43
|
+
"title": "TS/JS style guide",
|
|
44
|
+
"url": "https://google.github.io/styleguide/tsguide.html",
|
|
45
|
+
"section": "Environment caveat; types and exceptions",
|
|
46
|
+
"checkedAt": "2026-11-08",
|
|
47
|
+
"versionScope": "Public guide; revision unknown",
|
|
48
|
+
"licenseStatus": "unknown",
|
|
49
|
+
"adoption": "conditional",
|
|
50
|
+
"limits": "Google explicitly notes internal constraints differ; no blanket ban overriding a justified project convention."
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"id": "typescript-publishing",
|
|
54
|
+
"publisher": "TypeScript",
|
|
55
|
+
"title": "Publishing declaration files",
|
|
56
|
+
"url": "https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html",
|
|
57
|
+
"section": "Types and declaration dependencies",
|
|
58
|
+
"checkedAt": "2026-11-08",
|
|
59
|
+
"versionScope": "Living handbook; check installed compiler/module resolution",
|
|
60
|
+
"licenseStatus": "unknown",
|
|
61
|
+
"adoption": "adopt",
|
|
62
|
+
"limits": "Validate the actual packed consumer; do not upgrade compiler or module mode on this basis."
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"id": "rust-api",
|
|
66
|
+
"publisher": "Rust library team",
|
|
67
|
+
"title": "Rust API Guidelines",
|
|
68
|
+
"url": "https://rust-lang.github.io/api-guidelines/",
|
|
69
|
+
"section": "Type safety, dependability and future proofing",
|
|
70
|
+
"checkedAt": "2026-11-08",
|
|
71
|
+
"versionScope": "Living recommendations; revision unknown",
|
|
72
|
+
"licenseStatus": "unknown",
|
|
73
|
+
"adoption": "adopt",
|
|
74
|
+
"limits": "Guidance rather than language law; preserve edition and MSRV."
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"id": "tokio-join",
|
|
78
|
+
"publisher": "Tokio project",
|
|
79
|
+
"title": "JoinHandle",
|
|
80
|
+
"url": "https://docs.rs/tokio/latest/tokio/task/struct.JoinHandle.html",
|
|
81
|
+
"section": "Drop, abort and completion",
|
|
82
|
+
"checkedAt": "2026-11-08",
|
|
83
|
+
"versionScope": "Page observed 1.54.1; project runtime/version determines applicability",
|
|
84
|
+
"licenseStatus": "unknown",
|
|
85
|
+
"adoption": "conditional",
|
|
86
|
+
"limits": "Tokio-specific mechanics only when Tokio is already used; no new runtime dependency."
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"id": "uber-go",
|
|
90
|
+
"publisher": "Uber",
|
|
91
|
+
"title": "Go Style Guide",
|
|
92
|
+
"url": "https://github.com/uber-go/guide/blob/master/style.md",
|
|
93
|
+
"section": "Errors, interfaces and goroutine lifetime",
|
|
94
|
+
"checkedAt": "2026-11-08",
|
|
95
|
+
"versionScope": "Living master; revision unknown",
|
|
96
|
+
"licenseStatus": "unknown",
|
|
97
|
+
"adoption": "adopt",
|
|
98
|
+
"limits": "Do not import Uber dependencies or turn buffer-size style into a correctness theorem."
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"id": "go-context",
|
|
102
|
+
"publisher": "Go project",
|
|
103
|
+
"title": "context package",
|
|
104
|
+
"url": "https://pkg.go.dev/context",
|
|
105
|
+
"section": "Cancellation propagation and ownership",
|
|
106
|
+
"checkedAt": "2026-11-08",
|
|
107
|
+
"versionScope": "Standard library; check owning go.mod/toolchain",
|
|
108
|
+
"licenseStatus": "unknown",
|
|
109
|
+
"adoption": "adopt",
|
|
110
|
+
"limits": "A cancellation signal alone does not confirm worker exit."
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"id": "google-java",
|
|
114
|
+
"publisher": "Google",
|
|
115
|
+
"title": "Java Style Guide",
|
|
116
|
+
"url": "https://google.github.io/styleguide/javaguide.html",
|
|
117
|
+
"section": "Source structure and exception handling",
|
|
118
|
+
"checkedAt": "2026-11-08",
|
|
119
|
+
"versionScope": "Living public style; revision unknown",
|
|
120
|
+
"licenseStatus": "unknown",
|
|
121
|
+
"adoption": "conditional",
|
|
122
|
+
"limits": "Naming/layout follows local standard; style is distinct from runtime correctness."
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"id": "oracle-resources",
|
|
126
|
+
"publisher": "Oracle",
|
|
127
|
+
"title": "Try-with-resources",
|
|
128
|
+
"url": "https://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html",
|
|
129
|
+
"section": "Closing resources and suppressed exceptions",
|
|
130
|
+
"checkedAt": "2026-11-08",
|
|
131
|
+
"versionScope": "JDK8 tutorial; not a source for newer runtime features",
|
|
132
|
+
"licenseStatus": "unknown",
|
|
133
|
+
"adoption": "adopt",
|
|
134
|
+
"limits": "Preserve primary cause and borrowed-resource ownership; check actual API contract."
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"id": "java-executor",
|
|
138
|
+
"publisher": "Oracle",
|
|
139
|
+
"title": "ExecutorService",
|
|
140
|
+
"url": "https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/concurrent/ExecutorService.html",
|
|
141
|
+
"section": "Shutdown, termination and awaitTermination",
|
|
142
|
+
"checkedAt": "2026-11-08",
|
|
143
|
+
"versionScope": "Java SE17 documentation",
|
|
144
|
+
"licenseStatus": "unknown",
|
|
145
|
+
"adoption": "conditional",
|
|
146
|
+
"limits": "Check target JDK; no automatic virtual-thread or JDK migration."
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"id": "google-python",
|
|
150
|
+
"publisher": "Google",
|
|
151
|
+
"title": "Python Style Guide",
|
|
152
|
+
"url": "https://google.github.io/styleguide/pyguide.html",
|
|
153
|
+
"section": "Imports, exceptions and mutable state",
|
|
154
|
+
"checkedAt": "2026-11-08",
|
|
155
|
+
"versionScope": "Living public guide; revision unknown",
|
|
156
|
+
"licenseStatus": "unknown",
|
|
157
|
+
"adoption": "conditional",
|
|
158
|
+
"limits": "Keep current formatter/type checker and library responsibilities."
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"id": "python-asyncio",
|
|
162
|
+
"publisher": "Python project",
|
|
163
|
+
"title": "Coroutines and tasks",
|
|
164
|
+
"url": "https://docs.python.org/3/library/asyncio-task.html",
|
|
165
|
+
"section": "Cancellation and task ownership",
|
|
166
|
+
"checkedAt": "2026-11-08",
|
|
167
|
+
"versionScope": "Page observed 3.15.2; feature availability follows project Python",
|
|
168
|
+
"licenseStatus": "unknown",
|
|
169
|
+
"adoption": "conditional",
|
|
170
|
+
"limits": "Newer TaskGroup/timeout features require a supported project version; no upgrade implied."
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"id": "cert-c",
|
|
174
|
+
"publisher": "CMU SEI",
|
|
175
|
+
"title": "MEM00-C allocation and release",
|
|
176
|
+
"url": "https://cmu-sei.github.io/secure-coding-standards/sei-cert-c-coding-standard/recommendations/memory-management-mem/mem00-c/",
|
|
177
|
+
"section": "MEM00-C memory responsibility",
|
|
178
|
+
"checkedAt": "2026-11-08",
|
|
179
|
+
"versionScope": "2016-edition standard family; MEM00-C is a recommendation",
|
|
180
|
+
"licenseStatus": "unknown",
|
|
181
|
+
"adoption": "adopt",
|
|
182
|
+
"limits": "Do not label recommendations as mandatory CERT rules or apply C++ ownership machinery to pure C."
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"id": "cpp-core",
|
|
186
|
+
"publisher": "C++ Core Guidelines editors",
|
|
187
|
+
"title": "C++ Core Guidelines",
|
|
188
|
+
"url": "https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines",
|
|
189
|
+
"section": "Resource and lifetime interfaces",
|
|
190
|
+
"checkedAt": "2026-11-08",
|
|
191
|
+
"versionScope": "Page dated 2026-06-14, living release0.8",
|
|
192
|
+
"licenseStatus": "unknown",
|
|
193
|
+
"adoption": "adopt",
|
|
194
|
+
"limits": "Adapt to existing exception policy and compiler; borrowing does not imply ownership."
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"id": "google-cpp",
|
|
198
|
+
"publisher": "Google",
|
|
199
|
+
"title": "C++ Style Guide",
|
|
200
|
+
"url": "https://google.github.io/styleguide/cppguide.html",
|
|
201
|
+
"section": "Exceptions and project consistency",
|
|
202
|
+
"checkedAt": "2026-11-08",
|
|
203
|
+
"versionScope": "Living public guide; revision unknown",
|
|
204
|
+
"licenseStatus": "unknown",
|
|
205
|
+
"adoption": "conditional",
|
|
206
|
+
"limits": "Its exception/standard policy is not universal; preserve the owning project policy and C ABI."
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"id": "ms-sal",
|
|
210
|
+
"publisher": "Microsoft",
|
|
211
|
+
"title": "Understanding SAL",
|
|
212
|
+
"url": "https://learn.microsoft.com/en-us/cpp/code-quality/understanding-sal?view=msvc-170",
|
|
213
|
+
"section": "Parameter preconditions and output guarantees",
|
|
214
|
+
"checkedAt": "2026-11-08",
|
|
215
|
+
"versionScope": "MSVC170 documentation view",
|
|
216
|
+
"licenseStatus": "unknown",
|
|
217
|
+
"adoption": "conditional",
|
|
218
|
+
"limits": "SAL is an optional toolchain-specific expression, not a portable mandatory annotation."
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"id": "aws-retry",
|
|
222
|
+
"publisher": "AWS",
|
|
223
|
+
"title": "Timeouts, retries and backoff with jitter",
|
|
224
|
+
"url": "https://aws.amazon.com/builders-library/timeouts-retries-and-backoff-with-jitter/",
|
|
225
|
+
"section": "Timeouts, bounded retries and retry amplification",
|
|
226
|
+
"checkedAt": "2026-11-08",
|
|
227
|
+
"versionScope": "Article dated 2019-12-05; official Builder Center redirect",
|
|
228
|
+
"licenseStatus": "unknown",
|
|
229
|
+
"adoption": "adopt",
|
|
230
|
+
"limits": "Retry only semantically safe operations within a total budget; failure classes alone do not grant write replay."
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"id": "aws-idempotency",
|
|
234
|
+
"publisher": "AWS",
|
|
235
|
+
"title": "Making retries safe with idempotent APIs",
|
|
236
|
+
"url": "https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/",
|
|
237
|
+
"section": "Caller intent, duplicate requests and atomic recording",
|
|
238
|
+
"checkedAt": "2026-11-08",
|
|
239
|
+
"versionScope": "Builders Library; revision unknown",
|
|
240
|
+
"licenseStatus": "unknown",
|
|
241
|
+
"adoption": "adopt",
|
|
242
|
+
"limits": "A process-local example does not establish database/multi-process exactly-once."
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"id": "react-effects",
|
|
246
|
+
"publisher": "React project",
|
|
247
|
+
"title": "useEffect",
|
|
248
|
+
"url": "https://react.dev/reference/react/useEffect",
|
|
249
|
+
"section": "Cleanup and fetching race conditions",
|
|
250
|
+
"checkedAt": "2026-11-08",
|
|
251
|
+
"versionScope": "Page observed React19.3; use installed project API",
|
|
252
|
+
"licenseStatus": "unknown",
|
|
253
|
+
"adoption": "adopt",
|
|
254
|
+
"limits": "Abort and stale-result checks complement each other; no React upgrade implied."
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"id": "react-act",
|
|
258
|
+
"publisher": "React project",
|
|
259
|
+
"title": "act",
|
|
260
|
+
"url": "https://react.dev/reference/react/act",
|
|
261
|
+
"section": "Applying updates before assertions",
|
|
262
|
+
"checkedAt": "2026-11-08",
|
|
263
|
+
"versionScope": "Page observed React19.3; verify sample versions",
|
|
264
|
+
"licenseStatus": "unknown",
|
|
265
|
+
"adoption": "adopt",
|
|
266
|
+
"limits": "DOM simulation is not browser E2E or native desktop execution."
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"id": "vue-watchers",
|
|
270
|
+
"publisher": "Vue project",
|
|
271
|
+
"title": "Watchers",
|
|
272
|
+
"url": "https://vuejs.org/guide/essentials/watchers.html",
|
|
273
|
+
"section": "Side-effect cleanup",
|
|
274
|
+
"checkedAt": "2026-11-08",
|
|
275
|
+
"versionScope": "Vue3; onWatcherCleanup requires3.5+ and synchronous registration",
|
|
276
|
+
"licenseStatus": "unknown",
|
|
277
|
+
"adoption": "conditional",
|
|
278
|
+
"limits": "Use supported callback cleanup on older Vue3; no framework migration."
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
"id": "tauri-permissions",
|
|
282
|
+
"publisher": "Tauri project",
|
|
283
|
+
"title": "Permissions",
|
|
284
|
+
"url": "https://v2.tauri.app/security/permissions/",
|
|
285
|
+
"section": "Command allow/deny and capability scope",
|
|
286
|
+
"checkedAt": "2026-11-08",
|
|
287
|
+
"versionScope": "Tauri2 docs; check installed version/configuration",
|
|
288
|
+
"licenseStatus": "unknown",
|
|
289
|
+
"adoption": "conditional",
|
|
290
|
+
"limits": "Rust command-unit tests do not activate webview permissions or prove packaged GUI security."
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"id": "electron-security",
|
|
294
|
+
"publisher": "Electron project",
|
|
295
|
+
"title": "Security",
|
|
296
|
+
"url": "https://www.electronjs.org/docs/latest/tutorial/security",
|
|
297
|
+
"section": "IPC sender checks and renderer trust",
|
|
298
|
+
"checkedAt": "2026-11-08",
|
|
299
|
+
"versionScope": "Living docs; match installed Electron",
|
|
300
|
+
"licenseStatus": "unknown",
|
|
301
|
+
"adoption": "conditional",
|
|
302
|
+
"limits": "Handler tests do not prove sandbox/context isolation is active in a packaged app."
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
"id": "spring-tests",
|
|
306
|
+
"publisher": "Spring project",
|
|
307
|
+
"title": "Testing Spring Boot applications",
|
|
308
|
+
"url": "https://docs.spring.io/spring-boot/3.5/reference/testing/spring-boot-applications.html",
|
|
309
|
+
"section": "Test slices and application tests",
|
|
310
|
+
"checkedAt": "2026-11-08",
|
|
311
|
+
"versionScope": "Boot3.5 docs observed3.5.16; preserve sample/project versions",
|
|
312
|
+
"licenseStatus": "unknown",
|
|
313
|
+
"adoption": "conditional",
|
|
314
|
+
"limits": "Test scope matters; MVC tests do not establish live DB/transaction or deployment behavior."
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"id": "fastapi-lifespan",
|
|
318
|
+
"publisher": "FastAPI project",
|
|
319
|
+
"title": "Lifespan events",
|
|
320
|
+
"url": "https://fastapi.tiangolo.com/advanced/events/",
|
|
321
|
+
"section": "Acquire and release application resources",
|
|
322
|
+
"checkedAt": "2026-11-08",
|
|
323
|
+
"versionScope": "Living FastAPI documentation; match pinned dependencies",
|
|
324
|
+
"licenseStatus": "unknown",
|
|
325
|
+
"adoption": "conditional",
|
|
326
|
+
"limits": "Use actual lifespan execution in tests; import does not own a live connection."
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
"id": "gin-binding",
|
|
330
|
+
"publisher": "Gin project",
|
|
331
|
+
"title": "Binding",
|
|
332
|
+
"url": "https://gin-gonic.com/en/docs/binding/",
|
|
333
|
+
"section": "Binding errors and validation",
|
|
334
|
+
"checkedAt": "2026-11-08",
|
|
335
|
+
"versionScope": "Living Gin documentation; match pinned module",
|
|
336
|
+
"licenseStatus": "unknown",
|
|
337
|
+
"adoption": "conditional",
|
|
338
|
+
"limits": "Writing/aborting a response does not replace explicit control-flow return in the current handler."
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"id": "axum-extractors",
|
|
342
|
+
"publisher": "Axum project",
|
|
343
|
+
"title": "Extractors",
|
|
344
|
+
"url": "https://docs.rs/axum/latest/axum/extract/",
|
|
345
|
+
"section": "Extractor order and rejections",
|
|
346
|
+
"checkedAt": "2026-11-08",
|
|
347
|
+
"versionScope": "Latest route observed0.8.9; fixed0.8.9 route unavailable via browser tool",
|
|
348
|
+
"licenseStatus": "unknown",
|
|
349
|
+
"adoption": "conditional",
|
|
350
|
+
"limits": "Pinned existing example is authoritative for compilation; do not assume source signatures across releases."
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
"id": "drogon-filters",
|
|
354
|
+
"publisher": "Drogon project",
|
|
355
|
+
"title": "Middleware and Filter",
|
|
356
|
+
"url": "https://github.com/drogonframework/drogon/wiki/ENG-05-Middleware-and-Filter",
|
|
357
|
+
"section": "Filter callbacks and continuation",
|
|
358
|
+
"checkedAt": "2026-11-08",
|
|
359
|
+
"versionScope": "Living wiki; match compiled example version",
|
|
360
|
+
"licenseStatus": "unknown",
|
|
361
|
+
"adoption": "conditional",
|
|
362
|
+
"limits": "Synthetic role headers are not authentication; callback lifetime must follow actual ownership."
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
"id": "node-typescript",
|
|
366
|
+
"publisher": "Node.js project",
|
|
367
|
+
"title": "Modules: TypeScript",
|
|
368
|
+
"url": "https://nodejs.org/api/typescript.html",
|
|
369
|
+
"section": "Type-stripping history, enabling, and separate type checking",
|
|
370
|
+
"checkedAt": "2026-11-08",
|
|
371
|
+
"versionScope": "Page observed26.13.0; sample>=22.18, actual24.14.1 tested; product Node>=22 unchanged",
|
|
372
|
+
"licenseStatus": "unknown",
|
|
373
|
+
"adoption": "conditional",
|
|
374
|
+
"limits": "Native stripping is not type checking and ignores tsconfig. Missing sample capability is MISSING, not a product runtime upgrade."
|
|
375
|
+
}
|
|
376
|
+
]
|
|
377
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cc-c-project-standard
|
|
3
|
+
description: "用于c 的模块、类型、资源所有权需要设计或审查,适用于库、CLI、桌面核心及服务;仅样式或图片任务不适用。"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# C 工程规范
|
|
7
|
+
|
|
8
|
+
本入口面向库、CLI、桌面核心及服务中的语言工程;应用角色由实际子工程证据决定,不由前端/后端产品名决定。
|
|
9
|
+
|
|
10
|
+
读取现有 C 标准、编译选项、构建系统和导出 ABI,保留符号可见性、调用约定及错误码。
|
|
11
|
+
|
|
12
|
+
## 执行与证据
|
|
13
|
+
|
|
14
|
+
1. 定位实际工程、任务边界及已有契约;只加载当前需要的语言和领域资料。
|
|
15
|
+
2. 应用[专业检查](references/practice.md),先核对输入证据,再决定最小改动。
|
|
16
|
+
3. 使用仓库已有工具验证相关行为;缺少工具、环境或实际执行时明确报告,不能把计划当通过。
|
|
17
|
+
4. 交付改动范围、专业决策、实际验证及剩余风险;仅评审任务保持只读。
|
|
18
|
+
|
|
19
|
+
## 任务边界
|
|
20
|
+
|
|
21
|
+
按[参考中的边界与案例](references/practice.md#scope)区分相邻能力,不扩展成未要求的框架迁移或全栈重写。
|
|
22
|
+
|
|
23
|
+
## 工程实践
|
|
24
|
+
|
|
25
|
+
按当前任务读取[本入口工程细则](references/engineering-practices.md),再按链接选择公共原则。规则级别与例外以实际项目契约为准;不因产品前后端标签限制语言或职责。
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# 纯C大小与清理契约 — EP-C-01
|
|
2
|
+
|
|
3
|
+
复制到可写目录,用cc -std=c11 -Wall -Wextra -Werror boundary.c boundary_test.c -o boundary-test编译,再以CRAFT_ENGINEERING_DEFECTIVE=1/0运行相同程序。PowerShell先设$env:CRAFT_ENGINEERING_DEFECTIVE;POSIX可在命令前赋值。缺编译器记MISSING,可显式准备Docker后验证。维护器另以-DNDEBUG检查断言不失效。
|
|
4
|
+
|
|
5
|
+
两个命名测试使用始终有效检查,分配器实际malloc/free并计数,拒绝巨大请求,清理测试幸存分配。溢出应分配前拒绝,第二次分配失败释放header,成功仅转移payload;失败初始化有效输出槽。缺陷分支故意遗漏溢出/清理,unsigned回绕是已定义行为,无需UB崩溃证明错误。
|
|
6
|
+
|
|
7
|
+
C11只是样例目标,不要求升级或改C++,不依赖SAL/三方库/父源码。未证明sanitizer、任意外部缓冲有效性或全部ABI平台;相关时独立执行。程序日志保留在可写副本。
|
|
@@ -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
|
+
}
|