Workspace Intelligence / JSON Schema
Workspai Project Context for Agents
Portable, bounded project lens derived from the canonical Workspace Model and evidence-backed Knowledge Graph.
- Schema version
project-context-agent.v1- Contract path
contracts/workspace-intelligence/project-context-agent.v1.json- Publication
- json-schema
- Defined fields
- 171
- 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 path | Schema | Producer |
|---|---|---|
| .workspai/reports/project-context-agent.json | project-context-agent.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 path | Type | Required | Meaning | Constraints |
|---|---|---|---|---|
| $defs.blocker.code | string | No | Defines the code value at this contract boundary. | — |
| $defs.blocker.message | string | Yes | Defines the message value at this contract boundary. | — |
| $defs.blocker.severity | enum | Yes | Defines the severity value at this contract boundary. | enum: warning, error |
| $defs.blocker.source | string | Yes | Defines the source value at this contract boundary. | — |
| $defs.entity.attributes | object | Yes | Defines the attributes value at this contract boundary. | additionalProperties: true |
| $defs.entity.id | string | Yes | Defines the id value at this contract boundary. | — |
| $defs.entity.kind | string | Yes | Defines the kind value at this contract boundary. | — |
| $defs.entity.label | string | Yes | Defines the label value at this contract boundary. | — |
| $defs.entity.proofIds | array | Yes | Defines the proofids value at this contract boundary. | — |
| $defs.governanceControl.evidence | array | Yes | Defines the evidence value at this contract boundary. | — |
| $defs.governanceControl.provider | string | null | Yes | Defines the provider value at this contract boundary. | — |
| $defs.governanceControl.reference | string | null | Yes | Defines the reference value at this contract boundary. | — |
| $defs.governanceControl.status | enum | Yes | Defines the status value at this contract boundary. | enum: repository, external-declared, external-observed, unknown |
| $defs.port.attribute | string | Yes | Defines the attribute value at this contract boundary. | — |
| $defs.port.entityId | string | Yes | Defines the entityid value at this contract boundary. | — |
| $defs.port.label | string | Yes | Defines the label value at this contract boundary. | — |
| $defs.projectGovernance.ci | reference | Yes | Defines the ci value at this contract boundary. | ref: #/$defs/governanceControl |
| $defs.projectGovernance.ownership | reference | Yes | Defines the ownership value at this contract boundary. | ref: #/$defs/governanceControl |
| $defs.projectGovernance.release | reference | Yes | Defines the release value at this contract boundary. | ref: #/$defs/governanceControl |
| $defs.projectGovernance.schemaVersion | string | Yes | Defines the schemaversion value at this contract boundary. | const: "workspai.project-governance.v1" |
| $defs.proof.artifact | reference | Yes | Defines the artifact value at this contract boundary. | ref: #/$defs/portableString |
| $defs.proof.confidence | string | Yes | Defines the confidence value at this contract boundary. | — |
| $defs.proof.derivation | string | Yes | Defines the derivation value at this contract boundary. | — |
| $defs.proof.freshness | string | Yes | Defines the freshness value at this contract boundary. | — |
| $defs.proof.id | string | Yes | Defines the id value at this contract boundary. | — |
| $defs.proof.line | integer | No | Defines the line value at this contract boundary. | minimum: 1 |
| $defs.proof.pointer | string | No | Defines the pointer value at this contract boundary. | — |
| $defs.proof.provider | string | Yes | Defines the provider value at this contract boundary. | — |
| $defs.proof.trust | string | Yes | Defines the trust value at this contract boundary. | — |
| $defs.relation.confidence | string | Yes | Defines the confidence value at this contract boundary. | — |
| $defs.relation.derivation | string | Yes | Defines the derivation value at this contract boundary. | — |
| $defs.relation.from | string | Yes | Defines the from value at this contract boundary. | — |
| $defs.relation.id | string | Yes | Defines the id value at this contract boundary. | — |
| $defs.relation.kind | string | Yes | Defines the kind value at this contract boundary. | — |
| $defs.relation.proofIds | array | Yes | Defines the proofids value at this contract boundary. | — |
| $defs.relation.to | string | Yes | Defines the to value at this contract boundary. | — |
| $defs.relation.trust | string | Yes | Defines the trust value at this contract boundary. | — |
| $defs.topologyRelation.confidence | string | Yes | Defines the confidence value at this contract boundary. | minLength: 1 |
| $defs.topologyRelation.evidence | array | Yes | Defines the evidence value at this contract boundary. | — |
| $defs.topologyRelation.kind | string | Yes | Defines the kind value at this contract boundary. | minLength: 1 |
| $defs.topologyRelation.project | string | Yes | Defines the project value at this contract boundary. | minLength: 1 |
| $defs.topologyRelation.source | string | Yes | Defines the source value at this contract boundary. | minLength: 1 |
| agentRouting | object | Yes | Machine-readable mandatory routing policy that prevents agents from bypassing canonical workspace evidence. | additionalProperties: false |
| agentRouting.degradedMode | object | Yes | Defines the degradedmode value at this contract boundary. | additionalProperties: false |
| agentRouting.degradedMode.allowCompleteArchitectureClaims | boolean | Yes | Defines the allowcompletearchitectureclaims value at this contract boundary. | const: false |
| agentRouting.degradedMode.requireDisclosure | boolean | Yes | Defines the requiredisclosure value at this contract boundary. | const: true |
| agentRouting.enforcement | string | Yes | Defines the enforcement value at this contract boundary. | const: "required" |
| agentRouting.mandatoryPreflight | object | Yes | Defines the mandatorypreflight value at this contract boundary. | additionalProperties: false |
| agentRouting.mandatoryPreflight.command | string | Yes | Defines the command value at this contract boundary. | const: "workspai agent bootstrap --for-agent generic --strict --json" |
| agentRouting.mandatoryPreflight.successCondition | string | Yes | Defines the successcondition value at this contract boundary. | const: "ready" |
| agentRouting.requiredReadOrder | array | Yes | Defines the requiredreadorder value at this contract boundary. | minItems: 4 · maxItems: 10 |
| agentRouting.workspaceEvidenceRequiredFor | array | Yes | Defines the workspaceevidencerequiredfor value at this contract boundary. | minItems: 1 |
| agentRouting.workspaceLocator | object | Yes | Defines the workspacelocator value at this contract boundary. | additionalProperties: false |
| agentRouting.workspaceLocator.command | string | Yes | Defines the command value at this contract boundary. | const: "workspai project workspace status --json" |
| agentRouting.workspaceLocator.disclosure | string | Yes | Defines the disclosure value at this contract boundary. | const: "forbidden" |
| agentRouting.workspaceLocator.outputClassification | string | Yes | Defines the outputclassification value at this contract boundary. | const: "machine-local" |
| agentRouting.workspaceLocator.persistence | string | Yes | Defines the persistence value at this contract boundary. | const: "forbidden" |
| agentRouting.workspaceLocator.portableUriScheme | string | Yes | Defines the portableurischeme value at this contract boundary. | const: "workspace:" |
| agentRouting.workspaceLocator.successCondition | string | Yes | Defines the successcondition value at this contract boundary. | const: "resolved" |
| blockers | array | Yes | Defines the blockers value at this contract boundary. | maxItems: 32 |
| commands | object | Yes | Defines the commands value at this contract boundary. | additionalProperties: false |
| commands.doctor | string | Yes | Defines the doctor value at this contract boundary. | minLength: 1 |
| commands.graphSearch | string | Yes | Defines the graphsearch value at this contract boundary. | minLength: 1 |
| commands.refresh | string | Yes | Defines the refresh value at this contract boundary. | minLength: 1 |
| commands.verify | string | Yes | Defines the verify value at this contract boundary. | minLength: 1 |
| commands.workspaceStatus | string | Yes | Defines the workspacestatus value at this contract boundary. | minLength: 1 |
| evidence | object | Yes | Defines the evidence value at this contract boundary. | additionalProperties: false |
| evidence.projectProofArtifacts | array | Yes | Defines the projectproofartifacts value at this contract boundary. | maxItems: 24 |
| evidence.proofs | array | Yes | Defines the proofs value at this contract boundary. | maxItems: 16 |
| evidence.readOrder | array | Yes | Defines the readorder value at this contract boundary. | maxItems: 12 |
| evidence.relations | array | Yes | Defines the relations value at this contract boundary. | maxItems: 16 |
| generatedAt | string | Yes | Defines the generatedat value at this contract boundary. | format: date-time |
| integrity | object | Yes | Defines the integrity value at this contract boundary. | additionalProperties: false |
| integrity.absolutePathsEmitted | boolean | Yes | Defines the absolutepathsemitted value at this contract boundary. | const: false |
| integrity.algorithm | string | Yes | Defines the algorithm value at this contract boundary. | const: "sha256" |
| integrity.modelHash | string | No | Defines the modelhash value at this contract boundary. | pattern: ^[a-f0-9]{64}$ |
| integrity.payloadHash | string | Yes | Defines the payloadhash value at this contract boundary. | pattern: ^[a-f0-9]{64}$ |
| integrity.portable | boolean | Yes | Defines the portable value at this contract boundary. | const: true |
| intelligence | object | Yes | Defines the intelligence value at this contract boundary. | additionalProperties: false |
| intelligence.diagnostics | array | Yes | Defines the diagnostics value at this contract boundary. | maxItems: 16 |
| intelligence.diagnostics[].code | string | Yes | Defines the code value at this contract boundary. | — |
| intelligence.diagnostics[].message | string | Yes | Defines the message value at this contract boundary. | — |
| intelligence.diagnostics[].recommendation | string | No | Defines the recommendation value at this contract boundary. | — |
| intelligence.diagnostics[].severity | string | Yes | Defines the severity value at this contract boundary. | — |
| intelligence.entitiesByKind | object | Yes | Defines the entitiesbykind value at this contract boundary. | — |
| intelligence.entityCount | integer | Yes | Defines the entitycount value at this contract boundary. | minimum: 0 |
| intelligence.freshness | object | Yes | Defines the freshness value at this contract boundary. | additionalProperties: false |
| intelligence.freshness.graph | enum | Yes | Defines the graph value at this contract boundary. | enum: fresh, stale, unknown, missing |
| intelligence.freshness.graphMatchesModel | boolean | Yes | Defines the graphmatchesmodel value at this contract boundary. | — |
| intelligence.freshness.model | enum | Yes | Defines the model value at this contract boundary. | enum: fresh, stale, unknown, missing |
| intelligence.graphGeneratedAt | string | No | Defines the graphgeneratedat value at this contract boundary. | format: date-time |
| intelligence.graphModelHash | string | No | Defines the graphmodelhash value at this contract boundary. | pattern: ^[a-f0-9]{64}$ |
| intelligence.languages | object | Yes | Defines the languages value at this contract boundary. | — |
| intelligence.modelGeneratedAt | string | No | Defines the modelgeneratedat value at this contract boundary. | format: date-time |
| intelligence.projection | object | Yes | Observable bounds for the representative entity projection. Counts remain exhaustive; omitted entities are available through bounded graph search. | additionalProperties: false |
| intelligence.projection.byteBudget | integer | Yes | Defines the bytebudget value at this contract boundary. | minimum: 1 |
| intelligence.projection.continuationCommand | string | Yes | Defines the continuationcommand value at this contract boundary. | minLength: 1 |
| intelligence.projection.eligibleCount | integer | Yes | Defines the eligiblecount value at this contract boundary. | minimum: 0 |
| intelligence.projection.maxEntities | integer | Yes | Defines the maxentities value at this contract boundary. | minimum: 1 |
| intelligence.projection.mode | string | Yes | Defines the mode value at this contract boundary. | const: "stratified-byte-bounded" |
| intelligence.projection.omittedByKind | object | Yes | Defines the omittedbykind value at this contract boundary. | — |
| intelligence.projection.omittedCount | integer | Yes | Defines the omittedcount value at this contract boundary. | minimum: 0 |
| intelligence.projection.selectedByKind | object | Yes | Defines the selectedbykind value at this contract boundary. | — |
| intelligence.projection.selectedBytes | integer | Yes | Defines the selectedbytes value at this contract boundary. | minimum: 0 |
| intelligence.projection.selectedCount | integer | Yes | Defines the selectedcount value at this contract boundary. | minimum: 0 |
| intelligence.proofCount | integer | Yes | Defines the proofcount value at this contract boundary. | minimum: 0 |
| intelligence.relatedProjects | array | Yes | Defines the relatedprojects value at this contract boundary. | — |
| intelligence.relationCount | integer | Yes | Defines the relationcount value at this contract boundary. | minimum: 0 |
| intelligence.relationsByKind | object | Yes | Defines the relationsbykind value at this contract boundary. | — |
| intelligence.semantic | object | Yes | Defines the semantic value at this contract boundary. | additionalProperties: false |
| intelligence.semantic.equivalenceBindings | integer | Yes | Defines the equivalencebindings value at this contract boundary. | minimum: 0 |
| intelligence.semantic.generationBindings | integer | Yes | Defines the generationbindings value at this contract boundary. | minimum: 0 |
| intelligence.semantic.lifecycleStageCount | integer | Yes | Defines the lifecyclestagecount value at this contract boundary. | minimum: 0 |
| intelligence.semantic.protocolConceptCount | integer | Yes | Defines the protocolconceptcount value at this contract boundary. | minimum: 0 |
| intelligence.semantic.protocolImplementationBindings | integer | Yes | Defines the protocolimplementationbindings value at this contract boundary. | minimum: 0 |
| intelligence.semantic.runtimeCoverage | array | Yes | Defines the runtimecoverage value at this contract boundary. | — |
| intelligence.semantic.runtimeUnitCount | integer | Yes | Defines the runtimeunitcount value at this contract boundary. | minimum: 0 |
| intelligence.surfaces | object | Yes | Defines the surfaces value at this contract boundary. | additionalProperties: false |
| intelligence.surfaces.apis | reference | Yes | Defines the apis value at this contract boundary. | ref: #/$defs/entityList |
| intelligence.surfaces.dataStores | reference | Yes | Defines the datastores value at this contract boundary. | ref: #/$defs/entityList |
| intelligence.surfaces.decisions | reference | Yes | Defines the decisions value at this contract boundary. | ref: #/$defs/entityList |
| intelligence.surfaces.deployments | reference | Yes | Defines the deployments value at this contract boundary. | ref: #/$defs/entityList |
| intelligence.surfaces.endpoints | reference | Yes | Defines the endpoints value at this contract boundary. | ref: #/$defs/entityList |
| intelligence.surfaces.lifecycleStages | reference | Yes | Defines the lifecyclestages value at this contract boundary. | ref: #/$defs/entityList |
| intelligence.surfaces.owners | reference | Yes | Defines the owners value at this contract boundary. | ref: #/$defs/entityList |
| intelligence.surfaces.packages | reference | Yes | Defines the packages value at this contract boundary. | ref: #/$defs/entityList |
| intelligence.surfaces.pipelines | reference | Yes | Defines the pipelines value at this contract boundary. | ref: #/$defs/entityList |
| intelligence.surfaces.ports | array | Yes | Defines the ports value at this contract boundary. | maxItems: 8 |
| intelligence.surfaces.protocols | reference | Yes | Defines the protocols value at this contract boundary. | ref: #/$defs/entityList |
| intelligence.surfaces.runtimeUnits | reference | Yes | Defines the runtimeunits value at this contract boundary. | ref: #/$defs/entityList |
| intelligence.surfaces.services | reference | Yes | Defines the services value at this contract boundary. | ref: #/$defs/entityList |
| intelligence.surfaces.tests | reference | Yes | Defines the tests value at this contract boundary. | ref: #/$defs/entityList |
| intelligence.topology | object | Yes | Defines the topology value at this contract boundary. | additionalProperties: false |
| intelligence.topology.dependencies | array | Yes | Defines the dependencies value at this contract boundary. | maxItems: 16 |
| intelligence.topology.dependents | array | Yes | Defines the dependents value at this contract boundary. | maxItems: 16 |
| intelligence.topology.status | enum | Yes | Defines the status value at this contract boundary. | enum: proven, unproven, unavailable |
| project | object | Yes | Defines the project value at this contract boundary. | additionalProperties: false |
| project.commands | object | Yes | Defines the commands value at this contract boundary. | additionalProperties: false |
| project.commands.fleetStages | array | Yes | Defines the fleetstages value at this contract boundary. | — |
| project.commands.supported | array | Yes | Defines the supported value at this contract boundary. | — |
| project.commands.unsupported | array | Yes | Defines the unsupported value at this contract boundary. | — |
| project.framework | string | No | Defines the framework value at this contract boundary. | — |
| project.governance | reference | No | Defines the governance value at this contract boundary. | ref: #/$defs/projectGovernance |
| project.importantFiles | array | Yes | Defines the importantfiles value at this contract boundary. | — |
| project.kind | string | No | Defines the kind value at this contract boundary. | — |
| project.kit | string | No | Defines the kit value at this contract boundary. | — |
| project.name | string | Yes | Defines the name value at this contract boundary. | minLength: 1 |
| project.relativePath | string | Yes | Defines the relativepath value at this contract boundary. | minLength: 1 |
| project.runtime | string | No | Defines the runtime value at this contract boundary. | — |
| project.runtimeCandidates | array | No | Defines the runtimecandidates value at this contract boundary. | — |
| project.supportTier | string | No | Defines the supporttier value at this contract boundary. | — |
| schemaVersion | string | Yes | Defines the schemaversion value at this contract boundary. | const: "project-context-agent.v1" |
| workspace | object | Yes | Defines the workspace value at this contract boundary. | additionalProperties: false |
| workspace.access | object | Yes | Defines the access value at this contract boundary. | additionalProperties: false |
| workspace.access.canonicalEvidenceAvailableAtGeneration | boolean | Yes | Defines the canonicalevidenceavailableatgeneration value at this contract boundary. | — |
| workspace.access.identityIsFilesystemPath | boolean | Yes | Defines the identityisfilesystempath value at this contract boundary. | const: false |
| workspace.access.localBinding | string | Yes | Defines the localbinding value at this contract boundary. | const: ".workspai/workspace-link.local.json" |
| workspace.access.portableUriScheme | string | Yes | Defines the portableurischeme value at this contract boundary. | const: "workspace:" |
| workspace.access.resolvedPathPolicy | string | Yes | Defines the resolvedpathpolicy value at this contract boundary. | const: "runtime-private-never-persist" |
| workspace.access.resolverCommand | string | Yes | Defines the resolvercommand value at this contract boundary. | const: "workspai project workspace status --json" |
| workspace.boundedGraphSearch | string | No | Defines the boundedgraphsearch value at this contract boundary. | minLength: 1 |
| workspace.context | string | No | Defines the context value at this contract boundary. | const: "workspace:.workspai/reports/workspace-context-agent.json" |
| workspace.contract | string | Yes | Defines the contract value at this contract boundary. | const: "workspace:.workspai/workspace.contract.json" |
| workspace.index | string | No | Defines the index value at this contract boundary. | const: "workspace:.workspai/reports/INDEX.json" |
| workspace.knowledgeGraph | string | No | Defines the knowledgegraph value at this contract boundary. | const: "workspace:.workspai/reports/workspace-knowledge-graph.json" |
| workspace.model | string | No | Defines the model value at this contract boundary. | const: "workspace:.workspai/reports/workspace-model.json" |
| workspace.name | string | Yes | Defines the name value at this contract boundary. | minLength: 1 |
| workspace.profile | string | No | Defines the profile value at this contract boundary. | — |
| workspace.projectKnowledgeGraph | string | No | Defines the projectknowledgegraph value at this contract boundary. | const: ".workspai/reports/project-knowledge-graph-reference.json" |
| workspace.relationship | enum | Yes | Defines the relationship value at this contract boundary. | enum: managed, adopted, imported, linked, restored |
| workspace.skillsIndex | string | No | Defines the skillsindex value at this contract boundary. | const: "workspace:.workspai/reports/workspace-skills-index.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-context-agent.v1.json",
"title": "Workspai Project Context for Agents",
"description": "Portable, bounded project lens derived from the canonical Workspace Model and evidence-backed Knowledge Graph.",
"type": "object",
"required": [
"schemaVersion",
"generatedAt",
"workspace",
"project",
"intelligence",
"evidence",
"blockers",
"agentRouting",
"commands",
"integrity"
],
"properties": {
"schemaVersion": {
"const": "project-context-agent.v1"
},
"generatedAt": {
"type": "string",
"format": "date-time"
},
"workspace": {
"type": "object",
"required": [
"name",
"relationship",
"contract",
"access"
],
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"profile": {
"type": "string"
},
"relationship": {
"enum": [
"managed",
"adopted",
"imported",
"linked",
"restored"
]
},
"contract": {
"const": "workspace:.workspai/workspace.contract.json"
},
"projectKnowledgeGraph": {
"const": ".workspai/reports/project-knowledge-graph-reference.json"
},
"model": {
"const": "workspace:.workspai/reports/workspace-model.json"
},
"knowledgeGraph": {
"const": "workspace:.workspai/reports/workspace-knowledge-graph.json"
},
"index": {
"const": "workspace:.workspai/reports/INDEX.json"
},
"context": {
"const": "workspace:.workspai/reports/workspace-context-agent.json"
},
"skillsIndex": {
"const": "workspace:.workspai/reports/workspace-skills-index.json"
},
"boundedGraphSearch": {
"type": "string",
"minLength": 1
},
"access": {
"type": "object",
"required": [
"localBinding",
"canonicalEvidenceAvailableAtGeneration",
"identityIsFilesystemPath",
"resolverCommand",
"portableUriScheme",
"resolvedPathPolicy"
],
"properties": {
"localBinding": {
"const": ".workspai/workspace-link.local.json"
},
"canonicalEvidenceAvailableAtGeneration": {
"type": "boolean"
},
"identityIsFilesystemPath": {
"const": false
},
"resolverCommand": {
"const": "workspai project workspace status --json"
},
"portableUriScheme": {
"const": "workspace:"
},
"resolvedPathPolicy": {
"const": "runtime-private-never-persist"
}
},
"additionalProperties": false
}
},
"additionalProperties": false,
"anyOf": [
{
"properties": {
"model": {
"const": "workspace:.workspai/reports/workspace-model.json"
},
"knowledgeGraph": {
"const": "workspace:.workspai/reports/workspace-knowledge-graph.json"
}
},
"required": [
"model",
"knowledgeGraph"
]
},
{
"properties": {
"index": {
"const": "workspace:.workspai/reports/INDEX.json"
},
"context": {
"const": "workspace:.workspai/reports/workspace-context-agent.json"
},
"skillsIndex": {
"const": "workspace:.workspai/reports/workspace-skills-index.json"
},
"boundedGraphSearch": {
"type": "string",
"minLength": 1
}
},
"required": [
"index",
"context",
"skillsIndex",
"boundedGraphSearch"
]
}
]
},
"project": {
"type": "object",
"required": [
"name",
"relativePath",
"commands",
"importantFiles"
],
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"relativePath": {
"type": "string",
"minLength": 1,
"not": {
"pattern": "^(?:/|[A-Za-z]:[\\\\/])"
}
},
"kind": {
"type": "string"
},
"runtime": {
"type": "string"
},
"runtimeCandidates": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"uniqueItems": true
},
"framework": {
"type": "string"
},
"kit": {
"type": "string"
},
"supportTier": {
"type": "string"
},
"governance": {
"$ref": "#/$defs/projectGovernance"
},
"commands": {
"type": "object",
"required": [
"supported",
"unsupported",
"fleetStages"
],
"properties": {
"supported": {
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true
},
"unsupported": {
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true
},
"fleetStages": {
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true
}
},
"additionalProperties": false
},
"importantFiles": {
"type": "array",
"items": {
"type": "string",
"not": {
"pattern": "^(?:/|[A-Za-z]:[\\\\/])"
}
},
"uniqueItems": true
}
},
"additionalProperties": false
},
"intelligence": {
"type": "object",
"required": [
"entityCount",
"relationCount",
"proofCount",
"entitiesByKind",
"relationsByKind",
"languages",
"semantic",
"projection",
"relatedProjects",
"freshness",
"topology",
"surfaces",
"diagnostics"
],
"properties": {
"modelGeneratedAt": {
"type": "string",
"format": "date-time"
},
"graphGeneratedAt": {
"type": "string",
"format": "date-time"
},
"graphModelHash": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"entityCount": {
"type": "integer",
"minimum": 0
},
"relationCount": {
"type": "integer",
"minimum": 0
},
"proofCount": {
"type": "integer",
"minimum": 0
},
"entitiesByKind": {
"type": "object",
"additionalProperties": {
"type": "integer",
"minimum": 0
}
},
"relationsByKind": {
"type": "object",
"additionalProperties": {
"type": "integer",
"minimum": 0
}
},
"languages": {
"type": "object",
"additionalProperties": {
"type": "object",
"required": [
"fileCount",
"symbolCount",
"generatedFileCount"
],
"properties": {
"fileCount": {
"type": "integer",
"minimum": 0
},
"symbolCount": {
"type": "integer",
"minimum": 0
},
"generatedFileCount": {
"type": "integer",
"minimum": 0
}
},
"additionalProperties": false
}
},
"semantic": {
"type": "object",
"required": [
"protocolConceptCount",
"protocolImplementationBindings",
"equivalenceBindings",
"generationBindings",
"runtimeUnitCount",
"lifecycleStageCount",
"runtimeCoverage"
],
"properties": {
"protocolConceptCount": {
"type": "integer",
"minimum": 0
},
"protocolImplementationBindings": {
"type": "integer",
"minimum": 0
},
"equivalenceBindings": {
"type": "integer",
"minimum": 0
},
"generationBindings": {
"type": "integer",
"minimum": 0
},
"runtimeUnitCount": {
"type": "integer",
"minimum": 0
},
"lifecycleStageCount": {
"type": "integer",
"minimum": 0
},
"runtimeCoverage": {
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true
}
},
"additionalProperties": false
},
"projection": {
"description": "Observable bounds for the representative entity projection. Counts remain exhaustive; omitted entities are available through bounded graph search.",
"type": "object",
"required": [
"mode",
"maxEntities",
"byteBudget",
"selectedBytes",
"eligibleCount",
"selectedCount",
"omittedCount",
"selectedByKind",
"omittedByKind",
"continuationCommand"
],
"properties": {
"mode": {
"const": "stratified-byte-bounded"
},
"maxEntities": {
"type": "integer",
"minimum": 1
},
"byteBudget": {
"type": "integer",
"minimum": 1
},
"selectedBytes": {
"type": "integer",
"minimum": 0
},
"eligibleCount": {
"type": "integer",
"minimum": 0
},
"selectedCount": {
"type": "integer",
"minimum": 0
},
"omittedCount": {
"type": "integer",
"minimum": 0
},
"selectedByKind": {
"type": "object",
"additionalProperties": {
"type": "integer",
"minimum": 0
}
},
"omittedByKind": {
"type": "object",
"additionalProperties": {
"type": "integer",
"minimum": 1
}
},
"continuationCommand": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false
},
"relatedProjects": {
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true
},
"freshness": {
"type": "object",
"required": [
"model",
"graph",
"graphMatchesModel"
],
"properties": {
"model": {
"enum": [
"fresh",
"stale",
"unknown",
"missing"
]
},
"graph": {
"enum": [
"fresh",
"stale",
"unknown",
"missing"
]
},
"graphMatchesModel": {
"type": "boolean"
}
},
"additionalProperties": false
},
"topology": {
"type": "object",
"required": [
"status",
"dependencies",
"dependents"
],
"properties": {
"status": {
"enum": [
"proven",
"unproven",
"unavailable"
]
},
"dependencies": {
"type": "array",
"items": {
"$ref": "#/$defs/topologyRelation"
},
"maxItems": 16
},
"dependents": {
"type": "array",
"items": {
"$ref": "#/$defs/topologyRelation"
},
"maxItems": 16
}
},
"additionalProperties": false
},
"surfaces": {
"type": "object",
"required": [
"services",
"packages",
"protocols",
"runtimeUnits",
"lifecycleStages",
"apis",
"endpoints",
"dataStores",
"deployments",
"pipelines",
"tests",
"owners",
"decisions",
"ports"
],
"properties": {
"services": {
"$ref": "#/$defs/entityList"
},
"packages": {
"$ref": "#/$defs/entityList"
},
"protocols": {
"$ref": "#/$defs/entityList"
},
"runtimeUnits": {
"$ref": "#/$defs/entityList"
},
"lifecycleStages": {
"$ref": "#/$defs/entityList"
},
"apis": {
"$ref": "#/$defs/entityList"
},
"endpoints": {
"$ref": "#/$defs/entityList"
},
"dataStores": {
"$ref": "#/$defs/entityList"
},
"deployments": {
"$ref": "#/$defs/entityList"
},
"pipelines": {
"$ref": "#/$defs/entityList"
},
"tests": {
"$ref": "#/$defs/entityList"
},
"owners": {
"$ref": "#/$defs/entityList"
},
"decisions": {
"$ref": "#/$defs/entityList"
},
"ports": {
"type": "array",
"maxItems": 8,
"items": {
"$ref": "#/$defs/port"
}
}
},
"additionalProperties": false
},
"diagnostics": {
"type": "array",
"maxItems": 16,
"items": {
"type": "object",
"required": [
"code",
"severity",
"message"
],
"properties": {
"code": {
"type": "string"
},
"severity": {
"type": "string"
},
"message": {
"type": "string"
},
"recommendation": {
"type": "string"
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
},
"evidence": {
"type": "object",
"required": [
"readOrder",
"projectProofArtifacts",
"relations",
"proofs"
],
"properties": {
"readOrder": {
"type": "array",
"maxItems": 12,
"items": {
"type": "string"
},
"uniqueItems": true
},
"projectProofArtifacts": {
"type": "array",
"items": {
"type": "string",
"not": {
"pattern": "^(?:/|[A-Za-z]:[\\\\/])"
}
},
"uniqueItems": true,
"maxItems": 24
},
"relations": {
"type": "array",
"maxItems": 16,
"items": {
"$ref": "#/$defs/relation"
}
},
"proofs": {
"type": "array",
"maxItems": 16,
"items": {
"$ref": "#/$defs/proof"
}
}
},
"additionalProperties": false
},
"blockers": {
"type": "array",
"maxItems": 32,
"items": {
"$ref": "#/$defs/blocker"
}
},
"agentRouting": {
"description": "Machine-readable mandatory routing policy that prevents agents from bypassing canonical workspace evidence.",
"type": "object",
"required": [
"enforcement",
"mandatoryPreflight",
"workspaceLocator",
"workspaceEvidenceRequiredFor",
"requiredReadOrder",
"degradedMode"
],
"properties": {
"enforcement": {
"const": "required"
},
"mandatoryPreflight": {
"type": "object",
"required": [
"command",
"successCondition"
],
"properties": {
"command": {
"const": "workspai agent bootstrap --for-agent generic --strict --json"
},
"successCondition": {
"const": "ready"
}
},
"additionalProperties": false
},
"workspaceLocator": {
"type": "object",
"required": [
"command",
"successCondition",
"outputClassification",
"persistence",
"disclosure",
"portableUriScheme"
],
"properties": {
"command": {
"const": "workspai project workspace status --json"
},
"successCondition": {
"const": "resolved"
},
"outputClassification": {
"const": "machine-local"
},
"persistence": {
"const": "forbidden"
},
"disclosure": {
"const": "forbidden"
},
"portableUriScheme": {
"const": "workspace:"
}
},
"additionalProperties": false
},
"workspaceEvidenceRequiredFor": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"enum": [
"repository-analysis",
"architecture-analysis",
"change-impact",
"cross-project-change",
"contract-change",
"infrastructure-change",
"release-readiness"
]
}
},
"requiredReadOrder": {
"type": "array",
"minItems": 4,
"maxItems": 10,
"uniqueItems": true,
"items": {
"type": "string",
"minLength": 1
}
},
"degradedMode": {
"type": "object",
"required": [
"allowCompleteArchitectureClaims",
"requireDisclosure"
],
"properties": {
"allowCompleteArchitectureClaims": {
"const": false
},
"requireDisclosure": {
"const": true
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"commands": {
"type": "object",
"required": [
"refresh",
"verify",
"graphSearch",
"doctor",
"workspaceStatus"
],
"properties": {
"refresh": {
"type": "string",
"minLength": 1
},
"verify": {
"type": "string",
"minLength": 1
},
"graphSearch": {
"type": "string",
"minLength": 1
},
"doctor": {
"type": "string",
"minLength": 1
},
"workspaceStatus": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false
},
"integrity": {
"type": "object",
"required": [
"algorithm",
"payloadHash",
"portable",
"absolutePathsEmitted"
],
"properties": {
"algorithm": {
"const": "sha256"
},
"modelHash": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"payloadHash": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"portable": {
"const": true
},
"absolutePathsEmitted": {
"const": false
}
},
"additionalProperties": false
}
},
"$defs": {
"governanceControl": {
"type": "object",
"required": [
"status",
"provider",
"evidence",
"reference"
],
"properties": {
"status": {
"enum": [
"repository",
"external-declared",
"external-observed",
"unknown"
]
},
"provider": {
"type": [
"string",
"null"
]
},
"evidence": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"uniqueItems": true
},
"reference": {
"type": [
"string",
"null"
]
}
},
"additionalProperties": false
},
"projectGovernance": {
"type": "object",
"required": [
"schemaVersion",
"ci",
"release",
"ownership"
],
"properties": {
"schemaVersion": {
"const": "workspai.project-governance.v1"
},
"ci": {
"$ref": "#/$defs/governanceControl"
},
"release": {
"$ref": "#/$defs/governanceControl"
},
"ownership": {
"$ref": "#/$defs/governanceControl"
}
},
"additionalProperties": false
},
"portableString": {
"type": "string",
"not": {
"pattern": "^(?:/|[A-Za-z]:[\\\\/])"
}
},
"topologyRelation": {
"type": "object",
"required": [
"project",
"kind",
"source",
"confidence",
"evidence"
],
"properties": {
"project": {
"type": "string",
"minLength": 1
},
"kind": {
"type": "string",
"minLength": 1
},
"source": {
"type": "string",
"minLength": 1
},
"confidence": {
"type": "string",
"minLength": 1
},
"evidence": {
"type": "array",
"items": {
"$ref": "#/$defs/portableString"
},
"uniqueItems": true
}
},
"additionalProperties": false
},
"entityList": {
"type": "array",
"maxItems": 32,
"items": {
"$ref": "#/$defs/entity"
}
},
"entity": {
"type": "object",
"required": [
"id",
"kind",
"label",
"attributes",
"proofIds"
],
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string"
},
"label": {
"type": "string"
},
"attributes": {
"type": "object",
"additionalProperties": true
},
"proofIds": {
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true
}
},
"additionalProperties": false
},
"port": {
"type": "object",
"required": [
"entityId",
"label",
"attribute",
"value"
],
"properties": {
"entityId": {
"type": "string"
},
"label": {
"type": "string"
},
"attribute": {
"type": "string"
},
"value": true
},
"additionalProperties": false
},
"relation": {
"type": "object",
"required": [
"id",
"from",
"to",
"kind",
"derivation",
"trust",
"confidence",
"proofIds"
],
"properties": {
"id": {
"type": "string"
},
"from": {
"type": "string"
},
"to": {
"type": "string"
},
"kind": {
"type": "string"
},
"derivation": {
"type": "string"
},
"trust": {
"type": "string"
},
"confidence": {
"type": "string"
},
"proofIds": {
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true
}
},
"additionalProperties": false
},
"proof": {
"type": "object",
"required": [
"id",
"provider",
"artifact",
"derivation",
"trust",
"confidence",
"freshness"
],
"properties": {
"id": {
"type": "string"
},
"provider": {
"type": "string"
},
"artifact": {
"$ref": "#/$defs/portableString"
},
"pointer": {
"type": "string"
},
"line": {
"type": "integer",
"minimum": 1
},
"derivation": {
"type": "string"
},
"trust": {
"type": "string"
},
"confidence": {
"type": "string"
},
"freshness": {
"type": "string"
}
},
"additionalProperties": false
},
"blocker": {
"type": "object",
"required": [
"source",
"severity",
"message"
],
"properties": {
"source": {
"type": "string"
},
"severity": {
"enum": [
"warning",
"error"
]
},
"message": {
"type": "string"
},
"code": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}