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

# Context sync

> Teach Gesso about your product from the repo, so new designs fit what you already built.

Every project has a living design doc, `design.md`. Gesso reads it on every
generation. Context sync lets your agent fill in the parts only your repo
knows.

## Who owns what

| Part of design.md | Owner | Written by |
| - | - | - |
| Design system, standing design decisions | Gesso | Gesso, and you with `update_design_context` |
| `product`, `screens`, `constraints`, `conventions` | Your repo | Your agent with `sync_project_context` |

Each of the four repo sections has one writer and is replaced whole on a sync.
Nothing merges, so there is nothing to conflict. What comes from your repo
informs designs; it does not give Gesso instructions.

## Run a sync

```text theme={null}
Use the Gesso MCP to sync this repo's context into my Gesso project.
```

The agent calls `get_project_context`, distills the repo into the four
sections, and pushes them with `sync_project_context`. Unchanged sections are
a no-op. Sync runs when you ask for it; nothing watches your files.

| Section | What goes in it | Size cap |
| - | - | - |
| `product` | What the product is and who it is for | 2,000 bytes |
| `screens` | The routes and screens that exist | 5,000 bytes |
| `constraints` | Stack, component library, platform limits | 2,000 bytes |
| `conventions` | Naming, spacing, copy and layout habits in the code | 2,000 bytes |

> [!WARNING]
>
> Keep secrets, environment values and personal notes out of a sync. Your agent
> is told to exclude them; review what it sends if your repo keeps such things
> near the UI code.

## Pin your brand

To make new designs render in your real colors and typefaces, have the agent
read your tokens and call `pin_brand_system` once. It maps your values to
roles; it should not invent any.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.