Slide 1 — Token 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 2 — Where 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 3 — Choosing 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 4 — Sync 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 5 — The 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 6 — MCP 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 7 — Wiring 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 8 — Handling 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 9 — Versioning 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 10 — Worked 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 11 — Where 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 12 — Exercise: 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 13 — Summary, 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.