# Interface DistilledRule

A distilled routing rule extracted from outcome patterns.

Rules are fingerprinted by `patternType:cli:category` to prevent duplicates and cap total rules at a bounded maximum.

interface DistilledRule {
id: string;
patternType: PatternType;
cli: "claude" | "gemini" | "codex" | "opencode";
category: string;
action: StrategyAction;
confidence: number;
observationCount: number;
metric: number;
status: RuleStatus;
createdAt: number;
updatedAt: number;
tainted: boolean;
}

- Defined in packages/nexus-agents/src/learning/strategy-distiller-types.ts:30

##### Index

### Properties

id
patternType
cli
category
action
confidence
observationCount
metric
status
createdAt
updatedAt
tainted

## Properties

### `Readonly` id

id: string

Fingerprint: `${patternType}:${cli}:${category}`

- Defined in packages/nexus-agents/src/learning/strategy-distiller-types.ts:32

### `Readonly` patternType

patternType: PatternType

What kind of pattern triggered this rule

- Defined in packages/nexus-agents/src/learning/strategy-distiller-types.ts:34

### `Readonly` cli

cli: "claude" | "gemini" | "codex" | "opencode"

Which CLI this rule applies to

- Defined in packages/nexus-agents/src/learning/strategy-distiller-types.ts:36

### `Readonly` category

category: string

Task category this rule applies to

- Defined in packages/nexus-agents/src/learning/strategy-distiller-types.ts:38

### `Readonly` action

action: StrategyAction

What routing action to take

- Defined in packages/nexus-agents/src/learning/strategy-distiller-types.ts:40

### `Readonly` confidence

confidence: number

Confidence 0-1, computed via sigmoid(observations, center=30)

- Defined in packages/nexus-agents/src/learning/strategy-distiller-types.ts:42

### `Readonly` observationCount

observationCount: number

Number of observations that informed this rule

- Defined in packages/nexus-agents/src/learning/strategy-distiller-types.ts:44

### `Readonly` metric

metric: number

The metric value (failure rate, success rate, or p90/median ratio)

- Defined in packages/nexus-agents/src/learning/strategy-distiller-types.ts:46

### `Readonly` status

status: RuleStatus

Current lifecycle status

- Defined in packages/nexus-agents/src/learning/strategy-distiller-types.ts:48

### `Readonly` createdAt

createdAt: number

Epoch ms when rule was first created

- Defined in packages/nexus-agents/src/learning/strategy-distiller-types.ts:50

### `Readonly` updatedAt

updatedAt: number

Epoch ms when rule was last updated

- Defined in packages/nexus-agents/src/learning/strategy-distiller-types.ts:52

### `Readonly` tainted

tainted: boolean

Security: tainted rules never promote to RoutingMemory

- Defined in packages/nexus-agents/src/learning/strategy-distiller-types.ts:54