@pega/sdk 0.0.14 → 0.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/README.md +46 -6
  2. package/dist/index.js +50 -24
  3. package/package.json +42 -3
  4. package/templates/angular-sdk-reference/angular.json +1 -2
  5. package/templates/angular-sdk-reference/extra-webpack.config.cjs +23 -0
  6. package/templates/angular-sdk-reference/index.html +12 -0
  7. package/templates/angular-sdk-reference/package.json +0 -1
  8. package/templates/angular-sdk-reference/src/app/app.component.ts +15 -232
  9. package/templates/angular-sdk-reference/src/app/pconnect-renderer.component.ts +153 -0
  10. package/templates/angular-sdk-reference/src/components/fields/auto-complete/auto-complete.component.ts +58 -21
  11. package/templates/angular-sdk-reference/src/components/fields/checkbox/checkbox.component.ts +8 -3
  12. package/templates/angular-sdk-reference/src/components/fields/currency/currency.component.ts +22 -7
  13. package/templates/angular-sdk-reference/src/components/fields/date-input/date-input.component.ts +19 -6
  14. package/templates/angular-sdk-reference/src/components/fields/dropdown/dropdown.component.ts +24 -7
  15. package/templates/angular-sdk-reference/src/components/fields/email/email.component.ts +19 -6
  16. package/templates/angular-sdk-reference/src/components/fields/integer/integer.component.ts +19 -6
  17. package/templates/angular-sdk-reference/src/components/fields/phone/phone.component.ts +19 -6
  18. package/templates/angular-sdk-reference/src/components/fields/radio-buttons/radio-buttons.component.ts +16 -5
  19. package/templates/angular-sdk-reference/src/components/fields/text-area/text-area.component.ts +19 -6
  20. package/templates/angular-sdk-reference/src/components/fields/text-input/text-input.component.ts +19 -6
  21. package/templates/angular-sdk-reference/src/components/fields/url-input/url-input.component.ts +26 -7
  22. package/templates/angular-sdk-reference/src/components/helpers/sdk-helpers.ts +93 -0
  23. package/templates/angular-sdk-reference/src/components/infra/case-summary/case-summary.component.ts +8 -9
  24. package/templates/angular-sdk-reference/src/components/infra/case-view/case-view.component.ts +24 -12
  25. package/templates/angular-sdk-reference/src/components/infra/root-container/root-container.component.ts +21 -15
  26. package/templates/angular-sdk-reference/src/components/infra/stages/stages.component.ts +21 -10
  27. package/templates/angular-sdk-reference/src/components/infra/view/view.component.ts +14 -9
  28. package/templates/angular-sdk-reference/src/components/templates/default-form/default-form.component.ts +12 -8
  29. package/templates/angular-sdk-reference/tsconfig.app.json +13 -0
  30. package/templates/angular-sdk-reference/tsconfig.json +2 -5
  31. package/templates/react-sdk-reference/.ai-common/agents/embedded-flow-expert.md +65 -31
  32. package/templates/react-sdk-reference/.ai-common/agents/implementation-expert.md +74 -38
  33. package/templates/react-sdk-reference/.ai-common/global/ai-agent-instructions-embedded.md +33 -1
  34. package/templates/react-sdk-reference/.ai-common/global/ai-agent-instructions.md +57 -22
  35. package/templates/react-sdk-reference/.ai-common/instructions/embedded-component.md +25 -10
  36. package/templates/react-sdk-reference/.ai-common/prompts/add-component.md +40 -19
  37. package/templates/react-sdk-reference/.ai-common/prompts/component-manifest.json +55 -1
  38. package/templates/react-sdk-reference/.ai-common/prompts/embedded-component-manifest.md +26 -4
  39. package/templates/react-sdk-reference/.ai-common/prompts/generate-all-components.md +82 -33
  40. package/templates/react-sdk-reference/.ai-common/prompts/generate-dse-components.md +46 -26
  41. package/templates/react-sdk-reference/.ai-common/prompts/generate-embedded-components.md +28 -15
  42. package/templates/react-sdk-reference/.ai-common/prompts/generate-field-components.md +24 -6
  43. package/templates/react-sdk-reference/.ai-common/prompts/generate-infra-components.md +24 -6
  44. package/templates/react-sdk-reference/.ai-common/prompts/generate-template-components.md +24 -6
  45. package/templates/react-sdk-reference/.ai-common/prompts/generate-widget-components.md +24 -6
  46. package/templates/react-sdk-reference/.ai-common/prompts/identify-components.md +2 -0
  47. package/templates/react-sdk-reference/.ai-common/prompts/replace-design-system.md +44 -17
  48. package/templates/react-sdk-reference/.ai-common/skills/connect-pega-server.md +14 -1
  49. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/AssignmentHeader.md +79 -0
  50. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Toast.md +96 -0
  51. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension.md +56 -35
  52. package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/analyze-customer-repo.md +29 -3
  53. package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/run-and-verify-integration.md +97 -37
  54. package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/wire-integration.md +91 -60
  55. package/templates/react-sdk-reference/.ai-common/skills/field-components.md +13 -1
  56. package/templates/react-sdk-reference/.ai-common/skills/infra-components.md +13 -1
  57. package/templates/react-sdk-reference/.ai-common/skills/portal-flow/run-and-verify-portal.md +290 -0
  58. package/templates/react-sdk-reference/.ai-common/skills/template-components.md +13 -1
  59. package/templates/react-sdk-reference/.ai-common/skills/widget-components.md +13 -1
  60. package/templates/react-sdk-reference/assets/icons/trash.svg +3 -0
  61. package/templates/react-sdk-reference/index.html +0 -1
  62. package/templates/react-sdk-reference/package.json +2 -2
  63. package/templates/react-sdk-reference/package.minimal.json +2 -2
  64. package/templates/react-sdk-reference/sdk-config.json +3 -3
  65. package/templates/react-sdk-reference/src/FallbackComponent.tsx +1 -1
  66. package/templates/react-sdk-reference/src/MashupApp.tsx +33 -78
  67. package/templates/react-sdk-reference/src/PortalApp.tsx +23 -100
  68. package/templates/react-sdk-reference/src/components/component-map.ts +15 -1
  69. package/templates/react-sdk-reference/src/components/designSystemExtension/AssignmentHeader/AssignmentHeader.tsx +15 -0
  70. package/templates/react-sdk-reference/src/components/designSystemExtension/AssignmentHeader/index.tsx +1 -0
  71. package/templates/react-sdk-reference/src/components/designSystemExtension/FieldGroup/FieldGroup.tsx +1 -1
  72. package/templates/react-sdk-reference/src/components/designSystemExtension/FieldGroupList/FieldGroupList.tsx +1 -1
  73. package/templates/react-sdk-reference/src/components/designSystemExtension/FieldValueList/FieldValueList.tsx +16 -4
  74. package/templates/react-sdk-reference/src/components/designSystemExtension/ModalDialog/ModalDialog.tsx +26 -0
  75. package/templates/react-sdk-reference/src/components/designSystemExtension/ModalDialog/index.tsx +1 -0
  76. package/templates/react-sdk-reference/src/components/designSystemExtension/Toast/Toast.tsx +35 -0
  77. package/templates/react-sdk-reference/src/components/designSystemExtension/Toast/index.tsx +1 -0
  78. package/templates/react-sdk-reference/src/components/field/AutoComplete/AutoComplete.tsx +362 -24
  79. package/templates/react-sdk-reference/src/components/field/CancelAlert/CancelAlert.tsx +1 -1
  80. package/templates/react-sdk-reference/src/components/field/Checkbox/Checkbox.tsx +3 -1
  81. package/templates/react-sdk-reference/src/components/field/Currency/Currency.tsx +6 -3
  82. package/templates/react-sdk-reference/src/components/field/Date/Date.tsx +2 -1
  83. package/templates/react-sdk-reference/src/components/field/DateTime/DateTime.tsx +2 -1
  84. package/templates/react-sdk-reference/src/components/field/Decimal/Decimal.tsx +4 -3
  85. package/templates/react-sdk-reference/src/components/field/Dropdown/Dropdown.tsx +2 -0
  86. package/templates/react-sdk-reference/src/components/field/Email/Email.tsx +2 -1
  87. package/templates/react-sdk-reference/src/components/field/EmbeddedDataMulti/EmbeddedDataMulti.tsx +121 -0
  88. package/templates/react-sdk-reference/src/components/field/EmbeddedDataMulti/config-ext.json +7 -0
  89. package/templates/react-sdk-reference/src/components/field/EmbeddedDataMulti/index.tsx +1 -0
  90. package/templates/react-sdk-reference/src/components/field/Integer/Integer.tsx +2 -1
  91. package/templates/react-sdk-reference/src/components/field/Location/Location.tsx +1 -1
  92. package/templates/react-sdk-reference/src/components/field/Multiselect/Multiselect.tsx +40 -20
  93. package/templates/react-sdk-reference/src/components/field/ObjectReference/ObjectReference.tsx +554 -49
  94. package/templates/react-sdk-reference/src/components/field/ObjectReference/utils.ts +111 -20
  95. package/templates/react-sdk-reference/src/components/field/Percentage/Percentage.tsx +4 -3
  96. package/templates/react-sdk-reference/src/components/field/Phone/Phone.tsx +2 -1
  97. package/templates/react-sdk-reference/src/components/field/SelectableCard/SelectableCard.tsx +2 -1
  98. package/templates/react-sdk-reference/src/components/field/TextArea/TextArea.tsx +2 -1
  99. package/templates/react-sdk-reference/src/components/field/TextInput/TextInput.tsx +2 -1
  100. package/templates/react-sdk-reference/src/components/field/Time/Time.tsx +2 -1
  101. package/templates/react-sdk-reference/src/components/field/URL/URL.tsx +2 -1
  102. package/templates/react-sdk-reference/src/components/field/UserReference/UserReference.tsx +1 -1
  103. package/templates/react-sdk-reference/src/components/helpers/field-utils.ts +44 -0
  104. package/templates/react-sdk-reference/src/components/helpers/simpleTableHelpers.ts +19 -7
  105. package/templates/react-sdk-reference/src/components/infra/ModalViewContainer/DataViewActionButtons/DataViewActionButtons.tsx +97 -0
  106. package/templates/react-sdk-reference/src/components/infra/ModalViewContainer/DataViewActionButtons/index.tsx +1 -0
  107. package/templates/react-sdk-reference/src/components/infra/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.tsx +53 -0
  108. package/templates/react-sdk-reference/src/components/infra/ModalViewContainer/ListViewActionButtons/index.tsx +1 -0
  109. package/templates/react-sdk-reference/src/components/template/AdvancedSearch/SearchGroups/SearchGroups.tsx +2 -2
  110. package/templates/react-sdk-reference/src/components/template/CaseSummary/CaseSummary.tsx +3 -1
  111. package/templates/react-sdk-reference/src/components/template/DataReference/SearchForm.tsx +4 -4
  112. package/templates/react-sdk-reference/src/components/template/HierarchicalForm/HierarchicalForm.tsx +2 -2
  113. package/templates/react-sdk-reference/src/components/template/InlineDashboard/InlineDashboard.tsx +1 -1
  114. package/templates/react-sdk-reference/src/components/template/ListView/ListView.tsx +7 -3
  115. package/templates/react-sdk-reference/src/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx +173 -99
  116. package/templates/react-sdk-reference/src/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.tsx +63 -56
  117. package/templates/react-sdk-reference/src/components/widget/ToDo/ToDo.tsx +1 -1
  118. package/templates/react-sdk-reference/vite.config.ts +26 -4
  119. package/templates/angular-sdk-reference/pega-constellationjs-0.26.3-local.tgz +0 -0
  120. package/templates/angular-sdk-reference/src/helpers/event-utils.ts +0 -18
  121. package/templates/angular-sdk-reference/src/helpers/utils.ts +0 -38
  122. package/templates/angular-sdk-reference/src/helpers/versionHelpers.ts +0 -14
  123. package/templates/react-sdk-reference/.ai-common/instructions/dse-component.md +0 -47
  124. package/templates/react-sdk-reference/.ai-common/instructions/field-component.md +0 -50
  125. package/templates/react-sdk-reference/.ai-common/instructions/infra-component.md +0 -76
  126. package/templates/react-sdk-reference/.ai-common/instructions/template-component.md +0 -43
  127. package/templates/react-sdk-reference/.ai-common/instructions/widget-component.md +0 -45
  128. package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/authenticate.md +0 -311
  129. package/templates/react-sdk-reference/pega-constellationjs-0.26.3-local.tgz +0 -0
  130. package/templates/react-sdk-reference/pega-sdk-react-0.1.0.tgz +0 -0
@@ -6,7 +6,17 @@ ai-description: Replace design system components — full app, by scope/folder,
6
6
 
7
7
  Replace the current design system in this application with **{{designSystem}}**.
8
8
 
9
- > **Before doing anything else:** if `{{designSystem}}` is empty or not provided, stop immediately and ask the user: _"Which design system should I migrate to? (e.g. Ant Design, Carbon Design System, Chakra UI)"_ — do not proceed with any migration steps until it is provided.
9
+ > **Before doing anything else:** if `{{designSystem}}` is empty or not provided, stop immediately and ask the user: _"Which style kit should I switch the screens to? (A style kit is a ready-made set of buttons, inputs, and layouts — e.g. Ant Design, Carbon Design System, Chakra UI)"_ — list any UI libraries already in the project's dependency list first, marked as already in the project, and never choose one on the user's behalf. Do not proceed with any migration steps until it is provided.
10
+
11
+ ## Progress milestones
12
+
13
+ Announce these to the user as you reach them, in plain words and with a counter — "Step 3 of 4 — Updating the components". Inside milestone 3, count the batches as well — "batch 2 of 9".
14
+
15
+ 1. **Working out what to update** — Step 0
16
+ 2. **Preparing your design system** — T1 (targeted) or Phase 1 (full)
17
+ 3. **Updating the components** — T2 (targeted) or Phase 2 (full)
18
+ 4. **Tidying up and checking the app builds** — T3 (targeted) or Phase 3 (full)
19
+ 5. **Trying it out** — T3 step 4 (targeted) or 3.6 (full)
10
20
 
11
21
  ---
12
22
 
@@ -33,12 +43,16 @@ Produce a list of SDK component names visible across **all** screenshots, then u
33
43
 
34
44
  Resolve each name against the manifest's `components` map to get its path and category.
35
45
 
46
+ If a name is in everyday words ("date picker", "the buttons at the bottom"), resolve it first through the manifest's `aliases`, then its `behaviorClasses`, and confirm the match with the user. If nothing matches, ask the user which piece they mean.
47
+
36
48
  ---
37
49
 
38
50
  ### Source C — `scope` param provided
39
51
 
40
52
  > Applies when: `{{scope}}` is provided
41
53
 
54
+ **If `{{scope}}` is a plain phrase** (e.g. "the form fields", "only the forms", "the whole app"): look it up case-insensitively in `manifest.scopeAliases` (ignore a leading "only" or "the") and use the value it maps to as the scope below. If it maps to `all`, the user wants every component — treat this source as empty and, when no other source applies, run the [Full Migration (9 waves)](#full-migration). If the phrase is not listed, work out the group from what it describes — things people type into or pick from → `field`; how a page or form is laid out → `template`; boxes that show lists, files, or history → `widget`; messages, titles, and read-only values → `designSystemExtension`; the buttons and step progress around a form → `infra` — and confirm it in plain words ("By 'the bits people type into', I think you mean the form fields — right?"). If it could mean more than one group, or none, ask the user in plain words which group they mean, offering the plain group names from `scopeAliases`.
55
+
42
56
  **If `{{scope}}` is a folder name** (one of `field`, `template`, `widget`, `infra`, `designSystemExtension`):
43
57
  Read every entry under `manifest.components["{{scope}}"]` — that is the full component list for this source.
44
58
 
@@ -148,6 +162,7 @@ Use the tables below to map what you see in an attached image to SDK component n
148
162
  | What you see | SDK component name | Category |
149
163
  | ------------------------------------------------------------ | ------------------- | --------------------- |
150
164
  | Coloured banner alert bar (info / warning / error / success) | `AlertBanner` | designSystemExtension |
165
+ | Step title text directly above an assignment's form fields | `AssignmentHeader` | designSystemExtension |
151
166
  | Hero-style banner with title + CTA button | `Banner` | designSystemExtension |
152
167
  | Read-only field+value pairs in a case summary | `CaseSummaryFields` | designSystemExtension |
153
168
  | Read-only label+value pairs in a details view | `DetailsFields` | designSystemExtension |
@@ -156,6 +171,7 @@ Use the tables below to map what you see in an attached image to SDK component n
156
171
  | User operator info popover (name + contact) | `Operator` | designSystemExtension |
157
172
  | Comment/pulse card with avatar + timestamp | `Pulse` | designSystemExtension |
158
173
  | Rich text editor with theme-aware toolbar | `RichTextEditor` | designSystemExtension |
174
+ | Short dark message at the screen edge with a close (×) icon | `Toast` | designSystemExtension |
159
175
  | Quick-create shortcut links list (WSS sidebar) | `WssQuickCreate` | designSystemExtension |
160
176
 
161
177
  ### Recognition rules
@@ -197,7 +213,8 @@ Most design systems require a root provider/context wrapper for any component in
197
213
 
198
214
  Check whether `{{designSystem}}` requires one. If yes:
199
215
 
200
- - Add it to **both** `src/MashupApp.tsx` **and** `src/PortalApp.tsx` — wrapping the existing provider tree
216
+ - Add it to `src/AppProviders.tsx`, the shared root provider that both `src/MashupApp.tsx` and `src/PortalApp.tsx` wrap around the Pega root — wrapping the existing provider tree
217
+ - The runtime provider's loading, error and logged-out states render **outside** `AppProviders`, so do not build them from {{designSystem}} primitives that need its provider
201
218
  - Do this **before** launching any subagents, regardless of how few components are being migrated
202
219
  - Do **not** remove any existing providers (MUI providers may still be needed by unmigrated components)
203
220
 
@@ -215,7 +232,7 @@ interface FieldValueListProps {
215
232
  ```
216
233
 
217
234
  **T1.5 — Update providers for full-app scopes (if `template` or `infra` components are in the list)**
218
- If `CaseView`, `AppShell`, `MashupApp`, or `PortalApp` are in the list, replace the old design system's `ThemeProvider` in `src/MashupApp.tsx` and `src/PortalApp.tsx` with {{designSystem}}'s provider.
235
+ If `CaseView`, `AppShell`, `MashupApp`, or `PortalApp` are in the list, replace the old design system's `ThemeProvider` in `src/AppProviders.tsx` with {{designSystem}}'s provider.
219
236
 
220
237
  ### T2 — Migrate components (parallel subagents, ≤10 at a time)
221
238
 
@@ -226,6 +243,7 @@ For each component in the resolved list, launch a subagent:
226
243
 
227
244
  If the list has ≤10 components, launch all at once.
228
245
  If the list has >10 components, batch into waves of ≤10 and wait for each wave before starting the next.
246
+ If your AI tool cannot run sub-agents, migrate the same components yourself, one at a time, in the same order and with the same instructions.
229
247
 
230
248
  ### T3 — Cleanup
231
249
 
@@ -234,14 +252,15 @@ After all subagents complete:
234
252
  1. Search for any remaining imports of the old design system in the migrated files — fix stragglers
235
253
  2. Run `npm run build` — fix ALL TypeScript errors until clean
236
254
  3. If providers were updated, run `npm run dev` and verify the app loads
255
+ 4. Read and execute `{{SKILL_DIR}}/portal-flow/run-and-verify-portal{{SKILL_EXT}}`, handing it the migrated components, and report its verification summary
237
256
 
238
257
  ---
239
258
 
240
259
  ## Full Migration
241
260
 
242
- > Used by Rule 4 only. Migrates all 81 components across 9 waves.
261
+ > Used by Rule 4 only. Migrates all 83 components across 9 waves.
243
262
 
244
- > **Why 9 waves of 10?** Launching more than ~10 subagents simultaneously triggers rate-limit errors. Waves of 10 stay safely within the limit while still being ~10× faster than fully sequential execution. **Never launch the next wave until every subagent in the current wave has finished.**
263
+ > **Why 9 waves of 10?** Launching more than ~10 subagents simultaneously triggers rate-limit errors. Waves of 10 stay safely within the limit while still being ~10× faster than fully sequential execution. **Never launch the next wave until every subagent in the current wave has finished.** If your AI tool cannot run sub-agents, migrate each wave's components yourself, one at a time, in the same wave order.
245
264
 
246
265
  ### Phase 1: Setup (sequential — blocks everything else)
247
266
 
@@ -272,7 +291,7 @@ Most design systems require a root provider/context wrapper for any component in
272
291
 
273
292
  Check whether `{{designSystem}}` requires one. If yes:
274
293
 
275
- - Add it to **both** `src/MashupApp.tsx` **and** `src/PortalApp.tsx` — wrapping the existing provider tree
294
+ - Add it to `src/AppProviders.tsx`, the shared root provider that both `src/MashupApp.tsx` and `src/PortalApp.tsx` wrap around the Pega root — wrapping the existing provider tree
276
295
  - Do **not** remove any existing providers (MUI providers are still needed by unmigrated components)
277
296
 
278
297
  ### 1.4 Replace FieldValueList (blocking dependency for all fields)
@@ -291,7 +310,7 @@ interface FieldValueListProps {
291
310
 
292
311
  ### 1.5 Update provider files for full migration
293
312
 
294
- Replace MUI's `ThemeProvider` / `LegacyThemeProvider` in `src/MashupApp.tsx` and `src/PortalApp.tsx` with {{designSystem}}'s provider. Remove `LocalizationProvider` from `@mui/x-date-pickers` only if {{designSystem}} provides its own date picker.
313
+ Replace MUI's `ThemeProvider` / `LegacyThemeProvider` in `src/AppProviders.tsx` with {{designSystem}}'s provider. Remove `LocalizationProvider` from `@mui/x-date-pickers` only if {{designSystem}} provides its own date picker.
295
314
 
296
315
  ---
297
316
 
@@ -454,18 +473,22 @@ Each uses prompt: **`replace-component`** with `componentCategory` = `widget`, `
454
473
 
455
474
  ---
456
475
 
457
- ### Wave 9 — Infra (6 subagents)
476
+ ### Wave 9 — Infra + DSE batch 3 (8 subagents)
477
+
478
+ Infra use prompt: **`replace-component`** with `componentCategory` = `infra` | DSE use prompt: **`replace-component`** with `componentCategory` = `designSystemExtension`, `designSystem` = **{{designSystem}}**
458
479
 
459
- Each uses prompt: **`replace-component`** with `componentCategory` = `infra`, `designSystem` = **{{designSystem}}**
480
+ | # | `componentName` | `componentPath` | MUI to replace |
481
+ | --- | ---------------- | ----------------------------------------- | ----------------------------------------------- |
482
+ | 76 | ActionButtons | `infra/ActionButtons/` | `Button`, `Stack`, `Divider` |
483
+ | 77 | DashboardFilter | `infra/DashboardFilter/` | `Select`, `MenuItem`, `Box` |
484
+ | 78 | DeferLoad | `infra/DeferLoad/` | `CircularProgress`, `Box` |
485
+ | 79 | NavBar | `infra/NavBar/` | `AppBar`, `Toolbar`, `Button`, `Menu`, `Avatar` |
486
+ | 80 | Stages | `infra/Stages/` | `Stepper`, `Step`, `StepLabel`, `makeStyles` |
487
+ | 81 | VerticalTabs | `infra/VerticalTabs/` | `Tabs`, `Tab`, `Box` |
488
+ | 82 | AssignmentHeader | `designSystemExtension/AssignmentHeader/` | `Typography` |
489
+ | 83 | Toast | `designSystemExtension/Toast/` | `Snackbar`, `IconButton`, `CloseIcon` |
460
490
 
461
- | # | `componentName` | `componentPath` | MUI to replace |
462
- | --- | --------------- | ------------------------ | ----------------------------------------------- |
463
- | 76 | ActionButtons | `infra/ActionButtons/` | `Button`, `Stack`, `Divider` |
464
- | 77 | DashboardFilter | `infra/DashboardFilter/` | `Select`, `MenuItem`, `Box` |
465
- | 78 | DeferLoad | `infra/DeferLoad/` | `CircularProgress`, `Box` |
466
- | 79 | NavBar | `infra/NavBar/` | `AppBar`, `Toolbar`, `Button`, `Menu`, `Avatar` |
467
- | 80 | Stages | `infra/Stages/` | `Stepper`, `Step`, `StepLabel`, `makeStyles` |
468
- | 81 | VerticalTabs | `infra/VerticalTabs/` | `Tabs`, `Tab`, `Box` |
491
+ > Note: #82 and #83 use `componentCategory` = `designSystemExtension`
469
492
 
470
493
  ---
471
494
 
@@ -507,6 +530,10 @@ Run `npm run dev` and exercise:
507
530
 
508
531
  If any `ReferenceError: X is not defined` appears in the console, a component was removed from imports but its JSX usage was not updated. Fix and re-verify.
509
532
 
533
+ ### 3.6 Try the portal
534
+
535
+ Read and execute `{{SKILL_DIR}}/portal-flow/run-and-verify-portal{{SKILL_EXT}}`, handing it the migrated components, and report its verification summary.
536
+
510
537
  ---
511
538
 
512
539
  ## Critical Rules — NEVER violate these
@@ -64,6 +64,19 @@ Equivalent values across sources are not conflicts; consolidate them without ask
64
64
 
65
65
  After reading all sources, make the first user interaction complete. Show a status table for every applicable field, using only **configured**, **missing**, or **conflicting**. For the client secret, show presence only.
66
66
 
67
+ Label the fields in that table in plain words — Pega server address, application alias, MCP rule name, MCP rule key, client ID (the public identifier for your app's sign-in), and MCP client secret. Keep the exact configuration keys for item 2 below, where the user needs them to edit files.
68
+
69
+ For each missing value, add one plain sentence saying what it is and who usually has it, so a user who does not know the term can still find it:
70
+
71
+ - **Pega server address** (server URL) — the web address you open to sign in to Pega, up to and including `/prweb`.
72
+ - **Application alias** — the short ID of your Pega application in its web address: the part after `/app/`, for example `citizen-experience` in `…/prweb/app/citizen-experience/`. It is not the application's display name. You can see it in the browser address after you sign in.
73
+ - **MCP rule name** (MCP rule) — the ID of the Service MCP rule your Pega team set up so this assistant can read your application, shown at the top of that rule, for example `AgenticSDKMCP`.
74
+ - **MCP rule key** (MCP rule instance key) — the last part of that Service MCP rule's **Service endpoint URL**, after `/mcp/`, for example `citizen-experience`. Ask your Pega administrator if you cannot open the rule.
75
+ - **Client ID** — the public ID of the sign-in registration for your app. Your Pega administrator can find it in the app's OAuth 2.0 client registration.
76
+ - **MCP client secret** — a private password for that connection. Ask your Pega administrator, and put it only in a private environment file, never in chat.
77
+
78
+ If the user does not know a value, suggest they ask their Pega administrator for it, and keep every other answer they have already given.
79
+
67
80
  In that same response:
68
81
 
69
82
  1. Ask for every missing or conflict-resolved **non-secret** value as one batch. The user may provide these values directly in chat.
@@ -102,6 +115,6 @@ After writing, re-read both active files and repeat the inventory check. Continu
102
115
 
103
116
  ## 6. Continue or reconnect
104
117
 
105
- - If the MCP config changed, tell the user it must be reloaded or reconnected before a Pega data source can run, then stop. Ask them to retry the original request; the invoking workflow must rerun this gate first. If MCP tools were started or attached after the conversation began and are not bound to this session, tell the user to start a new chat session.
118
+ - If the MCP config changed, tell the user it must be reloaded or reconnected before a Pega data source can run, then stop. Ask them to retry the original request; the invoking workflow must rerun this gate first. If MCP tools were started or attached after the conversation began and are not bound to this session, tell the user to start a new chat session. Say it in plain words — for example: "Your Pega connection details are saved. Restart the Pega connection in your editor (or open a new chat), then ask me again."
106
119
  - If only `sdk-config.json` changed and the MCP connection is already available to the conversation, continue the invoking workflow without requiring an unnecessary MCP reconnect.
107
120
  - If neither file needed changes, continue immediately.
@@ -0,0 +1,79 @@
1
+ # Skill: AssignmentHeader
2
+
3
+ Heading that shows the name of the current assignment step above the case form.
4
+
5
+ > **Prerequisite skill:** [`design-system-extension.md`](../design-system-extension.md) — covers architecture, input contracts, styling patterns, and registration patterns common to ALL DSE components.
6
+
7
+ ---
8
+
9
+ ## Component Purpose
10
+
11
+ Renders the title of the step the user is working on — for example "Collect customer details" — directly above the form fields. The SDK's flow container works out the title from the assignment and localizes it, then asks the registry for `AssignmentHeader` to draw it. This component only draws the text; it never decides whether a title exists or what it says.
12
+
13
+ ## Pega Metadata
14
+
15
+ - **Registration key:** `AssignmentHeader` (in the project's component map)
16
+ - **SDK lookup, not a Pega view component** — Pega never sends this name in view metadata. The SDK's flow container resolves it from the registry, and falls back to its own built-in heading when nothing is registered.
17
+ - **Does NOT use `getPConnect`** — receives all data as direct inputs
18
+
19
+ ## Component Inputs
20
+
21
+ The component accepts the following inputs. Define the input contract using the project's framework conventions for your target stack.
22
+
23
+ | Name | Type | Required | Description |
24
+ | ------- | -------- | -------- | --------------------------------------------- |
25
+ | `title` | `string` | Yes | The assignment step's name, already localized |
26
+
27
+ ## Implementation Structure
28
+
29
+ ### Module Setup
30
+
31
+ The component does NOT import any Pega SDK modules — the title arrives as a direct input. It needs only the design system's typography or heading primitive.
32
+
33
+ The component is named `AssignmentHeader` and accepts the input listed in the table above. Define the input contract and export the component following the project's framework conventions.
34
+
35
+ ### Component Logic
36
+
37
+ 1. Render `title` as a section heading, using the design system's heading or title typography at the level the project uses for a form or card title.
38
+ 2. Give the root element the DOM id `assignment-header`, so tests and automation can find it.
39
+ 3. Leave space below the heading before the form begins, using the project's spacing scale.
40
+
41
+ ## Behavioral Contract
42
+
43
+ 1. **Display only** — render `title` exactly as received. Do not localize it again, change its case, or truncate it.
44
+ 2. **No visibility logic** — the SDK renders this component only when a title exists. Do not add a separate check that hides an empty title, and do not render a placeholder.
45
+ 3. **Heading only** — render the heading and nothing else. The form, its messages, and its buttons are rendered by the SDK around this component and are never wrapped by it.
46
+ 4. **Root id** — the root element carries the id `assignment-header`.
47
+
48
+ ## Visual Specifications
49
+
50
+ Derived from the SDK's built-in heading:
51
+
52
+ | Property | Value |
53
+ | ------------- | ------------------------------------------------ |
54
+ | Font size | 1.2rem (or the design system's form-title size) |
55
+ | Font weight | 600 (or the design system's title weight) |
56
+ | Margin bottom | 1rem (or the design system's equivalent spacing) |
57
+ | Font family | Inherited — never set a font family of its own |
58
+ | Color | Inherited primary text color |
59
+
60
+ **CSS-only implementation notes:**
61
+
62
+ - Use a native heading element with the project's heading class, or a `<div>` styled as above.
63
+ - Long titles wrap onto further lines; they never truncate or overflow their container.
64
+
65
+ ## Edge Cases & Special Logic
66
+
67
+ - Long titles wrap rather than truncate.
68
+ - The title may contain characters from any language — do not transform it.
69
+
70
+ ## Dependencies
71
+
72
+ - No Pega SDK imports required (no `getPConnect`)
73
+ - No helper utilities required
74
+
75
+ ## Design System Mapping
76
+
77
+ **UI control type:** Heading / title text.
78
+
79
+ When implementing in a specific design system, use the DS's typography or heading component at the level the project uses for a form or card title — for example a level-6 heading style. If the DS has no typography component, use a native heading element styled with the project's typography tokens.
@@ -0,0 +1,96 @@
1
+ # Skill: Toast
2
+
3
+ Short notification shown after an assignment action fails — for example "Save failed" or "Cancel failed!". It closes itself after a few seconds, or when the user closes it.
4
+
5
+ > **Prerequisite skill:** [`design-system-extension.md`](../design-system-extension.md) — covers architecture, input contracts, styling patterns, and registration patterns common to ALL DSE components.
6
+
7
+ ---
8
+
9
+ ## Component Purpose
10
+
11
+ Renders a transient message near the edge of the screen. The SDK's assignment component decides when to show it and what it says, then asks the registry for `Toast` to draw it. This component draws the message, a close button, and handles the automatic close — it never decides when to appear or what to say.
12
+
13
+ ## Pega Metadata
14
+
15
+ - **Registration key:** `Toast` (in the project's component map)
16
+ - **SDK lookup, not a Pega view component** — Pega never sends this name in view metadata. The SDK's assignment component resolves it from the registry, and falls back to its own built-in notification when nothing is registered.
17
+ - **Does NOT use `getPConnect`** — receives all data as direct inputs
18
+
19
+ ## Component Inputs
20
+
21
+ The component accepts the following inputs. Define the input contract using the project's framework conventions for your target stack.
22
+
23
+ | Name | Type | Required | Description |
24
+ | ------------------ | ---------- | -------- | ------------------------------------------------------------------ |
25
+ | `open` | `boolean` | Yes | Whether the notification is visible |
26
+ | `message` | `string` | Yes | The text to show, already localized |
27
+ | `onClose` | `function` | Yes | Called with no arguments when the notification should close |
28
+ | `autoHideDuration` | `number` | No | Milliseconds before the notification closes itself. Default `3000` |
29
+
30
+ ## Implementation Structure
31
+
32
+ ### Module Setup
33
+
34
+ The component does NOT import any Pega SDK modules — all data arrives via direct inputs. It needs the design system's notification primitive (snackbar, toast, or equivalent) and an icon button for closing.
35
+
36
+ The component is named `Toast` and accepts the inputs listed in the table above. Define the input contract and export the component following the project's framework conventions.
37
+
38
+ ### Component Logic
39
+
40
+ 1. Render the design system's notification primitive, visible only while `open` is true, showing `message` as its content.
41
+ 2. Add a close button inside the notification: an icon-only button with a close (×) icon, the accessible label `close`, and the notification's text color. Activating it calls `onClose`.
42
+ 3. **Automatic close** — while `open` is true, call `onClose` once `autoHideDuration` milliseconds have passed. Restart that countdown whenever `message` changes. When the design system's primitive offers a built-in auto-hide duration, use it rather than a separate timer.
43
+ 4. **Outside clicks** — clicking or tapping elsewhere on the page must not close the notification. If the design system's primitive closes on outside clicks by default, ignore that close reason and keep it open.
44
+
45
+ ## Behavioral Contract
46
+
47
+ 1. **Visibility is owned by the SDK** — show the notification only when `open` is true. Never open it by itself, and never keep it open after `open` becomes false.
48
+ 2. **Close paths** — exactly two: the close button, and the automatic close after `autoHideDuration`. Both call `onClose`; neither changes `open` directly.
49
+ 3. **Outside clicks are ignored.**
50
+ 4. **Message is displayed as received** — do not localize, prefix, or truncate it.
51
+ 5. **Accessibility** — the notification is announced to assistive technology as an alert, and the close button carries the accessible label `close`.
52
+
53
+ ## Visual Specifications
54
+
55
+ Derived from the SDK's built-in notification:
56
+
57
+ | Property | Value |
58
+ | ------------- | ------------------------------------------------------------- |
59
+ | Position | Fixed, bottom centre of the viewport, above all other content |
60
+ | Background | Dark neutral (`#333`), or the design system's inverse surface |
61
+ | Text color | White, or the design system's on-inverse text color |
62
+ | Padding | `0.75rem 1.5rem` |
63
+ | Border radius | `0.375rem`, or the design system's notification radius |
64
+ | Font size | `0.875rem` |
65
+ | Layout | Message and close button in a row, with a small gap |
66
+
67
+ **CSS-only implementation notes:**
68
+
69
+ - Root: `position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 0.75rem; z-index` above dialogs.
70
+ - Close button: no border or background, inherits the text color, pointer cursor.
71
+ - When the project already shows notifications in a different position or style, follow the project's convention instead.
72
+
73
+ ## Edge Cases & Special Logic
74
+
75
+ - A second message while one is showing replaces the text and restarts the countdown.
76
+ - Long messages wrap inside the notification; they never overflow the screen.
77
+
78
+ ## Dependencies
79
+
80
+ - No Pega SDK imports required (no `getPConnect`)
81
+ - No helper utilities required
82
+
83
+ ## Design System Mapping
84
+
85
+ **UI control type:** Snackbar / toast notification.
86
+
87
+ When implementing in a specific design system, map the following:
88
+
89
+ - `open` → the DS notification's open / visible input
90
+ - Position → bottom centre of the viewport. Many notification primitives default to bottom-left or top-right, so set the anchor or placement input explicitly
91
+ - `message` → the DS notification's message or content
92
+ - `autoHideDuration` → the DS notification's auto-hide or duration input
93
+ - `onClose` → the DS notification's close handler, filtered so an outside-click close reason is ignored
94
+ - Close button → the DS notification's action slot, holding a small icon button with a close icon
95
+
96
+ If the DS has no notification component, use a `<div role="alert">` positioned as described above, with a timer for the automatic close.
@@ -1,6 +1,6 @@
1
1
  # Skill: Design System Extension (DSE) Components
2
2
 
3
- Create or replace Design System Extension components in the project. DSE components are display-focused presentational components that render structured data without direct PConnect binding. Some receive `getPConnect`, others receive only display inputs.
3
+ Create or replace Design System Extension components in the project. DSE components are display-focused presentational components that render structured data without direct PConnect binding. None of them calls `getPConnect()` itself — they receive display inputs, ready-rendered children, or (DetailsFields only) field entries that carry their own accessor.
4
4
 
5
5
  ---
6
6
 
@@ -19,19 +19,28 @@ Each DSE component lives in its own folder under the project's design-system-ext
19
19
 
20
20
  ## Input Contract
21
21
 
22
- DSE components have varying input patterns:
22
+ DSE components have varying input patterns. The component-specific skill file is the authority on each component's exact inputs.
23
23
 
24
- ### Pattern A: With PConnect (data-aware display)
24
+ ### Pattern A: Data display (no accessor of its own)
25
25
 
26
- The component's input contract extends the project's base component interface, which provides `getPConnect()` — a function returning the PConnect API object — in addition to its own custom inputs. Example: a field-value display component extending the base interface with additional fields like `name`, `value`, and `variant`.
26
+ Used for: FieldValueList, CaseSummaryFields, DetailsFields
27
+
28
+ The component's input contract is standalone — it does NOT extend the base component interface, and the component never calls `getPConnect()`. It receives the data to show as direct inputs: FieldValueList takes `name`, `value`, and `variant`; CaseSummaryFields takes pre-processed field descriptors. DetailsFields is the one variation: each entry in its `fields` input carries its own `getPConnect()`, which it uses only to render that entry through the project's PConnect bridge utility.
27
29
 
28
30
  ### Pattern B: Without PConnect (pure presentation)
29
31
 
30
- The component's input contract is standalone — it does NOT extend the base component interface. All rendering data arrives via direct inputs. Example: an alert-banner component with fields like `variant`, `heading`, `messages`, and `onClose`.
32
+ Used for: AlertBanner, AssignmentHeader, Banner, Operator, Toast, WssQuickCreate
33
+
34
+ The component's input contract is standalone — it does NOT extend the base component interface. All rendering data arrives via direct inputs. Example: an alert-banner component with fields like `variant`, `messages`, and an optional `onDismiss`. Operator's type may extend the base interface for typing, but it never calls `getPConnect()`.
31
35
 
32
- ### Pattern C: Extended field input contract (display-only fields)
36
+ ### Pattern C: Complex display (no accessor of its own)
33
37
 
34
- The component's input contract extends the project's field input contract, which provides standard field-level inputs (`label`, `value`, `displayMode`, `required`, `disabled`, `readOnly`, `status`, `validatemessage`, `helperText`, `hideLabel`, `placeholder`, `testId`) plus `getPConnect()`. The component adds its own domain-specific inputs on top. Example: a rich-text-editor component extending the field input contract with an additional `content` field.
38
+ Used for: FieldGroup, FieldGroupList, Pulse, RichTextEditor
39
+
40
+ The component's input contract is standalone and never calls `getPConnect()` or `getChildren()`.
41
+
42
+ - **FieldGroup, FieldGroupList, Pulse** receive children their caller has already rendered: the calling template or field resolves the Pega children, renders them through the PConnect bridge, and passes the result in — FieldGroup and Pulse as their children, FieldGroupList as `items[].children`.
43
+ - **RichTextEditor** declares field-like inputs directly — `label`, `defaultValue`, `placeholder`, `disabled`, `required`, `readOnly`, `error`, `testId`, `onChange`, `onBlur`, and similar — without extending the base component or field interface. The field component that uses it owns the value and the commit.
35
44
 
36
45
  ---
37
46
 
@@ -39,14 +48,14 @@ The component's input contract extends the project's field input contract, which
39
48
 
40
49
  ### Pure Display Component (no PConnect)
41
50
 
42
- Used for: AlertBanner, Banner, Operator
51
+ Used for: AlertBanner, Banner, Operator. `AssignmentHeader` and `Toast` are also pure display, but follow their own skill files — they render a heading and a notification rather than an alert.
43
52
 
44
53
  This pattern is design-system agnostic. The variant-mapping logic and message normalisation are always the same — only the final rendered output changes based on the chosen design system (see "Design System Adaptation" below).
45
54
 
46
55
  **Structure:**
47
56
 
48
57
  1. **Use** the design system's alert/notification primitive as the visual foundation.
49
- 2. **Define the input contract** (Pattern B — no PConnect). Include the Pega-facing inputs: `variant`, `heading`/`messages`, and an optional close/dismiss handler.
58
+ 2. **Define the input contract** (Pattern B — no PConnect). Include the Pega-facing inputs the component's skill file lists — for AlertBanner: `variant`, `messages`, and an optional dismiss handler.
50
59
  3. **Define a variant map** at module level — a plain lookup mapping Pega variant strings (`urgent`, `warning`, `info`, `success`) to the design system's equivalent severity/type value. Unknown variants fall back to `info`.
51
60
  4. **Define a message normaliser** — a helper function that accepts either a plain string or an object (`{ label?, description? }`) and returns formatted content. Pega may send either format.
52
61
  5. **Render** using the design system's alert primitive. Pass the mapped severity as the type/severity/status input. Wire the dismiss handler to the design system's close input only if provided. Render message content inside the alert body.
@@ -57,22 +66,20 @@ Used for: FieldValueList, CaseSummaryFields, DetailsFields
57
66
 
58
67
  **Structure:**
59
68
 
60
- 1. **Define the input contract** (Pattern A — extends the project's base component interface) with fields for `name` (optional string), `value` (any), and `variant` (optional — `'stacked'` or `'inline'`, defaulting to `'inline'`).
69
+ 1. **Define the input contract** (Pattern A — standalone, no `getPConnect`) with fields for `name` (optional string), `value` (any), and `variant` (optional — `'stacked'` or `'inline'`, defaulting to `'inline'`). Every field component renders its display-only mode through this component with exactly these inputs, so never make it require an accessor.
61
70
  2. **Stacked variant** — when `variant` is `'stacked'`, render the label on its own line above the value. The value should use a larger/emphasized typography style.
62
71
  3. **Inline variant** (default) — render the label and value side by side. The label occupies roughly 1/3 width, value occupies 2/3. If `name` is not provided, render only the value at full width.
63
72
  4. **Empty value handling** — if `value` is undefined or an empty string, display a placeholder (`'---'`).
64
73
 
65
- ### Complex Display Component (with PConnect for data)
74
+ ### Complex Display Component (children from the caller)
66
75
 
67
76
  Used for: FieldGroup, FieldGroupList, Pulse
68
77
 
69
78
  **Structure:**
70
79
 
71
- 1. **Define the input contract** (Pattern A — extends the project's base component interface) with component-specific fields (e.g., `label`, `showLabel`).
72
- 2. **Obtain the PConnect instance** by calling `getPConnect()` from the component's inputs.
73
- 3. **Retrieve children** via `pConn.getChildren()` — this returns an array of child component configurations from the Pega engine.
74
- 4. **Render children dynamically** — iterate over the children array and render each child configuration using the project's PConnect bridge utility, keyed uniquely. This bridges the Pega component tree into the chosen framework's rendering model.
75
- 5. **Wrap in semantic HTML** — use appropriate semantic elements (e.g., `<fieldset>` with `<legend>` for grouped fields). Conditionally show labels based on the `showLabel` input.
80
+ 1. **Define the input contract** (Pattern C — standalone, no `getPConnect`) with the inputs the component's skill file lists — for example FieldGroup's `name`, `collapsible`, and `instructions`, or FieldGroupList's `items`, `onAdd`, and `onDelete`.
81
+ 2. **Render the children you are given** — the caller has already resolved the Pega children and rendered them through the PConnect bridge. Never call `getPConnect()` or `getChildren()` here.
82
+ 3. **Wrap in semantic HTML** — use appropriate semantic elements (e.g., `<fieldset>` with `<legend>` for grouped fields), showing the group name as the legend when one is given.
76
83
 
77
84
  ---
78
85
 
@@ -105,15 +112,15 @@ If the chosen design system provides built-in spacing, typography, or layout inp
105
112
 
106
113
  DSE components fall into three patterns with different DS dependencies:
107
114
 
108
- | Pattern | Examples | DS needed? |
109
- | ----------------------------------------- | ------------------------------------------------ | -------------------------------------------------- |
110
- | **B — Pure display** (no PConnect) | AlertBanner, Banner, Operator, WssQuickCreate | Yes — DS provides alert/card/avatar primitives |
111
- | **A — PConnect display** | CaseSummaryFields, DetailsFields, FieldValueList | Minimal — CSS-based layout; DS typography optional |
112
- | **C — Complex display** (PConnect bridge) | FieldGroup, FieldGroupList, Pulse | No — PConnect bridge is DS-agnostic; semantic HTML |
115
+ | Pattern | Examples | DS needed? |
116
+ | ------------------------------------------------ | ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
117
+ | **B — Pure display** (no PConnect) | AlertBanner, AssignmentHeader, Banner, Operator, Toast, WssQuickCreate | Yes — DS provides alert/card/avatar/heading/notification primitives |
118
+ | **A — Data display** (no accessor of its own) | CaseSummaryFields, DetailsFields, FieldValueList | Minimal — CSS-based layout; DS typography optional |
119
+ | **C — Complex display** (no accessor of its own) | FieldGroup, FieldGroupList, Pulse, RichTextEditor | No — semantic HTML around the children it is given; RichTextEditor wraps its editor library |
113
120
 
114
121
  The component-specific skill file specifies which pattern applies.
115
122
 
116
- **1. Check the component-specific skill file** — `{{SKILL_DIR}}/design-system-extension-skills/<ComponentName>.md` contains a **Design System Mapping** table where available.
123
+ **1. Check the component-specific skill file** — `{{SKILL_DIR}}/design-system-extension-skills/<ComponentName>{{SKILL_EXT}}` contains a **Design System Mapping** table where available.
117
124
 
118
125
  **2. If the chosen design system is not listed** — use the component purpose and pattern category above to pick the closest DS primitive.
119
126
 
@@ -130,6 +137,18 @@ The component-specific skill file specifies which pattern applies.
130
137
 
131
138
  ---
132
139
 
140
+ ## Visual Preservation
141
+
142
+ When replacing an existing implementation, the replacement must look the same as the original:
143
+
144
+ 1. **Read the component's companion style file first** (for example a `.css` file in its folder). Note every class's visual intent — spacing, sizing, colours, and layout.
145
+ 2. Reproduce that intent through the new design system's inputs or variants, inline styles, or by keeping the style import — whichever gives the closest match.
146
+ 3. Never silently drop legacy styling utility classes — map each one to an equivalent style.
147
+
148
+ In the embedded flow there is no original to preserve: the customer's look, recorded in the Design Profile, decides instead.
149
+
150
+ ---
151
+
133
152
  ## Registration
134
153
 
135
154
  Register DSE components in the project's component map:
@@ -141,19 +160,21 @@ Register DSE components in the project's component map:
141
160
 
142
161
  ## Existing DSE Components
143
162
 
144
- | Component | PConnect? | Description |
145
- | ----------------- | --------- | --------------------------------------- |
146
- | AlertBanner | No | Alert/notification banner with variants |
147
- | Banner | No | Promotional/informational banner |
148
- | CaseSummaryFields | Yes | Summary fields for case header |
149
- | DetailsFields | Yes | Key-value fields in a details region |
150
- | FieldGroup | Yes | Grouped fields with label/legend |
151
- | FieldGroupList | Yes | List of field groups (repeating) |
152
- | FieldValueList | Yes | Single field-value pair display |
153
- | Operator | No | Operator avatar + name display |
154
- | Pulse | Yes | Activity feed/comments stream |
155
- | RichTextEditor | Yes | Rich text editor (TinyMCE-based) |
156
- | WssQuickCreate | No | WSS quick case creation component |
163
+ | Component | PConnect? | Description |
164
+ | ----------------- | ----------------------------- | --------------------------------------- |
165
+ | AlertBanner | No | Alert/notification banner with variants |
166
+ | AssignmentHeader | No | Title of the current assignment step |
167
+ | Banner | No | Promotional/informational banner |
168
+ | CaseSummaryFields | No | Summary fields for case header |
169
+ | DetailsFields | Only via its `fields` entries | Key-value fields in a details region |
170
+ | FieldGroup | No (children from the caller) | Grouped fields with label/legend |
171
+ | FieldGroupList | No (children from the caller) | List of field groups (repeating) |
172
+ | FieldValueList | No | Single field-value pair display |
173
+ | Operator | No | Operator avatar + name display |
174
+ | Pulse | No (children from the caller) | Activity feed/comments stream |
175
+ | RichTextEditor | No (field-like inputs) | Rich text editor (TinyMCE-based) |
176
+ | Toast | No | Short notification after an action |
177
+ | WssQuickCreate | No | WSS quick case creation component |
157
178
 
158
179
  ---
159
180
 
@@ -23,6 +23,8 @@ When Pega case flows are embedded into a customer's existing application, the ge
23
23
  | **Form & state management** | Identify form-handling libraries or patterns in dependencies and source | Library or pattern name + how values, validation, and submission are handled |
24
24
  | **Import & module conventions** | Analyze import statements across multiple files | Path aliasing, barrel imports, relative vs absolute, grouping order |
25
25
  | **Validation & error display** | Observe how existing components show validation feedback | Pattern: inline message, tooltip, border color change, icon, combination |
26
+ | **Global appearance** | Trace where fonts are loaded and which wrapper sets the base text and theme | Font loading, base text settings, reset, theme scope, theme switching, overlay placement |
27
+ | **Form layout** | Read one or two multi-field forms | Field and column gaps, label position, field width, section spacing, stacking width, who owns the spacing |
26
28
 
27
29
  ---
28
30
 
@@ -32,10 +34,11 @@ When Pega case flows are embedded into a customer's existing application, the ge
32
34
 
33
35
  Every downstream skill and prompt writes generated components to one location: `{output_path}`. Resolve it once, here, before anything else runs. This is separate from the Design Profile document itself, which always lives at the fixed `docs/design-profile.md` and never moves with `{output_path}`.
34
36
 
35
- 1. **Check for an existing profile first.** Look for `docs/design-profile.md` at the project root — this is its one fixed location, independent of `{output_path}`. If it exists, read its **Output Path** field (Section 1) and reuse that value as `{output_path}` — skip the rest of this step entirely. Do not ask the user again.
37
+ 1. **Check for an existing profile first.** Look for `docs/design-profile.md` at the project root — this is its one fixed location, independent of `{output_path}`. If it exists, read its **Output Path** field (Section 1) and reuse that value as `{output_path}` — skip points 2 to 4 and go straight to point 5. Do not ask the user again.
36
38
  2. **Otherwise, ask.** Ask the user where in their own project the generated Pega components should live. Suggest `pega-components/` at the project root as the default/recommended answer, but accept any path they type instead.
37
39
  3. **Validate the answer stays inside the project.** Reject an absolute path outside the project, any `..` traversal segment, or anything else that would resolve outside the project root — re-ask when this happens rather than writing outside the repo.
38
40
  4. **Record the confirmed path** as `{output_path}`. It is written into the Design Profile in Step 6 below, and every other embedded-flow skill/prompt reads it from there instead of asking again or assuming a fixed name.
41
+ 5. **Point the embedded component rules at that folder.** The rules file `{{INSTRUCTIONS_DIR}}/embedded-component{{AI_FILE_EXT}}` attaches itself to `pega-components/` by default, through the file-matching line at the top of the file. If `{output_path}` is a different folder, replace `pega-components` in that one line with `{output_path}` (relative to the project root, without a leading `./` or trailing `/`) and change nothing else. Do this every time this step runs, even when the path came from an existing profile — setting the project up again can restore the default. If the file has no file-matching line, there is nothing to update.
39
42
 
40
43
  ### Step 1 — Identify project fundamentals
41
44
 
@@ -64,6 +67,15 @@ Read the discovered files and extract:
64
67
  - **Shadows** — elevation levels used
65
68
  - **Breakpoints** — responsive design boundaries (if defined)
66
69
 
70
+ Then record how that look is applied across the whole application — the **global appearance**. Tokens alone do not say this, and an embedded form that only references tokens can still render in the browser's default font:
71
+
72
+ - **Font loading** — where the web font is loaded (a stylesheet, a font-loading mechanism of the framework, or a self-hosted font face) and the font family names it provides
73
+ - **Base text** — which element or wrapper sets the base font family, size, line height, text colour, and page background
74
+ - **Reset or baseline** — any global reset, normalizer, or baseline styles the application applies, and where
75
+ - **Theme scope** — the design system's root theme or provider wrapper (if any), where it is mounted, and which part of the page it covers
76
+ - **Theme switching** — whether the application supports light/dark or other themes, and how the active theme is selected
77
+ - **Overlay placement** — whether dialogs, drawers, and popovers render inside the application's root element or are attached elsewhere in the page, outside the theme scope
78
+
67
79
  ### Step 3 — Analyze representative components
68
80
 
69
81
  Find 3–5 components that handle user input (text fields, selects/dropdowns, checkboxes, date pickers, buttons). Prioritize components that:
@@ -81,6 +93,20 @@ For each component, note:
81
93
  5. **Styling mechanism** — how it applies visual styles (class names, style objects, utility classes, scoped selectors)
82
94
  6. **Accessibility** — labels, ARIA attributes, focus management
83
95
 
96
+ ### Step 3.1 — Analyze form layout
97
+
98
+ Find one or two forms in the application that collect several fields — ideally one with more than one column. Read how they arrange their fields and record:
99
+
100
+ - **Field spacing** — the vertical gap between consecutive fields, and the horizontal gap between columns, as spacing tokens
101
+ - **Label position** — above the input, beside it, or floating inside it
102
+ - **Field width** — whether inputs fill their column or have a fixed or maximum width
103
+ - **Sections** — how groups of fields are separated (heading, divider, card, extra space) and the spacing around them
104
+ - **Columns** — how multi-column forms are built (the grid or layout primitive used) and at what width they stack into one column
105
+ - **Actions** — the space between the last field and the form's buttons, and how the buttons are aligned
106
+ - **Who owns the spacing** — whether the gaps come from the form's layout container or from margins on each field
107
+
108
+ Note the file paths of the forms you used, so generation can re-read them.
109
+
84
110
  ### Step 4 — Determine file and folder conventions
85
111
 
86
112
  List the project's component directory and observe:
@@ -116,9 +142,9 @@ Produce a structured markdown document with the following sections. Use heading
116
142
 
117
143
  **Section 1: Project Fundamentals** — start with the **Output Path** resolved in Step 0, then list the framework name and version, language and configuration, UI library name and version (or "Custom"), styling approach, form handling library or pattern, and module system.
118
144
 
119
- **Section 2: Design Tokens** — organize by sub-sections: Colors (primary, secondary, accent, error, warning, success, background, text, border with their semantic names and values), Spacing (scale), Typography (font families, sizes, weights), Borders and Radii (values), Shadows (elevation values), Breakpoints (if defined).
145
+ **Section 2: Design Tokens** — organize by sub-sections: Colors (primary, secondary, accent, error, warning, success, background, text, border with their semantic names and values), Spacing (scale), Typography (font families, sizes, weights), Borders and Radii (values), Shadows (elevation values), Breakpoints (if defined), and Global Appearance (font loading, base text, reset or baseline, theme scope, theme switching, overlay placement — from Step 2).
120
146
 
121
- **Section 3: Component Patterns** — describe each convention as a sub-section: Input Interface Convention (how components define what they accept), State Management Convention (how local state is handled), Event Handling Convention (how value changes are reported — immediate, on blur, debounced), Validation Display Convention (where errors appear, how error styling is applied), Styling Convention (how styles are applied to elements, how conditional styles work).
147
+ **Section 3: Component Patterns** — describe each convention as a sub-section: Input Interface Convention (how components define what they accept), State Management Convention (how local state is handled), Event Handling Convention (how value changes are reported — immediate, on blur, debounced), Validation Display Convention (where errors appear, how error styling is applied), Styling Convention (how styles are applied to elements, how conditional styles work), Form Layout Convention (everything recorded in Step 3.1, with the file paths of the forms it came from).
122
148
 
123
149
  **Section 4: File Conventions** — list the folder structure type, naming convention (casing), re-export/barrel pattern, test file location, and style file location.
124
150