{
  "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
  }
}
