All contracts

Workspace Intelligence / JSON Schema

Workspai Workspace Knowledge Graph Change Overlay

Portable graph-to-graph entity and relation changes with bounded impact and proof artifact projection.

Schema version
workspace-knowledge-graph-change-overlay.v1
Contract path
contracts/workspace-intelligence/workspace-knowledge-graph-change-overlay.v1.json
Publication
json-schema
Defined fields
40
Artifact bindings
0

Why this contract exists

Architecture role

Relates workspace structure and change so downstream reasoning remains traceable.

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.entityChange.afterreferenceYesDefines the after value at this contract boundary.ref: workspace-knowledge-graph.v1.json#/properties/entities/items
$defs.entityChange.beforereferenceYesDefines the before value at this contract boundary.ref: workspace-knowledge-graph.v1.json#/properties/entities/items
$defs.entityChange.changedFieldsarrayYesDefines the changedfields value at this contract boundary.minItems: 1
$defs.entityChange.idstringYesDefines the id value at this contract boundary.minLength: 1
$defs.graphRevision.fingerprintstringYesDefines the fingerprint value at this contract boundary.pattern: ^[a-f0-9]{64}$
$defs.graphRevision.generatedAtstringYesDefines the generatedat value at this contract boundary.format: date-time
$defs.graphRevision.schemaVersionstringYesDefines the schemaversion value at this contract boundary.const: "workspace-knowledge-graph.v1"
$defs.proofChange.afterreferenceYesDefines the after value at this contract boundary.ref: workspace-knowledge-graph.v1.json#/properties/proofs/items
$defs.proofChange.beforereferenceYesDefines the before value at this contract boundary.ref: workspace-knowledge-graph.v1.json#/properties/proofs/items
$defs.proofChange.changedFieldsarrayYesDefines the changedfields value at this contract boundary.minItems: 1
$defs.proofChange.idstringYesDefines the id value at this contract boundary.minLength: 1
$defs.relationChange.afterreferenceYesDefines the after value at this contract boundary.ref: workspace-knowledge-graph.v1.json#/properties/relations/items
$defs.relationChange.beforereferenceYesDefines the before value at this contract boundary.ref: workspace-knowledge-graph.v1.json#/properties/relations/items
$defs.relationChange.changedFieldsarrayYesDefines the changedfields value at this contract boundary.minItems: 1
$defs.relationChange.idstringYesDefines the id value at this contract boundary.minLength: 1
basereferenceYesDefines the base value at this contract boundary.ref: #/$defs/graphRevision
changedArtifactsarrayYesDefines the changedartifacts value at this contract boundary.
entitiesanyYesDefines the entities value at this contract boundary.
generatedAtstringYesDefines the generatedat value at this contract boundary.format: date-time
headreferenceYesDefines the head value at this contract boundary.ref: #/$defs/graphRevision
impactedEntityIdsarrayYesDefines the impactedentityids value at this contract boundary.
proofsanyYesDefines the proofs value at this contract boundary.
relationsanyYesDefines the relations value at this contract boundary.
schemaVersionstringYesDefines the schemaversion value at this contract boundary.const: "workspace-knowledge-graph-change-overlay.v1"
summaryobjectYesDefines the summary value at this contract boundary.additionalProperties: false
summary.changedArtifactsintegerYesDefines the changedartifacts value at this contract boundary.minimum: 0
summary.entityAddsintegerYesDefines the entityadds value at this contract boundary.minimum: 0
summary.entityChangesintegerYesDefines the entitychanges value at this contract boundary.minimum: 0
summary.entityRemovalsintegerYesDefines the entityremovals value at this contract boundary.minimum: 0
summary.impactedEntitiesintegerYesDefines the impactedentities value at this contract boundary.minimum: 0
summary.proofAddsintegerYesDefines the proofadds value at this contract boundary.minimum: 0
summary.proofChangesintegerYesDefines the proofchanges value at this contract boundary.minimum: 0
summary.proofRemovalsintegerYesDefines the proofremovals value at this contract boundary.minimum: 0
summary.relationAddsintegerYesDefines the relationadds value at this contract boundary.minimum: 0
summary.relationChangesintegerYesDefines the relationchanges value at this contract boundary.minimum: 0
summary.relationRemovalsintegerYesDefines the relationremovals value at this contract boundary.minimum: 0
summary.riskenumYesDefines the risk value at this contract boundary.enum: none, low, medium, high
workspaceobjectYesDefines the workspace value at this contract boundary.additionalProperties: false
workspace.namestringYesDefines the name value at this contract boundary.minLength: 1
workspace.profilestringNoDefines the profile 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-knowledge-graph-change-overlay.v1.json",
  "title": "Workspai Workspace Knowledge Graph Change Overlay",
  "description": "Portable graph-to-graph entity and relation changes with bounded impact and proof artifact projection.",
  "type": "object",
  "required": [
    "schemaVersion",
    "generatedAt",
    "workspace",
    "base",
    "head",
    "entities",
    "relations",
    "proofs",
    "impactedEntityIds",
    "changedArtifacts",
    "summary"
  ],
  "properties": {
    "schemaVersion": {
      "const": "workspace-knowledge-graph-change-overlay.v1"
    },
    "generatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "workspace": {
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "profile": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "base": {
      "$ref": "#/$defs/graphRevision"
    },
    "head": {
      "$ref": "#/$defs/graphRevision"
    },
    "entities": {
      "allOf": [
        {
          "$ref": "#/$defs/changeSet"
        },
        {
          "properties": {
            "added": {
              "type": "array",
              "items": {
                "$ref": "workspace-knowledge-graph.v1.json#/properties/entities/items"
              }
            },
            "removed": {
              "type": "array",
              "items": {
                "$ref": "workspace-knowledge-graph.v1.json#/properties/entities/items"
              }
            },
            "changed": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/entityChange"
              }
            }
          }
        }
      ]
    },
    "relations": {
      "allOf": [
        {
          "$ref": "#/$defs/changeSet"
        },
        {
          "properties": {
            "added": {
              "type": "array",
              "items": {
                "$ref": "workspace-knowledge-graph.v1.json#/properties/relations/items"
              }
            },
            "removed": {
              "type": "array",
              "items": {
                "$ref": "workspace-knowledge-graph.v1.json#/properties/relations/items"
              }
            },
            "changed": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/relationChange"
              }
            }
          }
        }
      ]
    },
    "proofs": {
      "allOf": [
        {
          "$ref": "#/$defs/changeSet"
        },
        {
          "properties": {
            "added": {
              "type": "array",
              "items": {
                "$ref": "workspace-knowledge-graph.v1.json#/properties/proofs/items"
              }
            },
            "removed": {
              "type": "array",
              "items": {
                "$ref": "workspace-knowledge-graph.v1.json#/properties/proofs/items"
              }
            },
            "changed": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/proofChange"
              }
            }
          }
        }
      ]
    },
    "impactedEntityIds": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      },
      "uniqueItems": true
    },
    "changedArtifacts": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "not": {
          "pattern": "^(?:/|[A-Za-z]:[\\\\/])"
        }
      },
      "uniqueItems": true
    },
    "summary": {
      "type": "object",
      "required": [
        "entityAdds",
        "entityRemovals",
        "entityChanges",
        "relationAdds",
        "relationRemovals",
        "relationChanges",
        "proofAdds",
        "proofRemovals",
        "proofChanges",
        "impactedEntities",
        "changedArtifacts",
        "risk"
      ],
      "properties": {
        "entityAdds": {
          "type": "integer",
          "minimum": 0
        },
        "entityRemovals": {
          "type": "integer",
          "minimum": 0
        },
        "entityChanges": {
          "type": "integer",
          "minimum": 0
        },
        "relationAdds": {
          "type": "integer",
          "minimum": 0
        },
        "relationRemovals": {
          "type": "integer",
          "minimum": 0
        },
        "relationChanges": {
          "type": "integer",
          "minimum": 0
        },
        "proofAdds": {
          "type": "integer",
          "minimum": 0
        },
        "proofRemovals": {
          "type": "integer",
          "minimum": 0
        },
        "proofChanges": {
          "type": "integer",
          "minimum": 0
        },
        "impactedEntities": {
          "type": "integer",
          "minimum": 0
        },
        "changedArtifacts": {
          "type": "integer",
          "minimum": 0
        },
        "risk": {
          "enum": [
            "none",
            "low",
            "medium",
            "high"
          ]
        }
      },
      "additionalProperties": false
    }
  },
  "$defs": {
    "graphRevision": {
      "type": "object",
      "required": [
        "schemaVersion",
        "generatedAt",
        "fingerprint"
      ],
      "properties": {
        "schemaVersion": {
          "const": "workspace-knowledge-graph.v1"
        },
        "generatedAt": {
          "type": "string",
          "format": "date-time"
        },
        "fingerprint": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        }
      },
      "additionalProperties": false
    },
    "changeSet": {
      "type": "object",
      "required": [
        "added",
        "removed",
        "changed"
      ]
    },
    "entityChange": {
      "type": "object",
      "required": [
        "id",
        "before",
        "after",
        "changedFields"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "before": {
          "$ref": "workspace-knowledge-graph.v1.json#/properties/entities/items"
        },
        "after": {
          "$ref": "workspace-knowledge-graph.v1.json#/properties/entities/items"
        },
        "changedFields": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "minItems": 1,
          "uniqueItems": true
        }
      },
      "additionalProperties": false
    },
    "relationChange": {
      "type": "object",
      "required": [
        "id",
        "before",
        "after",
        "changedFields"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "before": {
          "$ref": "workspace-knowledge-graph.v1.json#/properties/relations/items"
        },
        "after": {
          "$ref": "workspace-knowledge-graph.v1.json#/properties/relations/items"
        },
        "changedFields": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "minItems": 1,
          "uniqueItems": true
        }
      },
      "additionalProperties": false
    },
    "proofChange": {
      "type": "object",
      "required": [
        "id",
        "before",
        "after",
        "changedFields"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "before": {
          "$ref": "workspace-knowledge-graph.v1.json#/properties/proofs/items"
        },
        "after": {
          "$ref": "workspace-knowledge-graph.v1.json#/properties/proofs/items"
        },
        "changedFields": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "minItems": 1,
          "uniqueItems": true
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}