@pega/sdk 0.0.3 → 0.0.4

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 (346) hide show
  1. package/LICENSE +183 -183
  2. package/README.md +6 -6
  3. package/SECURITY.md +2 -1
  4. package/dist/index.js +12 -55
  5. package/package.json +7 -6
  6. package/templates/angular-sdk-reference/package.json +15 -15
  7. package/templates/angular-sdk-reference/tsconfig.json +2 -2
  8. package/templates/react-native-sdk-reference/App.tsx +2 -4
  9. package/templates/react-native-sdk-reference/package.json +6 -6
  10. package/templates/react-native-sdk-reference/tsconfig.json +2 -1
  11. package/templates/react-sdk-reference/.claude/instructions/component-map.md +1 -1
  12. package/templates/react-sdk-reference/.claude/instructions/field-component.md +4 -0
  13. package/templates/react-sdk-reference/.claude/instructions/template-component.md +2 -1
  14. package/templates/react-sdk-reference/.claude/instructions/widget-component.md +1 -0
  15. package/templates/react-sdk-reference/.claude/prompts/add-component.md +18 -10
  16. package/templates/react-sdk-reference/.claude/prompts/component-manifest.json +165 -83
  17. package/templates/react-sdk-reference/.claude/prompts/generate-all-components.md +26 -17
  18. package/templates/react-sdk-reference/.claude/prompts/generate-dse-components.md +27 -13
  19. package/templates/react-sdk-reference/.claude/prompts/generate-field-components.md +42 -28
  20. package/templates/react-sdk-reference/.claude/prompts/generate-template-components.md +48 -34
  21. package/templates/react-sdk-reference/.claude/prompts/generate-widget-components.md +25 -11
  22. package/templates/react-sdk-reference/.claude/prompts/identify-components.md +65 -65
  23. package/templates/react-sdk-reference/.claude/skills/component-contracts.md +99 -99
  24. package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/AlertBanner.md +40 -38
  25. package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/Banner.md +54 -51
  26. package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/CaseSummaryFields.md +51 -46
  27. package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/DetailsFields.md +32 -28
  28. package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/FieldGroup.md +38 -35
  29. package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/FieldGroupList.md +25 -23
  30. package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/FieldValueList.md +29 -26
  31. package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/Operator.md +32 -26
  32. package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/Pulse.md +17 -15
  33. package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/RichTextEditor.md +85 -59
  34. package/templates/react-sdk-reference/.claude/skills/design-system-extension-skills/WssQuickCreate.md +49 -47
  35. package/templates/react-sdk-reference/.claude/skills/design-system-extension.md +13 -11
  36. package/templates/react-sdk-reference/.claude/skills/field-components.md +9 -8
  37. package/templates/react-sdk-reference/.claude/skills/field-skills/AutoComplete.md +27 -26
  38. package/templates/react-sdk-reference/.claude/skills/field-skills/CancelAlert.md +30 -22
  39. package/templates/react-sdk-reference/.claude/skills/field-skills/Checkbox.md +60 -43
  40. package/templates/react-sdk-reference/.claude/skills/field-skills/Currency.md +23 -20
  41. package/templates/react-sdk-reference/.claude/skills/field-skills/Date.md +19 -17
  42. package/templates/react-sdk-reference/.claude/skills/field-skills/DateTime.md +18 -15
  43. package/templates/react-sdk-reference/.claude/skills/field-skills/Decimal.md +22 -21
  44. package/templates/react-sdk-reference/.claude/skills/field-skills/Dropdown.md +50 -30
  45. package/templates/react-sdk-reference/.claude/skills/field-skills/Email.md +20 -18
  46. package/templates/react-sdk-reference/.claude/skills/field-skills/Group.md +21 -15
  47. package/templates/react-sdk-reference/.claude/skills/field-skills/Integer.md +17 -16
  48. package/templates/react-sdk-reference/.claude/skills/field-skills/Location.md +30 -21
  49. package/templates/react-sdk-reference/.claude/skills/field-skills/Multiselect.md +66 -42
  50. package/templates/react-sdk-reference/.claude/skills/field-skills/ObjectReference.md +27 -18
  51. package/templates/react-sdk-reference/.claude/skills/field-skills/Percentage.md +22 -21
  52. package/templates/react-sdk-reference/.claude/skills/field-skills/Phone.md +36 -17
  53. package/templates/react-sdk-reference/.claude/skills/field-skills/RadioButtons.md +56 -35
  54. package/templates/react-sdk-reference/.claude/skills/field-skills/RichText.md +23 -12
  55. package/templates/react-sdk-reference/.claude/skills/field-skills/ScalarList.md +41 -31
  56. package/templates/react-sdk-reference/.claude/skills/field-skills/SelectableCard.md +70 -55
  57. package/templates/react-sdk-reference/.claude/skills/field-skills/SemanticLink.md +34 -27
  58. package/templates/react-sdk-reference/.claude/skills/field-skills/TextArea.md +24 -22
  59. package/templates/react-sdk-reference/.claude/skills/field-skills/TextContent.md +38 -22
  60. package/templates/react-sdk-reference/.claude/skills/field-skills/TextInput.md +24 -21
  61. package/templates/react-sdk-reference/.claude/skills/field-skills/Time.md +16 -15
  62. package/templates/react-sdk-reference/.claude/skills/field-skills/URL.md +16 -15
  63. package/templates/react-sdk-reference/.claude/skills/field-skills/UserReference.md +57 -34
  64. package/templates/react-sdk-reference/.claude/skills/run-and-verify.md +10 -8
  65. package/templates/react-sdk-reference/.claude/skills/template-components.md +7 -8
  66. package/templates/react-sdk-reference/.claude/skills/template-skills/AdvancedSearch.md +27 -21
  67. package/templates/react-sdk-reference/.claude/skills/template-skills/AppShell.md +17 -15
  68. package/templates/react-sdk-reference/.claude/skills/template-skills/BannerPage.md +19 -16
  69. package/templates/react-sdk-reference/.claude/skills/template-skills/CaseSummary.md +19 -13
  70. package/templates/react-sdk-reference/.claude/skills/template-skills/CaseView.md +23 -17
  71. package/templates/react-sdk-reference/.claude/skills/template-skills/CaseViewActionsMenu.md +34 -29
  72. package/templates/react-sdk-reference/.claude/skills/template-skills/Confirmation.md +18 -16
  73. package/templates/react-sdk-reference/.claude/skills/template-skills/DataReference.md +36 -32
  74. package/templates/react-sdk-reference/.claude/skills/template-skills/DefaultForm.md +23 -21
  75. package/templates/react-sdk-reference/.claude/skills/template-skills/DefaultPage.md +31 -29
  76. package/templates/react-sdk-reference/.claude/skills/template-skills/Details.md +19 -17
  77. package/templates/react-sdk-reference/.claude/skills/template-skills/DetailsSubTabs.md +22 -20
  78. package/templates/react-sdk-reference/.claude/skills/template-skills/DetailsThreeColumn.md +19 -17
  79. package/templates/react-sdk-reference/.claude/skills/template-skills/DetailsTwoColumn.md +19 -17
  80. package/templates/react-sdk-reference/.claude/skills/template-skills/DynamicTabs.md +15 -10
  81. package/templates/react-sdk-reference/.claude/skills/template-skills/FieldGroupTemplate.md +19 -16
  82. package/templates/react-sdk-reference/.claude/skills/template-skills/HierarchicalForm.md +18 -15
  83. package/templates/react-sdk-reference/.claude/skills/template-skills/InlineDashboard.md +17 -13
  84. package/templates/react-sdk-reference/.claude/skills/template-skills/InlineDashboardPage.md +10 -13
  85. package/templates/react-sdk-reference/.claude/skills/template-skills/ListPage.md +9 -7
  86. package/templates/react-sdk-reference/.claude/skills/template-skills/ListView.md +33 -30
  87. package/templates/react-sdk-reference/.claude/skills/template-skills/MultiReferenceReadOnly.md +13 -11
  88. package/templates/react-sdk-reference/.claude/skills/template-skills/NarrowWide.md +42 -40
  89. package/templates/react-sdk-reference/.claude/skills/template-skills/OneColumn.md +25 -20
  90. package/templates/react-sdk-reference/.claude/skills/template-skills/PromotedFilters.md +25 -19
  91. package/templates/react-sdk-reference/.claude/skills/template-skills/SelfServiceCaseView.md +36 -29
  92. package/templates/react-sdk-reference/.claude/skills/template-skills/SimpleTable.md +31 -27
  93. package/templates/react-sdk-reference/.claude/skills/template-skills/SingleReferenceReadOnly.md +29 -24
  94. package/templates/react-sdk-reference/.claude/skills/template-skills/SubTabs.md +14 -11
  95. package/templates/react-sdk-reference/.claude/skills/template-skills/TwoColumn.md +34 -32
  96. package/templates/react-sdk-reference/.claude/skills/template-skills/WideNarrow.md +48 -46
  97. package/templates/react-sdk-reference/.claude/skills/template-skills/WssNavBar.md +23 -19
  98. package/templates/react-sdk-reference/.claude/skills/widget-components.md +11 -22
  99. package/templates/react-sdk-reference/.claude/skills/widget-skills/AppAnnouncement.md +22 -20
  100. package/templates/react-sdk-reference/.claude/skills/widget-skills/Attachment.md +33 -28
  101. package/templates/react-sdk-reference/.claude/skills/widget-skills/CaseHistory.md +18 -15
  102. package/templates/react-sdk-reference/.claude/skills/widget-skills/FileUtility.md +43 -37
  103. package/templates/react-sdk-reference/.claude/skills/widget-skills/Followers.md +23 -19
  104. package/templates/react-sdk-reference/.claude/skills/widget-skills/QuickCreate.md +20 -16
  105. package/templates/react-sdk-reference/.claude/skills/widget-skills/SummaryItem.md +26 -24
  106. package/templates/react-sdk-reference/.claude/skills/widget-skills/ToDo.md +43 -35
  107. package/templates/react-sdk-reference/.cursor/rules/prompts/component-manifest.json +165 -83
  108. package/templates/react-sdk-reference/.github/agents/implementation-expert.agent.md +135 -0
  109. package/templates/react-sdk-reference/.github/instructions/component-map.instructions.md +2 -2
  110. package/templates/react-sdk-reference/.github/instructions/dse-component.instructions.md +1 -1
  111. package/templates/react-sdk-reference/.github/instructions/field-component.instructions.md +5 -1
  112. package/templates/react-sdk-reference/.github/instructions/template-component.instructions.md +3 -2
  113. package/templates/react-sdk-reference/.github/instructions/widget-component.instructions.md +2 -1
  114. package/templates/react-sdk-reference/.github/prompts/add-component.prompt.md +58 -15
  115. package/templates/react-sdk-reference/.github/prompts/component-manifest.json +165 -83
  116. package/templates/react-sdk-reference/.github/prompts/generate-all-components.prompt.md +322 -65
  117. package/templates/react-sdk-reference/.github/prompts/generate-dse-components.prompt.md +124 -50
  118. package/templates/react-sdk-reference/.github/prompts/generate-field-components.prompt.md +145 -66
  119. package/templates/react-sdk-reference/.github/prompts/generate-template-components.prompt.md +146 -73
  120. package/templates/react-sdk-reference/.github/prompts/generate-widget-components.prompt.md +128 -49
  121. package/templates/react-sdk-reference/.github/prompts/identify-components.prompt.md +65 -65
  122. package/templates/react-sdk-reference/.github/skills/component-contracts.md +99 -99
  123. package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/AlertBanner.md +40 -38
  124. package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/Banner.md +54 -51
  125. package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/CaseSummaryFields.md +51 -46
  126. package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/DetailsFields.md +32 -28
  127. package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/FieldGroup.md +38 -35
  128. package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/FieldGroupList.md +25 -23
  129. package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/FieldValueList.md +29 -26
  130. package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/Operator.md +32 -26
  131. package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/Pulse.md +17 -15
  132. package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/RichTextEditor.md +85 -59
  133. package/templates/react-sdk-reference/.github/skills/design-system-extension-skills/WssQuickCreate.md +49 -47
  134. package/templates/react-sdk-reference/.github/skills/design-system-extension.md +13 -11
  135. package/templates/react-sdk-reference/.github/skills/field-components.md +9 -8
  136. package/templates/react-sdk-reference/.github/skills/field-skills/AutoComplete.md +27 -26
  137. package/templates/react-sdk-reference/.github/skills/field-skills/CancelAlert.md +30 -22
  138. package/templates/react-sdk-reference/.github/skills/field-skills/Checkbox.md +60 -43
  139. package/templates/react-sdk-reference/.github/skills/field-skills/Currency.md +23 -20
  140. package/templates/react-sdk-reference/.github/skills/field-skills/Date.md +19 -17
  141. package/templates/react-sdk-reference/.github/skills/field-skills/DateTime.md +18 -15
  142. package/templates/react-sdk-reference/.github/skills/field-skills/Decimal.md +22 -21
  143. package/templates/react-sdk-reference/.github/skills/field-skills/Dropdown.md +50 -30
  144. package/templates/react-sdk-reference/.github/skills/field-skills/Email.md +20 -18
  145. package/templates/react-sdk-reference/.github/skills/field-skills/Group.md +21 -15
  146. package/templates/react-sdk-reference/.github/skills/field-skills/Integer.md +17 -16
  147. package/templates/react-sdk-reference/.github/skills/field-skills/Location.md +30 -21
  148. package/templates/react-sdk-reference/.github/skills/field-skills/Multiselect.md +66 -42
  149. package/templates/react-sdk-reference/.github/skills/field-skills/ObjectReference.md +27 -18
  150. package/templates/react-sdk-reference/.github/skills/field-skills/Percentage.md +22 -21
  151. package/templates/react-sdk-reference/.github/skills/field-skills/Phone.md +36 -17
  152. package/templates/react-sdk-reference/.github/skills/field-skills/RadioButtons.md +56 -35
  153. package/templates/react-sdk-reference/.github/skills/field-skills/RichText.md +23 -12
  154. package/templates/react-sdk-reference/.github/skills/field-skills/ScalarList.md +41 -31
  155. package/templates/react-sdk-reference/.github/skills/field-skills/SelectableCard.md +70 -55
  156. package/templates/react-sdk-reference/.github/skills/field-skills/SemanticLink.md +34 -27
  157. package/templates/react-sdk-reference/.github/skills/field-skills/TextArea.md +24 -22
  158. package/templates/react-sdk-reference/.github/skills/field-skills/TextContent.md +38 -22
  159. package/templates/react-sdk-reference/.github/skills/field-skills/TextInput.md +24 -21
  160. package/templates/react-sdk-reference/.github/skills/field-skills/Time.md +16 -15
  161. package/templates/react-sdk-reference/.github/skills/field-skills/URL.md +16 -15
  162. package/templates/react-sdk-reference/.github/skills/field-skills/UserReference.md +57 -34
  163. package/templates/react-sdk-reference/.github/skills/run-and-verify.md +10 -8
  164. package/templates/react-sdk-reference/.github/skills/template-components.md +7 -8
  165. package/templates/react-sdk-reference/.github/skills/template-skills/AdvancedSearch.md +27 -21
  166. package/templates/react-sdk-reference/.github/skills/template-skills/AppShell.md +17 -15
  167. package/templates/react-sdk-reference/.github/skills/template-skills/BannerPage.md +19 -16
  168. package/templates/react-sdk-reference/.github/skills/template-skills/CaseSummary.md +19 -13
  169. package/templates/react-sdk-reference/.github/skills/template-skills/CaseView.md +23 -17
  170. package/templates/react-sdk-reference/.github/skills/template-skills/CaseViewActionsMenu.md +34 -29
  171. package/templates/react-sdk-reference/.github/skills/template-skills/Confirmation.md +18 -16
  172. package/templates/react-sdk-reference/.github/skills/template-skills/DataReference.md +36 -32
  173. package/templates/react-sdk-reference/.github/skills/template-skills/DefaultForm.md +23 -21
  174. package/templates/react-sdk-reference/.github/skills/template-skills/DefaultPage.md +31 -29
  175. package/templates/react-sdk-reference/.github/skills/template-skills/Details.md +19 -17
  176. package/templates/react-sdk-reference/.github/skills/template-skills/DetailsSubTabs.md +22 -20
  177. package/templates/react-sdk-reference/.github/skills/template-skills/DetailsThreeColumn.md +19 -17
  178. package/templates/react-sdk-reference/.github/skills/template-skills/DetailsTwoColumn.md +19 -17
  179. package/templates/react-sdk-reference/.github/skills/template-skills/DynamicTabs.md +15 -10
  180. package/templates/react-sdk-reference/.github/skills/template-skills/FieldGroupTemplate.md +19 -16
  181. package/templates/react-sdk-reference/.github/skills/template-skills/HierarchicalForm.md +18 -15
  182. package/templates/react-sdk-reference/.github/skills/template-skills/InlineDashboard.md +17 -13
  183. package/templates/react-sdk-reference/.github/skills/template-skills/InlineDashboardPage.md +10 -13
  184. package/templates/react-sdk-reference/.github/skills/template-skills/ListPage.md +9 -7
  185. package/templates/react-sdk-reference/.github/skills/template-skills/ListView.md +33 -30
  186. package/templates/react-sdk-reference/.github/skills/template-skills/MultiReferenceReadOnly.md +13 -11
  187. package/templates/react-sdk-reference/.github/skills/template-skills/NarrowWide.md +42 -40
  188. package/templates/react-sdk-reference/.github/skills/template-skills/OneColumn.md +25 -20
  189. package/templates/react-sdk-reference/.github/skills/template-skills/PromotedFilters.md +25 -19
  190. package/templates/react-sdk-reference/.github/skills/template-skills/SelfServiceCaseView.md +36 -29
  191. package/templates/react-sdk-reference/.github/skills/template-skills/SimpleTable.md +31 -27
  192. package/templates/react-sdk-reference/.github/skills/template-skills/SingleReferenceReadOnly.md +29 -24
  193. package/templates/react-sdk-reference/.github/skills/template-skills/SubTabs.md +14 -11
  194. package/templates/react-sdk-reference/.github/skills/template-skills/TwoColumn.md +34 -32
  195. package/templates/react-sdk-reference/.github/skills/template-skills/WideNarrow.md +48 -46
  196. package/templates/react-sdk-reference/.github/skills/template-skills/WssNavBar.md +23 -19
  197. package/templates/react-sdk-reference/.github/skills/widget-components.md +11 -22
  198. package/templates/react-sdk-reference/.github/skills/widget-skills/AppAnnouncement.md +22 -20
  199. package/templates/react-sdk-reference/.github/skills/widget-skills/Attachment.md +33 -28
  200. package/templates/react-sdk-reference/.github/skills/widget-skills/CaseHistory.md +18 -15
  201. package/templates/react-sdk-reference/.github/skills/widget-skills/FileUtility.md +43 -37
  202. package/templates/react-sdk-reference/.github/skills/widget-skills/Followers.md +23 -19
  203. package/templates/react-sdk-reference/.github/skills/widget-skills/QuickCreate.md +20 -16
  204. package/templates/react-sdk-reference/.github/skills/widget-skills/SummaryItem.md +26 -24
  205. package/templates/react-sdk-reference/.github/skills/widget-skills/ToDo.md +43 -35
  206. package/templates/react-sdk-reference/AGENTS.md +0 -1
  207. package/templates/react-sdk-reference/index.html +1 -4
  208. package/templates/react-sdk-reference/package.json +15 -15
  209. package/templates/react-sdk-reference/pega-sdk-react-0.1.0.tgz +0 -0
  210. package/templates/react-sdk-reference/src/AppSelector.tsx +6 -6
  211. package/templates/react-sdk-reference/src/FallbackComponent.tsx +2 -6
  212. package/templates/react-sdk-reference/src/MashupApp.styles.ts +269 -41
  213. package/templates/react-sdk-reference/src/MashupApp.tsx +186 -85
  214. package/templates/react-sdk-reference/src/PortalApp.tsx +10 -34
  215. package/templates/react-sdk-reference/src/components/component-map.ts +2 -7
  216. package/templates/react-sdk-reference/src/components/designSystemExtension/AlertBanner/AlertBanner.tsx +7 -28
  217. package/templates/react-sdk-reference/src/components/designSystemExtension/Banner/Banner.tsx +12 -7
  218. package/templates/react-sdk-reference/src/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +35 -33
  219. package/templates/react-sdk-reference/src/components/designSystemExtension/DetailsFields/DetailsFields.tsx +6 -27
  220. package/templates/react-sdk-reference/src/components/designSystemExtension/FieldGroup/FieldGroup.tsx +15 -11
  221. package/templates/react-sdk-reference/src/components/designSystemExtension/FieldGroupList/FieldGroupList.tsx +7 -7
  222. package/templates/react-sdk-reference/src/components/designSystemExtension/FieldValueList/FieldValueList.tsx +18 -12
  223. package/templates/react-sdk-reference/src/components/designSystemExtension/Operator/Operator.tsx +27 -25
  224. package/templates/react-sdk-reference/src/components/designSystemExtension/Pulse/Pulse.tsx +4 -4
  225. package/templates/react-sdk-reference/src/components/designSystemExtension/RichTextEditor/RichTextEditor.tsx +8 -40
  226. package/templates/react-sdk-reference/src/components/designSystemExtension/WssQuickCreate/WssQuickCreate.tsx +9 -9
  227. package/templates/react-sdk-reference/src/components/field/AutoComplete/AutoComplete.tsx +26 -20
  228. package/templates/react-sdk-reference/src/components/field/CancelAlert/CancelAlert.tsx +35 -17
  229. package/templates/react-sdk-reference/src/components/field/Checkbox/Checkbox.tsx +27 -25
  230. package/templates/react-sdk-reference/src/components/field/Currency/Currency.tsx +10 -6
  231. package/templates/react-sdk-reference/src/components/field/Currency/currency-utils.ts +1 -1
  232. package/templates/react-sdk-reference/src/components/field/Date/Date.tsx +20 -7
  233. package/templates/react-sdk-reference/src/components/field/DateTime/DateTime.tsx +23 -8
  234. package/templates/react-sdk-reference/src/components/field/Decimal/Decimal.tsx +5 -5
  235. package/templates/react-sdk-reference/src/components/field/Dropdown/Dropdown.tsx +45 -25
  236. package/templates/react-sdk-reference/src/components/field/Email/Email.tsx +8 -8
  237. package/templates/react-sdk-reference/src/components/field/Group/Group.tsx +1 -1
  238. package/templates/react-sdk-reference/src/components/field/Integer/Integer.tsx +5 -5
  239. package/templates/react-sdk-reference/src/components/field/Location/Location.tsx +21 -16
  240. package/templates/react-sdk-reference/src/components/field/Multiselect/Multiselect.tsx +42 -27
  241. package/templates/react-sdk-reference/src/components/field/Multiselect/utils.ts +43 -29
  242. package/templates/react-sdk-reference/src/components/field/ObjectReference/ObjectReference.tsx +53 -30
  243. package/templates/react-sdk-reference/src/components/field/ObjectReference/utils.ts +12 -11
  244. package/templates/react-sdk-reference/src/components/field/Percentage/Percentage.tsx +6 -6
  245. package/templates/react-sdk-reference/src/components/field/Phone/Phone.tsx +12 -12
  246. package/templates/react-sdk-reference/src/components/field/RadioButtons/RadioButtons.tsx +38 -16
  247. package/templates/react-sdk-reference/src/components/field/RichText/RichText.tsx +17 -4
  248. package/templates/react-sdk-reference/src/components/field/ScalarList/ScalarList.tsx +5 -5
  249. package/templates/react-sdk-reference/src/components/field/SelectableCard/SelectableCard.tsx +31 -18
  250. package/templates/react-sdk-reference/src/components/field/SelectableCard/utils.tsx +28 -20
  251. package/templates/react-sdk-reference/src/components/field/SemanticLink/SemanticLink.tsx +28 -19
  252. package/templates/react-sdk-reference/src/components/field/SemanticLink/utils.ts +3 -1
  253. package/templates/react-sdk-reference/src/components/field/TextArea/TextArea.tsx +4 -4
  254. package/templates/react-sdk-reference/src/components/field/TextInput/TextInput.tsx +4 -4
  255. package/templates/react-sdk-reference/src/components/field/Time/Time.tsx +20 -7
  256. package/templates/react-sdk-reference/src/components/field/URL/URL.tsx +7 -7
  257. package/templates/react-sdk-reference/src/components/field/UserReference/UserReference.tsx +14 -14
  258. package/templates/react-sdk-reference/src/components/field/UserReference/UserReferenceUtils.ts +2 -2
  259. package/templates/react-sdk-reference/src/components/helpers/case-utils.tsx +5 -5
  260. package/templates/react-sdk-reference/src/components/helpers/data_page.ts +3 -3
  261. package/templates/react-sdk-reference/src/components/helpers/date-format-utils.ts +5 -5
  262. package/templates/react-sdk-reference/src/components/helpers/field-group-utils.ts +2 -7
  263. package/templates/react-sdk-reference/src/components/helpers/formatters/Boolean.ts +9 -3
  264. package/templates/react-sdk-reference/src/components/helpers/formatters/Currency.ts +18 -6
  265. package/templates/react-sdk-reference/src/components/helpers/formatters/CurrencyMap.ts +168 -168
  266. package/templates/react-sdk-reference/src/components/helpers/formatters/Date.ts +5 -5
  267. package/templates/react-sdk-reference/src/components/helpers/formatters/index.ts +8 -5
  268. package/templates/react-sdk-reference/src/components/helpers/instructions-utils.ts +2 -2
  269. package/templates/react-sdk-reference/src/components/helpers/simpleTableHelpers.ts +54 -30
  270. package/templates/react-sdk-reference/src/components/helpers/state-utils.tsx +5 -2
  271. package/templates/react-sdk-reference/src/components/helpers/template-utils.ts +5 -4
  272. package/templates/react-sdk-reference/src/components/helpers/utils.ts +3 -3
  273. package/templates/react-sdk-reference/src/components/helpers/versionHelpers.ts +3 -1
  274. package/templates/react-sdk-reference/src/components/index.ts +1 -4
  275. package/templates/react-sdk-reference/src/components/template/AdvancedSearch/AdvancedSearch.tsx +18 -10
  276. package/templates/react-sdk-reference/src/components/template/AdvancedSearch/SearchGroup/persistUtils.ts +3 -3
  277. package/templates/react-sdk-reference/src/components/template/AdvancedSearch/SearchGroups/SearchGroups.tsx +26 -90
  278. package/templates/react-sdk-reference/src/components/template/AdvancedSearch/SearchGroups/hooks.ts +8 -5
  279. package/templates/react-sdk-reference/src/components/template/AdvancedSearch/SearchGroups/utils.ts +8 -4
  280. package/templates/react-sdk-reference/src/components/template/AdvancedSearch/TemplateContext.ts +1 -1
  281. package/templates/react-sdk-reference/src/components/template/AppShell/AppShell.tsx +28 -19
  282. package/templates/react-sdk-reference/src/components/template/BannerPage/BannerPage.tsx +2 -2
  283. package/templates/react-sdk-reference/src/components/template/CaseSummary/CaseSummary.tsx +5 -5
  284. package/templates/react-sdk-reference/src/components/template/CaseView/CaseView.tsx +35 -16
  285. package/templates/react-sdk-reference/src/components/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +10 -10
  286. package/templates/react-sdk-reference/src/components/template/Confirmation/Confirmation.tsx +12 -26
  287. package/templates/react-sdk-reference/src/components/template/DataReference/DataReference.tsx +41 -124
  288. package/templates/react-sdk-reference/src/components/template/DataReference/DataReferenceAdvancedSearchContext.ts +2 -2
  289. package/templates/react-sdk-reference/src/components/template/DataReference/SearchForm.tsx +18 -78
  290. package/templates/react-sdk-reference/src/components/template/DataReference/utils.ts +18 -12
  291. package/templates/react-sdk-reference/src/components/template/DefaultForm/DefaultForm.tsx +4 -12
  292. package/templates/react-sdk-reference/src/components/template/DefaultForm/utils/index.ts +3 -3
  293. package/templates/react-sdk-reference/src/components/template/DefaultPage/DefaultPage.tsx +3 -3
  294. package/templates/react-sdk-reference/src/components/template/Details/Details/Details.tsx +6 -8
  295. package/templates/react-sdk-reference/src/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.tsx +7 -14
  296. package/templates/react-sdk-reference/src/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.tsx +7 -14
  297. package/templates/react-sdk-reference/src/components/template/Details/DynamicTabs/DynamicTabs.tsx +16 -8
  298. package/templates/react-sdk-reference/src/components/template/FieldGroupTemplate/FieldGroupTemplate.tsx +7 -4
  299. package/templates/react-sdk-reference/src/components/template/HierarchicalForm/HierarchicalForm.tsx +20 -5
  300. package/templates/react-sdk-reference/src/components/template/HierarchicalForm/hooks.ts +35 -77
  301. package/templates/react-sdk-reference/src/components/template/InlineDashboard/InlineDashboard.tsx +10 -10
  302. package/templates/react-sdk-reference/src/components/template/ListView/DefaultViewMeta.ts +31 -31
  303. package/templates/react-sdk-reference/src/components/template/ListView/ListView.tsx +173 -133
  304. package/templates/react-sdk-reference/src/components/template/ListView/hooks.ts +17 -10
  305. package/templates/react-sdk-reference/src/components/template/ListView/utils.ts +64 -51
  306. package/templates/react-sdk-reference/src/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.tsx +6 -6
  307. package/templates/react-sdk-reference/src/components/template/NarrowWide/NarrowWide/NarrowWide.tsx +6 -6
  308. package/templates/react-sdk-reference/src/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.tsx +8 -18
  309. package/templates/react-sdk-reference/src/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.tsx +3 -3
  310. package/templates/react-sdk-reference/src/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.tsx +7 -1
  311. package/templates/react-sdk-reference/src/components/template/OneColumn/OneColumn/OneColumn.tsx +3 -3
  312. package/templates/react-sdk-reference/src/components/template/OneColumn/OneColumnTab/OneColumnTab.tsx +1 -1
  313. package/templates/react-sdk-reference/src/components/template/PromotedFilters/PromotedFilters.tsx +13 -40
  314. package/templates/react-sdk-reference/src/components/template/SelfServiceCaseView/SelfServiceCaseView.tsx +19 -16
  315. package/templates/react-sdk-reference/src/components/template/SimpleTable/SimpleTable/SimpleTable.tsx +8 -7
  316. package/templates/react-sdk-reference/src/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx +84 -203
  317. package/templates/react-sdk-reference/src/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.tsx +15 -5
  318. package/templates/react-sdk-reference/src/components/template/SimpleTable/SimpleTableSelectReadonly/SimpleTableSelectReadonly.tsx +15 -29
  319. package/templates/react-sdk-reference/src/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +7 -7
  320. package/templates/react-sdk-reference/src/components/template/SubTabs/SubTabs.tsx +1 -1
  321. package/templates/react-sdk-reference/src/components/template/SubTabs/tabUtils.ts +13 -11
  322. package/templates/react-sdk-reference/src/components/template/TwoColumn/TwoColumn/TwoColumn.tsx +3 -3
  323. package/templates/react-sdk-reference/src/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.tsx +3 -3
  324. package/templates/react-sdk-reference/src/components/template/WideNarrow/WideNarrow/WideNarrow.tsx +6 -6
  325. package/templates/react-sdk-reference/src/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.tsx +13 -24
  326. package/templates/react-sdk-reference/src/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.tsx +3 -3
  327. package/templates/react-sdk-reference/src/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.tsx +7 -1
  328. package/templates/react-sdk-reference/src/components/template/WssNavBar/WssNavBar.tsx +25 -25
  329. package/templates/react-sdk-reference/src/components/template/utils.tsx +6 -6
  330. package/templates/react-sdk-reference/src/components/widget/AppAnnouncement/AppAnnouncement.tsx +9 -9
  331. package/templates/react-sdk-reference/src/components/widget/Attachment/Attachment.tsx +125 -79
  332. package/templates/react-sdk-reference/src/components/widget/Attachment/AttachmentUtils.ts +58 -33
  333. package/templates/react-sdk-reference/src/components/widget/CaseHistory/CaseHistory.tsx +14 -12
  334. package/templates/react-sdk-reference/src/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx +19 -7
  335. package/templates/react-sdk-reference/src/components/widget/FileUtility/FileUtility/FileUtility.tsx +137 -107
  336. package/templates/react-sdk-reference/src/components/widget/Followers/Followers.tsx +4 -4
  337. package/templates/react-sdk-reference/src/components/widget/QuickCreate/QuickCreate.tsx +15 -11
  338. package/templates/react-sdk-reference/src/components/widget/SummaryItem/SummaryItem.tsx +25 -18
  339. package/templates/react-sdk-reference/src/components/widget/SummaryList/SummaryList.tsx +7 -2
  340. package/templates/react-sdk-reference/src/components/widget/ToDo/ToDo.tsx +30 -116
  341. package/templates/react-sdk-reference/src/main.tsx +1 -1
  342. package/templates/react-sdk-reference/tsconfig.json +2 -1
  343. package/templates/react-sdk-reference/vite.config.ts +51 -26
  344. package/templates/wc-sdk-reference/package.json +3 -3
  345. package/templates/wc-sdk-reference/src/index.ts +10 -10
  346. package/templates/wc-sdk-reference/tsconfig.json +1 -0
@@ -11,9 +11,12 @@ Read the user's message carefully. Extract:
11
11
  - **Output base path** — the folder where template components should be generated (e.g. `src/components/template/`)
12
12
  - **Component list** — which templates to generate (default: all 32 listed below)
13
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.
14
+ Both **design system** and **output base path** are required. If either is missing or ambiguous, you MUST stop and ask the user before proceeding. Do not infer any value from the project structure, `.instructions.md` files, existing folders, or any other source.
15
+
16
+ ⛔ **STOP** — If the user's message does not explicitly state BOTH the design system AND the output path, ask for the missing items now. Do not proceed to Step 1 until you have explicit answers from the user for all required inputs.
15
17
 
16
18
  Example questions (ask only the ones that are actually missing):
19
+
17
20
  1. Which design system should I use? (e.g. Ant Design, Chakra UI, Carbon, Radix UI)
18
21
  2. Where should the template components be generated? (e.g. `src/components/template/`)
19
22
 
@@ -25,40 +28,40 @@ Once both are known, continue to Step 1.
25
28
 
26
29
  ### Full component list (default — 32 templates)
27
30
 
28
- | Component | Category |
29
- |---|---|
30
- | AdvancedSearch | Page |
31
- | AppShell | Page |
32
- | BannerPage | Page |
33
- | CaseSummary | Page |
34
- | CaseView | Page |
35
- | CaseViewActionsMenu | Widget |
36
- | Confirmation | Page |
37
- | DataReference | Form |
38
- | DefaultForm | Form |
39
- | DefaultPage | Page |
40
- | Details | Layout |
41
- | DetailsSubTabs | Layout |
42
- | DetailsThreeColumn | Layout |
43
- | DetailsTwoColumn | Layout |
44
- | DynamicTabs | Navigation |
45
- | FieldGroupTemplate | Form |
46
- | HierarchicalForm | Form |
47
- | InlineDashboard | Page |
48
- | InlineDashboardPage | Page |
49
- | ListPage | Page |
50
- | ListView | Page |
51
- | MultiReferenceReadOnly | Display |
52
- | NarrowWide | Layout |
53
- | OneColumn | Layout |
54
- | PromotedFilters | Widget |
55
- | SelfServiceCaseView | Page |
56
- | SimpleTable | Table |
57
- | SingleReferenceReadOnly | Display |
58
- | SubTabs | Navigation |
59
- | TwoColumn | Layout |
60
- | WideNarrow | Layout |
61
- | WssNavBar | Navigation |
31
+ | Component | Category |
32
+ | ----------------------- | ---------- |
33
+ | AdvancedSearch | Page |
34
+ | AppShell | Page |
35
+ | BannerPage | Page |
36
+ | CaseSummary | Page |
37
+ | CaseView | Page |
38
+ | CaseViewActionsMenu | Widget |
39
+ | Confirmation | Page |
40
+ | DataReference | Form |
41
+ | DefaultForm | Form |
42
+ | DefaultPage | Page |
43
+ | Details | Layout |
44
+ | DetailsSubTabs | Layout |
45
+ | DetailsThreeColumn | Layout |
46
+ | DetailsTwoColumn | Layout |
47
+ | DynamicTabs | Navigation |
48
+ | FieldGroupTemplate | Form |
49
+ | HierarchicalForm | Form |
50
+ | InlineDashboard | Page |
51
+ | InlineDashboardPage | Page |
52
+ | ListPage | Page |
53
+ | ListView | Page |
54
+ | MultiReferenceReadOnly | Display |
55
+ | NarrowWide | Layout |
56
+ | OneColumn | Layout |
57
+ | PromotedFilters | Widget |
58
+ | SelfServiceCaseView | Page |
59
+ | SimpleTable | Table |
60
+ | SingleReferenceReadOnly | Display |
61
+ | SubTabs | Navigation |
62
+ | TwoColumn | Layout |
63
+ | WideNarrow | Layout |
64
+ | WssNavBar | Navigation |
62
65
 
63
66
  ---
64
67
 
@@ -67,6 +70,7 @@ Once both are known, continue to Step 1.
67
70
  Read the full contents of `.github/skills/template-components.md`.
68
71
 
69
72
  This gives you:
73
+
70
74
  - **Layout template pattern** — DS-agnostic grid skeleton with `// [DS GRID]` placeholder; `templateCol` parsing logic; responsive behavior rules
71
75
  - **Design System Adaptation section** — how to map the chosen DS's grid/flex primitive to the computed column ratios
72
76
  - **Form template pattern** — PConnect bridge via `createElement(createPConnectComponent(), ...)` and `connectToState`; no DS involved
@@ -79,19 +83,51 @@ Keep this context active throughout the entire generation session. Do not re-rea
79
83
 
80
84
  ## Step 2 — Install and discover the design system (once)
81
85
 
82
- Execute **Step 3** from `.github/prompts/add-component.prompt.md` exactly as written:
83
- - Check `package.json` for the DS package
84
- - Install if missing, including any peer dependencies
85
- - Report what was installed
86
+ ### 2a — Check and install the DS package
87
+
88
+ Run this command in your terminal:
89
+
90
+ ```bash
91
+ cat package.json | grep "<design-system-package>"
92
+ ```
86
93
 
87
- Then execute **Step 4** from `.github/prompts/add-component.prompt.md` exactly as written:
88
- - Read the DS README from `node_modules`
89
- - Discover exported layout components (Grid, Columns, Flex, SimpleGrid, etc.) from `dist/index.d.ts`
90
- - Read prop interfaces for the grid/layout components needed by layout templates
91
- - Note responsive breakpoint APIs and column sizing conventions
94
+ If the design system package is **not** listed in `dependencies` or `devDependencies`, install it:
95
+
96
+ ```bash
97
+ npm install <design-system-package>
98
+ ```
99
+
100
+ Also install any peer dependencies documented in the package's README. Report what was installed.
101
+
102
+ ### 2b — Discover the DS layout API from installed files
92
103
 
93
104
  > You only need layout-related DS components. Form and page templates do not use the DS.
94
105
 
106
+ Run these commands to discover the actual API (do NOT rely on training knowledge):
107
+
108
+ 1. Read the README for correct import paths and usage patterns:
109
+
110
+ ```bash
111
+ cat node_modules/<designSystem>/README.md
112
+ ```
113
+
114
+ 2. List every exported component — focus on layout primitives (Grid, Columns, Flex, SimpleGrid, Row, Col):
115
+
116
+ ```bash
117
+ 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"
118
+ ```
119
+
120
+ 3. For every grid/layout component you plan to use, read its prop interface:
121
+
122
+ ```bash
123
+ find node_modules/<designSystem> -name "Grid.d.ts" -o -name "Col.d.ts" -o -name "Flex.d.ts" | head -5
124
+ grep -A 40 "interface.*Props" <path-from-above>
125
+ ```
126
+
127
+ 4. Note **responsive breakpoint APIs** and **column sizing conventions** (e.g., 12-column grid, fractional units, span props).
128
+
129
+ Only use component names and prop names confirmed in these files.
130
+
95
131
  Build a **DS layout API reference** from this discovery. Reuse it for every layout template — do not repeat these commands per component.
96
132
 
97
133
  ---
@@ -101,7 +137,9 @@ Build a **DS layout API reference** from this discovery. Reuse it for every layo
101
137
  For each component in the list, check whether `<outputPath>/<ComponentName>/<ComponentName>.tsx` already exists.
102
138
 
103
139
  If **any** exist, report them all at once and ask:
140
+
104
141
  > "The following N components already exist: [list]. How should I proceed?
142
+ >
105
143
  > - **Overwrite all** — replace all existing implementations
106
144
  > - **Skip existing** — only generate components that don't exist yet
107
145
  > - **Cancel** — stop without generating anything"
@@ -114,43 +152,78 @@ Wait for the user's answer before proceeding. If none exist, continue immediatel
114
152
 
115
153
  For each component in the resolved list (in the order listed in Step 0):
116
154
 
117
- ### 4a — Read the component-specific skill file
118
- Execute **Step 2** from `.github/prompts/add-component.prompt.md` for this component:
119
- - Read `.github/skills/template-skills/<ComponentName>.md` fully
120
- - Identify the template category from the skill file:
121
- - **Layout** — uses DS grid primitives from Step 2's API reference
122
- - **Form** — uses PConnect bridge + CSS classes; ignore DS
123
- - **Page** — uses region extraction + PConnect bridge; ignore DS
124
- - Pay attention to Behavioral Contract, sub-variants, and any Design System Mapping table
155
+ ### 4a — Read the component-specific skill file (MANDATORY — do not skip)
156
+
157
+ Read the file `.github/skills/template-skills/<ComponentName>.md` using your file reading tool. This step is **required** for every component — do not rely solely on the general `template-components.md`.
158
+
159
+ After reading, extract and keep active:
160
+
161
+ - **Template category** — Layout (uses DS grid from Step 2) | Form (PConnect bridge + CSS) | Page (region extraction + PConnect bridge)
162
+ - **Behavioral Contract** — sub-variants, region handling, slot rendering logic
163
+ - **Design System Mapping** table — the recommended DS layout primitive (for Layout templates only)
164
+
165
+ If no skill file exists at that path, use the general pattern from `template-components.md` loaded in Step 1.
166
+
167
+ ⚠️ The general skill file (`template-components.md`) provides the pattern skeletons. The component-specific skill file provides the **exact region structure, sub-variant keys, and rendering logic**. Both are needed — generating from only the general skill will produce templates with wrong region counts or missing sub-variant registrations.
125
168
 
126
169
  ### 4b — Generate the component files
127
- Execute **Step 5** from `.github/prompts/add-component.prompt.md` for this component:
128
- - Create `<outputPath>/<ComponentName>/` directory
129
- - Create `<ComponentName>.tsx` using:
130
- - **Layout templates**: DS-agnostic skeleton from `template-components.md` with the `// [DS GRID]` section filled in using DS layout API confirmed in Step 2
131
- - **Form/Page templates**: PConnect bridge pattern from `template-components.md`; no DS primitives
132
- - Behavioral Contract from the component skill file
133
- - Create `index.tsx` if required by the skill file:
134
- ```typescript
135
- export { default } from './<ComponentName>';
136
- ```
137
- - Create any CSS file required by the skill file (e.g., `DefaultForm.css` with grid classes)
170
+
171
+ Create the directory `<outputPath>/<ComponentName>/`.
172
+
173
+ Create `<ComponentName>.tsx` using the structure matching the template category from `template-components.md` (loaded in Step 1):
174
+
175
+ - **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.
176
+ - **Form**: `createElement(createPConnectComponent(), ...)` for each child from `getPConnect().getChildren()[0].getPConnect().getChildren()`. No DS primitives.
177
+ - **Page**: `createElement(createPConnectComponent(), ...)` for each region from `getPConnect().getChildren()`. No DS primitives.
178
+
179
+ Apply the Behavioral Contract from the component skill file (sub-variants, region handling, slot logic).
180
+
181
+ Create `index.tsx` if required by the skill file:
182
+
183
+ ```typescript
184
+ export { default } from './<ComponentName>';
185
+ ```
186
+
187
+ Create any CSS file required by the skill file (e.g., `DefaultForm.css` with grid classes).
138
188
 
139
189
  ### 4c — Register the component
140
- Execute **Step 6** from `.github/prompts/add-component.prompt.md` for this component:
141
- - Add the import to `src/components/component-map.ts` in the Templates section
142
- - Add the entry to `getSampleComponentMap()` under the templates comment
143
- - For sub-variants (e.g., TwoColumnPage, TwoColumnTab), register each key separately pointing to its own file or a shared implementation as specified in the skill file
144
- - Do not reorder or restructure any existing entries
145
190
 
146
- ### 4d — Report progress
191
+ Edit `src/components/component-map.ts`:
192
+
193
+ 1. Add an import at the top of the file in the **Templates** section:
194
+ ```typescript
195
+ import <ComponentName> from './template/<ComponentName>';
196
+ ```
197
+ 2. Add an entry in the return object of `getSampleComponentMap()` under the templates comment:
198
+ ```typescript
199
+ <ComponentName>,
200
+ ```
201
+ 3. For sub-variants (e.g., TwoColumnPage, TwoColumnTab), register each key separately pointing to its own file or a shared implementation as specified in the skill file.
202
+
203
+ Do not reorder or restructure any existing entries.
204
+
205
+ ### 4d — Batch checkpoint
206
+
207
+ After every **5 components**, run:
208
+
209
+ ```bash
210
+ npm run build
211
+ ```
212
+
213
+ Fix any TypeScript or build errors before continuing to the next component. This prevents error accumulation.
214
+
215
+ ### 4e — Report progress
216
+
147
217
  After each component: "`<ComponentName>` ✓ — `<Layout | Form | Page>` template`<, using <DS component name> for grid>` if layout"
148
218
 
149
219
  ---
150
220
 
151
221
  ## Step 5 — Verify the build
152
222
 
153
- Execute **Step 7** from `.github/prompts/add-component.prompt.md` exactly as written:
154
- - Run `npm run build`
155
- - Fix any TypeScript or build errors before reporting completion
156
- - Report a summary: list of all files created and all entries added to `component-map.ts`
223
+ Run:
224
+
225
+ ```bash
226
+ npm run build
227
+ ```
228
+
229
+ 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`.
@@ -11,9 +11,12 @@ Read the user's message carefully. Extract:
11
11
  - **Output base path** — the folder where widget components should be generated (e.g. `src/components/widget/`)
12
12
  - **Component list** — which widgets to generate (default: all 9 listed below)
13
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.
14
+ Both **design system** and **output base path** are required. If either is missing or ambiguous, you MUST stop and ask the user before proceeding. Do not infer any value from the project structure, `.instructions.md` files, existing folders, or any other source.
15
+
16
+ ⛔ **STOP** — If the user's message does not explicitly state BOTH the design system AND the output path, ask for the missing items now. Do not proceed to Step 1 until you have explicit answers from the user for all required inputs.
15
17
 
16
18
  Example questions (ask only the ones that are actually missing):
19
+
17
20
  1. Which design system should I use? (e.g. Ant Design, Chakra UI, Carbon, Radix UI)
18
21
  2. Where should the widget components be generated? (e.g. `src/components/widget/`)
19
22
 
@@ -23,17 +26,17 @@ Once both are known, continue to Step 1.
23
26
 
24
27
  ### Full component list (default — 9 widgets)
25
28
 
26
- | Component | Description |
27
- |---|---|
28
- | AppAnnouncement | System-wide announcements |
29
- | Attachment | File upload/download |
30
- | CaseHistory | Case audit trail |
31
- | FileUtility | File management utility |
32
- | Followers | Case followers list |
33
- | QuickCreate | Quick case creation buttons |
34
- | SummaryItem | Single summary card |
35
- | SummaryList | List of summary cards |
36
- | ToDo | Assignment worklist |
29
+ | Component | Description |
30
+ | --------------- | --------------------------- |
31
+ | AppAnnouncement | System-wide announcements |
32
+ | Attachment | File upload/download |
33
+ | CaseHistory | Case audit trail |
34
+ | FileUtility | File management utility |
35
+ | Followers | Case followers list |
36
+ | QuickCreate | Quick case creation buttons |
37
+ | SummaryItem | Single summary card |
38
+ | SummaryList | List of summary cards |
39
+ | ToDo | Assignment worklist |
37
40
 
38
41
  ---
39
42
 
@@ -42,6 +45,7 @@ Once both are known, continue to Step 1.
42
45
  Read the full contents of `.github/skills/widget-components.md`.
43
46
 
44
47
  This gives you:
48
+
45
49
  - The DS-agnostic data-fetching skeleton with `// [DS RENDER]` placeholder
46
50
  - The Design System Adaptation guide (primitive mapping table, icon discovery rules)
47
51
  - All common Pega APIs used in widgets: `PCore.getDataPageUtils()`, `PCore.getMashupApi()`, `PCore.getAttachmentUtils()`, `pConn.getCaseInfo()`, etc.
@@ -55,17 +59,52 @@ Keep this context active throughout the entire generation session. Do not re-rea
55
59
 
56
60
  ## Step 2 — Install and discover the design system (once)
57
61
 
58
- Execute **Step 3** from `.github/prompts/add-component.prompt.md` exactly as written:
59
- - Check `package.json` for the DS package
60
- - Install if missing, including any peer dependencies
61
- - Report what was installed
62
+ ### 2a — Check and install the DS package
63
+
64
+ Run this command in your terminal:
65
+
66
+ ```bash
67
+ cat package.json | grep "<design-system-package>"
68
+ ```
69
+
70
+ If the design system package is **not** listed in `dependencies` or `devDependencies`, install it:
71
+
72
+ ```bash
73
+ npm install <design-system-package>
74
+ ```
75
+
76
+ Also install any peer dependencies documented in the package's README. Report what was installed.
77
+
78
+ ### 2b — Discover the DS API from installed files
79
+
80
+ Run these commands to discover the actual API (do NOT rely on training knowledge):
81
+
82
+ 1. Read the README for correct import paths and usage patterns:
62
83
 
63
- Then execute **Step 4** from `.github/prompts/add-component.prompt.md` exactly as written:
64
- - Read the DS README from `node_modules`
65
- - Discover exported components from `dist/index.d.ts`
66
- - Focus on presentation primitives used in widgets: Card, List, Table, Button, Badge, Spinner, Skeleton, Empty state
67
- - Read prop interfaces for these components from `.d.ts` files
68
- - If the DS has a companion icon package, discover its exports
84
+ ```bash
85
+ cat node_modules/<designSystem>/README.md
86
+ ```
87
+
88
+ 2. List every exported component:
89
+
90
+ ```bash
91
+ 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"
92
+ ```
93
+
94
+ 3. For every component you plan to use (Card, List, Table, Button, Badge, Spinner), read its prop interface:
95
+
96
+ ```bash
97
+ find node_modules/<designSystem> -name "ComponentName.d.ts" | head -3
98
+ grep -A 40 "interface.*Props" <path-from-above>
99
+ ```
100
+
101
+ 4. Check for a **companion icon package** — if it exists, read its exports before using any icon name. Never guess icon names.
102
+
103
+ 5. Check for **size/variant conventions** — use built-in props rather than custom padding.
104
+
105
+ 6. Check for **CSS tokens** — use design system CSS custom properties for spacing; never hardcode `px` values.
106
+
107
+ Only use component names and prop names confirmed in these files.
69
108
 
70
109
  Build a **DS UI primitive reference map** from this discovery. Reuse it for every widget — do not repeat these commands per component.
71
110
 
@@ -76,7 +115,9 @@ Build a **DS UI primitive reference map** from this discovery. Reuse it for ever
76
115
  For each component in the list, check whether `<outputPath>/<ComponentName>/<ComponentName>.tsx` already exists.
77
116
 
78
117
  If **any** exist, report them all at once and ask:
118
+
79
119
  > "The following N components already exist: [list]. How should I proceed?
120
+ >
80
121
  > - **Overwrite all** — replace all existing implementations
81
122
  > - **Skip existing** — only generate components that don't exist yet
82
123
  > - **Cancel** — stop without generating anything"
@@ -89,41 +130,79 @@ Wait for the user's answer before proceeding. If none exist, continue immediatel
89
130
 
90
131
  For each component in the resolved list (in the order listed in Step 0):
91
132
 
92
- ### 4a — Read the component-specific skill file
93
- Execute **Step 2** from `.github/prompts/add-component.prompt.md` for this component:
94
- - Read `.github/skills/widget-skills/<ComponentName>.md` fully if it exists
95
- - Pay attention to:
96
- - **Behavioral Contract** — data fetching logic, PCore API calls, state management, action handlers
97
- - **Design System Mapping** table — the recommended DS component for presentation
98
- - If no skill file exists (e.g., `SummaryList`), use the general data-fetching pattern from `widget-components.md`
133
+ ### 4a — Read the component-specific skill file (MANDATORY — do not skip)
134
+
135
+ Read the file `.github/skills/widget-skills/<ComponentName>.md` using your file reading tool. This step is **required** for every component that has a skill file — do not rely solely on the general `widget-components.md`.
136
+
137
+ After reading, extract and keep active:
138
+
139
+ - **Behavioral Contract** — the exact PCore API calls, state variables, event handlers, and edge cases specific to this widget
140
+ - **Design System Mapping** table — the recommended DS primitive for this component's presentation layer
141
+ - **Props interface** — any required/optional props beyond the base `PConnProps`
142
+
143
+ 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.
144
+
145
+ ⚠️ The general skill file (`widget-components.md`) provides the skeleton. The component-specific skill file provides the **exact data flow and behavioral logic**. Both are needed — generating from only the general skill will produce components that render but don't fetch or display data correctly.
99
146
 
100
147
  ### 4b — Generate the component files
101
- Execute **Step 5** from `.github/prompts/add-component.prompt.md` for this component:
102
- - Create `<outputPath>/<ComponentName>/` directory
103
- - Create `<ComponentName>.tsx` using:
104
- - The DS-agnostic data-fetching skeleton from `widget-components.md` (read in Step 1)
105
- - The Behavioral Contract from the component skill file (PCore API calls, state, actions)
106
- - The DS UI primitives confirmed in Step 2 (from the DS primitive reference map — no new terminal commands needed) filling in the `// [DS RENDER]` section
107
- - Create `index.tsx` if required by the skill file:
108
- ```typescript
109
- export { default } from './<ComponentName>';
110
- ```
111
- - Create any CSS or utility files required by the skill file
148
+
149
+ Create the directory `<outputPath>/<ComponentName>/`.
150
+
151
+ Create `<ComponentName>.tsx` using this structure from `widget-components.md` (loaded in Step 1):
152
+
153
+ 1. Imports (React hooks + DS components from Step 2 + `PConnProps` from `@pega/sdk-react`)
154
+ 2. Interface extending PConnProps with props from the component skill file's Props table
155
+ 3. Component function: destructure `getPConnect`, call `getPConnect()` to get `pConn`
156
+ 4. `useEffect` → data fetch using the exact PCore API call from the skill file's Behavioral Contract
157
+ 5. Return → DS Card/List/Table primitive from Step 2 API map, rendering the fetched data
158
+
159
+ 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.
160
+
161
+ Create `index.tsx`:
162
+
163
+ ```typescript
164
+ export { default } from './<ComponentName>';
165
+ ```
166
+
167
+ Create any CSS or utility files required by the skill file.
112
168
 
113
169
  ### 4c — Register the component
114
- Execute **Step 6** from `.github/prompts/add-component.prompt.md` for this component:
115
- - Add the import to `src/components/component-map.ts` in the Widgets section
116
- - Add the entry to `getSampleComponentMap()` under the widgets comment
117
- - Do not reorder or restructure any existing entries
118
170
 
119
- ### 4d — Report progress
171
+ Edit `src/components/component-map.ts`:
172
+
173
+ 1. Add an import at the top of the file in the **Widgets** section:
174
+ ```typescript
175
+ import <ComponentName> from './widget/<ComponentName>';
176
+ ```
177
+ 2. Add an entry in the return object of `getSampleComponentMap()` under the widgets comment:
178
+ ```typescript
179
+ <ComponentName>,
180
+ ```
181
+
182
+ Do not reorder or restructure any existing entries.
183
+
184
+ ### 4d — Batch checkpoint
185
+
186
+ After every **5 components**, run:
187
+
188
+ ```bash
189
+ npm run build
190
+ ```
191
+
192
+ Fix any TypeScript or build errors before continuing to the next component. This prevents error accumulation.
193
+
194
+ ### 4e — Report progress
195
+
120
196
  After each component: "`<ComponentName>` ✓ — using `<DS card/list primitive>`"
121
197
 
122
198
  ---
123
199
 
124
200
  ## Step 5 — Verify the build
125
201
 
126
- Execute **Step 7** from `.github/prompts/add-component.prompt.md` exactly as written:
127
- - Run `npm run build`
128
- - Fix any TypeScript or build errors before reporting completion
129
- - Report a summary: list of all files created and all entries added to `component-map.ts`
202
+ Run:
203
+
204
+ ```bash
205
+ npm run build
206
+ ```
207
+
208
+ 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`.