Skip to content

Structural graph

State: open/building · Kind: subsystem · Audience: system

  • The module graph derived by scanning code: repositories, directories, packages and crates, the dependencies they declare and the containment their layout implies.
  • Distinct from the capability graph (C-0063): that one is authored, this one is scanned.

The structural graph answers “how is this project laid out in code”. A walk finds every package.json and Cargo.toml, parses each into a typed manifest, builds the dependency graph the manifests declare, and derives the containment tree the layout implies: one repo root and group nodes for directories that hold manifests but declare none. Nobody authors this containment; it comes from the scan (TM-0036-containment). Malformed manifests degrade to error-carrying entries rather than aborting a walk.

It is a different graph from the capability graph (C-0063). The capability graph holds authored capabilities and their parent_key nesting; the structural graph holds modules as they sit on disk. The two need not line up: a capability can contain capabilities realized in modules far apart in the structure.

SDF’s system-graph service runs the walk fresh on each request (stateless, uncached) and carries the result over the transports as the SystemGraph wire payload; the system-graph experience draws it as a force layout and as a nested-box diagram.

  • Manifest walking, dependency edges and derived containment, implemented twice (a Rust crate and a TypeScript package) and held to one shared fixture tree.
  • The SystemGraph wire types and the SystemGraphClient port a host satisfies to serve it.
  • A desktop adapter that flattens the crate’s model into the wire types the transports carry.
  • A system-graph experience: a Nuxt layer showing the focused project as an interactive graph.
  • C-0025 Manifest graph walking
  • C-0037 System graph wire contract
  • solutions/ontological/crates/manifest-graph/ (Rust walker, called by the desktop service)
  • packages/ts/manifest-graph/ (TypeScript peer implementation and fixture-dump CLI)
  • packages/ts/system-model/ (wire types and the client port, types only)
  • solutions/ontological/desktop/src-tauri/src/system_graph/ (adapter to the wire types)
  • solutions/ontological/experiences/system-graph/ (the viewer experience)
  • solutions/ontological/desktop/src-tauri/src/system_graph/
  • solutions/ontological/experiences/system-graph/
  • packages/ts/manifest-graph/
  • packages/ts/system-model/
  • solutions/ontological/crates/manifest-graph/

← Back to Capabilities