DOMGLYPH
UI that speaks to humans and machines — every component is a machine-readable contract.
ABOUT
AI agents, browser automation, and end-to-end test suites currently interact with web UIs through guesswork: matching by visible text, CSS class names, XPath, or visual position. Those signals break the moment a developer renames a class, restructures a layout, or tweaks copy — and the resulting failures compound across LLM copilots, Playwright tests, and RPA pipelines. DOMglyph removes that guesswork by treating the UI itself as a contract. Every component renders normally for users *and* publishes a stable semantic layer through `data-ai-*` attributes (`data-ai-id`, `data-ai-role`, `data-ai-action`, `data-ai-state`, `data-ai-screen`, `data-ai-section`, `data-ai-entity`, `data-ai-entity-id`). A companion runtime (`window.__DOMGLYPH__`) exposes `getScreenContext()`, `getAvailableActions()`, `getFormSchema()`, and `getRecentEvents()` so any agent can introspect the page and trigger actions deterministically — without parsing HTML or training on a specific DOM. This replaces fragile selectors, ad-hoc test IDs, and bespoke scraping layers with a typed, queryable interface. Frontend developers, UI engineers, and design-system builders shipping products that embed AI copilots, LLM-driven workflows, or large automated test suites get a single React + TypeScript library (ActionButton, FormField, Input, DataTable, Modal, etc.) where accessibility, styling, and machine-legibility are first-class from day one.
npm install @domglyph/components @domglyph/ai-contract @domglyph/runtime