feat(WP-0011): IHF Phase 10 — Hub Registry and Widget Marketplace
Some checks failed
Test / test (push) Has been cancelled

Delivers the hub registry discovery UI, widget pattern library,
governance template library, and marketplace dashboard.

Key changes:
- Schema: widget_patterns (widget_type FK to registry), widget_pattern_versions,
  pattern_adoptions, governance_templates (categories JSONB, validated at
  controller), governance_template_clones — all GAAF-compliant, no bare TEXT
  type discriminators
- Migration: 1743897600-ihf-phase10-hub-registry.sql
- HubRegistry controller + views: browsable view over hub_capability_manifests,
  hub_health_snapshots, hubs with per-hub GAAF compliance indicator
- WidgetPatterns controller + views: publish, version, adopt; adoption
  triggers manifest amendment draft when new types are introduced
- GovernanceTemplates controller + views: CRUD, clone with category
  validation against annotation_category_registry
- MarketplaceDashboard controller + view: full-text search, widget-type
  filter, sort, trending panel, autoRefresh
- API v2: /api/v2/hub-registry, /api/v2/widget-patterns (+ adopt endpoint)
- OpenAPI spec updated with Phase 10 paths
- GAAF scorecard: Customization 2.5 → 3.2; overall 3.41 → 3.56 (Strong)
- CLAUDE.md: Phase 10 complete; active workplan → Phase 11

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-01 20:14:43 +00:00
parent 254fd04fd0
commit 6e8972f828
25 changed files with 2019 additions and 37 deletions

View File

@@ -221,5 +221,45 @@ instance HasPath ApiV2SdkController where
pathTo ApiV2SdkTsAction = "/api/v2/sdk/ihf-client.ts"
pathTo ApiV2SdkPyAction = "/api/v2/sdk/ihf-client.py"
-- Phase 10 — Hub Registry and Widget Marketplace (IHUB-WP-0011)
instance AutoRoute HubRegistryController
instance AutoRoute WidgetPatternsController
instance AutoRoute GovernanceTemplatesController
instance AutoRoute MarketplaceDashboardController
-- /api/v2/ Phase 10 endpoints
instance CanRoute ApiV2HubRegistryController where
parseRoute' = do
_ <- string "/api/v2/hub-registry"
choice
[ do endOfInput; pure ApiV2IndexHubRegistryAction
, do _ <- string "/"; hId <- parseUUID; endOfInput
pure ApiV2ShowHubRegistryAction { hubId = Id hId }
]
instance HasPath ApiV2HubRegistryController where
pathTo ApiV2IndexHubRegistryAction = "/api/v2/hub-registry"
pathTo ApiV2ShowHubRegistryAction { hubId } = "/api/v2/hub-registry/" <> show hubId
instance CanRoute ApiV2WidgetPatternsController where
parseRoute' = do
_ <- string "/api/v2/widget-patterns"
choice
[ do endOfInput; pure ApiV2IndexWidgetPatternsAction
, do _ <- string "/"; pId <- parseUUID
choice
[ do _ <- string "/adopt"; endOfInput
pure ApiV2AdoptWidgetPatternAction { widgetPatternId = Id pId }
, do endOfInput
pure ApiV2ShowWidgetPatternAction { widgetPatternId = Id pId }
]
]
instance HasPath ApiV2WidgetPatternsController where
pathTo ApiV2IndexWidgetPatternsAction = "/api/v2/widget-patterns"
pathTo ApiV2ShowWidgetPatternAction { widgetPatternId } = "/api/v2/widget-patterns/" <> show widgetPatternId
pathTo ApiV2AdoptWidgetPatternAction { widgetPatternId } = "/api/v2/widget-patterns/" <> show widgetPatternId <> "/adopt"
-- Sessions
instance AutoRoute SessionsController