@oprt/manifest
v0.4.0
Published
OPERATOR's machine-readable contract for coding agents and tools: every component's props, option values and nesting rules, usage guidance and six complete recipes, with Zod schemas to validate it.
Maintainers
Readme
@oprt/manifest
The machine-readable contract of the OPERATOR design system: what every
component accepts, how components fit together, and six complete working screens. It is written
for coding agents and the tools that serve them, and it is released at the same version as
@oprt/react.
An app that only renders the components does not need this package.
Which file to use
| File | What it holds | Use it |
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ |
| components.json | Every component's props, option values, slots, nesting rules and example; the composition rules; a summary of each recipe (≈130 KB) | Give it to an agent |
| guidance.json | Which component to choose and what to use instead, what each option value is for, and the house rules as "use this, not that" pairs, and the setup a project needs (setup) | With components.json, when choosing components |
| agent-prompt.md | A system prompt that tells an agent how to work with the contract | As the agent's instructions |
| manifest.json | Everything in components.json, plus the complete source of the six recipes (≈850 KB) | Only to read or copy a recipe's source |
| schema.json | The JSON Schema of manifest.json | To validate a manifest in any language |
The six recipes are Asset Management, Operations Map, Maintenance Planning, Facility Monitoring,
Incident Response and Communications Console. guidance.json is checked against the contract when
it is built, so the two cannot drift apart.
import { readFileSync } from "node:fs";
import { createRequire } from "node:module";
const require = createRequire(import.meta.url);
const components = JSON.parse(
readFileSync(require.resolve("@oprt/manifest/components.json"), "utf8"),
);
components.components.Button.props.variant.values; // ["primary", "secondary", …]Validating
The package's entry exports the Zod schemas and their types:
import { ComponentSchema, ManifestSchema, type Component } from "@oprt/manifest";
const result = ManifestSchema.safeParse(JSON.parse(text));
if (!result.success) console.error(result.error.issues);ComponentSchema, PropSchema, SlotSchema, PatternSchema, CompositionRuleSchema,
ComponentsManifestSchema and GuidanceSchema are exported beside ManifestSchema, each with its
type.
The same contract, served
@oprt/cli answers from this contract
without reading files: oprt init writes an agent's instructions into AGENTS.md,
CLAUDE.md or Cursor's rules; search and component look things up; check reports invalid
values, unknown exports and forbidden nesting in a project's code; mcp serves the lookups and the
check over the Model Context Protocol. See oprt.dev/docs/agents.
License
MIT.
