Domain Hub Extension Guide
How to build and register a domain hub extension: HubCapabilityManifest, type registry entries, hub-owned widget types, and hub-scoped controllers.
Overview
inter-hub provides the governance substrate. Domain hubs (dev-hub, ops-hub, fin-hub, sec-hub) extend it by registering their own capability manifests and type discriminators. This keeps core tables stable while allowing domain-specific specialisation.
HubCapabilityManifest before use. Register via the Extensions admin UI before creating any hub-owned widget types.1 Create a Hub
Navigate to Management UI → Hubs and create a new hub. Each hub has a slug that will prefix its owned types (e.g. dev.code-review).
2 Register a HubCapabilityManifest
A HubCapabilityManifest is the DB-side contract for a domain hub. Go to Extensions and create a manifest for your hub. Set status to active.
The manifest includes: hubId, manifestVersion, capabilitySchema (JSON), and an optional apiEndpointBase. It is the anchor point for per-consumer API keys in Phase 9.
3 Register Type Discriminators
Before creating widgets of a new type, register the type in the appropriate registry. Go to Registries:
- Widget Type Registry — new widget types your hub will own
- Event Type Registry — custom interaction event types
- Annotation Category Registry — custom annotation categories
- Policy Scope Registry — custom policy sensitivity scopes
owner_hub_id to your hub. Once registered, your hub-scoped code can create widgets of that type and the type will appear in the marketplace.4 Create Widgets
With the type registered, create widgets via the Widgets page or the API:
{ "name": "PR Review Widget",
"widgetType": "dev.code-review",
"hubId": "...",
"viewContext": "pull-request-sidebar" }
5 Publish a Widget Pattern (optional)
If your widget design is reusable, publish it to the Widget Marketplace. Other hubs can adopt it and pin to specific versions. Patterns support semantic versioning and adoption tracking.
6 Connect an AI Agent (Phase 11)
Register an AgentRegistration for your hub, then create a ModelRoutingPolicy to route task types to specific models or agents. Agents can draft Requirements, propose governance decisions, and participate in CollectiveProposals.
GAAF Architecture Rules (Summary)
Type discriminator columns must reference a registry table or carry a CHECK constraint. No bare TEXT for new type discriminators.
New hub-owned types must be declared in the hub's HubCapabilityManifest before use.
Core tables (widgets, interaction_events, annotations, hubs) must not have new columns without updating /contracts/core/.
Append-only invariant on interaction_events and outcome_signals is permanent. Never bypass those triggers.