Context composition

Inherit information from other contexts to share a common foundation without duplicating configuration.

Plan: Enterprise

What is context composition?

A context composition lets you reuse the selections from one context inside another. When you add a context as a source, its data — tokens, documentation pages, files, skills — is included automatically in the child context. You can then extend it with additional selections specific to that context.

The composed output (the final result that AI tools actually receive) is the union of the composition layer and the local selection layer.

A context composition can inherit data from multiple contexts.

A context composition can inherit data from multiple contexts.

 

When to use it

Use composition when multiple contexts share a common foundation but each needs additional scoped content on top.

Example

Your design system has a shared token set and core component documentation used across all teams. Instead of duplicating this data for each new context individually, configure them once and include them in your composition for each team’s context. This way, each team inherits shared information and then adds only what is unique to their needs.

 

How composition works

  • Local filters and deselections apply only to local selections and do not change inherited content.
  • You can compose multiple contexts together. The final result includes everything from all composed contexts, plus any local selections you add.
  • If the same item appears more than once, it's included only once in the final output.

 

Design system requirements

When composing contexts, the composed context must use the same design system and dataset as the child context; composing contexts that use different design systems is not supported.

Workspace contexts, which do not have a design system assigned by default, can be composed into any context regardless of design system.

However, if a workspace context is used as a composition source in contexts that have different design systems, a design system can no longer later be assigned to that workspace context, since it is already shared across multiple design systems.

 

Add a composition source

  1. Open the context you want to configure.
  2. In the Composition section, click Add context.
  3. Select one or more contexts from the picker.

The composition layer is now active. Overview counts reflect the composed output total, not just local selections.

 

There are a few limitations when composing multiple contexts:

  • Contexts that would create circular references are disabled.
  • Contexts with incompatible design systems are disabled.

 

View composed output

When composition is active, the drawer for any data category (tokens, documentation, etc.) becomes a navigation hub with three views:

  • Combined output: The full union of composition and local selections. Read-only. This is what AI tools receive.
  • From composition: Items inherited from composed contexts. Read-only. To change these, edit the source context.
  • Local selection: Your editable local selections. Filters and manual controls here only affect this layer.
Combined output

 

Remove a composition source

  1. Go to the Composition section.
  2. Open the ••• menu next to the context you want to remove and choose Remove.

Your local selections are not affected when a composition source is removed.