All contracts

Workspace Intelligence / JSON Schema

Workspai Verified Goal

A durable, deterministic success contract for an agent-executed engineering goal.

Schema version
workspai.verified-goal.v1
Contract path
contracts/workspace-intelligence/verified-goal.v1.json
Publication
json-schema
Defined fields
38
Artifact bindings
0

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.

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 pathTypeRequiredMeaningConstraints
$defs.measurement.evidencePathsarrayYesDefines the evidencepaths value at this contract boundary.
$defs.measurement.measuredAtstringYesDefines the measuredat value at this contract boundary.format: date-time
$defs.measurement.messagestringYesDefines the message value at this contract boundary.minLength: 1
$defs.measurement.statusenumYesDefines the status value at this contract boundary.enum: satisfied, unsatisfied, unavailable
$defs.measurement.targetnumber | nullYesDefines the target value at this contract boundary.
$defs.measurement.unitenumYesDefines the unit value at this contract boundary.enum: percent, blocking-vulnerabilities, gates, unknown
$defs.measurement.valuenumber | nullYesDefines the value value at this contract boundary.
artifactPathsobjectYesDefines the artifactpaths value at this contract boundary.additionalProperties: false
artifactPaths.goalstringYesDefines the goal value at this contract boundary.minLength: 1
artifactPaths.latestReportstringYesDefines the latestreport value at this contract boundary.minLength: 1
artifactPaths.statusstringYesDefines the status value at this contract boundary.minLength: 1
baselinereferenceYesDefines the baseline value at this contract boundary.ref: #/$defs/measurement
constraintsobjectYesDefines the constraints value at this contract boundary.additionalProperties: false
constraints.allowBreakingChangesbooleanYesDefines the allowbreakingchanges value at this contract boundary.
constraints.allowForcebooleanYesDefines the allowforce value at this contract boundary.
constraints.requireBuildbooleanYesDefines the requirebuild value at this contract boundary.
constraints.requireTestsbooleanYesDefines the requiretests value at this contract boundary.
createdAtstringYesDefines the createdat value at this contract boundary.format: date-time
criteriaanyYesDefines the criteria value at this contract boundary.
dependencySafetyBaselineobjectNoDefines the dependencysafetybaseline value at this contract boundary.additionalProperties: false
dependencySafetyBaseline.manifestsarrayYesDefines the manifests value at this contract boundary.
dependencySafetyBaseline.manifests[].dependenciesobjectNoDefines the dependencies value at this contract boundary.
dependencySafetyBaseline.manifests[].ecosystemstringYesDefines the ecosystem value at this contract boundary.minLength: 1
dependencySafetyBaseline.manifests[].pathstringYesDefines the path value at this contract boundary.minLength: 1
dependencySafetyBaseline.manifests[].sha256stringYesDefines the sha256 value at this contract boundary.pattern: ^[a-f0-9]{64}$
fingerprintstringYesDefines the fingerprint value at this contract boundary.pattern: ^[a-f0-9]{64}$
idstringYesDefines the id value at this contract boundary.pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{7,95}$
kindenumYesDefines the kind value at this contract boundary.enum: release-readiness, dependency-security, test-coverage
schemaVersionstringYesDefines the schemaversion value at this contract boundary.const: "workspai.verified-goal.v1"
scopeobjectYesDefines the scope value at this contract boundary.additionalProperties: false
scope.kindenumYesDefines the kind value at this contract boundary.enum: workspace, project
scope.projectNamestringNoDefines the projectname value at this contract boundary.minLength: 1
scope.projectPathstringNoDefines the projectpath value at this contract boundary.minLength: 1
summarystringYesDefines the summary value at this contract boundary.minLength: 1
updatedAtstringYesDefines the updatedat value at this contract boundary.format: date-time
workspaceobjectYesDefines the workspace value at this contract boundary.additionalProperties: false
workspace.namestringYesDefines the name value at this contract boundary.minLength: 1
workspace.pathstringYesDefines the path 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/verified-goal.v1.json",
  "title": "Workspai Verified Goal",
  "description": "A durable, deterministic success contract for an agent-executed engineering goal.",
  "type": "object",
  "required": [
    "schemaVersion",
    "id",
    "fingerprint",
    "createdAt",
    "updatedAt",
    "workspace",
    "scope",
    "kind",
    "summary",
    "constraints",
    "criteria",
    "baseline",
    "artifactPaths"
  ],
  "properties": {
    "schemaVersion": {
      "const": "workspai.verified-goal.v1"
    },
    "id": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{7,95}$"
    },
    "fingerprint": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "workspace": {
      "type": "object",
      "required": [
        "name",
        "path"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "path": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "scope": {
      "type": "object",
      "required": [
        "kind"
      ],
      "properties": {
        "kind": {
          "enum": [
            "workspace",
            "project"
          ]
        },
        "projectName": {
          "type": "string",
          "minLength": 1
        },
        "projectPath": {
          "type": "string",
          "minLength": 1
        }
      },
      "allOf": [
        {
          "if": {
            "properties": {
              "kind": {
                "const": "project"
              }
            }
          },
          "then": {
            "properties": {
              "projectName": {
                "type": "string",
                "minLength": 1
              },
              "projectPath": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "projectName",
              "projectPath"
            ]
          }
        }
      ],
      "additionalProperties": false
    },
    "kind": {
      "enum": [
        "release-readiness",
        "dependency-security",
        "test-coverage"
      ]
    },
    "summary": {
      "type": "string",
      "minLength": 1
    },
    "constraints": {
      "type": "object",
      "required": [
        "allowBreakingChanges",
        "allowForce",
        "requireBuild",
        "requireTests"
      ],
      "properties": {
        "allowBreakingChanges": {
          "type": "boolean"
        },
        "allowForce": {
          "type": "boolean"
        },
        "requireBuild": {
          "type": "boolean"
        },
        "requireTests": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "criteria": {
      "oneOf": [
        {
          "type": "object",
          "required": [
            "kind",
            "readiness",
            "workspaceVerify"
          ],
          "properties": {
            "kind": {
              "const": "release-readiness"
            },
            "readiness": {
              "const": "pass"
            },
            "workspaceVerify": {
              "const": "ready"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "maximumBlockingVulnerabilities",
            "requireFreshAudit"
          ],
          "properties": {
            "kind": {
              "const": "dependency-security"
            },
            "maximumBlockingVulnerabilities": {
              "const": 0
            },
            "requireFreshAudit": {
              "const": true
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "kind",
            "metric",
            "minimumPercent"
          ],
          "properties": {
            "kind": {
              "const": "test-coverage"
            },
            "metric": {
              "const": "auto"
            },
            "minimumPercent": {
              "type": "number",
              "minimum": 0,
              "maximum": 100
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "baseline": {
      "$ref": "#/$defs/measurement"
    },
    "dependencySafetyBaseline": {
      "type": "object",
      "required": [
        "manifests"
      ],
      "properties": {
        "manifests": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "path",
              "ecosystem",
              "sha256"
            ],
            "properties": {
              "path": {
                "type": "string",
                "minLength": 1
              },
              "ecosystem": {
                "type": "string",
                "minLength": 1
              },
              "sha256": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "dependencies": {
                "type": "object",
                "additionalProperties": {
                  "type": "string",
                  "minLength": 1
                }
              }
            },
            "additionalProperties": false
          }
        }
      },
      "additionalProperties": false
    },
    "artifactPaths": {
      "type": "object",
      "required": [
        "goal",
        "status",
        "latestReport"
      ],
      "properties": {
        "goal": {
          "type": "string",
          "minLength": 1
        },
        "status": {
          "type": "string",
          "minLength": 1
        },
        "latestReport": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    }
  },
  "$defs": {
    "measurement": {
      "type": "object",
      "required": [
        "measuredAt",
        "value",
        "target",
        "unit",
        "status",
        "evidencePaths",
        "message"
      ],
      "properties": {
        "measuredAt": {
          "type": "string",
          "format": "date-time"
        },
        "value": {
          "type": [
            "number",
            "null"
          ]
        },
        "target": {
          "type": [
            "number",
            "null"
          ]
        },
        "unit": {
          "enum": [
            "percent",
            "blocking-vulnerabilities",
            "gates",
            "unknown"
          ]
        },
        "status": {
          "enum": [
            "satisfied",
            "unsatisfied",
            "unavailable"
          ]
        },
        "evidencePaths": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          },
          "uniqueItems": true
        },
        "message": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}