Workspace Intelligence / JSON Schema
Workspai Universal Doctor Diagnosis
Defines the versioned doctor diagnosis v1 boundary used by Workspai and its consumers.
- Schema version
workspai.doctor-diagnosis.v1- Contract path
contracts/workspace-intelligence/doctor-diagnosis.v1.json- Publication
- json-schema
- Defined fields
- 82
- Artifact bindings
- 0
Why this contract exists
Architecture role
Carries structured evidence, findings, and verdicts across governance boundaries.
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.causalGroup.causalKey | string | Yes | Defines the causalkey value at this contract boundary. | minLength: 1 |
| $defs.causalGroup.findingIds | array | Yes | Defines the findingids value at this contract boundary. | minItems: 1 |
| $defs.causalGroup.issueClass | string | Yes | Defines the issueclass value at this contract boundary. | minLength: 1 |
| $defs.causalGroup.projectPaths | array | Yes | Defines the projectpaths value at this contract boundary. | minItems: 1 |
| $defs.causalGroup.repairable | boolean | Yes | Defines the repairable value at this contract boundary. | — |
| $defs.causalGroup.status | enum | Yes | Defines the status value at this contract boundary. | enum: blocking, advisory, informational, unknown |
| $defs.finding.applicability | enum | Yes | Defines the applicability value at this contract boundary. | enum: applicable, not-applicable, unknown |
| $defs.finding.causalKey | string | Yes | Defines the causalkey value at this contract boundary. | minLength: 1 |
| $defs.finding.confidence | enum | Yes | Defines the confidence value at this contract boundary. | enum: high, medium, low |
| $defs.finding.confidenceScore | number | Yes | Defines the confidencescore value at this contract boundary. | minimum: 0 · maximum: 1 |
| $defs.finding.diagnosisState | enum | Yes | Defines the diagnosisstate value at this contract boundary. | enum: confirmed, candidate, unknown |
| $defs.finding.id | string | Yes | Defines the id value at this contract boundary. | minLength: 1 |
| $defs.finding.issueClass | string | Yes | Defines the issueclass value at this contract boundary. | minLength: 1 |
| $defs.finding.label | string | Yes | Defines the label value at this contract boundary. | minLength: 1 |
| $defs.finding.operationalImpact | string | Yes | Defines the operationalimpact value at this contract boundary. | minLength: 1 |
| $defs.finding.probeId | string | Yes | Defines the probeid value at this contract boundary. | minLength: 1 |
| $defs.finding.projectName | string | Yes | Defines the projectname value at this contract boundary. | minLength: 1 |
| $defs.finding.projectPath | string | Yes | Defines the projectpath value at this contract boundary. | minLength: 1 |
| $defs.finding.proofs | array | Yes | Defines the proofs value at this contract boundary. | minItems: 1 |
| $defs.finding.recommendation | string | No | Defines the recommendation value at this contract boundary. | minLength: 1 |
| $defs.finding.repair | reference | Yes | Defines the repair value at this contract boundary. | ref: #/$defs/repair |
| $defs.finding.severity | enum | Yes | Defines the severity value at this contract boundary. | enum: info, warn, error |
| $defs.finding.status | enum | Yes | Defines the status value at this contract boundary. | enum: blocking, advisory, informational, unknown |
| $defs.finding.symptom | string | Yes | Defines the symptom value at this contract boundary. | minLength: 1 |
| $defs.proof.claim | string | Yes | Defines the claim value at this contract boundary. | minLength: 1 |
| $defs.proof.kind | enum | Yes | Defines the kind value at this contract boundary. | enum: probe, file, dependency, runtime, command, graph, unknown |
| $defs.proof.ref | string | Yes | Defines the ref value at this contract boundary. | minLength: 1 |
| $defs.proof.role | enum | Yes | Defines the role value at this contract boundary. | enum: observation, repair-target, subject, verification, impact |
| $defs.repair.capabilityId | string | No | Defines the capabilityid value at this contract boundary. | minLength: 1 |
| $defs.repair.disposition | enum | Yes | Defines the disposition value at this contract boundary. | enum: automatic, approval-required, manual, unavailable, not-needed |
| $defs.repair.operationType | string | No | Defines the operationtype value at this contract boundary. | minLength: 1 |
| $defs.repair.requiresFreshEvidence | boolean | Yes | Defines the requiresfreshevidence value at this contract boundary. | — |
| $defs.repair.verifyCommand | string | No | Defines the verifycommand value at this contract boundary. | minLength: 1 |
| capability | object | Yes | Defines the capability value at this contract boundary. | additionalProperties: false |
| capability.adapterId | string | Yes | Defines the adapterid value at this contract boundary. | minLength: 1 |
| capability.confidence | enum | Yes | Defines the confidence value at this contract boundary. | enum: high, medium, low |
| capability.limitations | array | Yes | Defines the limitations value at this contract boundary. | — |
| capability.nativeDomains | reference | Yes | Defines the nativedomains value at this contract boundary. | ref: #/$defs/domainList |
| capability.observableDomains | reference | Yes | Defines the observabledomains value at this contract boundary. | ref: #/$defs/domainList |
| capability.portableDomains | reference | Yes | Defines the portabledomains value at this contract boundary. | ref: #/$defs/domainList |
| capability.registryVersion | string | Yes | Defines the registryversion value at this contract boundary. | minLength: 1 |
| capability.runtimeFamily | string | Yes | Defines the runtimefamily value at this contract boundary. | minLength: 1 |
| capability.tier | enum | Yes | Defines the tier value at this contract boundary. | enum: first-class, extended, fallback |
| capability.unsupportedDomains | reference | Yes | Defines the unsupporteddomains value at this contract boundary. | ref: #/$defs/domainList |
| causalGroups | array | Yes | Defines the causalgroups value at this contract boundary. | — |
| contradictions | array | Yes | Defines the contradictions value at this contract boundary. | — |
| contradictions[].probeId | string | Yes | Defines the probeid value at this contract boundary. | minLength: 1 |
| contradictions[].reason | string | Yes | Defines the reason value at this contract boundary. | minLength: 1 |
| contradictions[].statuses | array | Yes | Defines the statuses value at this contract boundary. | minItems: 2 |
| coverage | object | Yes | Defines the coverage value at this contract boundary. | additionalProperties: false |
| coverage.advisoryFindings | integer | Yes | Defines the advisoryfindings value at this contract boundary. | minimum: 0 |
| coverage.blockingFindings | integer | Yes | Defines the blockingfindings value at this contract boundary. | minimum: 0 |
| coverage.contradictionCount | integer | Yes | Defines the contradictioncount value at this contract boundary. | minimum: 0 |
| coverage.diagnosisCompleteness | number | Yes | Defines the diagnosiscompleteness value at this contract boundary. | minimum: 0 · maximum: 100 |
| coverage.evaluatedObservations | integer | Yes | Defines the evaluatedobservations value at this contract boundary. | minimum: 0 |
| coverage.manualFindings | integer | Yes | Defines the manualfindings value at this contract boundary. | minimum: 0 |
| coverage.passingObservations | integer | Yes | Defines the passingobservations value at this contract boundary. | minimum: 0 |
| coverage.repairableFindings | integer | Yes | Defines the repairablefindings value at this contract boundary. | minimum: 0 |
| coverage.totalObservations | integer | Yes | Defines the totalobservations value at this contract boundary. | minimum: 0 |
| coverage.unknownFindings | integer | Yes | Defines the unknownfindings value at this contract boundary. | minimum: 0 |
| coverage.unsupportedFindings | integer | Yes | Defines the unsupportedfindings value at this contract boundary. | minimum: 0 |
| domains | array | Yes | Defines the domains value at this contract boundary. | minItems: 6 · maxItems: 6 |
| domains[].advisoryFindings | integer | Yes | Defines the advisoryfindings value at this contract boundary. | minimum: 0 |
| domains[].blockingFindings | integer | Yes | Defines the blockingfindings value at this contract boundary. | minimum: 0 |
| domains[].id | enum | Yes | Defines the id value at this contract boundary. | enum: runtime, dependency, security, configuration, test, quality |
| domains[].observationCount | integer | Yes | Defines the observationcount value at this contract boundary. | minimum: 0 |
| domains[].reason | string | Yes | Defines the reason value at this contract boundary. | minLength: 1 |
| domains[].status | enum | Yes | Defines the status value at this contract boundary. | enum: clean, findings, not-applicable, not-run, stale |
| engineVersion | string | Yes | Defines the engineversion value at this contract boundary. | const: "universal-diagnosis-v1" |
| findings | array | Yes | Defines the findings value at this contract boundary. | — |
| project | object | Yes | Defines the project value at this contract boundary. | additionalProperties: false |
| project.framework | string | Yes | Defines the framework 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. | minLength: 1 |
| project.projectKind | string | Yes | Defines the projectkind value at this contract boundary. | minLength: 1 |
| project.runtimeFamilies | array | Yes | Defines the runtimefamilies value at this contract boundary. | minItems: 1 |
| project.runtimeFamily | string | Yes | Defines the runtimefamily value at this contract boundary. | minLength: 1 |
| schemaVersion | string | Yes | Defines the schemaversion value at this contract boundary. | const: "workspai.doctor-diagnosis.v1" |
| unknowns | array | Yes | Defines the unknowns value at this contract boundary. | — |
| unknowns[].id | string | Yes | Defines the id value at this contract boundary. | minLength: 1 |
| unknowns[].probeId | string | No | Defines the probeid value at this contract boundary. | minLength: 1 |
| unknowns[].reason | string | Yes | Defines the reason value at this contract boundary. | minLength: 1 |
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-diagnosis.v1.json",
"title": "Workspai Universal Doctor Diagnosis",
"type": "object",
"required": [
"schemaVersion",
"engineVersion",
"project",
"capability",
"domains",
"coverage",
"findings",
"causalGroups",
"unknowns",
"contradictions"
],
"properties": {
"schemaVersion": {
"const": "workspai.doctor-diagnosis.v1"
},
"engineVersion": {
"const": "universal-diagnosis-v1"
},
"project": {
"type": "object",
"required": [
"name",
"path",
"runtimeFamily",
"runtimeFamilies",
"framework",
"projectKind"
],
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"path": {
"type": "string",
"minLength": 1
},
"runtimeFamily": {
"type": "string",
"minLength": 1
},
"runtimeFamilies": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"minItems": 1,
"uniqueItems": true
},
"framework": {
"type": "string",
"minLength": 1
},
"projectKind": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false
},
"capability": {
"type": "object",
"required": [
"registryVersion",
"adapterId",
"runtimeFamily",
"tier",
"confidence",
"nativeDomains",
"portableDomains",
"observableDomains",
"unsupportedDomains",
"limitations"
],
"properties": {
"registryVersion": {
"type": "string",
"minLength": 1
},
"adapterId": {
"type": "string",
"minLength": 1
},
"runtimeFamily": {
"type": "string",
"minLength": 1
},
"tier": {
"enum": [
"first-class",
"extended",
"fallback"
]
},
"confidence": {
"enum": [
"high",
"medium",
"low"
]
},
"nativeDomains": {
"$ref": "#/$defs/domainList"
},
"portableDomains": {
"$ref": "#/$defs/domainList"
},
"observableDomains": {
"$ref": "#/$defs/domainList"
},
"unsupportedDomains": {
"$ref": "#/$defs/domainList"
},
"limitations": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"uniqueItems": true
}
},
"additionalProperties": false
},
"domains": {
"type": "array",
"minItems": 6,
"maxItems": 6,
"items": {
"type": "object",
"required": [
"id",
"status",
"observationCount",
"blockingFindings",
"advisoryFindings",
"reason"
],
"properties": {
"id": {
"enum": [
"runtime",
"dependency",
"security",
"configuration",
"test",
"quality"
]
},
"status": {
"enum": [
"clean",
"findings",
"not-applicable",
"not-run",
"stale"
]
},
"observationCount": {
"type": "integer",
"minimum": 0
},
"blockingFindings": {
"type": "integer",
"minimum": 0
},
"advisoryFindings": {
"type": "integer",
"minimum": 0
},
"reason": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false
}
},
"coverage": {
"type": "object",
"required": [
"totalObservations",
"evaluatedObservations",
"passingObservations",
"blockingFindings",
"advisoryFindings",
"unknownFindings",
"repairableFindings",
"manualFindings",
"unsupportedFindings",
"contradictionCount",
"diagnosisCompleteness"
],
"properties": {
"totalObservations": {
"type": "integer",
"minimum": 0
},
"evaluatedObservations": {
"type": "integer",
"minimum": 0
},
"passingObservations": {
"type": "integer",
"minimum": 0
},
"blockingFindings": {
"type": "integer",
"minimum": 0
},
"advisoryFindings": {
"type": "integer",
"minimum": 0
},
"unknownFindings": {
"type": "integer",
"minimum": 0
},
"repairableFindings": {
"type": "integer",
"minimum": 0
},
"manualFindings": {
"type": "integer",
"minimum": 0
},
"unsupportedFindings": {
"type": "integer",
"minimum": 0
},
"contradictionCount": {
"type": "integer",
"minimum": 0
},
"diagnosisCompleteness": {
"type": "number",
"minimum": 0,
"maximum": 100
}
},
"additionalProperties": false
},
"findings": {
"type": "array",
"items": {
"$ref": "#/$defs/finding"
}
},
"causalGroups": {
"type": "array",
"items": {
"$ref": "#/$defs/causalGroup"
}
},
"unknowns": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"reason"
],
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"reason": {
"type": "string",
"minLength": 1
},
"probeId": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false
}
},
"contradictions": {
"type": "array",
"items": {
"type": "object",
"required": [
"probeId",
"statuses",
"reason"
],
"properties": {
"probeId": {
"type": "string",
"minLength": 1
},
"statuses": {
"type": "array",
"items": {
"enum": [
"pass",
"warn",
"fail"
]
},
"minItems": 2,
"uniqueItems": true
},
"reason": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false
}
}
},
"$defs": {
"domainList": {
"type": "array",
"items": {
"enum": [
"runtime",
"dependency",
"security",
"configuration",
"test",
"quality"
]
},
"uniqueItems": true
},
"proof": {
"type": "object",
"required": [
"kind",
"role",
"ref",
"claim"
],
"properties": {
"kind": {
"enum": [
"probe",
"file",
"dependency",
"runtime",
"command",
"graph",
"unknown"
]
},
"role": {
"enum": [
"observation",
"repair-target",
"subject",
"verification",
"impact"
]
},
"ref": {
"type": "string",
"minLength": 1
},
"claim": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false
},
"repair": {
"type": "object",
"required": [
"disposition",
"requiresFreshEvidence"
],
"properties": {
"disposition": {
"enum": [
"automatic",
"approval-required",
"manual",
"unavailable",
"not-needed"
]
},
"capabilityId": {
"type": "string",
"minLength": 1
},
"operationType": {
"type": "string",
"minLength": 1
},
"verifyCommand": {
"type": "string",
"minLength": 1
},
"requiresFreshEvidence": {
"type": "boolean"
}
},
"additionalProperties": false
},
"finding": {
"type": "object",
"required": [
"id",
"causalKey",
"projectName",
"projectPath",
"probeId",
"label",
"status",
"severity",
"issueClass",
"operationalImpact",
"applicability",
"confidence",
"confidenceScore",
"diagnosisState",
"symptom",
"proofs",
"repair"
],
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"causalKey": {
"type": "string",
"minLength": 1
},
"projectName": {
"type": "string",
"minLength": 1
},
"projectPath": {
"type": "string",
"minLength": 1
},
"probeId": {
"type": "string",
"minLength": 1
},
"label": {
"type": "string",
"minLength": 1
},
"status": {
"enum": [
"blocking",
"advisory",
"informational",
"unknown"
]
},
"severity": {
"enum": [
"info",
"warn",
"error"
]
},
"issueClass": {
"type": "string",
"minLength": 1
},
"operationalImpact": {
"type": "string",
"minLength": 1
},
"applicability": {
"enum": [
"applicable",
"not-applicable",
"unknown"
]
},
"confidence": {
"enum": [
"high",
"medium",
"low"
]
},
"confidenceScore": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"diagnosisState": {
"enum": [
"confirmed",
"candidate",
"unknown"
]
},
"symptom": {
"type": "string",
"minLength": 1
},
"recommendation": {
"type": "string",
"minLength": 1
},
"proofs": {
"type": "array",
"items": {
"$ref": "#/$defs/proof"
},
"minItems": 1
},
"repair": {
"$ref": "#/$defs/repair"
}
},
"additionalProperties": false
},
"causalGroup": {
"type": "object",
"required": [
"causalKey",
"issueClass",
"status",
"findingIds",
"projectPaths",
"repairable"
],
"properties": {
"causalKey": {
"type": "string",
"minLength": 1
},
"issueClass": {
"type": "string",
"minLength": 1
},
"status": {
"enum": [
"blocking",
"advisory",
"informational",
"unknown"
]
},
"findingIds": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"minItems": 1,
"uniqueItems": true
},
"projectPaths": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"minItems": 1,
"uniqueItems": true
},
"repairable": {
"type": "boolean"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}