All contracts

Workspace Intelligence / JSON Schema

Workspai Goal Index

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

Schema version
workspai.goal-index.v1
Contract path
contracts/workspace-intelligence/goal-index.v1.json
Publication
json-schema
Defined fields
30
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/goals/index.jsonworkspai.goal-index.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
activeGoalIdstring | nullYesDefines the activegoalid value at this contract boundary.
generatedAtstringYesDefines the generatedat value at this contract boundary.format: date-time
goalsarrayYesDefines the goals value at this contract boundary.
goals[].agentHandoffstringYesDefines the agenthandoff value at this contract boundary.pattern: ^\.workspai/goals/[^/]+/agent-handoff\.json$
goals[].categoryenumYesDefines the category value at this contract boundary.enum: release-readiness, dependency-security, test-coverage, defect-repair, feature-change, refactor, performance, documentation, system-understanding
goals[].createdAtstringYesDefines the createdat value at this contract boundary.format: date-time
goals[].fingerprintstringYesDefines the fingerprint value at this contract boundary.pattern: ^[a-f0-9]{64}$
goals[].goalPackstringYesDefines the goalpack value at this contract boundary.pattern: ^\.workspai/goals/[^/]+/goal-pack\.json$
goals[].idstringYesDefines the id value at this contract boundary.pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{7,95}$
goals[].lifecycleenumYesDefines the lifecycle value at this contract boundary.enum: planned, active, cancelled, verification-ready, verified, failed
goals[].objectivestringYesDefines the objective value at this contract boundary.minLength: 1 · maxLength: 2000
goals[].repairTransactionIdstringNoDefines the repairtransactionid value at this contract boundary.minLength: 1
goals[].repairTransactionIdsarrayNoDefines the repairtransactionids value at this contract boundary.maxItems: 25
goals[].scopeobjectYesDefines the scope value at this contract boundary.additionalProperties: false
goals[].scope.kindenumYesDefines the kind value at this contract boundary.enum: workspace, project, project-set
goals[].scope.projectsarrayYesDefines the projects value at this contract boundary.minItems: 1
goals[].scope.resolutionenumNoDefines the resolution value at this contract boundary.enum: selected, selection-required
goals[].scope.selectionSourceenumYesDefines the selectionsource value at this contract boundary.enum: workspace, single-project-workspace, invocation-project, explicit, interactive
goals[].stateenumYesDefines the state value at this contract boundary.enum: ready-to-plan, needs-confirmation, needs-evidence, blocked
goals[].updatedAtstringYesDefines the updatedat value at this contract boundary.format: date-time
goals[].verificationReceiptobjectNoDefines the verificationreceipt value at this contract boundary.additionalProperties: false
goals[].verificationReceipt.attemptintegerYesDefines the attempt value at this contract boundary.minimum: 1
goals[].verificationReceipt.graphFingerprintstringYesDefines the graphfingerprint value at this contract boundary.pattern: ^[a-f0-9]{64}$
goals[].verificationReceipt.graphFingerprintSemanticsenumYesDefines the graphfingerprintsemantics value at this contract boundary.enum: workspace-knowledge-graph-inputs-v1, canonical-json-v1
goals[].verificationReceipt.modelHashstringYesDefines the modelhash value at this contract boundary.pattern: ^[a-f0-9]{64}$
goals[].verificationReceipt.recordedAtstringYesDefines the recordedat value at this contract boundary.format: date-time
goals[].verificationReceipt.statusHashstringYesDefines the statushash value at this contract boundary.pattern: ^[a-f0-9]{64}$
goals[].verificationReceipt.verifiedGoalIdstringYesDefines the verifiedgoalid value at this contract boundary.minLength: 1
goals[].verifiedGoalIdstringNoDefines the verifiedgoalid value at this contract boundary.minLength: 1
schemaVersionstringYesDefines the schemaversion value at this contract boundary.const: "workspai.goal-index.v1"

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-index.v1.json",
  "title": "Workspai Goal Index",
  "type": "object",
  "required": [
    "schemaVersion",
    "generatedAt",
    "activeGoalId",
    "goals"
  ],
  "properties": {
    "schemaVersion": {
      "const": "workspai.goal-index.v1"
    },
    "generatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "activeGoalId": {
      "type": [
        "string",
        "null"
      ]
    },
    "goals": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "fingerprint",
          "objective",
          "category",
          "state",
          "lifecycle",
          "scope",
          "createdAt",
          "updatedAt",
          "goalPack",
          "agentHandoff"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{7,95}$"
          },
          "fingerprint": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "objective": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "category": {
            "enum": [
              "release-readiness",
              "dependency-security",
              "test-coverage",
              "defect-repair",
              "feature-change",
              "refactor",
              "performance",
              "documentation",
              "system-understanding"
            ]
          },
          "state": {
            "enum": [
              "ready-to-plan",
              "needs-confirmation",
              "needs-evidence",
              "blocked"
            ]
          },
          "lifecycle": {
            "enum": [
              "planned",
              "active",
              "cancelled",
              "verification-ready",
              "verified",
              "failed"
            ]
          },
          "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
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "goalPack": {
            "type": "string",
            "pattern": "^\\.workspai/goals/[^/]+/goal-pack\\.json$"
          },
          "agentHandoff": {
            "type": "string",
            "pattern": "^\\.workspai/goals/[^/]+/agent-handoff\\.json$"
          },
          "verifiedGoalId": {
            "type": "string",
            "minLength": 1
          },
          "repairTransactionId": {
            "type": "string",
            "minLength": 1
          },
          "repairTransactionIds": {
            "type": "array",
            "maxItems": 25,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "verificationReceipt": {
            "type": "object",
            "required": [
              "verifiedGoalId",
              "attempt",
              "statusHash",
              "modelHash",
              "graphFingerprint",
              "graphFingerprintSemantics",
              "recordedAt"
            ],
            "properties": {
              "verifiedGoalId": {
                "type": "string",
                "minLength": 1
              },
              "attempt": {
                "type": "integer",
                "minimum": 1
              },
              "statusHash": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "modelHash": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "graphFingerprint": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "graphFingerprintSemantics": {
                "enum": [
                  "workspace-knowledge-graph-inputs-v1",
                  "canonical-json-v1"
                ]
              },
              "recordedAt": {
                "type": "string",
                "format": "date-time"
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      }
    }
  },
  "additionalProperties": false
}