Diagnostics and remediation / JSON Schema
RapidKit Doctor Remediation Plan v2 Legacy Path Alias
Deprecated compatibility path. New consumers must resolve contracts/doctor-remediation-plan.v2.json.
- Schema version
doctor-remediation-plan-v2- Contract path
contracts/doctor-remediation-plan.v1.json- Publication
- synced-supporting-contract
- Defined fields
- 55
- 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.diffPreview.available | boolean | Yes | Defines the available value at this contract boundary. | — |
| $defs.diffPreview.format | enum | Yes | Defines the format value at this contract boundary. | enum: unified, summary, none |
| $defs.diffPreview.hunks | array | Yes | Defines the hunks value at this contract boundary. | — |
| $defs.diffPreview.limitations | array | No | Defines the limitations value at this contract boundary. | — |
| $defs.diffPreview.summary | string | Yes | Defines the summary value at this contract boundary. | — |
| $defs.preview.changes | array | Yes | Defines the changes value at this contract boundary. | — |
| $defs.preview.summary | string | Yes | Defines the summary value at this contract boundary. | — |
| $defs.preview.title | string | Yes | Defines the title 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.riskSummary.guarded | integer | Yes | Defines the guarded value at this contract boundary. | minimum: 0 |
| $defs.riskSummary.invasive | integer | Yes | Defines the invasive value at this contract boundary. | minimum: 0 |
| $defs.riskSummary.safe | integer | Yes | Defines the safe value at this contract boundary. | minimum: 0 |
| $defs.rollback.available | boolean | Yes | Defines the available value at this contract boundary. | — |
| $defs.rollback.strategy | enum | Yes | Defines the strategy value at this contract boundary. | enum: snapshot, idempotent, manual, none |
| $defs.step.blockedReason | string | No | Defines the blockedreason value at this contract boundary. | — |
| $defs.step.dependsOn | array | Yes | Defines the dependson value at this contract boundary. | — |
| $defs.step.diffPreview | reference | Yes | Defines the diffpreview value at this contract boundary. | ref: #/$defs/diffPreview |
| $defs.step.executable | boolean | Yes | Defines the executable value at this contract boundary. | — |
| $defs.step.executableInCurrentEnvironment | boolean | Yes | Defines the executableincurrentenvironment value at this contract boundary. | — |
| $defs.step.files | array | Yes | Defines the files value at this contract boundary. | — |
| $defs.step.id | string | Yes | Defines the id value at this contract boundary. | — |
| $defs.step.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.step.issueId | string | No | Defines the issueid value at this contract boundary. | — |
| $defs.step.kind | enum | Yes | Defines the kind value at this contract boundary. | enum: env-copy, package-json-script, file-create, file-append, json-edit, env-key-add, makefile-target, rapidkit-init, go-mod-tidy, dependency-sync, manual-url, shell |
| $defs.step.operation | reference | No | Defines the operation value at this contract boundary. | ref: #/$defs/repairOperation |
| $defs.step.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.step.order | integer | Yes | Defines the order value at this contract boundary. | minimum: 1 |
| $defs.step.originalCommand | string | Yes | Defines the originalcommand value at this contract boundary. | — |
| $defs.step.phase | enum | Yes | Defines the phase value at this contract boundary. | enum: dependency-baseline, local-environment, source-hygiene, command-contract, runtime-governance, manual-review, generic-execution |
| $defs.step.preview | reference | Yes | Defines the preview value at this contract boundary. | ref: #/$defs/preview |
| $defs.step.projectName | string | Yes | Defines the projectname value at this contract boundary. | — |
| $defs.step.projectPath | string | Yes | Defines the projectpath value at this contract boundary. | — |
| $defs.step.reason | string | No | Defines the reason value at this contract boundary. | — |
| $defs.step.refreshCommands | array | Yes | Defines the refreshcommands value at this contract boundary. | — |
| $defs.step.repairIntent | reference | No | Defines the repairintent value at this contract boundary. | ref: #/$defs/repairIntent |
| $defs.step.risk | enum | Yes | Defines the risk value at this contract boundary. | enum: safe, guarded, invasive |
| $defs.step.rollback | reference | Yes | Defines the rollback value at this contract boundary. | ref: #/$defs/rollback |
| $defs.step.studioStatus | reference | Yes | Defines the studiostatus value at this contract boundary. | ref: #/$defs/studioStatus |
| $defs.step.verifyCommand | string | No | Defines the verifycommand value at this contract boundary. | — |
| $defs.studioStatus.reason | string | Yes | Defines the reason value at this contract boundary. | — |
| $defs.studioStatus.state | enum | Yes | Defines the state value at this contract boundary. | enum: ready, blocked, review-required, guidance-only |
| executableSteps | integer | Yes | Defines the executablesteps value at this contract boundary. | minimum: 0 |
| fixableProjects | integer | Yes | Defines the fixableprojects value at this contract boundary. | minimum: 0 |
| generatedAt | string | Yes | Defines the generatedat value at this contract boundary. | — |
| policyProfile | enum | Yes | Defines the policyprofile value at this contract boundary. | enum: local, ci, release, enterprise-strict |
| risk | reference | Yes | Defines the risk value at this contract boundary. | ref: #/$defs/riskSummary |
| schemaVersion | string | Yes | Defines the schemaversion value at this contract boundary. | const: "doctor-remediation-plan-v2" |
| steps | array | Yes | Defines the steps value at this contract boundary. | — |
| totalSteps | integer | Yes | Defines the totalsteps 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://rapidkit.dev/contracts/doctor-remediation-plan.v1.json",
"title": "RapidKit Doctor Remediation Plan v2 Legacy Path Alias",
"description": "Deprecated compatibility path. New consumers must resolve contracts/doctor-remediation-plan.v2.json.",
"type": "object",
"additionalProperties": false,
"required": [
"schemaVersion",
"generatedAt",
"policyProfile",
"fixableProjects",
"totalSteps",
"executableSteps",
"risk",
"steps"
],
"properties": {
"schemaVersion": {
"const": "doctor-remediation-plan-v2"
},
"generatedAt": {
"type": "string"
},
"policyProfile": {
"enum": [
"local",
"ci",
"release",
"enterprise-strict"
]
},
"fixableProjects": {
"type": "integer",
"minimum": 0
},
"totalSteps": {
"type": "integer",
"minimum": 0
},
"executableSteps": {
"type": "integer",
"minimum": 0
},
"risk": {
"$ref": "#/$defs/riskSummary"
},
"steps": {
"type": "array",
"items": {
"$ref": "#/$defs/step"
}
}
},
"$defs": {
"riskSummary": {
"type": "object",
"additionalProperties": false,
"required": [
"safe",
"guarded",
"invasive"
],
"properties": {
"safe": {
"type": "integer",
"minimum": 0
},
"guarded": {
"type": "integer",
"minimum": 0
},
"invasive": {
"type": "integer",
"minimum": 0
}
}
},
"preview": {
"type": "object",
"additionalProperties": false,
"required": [
"title",
"summary",
"changes"
],
"properties": {
"title": {
"type": "string"
},
"summary": {
"type": "string"
},
"changes": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"rollback": {
"type": "object",
"additionalProperties": false,
"required": [
"available",
"strategy"
],
"properties": {
"available": {
"type": "boolean"
},
"strategy": {
"enum": [
"snapshot",
"idempotent",
"manual",
"none"
]
}
}
},
"diffPreview": {
"type": "object",
"additionalProperties": false,
"required": [
"available",
"format",
"summary",
"hunks"
],
"properties": {
"available": {
"type": "boolean"
},
"format": {
"enum": [
"unified",
"summary",
"none"
]
},
"summary": {
"type": "string"
},
"hunks": {
"type": "array",
"items": {
"type": "string"
}
},
"limitations": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"studioStatus": {
"type": "object",
"additionalProperties": false,
"required": [
"state",
"reason"
],
"properties": {
"state": {
"enum": [
"ready",
"blocked",
"review-required",
"guidance-only"
]
},
"reason": {
"type": "string"
}
}
},
"repairIntent": {
"type": "object",
"additionalProperties": false,
"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"
]
},
"primaryActionLabel": {
"type": "string"
},
"requiresApproval": {
"type": "boolean"
},
"confidence": {
"enum": [
"high",
"medium",
"low"
]
},
"requiresFreshEvidence": {
"type": "boolean"
},
"reason": {
"type": "string"
},
"relatedCommands": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"repairOperation": {
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"required": [
"type",
"path",
"content",
"overwrite"
],
"properties": {
"type": {
"const": "file-create"
},
"path": {
"type": "string"
},
"content": {
"type": "string"
},
"overwrite": {
"const": false
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"type",
"path",
"lines",
"ensureNewline"
],
"properties": {
"type": {
"const": "file-append"
},
"path": {
"type": "string"
},
"lines": {
"type": "array",
"items": {
"type": "string"
}
},
"ensureNewline": {
"type": "boolean"
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"type",
"sourcePath",
"path",
"overwrite"
],
"properties": {
"type": {
"const": "file-copy"
},
"sourcePath": {
"type": "string"
},
"path": {
"type": "string"
},
"overwrite": {
"const": false
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"type",
"path",
"scriptName",
"scriptValue"
],
"properties": {
"type": {
"const": "package-json-script"
},
"path": {
"type": "string"
},
"scriptName": {
"type": "string"
},
"scriptValue": {
"type": "string"
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"type",
"path",
"edits"
],
"properties": {
"type": {
"const": "json-edit"
},
"path": {
"type": "string"
},
"edits": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"pointer",
"value"
],
"properties": {
"pointer": {
"type": "string"
},
"value": {
"type": [
"string",
"number",
"boolean",
"null"
]
}
}
}
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"type",
"path",
"keys"
],
"properties": {
"type": {
"const": "env-key-add"
},
"path": {
"type": "string"
},
"keys": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"name",
"value"
],
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string"
},
"comment": {
"type": "string"
}
}
}
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"type",
"path",
"target",
"command",
"phony"
],
"properties": {
"type": {
"const": "makefile-target"
},
"path": {
"type": "string"
},
"target": {
"type": "string"
},
"command": {
"type": "string"
},
"phony": {
"type": "boolean"
}
}
}
]
},
"step": {
"type": "object",
"additionalProperties": false,
"required": [
"id",
"phase",
"order",
"dependsOn",
"projectName",
"projectPath",
"originalCommand",
"kind",
"risk",
"executable",
"files",
"preview",
"diffPreview",
"refreshCommands",
"rollback",
"studioStatus",
"executableInCurrentEnvironment"
],
"properties": {
"id": {
"type": "string"
},
"phase": {
"enum": [
"dependency-baseline",
"local-environment",
"source-hygiene",
"command-contract",
"runtime-governance",
"manual-review",
"generic-execution"
]
},
"order": {
"type": "integer",
"minimum": 1
},
"dependsOn": {
"type": "array",
"items": {
"type": "string"
}
},
"projectName": {
"type": "string"
},
"projectPath": {
"type": "string"
},
"originalCommand": {
"type": "string"
},
"kind": {
"enum": [
"env-copy",
"package-json-script",
"file-create",
"file-append",
"json-edit",
"env-key-add",
"makefile-target",
"rapidkit-init",
"go-mod-tidy",
"dependency-sync",
"manual-url",
"shell"
]
},
"risk": {
"enum": [
"safe",
"guarded",
"invasive"
]
},
"executable": {
"type": "boolean"
},
"reason": {
"type": "string"
},
"issueId": {
"type": "string"
},
"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"
},
"files": {
"type": "array",
"items": {
"type": "string"
}
},
"operation": {
"$ref": "#/$defs/repairOperation"
},
"preview": {
"$ref": "#/$defs/preview"
},
"diffPreview": {
"$ref": "#/$defs/diffPreview"
},
"verifyCommand": {
"type": "string"
},
"refreshCommands": {
"type": "array",
"items": {
"type": "string"
}
},
"rollback": {
"$ref": "#/$defs/rollback"
},
"studioStatus": {
"$ref": "#/$defs/studioStatus"
},
"executableInCurrentEnvironment": {
"type": "boolean"
},
"blockedReason": {
"type": "string"
}
}
}
}
}