OPERATOR

For Coding Agents

OPERATOR is built for agents as well as people. An agent gets a short set of rules and a component index in its own instruction file, looks up the rest when it needs it, and checks what it wrote against the contract.

Start here

  1. Set up the agent: oprt init writes the rules and the index into AGENTS.md, CLAUDE.md or a Cursor rule.
  2. The agent finds a component with oprt search, reads it with oprt component, and starts a whole screen from a recipe with oprt add.
  3. Check the result: oprt check reports where the code breaks the contract.
  4. Upgrade to a new release with oprt upgrade: it moves copied source, updates code that uses the components, and refreshes the instructions oprt init wrote.

The rest of this page describes the contract those commands read. An agent with the installer does not need to read the contract file itself.

The contract

Give an agent @oprt/manifest/components.json: the whole component contract at about a tenth of the size of manifest.json, which adds the complete source of every recipe. Both describe the public API with the same entries:

  • props — each with a type; enums carry a fixed values list and a default. A union lists allowed shapes in types, with the mode explained in its description.
  • slots — what may go inside (children types).
  • composable_with — the components it is used with, in either direction: a FormSection's list names the Fields that go inside it, a Toggle's names the Toolbar it can go in. oprt component prints it as "Used with".
  • never_inside — where it must not go.
  • composition_rules — parent → allowed-children trees for compound components.
  • patterns — copyable application recipes with canonical layout, core composed_of references and package dependencies. In components.json each recipe's files map to their sizes and install is the CLI command that copies it; manifest.json carries the complete source files.
  • example — the one canonical usage, copy-paste ready.

@oprt/manifest/guidance.json is its companion: which component to choose, what to use instead, what each option value is for, and the house rules. The installer's index, search and instruction block are built from it.

Without the installer

  1. Give the agent components.json plus the system prompt. Read manifest.json only for a recipe's source, or install the recipe with the CLI.
  2. The agent picks components and fills props using each entry's values and example.
  3. In development, any invalid prop prints a structured error the agent reads to self-correct.

See the example workflow for an end-to-end run.

Core components and recipes

Import core components from @oprt/react. Patterns are source recipes to copy and adapt.

Copy every recipe files entry, preserving paths, then follow layout for usage. Install its dependencies and keep the OPERATOR styling setup. The bundle includes local helpers and nested recipes.

Previews use training data. Your application supplies real data, update timing, acknowledgements and connection state.

Use the source installer to preview and copy component families or complete recipes into your project. It records what it copied in oprt.json, so oprt upgrade can move the copy to a later release and keep your edits.