Workspace Intelligence / JSON Schema
Workspace Intelligence Run
Defines the versioned workspace intelligence run v1 boundary used by Workspai and its consumers.
- Schema version
workspace-intelligence-run.v1- Contract path
contracts/workspace-intelligence/workspace-intelligence-run.v1.json- Publication
- embedded-type
- Defined fields
- 22
- 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
- • 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-intelligence-run-last-run.json | workspace-intelligence-run.v1 | workspai workspace intelligence run |
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.preflight.artifacts | array | Yes | Defines the artifacts value at this contract boundary. | — |
| $defs.preflight.durationMs | integer | Yes | Defines the durationms value at this contract boundary. | minimum: 0 |
| $defs.preflight.id | string | Yes | Defines the id value at this contract boundary. | minLength: 1 |
| $defs.preflight.message | string | Yes | Defines the message value at this contract boundary. | minLength: 1 |
| $defs.preflight.result | enum | Yes | Defines the result value at this contract boundary. | enum: synchronized, created, reused, failed, skipped |
| $defs.preflight.status | enum | Yes | Defines the status value at this contract boundary. | enum: passed, failed, skipped |
| $defs.stage.artifacts | array | Yes | Defines the artifacts value at this contract boundary. | — |
| $defs.stage.durationMs | integer | Yes | Defines the durationms value at this contract boundary. | minimum: 0 |
| $defs.stage.exitCode | integer | Yes | Defines the exitcode value at this contract boundary. | minimum: 0 |
| $defs.stage.id | string | Yes | Defines the id value at this contract boundary. | minLength: 1 |
| $defs.stage.message | string | Yes | Defines the message value at this contract boundary. | minLength: 1 |
| $defs.stage.status | enum | Yes | Defines the status value at this contract boundary. | enum: passed, blocked, failed, skipped |
| artifactPath | string | Yes | Defines the artifactpath value at this contract boundary. | const: ".workspai/reports/workspace-intelligence-run-last-run.json" |
| baselineCreated | boolean | Yes | Defines the baselinecreated value at this contract boundary. | — |
| chainSchemaVersion | string | Yes | Defines the chainschemaversion value at this contract boundary. | const: "workspai-workspace-intelligence-chain-v1" |
| exitCode | enum | Yes | Defines the exitcode value at this contract boundary. | enum: 0, 1, 2 |
| generatedAt | string | Yes | Defines the generatedat value at this contract boundary. | format: date-time |
| preflight | array | Yes | Defines the preflight value at this contract boundary. | minItems: 2 · maxItems: 2 |
| schemaVersion | string | Yes | Defines the schemaversion value at this contract boundary. | const: "workspace-intelligence-run.v1" |
| stages | array | Yes | Defines the stages value at this contract boundary. | minItems: 11 · maxItems: 11 |
| status | enum | Yes | Defines the status value at this contract boundary. | enum: passed, blocked, failed |
| workspacePath | string | Yes | Defines the workspacepath value at this contract boundary. | minLength: 1 |
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/workspace-intelligence/workspace-intelligence-run.v1.json",
"title": "Workspace Intelligence Run",
"type": "object",
"additionalProperties": false,
"required": [
"schemaVersion",
"chainSchemaVersion",
"generatedAt",
"workspacePath",
"baselineCreated",
"preflight",
"status",
"exitCode",
"stages",
"artifactPath"
],
"properties": {
"schemaVersion": {
"const": "workspace-intelligence-run.v1"
},
"chainSchemaVersion": {
"const": "workspai-workspace-intelligence-chain-v1"
},
"generatedAt": {
"type": "string",
"format": "date-time"
},
"workspacePath": {
"type": "string",
"minLength": 1
},
"baselineCreated": {
"type": "boolean"
},
"preflight": {
"type": "array",
"minItems": 2,
"maxItems": 2,
"prefixItems": [
{
"$ref": "#/$defs/preflight",
"type": "object",
"properties": {
"id": {
"const": "sync"
},
"status": {
"enum": [
"passed",
"failed"
]
},
"result": {
"enum": [
"synchronized",
"failed"
]
},
"artifacts": {
"const": [
".workspai/workspace.contract.json",
".workspai/workspace-registry.v1.json"
]
}
}
},
{
"$ref": "#/$defs/preflight",
"type": "object",
"properties": {
"id": {
"const": "baseline"
},
"status": {
"enum": [
"passed",
"failed",
"skipped"
]
},
"result": {
"enum": [
"created",
"reused",
"failed",
"skipped"
]
},
"artifacts": {
"const": [
".workspai/reports/workspace-model-snapshot.json"
]
}
}
}
],
"items": false
},
"status": {
"enum": [
"passed",
"blocked",
"failed"
]
},
"exitCode": {
"enum": [
0,
1,
2
]
},
"artifactPath": {
"const": ".workspai/reports/workspace-intelligence-run-last-run.json"
},
"stages": {
"type": "array",
"minItems": 11,
"maxItems": 11,
"prefixItems": [
{
"$ref": "#/$defs/stage",
"type": "object",
"properties": {
"id": {
"const": "model"
},
"artifacts": {
"const": [
".workspai/reports/workspace-model.json"
]
}
}
},
{
"$ref": "#/$defs/stage",
"type": "object",
"properties": {
"id": {
"const": "diff"
},
"artifacts": {
"const": [
".workspai/reports/workspace-model-diff-last-run.json"
]
}
}
},
{
"$ref": "#/$defs/stage",
"type": "object",
"properties": {
"id": {
"const": "impact"
},
"artifacts": {
"const": [
".workspai/reports/workspace-impact-last-run.json"
]
}
}
},
{
"$ref": "#/$defs/stage",
"type": "object",
"properties": {
"id": {
"const": "doctor-evidence"
},
"artifacts": {
"const": [
".workspai/reports/doctor-last-run.json"
]
}
}
},
{
"$ref": "#/$defs/stage",
"type": "object",
"properties": {
"id": {
"const": "contract-evidence"
},
"artifacts": {
"const": [
".workspai/reports/workspace-contract-verify-last-run.json"
]
}
}
},
{
"$ref": "#/$defs/stage",
"type": "object",
"properties": {
"id": {
"const": "analyze-evidence"
},
"artifacts": {
"const": [
".workspai/reports/analyze-last-run.json"
]
}
}
},
{
"$ref": "#/$defs/stage",
"type": "object",
"properties": {
"id": {
"const": "readiness-evidence"
},
"artifacts": {
"const": [
".workspai/reports/release-readiness-last-run.json"
]
}
}
},
{
"$ref": "#/$defs/stage",
"type": "object",
"properties": {
"id": {
"const": "verify"
},
"artifacts": {
"const": [
".workspai/reports/workspace-verify-last-run.json",
".workspai/reports/workspace-intelligence-history.json"
]
}
}
},
{
"$ref": "#/$defs/stage",
"type": "object",
"properties": {
"id": {
"const": "context"
},
"artifacts": {
"const": [
".workspai/reports/workspace-context-agent.json"
]
}
}
},
{
"$ref": "#/$defs/stage",
"type": "object",
"properties": {
"id": {
"const": "agent-sync"
},
"artifacts": {
"const": [
".workspai/reports/INDEX.json",
".workspai/reports/agent-customization-pack.json",
".workspai/reports/workspace-skills-index.json",
"AGENTS.md"
]
}
}
},
{
"$ref": "#/$defs/stage",
"type": "object",
"properties": {
"id": {
"const": "explain"
},
"artifacts": {
"const": [
".workspai/reports/workspace-explain-last-run.json"
]
}
}
}
],
"items": false
}
},
"$defs": {
"preflight": {
"type": "object",
"additionalProperties": false,
"required": [
"id",
"status",
"result",
"durationMs",
"artifacts",
"message"
],
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"status": {
"enum": [
"passed",
"failed",
"skipped"
]
},
"result": {
"enum": [
"synchronized",
"created",
"reused",
"failed",
"skipped"
]
},
"durationMs": {
"type": "integer",
"minimum": 0
},
"artifacts": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"uniqueItems": true
},
"message": {
"type": "string",
"minLength": 1
}
}
},
"stage": {
"type": "object",
"additionalProperties": false,
"required": [
"id",
"status",
"durationMs",
"artifacts",
"exitCode",
"message"
],
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"status": {
"enum": [
"passed",
"blocked",
"failed",
"skipped"
]
},
"durationMs": {
"type": "integer",
"minimum": 0
},
"artifacts": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"uniqueItems": true
},
"exitCode": {
"type": "integer",
"minimum": 0
},
"message": {
"type": "string",
"minLength": 1
}
}
}
}
}