All contracts

Workspace Intelligence / JSON Schema

Workspai Project Agent Entry

Portable host-discovery and canonical-first entry contract for an adopted or managed project.

Schema version
workspai.agent-entry.v1
Contract path
contracts/workspace-intelligence/project-agent-entry.v1.json
Publication
json-schema
Defined fields
53
Artifact bindings
1

Why this contract exists

Architecture role

Projects workspace intelligence into stable grounding surfaces for agents and integrations.

Consumption boundary

  • Workspai CLI
  • AI agents
  • IDEs and MCP clients

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/agent-entry.v1.jsonworkspai.agent-entry.v1
workspai adopt
workspai import
workspai workspace sync
workspai workspace agent-sync --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.host.discoveryenumYesDefines the discovery value at this contract boundary.enum: native, adapter, portable-fallback
$defs.host.entryFilesarrayYesDefines the entryfiles value at this contract boundary.minItems: 1 · maxItems: 3
$defs.host.idenumYesDefines the id value at this contract boundary.enum: generic, codex, claude, gemini, qwen, kimi, grok, copilot, cursor, windsurf, amazon-q
$defs.host.managedbooleanYesDefines the managed value at this contract boundary.
$defs.host.reasonstringNoDefines the reason value at this contract boundary.minLength: 1
$defs.host.statusenumYesDefines the status value at this contract boundary.enum: ready, degraded, blocked
canonicalobjectYesDefines the canonical value at this contract boundary.additionalProperties: false
canonical.boundedGraphSearchstringNoDefines the boundedgraphsearch value at this contract boundary.const: "command:workspai workspace graph search <task-query> --scope project:<project> --limit 12 --json"
canonical.goalIndexstringYesDefines the goalindex value at this contract boundary.const: "workspace:.workspai/goals/index.json"
canonical.knowledgeGraphstringNoDefines the knowledgegraph value at this contract boundary.const: "workspace:.workspai/reports/workspace-knowledge-graph.json"
canonical.projectContextstringYesDefines the projectcontext value at this contract boundary.const: ".workspai/reports/project-context-agent.json"
canonical.projectGroundingstringYesDefines the projectgrounding value at this contract boundary.const: ".workspai/PROJECT-GROUNDING.md"
canonical.workspaceContextstringYesDefines the workspacecontext value at this contract boundary.const: "workspace:.workspai/reports/workspace-context-agent.json"
canonical.workspaceIndexstringYesDefines the workspaceindex value at this contract boundary.const: "workspace:.workspai/reports/INDEX.json"
canonical.workspaceModelstringNoDefines the workspacemodel value at this contract boundary.const: "workspace:.workspai/reports/workspace-model.json"
canonical.workspaceSkillsIndexstringNoDefines the workspaceskillsindex value at this contract boundary.const: "workspace:.workspai/reports/workspace-skills-index.json"
generatedAtstringYesDefines the generatedat value at this contract boundary.format: date-time
hostsarrayYesDefines the hosts value at this contract boundary.minItems: 11 · maxItems: 11
integrityobjectYesDefines the integrity value at this contract boundary.additionalProperties: false
integrity.absolutePathsEmittedbooleanYesDefines the absolutepathsemitted value at this contract boundary.const: false
integrity.algorithmstringYesDefines the algorithm value at this contract boundary.const: "sha256"
integrity.payloadHashreferenceYesDefines the payloadhash value at this contract boundary.ref: #/$defs/hash
integrity.portablebooleanYesDefines the portable value at this contract boundary.const: true
integrity.projectContextHashreferenceYesDefines the projectcontexthash value at this contract boundary.ref: #/$defs/hash
projectobjectYesDefines the project value at this contract boundary.additionalProperties: false
project.frameworkstringNoDefines the framework value at this contract boundary.minLength: 1
project.namestringYesDefines the name value at this contract boundary.minLength: 1
project.relativePathreferenceYesDefines the relativepath value at this contract boundary.ref: #/$defs/portablePath
project.runtimestringNoDefines the runtime value at this contract boundary.minLength: 1
protocolobjectYesDefines the protocol value at this contract boundary.additionalProperties: false
protocol.bootstrapCommandstringYesDefines the bootstrapcommand value at this contract boundary.minLength: 1
protocol.degradedModeobjectYesDefines the degradedmode value at this contract boundary.additionalProperties: false
protocol.degradedMode.allowCompleteArchitectureClaimsbooleanYesDefines the allowcompletearchitectureclaims value at this contract boundary.const: false
protocol.degradedMode.allowReadOnlySourceInspectionbooleanYesDefines the allowreadonlysourceinspection value at this contract boundary.const: true
protocol.degradedMode.discloseMissingEvidencebooleanYesDefines the disclosemissingevidence value at this contract boundary.const: true
protocol.modestringYesDefines the mode value at this contract boundary.const: "canonical-first"
protocol.requiredReadOrderarrayYesDefines the requiredreadorder value at this contract boundary.minItems: 6 · maxItems: 16
protocol.sourcePolicyobjectYesDefines the sourcepolicy value at this contract boundary.additionalProperties: false
protocol.sourcePolicy.broadScanBeforeBootstrapbooleanYesDefines the broadscanbeforebootstrap value at this contract boundary.const: false
protocol.sourcePolicy.liveSourceAuthoritystringYesDefines the livesourceauthority value at this contract boundary.const: "exact-implementation"
protocol.sourcePolicy.sourceMutationstringYesDefines the sourcemutation value at this contract boundary.const: "governed-only"
protocol.sourcePolicy.verificationClaimsstringYesDefines the verificationclaims value at this contract boundary.const: "cli-evidence-only"
protocol.sourcePolicy.workspaceEvidenceAuthoritystringYesDefines the workspaceevidenceauthority value at this contract boundary.const: "identity-topology-readiness-goals"
protocol.verifyCommandstringYesDefines the verifycommand value at this contract boundary.minLength: 1
schemaVersionstringYesDefines the schemaversion value at this contract boundary.const: "workspai.agent-entry.v1"
workspaceobjectYesDefines the workspace value at this contract boundary.additionalProperties: false
workspace.identityIsFilesystemPathbooleanYesDefines the identityisfilesystempath value at this contract boundary.const: false
workspace.localBindingstringYesDefines the localbinding value at this contract boundary.const: ".workspai/workspace-link.local.json"
workspace.namestringYesDefines the name value at this contract boundary.minLength: 1
workspace.portableUriSchemestringYesDefines the portableurischeme value at this contract boundary.const: "workspace:"
workspace.relationshipenumYesDefines the relationship value at this contract boundary.enum: managed, adopted, imported, linked, restored
workspace.resolvedPathPolicystringYesDefines the resolvedpathpolicy value at this contract boundary.const: "runtime-private-never-persist"
workspace.resolverCommandstringYesDefines the resolvercommand value at this contract boundary.const: "workspai project workspace status --json"

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/project-agent-entry.v1.json",
  "title": "Workspai Project Agent Entry",
  "description": "Portable host-discovery and canonical-first entry contract for an adopted or managed project.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schemaVersion",
    "generatedAt",
    "project",
    "workspace",
    "canonical",
    "protocol",
    "hosts",
    "integrity"
  ],
  "properties": {
    "schemaVersion": {
      "const": "workspai.agent-entry.v1"
    },
    "generatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "project": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "relativePath"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "relativePath": {
          "$ref": "#/$defs/portablePath"
        },
        "runtime": {
          "type": "string",
          "minLength": 1
        },
        "framework": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "workspace": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "relationship",
        "localBinding",
        "identityIsFilesystemPath",
        "resolverCommand",
        "portableUriScheme",
        "resolvedPathPolicy"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "relationship": {
          "enum": [
            "managed",
            "adopted",
            "imported",
            "linked",
            "restored"
          ]
        },
        "localBinding": {
          "const": ".workspai/workspace-link.local.json"
        },
        "identityIsFilesystemPath": {
          "const": false
        },
        "resolverCommand": {
          "const": "workspai project workspace status --json"
        },
        "portableUriScheme": {
          "const": "workspace:"
        },
        "resolvedPathPolicy": {
          "const": "runtime-private-never-persist"
        }
      }
    },
    "canonical": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "projectContext",
        "projectGrounding",
        "goalIndex",
        "workspaceIndex",
        "workspaceContext"
      ],
      "properties": {
        "projectContext": {
          "const": ".workspai/reports/project-context-agent.json"
        },
        "projectGrounding": {
          "const": ".workspai/PROJECT-GROUNDING.md"
        },
        "goalIndex": {
          "const": "workspace:.workspai/goals/index.json"
        },
        "workspaceIndex": {
          "const": "workspace:.workspai/reports/INDEX.json"
        },
        "workspaceContext": {
          "const": "workspace:.workspai/reports/workspace-context-agent.json"
        },
        "workspaceModel": {
          "const": "workspace:.workspai/reports/workspace-model.json"
        },
        "knowledgeGraph": {
          "const": "workspace:.workspai/reports/workspace-knowledge-graph.json"
        },
        "workspaceSkillsIndex": {
          "const": "workspace:.workspai/reports/workspace-skills-index.json"
        },
        "boundedGraphSearch": {
          "const": "command:workspai workspace graph search <task-query> --scope project:<project> --limit 12 --json"
        }
      },
      "anyOf": [
        {
          "properties": {
            "workspaceModel": {
              "const": "workspace:.workspai/reports/workspace-model.json"
            },
            "knowledgeGraph": {
              "const": "workspace:.workspai/reports/workspace-knowledge-graph.json"
            }
          },
          "required": [
            "workspaceModel",
            "knowledgeGraph"
          ]
        },
        {
          "properties": {
            "workspaceSkillsIndex": {
              "const": "workspace:.workspai/reports/workspace-skills-index.json"
            },
            "boundedGraphSearch": {
              "const": "command:workspai workspace graph search <task-query> --scope project:<project> --limit 12 --json"
            }
          },
          "required": [
            "workspaceSkillsIndex",
            "boundedGraphSearch"
          ]
        }
      ]
    },
    "protocol": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "mode",
        "bootstrapCommand",
        "verifyCommand",
        "requiredReadOrder",
        "sourcePolicy",
        "degradedMode"
      ],
      "properties": {
        "mode": {
          "const": "canonical-first"
        },
        "bootstrapCommand": {
          "type": "string",
          "minLength": 1
        },
        "verifyCommand": {
          "type": "string",
          "minLength": 1
        },
        "requiredReadOrder": {
          "type": "array",
          "minItems": 6,
          "maxItems": 16,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "sourcePolicy": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "liveSourceAuthority",
            "workspaceEvidenceAuthority",
            "broadScanBeforeBootstrap",
            "sourceMutation",
            "verificationClaims"
          ],
          "properties": {
            "liveSourceAuthority": {
              "const": "exact-implementation"
            },
            "workspaceEvidenceAuthority": {
              "const": "identity-topology-readiness-goals"
            },
            "broadScanBeforeBootstrap": {
              "const": false
            },
            "sourceMutation": {
              "const": "governed-only"
            },
            "verificationClaims": {
              "const": "cli-evidence-only"
            }
          }
        },
        "degradedMode": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "discloseMissingEvidence",
            "allowCompleteArchitectureClaims",
            "allowReadOnlySourceInspection"
          ],
          "properties": {
            "discloseMissingEvidence": {
              "const": true
            },
            "allowCompleteArchitectureClaims": {
              "const": false
            },
            "allowReadOnlySourceInspection": {
              "const": true
            }
          }
        }
      }
    },
    "hosts": {
      "type": "array",
      "minItems": 11,
      "maxItems": 11,
      "items": {
        "$ref": "#/$defs/host"
      }
    },
    "integrity": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "algorithm",
        "projectContextHash",
        "payloadHash",
        "portable",
        "absolutePathsEmitted"
      ],
      "properties": {
        "algorithm": {
          "const": "sha256"
        },
        "projectContextHash": {
          "$ref": "#/$defs/hash"
        },
        "payloadHash": {
          "$ref": "#/$defs/hash"
        },
        "portable": {
          "const": true
        },
        "absolutePathsEmitted": {
          "const": false
        }
      }
    }
  },
  "$defs": {
    "hash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "portablePath": {
      "type": "string",
      "minLength": 1,
      "not": {
        "pattern": "^(?:/|[A-Za-z]:[\\\\/])"
      }
    },
    "host": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "discovery",
        "entryFiles",
        "status",
        "managed"
      ],
      "properties": {
        "id": {
          "enum": [
            "generic",
            "codex",
            "claude",
            "gemini",
            "qwen",
            "kimi",
            "grok",
            "copilot",
            "cursor",
            "windsurf",
            "amazon-q"
          ]
        },
        "discovery": {
          "enum": [
            "native",
            "adapter",
            "portable-fallback"
          ]
        },
        "entryFiles": {
          "type": "array",
          "minItems": 1,
          "maxItems": 3,
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/portablePath"
          }
        },
        "status": {
          "enum": [
            "ready",
            "degraded",
            "blocked"
          ]
        },
        "managed": {
          "type": "boolean"
        },
        "reason": {
          "type": "string",
          "minLength": 1
        }
      }
    }
  }
}