The Houdini Way
In Houdini, you don’t hardcode “this point is red.” Instead, you set an attributeCd = (1, 0, 0) and the renderer reads it. CodeGraph works the same way:
- Any plugin can add any attribute
- The renderer doesn’t need to know about specific plugins
- Users can map any attribute to any visual property
How It Works: Test Coverage Example
1
Plugin writes attributes
The coverage plugin reads your test coverage report and writes
coverage:percent to each node:2
Plugin declares visualization
The plugin tells the frontend how to visualize this attribute:
3
Renderer applies colors
The Three.js renderer reads each node’s
coverage:percent and interpolates the color:Node Attributes vs Edge Attributes
Plugins can write to both nodes and edges:Node Attributes
Properties of code entities (classes, methods, files):| Attribute | Type | Example |
|---|---|---|
coverage:percent | number | 85.5 |
git:churn | number | 47 |
complexity:cyclomatic | number | 12 |
ownership:team | string | "Platform" |
quarterly:commits | number | 23 |
quarterly:active | boolean | true |
Edge Attributes
Properties of relationships (dependencies, calls, inheritance):| Attribute | Type | Example |
|---|---|---|
calls:count | number | 156 |
calls:lastWeek | number | 12 |
coupling:score | number | 0.85 |
dataflow:tainted | boolean | true |
Plugin Examples
Test Coverage Plugin
Color nodes by how well they’re tested:Git Activity Plugin
Show where work is happening and identify hotspots:Quarterly Activity Plugin
Answer “what was worked on this quarter?” for sprint planning and reporting:Dataflow Taint Plugin
Highlight security-sensitive paths through your code:Overlay Types
| Type | Effect | Best For |
|---|---|---|
Color | Node fill color gradient | Continuous metrics (coverage %, complexity) |
Size | Node radius | Magnitude (lines of code, commit count) |
Badge | Icon or label on node | Categories (team, status, language) |
EdgeColor | Edge/line color | Relationship metrics (call frequency, coupling) |
EdgeWidth | Edge thickness | Relationship strength (how often called) |
Renderer Integration
The frontend renderer is generic—it doesn’t know about specific plugins. It just reads attributes and applies visuals:Plugin Interface
Registering Plugins
Via Dependency Injection
Via Plugin Discovery
Place DLLs in theplugins/ directory:
Best Practices
Use Prefixed Attributes
Always prefix:
myplugin:metric not metric. Prevents conflicts between plugins.Clean Removal
Implement
RemoveAsync to delete all your attributes: RemoveAttributesByPrefixAsync("myplugin:")Handle Missing Data
Not all nodes will have data. Skip gracefully, don’t throw exceptions.
Report Progress
For long operations, report progress so users see activity.