--- id: STORE-13 family: GR-STORE level: extended profiles: [storage-api, runtime] posture: normative-target added: "1.0" changed: "1.0" source: https://flowdrop.io/spec/rules/gr-store/store-13 specification: FlowDrop Workflow Specification 1.0-draft licence: CC BY 4.0 --- # STORE-13 — One name per concept for a node's type *GR-STORE (Part I) · level: extended · profiles: storage-api, runtime · added in 1.0* A node has a type it is an instance of and a type it is drawn as. They are different things, and a payload that spells both the same way cannot be read without knowing who wrote it. ## The rule > **Normative.** This is the rule. > > 1. A node type's identifier is `node_type_id` wherever it appears in a payload: job metadata, node metadata, a serialised node execution result, a node-status broadcast, a persisted session message. > > 2. A node's visual type is `visual_type` in a per-node snapshot payload. > > 3. The bare key `node_type` must not be written anywhere. > > 4. A node's own identifier is `node_id` and is unaffected. ## What it means A node has two identities that a payload can be forgiven for confusing: the type it is an *instance* of, and the type it is *drawn as* in an editor. The first is `node_type_id`; the second is `visual_type`. A bare `node_type` key could carry either meaning, and a reader would have no way to tell which without already knowing which producer wrote it. The rule gives each concept its own name and forbids the shared one everywhere: job metadata, node metadata, a serialised node execution result, a node-status broadcast, a persisted session message, and a per-node snapshot all name the concept they mean, not the spelling that happens to be shortest. A node's own identifier, `node_id`, is a third thing again and unaffected by any of this: it names *which* node, not *what kind*. ## Example A per-node snapshot spells the node's drawn type `visual_type`; a node execution result, carried on the same kind of event, spells the same node's type-it-is-an-instance-of `node_type_id` — two different concepts, on two different payloads, never the bare key. ```json title="A node snapshot's visual type" {"nodeStates": {"chat.1": {"metadata": {"visual_type": "terminal", "label": "Chat"}}}} ``` ```json title="A node execution result, on the same node" {"nodeId": "chat.1", "output": { … }, "node_type_id": "chat_output"} ``` ## Related rules - Names: STORE-7, STORE-11 - Referenced by: STORE-7 --- Rule identifiers are permanent and are never renumbered. This specification carries no implementation status: each implementation publishes its own standing against these rules. Licensed CC BY 4.0.