Workspace Intelligence / JSON Schema
Workspai Graph Retrieval Token-Efficiency Report
A reproducible character-based estimate comparing readable proof-source text with one bounded graph retrieval payload. It is not an answer-quality or billing claim.
- Schema version
workspace-graph-token-efficiency.v1- Contract path
contracts/workspace-intelligence/workspace-graph-token-efficiency.v1.json- Publication
- json-schema
- Defined fields
- 31
- 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 path | Type | Required | Meaning | Constraints |
|---|---|---|---|---|
| corpus | object | Yes | Defines the corpus value at this contract boundary. | additionalProperties: false |
| corpus.artifactCount | integer | Yes | Defines the artifactcount value at this contract boundary. | minimum: 0 |
| corpus.characterCount | integer | Yes | Defines the charactercount value at this contract boundary. | minimum: 0 |
| corpus.estimatedTokens | integer | Yes | Defines the estimatedtokens value at this contract boundary. | minimum: 0 |
| corpus.unreadableArtifacts | array | Yes | Defines the unreadableartifacts value at this contract boundary. | — |
| generatedAt | string | Yes | Defines the generatedat value at this contract boundary. | format: date-time |
| graph | object | Yes | Defines the graph value at this contract boundary. | additionalProperties: false |
| graph.entityCount | integer | Yes | Defines the entitycount value at this contract boundary. | minimum: 0 |
| graph.proofCount | integer | Yes | Defines the proofcount value at this contract boundary. | minimum: 0 |
| graph.relationCount | integer | Yes | Defines the relationcount value at this contract boundary. | minimum: 0 |
| graph.schemaVersion | string | Yes | Defines the schemaversion value at this contract boundary. | const: "workspace-knowledge-graph.v1" |
| graph.sourceArtifact | string | Yes | Defines the sourceartifact value at this contract boundary. | minLength: 1 |
| graph.sourceHash | string | Yes | Defines the sourcehash value at this contract boundary. | pattern: ^[a-f0-9]{64}$ |
| methodology | object | Yes | Defines the methodology value at this contract boundary. | additionalProperties: false |
| methodology.charsPerToken | number | Yes | Defines the charspertoken value at this contract boundary. | const: 4 |
| methodology.claimBoundary | string | Yes | Defines the claimboundary value at this contract boundary. | minLength: 1 |
| methodology.estimated | boolean | Yes | Defines the estimated value at this contract boundary. | const: true |
| methodology.id | string | Yes | Defines the id value at this contract boundary. | const: "indexed-corpus-vs-bounded-retrieval.v1" |
| query | string | Yes | Defines the query value at this contract boundary. | minLength: 1 |
| retrieval | object | Yes | Defines the retrieval value at this contract boundary. | additionalProperties: false |
| retrieval.characterCount | integer | Yes | Defines the charactercount value at this contract boundary. | minimum: 0 |
| retrieval.estimatedTokens | integer | Yes | Defines the estimatedtokens value at this contract boundary. | minimum: 0 |
| retrieval.matchCount | integer | Yes | Defines the matchcount value at this contract boundary. | minimum: 0 · maximum: 100 |
| retrieval.payload | reference | Yes | Defines the payload value at this contract boundary. | ref: workspace-knowledge-search.v1.json |
| retrieval.truncated | boolean | Yes | Defines the truncated value at this contract boundary. | — |
| savings | object | Yes | Defines the savings value at this contract boundary. | additionalProperties: false |
| savings.estimatedTokensAvoided | integer | Yes | Defines the estimatedtokensavoided value at this contract boundary. | minimum: 0 |
| savings.reductionPercent | number | Yes | Defines the reductionpercent value at this contract boundary. | minimum: 0 · maximum: 100 |
| savings.reductionRatio | number | Yes | Defines the reductionratio value at this contract boundary. | minimum: 0 |
| schemaVersion | string | Yes | Defines the schemaversion value at this contract boundary. | const: "workspace-graph-token-efficiency.v1" |
| workspacePath | string | Yes | Defines the workspacepath 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://getrapidkit.com/schemas/workspace-graph-token-efficiency.v1.json",
"title": "Workspai Graph Retrieval Token-Efficiency Report",
"description": "A reproducible character-based estimate comparing readable proof-source text with one bounded graph retrieval payload. It is not an answer-quality or billing claim.",
"type": "object",
"required": [
"schemaVersion",
"generatedAt",
"workspacePath",
"query",
"graph",
"methodology",
"corpus",
"retrieval",
"savings"
],
"properties": {
"schemaVersion": {
"const": "workspace-graph-token-efficiency.v1"
},
"generatedAt": {
"type": "string",
"format": "date-time"
},
"workspacePath": {
"type": "string",
"minLength": 1
},
"query": {
"type": "string",
"minLength": 1
},
"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",
"estimated",
"charsPerToken",
"claimBoundary"
],
"properties": {
"id": {
"const": "indexed-corpus-vs-bounded-retrieval.v1"
},
"estimated": {
"const": true
},
"charsPerToken": {
"const": 4
},
"claimBoundary": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false
},
"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
},
"retrieval": {
"type": "object",
"required": [
"matchCount",
"characterCount",
"estimatedTokens",
"truncated",
"payload"
],
"properties": {
"matchCount": {
"type": "integer",
"minimum": 0,
"maximum": 100
},
"characterCount": {
"type": "integer",
"minimum": 0
},
"estimatedTokens": {
"type": "integer",
"minimum": 0
},
"truncated": {
"type": "boolean"
},
"payload": {
"$ref": "workspace-knowledge-search.v1.json"
}
},
"additionalProperties": false
},
"savings": {
"type": "object",
"required": [
"estimatedTokensAvoided",
"reductionRatio",
"reductionPercent"
],
"properties": {
"estimatedTokensAvoided": {
"type": "integer",
"minimum": 0
},
"reductionRatio": {
"type": "number",
"minimum": 0
},
"reductionPercent": {
"type": "number",
"minimum": 0,
"maximum": 100
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}