# JSON output

> Field-by-field contracts of decision --json and history --json, generated from the application's Zod schemas.

Status: Available

These tables cover the recorded `decision` and shared `history` outputs, generated from the application's Zod schemas. Live inspection commands have distinct contracts documented in the [framing](https://github.com/francoisnoel62/Boardroom/blob/main/docs/framing-a-question.md), [analyses](https://github.com/francoisnoel62/Boardroom/blob/main/docs/independent-analyses.md), [revisions](https://github.com/francoisnoel62/Boardroom/blob/main/docs/sourced-revisions.md) and [decisions](https://github.com/francoisnoel62/Boardroom/blob/main/docs/live-decisions.md) guides.

## `decision --json`

Produced by `boardroom decision --json`.

| Field | Type | Required |
| --- | --- | --- |
| `schemaVersion` | `1` | Yes |
| `mode` | `"recorded"` | Yes |
| `projectId` | `string` | Yes |
| `meetingId` | `string` | Yes |
| `context` | `object` | Yes |
| `context.schemaVersion` | `1` | Yes |
| `context.version` | `integer` | Yes |
| `context.sources` | `array` | Yes |
| `context.sources[].evidenceId` | `string` | Yes |
| `context.sources[].revision` | `integer` | Yes |
| `proposals` | `array` | Yes |
| `proposals[].schemaVersion` | `1` | Yes |
| `proposals[].version` | `integer` | Yes |
| `proposals[].contextVersion` | `integer` | Yes |
| `proposals[].messageId` | `string` | Yes |
| `proposals[].text` | `string` | Yes |
| `views` | `array` | Yes |
| `views[].schemaVersion` | `1` | Yes |
| `views[].role` | `"Product Owner" | "Lead Developer" | "Marketing Manager"` | Yes |
| `views[].model` | `string` | Yes |
| `views[].contextVersion` | `integer` | Yes |
| `views[].proposalVersion` | `integer` | Yes |
| `views[].stance` | `"APPROVED" | "REJECTED" | "INSUFFICIENT_EVIDENCE"` | Yes |
| `views[].statement` | `string` | Yes |
| `humanDecision` | `"pending"` | Yes |

Every proposal and adviser view must reference the same context version, and every view must reference an available proposal version.

## `history --json`

Produced by `boardroom history --json`.

| Field | Type | Required |
| --- | --- | --- |
| `events` | `array` | Yes |
| `events[].schemaVersion` | `1` | Yes |
| `events[].sequence` | `integer` | Yes |
| `events[].projectId` | `string` | Yes |
| `events[].occurredAt` | `string (date-time)` | Yes |
| `events[].meetingId` | `string (uuid)` | Yes |
| `events[].version` | `integer` | Yes |
| `events[].adviserId` | `string` | No |
| `events[].schemaVersion` | `1` | Yes |
| `events[].sequence` | `integer` | Yes |
| `events[].projectId` | `string` | Yes |
| `events[].occurredAt` | `string (date-time)` | Yes |
| `events[].meetingId` | `string (uuid)` | Yes |
| `events[].version` | `integer` | Yes |
| `events[].adviserId` | `string` | No |
| `events[].schemaVersion` | `1` | Yes |
| `events[].sequence` | `integer` | Yes |
| `events[].projectId` | `string` | Yes |
| `events[].occurredAt` | `string (date-time)` | Yes |
| `events[].meetingId` | `string (uuid)` | Yes |
| `events[].version` | `integer` | Yes |
| `events[].adviserId` | `string` | No |
| `events[].schemaVersion` | `1` | Yes |
| `events[].sequence` | `integer` | Yes |
| `events[].projectId` | `string` | Yes |
| `events[].occurredAt` | `string (date-time)` | Yes |
| `events[].meetingId` | `string (uuid)` | Yes |
| `events[].schemaVersion` | `1` | Yes |
| `events[].sequence` | `integer` | Yes |
| `events[].projectId` | `string` | Yes |
| `events[].occurredAt` | `string (date-time)` | Yes |
| `events[].meetingId` | `string (uuid)` | Yes |
| `events[].callId` | `string (uuid)` | Yes |
| `events[].schemaVersion` | `1` | Yes |
| `events[].sequence` | `integer` | Yes |
| `events[].projectId` | `string` | Yes |
| `events[].occurredAt` | `string (date-time)` | Yes |
| `events[].meetingId` | `string (uuid)` | Yes |
| `events[].version` | `integer` | No |
| `events[type="live.meeting-prepared"].schemaVersion` | `1` | Yes |
| `events[type="live.meeting-prepared"].sequence` | `integer` | Yes |
| `events[type="live.meeting-prepared"].projectId` | `string` | Yes |
| `events[type="live.meeting-prepared"].occurredAt` | `string (date-time)` | Yes |
| `events[type="live.meeting-prepared"].meetingId` | `string (uuid)` | Yes |
| `events[type="live.meeting-prepared"].contextVersion` | `1` | Yes |
| `events[type="recorded.message"].schemaVersion` | `1` | Yes |
| `events[type="recorded.message"].sequence` | `integer` | Yes |
| `events[type="recorded.message"].projectId` | `string` | Yes |
| `events[type="recorded.message"].occurredAt` | `string (date-time)` | Yes |
| `events[type="recorded.message"].meetingId` | `string` | Yes |
| `events[type="recorded.message"].messageId` | `string` | Yes |
| `events[type="recorded.message"].position` | `integer` | Yes |
| `events[type="export.prepared"].schemaVersion` | `1` | Yes |
| `events[type="export.prepared"].sequence` | `integer` | Yes |
| `events[type="export.prepared"].projectId` | `string` | Yes |
| `events[type="export.prepared"].occurredAt` | `string (date-time)` | Yes |
| `events[type="export.prepared"].operationId` | `string` | Yes |
| `events[type="export.started"].schemaVersion` | `1` | Yes |
| `events[type="export.started"].sequence` | `integer` | Yes |
| `events[type="export.started"].projectId` | `string` | Yes |
| `events[type="export.started"].occurredAt` | `string (date-time)` | Yes |
| `events[type="export.started"].operationId` | `string` | Yes |
| `events[type="export.completed"].schemaVersion` | `1` | Yes |
| `events[type="export.completed"].sequence` | `integer` | Yes |
| `events[type="export.completed"].projectId` | `string` | Yes |
| `events[type="export.completed"].occurredAt` | `string (date-time)` | Yes |
| `events[type="export.completed"].operationId` | `string` | Yes |
| `events[type="export.failed"].schemaVersion` | `1` | Yes |
| `events[type="export.failed"].sequence` | `integer` | Yes |
| `events[type="export.failed"].projectId` | `string` | Yes |
| `events[type="export.failed"].occurredAt` | `string (date-time)` | Yes |
| `events[type="export.failed"].operationId` | `string` | Yes |
| `operations` | `array` | Yes |
| `operations[].schemaVersion` | `1` | Yes |
| `operations[].id` | `string (uuid)` | Yes |
| `operations[].projectId` | `string` | Yes |
| `operations[].meetingId` | `string` | Yes |
| `operations[].type` | `"recorded.export" | "live.export"` | Yes |
| `operations[].status` | `"unconfirmed" | "completed" | "failed"` | Yes |
| `operations[].createdAt` | `string (date-time)` | Yes |
| `operations[].startedAt` | `string (date-time)` | No |
| `operations[].finishedAt` | `string (date-time)` | No |
| `operations[].directory` | `string` | Yes |
| `operations[].plan` | `string` | Yes |
| `operations[].memo` | `string` | Yes |
| `operations[].json` | `string` | No |
| `operations[].errorCode` | `string` | No |
| `operations[].receipts` | `array` | Yes |
| `operations[].receipts[].path` | `string` | Yes |
| `operations[].receipts[].sha256` | `string` | Yes |

Rows marked `events[type="…"]` apply to events of that type.
