@pega/sdk 0.0.5 → 0.0.6

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 (266) hide show
  1. package/README.md +10 -3
  2. package/dist/index.js +764 -165
  3. package/package.json +1 -1
  4. package/templates/react-native-sdk-reference/.claude/settings.json +5 -0
  5. package/templates/react-native-sdk-reference/.prettierignore +17 -0
  6. package/templates/react-native-sdk-reference/.vscode/extensions.json +1 -0
  7. package/templates/react-native-sdk-reference/.vscode/settings.json +7 -0
  8. package/templates/react-native-sdk-reference/AGENTS.md +3 -0
  9. package/templates/react-native-sdk-reference/CLAUDE.md +1 -0
  10. package/templates/react-native-sdk-reference/README.md +56 -0
  11. package/templates/react-native-sdk-reference/app.json +40 -5
  12. package/templates/react-native-sdk-reference/assets/expo.icon/Assets/expo-symbol 2.svg +3 -0
  13. package/templates/react-native-sdk-reference/assets/expo.icon/Assets/grid.png +0 -0
  14. package/templates/react-native-sdk-reference/assets/expo.icon/icon.json +35 -0
  15. package/templates/react-native-sdk-reference/assets/icons/bell.png +0 -0
  16. package/templates/react-native-sdk-reference/assets/icons/clock.png +0 -0
  17. package/templates/react-native-sdk-reference/assets/icons/cross.png +0 -0
  18. package/templates/react-native-sdk-reference/assets/icons/donut.png +0 -0
  19. package/templates/react-native-sdk-reference/assets/icons/gear.png +0 -0
  20. package/templates/react-native-sdk-reference/assets/icons/globe.png +0 -0
  21. package/templates/react-native-sdk-reference/assets/icons/internet.png +0 -0
  22. package/templates/react-native-sdk-reference/assets/icons/music.png +0 -0
  23. package/templates/react-native-sdk-reference/assets/icons/right-arrow.png +0 -0
  24. package/templates/react-native-sdk-reference/assets/icons/speed.png +0 -0
  25. package/templates/react-native-sdk-reference/assets/images/MediaCo.png +0 -0
  26. package/templates/react-native-sdk-reference/assets/images/adaptive-icon.png +0 -0
  27. package/templates/react-native-sdk-reference/assets/images/android-icon-background.png +0 -0
  28. package/templates/react-native-sdk-reference/assets/images/android-icon-foreground.png +0 -0
  29. package/templates/react-native-sdk-reference/assets/images/android-icon-monochrome.png +0 -0
  30. package/templates/react-native-sdk-reference/assets/images/expo-badge-white.png +0 -0
  31. package/templates/react-native-sdk-reference/assets/images/expo-badge.png +0 -0
  32. package/templates/react-native-sdk-reference/assets/images/expo-logo.png +0 -0
  33. package/templates/react-native-sdk-reference/assets/images/favicon.png +0 -0
  34. package/templates/react-native-sdk-reference/assets/images/icon.png +0 -0
  35. package/templates/react-native-sdk-reference/assets/images/logo-glow.png +0 -0
  36. package/templates/react-native-sdk-reference/assets/images/partial-react-logo.png +0 -0
  37. package/templates/react-native-sdk-reference/assets/images/react-logo.png +0 -0
  38. package/templates/react-native-sdk-reference/assets/images/react-logo@2x.png +0 -0
  39. package/templates/react-native-sdk-reference/assets/images/react-logo@3x.png +0 -0
  40. package/templates/react-native-sdk-reference/assets/images/splash-icon.png +0 -0
  41. package/templates/react-native-sdk-reference/assets/images/tutorial-web.png +0 -0
  42. package/templates/react-native-sdk-reference/eslint.config.mjs +68 -0
  43. package/templates/react-native-sdk-reference/package.json +59 -14
  44. package/templates/react-native-sdk-reference/pega-constellationjs-0.26.3.tgz +0 -0
  45. package/templates/react-native-sdk-reference/pega-sdk-react-0.1.0.tgz +0 -0
  46. package/templates/react-native-sdk-reference/pega-sdk-types-0.1.0.tgz +0 -0
  47. package/templates/react-native-sdk-reference/sdk-config.json +31 -9
  48. package/templates/react-native-sdk-reference/src/app/_layout.tsx +38 -0
  49. package/templates/react-native-sdk-reference/src/app/home/_layout.tsx +39 -0
  50. package/templates/react-native-sdk-reference/src/app/home/contact.tsx +11 -0
  51. package/templates/react-native-sdk-reference/src/app/home/index.tsx +36 -0
  52. package/templates/react-native-sdk-reference/src/app/home/shop.tsx +11 -0
  53. package/templates/react-native-sdk-reference/src/app/home/your-services.tsx +11 -0
  54. package/templates/react-native-sdk-reference/src/app/index.tsx +72 -0
  55. package/templates/react-native-sdk-reference/src/app/workarea.tsx +135 -0
  56. package/templates/react-native-sdk-reference/src/bridge/Context/StoreContext.ts +4 -0
  57. package/templates/react-native-sdk-reference/src/bridge/RootComponent.tsx +12 -0
  58. package/templates/react-native-sdk-reference/src/bridge/react_pconnect.jsx +334 -0
  59. package/templates/react-native-sdk-reference/src/components/common/DisplayField.tsx +29 -0
  60. package/templates/react-native-sdk-reference/src/components/common/FormFieldWrapper.tsx +5 -0
  61. package/templates/react-native-sdk-reference/src/components/common/HelperText.tsx +11 -0
  62. package/templates/react-native-sdk-reference/src/components/common/LabelText.tsx +22 -0
  63. package/templates/react-native-sdk-reference/src/components/common/inputTheme.ts +17 -0
  64. package/templates/react-native-sdk-reference/src/components/design-system/AutoComplete.tsx +126 -0
  65. package/templates/react-native-sdk-reference/src/components/design-system/FieldGroup.tsx +72 -0
  66. package/templates/react-native-sdk-reference/src/components/design-system/Radio.tsx +61 -0
  67. package/templates/react-native-sdk-reference/src/components/field/AutoComplete/AutoComplete.tsx +196 -0
  68. package/templates/react-native-sdk-reference/src/components/field/AutoComplete/index.tsx +1 -0
  69. package/templates/react-native-sdk-reference/src/components/field/Checkbox/Checkbox.tsx +89 -0
  70. package/templates/react-native-sdk-reference/src/components/field/Checkbox/index.tsx +1 -0
  71. package/templates/react-native-sdk-reference/src/components/field/Currency/Currency.tsx +84 -0
  72. package/templates/react-native-sdk-reference/src/components/field/Currency/index.tsx +1 -0
  73. package/templates/react-native-sdk-reference/src/components/field/Date/Date.tsx +94 -0
  74. package/templates/react-native-sdk-reference/src/components/field/Date/index.tsx +1 -0
  75. package/templates/react-native-sdk-reference/src/components/field/Dropdown/Dropdown.tsx +211 -0
  76. package/templates/react-native-sdk-reference/src/components/field/Dropdown/index.tsx +1 -0
  77. package/templates/react-native-sdk-reference/src/components/field/Email/Email.tsx +81 -0
  78. package/templates/react-native-sdk-reference/src/components/field/Email/index.tsx +1 -0
  79. package/templates/react-native-sdk-reference/src/components/field/Group/Group.tsx +47 -0
  80. package/templates/react-native-sdk-reference/src/components/field/Group/index.tsx +1 -0
  81. package/templates/react-native-sdk-reference/src/components/field/Integer/Integer.tsx +84 -0
  82. package/templates/react-native-sdk-reference/src/components/field/Integer/index.tsx +1 -0
  83. package/templates/react-native-sdk-reference/src/components/field/Phone/Phone.tsx +85 -0
  84. package/templates/react-native-sdk-reference/src/components/field/Phone/index.ts +1 -0
  85. package/templates/react-native-sdk-reference/src/components/field/RadioButtons/RadioButtons.tsx +118 -0
  86. package/templates/react-native-sdk-reference/src/components/field/RadioButtons/index.ts +1 -0
  87. package/templates/react-native-sdk-reference/src/components/field/TextArea/TextArea.tsx +86 -0
  88. package/templates/react-native-sdk-reference/src/components/field/TextArea/index.tsx +1 -0
  89. package/templates/react-native-sdk-reference/src/components/field/TextInput/TextInput.tsx +84 -0
  90. package/templates/react-native-sdk-reference/src/components/field/TextInput/index.tsx +1 -0
  91. package/templates/react-native-sdk-reference/src/components/field/URL/URL.tsx +86 -0
  92. package/templates/react-native-sdk-reference/src/components/field/URL/index.tsx +1 -0
  93. package/templates/react-native-sdk-reference/src/components/helpers/data_page.ts +20 -0
  94. package/templates/react-native-sdk-reference/src/components/helpers/event-utils.ts +20 -0
  95. package/templates/react-native-sdk-reference/src/components/helpers/instructions-utils.ts +57 -0
  96. package/templates/react-native-sdk-reference/src/components/helpers/state-utils.tsx +46 -0
  97. package/templates/react-native-sdk-reference/src/components/helpers/template-utils.ts +75 -0
  98. package/templates/react-native-sdk-reference/src/components/helpers/utils.ts +339 -0
  99. package/templates/react-native-sdk-reference/src/components/infra/ActionButtons/ActionButtons.tsx +63 -0
  100. package/templates/react-native-sdk-reference/src/components/infra/ActionButtons/index.tsx +1 -0
  101. package/templates/react-native-sdk-reference/src/components/infra/Assignment/Assignment.tsx +348 -0
  102. package/templates/react-native-sdk-reference/src/components/infra/Assignment/index.tsx +1 -0
  103. package/templates/react-native-sdk-reference/src/components/infra/AssignmentCard/AssignmentCard.tsx +56 -0
  104. package/templates/react-native-sdk-reference/src/components/infra/AssignmentCard/index.tsx +1 -0
  105. package/templates/react-native-sdk-reference/src/components/infra/Containers/FlowContainer/FlowContainer.tsx +57 -0
  106. package/templates/react-native-sdk-reference/src/components/infra/Containers/FlowContainer/helpers.ts +137 -0
  107. package/templates/react-native-sdk-reference/src/components/infra/Containers/FlowContainer/index.tsx +1 -0
  108. package/templates/react-native-sdk-reference/src/components/infra/Containers/RootContainer/RootContainer.tsx +52 -0
  109. package/templates/react-native-sdk-reference/src/components/infra/Containers/RootContainer/index.tsx +1 -0
  110. package/templates/react-native-sdk-reference/src/components/infra/Containers/SimpleView/helper.ts +128 -0
  111. package/templates/react-native-sdk-reference/src/components/infra/Containers/SimpleView/index.tsx +59 -0
  112. package/templates/react-native-sdk-reference/src/components/infra/Containers/ViewContainer/ViewContainer.tsx +31 -0
  113. package/templates/react-native-sdk-reference/src/components/infra/Containers/ViewContainer/helper.ts +39 -0
  114. package/templates/react-native-sdk-reference/src/components/infra/Containers/ViewContainer/index.ts +1 -0
  115. package/templates/react-native-sdk-reference/src/components/infra/Containers/helper.ts +9 -0
  116. package/templates/react-native-sdk-reference/src/components/infra/ErrorBoundary/ErrorBoundary.tsx +53 -0
  117. package/templates/react-native-sdk-reference/src/components/infra/ErrorBoundary/index.tsx +1 -0
  118. package/templates/react-native-sdk-reference/src/components/infra/MultiStep/MultiStep.tsx +24 -0
  119. package/templates/react-native-sdk-reference/src/components/infra/MultiStep/index.ts +1 -0
  120. package/templates/react-native-sdk-reference/src/components/infra/Reference/Reference.tsx +68 -0
  121. package/templates/react-native-sdk-reference/src/components/infra/Reference/index.tsx +1 -0
  122. package/templates/react-native-sdk-reference/src/components/infra/Reference/utils.ts +16 -0
  123. package/templates/react-native-sdk-reference/src/components/infra/Region/Region.tsx +10 -0
  124. package/templates/react-native-sdk-reference/src/components/infra/Region/index.tsx +1 -0
  125. package/templates/react-native-sdk-reference/src/components/infra/View/View.tsx +49 -0
  126. package/templates/react-native-sdk-reference/src/components/template/DefaultForm/DefaultForm.tsx +38 -0
  127. package/templates/react-native-sdk-reference/src/components/template/DefaultForm/index.tsx +1 -0
  128. package/templates/react-native-sdk-reference/src/components/template/DefaultForm/utils/index.ts +28 -0
  129. package/templates/react-native-sdk-reference/src/components/template/Details/Details.tsx +82 -0
  130. package/templates/react-native-sdk-reference/src/components/template/Details/index.tsx +1 -0
  131. package/templates/react-native-sdk-reference/src/components/template/OneColumn/OneColumn.tsx +29 -0
  132. package/templates/react-native-sdk-reference/src/components/template/OneColumn/index.tsx +1 -0
  133. package/templates/react-native-sdk-reference/src/context/LoaderContext.tsx +42 -0
  134. package/templates/react-native-sdk-reference/src/mediaco/AdvBanner.tsx +62 -0
  135. package/templates/react-native-sdk-reference/src/mediaco/Header.tsx +60 -0
  136. package/templates/react-native-sdk-reference/src/mediaco/HomeScreen.tsx +78 -0
  137. package/templates/react-native-sdk-reference/src/mediaco/QuickActions.tsx +68 -0
  138. package/templates/react-native-sdk-reference/src/mediaco/ResolutionScreen.tsx +48 -0
  139. package/templates/react-native-sdk-reference/src/mediaco/SafeArea.tsx +11 -0
  140. package/templates/react-native-sdk-reference/src/mediaco/TabBar.tsx +102 -0
  141. package/templates/react-native-sdk-reference/src/mediaco/YourServices.tsx +90 -0
  142. package/templates/react-native-sdk-reference/src/sdk-pega-component-map.ts +64 -0
  143. package/templates/react-native-sdk-reference/src/types/PConnProps.d.ts +41 -0
  144. package/templates/react-native-sdk-reference/src/utils/auth.ts +62 -0
  145. package/templates/react-native-sdk-reference/src/utils/init-pcore.ts +37 -0
  146. package/templates/react-native-sdk-reference/src/utils/pcore-polyfills.ts +66 -0
  147. package/templates/react-native-sdk-reference/tsconfig.json +9 -8
  148. package/templates/react-sdk-reference/.ai-common/agents/embedded-flow-expert.md +171 -0
  149. package/templates/react-sdk-reference/.ai-common/agents/implementation-expert.md +25 -26
  150. package/templates/react-sdk-reference/.ai-common/global/ai-agent-instructions-embedded.md +119 -0
  151. package/templates/react-sdk-reference/.ai-common/global/ai-agent-instructions.md +70 -121
  152. package/templates/react-sdk-reference/.ai-common/instructions/component-map.md +7 -19
  153. package/templates/react-sdk-reference/.ai-common/instructions/dse-component.md +10 -40
  154. package/templates/react-sdk-reference/.ai-common/instructions/embedded-component.md +134 -0
  155. package/templates/react-sdk-reference/.ai-common/instructions/field-component.md +15 -43
  156. package/templates/react-sdk-reference/.ai-common/instructions/template-component.md +11 -63
  157. package/templates/react-sdk-reference/.ai-common/instructions/widget-component.md +12 -57
  158. package/templates/react-sdk-reference/.ai-common/prompts/add-component.md +45 -71
  159. package/templates/react-sdk-reference/.ai-common/prompts/component-manifest.json +98 -0
  160. package/templates/react-sdk-reference/.ai-common/prompts/embedded-component-manifest.md +155 -0
  161. package/templates/react-sdk-reference/.ai-common/prompts/generate-all-components.md +67 -237
  162. package/templates/react-sdk-reference/.ai-common/prompts/generate-dse-components.md +26 -77
  163. package/templates/react-sdk-reference/.ai-common/prompts/generate-embedded-components.md +315 -0
  164. package/templates/react-sdk-reference/.ai-common/prompts/generate-field-components.md +31 -80
  165. package/templates/react-sdk-reference/.ai-common/prompts/generate-template-components.md +43 -99
  166. package/templates/react-sdk-reference/.ai-common/prompts/generate-widget-components.md +33 -83
  167. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/AlertBanner.md +60 -74
  168. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Banner.md +64 -84
  169. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/CaseSummaryFields.md +76 -109
  170. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/DetailsFields.md +84 -101
  171. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/FieldGroup.md +62 -87
  172. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/FieldGroupList.md +56 -76
  173. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/FieldValueList.md +61 -85
  174. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Operator.md +84 -107
  175. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Pulse.md +36 -44
  176. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/RichTextEditor.md +125 -189
  177. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/WssQuickCreate.md +34 -50
  178. package/templates/react-sdk-reference/.ai-common/skills/design-system-extension.md +57 -179
  179. package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/analyze-customer-repo.md +130 -0
  180. package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/authenticate.md +311 -0
  181. package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/run-and-verify-integration.md +156 -0
  182. package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/wire-integration.md +476 -0
  183. package/templates/react-sdk-reference/.ai-common/skills/field-components.md +120 -242
  184. package/templates/react-sdk-reference/.ai-common/skills/field-skills/AutoComplete.md +71 -212
  185. package/templates/react-sdk-reference/.ai-common/skills/field-skills/CancelAlert.md +47 -209
  186. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Checkbox.md +90 -259
  187. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Currency.md +75 -169
  188. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Date.md +65 -160
  189. package/templates/react-sdk-reference/.ai-common/skills/field-skills/DateTime.md +59 -157
  190. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Decimal.md +55 -134
  191. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Dropdown.md +61 -185
  192. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Email.md +60 -138
  193. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Group.md +40 -99
  194. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Integer.md +44 -111
  195. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Location.md +57 -165
  196. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Multiselect.md +41 -122
  197. package/templates/react-sdk-reference/.ai-common/skills/field-skills/ObjectReference.md +32 -130
  198. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Percentage.md +48 -112
  199. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Phone.md +43 -153
  200. package/templates/react-sdk-reference/.ai-common/skills/field-skills/RadioButtons.md +76 -183
  201. package/templates/react-sdk-reference/.ai-common/skills/field-skills/RichText.md +59 -176
  202. package/templates/react-sdk-reference/.ai-common/skills/field-skills/ScalarList.md +30 -123
  203. package/templates/react-sdk-reference/.ai-common/skills/field-skills/SelectableCard.md +47 -178
  204. package/templates/react-sdk-reference/.ai-common/skills/field-skills/SemanticLink.md +31 -117
  205. package/templates/react-sdk-reference/.ai-common/skills/field-skills/TextArea.md +51 -106
  206. package/templates/react-sdk-reference/.ai-common/skills/field-skills/TextContent.md +22 -75
  207. package/templates/react-sdk-reference/.ai-common/skills/field-skills/TextInput.md +54 -116
  208. package/templates/react-sdk-reference/.ai-common/skills/field-skills/Time.md +46 -100
  209. package/templates/react-sdk-reference/.ai-common/skills/field-skills/URL.md +44 -93
  210. package/templates/react-sdk-reference/.ai-common/skills/field-skills/UserReference.md +40 -167
  211. package/templates/react-sdk-reference/.ai-common/skills/infra-components.md +165 -0
  212. package/templates/react-sdk-reference/.ai-common/skills/infra-skills/ActionButtons.md +122 -0
  213. package/templates/react-sdk-reference/.ai-common/skills/infra-skills/MultiStep.md +178 -0
  214. package/templates/react-sdk-reference/.ai-common/skills/infra-skills/Stages.md +140 -0
  215. package/templates/react-sdk-reference/.ai-common/skills/template-components.md +74 -228
  216. package/templates/react-sdk-reference/.ai-common/skills/template-skills/AdvancedSearch.md +66 -167
  217. package/templates/react-sdk-reference/.ai-common/skills/template-skills/AppShell.md +57 -170
  218. package/templates/react-sdk-reference/.ai-common/skills/template-skills/BannerPage.md +41 -76
  219. package/templates/react-sdk-reference/.ai-common/skills/template-skills/CaseSummary.md +53 -109
  220. package/templates/react-sdk-reference/.ai-common/skills/template-skills/CaseView.md +86 -289
  221. package/templates/react-sdk-reference/.ai-common/skills/template-skills/CaseViewActionsMenu.md +60 -185
  222. package/templates/react-sdk-reference/.ai-common/skills/template-skills/Confirmation.md +66 -115
  223. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DataReference.md +33 -68
  224. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DefaultForm.md +53 -133
  225. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DefaultPage.md +39 -82
  226. package/templates/react-sdk-reference/.ai-common/skills/template-skills/Details.md +38 -91
  227. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DetailsSubTabs.md +47 -101
  228. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DetailsThreeColumn.md +27 -34
  229. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DetailsTwoColumn.md +25 -40
  230. package/templates/react-sdk-reference/.ai-common/skills/template-skills/DynamicTabs.md +34 -104
  231. package/templates/react-sdk-reference/.ai-common/skills/template-skills/FieldGroupTemplate.md +46 -147
  232. package/templates/react-sdk-reference/.ai-common/skills/template-skills/HierarchicalForm.md +139 -100
  233. package/templates/react-sdk-reference/.ai-common/skills/template-skills/InlineDashboard.md +43 -82
  234. package/templates/react-sdk-reference/.ai-common/skills/template-skills/InlineDashboardPage.md +47 -80
  235. package/templates/react-sdk-reference/.ai-common/skills/template-skills/ListPage.md +16 -29
  236. package/templates/react-sdk-reference/.ai-common/skills/template-skills/ListView.md +43 -228
  237. package/templates/react-sdk-reference/.ai-common/skills/template-skills/MultiReferenceReadOnly.md +20 -65
  238. package/templates/react-sdk-reference/.ai-common/skills/template-skills/NarrowWide.md +49 -97
  239. package/templates/react-sdk-reference/.ai-common/skills/template-skills/OneColumn.md +37 -71
  240. package/templates/react-sdk-reference/.ai-common/skills/template-skills/PromotedFilters.md +58 -148
  241. package/templates/react-sdk-reference/.ai-common/skills/template-skills/SelfServiceCaseView.md +82 -107
  242. package/templates/react-sdk-reference/.ai-common/skills/template-skills/SimpleTable.md +21 -60
  243. package/templates/react-sdk-reference/.ai-common/skills/template-skills/SingleReferenceReadOnly.md +43 -100
  244. package/templates/react-sdk-reference/.ai-common/skills/template-skills/SubTabs.md +36 -76
  245. package/templates/react-sdk-reference/.ai-common/skills/template-skills/TwoColumn.md +41 -90
  246. package/templates/react-sdk-reference/.ai-common/skills/template-skills/WideNarrow.md +36 -43
  247. package/templates/react-sdk-reference/.ai-common/skills/template-skills/WssNavBar.md +25 -115
  248. package/templates/react-sdk-reference/.ai-common/skills/widget-components.md +38 -174
  249. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/AppAnnouncement.md +30 -57
  250. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/Attachment.md +55 -101
  251. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/CaseHistory.md +38 -121
  252. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/FileUtility.md +37 -98
  253. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/Followers.md +18 -33
  254. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/QuickCreate.md +26 -91
  255. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/SummaryItem.md +28 -120
  256. package/templates/react-sdk-reference/.ai-common/skills/widget-skills/ToDo.md +41 -272
  257. package/templates/react-sdk-reference/package.json +1 -1
  258. package/templates/react-sdk-reference/pega-auth-0.2.44.tgz +0 -0
  259. package/templates/react-sdk-reference/pega-sdk-react-0.1.0.tgz +0 -0
  260. package/templates/react-sdk-reference/src/components/helpers/formatters/index.ts +13 -3
  261. package/templates/react-native-sdk-reference/.github/AGENTS.md +0 -23
  262. package/templates/react-native-sdk-reference/.github/copilot-instructions.md +0 -40
  263. package/templates/react-native-sdk-reference/.github/skills/pega-sdk-component.md +0 -48
  264. package/templates/react-native-sdk-reference/App.tsx +0 -49
  265. package/templates/react-native-sdk-reference/expo-env.d.ts +0 -3
  266. package/templates/react-sdk-reference/pega-auth-0.2.42.tgz +0 -0
@@ -73,29 +73,33 @@ Keep this context active throughout the entire generation session. Do not re-rea
73
73
 
74
74
  ## Step 2 — Install and discover the design system (once)
75
75
 
76
- ### 2a — Check and install the DS package
76
+ Check the project's dependency manifest to determine whether the design system package is already installed. If it is **not** listed in the project's dependencies, install it using the project's package manager. Report what was installed.
77
77
 
78
- Run this command in your terminal:
78
+ **Immediately after installation**, read `node_modules/<designSystem>/README.md` in full. From it, note the correct import paths, usage patterns, version-specific guidance, global CSS/styles import path, provider wrapper component name, and any peer dependency requirements. Store this information in your memory and use it for all subsequent steps — do not re-read the README later. If the README lists peer dependencies that are not already installed in the project, install them now — the design system will not function correctly without them.
79
79
 
80
- ```bash
81
- cat package.json | grep "<design-system-package>"
82
- ```
80
+ You MUST also thoroughly inspect the installed design system package:
83
81
 
84
- If the design system package is **not** listed in `dependencies` or `devDependencies`, install it:
82
+ 1. **Discover all available components** — browse the installed package's directory tree under `node_modules/<designSystem>/` to find every component it exports. Do not assume a specific folder structure (e.g. `dist/`) — packages vary widely in how they organize source, types, and entry points. Navigate through the package's folders, read its entry-point files and type definitions, and build a complete list of every input control the package actually provides (Input, Select, Checkbox, DatePicker, Radio, etc.). Store all discovered component names and their import paths in your memory for reference during code generation.
83
+ 2. **Map each field component to the best available DS component** — the component names in the list (e.g. `AutoComplete`, `Dropdown`) may not have an exact name match in the installed design system. Using the complete list you just discovered, identify which DS component best serves the same purpose. If no single DS component is a close match, compose the requested behavior from multiple available DS primitives. Never fabricate a component import that does not exist in the installed package.
84
+ 3. **Read the props interface of every component you plan to use** — for each component you intend to use, locate and read its TypeScript type definitions (`.d.ts` files or inline types) to understand the exact prop names, types, required vs. optional status, and any relevant enums or union types. Store this information in your memory alongside the component names.
85
+ 4. **Use ONLY confirmed component names and prop names** — when generating code, you must exclusively use the component names and prop names you discovered from the installed package. Do not rely on training knowledge of the design system's API, as it may be outdated, inaccurate, or refer to components/props that do not exist in the installed version.
85
86
 
86
- ```bash
87
- npm install <design-system-package>
88
- ```
87
+ Also check:
89
88
 
90
- Also install any peer dependencies documented in the package's README. Report what was installed.
89
+ - Whether the design system has a **form layout wrapper** (label + input + helper text) — use it instead of manual margins
90
+ - Whether it has **size/density/variant conventions** — use built-in props rather than custom padding
91
+ - Whether it has a **companion icons package** — read its exports before using any icon name; never guess icon names
92
+ - Whether it has a **tokens or CSS directory** — use design system CSS custom properties for spacing; never hardcode `px` values
91
93
 
92
- ### 2a.1 — Install the DS styles package and configure global CSS (MANDATORY)
94
+ Build a **DS API reference map** from this discovery. You will reuse it for every component — do not repeat this discovery per component.
95
+
96
+ ### 2.1 — Install the DS styles package and configure global CSS (MANDATORY)
93
97
 
94
98
  Design systems require their global stylesheet — without it, components render unstyled.
95
99
 
96
- #### Known DS style requirements (examples — verify from README for exact paths):
100
+ #### Known DS style requirements (examples — verify against the README you already read):
97
101
 
98
- | Design System | Styles Package (example) | CSS Import in `src/main.tsx` (example) | Provider Wrapper (example) |
102
+ | Design System | Styles Package (example) | CSS Import (example) | Provider Wrapper (example) |
99
103
  | ------------- | ------------------------ | ---------------------------------------- | -------------------------- |
100
104
  | Carbon | `@carbon/styles` | `import '@carbon/react/css/styles.css';` | `<Theme>` |
101
105
  | Ant Design | (included) | `import 'antd/dist/reset.css';` | `<ConfigProvider>` |
@@ -104,53 +108,20 @@ Design systems require their global stylesheet — without it, components render
104
108
  | Shadcn/ui | (Tailwind) | `import './globals.css';` | None |
105
109
  | MUI | (included) | (none — CSS-in-JS) | `<ThemeProvider>` |
106
110
 
107
- These are **examples** based on common versions. Always verify the exact import path and provider name from the installed package's README (`node_modules/<ds>/README.md`).
108
-
109
- If in table: install styles package (if separate), add CSS import as **first import** in `src/main.tsx`, add Provider in `src/AppProviders.tsx`.
110
- If not in table: check README and `find node_modules/<ds> -name "*.css" -path "*/dist/*" | head -5`.
111
-
112
- Verification: `grep -n "import.*css\|import.*styles" src/main.tsx` must return a result. Do NOT proceed until confirmed.
113
-
114
- Report what was installed and configured.
115
-
116
- Run these commands to discover the actual API (do NOT rely on training knowledge):
117
-
118
- 1. Read the README for correct import paths and usage patterns:
119
-
120
- ```bash
121
- cat node_modules/<designSystem>/README.md
122
- ```
123
-
124
- 2. List every exported component:
125
-
126
- ```bash
127
- 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"
128
- ```
111
+ Above mentioned are **examples** based on common versions. Use the import path and provider name you noted from the README — they take precedence over this table.
129
112
 
130
- 3. For every input control you plan to use (Input, Select, Checkbox, DatePicker, Radio, etc.), read its prop interface:
113
+ If in table and not already configured: install styles package (if separate), add the global CSS import as the **first import** in the application's entry file, and add the Provider wrapper in the application's providers file.
114
+ If not in table: browse the installed design system's folder in `node_modules` for a `styles/` or `dist/` directory containing CSS files, and use what you find there.
131
115
 
132
- ```bash
133
- find node_modules/<designSystem> -name "ComponentName.d.ts" | head -3
134
- grep -A 40 "interface.*Props" <path-from-above>
135
- ```
116
+ Before implementing any component, verify whether design-system-specific styles are already configured in the existing codebase — check the application's entry file for a matching CSS import. If the styles are already imported and configured, skip this step and report "already configured".
136
117
 
137
- 4. Check for a **form layout wrapper** (label + input + helper text) — e.g., `<Form.Item>` in Ant Design, `<FormControl>` in Chakra UI. Use it instead of manual margins.
138
-
139
- 5. Check for **size/density/variant conventions** — use built-in props rather than custom padding.
140
-
141
- 6. Check for a **companion icons package** — read its exports before using any icon name. Never guess icon names.
142
-
143
- 7. Check for **CSS tokens** — use design system CSS custom properties for spacing; never hardcode `px` values.
144
-
145
- Only use component names and prop names confirmed in these files.
146
-
147
- Build a **DS API reference map** from this discovery. You will reuse it for every component — do not repeat these commands per component.
118
+ Report what was installed/configured (or "already configured").
148
119
 
149
120
  ---
150
121
 
151
122
  ## Step 3 — Overwrite check (all at once)
152
123
 
153
- For each component in the list, check whether `<outputPath>/<ComponentName>/<ComponentName>.tsx` already exists.
124
+ For each component in the list, check whether the component's file or directory already exists at the output path.
154
125
 
155
126
  If **any** exist, report them all at once and ask:
156
127
 
@@ -186,34 +157,20 @@ If no skill file exists at that path, use the general behavioral skeleton from `
186
157
 
187
158
  Create the directory `<outputPath>/<ComponentName>/`.
188
159
 
189
- Create `<ComponentName>.tsx` using this structure from `field-components.md` (loaded in Step 1):
190
-
191
- 1. Imports (React hooks + `handleEvent` from `../../helpers/event-utils` + `getComponentFromRegistry` from `@pega/sdk-react` + `PConnFieldProps` + DS input from Step 2)
192
- 2. Interface extending `PConnFieldProps` with any extra props from the component skill file
193
- 3. Destructure: `getPConnect`, `label`, `required`, `disabled`, `value`, `validatemessage`, `status`, `readOnly`, `testId`, `helperText`, `displayMode`, `hideLabel`, `placeholder`
194
- 4. Display mode guards: if `DISPLAY_ONLY` or `STACKED_LARGE_VAL` → return `FieldValueList`
195
- 5. Return → DS form input from Step 2, with `onBlur` calling `handleEvent(actions, 'changeNblur', propName, inputValue)`
160
+ Create the component's main implementation file using the file naming convention and extension appropriate to the project's framework (determine this by examining existing components in the project).
196
161
 
197
- Pass `data-test-id={testId}` on the underlying interactive element.
162
+ Follow the implementation structure described in `field-components.md` (loaded in Step 1). That file specifies the exact imports, interface, props handling, display mode guards, event handling, and render approach for this project's framework. Use the DS component you identified in Step 2 as the primary input element.
198
163
 
199
- Create `index.tsx`:
164
+ Apply the Behavioral Contract from the component skill file (state management, option loading, event sequences, edge cases specific to this component).
200
165
 
201
- ```typescript
202
- export { default } from './<ComponentName>';
203
- ```
166
+ If the project uses barrel/re-export files (check existing component directories for the convention), create one in the same directory following the same pattern.
204
167
 
205
168
  ### 4c — Register the component
206
169
 
207
- Edit `src/components/component-map.ts`:
170
+ Open the project's component map file (the file that maps component names to their implementations) and:
208
171
 
209
- 1. Add an import at the top of the file in the **Fields** section:
210
- ```typescript
211
- import <ComponentName> from './field/<ComponentName>';
212
- ```
213
- 2. Add an entry in the return object of `getSampleComponentMap()` under the fields comment:
214
- ```typescript
215
- <ComponentName>,
216
- ```
172
+ 1. Add an import at the top of the file in the **Fields** section
173
+ 2. Add an entry in the component map object under the fields comment
217
174
 
218
175
  ⚠️ **Key name exceptions for fields** — these MUST use explicit key mapping:
219
176
 
@@ -230,10 +187,4 @@ After each component: "`<ComponentName>` ✓ — using `<DS component name>`"
230
187
 
231
188
  ## Step 5 — Verify the build
232
189
 
233
- Run:
234
-
235
- ```bash
236
- npm run build
237
- ```
238
-
239
- If build errors occur, fix them before reporting completion. Report a summary: list of all files created and all entries added to `component-map.ts`.
190
+ Run the project's build process to confirm everything compiles without errors. Fix any build errors before reporting completion. Report a summary: list of all files created and all entries added to the component map.
@@ -72,10 +72,10 @@ Read the full contents of `{{SKILL_DIR}}/template-components.md`.
72
72
 
73
73
  This gives you:
74
74
 
75
- - **Layout template pattern** — DS-agnostic grid skeleton with `// [DS GRID]` placeholder; `templateCol` parsing logic; responsive behavior rules
75
+ - **Layout template pattern** — DS-agnostic grid skeleton; column-ratio parsing logic; responsive behavior rules
76
76
  - **Design System Adaptation section** — how to map the chosen DS's grid/flex primitive to the computed column ratios
77
- - **Form template pattern** — PConnect bridge via `connectToState` HOC wrapping `PConnectComponent`; `utils/index.ts` with `mapStateToProps`; no DS involved
78
- - **Page template pattern** — region extraction via `getRawMetadata()` and PConnect bridge; complex PCore API interactions; no DS involved
77
+ - **Form template pattern** — PConnect bridge using a higher-order state-subscription pattern; a companion utilities module; no DS involved
78
+ - **Page template pattern** — region extraction and PConnect bridge; complex API interactions with the underlying engine; no DS involved
79
79
  - Registration conventions and helper utilities
80
80
 
81
81
  Keep this context active throughout the entire generation session. Do not re-read it per component.
@@ -84,29 +84,28 @@ Keep this context active throughout the entire generation session. Do not re-rea
84
84
 
85
85
  ## Step 2 — Install and discover the design system (once)
86
86
 
87
- ### 2a — Check and install the DS package
87
+ Check the project's dependency manifest to determine whether the design system package is already installed. If it is **not** listed in the project's dependencies, install it using the project's package manager. Report what was installed.
88
88
 
89
- Run this command in your terminal:
89
+ **Immediately after installation**, read `node_modules/<designSystem>/README.md` in full. From it, note the correct import paths, usage patterns, version-specific guidance, global CSS/styles import path, provider wrapper component name, and any peer dependency requirements. Store this information in your memory and use it for all subsequent steps — do not re-read the README later. If the README lists peer dependencies that are not already installed in the project, install them now — the design system will not function correctly without them.
90
90
 
91
- ```bash
92
- cat package.json | grep "<design-system-package>"
93
- ```
91
+ > You only need layout-related DS components. Form and page templates do not use the DS.
94
92
 
95
- If the design system package is **not** listed in `dependencies` or `devDependencies`, install it:
93
+ You MUST also thoroughly inspect the installed design system package, focusing on layout primitives (Grid, Columns, Flex, SimpleGrid, Row, Col):
96
94
 
97
- ```bash
98
- npm install <design-system-package>
99
- ```
95
+ 1. **Discover all available layout primitives** — browse the installed package's directory tree under `node_modules/<designSystem>/` to find every component it exports. Do not assume a specific folder structure (e.g. `dist/`) — packages vary widely in how they organize source, types, and entry points. Navigate through the package's folders, read its entry-point files and type definitions, and build a complete list of every layout primitive the package actually provides. Store all discovered component names and their import paths in your memory for reference during code generation.
96
+ 2. **Map the layout templates to the best available DS layout primitive** — identify which DS component best serves grid/column layout needs. If no single DS component is a close match, compose the requested behavior from multiple available DS primitives. Never fabricate a component import that does not exist in the installed package.
97
+ 3. **Read the props interface of every layout primitive you plan to use** — for each component you intend to use, locate and read its TypeScript type definitions (`.d.ts` files or inline types) to understand the exact prop names, types, required vs. optional status, and any relevant enums or union types. Pay special attention to **responsive breakpoint APIs** and **column sizing conventions** (e.g., 12-column grid, fractional units, span props). Store this information in your memory alongside the component names.
98
+ 4. **Use ONLY confirmed component names and prop names** — when generating code, you must exclusively use the component names and prop names you discovered from the installed package. Do not rely on training knowledge of the design system's API, as it may be outdated, inaccurate, or refer to components/props that do not exist in the installed version.
100
99
 
101
- Also install any peer dependencies documented in the package's README. Report what was installed.
100
+ Build a **DS layout API reference** from this discovery. Reuse it for every layout template — do not repeat this discovery per component.
102
101
 
103
- ### 2a.1 — Install the DS styles package and configure global CSS (MANDATORY)
102
+ ### 2.1 — Install the DS styles package and configure global CSS (MANDATORY)
104
103
 
105
104
  Design systems require their global stylesheet — without it, components render unstyled.
106
105
 
107
- #### Known DS style requirements (examples — verify from README for exact paths):
106
+ #### Known DS style requirements (examples — verify against the README you already read):
108
107
 
109
- | Design System | Styles Package (example) | CSS Import in `src/main.tsx` (example) | Provider Wrapper (example) |
108
+ | Design System | Styles Package (example) | CSS Import (example) | Provider Wrapper (example) |
110
109
  | ------------- | ------------------------ | ---------------------------------------- | -------------------------- |
111
110
  | Carbon | `@carbon/styles` | `import '@carbon/react/css/styles.css';` | `<Theme>` |
112
111
  | Ant Design | (included) | `import 'antd/dist/reset.css';` | `<ConfigProvider>` |
@@ -115,49 +114,20 @@ Design systems require their global stylesheet — without it, components render
115
114
  | Shadcn/ui | (Tailwind) | `import './globals.css';` | None |
116
115
  | MUI | (included) | (none — CSS-in-JS) | `<ThemeProvider>` |
117
116
 
118
- These are **examples** based on common versions. Always verify the exact import path and provider name from the installed package's README (`node_modules/<ds>/README.md`).
119
-
120
- If in table: install styles package (if separate), add CSS import as **first import** in `src/main.tsx`, add Provider in `src/AppProviders.tsx`.
121
- If not in table: check README and `find node_modules/<ds> -name "*.css" -path "*/dist/*" | head -5`.
122
-
123
- Verification: `grep -n "import.*css\|import.*styles" src/main.tsx` must return a result. Do NOT proceed until confirmed.
124
-
125
- Report what was installed and configured.
126
-
127
- > You only need layout-related DS components. Form and page templates do not use the DS.
128
-
129
- Run these commands to discover the actual API (do NOT rely on training knowledge):
130
-
131
- 1. Read the README for correct import paths and usage patterns:
132
-
133
- ```bash
134
- cat node_modules/<designSystem>/README.md
135
- ```
136
-
137
- 2. List every exported component — focus on layout primitives (Grid, Columns, Flex, SimpleGrid, Row, Col):
117
+ Above mentioned are **examples** based on common versions. Use the import path and provider name you noted from the README — they take precedence over this table.
138
118
 
139
- ```bash
140
- 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"
141
- ```
119
+ If in table and not already configured: install styles package (if separate), add the global CSS import as the **first import** in the application's entry file, and add the Provider wrapper in the application's providers file.
120
+ If not in table: browse the installed design system's folder in `node_modules` for a `styles/` or `dist/` directory containing CSS files, and use what you find there.
142
121
 
143
- 3. For every grid/layout component you plan to use, read its prop interface:
122
+ Before implementing any component, verify whether design-system-specific styles are already configured in the existing codebase — check the application's entry file for a matching CSS import. If the styles are already imported and configured, skip this step and report "already configured".
144
123
 
145
- ```bash
146
- find node_modules/<designSystem> -name "Grid.d.ts" -o -name "Col.d.ts" -o -name "Flex.d.ts" | head -5
147
- grep -A 40 "interface.*Props" <path-from-above>
148
- ```
149
-
150
- 4. Note **responsive breakpoint APIs** and **column sizing conventions** (e.g., 12-column grid, fractional units, span props).
151
-
152
- Only use component names and prop names confirmed in these files.
153
-
154
- Build a **DS layout API reference** from this discovery. Reuse it for every layout template — do not repeat these commands per component.
124
+ Report what was installed/configured (or "already configured").
155
125
 
156
126
  ---
157
127
 
158
128
  ## Step 3 — Overwrite check (all at once)
159
129
 
160
- For each component in the list, check whether `<outputPath>/<ComponentName>/<ComponentName>.tsx` already exists.
130
+ For each component in the list, check whether the component's file or directory already exists at the output path.
161
131
 
162
132
  If **any** exist, report them all at once and ask:
163
133
 
@@ -193,21 +163,19 @@ If no skill file exists at that path, use the general pattern from `template-com
193
163
 
194
164
  Create the directory `<outputPath>/<ComponentName>/`.
195
165
 
196
- Create `<ComponentName>.tsx` using the structure matching the template category from `template-components.md` (loaded in Step 1):
166
+ Create the component's main implementation file using the file naming convention and extension appropriate to the project's framework (determine this by examining existing components in the project).
197
167
 
198
- - **Layout**: `PropsWithChildren` + `templateCol` parsing (split on whitespace, strip units, compute ratios) + DS grid/flex from Step 2 rendering children in computed column ratios. On mobile: columns must stack to full width.
199
- - **Form**: Use the `connectToState` HOC pattern from the skill file. Each child field MUST be wrapped in `connectToState(mapStateToProps)` for Redux store subscription. Plain `createElement(PConnectComponent, ...)` without `connectToState` will cause fields to NOT render. Also create `utils/index.ts` with `mapStateToProps` and `getKeyForMappedField`.
200
- - **Page**: The generated component MUST include ALL props, side effects, PCore API calls, useEffect hooks, and state management from the skill file's Component Skeleton. Page templates are complex — they interact with PCore APIs and infrastructure components. NEVER simplify a Page template to a single return statement or a pass-through wrapper.
168
+ Follow the implementation structure described in `template-components.md` (loaded in Step 1) for the component's template category, as identified in Step 4a:
201
169
 
202
- ⚠️ **CRITICAL RULE for Form and Page templates:** The component-specific skill file's Component Skeleton is the **minimum implementation**. You must include every `useState`, `useEffect`, `getComponentFromRegistry`, `PCore.*` call, helper function, and utility import shown in that skeleton. If your generated output is significantly shorter than the skeleton, you have over-simplified and MUST add the missing logic.
170
+ - **Layout**: column-ratio parsing (split on whitespace, strip units, compute ratios) + the DS grid/flex primitive from Step 2, rendering children in computed column ratios. On mobile: columns must stack to full width.
171
+ - **Form**: use the higher-order state-subscription pattern described in the skill file so that each child field is properly wired into the project's state management. Also create the companion utilities module described in the skill file.
172
+ - **Page**: the generated component MUST include ALL props, side effects, API calls, lifecycle hooks, and state management from the skill file's Component Skeleton. Page templates are complex — they interact with the underlying engine's APIs and infrastructure components. NEVER simplify a Page template to a single return statement or a pass-through wrapper.
203
173
 
204
- Apply the Behavioral Contract from the component skill file (sub-variants, region handling, slot logic).
174
+ ⚠️ **CRITICAL RULE for Form and Page templates:** The component-specific skill file's Component Skeleton is the **minimum implementation**. You must include every state variable, lifecycle hook, registry lookup, engine API call, helper function, and utility import shown in that skeleton. If your generated output is significantly shorter than the skeleton, you have over-simplified and MUST add the missing logic.
205
175
 
206
- Create `index.tsx` if required by the skill file:
176
+ Apply the Behavioral Contract from the component skill file (sub-variants, region handling, slot logic).
207
177
 
208
- ```typescript
209
- export { default } from './<ComponentName>';
210
- ```
178
+ If the project uses barrel/re-export files (check existing component directories for the convention), create one in the same directory following the same pattern.
211
179
 
212
180
  Create any CSS file required by the skill file (e.g., `DefaultForm.css` with grid classes).
213
181
 
@@ -217,9 +185,9 @@ Create any `utils/` or helper files mandated by the skill file (e.g., `utils/ind
217
185
 
218
186
  After generating each Form or Page template, verify:
219
187
 
220
- 1. **Form templates:** `connectToState` is imported and used; `mapStateToProps` + `getKeyForMappedField` are in `utils/index.ts`; each child field uses the `<Child key={getKeyForMappedField(kid)} {...kid} />` pattern.
221
- 2. **Page templates:** All props listed in the skill file's Props table are destructured; all `getComponentFromRegistry()` lookups from the skeleton are present; all `useEffect` hooks from the skeleton are present; all PCore API calls (`PCore.getEnvironmentInfo()`, `PCore.getPubSubUtils()`, etc.) from the skeleton are present; infrastructure components (NavBar, VerticalTabs, DeferLoad, etc.) receive ALL required props from the skeleton.
222
- 3. **Both:** The generated file is NOT a single-line return. If the skill file skeleton is 50+ lines, your output should be comparable in length.
188
+ 1. **Form templates:** the higher-order state-subscription pattern is imported and used; the companion utilities module contains the helpers described in the skill file; each child field is wired through those helpers.
189
+ 2. **Page templates:** all props listed in the skill file's Props table are destructured; all registry lookups from the skeleton are present; all lifecycle hooks from the skeleton are present; all engine API calls from the skeleton are present; infrastructure components (NavBar, VerticalTabs, DeferLoad, etc.) receive ALL required props from the skeleton.
190
+ 3. **Both:** the generated file is NOT a single-line return. If the skill file skeleton is 50+ lines, your output should be comparable in length.
223
191
 
224
192
  If any check fails, revise the generated output before proceeding.
225
193
 
@@ -229,39 +197,21 @@ If any check fails, revise the generated output before proceeding.
229
197
 
230
198
  After generating **TwoColumn**, **OneColumn**, **NarrowWide**, or **WideNarrow**, you MUST immediately create these additional files in the same directory:
231
199
 
232
- | Base template | Sub-variant files to create |
233
- | ------------- | ------------------------------------------------------------------- |
234
- | TwoColumn | `TwoColumnPage.tsx`, `TwoColumnTab.tsx` |
235
- | OneColumn | `OneColumnPage.tsx`, `OneColumnTab.tsx` |
236
- | NarrowWide | `NarrowWideForm.tsx`, `NarrowWidePage.tsx` |
237
- | WideNarrow | `WideNarrowDetails.tsx`, `WideNarrowForm.tsx`, `WideNarrowPage.tsx` |
200
+ | Base template | Sub-variants to create |
201
+ | ------------- | ------------------------------------------------------- |
202
+ | TwoColumn | `TwoColumnPage`, `TwoColumnTab` |
203
+ | OneColumn | `OneColumnPage`, `OneColumnTab` |
204
+ | NarrowWide | `NarrowWideForm`, `NarrowWidePage` |
205
+ | WideNarrow | `WideNarrowDetails`, `WideNarrowForm`, `WideNarrowPage` |
238
206
 
239
- Each sub-variant is a one-line passthrough that delegates to the base component via the registry:
240
-
241
- ```typescript
242
- import { getComponentFromRegistry } from '@pega/sdk-react';
243
- import type { PConnProps } from '@pega/sdk-react';
244
-
245
- export default function TwoColumnPage(props: PConnProps & Record<string, any>) {
246
- const TwoColumn = getComponentFromRegistry('TwoColumn');
247
- return <TwoColumn {...props} />;
248
- }
249
- ```
250
-
251
- Replace `TwoColumnPage`/`TwoColumn` with the appropriate names for each sub-variant.
207
+ Each sub-variant is a passthrough component (using the file naming convention established for this project) that delegates to the base component via the project's component registry — follow the passthrough pattern described in `template-components.md` (loaded in Step 1), substituting the appropriate base component and sub-variant name each time.
252
208
 
253
209
  ### 4c — Register the component
254
210
 
255
- Edit `src/components/component-map.ts`:
211
+ Open the project's component map file (the file that maps component names to their implementations) and:
256
212
 
257
- 1. Add an import at the top of the file in the **Templates** section:
258
- ```typescript
259
- import <ComponentName> from './template/<ComponentName>';
260
- ```
261
- 2. Add an entry in the return object of `getSampleComponentMap()` under the templates comment:
262
- ```typescript
263
- <ComponentName>,
264
- ```
213
+ 1. Add an import at the top of the file in the **Templates** section
214
+ 2. Add an entry in the component map object under the templates comment
265
215
  3. **Also import and register ALL sub-variant files** created in Step 4b.2. Each gets its own import and map entry.
266
216
 
267
217
  Do not reorder or restructure any existing entries.
@@ -274,10 +224,4 @@ After each component: "`<ComponentName>` ✓ — `<Layout | Form | Page>` templa
274
224
 
275
225
  ## Step 5 — Verify the build
276
226
 
277
- Run:
278
-
279
- ```bash
280
- npm run build
281
- ```
282
-
283
- If build errors occur, fix them before reporting completion. Report a summary: list of all files created and all entries added to `component-map.ts`.
227
+ Run the project's build process to confirm everything compiles without errors. Fix any build errors before reporting completion. Report a summary: list of all files created and all entries added to the component map.
@@ -46,12 +46,12 @@ Read the full contents of `{{SKILL_DIR}}/widget-components.md`.
46
46
 
47
47
  This gives you:
48
48
 
49
- - The DS-agnostic data-fetching skeleton with `// [DS RENDER]` placeholder
49
+ - The DS-agnostic data-fetching skeleton
50
50
  - The Design System Adaptation guide (primitive mapping table, icon discovery rules)
51
- - All common Pega APIs used in widgets: `PCore.getDataPageUtils()`, `PCore.getMashupApi()`, `PCore.getAttachmentUtils()`, `pConn.getCaseInfo()`, etc.
51
+ - All common engine APIs used in widgets for data pages, mashup interactions, attachments, case info, etc.
52
52
  - Registration conventions
53
53
 
54
- > The PCore data-fetching logic is always identical regardless of design system. Only the `// [DS RENDER]` section changes per DS.
54
+ > The data-fetching logic is always identical regardless of design system. Only the presentation layer changes per DS.
55
55
 
56
56
  Keep this context active throughout the entire generation session. Do not re-read it per component.
57
57
 
@@ -59,29 +59,32 @@ Keep this context active throughout the entire generation session. Do not re-rea
59
59
 
60
60
  ## Step 2 — Install and discover the design system (once)
61
61
 
62
- ### 2a — Check and install the DS package
62
+ Check the project's dependency manifest to determine whether the design system package is already installed. If it is **not** listed in the project's dependencies, install it using the project's package manager. Report what was installed.
63
63
 
64
- Run this command in your terminal:
64
+ **Immediately after installation**, read `node_modules/<designSystem>/README.md` in full. From it, note the correct import paths, usage patterns, version-specific guidance, global CSS/styles import path, provider wrapper component name, and any peer dependency requirements. Store this information in your memory and use it for all subsequent steps — do not re-read the README later. If the README lists peer dependencies that are not already installed in the project, install them now — the design system will not function correctly without them.
65
65
 
66
- ```bash
67
- cat package.json | grep "<design-system-package>"
68
- ```
66
+ You MUST also thoroughly inspect the installed design system package, focusing on presentation primitives (Card, List, Table, Button, Badge, Spinner):
69
67
 
70
- If the design system package is **not** listed in `dependencies` or `devDependencies`, install it:
68
+ 1. **Discover all available components** — browse the installed package's directory tree under `node_modules/<designSystem>/` to find every component it exports. Do not assume a specific folder structure (e.g. `dist/`) — packages vary widely in how they organize source, types, and entry points. Navigate through the package's folders, read its entry-point files and type definitions, and build a complete list of every component the package actually provides. Store all discovered component names and their import paths in your memory for reference during code generation.
69
+ 2. **Map each widget to the best available DS primitive** — using the complete list you just discovered, identify which DS component best serves each widget's presentation needs. If no single DS component is a close match, compose the requested behavior from multiple available DS primitives. Never fabricate a component import that does not exist in the installed package.
70
+ 3. **Read the props interface of every primitive you plan to use** — for each component you intend to use, locate and read its TypeScript type definitions (`.d.ts` files or inline types) to understand the exact prop names, types, required vs. optional status, and any relevant enums or union types. Store this information in your memory alongside the component names.
71
+ 4. **Use ONLY confirmed component names and prop names** — when generating code, you must exclusively use the component names and prop names you discovered from the installed package. Do not rely on training knowledge of the design system's API, as it may be outdated, inaccurate, or refer to components/props that do not exist in the installed version.
71
72
 
72
- ```bash
73
- npm install <design-system-package>
74
- ```
73
+ Also check:
75
74
 
76
- Also install any peer dependencies documented in the package's README. Report what was installed.
75
+ - Whether the design system has a **companion icon package** — read its exports before using any icon name; never guess icon names
76
+ - Whether it has **size/variant conventions** — use built-in props rather than custom padding
77
+ - Whether it has **CSS tokens** — use design system CSS custom properties for spacing; never hardcode `px` values
77
78
 
78
- ### 2a.1 — Install the DS styles package and configure global CSS (MANDATORY)
79
+ Build a **DS UI primitive reference map** from this discovery. Reuse it for every widget — do not repeat this discovery per component.
80
+
81
+ ### 2.1 — Install the DS styles package and configure global CSS (MANDATORY)
79
82
 
80
83
  Design systems require their global stylesheet — without it, components render unstyled.
81
84
 
82
- #### Known DS style requirements (examples — verify from README for exact paths):
85
+ #### Known DS style requirements (examples — verify against the README you already read):
83
86
 
84
- | Design System | Styles Package (example) | CSS Import in `src/main.tsx` (example) | Provider Wrapper (example) |
87
+ | Design System | Styles Package (example) | CSS Import (example) | Provider Wrapper (example) |
85
88
  | ------------- | ------------------------ | ---------------------------------------- | -------------------------- |
86
89
  | Carbon | `@carbon/styles` | `import '@carbon/react/css/styles.css';` | `<Theme>` |
87
90
  | Ant Design | (included) | `import 'antd/dist/reset.css';` | `<ConfigProvider>` |
@@ -90,51 +93,20 @@ Design systems require their global stylesheet — without it, components render
90
93
  | Shadcn/ui | (Tailwind) | `import './globals.css';` | None |
91
94
  | MUI | (included) | (none — CSS-in-JS) | `<ThemeProvider>` |
92
95
 
93
- These are **examples** based on common versions. Always verify the exact import path and provider name from the installed package's README (`node_modules/<ds>/README.md`).
94
-
95
- If in table: install styles package (if separate), add CSS import as **first import** in `src/main.tsx`, add Provider in `src/AppProviders.tsx`.
96
- If not in table: check README and `find node_modules/<ds> -name "*.css" -path "*/dist/*" | head -5`.
97
-
98
- Verification: `grep -n "import.*css\|import.*styles" src/main.tsx` must return a result. Do NOT proceed until confirmed.
99
-
100
- Report what was installed and configured.
101
-
102
- Run these commands to discover the actual API (do NOT rely on training knowledge):
103
-
104
- 1. Read the README for correct import paths and usage patterns:
105
-
106
- ```bash
107
- cat node_modules/<designSystem>/README.md
108
- ```
109
-
110
- 2. List every exported component:
111
-
112
- ```bash
113
- 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"
114
- ```
96
+ Above mentioned are **examples** based on common versions. Use the import path and provider name you noted from the README — they take precedence over this table.
115
97
 
116
- 3. For every component you plan to use (Card, List, Table, Button, Badge, Spinner), read its prop interface:
98
+ If in table and not already configured: install styles package (if separate), add the global CSS import as the **first import** in the application's entry file, and add the Provider wrapper in the application's providers file.
99
+ If not in table: browse the installed design system's folder in `node_modules` for a `styles/` or `dist/` directory containing CSS files, and use what you find there.
117
100
 
118
- ```bash
119
- find node_modules/<designSystem> -name "ComponentName.d.ts" | head -3
120
- grep -A 40 "interface.*Props" <path-from-above>
121
- ```
101
+ Before implementing any component, verify whether design-system-specific styles are already configured in the existing codebase — check the application's entry file for a matching CSS import. If the styles are already imported and configured, skip this step and report "already configured".
122
102
 
123
- 4. Check for a **companion icon package** — if it exists, read its exports before using any icon name. Never guess icon names.
124
-
125
- 5. Check for **size/variant conventions** — use built-in props rather than custom padding.
126
-
127
- 6. Check for **CSS tokens** — use design system CSS custom properties for spacing; never hardcode `px` values.
128
-
129
- Only use component names and prop names confirmed in these files.
130
-
131
- Build a **DS UI primitive reference map** from this discovery. Reuse it for every widget — do not repeat these commands per component.
103
+ Report what was installed/configured (or "already configured").
132
104
 
133
105
  ---
134
106
 
135
107
  ## Step 3 — Overwrite check (all at once)
136
108
 
137
- For each component in the list, check whether `<outputPath>/<ComponentName>/<ComponentName>.tsx` already exists.
109
+ For each component in the list, check whether the component's file or directory already exists at the output path.
138
110
 
139
111
  If **any** exist, report them all at once and ask:
140
112
 
@@ -160,7 +132,7 @@ After reading, extract and keep active:
160
132
 
161
133
  - **Behavioral Contract** — the exact PCore API calls, state variables, event handlers, and edge cases specific to this widget
162
134
  - **Design System Mapping** table — the recommended DS primitive for this component's presentation layer
163
- - **Props interface** — any required/optional props beyond the base `PConnProps`
135
+ - **Props interface** — any required/optional props beyond the base component props
164
136
 
165
137
  If no skill file exists at that path (e.g., `SummaryList`), use the general data-fetching pattern from `widget-components.md` loaded in Step 1.
166
138
 
@@ -170,36 +142,20 @@ If no skill file exists at that path (e.g., `SummaryList`), use the general data
170
142
 
171
143
  Create the directory `<outputPath>/<ComponentName>/`.
172
144
 
173
- Create `<ComponentName>.tsx` using this structure from `widget-components.md` (loaded in Step 1):
145
+ Create the component's main implementation file using the file naming convention and extension appropriate to the project's framework (determine this by examining existing components in the project).
174
146
 
175
- 1. Imports (React hooks + DS components from Step 2 + `PConnProps` from `@pega/sdk-react`)
176
- 2. Interface extending PConnProps with props from the component skill file's Props table
177
- 3. Component function: destructure `getPConnect`, call `getPConnect()` to get `pConn`
178
- 4. `useEffect` → data fetch using the exact PCore API call from the skill file's Behavioral Contract
179
- 5. Return → DS Card/List/Table primitive from Step 2 API map, rendering the fetched data
147
+ Follow the implementation structure described in `widget-components.md` (loaded in Step 1). That file specifies the exact imports, interface, data-fetching lifecycle, and render approach for this project's framework. Use the DS primitives you identified in Step 2 for presentation. The data-fetching logic comes from the skill file's Behavioral Contract — do NOT invent API calls.
180
148
 
181
- Fill in the `// [DS RENDER]` section with DS primitives confirmed in Step 2. The data-fetching logic comes from the skill file's Behavioral Contract — do NOT invent API calls.
182
-
183
- Create `index.tsx`:
184
-
185
- ```typescript
186
- export { default } from './<ComponentName>';
187
- ```
149
+ If the project uses barrel/re-export files (check existing component directories for the convention), create one in the same directory following the same pattern.
188
150
 
189
151
  Create any CSS or utility files required by the skill file.
190
152
 
191
153
  ### 4c — Register the component
192
154
 
193
- Edit `src/components/component-map.ts`:
155
+ Open the project's component map file (the file that maps component names to their implementations) and:
194
156
 
195
- 1. Add an import at the top of the file in the **Widgets** section:
196
- ```typescript
197
- import <ComponentName> from './widget/<ComponentName>';
198
- ```
199
- 2. Add an entry in the return object of `getSampleComponentMap()` under the widgets comment:
200
- ```typescript
201
- <ComponentName>,
202
- ```
157
+ 1. Add an import at the top of the file in the **Widgets** section
158
+ 2. Add an entry in the component map object under the widgets comment
203
159
 
204
160
  ⚠️ **Key name exception:** `ToDo` MUST be registered as `Todo: ToDo` (not `ToDo,`). The Pega engine sends `Todo` (capital T, lowercase 'odo'). Using shorthand `ToDo,` creates key `ToDo` which won't match.
205
161
 
@@ -213,10 +169,4 @@ After each component: "`<ComponentName>` ✓ — using `<DS card/list primitive>
213
169
 
214
170
  ## Step 5 — Verify the build
215
171
 
216
- Run:
217
-
218
- ```bash
219
- npm run build
220
- ```
221
-
222
- If build errors occur, fix them before reporting completion. Report a summary: list of all files created and all entries added to `component-map.ts`.
172
+ Run the project's build process to confirm everything compiles without errors. Fix any build errors before reporting completion. Report a summary: list of all files created and all entries added to the component map.