BrandKit
BrandKit manages a team's brand tokens, fonts, logos, and asset collections. Template consumers use the published brandkit.json artifact; an editable BrandKit draft is not the published input for a reproducible render.
Format and availability
The current consumer format is brandkit.json version 2.0; the shared runtime source is @uhuu/brandkit 0.2. These are format and package identities, not evidence that a particular kit or application is deployed. Obtain the published URL and kit revision from your team's BrandKit owner.
Publish and select a brand
- Prepare the kit. Review colors, typography, logo variants, and collections. Confirm that selected assets are approved for the intended use and that their usage information is understood.
- Publish the artifact. Publishing creates a version when the public content changes. Publishing identical content can reuse the existing version. Generated CSS, design tokens, and guidance files are projections of the published kit;
brandkit.jsonremains the consumer contract. - Choose an immutable revision or latest. A kit revision such as
v3is distinct from the JSON format version2.0. For reproducible output, retain the revision and its supplied immutableversions/vN/brandkit.jsonURL. The unversioned published URL follows the latest artifact and can change. - Select it in the template. Template Studio stores a brand reference in
builder-config.json.brand. Use the published URL supplied by BrandKit; a kit ID alone is not enough to construct a URL. - Verify the result. Preview text, fonts, logos, and relevant collections with the same payload and brand selection that will be exported. Preserve the resolved brand identity alongside the document's Builder metadata.
Legacy format 1.0 is retained for historical receipts and imports. Current publication produces 2.0, and legacy imports migrate to it; do not use an old format as an interchangeable current runtime artifact.
Selection precedence
A consumer resolves one brand reference in this order:
| Priority | Source | Use |
|---|---|---|
| 1 | payload.brand | A document-specific or per-render override. |
| 2 | builder-config.json.brand | The template's default brand. |
| 3 | Consumer fallback | The consumer's built-in default when no trusted selection resolves. |
A reference selects either a packaged preset or a published kit. A pinned kit reference carries both version and the immutable url; an unpinned reference tracks the latest URL. Template-local token patches are explicit deltas, rather than embedded copies of an entire kit.
A document override must not rewrite the template default. Preserve uhuu_builder metadata through document create, edit, save, duplicate, and export; resolved brandAssetVersions records provide provenance, not another source of brand selection.
Consumers validate the published origin before fetching a kit. An untrusted reference falls back to the consumer default, so a successful preview alone does not prove that the intended kit loaded. Relative font, logo, and collection URLs resolve against the fetched artifact URL; retain that base when moving an artifact.
The result is a published brand reference and, when pinned, a reproducible revision for a template or document. See Documents MCP for filling published templates and Studio deployment for the runtime handoff.