Skip to content

Configuration

AI-UI reads ai-ui.config.json from your project root. Every field is optional — sensible defaults are applied.

{
"docs": {
"globs": ["README.md", "CHANGELOG.md", "docs/*.md"]
},
"probe": {
"baseUrl": "http://localhost:5173",
"routes": ["/", "/settings", "/dashboard"]
},
"featureAliases": {
"dark-mode-support": ["Theme", "Dark mode", "Light mode"]
},
"goalRules": [
{
"id": "settings_open",
"label": "Open Settings",
"kind": "domEffect",
"dom": { "textRegex": "Settings" },
"score": 2
},
{
"id": "prefs_saved",
"label": "Save Preferences",
"kind": "storageWrite",
"storage": { "keyRegex": "^user\\.prefs\\." },
"score": 5
}
]
}

Controls which files atlas parses for features.

FieldTypeDefaultDescription
globsstring[]["README.md", "docs/**/*.md", "HANDBOOK.md", "CHANGELOG.md"]Glob patterns for doc files
cliHelpstring | nullnullPath to CLI help output for feature extraction

Atlas treats every markdown heading as a potential feature. More docs = more features to match against triggers.

Controls how the browser crawl works.

FieldTypeDefaultDescription
baseUrlstring"http://localhost:4321"Dev server URL
routesstring[]["/"]Routes to crawl
maxDepthnumber3Maximum crawl depth per route
timeoutnumber30000Page load timeout in milliseconds
skipLabelsstring[]["Delete", "Remove", "Destroy", "Reset", "Unsubscribe"]Trigger labels to skip during probe
safeOverridestring"data-aiui-safe"HTML attribute that overrides skip rules
basePathstring""Base path prefix for routes
goalRoutesstring[][]Routes where goal detection is active

Each route is visited in headless Chromium. Probe records every interactive element it finds — buttons, links, inputs, checkboxes, etc.

Tip: Include all top-level routes. Don’t include routes that require authentication — probe runs unauthenticated.

Maps slugified feature names to UI text that might represent them.

{
"ambient-sound-system-with-42-non-rhythmic-soundscape-tracks": [
"change", "Audio Settings"
]
}

When diff can’t fuzzy-match a feature name to a trigger, it checks aliases. This is useful when your docs use different language than your UI.

Key format: Feature names are slugified (lowercase, hyphens). The key must match the slugified form of a feature from your atlas.

Configurable effect predicates for SPAs where URLs don’t change. Goal rules define what “success” looks like when a user interacts with your app.

Traditional web apps change the URL when something meaningful happens. SPAs often don’t — clicking “Save” writes to localStorage, opening a dialog mutates the DOM, submitting a form fires a POST request. None of these change the URL.

Without goal rules, AI-UI can only detect route-based goals. Goal rules let you define success as observable effects.

KindWhat it matchesConfig fields
storageWritelocalStorage/sessionStorage writesstorage.keyRegex, storage.valueRegex
fetchHTTP requestsfetch.method[], fetch.urlRegex, fetch.status[]
domEffectDOM mutationsdom.selector, dom.textRegex, dom.goalId
compositeAND of multiple kindsCombine storage + fetch + dom

Matches when the app writes to localStorage with a key matching the regex:

{
"id": "audio_change",
"label": "Change Audio Preference",
"kind": "storageWrite",
"storage": { "keyRegex": "^lokey\\.audio\\." },
"score": 5
}

Matches when the app makes a POST request to a URL matching the regex:

{
"id": "save_profile",
"label": "Save User Profile",
"kind": "fetch",
"fetch": {
"method": ["POST", "PUT"],
"urlRegex": "/api/profile"
},
"score": 5
}

Matches when a DOM mutation contains text matching the regex:

{
"id": "settings_open",
"label": "Open Settings Panel",
"kind": "domEffect",
"dom": { "textRegex": "Settings" },
"score": 2
}

You can also use goalId to match the data-aiui-goal attribute:

{
"id": "dialog_open",
"label": "Open Dialog",
"kind": "domEffect",
"dom": { "goalId": "settings_dialog" }
}

This matches elements with data-aiui-goal="settings_dialog" in your HTML.

AND logic — all sub-predicates must match:

{
"id": "settings_saved",
"label": "Settings Saved",
"kind": "composite",
"storage": { "keyRegex": "^app\\.settings\\." },
"dom": { "textRegex": "saved|updated" },
"score": 10
}

This only fires when both a storage write AND a DOM mutation are observed.

Each rule has a score (default: 1). Scores are summed per flow. Higher scores mean more meaningful interactions.

Scoring guidelines:

  • 1-2: Low-value actions (opening a menu, hovering)
  • 3-5: Medium-value actions (changing a setting, toggling a feature)
  • 5-10: High-value actions (saving data, completing a flow)

Goal rules require runtime evidence to produce hits. If you haven’t run runtime-effects, goals remain unevaluated — not “failed,” just unknown. The design map shows (unknown) suffix for goals without runtime data.

This prevents false positives. No guessing.

Beyond the core fields, ai-ui.config.json supports these additional sections. All are optional — defaults work out of the box.

Controls the verify command thresholds.

FieldTypeDefaultDescription
maxOrphanRationumber0.25Maximum ratio of orphan features before failing
maxUndocumentedSurfacesnumber10Maximum undocumented UI surfaces before failing
failOnP0OrphansbooleantrueFail if any P0-priority orphans exist

Controls baseline comparison behavior.

FieldTypeDefaultDescription
failOnOrphanIncreasebooleantrueFail if orphan count increased since baseline
maxUndocumentedIncreasenumber5Maximum increase in undocumented surfaces
warnOnCoverageDecreasebooleantrueWarn if coverage decreased since baseline

Controls the decision-tracking memory system.

FieldTypeDefaultDescription
dirstring"ai-ui-memory"Directory for memory files
strictbooleanfalseFail if memory files don’t parse

Controls CI coverage gates.

FieldTypeDefaultDescription
minCoveragePercentnumber0Minimum coverage percentage to pass
maxTotalActionsnumberInfinityMaximum total recommended actions
maxActionsByTypeobject | nullnullPer-type action limits

Controls the runtime-effects command.

FieldTypeDefaultDescription
routesstring[]["/"]Routes to exercise
maxTriggersPerRoutenumber20Maximum triggers to click per route
windowMsnumber2500Observation window after each click (ms)
safe.denyLabelRegexstring"delete|remove|destroy|reset|logout|revoke|disable|unsubscribe|billing"Regex for labels to skip
safe.requireSafeAttrForDestructivebooleantrueRequire data-aiui-safe for denied triggers

Controls the ai-suggest command.

FieldTypeDefaultDescription
modelstring"qwen2.5:14b"Ollama model for semantic matching
topnumber5Max suggestions per feature
minConfidencenumber0.55Minimum confidence threshold
timeoutnumber60000Request timeout (ms)

Controls the ai-eyes command.

FieldTypeDefaultDescription
modelstring"llava:13b"Ollama vision model
timeoutnumber90000Request timeout (ms)
maxElementsnumber30Maximum elements to analyze
saveScreenshotsbooleantrueSave screenshots for visual analysis

Controls the ai-hands command.

FieldTypeDefaultDescription
modelstring"qwen2.5-coder:7b"Ollama code model
timeoutnumber120000Request timeout (ms)
maxFileSizenumber50000Max file size to process (bytes)
allowExtensionsstring[][".tsx", ".jsx", ".vue", ".svelte", ".html", ".ts", ".js", ".css"]File extensions to include

There are no settings in AI-UI that can hurt production, delete data, or publish anything. The entire tool is read-only analysis.

The closest thing to a dangerous setting is runtime-effects, which clicks real buttons in a browser. But it respects safety rules:

  • Deny patterns skip destructive-looking triggers
  • data-aiui-safe overrides for known-safe triggers
  • --dry-run hovers instead of clicking