All contracts

Workspace Intelligence / JSON Schema

Workspai Proof-Carrying Change Capsule

Defines the versioned proof carrying change capsule v1 boundary used by Workspai and its consumers.

Schema version
workspai.proof-carrying-change-capsule.v1
Contract path
contracts/workspace-intelligence/proof-carrying-change-capsule.v1.json
Publication
json-schema
Defined fields
31
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 pathSchemaProducer
.workspai/changes/change-id/capsule.jsonworkspai.proof-carrying-change-capsule.v1
workspai change

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
actualOverlayanyYesDefines the actualoverlay value at this contract boundary.
assurancesarrayYesDefines the assurances value at this contract boundary.minItems: 5 · maxItems: 5
assurances[].idenumYesDefines the id value at this contract boundary.enum: intent-bound, baseline-pinned, effects-receipted, architecture-reobserved, independently-verified
assurances[].statusenumYesDefines the status value at this contract boundary.enum: passed, failed, pending
assurances[].summarystringYesDefines the summary value at this contract boundary.minLength: 1
baselinereferenceYesDefines the baseline value at this contract boundary.ref: architecture-change-lease.v1.json#/properties/baseline
changeIdstringYesDefines the changeid value at this contract boundary.pattern: ^change-[a-z0-9][a-z0-9-]{7,95}$
decisionobjectYesDefines the decision value at this contract boundary.additionalProperties: false
decision.effectHeadDigestreferenceYesDefines the effectheaddigest value at this contract boundary.ref: decision-event.v1.json#/$defs/sha256
decision.eventHeadDigestreferenceYesDefines the eventheaddigest value at this contract boundary.ref: decision-event.v1.json#/$defs/sha256
decision.generationintegerYesDefines the generation value at this contract boundary.minimum: 1
decision.statestringYesDefines the state value at this contract boundary.minLength: 1
decision.transactionreferenceYesDefines the transaction value at this contract boundary.ref: decision-event.v1.json#/$defs/artifactReference
deletedArtifactsarrayNoDefines the deletedartifacts value at this contract boundary.
effectsarrayYesDefines the effects value at this contract boundary.
generatedAtstringYesDefines the generatedat value at this contract boundary.format: date-time
goalIdstringYesDefines the goalid value at this contract boundary.minLength: 1
integrityobjectYesDefines the integrity value at this contract boundary.additionalProperties: false
integrity.algorithmstringYesDefines the algorithm value at this contract boundary.const: "sha256"
integrity.capsuleDigestreferenceYesDefines the capsuledigest value at this contract boundary.ref: decision-event.v1.json#/$defs/sha256
integrity.semanticsstringYesDefines the semantics value at this contract boundary.const: "canonical-json-v1"
intentreferenceYesDefines the intent value at this contract boundary.ref: decision-event.v1.json#/$defs/artifactReference
predictionanyYesDefines the prediction value at this contract boundary.
remainingUncertaintyarrayYesDefines the remaininguncertainty value at this contract boundary.
schemaVersionstringYesDefines the schemaversion value at this contract boundary.const: "workspai.proof-carrying-change-capsule.v1"
scopereferenceYesDefines the scope value at this contract boundary.ref: decision-event.v1.json#/$defs/scope
statusenumYesDefines the status value at this contract boundary.enum: open, blocked, verified, sealed, aborted
surpriseReportanyYesDefines the surprisereport value at this contract boundary.
verificationarrayYesDefines the verification value at this contract boundary.
workspaceobjectYesDefines the workspace value at this contract boundary.additionalProperties: false
workspace.namestringYesDefines the name 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://workspai.dev/schemas/workspace-intelligence/proof-carrying-change-capsule.v1.json",
  "title": "Workspai Proof-Carrying Change Capsule",
  "type": "object",
  "required": [
    "schemaVersion",
    "changeId",
    "goalId",
    "generatedAt",
    "status",
    "workspace",
    "scope",
    "decision",
    "intent",
    "baseline",
    "prediction",
    "actualOverlay",
    "surpriseReport",
    "effects",
    "verification",
    "assurances",
    "remainingUncertainty",
    "integrity"
  ],
  "properties": {
    "schemaVersion": {
      "const": "workspai.proof-carrying-change-capsule.v1"
    },
    "changeId": {
      "type": "string",
      "pattern": "^change-[a-z0-9][a-z0-9-]{7,95}$"
    },
    "goalId": {
      "type": "string",
      "minLength": 1
    },
    "generatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "status": {
      "enum": [
        "open",
        "blocked",
        "verified",
        "sealed",
        "aborted"
      ]
    },
    "workspace": {
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "scope": {
      "$ref": "decision-event.v1.json#/$defs/scope"
    },
    "decision": {
      "type": "object",
      "required": [
        "transaction",
        "eventHeadDigest",
        "effectHeadDigest",
        "state",
        "generation"
      ],
      "properties": {
        "transaction": {
          "$ref": "decision-event.v1.json#/$defs/artifactReference"
        },
        "eventHeadDigest": {
          "$ref": "decision-event.v1.json#/$defs/sha256"
        },
        "effectHeadDigest": {
          "$ref": "decision-event.v1.json#/$defs/sha256"
        },
        "state": {
          "type": "string",
          "minLength": 1
        },
        "generation": {
          "type": "integer",
          "minimum": 1
        }
      },
      "additionalProperties": false
    },
    "intent": {
      "$ref": "decision-event.v1.json#/$defs/artifactReference"
    },
    "baseline": {
      "$ref": "architecture-change-lease.v1.json#/properties/baseline"
    },
    "prediction": {
      "oneOf": [
        {
          "$ref": "decision-event.v1.json#/$defs/artifactReference"
        },
        {
          "type": "null"
        }
      ]
    },
    "actualOverlay": {
      "oneOf": [
        {
          "$ref": "decision-event.v1.json#/$defs/artifactReference"
        },
        {
          "type": "null"
        }
      ]
    },
    "surpriseReport": {
      "oneOf": [
        {
          "$ref": "decision-event.v1.json#/$defs/artifactReference"
        },
        {
          "type": "null"
        }
      ]
    },
    "effects": {
      "type": "array",
      "items": {
        "$ref": "decision-event.v1.json#/$defs/artifactReference"
      }
    },
    "deletedArtifacts": {
      "type": "array",
      "items": {
        "$ref": "decision-event.v1.json#/$defs/deletedArtifactReference"
      },
      "uniqueItems": true
    },
    "verification": {
      "type": "array",
      "items": {
        "$ref": "decision-event.v1.json#/$defs/artifactReference"
      }
    },
    "assurances": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "status",
          "summary"
        ],
        "properties": {
          "id": {
            "enum": [
              "intent-bound",
              "baseline-pinned",
              "effects-receipted",
              "architecture-reobserved",
              "independently-verified"
            ]
          },
          "status": {
            "enum": [
              "passed",
              "failed",
              "pending"
            ]
          },
          "summary": {
            "type": "string",
            "minLength": 1
          }
        },
        "additionalProperties": false
      },
      "minItems": 5,
      "maxItems": 5
    },
    "remainingUncertainty": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      },
      "uniqueItems": true
    },
    "integrity": {
      "type": "object",
      "required": [
        "algorithm",
        "semantics",
        "capsuleDigest"
      ],
      "properties": {
        "algorithm": {
          "const": "sha256"
        },
        "semantics": {
          "const": "canonical-json-v1"
        },
        "capsuleDigest": {
          "$ref": "decision-event.v1.json#/$defs/sha256"
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}