Workspace Intelligence / JSON Schema
Workspai agent task route
A bounded project route from Workspai evidence. Suggested actions do not grant permission or attest to execution.
- Schema version
https://workspai.dev/schemas/workspace-intelligence/agent-task-route.v1.json- Contract path
contracts/workspace-intelligence/agent-task-route.v1.json- Publication
- json-schema
- Defined fields
- 50
- Artifact bindings
- 0
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.
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 |
|---|---|---|---|---|
| $defs.inspect.effect | string | Yes | Defines the effect value at this contract boundary. | const: "read" |
| $defs.inspect.files | array | Yes | Defines the files value at this contract boundary. | minItems: 1 · maxItems: 3 |
| $defs.inspect.files[].evidenceId | string | No | Defines the evidenceid value at this contract boundary. | minLength: 1 |
| $defs.inspect.files[].line | integer | No | Defines the line value at this contract boundary. | minimum: 1 |
| $defs.inspect.files[].path | string | Yes | Defines the path value at this contract boundary. | minLength: 1 |
| $defs.inspect.files[].relation | object | No | Defines the relation value at this contract boundary. | additionalProperties: false |
| $defs.inspect.files[].relation.id | string | Yes | Defines the id value at this contract boundary. | minLength: 1 |
| $defs.inspect.files[].relation.kind | enum | Yes | Defines the kind value at this contract boundary. | enum: imports, calls, tests |
| $defs.inspect.id | string | Yes | Defines the id value at this contract boundary. | const: "source.inspect" |
| $defs.inspect.scope | string | Yes | Defines the scope value at this contract boundary. | const: "project" |
| $defs.review.effect | string | Yes | Defines the effect value at this contract boundary. | const: "read" |
| $defs.review.id | string | Yes | Defines the id value at this contract boundary. | const: "lifecycle.review" |
| $defs.review.manifest | string | No | Defines the manifest value at this contract boundary. | minLength: 1 |
| $defs.review.reason | string | Yes | Defines the reason value at this contract boundary. | const: "no-suggested-test" |
| $defs.review.scope | string | Yes | Defines the scope value at this contract boundary. | const: "project" |
| $defs.review.when | string | Yes | Defines the when value at this contract boundary. | const: "after-source-change" |
| $defs.search.cwd | string | Yes | Defines the cwd value at this contract boundary. | const: "." |
| $defs.search.effect | string | Yes | Defines the effect value at this contract boundary. | const: "read" |
| $defs.search.id | string | Yes | Defines the id value at this contract boundary. | const: "source.search" |
| $defs.search.scope | string | Yes | Defines the scope value at this contract boundary. | const: "project" |
| $defs.select.args | array | Yes | Defines the args value at this contract boundary. | const: ["project","lifecycle","plan","--project","<verified-source-root>","--path","<verified-source-path>","--strict","--json"] |
| $defs.select.cwd | string | Yes | Defines the cwd value at this contract boundary. | const: "." |
| $defs.select.effect | string | Yes | Defines the effect value at this contract boundary. | const: "read" |
| $defs.select.executable | string | Yes | Defines the executable value at this contract boundary. | const: "workspai" |
| $defs.select.id | string | Yes | Defines the id value at this contract boundary. | const: "lifecycle.select" |
| $defs.select.scope | string | Yes | Defines the scope value at this contract boundary. | const: "project" |
| $defs.select.when | string | Yes | Defines the when value at this contract boundary. | const: "source-path-known" |
| $defs.test.argvSequence | array | No | Defines the argvsequence value at this contract boundary. | minItems: 1 |
| $defs.test.argvSequence[].args | array | Yes | Defines the args value at this contract boundary. | — |
| $defs.test.argvSequence[].executable | string | Yes | Defines the executable value at this contract boundary. | minLength: 1 |
| $defs.test.command | string | Yes | Defines the command value at this contract boundary. | minLength: 1 |
| $defs.test.confidence | enum | Yes | Defines the confidence value at this contract boundary. | enum: high, medium |
| $defs.test.cwd | string | Yes | Defines the cwd value at this contract boundary. | minLength: 1 |
| $defs.test.effect | string | Yes | Defines the effect value at this contract boundary. | const: "execute-project-check" |
| $defs.test.focus | string | No | Defines the focus value at this contract boundary. | minLength: 1 |
| $defs.test.id | string | Yes | Defines the id value at this contract boundary. | const: "lifecycle.test" |
| $defs.test.manifest | string | Yes | Defines the manifest value at this contract boundary. | minLength: 1 |
| $defs.test.preflight | enum | Yes | Defines the preflight value at this contract boundary. | enum: executable-and-inputs, executable |
| $defs.test.provenance | string | Yes | Defines the provenance value at this contract boundary. | const: "manifest-derived" |
| $defs.test.runner | string | Yes | Defines the runner value at this contract boundary. | const: "inspect-once" |
| $defs.test.scope | string | Yes | Defines the scope value at this contract boundary. | const: "project" |
| $defs.test.selectedBy | enum | Yes | Defines the selectedby value at this contract boundary. | enum: exact-manifest, source-runtime, single-unit |
| $defs.test.setup | object | No | Defines the setup value at this contract boundary. | additionalProperties: false |
| $defs.test.setup.args | array | Yes | Defines the args value at this contract boundary. | — |
| $defs.test.setup.executable | string | Yes | Defines the executable value at this contract boundary. | minLength: 1 |
| $defs.test.sourceManifest | string | No | Defines the sourcemanifest value at this contract boundary. | minLength: 1 |
| $defs.test.when | string | Yes | Defines the when value at this contract boundary. | const: "after-source-change" |
| $defs.test.workspaceOwner | object | No | Defines the workspaceowner value at this contract boundary. | additionalProperties: false |
| $defs.test.workspaceOwner.manifest | string | Yes | Defines the manifest value at this contract boundary. | minLength: 1 |
| $defs.test.workspaceOwner.root | string | Yes | Defines the root 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/agent-task-route.v1.json",
"title": "Workspai agent task route",
"description": "A bounded project route from Workspai evidence. Suggested actions do not grant permission or attest to execution.",
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"required": [
"schemaVersion",
"status",
"scope",
"selection",
"cwdBase",
"host",
"grounding",
"graph",
"actions",
"budget",
"integrity",
"execution"
],
"properties": {
"schemaVersion": {
"const": "workspai.agent-task-route.v1"
},
"status": {
"enum": [
"ready",
"partial"
]
},
"scope": {
"$ref": "agent-task-context.v1.json#/oneOf/0/properties/scope"
},
"selection": {
"$ref": "agent-task-context.v1.json#/oneOf/0/properties/selection"
},
"cwdBase": {
"const": "canonical-project-root"
},
"host": {
"type": "object",
"additionalProperties": false,
"required": [
"availability",
"permission",
"execution"
],
"properties": {
"availability": {
"const": "not-observed"
},
"permission": {
"const": "not-observed"
},
"execution": {
"const": "not-observed"
}
}
},
"grounding": {
"type": "object",
"additionalProperties": false,
"required": [
"status",
"sourceMutation",
"findings"
],
"properties": {
"status": {
"enum": [
"ready",
"degraded",
"blocked",
"unavailable",
"insufficient-budget"
]
},
"sourceMutation": {
"enum": [
"governed-cli-transaction-only",
"risk-and-project-policy-based",
"unknown"
]
},
"findings": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"uniqueItems": true
},
"goalEvidence": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"minItems": 1,
"maxItems": 2
}
}
},
"graph": {
"type": "object",
"additionalProperties": false,
"required": [
"status"
],
"properties": {
"status": {
"enum": [
"candidates",
"no-matches",
"unavailable",
"insufficient-budget"
]
},
"reason": {
"type": "string",
"minLength": 1
},
"evidence": {
"type": "object",
"additionalProperties": false,
"required": [
"executable",
"cwd",
"args"
],
"properties": {
"executable": {
"const": "workspai"
},
"cwd": {
"const": "."
},
"args": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"minItems": 1
}
}
}
}
},
"actions": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/$defs/inspect"
},
{
"$ref": "#/$defs/search"
},
{
"$ref": "#/$defs/access"
},
{
"$ref": "#/$defs/test"
},
{
"$ref": "#/$defs/select"
},
{
"$ref": "#/$defs/review"
}
]
},
"minItems": 2,
"maxItems": 3
},
"budget": {
"type": "object",
"additionalProperties": false,
"required": [
"maxBytes",
"usedBytes",
"accounting"
],
"properties": {
"maxBytes": {
"type": "integer",
"minimum": 1024,
"maximum": 131072
},
"usedBytes": {
"type": "integer",
"minimum": 1
},
"accounting": {
"const": "utf8-json-with-newline"
}
}
},
"integrity": {
"type": "object",
"additionalProperties": false,
"required": [
"algorithm",
"payloadHash"
],
"properties": {
"algorithm": {
"const": "sha256"
},
"payloadHash": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
}
}
},
"execution": {
"type": "object",
"additionalProperties": false,
"required": [
"projectRoot"
],
"properties": {
"projectRoot": {
"type": "object",
"additionalProperties": false,
"required": [
"anchor",
"relativePath"
],
"properties": {
"anchor": {
"const": "request-project-root"
},
"relativePath": {
"type": "string",
"minLength": 1
}
}
}
}
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"schemaVersion",
"status",
"reason",
"recovery",
"budget"
],
"properties": {
"schemaVersion": {
"const": "workspai.agent-task-route.v1"
},
"status": {
"const": "project-selection-required"
},
"reason": {
"enum": [
"unverified-working-directory",
"path-not-found",
"nested-project-boundary"
]
},
"recovery": {
"$ref": "#/$defs/recovery"
},
"budget": {
"type": "object",
"additionalProperties": false,
"required": [
"maxBytes",
"usedBytes",
"accounting"
],
"properties": {
"maxBytes": {
"type": "integer",
"minimum": 1024,
"maximum": 131072
},
"usedBytes": {
"type": "integer",
"minimum": 1
},
"accounting": {
"const": "utf8-json-with-newline"
}
}
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"schemaVersion",
"status",
"reason",
"recovery",
"budget"
],
"properties": {
"schemaVersion": {
"const": "workspai.agent-task-route.v1"
},
"status": {
"const": "insufficient-budget"
},
"reason": {
"const": "route-exceeds-budget"
},
"recovery": {
"$ref": "#/$defs/recovery"
},
"budget": {
"type": "object",
"additionalProperties": false,
"required": [
"maxBytes",
"usedBytes",
"accounting",
"requiredBytes"
],
"properties": {
"maxBytes": {
"type": "integer",
"minimum": 1024,
"maximum": 131072
},
"usedBytes": {
"type": "integer",
"minimum": 1
},
"accounting": {
"const": "utf8-json-with-newline"
},
"requiredBytes": {
"type": "integer",
"minimum": 1025
}
}
}
}
}
],
"$defs": {
"inspect": {
"type": "object",
"additionalProperties": false,
"required": [
"id",
"scope",
"effect",
"files"
],
"properties": {
"id": {
"const": "source.inspect"
},
"scope": {
"const": "project"
},
"effect": {
"const": "read"
},
"files": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"path"
],
"properties": {
"path": {
"type": "string",
"minLength": 1
},
"line": {
"type": "integer",
"minimum": 1
},
"evidenceId": {
"type": "string",
"minLength": 1
},
"relation": {
"type": "object",
"additionalProperties": false,
"required": [
"id",
"kind"
],
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"kind": {
"enum": [
"imports",
"calls",
"tests"
]
}
}
}
}
},
"minItems": 1,
"maxItems": 3
}
}
},
"search": {
"type": "object",
"additionalProperties": false,
"required": [
"id",
"scope",
"effect",
"cwd"
],
"properties": {
"id": {
"const": "source.search"
},
"scope": {
"const": "project"
},
"effect": {
"const": "read"
},
"cwd": {
"const": "."
}
}
},
"access": {
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"required": [
"id",
"scope",
"effect",
"when",
"approval",
"retry"
],
"properties": {
"id": {
"const": "graph.access"
},
"scope": {
"const": "project"
},
"effect": {
"const": "read"
},
"when": {
"const": "graph-needed"
},
"approval": {
"const": "host-read"
},
"retry": {
"const": "same-command"
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"id",
"scope",
"effect",
"when",
"approval",
"retry",
"options"
],
"properties": {
"id": {
"const": "graph.access"
},
"scope": {
"const": "project"
},
"effect": {
"const": "read"
},
"when": {
"const": "graph-needed"
},
"approval": {
"const": "canonical-workspace-selection"
},
"retry": {
"const": "approved-workspace"
},
"options": {
"oneOf": [
{
"const": [
"--workspace"
]
},
{
"const": [
"--workspace-default",
"--workspace"
]
}
]
}
}
}
]
},
"test": {
"type": "object",
"additionalProperties": false,
"required": [
"id",
"scope",
"effect",
"when",
"cwd",
"manifest",
"command",
"preflight",
"confidence",
"provenance",
"selectedBy",
"runner"
],
"properties": {
"id": {
"const": "lifecycle.test"
},
"scope": {
"const": "project"
},
"effect": {
"const": "execute-project-check"
},
"when": {
"const": "after-source-change"
},
"cwd": {
"type": "string",
"minLength": 1
},
"manifest": {
"type": "string",
"minLength": 1
},
"command": {
"type": "string",
"minLength": 1
},
"argvSequence": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"executable",
"args"
],
"properties": {
"executable": {
"type": "string",
"minLength": 1
},
"args": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"minItems": 1
},
"preflight": {
"enum": [
"executable-and-inputs",
"executable"
]
},
"confidence": {
"enum": [
"high",
"medium"
]
},
"provenance": {
"const": "manifest-derived"
},
"workspaceOwner": {
"type": "object",
"additionalProperties": false,
"required": [
"root",
"manifest"
],
"properties": {
"root": {
"type": "string",
"minLength": 1
},
"manifest": {
"type": "string",
"minLength": 1
}
}
},
"selectedBy": {
"enum": [
"exact-manifest",
"source-runtime",
"single-unit"
]
},
"runner": {
"const": "inspect-once"
},
"sourceManifest": {
"type": "string",
"minLength": 1
},
"setup": {
"type": "object",
"additionalProperties": false,
"required": [
"executable",
"args"
],
"properties": {
"executable": {
"type": "string",
"minLength": 1
},
"args": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"focus": {
"type": "string",
"minLength": 1
}
}
},
"select": {
"type": "object",
"additionalProperties": false,
"required": [
"id",
"scope",
"effect",
"when",
"cwd",
"executable",
"args"
],
"properties": {
"id": {
"const": "lifecycle.select"
},
"scope": {
"const": "project"
},
"effect": {
"const": "read"
},
"when": {
"const": "source-path-known"
},
"cwd": {
"const": "."
},
"executable": {
"const": "workspai"
},
"args": {
"const": [
"project",
"lifecycle",
"plan",
"--project",
"<verified-source-root>",
"--path",
"<verified-source-path>",
"--strict",
"--json"
]
}
}
},
"recovery": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"kind",
"message"
],
"properties": {
"kind": {
"enum": [
"retry",
"native",
"select-project",
"select-path",
"select-workspace"
]
},
"requiredOption": {
"enum": [
"--project",
"--path",
"--workspace",
"--workspace-default"
]
},
"message": {
"type": "string",
"minLength": 1
}
}
},
"minItems": 1,
"maxItems": 3
},
"review": {
"type": "object",
"additionalProperties": false,
"required": [
"id",
"scope",
"effect",
"when",
"reason"
],
"properties": {
"id": {
"const": "lifecycle.review"
},
"scope": {
"const": "project"
},
"effect": {
"const": "read"
},
"when": {
"const": "after-source-change"
},
"reason": {
"const": "no-suggested-test"
},
"manifest": {
"type": "string",
"minLength": 1
}
}
}
}
}