# Blackboard Governance SaaS Autoplan Roadmap

Task: IF-3850, updated under IF-3854  
Date: 2026-06-27  
Owner: Martin lead, `/rook-410` coordination  
Artifact type: gstack autoplan-style roadmap and goal source  
Destination architecture: `/root/docs/5002-if-rook-harness-structurizr-c4-workspace-2026-06-27.dsl`  
Source context: `/root/docs/5001-if-rook-harness-external-technical-integration-monolithic-explainer-2026-06-27.md`  
Scale/search architecture: `/root/docs/5005-if-blackboard-scale-search-append-only-database-2026-06-27.md`  
SaaS auth contract: `/root/docs/5006-if-blackboard-rook-saas-auth-integration-2026-06-27.md`  
Rationalized product architecture: `/root/docs/5007-if-blackboard-governance-saas-rationalized-architecture-2026-06-27.md`  
Status: goal roadmap, not implementation proof

## Plan Summary

Use Blackboard as the main governance SaaS: a proof desk for reconstructing AI-assisted work from intent to evidence packet. The product is not the Rook harness stack. The product is a governance layer that turns AI-agent work into reconstructable, reviewable, exportable, access-controlled proof. Rook remains the hosted/reference harness; BYO adapters are the expansion path; Context, Switchboard, if.bus, if-cli, SSH wrappers, maintenance bridges, Martin laptop, and host names are implementation or operator details unless a buyer-facing proof workflow needs them.

Buyer-readable promise:

> For any AI-assisted work item, Blackboard can show what happened, who or what did it, what evidence exists, what was verified, what was claimed, what was inferred, what was redacted, who accessed it, and what packet was exported.

Blackboard is not becoming a WebSocket app. Blackboard core operations stay governed request/response: search, task writes, session binding, evidence attachment, proof export, access logs, and closeout. WebSocket becomes the live plane for subscriptions, wake/contact, progress, retained inbox notifications, and shared operator UI.

Auth should be conventional SaaS auth. The observed current foothold is `api.infrafabric.io` as a live Caddy-routed API domain, Google OAuth registration already includes `https://api.infrafabric.io/user/oauth2/Google/callback`, and an existing Google OAuth/oauth2-proxy pattern is active on the `infrafabric.io` portal path. The target is to consolidate those pieces into a managed auth broker: OIDC/SAML for humans, OAuth-style short-lived scoped credentials for API, CLI, service accounts, BYO harnesses, and OAuth-protected managed MCP tools. SSH and maintenance bridges remain operator-only.

Runtime hardening correction from the 2026-06-27 elite SaaS review: the previous roadmap was directionally strong on evidence and governance, but too aspirational at the substrate level. A hosted proof desk cannot come before a real database, auth broker, isolation proof, projection worker, SLOs, circuit breakers, and operational degradation contract. This roadmap therefore inserts R0.5 and R2.5 gates before R4.

Product clarity correction from the 2026-06-27 rationalized architecture review: the buyer-facing runtime is `event truth -> Proof Desk -> Proof Packet v1`, not "Rook Harness Stack with Blackboard, Context, Switchboard, Bus, Trace, MCP, SSH bridges, and an R0-R6 roadmap." The DSL must show the internal estate, but the roadmap goal and buyer narrative must collapse around Blackboard Governance SaaS.

## Autoplan Scope

UI scope: limited. The proof desk will need product UI later, but this pass updates architecture and roadmap, not screen design.

DX scope: yes. The product must be installable and integrable by external harness developers, platform engineers, and security reviewers through APIs, MCP tools, receipts, and proof packets.

Execution mode: selective expansion. The plan holds the core product shape and expands only where it removes future ambiguity: provenance, transport attestation, proof packet conformance, developer onboarding, and test/eval gates.

Dual-voice note: no live subagents or Codex subprocess reviewers were spawned for this pass because `mtl-01` was explicitly flagged as fragile. This roadmap uses the gstack CEO, engineering, design, and DX review methods in a single-process degraded mode.

## Premises

| Premise | Verdict | Why it matters |
|---|---|---|
| Blackboard is strongest as a governance layer around agent work. | Accept | The buyer pain is reconstruction, authorization, evidence, and claim boundaries, not another chat surface or another harness taxonomy. |
| Rook is the reference harness, not the whole market. | Accept | It gives a credible hosted pilot while keeping BYO harness as the roadmap. |
| Blackboard, not Rook, is the product center. | Accept | Buyers want proof, review, audit, access control, and export, not a new harness taxonomy. |
| `if.trace` is the trust spine. | Accept with boundary | It can receipt bytes, exports, provenance batches, and high-value control events. It does not prove semantic correctness. |
| WebSocket is the right live plane. | Accept with boundary | It fits presence, progress, wake/contact, and subscriptions. It should not become the canonical ledger/search/write path. |
| Cross-device provenance is the enterprise unlock. | Accept | Martin's WSL plus `mtl-01` plus `mtl-03` setup exposes the exact tenancy/session/machine gap buyers will ask about. |
| SaaS auth should use normal enterprise patterns. | Accept | Buyers expect SSO, service accounts, scoped tokens, revocation, audit, and no SSH dependency for external usage. |
| Claim boundaries must be product-visible. | Accept | The product must say what is verified, claimed, inferred, stale, missing, redacted, or not claimed. |

## 12-Month Goal

```
CURRENT
  Internal Blackboard/Rook ledgers, `/chat/ws` live lane, SSH-wrapped MCP,
  mtl-01/mtl-03/WSL operator estate, proof docs, if.trace receipts.

THIS ROADMAP
  Blackboard Event API, append-only event truth, Proof Desk v1,
  Proof Packet v1, Claim Boundary Engine, governed API/MCP front doors,
  live WebSocket subscriptions, trace-bound evidence where policy requires,
  real runtime baseline, isolation/load gates, hosted design-partner proof desk.

12-MONTH IDEAL
  Buyer-grade governance SaaS:
  - Blackboard Proof Desk with hosted Rook as a reference harness option
  - BYO harness adapter
  - tenant-scoped provenance and access logs
  - trace-bound proof packets
  - confidence classes, redaction manifests, non-claims, and claim boundaries
  - customer-owned evidence vault option
  - SSO/RBAC, OAuth-style service identities, KMS/Vault, SIEM/GRC exports
  - conformance tests and measurable DX
```

## Product Roadmap

## Rationalized Product Runtime

The buyer-readable runtime is:

```text
Customer / Agent / Reviewer
        |
        v
Gateway
        |
        v
Auth Broker + Tenant/RBAC
        |
        v
Blackboard Event API
        |
        v
Event Signature / Integrity Service
        |
        v
Append-Only Event Store
        |
        v
Projection Worker + Search Index
        |
        v
Proof Desk
        |
        v
Claim Boundary Engine
        |
        v
Proof Packet Service
        |
        v
Object Store + if.trace Receipt + Audit/Observability
```

Product surfaces:

| Surface | Purpose |
|---|---|
| HTTPS API | Write, read, search, and export proof events. |
| Managed MCP Gateway | Scoped agent tools for customers that use MCP. |
| WebSocket Live Gateway | Subscriptions, progress, wake/contact, and shared UI events only. |

Everything else is internal, operator-only, break-glass, or deferred.

## Blackboard Ensemble Features

Blackboard should be presented as one holistic governance ensemble. Do not force buyers to learn internal module names.

User-facing capabilities:

- Every important task event, update, checkpoint, evidence attachment, access decision, redaction, and proof packet export is cryptographically signed or hash-bound according to policy.
- Every task has a reconstructable timeline from instruction to closeout.
- Every agent, human, session, and service account action is tenant-scoped and access-logged.
- Every evidence reference carries provenance, timestamp, object identity, and hash or etag where available.
- Every proof claim is classified as verified, claimed, inferred, stale, blocked, missing, or not claimed.
- Every externally shared packet includes redaction state, non-claims, access-log references, and receipt binding where policy requires it.
- Every live progress event is only a notification; durable proof state comes from append-only event truth.
- Every search result is hydrated from authoritative records before review or export.
- Every customer-facing integration uses HTTPS API, managed MCP, SDK, or WebSocket subscriptions; no customer workflow depends on SSH.

Internal capability mapping, not buyer-facing module taxonomy:

| User-facing capability | Internal source of strength |
|---|---|
| Continuity across interrupted work | bounded evidence context and resume artifacts |
| Live progress and wake/contact | managed live event gateway |
| Agent/tool integration | governed API and managed MCP gateway |
| Event streaming and fan-out | internal event backbone |
| Integrity receipts | receipt binding surface |
| Reference hosted harness | Rook, presented only as the hosted/reference option |

## Four Core APIs

| API | Purpose | Non-negotiable controls |
|---|---|---|
| `POST /v1/events` | Write task, session, checkpoint, signal, evidence, access, and closeout events. | Tenant scope, actor scope, agent scope, idempotency key, schema version, event hash, evidence refs, rate limits, audit record. |
| `GET /v1/tasks/{task_id}/timeline` | Read the authoritative work timeline. | Hydrate from projections and event truth; show principal, agent, session, evidence, policy, transport, and access context. |
| `POST /v1/proof-packets` | Assemble deterministic proof packet. | Event range, hash-chain root, confidence classes, redaction summary, non-claims, access log ids, receipt id, schema version. |
| `GET /v1/search` | Search proof records. | Search projections/index, then hydrate from authority; no direct Meilisearch credentials; no proof/export claims from search alone. |

## Proof Desk V1

First UI has five screens:

1. Work Timeline
2. Evidence Panel
3. Confidence View
4. Redaction And Export
5. Access Log

Everything else belongs behind admin/debug until a design partner proves the need.

## Now / Next / Later

Now:

- freeze product/operator transport boundary;
- build `POST /v1/events`;
- enforce append-only event truth;
- ship first Proof Desk timeline;
- ship Proof Packet v1;
- add Claim Boundary Engine and access logs.

Next:

- one hosted reference-harness pilot path;
- one BYO adapter path;
- managed MCP gateway;
- load and tenant-isolation tests;
- better packet verification and redaction workflows.

Later:

- customer-owned vault;
- SIEM/GRC exports;
- advanced lifecycle and legal hold;
- full incident replay;
- multi-region operations;
- broader adapter ecosystem;
- enterprise SAML/KMS/Vault depth.

### R0: Inventory And Freeze Current Boundary

Goal: stop rediscovery and make today's estate inspectable.

Implementation artifacts from IF-3851:

- Machine inventory: `/root/docs/data/if-blackboard-rook-transport-inventory.v1.json`
- Validator: `/root/scripts/if_governance_transport_inventory_validate.py`
- R0/R1 boundary doc: `/root/docs/5004-if-blackboard-rook-r0-transport-inventory-and-r1-contract-2026-06-27.md`
- Current status: R0 inventory/freeze is implemented as a validated artifact; R1 is documented as the target transport contract; R2-R6 remain implementation work.

Deliverables:

- Transport inventory with each path tagged `product`, `operator-only`, `break-glass`, `legacy`, or `experimental`.
- `if-cli` as the canonical remote-host agent command surface for module namespaces: `if.rook`, `if.blackboard`, `if.context`, `if.switchboard`, `if.transport`, `if.gov`, and `if.security.secrets.detect`.
- `ifproxy` as a compatibility shim into `if-cli`; `iftransport`/`if.transport` as the lower-level compatibility engine, not the product surface.
- Martin laptop, `mtl-01`, and `mtl-03` as explicit topology examples.
- Redacted connection receipts: host, client app, transport class, MCP server ids, credential refs by path or key id, and active policy hash.
- Documented statement: Blackboard core is not primary-WebSocket today.
- Documented hard gate: SSH, reverse SSH, VS Code Remote SSH, and maintenance bridges are not for external customer usage.

Exit criteria:

- A reviewer can answer "how did this event enter the system?" without reading process lists.
- No secret-bearing command line or tunnel token appears in docs or proof packets.
- `if-cli -h`, `if-cli mcp -h`, `if-cli transport -h`, `if-cli rook -h`, `ifproxy -h`, and `ifproxy mcp -h` expose current namespaces and compatibility boundaries.

### R0.5: Real Infrastructure Baseline

Goal: stop trying to earn SaaS trust from a single-host JSONL proof-of-concept. Stand up a single-tenant but production-shaped runtime before any hosted design-partner proof desk claims.

Deliverables:

- Blackboard API Service: stateless HTTP write service with idempotency keys, strict schema validation, tenant scope gate, and rate limiting before any append.
- PostgreSQL 16 append-only event store with RLS, tenant/month partitioning, insert-only application role, mutation-deny triggers, logical replication, WAL retention target, PITR target, and event hash chain.
- Event Signature / Integrity Service: policy-driven signing or hash-binding for important task events, updates, checkpoints, evidence attachments, access decisions, redactions, and proof packet exports.
- Auth Broker / Token Service: Keycloak or Ory Hydra target with Google OIDC, SAML enterprise flow, device/PKCE for `if-cli`, client credentials for service accounts/BYO harnesses, MCP audience tokens, introspection, revocation, and JWKS rotation.
- Projection Worker / Outbox Consumer: logical replication consumer replacing script renderer, projection lag health, transactional outbox to indexing queue, rebuild coordinator, and p99 projection lag target under 5s.
- Meilisearch as rebuildable search projection, not proof authority.
- Circuit Breaker Registry, Graceful Degradation Specification, Observability SLOs, and production topology split across edge, auth, app, live event, data, search, worker, object storage, observability, and receipt planes.

Exit criteria:

- `blackboardRenderer` is not the target availability boundary; projection worker and current-state tables are.
- Customer runtime write path is service/API based, not CLI/MCP wrapper based.
- Auth, write, projection, search, object storage, and proof packet dependencies have explicit fail-closed or degraded behavior.
- R0.5 is represented in the DSL and wired before R1/R4.

### R1: Product Transport Contract

Goal: one product mental model.

Canonical split:

- Request/response: Blackboard search, task/session/signal writes, evidence attach, proof export, access-log query, redaction, receipt lookup.
- WebSocket: subscriptions, task/proof progress, wake/contact, retained inbox notification, shared operator UI.
- MCP: agent/tool contract routed through managed policy, exposed through dot namespaces and `if-cli`/managed gateway surfaces.
- `if-cli`: canonical operator/developer/agent command surface on remote hosts; it regroups module entrypoints while delegating logic to module runtimes.
- `if.transport`: compatibility engine below `if-cli`; direct use is adapter-internal or break-glass.
- SSH: operator maintenance and private execution only, never external customer usage or SaaS onboarding.

Exit criteria:

- Managed Gateway + Blackboard API expose the product front door.
- `if-cli` is the conceptual command surface; `ifproxy`/`iftransport` remain compatibility layers.
- Customer authentication uses the managed gateway/auth broker; product examples do not require SSH or copied host secrets.
- Customer/BYO harness examples use API/MCP/SDK paths without SSH.
- WebSocket event payloads link to durable request/response events instead of replacing them.

### R2: Canonical Provenance And Access Model

Goal: make cross-device sessions boring.

Scale architecture decision:

- PostgreSQL append-only event tables become the source of truth for tasks, sessions, signals, evidence, access, proof packets, and receipts.
- Application roles insert immutable events; `UPDATE`, `DELETE`, and `TRUNCATE` on event tables are blocked by privileges and fail-closed triggers.
- Current task/session/signal/proof state is a rebuildable projection with `last_event_id`, `last_event_hash`, projection version, and lag metrics.
- Meilisearch may be used for fast fuzzy search and filtering, but only as a rebuildable, access-filtered index.
- Search results hydrate from PostgreSQL authority before proof/export claims.
- Queue/backpressure, retry, dead-letter, and per-tenant projection/index lag metrics are required before thousands-of-users scale.
- Search auth is enforced before query, during PostgreSQL hydration, and again at proof/export time; no tenant receives direct Meilisearch credentials.

Every durable event links to:

- `tenant_id`
- `workspace_id`
- `project_id`
- `principal_id`
- stable `agent_id`
- rotating `sid` or `session_id`
- `client_app`
- `host_id`
- runtime origin
- transport class
- MCP server id
- credential reference or key id
- policy hash
- authorization decision id
- access-log id
- OAuth/OIDC issuer, client id, audience, scopes, expiry, and replay handle where applicable
- `if.trace` receipt id where policy requires it

Exit criteria:

- Proof desk timelines can show human, agent, session, device, transport, and policy decision together.
- Caddy/header stripping is backed by explicit relay-side provenance policy.
- The system can distinguish Martin laptop WSL, hosted Rook on `mtl-01`, and remote harness work on `mtl-03`.
- A load-test path exists for thousands of tenants and millions of events with concurrent search and proof export.

### R2.5: Load And Isolation Testing

Goal: prove tenant isolation and runtime resilience before R3/R4 proof packet and hosted proof desk claims.

Deliverables:

- Tenant Isolation Verifier running in CI and scheduled production shadow probes.
- Synthetic load test: at least 10K events across 5 synthetic tenants before design-partner pilot.
- RLS conformance: tenant A token cannot read tenant B database rows.
- Search conformance: tenant filter bypass attempts return zero unauthorized results.
- Object storage conformance: presigned URLs are tenant-bound and cannot be reused cross-tenant.
- Chaos test: kill projection worker, verify write path behavior, staleness signaling, rebuild recovery, and no false-current proof desk reads.
- SLO evidence for API write latency, proof desk reads, projection lag, search lag, auth token issuance, proof packet assembly, and append-only insert latency.

Exit criteria:

- Any isolation probe failure triggers incident and pauses affected tenant writes.
- Projection lag and search lag are observable and tied to circuit-breaker behavior.
- R3 proof packets and R4 hosted proof desk cannot proceed on unvalidated runtime substrate.

### R3: Proof Packet And Trace Binding

Goal: make one public packet credible as a first-class runtime object, not a one-off exporter script.

Deliverables:

- Proof Packet Service with deterministic assembly and database-native packet records.
- Versioned proof packet schema v1: packet_id, tenant/workspace/project ids, task/session/signal ids, evidence refs plus etags, event_id range, hash-chain root, confidence classes, redaction summary, non-claims, reviewer access-log ids, receipt id, assembled metadata, and schema version.
- Confidence classes: verified, inferred, stale, blocked, not claimed.
- Claim Boundary Engine: decides what Blackboard may say as verified, claimed, inferred, stale, missing, blocked, redacted, or explicitly not claimed.
- Semantic correctness is never automatic; it requires human review or a domain verifier before the product may claim it.
- Packet and redaction manifests are signed or hash-bound according to tenant policy before external export.
- Coherence Verifier: verify event ids exist, hash-chain continuity holds, evidence refs resolve, and projections match event truth before publication.
- Redaction Engine: tenant redaction policy before external export, receipted redaction manifest, no raw private content in external packets.
- Receipt policy: proof packets, exports, redaction reports, write batches, provenance batches, and high-value live events.
- Coherence tests across task, session, signal, evidence, search, access, and trace receipt state.

Exit criteria:

- First design-partner demo packet can be read by a security reviewer without operator explanation.
- Packet includes explicit non-claims and redactions.
- `if.trace` receipts are linked, not hand-waved.

### R4: Blackboard Design-Partner Proof Desk

Goal: first marketable product wedge: hosted Proof Desk for AI-agent work.

Precondition: R0.5 and R2.5 must pass. R4 must not ship on JSONL ledgers, script-rendered availability, untested callback routing, or unproven tenant isolation.

Offer:

- Blackboard Proof Desk for design partners.
- Hosted Rook reference harness operated by InfraFabric when the design partner wants a turnkey path.
- Tenant/project proof views.
- Confidence and claim-boundary view.
- Signed or hash-bound task/update timeline according to policy.
- Weekly or milestone proof reports.
- Access-log summaries.
- Deterministic exportable Proof Packet v1.

Exit criteria:

- Buyer can log in or receive a packet and inspect what happened without learning internal module names.
- Martin can demo a real task from request to closeout.
- Claims stay inside design-partner proof desk language.
- Packet shows redactions, non-claims, access-log ids, receipt binding, and signed/hash-bound integrity status.

### R5: BYO Harness Adapter

Goal: prove Blackboard can sit inside other harnesses.

Deliverables:

- Adapter event contract.
- SDK or reference client.
- OAuth-style client/service-account onboarding without SSH.
- Idempotent ingest.
- Harness conformance tests.
- MCP tool gateway with least-privilege scopes.
- Sample integrations for the hosted Rook reference path and one non-Rook customer-like harness.

Exit criteria:

- External harness developer can connect a toy harness without SSH.
- Events carry canonical provenance.
- Failed conformance checks explain problem, cause, fix, and docs link.

### R6: Enterprise Secure SaaS

Goal: buyer-grade control plane.

Deliverables:

- SSO/SAML/OIDC.
- OAuth/OIDC auth broker for browser, API, CLI, service-account, and managed MCP token flows.
- RBAC and scoped service identities.
- Tenant-scoped keys and KMS/Vault integration.
- Customer-owned evidence vault.
- SIEM/GRC exports.
- Retention, redaction, deletion, and legal hold policy.
- Incident replay from task/session/signal/evidence/access/transport timelines.

Exit criteria:

- Security reviewer can evaluate tenant isolation, access logs, provenance, receipt policy, and revocation without internal operator access.
- The product can be sold as secure SaaS without pretending to be a compliance certification platform.
- Enterprise reviewer can inspect API versioning, retention/deletion, circuit breakers, graceful degradation, SLOs, and incident replay without internal operator access.

## Architecture Decisions

| # | Decision | Classification | Principle | Rationale | Rejected |
|---|---|---|---|---|---|
| 1 | Blackboard core remains request/response. | Mechanical | Explicit over clever | Ledger search/write/export needs pagination, idempotency, audit, and receipt boundaries. | Primary WebSocket Blackboard API. |
| 2 | WebSocket is live event plane. | Mechanical | Boring by default | WS is right for subscriptions and progress, not canonical truth. | Duplicating ledgers over WS frames. |
| 3 | Managed Gateway + Blackboard API become the public front door. | Mechanical | DRY | Collapses scattered wrappers and routes into one policy surface while keeping internal `if.api` history out of the buyer story. | Raw endpoint URLs and SSH wrappers as product shape. |
| 4 | Provenance service is a P0/P1 dependency, not later enterprise polish. | User challenge resolved by Martin's latest direction | Completeness | Multi-device work is the core buyer risk, not a future nice-to-have. | Shipping SaaS claims before machine/session provenance. |
| 5 | `if.trace` receipts bind high-value events, not every low-value heartbeat. | Taste | Pragmatic | Receipts should support review and disputes without turning live traffic into expensive ceremony. | Receipt everything by default. |
| 6 | First marketable offer is Blackboard Proof Desk, with hosted Rook as reference harness. | Mechanical | Bias toward action | It uses the current strength without making Rook the product center or claiming BYO/enterprise maturity too early. | Self-serve multi-tenant SaaS as first launch. |
| 7 | SaaS auth follows normal enterprise patterns. | Mechanical | Boring by default | Customer trust depends on OIDC/SAML, OAuth-style scoped credentials, revocation, RBAC, and audit. Current Google OAuth and API-domain routes are footholds to consolidate, not complete product auth. | Treating operator SSH wrappers or app-specific demo tokens as customer onboarding. |
| 8 | R0.5 runtime baseline is mandatory before hosted proof desk. | Mechanical | Trust before scale | A proof desk on JSONL/script renderer cannot be sold as elite SaaS. | Shipping R4 before database/auth/isolation runtime exists. |
| 9 | Proof packets are first-class runtime objects. | Mechanical | Determinism | Buyer trust requires reproducible packet assembly, coherence verification, redaction manifests, and receipts. | One-off exporter as product runtime. |
| 10 | Observability is a runtime contract. | Mechanical | Operability | Governance SaaS must prove its own SLOs, drift, replay, and incident posture. | Vague logs/metrics node. |
| 11 | Tenant isolation is continuously tested. | Mechanical | Fail closed | Multi-tenant trust depends on active probes across API, DB, search, replication, and object storage. | Relying on design intent. |
| 12 | API versioning, lifecycle, circuit breakers, and degradation are product primitives. | Mechanical | Buyer durability | External adapters and enterprise reviewers need stable contracts and known failure modes. | Adding these only after pilots. |
| 13 | Claim Boundary Engine is required for buyer-visible proof. | Mechanical | Truth before trust | The product must separate verified, claimed, inferred, stale, missing, redacted, and not-claimed statements. | Letting Proof Desk or packets imply correctness from receipts alone. |
| 14 | Event signing/hash-binding is policy-driven but mandatory for important actions. | Mechanical | Evidence integrity | Task updates, evidence attachments, redactions, access decisions, and packet exports need tamper-evident linkage. | Treating signatures as later enterprise polish. |

## Engineering Review

### What Already Exists

- Blackboard append-only tasks, sessions, signals, checkpoints, evidence packs, and closeout gates.
- Rook session bootstrap, arrival context, host guardrails, and five-lane review discipline.
- Context bounded recall and evidence refs.
- Switchboard live contact/wake plane.
- `/chat/ws` live relay/fallback lane.
- Local HTTP/MCP bridge and SSH-wrapped MCP paths.
- `if.trace` receipt surfaces.
- `api.infrafabric.io` API domain, Google OAuth redirect registration for `https://api.infrafabric.io/user/oauth2/Google/callback`, and current Google OAuth/oauth2-proxy pattern on the portal path.
- Direct no-parameter probe of the API callback path returned JSON `not_found`; Google-side registration is present, but gateway/backend callback handling and full OAuth round-trip remain verification gates.
- Current C4 DSL with target SaaS substrate.

### Target Dependency Graph

```
Customer / Agent / Reviewer / Hosted Reference Harness
      |
      v
Gateway
      |---------------------> Auth Broker / Token Service
      |                              |
      |                              v
      |                         Tenant/RBAC Service
      |---------------------> Live Event Gateway (WebSocket)
      |                              |
      |                              v
      |                         Live Coordination Service
      |
      v
Blackboard API Service / MCP Tool Gateway / REST API
      |
      |---------------------> Event Signature / Integrity Service
      |                              |
      |                              v
      |                         KMS / Vault + if.trace receipt roots
      |
      v
Append-Only Event Store
      |
      v
Projection Worker / Outbox
      |---------------------> Meilisearch Search Projection
      v
Current-State Projections
      |
      v
Proof Desk Service
      |-----------> Claim Boundary Engine
      |                     |
      |                     v
      |              Verified / claimed / inferred / missing / non-claim decisions
      |
      v
Proof Packet Service
      |-----------> Managed Ledger DB / Event Store
      |-----------> Session Provenance Service
      |                     |
      |                     v
      |              Transport Attestation
      |-----------> Evidence Object Store
      |-----------> Event Signature / Integrity Service
      |-----------> if.trace Receipt Surface
      |-----------> Observability / Audit / SLOs
      v
Reviewer Proof Desk / Deterministic Proof Packet v1
```

### Test And Eval Plan

```
FLOW                                                     COVERAGE TARGET
[+] Request/response task write                           unit + integration
  ├── valid tenant/principal/agent/session                 tested
  ├── missing tenant                                       fail closed
  ├── sid reused across machines                           fail or flag
  └── replayed idempotency key                             deterministic

[+] WebSocket live event                                   integration
  ├── subscription auth                                    tested
  ├── task progress event links to durable event            tested
  ├── dropped socket                                       reconnect/resync
  └── untrusted inbound identity headers                    stripped/rejected

[+] Proof packet export                                    integration + receipt check
  ├── includes task/session/signal/evidence/access          tested
  ├── includes confidence classes                           tested
  ├── claim-boundary decision attached                      tested
  ├── packet and redaction manifests signed/hash-bound       tested
  ├── missing receipt policy                                fail closed
  └── redaction report                                      tested

[+] BYO harness adapter                                    conformance suite
  ├── event schema validation                               tested
  ├── provenance required fields                            tested
  ├── bad credential ref                                    rejected
  └── docs example runs end to end                          tested

[+] SaaS auth and MCP onboarding                            integration + conformance
  ├── Google/OIDC/SAML browser login maps tenant/workspace/role
  ├── API callback route completes a full OAuth round trip
  ├── service-account token has audience/scope/expiry
  ├── managed MCP rejects missing or wrong-audience token
  ├── direct Meilisearch key/search bypass                   rejected
  └── SSH/link helper appears only as operator/break-glass    checked

[+] R0.5 runtime baseline                                    integration + load
  ├── Blackboard API write requires idempotency key            tested
  ├── important task/update events signed or hash-bound        tested
  ├── PostgreSQL RLS blocks cross-tenant event reads           tested
  ├── mutation-deny trigger blocks update/delete/truncate      tested
  ├── projection worker lag p99 < 5s under normal load         tested
  ├── circuit breaker opens on configured dependency failure   tested
  └── degradation headers and fail-closed writes               tested

[+] R2.5 isolation and chaos                                  conformance + chaos
  ├── 10K events across 5 synthetic tenants                    tested
  ├── search filter bypass returns zero unauthorized rows      tested
  ├── object store presigned URL cross-tenant replay fails     tested
  ├── projection worker kill/rebuild recovers without drift    tested
  └── drift detector queues rebuild above threshold            tested

[+] Proof packet runtime object                               coherence + receipt
  ├── deterministic packet id from same inputs                 tested
  ├── event hash-chain continuity verified                     tested
  ├── claim boundary blocks unsupported correctness claim       tested
  ├── evidence refs and etags resolve                          tested
  ├── redaction manifest generated and receipted               tested
  └── incoherent packet rejected with diagnostics              tested
```

QA artifact requirement:

- Create a repeatable conformance suite before claiming BYO harness.
- Add a proof-packet coherence test before the first public packet.
- Add event signing/hash-binding and claim-boundary tests before saying Blackboard is governance-grade.
- Add a WebSocket resync test before making live subscriptions customer-facing.
- Add if.trace receipt verification tests before saying "trace-bound" in buyer material.
- Add R0.5 infrastructure baseline tests before claiming hosted proof desk readiness.
- Add R2.5 load, isolation, and chaos tests before any design-partner runtime.

### Failure Modes

| Failure mode | Impact | Required control |
|---|---|---|
| Search index treated as source of truth. | Proof desk can show stale or unprovable state. | Meilisearch is disposable; hydrate from PostgreSQL events/projections before claims. |
| Mutable task rows overwrite history. | Immutability and auditability collapse. | Append-only events with insert-only roles and mutation-deny triggers. |
| Projection/index lag hidden from operators. | Users see missing/stale tasks at scale. | Projection lag SLO, indexing queue metrics, retry/dead-letter dashboard. |
| Direct Meilisearch credentials reach a customer client. | Search could bypass tenant/RBAC policy. | Search only through Proof Desk/API/MCP; hydrate and authorize from PostgreSQL authority. |
| Session created from wrong machine but same sid. | Reviewer cannot trust provenance. | Host/device binding and sid reuse checks. |
| WebSocket event diverges from durable ledger. | UI shows false state. | WS event must reference durable event id; clients resync from request/response API. |
| SSH wrapper becomes product dependency. | Customer install is brittle and opaque. | Managed API/MCP front door; SSH remains operator-only and blocked for external customer usage. |
| API callback path exists in docs but not in gateway/backend routing. | Login fails or silently bypasses product auth. | Full OAuth round-trip test for `api.infrafabric.io/user/oauth2/Google/callback` or its successor before SaaS auth claims. |
| Long-lived tokens appear in command lines or proof docs. | Credential leak and audit failure. | Short-lived token broker, secret refs only, redaction, and access logs. |
| Trace receipt exists but semantic claim is overstated. | Trust damage. | Receipt language says integrity, not correctness. |
| Claim Boundary Engine is bypassed. | Product overclaims what evidence supports. | Proof Desk and Proof Packet export require verified claim-boundary decisions. |
| Event signing/hash-binding is optional for important updates. | Task history can be replayed or forged without detection. | Policy requires signed or hash-bound events for important task/update/evidence/access/export actions. |
| Redaction removes data without audit. | Reviewer loses confidence. | Redaction report and receipt-bound export manifest. |
| Tenant header spoofing. | Cross-tenant leak risk. | Strip inbound identity headers and set trusted policy server-side. |
| Hosted proof desk ships on JSONL/script renderer. | Availability and tenant isolation claims collapse. | R0.5 baseline is mandatory before R4. |
| CLI/MCP writer remains customer write path. | Idempotency, quota, and tenant boundaries are unenforced. | Blackboard API Service with idempotency, schema, RBAC, and rate limits. |
| Projection lag served as current proof. | Reviewer sees stale or false state. | Staleness headers, circuit breaker, and proof packet assembly block under stale state. |
| Proof packet assembled despite event/projection drift. | Exported evidence is incoherent. | Coherence verifier rejects packet with diagnostic report. |
| Dependency outage behavior is implicit. | Incidents become ad hoc and unsafe. | Graceful degradation spec plus circuit breaker registry. |
| API changes break BYO harnesses. | External integrations lose trust. | OpenAPI versioning, semver-bound if-cli, 12-month sunset policy. |
| Retention/deletion breaks hash chain. | Compliance and evidence conflict. | Tombstone/redaction events preserve structural chain continuity. |

## Corrected Roadmap Sequence

```
R0: Freeze boundary + inventory
 ↓
R0.5: Real infrastructure baseline
      - PostgreSQL with RLS and append-only tables
      - Auth broker with Google OIDC and API callback test
      - Blackboard API Service replacing JSONL/CLI write path for customer runtime
      - Event Signature / Integrity Service for signed/hash-bound updates
      - Projection worker replacing renderer script
      - Meilisearch rebuildable projection
      - Circuit breakers, SLOs, degradation behavior
 ↓
R1: Product transport contract on real infra
 ↓
R2: Canonical provenance + RBAC
 ↓
R2.5: Load and isolation testing
      - 10K events across synthetic tenants
      - RLS/search/object-store isolation probes
      - projection-worker chaos and rebuild recovery
 ↓
R3: Proof packet service + claim boundary + coherence tests
 ↓
R4: Blackboard design-partner proof desk
 ↓
R5: BYO harness adapter
 ↓
R6: Enterprise secure SaaS
```

## Highest-Leverage Runtime Changes

| Priority | Change | Why it unlocks elite |
|---:|---|---|
| 1 | PostgreSQL + RLS + append-only triggers | Multi-tenancy and immutability need enforceable database controls. |
| 2 | Real auth broker with token lifecycle audit | Every security property depends on token issuance, revocation, and audit. |
| 3 | Idempotency filter on write paths | At-least-once adapters need deterministic duplicate handling. |
| 4 | Projection worker with lag SLO and circuit breaker | Proof desk cannot be trusted when stale state is invisible. |
| 5 | Event Signature / Integrity Service | Important updates and packet exports need signed or hash-bound integrity according to policy. |
| 6 | Claim Boundary Engine | The product must not overclaim what receipts, evidence, or search results prove. |
| 7 | Tenant isolation conformance tests | Cross-tenant leaks must be caught before production. |
| 8 | Proof packet service with coherence verifier | Incoherent packets destroy buyer trust. |
| 9 | API versioning and sunset policy | Adapter developers need stability guarantees. |
| 10 | Separate live WebSocket tier from request/response API | `/chat/ws` cannot be a reliability catch-all. |
| 11 | Event hash chain with public verifier | Reviewers need independent verification. |
| 12 | Data lifecycle service | Retention, deletion, export, and legal hold are enterprise blockers. |
| 13 | R0.5 infrastructure baseline | Prevents R4 from shipping on proof-of-concept runtime. |
| 14 | Observability with SLOs and incident replay | Governance product must prove its own operations. |

## DX Review

Primary developer persona:

- Platform engineer or AI infrastructure lead evaluating whether they can plug their own harness into a proof desk without adopting InfraFabric's whole runtime.

Time-to-hello-world target:

- Competitive tier first: 2-5 minutes to submit a demo task event and see a proof timeline.
- Champion tier later: under 2 minutes with a hosted sandbox and copy-paste command.

Magical moment:

> "I send one signed demo task event from my harness and immediately see a proof timeline with session provenance and a trace-linked export."

Required first-run path:

1. Get sandbox tenant and short-lived token.
2. Run one command or copy-paste one HTTP/MCP example.
3. Open proof desk link.
4. Export proof packet.
5. Verify receipt.

DX score target:

| Dimension | Current plan | Target before external pilots |
|---|---:|---:|
| Getting started | 4/10 | 8/10 |
| API/MCP design | 6/10 | 8/10 |
| Error messages | 4/10 | 8/10 |
| Documentation | 6/10 | 8/10 |
| Upgrade path | 3/10 | 7/10 |
| Dev environment | 5/10 | 8/10 |
| Community/ecosystem | 2/10 | 5/10 |
| Measurement | 3/10 | 8/10 |

DX checklist:

- Sandbox token flow.
- Copy-paste runnable event submit.
- Example proof packet.
- Error format: problem, cause, fix, docs link, correlation id.
- Conformance report with pass/fail and next action.
- Versioned schema and migration notes.
- CI example for harness event validation.
- Receipt verification command.
- Auth examples for browser SSO, service account, `if-cli`, SDK, and managed MCP, all without SSH.

## NOT In Scope For This Roadmap Pass

- Full public marketing website.
- Final product pricing.
- Compliance certification claims.
- Full UI design system for the proof desk.
- Migrating every current operator path immediately.
- Replacing `if.trace` with a semantic correctness system.
- Making SSH a customer-facing product transport.

## Goal For The Destination DSL

The DSL should now show five things at once:

1. Current estate: Rook, Blackboard, Context, Switchboard, API, Bus, Trace, Martin laptop, `mtl-01`, `mtl-03`, WebSocket relay, and MCP bridge.
2. Target SaaS substrate: gateway, Blackboard API Service, proof desk, proof packet service, MCP gateway, live event gateway, provenance, transport attestation, managed ledgers, object storage, vault, observability, and trace receipts.
3. Buyer-readable Blackboard runtime: one holistic Governance Ensemble, signed/hash-bound event integrity, Claim Boundary Engine, Proof Desk, and deterministic Proof Packet v1.
4. Elite runtime substrate: R0.5 real infrastructure baseline, R2.5 load/isolation testing, production topology, circuit breakers, lifecycle, versioning, degradation, and SLOs.
5. Roadmap goal: R0 through R6, including R0.5 and R2.5, as an explicit execution program connected to the target services.

The destination DSL is the goal artifact. If it disagrees with this roadmap, update both.

## GSTACK REVIEW REPORT

| Review | Trigger | Why | Runs | Status | Findings |
|---|---|---|---:|---|---|
| CEO Review | `/autoplan` | Scope and product strategy | 1 | clear-with-boundary | Blackboard proof desk is the product; Rook is the reference harness; SaaS claims wait for provenance, claim boundaries, signed/hash-bound events, and trace-bound proof packets. |
| Design Review | `/autoplan` | UI/UX gaps | 0 | skipped | No screen design changed in this pass; proof desk UI remains future work. |
| Eng Review | `/autoplan` | Architecture and tests | 2 | issues-open | Must build R0.5 runtime baseline, R2.5 load/isolation gates, provenance, transport attestation, signature/hash-binding tests, claim-boundary tests, coherence tests, SLOs, and receipt verification before SaaS claims. |
| DX Review | `/autoplan` | Developer integration | 1 | issues-open | TTHW must become 2-5 minutes with sandbox, examples, conformance tests, and actionable errors. |

Verdict: roadmap approved as the goal direction; implementation remains gated by event truth, provenance, tenant isolation, claim boundaries, signed/hash-bound integrity, deterministic proof packets, and receipt verification work.
