
# Context Index

The `context.yaml` file is the machine-readable manifest of a Context Nest vault. It is auto-generated by the CLI and serves as the primary entry point for programmatic access.

## Structure

```yaml
version: 1
generated_at: "2026-03-15T12:00:00Z"
nest:
  name: "My Project"
  namespace: "my-project"
  layout: structured
  checkpoint: 12

documents:
  - id: nodes/architecture-overview
    title: "Architecture Overview"
    type: document
    status: published
    version: 4
    tags: ["#engineering", "#architecture"]
    content_hash: "sha256:a1b2c3..."

relationships:
  - source: nodes/api-reference
    target: nodes/architecture-overview
    type: context_link
  - source: sources/current-sprint
    target: sources/project-config
    type: depends_on

hubs:
  - id: nodes/architecture-overview
    inbound_count: 7

external_dependencies:
  mcp_servers:
    - name: jira
      required_tools: [jira_get_sprint_issues]
    - name: github
      required_tools: [github_list_pull_requests]
```

## Sections

### `documents`

Every published document with its current metadata and content hash.

### `relationships`

Edges between documents derived from context links (`contextnest://` URIs in document bodies) and source node `depends_on` declarations.

### `hubs`

The top documents by inbound reference count. Agents use these as high-signal starting points without loading the full graph.

### `external_dependencies`

MCP servers and tools required by source nodes. Agents and runtimes read this to check capability before resolution begins.

## Regeneration

The index is regenerated automatically when you publish, add, update, or delete documents. You can also regenerate manually:

```bash
ctx index
```
