Workspace Intelligence / JSON Schema
Workspai Doctor Graph Diagnosis
Defines the versioned doctor graph diagnosis v1 boundary used by Workspai and its consumers.
- Schema version
doctor-graph-diagnosis.v1- Contract path
contracts/workspace-intelligence/doctor-graph-diagnosis.v1.json- Publication
- json-schema
- Defined fields
- 55
- Artifact bindings
- 0
Why this contract exists
Architecture role
Relates workspace structure and change so downstream reasoning remains traceable.
Consumption boundary
- • Workspai CLI
- • CI and release automation
- • Developers
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 |
|---|---|---|---|---|
| $defs.entityRef.id | string | Yes | Defines the id value at this contract boundary. | minLength: 1 |
| $defs.entityRef.kind | enum | Yes | Defines the kind value at this contract boundary. | enum: workspace, project, service, api, endpoint, schema, package, module, file, symbol, database, queue, container, deployment, pipeline, environment, document, decision, test-suite, owner |
| $defs.entityRef.label | string | Yes | Defines the label value at this contract boundary. | minLength: 1 |
| $defs.entityRef.projectId | string | No | Defines the projectid value at this contract boundary. | — |
| $defs.finding.affectedEntities | array | Yes | Defines the affectedentities value at this contract boundary. | — |
| $defs.finding.issueClass | string | Yes | Defines the issueclass value at this contract boundary. | minLength: 1 |
| $defs.finding.issueId | string | Yes | Defines the issueid value at this contract boundary. | minLength: 1 |
| $defs.finding.proofPaths | array | Yes | Defines the proofpaths value at this contract boundary. | — |
| $defs.finding.reason | string | Yes | Defines the reason value at this contract boundary. | minLength: 1 |
| $defs.finding.rootEntities | array | Yes | Defines the rootentities value at this contract boundary. | — |
| $defs.finding.scope | string | Yes | Defines the scope value at this contract boundary. | const: "structural-impact-candidates" |
| $defs.finding.sourceArtifacts | array | Yes | Defines the sourceartifacts value at this contract boundary. | — |
| $defs.finding.status | enum | Yes | Defines the status value at this contract boundary. | enum: warn, fail |
| $defs.finding.subjects | array | Yes | Defines the subjects value at this contract boundary. | — |
| $defs.finding.unknowns | array | Yes | Defines the unknowns value at this contract boundary. | — |
| $defs.finding.unresolvedSubjects | array | Yes | Defines the unresolvedsubjects value at this contract boundary. | — |
| $defs.finding.verificationTargets | array | Yes | Defines the verificationtargets value at this contract boundary. | — |
| $defs.hop.direction | enum | Yes | Defines the direction value at this contract boundary. | enum: forward, reverse |
| $defs.hop.from | string | Yes | Defines the from value at this contract boundary. | minLength: 1 |
| $defs.hop.kind | enum | Yes | Defines the kind value at this contract boundary. | enum: contains, defines, imports, depends-on, exposes, implements, calls, reads-from, writes-to, publishes, consumes, deploys, runs-on, routes-to, documents, decided-by, tests, owns, generated-by, configured-by, references |
| $defs.hop.proofIds | array | Yes | Defines the proofids value at this contract boundary. | — |
| $defs.hop.relationId | string | Yes | Defines the relationid value at this contract boundary. | minLength: 1 |
| $defs.hop.to | string | Yes | Defines the to value at this contract boundary. | minLength: 1 |
| $defs.proofPath.entityPath | array | Yes | Defines the entitypath value at this contract boundary. | — |
| $defs.proofPath.from | string | Yes | Defines the from value at this contract boundary. | minLength: 1 |
| $defs.proofPath.hops | array | Yes | Defines the hops value at this contract boundary. | — |
| $defs.proofPath.proofIds | array | Yes | Defines the proofids value at this contract boundary. | — |
| $defs.proofPath.to | string | Yes | Defines the to value at this contract boundary. | minLength: 1 |
| claimBoundary | string | Yes | Defines the claimboundary value at this contract boundary. | minLength: 1 |
| diagnostics | array | Yes | Defines the diagnostics value at this contract boundary. | — |
| findings | array | Yes | Defines the findings value at this contract boundary. | — |
| generatedAt | string | Yes | Defines the generatedat value at this contract boundary. | format: date-time |
| graph | object | Yes | Defines the graph value at this contract boundary. | additionalProperties: false |
| graph.artifact | string | Yes | Defines the artifact value at this contract boundary. | const: ".workspai/reports/workspace-knowledge-graph.json" |
| graph.entityCount | integer | No | Defines the entitycount value at this contract boundary. | minimum: 0 |
| graph.proofCount | integer | No | Defines the proofcount value at this contract boundary. | minimum: 0 |
| graph.relationCount | integer | No | Defines the relationcount value at this contract boundary. | minimum: 0 |
| graph.schemaVersion | string | No | Defines the schemaversion value at this contract boundary. | — |
| graph.sourceArtifact | string | No | Defines the sourceartifact value at this contract boundary. | — |
| graph.sourceHash | string | No | Defines the sourcehash value at this contract boundary. | — |
| project | object | Yes | Defines the project value at this contract boundary. | additionalProperties: false |
| project.entityId | string | No | Defines the entityid value at this contract boundary. | minLength: 1 |
| project.name | string | Yes | Defines the name value at this contract boundary. | minLength: 1 |
| project.path | string | Yes | Defines the path value at this contract boundary. | — |
| schemaVersion | string | Yes | Defines the schemaversion value at this contract boundary. | const: "doctor-graph-diagnosis.v1" |
| status | enum | Yes | Defines the status value at this contract boundary. | enum: available, graph-missing, model-missing, stale, project-unresolved, invalid |
| summary | object | Yes | Defines the summary value at this contract boundary. | additionalProperties: false |
| summary.affectedEntityCount | integer | Yes | Defines the affectedentitycount value at this contract boundary. | minimum: 0 |
| summary.findingCount | integer | Yes | Defines the findingcount value at this contract boundary. | minimum: 0 |
| summary.proofPathCount | integer | Yes | Defines the proofpathcount value at this contract boundary. | minimum: 0 |
| summary.rootEntityCount | integer | Yes | Defines the rootentitycount value at this contract boundary. | minimum: 0 |
| summary.subjectCount | integer | Yes | Defines the subjectcount value at this contract boundary. | minimum: 0 |
| summary.unknownCount | integer | Yes | Defines the unknowncount value at this contract boundary. | minimum: 0 |
| summary.unresolvedSubjectCount | integer | Yes | Defines the unresolvedsubjectcount value at this contract boundary. | minimum: 0 |
| summary.verificationTargetCount | integer | Yes | Defines the verificationtargetcount 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://workspai.dev/schemas/workspace-intelligence/doctor-graph-diagnosis.v1.json",
"title": "Workspai Doctor Graph Diagnosis",
"type": "object",
"required": [
"schemaVersion",
"generatedAt",
"status",
"claimBoundary",
"graph",
"project",
"summary",
"findings",
"diagnostics"
],
"properties": {
"schemaVersion": {
"const": "doctor-graph-diagnosis.v1"
},
"generatedAt": {
"type": "string",
"format": "date-time"
},
"status": {
"enum": [
"available",
"graph-missing",
"model-missing",
"stale",
"project-unresolved",
"invalid"
]
},
"claimBoundary": {
"type": "string",
"minLength": 1
},
"graph": {
"type": "object",
"required": [
"artifact"
],
"properties": {
"artifact": {
"const": ".workspai/reports/workspace-knowledge-graph.json"
},
"schemaVersion": {
"type": "string"
},
"sourceArtifact": {
"type": "string"
},
"sourceHash": {
"type": "string"
},
"entityCount": {
"type": "integer",
"minimum": 0
},
"relationCount": {
"type": "integer",
"minimum": 0
},
"proofCount": {
"type": "integer",
"minimum": 0
}
},
"additionalProperties": false
},
"project": {
"type": "object",
"required": [
"name",
"path"
],
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"path": {
"type": "string"
},
"entityId": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false
},
"summary": {
"type": "object",
"required": [
"findingCount",
"rootEntityCount",
"affectedEntityCount",
"verificationTargetCount",
"proofPathCount",
"subjectCount",
"unresolvedSubjectCount",
"unknownCount"
],
"properties": {
"findingCount": {
"type": "integer",
"minimum": 0
},
"rootEntityCount": {
"type": "integer",
"minimum": 0
},
"affectedEntityCount": {
"type": "integer",
"minimum": 0
},
"verificationTargetCount": {
"type": "integer",
"minimum": 0
},
"proofPathCount": {
"type": "integer",
"minimum": 0
},
"subjectCount": {
"type": "integer",
"minimum": 0
},
"unresolvedSubjectCount": {
"type": "integer",
"minimum": 0
},
"unknownCount": {
"type": "integer",
"minimum": 0
}
},
"additionalProperties": false
},
"findings": {
"type": "array",
"items": {
"$ref": "#/$defs/finding"
}
},
"diagnostics": {
"type": "array",
"items": {
"type": "string"
}
}
},
"$defs": {
"entityRef": {
"type": "object",
"required": [
"id",
"kind",
"label"
],
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"kind": {
"enum": [
"workspace",
"project",
"service",
"api",
"endpoint",
"schema",
"package",
"module",
"file",
"symbol",
"database",
"queue",
"container",
"deployment",
"pipeline",
"environment",
"document",
"decision",
"test-suite",
"owner"
]
},
"label": {
"type": "string",
"minLength": 1
},
"projectId": {
"type": "string"
}
},
"additionalProperties": false
},
"hop": {
"type": "object",
"required": [
"from",
"to",
"relationId",
"kind",
"direction",
"proofIds"
],
"properties": {
"from": {
"type": "string",
"minLength": 1
},
"to": {
"type": "string",
"minLength": 1
},
"relationId": {
"type": "string",
"minLength": 1
},
"kind": {
"enum": [
"contains",
"defines",
"imports",
"depends-on",
"exposes",
"implements",
"calls",
"reads-from",
"writes-to",
"publishes",
"consumes",
"deploys",
"runs-on",
"routes-to",
"documents",
"decided-by",
"tests",
"owns",
"generated-by",
"configured-by",
"references"
]
},
"direction": {
"enum": [
"forward",
"reverse"
]
},
"proofIds": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"proofPath": {
"type": "object",
"required": [
"from",
"to",
"entityPath",
"hops",
"proofIds"
],
"properties": {
"from": {
"type": "string",
"minLength": 1
},
"to": {
"type": "string",
"minLength": 1
},
"entityPath": {
"type": "array",
"items": {
"type": "string"
}
},
"hops": {
"type": "array",
"items": {
"$ref": "#/$defs/hop"
}
},
"proofIds": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"finding": {
"type": "object",
"required": [
"issueId",
"issueClass",
"status",
"reason",
"scope",
"subjects",
"unresolvedSubjects",
"rootEntities",
"affectedEntities",
"verificationTargets",
"proofPaths",
"sourceArtifacts",
"unknowns"
],
"properties": {
"issueId": {
"type": "string",
"minLength": 1
},
"issueClass": {
"type": "string",
"minLength": 1
},
"status": {
"enum": [
"warn",
"fail"
]
},
"reason": {
"type": "string",
"minLength": 1
},
"scope": {
"const": "structural-impact-candidates"
},
"subjects": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"unresolvedSubjects": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"rootEntities": {
"type": "array",
"items": {
"$ref": "#/$defs/entityRef"
}
},
"affectedEntities": {
"type": "array",
"items": {
"$ref": "#/$defs/entityRef"
}
},
"verificationTargets": {
"type": "array",
"items": {
"$ref": "#/$defs/entityRef"
}
},
"proofPaths": {
"type": "array",
"items": {
"$ref": "#/$defs/proofPath"
}
},
"sourceArtifacts": {
"type": "array",
"items": {
"type": "string"
}
},
"unknowns": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}