# Blackboard Governance API Contract v1

Task: IF-3855  
Date: 2026-06-27  
Status: implementation contract, not deployed runtime proof

## Purpose

This contract turns the Blackboard Governance SaaS roadmap into a strict implementation target. Blackboard is presented as one product ensemble; internal modules remain implementation details.

Authoritative source files:

- `/root/docs/data/if-blackboard-governance-event-envelope.schema.v1.json`
- `/root/docs/data/if-blackboard-governance-proof-packet.schema.v1.json`
- `/root/docs/5002-if-rook-harness-structurizr-c4-workspace-2026-06-27.dsl`
- `/root/docs/5003-if-blackboard-rook-governance-saas-autoplan-roadmap-2026-06-27.md`
- `/root/docs/5007-if-blackboard-governance-saas-rationalized-architecture-2026-06-27.md`

## Public Runtime Surfaces

| Surface | Status | Contract |
|---|---|---|
| HTTPS API | Product | `POST /v1/events`, `GET /v1/tasks/{task_id}/timeline`, `POST /v1/proof-packets`, `GET /v1/search` |
| Managed MCP Gateway | Product | Scoped agent tools that call the same Blackboard API contracts |
| WebSocket Live Gateway | Product, live-only | Subscriptions, progress, wake/contact, and shared UI events that reference durable event ids |
| SSH, reverse SSH, stdio bridge, maintenance bridge | Operator/break-glass only | Never required for external customer onboarding or customer runtime |

## Canonical Event Contract

Every durable customer-facing action must become an append-only Blackboard Governance Event:

- tenant, workspace, project, task, session, principal, and agent ids are required;
- event type is explicit and versioned;
- source harness and transport class are explicit;
- idempotency key is required;
- policy hash and redaction policy id are required;
- evidence refs carry hash or etag;
- event hash and previous hash bind the event into append-only truth;
- integrity metadata requires hash-bound or signed state according to policy.

Schema:

`/root/docs/data/if-blackboard-governance-event-envelope.schema.v1.json`

## Proof Packet V1 Contract

A Proof Packet v1 is the commercial export artifact. It is not a log dump and not a semantic correctness certificate.

Required packet properties:

- tenant, workspace, project, task, and session scope;
- event id range and hash-chain root;
- evidence refs with confidence and redaction state;
- Claim Boundary Engine decision;
- redaction manifest;
- access-log ids;
- explicit non-claims;
- packet integrity metadata;
- receipt id when policy requires trace binding.

Schema:

`/root/docs/data/if-blackboard-governance-proof-packet.schema.v1.json`

## Claim Boundary Rules

The Claim Boundary Engine is mandatory before Proof Desk buyer-visible claims and before Proof Packet export.

Allowed statement classes:

- `verified`
- `claimed`
- `inferred`
- `stale`
- `missing`
- `blocked`
- `redacted`
- `not_claimed`

Forbidden automatic claim:

- semantic correctness of the work

Semantic correctness requires a human review event or a domain verifier event before Blackboard may state it.

## No-Customer-SSH Rule

External customer examples must use HTTPS API, managed MCP, SDK, or WebSocket subscriptions. SSH-family transports, local stdio bridges, maintenance bridges, and host-specific copy paths are operator-only or break-glass and must not appear as customer onboarding requirements.

## Verification Commands

```bash
python3 -m json.tool /root/docs/data/if-blackboard-governance-event-envelope.schema.v1.json >/dev/null
python3 -m json.tool /root/docs/data/if-blackboard-governance-proof-packet.schema.v1.json >/dev/null
structurizr validate -workspace /root/docs/5002-if-rook-harness-structurizr-c4-workspace-2026-06-27.dsl
```

Representative payload validation should use `jsonschema.Draft202012Validator` and must include:

- one signed or hash-bound event;
- one Proof Packet v1 with Claim Boundary decision;
- one negative case where a signed event is missing its signature;
- one negative case where a Proof Packet omits non-claims.
