@pega/sdk 0.0.13 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -6
- package/dist/index.js +50 -24
- package/package.json +42 -3
- package/templates/angular-sdk-reference/extra-webpack.config.cjs +23 -0
- package/templates/angular-sdk-reference/index.html +12 -0
- package/templates/angular-sdk-reference/src/app/pconnect-renderer.component.ts +153 -0
- package/templates/angular-sdk-reference/src/components/component-map.ts +90 -0
- package/templates/angular-sdk-reference/src/components/fields/auto-complete/auto-complete.component.ts +304 -0
- package/templates/angular-sdk-reference/src/components/fields/checkbox/checkbox.component.ts +89 -0
- package/templates/angular-sdk-reference/src/components/fields/currency/currency.component.ts +112 -0
- package/templates/angular-sdk-reference/src/components/fields/date-input/date-input.component.ts +101 -0
- package/templates/angular-sdk-reference/src/components/fields/dropdown/dropdown.component.ts +118 -0
- package/templates/angular-sdk-reference/src/components/fields/email/email.component.ts +104 -0
- package/templates/angular-sdk-reference/src/components/fields/integer/integer.component.ts +106 -0
- package/templates/angular-sdk-reference/src/components/fields/phone/phone.component.ts +104 -0
- package/templates/angular-sdk-reference/src/components/fields/radio-buttons/radio-buttons.component.ts +113 -0
- package/templates/angular-sdk-reference/src/components/fields/text-area/text-area.component.ts +111 -0
- package/templates/angular-sdk-reference/src/components/fields/text-input/text-input.component.ts +110 -0
- package/templates/angular-sdk-reference/src/components/fields/url-input/url-input.component.ts +113 -0
- package/templates/angular-sdk-reference/src/components/helpers/sdk-helpers.ts +93 -0
- package/templates/angular-sdk-reference/src/components/infra/assignment/assignment.component.ts +206 -0
- package/templates/angular-sdk-reference/src/components/infra/case-summary/case-summary.component.ts +75 -0
- package/templates/angular-sdk-reference/src/components/infra/case-view/case-view.component.ts +126 -0
- package/templates/angular-sdk-reference/src/components/infra/flow-container/flow-container.component.ts +411 -0
- package/templates/angular-sdk-reference/src/components/infra/reference/reference.component.ts +158 -0
- package/templates/angular-sdk-reference/src/components/infra/region/region.component.ts +39 -0
- package/templates/angular-sdk-reference/src/components/infra/root-container/root-container.component.ts +199 -0
- package/templates/angular-sdk-reference/src/components/infra/stages/stages.component.ts +89 -0
- package/templates/angular-sdk-reference/src/components/infra/view/view.component.ts +144 -0
- package/templates/angular-sdk-reference/src/components/infra/view-container/view-container.component.ts +191 -0
- package/templates/angular-sdk-reference/src/components/templates/default-form/default-form.component.ts +105 -0
- package/templates/angular-sdk-reference/src/components/templates/narrow-wide/narrow-wide.component.ts +37 -0
- package/templates/angular-sdk-reference/src/components/templates/one-column/one-column.component.ts +37 -0
- package/templates/angular-sdk-reference/src/components/templates/two-column/two-column.component.ts +37 -0
- package/templates/angular-sdk-reference/src/components/templates/wide-narrow/wide-narrow.component.ts +37 -0
- package/templates/angular-sdk-reference/tsconfig.app.json +13 -0
- package/templates/react-sdk-reference/.ai-common/agents/embedded-flow-expert.md +75 -34
- package/templates/react-sdk-reference/.ai-common/agents/implementation-expert.md +74 -38
- package/templates/react-sdk-reference/.ai-common/global/ai-agent-instructions-embedded.md +33 -1
- package/templates/react-sdk-reference/.ai-common/global/ai-agent-instructions.md +57 -22
- package/templates/react-sdk-reference/.ai-common/instructions/embedded-component.md +25 -10
- package/templates/react-sdk-reference/.ai-common/prompts/add-component.md +40 -19
- package/templates/react-sdk-reference/.ai-common/prompts/component-manifest.json +62 -1
- package/templates/react-sdk-reference/.ai-common/prompts/embedded-component-manifest.md +26 -4
- package/templates/react-sdk-reference/.ai-common/prompts/generate-all-components.md +84 -33
- package/templates/react-sdk-reference/.ai-common/prompts/generate-dse-components.md +46 -26
- package/templates/react-sdk-reference/.ai-common/prompts/generate-embedded-components.md +28 -15
- package/templates/react-sdk-reference/.ai-common/prompts/generate-field-components.md +24 -6
- package/templates/react-sdk-reference/.ai-common/prompts/generate-infra-components.md +24 -6
- package/templates/react-sdk-reference/.ai-common/prompts/generate-template-components.md +24 -6
- package/templates/react-sdk-reference/.ai-common/prompts/generate-widget-components.md +24 -6
- package/templates/react-sdk-reference/.ai-common/prompts/identify-components.md +2 -0
- package/templates/react-sdk-reference/.ai-common/prompts/replace-design-system.md +44 -17
- package/templates/react-sdk-reference/.ai-common/skills/connect-pega-server.md +14 -1
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/AssignmentHeader.md +79 -0
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension-skills/Toast.md +96 -0
- package/templates/react-sdk-reference/.ai-common/skills/design-system-extension.md +56 -35
- package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/analyze-customer-repo.md +29 -3
- package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/run-and-verify-integration.md +97 -37
- package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/wire-integration.md +91 -60
- package/templates/react-sdk-reference/.ai-common/skills/field-components.md +88 -30
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/AutoComplete.md +133 -101
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/EmbeddedData.md +385 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/EmbeddedDataMulti.md +506 -0
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/ObjectReference.md +549 -86
- package/templates/react-sdk-reference/.ai-common/skills/field-skills/UserReference.md +181 -83
- package/templates/react-sdk-reference/.ai-common/skills/infra-components.md +13 -1
- package/templates/react-sdk-reference/.ai-common/skills/portal-flow/run-and-verify-portal.md +290 -0
- package/templates/react-sdk-reference/.ai-common/skills/template-components.md +13 -1
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/ListView.md +125 -153
- package/templates/react-sdk-reference/.ai-common/skills/template-skills/SimpleTable.md +90 -81
- package/templates/react-sdk-reference/.ai-common/skills/widget-components.md +13 -1
- package/templates/react-sdk-reference/assets/icons/trash.svg +3 -0
- package/templates/react-sdk-reference/index.html +0 -1
- package/templates/react-sdk-reference/package.json +2 -2
- package/templates/react-sdk-reference/package.minimal.json +2 -2
- package/templates/react-sdk-reference/sdk-config.json +3 -3
- package/templates/react-sdk-reference/src/FallbackComponent.tsx +1 -1
- package/templates/react-sdk-reference/src/MashupApp.tsx +33 -78
- package/templates/react-sdk-reference/src/PortalApp.tsx +23 -100
- package/templates/react-sdk-reference/src/components/component-map.ts +15 -1
- package/templates/react-sdk-reference/src/components/designSystemExtension/AssignmentHeader/AssignmentHeader.tsx +15 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/AssignmentHeader/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/FieldGroup/FieldGroup.tsx +1 -1
- package/templates/react-sdk-reference/src/components/designSystemExtension/FieldGroupList/FieldGroupList.tsx +1 -1
- package/templates/react-sdk-reference/src/components/designSystemExtension/FieldValueList/FieldValueList.tsx +16 -4
- package/templates/react-sdk-reference/src/components/designSystemExtension/ModalDialog/ModalDialog.tsx +26 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/ModalDialog/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/Toast/Toast.tsx +35 -0
- package/templates/react-sdk-reference/src/components/designSystemExtension/Toast/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/AutoComplete/AutoComplete.tsx +362 -24
- package/templates/react-sdk-reference/src/components/field/CancelAlert/CancelAlert.tsx +1 -1
- package/templates/react-sdk-reference/src/components/field/Checkbox/Checkbox.tsx +3 -1
- package/templates/react-sdk-reference/src/components/field/Currency/Currency.tsx +6 -3
- package/templates/react-sdk-reference/src/components/field/Date/Date.tsx +2 -1
- package/templates/react-sdk-reference/src/components/field/DateTime/DateTime.tsx +2 -1
- package/templates/react-sdk-reference/src/components/field/Decimal/Decimal.tsx +4 -3
- package/templates/react-sdk-reference/src/components/field/Dropdown/Dropdown.tsx +2 -0
- package/templates/react-sdk-reference/src/components/field/Email/Email.tsx +2 -1
- package/templates/react-sdk-reference/src/components/field/EmbeddedDataMulti/EmbeddedDataMulti.tsx +121 -0
- package/templates/react-sdk-reference/src/components/field/EmbeddedDataMulti/config-ext.json +7 -0
- package/templates/react-sdk-reference/src/components/field/EmbeddedDataMulti/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/field/Integer/Integer.tsx +2 -1
- package/templates/react-sdk-reference/src/components/field/Location/Location.tsx +1 -1
- package/templates/react-sdk-reference/src/components/field/Multiselect/Multiselect.tsx +40 -20
- package/templates/react-sdk-reference/src/components/field/ObjectReference/ObjectReference.tsx +554 -49
- package/templates/react-sdk-reference/src/components/field/ObjectReference/utils.ts +111 -20
- package/templates/react-sdk-reference/src/components/field/Percentage/Percentage.tsx +4 -3
- package/templates/react-sdk-reference/src/components/field/Phone/Phone.tsx +2 -1
- package/templates/react-sdk-reference/src/components/field/SelectableCard/SelectableCard.tsx +2 -1
- package/templates/react-sdk-reference/src/components/field/TextArea/TextArea.tsx +2 -1
- package/templates/react-sdk-reference/src/components/field/TextInput/TextInput.tsx +2 -1
- package/templates/react-sdk-reference/src/components/field/Time/Time.tsx +2 -1
- package/templates/react-sdk-reference/src/components/field/URL/URL.tsx +2 -1
- package/templates/react-sdk-reference/src/components/field/UserReference/UserReference.tsx +1 -1
- package/templates/react-sdk-reference/src/components/helpers/field-utils.ts +44 -0
- package/templates/react-sdk-reference/src/components/helpers/simpleTableHelpers.ts +19 -7
- package/templates/react-sdk-reference/src/components/infra/ModalViewContainer/DataViewActionButtons/DataViewActionButtons.tsx +97 -0
- package/templates/react-sdk-reference/src/components/infra/ModalViewContainer/DataViewActionButtons/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/infra/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.tsx +53 -0
- package/templates/react-sdk-reference/src/components/infra/ModalViewContainer/ListViewActionButtons/index.tsx +1 -0
- package/templates/react-sdk-reference/src/components/template/AdvancedSearch/SearchGroups/SearchGroups.tsx +2 -2
- package/templates/react-sdk-reference/src/components/template/CaseSummary/CaseSummary.tsx +3 -1
- package/templates/react-sdk-reference/src/components/template/DataReference/SearchForm.tsx +4 -4
- package/templates/react-sdk-reference/src/components/template/HierarchicalForm/HierarchicalForm.tsx +2 -2
- package/templates/react-sdk-reference/src/components/template/InlineDashboard/InlineDashboard.tsx +1 -1
- package/templates/react-sdk-reference/src/components/template/ListView/ListView.tsx +7 -3
- package/templates/react-sdk-reference/src/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx +173 -99
- package/templates/react-sdk-reference/src/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.tsx +63 -56
- package/templates/react-sdk-reference/src/components/widget/ToDo/ToDo.tsx +1 -1
- package/templates/react-sdk-reference/vite.config.ts +26 -4
- package/templates/react-sdk-reference/.ai-common/instructions/dse-component.md +0 -47
- package/templates/react-sdk-reference/.ai-common/instructions/field-component.md +0 -50
- package/templates/react-sdk-reference/.ai-common/instructions/infra-component.md +0 -76
- package/templates/react-sdk-reference/.ai-common/instructions/template-component.md +0 -43
- package/templates/react-sdk-reference/.ai-common/instructions/widget-component.md +0 -45
- package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/authenticate.md +0 -311
- package/templates/react-sdk-reference/pega-constellationjs-0.26.3-local.tgz +0 -0
- package/templates/react-sdk-reference/pega-sdk-react-0.1.0.tgz +0 -0
|
@@ -2,59 +2,71 @@
|
|
|
2
2
|
ai-description: Generate all (or a subset of) design system extension components using any design system
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
+
## Progress milestones
|
|
6
|
+
|
|
7
|
+
Announce these to the user as you reach them, in plain words and with a counter — "Step 3 of 4 — Building the components". Count only the milestones that apply to this run.
|
|
8
|
+
|
|
9
|
+
1. **Understanding your request** — Step 0
|
|
10
|
+
2. **Preparing your design system** — Steps 1 to 3
|
|
11
|
+
3. **Building the components** — Step 4, counting each component
|
|
12
|
+
4. **Checking the app builds** — Step 5
|
|
13
|
+
5. **Trying it out** — Step 6
|
|
14
|
+
|
|
5
15
|
## Step 0 — Resolve inputs
|
|
6
16
|
|
|
7
17
|
Read the user's message carefully. Extract:
|
|
8
18
|
|
|
9
19
|
- **Design system** — the UI library to use (e.g. `Ant Design`, `Chakra UI`, `Carbon`, `Radix UI`)
|
|
10
20
|
- **Output base path** — the folder where DSE components should be generated (e.g. `src/components/designSystemExtension/`)
|
|
11
|
-
- **Component list** — which components to generate (default: all
|
|
21
|
+
- **Component list** — which components to generate (default: all 13 listed below)
|
|
12
22
|
|
|
13
23
|
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, `{{AI_FILE_EXT}}` files, existing folders, or any other source.
|
|
14
24
|
|
|
15
25
|
⛔ **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.
|
|
16
26
|
|
|
17
|
-
Example questions (ask only the ones that are actually missing):
|
|
27
|
+
Ask every missing item together, in one plain message. Example questions (ask only the ones that are actually missing):
|
|
18
28
|
|
|
19
|
-
1. Which
|
|
29
|
+
1. Which style kit should I use for the screens? (A style kit is a ready-made set of buttons, inputs, and layouts.) Before asking, check the project's dependency list for UI libraries and list any you find first, marked as already in the project, then offer Ant Design, Chakra UI, Carbon, Radix UI, or another. Never choose one on the user's behalf, even when only one is installed.
|
|
20
30
|
2. Where should the DSE components be generated? (e.g. `src/components/designSystemExtension/`)
|
|
21
31
|
|
|
22
|
-
If the user specified a subset (e.g., "just AlertBanner and FieldValueList"), restrict the list accordingly.
|
|
32
|
+
If the user specified a subset (e.g., "just AlertBanner and FieldValueList"), restrict the list accordingly. The user may name components in everyday words ("error messages", "form title") — resolve each through the `aliases` and `behaviorClasses` in `{{PROMPT_DIR}}/component-manifest.json`, and confirm the resolved names with the user before continuing.
|
|
23
33
|
|
|
24
34
|
Once both are known, continue to Step 1.
|
|
25
35
|
|
|
26
|
-
### Full component list (default —
|
|
27
|
-
|
|
28
|
-
| Component | Pattern
|
|
29
|
-
| ----------------- |
|
|
30
|
-
| AlertBanner | B — Pure display
|
|
31
|
-
|
|
|
32
|
-
|
|
|
33
|
-
|
|
|
34
|
-
|
|
|
35
|
-
|
|
|
36
|
-
|
|
|
37
|
-
|
|
|
38
|
-
|
|
|
39
|
-
|
|
|
40
|
-
|
|
|
36
|
+
### Full component list (default — 13 DSE components)
|
|
37
|
+
|
|
38
|
+
| Component | Pattern | DS needed? |
|
|
39
|
+
| ----------------- | ------------------- | ------------- |
|
|
40
|
+
| AlertBanner | B — Pure display | Yes |
|
|
41
|
+
| AssignmentHeader | B — Pure display | Yes |
|
|
42
|
+
| Banner | B — Pure display | Yes |
|
|
43
|
+
| CaseSummaryFields | A — Data display | Minimal |
|
|
44
|
+
| DetailsFields | A — Data display | Minimal |
|
|
45
|
+
| FieldGroup | C — Complex display | No |
|
|
46
|
+
| FieldGroupList | C — Complex display | No |
|
|
47
|
+
| FieldValueList | A — Data display | No (CSS only) |
|
|
48
|
+
| Operator | B — Pure display | Yes |
|
|
49
|
+
| Pulse | C — Complex display | No |
|
|
50
|
+
| RichTextEditor | C — Complex display | No |
|
|
51
|
+
| Toast | B — Pure display | Yes |
|
|
52
|
+
| WssQuickCreate | B — Pure display | Yes |
|
|
41
53
|
|
|
42
54
|
---
|
|
43
55
|
|
|
44
56
|
## Step 1 — Read `design-system-extension.md` (once, for the entire session)
|
|
45
57
|
|
|
46
|
-
Read the full contents of `{{SKILL_DIR}}/design-system-extension
|
|
58
|
+
Read the full contents of `{{SKILL_DIR}}/design-system-extension{{SKILL_EXT}}`.
|
|
47
59
|
|
|
48
60
|
This gives you:
|
|
49
61
|
|
|
50
|
-
- All three implementation patterns (Pure display, Field value display, Complex display
|
|
62
|
+
- All three implementation patterns (Pure display, Field value display, Complex display)
|
|
51
63
|
- The Design System Adaptation section — pattern categorisation, variant mapping table, DS discovery guidance
|
|
52
64
|
- Styling patterns — when to use CSS files vs DS style props
|
|
53
65
|
- Registration conventions
|
|
54
66
|
|
|
55
67
|
Keep this context active throughout the entire generation session. Do not re-read it per component.
|
|
56
68
|
|
|
57
|
-
> Pattern A/C components (FieldValueList, FieldGroup, Pulse, etc.) use
|
|
69
|
+
> Pattern A/C components (FieldValueList, FieldGroup, Pulse, etc.) use plain CSS or semantic HTML around what they are given — they do not use the DS API, and none of them calls `getPConnect()` itself. Only Pattern B components consume DS primitives.
|
|
58
70
|
|
|
59
71
|
---
|
|
60
72
|
|
|
@@ -113,6 +125,8 @@ If **any** exist, report them all at once and ask:
|
|
|
113
125
|
|
|
114
126
|
Wait for the user's answer before proceeding. If none exist, continue immediately.
|
|
115
127
|
|
|
128
|
+
**Say it in plain words.** Name each existing piece exactly as the user did — if they said "error messages", write "error messages", never a synonym or the component name. For pieces the user did not name, use `<ComponentName> – plain description` (the first summary line of its skill file, reworded into a few plain words). For example: _"You already have error messages and a form title. Replace them with new ones, keep yours, or stop?"_ — "replace" is **Overwrite all**, "keep" is **Skip existing**, "stop" is **Cancel**.
|
|
129
|
+
|
|
116
130
|
---
|
|
117
131
|
|
|
118
132
|
## Step 4 — Generate each component (loop)
|
|
@@ -121,11 +135,11 @@ For each component in the resolved list (in the order listed in Step 0):
|
|
|
121
135
|
|
|
122
136
|
### 4a — Read the component-specific skill file (MANDATORY — do not skip)
|
|
123
137
|
|
|
124
|
-
Read the file `{{SKILL_DIR}}/design-system-extension-skills/<ComponentName
|
|
138
|
+
Read the file `{{SKILL_DIR}}/design-system-extension-skills/<ComponentName>{{SKILL_EXT}}` using your file reading tool. This step is **required** for every component that has a skill file — do not rely solely on the general `design-system-extension.md`.
|
|
125
139
|
|
|
126
140
|
After reading, extract and keep active:
|
|
127
141
|
|
|
128
|
-
- **Pattern classification** — B (Pure display) / A (
|
|
142
|
+
- **Pattern classification** — B (Pure display) / A (Data display) / C (Complex display)
|
|
129
143
|
- **Behavioral Contract** — prop handling, variant mapping, rendering logic, edge cases
|
|
130
144
|
- **Design System Mapping** table — the recommended DS primitive (Pattern B components only)
|
|
131
145
|
|
|
@@ -139,7 +153,7 @@ Create the directory `<outputPath>/<ComponentName>/`.
|
|
|
139
153
|
|
|
140
154
|
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).
|
|
141
155
|
|
|
142
|
-
Follow the implementation structure described in `design-system-extension.md` (loaded in Step 1) for the component's pattern classification — B (Pure display), A (
|
|
156
|
+
Follow the implementation structure described in `design-system-extension.md` (loaded in Step 1) for the component's pattern classification — B (Pure display), A (Data display), or C (Complex display) — as identified in Step 4a. That file specifies the framework-specific approach for each pattern. Pattern B components should use the DS display primitive you identified in Step 2.
|
|
143
157
|
|
|
144
158
|
Apply the Behavioral Contract from the component skill file (exact props, variant logic, edge cases).
|
|
145
159
|
|
|
@@ -156,10 +170,16 @@ Do not reorder or restructure any existing entries.
|
|
|
156
170
|
|
|
157
171
|
### 4d — Report progress
|
|
158
172
|
|
|
159
|
-
After each component
|
|
173
|
+
After each component, tell the user in plain words what is now ready, described by what it shows on screen, and how far along you are — for example: "Message banner ready (1 of 13)".
|
|
160
174
|
|
|
161
175
|
---
|
|
162
176
|
|
|
163
177
|
## Step 5 — Verify the build
|
|
164
178
|
|
|
165
179
|
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.
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
## Step 6 — Try the portal
|
|
184
|
+
|
|
185
|
+
Once the Step 5 build passes, read and execute `{{SKILL_DIR}}/portal-flow/run-and-verify-portal{{SKILL_EXT}}`, handing it the components you generated. Report its verification summary together with the Step 5 summary.
|
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
ai-description: "Generate Pega components styled to match a customer's existing application — given a component list and a Design Profile, produces a generated components folder (location chosen by the user during analysis) with implementations that satisfy the Pega behavioral contract while rendering with the customer's design system, tokens, and styling approach, and reading like their own code"
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
+
## Progress milestones
|
|
6
|
+
|
|
7
|
+
When this prompt runs as part of the Embedded Flow Expert's full flow, announce that flow's milestones instead of these. Run on its own, announce these to the user as you reach them, in plain words and with a counter — "Step 2 of 3 — Building the form pieces".
|
|
8
|
+
|
|
9
|
+
1. **Getting ready** — Steps 0 to 3
|
|
10
|
+
2. **Building the form pieces** — Steps 4 to 5.1. After each component, say what is now ready and count it — "Date picker field ready (4 of 12)"
|
|
11
|
+
3. **Checking the pieces** — Step 6
|
|
12
|
+
|
|
5
13
|
## Step 0 — Resolve missing information
|
|
6
14
|
|
|
7
15
|
Read the user's message carefully. Extract:
|
|
@@ -10,17 +18,20 @@ Read the user's message carefully. Extract:
|
|
|
10
18
|
- **Design Profile location** — always `docs/design-profile.md` at the project root. This location is fixed and never moves with the output path
|
|
11
19
|
- **Output path** — read the **Output Path** field from Section 1 of the Design Profile and use it verbatim as `{output_path}`. Never re-ask for it and never fall back to a hardcoded default — it was already resolved once, with the user, during analysis
|
|
12
20
|
|
|
13
|
-
The **component list** is required. If it is not provided and cannot be inferred from prior conversation context, stop and ask the user.
|
|
21
|
+
The **component list** is required. If it is not provided and cannot be inferred from prior conversation context, stop and ask the user. Ask in plain words — "Which pieces do you want? Describe them in your own words, like 'date picker' or 'the buttons at the bottom'." Step 1 turns those words into component names.
|
|
14
22
|
|
|
15
|
-
|
|
23
|
+
Five components are required whether or not the list names them. Add them silently and note the addition in the summary report:
|
|
16
24
|
|
|
17
25
|
- **`FieldValueList`** — when the list contains any field component. Every field renders its display-only mode through it
|
|
18
26
|
- **`ActionButtons`** — always. Every assignment renders action controls, and leaving it ungenerated puts SDK-styled buttons in the middle of the customer's form
|
|
27
|
+
- **`AlertBanner`** — always. The assignment shows validation errors and page messages through it, and leaving it ungenerated hides them entirely
|
|
28
|
+
- **`AssignmentHeader`** — always. The SDK draws the step title above the form through it
|
|
29
|
+
- **`Toast`** — always. The SDK shows short failure messages after an action through it
|
|
19
30
|
|
|
20
31
|
If no Design Profile exists at the expected location:
|
|
21
32
|
|
|
22
|
-
- Ask the user: "No Design Profile found. Should I analyze your codebase first to create one?"
|
|
23
|
-
- If yes, execute the `{{SKILL_DIR}}/embedded-flow/analyze-customer-repo
|
|
33
|
+
- Ask the user: "No Design Profile found. Should I analyze your codebase first to create one?" Say it in plain words — for example "I haven't learned how your app looks yet. Shall I look through your app first, so the new pieces match it?"
|
|
34
|
+
- If yes, execute the `{{SKILL_DIR}}/embedded-flow/analyze-customer-repo{{SKILL_EXT}}` skill first, then return here.
|
|
24
35
|
|
|
25
36
|
---
|
|
26
37
|
|
|
@@ -59,7 +70,7 @@ If the class maps to more than one canonical name, choose between them using the
|
|
|
59
70
|
|
|
60
71
|
### Stage 4 — Ask the user
|
|
61
72
|
|
|
62
|
-
Tell the user that the requested name is not a Pega component name, list the two or three canonical names you considered most likely, and ask which one they want. Do not guess, and do not proceed with that component until they answer.
|
|
73
|
+
Tell the user that the requested name is not a Pega component name, list the two or three canonical names you considered most likely, and ask which one they want. Say it plainly — for example "I'm not sure which piece you mean by 'slider box'. Did you mean one of these?" — and show each candidate as `<ComponentName> – plain description` (the first summary line of its skill file, reworded into a few plain words), for example "SimpleTableManual – Table you can edit". Do not guess, and do not proceed with that component until they answer.
|
|
63
74
|
|
|
64
75
|
### Rules for this step
|
|
65
76
|
|
|
@@ -81,13 +92,13 @@ Read the following **once** before the generation loop:
|
|
|
81
92
|
|
|
82
93
|
2. **General type-level skills** — for each component type present in the grouped list, read the corresponding general skill:
|
|
83
94
|
|
|
84
|
-
| Type | Skill file
|
|
85
|
-
| ----------------------- |
|
|
86
|
-
| `field` | `{{SKILL_DIR}}/field-components
|
|
87
|
-
| `template` | `{{SKILL_DIR}}/template-components
|
|
88
|
-
| `widget` | `{{SKILL_DIR}}/widget-components
|
|
89
|
-
| `designSystemExtension` | `{{SKILL_DIR}}/design-system-extension
|
|
90
|
-
| `infra` | `{{SKILL_DIR}}/infra-components
|
|
95
|
+
| Type | Skill file |
|
|
96
|
+
| ----------------------- | ---------------------------------------------------- |
|
|
97
|
+
| `field` | `{{SKILL_DIR}}/field-components{{SKILL_EXT}}` |
|
|
98
|
+
| `template` | `{{SKILL_DIR}}/template-components{{SKILL_EXT}}` |
|
|
99
|
+
| `widget` | `{{SKILL_DIR}}/widget-components{{SKILL_EXT}}` |
|
|
100
|
+
| `designSystemExtension` | `{{SKILL_DIR}}/design-system-extension{{SKILL_EXT}}` |
|
|
101
|
+
| `infra` | `{{SKILL_DIR}}/infra-components{{SKILL_EXT}}` |
|
|
91
102
|
|
|
92
103
|
These establish the shared behavioral contract for each category.
|
|
93
104
|
|
|
@@ -130,7 +141,7 @@ For each component in the list, in the grouped order (fields first, then templat
|
|
|
130
141
|
|
|
131
142
|
### 4a. Read the component-specific skill
|
|
132
143
|
|
|
133
|
-
Look for `{{SKILL_DIR}}/{type}-skills/{ComponentName}
|
|
144
|
+
Look for `{{SKILL_DIR}}/{type}-skills/{ComponentName}{{SKILL_EXT}}` where `{type}` is `field`, `template`, `widget`, `design-system-extension`, or `infra`.
|
|
134
145
|
|
|
135
146
|
If the file exists, read it fully. It defines:
|
|
136
147
|
|
|
@@ -156,6 +167,7 @@ Create the component implementation that satisfies **both**:
|
|
|
156
167
|
2. **The customer's conventions** (from Design Profile):
|
|
157
168
|
- Use the customer's UI library primitives for rendering
|
|
158
169
|
- Follow the customer's styling approach (apply styles the way they do)
|
|
170
|
+
- Inherit the host's base font and text colour, and follow the Form Layout Convention — both governed by the Styling and Form Layout rules in the embedded component rules
|
|
159
171
|
- Follow the customer's import conventions (aliases, grouping, named/default)
|
|
160
172
|
- Use the customer's export style and co-located file layout (barrel files, types, styles)
|
|
161
173
|
|
|
@@ -178,6 +190,7 @@ Add an entry for this component in the registry file at `{output_path}/component
|
|
|
178
190
|
|
|
179
191
|
- The key must be the canonical Pega component name (as resolved in Step 1)
|
|
180
192
|
- The value must reference the generated component's export
|
|
193
|
+
- **One exception — `ToDo`.** Register it under the key `Todo`, the name the Pega engine and the SDK request at runtime: `Todo: ToDo`. Its folder and file stay `ToDo/ToDo.*`. Registered as `ToDo`, the lookup finds nothing and the to-do panel silently does not render
|
|
181
194
|
|
|
182
195
|
---
|
|
183
196
|
|
|
@@ -195,7 +208,7 @@ After all components are generated, ensure the registry file (`{output_path}/com
|
|
|
195
208
|
- **ActionButtons** — the Cancel/Save/Submit row at the bottom of an assignment
|
|
196
209
|
- **Stages** — the case stage progress indicator
|
|
197
210
|
- **MultiStep** — the step navigation within a multi-step assignment
|
|
198
|
-
4. Every component from the input list must have a corresponding entry
|
|
211
|
+
4. Every component from the input list must have a corresponding entry. If `ToDo` was generated, its entry is `Todo: ToDo` (see Step 4d)
|
|
199
212
|
5. No `infra` component other than those three may appear in the generated output — the rest are always sourced from the SDK adapter package
|
|
200
213
|
|
|
201
214
|
---
|
|
@@ -309,6 +322,6 @@ Whenever `Requested Name` and `Resolved As` differ, say so in your reply as well
|
|
|
309
322
|
6. **One folder per component** — each component gets its own folder named after its canonical Pega name; paths are Pega's, contents are the customer's
|
|
310
323
|
7. **Preserve SDK bridge contract** — the component must work with the SDK bridge component's resolution and rendering mechanism; the input interface defined in the skill file is non-negotiable
|
|
311
324
|
8. **Only canonical components exist** — every generated component must correspond to a canonical name in the component manifest, and every registry key must be that canonical name. Never create a component for a name that is not in the manifest, and never add the user's original wording as an extra registry key or alias. Pega resolves components by its own naming standard, so a non-canonical key would never be requested at runtime.
|
|
312
|
-
9. **Never generate infrastructure components, except the three overridable chrome components** — `ActionButtons`, `MultiStep`, and `Stages` may be generated
|
|
325
|
+
9. **Never generate infrastructure components, except the three overridable chrome components** — `ActionButtons`, `MultiStep`, and `Stages` may be generated directly under `{output_path}`, like every other component, and registered as overrides, because they render inline with the case form and must match the customer's UI. They are not interchangeable: `ActionButtons` and `MultiStep` are **assignment** chrome and belong in an embedded flow, whereas `Stages` is **case** chrome that only appears on a case-view surface and must not be generated for an embedded flow. Every other component categorized as `infra` in the component manifest (NavBar, DeferLoad, VerticalTabs, DashboardFilter) is provided by the SDK adapter package and must never be generated, overridden, or customized. If one of those appears in the input list, skip it and note in the summary report that it is SDK-provided.
|
|
313
326
|
|
|
314
327
|
10. **Reproduce the chrome components' contract exactly** — read the skill file for `ActionButtons`, `MultiStep`, or `Stages` in `{{SKILL_DIR}}/infra-skills/` before generating it. Only the markup and styling change; props, callback signatures, and localization are fixed by the SDK.
|
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
ai-description: Generate all (or a subset of) field components using any design system
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
+
## Progress milestones
|
|
6
|
+
|
|
7
|
+
Announce these to the user as you reach them, in plain words and with a counter — "Step 3 of 4 — Building the components". Count only the milestones that apply to this run.
|
|
8
|
+
|
|
9
|
+
1. **Understanding your request** — Step 0
|
|
10
|
+
2. **Preparing your design system** — Steps 1 to 3
|
|
11
|
+
3. **Building the components** — Step 4, counting each component
|
|
12
|
+
4. **Checking the app builds** — Step 5
|
|
13
|
+
5. **Trying it out** — Step 6
|
|
14
|
+
|
|
5
15
|
## Step 0 — Resolve inputs
|
|
6
16
|
|
|
7
17
|
Read the user's message carefully. Extract:
|
|
@@ -14,12 +24,12 @@ Both **design system** and **output base path** are required. If either is missi
|
|
|
14
24
|
|
|
15
25
|
⛔ **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.
|
|
16
26
|
|
|
17
|
-
Example questions (ask only the ones that are actually missing):
|
|
27
|
+
Ask every missing item together, in one plain message. Example questions (ask only the ones that are actually missing):
|
|
18
28
|
|
|
19
|
-
1. Which
|
|
29
|
+
1. Which style kit should I use for the screens? (A style kit is a ready-made set of buttons, inputs, and layouts.) Before asking, check the project's dependency list for UI libraries and list any you find first, marked as already in the project, then offer Ant Design, Chakra UI, Carbon, Radix UI, or another. Never choose one on the user's behalf, even when only one is installed.
|
|
20
30
|
2. Where should the field components be generated? (e.g. `src/components/field/`)
|
|
21
31
|
|
|
22
|
-
If the user specified a subset (e.g., "just TextInput and Dropdown"), restrict the list accordingly.
|
|
32
|
+
If the user specified a subset (e.g., "just TextInput and Dropdown"), restrict the list accordingly. The user may name components in everyday words ("date picker", "phone number") — resolve each through the `aliases` and `behaviorClasses` in `{{PROMPT_DIR}}/component-manifest.json`, and confirm the resolved names with the user before continuing.
|
|
23
33
|
|
|
24
34
|
Once both are known, continue to Step 1.
|
|
25
35
|
|
|
@@ -59,7 +69,7 @@ Once both are known, continue to Step 1.
|
|
|
59
69
|
|
|
60
70
|
## Step 1 — Read `field-components.md` (once, for the entire session)
|
|
61
71
|
|
|
62
|
-
Read the full contents of `{{SKILL_DIR}}/field-components
|
|
72
|
+
Read the full contents of `{{SKILL_DIR}}/field-components{{SKILL_EXT}}`.
|
|
63
73
|
|
|
64
74
|
This gives you:
|
|
65
75
|
|
|
@@ -133,6 +143,8 @@ If **any** exist, report them all at once and ask:
|
|
|
133
143
|
|
|
134
144
|
Wait for the user's answer before proceeding. If none exist, continue immediately.
|
|
135
145
|
|
|
146
|
+
**Say it in plain words.** Name each existing piece exactly as the user did — if they said "date picker", write "date picker", never a synonym or the component name. For pieces the user did not name, use `<ComponentName> – plain description` (the first summary line of its skill file, reworded into a few plain words). For example: _"You already have a date picker and an email box. Replace them with new ones, keep yours, or stop?"_ — "replace" is **Overwrite all**, "keep" is **Skip existing**, "stop" is **Cancel**.
|
|
147
|
+
|
|
136
148
|
---
|
|
137
149
|
|
|
138
150
|
## Step 4 — Generate each component (loop)
|
|
@@ -141,7 +153,7 @@ For each component in the resolved list (in the order listed in Step 0):
|
|
|
141
153
|
|
|
142
154
|
### 4a — Read the component-specific skill file (MANDATORY — do not skip)
|
|
143
155
|
|
|
144
|
-
Read the file `{{SKILL_DIR}}/field-skills/<ComponentName
|
|
156
|
+
Read the file `{{SKILL_DIR}}/field-skills/<ComponentName>{{SKILL_EXT}}` using your file reading tool. This step is **required** for every component that has a skill file — do not rely solely on the general `field-components.md`.
|
|
145
157
|
|
|
146
158
|
After reading, extract and keep active:
|
|
147
159
|
|
|
@@ -181,10 +193,16 @@ Do not reorder or restructure any existing entries.
|
|
|
181
193
|
|
|
182
194
|
### 4d — Report progress
|
|
183
195
|
|
|
184
|
-
After each component: "
|
|
196
|
+
After each component, tell the user in plain words what is now ready, described by what it shows on screen, and how far along you are — for example: "Date picker field ready (5 of 27)".
|
|
185
197
|
|
|
186
198
|
---
|
|
187
199
|
|
|
188
200
|
## Step 5 — Verify the build
|
|
189
201
|
|
|
190
202
|
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.
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Step 6 — Try the portal
|
|
207
|
+
|
|
208
|
+
Once the Step 5 build passes, read and execute `{{SKILL_DIR}}/portal-flow/run-and-verify-portal{{SKILL_EXT}}`, handing it the components you generated. Report its verification summary together with the Step 5 summary.
|
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
ai-description: Generate all (or a subset of) infrastructure (chrome) components using any design system
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
+
## Progress milestones
|
|
6
|
+
|
|
7
|
+
Announce these to the user as you reach them, in plain words and with a counter — "Step 3 of 4 — Building the components". Count only the milestones that apply to this run.
|
|
8
|
+
|
|
9
|
+
1. **Understanding your request** — Step 0
|
|
10
|
+
2. **Preparing your design system** — Steps 1 to 3
|
|
11
|
+
3. **Building the components** — Step 4, counting each component
|
|
12
|
+
4. **Checking the app builds** — Step 5
|
|
13
|
+
5. **Trying it out** — Step 6
|
|
14
|
+
|
|
5
15
|
## Step 0 — Resolve inputs
|
|
6
16
|
|
|
7
17
|
Read the user's message carefully. Extract:
|
|
@@ -14,12 +24,12 @@ Both **design system** and **output base path** are required. If either is missi
|
|
|
14
24
|
|
|
15
25
|
⛔ **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.
|
|
16
26
|
|
|
17
|
-
Example questions (ask only the ones that are actually missing):
|
|
27
|
+
Ask every missing item together, in one plain message. Example questions (ask only the ones that are actually missing):
|
|
18
28
|
|
|
19
|
-
1. Which
|
|
29
|
+
1. Which style kit should I use for the screens? (A style kit is a ready-made set of buttons, inputs, and layouts.) Before asking, check the project's dependency list for UI libraries and list any you find first, marked as already in the project, then offer Ant Design, Chakra UI, Carbon, Radix UI, or another. Never choose one on the user's behalf, even when only one is installed.
|
|
20
30
|
2. Where should the infrastructure components be generated? (e.g. `src/components/infra/`)
|
|
21
31
|
|
|
22
|
-
If the user specified a subset (e.g., "just ActionButtons and Stages"), restrict the list accordingly.
|
|
32
|
+
If the user specified a subset (e.g., "just ActionButtons and Stages"), restrict the list accordingly. The user may name components in everyday words ("buttons at the bottom", "step navigation") — resolve each through the `aliases` and `behaviorClasses` in `{{PROMPT_DIR}}/component-manifest.json`, and confirm the resolved names with the user before continuing.
|
|
23
33
|
|
|
24
34
|
### Full component list (default — 3 infra components)
|
|
25
35
|
|
|
@@ -48,7 +58,7 @@ Once both inputs are known, continue to Step 1.
|
|
|
48
58
|
|
|
49
59
|
## Step 1 — Read `infra-components.md` (once, for the entire session)
|
|
50
60
|
|
|
51
|
-
Read the full contents of `{{SKILL_DIR}}/infra-components
|
|
61
|
+
Read the full contents of `{{SKILL_DIR}}/infra-components{{SKILL_EXT}}`.
|
|
52
62
|
|
|
53
63
|
This gives you:
|
|
54
64
|
|
|
@@ -133,6 +143,8 @@ If a component already has **files at the output path**, report them all at once
|
|
|
133
143
|
|
|
134
144
|
Wait for the user's answer before proceeding. If none exist, continue immediately.
|
|
135
145
|
|
|
146
|
+
**Say it in plain words.** Name each existing piece exactly as the user did — if they said "the buttons at the bottom", write that, never a synonym or the component name. For pieces the user did not name, use `<ComponentName> – plain description` (the first summary line of its skill file, reworded into a few plain words). For example: _"You already have your own buttons at the bottom. Replace them with new ones, keep yours, or stop?"_ — "replace" is **Overwrite all**, "keep" is **Skip existing**, "stop" is **Cancel**.
|
|
147
|
+
|
|
136
148
|
An existing **registration** alone is not an overwrite — do not ask about it. It is expected, and Step 4c tells you how to rebind it.
|
|
137
149
|
|
|
138
150
|
---
|
|
@@ -143,7 +155,7 @@ For each component in the resolved list (in the order listed in Step 0):
|
|
|
143
155
|
|
|
144
156
|
### 4a — Read the component-specific skill file (MANDATORY — do not skip)
|
|
145
157
|
|
|
146
|
-
Read the file `{{SKILL_DIR}}/infra-skills/<ComponentName
|
|
158
|
+
Read the file `{{SKILL_DIR}}/infra-skills/<ComponentName>{{SKILL_EXT}}` using your file reading tool. This step is **required** for every component — do not rely solely on the general `infra-components.md`.
|
|
147
159
|
|
|
148
160
|
After reading, extract and keep active:
|
|
149
161
|
|
|
@@ -201,7 +213,7 @@ Never remove the SDK's built-in component spread — it supplies the infrastruct
|
|
|
201
213
|
|
|
202
214
|
### 4d — Report progress
|
|
203
215
|
|
|
204
|
-
After each component
|
|
216
|
+
After each component, tell the user in plain words what is now ready, described by what it shows on screen, and how far along you are — for example: "Submit and Cancel buttons ready (1 of 3)".
|
|
205
217
|
|
|
206
218
|
---
|
|
207
219
|
|
|
@@ -220,3 +232,9 @@ Before reporting success, confirm:
|
|
|
220
232
|
- [ ] The SDK's built-in component spread is still present, and every registration that resolves through it or through the SDK adapter package is untouched
|
|
221
233
|
|
|
222
234
|
Report a summary: list of all files created, all entries added to the component map, and any components skipped because they are SDK-provided.
|
|
235
|
+
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
## Step 6 — Try the portal
|
|
239
|
+
|
|
240
|
+
Once the Step 5 build passes, read and execute `{{SKILL_DIR}}/portal-flow/run-and-verify-portal{{SKILL_EXT}}`, handing it the components you generated. Report its verification summary together with the Step 5 summary.
|
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
ai-description: Generate all (or a subset of) template components using any design system
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
+
## Progress milestones
|
|
6
|
+
|
|
7
|
+
Announce these to the user as you reach them, in plain words and with a counter — "Step 3 of 4 — Building the components". Count only the milestones that apply to this run.
|
|
8
|
+
|
|
9
|
+
1. **Understanding your request** — Step 0
|
|
10
|
+
2. **Preparing your design system** — Steps 1 to 3
|
|
11
|
+
3. **Building the components** — Step 4, counting each component
|
|
12
|
+
4. **Checking the app builds** — Step 5
|
|
13
|
+
5. **Trying it out** — Step 6
|
|
14
|
+
|
|
5
15
|
## Step 0 — Resolve inputs
|
|
6
16
|
|
|
7
17
|
Read the user's message carefully. Extract:
|
|
@@ -14,14 +24,14 @@ Both **design system** and **output base path** are required. If either is missi
|
|
|
14
24
|
|
|
15
25
|
⛔ **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.
|
|
16
26
|
|
|
17
|
-
Example questions (ask only the ones that are actually missing):
|
|
27
|
+
Ask every missing item together, in one plain message. Example questions (ask only the ones that are actually missing):
|
|
18
28
|
|
|
19
|
-
1. Which
|
|
29
|
+
1. Which style kit should I use for the screens? (A style kit is a ready-made set of buttons, inputs, and layouts.) Before asking, check the project's dependency list for UI libraries and list any you find first, marked as already in the project, then offer Ant Design, Chakra UI, Carbon, Radix UI, or another. Never choose one on the user's behalf, even when only one is installed.
|
|
20
30
|
2. Where should the template components be generated? (e.g. `src/components/template/`)
|
|
21
31
|
|
|
22
32
|
> **Note:** The design system applies only to **layout templates** (TwoColumn, OneColumn, NarrowWide, WideNarrow, and their sub-variants). Form templates and page templates use the PConnect bridge pattern and are design-system agnostic — they will be generated without DS primitives regardless of your choice.
|
|
23
33
|
|
|
24
|
-
If the user specified a subset (e.g., "just TwoColumn and OneColumn"), restrict the list accordingly.
|
|
34
|
+
If the user specified a subset (e.g., "just TwoColumn and OneColumn"), restrict the list accordingly. The user may name components in everyday words ("page layouts", "two columns") — resolve each through the `aliases` and `behaviorClasses` in `{{PROMPT_DIR}}/component-manifest.json`, and confirm the resolved names with the user before continuing.
|
|
25
35
|
|
|
26
36
|
Once both are known, continue to Step 1.
|
|
27
37
|
|
|
@@ -68,7 +78,7 @@ Once both are known, continue to Step 1.
|
|
|
68
78
|
|
|
69
79
|
## Step 1 — Read `template-components.md` (once, for the entire session)
|
|
70
80
|
|
|
71
|
-
Read the full contents of `{{SKILL_DIR}}/template-components
|
|
81
|
+
Read the full contents of `{{SKILL_DIR}}/template-components{{SKILL_EXT}}`.
|
|
72
82
|
|
|
73
83
|
This gives you:
|
|
74
84
|
|
|
@@ -139,6 +149,8 @@ If **any** exist, report them all at once and ask:
|
|
|
139
149
|
|
|
140
150
|
Wait for the user's answer before proceeding. If none exist, continue immediately.
|
|
141
151
|
|
|
152
|
+
**Say it in plain words.** Name each existing piece exactly as the user did — if they said "two-column layout", write "two-column layout", never a synonym or the component name. For pieces the user did not name, use `<ComponentName> – plain description` (the first summary line of its skill file, reworded into a few plain words). For example: _"You already have a two-column layout. Replace it with a new one, keep yours, or stop?"_ — "replace" is **Overwrite all**, "keep" is **Skip existing**, "stop" is **Cancel**.
|
|
153
|
+
|
|
142
154
|
---
|
|
143
155
|
|
|
144
156
|
## Step 4 — Generate each component (loop)
|
|
@@ -147,7 +159,7 @@ For each component in the resolved list (in the order listed in Step 0):
|
|
|
147
159
|
|
|
148
160
|
### 4a — Read the component-specific skill file (MANDATORY — do not skip)
|
|
149
161
|
|
|
150
|
-
Read the file `{{SKILL_DIR}}/template-skills/<ComponentName
|
|
162
|
+
Read the file `{{SKILL_DIR}}/template-skills/<ComponentName>{{SKILL_EXT}}` using your file reading tool. This step is **required** for every component — do not rely solely on the general `template-components.md`.
|
|
151
163
|
|
|
152
164
|
After reading, extract and keep active:
|
|
153
165
|
|
|
@@ -218,10 +230,16 @@ Do not reorder or restructure any existing entries.
|
|
|
218
230
|
|
|
219
231
|
### 4d — Report progress
|
|
220
232
|
|
|
221
|
-
After each component
|
|
233
|
+
After each component, tell the user in plain words what is now ready, described by what it shows on screen, and how far along you are — for example: "Two-column page layout ready (3 of 32)".
|
|
222
234
|
|
|
223
235
|
---
|
|
224
236
|
|
|
225
237
|
## Step 5 — Verify the build
|
|
226
238
|
|
|
227
239
|
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.
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
## Step 6 — Try the portal
|
|
244
|
+
|
|
245
|
+
Once the Step 5 build passes, read and execute `{{SKILL_DIR}}/portal-flow/run-and-verify-portal{{SKILL_EXT}}`, handing it the components you generated. Report its verification summary together with the Step 5 summary.
|
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
ai-description: Generate all (or a subset of) widget components using any design system
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
+
## Progress milestones
|
|
6
|
+
|
|
7
|
+
Announce these to the user as you reach them, in plain words and with a counter — "Step 3 of 4 — Building the components". Count only the milestones that apply to this run.
|
|
8
|
+
|
|
9
|
+
1. **Understanding your request** — Step 0
|
|
10
|
+
2. **Preparing your design system** — Steps 1 to 3
|
|
11
|
+
3. **Building the components** — Step 4, counting each component
|
|
12
|
+
4. **Checking the app builds** — Step 5
|
|
13
|
+
5. **Trying it out** — Step 6
|
|
14
|
+
|
|
5
15
|
## Step 0 — Resolve inputs
|
|
6
16
|
|
|
7
17
|
Read the user's message carefully. Extract:
|
|
@@ -14,12 +24,12 @@ Both **design system** and **output base path** are required. If either is missi
|
|
|
14
24
|
|
|
15
25
|
⛔ **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.
|
|
16
26
|
|
|
17
|
-
Example questions (ask only the ones that are actually missing):
|
|
27
|
+
Ask every missing item together, in one plain message. Example questions (ask only the ones that are actually missing):
|
|
18
28
|
|
|
19
|
-
1. Which
|
|
29
|
+
1. Which style kit should I use for the screens? (A style kit is a ready-made set of buttons, inputs, and layouts.) Before asking, check the project's dependency list for UI libraries and list any you find first, marked as already in the project, then offer Ant Design, Chakra UI, Carbon, Radix UI, or another. Never choose one on the user's behalf, even when only one is installed.
|
|
20
30
|
2. Where should the widget components be generated? (e.g. `src/components/widget/`)
|
|
21
31
|
|
|
22
|
-
If the user specified a subset (e.g., "just ToDo and Attachment"), restrict the list accordingly.
|
|
32
|
+
If the user specified a subset (e.g., "just ToDo and Attachment"), restrict the list accordingly. The user may name components in everyday words ("task list", "file uploader") — resolve each through the `aliases` and `behaviorClasses` in `{{PROMPT_DIR}}/component-manifest.json`, and confirm the resolved names with the user before continuing.
|
|
23
33
|
|
|
24
34
|
Once both are known, continue to Step 1.
|
|
25
35
|
|
|
@@ -42,7 +52,7 @@ Once both are known, continue to Step 1.
|
|
|
42
52
|
|
|
43
53
|
## Step 1 — Read `widget-components.md` (once, for the entire session)
|
|
44
54
|
|
|
45
|
-
Read the full contents of `{{SKILL_DIR}}/widget-components
|
|
55
|
+
Read the full contents of `{{SKILL_DIR}}/widget-components{{SKILL_EXT}}`.
|
|
46
56
|
|
|
47
57
|
This gives you:
|
|
48
58
|
|
|
@@ -118,6 +128,8 @@ If **any** exist, report them all at once and ask:
|
|
|
118
128
|
|
|
119
129
|
Wait for the user's answer before proceeding. If none exist, continue immediately.
|
|
120
130
|
|
|
131
|
+
**Say it in plain words.** Name each existing piece exactly as the user did — if they said "task list", write "task list", never a synonym or the component name. For pieces the user did not name, use `<ComponentName> – plain description` (the first summary line of its skill file, reworded into a few plain words). For example: _"You already have a task list. Replace it with a new one, keep yours, or stop?"_ — "replace" is **Overwrite all**, "keep" is **Skip existing**, "stop" is **Cancel**.
|
|
132
|
+
|
|
121
133
|
---
|
|
122
134
|
|
|
123
135
|
## Step 4 — Generate each component (loop)
|
|
@@ -126,7 +138,7 @@ For each component in the resolved list (in the order listed in Step 0):
|
|
|
126
138
|
|
|
127
139
|
### 4a — Read the component-specific skill file (MANDATORY — do not skip)
|
|
128
140
|
|
|
129
|
-
Read the file `{{SKILL_DIR}}/widget-skills/<ComponentName
|
|
141
|
+
Read the file `{{SKILL_DIR}}/widget-skills/<ComponentName>{{SKILL_EXT}}` 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`.
|
|
130
142
|
|
|
131
143
|
After reading, extract and keep active:
|
|
132
144
|
|
|
@@ -163,10 +175,16 @@ Do not reorder or restructure any existing entries.
|
|
|
163
175
|
|
|
164
176
|
### 4d — Report progress
|
|
165
177
|
|
|
166
|
-
After each component: "
|
|
178
|
+
After each component, tell the user in plain words what is now ready, described by what it shows on screen, and how far along you are — for example: "Attachments panel ready (2 of 10)".
|
|
167
179
|
|
|
168
180
|
---
|
|
169
181
|
|
|
170
182
|
## Step 5 — Verify the build
|
|
171
183
|
|
|
172
184
|
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.
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## Step 6 — Try the portal
|
|
189
|
+
|
|
190
|
+
Once the Step 5 build passes, read and execute `{{SKILL_DIR}}/portal-flow/run-and-verify-portal{{SKILL_EXT}}`, handing it the components you generated. Report its verification summary together with the Step 5 summary.
|
|
@@ -87,6 +87,7 @@ Use the table below to map what you see in the image to SDK component names.
|
|
|
87
87
|
| What you see | SDK component name | Category |
|
|
88
88
|
| ------------------------------------------------------------ | ------------------- | --------------------- |
|
|
89
89
|
| Coloured banner alert bar (info / warning / error / success) | `AlertBanner` | designSystemExtension |
|
|
90
|
+
| Step title text directly above an assignment's form fields | `AssignmentHeader` | designSystemExtension |
|
|
90
91
|
| Hero-style banner with title + CTA button | `Banner` | designSystemExtension |
|
|
91
92
|
| Read-only field+value pairs in a case summary | `CaseSummaryFields` | designSystemExtension |
|
|
92
93
|
| Read-only label+value pairs in a details view | `DetailsFields` | designSystemExtension |
|
|
@@ -95,6 +96,7 @@ Use the table below to map what you see in the image to SDK component names.
|
|
|
95
96
|
| User operator info popover (name + contact) | `Operator` | designSystemExtension |
|
|
96
97
|
| Comment/pulse card with avatar + timestamp | `Pulse` | designSystemExtension |
|
|
97
98
|
| Rich text editor with theme-aware toolbar | `RichTextEditor` | designSystemExtension |
|
|
99
|
+
| Short dark message at the screen edge with a close (×) icon | `Toast` | designSystemExtension |
|
|
98
100
|
| Quick-create shortcut links list (WSS sidebar) | `WssQuickCreate` | designSystemExtension |
|
|
99
101
|
|
|
100
102
|
---
|