# The Frame (/docs/concepts/percept)



An agent cannot trade a market it cannot see. What Kestrel delivers into a
context window is the **Frame**, and its current contract is &#x2A;*the Frame
contract (v6)**: a phase-conditioned
rendering of the market as attributed text.
The vocabulary is precise, and it stacks:

* A **View** is the standing definition of what should be seen: which panes, at
  what token budget. It is authored in the language itself.
* A **Frame** is a View materialized at one instant: the typed bundle of
  values, each carrying its source. The terminal is live video; a Frame is one
  fully specified instant of it.
* A **Field** is the atom of a Frame: a value plus the provenance it was
  derived under. A value that is genuinely unavailable is an explicit
  UNKNOWN, never a guessed or defaulted number.
* A **Rendering** is one serialization of a Frame. A Rendering never invents or
  changes a value; it chooses only glyphs, layout, and token spend.

```kestrel
VIEW open budget 1800
  macro week quarter rv20
  vol straddle expected-move
  tape skyline 5m vwap detector-strip
  levels registry
  chain fair realness
```

## Phase budgets [#phase-budgets]

Perception is priced by phase. Each delivery gets a token budget matched to
what the moment is for:

| Phase     | Budget   | What it carries                                                      |
| --------- | -------- | -------------------------------------------------------------------- |
| **OPEN**  | 1800 tok | the full keyframe: prior context, coverage, vol, levels, tape, chain |
| **WAKE**  | 500 tok  | a delta frame: only what changed since the agent last looked         |
| **SHOCK** | 400 tok  | a zoomed stat block around the violent move                          |
| **CLOSE** | 700 tok  | the settle-and-account frame                                         |

A wake costs a third of an open because the reader already holds the open in
context. The stream is append-only where it can be, so a long-running agent's
cache stays valid and perception costs scale with what is new, not with the
size of the screen.

## The Kernel leads every frame [#the-kernel-leads-every-frame]

Every frame opens with the **Kernel**: the immutable safety-and-control block
that states why the agent was woken, feed health, positions, resting orders,
the risk budget, and the remaining attention budget. From the published v5
OPEN artifact:

```
KERNEL
  wake [POLICY] phase_boundary:open severity=1
  health [OBS] SPX live two_sided=true stale_s=0.2
    src=SPX:health@120
  unavailable [UNKNOWN] tod_range_to_go
    src=SPX:tod_range_to_go@120
  positions (none)
  resting (none)
  budget [POLICY] risk=5.00R plan_cap=1.00R book_cap=5.00R
  attention [POLICY] remaining=1800tok
```

The excerpts on this page come from the publication-safe contract artifact
suite: deterministic, date-blind, synthetic instances of the contract with
generic index values. They preserve the real information structure; they are
not recorded quotes.

## Six-way attribution, watermarked [#six-way-attribution-watermarked]

Every Field carries one of six provenance tags, and nothing above a
deterministic calculation goes unattributed:

| Tag          | Meaning                                                                             |
| ------------ | ----------------------------------------------------------------------------------- |
| `[OBS]`      | an observed market datum: a quote, a trade                                          |
| `[CALC]`     | a deterministic transform of OBS: VWAP, range, realized vol                         |
| `[DETECTOR]` | a named pattern detector's output, versioned                                        |
| `[MODEL]`    | a model output: a fair value, a regime claim; must carry its receipt and confidence |
| `[POLICY]`   | a configured platform decision: budgets, zoom, what was omitted                     |
| `[UNKNOWN]`  | explicitly unavailable; rendered, never guessed                                     |

Each value also carries a **source watermark**, `src=SPX:vwap@120`: where it
came from and the engine sequence it was derived at. An ordinal, never a wall
clock, which is what makes replay byte-stable and keeps dates off the record
path. A `[MODEL]` field without its receipt and confidence is refused at
construction. In the OPEN artifact above, `tod_range_to_go` is simply not
knowable yet, so it renders as `[UNKNOWN]`. The renderer never fills a gap
with a plausible number: a token-efficient wrong number is worse than an
expensive right number.

## The pane library [#the-pane-library]

The View selects panes at a token budget; a Frame materializes the ones it
chose. Beyond the Kernel, the OPEN keyframe draws from a fixed library, every
value attributed and watermarked. Representative panes, verbatim from the v5
artifact suite:

```
LEVELS  (single registry; engine values)
  prior_close [OBS] 5050.00 src=SPX:prior_close@120
  HOD [CALC] 5068.10 src=SPX:hod@120
  LOD [CALC] 5058.40 src=SPX:lod@120
  OR15.hi [CALC] 5066.00 src=SPX:or15_hi@120
  OR15.lo [CALC] 5059.00 src=SPX:or15_lo@120
  VWAP [CALC] 5062.70 src=SPX:vwap@120
```

```
RELATIVE CANDLES 5m [CALC] axis=5058.40..5068.10
  09:35  |--#
  09:40  |-----#
  09:45  |----------#
  09:50  |---------------#
  09:55  |-----------#
```

```
CHAIN
  book [OBS] src=SPX:book@120
  fair [MODEL] src=SPX:fair@120 receipt=surface-v1 conf=0.84
  leg     bid / ask    fair
  5065C  12.40/12.90 12.60
  5065P  13.10/13.60 13.40
  5070C   9.80/10.30 10.05
```

Every `[MODEL]` field carries its receipt and confidence, as the `fair` row
does above; the renderer refuses a modeled value that arrives without them. At
the CLOSE the chain becomes an intrinsic ladder whose policy is stated in the
frame itself:

```
INTRINSIC LADDER
  fair [MODEL] src=SPX:fair@900 receipt=surface-v1 conf=0.82
  leg     intr   bid  bid-intr       fair
  5070C   6.40  6.20   -0.20 BELOW  6.65
  5075C   1.40  1.55   +0.15        1.70
  5080P   3.60  3.35   -0.25 BELOW  4.02

POLICY
  sell floor=intrinsic; BELOW rows cannot anchor a sell
```

The full OPEN library also carries coverage, vol / expected-move, velocity, and
detector-count panes; a WAKE delivers a delta frame plus a post-fill pane. Where
today's CLI renders less than the Frame contract, that is a filed CLI requirement,
not a looser contract.

## SHOCK: the screen refuses to editorialize [#shock-the-screen-refuses-to-editorialize]

When a violent move fires the SHOCK frame, the screen zooms to one-second
buckets and delivers measurements, not a story:

```
STAT BLOCK  (1s buckets; path is pull-based)
  start [OBS] 5081.30 low=5063.10 end=5074.20
  fastest_10s [CALC] -14.20 baseline_p99=9.80
  fastest_30s [CALC] -18.20 recovery_30s=+11.10
  cross_feed_sync [DETECTOR] SPY=true
  bid_present_rate [CALC] 0.92->0.34
  levels_crossed [DETECTOR] HOD
  interpretation [POLICY] omitted; agent must classify
  cause [UNKNOWN]
```

`interpretation [POLICY] omitted; agent must classify` is the design in one
line. Classifying the shock is the agent's judgment, and the platform never
launders an opinion into the Frame. The cause is `[UNKNOWN]` because the
feed does not know it, so neither does the screen.

## Degraded is fail-closed [#degraded-is-fail-closed]

When the canonical feed goes stale, the screen does not improvise. The
degraded OPEN artifact shows the whole posture:

```
CANONICAL
  spot [UNKNOWN] src=SPX:spot@121
    reason=fixed_source_unavailable
  mode [POLICY] degraded

PANES OMITTED [POLICY]
  prior_context vol_em velocity levels detector candles chain

EFFECT [POLICY]
  dependent Wakes and Plans de-armed reason=canonical_gap
  no alternate anchor promoted next_delivery=OPEN_resync
```

Dependent Wakes and Plans are de-armed. No alternate price anchor is promoted.
The agent is told exactly what it cannot see and what has been stood down,
and the next delivery is a full resync. A screen that would rather show
nothing than show a guess is the perception-side twin of the fail-closed
parser described in [The grammar is measured](/docs/concepts/grammar).

## The screen is measured, not designed [#the-screen-is-measured-not-designed]

No pane layout or glyph vocabulary on this screen is blessed by taste. Under
OSS ADR-0009, every rendering choice is a hypothesis that must earn default
status in rendering tournaments: cohorts of agents run on identical Frames
over identical replay corpora, differing only in rendering variant, and are
graded on decision quality, token cost, and attention efficiency. The
companion research program logs which panes agents themselves request during
authoring, so which panes earn a place on the default screen is itself an
empirical question, not a designer's opinion. That work is research in
progress, framed as such.

The screen is what the [watcher](/docs/concepts/the-desk) reads on every wake
and what a [Grade](/docs/concepts/evidence) certifies the agent actually saw.
