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

# Import and Export Contexity Context Capsules Safely

> Export focused context capsules from one Contexity project and import them into another checkout, branch, or machine with trust preserved.

Contexity can export focused context capsules from one checkout and import them into another. This lets you carry relevant work history across branches, machines, or repository clones — without manually reconstructing what the agent knew about a task. Trust state travels with the capsule and is re-evaluated on import, so a stale clone can't silently steer a newer one.

## Export a Capsule

Export context scoped to a specific task description:

```bash theme={null}
# Export by task
contexity --project /path/to/source export --task "billing retry work"
```

If you need to export a specific context item rather than a full task scope, target it directly by ID:

```bash theme={null}
# Export a specific item
contexity --project /path/to/source export --item ctx_item_123
```

The export command produces a capsule file you can move to another machine or pass to a teammate.

## Preview Before Importing

Always preview a capsule before applying it. The preview shows how each item in the capsule will be classified against the target project:

```bash theme={null}
contexity --project /path/to/target import /path/to/capsule --preview
```

The preview report groups items into four categories:

| Category         | Meaning                                                        |
| ---------------- | -------------------------------------------------------------- |
| **Safe**         | Verified against target repo evidence — ready to apply         |
| **Needs review** | Could not be revalidated — flagged for manual confirmation     |
| **Stale**        | Predates significant target repo changes — may no longer apply |
| **Rejected**     | Conflicts with existing verified context in the target project |

<Note>
  Always preview a capsule before applying it so you can see which items need review or were rejected. Applying without previewing skips a step that can catch misleading or outdated context.
</Note>

## Apply the Import

Once you've reviewed the preview, choose how much of the capsule to apply.

Apply only items that passed safe revalidation:

```bash theme={null}
# Only safe items
contexity --project /path/to/target import /path/to/capsule --apply --only-safe
```

Include items that need review alongside safe items (you'll be prompted to confirm each needs-review item):

```bash theme={null}
# Include needs-review items
contexity --project /path/to/target import /path/to/capsule --apply --include-needs-review
```

## Trust Model

Imported context does not automatically inherit the trust level it had in the source project. Instead, Contexity re-evaluates each item against evidence in the target repository:

* Items that can be revalidated by target repo evidence are promoted to **safe**
* Items that cannot be revalidated default to **candidate** or **needs-review**
* Items that conflict with verified target context are **rejected**

This prevents an old clone from silently steering a newer checkout with stale or contradictory context. The trust model ensures that moving context between projects is always an explicit, reviewable action — not an automatic override.
