Cortex Terminology

Normative definitions of Wire, Circuit, Graph, Pulse, and related Cortex terms. The source of truth for vocabulary used across the Cortex docs.


On this page
  1. Substrate layers
  2. Wire language
  3. Core forms
  4. Composition algebra
  5. Value operators
  6. File-level forms
  7. Executors and registry
  8. Runtime vocabulary
  9. Ownership boundary
  10. Doc-kind vocabulary
  11. Related

Cortex Terminology

Normative definitions for the vocabulary used throughout the Cortex docs. When a term appears in an architecture chapter, spec, or research note, this page is where it is defined. Summaries in glossary.md are informal; this page is canonical.

Short rule for reading the docs:

.wire source → Wire parser → Circuit → Graph topology → Pulse execution

Each layer owns a specific set of terms. This page groups them by layer.

Substrate layers

TermDefinitionOwner
GraphThe lowest pure algebraic topology layer: vertices, edges, Empty, Overlay, Connect, relation construction, and DAG validation. Pure; no evaluation semantics.Cortex.Graph
CircuitThe validated executable topology. Predeclared nodes plus compatible-port edges, ready for execution. A Wire source file compiles to a Circuit.Cortex.Circuit
WireThe source language and file format used to author Circuits. Composes registered authority (nodes and contracts) into a topology. Normative grammar: grammar.md.Cortex.Wire
PulseThe durable runtime that schedules and executes a compiled Circuit. Standalone service cortex-pulse.Cortex.Pulse

Wire language

Core forms

TermDefinition
ContractA named typed interface that flows through a port. Ambient in a global namespace. Carries a payload kind.
NodeAn explicit graph vertex with typed input/output ports and an implementation body. Has identity; reused references are the same node.
PortA slot on a node, typed by a contract. Input (<-) or output (->). May be labeled.
Port keyThe identity tuple (direction, contract, label) that => matches on. Absent-label is a distinct key, not a wildcard.
LabelPart of a port’s identity for routing, not a decoration. Labeled ports match only identically-labeled partners.
Sum groupOutput port form -> A | B with mutual-exclusion metadata: exactly one variant fires per evaluation.
Configured executor valueStaged value @executor { config } with no ports or graph identity. let-bindable and executable only through an explicit node body.
Wire valueAny graph-kind value: node, composed graph expression, or the empty wire ().
Port-boundaryA wire’s unconnected input and output ports. The surface => operates on.

Composition algebra

TermDefinition
<> overlaySet union of nodes and edges across two wires. The primitive of the algebra.
=> connectLinear boundary contraction: each compatible output/input endpoint pair is consumed at most once; no implicit copy or aggregation.
Mokhov algebraThe algebraic basis for Wire’s graph expressions: Empty | Vertex | Overlay | Connect per Mokhov’s Algebraic Graphs with Class.

Value operators

TermDefinition
// mergeRight-biased shallow record merge.
++ concatString and list concatenation.
| sum constructorOutput-port mutual-exclusion form; distinct grammar construct, not pure sugar.
@ applicationExecutor authority plus config: @qualified.name { ... }. Produces a configured executor value.

File-level forms

TermDefinition
File-return expressionA .wire file’s last expression without trailing ;. Becomes the file’s value. A file is a wire iff it has a file-return.
Declaration-only fileA file without a file-return expression. Contributes ambient contracts and importable let bindings; nothing else.
ProgramA root .wire file plus the transitive closure of its imports. The unit over which ambient contract collection and cross-file reference resolution runs.

Executors and registry

TermDefinition
ExecutorA registered external recipe for turning a node’s inputs into outputs. Referenced by @qualified.name. LLM call, pure transform, shell-out, or subgraph evaluation.
Executor alphabetThe globally-ambient set of registered executor names. Closed: user code cannot define new executors, only compose them.
Vocabulary (of an executor)The set of contract names the executor can produce or consume.
Structural constraints (of an executor)The rules a node’s port signature must satisfy to apply the executor.
Purity classpure or impure. Informational; does not affect static type-checking.
Executor projectionThe registered typed port boundary or structural constraint checked against an authored node body.
Port-polymorphic executorAn executor whose accepted port signature has degrees of freedom. The authored node boundary supplies the concrete shape.
Tool registryA sibling ambient namespace to the executor alphabet. Holds named tool values (getDate, searchAssets, …) referenced inside config records.
Config constructorA tagged-record value form inside a config: qualified.name { ... } (no leading @). Semantics determined by the consuming executor’s schema.

Runtime vocabulary

TermDefinition
EnvelopeThe JSON-carrier shape every Wire value travels in at runtime: { contract, mediaType, producer, value, provenance }.
Payload kindA contract’s runtime category: json, markdown, text, table, artifact_ref. Selects validation and rendering.
Contract registryThe Haskell-owned authoritative definitions of contracts: schema, codec, payload kind, examples, lint rules.
Evaluation-boundary checkThe runnable-wire gate: every singular input connected to exactly one edge. Runs at evaluation-preparation, not type-checking.
RewireA bounded runtime topology modification over a live Circuit. Subject to vocabulary, endpoint-compatibility, topology, and resource (gas) bounds. Modules: Cortex.Pulse.Rewrite plus the Wire compiler.
Realized circuitThe concrete Circuit topology that existed after admitted rewires during a run. A runtime artifact, not a grammar construct.
GasThe structural-change budget consumed by rewires: nodes added, edges added, depth, frontier breadth, rewrite operations.
Proof contractA mechanized safety surface whose terms lead runtime implementation. Haskell admission code must either construct values satisfying the proof contract or reject the input before it reaches that boundary.
Topological memoryA node-addressable accumulated context from upstream evaluations. Declared on the node, consumed at evaluation time. Downstream home: Logos.Memory.Topological; Pulse supplies the settled event state.
FrontierThe set of graph nodes ready to execute at a given point. Pulse schedules over the frontier.

Ownership boundary

  • Wire composes registered authority. Wire source references registered nodes, contract IDs, executor config, and wiring. It does not invent executors, tools, payload types, or domain authority.
  • Theory names safety obligations. Where a mechanized proof contract exists, the proof-side vocabulary is normative. Runtime code enforces that shape at admission and persistence boundaries; it does not weaken the contract to fit convenient implementation types.
  • Haskell owns what the authority means. Executors, contracts, codecs, payload kinds, and registry schemas are Haskell-defined and live outside Wire.
  • Product concepts stay downstream. Launch fields, report sections, model-policy choices, user-facing workflow labels — these live in consumer bindings. They can wrap a Circuit; they are not part of the generic Cortex Circuit layer.

See Architecture/01-overview.md and Architecture/02-ownership-and-boundaries.md for the full ownership story.

Doc-kind vocabulary

Terms used to classify docs in docs/. See ../map.md for how each doc kind is placed and ../taxonomy.md for the organizing axes.

TermWhere
Canonical chapterArchitecture/NN-*.md
ReferenceReference/**/*.md
ADRADRs/NNNN-*.md
EpicRoadmap/Epics/*.md
PlanRoadmap/Plans/*.md
Research noteResearch-notes/{scope}/YYYY-MM-DD-*.md
ExperimentExperiments/{scope}/YYYY-MM-DD-*.md
ManuscriptPublications/paper-N-*/manuscript.md