Architecture & Engine

Judge Layer (Rubrics & Severity)

Prompts that fail or bypass the Gate escalate to Stage 2: The Judge. Axon sends the prompt to a fast, cost-effective reasoning model which rates the request against four independent categorical axes. These axes are passed into a deterministic lookup table that resolves the target tier.

The 4 Independent Rubric Axes

Unlike naive routers that assign arbitrary numerical scores (e.g. “severity 73/100”), Axon requires the Judge to classify the prompt along four distinct, qualitative dimensions:

1. Blast RadiusLow | Med | High

Measures how far an incorrect response propagates through downstream system behavior. This is judged by systemic consequence, not simply the number of files touched.

2. IrreversibilityVeto: True | False

True if an incorrect response causes real-world harm that code changes alone cannot undo: destructive data loss, financial transactions, external communications, or security/auth vulnerabilities.

3. Reasoning DepthLow | Med | High

The number of interdependent steps or sequential thinking required to fulfill the task correctly, evaluated independently of risk or reversibility.

4. AmbiguityClear | Unclear

Clear: Sufficient context exists to begin processing.
Unclear: Missing critical requirements (e.g. “Fix reconnect bug” vs. “Fix reconnect bug where hosts lose leaderboard view”).

The Irreversibility Veto Rule

If Irreversibility: True, the prompt is immediately assigned to the Frontier tier, overriding all other axes. Axon never optimizes cost or latency at the expense of irreversible real-world risk.

Deterministic Tier Mapping

The categorical axis results from the Judge are mapped directly to a model tier via a deterministic lookup table:

IrreversibleBlast RadiusReasoning DepthAmbiguityResolved Tier
trueanyanyanyFrontier (Veto)
falseHighHighanyFrontier
falseHighMedium / LowUnclearFrontier
falseHighMedium / LowClearBalanced
falseMediumHighanyFrontier
falseMediumMedium / LowanyBalanced
falseLowHighanyBalanced
falseLowMediumUnclearBalanced
falseLowLowClearFast

Judge Model Decoupling & DI

The Judge model is configured separately from the tiers. Axon decouples the classification engine using Dependency Injection:

  • The classification module (rubric.ts) never imports provider SDKs or tier configurations directly. It receives an injected RateFn.
  • This enforces modular testing: you can test Judge rubric logic in isolation with mock ratings without making network requests.
  • Developer Configured: The end-user of your application never chooses or sees the Judge model. If omitted from your config, Axon safely defaults to the Fast-tier model.
// Explicit Judge Configuration
const axon = new Axon({
  tiers: { ... },
  judge: {
    model: "gemini-1.5-flash",
    apiKey: process.env.GEMINI_API_KEY!,
    // provider: "google" // optional: inferred automatically
  },
  fallbackTier: "balanced",
});