> ## Documentation Index
> Fetch the complete documentation index at: https://docs.earthcare.network/llms.txt
> Use this file to discover all available pages before exploring further.

# Context

> ContextPack and ContextDocument — the structured, embeddings-backed surface agents read.

The Context layer turns a business into something an agent can reason over:
structured modules, long-form documents, embeddings, and provenance.

## ContextPack

The compiled, agent-native surface for a business (1:1 with `Business`).

| Field            | Type         | Notes                                        |
| ---------------- | ------------ | -------------------------------------------- |
| `business`       | OneToOne     | Owning business                              |
| `schema_version` | string       | Pack schema version (e.g. `context-pack-v1`) |
| `payload`        | JSON         | Structured context                           |
| `modules`        | JSON         | Named context modules (public/private)       |
| `faq`            | JSON         | Compiled FAQ                                 |
| `provenance`     | JSON         | Per-claim source / verification              |
| `embedding`      | vector(1536) | Semantic retrieval                           |
| `refreshed_at`   | datetime     | Last compile                                 |

## ContextDocument

Long-form markdown knowledge attached to a business.

| Field           | Type         | Notes                                            |
| --------------- | ------------ | ------------------------------------------------ |
| `business`      | FK           | Owning business                                  |
| `slug`, `title` | string       | Unique per business                              |
| `doc_type`      | enum         | `BUSINESS · PRODUCT · BRAND`                     |
| `body_markdown` | text         | Content                                          |
| `status`        | enum         | `SEEDED · VERIFIED` (AI content starts `seeded`) |
| `provenance`    | JSON         | Unverified claims marked for confirmation        |
| `embedding`     | vector(1536) | Semantic retrieval                               |

<Note>
  AI-authored context is never auto-verified — a human verifies before `status`
  becomes `VERIFIED`. Generated from the `context` app models.
</Note>
