Workspace Intelligence / JSON Schema
Agent Hooks V1
Defines the versioned agent hooks v1 boundary used by Workspai and its consumers.
- Schema version
workspai-agent-hooks.v1- Contract path
contracts/workspace-intelligence/agent-hooks.v1.json- Publication
- json-schema
- Defined fields
- 6
- 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 |
|---|---|---|
| .vscode/workspai-agent-hooks.json | workspai-agent-hooks.v1 | workspai workspace agent-sync |
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 |
|---|---|---|---|---|
| enabledByDefault | boolean | Yes | Defines the enabledbydefault value at this contract boundary. | — |
| generatedAt | string | Yes | Defines the generatedat value at this contract boundary. | format: date-time |
| hooks | array | Yes | Defines the hooks value at this contract boundary. | — |
| mode | string | Yes | Defines the mode value at this contract boundary. | const: "advisory" |
| schemaVersion | string | Yes | Defines the schemaversion value at this contract boundary. | const: "workspai-agent-hooks.v1" |
| workspaceRoot | string | Yes | Defines the workspaceroot 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",
"type": "object",
"required": [
"schemaVersion",
"generatedAt",
"workspaceRoot",
"enabledByDefault",
"mode",
"hooks"
],
"properties": {
"schemaVersion": {
"const": "workspai-agent-hooks.v1"
},
"generatedAt": {
"type": "string",
"format": "date-time"
},
"workspaceRoot": {
"type": "string",
"minLength": 1
},
"enabledByDefault": {
"type": "boolean"
},
"mode": {
"const": "advisory"
},
"hooks": {
"type": "array",
"items": {
"type": "object"
}
}
},
"additionalProperties": true
}