ai-ui
CLI Tool

AI-UI. Design diagnostics for SPAs.

Crawls your running app, reads your docs, and tells you exactly which features have no discoverable UI — and which UI surfaces aren't documented. Deterministic core, optional local AI for semantic matching and patch generation.

Install

npm install -g @mcptoolshop/ai-ui

Run

ai-ui atlas # parse docs → feature catalog ai-ui probe # crawl UI → trigger graph ai-ui diff # match features ↔ triggers

AI pipeline

ai-ui ai-suggest # semantic matching (Ollama) ai-ui ai-eyes # visual surface enrichment ai-ui ai-hands # PR-ready patches

How it works

Docs promise features. UI exposes triggers. AI-UI measures the gap — then helps you close it.

Atlas

Parses your README, CHANGELOG, and docs into a structured feature catalog. Every claim your docs make becomes a testable assertion.

Probe

Playwright-powered black-box crawl of your running app. Records every interactive trigger — buttons, links, inputs, dialogs — across all configured routes.

Diff Engine

Fuzzy-matches documented features against discovered triggers. Produces coverage percentage, burial index, and actionable verdicts: promote, keep, demote, merge.

Design Map

Generates surface inventory, feature discoverability scores, inferred task flows with loop detection, and a complete IA proposal for your app.

Goal Rules

Configurable effect predicates for SPAs where URLs don't change. Define success as storage writes, DOM mutations, or fetch calls — scored and named.

AI Pipeline

Optional local Ollama commands: Brain (semantic matching), Eyes (visual surface enrichment), Hands (PR-ready patch generation with edit ranking). No data leaves your machine.

Usage

Basic pipeline

# Parse docs into feature catalog
ai-ui atlas

# Crawl UI and record triggers
ai-ui probe

# Match features to triggers
ai-ui diff

# Build graph and generate design map
ai-ui graph
ai-ui design-map

AI-powered matching

# Semantic matching — closes gaps fuzzy
# matching misses
ai-ui ai-suggest

# Visual enrichment — icon-only buttons
ai-ui ai-eyes

# PR-ready patches with trust ranking
ai-ui ai-hands --min-rank 0.50

Runtime evidence

# Click triggers, capture side effects
ai-ui runtime-effects

# Rebuild graph with runtime data
ai-ui graph --with-runtime

# Design map now evaluates goal rules
ai-ui design-map

CI integration

# Run full pipeline + verify
ai-ui stage0
ai-ui graph
ai-ui verify --strict --gate minimum \
  --min-coverage 60

# Exit: 0=pass, 1=user, 2=runtime

Commands

Command
Description
`atlas`
Parse docs into a feature catalog
`probe`
Crawl running UI, record every trigger
`surfaces`
Extract surfaces from WebSketch capture
`diff`
Match atlas features against probe triggers
`graph`
Build trigger graph from probe + surfaces + diff
`design-map`
Surface inventory, feature map, task flows, IA proposal
`compose`
Generate surfacing plan from diff + graph
`verify`
Pass/fail verdict for CI pipelines
`baseline`
Save/compare verification baselines
`pr-comment`
PR-ready markdown from artifacts
`runtime-effects`
Click triggers, capture observed side effects
`runtime-coverage`
Per-trigger coverage matrix
`replay-pack`
Bundle artifacts into replay snapshot
`replay-diff`
Compare two replay packs
`ai-suggest`
Semantic feature→trigger matching via Ollama
`ai-eyes`
Visual surface enrichment via LLaVA
`ai-hands`
PR-ready patches via qwen2.5-coder with edit ranking
`stage0`
Run atlas + probe + diff in sequence
`init-memory`
Create empty memory files for tracking