# Observations

> Every source becomes the same normalized shape, declared in the bundle.

Adapters turn anything into **observations** with one shape:

```text
id, source, type, timestamp, ingested_at, fields, tags, raw_ref
```

The structure is the same for every source; only `fields` is domain-specific. Raw payloads stay at the
source when it is durable: `raw_ref` points back to it.

## Normalization is declared, not coded

You do not write a parser per source. The adapter's `normalize` block maps a raw record to an
observation by path:

```yaml
normalize:
  mode: declarative
  identity: { strategy: natural_key, key: ["$.data.id"] }
  timestamp_from: "$.data.date"
  type: expense
  fields:
    amount: { path: "$.data.amount" }
    note: { path: "$.data.note" }
```

`identity` decides when two records are the same one, so re-reading a source never double-counts.

## Measures

Measures are aggregates over observations, recomputed each cycle:

```yaml
measures:
  spent:
    aggregation: sum
    field: fields.amount
    filter: "type == 'expense'"
    window: 30d
    default: 0
```

Old data is rolled up rather than deleted, so a standing goal can run indefinitely under a fixed
storage cap.

See [Connect data](/loom-site/guides/data-sources/) for the adapter types.