Skip to content

Commit 407ca08

Browse files
skill: add Jira lookup, product area mapping, and hpux scaffold flow to prototype-contributor
Extends the prototype-contributor skill with: - Product area → teamId reference table for all 13 manifest teams/cross-products - Jira API integration via jira-api.sh (summary, assignee, status mapping) - Full hpux-prototypes scaffold flow (npm run create-prototype + config patch + manifest entry) - Structured prompts for design notes, persona, design doc URL, recording URL - Updated trigger phrases and quick-reference decision tree Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 5e53072 commit 407ca08

1 file changed

Lines changed: 179 additions & 13 deletions

File tree

  • .cursor/skills/prototype-contributor

.cursor/skills/prototype-contributor/SKILL.md

Lines changed: 179 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ description: >-
66
"I need to add to the design repo", start by asking the intake questions
77
below before editing files. Also use for "add a prototype", "register my
88
prototype", "update the hub", "update the manifest", "set up my branch",
9-
"how do I contribute", or "open an MR" for this repository.
9+
"how do I contribute", "create a prototype", "new prototype for [product]",
10+
or "open an MR" for this repository.
1011
---
1112

1213
# Prototype contributor
@@ -41,13 +42,13 @@ Then: locate the manifest entry (and code paths if any), apply edits, bump `upda
4142

4243
Ask (skip what they already answered):
4344

44-
2. **Product area**which UX lane? (`teamId` must match an `id` in `teams` *or* `crossProducts` in the manifest, e.g. `rbac` for RBAC cross-lane listings; if missing, flag that a team or cross-product block may be needed first — coordinate maintainer / Matt per **When to ask for help**.)
45+
2. **Product area**pick from the table in **Product area → teamId mapping** below. This sets `teamId` in the manifest.
4546
3. **Card title** — should match the linked Jira issue **`summary`** (hub cards mirror the ticket title).
46-
4. **What theyre shipping** — e.g. PatternFly prototype under `hpux-prototypes/` (embed link), static/site URL, OME/OSAC-style embed route, or **manifest-only** until hosted (`prototypeUrl: null`).
47-
5. **Jira** — real issue key and `https://redhat.atlassian.net/browse/…` or `https://issues.redhat.com/browse/…` (avoid using registry slugs as `jiraKey` when a real ticket exists).
48-
6. **Persona** (optional) — one line for the card; use **admin** not **administrator** per team wording norms.
49-
7. **Design doc** (optional) — `designDocUrl`: link to the UX spec / problem statement (Confluence, Google Doc, in-repo doc, etc.).
50-
8. **Recording** (optional) — `prototypeRecordingUrl`: link to a short walkthrough (Loom, Meet recording, Drive, etc.).
47+
4. **What they're shipping** — e.g. PatternFly prototype under `hpux-prototypes/` (embed link), static/site URL, OME/OSAC-style embed route, or **manifest-only** until hosted (`prototypeUrl: null`). If the answer is **hpux-prototypes**, continue to **hpux-prototypes scaffold flow** below.
48+
5. **Jira ticket number** (e.g. `ACM-1234`) — run the Jira lookup in **Pulling Jira info** to auto-fill title, description, assignee, and status.
49+
6. **Persona** — one line for the card (e.g. "Cluster admin", "SRE", "Developer"). Use **admin** not **administrator** per team wording norms.
50+
7. **Design doc URL** (optional) — `designDocUrl`: link to the UX spec / problem statement (Confluence, Google Doc, in-repo doc, etc.).
51+
8. **Recording URL** (optional) — `prototypeRecordingUrl`: link to a short walkthrough (Loom, Meet recording, Drive, YouTube, etc.).
5152
9. **Author** — full name; **updatedAt**`YYYY-MM-DD` for today or last meaningful change.
5253

5354
Then: add the `prototypes` entry (and register in hpux or wire URL/embed as needed), follow **Manifest structure** and repo layout, draft commit + MR.
@@ -58,6 +59,170 @@ Then: add the `prototypes` entry (and register in hpux or wire URL/embed as need
5859
- For **hpux** screens: `hpux-prototypes/` app + registry; embed pattern `/embed/hpux-prototypes?prototype=<id>` when relevant.
5960
- Point to **Contributor guide** in the hub (`/contributing`) for long-form context.
6061

62+
---
63+
64+
## Product area → teamId mapping
65+
66+
Use this table to resolve the designer's product area choice to the correct `teamId` for the manifest and the correct section in the hub.
67+
68+
| Product area | `teamId` | Hub maintainer |
69+
|---|---|---|
70+
| ACS / RHACS | `acs` | Mansur Syed |
71+
| ACM | `acm` | Joy Jean |
72+
| Virtualization / CNV | `virtualization` | Yifat Menchik |
73+
| Core OpenShift / OCP | `core-openshift` | Kevin Hatchoua |
74+
| Sovereign Cloud / OSAC | `sovereign-cloud` | Ethan Kim |
75+
| Migration Advisor | `migration-advisor` | Margot Menestrot |
76+
| OME | `ome` | Joy Jean |
77+
| Observability | `observability` | Shiri Mordechay Sofer |
78+
| OCM | `ocm` | Peter Kreuser |
79+
| RBAC (cross-product) | `rbac` | Štefan Kukla |
80+
| Upgrades (cross-product) | `upgrades` | Kevin Hatchoua |
81+
| Agentic (cross-product) | `agentic` | Peter Kreuser |
82+
| Install (cross-product) | `install` | Peter Kreuser |
83+
84+
> Cross-product `teamId` values come from the `crossProducts` array in the manifest — they route to `/cross-product/<id>` in the hub, not a team page. If the right area isn't listed, flag it: a new `teams` entry + icon in `hub/src/iconImports.tsx` is needed — coordinate with Matt.
85+
86+
---
87+
88+
## Pulling Jira info
89+
90+
When the designer provides a Jira ticket number, run this to auto-fill title, description, assignee, and status:
91+
92+
```bash
93+
source /Users/matthew/jira/scripts/jira-api.sh
94+
jira_get_issue "ACM-1234" | python3 -c "
95+
import json, sys
96+
d = json.load(sys.stdin)
97+
f = d['fields']
98+
print('summary:', f.get('summary',''))
99+
print('assignee:', (f.get('assignee') or {}).get('displayName',''))
100+
print('status:', f['status']['name'])
101+
desc = f.get('description') or {}
102+
# ADF description → plain text (best-effort)
103+
texts = []
104+
for b in desc.get('content', []):
105+
for c in b.get('content', []):
106+
if c.get('type') == 'text':
107+
texts.append(c['text'])
108+
print('description:', ' '.join(texts)[:300])
109+
"
110+
```
111+
112+
Map the returned `status` to `PrototypeStatus`:
113+
114+
| Jira status | prototype.config.ts status |
115+
|---|---|
116+
| To Do / New / Open | `draft` |
117+
| In Progress | `in-progress` |
118+
| In Review / Review | `in-review` |
119+
| Done / Closed | `done` |
120+
| Blocked / Paused | `paused` |
121+
122+
Use `summary` as the hub card `title` (and the `name` in `prototype.config.ts`). Use `assignee` for `owner.name` and the manifest `author` field. Use the cleaned `description` as the prototype's `description` field (trim to 2–3 sentences).
123+
124+
---
125+
126+
## hpux-prototypes scaffold flow
127+
128+
Use this when the designer confirms they are building a **React/PatternFly prototype** under `hpux-prototypes/`. Run after collecting all intake answers.
129+
130+
### 1. Collect remaining inputs (if not already answered)
131+
132+
Before scaffolding, ensure you have:
133+
134+
- **Prototype slug** (kebab-case, e.g. `anna-aaq-v2`) — validate: `^[a-z0-9]+(?:-[a-z0-9]+)*$`
135+
- **Designer notes** — one paragraph: what this design explores, key decisions, open questions
136+
- **First page to review** — path (e.g. `/observe/alerting`) + page name (e.g. "Alert List") + what to look for (optional)
137+
- **Persona name + role** (e.g. name: "Alex", role: "Cluster Admin")
138+
- **Tags** — 2–4 keywords (product area, pattern type, etc.)
139+
- **Design doc URL** and **recording URL** (optional)
140+
141+
### 2. Run the scaffold script
142+
143+
From `hpux-prototypes/`:
144+
145+
```bash
146+
npm run create-prototype <prototype-slug>
147+
```
148+
149+
The script copies `_template/`, patches `prototype.config.ts` with the slug and today's date, and interactively prompts for design notes (you can answer on their behalf or skip — we'll patch directly in the next step).
150+
151+
### 3. Patch prototype.config.ts
152+
153+
After scaffolding, directly edit `hpux-prototypes/src/app/prototypes/<slug>/prototype.config.ts` with all collected values. The full shape is:
154+
155+
```typescript
156+
export const config: PrototypeConfig = {
157+
id: '<slug>',
158+
name: '<Jira summary or designer-provided title>',
159+
description: '<2–3 sentence description from Jira or designer>',
160+
version: '1.0.0',
161+
status: 'in-progress', // from Jira status mapping above
162+
owner: {
163+
name: '<assignee from Jira>',
164+
slack: '@<handle>', // ask if not provided
165+
email: '<name>@redhat.com', // ask if not provided
166+
},
167+
persona: {
168+
name: '<persona name>', // e.g. "Alex"
169+
role: '<role>', // e.g. "Cluster Admin"
170+
},
171+
perspectives: ['core-platforms'],
172+
tags: ['<tag1>', '<tag2>'],
173+
jiraUrl: 'https://redhat.atlassian.net/browse/<JIRA-KEY>',
174+
designDocUrl: '<design doc URL or omit>',
175+
recordingUrl: '<recording URL or omit>',
176+
createdAt: '<YYYY-MM-DD>',
177+
updatedAt: '<YYYY-MM-DD>',
178+
designNotes: {
179+
designerNotes: '<designer notes paragraph>',
180+
navigationGuide: [
181+
{
182+
page: '<page name>',
183+
path: '<route path>',
184+
notes: '<what to look for>', // optional
185+
},
186+
],
187+
},
188+
};
189+
```
190+
191+
> `perspectives` options: `'fleet-management'`, `'fleet-virtualization'`, `'core-platforms'`. Default to `'core-platforms'` unless the prototype is fleet-scoped.
192+
193+
### 4. Add to hub manifest
194+
195+
Append to the `prototypes` array in `hub/src/data/prototypes.manifest.json`:
196+
197+
```json
198+
{
199+
"teamId": "<teamId from product area table>",
200+
"title": "<Jira summary>",
201+
"description": "<2–3 sentence description>",
202+
"persona": "<persona role>",
203+
"author": "<designer full name>",
204+
"updatedAt": "<YYYY-MM-DD>",
205+
"jiraKey": "<JIRA-KEY>",
206+
"jiraUrl": "https://redhat.atlassian.net/browse/<JIRA-KEY>",
207+
"prototypeUrl": "/embed/hpux-prototypes?prototype=<slug>",
208+
"designDocUrl": "<URL or omit field>",
209+
"prototypeRecordingUrl": "<URL or omit field>"
210+
}
211+
```
212+
213+
Do **not** add `jiraIssueStatus` or `jiraIssueRelease` manually — these are populated by `npm run sync:jira-manifest`.
214+
215+
### 5. Show summary
216+
217+
Tell the designer:
218+
- Prototype folder: `hpux-prototypes/src/app/prototypes/<slug>/`
219+
- What to finish: `owner.slack`, `owner.email`, pages under `/pages/`, routes in `routes.tsx`
220+
- Preview locally: `npm start` from `hpux-prototypes/``http://localhost:3000`
221+
- Hub preview: `npm run dev` from `hub/` → prototype appears under the correct team section
222+
- Sync Jira status: `npm run sync:jira-manifest` from `hub/` (needs `~/.jira-token`)
223+
224+
---
225+
61226
## Repo orientation
62227

63228
This monorepo powers the **OpenShift UX Prototypes** hub (`hub/`). Listings are driven by:
@@ -105,7 +270,7 @@ npm run dev # local server with hot reload
105270
npm run build # production build → dist/
106271
```
107272

108-
From `hpux-prototypes/` when editing embeds: use that packages README/scripts (webpack build is wired via hub `build:hpux` when needed).
273+
From `hpux-prototypes/` when editing embeds: use that package's README/scripts (webpack build is wired via hub `build:hpux` when needed).
109274

110275
## Manifest structure
111276

@@ -126,7 +291,7 @@ Append to `prototypes` (and optionally `teams`). Example:
126291
}
127292
```
128293

129-
**Common fields:** `teamId`, `title` (Jira summary), `author`, `updatedAt`, `jiraKey`, `jiraUrl` (browse URL for the same issue), `prototypeUrl`. Optional: `description`, `persona`, **`designDocUrl`** (UX / design doc), **`prototypeRecordingUrl`** (walkthrough or demo recording). Hub cards **always** show both slots; empty fields appear as Not linked until URLs are set. **Do not** add manual `status` / `release`; run **`npm run sync:jira-manifest`** to fill `jiraIssueStatus` and `jiraIssueRelease`. If `jiraKey` / `jiraUrl` are missing or invalid, the hub shows a **Jira ticket needed** warning on the card.
294+
**Common fields:** `teamId`, `title` (Jira summary), `author`, `updatedAt`, `jiraKey`, `jiraUrl` (browse URL for the same issue), `prototypeUrl`. Optional: `description`, `persona`, **`designDocUrl`** (UX / design doc), **`prototypeRecordingUrl`** (walkthrough or demo recording). Hub cards **always** show both slots; empty fields appear as "Not linked" until URLs are set. **Do not** add manual `status` / `release`; run **`npm run sync:jira-manifest`** to fill `jiraIssueStatus` and `jiraIssueRelease`. If `jiraKey` / `jiraUrl` are missing or invalid, the hub shows a **Jira ticket needed** warning on the card.
130295

131296
Valid **`teamId`** values come from the manifest `teams` array (`acs`, `acm`, `virtualization`, …) **or** a `crossProducts` `id` when the prototype belongs on a cross-lane listing (e.g. **`rbac`** for ACM RBAC fleet/tenant/empty-state builds). New product areas need a `teams` entry and icon from `hub/src/iconImports.tsx`; cross-lanes are already defined under `crossProducts` and use the hub route `/cross-product/<id>`.
132297

@@ -138,9 +303,9 @@ All hub **fullscreen** prototype tabs (`/embed/…`) show a **version control**
138303

139304
1. Add or copy the prototype under `hpux-prototypes/src/app/prototypes/<id>/` and register it in the app registry (same as today).
140305
2. In **`hub/src/App.tsx`**, find `HPUX_PROTOTYPE_VERSION_GROUPS`. Either:
141-
- **Add a row** to an existing groups `versions` array (put the newest first; label it with `(latest)`), or
306+
- **Add a row** to an existing group's `versions` array (put the newest first; label it with `(latest)`), or
142307
- **Create a new group** with `backTo`, `backLabel`, and `versions` if this is a new multi-build feature.
143-
- *Existing groups:* Observability alerting (`shiri-alerting-ui-v2` / `shiri-alerting-ui`) and RBAC cross-lane (`fleet-admin-rbac`, `fleet-admin-rbac-v1.1`, `tenant-admin-access`, `acm-empty-states`) — embed back goes to `/cross-product/rbac`. Extend those lists when you add siblings; dont duplicate the in-iframe toolbar (it was removed from `hpux-prototypes`).
308+
- *Existing groups:* Observability alerting (`shiri-alerting-ui-v2` / `shiri-alerting-ui`) and RBAC cross-lane (`fleet-admin-rbac`, `fleet-admin-rbac-v1.1`, `tenant-admin-access`, `acm-empty-states`) — embed "back" goes to `/cross-product/rbac`. Extend those lists when you add siblings; don't duplicate the in-iframe toolbar (it was removed from `hpux-prototypes`).
144309
3. Update **`hub/src/data/prototypes.manifest.json`**: one card per feature is preferred when versions are grouped — set `prototypeUrl` to `/embed/hpux-prototypes?prototype=<id>` using the **default (latest)** registry id, refresh title/description, bump `updatedAt`, adjust `jiraKey` / `jiraUrl` if needed, then run **`npm run sync:jira-manifest`**.
145310
4. Run hub locally and confirm the embed: back link, dropdown labels, and iframe all match.
146311

@@ -172,9 +337,10 @@ Coach them to include:
172337

173338
## Quick reference — decision tree
174339

175-
- **Intake phrase** (I need to add to the design repo) → run **Intake** questions first.
340+
- **Intake phrase** ("I need to add to the design repo") → run **Intake** questions first.
176341
- **Share before merge** → push branch → GitHub Actions publishes hub preview to GitHub Pages (see workflow) + optional draft PR link.
177-
- **New prototype** → branch → implement/register → manifest entry → PR.
342+
- **New hpux prototype** → branch → intake → Jira lookup → scaffold → patch config → manifest entry → PR.
343+
- **New manifest-only listing** → branch → intake → Jira lookup → manifest entry → PR.
178344
- **Update existing** → branch → edit listed files + bump `updatedAt` → PR.
179345
- **New team/area** → add `teams` entry, align `id`/`maintainer`, then prototypes.
180346
- **Hosted outside repo** → deploy elsewhere, set `prototypeUrl` in manifest.

0 commit comments

Comments
 (0)