Diagnostics and remediation / JSON Schema
RapidKit Doctor Project Evidence
Defines the versioned doctor project evidence v1 boundary used by Workspai and its consumers.
- Schema version
doctor-project-evidence-v1- Contract path
contracts/doctor-project-evidence.v1.json- Publication
- synced-supporting-contract
- Defined fields
- 93
- 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 path | Schema | Producer |
|---|---|---|
| .workspai/reports/doctor-project-last-run.json | doctor-project-evidence-v1 | 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 path | Type | Required | Meaning | Constraints |
|---|---|---|---|---|
| $defs.evidenceFreshness.generatedAt | string | Yes | Defines the generatedat value at this contract boundary. | format: date-time |
| $defs.evidenceFreshness.liveStateProbeCount | integer | Yes | Defines the livestateprobecount value at this contract boundary. | minimum: 0 |
| $defs.evidenceFreshness.oldestProbeGeneratedAt | string | No | Defines the oldestprobegeneratedat value at this contract boundary. | format: date-time |
| $defs.evidenceFreshness.staleProbeCount | integer | Yes | Defines the staleprobecount value at this contract boundary. | minimum: 0 |
| $defs.evidenceFreshness.status | enum | Yes | Defines the status value at this contract boundary. | enum: fresh, stale, unknown |
| $defs.evidenceFreshness.unknownProbeCount | integer | Yes | Defines the unknownprobecount value at this contract boundary. | minimum: 0 |
| $defs.evidenceFreshness.verifyBeforeUseProbeCount | integer | Yes | Defines the verifybeforeuseprobecount value at this contract boundary. | minimum: 0 |
| $defs.freshness.category | enum | Yes | Defines the category value at this contract boundary. | enum: structure, verification, state |
| $defs.freshness.expiresAt | string | No | Defines the expiresat value at this contract boundary. | format: date-time |
| $defs.freshness.generatedAt | string | Yes | Defines the generatedat value at this contract boundary. | format: date-time |
| $defs.freshness.reason | string | Yes | Defines the reason value at this contract boundary. | — |
| $defs.freshness.status | enum | Yes | Defines the status value at this contract boundary. | enum: fresh, stale, unknown |
| $defs.freshness.ttlSeconds | integer | null | Yes | Defines the ttlseconds value at this contract boundary. | minimum: 0 |
| $defs.freshness.verifyBeforeUse | boolean | Yes | Defines the verifybeforeuse value at this contract boundary. | — |
| $defs.policyProfile.advisoryWarningsBlockRelease | boolean | Yes | Defines the advisorywarningsblockrelease value at this contract boundary. | — |
| $defs.policyProfile.description | string | Yes | Defines the description value at this contract boundary. | — |
| $defs.policyProfile.exitOnErrors | boolean | Yes | Defines the exitonerrors value at this contract boundary. | const: true |
| $defs.policyProfile.exitOnWarnings | boolean | Yes | Defines the exitonwarnings value at this contract boundary. | — |
| $defs.policyProfile.name | enum | Yes | Defines the name value at this contract boundary. | enum: local, ci, release, enterprise-strict |
| $defs.policyProfile.warningExitCode | enum | Yes | Defines the warningexitcode value at this contract boundary. | enum: 0, 1, 2 |
| $defs.probe.freshness | reference | No | Defines the freshness value at this contract boundary. | ref: #/$defs/freshness |
| $defs.probe.id | string | No | Defines the id value at this contract boundary. | minLength: 1 |
| $defs.probe.issueClass | enum | No | Defines the issueclass value at this contract boundary. | enum: dependency, environment, security, test, quality, container, deployment, runtime, workspace-contract, source-tree, framework, configuration, custom, unknown |
| $defs.probe.label | string | No | Defines the label value at this contract boundary. | minLength: 1 |
| $defs.probe.operationalImpact | enum | No | Defines the operationalimpact value at this contract boundary. | enum: none, developer-friction, ci-risk, release-risk, security-risk, runtime-risk, customer-risk |
| $defs.probe.reason | string | No | Defines the reason value at this contract boundary. | — |
| $defs.probe.recommendation | string | No | Defines the recommendation value at this contract boundary. | — |
| $defs.probe.repairCapability | reference | No | Defines the repaircapability value at this contract boundary. | ref: #/$defs/repairCapability |
| $defs.probe.repairIntent | reference | No | Defines the repairintent value at this contract boundary. | ref: #/$defs/repairIntent |
| $defs.probe.scope | string | No | Defines the scope value at this contract boundary. | — |
| $defs.probe.severity | enum | No | Defines the severity value at this contract boundary. | enum: info, warn, error |
| $defs.probe.status | enum | No | Defines the status value at this contract boundary. | enum: pass, warn, fail |
| $defs.repairCapability.canAutoFix | boolean | Yes | Defines the canautofix value at this contract boundary. | — |
| $defs.repairCapability.canEditFiles | boolean | Yes | Defines the caneditfiles value at this contract boundary. | — |
| $defs.repairCapability.command | string | No | Defines the command value at this contract boundary. | — |
| $defs.repairCapability.files | array | Yes | Defines the files value at this contract boundary. | — |
| $defs.repairCapability.fixKind | enum | Yes | Defines the fixkind value at this contract boundary. | enum: package-json-script, file-create, file-append, file-copy, dependency-sync, command, manual |
| $defs.repairCapability.id | string | Yes | Defines the id value at this contract boundary. | minLength: 1 |
| $defs.repairCapability.issueId | string | Yes | Defines the issueid value at this contract boundary. | minLength: 1 |
| $defs.repairCapability.limitations | array | No | Defines the limitations value at this contract boundary. | — |
| $defs.repairCapability.operation | reference | No | Defines the operation value at this contract boundary. | ref: #/$defs/repairOperation |
| $defs.repairCapability.reason | string | Yes | Defines the reason value at this contract boundary. | — |
| $defs.repairCapability.refreshCommands | array | Yes | Defines the refreshcommands value at this contract boundary. | — |
| $defs.repairCapability.requiresApproval | boolean | Yes | Defines the requiresapproval value at this contract boundary. | — |
| $defs.repairCapability.requiresReview | boolean | Yes | Defines the requiresreview value at this contract boundary. | — |
| $defs.repairCapability.risk | enum | Yes | Defines the risk value at this contract boundary. | enum: safe, guarded, invasive |
| $defs.repairCapability.status | enum | Yes | Defines the status value at this contract boundary. | enum: available, manual, blocked |
| $defs.repairCapability.title | string | Yes | Defines the title value at this contract boundary. | minLength: 1 |
| $defs.repairCapability.verifyCommand | string | No | Defines the verifycommand value at this contract boundary. | — |
| $defs.repairIntent.confidence | enum | Yes | Defines the confidence value at this contract boundary. | enum: high, medium, low |
| $defs.repairIntent.mode | enum | Yes | Defines the mode value at this contract boundary. | enum: none, run-command, edit-file, review-required, verify-before-fix, refresh-evidence, manual-guidance |
| $defs.repairIntent.primaryActionLabel | string | Yes | Defines the primaryactionlabel value at this contract boundary. | — |
| $defs.repairIntent.reason | string | Yes | Defines the reason value at this contract boundary. | — |
| $defs.repairIntent.relatedCommands | array | Yes | Defines the relatedcommands value at this contract boundary. | — |
| $defs.repairIntent.requiresApproval | boolean | Yes | Defines the requiresapproval value at this contract boundary. | — |
| $defs.repairIntent.requiresFreshEvidence | boolean | Yes | Defines the requiresfreshevidence value at this contract boundary. | — |
| $defs.repairOperation.command | string | No | Defines the command value at this contract boundary. | — |
| $defs.repairOperation.content | string | No | Defines the content value at this contract boundary. | — |
| $defs.repairOperation.edits | array | No | Defines the edits value at this contract boundary. | — |
| $defs.repairOperation.edits[].pointer | string | Yes | Defines the pointer value at this contract boundary. | — |
| $defs.repairOperation.edits[].value | string | number | boolean | null | Yes | Defines the value value at this contract boundary. | — |
| $defs.repairOperation.ensureNewline | boolean | No | Defines the ensurenewline value at this contract boundary. | — |
| $defs.repairOperation.keys | array | No | Defines the keys value at this contract boundary. | — |
| $defs.repairOperation.keys[].comment | string | No | Defines the comment value at this contract boundary. | — |
| $defs.repairOperation.keys[].name | string | Yes | Defines the name value at this contract boundary. | — |
| $defs.repairOperation.keys[].value | string | Yes | Defines the value value at this contract boundary. | — |
| $defs.repairOperation.lines | array | No | Defines the lines value at this contract boundary. | — |
| $defs.repairOperation.overwrite | boolean | No | Defines the overwrite value at this contract boundary. | — |
| $defs.repairOperation.path | string | Yes | Defines the path value at this contract boundary. | minLength: 1 |
| $defs.repairOperation.phony | boolean | No | Defines the phony value at this contract boundary. | — |
| $defs.repairOperation.scriptName | string | No | Defines the scriptname value at this contract boundary. | — |
| $defs.repairOperation.scriptValue | string | No | Defines the scriptvalue value at this contract boundary. | — |
| $defs.repairOperation.sourcePath | string | No | Defines the sourcepath value at this contract boundary. | minLength: 1 |
| $defs.repairOperation.target | string | No | Defines the target value at this contract boundary. | — |
| $defs.repairOperation.type | enum | Yes | Defines the type value at this contract boundary. | enum: file-create, file-append, file-copy, package-json-script, json-edit, env-key-add, makefile-target |
| contract | object | No | Defines the contract value at this contract boundary. | additionalProperties: true |
| driftDelta | object | No | Defines the driftdelta value at this contract boundary. | additionalProperties: true |
| evidenceFreshness | reference | No | Defines the evidencefreshness value at this contract boundary. | ref: #/$defs/evidenceFreshness |
| evidenceType | string | Yes | Defines the evidencetype value at this contract boundary. | const: "project" |
| generatedAt | string | Yes | Defines the generatedat value at this contract boundary. | format: date-time |
| healthScore | object | No | Defines the healthscore value at this contract boundary. | additionalProperties: true |
| policyProfile | reference | No | Defines the policyprofile value at this contract boundary. | ref: #/$defs/policyProfile |
| project | object | No | Defines the project value at this contract boundary. | additionalProperties: true |
| project.probes | array | No | Defines the probes value at this contract boundary. | — |
| project.repairCapabilities | array | No | Defines the repaircapabilities value at this contract boundary. | — |
| projectName | string | Yes | Defines the projectname value at this contract boundary. | minLength: 1 |
| projectPath | string | Yes | Defines the projectpath value at this contract boundary. | minLength: 1 |
| schemaVersion | string | Yes | Defines the schemaversion value at this contract boundary. | const: "doctor-project-evidence-v1" |
| scoreBreakdown | array | No | Defines the scorebreakdown value at this contract boundary. | — |
| summary | object | Yes | Defines the summary value at this contract boundary. | additionalProperties: true |
| summary.scopeProvenance | object | No | Defines the scopeprovenance value at this contract boundary. | additionalProperties: true |
| system | object | No | Defines the system value at this contract boundary. | additionalProperties: true |
| workspacePath | string | null | No | Defines the workspacepath value at this contract boundary. | — |
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/doctor-project-evidence.v1.json",
"title": "RapidKit Doctor Project Evidence",
"type": "object",
"required": [
"schemaVersion",
"evidenceType",
"generatedAt",
"projectPath",
"projectName",
"summary"
],
"properties": {
"schemaVersion": {
"const": "doctor-project-evidence-v1"
},
"evidenceType": {
"const": "project"
},
"generatedAt": {
"type": "string",
"format": "date-time"
},
"workspacePath": {
"type": [
"string",
"null"
]
},
"projectPath": {
"type": "string",
"minLength": 1
},
"projectName": {
"type": "string",
"minLength": 1
},
"healthScore": {
"type": "object",
"additionalProperties": true
},
"evidenceFreshness": {
"$ref": "#/$defs/evidenceFreshness"
},
"system": {
"type": "object",
"additionalProperties": true
},
"project": {
"type": "object",
"properties": {
"probes": {
"type": "array",
"items": {
"$ref": "#/$defs/probe"
}
},
"repairCapabilities": {
"type": "array",
"items": {
"$ref": "#/$defs/repairCapability"
}
}
},
"additionalProperties": true
},
"summary": {
"type": "object",
"properties": {
"scopeProvenance": {
"type": "object",
"additionalProperties": true
}
},
"additionalProperties": true
},
"driftDelta": {
"type": "object",
"additionalProperties": true
},
"scoreBreakdown": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
}
},
"contract": {
"type": "object",
"additionalProperties": true
},
"policyProfile": {
"$ref": "#/$defs/policyProfile"
}
},
"$defs": {
"freshness": {
"type": "object",
"required": [
"category",
"generatedAt",
"ttlSeconds",
"status",
"verifyBeforeUse",
"reason"
],
"properties": {
"category": {
"enum": [
"structure",
"verification",
"state"
]
},
"generatedAt": {
"type": "string",
"format": "date-time"
},
"ttlSeconds": {
"type": [
"integer",
"null"
],
"minimum": 0
},
"expiresAt": {
"type": "string",
"format": "date-time"
},
"status": {
"enum": [
"fresh",
"stale",
"unknown"
]
},
"verifyBeforeUse": {
"type": "boolean"
},
"reason": {
"type": "string"
}
},
"additionalProperties": false
},
"evidenceFreshness": {
"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
},
"repairIntent": {
"type": "object",
"required": [
"mode",
"confidence",
"primaryActionLabel",
"requiresApproval",
"requiresFreshEvidence",
"reason",
"relatedCommands"
],
"properties": {
"mode": {
"enum": [
"none",
"run-command",
"edit-file",
"review-required",
"verify-before-fix",
"refresh-evidence",
"manual-guidance"
]
},
"confidence": {
"enum": [
"high",
"medium",
"low"
]
},
"primaryActionLabel": {
"type": "string"
},
"requiresApproval": {
"type": "boolean"
},
"requiresFreshEvidence": {
"type": "boolean"
},
"reason": {
"type": "string"
},
"relatedCommands": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"policyProfile": {
"type": "object",
"required": [
"name",
"exitOnErrors",
"exitOnWarnings",
"warningExitCode",
"advisoryWarningsBlockRelease",
"description"
],
"properties": {
"name": {
"enum": [
"local",
"ci",
"release",
"enterprise-strict"
]
},
"exitOnErrors": {
"const": true
},
"exitOnWarnings": {
"type": "boolean"
},
"warningExitCode": {
"enum": [
0,
1,
2
]
},
"advisoryWarningsBlockRelease": {
"type": "boolean"
},
"description": {
"type": "string"
}
},
"additionalProperties": false
},
"probe": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"label": {
"type": "string",
"minLength": 1
},
"status": {
"enum": [
"pass",
"warn",
"fail"
]
},
"severity": {
"enum": [
"info",
"warn",
"error"
]
},
"scope": {
"type": "string"
},
"reason": {
"type": "string"
},
"recommendation": {
"type": "string"
},
"freshness": {
"$ref": "#/$defs/freshness"
},
"issueClass": {
"enum": [
"dependency",
"environment",
"security",
"test",
"quality",
"container",
"deployment",
"runtime",
"workspace-contract",
"source-tree",
"framework",
"configuration",
"custom",
"unknown"
]
},
"operationalImpact": {
"enum": [
"none",
"developer-friction",
"ci-risk",
"release-risk",
"security-risk",
"runtime-risk",
"customer-risk"
]
},
"repairIntent": {
"$ref": "#/$defs/repairIntent"
},
"repairCapability": {
"$ref": "#/$defs/repairCapability"
}
},
"additionalProperties": true
},
"repairCapability": {
"type": "object",
"required": [
"id",
"issueId",
"title",
"status",
"fixKind",
"risk",
"canAutoFix",
"canEditFiles",
"requiresApproval",
"requiresReview",
"files",
"refreshCommands",
"reason"
],
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"issueId": {
"type": "string",
"minLength": 1
},
"title": {
"type": "string",
"minLength": 1
},
"status": {
"enum": [
"available",
"manual",
"blocked"
]
},
"fixKind": {
"enum": [
"package-json-script",
"file-create",
"file-append",
"file-copy",
"dependency-sync",
"command",
"manual"
]
},
"risk": {
"enum": [
"safe",
"guarded",
"invasive"
]
},
"canAutoFix": {
"type": "boolean"
},
"canEditFiles": {
"type": "boolean"
},
"requiresApproval": {
"type": "boolean"
},
"requiresReview": {
"type": "boolean"
},
"files": {
"type": "array",
"items": {
"type": "string"
}
},
"command": {
"type": "string"
},
"operation": {
"$ref": "#/$defs/repairOperation"
},
"verifyCommand": {
"type": "string"
},
"refreshCommands": {
"type": "array",
"items": {
"type": "string"
}
},
"reason": {
"type": "string"
},
"limitations": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": true
},
"repairOperation": {
"type": "object",
"required": [
"type",
"path"
],
"properties": {
"type": {
"enum": [
"file-create",
"file-append",
"file-copy",
"package-json-script",
"json-edit",
"env-key-add",
"makefile-target"
]
},
"sourcePath": {
"type": "string",
"minLength": 1
},
"path": {
"type": "string",
"minLength": 1
},
"content": {
"type": "string"
},
"overwrite": {
"type": "boolean"
},
"lines": {
"type": "array",
"items": {
"type": "string"
}
},
"ensureNewline": {
"type": "boolean"
},
"scriptName": {
"type": "string"
},
"scriptValue": {
"type": "string"
},
"edits": {
"type": "array",
"items": {
"type": "object",
"required": [
"pointer",
"value"
],
"properties": {
"pointer": {
"type": "string"
},
"value": {
"type": [
"string",
"number",
"boolean",
"null"
]
}
},
"additionalProperties": false
}
},
"keys": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"value"
],
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string"
},
"comment": {
"type": "string"
}
},
"additionalProperties": false
}
},
"target": {
"type": "string"
},
"command": {
"type": "string"
},
"phony": {
"type": "boolean"
}
},
"additionalProperties": false
}
},
"additionalProperties": true
}