PseudoScript
Module

universe

component

Adapter #

private
universe::Adapter

Adapts a resolved model into the software graph: keeps only the structural nodes, hooks each to its structural parent for the containment tree, and lifts every call to the structural level — tallying directed traffic per caller→callee pair so the edge carries direction.

Parent

Inbound

Outbound

Scenarios

StructuralNodesOnly

Only structural nodes enter the graph; data and callables do not.

  • given a resolved model with systems, containers, components, data, and callables
  • when the model is adapted into the software graph
  • then every system, container, component, and person becomes a graph node
  • but data and callables are not placed
Flow Flow — StructuralNodesOnly scroll to zoom · drag to pan
FEATUREStructuralNodesOnlyfor AdapterGIVENa resolved model with systems,containers, components, data, andcallablesWHENthe model is adapted into the softwaregraphTHENevery system, container, component,and person becomes a graph nodeBUTdata and callables are not placed
CallsLiftAndTallyTraffic

Calls lift to the structural level and tally as directed traffic.

  • given a call from one component's body into another node
  • when relationships are collected
  • then the call lifts to the nearest enclosing structural node on each end
  • and repeated calls between the same pair sum into one directed edge's traffic
  • but a call that lifts to the same node on both ends is dropped
Flow Flow — CallsLiftAndTallyTraffic scroll to zoom · drag to pan
FEATURECallsLiftAndTallyTrafficfor AdapterGIVENa call from one component's body intoanother nodeWHENrelationships are collectedTHENthe call lifts to the nearestenclosing structural node on each endANDrepeated calls between the same pairsum into one directed edge's trafficBUTa call that lifts to the same node onboth ends is dropped
ContainmentTree

Containment is a tree rooted at the top-level systems.

  • given a system holding containers that hold components
  • when the graph is built
  • then each node records its enclosing parent and the ids it contains
  • and the top-level systems are the containment roots, in declaration order
Flow Flow — ContainmentTree scroll to zoom · drag to pan
FEATUREContainmentTreefor AdapterGIVENa system holding containers that holdcomponentsWHENthe graph is builtTHENeach node records its enclosing parentand the ids it containsANDthe top-level systems are thecontainment roots, in declarationorder
data

C4Level #

public
universe::C4Level

The C4 abstraction level a node sits at. Only these four enter the graph; data and callables do not — a relationship through them is lifted to the nearest enclosing structural node.

Entities Entity diagram scroll to zoom · drag to pan
UNIONC4LevelSystemContainerComponentPersonRECORDContainerofstringRECORDComponentofstring
data

EdgeOut #

public
universe::EdgeOut

One relationship in the flat snapshot, with its traffic (call count).

Inbound

Entities Entity diagram scroll to zoom · drag to pan
RECORDEdgeOutsourcestringtostringtrafficnumber
component

Flatten #

private
universe::Flatten

Flattens the software graph into the renderer-facing snapshot: each node's id, level string, and parent id; each relationship's endpoints and traffic. The boundary the web IDE reads — petgraph indices never cross it.

Parent

Inbound

Outbound

Scenarios

SnapshotIsDeterministic

The snapshot is deterministic and free of engine internals.

  • given the same software graph flattened twice
  • when the snapshots are compared
  • then nodes and edges appear in the same stable order both times
  • but no petgraph index or other engine internal crosses the boundary
Flow Flow — SnapshotIsDeterministic scroll to zoom · drag to pan
FEATURESnapshotIsDeterministicfor FlattenGIVENthe same software graph flattenedtwiceWHENthe snapshots are comparedTHENnodes and edges appear in the samestable order both timesBUTno petgraph index or other engineinternal crosses the boundary
data

FlowDef #

public
universe::FlowDef

One entry-point flow: the entry callable's FQN and simple name, the flow's palette colour, and its ordered legs. The renderer draws one filament chain per flow and streams its beads in the flow's colour.

Inbound

Entities Entity diagram scroll to zoom · drag to pan
RECORDFlowDeffqnstringnamestringcolorstringhopsuniverse::FlowHop[]RECORDFlowHopsourcestringtostringlabelstring
data

FlowHop #

public
universe::FlowHop

One call leg of a flow: the caller and callee as structural node ids (the same ids the snapshot places), plus the message label shown on the leg.

Inbound

Entities Entity diagram scroll to zoom · drag to pan
RECORDFlowHopsourcestringtostringlabelstring
component

FlowTracer #

private
universe::FlowTracer

Traces every entry-point flow: a triggered callable (or a person-owned action) starts a flow; its sequence projection is walked call-by-call and each leg's endpoints lift to the nearest placed structural node — the same lift the Adapter applies to relationships, so flows and edges agree. Colours key from the entry's FQN by a stable hash into a fixed palette — the same keying the web IDE paints with — so a flow keeps its hue everywhere it appears and an unrelated model edit never recolours it.

Parent

Inbound

Outbound

Scenarios

EntryPointsStartFlows

A triggered callable or a person-owned action starts a flow.

  • given a model with trigger-macro callables and person-owned actions
  • when flows are traced
  • then each triggered callable and each person-owned callable yields one flow
  • and entries are ordered by FQN so the set is stable
Flow Flow — EntryPointsStartFlows scroll to zoom · drag to pan
FEATUREEntryPointsStartFlowsfor FlowTracerGIVENa model with trigger-macro callablesand person-owned actionsWHENflows are tracedTHENeach triggered callable and eachperson-owned callable yields one flowANDentries are ordered by FQN so the setis stable
FlowsLiftToStructuralNodes

Flow legs land on the structural nodes the renderer places.

  • given a flow whose calls land on components and callables
  • when its hops are traced
  • then each leg's caller and callee lift to the nearest placed structural node
  • but a leg whose ends lift to the same node, or fail to lift, is dropped
Flow Flow — FlowsLiftToStructuralNodes scroll to zoom · drag to pan
FEATUREFlowsLiftToStructuralNodesfor FlowTracerGIVENa flow whose calls land on componentsand callablesWHENits hops are tracedTHENeach leg's caller and callee lift tothe nearest placed structural nodeBUTa leg whose ends lift to the samenode, or fail to lift, is dropped
FlowsAreDeterministic

Flows are deterministic: same model, same flows, same colours.

  • given the same model traced twice
  • when the flow sets are compared
  • then flows, hops, and colours are identical
  • and a colour keys from its entry's FQN, so an unrelated model edit never recolours a flow
Flow Flow — FlowsAreDeterministic scroll to zoom · drag to pan
FEATUREFlowsAreDeterministicfor FlowTracerGIVENthe same model traced twiceWHENthe flow sets are comparedTHENflows, hops, and colours are identicalANDa colour keys from its entry's FQN, soan unrelated model edit neverrecolours a flow
data

GraphNode #

private
universe::GraphNode

A structural node in the software graph: its stable model FQN, its C4 level, and its place in the containment tree (the enclosing node, empty for a top-level system, and the ids it contains). No position — the renderer places it.

Inbound

Entities Entity diagram scroll to zoom · drag to pan
RECORDGraphNodeidstringleveluniverse::C4Levelparentstringchildrenstring[]UNIONC4LevelSystemContainerComponentPerson
data

NodeOut #

public
universe::NodeOut

One node in the flat snapshot: its id, C4 level as a lowercase string, and the id of its containment parent (empty for a top-level system).

Inbound

Entities Entity diagram scroll to zoom · drag to pan
RECORDNodeOutidstringlevelstringparentstring
data

Relationship #

private
universe::Relationship

A directed relationship between two structural nodes, weighted by `traffic` — the number of underlying calls lifted onto the pair. Self-relationships are dropped; the count drives the renderer's flow animation.

Entities Entity diagram scroll to zoom · drag to pan
RECORDRelationshipsourcestringtostringtrafficnumber
data

Snapshot #

public
universe::Snapshot

The flat, serialisable contract the web IDE's `ForceGraph` consumes: nodes and directed weighted edges, with no engine internals (petgraph indices) leaking across the boundary. Positions are not here.

Inbound

Entities Entity diagram scroll to zoom · drag to pan
RECORDSnapshotnodesuniverse::NodeOut[]edgesuniverse::EdgeOut[]RECORDNodeOutidstringlevelstringparentstringRECORDEdgeOutsourcestringtostringtrafficnumber
data

SoftwareGraph #

public
universe::SoftwareGraph

The software graph: structural nodes with the containment tree, directed relationship edges weighted by traffic, and the top-level systems (the containment roots, in model-declaration order). The crate's in-memory form, before flattening to a renderer-facing `Snapshot`.

Entities Entity diagram scroll to zoom · drag to pan
RECORDSoftwareGraphnodesuniverse::GraphNode[]relationshipsuniverse::Relationship[]rootsstring[]RECORDGraphNodeidstringleveluniverse::C4Levelparentstringchildrenstring[]RECORDRelationshipsourcestringtostringtrafficnumber
container

Universe #

public
universe::Universe

`crates/pseudoscript-universe`. Maps the resolved C4 model into the software graph the 3D view renders, then flattens it to a determinstic snapshot.

Inbound

Outbound

Scenarios

PositionsAreTheRenderersJob

Layout is the renderer's job, not this crate's.

  • given a software-graph snapshot
  • when the web IDE renders the 3D view
  • then d3-force-3d assigns every node a position in the browser
  • but the crate carries no coordinates — it is pure structure and traffic
Flow Flow — PositionsAreTheRenderersJob scroll to zoom · drag to pan
FEATUREPositionsAreTheRenderersJobfor UniverseGIVENa software-graph snapshotWHENthe web IDE renders the 3D viewTHENd3-force-3d assigns every node aposition in the browserBUTthe crate carries no coordinates — itis pure structure and traffic
Components Component diagram scroll to zoom · drag to pan
PseudoscriptUniverseCOMPONENTAdapterAdapts a resolved model into the softwaregraph: keeps only the structural nodes,…COMPONENTFlowTracerTraces every entry-point flow: a triggeredcallable (or a person-owned action) starts …COMPONENTFlattenFlattens the software graph into therenderer-facing snapshot: each node's id,…CONTAINERDoc`crates/pseudoscript-doc`. Turns a resolvedgraph into a Svelte-rendered,…CONTAINEREmit`crates/pseudoscript-emit`. Projects a viewinto a `Scene` and renders it to SVG; C4…CONTAINERIdeSession`crates/pseudoscript-ide` — the IDEapplication, Rust compiled to a single wasm…CONTAINERModel`crates/pseudoscript-model`. AST to oneresolved graph; static checks (resolution,…projectprepareDiagnosticscheckcheckWorkspaceModulesgraphgraphproject
Generated by pds doc.