@pega/sdk 0.0.2 → 0.0.3

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 (222) hide show
  1. package/dist/index.js +2 -2
  2. package/package.json +1 -1
  3. package/templates/react-sdk-reference/.claude/instructions/component-map.md +38 -0
  4. package/templates/react-sdk-reference/.claude/instructions/dse-component.md +75 -0
  5. package/templates/react-sdk-reference/.claude/instructions/field-component.md +71 -0
  6. package/templates/react-sdk-reference/.claude/instructions/template-component.md +92 -0
  7. package/templates/react-sdk-reference/.claude/instructions/widget-component.md +87 -0
  8. package/templates/react-sdk-reference/.claude/prompts/add-component.md +144 -0
  9. package/templates/react-sdk-reference/.claude/prompts/component-manifest.json +111 -0
  10. package/templates/react-sdk-reference/.claude/prompts/generate-all-components.md +149 -0
  11. package/templates/react-sdk-reference/.claude/prompts/generate-dse-components.md +126 -0
  12. package/templates/react-sdk-reference/.claude/prompts/generate-field-components.md +139 -0
  13. package/templates/react-sdk-reference/.claude/prompts/generate-template-components.md +151 -0
  14. package/templates/react-sdk-reference/.claude/prompts/generate-widget-components.md +124 -0
  15. package/templates/react-sdk-reference/.claude/prompts/identify-components.md +105 -0
  16. package/templates/react-sdk-reference/.claude/prompts/replace-design-system.md +519 -0
  17. package/templates/react-sdk-reference/.claude/skills/component-contracts.md +140 -0
  18. package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/AlertBanner.md +135 -0
  19. package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/Banner.md +149 -0
  20. package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/CaseSummaryFields.md +154 -0
  21. package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/DetailsFields.md +144 -0
  22. package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/FieldGroup.md +131 -0
  23. package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/FieldGroupList.md +111 -0
  24. package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/FieldValueList.md +115 -0
  25. package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/Operator.md +149 -0
  26. package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/Pulse.md +83 -0
  27. package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/RichTextEditor.md +206 -0
  28. package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/WssQuickCreate.md +135 -0
  29. package/templates/react-sdk-reference/.claude/skills/design-system-extension.md +289 -0
  30. package/templates/react-sdk-reference/.claude/skills/field-components.md +294 -0
  31. package/templates/react-sdk-reference/.claude/skills/field-skills/AutoComplete.md +112 -0
  32. package/templates/react-sdk-reference/.claude/skills/field-skills/CancelAlert.md +203 -0
  33. package/templates/react-sdk-reference/.claude/skills/field-skills/Checkbox.md +158 -0
  34. package/templates/react-sdk-reference/.claude/skills/field-skills/Currency.md +106 -0
  35. package/templates/react-sdk-reference/.claude/skills/field-skills/Date.md +99 -0
  36. package/templates/react-sdk-reference/.claude/skills/field-skills/DateTime.md +103 -0
  37. package/templates/react-sdk-reference/.claude/skills/field-skills/Decimal.md +98 -0
  38. package/templates/react-sdk-reference/.claude/skills/field-skills/Dropdown.md +114 -0
  39. package/templates/react-sdk-reference/.claude/skills/field-skills/Email.md +107 -0
  40. package/templates/react-sdk-reference/.claude/skills/field-skills/Group.md +90 -0
  41. package/templates/react-sdk-reference/.claude/skills/field-skills/Integer.md +87 -0
  42. package/templates/react-sdk-reference/.claude/skills/field-skills/Location.md +136 -0
  43. package/templates/react-sdk-reference/.claude/skills/field-skills/Multiselect.md +164 -0
  44. package/templates/react-sdk-reference/.claude/skills/field-skills/ObjectReference.md +164 -0
  45. package/templates/react-sdk-reference/.claude/skills/field-skills/Percentage.md +92 -0
  46. package/templates/react-sdk-reference/.claude/skills/field-skills/Phone.md +110 -0
  47. package/templates/react-sdk-reference/.claude/skills/field-skills/RadioButtons.md +146 -0
  48. package/templates/react-sdk-reference/.claude/skills/field-skills/RichText.md +138 -0
  49. package/templates/react-sdk-reference/.claude/skills/field-skills/ScalarList.md +124 -0
  50. package/templates/react-sdk-reference/.claude/skills/field-skills/SelectableCard.md +216 -0
  51. package/templates/react-sdk-reference/.claude/skills/field-skills/SemanticLink.md +148 -0
  52. package/templates/react-sdk-reference/.claude/skills/field-skills/TextArea.md +96 -0
  53. package/templates/react-sdk-reference/.claude/skills/field-skills/TextContent.md +101 -0
  54. package/templates/react-sdk-reference/.claude/skills/field-skills/TextInput.md +104 -0
  55. package/templates/react-sdk-reference/.claude/skills/field-skills/Time.md +88 -0
  56. package/templates/react-sdk-reference/.claude/skills/field-skills/URL.md +85 -0
  57. package/templates/react-sdk-reference/.claude/skills/field-skills/UserReference.md +180 -0
  58. package/templates/react-sdk-reference/.claude/skills/run-and-verify.md +68 -0
  59. package/templates/react-sdk-reference/.claude/skills/template-components.md +322 -0
  60. package/templates/react-sdk-reference/.claude/skills/template-skills/AdvancedSearch.md +144 -0
  61. package/templates/react-sdk-reference/.claude/skills/template-skills/AppShell.md +122 -0
  62. package/templates/react-sdk-reference/.claude/skills/template-skills/BannerPage.md +83 -0
  63. package/templates/react-sdk-reference/.claude/skills/template-skills/CaseSummary.md +100 -0
  64. package/templates/react-sdk-reference/.claude/skills/template-skills/CaseView.md +131 -0
  65. package/templates/react-sdk-reference/.claude/skills/template-skills/CaseViewActionsMenu.md +126 -0
  66. package/templates/react-sdk-reference/.claude/skills/template-skills/Confirmation.md +107 -0
  67. package/templates/react-sdk-reference/.claude/skills/template-skills/DataReference.md +120 -0
  68. package/templates/react-sdk-reference/.claude/skills/template-skills/DefaultForm.md +102 -0
  69. package/templates/react-sdk-reference/.claude/skills/template-skills/DefaultPage.md +110 -0
  70. package/templates/react-sdk-reference/.claude/skills/template-skills/Details.md +88 -0
  71. package/templates/react-sdk-reference/.claude/skills/template-skills/DetailsSubTabs.md +95 -0
  72. package/templates/react-sdk-reference/.claude/skills/template-skills/DetailsThreeColumn.md +78 -0
  73. package/templates/react-sdk-reference/.claude/skills/template-skills/DetailsTwoColumn.md +78 -0
  74. package/templates/react-sdk-reference/.claude/skills/template-skills/DynamicTabs.md +101 -0
  75. package/templates/react-sdk-reference/.claude/skills/template-skills/FieldGroupTemplate.md +109 -0
  76. package/templates/react-sdk-reference/.claude/skills/template-skills/HierarchicalForm.md +113 -0
  77. package/templates/react-sdk-reference/.claude/skills/template-skills/InlineDashboard.md +104 -0
  78. package/templates/react-sdk-reference/.claude/skills/template-skills/InlineDashboardPage.md +85 -0
  79. package/templates/react-sdk-reference/.claude/skills/template-skills/ListPage.md +68 -0
  80. package/templates/react-sdk-reference/.claude/skills/template-skills/ListView.md +139 -0
  81. package/templates/react-sdk-reference/.claude/skills/template-skills/MultiReferenceReadOnly.md +80 -0
  82. package/templates/react-sdk-reference/.claude/skills/template-skills/NarrowWide.md +141 -0
  83. package/templates/react-sdk-reference/.claude/skills/template-skills/OneColumn.md +109 -0
  84. package/templates/react-sdk-reference/.claude/skills/template-skills/PromotedFilters.md +124 -0
  85. package/templates/react-sdk-reference/.claude/skills/template-skills/SelfServiceCaseView.md +135 -0
  86. package/templates/react-sdk-reference/.claude/skills/template-skills/SimpleTable.md +127 -0
  87. package/templates/react-sdk-reference/.claude/skills/template-skills/SingleReferenceReadOnly.md +103 -0
  88. package/templates/react-sdk-reference/.claude/skills/template-skills/SubTabs.md +79 -0
  89. package/templates/react-sdk-reference/.claude/skills/template-skills/TwoColumn.md +131 -0
  90. package/templates/react-sdk-reference/.claude/skills/template-skills/WideNarrow.md +150 -0
  91. package/templates/react-sdk-reference/.claude/skills/template-skills/WssNavBar.md +135 -0
  92. package/templates/react-sdk-reference/.claude/skills/widget-components.md +271 -0
  93. package/templates/react-sdk-reference/.claude/skills/widget-skills/AppAnnouncement.md +82 -0
  94. package/templates/react-sdk-reference/.claude/skills/widget-skills/Attachment.md +146 -0
  95. package/templates/react-sdk-reference/.claude/skills/widget-skills/CaseHistory.md +107 -0
  96. package/templates/react-sdk-reference/.claude/skills/widget-skills/FileUtility.md +200 -0
  97. package/templates/react-sdk-reference/.claude/skills/widget-skills/Followers.md +99 -0
  98. package/templates/react-sdk-reference/.claude/skills/widget-skills/QuickCreate.md +114 -0
  99. package/templates/react-sdk-reference/.claude/skills/widget-skills/SummaryItem.md +167 -0
  100. package/templates/react-sdk-reference/.claude/skills/widget-skills/ToDo.md +190 -0
  101. package/templates/react-sdk-reference/.cursor/rules/component-map.mdrules +41 -0
  102. package/templates/react-sdk-reference/.cursor/rules/dse-component.mdrules +78 -0
  103. package/templates/react-sdk-reference/.cursor/rules/field-component.mdrules +74 -0
  104. package/templates/react-sdk-reference/.cursor/rules/pega-sdk.mdrules +247 -0
  105. package/templates/react-sdk-reference/.cursor/rules/prompts/add-component.mdrules +149 -0
  106. package/templates/react-sdk-reference/.cursor/rules/prompts/component-manifest.json +111 -0
  107. package/templates/react-sdk-reference/.cursor/rules/prompts/generate-all-components.mdrules +154 -0
  108. package/templates/react-sdk-reference/.cursor/rules/prompts/generate-dse-components.mdrules +131 -0
  109. package/templates/react-sdk-reference/.cursor/rules/prompts/generate-field-components.mdrules +144 -0
  110. package/templates/react-sdk-reference/.cursor/rules/prompts/generate-template-components.mdrules +156 -0
  111. package/templates/react-sdk-reference/.cursor/rules/prompts/generate-widget-components.mdrules +129 -0
  112. package/templates/react-sdk-reference/.cursor/rules/prompts/identify-components.mdrules +110 -0
  113. package/templates/react-sdk-reference/.cursor/rules/prompts/replace-design-system.mdrules +524 -0
  114. package/templates/react-sdk-reference/.cursor/rules/skills/component-contracts.mdrules +145 -0
  115. package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/AlertBanner.mdrules +140 -0
  116. package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/Banner.mdrules +154 -0
  117. package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/CaseSummaryFields.mdrules +159 -0
  118. package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/DetailsFields.mdrules +149 -0
  119. package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/FieldGroup.mdrules +136 -0
  120. package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/FieldGroupList.mdrules +116 -0
  121. package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/FieldValueList.mdrules +120 -0
  122. package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/Operator.mdrules +154 -0
  123. package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/Pulse.mdrules +88 -0
  124. package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/RichTextEditor.mdrules +211 -0
  125. package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension-skills/WssQuickCreate.mdrules +140 -0
  126. package/templates/react-sdk-reference/.cursor/rules/skills/design-system-extension.mdrules +294 -0
  127. package/templates/react-sdk-reference/.cursor/rules/skills/field-components.mdrules +299 -0
  128. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/AutoComplete.mdrules +117 -0
  129. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/CancelAlert.mdrules +208 -0
  130. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Checkbox.mdrules +163 -0
  131. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Currency.mdrules +111 -0
  132. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Date.mdrules +104 -0
  133. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/DateTime.mdrules +108 -0
  134. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Decimal.mdrules +103 -0
  135. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Dropdown.mdrules +119 -0
  136. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Email.mdrules +112 -0
  137. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Group.mdrules +95 -0
  138. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Integer.mdrules +92 -0
  139. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Location.mdrules +141 -0
  140. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Multiselect.mdrules +169 -0
  141. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/ObjectReference.mdrules +169 -0
  142. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Percentage.mdrules +97 -0
  143. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Phone.mdrules +115 -0
  144. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/RadioButtons.mdrules +151 -0
  145. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/RichText.mdrules +143 -0
  146. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/ScalarList.mdrules +129 -0
  147. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/SelectableCard.mdrules +221 -0
  148. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/SemanticLink.mdrules +153 -0
  149. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/TextArea.mdrules +101 -0
  150. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/TextContent.mdrules +106 -0
  151. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/TextInput.mdrules +109 -0
  152. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/Time.mdrules +93 -0
  153. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/URL.mdrules +90 -0
  154. package/templates/react-sdk-reference/.cursor/rules/skills/field-skills/UserReference.mdrules +185 -0
  155. package/templates/react-sdk-reference/.cursor/rules/skills/run-and-verify.mdrules +73 -0
  156. package/templates/react-sdk-reference/.cursor/rules/skills/template-components.mdrules +327 -0
  157. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/AdvancedSearch.mdrules +149 -0
  158. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/AppShell.mdrules +127 -0
  159. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/BannerPage.mdrules +88 -0
  160. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/CaseSummary.mdrules +105 -0
  161. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/CaseView.mdrules +136 -0
  162. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/CaseViewActionsMenu.mdrules +131 -0
  163. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/Confirmation.mdrules +112 -0
  164. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/DataReference.mdrules +125 -0
  165. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/DefaultForm.mdrules +107 -0
  166. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/DefaultPage.mdrules +115 -0
  167. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/Details.mdrules +93 -0
  168. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/DetailsSubTabs.mdrules +100 -0
  169. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/DetailsThreeColumn.mdrules +83 -0
  170. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/DetailsTwoColumn.mdrules +83 -0
  171. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/DynamicTabs.mdrules +106 -0
  172. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/FieldGroupTemplate.mdrules +114 -0
  173. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/HierarchicalForm.mdrules +118 -0
  174. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/InlineDashboard.mdrules +109 -0
  175. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/InlineDashboardPage.mdrules +90 -0
  176. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/ListPage.mdrules +73 -0
  177. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/ListView.mdrules +144 -0
  178. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/MultiReferenceReadOnly.mdrules +85 -0
  179. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/NarrowWide.mdrules +146 -0
  180. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/OneColumn.mdrules +114 -0
  181. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/PromotedFilters.mdrules +129 -0
  182. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/SelfServiceCaseView.mdrules +140 -0
  183. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/SimpleTable.mdrules +132 -0
  184. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/SingleReferenceReadOnly.mdrules +108 -0
  185. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/SubTabs.mdrules +84 -0
  186. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/TwoColumn.mdrules +136 -0
  187. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/WideNarrow.mdrules +155 -0
  188. package/templates/react-sdk-reference/.cursor/rules/skills/template-skills/WssNavBar.mdrules +140 -0
  189. package/templates/react-sdk-reference/.cursor/rules/skills/widget-components.mdrules +276 -0
  190. package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/AppAnnouncement.mdrules +87 -0
  191. package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/Attachment.mdrules +151 -0
  192. package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/CaseHistory.mdrules +112 -0
  193. package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/FileUtility.mdrules +205 -0
  194. package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/Followers.mdrules +104 -0
  195. package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/QuickCreate.mdrules +119 -0
  196. package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/SummaryItem.mdrules +172 -0
  197. package/templates/react-sdk-reference/.cursor/rules/skills/widget-skills/ToDo.mdrules +195 -0
  198. package/templates/react-sdk-reference/.cursor/rules/template-component.mdrules +95 -0
  199. package/templates/react-sdk-reference/.cursor/rules/widget-component.mdrules +90 -0
  200. package/templates/react-sdk-reference/.github/copilot-instructions.md +58 -0
  201. package/templates/react-sdk-reference/.github/prompts/add-component.prompt.md +144 -16
  202. package/templates/react-sdk-reference/.github/prompts/generate-all-components.prompt.md +154 -0
  203. package/templates/react-sdk-reference/.github/prompts/generate-dse-components.prompt.md +131 -0
  204. package/templates/react-sdk-reference/.github/prompts/generate-field-components.prompt.md +144 -0
  205. package/templates/react-sdk-reference/.github/prompts/generate-template-components.prompt.md +156 -0
  206. package/templates/react-sdk-reference/.github/prompts/generate-widget-components.prompt.md +129 -0
  207. package/templates/react-sdk-reference/.github/skills/design-system-extension.md +58 -18
  208. package/templates/react-sdk-reference/.github/skills/field-components.md +55 -23
  209. package/templates/react-sdk-reference/.github/skills/template-components.md +48 -11
  210. package/templates/react-sdk-reference/.github/skills/widget-components.md +49 -12
  211. package/templates/react-sdk-reference/AGENTS.md +217 -29
  212. package/templates/react-sdk-reference/package.json +1 -1
  213. package/templates/react-sdk-reference/pega-constellationjs-0.26.3-local.tgz +0 -0
  214. package/templates/react-sdk-reference/pega-sdk-react-0.1.0.tgz +0 -0
  215. package/templates/react-sdk-reference/sdk-config.json +1 -1
  216. package/templates/react-sdk-reference/vite.config.ts +1 -1
  217. package/templates/react-sdk-reference/.github/prompts/replace-all-fields.prompt.md +0 -48
  218. package/templates/react-sdk-reference/.github/prompts/replace-component.prompt.md +0 -81
  219. package/templates/react-sdk-reference/.github/prompts/replace-field.prompt.md +0 -41
  220. package/templates/react-sdk-reference/.github/prompts/swap-design-system.prompt.md +0 -49
  221. package/templates/react-sdk-reference/.github/skills/swap-design-system.md +0 -105
  222. package/templates/react-sdk-reference/pega-constellationjs-0.26.2.tgz +0 -0
@@ -183,3 +183,61 @@ import handleEvent from '../../helpers/event-utils';
183
183
  - Remove the `...sdkComponents` spread from `component-map.ts`.
184
184
  - Use `any` without justification — prefer `unknown` and narrow.
185
185
  - Add `@ts-ignore` — use `@ts-expect-error` with explanation if truly needed.
186
+
187
+ ---
188
+
189
+ ## 9. Component Generation Workflow — Single Component
190
+
191
+ 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"),
192
+ read the full contents of `.github/prompts/add-component.prompt.md` and
193
+ execute every step in order before writing any code.
194
+ Do not skip steps or proceed without reading the required skill files first.
195
+
196
+ > For generating **multiple field components** at once, see Section 10.
197
+
198
+ ---
199
+
200
+ ## 10. Batch Field Component Generation
201
+
202
+ 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"),
203
+ read the full contents of `.github/prompts/generate-field-components.prompt.md` and
204
+ execute every step in order before writing any code.
205
+ Do not skip steps or proceed without reading the required skill files first.
206
+
207
+ ---
208
+
209
+ ## 11. Batch Template Component Generation
210
+
211
+ 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"),
212
+ read the full contents of `.github/prompts/generate-template-components.prompt.md` and
213
+ execute every step in order before writing any code.
214
+ Do not skip steps or proceed without reading the required skill files first.
215
+
216
+ ---
217
+
218
+ ## 12. Batch Widget Component Generation
219
+
220
+ 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"),
221
+ read the full contents of `.github/prompts/generate-widget-components.prompt.md` and
222
+ execute every step in order before writing any code.
223
+ Do not skip steps or proceed without reading the required skill files first.
224
+
225
+ ---
226
+
227
+ ## 13. Batch Design System Extension Component Generation
228
+
229
+ 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"),
230
+ read the full contents of `.github/prompts/generate-dse-components.prompt.md` and
231
+ execute every step in order before writing any code.
232
+ Do not skip steps or proceed without reading the required skill files first.
233
+
234
+ ---
235
+
236
+ ## 14. Generate All Components (Multi-Type)
237
+
238
+ 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"),
239
+ read the full contents of `.github/prompts/generate-all-components.prompt.md` and
240
+ execute every step in order before writing any code.
241
+ Do not skip steps or proceed without reading the required skill files first.
242
+
243
+ > Use this section when the request spans more than one component type. For a single type, use Sections 10–13.
@@ -3,19 +3,147 @@ agent: agent
3
3
  description: Add a new component type to the registry
4
4
  ---
5
5
 
6
- Add a new component called `{{componentName}}` of type **{{componentType}}** (field | template | widget | designSystemExtension).
7
-
8
- ## Steps:
9
-
10
- 1. Create the component directory: `src/components/{{componentType}}/{{componentName}}/`
11
- 2. Create `{{componentName}}.tsx` with the appropriate pattern:
12
- - **field**: Extend `PConnFieldProps`, use `handleEvent`, handle `displayMode`
13
- - **template**: Extend `PConnProps`, render children via grid/layout
14
- - **widget**: Extend `PConnProps`, fetch data via `PCore.getDataPageUtils()`
15
- - **designSystemExtension**: Pure display props or extend `PConnProps`
16
- 3. Create `index.tsx` with: `export { default } from './{{componentName}}';`
17
- 4. Register in `src/components/component-map.ts`:
18
- - Add import at top
19
- - Add entry in the appropriate section of `getSampleComponentMap()`
20
-
21
- Ensure the build passes after adding the component.
6
+ ## Step 0 Resolve missing information
7
+
8
+ Read the user's message carefully. Extract:
9
+
10
+ - **Component name** — the exact name (e.g. `AutoComplete`, `DatePicker`)
11
+ - **Component type** — one of: `field` | `template` | `widget` | `designSystemExtension`
12
+ - **Design system** — the UI library to use (e.g. `Ant Design`, `Chakra UI`, `Carbon`, `Radix UI`)
13
+ - **Output path** the exact or relative path where the component should be generated (e.g. `src/components/field/AutoComplete`)
14
+
15
+ If any of the four are missing or ambiguous, ask the user all unresolved items in **one numbered list** and wait for their answers before continuing. Do not guess or proceed with assumptions.
16
+
17
+ Example questions to ask (only ask the ones that are actually missing):
18
+ 1. Which design system should I use? (e.g. Ant Design, Chakra UI, Carbon, Radix UI)
19
+ 2. What is the exact component name?
20
+ 3. What type of component is this? (field / template / widget / designSystemExtension)
21
+ 4. What is the exact or relative path where the component should be generated? (e.g. `src/components/field/AutoComplete`)
22
+
23
+ ### Case-insensitive component name matching
24
+
25
+ The user may enter the component name in any casing (e.g. `autocomplete`, `Autocomplete`, `autoComplete`). It is your responsibility to match it to the correct canonical name by checking the skill files in `.github/skills/field-skills/`, `.github/skills/template-skills/`, `.github/skills/widget-skills/`, and `.github/skills/design-system-extension-skills/`. For example, if the user types `autocomplete`, match it to `AutoComplete`.
26
+
27
+ Once all four are known, continue to Step 1.
28
+
29
+ ---
30
+
31
+ ## Step 1 — Check for existing component (overwrite check)
32
+
33
+ Before generating, check if a component already exists at the resolved output path:
34
+
35
+ 1. Check if `<outputPath>/<ComponentName>.tsx` (or the directory) already exists.
36
+ 2. If it **does exist**, ask the user: _"A component named `<ComponentName>` already exists at `<outputPath>`. Do you want to overwrite it with the new implementation?"_
37
+ - If the user says **yes**, proceed to overwrite.
38
+ - If the user says **no**, stop and skip generation.
39
+ 3. If it **does not exist**, continue to Step 2.
40
+
41
+ ---
42
+
43
+ ## Step 2 — Check for skill files
44
+
45
+ Always read the **general type skill** for the component type:
46
+
47
+ | Component Type | General Skill File |
48
+ |---|---|
49
+ | `field` | `.github/skills/field-components.md` |
50
+ | `template` | `.github/skills/template-components.md` |
51
+ | `widget` | `.github/skills/widget-components.md` |
52
+ | `designSystemExtension` | `.github/skills/design-system-extension.md` |
53
+
54
+ Then look for a **component-specific skill** based on the component type:
55
+
56
+ | Component Type | Specific Skill Location |
57
+ |---|---|
58
+ | `field` | `.github/skills/field-skills/<ComponentName>.md` |
59
+ | `template` | `.github/skills/template-skills/<ComponentName>.md` |
60
+ | `widget` | `.github/skills/widget-skills/<ComponentName>.md` |
61
+ | `designSystemExtension` | `.github/skills/design-system-extension-skills/<ComponentName>.md` |
62
+
63
+ If the component-specific skill file exists, read it fully. Pay special attention to:
64
+ - **Behavioral Contract** — state management, event handling, option loading, edge cases
65
+ - **Design System Mapping** table — the recommended component for the chosen design system
66
+
67
+ You must read **both** the general type skill and the component-specific skill (if it exists) before proceeding.
68
+
69
+ Examples:
70
+ - `AutoComplete` (field) → read `field-components.md` + `field-skills/AutoComplete.md`
71
+ - `AdvancedSearch` (template) → read `template-components.md` + `template-skills/AdvancedSearch.md`
72
+ - `AppAnnouncement` (widget) → read `widget-components.md` + `widget-skills/AppAnnouncement.md`
73
+ - `AlertBanner` (designSystemExtension) → read `design-system-extension.md` + `design-system-extension-skills/AlertBanner.md`
74
+
75
+ If no component-specific skill file exists, continue using the general pattern from the type skill.
76
+
77
+ ---
78
+
79
+ ## Step 3 — Check and install dependencies
80
+
81
+ Run:
82
+ ```
83
+ cat package.json | grep "<design-system-package>"
84
+ ```
85
+
86
+ If the design system package is **not** listed in `dependencies` or `devDependencies`, install it:
87
+ ```
88
+ npm install <design-system-package>
89
+ ```
90
+
91
+ Also install any peer dependencies documented in the package's README. Report what was installed.
92
+
93
+ ---
94
+
95
+ ## Step 4 — Discover the design system's API
96
+
97
+ Before writing any code, inspect the installed package:
98
+
99
+ 1. `cat node_modules/<designSystem>/README.md` — note the correct import path and usage patterns for the installed version.
100
+ 2. `grep "^export" node_modules/<designSystem>/dist/index.d.ts 2>/dev/null || grep -rl "^export" node_modules/<designSystem> --include="index.d.ts" | head -3 | xargs grep "^export"` — lists every component actually exported by the installed version.
101
+ 3. For every component you plan to use, read its TypeScript prop interface from the installed `.d.ts`:
102
+ `find node_modules/<designSystem> -name "ComponentName.d.ts" | head -3`, then `grep -A 40 "interface.*Props"` on the result.
103
+ 4. Only use component names and prop names confirmed in those files. Do not rely on training knowledge of the API.
104
+
105
+ Also check:
106
+ - Whether the design system has a **form layout wrapper** (label + input + helper text) — use it instead of manual margins
107
+ - Whether it has **size/density/variant conventions** — use built-in props rather than custom padding
108
+ - Whether it has a **companion icons package** — read its exports before using any icon name; never guess icon names
109
+ - Whether it has a **tokens or CSS directory** — use design system CSS custom properties for spacing; never hardcode `px` values
110
+
111
+ ---
112
+
113
+ ## Step 5 — Generate the component
114
+
115
+ Create the component directory at the resolved output path (from Step 0).
116
+
117
+ Create `<ComponentName>.tsx` using the pattern for the component type:
118
+
119
+ - **field**: Extend `PConnFieldProps` from `@pega/sdk-react`. Extract `getPConnect`, `label`, `required`, `disabled`, `value`, `validatemessage`, `status`, `readOnly`, `testId`, `helperText`, `displayMode`, `hideLabel`, `placeholder`. Call `handleEvent(actions, 'changeNblur', propName, value)` on blur. Handle `displayMode === 'DISPLAY_ONLY'` and `'STACKED_LARGE_VAL'` using `getComponentFromRegistry('FieldValueList')`. Show `validatemessage` when `status === 'error'`. Pass `data-test-id={testId}` on the interactive element.
120
+ - **template**: Extend `PConnProps`, render children via the design system's grid/layout primitives
121
+ - **widget**: Extend `PConnProps`, fetch data via `PCore.getDataPageUtils()`
122
+ - **designSystemExtension**: Pure display props or extend `PConnProps`
123
+
124
+ Create `index.tsx`:
125
+ ```typescript
126
+ export { default } from './<ComponentName>';
127
+ ```
128
+
129
+ ---
130
+
131
+ ## Step 6 — Register in component-map.ts
132
+
133
+ Edit `src/components/component-map.ts`:
134
+
135
+ 1. Add the import at the top of the file, in the correct section (Fields / Templates / Widgets / Design System Extension)
136
+ 2. Add an entry in `getSampleComponentMap()` under the matching category comment
137
+
138
+ Do not restructure or reorder any existing entries.
139
+
140
+ ---
141
+
142
+ ## Step 7 — Verify the build
143
+
144
+ Run:
145
+ ```
146
+ npm run build
147
+ ```
148
+
149
+ If build errors occur, fix them before reporting completion. Report what files were created and what was added to `component-map.ts`.
@@ -0,0 +1,154 @@
1
+ ---
2
+ agent: agent
3
+ description: Generate components across multiple types (field, template, widget, designSystemExtension) using any design system
4
+ ---
5
+
6
+ ## Step 0 — Resolve inputs
7
+
8
+ Read the user's message carefully. Extract:
9
+
10
+ - **Design system** — the UI library to use (e.g. `Ant Design`, `Chakra UI`, `Carbon`, `Radix UI`)
11
+ - **Base components folder** — the root folder that contains (or will contain) the component type subfolders (e.g. `src/components/`)
12
+ - **Component types in scope** — which types to generate (default: all four if not specified)
13
+
14
+ Both **design system** and **base components folder** are required. If either is missing or ambiguous, ask both unresolved items in one numbered list. Do not assume or default the base folder — the client's folder structure may differ.
15
+
16
+ Example questions (ask only the ones that are actually missing):
17
+ 1. Which design system should I use? (e.g. Ant Design, Chakra UI, Carbon, Radix UI)
18
+ 2. What is your base components folder? (e.g. `src/components/`) — subfolders `field/`, `template/`, `widget/`, and `designSystemExtension/` will be used under it.
19
+
20
+ ### Component type scope
21
+
22
+ Extract which types the user wants from the message:
23
+
24
+ | User says | Types in scope |
25
+ |---|---|
26
+ | "generate all components" | field + template + widget + designSystemExtension |
27
+ | "generate field and widget components" | field + widget |
28
+ | "generate widget, template components" | widget + template |
29
+ | "generate all components except templates" | field + widget + designSystemExtension |
30
+ | "replace everything" | field + template + widget + designSystemExtension |
31
+
32
+ Default to **all four types** if the message does not restrict the scope.
33
+
34
+ ### Derived output paths
35
+
36
+ Once the base folder is known, derive the output path for each type in scope:
37
+
38
+ | Type | Derived path |
39
+ |---|---|
40
+ | field | `<base>/field/` |
41
+ | template | `<base>/template/` |
42
+ | widget | `<base>/widget/` |
43
+ | designSystemExtension | `<base>/designSystemExtension/` |
44
+
45
+ Once design system, base folder, and type scope are resolved, continue to Step 1.
46
+
47
+ ---
48
+
49
+ ## Step 1 — Read general skill files (once, for each type in scope)
50
+
51
+ Read the general skill file for every type in scope. Do this upfront — do not re-read per component.
52
+
53
+ | Type | Skill file to read |
54
+ |---|---|
55
+ | field | `.github/skills/field-components.md` |
56
+ | template | `.github/skills/template-components.md` |
57
+ | widget | `.github/skills/widget-components.md` |
58
+ | designSystemExtension | `.github/skills/design-system-extension.md` |
59
+
60
+ Keep all loaded skill files active throughout the entire session.
61
+
62
+ ---
63
+
64
+ ## Step 2 — Install and discover the design system (once)
65
+
66
+ Execute **Step 3** from `.github/prompts/add-component.prompt.md` exactly as written:
67
+ - Check `package.json` for the DS package
68
+ - Install if missing, including any peer dependencies
69
+ - Report what was installed
70
+
71
+ Then execute **Step 4** from `.github/prompts/add-component.prompt.md` exactly as written:
72
+ - Read the DS README from `node_modules`
73
+ - Discover all exported components from `dist/index.d.ts`
74
+ - Read prop interfaces for primitives needed across **all types in scope**:
75
+ - **field**: form input controls (Input, Select, Checkbox, DatePicker, etc.)
76
+ - **template**: grid/layout primitives (Grid, Flex, Columns, SimpleGrid, etc.)
77
+ - **widget**: card/list/table/button/badge primitives
78
+ - **designSystemExtension**: alert/notification/avatar primitives
79
+ - Note form layout wrappers, size/variant conventions, icon packages, and design tokens
80
+
81
+ Build a unified **DS API reference map** covering all types in scope. Reuse it throughout — do not repeat discovery commands per component.
82
+
83
+ ---
84
+
85
+ ## Step 3 — Overwrite check (all types, all at once)
86
+
87
+ For every type in scope, check whether each component's `<outputPath>/<ComponentName>/<ComponentName>.tsx` already exists.
88
+
89
+ Collect all existing components across all types and report them in one consolidated list:
90
+
91
+ > "The following N components already exist across [types]: [list grouped by type]. How should I proceed?
92
+ > - **Overwrite all** — replace all existing implementations
93
+ > - **Skip existing** — only generate components that don't exist yet
94
+ > - **Cancel** — stop without generating anything"
95
+
96
+ Wait for the user's answer before proceeding. If none exist, continue immediately.
97
+
98
+ ---
99
+
100
+ ## Step 4 — Generate field components (skip if field not in scope)
101
+
102
+ If `field` is in scope, execute **Step 4** from `.github/prompts/generate-field-components.prompt.md` in full:
103
+ - Use the derived field output path: `<base>/field/`
104
+ - The general skill (`field-components.md`) is already loaded from Step 1 — do not re-read it
105
+ - The DS API reference map is already built from Step 2 — do not repeat discovery commands
106
+ - For each of the 27 field components: read skill file → generate → register in `component-map.ts`
107
+ - Report progress after each component
108
+
109
+ ---
110
+
111
+ ## Step 5 — Generate template components (skip if template not in scope)
112
+
113
+ If `template` is in scope, execute **Step 4** from `.github/prompts/generate-template-components.prompt.md` in full:
114
+ - Use the derived template output path: `<base>/template/`
115
+ - The general skill (`template-components.md`) is already loaded from Step 1 — do not re-read it
116
+ - The DS layout API is already discovered from Step 2 — do not repeat discovery commands
117
+ - For each of the 32 template components: read skill file → generate → register in `component-map.ts`
118
+ - Report progress after each component
119
+
120
+ ---
121
+
122
+ ## Step 6 — Generate widget components (skip if widget not in scope)
123
+
124
+ If `widget` is in scope, execute **Step 4** from `.github/prompts/generate-widget-components.prompt.md` in full:
125
+ - Use the derived widget output path: `<base>/widget/`
126
+ - The general skill (`widget-components.md`) is already loaded from Step 1 — do not re-read it
127
+ - The DS UI primitive map is already built from Step 2 — do not repeat discovery commands
128
+ - For each of the 9 widget components: read skill file → generate → register in `component-map.ts`
129
+ - If no skill file exists for a component (e.g., `SummaryList`), use the general pattern from `widget-components.md`
130
+ - Report progress after each component
131
+
132
+ ---
133
+
134
+ ## Step 7 — Generate design system extension components (skip if DSE not in scope)
135
+
136
+ If `designSystemExtension` is in scope, execute **Step 4** from `.github/prompts/generate-dse-components.prompt.md` in full:
137
+ - Use the derived DSE output path: `<base>/designSystemExtension/`
138
+ - The general skill (`design-system-extension.md`) is already loaded from Step 1 — do not re-read it
139
+ - The DS display primitive map is already built from Step 2 — do not repeat discovery commands
140
+ - For each of the 11 DSE components: read skill file → generate → register in `component-map.ts`
141
+ - Apply the Pattern B/A/C branching as specified in the skill file and `design-system-extension.md`
142
+ - Report progress after each component
143
+
144
+ ---
145
+
146
+ ## Step 8 — Verify the build
147
+
148
+ Execute **Step 7** from `.github/prompts/add-component.prompt.md` exactly as written:
149
+ - Run `npm run build`
150
+ - Fix any TypeScript or build errors before reporting completion
151
+ - Report a final summary:
152
+ - Total components generated, grouped by type
153
+ - All entries added to `component-map.ts`
154
+ - Any components skipped (if "skip existing" was chosen in Step 3)
@@ -0,0 +1,131 @@
1
+ ---
2
+ agent: agent
3
+ description: Generate all (or a subset of) design system extension components using any design system
4
+ ---
5
+
6
+ ## Step 0 — Resolve inputs
7
+
8
+ Read the user's message carefully. Extract:
9
+
10
+ - **Design system** — the UI library to use (e.g. `Ant Design`, `Chakra UI`, `Carbon`, `Radix UI`)
11
+ - **Output base path** — the folder where DSE components should be generated (e.g. `src/components/designSystemExtension/`)
12
+ - **Component list** — which components to generate (default: all 11 listed below)
13
+
14
+ Both **design system** and **output base path** are required. If either is missing or ambiguous, ask both unresolved items in one numbered list. Do not assume or default the output path — the client's folder structure may differ from the reference app.
15
+
16
+ Example questions (ask only the ones that are actually missing):
17
+ 1. Which design system should I use? (e.g. Ant Design, Chakra UI, Carbon, Radix UI)
18
+ 2. Where should the DSE components be generated? (e.g. `src/components/designSystemExtension/`)
19
+
20
+ If the user specified a subset (e.g., "just AlertBanner and FieldValueList"), restrict the list accordingly.
21
+
22
+ Once both are known, continue to Step 1.
23
+
24
+ ### Full component list (default — 11 DSE components)
25
+
26
+ | Component | Pattern | DS needed? |
27
+ |---|---|---|
28
+ | AlertBanner | B — Pure display | Yes |
29
+ | Banner | B — Pure display | Yes |
30
+ | CaseSummaryFields | A — PConnect display | Minimal |
31
+ | DetailsFields | A — PConnect display | Minimal |
32
+ | FieldGroup | C — Complex display | No |
33
+ | FieldGroupList | C — Complex display | No |
34
+ | FieldValueList | A — PConnect display | No (CSS only) |
35
+ | Operator | B — Pure display | Yes |
36
+ | Pulse | C — Complex display | No |
37
+ | RichTextEditor | C — Complex display | No |
38
+ | WssQuickCreate | B — Pure display | Yes |
39
+
40
+ ---
41
+
42
+ ## Step 1 — Read `design-system-extension.md` (once, for the entire session)
43
+
44
+ Read the full contents of `.github/skills/design-system-extension.md`.
45
+
46
+ This gives you:
47
+ - All three implementation patterns (Pure display, Field value display, Complex display with PConnect)
48
+ - The `// [DS RENDER]` placeholder approach for Pattern B components
49
+ - The Design System Adaptation section — pattern categorisation, variant mapping table, DS discovery guidance
50
+ - Styling patterns — when to use CSS files vs DS style props
51
+ - Registration conventions
52
+
53
+ Keep this context active throughout the entire generation session. Do not re-read it per component.
54
+
55
+ ---
56
+
57
+ ## Step 2 — Install and discover the design system (once)
58
+
59
+ Execute **Step 3** from `.github/prompts/add-component.prompt.md` exactly as written:
60
+ - Check `package.json` for the DS package
61
+ - Install if missing, including any peer dependencies
62
+ - Report what was installed
63
+
64
+ Then execute **Step 4** from `.github/prompts/add-component.prompt.md` exactly as written:
65
+ - Read the DS README from `node_modules`
66
+ - Discover exported components from `dist/index.d.ts`
67
+ - Focus on display primitives used by Pattern B components: Alert, Card, Avatar, Badge, Tag, Notification
68
+ - Read prop interfaces for these components from `.d.ts` files
69
+
70
+ > Pattern A/C components (FieldValueList, FieldGroup, Pulse, etc.) use PConnect bridge or plain CSS — they do not use the DS API. Only Pattern B components consume DS primitives.
71
+
72
+ Build a **DS display primitive reference map** from this discovery. Reuse it for every Pattern B component — do not repeat these commands per component.
73
+
74
+ ---
75
+
76
+ ## Step 3 — Overwrite check (all at once)
77
+
78
+ For each component in the list, check whether `<outputPath>/<ComponentName>/<ComponentName>.tsx` already exists.
79
+
80
+ If **any** exist, report them all at once and ask:
81
+ > "The following N components already exist: [list]. How should I proceed?
82
+ > - **Overwrite all** — replace all existing implementations
83
+ > - **Skip existing** — only generate components that don't exist yet
84
+ > - **Cancel** — stop without generating anything"
85
+
86
+ Wait for the user's answer before proceeding. If none exist, continue immediately.
87
+
88
+ ---
89
+
90
+ ## Step 4 — Generate each component (loop)
91
+
92
+ For each component in the resolved list (in the order listed in Step 0):
93
+
94
+ ### 4a — Read the component-specific skill file
95
+ Execute **Step 2** from `.github/prompts/add-component.prompt.md` for this component:
96
+ - Read `.github/skills/design-system-extension-skills/<ComponentName>.md` fully
97
+ - Identify the component's pattern (B / A / C) from the skill file
98
+ - Pay attention to:
99
+ - **Behavioral Contract** — prop handling, variant mapping, rendering logic, edge cases
100
+ - **Design System Mapping** table — the recommended DS primitive for Pattern B components
101
+
102
+ ### 4b — Generate the component files
103
+ Execute **Step 5** from `.github/prompts/add-component.prompt.md` for this component:
104
+ - Create `<outputPath>/<ComponentName>/` directory
105
+ - Create `<ComponentName>.tsx` using:
106
+ - **Pattern B** (Pure display — AlertBanner, Banner, Operator, WssQuickCreate): use DS alert/card/avatar primitive from Step 2 API map in the `// [DS RENDER]` section; apply variant mapping from the skill file
107
+ - **Pattern A** (PConnect display — CaseSummaryFields, DetailsFields, FieldValueList): use CSS classes or DS typography props; no DS component primitives
108
+ - **Pattern C** (Complex display — FieldGroup, FieldGroupList, Pulse, RichTextEditor): use PConnect bridge (`createElement(createPConnectComponent(), ...)`); no DS primitives
109
+ - Create `index.tsx` if required by the skill file:
110
+ ```typescript
111
+ export { default } from './<ComponentName>';
112
+ ```
113
+ - Create any CSS file required by the skill file
114
+
115
+ ### 4c — Register the component
116
+ Execute **Step 6** from `.github/prompts/add-component.prompt.md` for this component:
117
+ - Add the import to `src/components/component-map.ts` in the Design System Extension section
118
+ - Add the entry to `getSampleComponentMap()` under the DSE comment
119
+ - Do not reorder or restructure any existing entries
120
+
121
+ ### 4d — Report progress
122
+ After each component: "`<ComponentName>` ✓ — Pattern `<B/A/C>`<`, using <DS primitive>` if Pattern B>"
123
+
124
+ ---
125
+
126
+ ## Step 5 — Verify the build
127
+
128
+ Execute **Step 7** from `.github/prompts/add-component.prompt.md` exactly as written:
129
+ - Run `npm run build`
130
+ - Fix any TypeScript or build errors before reporting completion
131
+ - Report a summary: list of all files created and all entries added to `component-map.ts`
@@ -0,0 +1,144 @@
1
+ ---
2
+ agent: agent
3
+ description: Generate all (or a subset of) field components using any design system
4
+ ---
5
+
6
+ ## Step 0 — Resolve inputs
7
+
8
+ Read the user's message carefully. Extract:
9
+
10
+ - **Design system** — the UI library to use (e.g. `Ant Design`, `Chakra UI`, `Carbon`, `Radix UI`)
11
+ - **Output base path** — the folder where field components should be generated (e.g. `src/components/field/`, `app/ui/fields/`)
12
+ - **Component list** — which components to generate (default: all 27 listed below)
13
+
14
+ Both **design system** and **output base path** are required. If either is missing or ambiguous, ask both unresolved items in one numbered list. Do not assume or default the output path — the client's folder structure may differ from the reference app.
15
+
16
+ Example questions (ask only the ones that are actually missing):
17
+ 1. Which design system should I use? (e.g. Ant Design, Chakra UI, Carbon, Radix UI)
18
+ 2. Where should the field components be generated? (e.g. `src/components/field/`)
19
+
20
+ If the user specified a subset (e.g., "just TextInput and Dropdown"), restrict the list accordingly.
21
+
22
+ Once both are known, continue to Step 1.
23
+
24
+ ### Full component list (default)
25
+
26
+ | Component | Pega Name |
27
+ |---|---|
28
+ | AutoComplete | AutoComplete |
29
+ | CancelAlert | CancelAlert |
30
+ | Checkbox | Checkbox |
31
+ | Currency | Currency |
32
+ | Date | Date |
33
+ | DateTime | DateTime |
34
+ | Decimal | Decimal |
35
+ | Dropdown | Dropdown |
36
+ | Email | Email |
37
+ | Group | Group |
38
+ | Integer | Integer |
39
+ | Location | Location |
40
+ | Multiselect | Multiselect |
41
+ | ObjectReference | ObjectReference |
42
+ | Percentage | Percentage |
43
+ | Phone | Phone |
44
+ | RadioButtons | RadioButtons |
45
+ | RichText | RichText |
46
+ | ScalarList | ScalarList |
47
+ | SelectableCard | SelectableCard |
48
+ | SemanticLink | SemanticLink |
49
+ | TextArea | TextArea |
50
+ | TextContent | TextContent |
51
+ | TextInput | TextInput |
52
+ | Time | Time |
53
+ | URL | URL |
54
+ | UserReference | UserReference |
55
+
56
+ ---
57
+
58
+ ## Step 1 — Read `field-components.md` (once, for the entire session)
59
+
60
+ Read the full contents of `.github/skills/field-components.md`.
61
+
62
+ This gives you:
63
+ - The behavioral skeleton every field component must follow (state, effects, event handling, display modes)
64
+ - The Design System Adaptation guide (prop mapping conventions, form layout wrappers)
65
+ - The abstract template to use as a base for all components
66
+
67
+ Keep this context active throughout the entire generation session. Do not re-read it per component.
68
+
69
+ ---
70
+
71
+ ## Step 2 — Install and discover the design system (once)
72
+
73
+ Execute **Step 3** from `.github/prompts/add-component.prompt.md` exactly as written:
74
+ - Check `package.json` for the DS package
75
+ - Install if missing, including any peer dependencies
76
+ - Report what was installed
77
+
78
+ Then execute **Step 4** from `.github/prompts/add-component.prompt.md` exactly as written:
79
+ - Read the DS README from `node_modules`
80
+ - Discover all exported components from `dist/index.d.ts`
81
+ - Read prop interfaces for the control types needed across the component list
82
+ - Note form layout wrappers, size/variant conventions, icon packages, and design tokens
83
+
84
+ Build a **DS API reference map** from this discovery. You will reuse it for every component — do not repeat these commands per component.
85
+
86
+ ---
87
+
88
+ ## Step 3 — Overwrite check (all at once)
89
+
90
+ For each component in the list, check whether `<outputPath>/<ComponentName>/<ComponentName>.tsx` already exists.
91
+
92
+ If **any** exist, report them all at once and ask:
93
+ > "The following N components already exist: [list]. How should I proceed?
94
+ > - **Overwrite all** — replace all existing implementations
95
+ > - **Skip existing** — only generate components that don't exist yet
96
+ > - **Cancel** — stop without generating anything"
97
+
98
+ Wait for the user's answer before proceeding. If none exist, continue immediately.
99
+
100
+ ---
101
+
102
+ ## Step 4 — Generate each component (loop)
103
+
104
+ For each component in the resolved list (in the order listed in Step 0):
105
+
106
+ ### 4a — Read the component-specific skill file
107
+ Execute **Step 2** from `.github/prompts/add-component.prompt.md` for this component:
108
+ - Read `.github/skills/field-skills/<ComponentName>.md` fully
109
+ - Pay attention to:
110
+ - **Behavioral Contract** — state management, option loading, edge cases specific to this component
111
+ - **Design System Mapping** table — the recommended DS component for the chosen design system
112
+ - **UI control type** — use this to select the closest DS primitive if the chosen DS is not in the mapping table
113
+
114
+ ### 4b — Generate the component files
115
+ Execute **Step 5** from `.github/prompts/add-component.prompt.md` for this component:
116
+ - Create `<outputPath>/<ComponentName>/` directory
117
+ - Create `<ComponentName>.tsx` using:
118
+ - The abstract behavioral skeleton from `field-components.md` (read in Step 1)
119
+ - The Behavioral Contract from the component skill file
120
+ - The DS API confirmed in Step 2 (from the DS API reference map — no new terminal commands needed)
121
+ - Display mode guards (`DISPLAY_ONLY`, `STACKED_LARGE_VAL`) via `getComponentFromRegistry('FieldValueList')`
122
+ - `data-test-id={testId}` on the underlying interactive element
123
+ - Create `index.tsx`:
124
+ ```typescript
125
+ export { default } from './<ComponentName>';
126
+ ```
127
+
128
+ ### 4c — Register the component
129
+ Execute **Step 6** from `.github/prompts/add-component.prompt.md` for this component:
130
+ - Add the import to `src/components/component-map.ts` in the Fields section
131
+ - Add the entry to `getSampleComponentMap()` under the fields comment
132
+ - Do not reorder or restructure any existing entries
133
+
134
+ ### 4d — Report progress
135
+ After each component: "`<ComponentName>` ✓ — using `<DS component name>`"
136
+
137
+ ---
138
+
139
+ ## Step 5 — Verify the build
140
+
141
+ Execute **Step 7** from `.github/prompts/add-component.prompt.md` exactly as written:
142
+ - Run `npm run build`
143
+ - Fix any TypeScript or build errors before reporting completion
144
+ - Report a summary: list of all files created and all entries added to `component-map.ts`