@pega/sdk 0.0.12 → 0.0.14

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 (62) hide show
  1. package/README.md +32 -11
  2. package/package.json +1 -1
  3. package/templates/angular-sdk-reference/angular.json +2 -1
  4. package/templates/angular-sdk-reference/package.json +1 -0
  5. package/templates/angular-sdk-reference/pega-constellationjs-0.26.3-local.tgz +0 -0
  6. package/templates/angular-sdk-reference/src/app/app.component.ts +232 -15
  7. package/templates/angular-sdk-reference/src/components/component-map.ts +90 -0
  8. package/templates/angular-sdk-reference/src/components/fields/auto-complete/auto-complete.component.ts +267 -0
  9. package/templates/angular-sdk-reference/src/components/fields/checkbox/checkbox.component.ts +84 -0
  10. package/templates/angular-sdk-reference/src/components/fields/currency/currency.component.ts +97 -0
  11. package/templates/angular-sdk-reference/src/components/fields/date-input/date-input.component.ts +88 -0
  12. package/templates/angular-sdk-reference/src/components/fields/dropdown/dropdown.component.ts +101 -0
  13. package/templates/angular-sdk-reference/src/components/fields/email/email.component.ts +91 -0
  14. package/templates/angular-sdk-reference/src/components/fields/integer/integer.component.ts +93 -0
  15. package/templates/angular-sdk-reference/src/components/fields/phone/phone.component.ts +91 -0
  16. package/templates/angular-sdk-reference/src/components/fields/radio-buttons/radio-buttons.component.ts +102 -0
  17. package/templates/angular-sdk-reference/src/components/fields/text-area/text-area.component.ts +98 -0
  18. package/templates/angular-sdk-reference/src/components/fields/text-input/text-input.component.ts +97 -0
  19. package/templates/angular-sdk-reference/src/components/fields/url-input/url-input.component.ts +94 -0
  20. package/templates/angular-sdk-reference/src/components/infra/assignment/assignment.component.ts +206 -0
  21. package/templates/angular-sdk-reference/src/components/infra/case-summary/case-summary.component.ts +76 -0
  22. package/templates/angular-sdk-reference/src/components/infra/case-view/case-view.component.ts +114 -0
  23. package/templates/angular-sdk-reference/src/components/infra/flow-container/flow-container.component.ts +411 -0
  24. package/templates/angular-sdk-reference/src/components/infra/reference/reference.component.ts +158 -0
  25. package/templates/angular-sdk-reference/src/components/infra/region/region.component.ts +39 -0
  26. package/templates/angular-sdk-reference/src/components/infra/root-container/root-container.component.ts +193 -0
  27. package/templates/angular-sdk-reference/src/components/infra/stages/stages.component.ts +78 -0
  28. package/templates/angular-sdk-reference/src/components/infra/view/view.component.ts +139 -0
  29. package/templates/angular-sdk-reference/src/components/infra/view-container/view-container.component.ts +191 -0
  30. package/templates/angular-sdk-reference/src/components/templates/default-form/default-form.component.ts +101 -0
  31. package/templates/angular-sdk-reference/src/components/templates/narrow-wide/narrow-wide.component.ts +37 -0
  32. package/templates/angular-sdk-reference/src/components/templates/one-column/one-column.component.ts +37 -0
  33. package/templates/angular-sdk-reference/src/components/templates/two-column/two-column.component.ts +37 -0
  34. package/templates/angular-sdk-reference/src/components/templates/wide-narrow/wide-narrow.component.ts +37 -0
  35. package/templates/angular-sdk-reference/src/helpers/event-utils.ts +18 -0
  36. package/templates/angular-sdk-reference/src/helpers/utils.ts +38 -0
  37. package/templates/angular-sdk-reference/src/helpers/versionHelpers.ts +14 -0
  38. package/templates/angular-sdk-reference/tsconfig.json +5 -2
  39. package/templates/react-sdk-reference/.ai-common/agents/embedded-flow-expert.md +20 -13
  40. package/templates/react-sdk-reference/.ai-common/global/ai-agent-instructions-embedded.md +2 -2
  41. package/templates/react-sdk-reference/.ai-common/global/ai-agent-instructions.md +1 -1
  42. package/templates/react-sdk-reference/.ai-common/instructions/dse-component.md +1 -1
  43. package/templates/react-sdk-reference/.ai-common/instructions/embedded-component.md +1 -1
  44. package/templates/react-sdk-reference/.ai-common/instructions/field-component.md +1 -1
  45. package/templates/react-sdk-reference/.ai-common/instructions/infra-component.md +1 -1
  46. package/templates/react-sdk-reference/.ai-common/instructions/template-component.md +1 -1
  47. package/templates/react-sdk-reference/.ai-common/instructions/widget-component.md +1 -1
  48. package/templates/react-sdk-reference/.ai-common/prompts/component-manifest.json +7 -0
  49. package/templates/react-sdk-reference/.ai-common/prompts/embedded-component-manifest.md +2 -2
  50. package/templates/react-sdk-reference/.ai-common/prompts/generate-all-components.md +4 -2
  51. package/templates/react-sdk-reference/.ai-common/prompts/generate-embedded-components.md +10 -11
  52. package/templates/react-sdk-reference/.ai-common/skills/connect-pega-server.md +84 -31
  53. package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/analyze-customer-repo.md +11 -2
  54. package/templates/react-sdk-reference/.ai-common/skills/embedded-flow/wire-integration.md +6 -6
  55. package/templates/react-sdk-reference/.ai-common/skills/field-components.md +75 -29
  56. package/templates/react-sdk-reference/.ai-common/skills/field-skills/AutoComplete.md +133 -101
  57. package/templates/react-sdk-reference/.ai-common/skills/field-skills/EmbeddedData.md +385 -0
  58. package/templates/react-sdk-reference/.ai-common/skills/field-skills/EmbeddedDataMulti.md +506 -0
  59. package/templates/react-sdk-reference/.ai-common/skills/field-skills/ObjectReference.md +549 -86
  60. package/templates/react-sdk-reference/.ai-common/skills/field-skills/UserReference.md +181 -83
  61. package/templates/react-sdk-reference/.ai-common/skills/template-skills/ListView.md +125 -153
  62. package/templates/react-sdk-reference/.ai-common/skills/template-skills/SimpleTable.md +90 -81
@@ -0,0 +1,37 @@
1
+ /**
2
+ * NarrowWide — narrow-left/wide-right two-column layout (1:2 ratio).
3
+ *
4
+ * Pattern reference: angular-sdk-components NarrowWideFormComponent + sdk-react NarrowWide
5
+ */
6
+
7
+ /* eslint-disable @typescript-eslint/no-explicit-any */
8
+ import { Component, Input } from '@angular/core';
9
+ import type { OnInit } from '@angular/core';
10
+ import { CommonModule } from '@angular/common';
11
+ import { PConnectBridgeComponent } from '@pega/sdk-angular';
12
+
13
+ @Component({
14
+ selector: 'pega-narrow-wide',
15
+ standalone: true,
16
+ imports: [CommonModule, PConnectBridgeComponent],
17
+ template: `
18
+ <div style="display: grid; grid-template-columns: 1fr 2fr; gap: 1rem;">
19
+ <div *ngFor="let getter of childGetters">
20
+ <pconnect-bridge [getPConnect]="getter"></pconnect-bridge>
21
+ </div>
22
+ </div>
23
+ `,
24
+ })
25
+ export class NarrowWideComponent implements OnInit {
26
+ @Input() props: any;
27
+
28
+ childGetters: Array<() => typeof PConnect> = [];
29
+
30
+ ngOnInit(): void {
31
+ const pConn = this.props.getPConnect();
32
+ const children = pConn.getChildren?.() ?? [];
33
+ this.childGetters = children.map((child: any) => {
34
+ return child.getPConnect ?? (() => child);
35
+ });
36
+ }
37
+ }
@@ -0,0 +1,37 @@
1
+ /**
2
+ * OneColumn — single-column layout template that renders children vertically.
3
+ *
4
+ * Pattern reference: angular-sdk-components OneColumnComponent + sdk-react OneColumn
5
+ */
6
+
7
+ /* eslint-disable @typescript-eslint/no-explicit-any */
8
+ import { Component, Input } from '@angular/core';
9
+ import type { OnInit } from '@angular/core';
10
+ import { CommonModule } from '@angular/common';
11
+ import { PConnectBridgeComponent } from '@pega/sdk-angular';
12
+
13
+ @Component({
14
+ selector: 'pega-one-column',
15
+ standalone: true,
16
+ imports: [CommonModule, PConnectBridgeComponent],
17
+ template: `
18
+ <div style="display: flex; flex-direction: column; gap: 0.25rem;">
19
+ <div *ngFor="let getter of childGetters">
20
+ <pconnect-bridge [getPConnect]="getter"></pconnect-bridge>
21
+ </div>
22
+ </div>
23
+ `,
24
+ })
25
+ export class OneColumnComponent implements OnInit {
26
+ @Input() props: any;
27
+
28
+ childGetters: Array<() => typeof PConnect> = [];
29
+
30
+ ngOnInit(): void {
31
+ const pConn = this.props.getPConnect();
32
+ const children = pConn.getChildren?.() ?? [];
33
+ this.childGetters = children.map((child: any) => {
34
+ return child.getPConnect ?? (() => child);
35
+ });
36
+ }
37
+ }
@@ -0,0 +1,37 @@
1
+ /**
2
+ * TwoColumn — two-column grid layout template.
3
+ *
4
+ * Pattern reference: angular-sdk-components TwoColumnComponent + sdk-react TwoColumn
5
+ */
6
+
7
+ /* eslint-disable @typescript-eslint/no-explicit-any */
8
+ import { Component, Input } from '@angular/core';
9
+ import type { OnInit } from '@angular/core';
10
+ import { CommonModule } from '@angular/common';
11
+ import { PConnectBridgeComponent } from '@pega/sdk-angular';
12
+
13
+ @Component({
14
+ selector: 'pega-two-column',
15
+ standalone: true,
16
+ imports: [CommonModule, PConnectBridgeComponent],
17
+ template: `
18
+ <div style="display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;">
19
+ <div *ngFor="let getter of childGetters">
20
+ <pconnect-bridge [getPConnect]="getter"></pconnect-bridge>
21
+ </div>
22
+ </div>
23
+ `,
24
+ })
25
+ export class TwoColumnComponent implements OnInit {
26
+ @Input() props: any;
27
+
28
+ childGetters: Array<() => typeof PConnect> = [];
29
+
30
+ ngOnInit(): void {
31
+ const pConn = this.props.getPConnect();
32
+ const children = pConn.getChildren?.() ?? [];
33
+ this.childGetters = children.map((child: any) => {
34
+ return child.getPConnect ?? (() => child);
35
+ });
36
+ }
37
+ }
@@ -0,0 +1,37 @@
1
+ /**
2
+ * WideNarrow — wide-left/narrow-right two-column layout (2:1 ratio).
3
+ *
4
+ * Pattern reference: angular-sdk-components WideNarrowFormComponent + sdk-react WideNarrow
5
+ */
6
+
7
+ /* eslint-disable @typescript-eslint/no-explicit-any */
8
+ import { Component, Input } from '@angular/core';
9
+ import type { OnInit } from '@angular/core';
10
+ import { CommonModule } from '@angular/common';
11
+ import { PConnectBridgeComponent } from '@pega/sdk-angular';
12
+
13
+ @Component({
14
+ selector: 'pega-wide-narrow',
15
+ standalone: true,
16
+ imports: [CommonModule, PConnectBridgeComponent],
17
+ template: `
18
+ <div style="display: grid; grid-template-columns: 2fr 1fr; gap: 1rem;">
19
+ <div *ngFor="let getter of childGetters">
20
+ <pconnect-bridge [getPConnect]="getter"></pconnect-bridge>
21
+ </div>
22
+ </div>
23
+ `,
24
+ })
25
+ export class WideNarrowComponent implements OnInit {
26
+ @Input() props: any;
27
+
28
+ childGetters: Array<() => typeof PConnect> = [];
29
+
30
+ ngOnInit(): void {
31
+ const pConn = this.props.getPConnect();
32
+ const children = pConn.getChildren?.() ?? [];
33
+ this.childGetters = children.map((child: any) => {
34
+ return child.getPConnect ?? (() => child);
35
+ });
36
+ }
37
+ }
@@ -0,0 +1,18 @@
1
+ // From DX Components src/utils/event-utils.js
2
+
3
+ export function handleEvent(actions: any, eventType: string, propName: string, value: string | boolean | number) {
4
+ switch (eventType) {
5
+ case 'change':
6
+ actions.updateFieldValue(propName, value);
7
+ break;
8
+ case 'blur':
9
+ actions.triggerFieldChange(propName, value);
10
+ break;
11
+ case 'changeNblur':
12
+ actions.updateFieldValue(propName, value);
13
+ actions.triggerFieldChange(propName, value);
14
+ break;
15
+ default:
16
+ break;
17
+ }
18
+ }
@@ -0,0 +1,38 @@
1
+ export function getOptionList(configProps: any, dataObject: any): any[] {
2
+ const listType = configProps.listType;
3
+ let arReturn: any[] = [];
4
+
5
+ if (listType) {
6
+ switch (listType.toLowerCase()) {
7
+ case 'associated':
8
+ // data source should be an array
9
+ if (typeof configProps.datasource === 'object') {
10
+ arReturn = configProps.datasource;
11
+ }
12
+ break;
13
+
14
+ case 'datapage':
15
+ // get data page
16
+ // eslint-disable-next-line no-case-declarations
17
+ const dataPage = configProps.datasource;
18
+ if (typeof dataPage === 'string' && dataObject[dataPage]) {
19
+ alert('need to handle data page');
20
+ } else {
21
+ let listSourceItems = configProps.listOutput;
22
+ if (typeof dataPage === 'object' && !Array.isArray(listSourceItems)) {
23
+ listSourceItems = dataPage.source ? dataPage.source : [];
24
+ }
25
+ (listSourceItems || []).forEach((item: any) => {
26
+ item.value = item.text ? item.text : item.value;
27
+ });
28
+ arReturn = listSourceItems || [];
29
+ }
30
+ break;
31
+
32
+ default:
33
+ break;
34
+ }
35
+ }
36
+
37
+ return arReturn;
38
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * versionHelpers.ts
3
+ *
4
+ * Container helper functions that can identify which version of
5
+ * PCore/PConnect is being run
6
+ */
7
+
8
+ export const sdkVersion = '8.7';
9
+
10
+ export function compareSdkPCoreVersions() {
11
+ // const theConstellationVersion = PCore.getPCoreVersion();
12
+
13
+ console.warn(`Using Constellation version ${PCore.getPCoreVersion()}. Ensure this is the same version as your Infinity server.`);
14
+ }
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "compileOnSave": false,
3
3
  "compilerOptions": {
4
+ "rootDir": "../..",
4
5
  "outDir": "./dist/out-tsc",
5
6
  "forceConsistentCasingInFileNames": true,
6
7
  "strict": true,
7
8
  "noImplicitOverride": true,
8
- "noPropertyAccessFromIndexSignature": true,
9
+ "noPropertyAccessFromIndexSignature": false,
9
10
  "noImplicitReturns": true,
10
11
  "noFallthroughCasesInSwitch": true,
11
12
  "sourceMap": true,
@@ -21,7 +22,9 @@
21
22
  "@pega/sdk-angular": ["../../packages/sdk-angular/src/index.ts"],
22
23
  "@pega/sdk-types": ["../../packages/sdk-types/src/index.ts"]
23
24
  },
24
- "ignoreDeprecations": "5.0"
25
+ "ignoreDeprecations": "5.0",
26
+ "typeRoots": ["../../node_modules/@types", "../../node_modules/@pega"],
27
+ "types": ["pcore-pconnect-typedefs"]
25
28
  },
26
29
  "angularCompilerOptions": {
27
30
  "enableI18nLegacyMessageIdFormat": false,
@@ -55,7 +55,7 @@ Determine which workflow governs the request, then execute it by reading the ref
55
55
 
56
56
  ### Step 0.0 — Ensure the Pega server connection is configured
57
57
 
58
- Before executing any data source below, read and execute `{{SKILL_DIR}}/connect-pega-server.md`. It is a no-op when the connection is already configured, and otherwise gathers the missing values from the user and writes them into the MCP config and `sdk-config.json` before this step continues.
58
+ Before executing any data source below, read and execute `{{SKILL_DIR}}/connect-pega-server.md`. It is a no-op when the connection is already configured. Otherwise, it resolves existing values from the active MCP config, browser-served `sdk-config.json`, and environment files, then asks once for every missing non-secret value. The user may provide those values in chat or write them into any allowed configuration file named by the gate; the assistant re-reads the files and synchronizes every applicable destination. The gate may pause for an environment-sourced Pega MCP client secret (Cursor only) or an MCP reconnect. After the user retries, rerun the gate before executing any data source.
59
59
 
60
60
  ### Step 0.1 — Check for a case type in the prompt
61
61
 
@@ -90,7 +90,7 @@ Reduce that response to a generatable list by applying the following in order. P
90
90
  2. **Keep components that appear in at least one lifecycle view.** A view is out-of-the-box, and therefore not part of the case lifecycle, when its name begins with `py` or `pz`, or when it is `CaseHistory`. Keep a component if it appears in **at least one** view that is not out-of-the-box. A component may legitimately appear in both kinds of view — one lifecycle view is enough to keep it. Drop a component only when every view it appears in is out-of-the-box.
91
91
 
92
92
  3. **Strip what is never generated, wherever it appears.** This rule is independent of point 2 and applies even to components that passed it:
93
- - Structural wrappers the SDK's registry already provides and that render nothing of their own: View, Region, FlowContainer, Assignment, CaseView, RootContainer. Templates traverse through these to reach their children rather than rendering them, so there is no visual contract to implement.
93
+ - Structural wrappers the SDK's registry already provides and that render nothing of their own: View, Region, FlowContainer, Assignment, CaseView, RootContainer, and reference nodes. Templates traverse through these to reach their children rather than rendering them, so there is no visual contract to implement. A reference node resolves a view by name — including the one an embedded record uses for its inline form — and the runtime already handles it.
94
94
  - Any component whose name starts with `px` (internal Pega infrastructure)
95
95
  - Chrome the SDK adapter provides and that is never generated: NavBar, DeferLoad, VerticalTabs, DashboardFilter
96
96
  - Chrome whose fate point 4 decides rather than the data page: ActionButtons, Stages, MultiStep
@@ -103,9 +103,15 @@ Reduce that response to a generatable list by applying the following in order. P
103
103
 
104
104
  `Stages` is the counter-example: it is case chrome, never appears in an embedded assignment, and must not be generated for an embedded flow. It stays stripped.
105
105
 
106
- 5. **Present the resolved list, and the exclusions with their reasons.** Name what will be generated, then separately name what was dropped because it appears only in out-of-the-box views, and what was stripped because it is never generated. An exclusion the user disagrees with is far easier to catch when it is visible, and a silently missing component surfaces much later as a rendering gap. **Report the starting fields here too** — either the property names the case type accepts at creation, or that none were confirmed and pre-fill will therefore be off. This is the last point before analysis and generation begin, so it is the last cheap moment for the user to correct either one. Then ask whether to proceed.
106
+ 5. **Present the resolved list, and the exclusions with their reasons.** Name what will be generated, then separately name what was dropped because it appears only in out-of-the-box views, what was stripped because it is never generated, and what was added because a selected component declares it as a registry dependency. An exclusion the user disagrees with is far easier to catch when it is visible, and a silently missing component surfaces much later as a rendering gap. **Report the starting fields here too** — either the property names the case type accepts at creation, or that none were confirmed and pre-fill will therefore be off. This is the last point before analysis and generation begin, so it is the last cheap moment for the user to correct either one. Then ask whether to proceed.
107
107
 
108
- 6. **Beyond the additions in point 4, generate only what this resolved list contains.** Do NOT add components based on assumptions about what a case type might need.
108
+ 6. **Beyond the additions in point 4, generate only what this resolved list contains, plus the registry dependencies the selected components declare.** Do NOT add components based on assumptions about what a case type might need.
109
+
110
+ Some components are orchestrators: they render no control of their own, and instead resolve other components from the registry at runtime. Reference fields and embedded data fields are the clearest examples — one of them may resolve a table, a repeating-group template, a picker, or a value display depending on how it was configured. Those dependencies are building blocks rather than fields, so they never appear in view metadata and this data page never returns them. A registry lookup that finds nothing degrades to a fallback or a blank render rather than raising an error, so an orchestrator generated on its own looks like a styling fault rather than a missing component.
111
+
112
+ A dependency named in a generated component's own skill file is therefore **not** an assumption — it is part of that component's contract. Read each selected component's skill file, collect the registry keys it declares it will resolve, and add any that are neither already registered in the project nor already in the list. The dependency is **transitive**: a dependency's own skill may declare further ones, so repeat until the set stops growing. Record which component required each addition, and report them under point 5 separately from the chrome added by point 4.
113
+
114
+ The distinction to hold: a dependency a skill file declares is required, and omitting it produces a component that cannot render. A component you believe a case type might need is not. Never widen the list on your own judgement.
109
115
 
110
116
  ### Step 0.4 — Proceed to workflows
111
117
 
@@ -127,13 +133,13 @@ Step 0 of the wire-integration skill resolves both, checks whether the named con
127
133
 
128
134
  If the user named a launch point but no render target, the skill infers it from what the control already does. If they named neither, the skill asks using surfaces drawn from the customer's own application. Never assume either one.
129
135
 
130
- | Workflow | Required inputs |
131
- | ------------------ | ------------------------------------------------------------------------------------------------- |
132
- | Analyze | Case type class + access to the customer's codebase |
133
- | Generate | Case type class + component list + Design Profile (or permission to create one) |
134
- | Full embedded flow | Case type class + server-resolved component list + codebase access + launch point + render target |
135
- | Wire integration | Case type class + generated `pega-components/` folder must exist + launch point + render target |
136
- | Verify integration | A wired integration + a human available to authenticate when the flow reaches the Pega login form |
136
+ | Workflow | Required inputs |
137
+ | ------------------ | --------------------------------------------------------------------------------------------------------------------------- |
138
+ | Analyze | Case type class + access to the customer's codebase |
139
+ | Generate | Case type class + component list + Design Profile (or permission to create one) |
140
+ | Full embedded flow | Case type class + server-resolved component list + codebase access + launch point + render target |
141
+ | Wire integration | Case type class + generated components folder (location resolved during analysis) must exist + launch point + render target |
142
+ | Verify integration | A wired integration + a human available to authenticate when the flow reaches the Pega login form |
137
143
 
138
144
  ---
139
145
 
@@ -143,12 +149,12 @@ If the user named a launch point but no render target, the skill infers it from
143
149
  2. **Always read before executing** — read the skill or prompt file fully before acting on it. Never paraphrase from memory.
144
150
  3. **Follow steps in order** — each skill/prompt defines numbered steps. Execute them sequentially without skipping.
145
151
  4. **Design Profile is the bridge** — the analysis skill produces it, the generation prompt consumes it. If generation is requested and no profile exists, analysis must run first. Step 0 of the wiring skill consumes it too, when it has to ask where the flow should render — which is why analysis precedes that gate rather than following it.
146
- 5. **Never modify the customer's existing code** except at the seams that the wiring and verification skills enumerate. The `pega-components/` folder is purely additive, and a failing verification check is never permission to edit customer code outside those seams to make it pass.
152
+ 5. **Never modify the customer's existing code** except at the seams that the wiring and verification skills enumerate. The generated components folder (location resolved during analysis and recorded in the Design Profile) is purely additive, and a failing verification check is never permission to edit customer code outside those seams to make it pass.
147
153
  6. **Component skills are authoritative** — the behavioral contracts in `{{SKILL_DIR}}/field-skills/`, `template-skills/`, `widget-skills/`, `design-system-extension-skills/`, and `infra-skills/` define what each component must do. These are non-negotiable.
148
154
  7. **Adapt to the customer's framework** — the skills and prompts are framework-agnostic. Determine the customer's framework from their project configuration and apply conventions accordingly.
149
155
  8. **Verification is mandatory, and it is not only static** — the generation prompt's checks confirm the generated files are well-formed. They do not confirm the flow runs. Whenever the integration has been wired, finish with `{{SKILL_DIR}}/embedded-flow/run-and-verify-integration.md` and report how far it got. Never declare success on static checks alone.
150
156
  9. **Case type class must be used** — the confirmed case type class must be written into `sdk-config.json` (in the `appMashupCaseType` field) and used in the bootstrap/wiring module when calling the mashup API to create a case.
151
- 10. **Only generate server-resolved components** — generate exactly what Step 0.3 produced: the components the case type's data page returned and that survived its filters, plus the additions point 4 names (`FieldValueList`, `ActionButtons`, and `MultiStep` for a multi-step case). Do NOT add anything else based on assumptions about what a case type might need.
157
+ 10. **Only generate server-resolved components, their declared dependencies, and the named chrome** — generate exactly what Step 0.3 produced: the components the case type's data page returned and that survived its filters, the additions point 4 names (`FieldValueList`, `ActionButtons`, and `MultiStep` for a multi-step case), and the registry dependencies that the selected components' own skill files declare, resolved transitively per point 6. Do NOT add anything else based on assumptions about what a case type might need.
152
158
  11. **Never silently replace existing behaviour, and never assume where the flow renders** — before anything is written, resolve the launch point and the render target. If the named control already does something, ask whether to override; if they decline, stop the whole flow, do not embed on a different control, and do not leave partial edits behind. If the render target was never stated and cannot be inherited from the control's existing behaviour, ask. See Step 0 of the wire-integration skill.
153
159
  12. **Never handle credentials** — when verification reaches the Pega login form in the browser, a human signs in at a visible window. Do not request, capture, log, echo, or store those credentials, at any stage and under any failure condition.
154
160
 
@@ -164,6 +170,7 @@ If the user named a launch point but no render target, the skill infers it from
164
170
  | Every component is removed by the lifecycle filter | The case type may have no lifecycle views. Show the views that were returned, explain that all of them are out-of-the-box, and ask the user to confirm before proceeding |
165
171
  | Customer's project uses an unfamiliar framework | Read the framework's documentation (if accessible) + rely heavily on the representative components from the Design Profile |
166
172
  | A requested component has no skill file | The name is not a Pega component name. Resolve it to a canonical one using the staged process in Step 1 of the generation prompt (normalized name, then alias table, then behaviour class, then ask the user), implement that component's skill, and tell the user which substitution you made |
173
+ | A generated component renders blank or shows the fallback | Most likely a registry dependency it resolves at runtime was never generated. Orchestrator components fail this way silently. Re-read that component's skill file, collect the registry keys it declares, and confirm each one is registered — see point 6 of Step 0.3. Do not treat it as a styling fault |
167
174
  | Design Profile extraction finds no clear patterns | Ask the user to point to specific example components in their codebase |
168
175
  | Generated component fails type check after 2 retries | Report the specific error, show the problematic code, and ask the user for guidance |
169
176
  | Customer uses multiple design systems in one project | Ask which one should be used for the Pega components, or default to the one used for form elements |
@@ -47,7 +47,7 @@ Pega SDK packages (`.tgz` files) have been added to the project root and referen
47
47
 
48
48
  ### SDK Configuration
49
49
 
50
- `sdk-config.json` contains connection details for the Pega server. The AI assistant gathers the server URL, app alias, OAuth client ID, and (when the MCP configuration requires one) a client secret from the user in chat the first time a workflow needs them, and fills them in automatically — see `{{SKILL_DIR}}/connect-pega-server.md`. The case type is resolved from the server during the embedded flow itself.
50
+ The browser-served `sdk-config.json` contains non-secret Pega server connection details. The first workflow that needs a live server runs `{{SKILL_DIR}}/connect-pega-server.md`, which resolves values from the active SDK config, MCP config, and environment files, then asks once for all missing non-secret values. The user may provide those values in chat or update an allowed file; the assistant synchronizes every applicable destination. Only a Cursor-style MCP entry requires a Pega MCP client secret, which must come from a private environment variable and is never requested in chat or written to `sdk-config.json`. The browser SDK's OAuth grant configuration remains the user's choice. The case type is resolved from the server during the embedded flow itself.
51
51
 
52
52
  ---
53
53
 
@@ -100,7 +100,7 @@ Most infrastructure components ship from the SDK and are never generated. Three
100
100
 
101
101
  ## 5. Rules
102
102
 
103
- 1. **Never modify the customer's existing components during analysis or generation** — the `pega-components/` folder is additive. Wiring is the exception: it edits the integration seams listed in the wire-integration skill, plus the verification tooling seams listed in the run-and-verify-integration skill. A failing verification check never widens that set
103
+ 1. **Never modify the customer's existing components during analysis or generation** — the generated components folder (location resolved during analysis and recorded in the Design Profile) is additive. Wiring is the exception: it edits the integration seams listed in the wire-integration skill, plus the verification tooling seams listed in the run-and-verify-integration skill. A failing verification check never widens that set
104
104
  2. **Match the customer's conventions** — generated code should look like the customer wrote it
105
105
  3. **Satisfy the Pega behavioral contract** — every component must implement what its skill file requires
106
106
  4. **Use the customer's design system** — never introduce a new UI library
@@ -10,7 +10,7 @@ This is a **reference implementation** — not a framework. The UI components (f
10
10
 
11
11
  ### SDK Configuration
12
12
 
13
- `sdk-config.json` and the generated MCP config file are scaffolded blank/placeholder — connection details are never collected at scaffold time. The AI assistant gathers the server URL, app alias, OAuth client ID, and MCP rule details from the user in chat the first time a workflow needs a live Pega server (e.g. resolving portals/components in Section 15), and fills them into both files automatically — see `{{SKILL_DIR}}/connect-pega-server.md`.
13
+ `sdk-config.json` and the generated MCP config file are scaffolded blank/placeholder — connection details are never collected at scaffold time. The first workflow that needs a live Pega server runs `{{SKILL_DIR}}/connect-pega-server.md`, which resolves values from the active SDK config, MCP config, and environment files, then asks once for all missing non-secret values. The user may provide those values in chat or update an allowed file; the assistant synchronizes every applicable destination. A Pega MCP client secret is required only when the active MCP entry has `auth.clientSecret` (currently Cursor), must come from a private environment variable, and is never requested in chat or written to browser-served SDK configuration.
14
14
 
15
15
  ---
16
16
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- ai-globs: **/designSystemExtension/**/*
2
+ ai-globs: **/{AlertBanner,Banner,CaseSummaryFields,DetailsFields,FieldGroup,FieldGroupList,FieldValueList,Operator,Pulse,RichTextEditor,WssQuickCreate}/**/*
3
3
  ---
4
4
 
5
5
  # Design System Extension Component Rules
@@ -10,7 +10,7 @@ When generating or modifying Pega components in the `pega-components/` folder (c
10
10
 
11
11
  ## Context
12
12
 
13
- These components are different from the reference app's sample components. They are generated to live **inside a customer's existing project**, using the customer's design system so that they are visually indistinguishable from the rest of their UI. The Design Profile (`.design-profile.md`) in the same folder describes the customer's visual conventions.
13
+ These components are different from the reference app's sample components. They are generated to live **inside a customer's existing project**, using the customer's design system so that they are visually indistinguishable from the rest of their UI. The Design Profile (`docs/design-profile.md` at the project root) describes the customer's visual conventions.
14
14
 
15
15
  ---
16
16
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- ai-globs: **/field/**/*
2
+ ai-globs: **/{AutoComplete,CancelAlert,Checkbox,Currency,Date,DateTime,Decimal,Dropdown,Email,Group,Integer,Location,Multiselect,ObjectReference,Percentage,Phone,RadioButtons,RichText,ScalarList,SelectableCard,SemanticLink,TextArea,TextContent,TextInput,Time,URL,UserReference}/**/*
3
3
  ---
4
4
 
5
5
  # Field Component Rules
@@ -1,5 +1,5 @@
1
1
  ---
2
- ai-globs: **/infra/**/*
2
+ ai-globs: **/{ActionButtons,DashboardFilter,DeferLoad,MultiStep,NavBar,Stages,VerticalTabs}/**/*
3
3
  ---
4
4
 
5
5
  # Infrastructure (Chrome) Component Rules
@@ -1,5 +1,5 @@
1
1
  ---
2
- ai-globs: **/template/**/*
2
+ ai-globs: **/{AdvancedSearch,AppShell,BannerPage,CaseSummary,CaseView,CaseViewActionsMenu,Confirmation,DataReference,DefaultForm,DefaultPage,Details,FieldGroupTemplate,HierarchicalForm,InlineDashboard,InlineDashboardPage,ListPage,ListView,MultiReferenceReadOnly,NarrowWide,ObjectPage,OneColumn,PromotedFilters,SelfServiceCaseView,SimpleTable,SingleReferenceReadOnly,SubTabs,TwoColumn,WideNarrow,WssNavBar,SearchForm,SearchGroups}/**/*
3
3
  ---
4
4
 
5
5
  # Template Component Rules
@@ -1,5 +1,5 @@
1
1
  ---
2
- ai-globs: **/widget/**/*
2
+ ai-globs: **/{AppAnnouncement,Attachment,CaseHistory,FileUtility,Followers,QuickCreate,SummaryItem,SummaryList,ToDo,ActionButtonsForFileUtil}/**/*
3
3
  ---
4
4
 
5
5
  # Widget Component Rules
@@ -29,6 +29,11 @@
29
29
  { "name": "Decimal", "path": "src/components/field/Decimal" },
30
30
  { "name": "Dropdown", "path": "src/components/field/Dropdown" },
31
31
  { "name": "Email", "path": "src/components/field/Email" },
32
+ { "name": "EmbeddedData", "path": "src/components/field/EmbeddedData" },
33
+ {
34
+ "name": "EmbeddedDataMulti",
35
+ "path": "src/components/field/EmbeddedDataMulti"
36
+ },
32
37
  { "name": "Group", "path": "src/components/field/Group" },
33
38
  { "name": "Integer", "path": "src/components/field/Integer" },
34
39
  { "name": "Location", "path": "src/components/field/Location" },
@@ -274,6 +279,8 @@
274
279
  "web address": ["URL"],
275
280
  "formatted rich text entry": ["RichText", "RichTextEditor"],
276
281
  "list of simple values": ["ScalarList"],
282
+ "a record stored on the case itself": ["EmbeddedData"],
283
+ "a list of records stored on the case itself": ["EmbeddedDataMulti"],
277
284
  "reference to another record": ["ObjectReference"],
278
285
  "reference to a person": ["UserReference", "Operator"],
279
286
  "geographic location": ["Location"],
@@ -105,7 +105,7 @@ Record the visual treatment only. Generated components read validation messages
105
105
 
106
106
  ### 4. File Conventions
107
107
 
108
- **Context only.** Generated components use Pega-owned paths and names (`pega-components/{type}/{ComponentName}/`), so Structure and Naming below do not apply to them. Re-exports, test location, and style location still inform co-located files.
108
+ **Context only.** Generated components use Pega-owned paths and names (`{output_path}/{ComponentName}/`), so Structure and Naming below do not apply to them. Re-exports, test location, and style location still inform co-located files.
109
109
 
110
110
  | Field | Description |
111
111
  | -------------- | ------------------------------------------------------- |
@@ -126,7 +126,7 @@ Record the visual treatment only. Generated components read validation messages
126
126
  | Default/named preference | Which import style dominates |
127
127
  | Style imports | How stylesheets or style modules are imported |
128
128
 
129
- Generated components import the customer's UI primitives through their path aliases. Relative paths are used only _within_ `pega-components/` — for shared helpers, barrel files, and the registry file's component imports. One Pega component is never imported into another to render it; that always goes through the component registry.
129
+ Generated components import the customer's UI primitives through their path aliases. Relative paths are used only _within_ the generated output folder (`{output_path}`) — for shared helpers, barrel files, and the registry file's component imports. One Pega component is never imported into another to render it; that always goes through the component registry.
130
130
 
131
131
  ---
132
132
 
@@ -57,7 +57,7 @@ Once design system, base folder, and type scope are resolved, continue to Step 0
57
57
 
58
58
  ### 0.5.0 — Ensure the Pega server connection is configured
59
59
 
60
- Before executing any data source below, read and execute `{{SKILL_DIR}}/connect-pega-server.md`. It is a no-op when the connection is already configured, and otherwise gathers the missing values from the user and writes them into the MCP config and `sdk-config.json` before this step continues.
60
+ Before executing any data source below, read and execute `{{SKILL_DIR}}/connect-pega-server.md`. It is a no-op when the connection is already configured. Otherwise, it resolves existing values from the active MCP config, application `sdk-config.json`, and environment files; asks once for every missing non-secret value; and writes chat-provided values to every applicable file. It may pause for an environment-sourced Pega MCP client secret (Cursor only) or an MCP reconnect. After the user retries, rerun the gate before executing any data source.
61
61
 
62
62
  ### 0.5.1 — Resolve the portal
63
63
 
@@ -193,7 +193,9 @@ Intersect the confirmed selection with the type scope from Step 0, group the res
193
193
  - Step 3 checks for existing files only within the generation set.
194
194
  - Steps 4–8 each generate only the components of their type that are in the generation set, and are skipped entirely when it holds none of their type.
195
195
 
196
- Generate nothing outside the generation set. Do not add components based on assumptions about what a portal might need.
196
+ Generate nothing outside the generation set, with one exception: the registry dependencies that the selected components' own skill files declare. Some components are orchestrators — they render no control of their own and instead resolve other components from the registry at runtime, as reference and embedded data fields do. Those dependencies are building blocks rather than fields, so they never appear in view metadata and no data source above returns them, and a registry lookup that finds nothing degrades to a blank render rather than raising an error. Read each selected component's skill file, collect the registry keys it declares it will resolve, and add any that are neither already registered nor already in the set; repeat until the set stops growing, since a dependency's own skill may declare further ones. Report these additions in the Step 9 summary, naming which component required each.
197
+
198
+ A dependency a skill file declares is required. A component you believe a portal might need is not — do not add components based on assumptions about what a portal might need.
197
199
 
198
200
  ---
199
201
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- ai-description: "Generate Pega components styled to match a customer's existing application — given a component list and a Design Profile, produces a pega-components/ folder 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"
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
5
  ## Step 0 — Resolve missing information
@@ -7,8 +7,8 @@ ai-description: "Generate Pega components styled to match a customer's existing
7
7
  Read the user's message carefully. Extract:
8
8
 
9
9
  - **Component list** — the Pega component names to generate (e.g., `TextInput`, `Dropdown`, `DefaultForm`, `TwoColumn`, `ToDo`)
10
- - **Design Profile location** — the path to the `.design-profile.md` file (default: `pega-components/.design-profile.md`)
11
- - **Output path** — where to write the generated components (default: `pega-components/`)
10
+ - **Design Profile location** — always `docs/design-profile.md` at the project root. This location is fixed and never moves with the output path
11
+ - **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
12
 
13
13
  The **component list** is required. If it is not provided and cannot be inferred from prior conversation context, stop and ask the user.
14
14
 
@@ -77,7 +77,7 @@ After every name is resolved, group the canonical names by type so you can read
77
77
 
78
78
  Read the following **once** before the generation loop:
79
79
 
80
- 1. **The Design Profile** — read the full `.design-profile.md`. Its design tokens, styling convention, and validation display convention are authoritative and must be replicated. Its component patterns (input interface, state management, event handling) and file conventions describe the customer's own code — read them for context, but generated components follow the Pega contract and Pega-owned paths instead.
80
+ 1. **The Design Profile** — read the full `docs/design-profile.md`. Its design tokens, styling convention, and validation display convention are authoritative and must be replicated. Its component patterns (input interface, state management, event handling) and file conventions describe the customer's own code — read them for context, but generated components follow the Pega contract and Pega-owned paths instead.
81
81
 
82
82
  2. **General type-level skills** — for each component type present in the grouped list, read the corresponding general skill:
83
83
 
@@ -161,17 +161,16 @@ Create the component implementation that satisfies **both**:
161
161
 
162
162
  State, events, validation wiring, and prop contracts are deliberately absent from that list — they come from the Pega behavioral contract above, no matter how the customer writes their own forms. A customer whose own screens use a form library does not change how a generated component holds a value or commits it.
163
163
 
164
- **Exception — the output path is not the customer's to choose.** `pega-components/` is a generated, Pega-owned tree that the customer never authors in, so its layout is fixed rather than inferred from the Design Profile. Write the component to:
164
+ **Exception — the layout beneath `{output_path}` is not the customer's to choose.** The folder the user resolved during analysis is a generated, Pega-owned tree that the customer never authors in, so what goes underneath it is fixed rather than inferred from the Design Profile. Write the component to:
165
165
 
166
166
  ```
167
- {output_path}/{type}/{ComponentName}/{ComponentName}.{ext}
167
+ {output_path}/{ComponentName}/{ComponentName}.{ext}
168
168
  ```
169
169
 
170
- - `{type}` is literal — `field`, `template`, `widget`, `designSystemExtension`, or `infra` — and is never renamed or flattened. The instruction globs match on it.
171
- - `{ComponentName}` is the canonical Pega component name resolved in Step 1, verbatim, for both the folder and the implementation file, whatever the customer's naming style is. `Checkbox` produces `Checkbox/Checkbox.*`, never `checkbox/CheckboxField.*`; `Date` produces `Date/Date.*`, never `date/DateField.*`.
170
+ - `{ComponentName}` is the canonical Pega component name resolved in Step 1, verbatim, for both the folder and the implementation file, whatever the customer's naming style is. `Checkbox` produces `Checkbox/Checkbox.*`, never `checkbox/CheckboxField.*`; `Date` produces `Date/Date.*`, never `date/DateField.*`. Components are never grouped into a further `field`/`template`/`widget`/`designSystemExtension`/`infra` subfolder — every component's own folder sits directly under `{output_path}`.
172
171
  - `{ext}` follows the customer's framework, not their file-naming style.
173
172
 
174
- Deterministic paths are what let tooling, globs, and regeneration find components again. Customer conventions govern the _contents_ of these files, not their location or name. If the customer's repo lints file names, exclude `pega-components/` from that rule rather than bending the paths.
173
+ Deterministic paths are what let tooling and regeneration find components again. Customer conventions govern the _contents_ of these files, not their location or name. If the customer's repo lints file names, exclude `{output_path}` from that rule rather than bending the paths.
175
174
 
176
175
  ### 4d. Register the component
177
176
 
@@ -277,7 +276,7 @@ Read the generated registry file and confirm:
277
276
  Verify that every import in the generated files resolves to either:
278
277
 
279
278
  - A package present in the customer's dependency manifest
280
- - A file within the generated `pega-components/` folder
279
+ - A file within the generated components folder (`{output_path}`)
281
280
  - The Pega SDK packages (added in integration wiring)
282
281
 
283
282
  If any import references a package not in the project, either:
@@ -304,7 +303,7 @@ Whenever `Requested Name` and `Resolved As` differ, say so in your reply as well
304
303
 
305
304
  1. **Never invent UI primitives** — only use components available in the customer's UI library or their custom component set
306
305
  2. **Never skip behavioral requirements** — every item in the skill file's contract must be implemented, even if the customer's equivalent doesn't natively support it (add the behavior manually)
307
- 3. **Never break existing code** — the generated `pega-components/` folder is additive; never modify the customer's existing components. This prompt does not wire the integration or verify it — those are separate steps, and they are the only ones permitted to edit the customer's files, confined to the seams their skills enumerate
306
+ 3. **Never break existing code** — the generated components folder (`{output_path}`) is additive; never modify the customer's existing components. This prompt does not wire the integration or verify it — those are separate steps, and they are the only ones permitted to edit the customer's files, confined to the seams their skills enumerate
308
307
  4. **Never hardcode design tokens** — always reference the customer's token system (variables, constants, theme values)
309
308
  5. **Respect the customer's code conventions** — the contents of generated files should look like the customer wrote them
310
309
  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