Skip to content
This repository was archived by the owner on Apr 2, 2026. It is now read-only.
This repository was archived by the owner on Apr 2, 2026. It is now read-only.

Domain entity pages missing inter-domain relationships #5

@jonathanpopham

Description

@jonathanpopham

Problem

Domain entity pages on repos.supermodeltools.com show no relationships between domains. Each domain page only displays its subdomain children — never connections to other domains.

Root Cause

The Supermodel API does return inter-domain relationships in graph.relationships. For example, against supermemoryai/openclaw-supermemory, the supermodel endpoint returns 8 inter-domain edges like:

domain:OpenClawPlugin --[DOMAIN_RELATES]--> domain:SupermemoryClient  strength=1
domain:InteractiveTools --[processes_requests_from]--> domain:SupermemoryClient  strength=0.9
domain:WorkflowHooks --[persists_data_to]--> domain:SupermemoryClient  strength=0.8

But graph2md (now internal/graph2md/graph2md.go) silently drops them at two points:

1. Relationship indexing (graph2md.go:167-207)

The switch rel.Type block only handles: IMPORTS, calls, CONTAINS_FILE, DEFINES_FUNCTION, DECLARES_CLASS, DEFINES, CHILD_DIRECTORY, EXTENDS, belongsTo, partOf.

There is no case for DOMAIN_RELATES or any of the custom inter-domain types (dependsOn, processes_requests_from, persists_data_to, manages_state_of, triggers_analysis_in, coordinates_workflow_with, sends_events_to, etc.). These relationships are iterated over but hit no case, so they're silently discarded.

2. Domain graph_data rendering (graph2md.go:1578-1586)

writeGraphData() for Domain entities only adds subdomain children:

if c.label == "Domain" {
    domName := getStr(c.node.Properties, "name")
    relSets = append(relSets, struct {...}{c.domainSubdomains[domName], "contains", false})
}

Even if inter-domain relationships were indexed, there's no code here to look them up and add related domain nodes/edges to the graph_data.

3. Mermaid diagram (graph2md.go:1791-1806) and body (graph2md.go:1067-1087)

Same pattern — Domain entities only render subdomains, never related domains.

Proposed Fix

  1. Add a new index for domain-to-domain relationships (outgoing + incoming)
  2. In the relationship switch, add a default case for relationships where both endpoints are Domain nodes
  3. In writeGraphData(), writeMermaidDiagram(), and writeDomainBody(), include related domain nodes/edges

The D3 rendering code in the templates already supports arbitrary edge types. The edges will render as soon as the data is present in graph_data.

Impact

Every domain page on every repo on repos.supermodeltools.com is affected. The API is generating useful inter-domain relationship data (with strength scores and reasons) that is completely invisible to users.

Migrated from supermodeltools/graph2md#1 (archived repo).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions