@oprt/manifest 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -9,13 +9,13 @@ An app that only renders the components does not need this package.
9
9
 
10
10
  ## Which file to use
11
11
 
12
- | File | What it holds | Use it |
13
- | ----------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ |
14
- | `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 |
15
- | `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 | With `components.json`, when choosing components |
16
- | `agent-prompt.md` | A system prompt that tells an agent how to work with the contract | As the agent's instructions |
17
- | `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 |
18
- | `schema.json` | The JSON Schema of `manifest.json` | To validate a manifest in any language |
12
+ | File | What it holds | Use it |
13
+ | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ |
14
+ | `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 |
15
+ | `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 |
16
+ | `agent-prompt.md` | A system prompt that tells an agent how to work with the contract | As the agent's instructions |
17
+ | `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 |
18
+ | `schema.json` | The JSON Schema of `manifest.json` | To validate a manifest in any language |
19
19
 
20
20
  The six recipes are Asset Management, Operations Map, Maintenance Planning, Facility Monitoring,
21
21
  Incident Response and Communications Console. `guidance.json` is checked against the contract when
package/agent-prompt.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  You are composing a UI from the OPERATOR component library. Follow these rules exactly. The machine-readable contract is `@oprt/manifest/components.json`: every component's props, allowed values, slots and composition rules, plus a short summary of each recipe. Treat it as the source of truth for component names, props, allowed values, slots, and composition rules. `@oprt/manifest/manifest.json` holds the same contract and also the complete recipe sources, which makes it many times larger: read it only when you need a recipe's files, or install the recipe with `oprt add <recipe>` instead.
4
4
 
5
- If the project has the `oprt` command, use it instead of reading the contract file: `oprt search <need>` finds the component or recipe for a need, `oprt component <Name> --dense` prints one component with what each option is for, and `oprt check <paths>` checks what you wrote. `oprt init` writes these rules and a component index into your instruction file.
5
+ If the project has the `oprt` command, use it instead of reading the contract file: `oprt search <need>` finds the component or recipe for a need, `oprt component <Name> --dense` prints one component with what each option is for, and `oprt check <paths>` checks what you wrote, and says how much of it it read: only the status `evaluated_clean` means every file was read in full with nothing found, a file that does not parse is `not_evaluated`, and a spread or computed value it could not read is listed as a limit. It checks syntax, the contract and these rules, not types or rendering. `oprt init` writes these rules and a component index into your instruction file.
6
6
 
7
7
  ## Rules
8
8
 
@@ -19,7 +19,7 @@ If the project has the `oprt` command, use it instead of reading the contract fi
19
19
 
20
20
  Import `@oprt/tokens` at the application root, and in the Tailwind CSS 4 stylesheet add `@plugin "@oprt/tailwind"` and an `@source` line for `node_modules/@oprt/react/dist`. The token import includes the bundled OPERATOR Sans and OPERATOR Mono variable fonts, with upright and italic faces at weights 300–700. Tailwind `font-sans` and `font-mono` resolve `--oprt-font-sans` and `--oprt-font-mono`; no application-specific font-family overrides are needed. Their CSS family aliases are `Operator Sans Family` and `Operator Mono Family`.
21
21
 
22
- When importing token entry points selectively, also import `@oprt/tokens/fonts` once. Projects using standalone font downloads can load the included stylesheet instead. Use upright Sans for interface text and Mono for code, identifiers, and aligned data; disable programming ligatures in code and data roles. These Geist-derived fonts remain development candidates, with qualification limits documented in the bundled source notices. Preserve the included SIL Open Font License and attribution when redistributing fonts.
22
+ When importing token entry points selectively, also import `@oprt/tokens/fonts` once. Projects using standalone font downloads can load the included stylesheet instead. Use upright Sans for interface text and Mono for code, identifiers, and aligned data; disable programming ligatures in code and data roles. These Geist-derived fonts are unhinted and checked on Windows and Linux, with their open limits documented in the bundled source notices. Preserve the included SIL Open Font License and attribution when redistributing fonts.
23
23
 
24
24
  ## Borders
25
25
 
@@ -35,7 +35,7 @@ Each component entry (the same shape in `components.json` and `manifest.json`) h
35
35
 
36
36
  - A recipe is not an export of `@oprt/react`. Its `layout` shows the canonical local import and usage after copying its source.
37
37
  - Copy every entry in `files` (from `manifest.json`) into your application's component directory, using each key as its relative destination and its value as the complete file contents. Preserve the directory structure so relative imports continue to resolve. A recipe's `files` already include the shared helpers and nested modules it imports.
38
- - `dependencies` lists packages imported by those files. Use the existing OPERATOR token CSS, operational token CSS, and Tailwind preset setup; these are styled React recipes, not standalone CSS bundles.
38
+ - `dependencies` lists packages imported by those files. A recipe needs the same stylesheet setup as the components, in Tailwind CSS 4 (which has no presets): `@plugin "@oprt/tailwind"` in the stylesheet, `import "@oprt/tokens"` once at the application root, and, because every recipe imports `@oprt/react`, an `@source` line for `node_modules/@oprt/react/dist` in that stylesheet or its components render unstyled. `@oprt/tokens-operational` is not needed: no recipe reads it. These are styled React recipes, not standalone CSS bundles. `oprt add <recipe>` prints exactly this setup for what it copied.
39
39
  - `composed_of` lists the core manifest components used by the recipe and its local dependencies. Consult their canonical APIs when adapting the recipe.
40
40
  - These recipes use labeled training data and local demonstration state. Replace sample arrays, timestamps, and callbacks with application-owned data and handlers. No recipe supplies a live telemetry hook, backend connection, delivery guarantee, or operational freshness policy.
41
41
  - Keep visible labels alongside status colors, UTC time labels, keyboard controls, loading and empty states, and explicit unavailable/stale states when connecting real data.