All contracts

Workspace Intelligence / JSON Schema

Workspai Bounded Knowledge Graph Search

A deterministic, bounded, proof-carrying retrieval projection intended for agents, MCP clients, IDEs, and CI consumers.

Schema version
workspace-knowledge-search.v1
Contract path
contracts/workspace-intelligence/workspace-knowledge-search.v1.json
Publication
json-schema
Defined fields
14
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
entitiesarrayYesDefines the entities value at this contract boundary.maxItems: 100
kindanyYesDefines the kind value at this contract boundary.
limitintegerYesDefines the limit value at this contract boundary.minimum: 1 · maximum: 100
proofsarrayYesDefines the proofs value at this contract boundary.
querystringYesDefines the query value at this contract boundary.minLength: 1
relatedEntitiesarrayYesDefines the relatedentities value at this contract boundary.
relatedEntities[].idstringYesDefines the id value at this contract boundary.minLength: 1
relatedEntities[].kindreferenceYesDefines the kind value at this contract boundary.ref: workspace-knowledge-graph.v1.json#/properties/entities/items/properties/kind
relatedEntities[].labelstringYesDefines the label value at this contract boundary.minLength: 1
relatedEntities[].projectIdstringNoDefines the projectid value at this contract boundary.minLength: 1
relationsarrayYesDefines the relations value at this contract boundary.
schemaVersionstringYesDefines the schemaversion value at this contract boundary.const: "workspace-knowledge-search.v1"
totalMatchesintegerYesDefines the totalmatches value at this contract boundary.minimum: 0
truncatedbooleanYesDefines the truncated 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-search.v1.json",
  "title": "Workspai Bounded Knowledge Graph Search",
  "description": "A deterministic, bounded, proof-carrying retrieval projection intended for agents, MCP clients, IDEs, and CI consumers.",
  "type": "object",
  "required": [
    "schemaVersion",
    "query",
    "kind",
    "limit",
    "totalMatches",
    "truncated",
    "entities",
    "relatedEntities",
    "relations",
    "proofs"
  ],
  "properties": {
    "schemaVersion": {
      "const": "workspace-knowledge-search.v1"
    },
    "query": {
      "type": "string",
      "minLength": 1
    },
    "kind": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "$ref": "workspace-knowledge-graph.v1.json#/properties/entities/items/properties/kind"
        }
      ]
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "totalMatches": {
      "type": "integer",
      "minimum": 0
    },
    "truncated": {
      "type": "boolean"
    },
    "entities": {
      "type": "array",
      "maxItems": 100,
      "items": {
        "$ref": "workspace-knowledge-graph.v1.json#/properties/entities/items"
      }
    },
    "relatedEntities": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "kind",
          "label"
        ],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "kind": {
            "$ref": "workspace-knowledge-graph.v1.json#/properties/entities/items/properties/kind"
          },
          "label": {
            "type": "string",
            "minLength": 1
          },
          "projectId": {
            "type": "string",
            "minLength": 1
          }
        },
        "additionalProperties": false
      }
    },
    "relations": {
      "type": "array",
      "items": {
        "$ref": "workspace-knowledge-graph.v1.json#/properties/relations/items"
      }
    },
    "proofs": {
      "type": "array",
      "items": {
        "$ref": "workspace-knowledge-graph.v1.json#/properties/proofs/items"
      }
    }
  },
  "additionalProperties": false
}