Graph projection and edge aggregation
A sequence diagram generated by Archify.
Prepare a graph for layout
Reusable projection session
Select the visible graph
Read nodes, ancestors and cycles
Indexed membership and hierarchy
Original edges + representatives
Directed aggregates + provenance
Visible view + hidden-edge accounting
Reproject after scope changes
Updated inputs for node placement
Layout session · Sequence participant · @topo/graph.createLayoutSession prepares the view data needed to place nodes. It creates a projection session once, then calls session.project(options) for each layout request. The returned visible entities and relationships are passed to layoutProjection to compute coordinates.
This diagram shows that initiating layout unit asking for membership and relationships, not the downstream coordinate-placement algorithm. The one-shot layoutGraphWithArchitecture path uses the same projection core without retaining a session.
Layout session
Indexed snapshot · Sequence participant · createProjectionSession copies the fields needed for projection, validates graph/architecture identity, and indexes nodes, directory ancestors, cycle groups and spine-edge IDs. The returned session closes over that index and exposes a frozen graph reference.
The architecture input was prepared earlier by deriveArchitecture. Its cycle grouping uses Tarjan-style strongly connected components; that detection is not called anew for every expand/collapse request.
Indexed snapshot
Projection · Sequence participant · projectIndexedGraph validates options and requested member/cycle IDs. For each included node, choose its collapsed cycle representative, otherwise its first closed directory ancestor, otherwise itself. External exclusions are explicit.
Build visible entities and containers, ask for directed aggregates, and separately account for original edges whose endpoints collapse inside the same visible group. IDs/order remain stable for the same inputs and options.
Projection
Edge aggregation · Sequence participant · aggregateDirectedEdges maps every original edge through the representative map, groups equal directed endpoint pairs, and retains original edge IDs, directions, types and weights. Opposite directions remain distinct. Same-representative edges are accounted for by Projection instead of drawn as misleading cross-group arrows.
Optional sparse selection retains weighted coverage plus spine edges; the default policy is 83% of represented edge weight, not 83% of nodes. It is not a minimum spanning tree or automatic community/architecture discovery.
Edge aggregation
Diagram guide
Explore this system
×
Inspecting compiled semantics
01
Find any node Search labels, responsibilities, kinds, and stable IDs.
/
02
Trace a route Ask how two semantic nodes connect in authored direction.
R
03
See the whole system Open Semantic Radar with a live viewport and stable nodes.
M
04
Compare semantic kinds Count roles, reveal their traffic, and compare direct authored links.
L
05
Enter Presentation Stage Give the live diagram the viewport without changing export.
F
E ExportT ThemeS Style0 Reset+ Zoom in- Zoom outEsc Close
Find a node
×
⌕
/
No matching nodes
Semantic passport
Authored reach
Upstream 0
Downstream 0
×
Copy link
Relations
Path
Click where the path starts
Find start
Copy link
Clear
Click two nodes on the diagram
←
▶
Journey
→
Overview
Click a start, then an end. Paths follow the arrows.
Semantic lens
Compare responsibilities
×
Choose up to two authored roles. Highlight only the relationships drawn in this story: not runtime traffic, transitive impact, or the complete dependency graph. One role includes connected peers; two compare direct cross-role arrows.
Choose a kind to inspect its nodes and touching relationships.
Copy link
Clear
Semantic radar
Building overview
Open radar
×
Click node Drag to pan
Semantic radar needs more MAP space.
Notes & index
PATH
MAP
LENS
READ 100%