A
↓ into the pipeline
B
APPENDIX TO B10 — B11
The rules in full
B10 evaluates sixteen guardrails; B11 consumes their verdict alongside confidence and composite scores. Below is the complete ledger — what each rule checks, how confidence is computed, which language tiers are eligible for what, and the priority-ordered rules the router uses to pick a decision class.
The sixteen guardrails G1 — G16 · src/guardrails/index.ts
| ID | Rule | What it checks | Severity |
|---|
Confidence formula v1 · src/audit/confidence.ts
s₁
Mean of self-reported per-dimension confidences across all three score samples.
s₂
Sample agreement:
1 − stddev(composite) / 1.5, clamped to [0, 1].
raw
0.5 × s₁ + 0.5 × s₂
−0.02
Skill / difficulty / library bump: penalty applied when all primary low dims are in
{ skill_alignment, difficulty_fit, library_alignment }.
cap
Language-tier ceiling:
T2 → 0.92, T3 → 0.85. T1 is uncapped. Tier 4 was retired 2026-06-09 — anything unlisted now defaults to T3.
final
max(0, min(raw − bump, tierCap)) — passed to the router as confidence.
Language tiers src/language/tiers.ts
| Tier | Confidence cap | Languages | Behavior |
|---|
Decision routing priority order · src/decision/router.ts
✦ ✦ ✦
C
↓ route by backend
D
Path I · backend = "mongo"
Path II · backend = "qgateway"
❧
E
❧
F