UI to Code

UI to Code lets you click any element in the browser, describe a change in plain English, and have your coding agent implement it. Domscribe captures the element's source location, runtime context, and your instruction, then hands it to the agent via MCP.

UI to Code — click an element, describe a change, and the agent edits the right file

How It Works

  1. Pick an element. Open the Domscribe overlay in the browser and activate the element picker (capturing mode). Click any element on the page.
  2. Describe the change. Type a plain-English instruction in the overlay panel. For example: "Make this button blue and add a loading spinner."
  3. Submit. Domscribe captures the element's source location (file, line, column, component name), its live runtime context (props, state, DOM snapshot), and your instruction. This is saved as an annotation in .domscribe/annotations/.
  4. Agent claims it. Your coding agent calls domscribe.annotation.process via MCP, which atomically claims the next queued annotation. This prevents concurrent agent conflicts.
  5. Agent implements. Using the source location, the agent navigates to the exact file and line. Using the runtime context, it understands the current state of the component. Using your instruction, it knows what to change.
  6. Real-time feedback. The agent calls domscribe.annotation.respond to attach its response. The relay pushes this to the browser overlay via WebSocket, so you see the agent's progress in real time.

Annotation Lifecycle

Each annotation moves through a defined set of statuses:

StatusDescription
QUEUEDCreated by the overlay, waiting for an agent to claim it
PROCESSINGAn agent has claimed it via domscribe.annotation.process
PROCESSEDThe agent has finished and attached a response via domscribe.annotation.respond
ARCHIVEDThe annotation has been archived (manually or automatically)
FAILEDThe agent encountered an error while processing

Annotations are stored as JSON files in status-specific subdirectories under .domscribe/annotations/ (e.g., .domscribe/annotations/queued/, .domscribe/annotations/processing/). When an annotation's status changes, the file is moved to the corresponding directory.

MCP Tools for Annotations

ToolDescription
domscribe.annotation.processAtomically claim the next queued annotation (prevents concurrent conflicts)
domscribe.annotation.respondAttach agent response and transition to PROCESSED
domscribe.annotation.updateStatusManually transition annotation status
domscribe.annotation.getRetrieve an annotation by ID
domscribe.annotation.listList annotations with status/filter options
domscribe.annotation.searchFull-text search across annotation content

Tips

Related