feat(WP-0009): IHF GAAF Compliance Foundation — type registries, extension manifests, architectural contracts
Some checks failed
Test / test (push) Has been cancelled

Implements IHUB-WP-0009: closes four GAAF-2026 gaps before domain hub work begins.
- TypeRegistry helper + controllers/views (hub_kind, hub_capability_manifest)
- HubCapabilityManifest entity with validation and registry linkage
- ARCHITECTURE-LAYERS.md + CI-enforced boundary contracts
- Alembic migration 1743724800, fitness tests (Test/Architecture/)
- GAAF spec, Operational Architecture spec, domain hub extension guide
- Updates to CLAUDE.md, SCOPE.md, Schema.sql, Routes, FrontController, Types

state_hub_sync: pending (tunnel was STALE at completion time; run fix-consistency)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-31 21:17:39 +00:00
parent 1a7732d7da
commit b5d73aa18b
47 changed files with 4855 additions and 104 deletions

View File

@@ -10,6 +10,8 @@ data EditView = EditView
{ widget :: !Widget
, hubs :: ![Hub]
, adapterSpecs :: ![WidgetAdapterSpec]
, widgetTypes :: ![WidgetTypeRegistry]
, policyScopes :: ![PolicyScopeRegistry]
}
instance View EditView where
@@ -23,6 +25,6 @@ instance View EditView where
<span>Edit</span>
</div>
<h1 class="text-2xl font-semibold mb-6">Edit Widget</h1>
{renderForm widget hubs adapterSpecs}
{renderForm widget hubs adapterSpecs widgetTypes policyScopes}
</div>
|]

View File

@@ -9,24 +9,26 @@ data NewView = NewView
{ widget :: !Widget
, hubs :: ![Hub]
, adapterSpecs :: ![WidgetAdapterSpec]
, widgetTypes :: ![WidgetTypeRegistry]
, policyScopes :: ![PolicyScopeRegistry]
}
instance View NewView where
html NewView { .. } = [hsx|
<div class="max-w-lg">
<h1 class="text-2xl font-semibold mb-6">Register Widget</h1>
{renderForm widget hubs adapterSpecs}
{renderForm widget hubs adapterSpecs widgetTypes policyScopes}
</div>
|]
renderForm :: Widget -> [Hub] -> [WidgetAdapterSpec] -> Html
renderForm widget hubs adapterSpecs = formFor widget [hsx|
renderForm :: Widget -> [Hub] -> [WidgetAdapterSpec] -> [WidgetTypeRegistry] -> [PolicyScopeRegistry] -> Html
renderForm widget hubs adapterSpecs widgetTypes policyScopes = formFor widget [hsx|
{textField #name}
{selectField #widgetType widgetTypeOptions}
{selectField #widgetType (widgetTypeOptions widgetTypes)}
{selectField #hubId (hubOptions hubs)}
{textField #capabilityRef}
{textField #viewContext}
{selectField #policyScope policyScopeOptions}
{selectField #policyScope (policyScopeOptions policyScopes)}
{selectField #status statusOptions}
<div>
<label class="ihp-form-label">Adapter Spec (optional leave blank for native IHP widget)</label>
@@ -43,23 +45,11 @@ renderForm widget hubs adapterSpecs = formFor widget [hsx|
hubOptions :: [Hub] -> [(Text, Id Hub)]
hubOptions hubs = map (\h -> (h.name, h.id)) hubs
widgetTypeOptions :: [(Text, Text)]
widgetTypeOptions =
[ ("Chart", "chart")
, ("Form", "form")
, ("Table", "table")
, ("Action", "action")
, ("Panel", "panel")
, ("Navigation", "nav")
, ("Other", "other")
]
widgetTypeOptions :: [WidgetTypeRegistry] -> [(Text, Text)]
widgetTypeOptions = map (\r -> (r.label, r.name))
policyScopeOptions :: [(Text, Text)]
policyScopeOptions =
[ ("Internal", "internal")
, ("Hub", "hub")
, ("Public", "public")
]
policyScopeOptions :: [PolicyScopeRegistry] -> [(Text, Text)]
policyScopeOptions = map (\r -> (r.label, r.name))
statusOptions :: [(Text, Text)]
statusOptions =