Workspace Intelligence / JSON Schema
Workspai Workspace Dependency Graph
First-class, versioned dependency graph of inter-project relationships consumed by impact, verify, run --blast-radius, and risk weighting.
- Schema version
workspace-dependency-graph.v1- Contract path
contracts/workspace-intelligence/workspace-dependency-graph.v1.json- Publication
- json-schema
- Defined fields
- 49
- Artifact bindings
- 0
Why this contract exists
Architecture role
Relates workspace structure and change so downstream reasoning remains traceable.
Consumption boundary
- • Workspai CLI
- • Workspace Intelligence consumers
- • IDEs and agents
Related commands
Commands are linked only when the runtime contract identifies a direct production relationship. Supporting contracts may be consumed without having a single producer command.
This is a supporting, capability, cache, compatibility, or consumer contract. It has no single direct producer command in the canonical Workspace Intelligence execution registry.
Produced artifacts
These durable files are emitted by registered commands and validated against this contract.
No canonical file artifact is registered for this contract. It may describe capabilities, embedded data, runtime exchange, or supporting state instead of a standalone report.
Field reference
Every declared schema property or published capability path is listed here. Required means the contract declares or publishes that field at the shown boundary.
| Field path | Type | Required | Meaning | Constraints |
|---|---|---|---|---|
| diagnostics | array | No | Defines the diagnostics value at this contract boundary. | — |
| diagnostics[].code | string | Yes | Defines the code value at this contract boundary. | minLength: 1 |
| diagnostics[].message | string | Yes | Defines the message value at this contract boundary. | minLength: 1 |
| diagnostics[].nodeIds | array | No | Defines the nodeids value at this contract boundary. | — |
| diagnostics[].recommendation | string | No | Defines the recommendation value at this contract boundary. | — |
| diagnostics[].severity | enum | Yes | Defines the severity value at this contract boundary. | enum: info, warning, error |
| edges | array | Yes | Defines the edges value at this contract boundary. | — |
| edges[].confidence | enum | Yes | Defines the confidence value at this contract boundary. | enum: high, medium, low |
| edges[].evidence | array | Yes | Defines the evidence value at this contract boundary. | — |
| edges[].evidence[].detail | string | No | Defines the detail value at this contract boundary. | — |
| edges[].evidence[].file | string | Yes | Defines the file value at this contract boundary. | minLength: 1 |
| edges[].from | string | Yes | Defines the from value at this contract boundary. | minLength: 1 |
| edges[].kind | enum | Yes | Defines the kind value at this contract boundary. | enum: code-import, package-dep, event-pub-sub, service-dependsOn, shared-resource |
| edges[].source | enum | Yes | Defines the source value at this contract boundary. | enum: inferred, contract, manual |
| edges[].to | string | Yes | Defines the to value at this contract boundary. | minLength: 1 |
| generatedAt | string | Yes | Defines the generatedat value at this contract boundary. | format: date-time |
| nodes | array | Yes | Defines the nodes value at this contract boundary. | — |
| nodes[].framework | string | No | Defines the framework value at this contract boundary. | — |
| nodes[].id | string | Yes | Defines the id value at this contract boundary. | minLength: 1 |
| nodes[].kind | string | No | Defines the kind value at this contract boundary. | — |
| nodes[].operationalProfile | object | No | Defines the operationalprofile value at this contract boundary. | additionalProperties: true |
| nodes[].operationalProfile.centrality | object | Yes | Defines the centrality value at this contract boundary. | additionalProperties: true |
| nodes[].operationalProfile.centrality.betweenness | number | Yes | Defines the betweenness value at this contract boundary. | minimum: 0 |
| nodes[].operationalProfile.centrality.fanIn | integer | Yes | Defines the fanin value at this contract boundary. | minimum: 0 |
| nodes[].operationalProfile.centrality.fanOut | integer | Yes | Defines the fanout value at this contract boundary. | minimum: 0 |
| nodes[].operationalProfile.centrality.isHotspot | boolean | Yes | Defines the ishotspot value at this contract boundary. | — |
| nodes[].operationalProfile.centrality.reach | integer | Yes | Defines the reach value at this contract boundary. | minimum: 0 |
| nodes[].operationalProfile.reasons | array | Yes | Defines the reasons value at this contract boundary. | — |
| nodes[].operationalProfile.score | integer | Yes | Defines the score value at this contract boundary. | minimum: 0 · maximum: 100 |
| nodes[].operationalProfile.verificationPriority | enum | Yes | Defines the verificationpriority value at this contract boundary. | enum: normal, elevated, strict |
| nodes[].operationalProfile.weight | enum | Yes | Defines the weight value at this contract boundary. | enum: low, medium, high, critical |
| nodes[].path | string | Yes | Defines the path value at this contract boundary. | minLength: 1 |
| nodes[].runtime | string | No | Defines the runtime value at this contract boundary. | — |
| schemaVersion | string | Yes | Defines the schemaversion value at this contract boundary. | const: "workspace-dependency-graph.v1" |
| stats | object | Yes | Defines the stats value at this contract boundary. | additionalProperties: true |
| stats.authoritativeEdges | integer | Yes | Defines the authoritativeedges value at this contract boundary. | minimum: 0 |
| stats.connectedNodeCount | integer | Yes | Defines the connectednodecount value at this contract boundary. | minimum: 0 |
| stats.contractEdges | integer | Yes | Defines the contractedges value at this contract boundary. | minimum: 0 |
| stats.density | number | Yes | Defines the density value at this contract boundary. | minimum: 0 |
| stats.edgeCount | integer | Yes | Defines the edgecount value at this contract boundary. | minimum: 0 |
| stats.edgeCoverageRatio | number | Yes | Defines the edgecoverageratio value at this contract boundary. | minimum: 0 · maximum: 1 |
| stats.evidenceCoverageRatio | number | Yes | Defines the evidencecoverageratio value at this contract boundary. | minimum: 0 · maximum: 1 |
| stats.hasCycle | boolean | Yes | Defines the hascycle value at this contract boundary. | — |
| stats.hotspotCount | integer | Yes | Defines the hotspotcount value at this contract boundary. | minimum: 0 |
| stats.inferredEdges | integer | Yes | Defines the inferrededges value at this contract boundary. | minimum: 0 |
| stats.lowConfidenceEdges | integer | Yes | Defines the lowconfidenceedges value at this contract boundary. | minimum: 0 |
| stats.manualEdges | integer | Yes | Defines the manualedges value at this contract boundary. | minimum: 0 |
| stats.nodeCount | integer | Yes | Defines the nodecount value at this contract boundary. | minimum: 0 |
| stats.orphanCount | integer | Yes | Defines the orphancount value at this contract boundary. | minimum: 0 |
Canonical machine-readable definition
The raw synchronized contract remains authoritative. The educational sections above are projections of this definition.
Show raw JSON
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://getrapidkit.com/schemas/workspace-dependency-graph.v1.json",
"title": "Workspai Workspace Dependency Graph",
"description": "First-class, versioned dependency graph of inter-project relationships consumed by impact, verify, run --blast-radius, and risk weighting.",
"type": "object",
"required": [
"schemaVersion",
"generatedAt",
"nodes",
"edges",
"stats"
],
"properties": {
"schemaVersion": {
"const": "workspace-dependency-graph.v1"
},
"generatedAt": {
"type": "string",
"format": "date-time"
},
"nodes": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"path"
],
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"path": {
"type": "string",
"minLength": 1
},
"runtime": {
"type": "string"
},
"framework": {
"type": "string"
},
"kind": {
"type": "string"
},
"operationalProfile": {
"type": "object",
"required": [
"weight",
"score",
"verificationPriority",
"reasons",
"centrality"
],
"properties": {
"weight": {
"enum": [
"low",
"medium",
"high",
"critical"
]
},
"score": {
"type": "integer",
"minimum": 0,
"maximum": 100
},
"verificationPriority": {
"enum": [
"normal",
"elevated",
"strict"
]
},
"reasons": {
"type": "array",
"items": {
"type": "string"
}
},
"centrality": {
"type": "object",
"required": [
"fanIn",
"fanOut",
"reach",
"betweenness",
"isHotspot"
],
"properties": {
"fanIn": {
"type": "integer",
"minimum": 0
},
"fanOut": {
"type": "integer",
"minimum": 0
},
"reach": {
"type": "integer",
"minimum": 0
},
"betweenness": {
"type": "number",
"minimum": 0
},
"isHotspot": {
"type": "boolean"
}
},
"additionalProperties": true
}
},
"additionalProperties": true
}
},
"additionalProperties": true
}
},
"edges": {
"type": "array",
"items": {
"type": "object",
"required": [
"from",
"to",
"kind",
"source",
"confidence",
"evidence"
],
"properties": {
"from": {
"type": "string",
"minLength": 1
},
"to": {
"type": "string",
"minLength": 1
},
"kind": {
"enum": [
"code-import",
"package-dep",
"event-pub-sub",
"service-dependsOn",
"shared-resource"
]
},
"source": {
"enum": [
"inferred",
"contract",
"manual"
]
},
"confidence": {
"enum": [
"high",
"medium",
"low"
]
},
"evidence": {
"type": "array",
"items": {
"type": "object",
"required": [
"file"
],
"properties": {
"file": {
"type": "string",
"minLength": 1
},
"detail": {
"type": "string"
}
},
"additionalProperties": true
}
}
},
"additionalProperties": true
}
},
"stats": {
"type": "object",
"required": [
"nodeCount",
"edgeCount",
"inferredEdges",
"contractEdges",
"manualEdges",
"authoritativeEdges",
"lowConfidenceEdges",
"orphanCount",
"connectedNodeCount",
"density",
"edgeCoverageRatio",
"evidenceCoverageRatio",
"hotspotCount",
"hasCycle"
],
"properties": {
"nodeCount": {
"type": "integer",
"minimum": 0
},
"edgeCount": {
"type": "integer",
"minimum": 0
},
"inferredEdges": {
"type": "integer",
"minimum": 0
},
"contractEdges": {
"type": "integer",
"minimum": 0
},
"manualEdges": {
"type": "integer",
"minimum": 0
},
"authoritativeEdges": {
"type": "integer",
"minimum": 0
},
"lowConfidenceEdges": {
"type": "integer",
"minimum": 0
},
"orphanCount": {
"type": "integer",
"minimum": 0
},
"connectedNodeCount": {
"type": "integer",
"minimum": 0
},
"density": {
"type": "number",
"minimum": 0
},
"edgeCoverageRatio": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"evidenceCoverageRatio": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"hotspotCount": {
"type": "integer",
"minimum": 0
},
"hasCycle": {
"type": "boolean"
}
},
"additionalProperties": true
},
"diagnostics": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"severity",
"message"
],
"properties": {
"code": {
"type": "string",
"minLength": 1
},
"severity": {
"enum": [
"info",
"warning",
"error"
]
},
"message": {
"type": "string",
"minLength": 1
},
"recommendation": {
"type": "string"
},
"nodeIds": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
}
},
"additionalProperties": true
}
}
},
"additionalProperties": true
}