Skip to main content
Independent · Primer React · 2026engineering

Making agent work reviewable

Agent Review Desk: an independent prototype built with Primer React. Inspect the work, understand the next action, and keep permission decisions explicit.

Roles
Interaction design · Front-end engineering
Year
2026
Primer ReactAgent UXTypeScript
Tools
  • Primer React
  • TypeScript
  • Figma
Making agent work reviewable
The problem
Make an agent’s work and permission boundaries inspectable before a reviewer acts.
My contribution
Independent interaction design, Primer React implementation, and a deterministic state model.
A key decision
Separate evidence inspection, permission decisions, and human review. A successful check never automatically approves work.

Current evidence: Working review and permission flow using simulated data. Independent exploration; not a GitHub product or commission.

From a system study to a working interaction

Agent Review Desk is an independent prototype built with Primer React. It explores one review task: understand the work an agent prepared, inspect evidence, and decide whether it can take a bounded next action. All repository activity, patches, and check results are simulated.

Try Agent Review Desk
A captioned walkthrough of the simulated review, permission, and recovery flow. No repository is connected.
Read the walkthrough transcript

The interaction problem

A status such as “working” or “done” compresses several different questions. What changed? What actually passed? What is still blocked? What needs a human decision? I separated those questions into a persistent activity timeline, inspectable evidence, a permission request, and an explicit human-review step.

A narrow permission decision

The sample agent requests read-only package metadata from one registry for one check attempt. The interface states the destination, access, duration, and excluded actions. Denial stops the check while preserving the proposed patch. A timeout expires the permission. Retrying asks for a fresh decision. Passing a check leads to ready for review, never automatic approval.

A successful check does not approve work
case 'review':
  if (state.status !== 'waiting-review' || state.checks !== 'passed') {
    return state;
  }
  return { ...state, status: 'completed' };

What I kept and what I left out

  1. Visible events instead of hidden reasoning

    The timeline shows actions and evidence that a reviewer can inspect. It does not pretend to expose a model’s private reasoning.

  2. One complete workflow before integrations

    A deterministic simulation makes denial, cancellation, failure, retry, and human review easy to explore. Authentication and repository integration would add operational scope without answering this interaction question.

  3. State belongs in a tested model

    A reducer controls valid transitions. The UI cannot mark work reviewed before checks pass, and expired permission cannot silently authorize another check.

  4. Focus stays part of the interaction

    Explicit actions move focus to a stable status heading. Background progress announces status without moving focus. The proposed patch remains available after a failure.

Using Primer and its MCP server

I used Primer React buttons, labels, selects, the theme provider, and Primer primitives. The local @primer/mcp server supplied component APIs, button accessibility guidance, semantic token guidance, and the Delegate pattern. The implementation uses the current CSS-based theme provider rather than the deprecated provider.

One useful correction: my initial multiword token query returned no results. The server explained its AND matching. I narrowed the query by semantic group and intent, then checked the suggested variables against the installed primitives. Tool guidance was an input to the work; local types and browser behavior remained checks on the result.

The MCP CSS lint response returned an error summary without actionable details. I did not treat it as a pass. A local check verifies the 33 referenced variables against the installed Primer primitives; browser checks cover the rendered behavior and contrast. These are separate checks with separate limits.

Validation and remaining questions

The quality report records the automated and browser checks for this prototype; they cover the implemented flow. The next step is a developer evaluation: ask reviewers to identify the change, explain the requested permission, and recover from a failure. Evidence scope: a tested interaction model, not a user study.

Read verification scopeInspect the state model

Earlier exploration: reconstructing Primer in Figma

The Figma reconstruction below is the earlier study that informed this prototype.

Understanding and reconstructing GitHub's design system

I reverse-engineered GitHub's Primer design system to learn how a mature one is actually built. Working in three phases — interface inventory, foundations, and component architecture — I rebuilt key parts in Figma, using local variables to wire tokens, states, and themes together. The point was to see, firsthand, how Primer holds up across contexts and color modes.

Why I studied Primer

I like how Primer looks and how it behaves, and I wanted to learn from a real production system instead of theorizing about one. Rebuilding it in Figma was the most direct way to study how decisions, tokens, and reuse get structured at that scale. It also forced me to get sharper at Figma variables for dark/light, states, and variants.

System thinking

Get clearer on how themes, tokens, and accessibility actually relate to each other

Atomic design at scale

See how atomic design holds up when applied to a real production library, not a tutorial example

Figma variables

Use variables and logic inside Figma to handle dark/light modes, states, and variants in one place

Library quality

Build an artifact that shows how a component library supports code quality and product UX together

Study decisions

  1. Primer over Material or Polaris

    Material is designed to be adopted; Primer is designed to run GitHub. I wanted the system that has to survive one dense, data-heavy product — tables, states, themes — because that's the kind of product I build.

  2. Rebuild in Figma, not code

    In code I would have leaned on existing CSS and learned less. Reconstructing tokens and variants from scratch in Figma variables forced me to recover the reasoning, not just the output.

  3. Tables as the graduation exercise

    Buttons teach you variants; tables teach you inheritance, density, and where a system starts to fork. If a component library survives GitHub's tables, the architecture is real.

The failure mode the rebuild made tangible: skip the semantic alias layer between raw values and components, and dark mode means touching every component by hand. Primer's token layers exist to prevent exactly that — a lesson I later applied to my own token architecture.

Interface inventory

Mapping the system's foundation

I started with a UI audit across GitHub's product, pulling out the core elements — buttons, links, inputs, nav — and documenting how each one looks, how its states change, and how it shifts between themes. The audit gave me a baseline of what was actually in the system before I tried to rebuild any of it.

Foundations

Before rebuilding components I mapped the underlying tokens: color, spacing, typography, and the relationships between them that power light/dark switching.

Atoms

Reconstructing GitHub's basic elements

I rebuilt the basics first: buttons, links, and inputs. For each one, I worked through every property, variation, and theme combination (light and dark). The lever that made it scale was Figma local variables — wiring component properties to variables meant a single change at the token layer cascaded through every state and theme, instead of needing to be re-applied to each variant by hand.

Buttons

All primary, secondary, and invisible button variants recreated with semantic controls for icon toggles and modes.

GitHub's button system: all variants reconstructed

Inputs

Built adaptive text inputs with full state coverage (rest, hover, disabled, error) and token-based layout.

Links

Captured usage across interactions and modes, and tokenized typography and color handling for scale.

Molecules

Bringing logic into reusable component sets

Working up from the atoms, I built molecular components — icon buttons, nav items — that combine multiple atoms with their own behavioral logic. The toggles for these live in Figma's right-hand panel, so a designer can switch a state without digging into the component itself.

Icon buttons

Navigation components

Organisms

Data-rich, flexible components with inherited logic

To go beyond surface-level components, I rebuilt GitHub's tables — probably the most complex UI in the product. Labels, icons, and status tags became repeatable patterns inside a single table component, with style tokens cascading from the top so the same table works across many different contexts without forking it.

Table component overview

Page templates

Assembling real-world UI from system components

To check that the system actually held together, I rebuilt a full section of GitHub's UI using only the components I'd made. That's the test that catches the gaps — what nests inside what, how layout flexes, where assumptions break down. It's also where the value of a real system shows up: less time on layout, more on the parts that matter.

Page template assembly: validating the component system with real GitHub UI

What I gained

This wasn't just a practice exercise. Pulling a production-grade system apart and putting it back together changed how I think about systems work — sharper instincts on token structure, more confidence in Figma variables, and a clearer sense of what holds up when a design system has to survive real use.

GitHub's Primer design system
Other work

Explore more case studies