Workspace Intelligence / JSON Schema
Workspai Goal Agent Handoff
Defines the versioned goal agent handoff v1 boundary used by Workspai and its consumers.
- Schema version
workspai.goal-agent-handoff.v1- Contract path
contracts/workspace-intelligence/goal-agent-handoff.v1.json- Publication
- json-schema
- Defined fields
- 40
- 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 |
|---|---|---|---|---|
| consumer | enum | Yes | Defines the consumer value at this contract boundary. | enum: generic, claude, codex |
| discovery | object | Yes | Defines the discovery value at this contract boundary. | additionalProperties: false |
| discovery.index | string | Yes | Defines the index value at this contract boundary. | const: ".workspai/goals/index.json" |
| discovery.requiredReads | array | Yes | Defines the requiredreads value at this contract boundary. | minItems: 3 |
| discovery.statusCommand | string | Yes | Defines the statuscommand value at this contract boundary. | pattern: ^workspai goal --status |
| evidence | array | Yes | Defines the evidence value at this contract boundary. | minItems: 3 |
| evidence[].artifact | string | Yes | Defines the artifact value at this contract boundary. | pattern: ^\.workspai/ |
| evidence[].binding | object | Yes | Defines the binding value at this contract boundary. | additionalProperties: false |
| evidence[].binding.algorithm | string | Yes | Defines the algorithm value at this contract boundary. | const: "sha256" |
| evidence[].binding.semantics | enum | Yes | Defines the semantics value at this contract boundary. | enum: workspace-model-structural-v1, canonical-json-v1 |
| evidence[].binding.value | reference | Yes | Defines the value value at this contract boundary. | ref: #/$defs/hash |
| evidence[].role | enum | Yes | Defines the role value at this contract boundary. | enum: model, graph, goal |
| generatedAt | string | Yes | Defines the generatedat value at this contract boundary. | format: date-time |
| goalFingerprint | reference | Yes | Defines the goalfingerprint value at this contract boundary. | ref: #/$defs/hash |
| goalId | string | Yes | Defines the goalid value at this contract boundary. | pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{7,95}$ |
| guardrails | array | Yes | Defines the guardrails value at this contract boundary. | minItems: 5 |
| objective | string | Yes | Defines the objective value at this contract boundary. | minLength: 1 · maxLength: 2000 |
| renewal | object | Yes | Defines the renewal value at this contract boundary. | additionalProperties: false |
| renewal.command | string | Yes | Defines the command value at this contract boundary. | pattern: ^workspai goal |
| renewal.reason | string | Yes | Defines the reason value at this contract boundary. | minLength: 1 |
| retrieval | object | Yes | Defines the retrieval value at this contract boundary. | additionalProperties: false |
| retrieval.anchors | array | Yes | Defines the anchors value at this contract boundary. | maxItems: 20 |
| retrieval.anchors[].entityId | string | Yes | Defines the entityid value at this contract boundary. | — |
| retrieval.anchors[].kind | string | Yes | Defines the kind value at this contract boundary. | — |
| retrieval.anchors[].label | string | Yes | Defines the label value at this contract boundary. | — |
| retrieval.anchors[].proofIds | array | Yes | Defines the proofids value at this contract boundary. | — |
| retrieval.queries | array | Yes | Defines the queries value at this contract boundary. | minItems: 1 · maxItems: 3 |
| retrieval.status | enum | Yes | Defines the status value at this contract boundary. | enum: grounded, partial, empty |
| retrieval.strategy | string | Yes | Defines the strategy value at this contract boundary. | const: "deterministic-category-v1" |
| schemaVersion | string | Yes | Defines the schemaversion value at this contract boundary. | const: "workspai.goal-agent-handoff.v1" |
| scope | object | Yes | Defines the scope value at this contract boundary. | additionalProperties: false |
| scope.kind | enum | Yes | Defines the kind value at this contract boundary. | enum: workspace, project, project-set |
| scope.projects | array | Yes | Defines the projects value at this contract boundary. | minItems: 1 |
| scope.resolution | enum | No | Defines the resolution value at this contract boundary. | enum: selected, selection-required |
| scope.selectionSource | enum | Yes | Defines the selectionsource value at this contract boundary. | enum: workspace, single-project-workspace, invocation-project, explicit, interactive |
| state | enum | Yes | Defines the state value at this contract boundary. | enum: ready-to-plan, needs-confirmation, needs-evidence, blocked |
| workflow | array | Yes | Defines the workflow value at this contract boundary. | minItems: 5 |
| workflow[].instruction | string | Yes | Defines the instruction value at this contract boundary. | minLength: 1 |
| workflow[].order | integer | Yes | Defines the order value at this contract boundary. | minimum: 1 |
| workflow[].owner | enum | Yes | Defines the owner value at this contract boundary. | enum: workspai-cli, agent, human |
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/goal-agent-handoff.v1.json",
"title": "Workspai Goal Agent Handoff",
"type": "object",
"required": [
"schemaVersion",
"goalId",
"goalFingerprint",
"generatedAt",
"consumer",
"state",
"objective",
"scope",
"discovery",
"retrieval",
"evidence",
"guardrails",
"workflow",
"renewal"
],
"properties": {
"schemaVersion": {
"const": "workspai.goal-agent-handoff.v1"
},
"goalId": {
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{7,95}$"
},
"goalFingerprint": {
"$ref": "#/$defs/hash"
},
"generatedAt": {
"type": "string",
"format": "date-time"
},
"consumer": {
"enum": [
"generic",
"claude",
"codex"
]
},
"state": {
"enum": [
"ready-to-plan",
"needs-confirmation",
"needs-evidence",
"blocked"
]
},
"objective": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"scope": {
"type": "object",
"required": [
"kind",
"projects",
"selectionSource"
],
"properties": {
"kind": {
"enum": [
"workspace",
"project",
"project-set"
]
},
"projects": {
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"minLength": 1
},
"uniqueItems": true
},
"selectionSource": {
"enum": [
"workspace",
"single-project-workspace",
"invocation-project",
"explicit",
"interactive"
]
},
"resolution": {
"enum": [
"selected",
"selection-required"
]
}
},
"allOf": [
{
"if": {
"properties": {
"kind": {
"const": "project"
}
}
},
"then": {
"properties": {
"projects": {
"type": "array",
"maxItems": 1
}
}
}
},
{
"if": {
"properties": {
"kind": {
"const": "project-set"
}
}
},
"then": {
"properties": {
"projects": {
"type": "array",
"minItems": 2
}
}
}
},
{
"if": {
"properties": {
"resolution": {
"const": "selection-required"
}
},
"required": [
"resolution"
]
},
"then": {
"properties": {
"kind": {
"const": "workspace"
},
"selectionSource": {
"const": "workspace"
}
}
}
}
],
"additionalProperties": false
},
"evidence": {
"type": "array",
"minItems": 3,
"items": {
"type": "object",
"required": [
"role",
"artifact",
"binding"
],
"properties": {
"role": {
"enum": [
"model",
"graph",
"goal"
]
},
"artifact": {
"type": "string",
"pattern": "^\\.workspai/"
},
"binding": {
"type": "object",
"required": [
"algorithm",
"semantics",
"value"
],
"properties": {
"algorithm": {
"const": "sha256"
},
"semantics": {
"enum": [
"workspace-model-structural-v1",
"canonical-json-v1"
]
},
"value": {
"$ref": "#/$defs/hash"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"discovery": {
"type": "object",
"required": [
"index",
"statusCommand",
"requiredReads"
],
"properties": {
"index": {
"const": ".workspai/goals/index.json"
},
"statusCommand": {
"type": "string",
"pattern": "^workspai goal --status "
},
"requiredReads": {
"type": "array",
"minItems": 3,
"items": {
"type": "string",
"pattern": "^\\.workspai/"
},
"uniqueItems": true
}
},
"additionalProperties": false
},
"retrieval": {
"type": "object",
"required": [
"status",
"strategy",
"queries",
"anchors"
],
"properties": {
"status": {
"enum": [
"grounded",
"partial",
"empty"
]
},
"strategy": {
"const": "deterministic-category-v1"
},
"queries": {
"type": "array",
"minItems": 1,
"maxItems": 3,
"items": {
"type": "string",
"minLength": 1
},
"uniqueItems": true
},
"anchors": {
"type": "array",
"maxItems": 20,
"items": {
"type": "object",
"required": [
"entityId",
"kind",
"label",
"proofIds"
],
"properties": {
"entityId": {
"type": "string"
},
"kind": {
"type": "string"
},
"label": {
"type": "string"
},
"proofIds": {
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
},
"guardrails": {
"type": "array",
"minItems": 5,
"items": {
"type": "string",
"minLength": 1
},
"uniqueItems": true
},
"workflow": {
"type": "array",
"minItems": 5,
"items": {
"type": "object",
"required": [
"order",
"owner",
"instruction"
],
"properties": {
"order": {
"type": "integer",
"minimum": 1
},
"owner": {
"enum": [
"workspai-cli",
"agent",
"human"
]
},
"instruction": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false
}
},
"renewal": {
"type": "object",
"required": [
"command",
"reason"
],
"properties": {
"command": {
"type": "string",
"pattern": "^workspai goal "
},
"reason": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false
}
},
"$defs": {
"hash": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
}
},
"additionalProperties": false
}