Thesis · Guidelines and adoption architecture

HAIG: Human-AI Interface Guidelines

A thesis for software that an AI configures and a person watches.

Core rule
Interfaces and extensibility. No complex interactions with a human.
Audience
Software engineers and system designers
Examples
Haus and luxd field note
Companion
Two truths and pure functions (runtime architecture)

1The claim

Settings screens do not just make software harder to use. They limit which features get built.

Every option on a settings screen needs a UI control, a label, a default value, input validation, and help text. As options grow, screens multiply until nobody wants to touch them. To keep forms usable, product teams cut capabilities and flatten the underlying data model. Once those options are cut, the software can do only what its screens can explain.

Most configuration UI is a translation layer. A person knows what they want ("slowly turn up the house lights starting 30 minutes before sunrise; if I get up earlier after 5:30 AM, start the kitchen and foyer early"), and the software only accepts what it can store. Forms, pickers, toggles, wizards, and settings trees exist to force a person to do that translation by hand.

An AI does that translation well: it reads the documented API and current state, maps plain words onto nested schemas, checks constraints before committing, and reports back in plain words. Once humans no longer fill out forms, two things happen:

  1. Most configuration UI has no job left, and keeping it costs you twice (every feature needs a form, and every form adds surface to learn, test, and maintain).
  2. The data model stops bending around screen layouts. Nested triggers, field-level inheritance, ranked rules, and even compiled programs become ordinary configuration.

So build the other way around:

The person stays in charge because the AI runs only when asked, asks instead of guessing when behavior has no hidden defaults, gets approval before saving new persistent behavior, and leaves a complete append-only record of every change.

2The core

Interfaces and extensibility. No complex interactions with a human.

Runtime noteHAIG governs configuration and human-AI interaction. It pairs well with deterministic, pure-function runtimes that keep desired and observed state apart; that runtime architecture is separate and covered in Two truths and pure functions.

3What changes compared with a classic HIG

A classic human interface guideline (Apple's HIG and its descendants) assumes the person is the operator. It focuses on making controls learnable: consistent placement, clear affordances, forgiving input, progressive disclosure.

HAIG assumes the AI configures and the person owns and watches. The design problem moves (Table 1).

Table 1. Classic human interface design versus HAIG.
Classic HIGHAIG
How does a person find and set this option?How does an AI discover and set it safely, and how does the person read it back?
Simplify the data model to fit the screenGrow the data model freely; the AI handles the complexity
Controls must be learnableAPIs must be self-describing: clear routes, typed inputs, honest errors
Validate input in the formValidate in the system; the AI reads the error and fixes its call
Confirm before destructive actionsCheck before saving, approve new persistent behavior, and roll forward on an append-only log
Settings screensPlain-language readback and a live record of changes with reasons
Help textThe system explains itself on demand ("why is X doing Y?")

4The guidelines

4.1One source of truth, one documented API (skill first, MCP optional)

The system of record owns the data, and apps, scripts, and AI agents use the exact same API. There is no "AI mode" with side doors. If the AI can do it, it is a documented call anyone can make, and the app is just another client.

Expose the full contract directly from the server (for example, GET /api listing every route, input, output, and error code, kept equal to the router by tests). Agents with a shell work directly against that API using a skill that teaches domain conventions. Add an MCP server or dedicated tool wrapper only when a client without a shell needs access.

4.2Every write is a change record

A change is a first-class object, not a log line:

A write without a reason is allowed for direct human taps (a tap is its own reason), never for agents; an agent write missing a reason fails and changes nothing. Refused and failed writes are recorded too, since mistakes are useful context. Secrets are redacted before storage. The system's own runtime doings (a schedule firing, a device reconnecting) live in a separate event stream rather than mixing with configuration changes.

4.3Append-only history; roll forward, no undo button

Nothing in the API edits or deletes a change record, and the app has no undo button. When a change needs fixing, the AI rolls forward with a new change and a new reason.

Three reasons drive this rule:

  1. Unbroken audit trail: every decision and every correction stays visible in order.
  2. No settings controls in a no-settings app: an undo button in the user's interface is a configuration control creeping back into an app meant to have none.
  3. Physical and external reality: undo cannot take back what already happened in the world, such as a light that came on, a TV that started, or an email that went out.

Actions with lasting external effects (charging a card, sending mail, flashing firmware) carry their own guard rails: dry runs, staging, soak periods, halt on failure, and compensating actions when needed.

4.4No AI in the runtime loop; approve new persistent behavior

The AI runs only when a person starts a session. Stored configuration executes deterministically on its own even if the AI is completely offline.

Behavior has no hidden defaults: when a spoken request leaves a choice open, the AI asks instead of guessing. Before saving genuinely new persistent behavior, the AI proposes what it will add, explains what it affects (including what it can override), and waits for the person's yes. Picking the API fields that implement an intent the person already stated needs no extra ceremony.

4.5Check before you commit

The AI uses dry runs, virtual-clock checks, compilers, renderers, and readback before committing changes: validate input, simulate a rule against a virtual clock, compile and verify a program, render exact frames, or inspect the resulting schedule returned by a write. Make the safe path the easy one, and return errors that say exactly what to fix.

4.6Show state in human terms

The person's window shows what is true now and what happens next in plain words: "the house lights start fading 30 minutes before sunrise", "the garden waters at 5:30 AM, skipped tomorrow because rain is forecast", not next_event: 1793758560 or skip_flag: 1. The server itself should be able to read stored settings back as sentences so people verify configuration without reading JSON. Internal IDs and raw data stay out of the main view, one step deeper for anyone who wants them.

4.7Live, not refreshed

Changes, effects, and logs stream as they happen. Watching an AI work should feel like watching a colleague share their screen: each step appears with its reason, and the system's response appears right underneath.

4.8Explain on demand

"Why is X like this?" is an evidence query, not a support ticket. Because the system keeps both change records and runtime events, an agent can answer from facts and cite the exact change or event: "The office Wi-Fi dropped at 2:02 PM because the router updated its firmware (change #212); it came back at 2:06 PM." An answer that cannot point to evidence says so.

4.9Small, composable operations

Prefer small, typed, well-named API routes or operations over a few monolithic ones. An agent composes them: read state, check, apply, verify. Each route's description and error message is part of the interface and deserves the care a button label used to get.

4.10Guard rails live in the system, not in the prompt

Limits, schema validation, bytecode verifiers, rate limits, and "never do X" are enforced by the server, not by asking the model nicely. A thermostat API refuses a setpoint outside safe bounds; a lighting controller rejects a program that exceeds memory or tick limits; a store API refuses a price below cost unless explicitly marked as a sale. A model can make a mistake; the system's job is to make the mistake harmless and visible.

4.11No new forms

A feature ships as a reusable model part, an API capability, plain-language readback, and a visible change record, never as a new settings screen.

Direct right-now controls stay in the app (switching a light, nudging a thermostat, pausing tonight), and stand temporarily until the next scheduled boundary so they never silently rewrite persistent configuration. Existing data views (a map, a timeline, a gallery) stay as views. The exception for input is facts only a person can observe; see Section 4.12. If a person keeps reaching for a form, that signals a missing model part, API capability, or view, not a reason to bring forms back.

4.12Capture human observations the human way

Not everything belongs in conversation. Some facts only a person on the spot has: which room each switch controls, where sprinkler heads spray, which outlet powers the printer, whether a lighting scene feels too busy. Describing them in words is slow and error-prone ("the third valve from the left, no, the one by the window").

For those, the person gets the simplest interface that matches how they know it: point, tap, trace over a photo, attach a picture to a request, or tap "calmer" or "warmer". The interface collects observations, not configuration: it asks what the person sees or wants, never what the system stores. In the next session, the AI turns those observations into configuration, writes it as a normal change citing the capture, and shows the result back so the person can check it with their own eyes.

How to recognize a human thing:

Rules for capture interfaces:

4.13Optional: foundations and parts for AI-composed views

Native apps built directly over the documented API work well and are often the better choice, especially on mobile devices. You do not need AI-composed screens to follow HAIG.

When a domain genuinely benefits from bespoke, disposable views ("a page for a weekend sale with live orders, stock for the top ten products, and a button to end the sale early"), an optional composition layer pairs cleanly with the same foundations:

Because a composition is stored as an ordinary change record and parts can only call declared API routes, AI-composed views inherit the same audit trail, roll-forward history, and server-side guard rails as every other change.

5What the person's interface becomes

Three surfaces cover most of it:

Everything else is reference: data views, plain-language schedules, raw logs, and history.

6Architecture for adoption: core, extensions, and installations

The guidelines above work for a single installation. Making a HAIG system adoptable by other people without leaking anyone's private setup into the product adds four structural rules.

6.1Two code domains: core and extensions

Code lives in at least two domains, with different owners, pace, and rules (Table 2).

Table 2. Core versus extensions.
AspectCoreExtensions
WhatThe foundations: data model, API, event stream, change records, runtimes that host extensions, anything safety-criticalIntegrations, hardware or service adapters, captures, custom views, and content (templates, scripts, looks)
Depends onNothing in extensions, everOnly the core's published interfaces, never its internals
ChangesRarely and deliberately: versioned contracts, migrations, full test gates, reviewedOften and cheaply: added, replaced, or removed without touching the core
Who writes itCarefully, with developer review and release disciplineThe user-side AI, in a human-started session, within the contracts, proposing new persistent behavior before saving
FailureIs the system's problem, so it is guarded hardIs contained: a broken extension is disabled and reported, and the rest keeps working
TestsIts own suite plus contract testsContract tests against the published interfaces

Take an online shop. The core is orders, payments, inventory, and the change log. Extensions are a shipping-rates adapter for a new courier, a "low stock" report, or a newsletter integration. Content is product descriptions and promotional copy.

Enforce the boundary in the build: separate packages, import checks, and versioned interfaces so an extension declares which contract version it needs. When an extension needs something core does not offer, that is a request to grow the interface, not a license to reach inside. Content (schedules, rules, templates, compiled programs) is a third, even lighter layer: data interpreted and verified by core or extensions.

6.2Two roles: user and developer, with a hard wall between them

Almost everyone is a user. A household, a shop, or a team runs a released core and shapes it with configuration, content, and extensions. The core developer is a small minority, and a developer running a custom fork is the exception, not the model to design for.

Keep the wall hard, because shortcuts quietly break distribution:

Keeping roles apart bounds the blast radius of every user session: the worst a user-side agent can write is bad configuration, content, or an extension, all validated by the server, recorded in the append-only log, and fixed cleanly by rolling forward.

6.3Two repositories: the key to adoption and distribution

The two domains and two roles map onto two kinds of repository:

Why adoption needs this split:

When to split: move configuration, secrets, and installation-specific content out of core immediately, while keeping new extension code in core's boundary-enforced extension tree until interfaces settle.

6.4Onboarding: a stranger points their AI at the core

The real adoption test: someone you have never met points their own AI at the core repository and says "I want to set this up." Nothing else. The repository has to be enough.

What core needs for that:

Human steps stay inside the core rule: watch, say, tap, show. Physical actions (plug in a cable, hold a pairing button, type a password, walk outside and look) are asked one at a time, in plain words, right when needed. If a stranger's AI cannot reach a working installation without asking core's authors, the gap is in core's interfaces or docs, and fixing it is core work.

7Objections

"People will lose the ability to do it themselves." They keep live views, direct right-now controls, and a documented API. What they lose is the obligation to translate intent into nested configuration by hand.

"The AI will make mistakes." It will. So does everyone using a form. The difference is that the server validates every call, checks run before committing, new persistent behavior gets human approval, and every change is recorded with its diff and reason so fixes roll forward cleanly. That is far more auditability than most form-based UIs give you.

"Showing reasoning is just theater." Only if it is disconnected from the change. A reason stored with the diff, shown next to its outcome and kept in an append-only history, is an audit trail you can actually read.

"What about trust?" Trust comes from hard boundaries and a clear record. The AI runs only when asked, asks instead of guessing on open choices, waits for approval before saving new persistent behavior, and works inside server-enforced guard rails. High-risk domains (payments, door locks, firmware) add staging, soak periods, and halt-on-failure checks on top.

8Litmus tests

End of thesis