# How does an AI agent find the right rule without reading all of them?

> Giving an agent every rule on every task fills its context.

Canonical: https://optionos.app/guide/en/anchor-mcp-how-it-works
Published: 2026-08-23
Source: anchor-routing:r9

Giving an agent every rule on every task fills its context.

Anchor lets the agent call only the rule it needs at that moment.

```text
Request
  → agent selects a rule
  → Anchor delivers it
  → changed decision + witness
```

## One example: “Do all of it.”

### 1 — User request

```text
“Do all of it.”
```

> “All” does not identify the set it quantifies.  
> The agent must first determine the scope universe.

### 2 — Rule selected by the agent

```text
Active state
[@görevBaşı]

Exact root
[#kural:talep-agi]
```

> Anchor did not choose the rule.  
> The agent selected the exact rule address for its current decision.

```text
Agent  → which rule is needed?
Anchor → which body belongs to that address?
```

### 3 — Real Anchor call

```bash
anchor '[@görevBaşı]' '[#kural:talep-agi]'
```

> The agent did not send natural language or a `crawl talep ağı` keyword.  
> It sent the active state and the exact address it selected.

### 4 — Anchor response

```text
ANCHOR_CONTEXT known

active-state:
  [@görevBaşı]

exact-roots:
  [#kural:talep-agi]

requires-closure:
  none

block-digests:
  [#kural:talep-agi]
  @6ce4a5f7c6061321d7ee8efb69fa4c75b7fd61c36914a2b2420f7ca1941a264b
```

```text
Exact root
└── Rule explicitly requested by the agent

Requires closure
└── Other rules loaded automatically to interpret the selected rule
    None in this example

Block digest
└── Content identity of the delivered rule body
```

### 5 — What does the delivered `talep-ağı` rule say?

The rule does not expand “all” to the entire universe. It resolves the scope in three ordered steps:

```text
1. Does the request explicitly name a universe?
   Yes → the named closed set

2. No explicit universe; is there an active task scope?
   Yes → the closed set inside the active task scope

3. Neither an explicit universe nor an active task scope?
   Yes → the channel’s complete inventory
```

Applied to this example:

```text
“Do all of it.”
├── explicitly named universe: absent
├── active task scope: present
└── result: “all” = closed member list in the active task scope
```

The rule also requires the resolved list to be visible. The agent therefore cannot silently invent a universal scope; the reader sees which members will be applied before work begins.

### 6 — The rule changes the agent’s decision

```diff
[#kural:talep-agi]@6ce4a5f7…

+ I will not read “all” as universal.
+ I will first enumerate and show the closed member set in the active task scope.

witness: The request names no explicit universe;
         this session has an active task scope.
```

## Result

```text
“Do all of it.”
        │
        ▼
The agent identifies a scope decision
        │
        ▼
It selects [#kural:talep-agi]
        │
        ▼
Anchor delivers the exact body
        │
        ▼
The agent measures the universe of “all”
        │
        ▼
It shows and applies the closed scope
```

**Next experimental guide:** [When does an idea from a conversation become a permanent rule?](/guide/en/conversation-to-rule)
