SPB Git

Repository Public License

06-object-protocol.md 1.4 KB

# 6. Core model: the PRISM Universal Object Protocol (PUOP)

A versioned format for every editable, executable artifact: UI component, page, data table, chart, function, workflow, model, document, application, external connector, satellite.

Fields: id, type, schemaVersion, name, metadata, dataRef, inputs, outputs, capabilities, permissions, dependencies, ui, runtime, version, provenance, tests.

json
{
  "id": "obj_expenses_chart",
  "type": "prism.chart.line",
  "schemaVersion": 1,
  "name": "Monthly expenses",
  "inputs": [{"name": "rows", "type": "table", "required": true}],
  "outputs": [{"name": "selection", "type": "record"}],
  "permissions": [],
  "dependencies": ["obj_transactions"],
  "ui": {"theme": "system", "minWidth": 320},
  "version": 1
}

Requirements: typed ports; schema validation; canonical serialization with round-trip tests; stable IDs; reference integrity; dependency graph with cycle detection; migrations and backward compatibility; transaction boundaries; undo/redo. Keep three things separate: immutable object definitions, mutable runtime state, and cached results. Lazy recomputation and memoization come when profiling asks for them.

An AppBlueprint is the object graph for one app: pages, data models, actions, components, permissions, tests. It is the single artifact that the renderer displays, the agent edits, the version system diffs, and the publisher packages.

Files main
Menu

Theme