Skip to content

Commit d96a680

Browse files
feat(boost): scaffold AI Catalog frontend plugin and dev app
Implements Story 1 (RHIDP-15165) — Plugin Scaffold and Dev App for the AI Catalog frontend feature. Plugin (plugins/boost/): - NFS-only frontend plugin with createFrontendPlugin, no legacy entry point - PageBlueprint at /ai-catalog for the browse page - EntityCardBlueprint stubs (summary, download, version) with isAiAsset filter - EntityContentBlueprint stub (usage tab) with isAiAsset filter - isAiAsset() condition filter for all 7 AI asset kind/type combinations - useAiAssets() hook wrapping catalogApiRef with client-side filtering - Placeholder AiCatalogPage component - i18n scaffold with TranslationBlueprint and translation resource - Translation module auto-discovery entry point for app.packages: all - Unit tests for isAiAsset and AiCatalogPage Dev app (packages/app/): - NFS app with createApp, RHDH theme, sign-in module, nav module - Sidebar with AI Catalog and Catalog entries, app-visualizer, user settings Dev backend (packages/backend/): - Minimal backend with auth (guest), catalog, techdocs, permission, search Fixtures and config: - Sample catalog-info.yaml for all AI asset types - app-config.yaml with app.packages: all and route redirect Also adds @red-hat-developer-hub/backstage-plugin-boost to pluginPackages in all boost-family backend/common/node packages. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 106b9f0 commit d96a680

49 files changed

Lines changed: 17387 additions & 9566 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@red-hat-developer-hub/backstage-plugin-boost': minor
3+
'@red-hat-developer-hub/backstage-plugin-boost-backend': patch
4+
'@red-hat-developer-hub/backstage-plugin-boost-common': patch
5+
'@red-hat-developer-hub/backstage-plugin-boost-node': patch
6+
'@red-hat-developer-hub/backstage-plugin-boost-backend-module-kagenti': patch
7+
'@red-hat-developer-hub/backstage-plugin-boost-backend-module-llamastack': patch
8+
'@red-hat-developer-hub/backstage-plugin-boost-responses-api-toolkit': patch
9+
'@red-hat-developer-hub/backstage-plugin-boost-toolscope': patch
10+
---
11+
12+
Scaffold AI Catalog frontend plugin, dev app, and dev backend. Adds NFS-only frontend plugin with PageBlueprint, EntityCardBlueprint/EntityContentBlueprint stubs, isAiAsset filter, useAiAssets hook, i18n scaffold, and sample catalog fixtures. Adds boost frontend package to pluginPackages in all boost-family packages.

workspaces/boost/app-config.yaml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
app:
2+
title: Boost Dev
3+
baseUrl: http://localhost:3000
4+
packages: all
5+
extensions:
6+
- app/routes:
7+
config:
8+
redirects:
9+
- from: /
10+
to: /ai-catalog
11+
12+
organization:
13+
name: Red Hat
14+
15+
backend:
16+
baseUrl: http://localhost:7007
17+
listen:
18+
port: 7007
19+
cors:
20+
origin: http://localhost:3000
21+
methods: [GET, HEAD, PATCH, POST, PUT, DELETE]
22+
credentials: true
23+
database:
24+
client: better-sqlite3
25+
connection: ':memory:'
26+
cache:
27+
store: memory
28+
29+
auth:
30+
environment: development
31+
providers:
32+
guest: {}
33+
34+
techdocs:
35+
builder: 'local'
36+
generator:
37+
runIn: 'local'
38+
publisher:
39+
type: 'local'
40+
41+
catalog:
42+
import:
43+
entityFilename: catalog-info.yaml
44+
pullRequestBranchName: backstage-integration
45+
rules:
46+
- allow:
47+
- Component
48+
- System
49+
- Group
50+
- Resource
51+
- Location
52+
- Template
53+
- API
54+
- AiResource
55+
locations:
56+
- type: file
57+
target: ../../fixtures/ai-catalog-fixtures.yaml
58+
rules:
59+
- allow: [AiResource, API, Component, Resource]
Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
---
2+
# AI Catalog sample fixtures — one entity per AI asset category.
3+
# Used by the dev app for local development and testing.
4+
5+
# ---------------------------------------------------------------------------
6+
# AiResource / skill
7+
# ---------------------------------------------------------------------------
8+
apiVersion: backstage.io/v1alpha1
9+
kind: AiResource
10+
metadata:
11+
name: code-review-skill
12+
title: Code Review Skill
13+
description: Automated code review that checks for common issues, security vulnerabilities, and style violations.
14+
tags:
15+
- code-review
16+
- security
17+
- quality
18+
annotations:
19+
rhdh.io/ai-asset-category: skill
20+
rhdh.io/ai-asset-version: '1.2.0'
21+
rhdh.io/ai-asset-source: github
22+
backstage.io/techdocs-ref: dir:.
23+
links:
24+
- url: https://github.com/example/code-review-skill
25+
title: Source Repository
26+
spec:
27+
type: skill
28+
lifecycle: production
29+
owner: team-ai-platform
30+
disciplines:
31+
- software-engineering
32+
categories:
33+
- code-quality
34+
agents:
35+
- component:default/developer-assistant
36+
37+
---
38+
# ---------------------------------------------------------------------------
39+
# AiResource / rule
40+
# ---------------------------------------------------------------------------
41+
apiVersion: backstage.io/v1alpha1
42+
kind: AiResource
43+
metadata:
44+
name: no-hardcoded-secrets-rule
45+
title: No Hardcoded Secrets
46+
description: Ensures that secrets, API keys, and credentials are never committed to source code repositories.
47+
tags:
48+
- security
49+
- compliance
50+
- secrets
51+
annotations:
52+
rhdh.io/ai-asset-category: rule
53+
rhdh.io/ai-asset-version: '2.0.1'
54+
rhdh.io/ai-asset-source: internal
55+
spec:
56+
type: rule
57+
lifecycle: production
58+
owner: team-security
59+
category: security
60+
rationale: Hardcoded secrets in source code can be extracted by attackers, leading to credential compromise and unauthorized access to systems.
61+
62+
---
63+
# ---------------------------------------------------------------------------
64+
# API / mcp-server
65+
# ---------------------------------------------------------------------------
66+
apiVersion: backstage.io/v1alpha1
67+
kind: API
68+
metadata:
69+
name: github-mcp-server
70+
title: GitHub MCP Server
71+
description: Model Context Protocol server providing GitHub repository context, pull request data, and issue tracking integration.
72+
tags:
73+
- github
74+
- mcp
75+
- context
76+
annotations:
77+
rhdh.io/ai-asset-category: mcp-server
78+
rhdh.io/ai-asset-version: '0.9.0'
79+
rhdh.io/ai-asset-source: registry
80+
spec:
81+
type: mcp-server
82+
lifecycle: experimental
83+
owner: team-integrations
84+
definition: |
85+
openapi: 3.0.0
86+
info:
87+
title: GitHub MCP Server
88+
version: 0.9.0
89+
remotes:
90+
- url: https://mcp.example.com/github
91+
transport: streamable-http
92+
93+
---
94+
# ---------------------------------------------------------------------------
95+
# Component / ai-agent
96+
# ---------------------------------------------------------------------------
97+
apiVersion: backstage.io/v1alpha1
98+
kind: Component
99+
metadata:
100+
name: developer-assistant
101+
title: Developer Assistant Agent
102+
description: An AI agent that helps developers with code generation, debugging, architecture decisions, and documentation.
103+
tags:
104+
- agent
105+
- developer
106+
- assistant
107+
annotations:
108+
rhdh.io/ai-asset-category: agent
109+
rhdh.io/ai-asset-version: '3.1.0'
110+
rhdh.io/ai-asset-source: internal
111+
spec:
112+
type: ai-agent
113+
lifecycle: production
114+
owner: team-ai-platform
115+
116+
---
117+
# ---------------------------------------------------------------------------
118+
# Resource / ai-model
119+
# ---------------------------------------------------------------------------
120+
apiVersion: backstage.io/v1alpha1
121+
kind: Resource
122+
metadata:
123+
name: granite-3-code
124+
title: Granite 3 Code
125+
description: IBM Granite 3 code model optimized for code generation, completion, and explanation tasks.
126+
tags:
127+
- model
128+
- code-generation
129+
- ibm
130+
annotations:
131+
rhdh.io/ai-asset-category: model
132+
rhdh.io/ai-asset-version: '3.0.0'
133+
rhdh.io/ai-asset-source: model-registry
134+
spec:
135+
type: ai-model
136+
lifecycle: production
137+
owner: team-ml-ops
138+
139+
---
140+
# ---------------------------------------------------------------------------
141+
# Resource / ai-tool
142+
# ---------------------------------------------------------------------------
143+
apiVersion: backstage.io/v1alpha1
144+
kind: Resource
145+
metadata:
146+
name: web-search-tool
147+
title: Web Search Tool
148+
description: A tool that performs web searches and returns structured results for AI agent consumption.
149+
tags:
150+
- tool
151+
- search
152+
- web
153+
annotations:
154+
rhdh.io/ai-asset-category: tool
155+
rhdh.io/ai-asset-version: '1.0.0'
156+
rhdh.io/ai-asset-source: kagenti
157+
spec:
158+
type: ai-tool
159+
lifecycle: experimental
160+
owner: team-integrations
161+
162+
---
163+
# ---------------------------------------------------------------------------
164+
# Resource / vector-store
165+
# ---------------------------------------------------------------------------
166+
apiVersion: backstage.io/v1alpha1
167+
kind: Resource
168+
metadata:
169+
name: docs-vector-store
170+
title: Documentation Vector Store
171+
description: Vector store containing embeddings of internal documentation, runbooks, and knowledge base articles.
172+
tags:
173+
- vector-store
174+
- documentation
175+
- rag
176+
annotations:
177+
rhdh.io/ai-asset-category: vector-store
178+
rhdh.io/ai-asset-version: '1.1.0'
179+
rhdh.io/ai-asset-source: internal
180+
spec:
181+
type: vector-store
182+
lifecycle: production
183+
owner: team-ai-platform

workspaces/boost/openspec/changes/ai-catalog-frontend/design.md

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,20 +56,22 @@ Permission checks for `ai-catalog.asset.read.usage-docs` default to allow when t
5656

5757
Backstage v1.51.0 introduced `AiResource` kind and `API` with `spec.type: mcp-server` via `@backstage/plugin-catalog-backend-module-ai-model`. Boost uses upstream kinds where available:
5858

59-
| Category | Entity Kind | spec.type | Notes |
60-
|---|---|---|---|
61-
| Skills | AiResource | skill | Upstream. disciplines, categories, agents, dependsOn |
62-
| Rules | AiResource | rule | Upstream. category (required), rationale (required) |
63-
| MCP Servers | API | mcp-server | Upstream. spec.remotes list |
64-
| Agents | Component | ai-agent | Boost-defined |
65-
| Models | Resource | ai-model | Boost-defined. RFC #33060 pending |
66-
| Tools | Resource | ai-tool | Boost-defined (Kagenti) |
67-
| Vector Stores | Resource | vector-store | Boost-defined |
59+
| Category | Entity Kind | spec.type | Notes |
60+
| ------------- | ----------- | ------------ | ---------------------------------------------------- |
61+
| Skills | AiResource | skill | Upstream. disciplines, categories, agents, dependsOn |
62+
| Rules | AiResource | rule | Upstream. category (required), rationale (required) |
63+
| MCP Servers | API | mcp-server | Upstream. spec.remotes list |
64+
| Agents | Component | ai-agent | Boost-defined |
65+
| Models | Resource | ai-model | Boost-defined. RFC #33060 pending |
66+
| Tools | Resource | ai-tool | Boost-defined (Kagenti) |
67+
| Vector Stores | Resource | vector-store | Boost-defined |
6868

6969
## Components
7070

7171
### AiCatalogPage
72+
7273
Browse page with card grid, search, and filters. PluginHeader provided by the framework.
74+
7375
- Card grid grouped by category with responsive layout
7476
- Debounced keyword search (300ms)
7577
- Filter controls: category, lifecycle, tags, owner, source connector (AND logic)
@@ -78,28 +80,38 @@ Browse page with card grid, search, and filters. PluginHeader provided by the fr
7880
- Loading skeletons, empty state with clear-filters, error state with retry
7981

8082
### AiAssetCard
83+
8184
Card displaying key metadata for one AI asset. Used in the browse grid.
85+
8286
- Name, truncated description, category icon/badge, lifecycle badge
8387
- Tags, owner, version, source connector indicator
8488
- Click navigates to catalog entity detail page
8589

8690
### AiAssetSummaryCard
91+
8792
EntityCardBlueprint on entity overview. Shows AI-specific metadata.
93+
8894
- Category badge, current/recommended version, source attribution, lifecycle
8995

9096
### DownloadAdoptCard
97+
9198
EntityCardBlueprint on entity overview. Conditional on spec.location.type.
99+
92100
- git: Download button triggers ZIP download via backend proxy
93101
- oci: docker/podman toggle with copyable pull command
94102
- Absent: card not rendered
95103

96104
### VersionListCard
105+
97106
EntityCardBlueprint on entity overview. Shows all versions of the asset.
107+
98108
- Current/recommended highlighted
99109
- Click navigates to that version's entity page
100110

101111
### UsageTab
112+
102113
EntityContentBlueprint tab. RBAC-gated usage documentation.
114+
103115
- With usage-docs permission: TechDocs content or external links
104116
- Without permission: "Contact owner for access" affordance
105117

@@ -110,6 +122,7 @@ UX prototype: https://agentic-524bde.pages.redhat.com/skill-marketplace/overview
110122
## Acceptance Criteria
111123

112124
### AiCatalogPage
125+
113126
- Developer sees card grid grouped by category at /ai-catalog
114127
- Search filters cards within 300ms
115128
- Multiple filters narrow results with AND logic
@@ -118,23 +131,28 @@ UX prototype: https://agentic-524bde.pages.redhat.com/skill-marketplace/overview
118131
- Keyboard navigable through all interactive elements
119132

120133
### AiAssetCard
134+
121135
- Card displays all metadata fields from entity
122136
- Click navigates to catalog entity detail page
123137

124138
### AiAssetSummaryCard
139+
125140
- Renders on AI asset entity pages only
126141
- Shows category, version, source, lifecycle
127142

128143
### DownloadAdoptCard
144+
129145
- Download button on git assets triggers ZIP download
130146
- Docker/podman toggle on OCI assets with copyable pull command
131147
- Not rendered when spec.location.type absent
132148

133149
### VersionListCard
150+
134151
- Shows all versions; current highlighted
135152
- Click navigates to version's entity page
136153

137154
### UsageTab
155+
138156
- Renders TechDocs when annotation present; external links as fallback
139157
- Shows "Contact owner" when user lacks usage-docs permission
140158
- Tab only appears on AI asset entities

workspaces/boost/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
},
4141
"devDependencies": {
4242
"@backstage/cli": "^0.36.3",
43+
"@backstage/cli-defaults": "^0.1.0",
4344
"@backstage/e2e-test-utils": "^0.1.2",
4445
"@backstage/repo-tools": "^0.17.3",
4546
"@changesets/cli": "^2.27.1",
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
...require('@backstage/cli/config/eslint-factory')(__dirname),
3+
root: true,
4+
};

0 commit comments

Comments
 (0)