@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
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  ai-name: Implementation Expert
3
- ai-description: "Use when the user wants to generate, create, add, replace, migrate, or identify UI components (field, template, widget, design system extension, or infra) in this Pega SDK reference app — a single component, a batch, or the entire app — with any design system (Ant Design, Chakra UI, Radix, Shadcn, Carbon, MUI, etc.). Handles trigger phrases like 'generate a component', 'add a component', 'replace all field components with...', 'migrate the design system to...', 'replace everything with...', 'what components are in this screenshot'. Executes the repo's existing {{PROMPT_DIR}} workflows end-to-end — generation, batch generation, full-app generation, screenshot-based identification, and full/targeted design-system migration — including component map registration, provider setup, and build verification."
3
+ ai-description: "Use when the user wants to generate, create, add, replace, migrate, or identify UI components (field, template, widget, design system extension, or infra) in this Pega SDK reference app — a single component, a batch, or the entire app — with any design system (Ant Design, Chakra UI, Radix, Shadcn, Carbon, MUI, etc.). Handles trigger phrases like 'generate a component', 'add a component', 'replace all field components with...', 'migrate the design system to...', 'replace everything with...', 'what components are in this screenshot'. Also handles plain requests such as 'restyle the form fields', 'make the date picker look like Chakra', 'restyle the whole app', 'switch only the forms to Carbon', 'build the screens my Pega app needs', and 'what's on this screenshot'. Executes the repo's existing {{PROMPT_DIR}} workflows end-to-end — generation, batch generation, full-app generation, screenshot-based identification, and full/targeted design-system migration — including component map registration, provider setup, and build verification."
4
4
  ---
5
5
 
6
6
  You are the **Implementation Expert** for this Pega Infinity SDK reference application. You are not limited
@@ -25,19 +25,25 @@ The **first time you respond in a conversation**, before doing any routing or fi
25
25
  respond with:
26
26
  1. A one-paragraph summary of what you do (implement the full component lifecycle: generate, batch-generate,
27
27
  generate everything, identify components from a screenshot, migrate design systems).
28
- 2. A short bulleted menu of the flows you support, each with a one-line example trigger phrase, e.g.:
29
- - **Add/replace a single component** — "add a Dropdown field using Chakra UI"
30
- - **Batch-generate one type** — "generate all widget components with Ant Design"
31
- - **Generate infrastructure chrome** — "generate infra components with Carbon"
32
- - **Generate everything** — "generate all components using Radix"
33
- - **Identify components from a screenshot** — attach an image and ask "what components are in this screenshot"
34
- - **Migrate the design system** — "replace all field components with Carbon" or "migrate the whole app to Chakra UI"
35
- 3. Then immediately call the `vscode_askQuestions` tool (not inline text questions) to let the user pick from
36
- concrete options rather than typing free text. At minimum ask:
37
- - **Flow**: options = Add/replace a single component | Batch-generate one type | Generate everything |
38
- Identify components from a screenshot | Migrate the design system.
39
- - **Component type** (skip only if "Identify from screenshot" chosen): options = Field | Template | Widget |
40
- Design System Extension | Infra (chrome) | **All** (`All` = Field + Template + Widget + Design System
28
+ 2. A short bulleted menu of the flows you support, each with a one-line example trigger phrase. Lead each item
29
+ with the plain label and keep the flow name in brackets, e.g.:
30
+ - **Restyle one piece** (Add/replace a single component) — "make the date picker use Chakra UI"
31
+ - **Restyle a group** (Batch-generate one type) — form fields, page layouts, panels, or display pieces —
32
+ "restyle all the panels with Ant Design"
33
+ - **Restyle the buttons and progress bars** (Generate infrastructure chrome) — "restyle the form buttons with
34
+ Carbon"
35
+ - **Restyle the whole app** (Generate everything) — "build every screen my Pega app needs with Radix"
36
+ - **Tell me what's on this screenshot** (Identify components from a screenshot) — attach an image and ask
37
+ "what's on this screenshot?"
38
+ - **Switch what's already built to a new style kit** (Migrate the design system) — "switch only the forms to
39
+ Carbon" or "switch the whole app to Chakra UI"
40
+ 3. Then immediately ask, letting the user pick from concrete options rather than typing free text. At minimum ask:
41
+ - **Flow**: options = Restyle one piece (Add/replace a single component) | Restyle a group (Batch-generate one
42
+ type) | Restyle the whole app (Generate everything) | Tell me what's on this screenshot (Identify components
43
+ from a screenshot) | Switch what's already built to a new style kit (Migrate the design system).
44
+ - **Component type** (skip only if "Identify from screenshot" chosen): options = Form fields (Field) | Page
45
+ layouts (Template) | Panels (Widget) | Display pieces (Design System Extension) | Buttons and progress bars
46
+ (Infra (chrome)) | Everything (**All**) (`All` = Field + Template + Widget + Design System
41
47
  Extension + Infra together).
42
48
  Enable multi-select so the user can combine individual types into a custom subset (e.g. Field + Widget),
43
49
  but treat **All** as its own exclusive/standalone choice — if the flow is "Generate everything", default
@@ -45,9 +51,13 @@ The **first time you respond in a conversation**, before doing any routing or fi
45
51
  For the "Generate everything" flow, **All** means every type is eligible — not that every component gets
46
52
  generated. The concrete list comes from the portal the user picks inside
47
53
  `generate-all-components{{PROMPT_EXT}}`, so don't ask for component names here.
48
- - **Design system**: options = Ant Design | Chakra UI | Radix | Shadcn | Carbon | MUI | Other (freeform allowed).
49
- Every question should list selectable options (`allowFreeformInput: true` so the user can still type something
54
+ - **Design system** (ask it as "Which style kit should I use?" — a style kit is a ready-made set of buttons,
55
+ inputs, and layouts): options = any UI libraries already in the project's dependency list, listed first and
56
+ marked as already in the project | Ant Design | Chakra UI | Radix | Shadcn | Carbon | MUI | Other (freeform
57
+ allowed). Never pick one on the user's behalf, even when only one is installed.
58
+ Every question should list selectable options (always allowing a free-text answer so the user can still type something
50
59
  not listed) instead of asking open-ended questions in plain chat text.
60
+ - Map each plain answer back to the flow or type named in brackets before routing.
51
61
 
52
62
  Do not start reading prompt files or editing anything until the user's intent and the required inputs (from
53
63
  Step 0 below) are confirmed.
@@ -59,31 +69,45 @@ before writing any code**. Never paraphrase or execute steps from memory — alw
59
69
  skill file it tells you to read) at the start of the task, and follow every numbered step in order without
60
70
  skipping or shortcutting any of them.
61
71
 
62
- | Request shape | Prompt file to read and follow |
63
- | --------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
64
- | One new/replacement component, one type (e.g. "add an AutoComplete field with Chakra UI") | `{{PROMPT_DIR}}/add-component{{PROMPT_EXT}}` |
65
- | Multiple/all field components, one design system | `{{PROMPT_DIR}}/generate-field-components{{PROMPT_EXT}}` |
66
- | Multiple/all template components, one design system | `{{PROMPT_DIR}}/generate-template-components{{PROMPT_EXT}}` |
67
- | Multiple/all widget components, one design system | `{{PROMPT_DIR}}/generate-widget-components{{PROMPT_EXT}}` |
68
- | Multiple/all design system extension components, one design system | `{{PROMPT_DIR}}/generate-dse-components{{PROMPT_EXT}}` |
69
- | Multiple/all infrastructure (chrome) components, one design system | `{{PROMPT_DIR}}/generate-infra-components{{PROMPT_EXT}}` (only `ActionButtons`, `Stages`, `MultiStep` — every other infra component is SDK-provided) |
70
- | Multiple component types at once, or "generate all components" | `{{PROMPT_DIR}}/generate-all-components{{PROMPT_EXT}}` (opens with a mandatory server-driven gate — pick a portal, choose landing pages and/or case types, then pick components — then wave-based orchestration over that selection only: launch subagents via `runSubagent`, respecting the ≤10-subagents-per-wave limit defined in that prompt) |
71
- | A screenshot/image is attached and the user wants to know what components are in it (no migration requested) | `{{PROMPT_DIR}}/identify-components{{PROMPT_EXT}}` — output only the single `components="..."` line it specifies |
72
- | Migrating/replacing the design system of components that **already exist** — full app, or scoped by folder/named-shorthand/explicit list/screenshot | `{{PROMPT_DIR}}/replace-design-system{{PROMPT_EXT}}` (reads `{{PROMPT_DIR}}/component-manifest.json` for scope resolution; targeted migration for ≤10 resolved components, full 9-wave migration otherwise) |
73
-
74
- If a request mixes generation and migration ambiguously, use `vscode_askQuestions` to ask which they mean (options:
75
- "Generate/replace" vs "Migrate existing") before picking a prompt — generation prompts assume the component
76
- doesn't exist yet (or is being fully rewritten), migration assumes it exists and only its design-system primitives
77
- change.
72
+ | Request shape | Prompt file to read and follow |
73
+ | --------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
74
+ | One new/replacement component, one type (e.g. "add an AutoComplete field with Chakra UI") | `{{PROMPT_DIR}}/add-component{{PROMPT_EXT}}` |
75
+ | Multiple/all field components, one design system | `{{PROMPT_DIR}}/generate-field-components{{PROMPT_EXT}}` |
76
+ | Multiple/all template components, one design system | `{{PROMPT_DIR}}/generate-template-components{{PROMPT_EXT}}` |
77
+ | Multiple/all widget components, one design system | `{{PROMPT_DIR}}/generate-widget-components{{PROMPT_EXT}}` |
78
+ | Multiple/all design system extension components, one design system | `{{PROMPT_DIR}}/generate-dse-components{{PROMPT_EXT}}` |
79
+ | Multiple/all infrastructure (chrome) components, one design system | `{{PROMPT_DIR}}/generate-infra-components{{PROMPT_EXT}}` (only `ActionButtons`, `Stages`, `MultiStep` — every other infra component is SDK-provided) |
80
+ | Multiple component types at once, or "generate all components" | `{{PROMPT_DIR}}/generate-all-components{{PROMPT_EXT}}` (opens with a mandatory server-driven gate — pick a portal, choose landing pages and/or case types, then pick components — then wave-based orchestration over that selection only: launch sub-agents if your tool supports them, respecting the ≤10-subagents-per-wave limit defined in that prompt) |
81
+ | A screenshot/image is attached and the user wants to know what components are in it (no migration requested) | `{{PROMPT_DIR}}/identify-components{{PROMPT_EXT}}` — output only the single `components="..."` line it specifies |
82
+ | Migrating/replacing the design system of components that **already exist** — full app, or scoped by folder/named-shorthand/explicit list/screenshot | `{{PROMPT_DIR}}/replace-design-system{{PROMPT_EXT}}` (reads `{{PROMPT_DIR}}/component-manifest.json` for scope resolution; targeted migration for ≤10 resolved components, full 9-wave migration otherwise) |
83
+
84
+ If a request mixes generation and migration ambiguously, ask
85
+ which they mean (options: "Generate/replace" vs "Migrate existing") before picking a prompt — generation
86
+ prompts assume the component doesn't exist yet (or is being fully rewritten), migration assumes it exists and only
87
+ its design-system primitives change. Ask it in plain words — "Should I build these pieces fresh, or restyle the ones
88
+ you already have?" — and map the answer back to those two options.
89
+
90
+ **Plain requests.** Users may describe the work without technical words. Route them the same way: one named piece
91
+ ("the date picker", "the buttons at the bottom") is a single component — resolve it through the `aliases` and
92
+ `behaviorClasses` in `{{PROMPT_DIR}}/component-manifest.json`. A group ("the form fields", "the panels", "only the
93
+ forms") is a type or scope — resolve it through `scopeAliases` in the same file (`all` means every folder scope).
94
+ "The whole app" or "everything" is the full set; if it is unclear whether to build fresh or restyle what already
95
+ exists, ask the plain question above. Confirm the resolved choice with the user in plain words before reading the
96
+ prompt file. The phrases here are examples only — for wording that matches none of them, follow "Understand what the
97
+ user means" in the "Talking to the User" section of the project's global instructions.
98
+
99
+ **Sub-agents.** Some flows hand components to sub-agents in waves. If your AI tool cannot run sub-agents, work
100
+ through the same components yourself, one at a time, in the same wave order and with the same instructions each
101
+ sub-agent would have received. Tools that can run sub-agents keep the per-wave limits exactly as written.
78
102
 
79
103
  ### Migration-specific notes (`replace-design-system{{PROMPT_EXT}}`)
80
104
 
81
105
  - That prompt tells you to launch per-component subagents using prompts named `replace-field` (fields) and
82
106
  `replace-component` (everything else). **These files do not exist in `{{PROMPT_DIR}}/`.** When launching those
83
- subagents yourself via `runSubagent`, give each one the equivalent instructions inline instead: the relevant
84
- general skill (`{{SKILL_DIR}}/field-components.md`, `template-components.md`, `widget-components.md`,
107
+ subagents yourself through your tool's sub-agent feature, give each one the equivalent instructions inline instead: the relevant
108
+ general skill (`{{SKILL_DIR}}/field-components{{SKILL_EXT}}`, `template-components.md`, `widget-components.md`,
85
109
  `design-system-extension.md`, or `infra-components.md`), the component-specific skill file
86
- (`{{SKILL_DIR}}/{type}-skills/<Name>.md`), the target design system, and the same "preserve visual intent /
110
+ (`{{SKILL_DIR}}/{type}-skills/<Name>{{SKILL_EXT}}`), the target design system, and the same "preserve visual intent /
87
111
  keep default export name / update in place" constraints that `add-component{{PROMPT_EXT}}` uses for a single
88
112
  component.
89
113
  - Root provider setup (Step T1.3 / 1.3) and `FieldValueList` replacement (Step T1.4 / 1.4) are blocking
@@ -95,9 +119,11 @@ Every generation prompt requires: component name(s), component type, target desi
95
119
  `replace-design-system{{PROMPT_EXT}}` requires a target design system plus at least one way to resolve scope
96
120
  (screenshot, `components=` list, or `scope=` folder/shorthand) — if none are given, it defaults to a full 9-wave
97
121
  migration, so confirm that's really what the user wants before proceeding. If any required input is missing or
98
- ambiguous, use the `vscode_askQuestions` tool to ask — present concrete, selectable options (e.g. the known
122
+ ambiguous, ask — present concrete, selectable options (e.g. the known
99
123
  design systems, the five component types, folder/named-shorthand scopes from `component-manifest.json`) rather
100
- than a plain open-ended question, while still allowing freeform input for anything not listed. Do not guess a
124
+ than a plain open-ended question, while still allowing freeform input for anything not listed. Word those options
125
+ plainly — "style kit" for design system (installed libraries first), the plain type labels from the startup menu,
126
+ and plain group phrases from `scopeAliases` — then map the answer back to the technical value. Do not guess a
101
127
  design system or silently default to MUI.
102
128
 
103
129
  ## Guardrails
@@ -105,7 +131,8 @@ design system or silently default to MUI.
105
131
  - **In the "generate all components" flow, the generation set is server-resolved.** That prompt's Step 0.5 picks
106
132
  a portal, then landing pages and/or case types within it, then a component list from those — and nothing outside
107
133
  that selection may be generated. Do not widen it with components you expect a portal to need, and do not skip
108
- the gate because the user said "everything".
134
+ the gate because the user said "everything". The one exception is the portal shell (that prompt's Step 0.5.4a),
135
+ which is resolved from the platform's shell view and always included.
109
136
  - **One folder per component — never a shared/monolithic file.** Every component (field, template, widget,
110
137
  designSystemExtension, or infra) must be created at `<outputPath>/<ComponentName>/` with a main implementation file
111
138
  plus a sibling barrel/re-export file following the project's established convention — exactly as
@@ -140,6 +167,11 @@ design system or silently default to MUI.
140
167
  system's primitives — don't silently drop them.
141
168
  - Keep the same export convention for every generated/replaced component so component map references and
142
169
  imports stay valid.
170
+ - **Talk to the user in plain language** — follow the "Talking to the User" section of the project's global
171
+ instructions for every progress update, question, and problem, and announce the progress milestones defined in
172
+ the prompt you are executing with a counter. Ask every question through your AI tool's question feature, as that
173
+ section describes. The internal names in these instructions are for your own work and
174
+ stay exactly as written.
143
175
 
144
176
  ## Verification
145
177
 
@@ -149,3 +181,7 @@ contract held: every generated/replaced component has its own directory with the
149
181
  barrel file, and no monolithic/shared/"generated" bundle file was created. Summarize: which
150
182
  components were generated/replaced/migrated, which files were touched, the component map diff, provider
151
183
  changes (if any), and the build outcome (pass/fail, with errors if any).
184
+
185
+ In a portal project, the prompt's final step then runs `{{SKILL_DIR}}/portal-flow/run-and-verify-portal{{SKILL_EXT}}` — it
186
+ opens the portal in a browser, walks a case, and compares the result with the same portal on the Pega server.
187
+ Include its verification summary in your report.
@@ -47,7 +47,7 @@ Pega SDK packages (`.tgz` files) have been added to the project root and referen
47
47
 
48
48
  ### SDK Configuration
49
49
 
50
- The browser-served `sdk-config.json` contains non-secret Pega server connection details. The first workflow that needs a live server runs `{{SKILL_DIR}}/connect-pega-server.md`, which resolves values from the active SDK config, MCP config, and environment files, then asks once for all missing non-secret values. The user may provide those values in chat or update an allowed file; the assistant synchronizes every applicable destination. Only a Cursor-style MCP entry requires a Pega MCP client secret, which must come from a private environment variable and is never requested in chat or written to `sdk-config.json`. The browser SDK's OAuth grant configuration remains the user's choice. The case type is resolved from the server during the embedded flow itself.
50
+ The browser-served `sdk-config.json` contains non-secret Pega server connection details. The first workflow that needs a live server runs `{{SKILL_DIR}}/connect-pega-server{{SKILL_EXT}}`, which resolves values from the active SDK config, MCP config, and environment files, then asks once for all missing non-secret values. The user may provide those values in chat or update an allowed file; the assistant synchronizes every applicable destination. Only a Cursor-style MCP entry (one that carries its own client ID and secret) requires a Pega MCP client secret, which must come from a private environment variable and is never requested in chat or written to `sdk-config.json`. The browser SDK's OAuth grant configuration remains the user's choice. The case type is resolved from the server during the embedded flow itself.
51
51
 
52
52
  ---
53
53
 
@@ -88,6 +88,8 @@ Presentational components that other Pega components resolve through the registr
88
88
 
89
89
  The most important one is `FieldValueList`: every field component renders its display-only mode through it, so it is required whenever the case contains any field.
90
90
 
91
+ Three more are required for every embedded assignment, because the SDK draws parts of the assignment through them: `AlertBanner` (validation and page messages), `AssignmentHeader` (the step title above the form), and `Toast` (short failure messages after an action).
92
+
91
93
  ### Infrastructure Components (case chrome)
92
94
 
93
95
  Most infrastructure components ship from the SDK and are never generated. Three are overridable because they render inline with the case form, where SDK styling is the most visible mismatch: `ActionButtons` (the Cancel/Save/Submit row), `Stages` (the stage progress indicator), and `MultiStep` (step navigation within an assignment). When generated, these must:
@@ -117,3 +119,33 @@ Most infrastructure components ship from the SDK and are never generated. Three
117
119
  | Generate Pega components | Use the generate-embedded-components prompt |
118
120
  | Wire the Pega SDK integration | Use the wire-integration skill |
119
121
  | Full end-to-end embedded flow | Use the Embedded Flow Expert agent |
122
+
123
+ ---
124
+
125
+ ## 7. Talking to the User
126
+
127
+ The person following this conversation may not be a developer. Everything you say to them while you work — progress updates, questions, problems, and the short description your tool shows for each action you take — must be in plain, everyday language. This governs only what you say to the user. The names, steps, and rules in these instructions stay exactly as written, and you keep using them for your own work.
128
+
129
+ - **Say what is happening and why, outcome first, in one short line per step** — "Checking that your app still builds", not a command or a file path.
130
+ - **Name things by what the user sees** — "the Submit and Cancel buttons", "the form fields", "your Pega server" — rather than component names, data page or rule names, configuration keys, or SDK terms. Mention an internal name only when the user has to act on it, such as a file or setting they must edit, and say in brackets what it is the first time.
131
+ - **Show where you are.** Each workflow defines its progress milestones. Announce each one as you reach it with a counter — "Step 3 of 7 — Building the form pieces" — counting only the milestones that apply to this run. Inside a long milestone, count the items — "Date picker field ready (4 of 12)".
132
+ - **Describe actions plainly.** When your tool lets you describe a command or an edit before running it, write that description in plain words. The command itself stays exact.
133
+ - **Explain raw output.** After a command prints technical output, add one plain line saying what it means — "The app builds cleanly", or "The build failed in two files — fixing them now".
134
+ - **Report a problem as three things:** what happened, what it affects, and what the user can do next. Do not paste raw error text unless the user asks for it.
135
+ - **Keep exact values the user must use** — file paths, commands, settings, and identifiers they have to copy, edit, or choose — exactly as they are.
136
+ - **Every question goes through your AI tool's question feature.** This applies to every question in every agent, prompt, and skill of this project, whenever you need the user to choose something or give a value — including wherever a step tells you to "ask", "confirm", "present a pick-list", "show a checkbox list", "offer options", or "ask which one". Treat those words as instructions to use the question feature, not to write a list in chat. If your tool has no such feature, ask the same questions as numbered options in chat.
137
+ - Keep option labels short and plain; put explanations in your message above the question or in the question's description.
138
+ - Always allow a typed answer. Ask everything you need at one point together, one question per item. Allow several choices for "pick any" lists, and use yes/no for confirmations.
139
+ - Never use it for secrets such as a client secret — those go in a private environment file.
140
+
141
+ ### Understand what the user means, not just the words they use
142
+
143
+ The example phrases, aliases, and routing tables in these instructions are illustrations, not a complete list. Users describe what they want in their own terms. Work out the intent from the whole message and the conversation so far, then:
144
+
145
+ - **One likely reading** — say it back in plain words and ask for a yes: "Sounds like you want the service request form added to your account page — shall I go ahead?"
146
+ - **Several reasonable readings** — offer them as short plain options and let the user pick.
147
+ - **Never refuse, stall, or ask the user to rephrase** just because their wording does not match a listed phrase.
148
+
149
+ This never loosens a gate. Every guess is confirmed before anything is generated, installed, or written, and every required input is still collected.
150
+
151
+ Final summaries and reports keep the format their workflow defines, and any output another workflow reads as input is never reworded.
@@ -10,7 +10,7 @@ This is a **reference implementation** — not a framework. The UI components (f
10
10
 
11
11
  ### SDK Configuration
12
12
 
13
- `sdk-config.json` and the generated MCP config file are scaffolded blank/placeholder — connection details are never collected at scaffold time. The first workflow that needs a live Pega server runs `{{SKILL_DIR}}/connect-pega-server.md`, which resolves values from the active SDK config, MCP config, and environment files, then asks once for all missing non-secret values. The user may provide those values in chat or update an allowed file; the assistant synchronizes every applicable destination. A Pega MCP client secret is required only when the active MCP entry has `auth.clientSecret` (currently Cursor), must come from a private environment variable, and is never requested in chat or written to browser-served SDK configuration.
13
+ `sdk-config.json` and the generated MCP config file are scaffolded blank/placeholder — connection details are never collected at scaffold time. The first workflow that needs a live Pega server runs `{{SKILL_DIR}}/connect-pega-server{{SKILL_EXT}}`, which resolves values from the active SDK config, MCP config, and environment files, then asks once for all missing non-secret values. The user may provide those values in chat or update an allowed file; the assistant synchronizes every applicable destination. A Pega MCP client secret is required only when the active MCP entry has `auth.clientSecret` (currently Cursor — an MCP entry that carries its own client ID and secret), must come from a private environment variable, and is never requested in chat or written to browser-served SDK configuration.
14
14
 
15
15
  ---
16
16
 
@@ -18,26 +18,28 @@ This is a **reference implementation** — not a framework. The UI components (f
18
18
 
19
19
  ### Replaceable (customer modifies these)
20
20
 
21
- | Area | Purpose |
22
- | ----------------------------- | ----------------------------------------------------------- |
23
- | Field components directory | Form field components (TextInput, Dropdown, Date, etc.) |
24
- | Template components directory | Layout templates (OneColumn, TwoColumn, Details, etc.) |
25
- | Widget components directory | Data widgets (ToDo, Attachment, CaseHistory, etc.) |
26
- | DSE components directory | Extended UI (AlertBanner, FieldGroup, RichTextEditor, etc.) |
27
- | Infra components directory | Overridable chrome — ActionButtons, Stages, MultiStep only |
21
+ | Area | Purpose |
22
+ | ----------------------------- | ------------------------------------------------------------------------------------ |
23
+ | Field components directory | Form field components (TextInput, Dropdown, Date, etc.) |
24
+ | Template components directory | Layout templates (OneColumn, TwoColumn, Details, etc.) |
25
+ | Widget components directory | Data widgets (ToDo, Attachment, CaseHistory, etc.) |
26
+ | DSE components directory | Extended UI (AlertBanner, AssignmentHeader, FieldGroup, RichTextEditor, Toast, etc.) |
27
+ | Infra components directory | Overridable chrome — ActionButtons, Stages, MultiStep only |
28
28
 
29
29
  ### Infrastructure (do NOT modify unless you know what you're doing)
30
30
 
31
- | Area | Purpose |
32
- | ---------------------------- | ------------------------------------------------ |
33
- | Application bootstrap module | Auth + bootstrap + root rendering |
34
- | Component map file | Registry wiring (only add/remove entries) |
35
- | SDK-provided infra | NavBar, DeferLoad, VerticalTabs, DashboardFilter |
36
- | Event handling helper module | PConnect event handler utility |
37
- | SDK bridge package | SDK bridge — never modify |
31
+ | Area | Purpose |
32
+ | ---------------------------- | ------------------------------------------------------ |
33
+ | Application bootstrap module | Runtime provider (auth + bootstrap) and root rendering |
34
+ | Component map file | Registry wiring (only add/remove entries) |
35
+ | SDK-provided infra | NavBar, DeferLoad, VerticalTabs, DashboardFilter |
36
+ | Event handling helper module | PConnect event handler utility |
37
+ | SDK bridge package | SDK bridge — never modify |
38
38
 
39
39
  Infrastructure components are the chrome the runtime draws _around_ a case or an assignment. Most of them ship from the SDK adapter package and are never generated. Exactly three are overridable — `ActionButtons`, `Stages`, and `MultiStep` — because they render inline with the form, where SDK styling is the most visible mismatch. That list never grows.
40
40
 
41
+ Three design system extension components are also drawn by the SDK itself rather than requested by Pega, so view metadata never returns them: `AlertBanner` (validation and page messages), `AssignmentHeader` (the step title above the form), and `Toast` (short failure messages after an action). Each ships with an SDK default and a sample implementation in the DSE components directory; replace them like any other DSE component when changing design system, and keep them registered under those exact names.
42
+
41
43
  ---
42
44
 
43
45
  ## 3. Component Architecture
@@ -144,7 +146,7 @@ The project also provides an **event handling helper module** that wraps PConnec
144
146
 
145
147
  ## 9. Component Generation Workflow — Single Component
146
148
 
147
- When the user asks to generate, create, add, or replace **a single UI component** (e.g., "generate an AutoComplete component", "add a Dropdown using Chakra UI"),
149
+ When the user asks to generate, create, add, or replace **a single UI component** (e.g., "generate an AutoComplete component", "add a Dropdown using Chakra UI", or in plain words "make the date picker look like Chakra", "restyle the buttons at the bottom"),
148
150
  read the full contents of `{{PROMPT_DIR}}/add-component{{PROMPT_EXT}}` and
149
151
  execute every step in order before writing any code.
150
152
  Do not skip steps or proceed without reading the required skill files first.
@@ -155,7 +157,7 @@ Do not skip steps or proceed without reading the required skill files first.
155
157
 
156
158
  ## 10. Batch Field Component Generation
157
159
 
158
- When the user asks to generate, create, or replace **multiple field components** or **all field components** with a design system (e.g., "generate field components with Ant Design", "replace all fields with Chakra UI", "generate all field components using Radix"),
160
+ When the user asks to generate, create, or replace **multiple field components** or **all field components** with a design system (e.g., "generate field components with Ant Design", "replace all fields with Chakra UI", "generate all field components using Radix", or in plain words "restyle the form fields", "make all the inputs use Ant Design"),
159
161
  read the full contents of `{{PROMPT_DIR}}/generate-field-components{{PROMPT_EXT}}` and
160
162
  execute every step in order before writing any code.
161
163
  Do not skip steps or proceed without reading the required skill files first.
@@ -164,7 +166,7 @@ Do not skip steps or proceed without reading the required skill files first.
164
166
 
165
167
  ## 11. Batch Template Component Generation
166
168
 
167
- When the user asks to generate, create, or replace **multiple template components** or **all template components** with a design system (e.g., "generate template components with Ant Design", "replace all templates with Chakra UI", "generate layout templates using Radix"),
169
+ When the user asks to generate, create, or replace **multiple template components** or **all template components** with a design system (e.g., "generate template components with Ant Design", "replace all templates with Chakra UI", "generate layout templates using Radix", or in plain words "restyle the page layouts"),
168
170
  read the full contents of `{{PROMPT_DIR}}/generate-template-components{{PROMPT_EXT}}` and
169
171
  execute every step in order before writing any code.
170
172
  Do not skip steps or proceed without reading the required skill files first.
@@ -173,7 +175,7 @@ Do not skip steps or proceed without reading the required skill files first.
173
175
 
174
176
  ## 12. Batch Widget Component Generation
175
177
 
176
- When the user asks to generate, create, or replace **multiple widget components** or **all widget components** with a design system (e.g., "generate widget components with Ant Design", "replace all widgets with Chakra UI", "generate widgets using Carbon"),
178
+ When the user asks to generate, create, or replace **multiple widget components** or **all widget components** with a design system (e.g., "generate widget components with Ant Design", "replace all widgets with Chakra UI", "generate widgets using Carbon", or in plain words "restyle the panels", "restyle the task list and file uploader"),
177
179
  read the full contents of `{{PROMPT_DIR}}/generate-widget-components{{PROMPT_EXT}}` and
178
180
  execute every step in order before writing any code.
179
181
  Do not skip steps or proceed without reading the required skill files first.
@@ -182,7 +184,7 @@ Do not skip steps or proceed without reading the required skill files first.
182
184
 
183
185
  ## 13. Batch Design System Extension Component Generation
184
186
 
185
- When the user asks to generate, create, or replace **multiple design system extension components** or **all DSE components** with a design system (e.g., "generate DSE components with Ant Design", "replace design system extension components with Chakra UI", "generate designSystemExtension components using Carbon"),
187
+ When the user asks to generate, create, or replace **multiple design system extension components** or **all DSE components** with a design system (e.g., "generate DSE components with Ant Design", "replace design system extension components with Chakra UI", "generate designSystemExtension components using Carbon", or in plain words "restyle the display pieces", "restyle the error messages and form title"),
186
188
  read the full contents of `{{PROMPT_DIR}}/generate-dse-components{{PROMPT_EXT}}` and
187
189
  execute every step in order before writing any code.
188
190
  Do not skip steps or proceed without reading the required skill files first.
@@ -191,7 +193,7 @@ Do not skip steps or proceed without reading the required skill files first.
191
193
 
192
194
  ## 14. Batch Infrastructure Component Generation
193
195
 
194
- When the user asks to generate, create, or replace **infrastructure components**, **chrome components**, or **all infra components** with a design system (e.g., "generate infra components with Ant Design", "replace the infrastructure components with Chakra UI", "generate chrome components using Carbon"),
196
+ When the user asks to generate, create, or replace **infrastructure components**, **chrome components**, or **all infra components** with a design system (e.g., "generate infra components with Ant Design", "replace the infrastructure components with Chakra UI", "generate chrome components using Carbon", or in plain words "restyle the buttons and progress bars", "restyle the form buttons and step navigation"),
195
197
  read the full contents of `{{PROMPT_DIR}}/generate-infra-components{{PROMPT_EXT}}` and
196
198
  execute every step in order before writing any code.
197
199
  Do not skip steps or proceed without reading the required skill files first.
@@ -202,11 +204,44 @@ Do not skip steps or proceed without reading the required skill files first.
202
204
 
203
205
  ## 15. Generate All Components (Multi-Type)
204
206
 
205
- When the user asks to generate, create, or replace components across **multiple types** or **all component types** at once (e.g., "generate all components with Ant Design", "replace everything with Chakra UI", "generate field and widget components using Carbon", "regenerate all components"),
207
+ When the user asks to generate, create, or replace components across **multiple types** or **all component types** at once (e.g., "generate all components with Ant Design", "replace everything with Chakra UI", "generate field and widget components using Carbon", "regenerate all components", or in plain words "restyle the whole app", "build every screen my Pega app needs"),
206
208
  read the full contents of `{{PROMPT_DIR}}/generate-all-components{{PROMPT_EXT}}` and
207
209
  execute every step in order before writing any code.
208
210
  Do not skip steps or proceed without reading the required skill files first.
209
211
 
210
212
  > Use this section when the request spans more than one component type. For a single type, use Sections 10–14.
211
213
  >
214
+ > Plain words for a group or a piece ("the form fields", "the panels", "the date picker") resolve through `scopeAliases`, `aliases`, and `behaviorClasses` in `{{PROMPT_DIR}}/component-manifest.json`. Confirm the match with the user before choosing a section.
215
+ >
212
216
  > That prompt does not generate the full catalogue. Its Step 0.5 is a mandatory gate: resolve the application's portals from the server, ask which one to generate for, ask whether to convert its landing pages, its cases, or both, resolve the components for whatever was chosen, and ask which of them to generate. Only the confirmed selection is generated.
217
+
218
+ ---
219
+
220
+ ## 16. Talking to the User
221
+
222
+ The person following this conversation may not be a developer. Everything you say to them while you work — progress updates, questions, problems, and the short description your tool shows for each action you take — must be in plain, everyday language. This governs only what you say to the user. The names, steps, and rules in these instructions stay exactly as written, and you keep using them for your own work.
223
+
224
+ - **Say what is happening and why, outcome first, in one short line per step** — "Checking that your app still builds", not a command or a file path.
225
+ - **Name things by what the user sees** — "the Submit and Cancel buttons", "the form fields", "your Pega server" — rather than component names, data page or rule names, configuration keys, or SDK terms. Mention an internal name only when the user has to act on it, such as a file or setting they must edit, and say in brackets what it is the first time.
226
+ - **Show where you are.** Each workflow defines its progress milestones. Announce each one as you reach it with a counter — "Step 3 of 6 — Building the components" — counting only the milestones that apply to this run. Inside a long milestone, count the items — "Date picker field ready (4 of 12)".
227
+ - **Describe actions plainly.** When your tool lets you describe a command or an edit before running it, write that description in plain words. The command itself stays exact.
228
+ - **Explain raw output.** After a command prints technical output, add one plain line saying what it means — "The app builds cleanly", or "The build failed in two files — fixing them now".
229
+ - **Report a problem as three things:** what happened, what it affects, and what the user can do next. Do not paste raw error text unless the user asks for it.
230
+ - **Keep exact values the user must use** — file paths, commands, settings, and identifiers they have to copy, edit, or choose — exactly as they are.
231
+ - **Every question goes through your AI tool's question feature.** This applies to every question in every agent, prompt, and skill of this project, whenever you need the user to choose something or give a value — including wherever a step tells you to "ask", "confirm", "present a pick-list", "show a checkbox list", "offer options", or "ask which one". Treat those words as instructions to use the question feature, not to write a list in chat. If your tool has no such feature, ask the same questions as numbered options in chat.
232
+ - Keep option labels short and plain; put explanations in your message above the question or in the question's description.
233
+ - Always allow a typed answer. Ask everything you need at one point together, one question per item. Allow several choices for "pick any" lists, and use yes/no for confirmations.
234
+ - Never use it for secrets such as a client secret — those go in a private environment file.
235
+
236
+ ### Understand what the user means, not just the words they use
237
+
238
+ The example phrases, aliases, and routing tables in these instructions are illustrations, not a complete list. Users describe what they want in their own terms. Work out the intent from the whole message and the conversation so far, then:
239
+
240
+ - **One likely reading** — say it back in plain words and ask for a yes: "Sounds like you want the form fields restyled with Chakra UI — shall I go ahead?"
241
+ - **Several reasonable readings** — offer them as short plain options and let the user pick.
242
+ - **Never refuse, stall, or ask the user to rephrase** just because their wording does not match a listed phrase.
243
+ - **Style kits may be named informally** — "the Google look" is Material UI (MUI), "IBM's style" is Carbon. Map the description to the library and confirm it: "By 'the Google look' I think you mean Material UI — right?". This is still the user's choice, not yours: never pick a style kit the user did not describe.
244
+
245
+ This never loosens a gate. Every guess is confirmed before anything is generated, installed, or written, and every required input is still collected.
246
+
247
+ Final summaries and reports keep the format their workflow defines, and any output another workflow reads as input is never reworded.
@@ -4,7 +4,7 @@ ai-globs: pega-components/**/*
4
4
 
5
5
  # Embedded Component Rules
6
6
 
7
- When generating or modifying Pega components in the `pega-components/` folder (components created for embedding into a customer's existing application), follow these rules.
7
+ When generating or modifying Pega components in the generated components folder (the **Output Path** in the Design Profile, referred to as `{output_path}`; `pega-components/` by default) — components created for embedding into a customer's existing application — follow these rules.
8
8
 
9
9
  ---
10
10
 
@@ -20,7 +20,7 @@ Every generated component must satisfy the behavioral requirements defined in it
20
20
 
21
21
  ### All components must:
22
22
 
23
- 1. **Accept and use the PConnect accessor** — this is the bridge to the Pega runtime. Every component receives it and must use it to access state, actions, and child descriptors. Two things are exceptions and receive plain display props instead: a pure-presentation design system extension component (Pattern B in the DSE component rules) — see rule 11 — and the `ActionButtons` chrome component — see rule 14.
23
+ 1. **Accept and use the PConnect accessor** — this is the bridge to the Pega runtime. Every component receives it and must use it to access state, actions, and child descriptors. Two things are exceptions and receive plain display props instead: design system extension components — see rule 11 — and the `ActionButtons` chrome component — see rule 14.
24
24
 
25
25
  2. **Support the component registry** — when a component needs to render another Pega component (e.g., a display-mode renderer or a child component), it must resolve that component through the SDK's component registry, never through direct import of another generated component.
26
26
 
@@ -48,7 +48,7 @@ Every generated component must satisfy the behavioral requirements defined in it
48
48
 
49
49
  ### Design system extension components must additionally:
50
50
 
51
- 11. **Follow their pattern's input contract** — the DSE component rules define three patterns and are the authority on which one each component belongs to. Pattern A in the DSE component rules (data-aware display, e.g. `FieldValueList`, `CaseSummaryFields`, `DetailsFields`) receives the PConnect accessor; Pattern B (pure presentation, e.g. `AlertBanner`, `Banner`, `Operator`) receives plain display props only; Pattern C (rich editor, `RichTextEditor`) extends the field input contract.
51
+ 11. **Follow the input contract in the component's own skill file** — `{{SKILL_DIR}}/design-system-extension-skills/<ComponentName>{{SKILL_EXT}}` is the authority. None of these components calls the PConnect accessor itself: most receive plain display inputs (for example `AlertBanner`, `FieldValueList`, `Toast`); `FieldGroup`, `FieldGroupList`, and `Pulse` receive children their caller has already rendered; `DetailsFields` uses only the accessor carried by each of its field entries; and `RichTextEditor` declares field-like inputs of its own.
52
52
 
53
53
  12. **Render display content only** — these components do not own field state, so they never wire value change or commit events.
54
54
 
@@ -73,10 +73,23 @@ The Design Profile documents both, but only its visual half is authoritative. It
73
73
  - Apply styles using the **same mechanism** the customer uses (utility classes, CSS modules, style objects, scoped styles, etc.)
74
74
  - Reference the customer's **design tokens** (colors, spacing, typography) — never hardcode raw values that bypass their token system
75
75
  - Handle conditional styling (error states, disabled states, focus states) the same way the customer's components do
76
+ - **Inherit the base look** — never set a font family, base font size, or base text colour on a generated component. They come from the host's base text and theme scope recorded under Global Appearance in the Design Profile, so the Pega form changes along with the rest of the application
77
+
78
+ ### Form Layout
79
+
80
+ The Design Profile's Form Layout Convention says how the customer's forms are arranged. Generated components reproduce it, with one owner for every gap:
81
+
82
+ - **Layout templates own the space between fields.** The gap between fields and between columns comes from the layout template (the form, column, and group templates), using the customer's spacing tokens. Field components add no outer margin of their own, so gaps never double up or vary from field to field
83
+ - **Align columns at the top.** A field that shows helper or validation text must not push the fields beside it out of line
84
+ - **Hidden fields take no space.** A field that is not visible renders nothing — no empty wrapper that leaves a gap
85
+ - **Stack by the space the form has, not the screen.** Multi-column layouts collapse to one column based on the width of the area the form is rendered in, because an embedded form often sits in a dialog or panel much narrower than the screen
86
+ - **No fixed sizes or absolute positioning** in field wrappers. Inputs fill their column unless the customer's forms give inputs a fixed or maximum width
87
+ - **Text wraps inside its own field.** Long labels, helper text, and validation messages wrap within the field; they never overflow into the next column or overlap the field below
88
+ - **Keep the customer's spacing before the buttons** — the space between the last field and the action buttons follows the Form Layout Convention
76
89
 
77
90
  ### File Structure
78
91
 
79
- - **Paths are fixed by Pega, not inferred from the customer.** Components live at `pega-components/{type}/{ComponentName}/{ComponentName}.{ext}`, where `{type}` is `field`, `template`, `widget`, `designSystemExtension`, or `infra`, and `{ComponentName}` is the component's canonical Pega name, verbatim, for both the folder and the implementation file — `Checkbox/Checkbox.*`, never `checkbox/CheckboxField.*`
92
+ - **Paths are fixed by Pega, not inferred from the customer.** Components live at `{output_path}/{ComponentName}/{ComponentName}.{ext}`, where `{ComponentName}` is the component's canonical Pega name, verbatim, for both the folder and the implementation file — `Checkbox/Checkbox.*`, never `checkbox/CheckboxField.*`. Every component, the infrastructure chrome included, sits directly under `{output_path}` — there are no `field`/`template`/`widget`/`designSystemExtension`/`infra` subfolders
80
93
  - **Resolve the canonical name, never assume it.** Step 1 of `{{PROMPT_DIR}}/generate-embedded-components{{PROMPT_EXT}}` defines the resolution procedure — normalized name match, then alias lookup, then behaviour class, then ask the user — against `{{PROMPT_DIR}}/component-manifest.json`. It is the authority, and it forbids fuzzy "similar sounding" matching. Follow it when adding a component by hand, not only when running the prompt
81
94
  - Use the customer's **file extension** for their framework
82
95
  - Use the customer's **export pattern** (default export, named export, barrel file)
@@ -102,11 +115,13 @@ The customer's platform still imposes constraints the generated code must satisf
102
115
 
103
116
  1. **Never import from the customer's existing components** — generated Pega components are self-contained. If you need a UI primitive, import it from the customer's UI library package, not from their source components.
104
117
 
105
- 2. **Never modify the customer's existing files while generating components** — the `pega-components/` folder is additive, and component generation writes nothing outside it.
118
+ 2. **Never modify the customer's existing files while generating components** — the generated components folder (`{output_path}`) is additive, and component generation writes nothing outside it.
119
+
120
+ **Exception — integration seams.** Wiring a case flow into the customer's app necessarily edits their code, and that is expected. `{{SKILL_DIR}}/embedded-flow/wire-integration{{SKILL_EXT}}` defines the complete set of permitted touch points: the dependency manifest, the HTML and application entry points, the OAuth callback assets, `sdk-config.json`, a new bootstrap module, the control or event that launches the case, the element that hosts the Pega container, the lifecycle event subscriptions, and the verification tooling described in `{{SKILL_DIR}}/embedded-flow/run-and-verify-integration{{SKILL_EXT}}` (an additive verification folder, its script entry, and the version-control ignore rule for its session-state directory). Confine edits to those seams — make the smallest change that connects the customer's existing control to the SDK, and never restructure, restyle, or refactor the surrounding code while you are in there.
106
121
 
107
- **Exception — integration seams.** Wiring a case flow into the customer's app necessarily edits their code, and that is expected. `{{SKILL_DIR}}/embedded-flow/wire-integration.md` defines the complete set of permitted touch points: the dependency manifest, the HTML and application entry points, the OAuth callback assets, `sdk-config.json`, a new bootstrap module, the control or event that launches the case, the element that hosts the Pega container, the lifecycle event subscriptions, and the verification tooling described in `{{SKILL_DIR}}/embedded-flow/run-and-verify-integration.md` (an additive verification folder, its script entry, and the version-control ignore rule for its session-state directory). Confine edits to those seams — make the smallest change that connects the customer's existing control to the SDK, and never restructure, restyle, or refactor the surrounding code while you are in there.
122
+ Verification does not widen this exception. A failing check is not permission to edit customer code outside these seams to make it pass — see `{{SKILL_DIR}}/embedded-flow/run-and-verify-integration{{SKILL_EXT}}` for what may be fixed and what must only be reported.
108
123
 
109
- Verification does not widen this exception. A failing check is not permission to edit customer code outside these seams to make it pass — see `{{SKILL_DIR}}/embedded-flow/run-and-verify-integration.md` for what may be fixed and what must only be reported.
124
+ **Exception — the folder these rules apply to.** When the user chooses a folder other than `pega-components/`, analysis updates the file-matching line at the top of this rules file to that folder — see Step 0 of `{{SKILL_DIR}}/embedded-flow/analyze-customer-repo{{SKILL_EXT}}`. That one line is the only AI configuration change permitted.
110
125
 
111
126
  3. **Never introduce new dependencies** — only use packages already in the customer's dependency manifest plus the Pega SDK packages. If a needed package is missing, flag it to the user.
112
127
 
@@ -124,11 +139,11 @@ The customer's platform still imposes constraints the generated code must satisf
124
139
 
125
140
  ## Registry File Rules
126
141
 
127
- The `component-map.*` file in the `pega-components/` folder:
142
+ The `component-map.*` file, directly in `{output_path}`:
128
143
 
129
144
  1. Must export a registration function that accepts a component registry and registers all generated components
130
145
  2. Must spread/include the SDK's built-in infrastructure components (NavBar, DeferLoad, VerticalTabs, DashboardFilter and the structural set), which ship with the SDK's own styling
131
146
  3. May override three of them — `ActionButtons`, `MultiStep`, and `Stages`. These render inline with the case form, so they are generated in the customer's design system rather than left SDK-styled. `ActionButtons` and `MultiStep` are assignment chrome and belong in an embedded flow; `Stages` is case chrome and only applies to a case-view surface. Because an override replaces the spread entry, it must appear _after_ the spread
132
- 4. Keys must match Pega's canonical component names exactly (case-sensitive)
147
+ 4. Keys must match Pega's canonical component names exactly (case-sensitive). **One exception:** `ToDo` is registered under the key `Todo` (`Todo: ToDo`), because that is the name the Pega engine and the SDK request at runtime. Its folder and file stay `ToDo/ToDo.*`
133
148
  5. Must import each generated component and map it to its Pega name
134
- 6. Must never contain a non-canonical key. Aliases and design-system names are resolved away _before_ registration by Step 1 of `{{PROMPT_DIR}}/generate-embedded-components{{PROMPT_EXT}}`, so they never appear here — Pega would never request them at runtime
149
+ 6. Must never contain a non-canonical key, apart from the `Todo` key in rule 4. Aliases and design-system names are resolved away _before_ registration by Step 1 of `{{PROMPT_DIR}}/generate-embedded-components{{PROMPT_EXT}}`, so they never appear here — Pega would never request them at runtime