Gate Layer (Heuristic Rules)
The Gate is Stage 1 of Axon's inference pipeline. It operates as a narrow allowlist and broad denylist executed synchronously in-process. Its sole purpose is to catch confidently trivial prompts and route them directly to the Fast tier with zero classification cost and zero LLM latency overhead.
The Gate Philosophy
Routing trivial requests through an LLM classifier wastes time and money. However, falsely categorizing a critical or architectural prompt as “trivial” ruins user experience.
Therefore, the Gate is designed conservatively: anything uncertain immediately escalates to the Judge layer. A prompt only passes the Gate if it meets strict, narrow allowlist criteria and triggers zero denylist vetoes.
The 5 Gate Heuristic Rules
| Rule | Classification | Behavior & Criterion |
|---|---|---|
| Rule 1: Length Limit | Boundary | Prompt length must be ≤ 20 words. Longer prompts require deeper processing and escalate. |
| Rule 2: Scope-Denylist | Veto Rule | Instant disqualification. If the prompt contains any of:entire, all, every, whole, across, throughout, system-wide, globally, everywhere, codebaseChecked first. If matched, the prompt immediately escalates to the Judge. |
| Rule 3: Known-Intent Match | Allowlist | Must match a known simple utility pattern:
|
| Rule 4: No Sequencing | Denylist | Must not contain sequential step indicators:first, then, after that, next, also, followed by, once done, subsequently |
| Rule 5: No Context / Code Blocks | Boundary | Prompt must not have code blocks (```), attached file context, or multi-turn conversational history. |
Evaluation Logic
The Gate evaluates these five rules with explicit priority:
- Check Rule 2 (Scope Denylist Veto): If any scope-denylist word is detected, the Gate immediately fails and hands the prompt over to the Judge LLM.
- Check Remaining Rules (1, 3, 4, 5): If Rule 2 is false, all four remaining rules must evaluate to
true. - Routing Outcome: If all pass, the prompt bypasses the Judge entirely and executes on the Fast tier. If any single condition fails, it escalates to the Judge.
Heuristic rules 3 and 4 are acknowledged to be slightly “leaky” on edge cases. This is by design: if a simple prompt fails heuristics because of phrasing, the Judge layer will still classify it as Fast or Balanced accurately. The Gate exists solely to fast-path unambiguous trivial requests.
Examples
≤ 20 words, no scope denylist, matches typo intent, no sequencing, no attachments.
→ Routes directly to Fast Tier (0ms overhead).
Contains across and entire (Scope Denylist). Instant veto.
→ Escalates to Judge Layer.