Workspace Intelligence / JSON Schema
Workspai Workspace Model Diff
Defines the versioned workspace model diff v1 boundary used by Workspai and its consumers.
- Schema version
workspace-model-diff.v1- Contract path
contracts/workspace-intelligence/workspace-model-diff.v1.json- Publication
- embedded-type
- Defined fields
- 30
- Artifact bindings
- 1
Why this contract exists
Architecture role
Defines canonical workspace state or a versioned projection of that state.
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.
Produced artifacts
These durable files are emitted by registered commands and validated against this contract.
| Artifact path | Schema | Producer |
|---|---|---|
| .workspai/reports/workspace-model-diff-last-run.json | workspace-model-diff.v1 | workspai workspace diff --from .workspai/reports/workspace-model-snapshot.json --json |
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 |
|---|---|---|---|---|
| changes | array | Yes | Defines the changes value at this contract boundary. | — |
| changes[].message | string | Yes | Defines the message value at this contract boundary. | — |
| changes[].severity | enum | Yes | Defines the severity value at this contract boundary. | enum: info, warning, critical |
| changes[].target | string | Yes | Defines the target value at this contract boundary. | — |
| changes[].type | enum | Yes | Defines the type value at this contract boundary. | enum: project.added, project.removed, project.changed, workspace.changed, validation.changed, git.file.changed, git.untracked, git.deleted |
| currentModel | object | Yes | Defines the currentmodel value at this contract boundary. | additionalProperties: true |
| currentModel.schemaVersion | string | Yes | Defines the schemaversion value at this contract boundary. | const: "workspace-model.v1" |
| fromHash | string | Yes | Defines the fromhash value at this contract boundary. | — |
| fromRef | string | Yes | Defines the fromref value at this contract boundary. | — |
| generatedAt | string | Yes | Defines the generatedat value at this contract boundary. | format: date-time |
| git | object | No | Defines the git value at this contract boundary. | additionalProperties: false |
| git.available | boolean | Yes | Defines the available value at this contract boundary. | — |
| git.branch | string | No | Defines the branch value at this contract boundary. | — |
| git.changedFiles | integer | Yes | Defines the changedfiles value at this contract boundary. | minimum: 0 |
| git.commit | string | No | Defines the commit value at this contract boundary. | — |
| git.deletedFiles | integer | Yes | Defines the deletedfiles value at this contract boundary. | minimum: 0 |
| git.dirty | boolean | Yes | Defines the dirty value at this contract boundary. | — |
| git.ref | string | No | Defines the ref value at this contract boundary. | — |
| git.untrackedFiles | integer | Yes | Defines the untrackedfiles value at this contract boundary. | minimum: 0 |
| schemaVersion | string | Yes | Defines the schemaversion value at this contract boundary. | const: "workspace-model-diff.v1" |
| summary | object | Yes | Defines the summary value at this contract boundary. | additionalProperties: false |
| summary.addedProjects | integer | Yes | Defines the addedprojects value at this contract boundary. | minimum: 0 |
| summary.changed | boolean | Yes | Defines the changed value at this contract boundary. | — |
| summary.changedProjects | integer | Yes | Defines the changedprojects value at this contract boundary. | minimum: 0 |
| summary.gitChangedFiles | integer | Yes | Defines the gitchangedfiles value at this contract boundary. | minimum: 0 |
| summary.removedProjects | integer | Yes | Defines the removedprojects value at this contract boundary. | minimum: 0 |
| summary.validationChanges | integer | Yes | Defines the validationchanges value at this contract boundary. | minimum: 0 |
| summary.workspaceChanges | integer | Yes | Defines the workspacechanges value at this contract boundary. | minimum: 0 |
| toHash | string | Yes | Defines the tohash value at this contract boundary. | — |
| toRef | string | Yes | Defines the toref 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/workspace-model-diff.v1.json",
"title": "Workspai Workspace Model Diff",
"type": "object",
"required": [
"schemaVersion",
"generatedAt",
"fromRef",
"toRef",
"fromHash",
"toHash",
"summary",
"changes",
"currentModel"
],
"properties": {
"schemaVersion": {
"const": "workspace-model-diff.v1"
},
"generatedAt": {
"type": "string",
"format": "date-time"
},
"fromRef": {
"type": "string"
},
"toRef": {
"type": "string"
},
"fromHash": {
"type": "string"
},
"toHash": {
"type": "string"
},
"summary": {
"type": "object",
"required": [
"changed",
"addedProjects",
"removedProjects",
"changedProjects",
"workspaceChanges",
"validationChanges",
"gitChangedFiles"
],
"properties": {
"changed": {
"type": "boolean"
},
"addedProjects": {
"type": "integer",
"minimum": 0
},
"removedProjects": {
"type": "integer",
"minimum": 0
},
"changedProjects": {
"type": "integer",
"minimum": 0
},
"workspaceChanges": {
"type": "integer",
"minimum": 0
},
"validationChanges": {
"type": "integer",
"minimum": 0
},
"gitChangedFiles": {
"type": "integer",
"minimum": 0
}
},
"additionalProperties": false
},
"git": {
"type": "object",
"required": [
"available",
"dirty",
"changedFiles",
"untrackedFiles",
"deletedFiles"
],
"properties": {
"available": {
"type": "boolean"
},
"ref": {
"type": "string"
},
"branch": {
"type": "string"
},
"commit": {
"type": "string"
},
"dirty": {
"type": "boolean"
},
"changedFiles": {
"type": "integer",
"minimum": 0
},
"untrackedFiles": {
"type": "integer",
"minimum": 0
},
"deletedFiles": {
"type": "integer",
"minimum": 0
}
},
"additionalProperties": false
},
"changes": {
"type": "array",
"items": {
"type": "object",
"required": [
"type",
"severity",
"target",
"message"
],
"properties": {
"type": {
"enum": [
"project.added",
"project.removed",
"project.changed",
"workspace.changed",
"validation.changed",
"git.file.changed",
"git.untracked",
"git.deleted"
]
},
"severity": {
"enum": [
"info",
"warning",
"critical"
]
},
"target": {
"type": "string"
},
"message": {
"type": "string"
}
},
"additionalProperties": true
}
},
"currentModel": {
"type": "object",
"required": [
"schemaVersion"
],
"properties": {
"schemaVersion": {
"const": "workspace-model.v1"
}
},
"additionalProperties": true
}
},
"additionalProperties": true
}