All contracts

Workspace Intelligence / JSON Schema

Workspai Doctor Receipt

Defines the versioned doctor receipt v1 boundary used by Workspai and its consumers.

Schema version
workspai.doctor-receipt.v1
Contract path
contracts/workspace-intelligence/doctor-receipt.v1.json
Publication
json-schema
Defined fields
57
Artifact bindings
1

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.

Produced artifacts

These durable files are emitted by registered commands and validated against this contract.

Artifact pathSchemaProducer
.workspai/reports/doctor-receipt-last-run.jsonworkspai.doctor-receipt.v1
workspai doctor workspace
workspai doctor project

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 pathTypeRequiredMeaningConstraints
$defs.counts.advisoryFindingsintegerYesDefines the advisoryfindings value at this contract boundary.minimum: 0
$defs.counts.affectedProjectsintegerYesDefines the affectedprojects value at this contract boundary.minimum: 0
$defs.counts.blockingCausesintegerYesDefines the blockingcauses value at this contract boundary.minimum: 0
$defs.counts.contradictionFindingsintegerYesDefines the contradictionfindings value at this contract boundary.minimum: 0
$defs.counts.dependencyAdvisorySubjectsintegerYesDefines the dependencyadvisorysubjects value at this contract boundary.minimum: 0
$defs.counts.dependencyVulnerabilityFindingsintegerYesDefines the dependencyvulnerabilityfindings value at this contract boundary.minimum: 0
$defs.counts.manualFindingsintegerYesDefines the manualfindings value at this contract boundary.minimum: 0
$defs.counts.notApplicableChecksintegerYesDefines the notapplicablechecks value at this contract boundary.minimum: 0
$defs.counts.projectsBlockedintegerYesDefines the projectsblocked value at this contract boundary.minimum: 0
$defs.counts.projectsNeedingAttentionintegerYesDefines the projectsneedingattention value at this contract boundary.minimum: 0
$defs.counts.projectsScannedintegerYesDefines the projectsscanned value at this contract boundary.minimum: 0
$defs.counts.repairableFindingsintegerYesDefines the repairablefindings value at this contract boundary.minimum: 0
$defs.counts.systemErrorsintegerYesDefines the systemerrors value at this contract boundary.minimum: 0
$defs.counts.unknownFindingsintegerYesDefines the unknownfindings value at this contract boundary.minimum: 0
$defs.counts.unsupportedFindingsintegerYesDefines the unsupportedfindings value at this contract boundary.minimum: 0
$defs.freshness.generatedAtstringYesDefines the generatedat value at this contract boundary.format: date-time
$defs.freshness.liveStateProbeCountintegerYesDefines the livestateprobecount value at this contract boundary.minimum: 0
$defs.freshness.oldestProbeGeneratedAtstringNoDefines the oldestprobegeneratedat value at this contract boundary.format: date-time
$defs.freshness.staleProbeCountintegerYesDefines the staleprobecount value at this contract boundary.minimum: 0
$defs.freshness.statusenumYesDefines the status value at this contract boundary.enum: fresh, stale, unknown
$defs.freshness.unknownProbeCountintegerYesDefines the unknownprobecount value at this contract boundary.minimum: 0
$defs.freshness.verifyBeforeUseProbeCountintegerYesDefines the verifybeforeuseprobecount value at this contract boundary.minimum: 0
affectedProjectsarrayYesDefines the affectedprojects value at this contract boundary.
affectedProjects[].advisoryFindingsintegerYesDefines the advisoryfindings value at this contract boundary.minimum: 0
affectedProjects[].blockingCausesintegerYesDefines the blockingcauses value at this contract boundary.minimum: 0
affectedProjects[].frameworkstringNoDefines the framework value at this contract boundary.
affectedProjects[].namestringYesDefines the name value at this contract boundary.
affectedProjects[].pathstringYesDefines the path value at this contract boundary.
affectedProjects[].runtimeFamilystringYesDefines the runtimefamily value at this contract boundary.
affectedProjects[].unknownFindingsintegerYesDefines the unknownfindings value at this contract boundary.minimum: 0
affectedProjects[].verdictenumYesDefines the verdict value at this contract boundary.enum: passed, attention, blocked
artifactsobjectYesDefines the artifacts value at this contract boundary.additionalProperties: false
artifacts.evidencestring | nullYesDefines the evidence value at this contract boundary.
artifacts.receiptstringYesDefines the receipt value at this contract boundary.
blockersarrayYesDefines the blockers value at this contract boundary.
blockers[].capabilityIdstringNoDefines the capabilityid value at this contract boundary.
blockers[].idstringYesDefines the id value at this contract boundary.
blockers[].issueClassstringYesDefines the issueclass value at this contract boundary.
blockers[].projectNamestringYesDefines the projectname value at this contract boundary.
blockers[].projectPathstringYesDefines the projectpath value at this contract boundary.
blockers[].repairDispositionenumYesDefines the repairdisposition value at this contract boundary.enum: automatic, approval-required, manual, unavailable, not-needed
blockers[].symptomstringYesDefines the symptom value at this contract boundary.
countsreferenceYesDefines the counts value at this contract boundary.ref: #/$defs/counts
freshnessreferenceYesDefines the freshness value at this contract boundary.ref: #/$defs/freshness
generatedAtstringYesDefines the generatedat value at this contract boundary.format: date-time
nextobjectYesDefines the next value at this contract boundary.additionalProperties: false
next.actionenumYesDefines the action value at this contract boundary.enum: repair, review, refresh, verify, none
next.commandsarrayYesDefines the commands value at this contract boundary.
next.reasonstringYesDefines the reason value at this contract boundary.
schemaVersionstringYesDefines the schemaversion value at this contract boundary.const: "workspai.doctor-receipt.v1"
scopeobjectYesDefines the scope value at this contract boundary.additionalProperties: false
scope.kindenumYesDefines the kind value at this contract boundary.enum: workspace, project
scope.namestringYesDefines the name value at this contract boundary.minLength: 1
scope.projectPathstring | nullNoDefines the projectpath value at this contract boundary.
scope.rootstringYesDefines the root value at this contract boundary.minLength: 1
scope.workspacePathstring | nullNoDefines the workspacepath value at this contract boundary.
verdictenumYesDefines the verdict value at this contract boundary.enum: passed, attention, blocked

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-receipt.v1.json",
  "title": "Workspai Doctor Receipt",
  "type": "object",
  "required": [
    "schemaVersion",
    "generatedAt",
    "scope",
    "verdict",
    "counts",
    "freshness",
    "affectedProjects",
    "blockers",
    "next",
    "artifacts"
  ],
  "properties": {
    "schemaVersion": {
      "const": "workspai.doctor-receipt.v1"
    },
    "generatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "scope": {
      "type": "object",
      "required": [
        "kind",
        "root",
        "name"
      ],
      "properties": {
        "kind": {
          "enum": [
            "workspace",
            "project"
          ]
        },
        "root": {
          "type": "string",
          "minLength": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "workspacePath": {
          "type": [
            "string",
            "null"
          ]
        },
        "projectPath": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "verdict": {
      "enum": [
        "passed",
        "attention",
        "blocked"
      ]
    },
    "counts": {
      "$ref": "#/$defs/counts"
    },
    "freshness": {
      "$ref": "#/$defs/freshness"
    },
    "affectedProjects": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "name",
          "path",
          "runtimeFamily",
          "verdict",
          "blockingCauses",
          "advisoryFindings",
          "unknownFindings"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "runtimeFamily": {
            "type": "string"
          },
          "framework": {
            "type": "string"
          },
          "verdict": {
            "enum": [
              "passed",
              "attention",
              "blocked"
            ]
          },
          "blockingCauses": {
            "type": "integer",
            "minimum": 0
          },
          "advisoryFindings": {
            "type": "integer",
            "minimum": 0
          },
          "unknownFindings": {
            "type": "integer",
            "minimum": 0
          }
        },
        "additionalProperties": false
      }
    },
    "blockers": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "projectName",
          "projectPath",
          "issueClass",
          "symptom",
          "repairDisposition"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "projectName": {
            "type": "string"
          },
          "projectPath": {
            "type": "string"
          },
          "issueClass": {
            "type": "string"
          },
          "symptom": {
            "type": "string"
          },
          "repairDisposition": {
            "enum": [
              "automatic",
              "approval-required",
              "manual",
              "unavailable",
              "not-needed"
            ]
          },
          "capabilityId": {
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    },
    "next": {
      "type": "object",
      "required": [
        "action",
        "reason",
        "commands"
      ],
      "properties": {
        "action": {
          "enum": [
            "repair",
            "review",
            "refresh",
            "verify",
            "none"
          ]
        },
        "reason": {
          "type": "string"
        },
        "commands": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "artifacts": {
      "type": "object",
      "required": [
        "evidence",
        "receipt"
      ],
      "properties": {
        "evidence": {
          "type": [
            "string",
            "null"
          ]
        },
        "receipt": {
          "type": "string"
        }
      },
      "additionalProperties": false
    }
  },
  "$defs": {
    "counts": {
      "type": "object",
      "required": [
        "projectsScanned",
        "affectedProjects",
        "projectsBlocked",
        "projectsNeedingAttention",
        "blockingCauses",
        "advisoryFindings",
        "unknownFindings",
        "contradictionFindings",
        "repairableFindings",
        "manualFindings",
        "unsupportedFindings",
        "dependencyAdvisorySubjects",
        "dependencyVulnerabilityFindings",
        "notApplicableChecks",
        "systemErrors"
      ],
      "properties": {
        "projectsScanned": {
          "type": "integer",
          "minimum": 0
        },
        "affectedProjects": {
          "type": "integer",
          "minimum": 0
        },
        "projectsBlocked": {
          "type": "integer",
          "minimum": 0
        },
        "projectsNeedingAttention": {
          "type": "integer",
          "minimum": 0
        },
        "blockingCauses": {
          "type": "integer",
          "minimum": 0
        },
        "advisoryFindings": {
          "type": "integer",
          "minimum": 0
        },
        "unknownFindings": {
          "type": "integer",
          "minimum": 0
        },
        "contradictionFindings": {
          "type": "integer",
          "minimum": 0
        },
        "repairableFindings": {
          "type": "integer",
          "minimum": 0
        },
        "manualFindings": {
          "type": "integer",
          "minimum": 0
        },
        "unsupportedFindings": {
          "type": "integer",
          "minimum": 0
        },
        "dependencyAdvisorySubjects": {
          "type": "integer",
          "minimum": 0
        },
        "dependencyVulnerabilityFindings": {
          "type": "integer",
          "minimum": 0
        },
        "notApplicableChecks": {
          "type": "integer",
          "minimum": 0
        },
        "systemErrors": {
          "type": "integer",
          "minimum": 0
        }
      },
      "additionalProperties": false
    },
    "freshness": {
      "type": "object",
      "required": [
        "generatedAt",
        "status",
        "staleProbeCount",
        "unknownProbeCount",
        "liveStateProbeCount",
        "verifyBeforeUseProbeCount"
      ],
      "properties": {
        "generatedAt": {
          "type": "string",
          "format": "date-time"
        },
        "status": {
          "enum": [
            "fresh",
            "stale",
            "unknown"
          ]
        },
        "staleProbeCount": {
          "type": "integer",
          "minimum": 0
        },
        "unknownProbeCount": {
          "type": "integer",
          "minimum": 0
        },
        "liveStateProbeCount": {
          "type": "integer",
          "minimum": 0
        },
        "verifyBeforeUseProbeCount": {
          "type": "integer",
          "minimum": 0
        },
        "oldestProbeGeneratedAt": {
          "type": "string",
          "format": "date-time"
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}