Commands
Pipeline commands
Section titled “Pipeline commands”These run in sequence — each reads the previous stage’s output from ai-ui-output/.
Parse docs (README, CHANGELOG, etc.) into a feature catalog.
ai-ui atlasInput: Markdown files matching docs.globs in your config.
Output: ai-ui-output/atlas.json — structured feature catalog with names, descriptions, and source locations.
Crawl the running UI and record every interactive trigger.
ai-ui probeInput: Running dev server at probe.baseUrl.
Output: ai-ui-output/probe.jsonl — one trigger per line with element type, text, selector, and route.
Probe uses Playwright to launch headless Chromium. It clicks through every configured route and records buttons, links, inputs, and other interactive elements.
surfaces
Section titled “surfaces”Extract surfaces from a WebSketch capture.
ai-ui surfacesInput: WebSketch IR capture files (use --from <path> to specify).
Output: ai-ui-output/probe.surfaces.json — structured surface data with roles, patterns, handlers, and style tokens.
Match atlas features against probe triggers using fuzzy matching.
ai-ui diffInput: atlas.json + probe.jsonl
Output: ai-ui-output/diff.json + diff.md — matched features, must-surface items, coverage percentage, burial index.
Build a trigger graph from probe, surfaces, and diff data.
ai-ui graphai-ui graph --with-runtime # Include runtime evidenceInput: probe.jsonl + surfaces.json + diff.json (+ runtime effects if --with-runtime)
Output: ai-ui-output/trigger-graph.json — nodes and edges representing all interactive elements and their relationships.
design-map
Section titled “design-map”Generate the full design diagnostic output.
ai-ui design-mapInput: trigger-graph.json + diff.json + config (including goalRules)
Output: Four files in ai-ui-output/:
- Surface inventory (
ui-surface-inventory.json+.md) — every trigger grouped by location - Feature map (
ui-feature-map.json+.md) — discoverability scores and recommended actions - Task flows (
ui-task-flows.md) — inferred navigation chains with loop detection and goal tracking - IA proposal (
ui-ia-proposal.md) — primary/secondary nav, conversion paths, goal scores
stage0
Section titled “stage0”Run atlas + probe + diff in sequence.
ai-ui stage0Equivalent to running atlas, probe, and diff one after another. Convenience command for the basic pipeline.
Analysis commands
Section titled “Analysis commands”compose
Section titled “compose”Generate a surfacing plan from diff + graph.
ai-ui composeProduces actionable recommendations for how to surface buried features.
verify
Section titled “verify”Pass/fail verdict for CI pipelines.
ai-ui verify --strict --gate minimum --min-coverage 60Flags:
--strict— zero-tolerance thresholds--gate <mode>—none,minimum, orregressions(default:none)--min-coverage <N>— override minimum coverage percentage forminimumgate mode (0-100)--json— machine-readable output to stdout, no file writes--no-must-surface— skip must-surface contract checks--replay <path>— replay from a.replay.jsonpack instead of live artifacts
Exit codes: 0 = pass, 1 = user error, 2 = runtime error.
baseline
Section titled “baseline”Save or compare verification baselines.
ai-ui baseline --write # Save current state as baselineai-ui baseline # Show comparison against saved baselinepr-comment
Section titled “pr-comment”Generate a PR-ready markdown comment from the latest artifacts.
ai-ui pr-commentOutput is markdown suitable for pasting into a GitHub PR.
Runtime commands
Section titled “Runtime commands”runtime-effects
Section titled “runtime-effects”Click triggers in a real browser and capture observed side effects.
ai-ui runtime-effectsai-ui runtime-effects --dry-run # Hover instead of clickLaunches Playwright, clicks each trigger, and records:
- localStorage/sessionStorage writes
- DOM mutations (dialogs, toasts, panels)
- Fetch/XHR requests
Safety: Triggers matching deny patterns (delete, remove, destroy, etc.) are skipped. Use data-aiui-safe attribute to override for known-safe triggers. Use --dry-run to hover instead of click.
runtime-coverage
Section titled “runtime-coverage”Per-trigger coverage matrix.
ai-ui runtime-coverageai-ui runtime-coverage --actions # Generate actionable work queueai-ui runtime-coverage --actions --actions-top 10 # Limit to top 10 actionsShows which triggers were probed, which were surfaced, and which were observed with runtime effects. Use --actions to generate a prioritized work queue of items to address.
Snapshot commands
Section titled “Snapshot commands”replay-pack
Section titled “replay-pack”Bundle all artifacts into a reproducible replay snapshot.
ai-ui replay-packCreates a timestamped snapshot of all ai-ui-output/ artifacts.
replay-diff
Section titled “replay-diff”Compare two replay packs.
ai-ui replay-diff <a.replay.json> <b.replay.json>Compares two replay packs and shows what changed — coverage deltas, new/removed triggers, goal score changes.
AI commands (local Ollama)
Section titled “AI commands (local Ollama)”Three commands use local Ollama models to extend the pipeline with semantic matching, visual analysis, and code generation. All processing runs locally — no data leaves your machine.
Prerequisites: Ollama must be running (ollama serve). Pull the required models before first use:
ollama pull qwen2.5:14b # for ai-suggestollama pull llava:13b # for ai-eyesollama pull qwen2.5-coder:7b # for ai-handsai-suggest
Section titled “ai-suggest”Semantic matching between documented features and UI surfaces using a general-purpose LLM (Brain).
ai-ui ai-suggestai-ui ai-suggest --model qwen2.5:14bai-ui ai-suggest --min-confidence 0.7ai-ui ai-suggest --eyes ai-ui-output/eyes.jsonInput: atlas.json + probe.jsonl + diff.json (+ optional Eyes annotations)
Output: ai-ui-output/ai-suggest.json, ai-suggest.patch.json, ai-suggest.md — alias patches that tell the diff engine which features map to which triggers.
Flags:
--model <name>— Ollama model (default: configured inai-ui.config.json)--min-confidence <n>— minimum match confidence 0.0–1.0 (default: 0.55)--eyes <path>— path to Eyes annotations for visual enrichment
ai-eyes
Section titled “ai-eyes”Visual surface enrichment using a vision model (Eyes). Identifies icon-only buttons, text-poor controls, and visually ambiguous surfaces.
ai-ui ai-eyesai-ui ai-eyes --model llava:7bInput: probe.jsonl + screenshots from probe.baseUrl
Output: ai-ui-output/eyes.json — annotated surfaces with icon_guess, visible_text, nearby_context, and confidence scores.
Each surface gets a visual annotation describing what a human would see. This context feeds into ai-suggest (better alias matching) and ai-hands (precise edit targeting).
Flags:
--model <name>— Vision model (default:llava:13b)
ai-hands
Section titled “ai-hands”PR-ready patch generator using a code model (Hands). Reads the full design-map pipeline output, scans the target repo, and generates find/replace edits to close surfacing gaps.
ai-ui ai-handsai-ui ai-hands --tasks surface-settings,goal-hooksai-ui ai-hands --repo /path/to/projectai-ui ai-hands --min-rank 0.50ai-ui ai-hands --dry-runInput: design-map artifacts + repo source files (+ optional Eyes annotations) Output:
hands.plan.md— ranked edit groups (High → Medium → Low confidence) with per-edit reasonshands.patch.diff— unified diff with hunks ordered by trustworthinesshands.files.json— manifest withrank_score,rank_bucket,rank_reasonsper filehands.verify.md— verification checklist
Task types:
| Task | What it does |
|---|---|
add-aiui-hooks | Add data-aiui-safe to non-destructive interactive elements |
surface-settings | Improve discoverability for documented-but-buried features |
goal-hooks | Add data-aiui-goal for task completion detection |
copy-fix | Align UI labels with documentation terminology |
Flags:
--model <name>— Code model (default:qwen2.5-coder:7b)--tasks <list>— Comma-separated task types (default: all four)--repo <path>— Target repo root (default: CWD)--min-rank <n>— Minimum rank score 0.0–1.0 to include (suppresses low-confidence hunks)--dry-run— Skip Ollama queries, generate empty plans--verbose— Show per-edit rank breakdowns
Edit ranking: Every edit is scored across five deterministic signals (validation strength, anchor quality, edit locality, provenance alignment, safety risk) and sorted into High (≥0.75) / Medium (0.50–0.74) / Low (<0.50) buckets. Validated edits always appear before proposal-only edits. High-risk edits (touching auth/routing, deleting code) show a ⚠️ indicator even within High confidence.
Safety: Edits are never applied automatically. All outputs are proposals for human review. Apply with git apply hands.patch.diff after reviewing hands.plan.md.
Utility commands
Section titled “Utility commands”env-check
Section titled “env-check”Check your environment setup — Node.js version, config file, Playwright availability, and Ollama models.
ai-ui env-checkUseful for debugging setup issues or verifying that all prerequisites are met before running the pipeline.
init-memory
Section titled “init-memory”Create empty memory files for decision tracking.
ai-ui init-memorySets up the memory file structure used by the pipeline to track decisions across runs.