# vercel-labs/ui — AlpLab Radar Static Code Audit

- Ring: `trial`
- Category: `media`
- Overall score: `3.7/5`
- Implementation check: `verified`
- Maturity: `early`
- Audited commit: `2f1b22c8a982` (read-only; nothing from the repository was executed)
- Reviewed at: 2026-11-30T12:43:25Z
- Repository: https://github.com/vercel-labs/ui
- Radar entry: https://radar.alplab.co/#repo/vercel-labs/ui
- License: `Apache-2.0`
- CI workflows: `.github/workflows`
- Tags: `headless-ui`, `accessibility`, `agent-tools`, `react`, `web-components`, `design-system`

## Summary

Headless UI behavior library (@ui-sdk/core: keyboard, focus, selection, popups, drag-and-drop, ARIA) with adapters for React, Vue, Svelte, Solid and web components, plus an agent bridge (snapshot/query/act) that lets AI agents drive the rendered UI.

## Implementation Check

Code backs the README: definePrimitive is fully implemented (packages/core/src/foundation/kernel/primitive.ts, exported from packages/core/src/index.ts), createParts exists in all five adapters (e.g. packages/web/src/index.ts), and the agent bridge is a real ~85KB implementation (packages/core/src/page/agent/agent.ts) with ~60 component entry points in packages/core/package.json — no scaffolding found.

## When to Use

Reach for it when building custom or agent-generated interfaces that need tested keyboard/focus/ARIA behavior identically across five frameworks; not yet for stable production bets (beta, explicit API-change terms).

## Sub-scores

| Dimension | Score |
|---|---|
| quality | 4.0/5 |
| usability | 3.5/5 |
| reliability | 3.0/5 |
| security | 4.0/5 |
| integration | 4.0/5 |

## Code Evidence

Kernel is a complete, documented implementation: definePrimitive with controlled-state sync, asleep/lazy wake, lifecycle and dev warnings (packages/core/src/foundation/kernel/primitive.ts). Agent bridge gates every step through allow/confirm callbacks, redacts data-agent-secret fields and honors data-agent-hidden/off-limits marks (packages/core/src/page/agent/agent.ts, packages/core/src/page/observe/marks). Zero runtime dependencies in packages/core/package.json as AGENTS.md claims. CI (.github/workflows/ci.yml) runs lint/typecheck/unit vitest, packed-package checks, bundle-size budgets, and tiered Playwright suites (affected specs per PR, Chromium shards, WebKit/Firefox nightly, full weekly) across five framework projects; large spec tree under tests/ and docs specs (~950 tests per ci.yml comment).

## Issues Found

apps/docs/proxy.ts serves versioned @ui-sdk/web builds with Access-Control-Allow-Origin: * — public static assets only, low risk but worth knowing. Dev-only instrumentation emits instance/change events behind #dev (packages/core/src/foundation/kernel/primitive.ts) — production builds stub it out, verified via the #dev import map in packages/core/package.json. No eval, no telemetry, no network calls in shipped packages (fetch/child_process appear only in scripts, docs site, playground and tests).

## Key Risks

Beta (0.1.0-beta.16, changesets in pre mode, Vercel beta terms) — API churn is expected and documented. Young: created 2026-10-26, 4 contributors, ~87% of recent commits by one author. Nothing was executed in this review: test breadth is judged from config and spec files, not passing runs; the full suite only runs weekly. The unstyled/behavior-first model has a real learning curve despite the shipped ui-sdk skill and Markdown docs.

## Reviewed Files

- `README.md`
- `package.json`
- `AGENTS.md`
- `contributing/README.md`
- `.github/workflows/ci.yml`
- `packages/core/package.json`
- `packages/core/src/index.ts`
- `packages/core/src/foundation/kernel/primitive.ts`
- `packages/core/src/page/agent/agent.ts`
- `packages/core/src/web.css`
- `packages/web/package.json`
- `packages/web/src/index.ts`
- `packages/react/README.md`
- `apps/docs/proxy.ts`
