All contracts

Workspace Intelligence / JSON Schema

Workspai Decision Event

Defines the versioned decision event v1 boundary used by Workspai and its consumers.

Schema version
workspai.decision-event.v1
Contract path
contracts/workspace-intelligence/decision-event.v1.json
Publication
json-schema
Defined fields
60
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 pathTypeRequiredMeaningConstraints
$defs.artifactReference.artifactstringYesDefines the artifact value at this contract boundary.minLength: 1
$defs.artifactReference.digestreferenceYesDefines the digest value at this contract boundary.ref: #/$defs/digest
$defs.artifactReference.rolestringYesDefines the role value at this contract boundary.minLength: 1
$defs.artifactReference.schemaVersionstringYesDefines the schemaversion value at this contract boundary.minLength: 1
$defs.authorization.effectClassesarrayYesDefines the effectclasses value at this contract boundary.minItems: 1
$defs.authorization.grantenumYesDefines the grant value at this contract boundary.enum: bounded-effects, verification-only
$defs.authorization.grantedBystringYesDefines the grantedby value at this contract boundary.minLength: 1
$defs.blocker.actionablebooleanYesDefines the actionable value at this contract boundary.
$defs.blocker.codestringYesDefines the code value at this contract boundary.minLength: 1
$defs.blocker.detailsstringNoDefines the details value at this contract boundary.
$defs.deletedArtifactReference.artifactstringYesDefines the artifact value at this contract boundary.minLength: 1
$defs.deletedArtifactReference.digestobjectYesDefines the digest value at this contract boundary.additionalProperties: false
$defs.deletedArtifactReference.digest.algorithmstringYesDefines the algorithm value at this contract boundary.const: "sha256"
$defs.deletedArtifactReference.digest.semanticsstringYesDefines the semantics value at this contract boundary.const: "deletion-tombstone-v1"
$defs.deletedArtifactReference.digest.valuereferenceYesDefines the value value at this contract boundary.ref: #/$defs/sha256
$defs.deletedArtifactReference.observedAtstringYesDefines the observedat value at this contract boundary.format: date-time
$defs.digest.algorithmstringYesDefines the algorithm value at this contract boundary.const: "sha256"
$defs.digest.semanticsenumYesDefines the semantics value at this contract boundary.enum: canonical-json-v1, raw-bytes-v1, workspace-model-structural-v1
$defs.digest.valuereferenceYesDefines the value value at this contract boundary.ref: #/$defs/sha256
$defs.effectReceipt.artifactsarrayYesDefines the artifacts value at this contract boundary.
$defs.effectReceipt.commandarrayNoDefines the command value at this contract boundary.minItems: 1
$defs.effectReceipt.deletedArtifactsarrayNoDefines the deletedartifacts value at this contract boundary.
$defs.effectReceipt.effectClassenumYesDefines the effectclass value at this contract boundary.enum: filesystem, command, configuration, dependency, external
$defs.effectReceipt.idstringYesDefines the id value at this contract boundary.minLength: 1
$defs.effectReceipt.idempotencyKeystringYesDefines the idempotencykey value at this contract boundary.minLength: 1
$defs.effectReceipt.observedAtstringYesDefines the observedat value at this contract boundary.format: date-time
$defs.effectReceipt.statusenumYesDefines the status value at this contract boundary.enum: succeeded, failed, uncertain
$defs.effectReceipt.summarystringYesDefines the summary value at this contract boundary.minLength: 1
$defs.payload.authorizationreferenceNoDefines the authorization value at this contract boundary.ref: #/$defs/authorization
$defs.payload.blockerreferenceNoDefines the blocker value at this contract boundary.ref: #/$defs/blocker
$defs.payload.effectreferenceNoDefines the effect value at this contract boundary.ref: #/$defs/effectReceipt
$defs.payload.reasonstringNoDefines the reason value at this contract boundary.
$defs.payload.referencesarrayNoDefines the references value at this contract boundary.
$defs.payload.resumeToenumNoDefines the resumeto value at this contract boundary.enum: authorized, executing, verifying
$defs.payload.scopereferenceNoDefines the scope value at this contract boundary.ref: #/$defs/scope
$defs.payload.summarystringYesDefines the summary value at this contract boundary.minLength: 1
$defs.payload.verificationreferenceNoDefines the verification value at this contract boundary.ref: #/$defs/verificationReceipt
$defs.scope.kindenumYesDefines the kind value at this contract boundary.enum: workspace, project, project-set
$defs.scope.projectsarrayYesDefines the projects value at this contract boundary.
$defs.verificationReceipt.artifactsarrayYesDefines the artifacts value at this contract boundary.
$defs.verificationReceipt.criterionIdstringYesDefines the criterionid value at this contract boundary.minLength: 1
$defs.verificationReceipt.idstringYesDefines the id value at this contract boundary.minLength: 1
$defs.verificationReceipt.observedAtstringYesDefines the observedat value at this contract boundary.format: date-time
$defs.verificationReceipt.statusenumYesDefines the status value at this contract boundary.enum: passed, failed, inconclusive
$defs.verificationReceipt.summarystringYesDefines the summary value at this contract boundary.minLength: 1
$defs.verificationReceipt.targetobjectYesDefines the target value at this contract boundary.additionalProperties: false
$defs.verificationReceipt.target.effectHeadDigestreferenceYesDefines the effectheaddigest value at this contract boundary.ref: #/$defs/sha256
$defs.verificationReceipt.target.graphHashreferenceYesDefines the graphhash value at this contract boundary.ref: #/$defs/sha256
$defs.verificationReceipt.target.modelHashreferenceYesDefines the modelhash value at this contract boundary.ref: #/$defs/sha256
actorobjectYesDefines the actor value at this contract boundary.additionalProperties: false
actor.idstringYesDefines the id value at this contract boundary.minLength: 1
actor.kindenumYesDefines the kind value at this contract boundary.enum: human, agent, cli, ci, extension
digestreferenceYesDefines the digest value at this contract boundary.ref: #/$defs/sha256
kindenumYesDefines the kind value at this contract boundary.enum: created, scope-bound, evidence-attached, plan-attached, authorized, effect-requested, effect-recorded, effect-uncertain, verification-started, verification-recorded, human-required, blocked, resumed, committed, rejected, aborted, superseded
occurredAtstringYesDefines the occurredat value at this contract boundary.format: date-time
payloadreferenceYesDefines the payload value at this contract boundary.ref: #/$defs/payload
previousEventDigestanyYesDefines the previouseventdigest value at this contract boundary.
schemaVersionstringYesDefines the schemaversion value at this contract boundary.const: "workspai.decision-event.v1"
sequenceintegerYesDefines the sequence value at this contract boundary.minimum: 1
transactionIdstringYesDefines the transactionid value at this contract boundary.pattern: ^change-[a-z0-9][a-z0-9-]{7,95}$

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/decision-event.v1.json",
  "title": "Workspai Decision Event",
  "type": "object",
  "required": [
    "schemaVersion",
    "transactionId",
    "sequence",
    "kind",
    "occurredAt",
    "actor",
    "previousEventDigest",
    "payload",
    "digest"
  ],
  "properties": {
    "schemaVersion": {
      "const": "workspai.decision-event.v1"
    },
    "transactionId": {
      "type": "string",
      "pattern": "^change-[a-z0-9][a-z0-9-]{7,95}$"
    },
    "sequence": {
      "type": "integer",
      "minimum": 1
    },
    "kind": {
      "enum": [
        "created",
        "scope-bound",
        "evidence-attached",
        "plan-attached",
        "authorized",
        "effect-requested",
        "effect-recorded",
        "effect-uncertain",
        "verification-started",
        "verification-recorded",
        "human-required",
        "blocked",
        "resumed",
        "committed",
        "rejected",
        "aborted",
        "superseded"
      ]
    },
    "occurredAt": {
      "type": "string",
      "format": "date-time"
    },
    "actor": {
      "type": "object",
      "required": [
        "kind",
        "id"
      ],
      "properties": {
        "kind": {
          "enum": [
            "human",
            "agent",
            "cli",
            "ci",
            "extension"
          ]
        },
        "id": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "previousEventDigest": {
      "oneOf": [
        {
          "$ref": "#/$defs/sha256"
        },
        {
          "type": "null"
        }
      ]
    },
    "payload": {
      "$ref": "#/$defs/payload"
    },
    "digest": {
      "$ref": "#/$defs/sha256"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "sha256": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "digest": {
      "type": "object",
      "required": [
        "algorithm",
        "semantics",
        "value"
      ],
      "properties": {
        "algorithm": {
          "const": "sha256"
        },
        "semantics": {
          "enum": [
            "canonical-json-v1",
            "raw-bytes-v1",
            "workspace-model-structural-v1"
          ]
        },
        "value": {
          "$ref": "#/$defs/sha256"
        }
      },
      "additionalProperties": false
    },
    "artifactReference": {
      "type": "object",
      "required": [
        "role",
        "artifact",
        "schemaVersion",
        "digest"
      ],
      "properties": {
        "role": {
          "type": "string",
          "minLength": 1
        },
        "artifact": {
          "type": "string",
          "minLength": 1
        },
        "schemaVersion": {
          "type": "string",
          "minLength": 1
        },
        "digest": {
          "$ref": "#/$defs/digest"
        }
      },
      "additionalProperties": false
    },
    "deletedArtifactReference": {
      "type": "object",
      "required": [
        "artifact",
        "observedAt",
        "digest"
      ],
      "properties": {
        "artifact": {
          "type": "string",
          "minLength": 1
        },
        "observedAt": {
          "type": "string",
          "format": "date-time"
        },
        "digest": {
          "type": "object",
          "required": [
            "algorithm",
            "semantics",
            "value"
          ],
          "properties": {
            "algorithm": {
              "const": "sha256"
            },
            "semantics": {
              "const": "deletion-tombstone-v1"
            },
            "value": {
              "$ref": "#/$defs/sha256"
            }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    },
    "scope": {
      "type": "object",
      "required": [
        "kind",
        "projects"
      ],
      "properties": {
        "kind": {
          "enum": [
            "workspace",
            "project",
            "project-set"
          ]
        },
        "projects": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          },
          "uniqueItems": true
        }
      },
      "additionalProperties": false
    },
    "authorization": {
      "type": "object",
      "required": [
        "grantedBy",
        "grant",
        "effectClasses"
      ],
      "properties": {
        "grantedBy": {
          "type": "string",
          "minLength": 1
        },
        "grant": {
          "enum": [
            "bounded-effects",
            "verification-only"
          ]
        },
        "effectClasses": {
          "type": "array",
          "items": {
            "enum": [
              "filesystem",
              "command",
              "configuration",
              "dependency",
              "external"
            ]
          },
          "minItems": 1,
          "uniqueItems": true
        }
      },
      "additionalProperties": false
    },
    "effectReceipt": {
      "type": "object",
      "required": [
        "id",
        "effectClass",
        "status",
        "summary",
        "artifacts",
        "observedAt",
        "idempotencyKey"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "effectClass": {
          "enum": [
            "filesystem",
            "command",
            "configuration",
            "dependency",
            "external"
          ]
        },
        "status": {
          "enum": [
            "succeeded",
            "failed",
            "uncertain"
          ]
        },
        "summary": {
          "type": "string",
          "minLength": 1
        },
        "command": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "minItems": 1
        },
        "artifacts": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/artifactReference"
          }
        },
        "deletedArtifacts": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/deletedArtifactReference"
          },
          "uniqueItems": true
        },
        "observedAt": {
          "type": "string",
          "format": "date-time"
        },
        "idempotencyKey": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "verificationReceipt": {
      "type": "object",
      "required": [
        "id",
        "criterionId",
        "status",
        "summary",
        "target",
        "artifacts",
        "observedAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "criterionId": {
          "type": "string",
          "minLength": 1
        },
        "status": {
          "enum": [
            "passed",
            "failed",
            "inconclusive"
          ]
        },
        "summary": {
          "type": "string",
          "minLength": 1
        },
        "target": {
          "type": "object",
          "required": [
            "modelHash",
            "graphHash",
            "effectHeadDigest"
          ],
          "properties": {
            "modelHash": {
              "$ref": "#/$defs/sha256"
            },
            "graphHash": {
              "$ref": "#/$defs/sha256"
            },
            "effectHeadDigest": {
              "$ref": "#/$defs/sha256"
            }
          },
          "additionalProperties": false
        },
        "artifacts": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/artifactReference"
          }
        },
        "observedAt": {
          "type": "string",
          "format": "date-time"
        }
      },
      "additionalProperties": false
    },
    "blocker": {
      "type": "object",
      "required": [
        "code",
        "actionable"
      ],
      "properties": {
        "code": {
          "type": "string",
          "minLength": 1
        },
        "actionable": {
          "type": "boolean"
        },
        "details": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "payload": {
      "type": "object",
      "required": [
        "summary"
      ],
      "properties": {
        "summary": {
          "type": "string",
          "minLength": 1
        },
        "scope": {
          "$ref": "#/$defs/scope"
        },
        "references": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/artifactReference"
          }
        },
        "authorization": {
          "$ref": "#/$defs/authorization"
        },
        "effect": {
          "$ref": "#/$defs/effectReceipt"
        },
        "verification": {
          "$ref": "#/$defs/verificationReceipt"
        },
        "blocker": {
          "$ref": "#/$defs/blocker"
        },
        "resumeTo": {
          "enum": [
            "authorized",
            "executing",
            "verifying"
          ]
        },
        "reason": {
          "type": "string"
        }
      },
      "additionalProperties": false
    }
  }
}