feat: 初始化 SCALE OS 工程框架
- 添加 SCALE Engine 配置 (.scale/) - 添加 OpenClaw Agent 配置 (.openclaw/) - 添加知识文档 (AGENTS.md, TOOLS.md) - 添加质量契约和工作流配置 - 添加 22 个工作流模板 - 添加验证脚本和门控脚本 - 添加 skills-registry 技能注册表
This commit is contained in:
70
.scale/quality-contract.json
Normal file
70
.scale/quality-contract.json
Normal file
@@ -0,0 +1,70 @@
|
||||
{
|
||||
"version": "1.0",
|
||||
"project": "eskin-model-player",
|
||||
"description": "E-Skin 传感器数据可视化工具质量契约",
|
||||
"gates": {
|
||||
"pre_commit": {
|
||||
"enabled": true,
|
||||
"checks": [
|
||||
{
|
||||
"name": "type_check",
|
||||
"command": "cargo check",
|
||||
"required": true,
|
||||
"description": "类型检查"
|
||||
},
|
||||
{
|
||||
"name": "lint",
|
||||
"command": "cargo clippy -- -D warnings",
|
||||
"required": true,
|
||||
"description": "Clippy lint 检查"
|
||||
},
|
||||
{
|
||||
"name": "test",
|
||||
"command": "cargo test",
|
||||
"required": true,
|
||||
"description": "单元测试"
|
||||
}
|
||||
]
|
||||
},
|
||||
"pre_push": {
|
||||
"enabled": true,
|
||||
"checks": [
|
||||
{
|
||||
"name": "build_release",
|
||||
"command": "cargo build --release",
|
||||
"required": true,
|
||||
"description": "Release 构建验证"
|
||||
},
|
||||
{
|
||||
"name": "full_test",
|
||||
"command": "cargo test --all",
|
||||
"required": true,
|
||||
"description": "完整测试套件"
|
||||
}
|
||||
]
|
||||
},
|
||||
"code_review": {
|
||||
"enabled": true,
|
||||
"checks": [
|
||||
{
|
||||
"name": "no_unwrap",
|
||||
"pattern": "\\.unwrap\\(\\)",
|
||||
"severity": "warning",
|
||||
"description": "避免裸 unwrap(),使用 expect() 或 ? 运算符"
|
||||
},
|
||||
{
|
||||
"name": "no_todo",
|
||||
"pattern": "todo!\\(\\)|unimplemented!\\(\\)",
|
||||
"severity": "warning",
|
||||
"description": "生产代码不应包含 todo!/unimplemented!"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"quality_metrics": {
|
||||
"max_complexity": 15,
|
||||
"min_test_coverage": 0,
|
||||
"max_file_lines": 500,
|
||||
"max_function_lines": 80
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user