All contracts

Workspace Intelligence / JSON Schema

Workspai Goal Pack

Defines the versioned goal pack v1 boundary used by Workspai and its consumers.

Schema version
workspai.goal-pack.v1
Contract path
contracts/workspace-intelligence/goal-pack.v1.json
Publication
json-schema
Defined fields
109
Artifact bindings
1

Why this contract exists

Architecture role

Defines a versioned interoperability boundary used by Workspai and contract-aware consumers.

Consumption boundary

  • Workspai CLI
  • Workspace Intelligence consumers
  • IDEs and agents

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/reports/goal-pack-last-run.jsonworkspai.goal-pack.v1
workspai goal

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.graphBinding.artifactstringYesDefines the artifact value at this contract boundary.const: ".workspai/reports/workspace-knowledge-graph.json"
$defs.graphBinding.generatedAtstringYesDefines the generatedat value at this contract boundary.format: date-time
$defs.graphBinding.hashreferenceYesDefines the hash value at this contract boundary.ref: #/$defs/hash
$defs.graphBinding.hashAlgorithmstringYesDefines the hashalgorithm value at this contract boundary.const: "sha256"
$defs.graphBinding.hashSemanticsstringYesDefines the hashsemantics value at this contract boundary.const: "canonical-json-v1"
$defs.graphBinding.inputHashreferenceNoDefines the inputhash value at this contract boundary.ref: #/$defs/hash
$defs.graphBinding.modelHashreferenceYesDefines the modelhash value at this contract boundary.ref: #/$defs/hash
$defs.graphBinding.schemaVersionstringYesDefines the schemaversion value at this contract boundary.const: "workspace-knowledge-graph.v1"
$defs.modelBinding.artifactstringYesDefines the artifact value at this contract boundary.const: ".workspai/reports/workspace-model.json"
$defs.modelBinding.generatedAtstringYesDefines the generatedat value at this contract boundary.format: date-time
$defs.modelBinding.hashreferenceYesDefines the hash value at this contract boundary.ref: #/$defs/hash
$defs.modelBinding.hashAlgorithmstringYesDefines the hashalgorithm value at this contract boundary.const: "sha256"
$defs.modelBinding.hashSemanticsstringYesDefines the hashsemantics value at this contract boundary.const: "workspace-model-structural-v1"
$defs.modelBinding.schemaVersionstringYesDefines the schemaversion value at this contract boundary.const: "workspace-model.v1"
$defs.retrieval.anchorsarrayYesDefines the anchors value at this contract boundary.maxItems: 20
$defs.retrieval.anchors[].entityIdstringYesDefines the entityid value at this contract boundary.minLength: 1
$defs.retrieval.anchors[].kindstringYesDefines the kind value at this contract boundary.minLength: 1
$defs.retrieval.anchors[].labelstringYesDefines the label value at this contract boundary.minLength: 1
$defs.retrieval.anchors[].proofIdsarrayYesDefines the proofids value at this contract boundary.
$defs.retrieval.queriesarrayYesDefines the queries value at this contract boundary.minItems: 1 · maxItems: 3
$defs.retrieval.statusenumYesDefines the status value at this contract boundary.enum: grounded, partial, empty
$defs.retrieval.strategystringYesDefines the strategy value at this contract boundary.const: "deterministic-category-v1"
$defs.scope.kindenumYesDefines the kind value at this contract boundary.enum: workspace, project, project-set
$defs.scope.projectsarrayYesDefines the projects value at this contract boundary.minItems: 1
$defs.scope.resolutionenumNoDefines the resolution value at this contract boundary.enum: selected, selection-required
$defs.scope.selectionSourceenumYesDefines the selectionsource value at this contract boundary.enum: workspace, single-project-workspace, invocation-project, explicit, interactive
artifactsobjectYesDefines the artifacts value at this contract boundary.additionalProperties: false
artifacts.agentHandoffstringYesDefines the agenthandoff value at this contract boundary.pattern: ^\.workspai/goals/[^/]+/agent-handoff\.json$
artifacts.goalPackstringYesDefines the goalpack value at this contract boundary.pattern: ^\.workspai/goals/[^/]+/goal-pack\.json$
artifacts.latestReportstringYesDefines the latestreport value at this contract boundary.const: ".workspai/reports/goal-pack-last-run.json"
baselineobjectYesDefines the baseline value at this contract boundary.additionalProperties: false
baseline.frameworksarrayYesDefines the frameworks value at this contract boundary.
baseline.graphobjectYesDefines the graph value at this contract boundary.additionalProperties: false
baseline.graph.entitiesintegerYesDefines the entities value at this contract boundary.minimum: 0
baseline.graph.proofCoveragePercentnumberYesDefines the proofcoveragepercent value at this contract boundary.minimum: 0 · maximum: 100
baseline.graph.proofsintegerYesDefines the proofs value at this contract boundary.minimum: 0
baseline.graph.relationshipsintegerYesDefines the relationships value at this contract boundary.minimum: 0
baseline.graph.unresolvedintegerYesDefines the unresolved value at this contract boundary.minimum: 0
baseline.projectCountintegerYesDefines the projectcount value at this contract boundary.minimum: 0
baseline.runtimesarrayYesDefines the runtimes value at this contract boundary.
commandsobjectYesDefines the commands value at this contract boundary.additionalProperties: false
commands.inspectGraphstringYesDefines the inspectgraph value at this contract boundary.pattern: ^workspai workspace graph search
commands.planVerifiedGoalstringNoDefines the planverifiedgoal value at this contract boundary.pattern: ^workspai workspace goal plan
commands.proposeRepairstringYesDefines the proposerepair value at this contract boundary.const: "workspai workspace repair propose --file <proposal.json> --json"
commands.refreshEvidencestringYesDefines the refreshevidence value at this contract boundary.const: "workspai workspace intelligence run --for-agent generic --strict --json"
decisionobjectNoDefines the decision value at this contract boundary.additionalProperties: false
decision.questionstringYesDefines the question value at this contract boundary.minLength: 1
decision.reasonstringYesDefines the reason value at this contract boundary.minLength: 1
decision.requiredbooleanYesDefines the required value at this contract boundary.const: true
fingerprintreferenceYesDefines the fingerprint value at this contract boundary.ref: #/$defs/hash
generatedAtstringYesDefines the generatedat value at this contract boundary.format: date-time
idstringYesDefines the id value at this contract boundary.pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{7,95}$
intentobjectYesDefines the intent value at this contract boundary.additionalProperties: false
intent.ambiguitiesarrayYesDefines the ambiguities value at this contract boundary.
intent.categoryenumYesDefines the category value at this contract boundary.enum: release-readiness, dependency-security, test-coverage, defect-repair, feature-change, refactor, performance, documentation, system-understanding
intent.confidenceenumYesDefines the confidence value at this contract boundary.enum: high, medium, low
intent.normalizedstringYesDefines the normalized value at this contract boundary.minLength: 1 · maxLength: 2000
intent.originalstringYesDefines the original value at this contract boundary.minLength: 1 · maxLength: 2000
intent.requestedTargetobjectNoDefines the requestedtarget value at this contract boundary.additionalProperties: false
intent.requestedTarget.metricstringYesDefines the metric value at this contract boundary.const: "test-coverage-percent"
intent.requestedTarget.operatorstringYesDefines the operator value at this contract boundary.const: "at-least"
intent.requestedTarget.runtimeenumNoDefines the runtime value at this contract boundary.enum: node, bun, deno, python, go, java, dotnet, rust, php, ruby, elixir, clojure, scala, kotlin, c, cpp
intent.requestedTarget.valuenumberYesDefines the value value at this contract boundary.minimum: 0 · maximum: 100
intent.statementstringYesDefines the statement value at this contract boundary.minLength: 1 · maxLength: 2000
orchestrationarrayYesDefines the orchestration value at this contract boundary.minItems: 6 · maxItems: 6
orchestration[].idenumYesDefines the id value at this contract boundary.enum: understand, impact, propose, approve, execute, verify
orchestration[].ownerenumYesDefines the owner value at this contract boundary.enum: workspai-cli, agent, human
orchestration[].statusenumYesDefines the status value at this contract boundary.enum: complete, pending, blocked
orchestration[].summarystringYesDefines the summary value at this contract boundary.minLength: 1
policyobjectYesDefines the policy value at this contract boundary.additionalProperties: false
policy.allowBreakingChangesbooleanYesDefines the allowbreakingchanges value at this contract boundary.const: false
policy.allowForcebooleanYesDefines the allowforce value at this contract boundary.const: false
policy.approvalstringYesDefines the approval value at this contract boundary.const: "required-before-mutation"
policy.maxAttemptsintegerYesDefines the maxattempts value at this contract boundary.minimum: 1 · maximum: 25
policy.mutationModestringYesDefines the mutationmode value at this contract boundary.const: "proposal-only"
policy.networkAccessstringYesDefines the networkaccess value at this contract boundary.const: "not-granted"
policy.rollbackOwnerstringYesDefines the rollbackowner value at this contract boundary.const: "workspai-cli"
policy.scopeExpansionstringYesDefines the scopeexpansion value at this contract boundary.const: "requires-decision"
policy.verificationOwnerstringYesDefines the verificationowner value at this contract boundary.const: "workspai-cli"
preflightobjectYesDefines the preflight value at this contract boundary.additionalProperties: false
preflight.measurementobjectYesDefines the measurement value at this contract boundary.additionalProperties: false
preflight.measurement.existingEvidencearrayYesDefines the existingevidence value at this contract boundary.
preflight.measurement.existingEvidence[].pathstringYesDefines the path value at this contract boundary.minLength: 1
preflight.measurement.existingEvidence[].projectstringYesDefines the project value at this contract boundary.minLength: 1
preflight.measurement.existingEvidence[].sha256referenceYesDefines the sha256 value at this contract boundary.ref: #/$defs/hash
preflight.measurement.prerequisitesarrayYesDefines the prerequisites value at this contract boundary.
preflight.measurement.runnerstring | nullYesDefines the runner value at this contract boundary.
preflight.measurement.runtimestring | nullYesDefines the runtime value at this contract boundary.
preflight.measurement.runtimeChoicesarrayNoDefines the runtimechoices value at this contract boundary.
preflight.measurement.statusenumYesDefines the status value at this contract boundary.enum: available, requires-setup, unsupported, not-applicable
preflight.retrievalreferenceYesDefines the retrieval value at this contract boundary.ref: #/$defs/retrieval
preflight.workspaceIntelligenceobjectYesDefines the workspaceintelligence value at this contract boundary.additionalProperties: false
preflight.workspaceIntelligence.artifactstringYesDefines the artifact value at this contract boundary.const: ".workspai/reports/workspace-intelligence-run-last-run.json"
preflight.workspaceIntelligence.blockedStagesarrayYesDefines the blockedstages value at this contract boundary.
preflight.workspaceIntelligence.statusenumYesDefines the status value at this contract boundary.enum: passed, blocked, unknown
schemaVersionstringYesDefines the schemaversion value at this contract boundary.const: "workspai.goal-pack.v1"
scopereferenceYesDefines the scope value at this contract boundary.ref: #/$defs/scope
sourceBindingobjectYesDefines the sourcebinding value at this contract boundary.additionalProperties: false
sourceBinding.graphreferenceYesDefines the graph value at this contract boundary.ref: #/$defs/graphBinding
sourceBinding.modelreferenceYesDefines the model value at this contract boundary.ref: #/$defs/modelBinding
stateenumYesDefines the state value at this contract boundary.enum: ready-to-plan, needs-confirmation, needs-evidence, blocked
successCriteriaarrayYesDefines the successcriteria value at this contract boundary.minItems: 1
successCriteria[].expectedstringYesDefines the expected value at this contract boundary.minLength: 1
successCriteria[].idstringYesDefines the id value at this contract boundary.minLength: 1
successCriteria[].kindenumYesDefines the kind value at this contract boundary.enum: workspace-verify, release-readiness, dependency-security, test-coverage
successCriteria[].machineVerifiablebooleanYesDefines the machineverifiable value at this contract boundary.
successCriteria[].producerCommandstringYesDefines the producercommand value at this contract boundary.minLength: 1
workspaceobjectYesDefines the workspace value at this contract boundary.additionalProperties: false
workspace.namestringYesDefines the name 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/goal-pack.v1.json",
  "title": "Workspai Goal Pack",
  "type": "object",
  "required": [
    "schemaVersion",
    "id",
    "fingerprint",
    "generatedAt",
    "state",
    "intent",
    "workspace",
    "scope",
    "sourceBinding",
    "baseline",
    "preflight",
    "successCriteria",
    "policy",
    "orchestration",
    "artifacts",
    "commands"
  ],
  "properties": {
    "schemaVersion": {
      "const": "workspai.goal-pack.v1"
    },
    "id": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{7,95}$"
    },
    "fingerprint": {
      "$ref": "#/$defs/hash"
    },
    "generatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "state": {
      "enum": [
        "ready-to-plan",
        "needs-confirmation",
        "needs-evidence",
        "blocked"
      ]
    },
    "intent": {
      "type": "object",
      "required": [
        "original",
        "normalized",
        "statement",
        "category",
        "confidence",
        "ambiguities"
      ],
      "properties": {
        "original": {
          "type": "string",
          "minLength": 1,
          "maxLength": 2000
        },
        "normalized": {
          "type": "string",
          "minLength": 1,
          "maxLength": 2000
        },
        "statement": {
          "type": "string",
          "minLength": 1,
          "maxLength": 2000
        },
        "category": {
          "enum": [
            "release-readiness",
            "dependency-security",
            "test-coverage",
            "defect-repair",
            "feature-change",
            "refactor",
            "performance",
            "documentation",
            "system-understanding"
          ]
        },
        "confidence": {
          "enum": [
            "high",
            "medium",
            "low"
          ]
        },
        "ambiguities": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          },
          "uniqueItems": true
        },
        "requestedTarget": {
          "type": "object",
          "required": [
            "metric",
            "operator",
            "value"
          ],
          "properties": {
            "metric": {
              "const": "test-coverage-percent"
            },
            "operator": {
              "const": "at-least"
            },
            "value": {
              "type": "number",
              "minimum": 0,
              "maximum": 100
            },
            "runtime": {
              "enum": [
                "node",
                "bun",
                "deno",
                "python",
                "go",
                "java",
                "dotnet",
                "rust",
                "php",
                "ruby",
                "elixir",
                "clojure",
                "scala",
                "kotlin",
                "c",
                "cpp"
              ]
            }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    },
    "workspace": {
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "scope": {
      "$ref": "#/$defs/scope"
    },
    "sourceBinding": {
      "type": "object",
      "required": [
        "model",
        "graph"
      ],
      "properties": {
        "model": {
          "$ref": "#/$defs/modelBinding"
        },
        "graph": {
          "$ref": "#/$defs/graphBinding"
        }
      },
      "additionalProperties": false
    },
    "baseline": {
      "type": "object",
      "required": [
        "projectCount",
        "runtimes",
        "frameworks",
        "graph"
      ],
      "properties": {
        "projectCount": {
          "type": "integer",
          "minimum": 0
        },
        "runtimes": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "uniqueItems": true
        },
        "frameworks": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "uniqueItems": true
        },
        "graph": {
          "type": "object",
          "required": [
            "entities",
            "relationships",
            "proofs",
            "unresolved",
            "proofCoveragePercent"
          ],
          "properties": {
            "entities": {
              "type": "integer",
              "minimum": 0
            },
            "relationships": {
              "type": "integer",
              "minimum": 0
            },
            "proofs": {
              "type": "integer",
              "minimum": 0
            },
            "unresolved": {
              "type": "integer",
              "minimum": 0
            },
            "proofCoveragePercent": {
              "type": "number",
              "minimum": 0,
              "maximum": 100
            }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    },
    "preflight": {
      "type": "object",
      "required": [
        "workspaceIntelligence",
        "measurement",
        "retrieval"
      ],
      "properties": {
        "workspaceIntelligence": {
          "type": "object",
          "required": [
            "status",
            "artifact",
            "blockedStages"
          ],
          "properties": {
            "status": {
              "enum": [
                "passed",
                "blocked",
                "unknown"
              ]
            },
            "artifact": {
              "const": ".workspai/reports/workspace-intelligence-run-last-run.json"
            },
            "blockedStages": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1
              },
              "uniqueItems": true
            }
          },
          "additionalProperties": false
        },
        "measurement": {
          "type": "object",
          "required": [
            "status",
            "runtime",
            "runner",
            "existingEvidence",
            "prerequisites"
          ],
          "properties": {
            "status": {
              "enum": [
                "available",
                "requires-setup",
                "unsupported",
                "not-applicable"
              ]
            },
            "runtime": {
              "type": [
                "string",
                "null"
              ]
            },
            "runtimeChoices": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1
              },
              "uniqueItems": true
            },
            "runner": {
              "type": [
                "string",
                "null"
              ]
            },
            "existingEvidence": {
              "type": "array",
              "items": {
                "type": "object",
                "required": [
                  "project",
                  "path",
                  "sha256"
                ],
                "properties": {
                  "project": {
                    "type": "string",
                    "minLength": 1
                  },
                  "path": {
                    "type": "string",
                    "minLength": 1
                  },
                  "sha256": {
                    "$ref": "#/$defs/hash"
                  }
                },
                "additionalProperties": false
              }
            },
            "prerequisites": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1
              },
              "uniqueItems": true
            }
          },
          "additionalProperties": false
        },
        "retrieval": {
          "$ref": "#/$defs/retrieval"
        }
      },
      "additionalProperties": false
    },
    "successCriteria": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": [
          "id",
          "kind",
          "expected",
          "producerCommand",
          "machineVerifiable"
        ],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "kind": {
            "enum": [
              "workspace-verify",
              "release-readiness",
              "dependency-security",
              "test-coverage"
            ]
          },
          "expected": {
            "type": "string",
            "minLength": 1
          },
          "producerCommand": {
            "type": "string",
            "minLength": 1
          },
          "machineVerifiable": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      }
    },
    "policy": {
      "type": "object",
      "required": [
        "mutationMode",
        "approval",
        "verificationOwner",
        "rollbackOwner",
        "maxAttempts",
        "allowBreakingChanges",
        "allowForce",
        "networkAccess",
        "scopeExpansion"
      ],
      "properties": {
        "mutationMode": {
          "const": "proposal-only"
        },
        "approval": {
          "const": "required-before-mutation"
        },
        "verificationOwner": {
          "const": "workspai-cli"
        },
        "rollbackOwner": {
          "const": "workspai-cli"
        },
        "maxAttempts": {
          "type": "integer",
          "minimum": 1,
          "maximum": 25
        },
        "allowBreakingChanges": {
          "const": false
        },
        "allowForce": {
          "const": false
        },
        "networkAccess": {
          "const": "not-granted"
        },
        "scopeExpansion": {
          "const": "requires-decision"
        }
      },
      "additionalProperties": false
    },
    "orchestration": {
      "type": "array",
      "minItems": 6,
      "maxItems": 6,
      "items": {
        "type": "object",
        "required": [
          "id",
          "owner",
          "status",
          "summary"
        ],
        "properties": {
          "id": {
            "enum": [
              "understand",
              "impact",
              "propose",
              "approve",
              "execute",
              "verify"
            ]
          },
          "owner": {
            "enum": [
              "workspai-cli",
              "agent",
              "human"
            ]
          },
          "status": {
            "enum": [
              "complete",
              "pending",
              "blocked"
            ]
          },
          "summary": {
            "type": "string",
            "minLength": 1
          }
        },
        "additionalProperties": false
      }
    },
    "decision": {
      "type": "object",
      "required": [
        "required",
        "reason",
        "question"
      ],
      "properties": {
        "required": {
          "const": true
        },
        "reason": {
          "type": "string",
          "minLength": 1
        },
        "question": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "artifacts": {
      "type": "object",
      "required": [
        "goalPack",
        "agentHandoff",
        "latestReport"
      ],
      "properties": {
        "goalPack": {
          "type": "string",
          "pattern": "^\\.workspai/goals/[^/]+/goal-pack\\.json$"
        },
        "agentHandoff": {
          "type": "string",
          "pattern": "^\\.workspai/goals/[^/]+/agent-handoff\\.json$"
        },
        "latestReport": {
          "const": ".workspai/reports/goal-pack-last-run.json"
        }
      },
      "additionalProperties": false
    },
    "commands": {
      "type": "object",
      "required": [
        "refreshEvidence",
        "inspectGraph",
        "proposeRepair"
      ],
      "properties": {
        "refreshEvidence": {
          "const": "workspai workspace intelligence run --for-agent generic --strict --json"
        },
        "inspectGraph": {
          "type": "string",
          "pattern": "^workspai workspace graph search "
        },
        "planVerifiedGoal": {
          "type": "string",
          "pattern": "^workspai workspace goal plan "
        },
        "proposeRepair": {
          "const": "workspai workspace repair propose --file <proposal.json> --json"
        }
      },
      "additionalProperties": false
    }
  },
  "$defs": {
    "hash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "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
    },
    "modelBinding": {
      "type": "object",
      "required": [
        "artifact",
        "schemaVersion",
        "hashAlgorithm",
        "hashSemantics",
        "hash",
        "generatedAt"
      ],
      "properties": {
        "artifact": {
          "const": ".workspai/reports/workspace-model.json"
        },
        "schemaVersion": {
          "const": "workspace-model.v1"
        },
        "hashAlgorithm": {
          "const": "sha256"
        },
        "hashSemantics": {
          "const": "workspace-model-structural-v1"
        },
        "hash": {
          "$ref": "#/$defs/hash"
        },
        "generatedAt": {
          "type": "string",
          "format": "date-time"
        }
      },
      "additionalProperties": false
    },
    "graphBinding": {
      "type": "object",
      "required": [
        "artifact",
        "schemaVersion",
        "hashAlgorithm",
        "hashSemantics",
        "hash",
        "generatedAt",
        "modelHash"
      ],
      "properties": {
        "artifact": {
          "const": ".workspai/reports/workspace-knowledge-graph.json"
        },
        "schemaVersion": {
          "const": "workspace-knowledge-graph.v1"
        },
        "hashAlgorithm": {
          "const": "sha256"
        },
        "hashSemantics": {
          "const": "canonical-json-v1"
        },
        "hash": {
          "$ref": "#/$defs/hash"
        },
        "generatedAt": {
          "type": "string",
          "format": "date-time"
        },
        "modelHash": {
          "$ref": "#/$defs/hash"
        },
        "inputHash": {
          "$ref": "#/$defs/hash"
        }
      },
      "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",
                "minLength": 1
              },
              "kind": {
                "type": "string",
                "minLength": 1
              },
              "label": {
                "type": "string",
                "minLength": 1
              },
              "proofIds": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                },
                "uniqueItems": true
              }
            },
            "additionalProperties": false
          }
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}