CTQ Quality Gates
Every build is scored across 6 dimensions. Scores below 70 in any dimension trigger an automatic re-run of the relevant agent before the output is returned.
The 6 dimensions
| Dimension | What's measured |
|---|---|
| Correctness | Code runs, tests pass, no runtime errors |
| Security | OWASP top 10, secrets in code, auth flows |
| Performance | Query complexity, N+1 detection, async usage |
| Maintainability | Cyclomatic complexity, duplication, naming |
| Test coverage | Line and branch coverage across the test suite |
| Documentation | Docstrings, README completeness, API docs |
Viewing scores
bash
# Score for a specific project
GET /quality/project/{project_name}json
{
"project": "my-api",
"overall_score": 86,
"dimensions": {
"correctness": 92,
"security": 88,
"performance": 81,
"maintainability": 87,
"test_coverage": 87,
"documentation": 79
},
"gates_passed": ["unit_tests", "lint", "security_scan"],
"gates_failed": []
}bash
# Portfolio-level summary across all projects
GET /quality/portfolio
# Historical trends
GET /quality/trends
# Trigger a fresh scan
POST /quality/refresh
{ "project_name": "my-api" }Gates and promotion
A project must pass all CTQ gates before it can be promoted to production. The POST /promotion/check endpoint runs this validation automatically.
The default gate thresholds:
| Gate | Minimum score |
|---|---|
| Overall | 75 |
| Security | 80 |
| Test coverage | 70 |
| Correctness | 85 |