Get started

OpenAI Codex design system: set the source of truth and verify the UI

Codex needs more than a polished prompt. Give it an identified design source, the exact artifacts needed for one bounded UI task, and acceptance criteria tied to the rendered consumer. Treat every screenshot, test, and observation as evidence about that implementation, not as a new source of design truth.

Updated October 4, 2026

Start with three separate contracts

A reliable Codex UI task has three contracts. The source contract identifies the approved design decisions. The implementation contract defines what Codex may change and which consumer must adopt those decisions. The acceptance contract lists the conditions that must be observed before the work can pass.

Mixing those contracts creates false confidence. A DESIGN.md can say that cards use tonal separation instead of shadows, but it can't prove that a particular card follows the rule. A token file can contain the right light and dark values without proving that the application loaded it. One screenshot may show a correct card, but it can't establish the approved token or supported interaction behavior.

Delivery is not adoption

A successful file write, MCP response, package installation, build, or screenshot proves only that event. It doesn't prove that the intended source version reached every required consumer or behaved correctly under the stated conditions.

Map authority before Codex edits the interface

Give every decision one authoritative home. When two layers disagree, resolve the conflict at the earliest governing layer instead of accepting whichever value happens to render.

AuthorityWhat it governsWhat it cannot prove
Repository instructionsRepository instructionsCodex behavior, workflow, required checks, file scope, and project-specific constraintsThat the visual system is complete or the rendered UI is correct
DESIGN.mdDESIGN.mdVisual intent, role definitions, layout guidance, motifs, and explicit prohibitionsExact runtime values or correct component adoption
Token and framework artifactsToken and framework artifactsExact reusable values, semantic roles, modes, and framework mappings they explicitly containThat the project consumed the current artifact
Component contractComponent contractSupported variants, states, structure, interaction behavior, and accessibility responsibilitiesThat every product instance uses the supported component correctly
Approved exceptionApproved exceptionOne named deviation, its scope, owner, reason, and expiry or retest triggerPermission for the same deviation elsewhere
Rendered observationRendered observationWhat happened for one recorded consumer, version, environment, and conditionDesign authority, untested conditions, or general accessibility conformance
Authority and proof boundaries for a Codex UI task

Use a simple conflict rule. Current repository instructions control how Codex performs the task. The approved design source controls intent, generated artifacts control the values they contain, and component contracts control reusable behavior. Narrowly approved exceptions override only their named scope. Observations never outrank these sources; they reveal whether the chain worked.

Keep instruction scope and design scope distinct

Codex repository instructions are the right place for commands, workflow requirements, ownership boundaries, and validation duties. They should point to the design source instead of duplicating the palette, spacing scale, or component rules in a second copy that slowly diverges. Current OpenAI documentation remains authoritative for how Codex discovers and scopes those instructions.

DESIGN.md has a different job. It explains the visual system in terms an agent can apply: semantic roles, typography, layout, component treatments, motifs, and prohibited moves. Keep exact values connected to machine-readable artifacts where possible. If the prose and a generated token artifact disagree, stop and identify the approved source version instead of asking Codex to improvise a compromise.

Choose the delivery route that matches the maintained source

The route should follow the source your team already maintains. Don't choose MCP merely because it's newer, or checked-in files merely because they're visible in the repository. Choose the route that can identify the source, preserve the required artifacts, and leave a reviewable handoff.

Checked-in filesIdentity Forge CLI or MCPFigma MCP
Best fitThe repository is the maintained handoff and changes need ordinary version reviewThe team wants a published kit delivered through agent tooling or applied as project artifactsThe maintained design context lives in Figma and the task needs a design-to-code or code-to-design round trip
Source identity to recordCommit or artifact version plus file pathsKit slug and version plus delivered artifact identitiesFigma file, relevant component or variable source, and captured revision context
Downstream workMap tokens, fonts, and rules into the project's actual stack and componentsInspect delivered files, select the matching framework route, and map consumersTranslate design components, variables, fonts, colors, and layouts into the implementation
Evidence limitPresence in Git does not prove runtime consumptionConnection, retrieval, or generation does not prove correct application adoptionRetrieved Figma context or an editable round trip does not prove production behavior
Delivery-route decision matrix

Identity Forge's CLI can configure its MCP server for Codex and verify the connection. That check is useful but narrow: it shows that the configured route responds. The project still owns placement, dependency compatibility, local mappings, component behavior, exceptions, accessibility evaluation, and runtime acceptance.

Figma MCP fits when Figma is part of the real authority chain. OpenAI documents both bringing design context into Codex and turning implemented UI into editable Figma designs. The round trip can help collaboration, but the returned design or code remains a proposal until the appropriate owner accepts it and verifies the named consumer.

Inspect a real source before choosing the route

Use a published kit to inspect the guidance and token roles Codex would receive. Then decide whether your project should check them in or retrieve them through agent tooling.

Freeze the source contract before prompting

Record the source contract before Codex touches the consumer. At minimum, name the system and version, available artifacts, supported modes, typography roles, layout rules, protected decisions, exclusions, unresolved fields, and the person or role that owns acceptance. An unresolved decision should stay unresolved. Don't let the model silently turn it into policy.

  • Source identity: system name, version, retrieval date, and owner.
  • Artifact inventory: the exact guidance and machine-readable outputs supplied to the task.
  • Supported scope: modes, viewports, components, states, and content conditions covered by the source.
  • Protected rules: decisions Codex may implement but may not reinterpret.
  • Exclusions: product behavior, routes, components, or files outside the task.
  • Unresolved fields: decisions that still require an owner rather than model judgment.
  • Acceptance owner: the person or role permitted to choose accept, revise, or block.

Bounded intake: Ambient Sage v1

Ambient Sage v1 works as an intake example because its public kit page identifies a concrete system rather than a loose mood. It uses a warm-sage canvas, tonal card separation without shadows or borders, a single vivid yellow accent, Plus Jakarta Sans for heading and body roles, and JetBrains Mono for technical strings. The public kit has semantic light and dark tokens and six artifact routes: DESIGN.md, DTCG, CSS, Tailwind v3, Tailwind v4, and shadcn.

Token specimen · real values

Ambient Sage

Live render

Ambient Sage's actual tokens — the same values its exports use.

Color tokensSemantic roles with HEX / HSL / CMYK

Color tokens

Ambient Sage
light · HEX · HSL · CMYK

Core

#F3F4EF

background

H 72 · C0, 0, 2, 4

#1A1C17

foreground

H 84 · C7, 0, 18, 89

#E5E6E0

card

H 70 · C0, 0, 3, 10

#ECEEE8

muted

H 80 · C1, 0, 3, 7

#D8D9D2

border

H 68.57 · C0, 0, 3, 15

Brand

#FEE951

primary

H 52.72 · C0, 8, 68, 0

#1A1C17

primary-fg

H 84 · C7, 0, 18, 89

#E5E6E0

secondary

H 70 · C0, 0, 3, 10

#F7E464

accent

H 52.24 · C0, 8, 60, 3

#FEE951

ring

H 52.72 · C0, 8, 68, 0

Semantic

#C0392B

destructive

H 5.64 · C0, 70, 78, 25

#FFFFFF

destructive-fg

H 0 · C0, 0, 0, 0

#2D7238

success

H 129.57 · C61, 0, 51, 55

#C97D12

warning

H 35.08 · C0, 38, 91, 21

#545651

muted-fg

H 84 · C2, 0, 6, 66

Charts

#FEE951

chart-1

H 52.72 · C0, 8, 68, 0

#4A8FD4

chart-2

H 210 · C65, 33, 0, 17

#6BBF8A

chart-3

H 142.14 · C44, 0, 28, 25

#E07498

chart-4

H 340 · C0, 48, 32, 12

#E8A24B

chart-5

H 33.25 · C0, 30, 68, 9

Type scaleHeading, body, and mono in the kit's fonts

Typography

Ambient Sage

Scale: compact-product

Density: balanced

Heading · Plus Jakarta Sans · 1.875rem

Ship beautiful product faster

Subheading · Plus Jakarta Sans · 1.375rem

A warm-sage neutral-surface mobile kit with a single vivid yellow accent, flat tonal cards, and oversized display numerals.

Body · Plus Jakarta Sans · 1rem

Ambient Sage uses a near-white warm-sage canvas (#f3f4ef) with card panels distinguished only by a tonal shift to #e5e6e0, never by shadows or borders. A single vivid yellow (#fee951) is the only saturated color and appears sparingly at component scale as orbs, button fills, and focus rings. Primary data values render as oversized bold hero numerals with a small superscript unit. Typography is a friendly rounded geometric (Plus Jakarta Sans) with no uppercase and no tight tracking, while JetBrains Mono is reserved for hex codes and technical strings. Generous rounding and luminance-only contrast give the whole system a calm, minimal feel.

Mono · JetBrains Mono · 0.8125rem

npx shadcn add ambientsage.json

Aa

Plus Jakarta Sans · Heading

400500600700

Aa

Plus Jakarta Sans · Body

400500600700

ABCDEFGHIJKLM NOPQRSTUVWXYZ

abcdefghijklmnopqrstuvwxyz

0123456789 & @ # % →

Radius & spacingCorner radius, elevation, and spacing steps

Tokens

Ambient Sage primitives
density: balanced

Radius scale

sm · 0.375rem
md · 0.75rem
lg · 1.25rem
xl · 1.75rem

Component radius

button
card
input

Elevation

level 1
level 2
level 3
level 4

Spacing · base 4px

1x
2x
3x
4x
6x
8x
Ambient Sage v1 as an upstream specimen. These tokens and roles are available for delivery; this block doesn't claim that a Codex project has mapped or rendered them correctly.

That inventory establishes upstream availability. It doesn't establish implementation in a particular repository. At intake, keep the Codex project paths, framework mapping, font loading, component adoption, accessibility results, runtime compatibility, and rendered observations marked unresolved. They become claims only when the receiving project records evidence.

Available, implemented, observed

Available means the source can provide the artifact. Implemented means the project maps or consumes it. Observed means someone recorded what a named consumer did under stated conditions. Keep the three states separate.

Give Codex one bounded implementation task

The task below is illustrative and unexecuted. It shows the precision needed for a dashboard summary-card consumer without claiming that Codex, Ambient Sage, or a particular framework produced a tested result.

task_id: dashboard-summary-card-ambient-sage-v1
status: illustrative_unexecuted
source:
  kit: ambient-sage
  version: v1
  required_artifacts:
    - DESIGN.md
    - matching semantic token artifact for the project's stack
consumer:
  name: dashboard-summary-card
  version: unresolved
scope:
  viewports:
    - narrow: 390px
    - wide: 1440px
  modes:
    - light
    - dark
  content_cases:
    - short label and ordinary value
    - long label without clipping
    - empty value with approved fallback copy
  interaction_cases:
    - keyboard focus on the card action
    - disabled action if the component contract supports it
protected_surfaces:
  - dashboard navigation
  - unrelated cards
  - global typography outside the named consumer
exclusions:
  - data-fetching behavior
  - route changes
  - new component variants
  - claims of accessibility conformance
required_evidence:
  - delivered artifact identity
  - local token and font mapping
  - component contract and version
  - rendered captures for each required viewport and mode
  - keyboard observation for the supported action
  - diff confirming protected surfaces did not change
acceptance_rule: withhold acceptance until every required observation has a recorded disposition
Illustrative task contract. It hasn't been executed or validated against a specific repository.

The task names a consumer instead of asking Codex to "apply the design system." It also separates source facts from project decisions. Ambient Sage supplies the upstream intent and artifacts. The receiving project must decide where those files belong, how semantic roles map into its stack, which component contract applies, and how to observe each required condition.

Record expectations before observations

Write the expected result first. Otherwise, a plausible render can quietly redefine the requirement. Each verification case should cover one consumer version and one meaningful condition. Several cases may point to the same screenshot or test log, but every disposition should remain independently reviewable.

handoff_id: codex-ui-YYYY-MM-DD-01
source:
  name: Ambient Sage
  version: v1
  owner: design-system-owner
  delivered_artifacts:
    - identity: DESIGN.md
      version_or_hash: unresolved
    - identity: project-token-artifact
      version_or_hash: unresolved
project_mapping:
  repository_revision: unresolved
  token_entrypoint: unresolved
  font_entrypoint: unresolved
  local_exceptions: []
verification_cases:
  - case_id: summary-card-wide-light-long-label
    consumer: dashboard-summary-card
    consumer_version: unresolved
    viewport: 1440px
    mode: light
    content_condition: long label
    interaction_condition: default
    environment: unresolved
    expectation: Uses approved semantic roles and preserves the full label without overlap or clipping.
    observation: NOT_RECORDED
    evidence_reference: NOT_RECORDED
    first_divergent_layer: NOT_ASSESSED
    correction_owner: UNASSIGNED
    retest_trigger: Any source, artifact, mapping, component, font, or layout change affecting this case.
    disposition: block
acceptance_owner: product-ui-owner
final_disposition: block
Copyable expectation-versus-observation record. Replace unresolved fields only with inspected evidence.

A blank observation isn't an interface failure. It's missing evidence. Use block when that evidence is required for the stated scope, revise when a known mismatch has an owner and correction path, and accept only after every required case has an observation that matches its expectation or a properly approved exception.

Verification cases worth recording

  • Artifact delivery: the named source version produced or supplied the expected files.
  • Project mapping: the application loads the intended token, typography, and mode entrypoints.
  • Component adoption: the named consumer uses the supported component and variant rather than a detached copy.
  • Responsive behavior: the consumer works at each required viewport, including content extremes.
  • Mode behavior: semantic roles remain correct in every supported visual mode.
  • Interaction behavior: supported hover, focus, disabled, error, and keyboard conditions match the component contract.
  • Protected surfaces: unrelated consumers named in the task remain unchanged.
  • Rendered result: captures or observations identify the repository revision, consumer version, environment, and condition.

Accessibility evaluation belongs in this record when required, but don't fold it into visual approval. A correct palette, token mapping, or screenshot doesn't prove keyboard operation, zoom resilience, assistive-technology behavior, or accessibility conformance. Record the evaluation method and conditions separately.

Diagnose the first divergence, not the ugliest symptom

When the result drifts, trace the chain in ownership order. The first divergence is the earliest point where the recorded expectation and inspected state stop matching. Fixing a later symptom can hide the problem while leaving every other consumer exposed.

  1. 1

    Check the source policy

    Confirm that the intended rule is explicit, approved, current, and owned. If the source is ambiguous, return the decision to its owner.

  2. 2

    Check the delivered artifact

    Confirm that the expected source version produced the artifact Codex received. Look for stale, partial, or mismatched outputs.

  3. 3

    Check the project mapping

    Inspect how the application loads and aliases tokens, fonts, modes, and framework values. A correct source can fail during this translation.

  4. 4

    Check the component contract

    Verify that the named consumer uses the supported component, variant, structure, and state behavior.

  5. 5

    Check approved exceptions

    Determine whether a local difference is deliberate, scoped, owned, and still valid. An undocumented override isn't an exception.

  6. 6

    Check the rendered consumer

    Record the actual result under the required viewport, mode, content, interaction, and environment conditions.

Assign the correction only after locating that point. A source owner resolves unclear intent. The delivery owner regenerates a stale artifact, while the application owner fixes a mapping. The component owner corrects reusable behavior. The consumer owner removes an unauthorized local override. This keeps Codex from compensating in the wrong layer.

Retest from the changed layer downward

If the source changes, regenerate and retest the entire required chain. If only one consumer mapping changes, retest that mapping, its component behavior, named protected surfaces, and rendered cases. The retest boundary should match the reach of the change.

Make the acceptance decision explicit

Accept when the source and artifacts are identified, every required mapping and consumer is traceable, observations cover the promised conditions, protected surfaces remain stable, and each exception is approved within a narrow scope. Choose revise when the first divergence is understood and has a bounded correction. Choose block when required evidence is missing, authority is unresolved, the wrong source version was delivered, or a material condition contradicts the contract.

This process doesn't benchmark every Codex delivery route or guarantee compatibility with a framework. Nor does it make Identity Forge the owner of project behavior. Identity Forge can supply the upstream kit and delivery mechanisms. The consuming project owns placement, mapping, component behavior, local exceptions, runtime compatibility, accessibility evaluation, observations, and final acceptance.

Start with one traceable consumer

Choose a published design kit and deliver the matching guidance and artifact. Complete one source-to-render record before expanding the system to more screens.

Sources

  • Custom instructions with AGENTS.md: OpenAI documents repository instruction discovery for Codex, making scoped instruction files the appropriate authority for agent behavior and workflow constraints.
  • Designing delightful frontends with GPT-5.4: OpenAI recommends defining typography, color, layout, and product constraints before frontend implementation, then reviewing the resulting hierarchy and visual anchor.
  • Building frontend UIs with Codex and Figma: OpenAI documents a Codex and Figma MCP workflow involving design-system components, variables, fonts, colors, and layout changes.
  • OpenAI Codex and Figma launch seamless code-to-design experience: OpenAI describes Figma MCP as a route for bringing design context into Codex and moving implemented UI back into editable Figma designs.
  • Introducing Codex: OpenAI's historical launch article describes reviewable evidence such as logs and tests while warning that generated code still requires human validation; the page itself is marked outdated.
  • Product Design and UI With OpenAI Codex: OpenDesign presents a detailed Codex UI workflow built around a brief, design constraints, desktop and mobile conditions, interaction requirements, and review before handoff.
  • Ambient Sage Design Kit: The public Ambient Sage v1 kit provides DESIGN.md and implementation artifacts, semantic light and dark tokens, Plus Jakarta Sans typography, and JetBrains Mono for technical strings.
  • Identity Forge changelog: Identity Forge states that its CLI can configure the Identity Forge MCP server for Codex and verify the connection with its doctor command.