AAgentic Design School
Module 5 of 6
40–50 minutes

Design Systems for Agents

Token Sync Across Tools

Most teams hold tokens in at least three places: a design tool, a canvas or spec, and code. This module covers making one of them the source of truth and using agents and MCP to keep the others honest.

Duration40–50 minutes

Slides13 slides with notes and narration

Learning objectives

  • Choose a single source of truth for tokens and justify it for your team.
  • Set up an agent-run sync from the source of truth to Figma, canvas, and code targets.
  • Detect and report divergence instead of silently overwriting it.
Slide deck

Work through the module

Each slide is shown in its 16:9 frame, exactly as it appears in the video version. Open the notes under any slide for the longer explanation, and the narration if you prefer to read along.

Slide 1 of 1316:9

Token Sync Across Tools

Design Systems for Agents · Module 5 of 6

  • One source of truth, several mirrors
  • Sync as an agent run: read, diff, propose, apply under review
  • MCP connections to Figma and connected canvases
  • Divergence is reported and decided, never silently overwritten

The goal is not three identical copies. It is one place where token decisions happen, and mirrors that are rebuilt from it instead of maintained by hand.

Slide notes

Position this module against the audits in Module 4. Audits told you where the codebase had drifted from the system; this module is about a different drift — the same token existing in Figma, on a canvas, and in code, with three slightly different values and nobody sure which one is current. Every team that has run a design system for more than a year recognises the problem, because every tool wants to be the home of the tokens and none of them stays in sync on its own.

Set expectations about what gets solved. The mechanical re-entry — copying a hex value from a Figma variable panel into a CSS file, or redrawing a swatch board after a palette change — is exactly the kind of work agents do well, and the module shows it working with traced runs from this school's own repository. What does not get solved is the decision about which copy wins when they disagree. That stays human, and the module spends a full slide on why silent overwrites are the failure mode to design against.

If participants are arriving without Figma or a connected canvas in their stack, reassure them early: the pattern is source of truth, agent-run sync, and a divergence gate. The specific targets are interchangeable, and the exercise at the end works for any combination of tools.

Narration for this slide

Welcome to Module 5. By now your tokens carry intent, your DESIGN.md is the contract, and your audits catch drift in the codebase. But there is a second kind of drift we have not touched: the same token living in Figma, on a canvas, and in code, with three slightly different values. This module is about ending that. We will pick one place where token decisions happen, make every other copy a mirror that an agent rebuilds, and — this is the important part — make sure that when a mirror disagrees with the source, someone decides what wins instead of a script silently overwriting it.

Slide 2 of 1316:9

Where tokens live today

Before you can sync anything, write down every place a token value currently exists. Most teams find more copies than they expected.

  • Design tool: Figma variables, colour and text styles, library components
  • Canvas or spec: Paper, Pencil, OpenPencil boards, or a swatch page nobody dates
  • Code: CSS variables, Tailwind theme, token JSON, native platform themes
  • Documentation: the styleguide site, DESIGN.md, onboarding decks
  • The quiet copies: marketing templates, email builders, a spreadsheet from 2024

Every copy that is maintained by hand will drift. The question is not whether, only how long it takes and who notices first.

Slide notes

Walk the list slowly, because the slide is really an inventory exercise in disguise — the module's closing exercise asks participants to do exactly this for their own system. The first three locations are the ones everyone names: the design tool's variables and styles, some kind of canvas or spec surface, and the code targets. The fourth and fifth are the ones that cause the embarrassing incidents: the styleguide site that still shows last year's blue, the pitch deck template with a hex value someone eyedropped in 2024.

Make the mechanism of drift concrete. Nobody decides to let copies diverge. A colour gets tweaked in code during a contrast fix and nobody updates Figma. A designer adjusts a Figma variable for a campaign and assumes engineering will notice. A canvas board is redrawn from memory. Each individual change is small and reasonable; the sum is three sources that all claim authority and a team that resolves the difference by asking whoever has been there longest.

The agent-relevant point: every one of these copies is also something an agent might read. If an agent pulls token values from a stale canvas or an old doc, the drift propagates into new work. Sync is not just hygiene for humans — it protects the quality of everything the agents build on top of the system.

Narration for this slide

Start with an honest inventory. Where do your token values actually live right now? The design tool — Figma variables and styles. A canvas or spec somewhere — Paper, Pencil, OpenPencil, or a swatch page nobody has dated. Code — CSS variables, the Tailwind theme, maybe a token JSON file. Then the documentation: the styleguide site, DESIGN.md, the onboarding deck. And the quiet copies — the marketing template, the email builder, that spreadsheet from 2024. Every copy maintained by hand will drift. And remember, agents read these copies too. A stale mirror does not just confuse people; it feeds wrong values into new work.

Slide 3 of 1316:9

Choosing the source of truth

Pick one. The right answer depends on where token decisions are actually made and reviewed in your team — not on which tool has the nicest UI.

Code-firstDesign-tool-firstCanvas-first
The sourcetokens.json / globals.css in the repoFigma variables and library stylesA connected canvas file (.pen, file-backed project)
Changes arrive asPull requests, reviewed and diffableLibrary edits and version publishesCanvas edits, diffable if file-backed
Agents canRead and write directly, run checks in CIRead well over MCP; writes are newer and gated by authRead and write via CLI or MCP on local files
Strongest whenProduct code is the main consumerBrand and marketing surfaces leadDesign and code already share one repo
Weakest pointDesigners must trust a file they do not editDiffs and review are weaker than gitSmallest ecosystem; tooling still maturing

This course's worked examples are code-first, because the repository already carries review, history, and CI. Your answer can differ — but pick exactly one.

Slide notes

The table is a decision aid, not a verdict. Code-first means the repository's token files are where changes happen, and everything else is generated; it inherits git's review, history, and CI for free, which is why this school's own system and most of the worked examples in this course take that route. Design-tool-first keeps the decisions where many design teams already make them — Figma variables and published libraries — and as of June 2026 the Figma MCP server reads variables well, while writing to the canvas is newer, beta-flagged in places, and gated by authentication and plan level. Canvas-first treats a file-backed canvas like Pencil's .pen files or an OpenPencil project as the source; it is the most agent-native option but the youngest ecosystem.

The row that matters most is changes arrive as. A source of truth is only as good as its review path. Git gives you diffs, approvals, and a history that answers who changed this and why. Figma gives you library versioning, which is real but coarser. A canvas gives you whatever its file format supports — diffable if it is text-backed, opaque if it is not.

Whatever participants choose, the non-negotiable is singularity. Two sources of truth is the same as none: every disagreement becomes an archaeology project. The rest of the module assumes one source has been picked and everything else is a mirror.

Narration for this slide

Now the decision the whole module hangs on: which copy is the source of truth? Code-first means the token files in the repository are where changes happen — you get pull requests, diffs, and CI for free, and that is what this course's examples use. Design-tool-first keeps decisions in Figma variables and published libraries, which suits teams where brand work leads — though agent writes to Figma are newer and gated by authentication. Canvas-first uses a file-backed canvas as the source — the most agent-native option, and the youngest. The honest answer is that any of the three can work. What does not work is two of them. Pick exactly one.

Slide 4 of 1316:9

Sync as an agent run: read, diff, propose, apply

Sync is not a magic background process. It is a reviewable agent run with the same shape as every other run in this course.

  • Read: the source files, then each mirror over MCP, CLI, or its file format
  • Diff: per target, in token terms — names and values, not screenshots
  • Propose: a change list per mirror, with anything ambiguous flagged
  • Apply: only the approved changes, then re-read each target to verify
  • Log: what changed, where, when, and which source version it came from

The diff is the deliverable. An agent that applies changes without showing you the diff first is a liability, not an automation.

Slide notes

Map this onto the loop from the fundamentals course so it feels familiar rather than new: read and diff are the plan phase, propose is the plan presented for review, apply is generation, and the verification re-read plus the log are the critique evidence. The reason to insist on this shape rather than a fire-and-forget script is that token sync touches surfaces owned by different people — a designer's Figma library, an engineer's theme file — and unreviewed writes into someone else's surface is how trust in the whole system gets burned.

The diff per target detail matters. The Figma mirror might be missing two new tokens, the canvas might be one rename behind, and the docs might be perfectly current. A single global is everything in sync answer hides that texture and forces all-or-nothing updates. Per-target diffs let you approve the cheap updates immediately and hold the contentious one.

Also stress the diff in token terms point. The agent should report primary-600 changed from #2f4ec4 to #2454d8 in the source; Figma still has the old value — names and values, the same vocabulary the team uses. Screenshot comparison has its place in visual QA, but for tokens the comparison should happen at the level the decision is made.

Narration for this slide

So what does sync actually look like? Not a background process — an agent run, with the same shape as every run in this course. The agent reads the source, then reads each mirror over MCP or its file format. It diffs, per target, in token terms — names and values, not pictures. It proposes a change list for each mirror and flags anything ambiguous. Only after you approve does it apply, and then it re-reads each target to verify and writes a log entry. The diff is the deliverable. An agent that pushes changes without showing you the diff first is not automation — it is a new way to break things quietly.

Slide 5 of 1316:9

The token sync chain

One source, one agent-run sync, three mirrors, and a gate for disagreements.

Diagram of the token sync chain. A source-of-truth card on the left holds the token files in the repository, human-owned and changed only by reviewed pull request. It feeds an agent sync run that reads the source, reads each mirror over MCP, diffs per target, proposes changes, and applies only what was approved. Three mirror cards on the right — Figma variables, a connected canvas, and built code outputs — each receive an arrow labelled diff and drift check. A divergence gate at the bottom receives direct edits found in a mirror as a report, and adopted edits return to the source as a pull request.
Token decisions happen once, in the source. The agent run carries them outwards with a diff and drift check on every edge. Direct edits found in a mirror come back as a report to the divergence gate, where a human adopts or reverts them — nothing is silently overwritten.

Arrows point outwards from the source. The only thing that travels back is a report — and a pull request once a human has decided.

Slide notes

Walk the diagram left to right. The source card is human territory: the token files in the repository, semantic names, changed only through a reviewed pull request, every change versioned and logged. The agent sync run in the middle is the previous slide drawn as a box: read, diff per target, propose, apply under review. The three mirrors on the right are the usual suspects — Figma variables written over MCP or through a local plugin, a connected canvas whose token boards are rebuilt by script rather than redrawn, and the built code outputs like the Tailwind theme and the token documentation, which CI checks against the source.

Point at the direction of the arrows, because the direction is the policy. Values flow outwards from the source. The only things that flow back are reports: a drift check on each edge that notices when a mirror was edited directly, and the divergence gate at the bottom where a human decides whether that edit becomes a pull request into the source or gets reverted in the mirror.

The gate is the part teams skip and regret. Without it, the sync script either clobbers a designer's deliberate change — and the designer learns to distrust the sync — or it quietly tolerates the difference, and you are back to three sources of truth. Either failure kills the system socially before it fails technically.

Narration for this slide

Here is the whole chain in one picture. On the left, the source of truth: the token files in the repo, owned by humans, changed only by reviewed pull request. In the middle, the agent sync run — read, diff per target, propose, apply under review. On the right, the mirrors: Figma variables, the connected canvas, and the built code outputs, each updated along an edge that carries a diff and a drift check. Notice the direction. Values only flow outwards. The only things that come back are reports — a mirror that was edited directly lands at the divergence gate, where a human decides: adopt it into the source, or revert it. Nothing gets silently overwritten, in either direction.

Slide 6 of 1316:9

MCP connections to Figma and connected canvases

What an agent can actually read and write at each mirror, as of June 2026. Capabilities in this space change quickly — re-verify before you build on them.

TargetRead tokens viaWrite tokens viaWatch for
FigmaRemote MCP server: get_variable_defs, search_design_systemuse_figma write-to-canvas (newer), or a local plugin as fallbackOAuth and plan gating; enterprise allowlists block remote writes
PaperLocal MCP at 127.0.0.1:29979: get_computed_styles, get_jsxwrite_html, update_styles on the open fileDesktop app must be open; long sessions drop the connection
Pencil / OpenPencil.pen and file-backed projects read as text; CLI and MCP packagesCLI eval or MCP writes; boards rebuilt by scriptRenderer font limits; node IDs assigned per session
Code targetsPlain file reads in the repoNormal edits, reviewed as a PRKeep generated outputs clearly marked as generated

Reads are reliable everywhere. Writes are where the differences — and the authentication boundaries — live.

Slide notes

Keep the table at the level of what it means for sync rather than a tool tour. Figma's remote MCP server reads well: get_variable_defs returns the variables and styles used in a selection, and search_design_system can find tokens across libraries. Writing is the newer half — the write-to-canvas tools can create and edit variables and styles, but they sit behind OAuth, plan level, and, in larger organisations, admin allowlists. The field note this module draws on hit exactly that wall: the standalone remote client was rejected at OAuth registration with an HTTP 403 before it could even list tools, while the same server worked fine through an already-authenticated agent. Plan for the authentication boundary to be the weakest link.

Paper runs a local MCP server from its desktop app, which makes reads and writes straightforward when the app is open — get_computed_styles and get_jsx for reading, write_html and update_styles for writing — with the practical caveat that long agent sessions can drop the connection. Pencil and OpenPencil are file-backed: the design file lives in or alongside the repo, so the agent can treat it like any other text artifact and rebuild token boards by script.

The last row is easy to overlook. Code targets that are generated from the source — the Tailwind theme, the docs page — should say so in a header comment, so nobody hand-edits a file the next sync run will regenerate.

Narration for this slide

Here is what the connections actually support, as of June 2026 — and this is a space where you should re-check before building. Figma's MCP server reads variables and styles well; writing to the canvas is newer, and it sits behind OAuth, plan level, and enterprise allowlists — that is where our own runs hit a wall. Paper runs a local MCP server from its desktop app: solid reads and writes while the app is open. Pencil and OpenPencil are file-backed, so the agent treats the design file like any other text in the repo. And the code targets are just files — the easy part. The pattern: reads are reliable everywhere; writes are where the differences live.

Slide 7 of 1316:9

Wiring the chain: one session, several servers

MCP servers can run side by side in one agent session, which is what makes a single sync run across several tools possible.

  • Both servers active in the same session lets one run read Figma and write the canvas, or vice versa
  • File-backed targets need no server at all — the agent edits and rebuilds files in the repo
  • Wrap the whole run in an npm script so it is repeatable and shows up in the project history
Connecting Figma and Paper to Claude Code (as of June 2026)
# Figma — remote MCP server (OAuth sign-in on first use)
claude mcp add --transport http figma https://mcp.figma.com/mcp

# Paper — local MCP server from the desktop app
claude mcp add paper --transport http http://127.0.0.1:29979/mcp

# OpenPencil — file-backed project, CLI pinned in the repo
npm run agentic:sync:once   # rebuild canvas + payload from the source
npm run agentic:sync:status # dated record of the last sync run

The setup is a few commands. The work is deciding what the run is allowed to write, and proving it with a status record.

Slide notes

The commands are deliberately unremarkable: one line to register the Figma remote server, one for Paper's local server, and a pair of npm scripts for the file-backed OpenPencil target. The capability that matters is in the first bullet — multiple MCP servers active in the same agent session. That is what allows a single run to read variable definitions from Figma and write matching boards to a canvas, or read the repo's token files and push values out to both tools, without a human ferrying values between windows.

The npm-script wrapper is a habit worth defending. A sync that only exists as a prompt someone types from memory is not a pipeline; wrapping the build, the push, and a status command in scripts makes the run repeatable, lets CI or a schedule trigger it, and gives you a dated record — this school's repo writes a sync status file precisely so the next run starts from evidence about what worked and what was blocked, instead of from memory.

Date-stamp the claims when you teach this live: endpoints, plugin names, and auth flows in this table have all changed within the last year, and the slide says as of June 2026 for that reason. The structure — register the servers, scope the permissions, script the run — outlives any individual command.

Narration for this slide

The wiring itself is short. One command registers Figma's remote MCP server — it will ask you to sign in the first time. One more registers Paper's local server, which runs whenever the desktop app is open. The file-backed canvas needs no server at all; in our repo it is two npm scripts — one rebuilds the canvas from the source, one prints a dated status record. The detail that makes sync possible is that these servers run side by side in the same session, so one agent run can read from one tool and write to another. The setup is minutes. The real work is deciding what the run may write, and keeping evidence that it did.

Slide 8 of 1316:9

Handling divergence: report and decide

Sooner or later a mirror gets edited directly. That moment decides whether your sync is trusted or routed around.

  • Drift check on every run: compare each mirror to the source before writing anything
  • A direct edit is a report, not an error — it usually encodes a real decision
  • Two outcomes only: adopt it into the source as a PR, or revert it in the mirror
  • Never let the sync script make that call; it cannot know why the edit happened
  • Record the decision in the change log either way

Silent overwrites destroy trust faster than drift does. People forgive a stale mirror; they do not forgive losing work they meant to keep.

Slide notes

This is the cultural core of the module. A designer who adjusts a Figma variable directly is usually not being careless — they hit a contrast problem during a review, or a campaign needed a tone shift, and the canvas was the surface in front of them. If the next sync run wipes that change without a word, the lesson they learn is that the sync is dangerous, and they will quietly stop using the shared variables at all. The drift is annoying; the silent overwrite is corrosive.

So the rule is mechanical: before writing, the run compares each mirror to the source and to the last synced state it recorded. Anything that changed in the mirror since the last run is presented as a report — here is the token, here is the source value, here is the value someone set directly, here is when. The human decision has exactly two outcomes: the edit was right, so it becomes a pull request into the source and flows back out to every mirror on the next run; or the edit should not stand, so it is reverted in the mirror, ideally with a note to whoever made it explaining where the change should have gone.

Keeping the last-synced state is what makes this tractable — without it you can see that two values differ but not which side moved. A small JSON snapshot per target, written at the end of each successful run, is enough. The change log records the decision either way, which keeps the history honest and stops the same argument re-running every quarter.

Narration for this slide

Now the moment that decides whether any of this survives contact with a real team. Sooner or later, someone edits a mirror directly — a Figma variable gets nudged during a review, a canvas swatch gets tweaked for a campaign. That edit usually encodes a real decision. So the sync run never overwrites it silently. It detects the drift, reports it — this token, this source value, this directly edited value — and a human picks one of two outcomes: adopt the edit into the source as a pull request, or revert it in the mirror and tell the person why. Either way, the decision goes in the log. Silent overwrites destroy trust faster than drift ever will.

Slide 9 of 1316:9

Versioning and change logs for token updates

Token changes are small, frequent, and consequential. They deserve the same paper trail as any other change to the system.

  • Every source change lands as a PR with a diff someone approved
  • A dated change log entry: what changed, why, and which surfaces it touches
  • A version marker on the token set, so mirrors and audits can say what they were built from
  • Sync runs record source version, targets touched, and anything skipped or blocked
  • Breaking changes — renames and removals — get called out, with the migration path

When a mirror looks wrong, the first question is which version is it on. A change log turns that from an argument into a lookup.

Slide notes

Versioning sounds like ceremony until the first time two surfaces disagree and nobody can say which one is current. The minimum viable paper trail is small: token changes arrive as pull requests, so there is a diff and an approval; a change log gets a dated entry saying what changed and why; and the token set carries a version marker — a number, a date, or simply the commit hash — that mirrors and audit reports can reference. With that in place, a stale mirror is a fact you can establish in seconds rather than a debate.

The sync run itself contributes to the trail. Each run should record which source version it pushed, which targets it touched, and what it skipped or could not reach — the blocked Figma write in this module's worked example is recorded exactly that way, as a dated status entry rather than a vague memory that the push did not work. That record is also what makes the divergence check from the previous slide possible.

Distinguish value changes from breaking changes. Adjusting the value behind an existing semantic name is cheap and flows through sync automatically. Renaming or removing a token breaks every consumer that references it — in code, on the canvas, and in any agent instruction that mentions the old name — so those changes get called out in the log with a migration note, and they are a good candidate for the agent-assisted migration workflow rather than a quiet find-and-replace.

Narration for this slide

Token changes are small and frequent, which is exactly why they need a paper trail. Every change to the source lands as a pull request, so there is a diff and an approval. The change log gets a dated entry: what changed, why, which surfaces it touches. The token set carries a version marker, so any mirror or audit can say what it was built from. And every sync run records what it pushed, what it touched, and what it could not reach. Then, when a mirror looks wrong, the first question — which version is this on — has an answer you can look up. One more distinction: changing a value is cheap. Renaming or removing a token is a breaking change, and the log should say so, with the migration path.

Slide 10 of 1316:9

Worked example: one colour change, three targets

From this school's own repository, June 2026: a semantic colour token changed in the source and propagated outwards — including the part that did not work.

TargetHow the change arrivedWhat happened
Code (source)PR editing the semantic colour in globals.cssReviewed, merged, change log updated — the only place a human typed a value
OpenPencil canvasnpm run agentic:sync — watch loop rebuilds the token board and affected screensFoundations board and page snapshots regenerated; no manual canvas edits
Figma fileGenerated payload pushed over remote MCP, with a local plugin as fallbackRemote push blocked at OAuth (HTTP 403); local plugin import refreshed the frames
Docs / themeBuilt outputs regenerated from the same sourceCI check confirms built values match the source

One human decision, one typed value. Everything downstream was a rebuild — and the one blocked path failed loudly, with a dated record, instead of pretending it synced.

Slide notes

This run is documented in two of the school's field notes — the OpenPencil sync experiment and the Figma MCP push — and the numbers and failure are from those notes, not a hypothetical. The source is code-first: the semantic colour lives in globals.css, and the change was an ordinary pull request. Everything after that point is generation. The repository's sync loop watches DESIGN.md, the app and component folders, and the token files; on change it rebuilds a machine-readable design-system inventory and regenerates the OpenPencil canvas from it — the foundations board with the colour tokens, and full-length snapshots of the affected pages. Nobody redrew anything.

The Figma leg is the honest part. The same inventory feeds a Figma-shaped payload — frames, token hierarchy, component variants, sliced page snapshots. The elegant path, pushing it through the remote Figma MCP server with a standalone client, was rejected at the authentication boundary: HTTP 403 during OAuth client registration, connection closed before tools were even listed. The status file records that as blocked, with the date. The fallback that shipped is a local Figma development plugin that reads the generated payload and writes the frames directly inside the file — boring, reliable, and entirely offline from the remote endpoint.

Two lessons to draw out. First, sync is mostly a payload problem: once the inventory existed as JSON, retargeting from OpenPencil to Figma was a renderer change, not a rethink. Second, the failure was valuable because it was recorded — the next attempt starts from evidence, not memory. That is the difference between a sync pipeline and a demo.

Narration for this slide

Let's trace a real run from this school's own repository. The change: one semantic colour, edited in globals.css, through an ordinary pull request — the only place a human typed a value. From there, the watch loop rebuilt the design-system inventory and regenerated the OpenPencil canvas: the token board and the affected page snapshots, no manual edits. The same inventory produced a Figma payload. The remote MCP push failed — blocked at OAuth with a 403 — and the status file records that, dated. The fallback, a local Figma plugin reading the same payload, refreshed the frames. And the built docs and theme were checked against the source in CI. One decision, one typed value, and a failure that was reported instead of hidden. That is the pipeline working.

Slide 11 of 1316:9

Where the chain breaks

The failure modes are predictable enough to plan for before the first run.

  • The authentication boundary: OAuth, plan gating, and enterprise allowlists block remote writes more often than the API does — keep a local writer as the fallback
  • Fidelity gaps in tool bridges: SVG fills arriving as images, spacer elements dropped, large nested files erroring
  • Connection drops in long agent sessions; restart the session, do not fight it
  • Two sources of truth re-emerging because one team kept editing their mirror
  • Sync theatre: runs that report success without a drift check or a status record anyone reads

Most of these are not model problems. They are boundary problems — authentication, file formats, and habits — and they respond to boring engineering, not better prompts.

Slide notes

The authentication boundary deserves the most airtime because it is the one teams cannot prompt their way around. Remote design-tool MCP servers sit behind OAuth flows, seat types, plan levels, and — in larger organisations — admin allowlists for third-party clients. The worked example's 403 is typical, not exceptional. The mitigation is architectural: keep a local write path that does not depend on the remote endpoint at all — a development plugin, a file import, a CLI against a file-backed canvas — and treat the remote path as an optimisation you adopt when it works.

The fidelity gaps are smaller but real: bridges between tools translate imperfectly, so SVG fills can arrive as rasterised images, spacer elements get ignored, and very large or deeply nested files can error outright. Scope sync to the token and component boards rather than trying to mirror an entire design file, and the problem mostly disappears. Connection drops in long-running sessions are an annoyance with a known fix — restart the session — and not worth engineering around.

The last two are organisational. A second source of truth re-emerges whenever one group's mirror is easier to edit than the source is; the fix is usually to make the source's change path lighter, not to police the mirror harder. And sync theatre — runs that always report green because nothing checks for drift and nobody reads the status file — is the same disease as gate theatre in the previous module. A sync you do not verify is a rumour.

Narration for this slide

Be ready for where this breaks, because the failure modes repeat. The big one is the authentication boundary: OAuth, plan gating, enterprise allowlists. The remote write path will be blocked more often than the API itself fails — so keep a local writer, a plugin or a CLI, as the boring fallback. Then the fidelity gaps: tool bridges drop spacers, turn vectors into images, choke on huge files — scope the sync to token and component boards. Long sessions drop connections; just restart. And watch the human failures: a second source of truth creeping back because someone's mirror is easier to edit, and sync theatre — runs that always say green because nothing actually checks for drift.

Slide 12 of 1316:9

Exercise: map every place your tokens live

One page, thirty minutes, no agent required. This map is the input to your first real sync run.

  • List every location a token value exists: tools, canvases, code, docs, and the quiet copies
  • For each: who edits it, how changes are reviewed, and when it was last verified against the others
  • Pick three tokens — one colour, one spacing, one type size — and check their value in every location
  • Nominate your source of truth and write one sentence justifying it for your team
  • Mark each remaining copy: mirror to be synced, or copy to be retired

Most teams find at least one value that differs across copies. That finding — with the locations attached — is your case for building the sync.

Slide notes

Keep the exercise deliberately manual. The temptation is to point an agent at the problem immediately, but the map of where tokens live is mostly organisational knowledge — which team edits the Figma library, whether the marketing templates are anyone's job, whether the canvas is even current — and that knowledge is faster to write down than to rediscover by tooling. The agent earns its keep on the next step, the recurring sync, not on the first inventory.

The three-token spot check is the part that converts this from a tidy diagram into a finding. Checking one colour, one spacing value, and one type size across every location takes a few minutes and almost always surfaces at least one disagreement — and a concrete disagreement, with file paths and screenshots, is far more persuasive inside a team than a general argument that drift probably exists.

The nomination question is the one to push on if you run this live. The justification sentence should be about where decisions and review actually happen — not about which tool people like. A team whose engineers never open Figma and whose designers never open the repo has a genuinely hard call to make here, and surfacing that tension now is cheaper than discovering it after the sync is built. The retire column matters too: every copy you can delete is a copy you never have to sync.

Narration for this slide

Your exercise for this module: make the map. List every place a token value exists for your product — the design tool, any canvases, the code, the docs, and the quiet copies like marketing templates. For each one, note who edits it and how changes get reviewed. Then pick three tokens — one colour, one spacing value, one type size — and check their actual value in every location. Most teams find at least one disagreement, and that finding is your business case. Finish by nominating your source of truth, in one sentence, and marking every other copy as either a mirror to sync or a copy to retire. Bring the map to the next module — it becomes part of your maintenance loop.

Slide 13 of 1316:9

Summary, and what comes next

  • Tokens live in more places than anyone admits, and every hand-maintained copy drifts
  • Pick exactly one source of truth — judged by where decisions are reviewed, not by tool preference
  • Sync is an agent run: read, diff per target, propose, apply under review, log
  • MCP and file-backed canvases carry the values outwards; authentication is the weakest link, so keep a local fallback
  • Divergence is reported and decided — adopt or revert — never silently overwritten

Module 6 puts this sync on a schedule alongside the audits and documentation: a system that proposes its own maintenance, with humans approving the changes.

Slide notes

Recap by connecting the slides into one sentence: choose where token decisions happen, make every other copy a generated mirror, run the sync as a reviewable agent run with a drift check on every edge, and route disagreements to a human decision that gets logged. The worked example showed all of it, including the blocked Figma write — keep pointing at that, because the willingness to record a failure honestly is a better predictor of a sync pipeline surviving than any individual tool choice.

Bridge to Module 6 by zooming out. This module built one recurring run; the audits in Module 4 built another; the documentation generation mentioned throughout is a third. The final module assembles them into a standing maintenance loop — scheduled runs, proposed fixes arriving as reviewable changes, a small human rotation that approves rather than produces — and is honest about what still needs people: deprecations, taste shifts, and the breaking changes this module flagged in the change-log slide.

If participants did the mapping exercise, ask them to keep the page. Module 6's exercise — drafting the maintenance loop on one page — uses that map as its starting input, the same way Module 4's audit findings feed the fix queue.

Narration for this slide

Let's close. Tokens live in more places than anyone admits, and every copy maintained by hand drifts. So you pick one source of truth — judged by where decisions actually get reviewed — and make everything else a mirror. Sync runs as an agent task: read, diff per target, propose, apply under review, and log it. MCP and file-backed canvases carry the values outwards, the authentication boundary is the weakest link, and a local fallback keeps you shipping. And when a mirror disagrees, a human decides — adopt or revert — never a silent overwrite. In Module 6 we put this on a schedule, next to the audits and the documentation, and look at what a system that maintains itself actually needs from the people who run it. See you there.

Module transcript
Module 5, narrated slide by slide

Slide 1Token Sync Across Tools

Welcome to Module 5. By now your tokens carry intent, your DESIGN.md is the contract, and your audits catch drift in the codebase. But there is a second kind of drift we have not touched: the same token living in Figma, on a canvas, and in code, with three slightly different values. This module is about ending that. We will pick one place where token decisions happen, make every other copy a mirror that an agent rebuilds, and — this is the important part — make sure that when a mirror disagrees with the source, someone decides what wins instead of a script silently overwriting it.

Slide 2Where tokens live today

Start with an honest inventory. Where do your token values actually live right now? The design tool — Figma variables and styles. A canvas or spec somewhere — Paper, Pencil, OpenPencil, or a swatch page nobody has dated. Code — CSS variables, the Tailwind theme, maybe a token JSON file. Then the documentation: the styleguide site, DESIGN.md, the onboarding deck. And the quiet copies — the marketing template, the email builder, that spreadsheet from 2024. Every copy maintained by hand will drift. And remember, agents read these copies too. A stale mirror does not just confuse people; it feeds wrong values into new work.

Slide 3Choosing the source of truth

Now the decision the whole module hangs on: which copy is the source of truth? Code-first means the token files in the repository are where changes happen — you get pull requests, diffs, and CI for free, and that is what this course's examples use. Design-tool-first keeps decisions in Figma variables and published libraries, which suits teams where brand work leads — though agent writes to Figma are newer and gated by authentication. Canvas-first uses a file-backed canvas as the source — the most agent-native option, and the youngest. The honest answer is that any of the three can work. What does not work is two of them. Pick exactly one.

Slide 4Sync as an agent run: read, diff, propose, apply

So what does sync actually look like? Not a background process — an agent run, with the same shape as every run in this course. The agent reads the source, then reads each mirror over MCP or its file format. It diffs, per target, in token terms — names and values, not pictures. It proposes a change list for each mirror and flags anything ambiguous. Only after you approve does it apply, and then it re-reads each target to verify and writes a log entry. The diff is the deliverable. An agent that pushes changes without showing you the diff first is not automation — it is a new way to break things quietly.

Slide 5The token sync chain

Here is the whole chain in one picture. On the left, the source of truth: the token files in the repo, owned by humans, changed only by reviewed pull request. In the middle, the agent sync run — read, diff per target, propose, apply under review. On the right, the mirrors: Figma variables, the connected canvas, and the built code outputs, each updated along an edge that carries a diff and a drift check. Notice the direction. Values only flow outwards. The only things that come back are reports — a mirror that was edited directly lands at the divergence gate, where a human decides: adopt it into the source, or revert it. Nothing gets silently overwritten, in either direction.

Slide 6MCP connections to Figma and connected canvases

Here is what the connections actually support, as of June 2026 — and this is a space where you should re-check before building. Figma's MCP server reads variables and styles well; writing to the canvas is newer, and it sits behind OAuth, plan level, and enterprise allowlists — that is where our own runs hit a wall. Paper runs a local MCP server from its desktop app: solid reads and writes while the app is open. Pencil and OpenPencil are file-backed, so the agent treats the design file like any other text in the repo. And the code targets are just files — the easy part. The pattern: reads are reliable everywhere; writes are where the differences live.

Slide 7Wiring the chain: one session, several servers

The wiring itself is short. One command registers Figma's remote MCP server — it will ask you to sign in the first time. One more registers Paper's local server, which runs whenever the desktop app is open. The file-backed canvas needs no server at all; in our repo it is two npm scripts — one rebuilds the canvas from the source, one prints a dated status record. The detail that makes sync possible is that these servers run side by side in the same session, so one agent run can read from one tool and write to another. The setup is minutes. The real work is deciding what the run may write, and keeping evidence that it did.

Slide 8Handling divergence: report and decide

Now the moment that decides whether any of this survives contact with a real team. Sooner or later, someone edits a mirror directly — a Figma variable gets nudged during a review, a canvas swatch gets tweaked for a campaign. That edit usually encodes a real decision. So the sync run never overwrites it silently. It detects the drift, reports it — this token, this source value, this directly edited value — and a human picks one of two outcomes: adopt the edit into the source as a pull request, or revert it in the mirror and tell the person why. Either way, the decision goes in the log. Silent overwrites destroy trust faster than drift ever will.

Slide 9Versioning and change logs for token updates

Token changes are small and frequent, which is exactly why they need a paper trail. Every change to the source lands as a pull request, so there is a diff and an approval. The change log gets a dated entry: what changed, why, which surfaces it touches. The token set carries a version marker, so any mirror or audit can say what it was built from. And every sync run records what it pushed, what it touched, and what it could not reach. Then, when a mirror looks wrong, the first question — which version is this on — has an answer you can look up. One more distinction: changing a value is cheap. Renaming or removing a token is a breaking change, and the log should say so, with the migration path.

Slide 10Worked example: one colour change, three targets

Let's trace a real run from this school's own repository. The change: one semantic colour, edited in globals.css, through an ordinary pull request — the only place a human typed a value. From there, the watch loop rebuilt the design-system inventory and regenerated the OpenPencil canvas: the token board and the affected page snapshots, no manual edits. The same inventory produced a Figma payload. The remote MCP push failed — blocked at OAuth with a 403 — and the status file records that, dated. The fallback, a local Figma plugin reading the same payload, refreshed the frames. And the built docs and theme were checked against the source in CI. One decision, one typed value, and a failure that was reported instead of hidden. That is the pipeline working.

Slide 11Where the chain breaks

Be ready for where this breaks, because the failure modes repeat. The big one is the authentication boundary: OAuth, plan gating, enterprise allowlists. The remote write path will be blocked more often than the API itself fails — so keep a local writer, a plugin or a CLI, as the boring fallback. Then the fidelity gaps: tool bridges drop spacers, turn vectors into images, choke on huge files — scope the sync to token and component boards. Long sessions drop connections; just restart. And watch the human failures: a second source of truth creeping back because someone's mirror is easier to edit, and sync theatre — runs that always say green because nothing actually checks for drift.

Slide 12Exercise: map every place your tokens live

Your exercise for this module: make the map. List every place a token value exists for your product — the design tool, any canvases, the code, the docs, and the quiet copies like marketing templates. For each one, note who edits it and how changes get reviewed. Then pick three tokens — one colour, one spacing value, one type size — and check their actual value in every location. Most teams find at least one disagreement, and that finding is your business case. Finish by nominating your source of truth, in one sentence, and marking every other copy as either a mirror to sync or a copy to retire. Bring the map to the next module — it becomes part of your maintenance loop.

Slide 13Summary, and what comes next

Let's close. Tokens live in more places than anyone admits, and every copy maintained by hand drifts. So you pick one source of truth — judged by where decisions actually get reviewed — and make everything else a mirror. Sync runs as an agent task: read, diff per target, propose, apply under review, and log it. MCP and file-backed canvases carry the values outwards, the authentication boundary is the weakest link, and a local fallback keeps you shipping. And when a mirror disagrees, a human decides — adopt or revert — never a silent overwrite. In Module 6 we put this on a schedule, next to the audits and the documentation, and look at what a system that maintains itself actually needs from the people who run it. See you there.