Workspace Intelligence / JSON Schema
Workspai Workspace Repair Proposal v1
A bounded, hash-pinned source change proposed by an IDE model for execution by the CLI Repair Engine.
- Schema version
workspai.workspace-repair-proposal.v1- Contract path
contracts/workspace-intelligence/workspace-repair-proposal.v1.json- Publication
- json-schema
- Defined fields
- 25
- Artifact bindings
- 0
Why this contract exists
Architecture role
Defines a versioned interoperability boundary used by Workspai and contract-aware consumers.
Consumption boundary
- • Workspai CLI
- • Workspace Intelligence consumers
- • IDEs and agents
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.change.content | string | No | Defines the content value at this contract boundary. | maxLength: 5242880 |
| $defs.change.expectedBeforeHash | any | Yes | Defines the expectedbeforehash value at this contract boundary. | — |
| $defs.change.id | string | Yes | Defines the id value at this contract boundary. | pattern: ^[A-Za-z0-9._-]{1,160}$ |
| $defs.change.operation | enum | Yes | Defines the operation value at this contract boundary. | enum: write, delete |
| $defs.change.path | string | Yes | Defines the path value at this contract boundary. | minLength: 1 · maxLength: 1000 |
| $defs.change.risk | enum | Yes | Defines the risk value at this contract boundary. | enum: safe, guarded, invasive |
| $defs.change.summary | string | Yes | Defines the summary value at this contract boundary. | minLength: 1 · maxLength: 1000 |
| $defs.validation.args | array | Yes | Defines the args value at this contract boundary. | maxItems: 100 |
| $defs.validation.cwd | string | Yes | Defines the cwd value at this contract boundary. | minLength: 1 · maxLength: 1000 |
| $defs.validation.executable | string | Yes | Defines the executable value at this contract boundary. | minLength: 1 · maxLength: 1000 |
| $defs.validation.id | string | Yes | Defines the id value at this contract boundary. | pattern: ^[A-Za-z0-9._-]{1,160}$ |
| $defs.validation.kind | enum | Yes | Defines the kind value at this contract boundary. | enum: audit, test, build |
| $defs.validation.required | boolean | Yes | Defines the required value at this contract boundary. | — |
| $defs.validation.risk | enum | Yes | Defines the risk value at this contract boundary. | enum: safe, guarded, invasive |
| $defs.validation.summary | string | Yes | Defines the summary value at this contract boundary. | minLength: 1 · maxLength: 1000 |
| $defs.validation.timeoutMs | integer | No | Defines the timeoutms value at this contract boundary. | minimum: 1000 · maximum: 900000 |
| blockerSignature | string | No | Defines the blockersignature value at this contract boundary. | minLength: 1 · maxLength: 256 |
| cardId | string | Yes | Defines the cardid value at this contract boundary. | minLength: 1 · maxLength: 160 |
| changes | array | Yes | Defines the changes value at this contract boundary. | minItems: 1 · maxItems: 100 |
| projectName | string | No | Defines the projectname value at this contract boundary. | minLength: 1 · maxLength: 200 |
| projectPath | string | No | Defines the projectpath value at this contract boundary. | minLength: 1 · maxLength: 1000 |
| rationale | string | Yes | Defines the rationale value at this contract boundary. | minLength: 1 · maxLength: 4000 |
| schemaVersion | string | Yes | Defines the schemaversion value at this contract boundary. | const: "workspai.workspace-repair-proposal.v1" |
| targetActionIds | array | No | Defines the targetactionids value at this contract boundary. | minItems: 1 · maxItems: 200 |
| validation | array | No | Defines the validation value at this contract boundary. | maxItems: 20 |
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/contracts/workspace-intelligence/workspace-repair-proposal.v1.json",
"title": "Workspai Workspace Repair Proposal v1",
"description": "A bounded, hash-pinned source change proposed by an IDE model for execution by the CLI Repair Engine.",
"type": "object",
"additionalProperties": false,
"required": [
"schemaVersion",
"cardId",
"rationale",
"changes"
],
"properties": {
"schemaVersion": {
"const": "workspai.workspace-repair-proposal.v1"
},
"cardId": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"blockerSignature": {
"type": "string",
"minLength": 1,
"maxLength": 256
},
"targetActionIds": {
"type": "array",
"minItems": 1,
"maxItems": 200,
"uniqueItems": true,
"items": {
"type": "string",
"minLength": 1,
"maxLength": 500
}
},
"projectName": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"projectPath": {
"type": "string",
"minLength": 1,
"maxLength": 1000
},
"rationale": {
"type": "string",
"minLength": 1,
"maxLength": 4000
},
"changes": {
"type": "array",
"minItems": 1,
"maxItems": 100,
"items": {
"$ref": "#/$defs/change"
}
},
"validation": {
"type": "array",
"maxItems": 20,
"items": {
"$ref": "#/$defs/validation"
}
}
},
"$defs": {
"change": {
"type": "object",
"additionalProperties": false,
"required": [
"id",
"path",
"operation",
"expectedBeforeHash",
"risk",
"summary"
],
"properties": {
"id": {
"type": "string",
"pattern": "^[A-Za-z0-9._-]{1,160}$"
},
"path": {
"type": "string",
"minLength": 1,
"maxLength": 1000
},
"operation": {
"enum": [
"write",
"delete"
]
},
"expectedBeforeHash": {
"oneOf": [
{
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
{
"type": "null"
}
]
},
"content": {
"type": "string",
"maxLength": 5242880
},
"risk": {
"enum": [
"safe",
"guarded",
"invasive"
]
},
"summary": {
"type": "string",
"minLength": 1,
"maxLength": 1000
}
},
"allOf": [
{
"if": {
"properties": {
"operation": {
"const": "write"
}
}
},
"then": {
"properties": {
"content": {
"type": "string",
"maxLength": 5242880
}
},
"required": [
"content"
]
},
"else": {
"not": {
"required": [
"content"
]
}
}
}
]
},
"validation": {
"type": "object",
"additionalProperties": false,
"required": [
"id",
"kind",
"cwd",
"executable",
"args",
"required",
"risk",
"summary"
],
"properties": {
"id": {
"type": "string",
"pattern": "^[A-Za-z0-9._-]{1,160}$"
},
"kind": {
"enum": [
"audit",
"test",
"build"
]
},
"cwd": {
"type": "string",
"minLength": 1,
"maxLength": 1000
},
"executable": {
"type": "string",
"minLength": 1,
"maxLength": 1000
},
"args": {
"type": "array",
"maxItems": 100,
"items": {
"type": "string",
"maxLength": 4000
}
},
"required": {
"type": "boolean"
},
"risk": {
"enum": [
"safe",
"guarded",
"invasive"
]
},
"summary": {
"type": "string",
"minLength": 1,
"maxLength": 1000
},
"timeoutMs": {
"type": "integer",
"minimum": 1000,
"maximum": 900000
}
}
}
}
}