Interfaces
An interface is a way into the product: a surface for people, or an operation for programs and agents. Interfaces are always shared.
Each link is an interface field. The other kind is a ref.kind error; an
interface nothing uses is interface.unused.
| Field | Required | Meaning |
|---|---|---|
interface_kind |
yes | surface or operation |
name |
yes | e.g. Note editor, Save a note |
system |
no | The system that serves it. |
audience |
no | Who uses it (actor ids). |
code |
no | The intended code owner, a repository path. |
Every record also has the
common fields. Surface fields on an
operation, or the reverse, are an interface.fields error.
Surfaces
Section titled “Surfaces”{ "ready": 3, "kind": "interface", "id": "interface.editor", "display_id": "IF-EDITOR", "interface_kind": "surface", "surface_kind": "screen", "name": "Note editor", "summary": "Where a writer types a new note and saves it.", "system": "system.web", "audience": ["actor.writer"], "route": "/notes/new", "elements": [ { "name": "Text area", "states": ["empty", "typing", "over the limit"] }, { "name": "Save button", "states": ["enabled", "disabled while saving"], "copy": "Save" } ], "states": ["saving", "saved", "save failed"]}| Field | Required | Meaning |
|---|---|---|
surface_kind |
yes | app, page, screen, section, dialog, sheet, email, notification, or provider |
parent |
no | The surface this one sits within. |
route |
no | e.g. /settings#agent-model |
platforms |
no | ios, android, web, mobile, desktop |
elements |
no | [{ name, description?, states?, copy? }]; copy is the exact words. |
states |
no | The surface’s own states. |
mockup |
no | { url?, frame?, version? } |
A surface holds content, states, and copy, not layout. A screen several flows
use is one surface. A mockup binds only when it names an exact frame or
version.
Operations
Section titled “Operations”{ "ready": 3, "kind": "interface", "id": "interface.save-note", "display_id": "IF-SAVE-NOTE", "interface_kind": "operation", "operation_kind": "endpoint", "name": "Save a note", "summary": "Stores a new note for the signed-in writer, or refuses one over the limit.", "system": "system.api", "code": "apps/api/src/notes/save.ts", "http": { "method": "POST", "path": "/api/notes" }, "auth": "The writer's session", "params": [{ "name": "text", "type": "string", "source": "The editor" }], "returns": "The new note's id", "errors": [ { "code": "note_too_long", "status": 400, "when": "The note is over the limit", "copy": "Notes can be up to {limit} characters." } ]}| Field | Required | Meaning |
|---|---|---|
operation_kind |
yes | endpoint, rpc, mcp_tool, mcp_resource, cli_command, webhook, or function |
params |
no | [{ name, type, source }] |
returns |
no | What a successful call returns. |
errors |
no | [{ code, status?, when?, copy? }] |
http |
no | { method, path } |
auth |
no | The credential or role a caller needs. |
The message that calls it names it:
[ { "msg": { "from": "Web", "to": "API", "text": "Save the note", "interface": "interface.save-note" } }]