Object types and gates
An object type is a kind of record a workspace keeps: a deal, a request, a data room. Records are created by agents, connectors and the API (POST /api/v1/objects upserts by external key).
An object type
# objects/deal/type.yaml
slug: deal
label: Deal
code: DL # 2–5 uppercase letters; record ids read DL-123
icon: handshake
schema: # JSON Schema for the record's fields
type: object
properties:
stage: { type: string }
amount: { type: number }
nextStepAt: { type: string, format: date }
sourceRelevance: { hubspot: 1.0, gmail: 0.6 }
classificationPromptFile: ./classify.md
Other keys: description, classificationPrompt, fewShotExamples, rollups, gates. Agents read and write records only for the types in their objectTypes.
Hand-off gates
A gate checks work when it crosses a line — a field changing to a value (becomes) or any write of a field (written: true). Deterministic requirements run first; an optional judge reads the work against the seat's rubric.
gates:
- name: proposal-ready
when: { field: stage, becomes: [proposal] }
producedBy: northwind-lead # where a failure is returned
require:
- field: amount
present: true
missingMessage: a proposal needs an amount
- field: contacts
minItems: 1
judge:
rubric: proposal-rubric # a skill slug
escalateBelow: 0.6 # default
sampleRate: 1 # default: every crossing
Requirement checks: present, minItems, oneOf, maxAgeDays, allItems, anyOf, notMatches, readThisTurn, with if / unless conditions and message, missingMessage, valueMessages for what the seat is told. A failure goes back to producedBy with the reason. When the judge's confidence in its own verdict falls below escalateBelow, it goes to a person as a Gate ask. Workspace-wide judge defaults go in defaults.gates in workspace.yaml.