-
Notifications
You must be signed in to change notification settings - Fork 1
Description
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
- Add a new index for domain-to-domain relationships (outgoing + incoming)
- In the relationship switch, add a
defaultcase for relationships where both endpoints are Domain nodes - In
writeGraphData(),writeMermaidDiagram(), andwriteDomainBody(), 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).