Scoring System — The Deterministic Quality Score (DQS)¶
Unmonitored documentation drift corrupts developer trust. A broken link degrades user experience, while an unredacted credential key requires immediate security incident response.
The Zenzic Deterministic Quality Score (DQS) provides a single 0–100 value computed from the concrete finding count across every check. Zero findings evaluates to 100/100. Given the same repository state and .zenzic.toml configuration, the score is 100% bit-for-bit deterministic across machines, operating systems, and runners.
DQS Category Weights¶
The Quality Score is a weighted composite of four distinct check categories:
| Category | Primary Commands | Finding Codes | Weight | Bucket Cap |
|---|---|---|---|---|
| Structural Integrity | zenzic check links | Z101–Z105, Z107–Z109, Z113, Z121, Z124, Z410–Z411 | 30% | 30 pts |
| Navigation Graph | zenzic check orphans | Z301–Z303, Z402 | 25% | 25 pts |
| Brand & Governance | zenzic check assets | Z620, Z404–Z406, Z601, Z603, Z610–Z619 | 25% | 25 pts |
| Content Excellence | zenzic check all | Z120, Z122, Z403, Z501–Z503, Z505–Z506, Z510–Z520 | 20% | 20 pts |
Inviolable Security Override
If any security finding is detected — Z201 Credential Scanner, Z202/Z203 Path Traversal Guard, Z204 Privacy Gate, Z205 XSS Gate — the Quality Score collapses to 0/100 unconditionally. A repository with active secret leaks receives zero quality credit.
Dual-Gate Architecture & Suppression Budget¶
The fail_under score threshold and suppression_cap operate as orthogonal, independently enforced quality constraints:
- Score Gate (
fail_under): Fails CI (Exit 1) if computed DQS score falls below the required threshold. - Governance Cap (
suppression_cap): Fails CI (Exit 1) if active suppressions exceed the configured debt limit (default: 30).
Every active inline or per-file suppression deducts 1 Debt Point from the score:
Worked Example & Mathematical Computation¶
Scenario: A repository contains 2 broken links (Z101), 3 orphan pages (Z402), 5 untagged code blocks (Z505), and 15 Z601 brand violations, with 8 active suppressions (cap = 30).
| Stage | Deduction Calculation | Category Points Retained |
|---|---|---|
| Stage 1 — Security Gate | No Z2xx findings detected | Continue evaluation |
| Stage 2 — Structural | 2 × 8.0 = 16.0 pts | 14.0 / 30.0 |
| Stage 2 — Navigation | 3 × 4.0 = 12.0 pts | 13.0 / 25.0 |
| Stage 2 — Content | 5 × 1.0 = 5.0 pts | 15.0 / 20.0 |
| Stage 2 — Governance | 15 × 2.0 = 30.0 pts → amplified & capped to 25.0 | 0.0 / 25.0 |
Applying active suppression debt (\(n = 8\)):
CLI Quality Breakdown Ledger¶
Executing zenzic score prints a transparent breakdown ledger detailing raw deductions, category caps, and debt subtotals:
✨ Quality Score: 65/100
╭─ Quality Breakdown ──────────────────────────────────────╮
│ Category Issues Weight Raw Pts Applied Pts │
├──────────────────────────────────────────────────────────┤
│ ✓ structural 0 30% 0 0 │
│ ✓ navigation 0 25% 0 0 │
│ ✗ content 2 20% -4 -4 │
│ ✗ brand 15 25% -30 -25 (CAPPED) │
├──────────────────────────────────────────────────────────┤
│ Σ Subtotal 71 │
╰──────────────────────────────────────────────────────────╯
! Technical Debt (6 suppressions) -6 pts
= Final Quality Score 65 / 100
See Also¶
- Scoring Algorithm Reference — Complete 5-stage algorithm specification and 36-code penalty table.
- Finding Codes Reference — Encyclopedia of all Zenzic finding codes.
- Suppression Policy Reference — Suppression mechanisms and debt limits.