Loading...
Loading...
Compare original and translation side by side
Related Skills:
- Query for Kavak-specific patterns, logging/metrics standards, GitLab CI templateskavak-documentation- Use
MCP tool to verify Kavak best practices when reviewingkavak-platform/plati_query
相关技能:
- 查询Kavak特定模式、日志/指标标准、GitLab CI模板kavak-documentation- 使用
MCP工具,在审核时验证Kavak最佳实践kavak-platform/plati_query
undefinedundefined
**Quality gate commands by language:**
| Language | Lint | Build | Test |
|----------|------|-------|------|
| Go | `golangci-lint run` | `go build ./...` | `go test ./...` |
| Node/TS | `npm run lint` | `npm run build` | `npm test` |
| Python | `ruff check .` | `python -m py_compile` | `pytest` |
| Java | `./mvnw checkstyle:check` | `./mvnw compile` | `./mvnw test` |
**按语言分类的质量门禁命令:**
| 编程语言 | Lint | 构建 | 测试 |
|----------|------|-------|------|
| Go | `golangci-lint run` | `go build ./...` | `go test ./...` |
| Node/TS | `npm run lint` | `npm run build` | `npm test` |
| Python | `ruff check .` | `python -m py_compile` | `pytest` |
| Java | `./mvnw checkstyle:check` | `./mvnw compile` | `./mvnw test` |git diff --name-only HEAD~1 --diff-filter=ACMRgit diff --name-only HEAD~1 --diff-filter=ACMR| Category | What to Check |
|---|---|
| Design & Architecture | Fits system patterns, avoids coupling, clear separation |
| Complexity & Maintainability | Flat control flow, low complexity, DRY, no dead code |
| Functionality & Correctness | Valid/invalid inputs handled, edge cases covered |
| Readability & Naming | Intent-revealing names, comments explain WHY |
| Best Practices | Language/framework idioms, SOLID principles |
| Test Coverage | Success + failure paths tested |
| Standardization | Style guide conformance, zero new lint warnings |
| Security | Input validation, secrets management, OWASP Top 10 |
| Performance | No N+1 queries, efficient I/O, no memory leaks |
| Logging | State machine pattern, proper tense, actionable context |
| Metrics | No cardinality explosions, proper naming, documented |
| 分类 | 检查内容 |
|---|---|
| 设计与架构 | 是否符合系统模式,避免耦合,职责分离清晰 |
| 复杂度与可维护性 | 控制流程扁平,复杂度低,遵循DRY原则,无死代码 |
| 功能与正确性 | 处理有效/无效输入,覆盖边缘情况 |
| 可读性与命名 | 命名能体现意图,注释解释“为什么”而非“怎么做” |
| 最佳实践 | 遵循语言/框架惯用写法,SOLID原则 |
| 测试覆盖率 | 覆盖成功与失败路径 |
| 标准化 | 符合风格指南,无新增lint警告 |
| 安全性 | 输入验证,密钥管理,OWASP Top 10 |
| 性能 | 无N+1查询,高效I/O,无内存泄漏 |
| 日志 | 遵循状态机模式,时态正确,上下文可操作 |
| 指标 | 无基数爆炸,命名规范,有文档说明 |
| Check | ✓ Good | ✗ Bad |
|---|---|---|
| Length | 50-200 chars | >200 (truncation) |
| Multiline | Single line | Multiple lines |
| Start | "Syncing orders" (progressive) | "Sync orders" |
| End OK | "Orders synced" (past) | "Syncing complete" |
| End Fail | "Failed to sync orders" | "Error" |
| Context | "DB timeout after 30s" | "Database error" |
| 检查项 | ✓ 良好 | ✗ 不佳 |
|---|---|---|
| 长度 | 50-200字符 | >200(会被截断) |
| 行数 | 单行 | 多行 |
| 开头 | "Syncing orders"(进行时态) | "Sync orders" |
| 成功结尾 | "Orders synced"(过去时态) | "Syncing complete" |
| 失败结尾 | "Failed to sync orders" | "Error" |
| 上下文 | "DB timeout after 30s" | "Database error" |
| Check | ✓ Good | ✗ Bad (CRITICAL) |
|---|---|---|
| Labels | | |
| Naming | | |
| Type | Counter (events), Histogram (latency) | Gauge for everything |
| 检查项 | ✓ 良好 | ✗ 严重问题 |
|---|---|---|
| 标签 | | |
| 命名 | | |
| 类型 | 计数器(事件)、直方图(延迟) | 所有指标都用仪表盘(Gauge) |
.claude/CLAUDE.mdCLAUDE.md.cursor/rules/AGENTS.md.claude/CLAUDE.mdCLAUDE.md.cursor/rules/AGENTS.md<path>:<line-range>git add -A && git commit -m "fix: brief description"<路径>:<行号范围>git add -A && git commit -m "fix: 简要描述"undefinedundefined
If no issues: "Code review complete. No issues found. All quality gates pass. Ready to proceed."
如果无问题:“代码审核完成。未发现问题。所有质量门禁通过。可继续推进。”| Reference | Purpose |
|---|---|
| Detailed review checklist |
| How to classify issue severity |
| Common issues (TypeScript/Node) |
| Common issues (Go) |
| OWASP Top 10 security checklist |
| How to give constructive feedback |
| Automated self-review during development |
| 参考资料 | 用途 |
|---|---|
| 详细审核清单 |
| 问题严重程度分类指南 |
| 常见问题(TypeScript/Node) |
| 常见问题(Go) |
| OWASP Top 10安全清单 |
| 如何给出建设性反馈 |
| 开发过程中的自动化自我审核流程 |
.cursor/rules/AGENTS.md.cursor/rules/AGENTS.md