Workspace Intelligence / JSON Schema
Workspai Architecture Surprise Report
Defines the versioned architecture surprise report v1 boundary used by Workspai and its consumers.
- Schema version
workspai.architecture-surprise-report.v1- Contract path
contracts/workspace-intelligence/architecture-surprise-report.v1.json- Publication
- json-schema
- Defined fields
- 15
- 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/changes/change-id/architecture-surprises.json | workspai.architecture-surprise-report.v1 | workspai change verify |
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 |
|---|---|---|---|---|
| actual | reference | Yes | Defines the actual value at this contract boundary. | ref: decision-event.v1.json#/$defs/artifactReference |
| changeId | string | Yes | Defines the changeid value at this contract boundary. | pattern: ^change-[a-z0-9][a-z0-9-]{7,95}$ |
| generatedAt | string | Yes | Defines the generatedat value at this contract boundary. | format: date-time |
| matched | reference | Yes | Defines the matched value at this contract boundary. | ref: #/$defs/operations |
| missing | reference | Yes | Defines the missing value at this contract boundary. | ref: #/$defs/operations |
| prediction | any | Yes | Defines the prediction value at this contract boundary. | — |
| schemaVersion | string | Yes | Defines the schemaversion value at this contract boundary. | const: "workspai.architecture-surprise-report.v1" |
| summary | object | Yes | Defines the summary value at this contract boundary. | additionalProperties: false |
| summary.actual | integer | Yes | Defines the actual value at this contract boundary. | minimum: 0 |
| summary.matched | integer | Yes | Defines the matched value at this contract boundary. | minimum: 0 |
| summary.missing | integer | Yes | Defines the missing value at this contract boundary. | minimum: 0 |
| summary.predicted | integer | Yes | Defines the predicted value at this contract boundary. | minimum: 0 |
| summary.unpredicted | integer | Yes | Defines the unpredicted value at this contract boundary. | minimum: 0 |
| summary.verdict | enum | Yes | Defines the verdict value at this contract boundary. | enum: exact, within-expectation, surprising, no-prediction |
| unpredicted | reference | Yes | Defines the unpredicted value at this contract boundary. | ref: #/$defs/operations |
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/schemas/workspace-intelligence/architecture-surprise-report.v1.json",
"title": "Workspai Architecture Surprise Report",
"type": "object",
"required": [
"schemaVersion",
"changeId",
"generatedAt",
"prediction",
"actual",
"matched",
"unpredicted",
"missing",
"summary"
],
"properties": {
"schemaVersion": {
"const": "workspai.architecture-surprise-report.v1"
},
"changeId": {
"type": "string",
"pattern": "^change-[a-z0-9][a-z0-9-]{7,95}$"
},
"generatedAt": {
"type": "string",
"format": "date-time"
},
"prediction": {
"oneOf": [
{
"$ref": "decision-event.v1.json#/$defs/artifactReference"
},
{
"type": "null"
}
]
},
"actual": {
"$ref": "decision-event.v1.json#/$defs/artifactReference"
},
"matched": {
"$ref": "#/$defs/operations"
},
"unpredicted": {
"$ref": "#/$defs/operations"
},
"missing": {
"$ref": "#/$defs/operations"
},
"summary": {
"type": "object",
"required": [
"predicted",
"actual",
"matched",
"unpredicted",
"missing",
"verdict"
],
"properties": {
"predicted": {
"type": "integer",
"minimum": 0
},
"actual": {
"type": "integer",
"minimum": 0
},
"matched": {
"type": "integer",
"minimum": 0
},
"unpredicted": {
"type": "integer",
"minimum": 0
},
"missing": {
"type": "integer",
"minimum": 0
},
"verdict": {
"enum": [
"exact",
"within-expectation",
"surprising",
"no-prediction"
]
}
},
"additionalProperties": false
}
},
"additionalProperties": false,
"$defs": {
"operations": {
"type": "array",
"items": {
"type": "object",
"required": [
"operation",
"targetKind",
"targetId"
],
"properties": {
"operation": {
"type": "string",
"minLength": 1
},
"targetKind": {
"type": "string",
"minLength": 1
},
"targetId": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false
}
}
}
}