All contracts

Workspace Intelligence / JSON Schema

Workspai Workspace Intelligence Benchmark

A deterministic multi-scenario retrieval benchmark with an optional, separately classified evaluation measurement. Estimated retrieval reduction is never represented as measured model savings.

Schema version
workspace-intelligence-benchmark.v1
Contract path
contracts/workspace-intelligence/workspace-intelligence-benchmark.v1.json
Publication
json-schema
Defined fields
63
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/reports/workspace-intelligence-benchmark-last-run.jsonworkspace-intelligence-benchmark.v1
workspai workspace graph benchmark-suite --write

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.corpus.artifactCountintegerYesDefines the artifactcount value at this contract boundary.minimum: 0
$defs.corpus.characterCountintegerYesDefines the charactercount value at this contract boundary.minimum: 0
$defs.corpus.estimatedTokensintegerYesDefines the estimatedtokens value at this contract boundary.minimum: 0
$defs.corpus.unreadableArtifactsarrayYesDefines the unreadableartifacts value at this contract boundary.
$defs.currentEvaluation.runIdstringYesDefines the runid value at this contract boundary.minLength: 1
$defs.currentEvaluation.statusenumYesDefines the status value at this contract boundary.enum: live, completed, aborted
$defs.currentEvaluation.strategyenumYesDefines the strategy value at this contract boundary.enum: full-corpus, grep, vector, graph, workspace-intelligence, custom
$defs.currentEvaluation.summaryreferenceYesDefines the summary value at this contract boundary.ref: workspace-intelligence-evaluation.v1.json#/properties/summary
$defs.currentEvaluation.taskIdstringYesDefines the taskid value at this contract boundary.minLength: 1
$defs.scenario.estimatedReductionPercentnumberYesDefines the estimatedreductionpercent value at this contract boundary.minimum: 0 · maximum: 100
$defs.scenario.estimatedTokensAvoidedintegerYesDefines the estimatedtokensavoided value at this contract boundary.minimum: 0
$defs.scenario.idstringYesDefines the id value at this contract boundary.minLength: 1
$defs.scenario.matchCountintegerYesDefines the matchcount value at this contract boundary.minimum: 0 · maximum: 100
$defs.scenario.querystringYesDefines the query value at this contract boundary.minLength: 1
$defs.scenario.queryOriginstringYesDefines the queryorigin value at this contract boundary.const: "graph-derived"
$defs.scenario.resultenumYesDefines the result value at this contract boundary.enum: matched, empty
$defs.scenario.retrievalCharacterCountintegerYesDefines the retrievalcharactercount value at this contract boundary.minimum: 0
$defs.scenario.retrievalEstimatedTokensintegerYesDefines the retrievalestimatedtokens value at this contract boundary.minimum: 0
$defs.scenario.targetEntityIdstringYesDefines the targetentityid value at this contract boundary.minLength: 1
$defs.scenario.targetKindstringYesDefines the targetkind value at this contract boundary.minLength: 1
$defs.scenario.targetRetrievedbooleanYesDefines the targetretrieved value at this contract boundary.
$defs.scenario.titlestringYesDefines the title value at this contract boundary.minLength: 1
$defs.scenario.truncatedbooleanYesDefines the truncated value at this contract boundary.
corpusreferenceYesDefines the corpus value at this contract boundary.ref: #/$defs/corpus
evaluationobjectYesDefines the evaluation value at this contract boundary.additionalProperties: false
evaluation.availabilityenumYesDefines the availability value at this contract boundary.enum: available, unavailable
evaluation.claimBoundarystringYesDefines the claimboundary value at this contract boundary.minLength: 1
evaluation.comparisonreferenceNoDefines the comparison value at this contract boundary.ref: workspace-intelligence-evaluation-comparison.v1.json
evaluation.currentreferenceNoDefines the current value at this contract boundary.ref: #/$defs/currentEvaluation
evaluation.provenanceenumYesDefines the provenance value at this contract boundary.enum: measured, mixed, estimated, unavailable
evaluation.trustedMeasuredReductionPercentnumber | nullYesDefines the trustedmeasuredreductionpercent value at this contract boundary.
generatedAtstringYesDefines the generatedat value at this contract boundary.format: date-time
graphobjectYesDefines the graph value at this contract boundary.additionalProperties: false
graph.entityCountintegerYesDefines the entitycount value at this contract boundary.minimum: 0
graph.proofCountintegerYesDefines the proofcount value at this contract boundary.minimum: 0
graph.relationCountintegerYesDefines the relationcount value at this contract boundary.minimum: 0
graph.schemaVersionstringYesDefines the schemaversion value at this contract boundary.const: "workspace-knowledge-graph.v1"
graph.sourceArtifactstringYesDefines the sourceartifact value at this contract boundary.minLength: 1
graph.sourceHashstringYesDefines the sourcehash value at this contract boundary.pattern: ^[a-f0-9]{64}$
methodologyobjectYesDefines the methodology value at this contract boundary.additionalProperties: false
methodology.charsPerEstimatedTokennumberYesDefines the charsperestimatedtoken value at this contract boundary.const: 4
methodology.claimBoundarystringYesDefines the claimboundary value at this contract boundary.minLength: 1
methodology.deterministicbooleanYesDefines the deterministic value at this contract boundary.const: true
methodology.idstringYesDefines the id value at this contract boundary.const: "multi-scenario-bounded-retrieval.v1"
methodology.networkRequiredbooleanYesDefines the networkrequired value at this contract boundary.const: false
methodology.scenarioTargetPolicystringYesDefines the scenariotargetpolicy value at this contract boundary.const: "evidence-backed-representative.v1"
retrievalSummaryobjectYesDefines the retrievalsummary value at this contract boundary.additionalProperties: false
retrievalSummary.matchedScenarioCountintegerYesDefines the matchedscenariocount value at this contract boundary.minimum: 0
retrievalSummary.medianEstimatedReductionPercentnumberYesDefines the medianestimatedreductionpercent value at this contract boundary.minimum: 0 · maximum: 100
retrievalSummary.medianRetrievalEstimatedTokensintegerYesDefines the medianretrievalestimatedtokens value at this contract boundary.minimum: 0
retrievalSummary.p95RetrievalEstimatedTokensintegerYesDefines the p95retrievalestimatedtokens value at this contract boundary.minimum: 0
retrievalSummary.provenancestringYesDefines the provenance value at this contract boundary.const: "estimated"
retrievalSummary.scenarioCountintegerYesDefines the scenariocount value at this contract boundary.minimum: 1
retrievalSummary.statusenumYesDefines the status value at this contract boundary.enum: passed, partial, unavailable
scenariosarrayYesDefines the scenarios value at this contract boundary.minItems: 1
schemaVersionstringYesDefines the schemaversion value at this contract boundary.const: "workspace-intelligence-benchmark.v1"
suiteobjectYesDefines the suite value at this contract boundary.additionalProperties: false
suite.idstringYesDefines the id value at this contract boundary.const: "agent-core.v1"
suite.titlestringYesDefines the title value at this contract boundary.minLength: 1
suite.versionnumberYesDefines the version value at this contract boundary.const: 1
workspaceobjectYesDefines the workspace value at this contract boundary.additionalProperties: false
workspace.namestringYesDefines the name value at this contract boundary.minLength: 1
workspace.pathstringYesDefines the path 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/workspace-intelligence-benchmark.v1.json",
  "title": "Workspai Workspace Intelligence Benchmark",
  "description": "A deterministic multi-scenario retrieval benchmark with an optional, separately classified evaluation measurement. Estimated retrieval reduction is never represented as measured model savings.",
  "type": "object",
  "required": [
    "schemaVersion",
    "generatedAt",
    "workspace",
    "suite",
    "graph",
    "methodology",
    "corpus",
    "scenarios",
    "retrievalSummary",
    "evaluation"
  ],
  "properties": {
    "schemaVersion": {
      "const": "workspace-intelligence-benchmark.v1"
    },
    "generatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "workspace": {
      "type": "object",
      "required": [
        "name",
        "path"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "path": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "suite": {
      "type": "object",
      "required": [
        "id",
        "version",
        "title"
      ],
      "properties": {
        "id": {
          "const": "agent-core.v1"
        },
        "version": {
          "const": 1
        },
        "title": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "graph": {
      "type": "object",
      "required": [
        "schemaVersion",
        "sourceArtifact",
        "sourceHash",
        "entityCount",
        "relationCount",
        "proofCount"
      ],
      "properties": {
        "schemaVersion": {
          "const": "workspace-knowledge-graph.v1"
        },
        "sourceArtifact": {
          "type": "string",
          "minLength": 1
        },
        "sourceHash": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "entityCount": {
          "type": "integer",
          "minimum": 0
        },
        "relationCount": {
          "type": "integer",
          "minimum": 0
        },
        "proofCount": {
          "type": "integer",
          "minimum": 0
        }
      },
      "additionalProperties": false
    },
    "methodology": {
      "type": "object",
      "required": [
        "id",
        "charsPerEstimatedToken",
        "deterministic",
        "networkRequired",
        "scenarioTargetPolicy",
        "claimBoundary"
      ],
      "properties": {
        "id": {
          "const": "multi-scenario-bounded-retrieval.v1"
        },
        "charsPerEstimatedToken": {
          "const": 4
        },
        "deterministic": {
          "const": true
        },
        "networkRequired": {
          "const": false
        },
        "scenarioTargetPolicy": {
          "const": "evidence-backed-representative.v1"
        },
        "claimBoundary": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "corpus": {
      "$ref": "#/$defs/corpus"
    },
    "scenarios": {
      "type": "array",
      "minItems": 1,
      "items": {
        "$ref": "#/$defs/scenario"
      }
    },
    "retrievalSummary": {
      "type": "object",
      "required": [
        "provenance",
        "scenarioCount",
        "matchedScenarioCount",
        "medianRetrievalEstimatedTokens",
        "p95RetrievalEstimatedTokens",
        "medianEstimatedReductionPercent",
        "status"
      ],
      "properties": {
        "provenance": {
          "const": "estimated"
        },
        "scenarioCount": {
          "type": "integer",
          "minimum": 1
        },
        "matchedScenarioCount": {
          "type": "integer",
          "minimum": 0
        },
        "medianRetrievalEstimatedTokens": {
          "type": "integer",
          "minimum": 0
        },
        "p95RetrievalEstimatedTokens": {
          "type": "integer",
          "minimum": 0
        },
        "medianEstimatedReductionPercent": {
          "type": "number",
          "minimum": 0,
          "maximum": 100
        },
        "status": {
          "enum": [
            "passed",
            "partial",
            "unavailable"
          ]
        }
      },
      "additionalProperties": false
    },
    "evaluation": {
      "type": "object",
      "required": [
        "availability",
        "provenance",
        "trustedMeasuredReductionPercent",
        "claimBoundary"
      ],
      "properties": {
        "availability": {
          "enum": [
            "available",
            "unavailable"
          ]
        },
        "provenance": {
          "enum": [
            "measured",
            "mixed",
            "estimated",
            "unavailable"
          ]
        },
        "current": {
          "$ref": "#/$defs/currentEvaluation"
        },
        "comparison": {
          "$ref": "workspace-intelligence-evaluation-comparison.v1.json"
        },
        "trustedMeasuredReductionPercent": {
          "type": [
            "number",
            "null"
          ]
        },
        "claimBoundary": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false,
  "$defs": {
    "corpus": {
      "type": "object",
      "required": [
        "artifactCount",
        "characterCount",
        "estimatedTokens",
        "unreadableArtifacts"
      ],
      "properties": {
        "artifactCount": {
          "type": "integer",
          "minimum": 0
        },
        "characterCount": {
          "type": "integer",
          "minimum": 0
        },
        "estimatedTokens": {
          "type": "integer",
          "minimum": 0
        },
        "unreadableArtifacts": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "uniqueItems": true
        }
      },
      "additionalProperties": false
    },
    "scenario": {
      "type": "object",
      "required": [
        "id",
        "title",
        "query",
        "queryOrigin",
        "targetEntityId",
        "targetKind",
        "targetRetrieved",
        "result",
        "matchCount",
        "truncated",
        "retrievalCharacterCount",
        "retrievalEstimatedTokens",
        "estimatedTokensAvoided",
        "estimatedReductionPercent"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "title": {
          "type": "string",
          "minLength": 1
        },
        "query": {
          "type": "string",
          "minLength": 1
        },
        "queryOrigin": {
          "const": "graph-derived"
        },
        "targetEntityId": {
          "type": "string",
          "minLength": 1
        },
        "targetKind": {
          "type": "string",
          "minLength": 1
        },
        "targetRetrieved": {
          "type": "boolean"
        },
        "result": {
          "enum": [
            "matched",
            "empty"
          ]
        },
        "matchCount": {
          "type": "integer",
          "minimum": 0,
          "maximum": 100
        },
        "truncated": {
          "type": "boolean"
        },
        "retrievalCharacterCount": {
          "type": "integer",
          "minimum": 0
        },
        "retrievalEstimatedTokens": {
          "type": "integer",
          "minimum": 0
        },
        "estimatedTokensAvoided": {
          "type": "integer",
          "minimum": 0
        },
        "estimatedReductionPercent": {
          "type": "number",
          "minimum": 0,
          "maximum": 100
        }
      },
      "additionalProperties": false
    },
    "currentEvaluation": {
      "type": "object",
      "required": [
        "runId",
        "taskId",
        "strategy",
        "status",
        "summary"
      ],
      "properties": {
        "runId": {
          "type": "string",
          "minLength": 1
        },
        "taskId": {
          "type": "string",
          "minLength": 1
        },
        "strategy": {
          "enum": [
            "full-corpus",
            "grep",
            "vector",
            "graph",
            "workspace-intelligence",
            "custom"
          ]
        },
        "status": {
          "enum": [
            "live",
            "completed",
            "aborted"
          ]
        },
        "summary": {
          "$ref": "workspace-intelligence-evaluation.v1.json#/properties/summary"
        }
      },
      "additionalProperties": false
    }
  }
}