Diagnostics and remediation / JSON Schema
RapidKit Artifact Remediation Plan
Defines the versioned artifact remediation plan v1 boundary used by Workspai and its consumers.
- Schema version
artifact-remediation-plan-v1- Contract path
contracts/artifact-remediation-plan.v1.json- Publication
- json-schema
- Defined fields
- 42
- Artifact bindings
- 1
Why this contract exists
Architecture role
Defines a versioned interoperability boundary used by Workspai and contract-aware consumers.
Consumption boundary
- • Workspai CLI
- • Contract-aware integrations
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/artifact-remediation-plan-last-run.json | artifact-remediation-plan-v1 | workspai workspace remediation-plan |
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.action.artifactKind | string | Yes | Defines the artifactkind value at this contract boundary. | — |
| $defs.action.blocker | string | Yes | Defines the blocker value at this contract boundary. | — |
| $defs.action.cardId | string | Yes | Defines the cardid value at this contract boundary. | — |
| $defs.action.command | string | No | Defines the command value at this contract boundary. | — |
| $defs.action.cwd | enum | Yes | Defines the cwd value at this contract boundary. | enum: workspace, project |
| $defs.action.files | array | Yes | Defines the files value at this contract boundary. | — |
| $defs.action.id | string | Yes | Defines the id value at this contract boundary. | — |
| $defs.action.mode | enum | Yes | Defines the mode value at this contract boundary. | enum: edit-file, run-command, refresh-evidence, verify-before-fix, manual-guidance |
| $defs.action.notes | array | Yes | Defines the notes value at this contract boundary. | — |
| $defs.action.operation | reference | No | Defines the operation value at this contract boundary. | ref: #/$defs/operation |
| $defs.action.order | integer | Yes | Defines the order value at this contract boundary. | minimum: 0 |
| $defs.action.phase | string | Yes | Defines the phase value at this contract boundary. | — |
| $defs.action.requiresApproval | boolean | Yes | Defines the requiresapproval value at this contract boundary. | — |
| $defs.action.risk | enum | Yes | Defines the risk value at this contract boundary. | enum: safe, guarded, invasive |
| $defs.action.rollback | object | Yes | Defines the rollback value at this contract boundary. | additionalProperties: false |
| $defs.action.rollback.available | boolean | Yes | Defines the available value at this contract boundary. | — |
| $defs.action.rollback.strategy | enum | Yes | Defines the strategy value at this contract boundary. | enum: idempotent, manual, none |
| $defs.action.scope | enum | Yes | Defines the scope value at this contract boundary. | enum: workspace, project |
| $defs.action.status | enum | Yes | Defines the status value at this contract boundary. | enum: ready, review-required, blocked, guidance-only |
| $defs.action.summary | string | Yes | Defines the summary value at this contract boundary. | — |
| $defs.action.title | string | Yes | Defines the title value at this contract boundary. | — |
| $defs.action.verifyCommand | string | Yes | Defines the verifycommand 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 |
| actions | array | Yes | Defines the actions value at this contract boundary. | — |
| generatedAt | string | Yes | Defines the generatedat value at this contract boundary. | — |
| schemaVersion | string | Yes | Defines the schemaversion value at this contract boundary. | const: "artifact-remediation-plan-v1" |
| source | object | Yes | Defines the source value at this contract boundary. | additionalProperties: false |
| source.ciMode | boolean | Yes | Defines the cimode value at this contract boundary. | — |
| source.command | string | Yes | Defines the command value at this contract boundary. | const: "workspace remediation-plan" |
| source.includeAbsolutePaths | boolean | Yes | Defines the includeabsolutepaths value at this contract boundary. | — |
| source.reportsDir | string | Yes | Defines the reportsdir value at this contract boundary. | — |
| summary | object | Yes | Defines the summary value at this contract boundary. | additionalProperties: false |
| summary.artifactsScanned | integer | Yes | Defines the artifactsscanned value at this contract boundary. | minimum: 0 |
| summary.cardsCovered | integer | Yes | Defines the cardscovered value at this contract boundary. | minimum: 0 |
| summary.executableActions | integer | Yes | Defines the executableactions value at this contract boundary. | minimum: 0 |
| summary.risk | reference | Yes | Defines the risk value at this contract boundary. | ref: #/$defs/riskSummary |
| summary.totalActions | integer | Yes | Defines the totalactions value at this contract boundary. | minimum: 0 |
| workspace | object | Yes | Defines the workspace value at this contract boundary. | additionalProperties: false |
| workspace.name | string | Yes | Defines the name value at this contract boundary. | — |
| workspace.path | string | No | Defines the path 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://rapidkit.dev/contracts/artifact-remediation-plan.v1.json",
"title": "RapidKit Artifact Remediation Plan",
"type": "object",
"additionalProperties": false,
"required": [
"schemaVersion",
"generatedAt",
"workspace",
"source",
"summary",
"actions"
],
"properties": {
"schemaVersion": {
"const": "artifact-remediation-plan-v1"
},
"generatedAt": {
"type": "string"
},
"workspace": {
"type": "object",
"additionalProperties": false,
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
},
"path": {
"type": "string"
}
}
},
"source": {
"type": "object",
"additionalProperties": false,
"required": [
"command",
"reportsDir",
"includeAbsolutePaths",
"ciMode"
],
"properties": {
"command": {
"const": "workspace remediation-plan"
},
"reportsDir": {
"type": "string"
},
"includeAbsolutePaths": {
"type": "boolean"
},
"ciMode": {
"type": "boolean"
}
}
},
"summary": {
"type": "object",
"additionalProperties": false,
"required": [
"artifactsScanned",
"cardsCovered",
"totalActions",
"executableActions",
"risk"
],
"properties": {
"artifactsScanned": {
"type": "integer",
"minimum": 0
},
"cardsCovered": {
"type": "integer",
"minimum": 0
},
"totalActions": {
"type": "integer",
"minimum": 0
},
"executableActions": {
"type": "integer",
"minimum": 0
},
"risk": {
"$ref": "#/$defs/riskSummary"
}
}
},
"actions": {
"type": "array",
"items": {
"$ref": "#/$defs/action"
}
}
},
"$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
}
}
},
"operation": {
"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",
"command",
"cwd"
],
"properties": {
"type": {
"const": "run-command"
},
"command": {
"type": "string"
},
"cwd": {
"enum": [
"workspace",
"project"
]
}
}
}
]
},
"action": {
"type": "object",
"additionalProperties": false,
"required": [
"id",
"artifactKind",
"cardId",
"title",
"order",
"phase",
"scope",
"status",
"mode",
"risk",
"requiresApproval",
"blocker",
"summary",
"verifyCommand",
"cwd",
"files",
"rollback",
"notes"
],
"properties": {
"id": {
"type": "string"
},
"artifactKind": {
"type": "string"
},
"cardId": {
"type": "string"
},
"title": {
"type": "string"
},
"order": {
"type": "integer",
"minimum": 0
},
"phase": {
"type": "string"
},
"scope": {
"enum": [
"workspace",
"project"
]
},
"status": {
"enum": [
"ready",
"review-required",
"blocked",
"guidance-only"
]
},
"mode": {
"enum": [
"edit-file",
"run-command",
"refresh-evidence",
"verify-before-fix",
"manual-guidance"
]
},
"risk": {
"enum": [
"safe",
"guarded",
"invasive"
]
},
"requiresApproval": {
"type": "boolean"
},
"blocker": {
"type": "string"
},
"summary": {
"type": "string"
},
"command": {
"type": "string"
},
"verifyCommand": {
"type": "string"
},
"cwd": {
"enum": [
"workspace",
"project"
]
},
"files": {
"type": "array",
"items": {
"type": "string"
}
},
"operation": {
"$ref": "#/$defs/operation"
},
"rollback": {
"type": "object",
"additionalProperties": false,
"required": [
"available",
"strategy"
],
"properties": {
"available": {
"type": "boolean"
},
"strategy": {
"enum": [
"idempotent",
"manual",
"none"
]
}
}
},
"notes": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}