Build thin inbound adapters (“protocol gateways”) that translate external protocols into kernel commands/queries, enforce authn/z and capability checks at the boundary, and keep shells stateless.
Protocols in scope include: HTTP API, OpenAI-compatible facade, LSP endpoints for editor integration, and CLI entrypoints.
| ADR ID | Decision Title | Impact on This Plan |
|---|---|---|
| ADR-033 | Kernel-Shell Architecture | Gateways are shells; they must not contain domain logic. |
| ADR-017 | MCP + LSP Integration Architecture | Defines editor integration pathway and constraints. |
| PRD ID | Requirement Title | Satisfied By (SDS) | Acceptance Criteria |
|---|---|---|---|
| PRD-023 | SEA™ Platform Integration | SDS-048 | REQ-063, REQ-064 (Zed/LibreChat integration), REQ-060 (stateless shells) |
| SDS ID | Service/Component | Bounded Context | SEA-DSL Spec File | Implementation Status |
|---|---|---|---|---|
| SDS-048 | Platform UI Integration Service | sea-api |
N/A | Draft |
| SDS-047 | GovernedSpeed™ Governance Runtime | governance-runtime |
N/A | Proposed |
| SDS-050 | Semantic Identity & Provenance | shared |
N/A | Designed |
Note: SDS-042 (Policy Gateway Service) has been superseded by SDS-047 per ADR-031.
graph TD
ADR33[ADR-033: Kernel-Shell] --> PRD23[PRD-023: Platform Integration]
PRD23 --> SDS48[SDS-048: Platform UI Integration]
SDS48 --> SDS47[SDS-047: GovernedSpeed™ Runtime]
SDS48 --> SDS50[SDS-050: Semantic Identity & Provenance]
requestId/idempotency key for command dedup where required.| Generator | Target | Options/Schema | Expected Output |
|---|---|---|---|
@sea/generators:api-surface |
apps/* or libs/*/adapters |
endpoint schema | Controller/DTO/router scaffolding (generated) |
@sea/generators:adapter |
libs/*/adapters |
--port=<Port> |
Adapter pair implementing a port |
1
2
3
4
/
├── apps/
│ └── sea-api/src/gen/** # generated protocol surface + wiring
└── libs/sea/adapters/src/gen/** # generated inbound adapters (http/lsp/cli)
| Cycle | Branch | Wave | Files Modified | Files Created | Specs Implemented |
|---|---|---|---|---|---|
| C1A | cycle/p005-c1a-openai-facade |
1 | docs/specs/shared/sds/048-platform-ui-integration.md |
apps/sea-api/src/gen/** |
CMD-061 (chat completions) |
| C1B | cycle/p005-c1b-editor-actions |
1 | docs/specs/shared/sds/048-platform-ui-integration.md |
apps/sea-api/src/gen/** |
CMD-060 (editor actions) |
| C2A | cycle/p005-c2a-authz-boundary |
2 | docs/specs/shared/sds/042-policy-gateway-service.md, docs/specs/shared/sds/017-identity-and-addressing.md |
libs/sea/adapters/src/gen/** |
Authn/z + capability checks |
/v1/chat/completions)
docs/specs/shared/sds/048-platform-ui-integration.md, generated apps/sea-api/src/gen/**docs/specs/shared/sds/048-platform-ui-integration.md, generated apps/sea-api/src/gen/**docs/specs/shared/sds/047-governedspeed-governance-runtime.sds.yaml, docs/specs/shared/sds/050-semantic-identity-provenance.md, generated adapters under libs/sea/adapters/src/gen/**requestId).sea-api? Separate processQRY-060 GetCapabilities? JSON schema (OpenAPI-style)| Risk | Likelihood | Impact | Mitigation Strategy |
|---|---|---|---|
| Gateways accumulate business logic over time | Medium | High | Enforce boundaries + keep shells stateless; fail code review when logic drifts (and update generators to avoid manual patches). |
| Protocol compatibility drift (OpenAI/LSP) | Medium | High | Keep strict contract tests and pin spec versions in the manifest. |
| Type | ID | Document |
|---|---|---|
| ADR | ADR-033 | docs/specs/shared/adr/033-kernel-shell-architecture.md |
| SDS | SDS-048 | docs/specs/shared/sds/048-platform-ui-integration.md |
| SDS | SDS-047 | docs/specs/shared/sds/047-governedspeed-governance-runtime.sds.yaml |
| SDS | SDS-050 | docs/specs/shared/sds/050-semantic-identity-provenance.md |
Superseded: SDS-042 (Policy Gateway Service) has been merged into SDS-047 per ADR-031.