@salesforce/afv-skills 1.30.0 → 1.32.0

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 (126) hide show
  1. package/package.json +1 -1
  2. package/skills/agentforce-bot-upgrade/SKILL.md +217 -0
  3. package/skills/agentforce-bot-upgrade/references/extraction-blueprint.md +242 -0
  4. package/skills/agentforce-bot-upgrade/references/generate-agent-spec.md +128 -0
  5. package/skills/agentforce-bot-upgrade/references/handoff-output-format.md +208 -0
  6. package/skills/agentforce-bot-upgrade/references/input-contract.md +101 -0
  7. package/skills/agentforce-bot-upgrade/references/mapping-rules.md +113 -0
  8. package/skills/agentforce-bot-upgrade/references/planner-workflow-reference.md +78 -0
  9. package/skills/agentforce-bot-upgrade/references/post-conversion-enhancements-reference.md +67 -0
  10. package/skills/agentforce-bot-upgrade/references/quality-checklist.md +33 -0
  11. package/skills/agentforce-bot-upgrade/references/sf-cli-bot-reference.md +116 -0
  12. package/skills/data360-code-extension-generate/SKILL.md +15 -2
  13. package/skills/dx-devops-work-item-manage/SKILL.md +270 -0
  14. package/skills/dx-devops-work-item-manage/examples/common-workflows.md +479 -0
  15. package/skills/dx-devops-work-item-manage/references/cli-commands.md +476 -0
  16. package/skills/dx-org-manage/SKILL.md +8 -5
  17. package/skills/dx-org-trial-expiration-check/SKILL.md +239 -0
  18. package/skills/dx-org-trial-expiration-check/scripts/check_expiration.sh +588 -0
  19. package/skills/dx-pkg-post-install-configure/SKILL.md +184 -0
  20. package/skills/experience-ui-bundle-app-coordinate/SKILL.md +202 -35
  21. package/skills/experience-ui-bundle-app-coordinate/scripts/check-hosting-target.sh +26 -0
  22. package/skills/experience-ui-bundle-app-coordinate/scripts/check-sfdx-project.sh +15 -0
  23. package/skills/experience-ui-bundle-custom-app-generate/SKILL.md +29 -5
  24. package/skills/experience-ui-bundle-custom-app-generate/references/configure-metadata-custom-application.md +1 -1
  25. package/skills/experience-ui-bundle-custom-app-generate/scripts/resolve-uibundle-path.sh +30 -0
  26. package/skills/experience-ui-bundle-features-generate/SKILL.md +86 -11
  27. package/skills/experience-ui-bundle-features-generate/references/conflict-resolution-schema.json +20 -0
  28. package/skills/experience-ui-bundle-features-generate/scripts/verify-react-bundle.sh +14 -0
  29. package/skills/experience-ui-bundle-frontend-generate/SKILL.md +6 -1
  30. package/skills/experience-ui-bundle-frontend-generate/references/component.md +34 -1
  31. package/skills/experience-ui-bundle-frontend-generate/references/page.md +1 -1
  32. package/skills/experience-ui-bundle-metadata-generate/SKILL.md +19 -8
  33. package/skills/experience-ui-bundle-metadata-generate/references/csp-metadata-format.md +2 -2
  34. package/skills/experience-ui-bundle-metadata-generate/scripts/check-api-version.sh +30 -0
  35. package/skills/experience-ui-bundle-project-generate/SKILL.md +111 -0
  36. package/skills/experience-ui-bundle-project-generate/scripts/flatten-project.mjs +33 -0
  37. package/skills/platform-custom-field-generate/SKILL.md +12 -11
  38. package/skills/platform-custom-field-generate/references/advanced-picklists.md +17 -17
  39. package/skills/platform-custom-lightning-type-generate/SKILL.md +9 -14
  40. package/skills/platform-custom-lightning-type-generate/references/widget-rendition.md +27 -111
  41. package/skills/platform-custom-report-type-generate/SKILL.md +259 -0
  42. package/skills/platform-custom-report-type-generate/examples/AccountProjectsWithTasks.reportType-meta.xml +51 -0
  43. package/skills/platform-custom-report-type-generate/examples/AccountsWithIndustry.reportType-meta.xml +27 -0
  44. package/skills/platform-custom-report-type-generate/examples/AccountsWithProjects.reportType-meta.xml +44 -0
  45. package/skills/platform-custom-report-type-generate/references/category-values.md +32 -0
  46. package/skills/platform-custom-report-type-generate/references/errors-and-troubleshooting.md +24 -0
  47. package/skills/platform-dataspace-access-configure/SKILL.md +318 -0
  48. package/skills/platform-docs-get/SKILL.md +4 -0
  49. package/skills/platform-docs-get/scripts/extract_salesforce_doc.py +78 -13
  50. package/skills/platform-encryption-configure/SKILL.md +122 -0
  51. package/skills/platform-encryption-configure/assets/EncryptionKey.settings-meta.xml +17 -0
  52. package/skills/platform-encryption-configure/assets/PlatformEncryption.settings-meta.xml +15 -0
  53. package/skills/platform-encryption-configure/assets/encrypted-field.field-meta.xml +22 -0
  54. package/skills/platform-encryption-configure/examples/cache-only-keys.settings-meta.xml +11 -0
  55. package/skills/platform-encryption-configure/references/encryption-schemes.md +34 -0
  56. package/skills/platform-encryption-configure/references/key-models.md +34 -0
  57. package/skills/platform-encryption-configure/references/tenant-secret-lifecycle.md +23 -0
  58. package/skills/platform-encryption-configure/scripts/validate-encryption-metadata.sh +54 -0
  59. package/skills/platform-lightning-type-widget-coordinate/SKILL.md +214 -0
  60. package/skills/platform-lightning-type-widget-coordinate/examples/existing-lightning-type-with-widget-prompt.md +80 -0
  61. package/skills/platform-lightning-type-widget-coordinate/examples/new-lightning-type-with-widget-prompt.md +75 -0
  62. package/skills/platform-lightning-type-widget-coordinate/references/build-plan-format.md +67 -0
  63. package/skills/platform-lightning-type-widget-coordinate/references/lightning-type-discovery.md +124 -0
  64. package/skills/platform-lightning-type-widget-coordinate/references/validation-gates.md +130 -0
  65. package/skills/platform-metadata-api-context-get/SKILL.md +13 -10
  66. package/skills/platform-sharing-owd-configure/SKILL.md +142 -0
  67. package/skills/platform-sharing-owd-configure/examples/get_owd_output.md +38 -0
  68. package/skills/platform-sharing-owd-configure/examples/update_owd_output.md +44 -0
  69. package/skills/platform-sharing-owd-configure/references/access_levels.md +49 -0
  70. package/skills/platform-sharing-owd-configure/references/metadata_api_approach.md +69 -0
  71. package/skills/platform-sharing-rules-generate/SKILL.md +89 -19
  72. package/skills/platform-sharing-rules-generate/examples/test-cases.md +381 -0
  73. package/skills/platform-widget-generate/SKILL.md +241 -0
  74. package/skills/platform-widget-generate/examples/conditional.json +73 -0
  75. package/skills/platform-widget-generate/examples/list-with-foreach.json +66 -0
  76. package/skills/platform-widget-generate/examples/single-object.json +64 -0
  77. package/skills/platform-widget-generate/references/schema-from-lightning-type.md +76 -0
  78. package/skills/platform-widget-generate/references/widget-bundle-layout.md +116 -0
  79. package/skills/platform-widget-generate/references/widget-meta-directives.md +130 -0
  80. package/skills/sales-agentforce-pipeline-management-configure/SKILL.md +268 -0
  81. package/skills/sales-agentforce-pipeline-management-configure/assets/field-completion-template.genAiPromptTemplate-meta.xml +141 -0
  82. package/skills/sales-agentforce-pipeline-management-configure/assets/pipeline_management_flow.flow-meta.xml +548 -0
  83. package/skills/sales-agentforce-pipeline-management-configure/assets/sales_management_agent.agent +2938 -0
  84. package/skills/sales-agentforce-pipeline-management-configure/assets/sales_management_agent.bundle-meta.xml +4 -0
  85. package/skills/sales-agentforce-pipeline-management-configure/assets/sfdx-project.json +12 -0
  86. package/skills/sales-agentforce-pipeline-management-configure/assets/stage-descriptions/bant.txt +11 -0
  87. package/skills/sales-agentforce-pipeline-management-configure/assets/stage-descriptions/meddic.txt +11 -0
  88. package/skills/sales-agentforce-pipeline-management-configure/assets/stage-descriptions/spiced.txt +11 -0
  89. package/skills/sales-agentforce-pipeline-management-configure/examples/custom-prompt-instructions.md +317 -0
  90. package/skills/sales-agentforce-pipeline-management-configure/references/admin-communication.md +355 -0
  91. package/skills/sales-agentforce-pipeline-management-configure/references/agent-creation.md +383 -0
  92. package/skills/sales-agentforce-pipeline-management-configure/references/auth-and-cli.md +146 -0
  93. package/skills/sales-agentforce-pipeline-management-configure/references/automation-matrix.md +23 -0
  94. package/skills/sales-agentforce-pipeline-management-configure/references/autonomous-updates.md +215 -0
  95. package/skills/sales-agentforce-pipeline-management-configure/references/canonical-agent-path.md +75 -0
  96. package/skills/sales-agentforce-pipeline-management-configure/references/data-sources.md +155 -0
  97. package/skills/sales-agentforce-pipeline-management-configure/references/field-completion-prompt-template.md +120 -0
  98. package/skills/sales-agentforce-pipeline-management-configure/references/field-completion-prompts.md +149 -0
  99. package/skills/sales-agentforce-pipeline-management-configure/references/flags.md +13 -0
  100. package/skills/sales-agentforce-pipeline-management-configure/references/flow-clone-from-template.md +447 -0
  101. package/skills/sales-agentforce-pipeline-management-configure/references/metadata-inventory.md +330 -0
  102. package/skills/sales-agentforce-pipeline-management-configure/references/opportunity-stages.md +246 -0
  103. package/skills/sales-agentforce-pipeline-management-configure/references/repair-diagnostics.md +265 -0
  104. package/skills/sales-agentforce-pipeline-management-configure/references/setup-order.md +263 -0
  105. package/skills/sales-agentforce-pipeline-management-configure/references/soap-api-enablement.md +528 -0
  106. package/skills/sales-agentforce-pipeline-management-configure/scripts/CHANGES.md +180 -0
  107. package/skills/sales-agentforce-pipeline-management-configure/scripts/README.md +56 -0
  108. package/skills/sales-agentforce-pipeline-management-configure/scripts/add-field-suggestion.sh +679 -0
  109. package/skills/sales-agentforce-pipeline-management-configure/scripts/create-agent.sh +302 -0
  110. package/skills/sales-agentforce-pipeline-management-configure/scripts/create-flow.sh +250 -0
  111. package/skills/sales-agentforce-pipeline-management-configure/scripts/define-agent-access.sh +430 -0
  112. package/skills/sales-agentforce-pipeline-management-configure/scripts/deploy-settings.sh +77 -0
  113. package/skills/sales-agentforce-pipeline-management-configure/scripts/enable-deal-agent.sh +241 -0
  114. package/skills/sales-agentforce-pipeline-management-configure/scripts/enable-prerequisites.sh +538 -0
  115. package/skills/sales-agentforce-pipeline-management-configure/scripts/flow-debug-and-verify.sh +385 -0
  116. package/skills/sales-agentforce-pipeline-management-configure/scripts/retrieve-settings.sh +131 -0
  117. package/skills/sales-agentforce-pipeline-management-configure/scripts/setup-all.sh +2791 -0
  118. package/skills/sales-agentforce-pipeline-management-configure/scripts/shared/agent-bundle-publish.sh +189 -0
  119. package/skills/sales-agentforce-pipeline-management-configure/scripts/shared/agent-detection.sh +239 -0
  120. package/skills/sales-agentforce-pipeline-management-configure/scripts/shared/flow-builder.sh +238 -0
  121. package/skills/sales-agentforce-pipeline-management-configure/scripts/shared/psg.sh +48 -0
  122. package/skills/sales-agentforce-pipeline-management-configure/scripts/shared/soap.sh +140 -0
  123. package/skills/sales-agentforce-pipeline-management-configure/scripts/shared/stage-descriptions.sh +448 -0
  124. package/skills/sales-agentforce-pipeline-management-configure/scripts/shared/test-opp.sh +166 -0
  125. package/skills/sales-agentforce-pipeline-management-configure/scripts/verify-all.sh +636 -0
  126. package/skills/sales-agentforce-pipeline-management-configure/scripts/verify-prompt-generation.sh +346 -0
@@ -4,6 +4,7 @@ description: "Use this skill when users need to create, generate, or validate Sa
4
4
  metadata:
5
5
  version: "1.0"
6
6
  minApiVersion: "51.0"
7
+ relatedSkills: ["platform-value-set-generate", "platform-validation-rule-generate"]
7
8
  ---
8
9
 
9
10
  # Salesforce Custom Field Generator and Validator
@@ -20,7 +21,7 @@ Every generated field must include these tags:
20
21
 
21
22
  | Attribute | Requirement | Notes |
22
23
  |-----------|-------------|-------|
23
- | `<fullName>` | Required | **Field** name only: derive from `<label>` — capitalize each word, replace spaces with `_`, append `__c`. Must start with a letter. E.g., label `Total Contract Value` → `Total_Contract_Value__c`. ⚠️ This rule is for the FIELD name. **Picklist VALUE `<fullName>` is different — keep it exactly as the user spelled it, spaces and all, no `__c`** (e.g. `Closed Won`, NOT `Closed_Won`). See [`references/advanced-picklists.md`](references/advanced-picklists.md) (ref §3). |
24
+ | `<fullName>` | Required | **Field** name only: derive from `<label>` — capitalize each word, replace spaces with `_`, append `__c`. Must start with a letter. E.g., label `Total Contract Value` → `Total_Contract_Value__c`. This rule is for the FIELD name. **Picklist VALUE `<fullName>` is different — keep it exactly as the user spelled it, spaces and all, no `__c`** (e.g. `Closed Won`, NOT `Closed_Won`). See [`references/advanced-picklists.md`](references/advanced-picklists.md) (ref §3). |
24
25
  | `<label>` | Required | The UI name (Title Case) |
25
26
  | `<description>` | Always include | Explain the business reason *why* this field exists. |
26
27
  | `<inlineHelpText>` | Always include | Actionable end-user guidance that adds value beyond the label (e.g., "Enter the value in USD including tax", not "The amount"). |
@@ -49,7 +50,7 @@ To ensure deployment success, follow these mathematical constraints:
49
50
 
50
51
  ### The "Fixed 255" Rule
51
52
 
52
- **TextArea: always include `<length>255</length>` exactly** this literal value is required by the Metadata API and **omitting it fails deployment**, even though the UI exposes no length control. Unlike every other type where `length` is a value you calculate, TextArea's is a fixed constant.
53
+ **TextArea: do NOT include `<length>`**the Metadata API fixes the length at 255 implicitly and **rejects an explicit `<length>` value** with "Can not specify 'length' for a CustomField of type TextArea". Omit `<length>` entirely; the field only needs `<fullName>`, `<label>`, and `<type>TextArea</type>`.
53
54
 
54
55
  ### Visible Lines
55
56
 
@@ -76,7 +77,7 @@ Mandatory for Long/Rich text and Multi-select picklists to control UI height.
76
77
  | Phone | `Phone` | Standardizes phone number formatting |
77
78
  | Picklist | `Picklist` | `valueSet` containing EITHER `valueSetDefinition` (inline) OR `valueSetName` (reference); `restricted` (see "Picklist `restricted` default" below; advanced cases in §3.4) |
78
79
  | Text | `Text` | `length` (Max 255) |
79
- | Text Area | `TextArea` | `<length>255</length>` |
80
+ | Text Area | `TextArea` | None — do NOT include `<length>`; the API fixes length at 255 implicitly |
80
81
  | Text (Long) | `LongTextArea` | `length`, `visibleLines` (default 3) |
81
82
  | Text (Rich) | `Html` | `length`, `visibleLines` (default 25) |
82
83
  | Time | `Time` | Stores time only (no date) |
@@ -112,7 +113,7 @@ Mandatory for Long/Rich text and Multi-select picklists to control UI height.
112
113
 
113
114
  ### 3.4 Advanced Picklists
114
115
 
115
- The inline `<valueSetDefinition>` above is the simple case. Full rules and worked ✅/❌
116
+ The inline `<valueSetDefinition>` above is the simple case. Full rules and worked correct/incorrect
116
117
  examples for everything below are in
117
118
  [`references/advanced-picklists.md`](references/advanced-picklists.md) — load it for any
118
119
  non-trivial picklist. Section numbers in parentheses below (e.g. "ref §1") point to that
@@ -166,12 +167,12 @@ Master-Detail fields have **strict attribute restrictions** that differ from Loo
166
167
 
167
168
  | Attribute | Master-Detail | Lookup |
168
169
  |-----------|---------------|--------|
169
- | `<required>` | FORBIDDEN | Optional |
170
- | `<deleteConstraint>` | FORBIDDEN (always CASCADE) | Required (`SetNull`, `Restrict`, `Cascade`) |
171
- | `<lookupFilter>` | FORBIDDEN | Optional |
172
- | `<relationshipOrder>` | Required (0 or 1) | Not applicable |
173
- | `<reparentableMasterDetail>` | Optional | Not applicable |
174
- | `<writeRequiresMasterRead>` | Optional | Not applicable |
170
+ | `<required>` | FORBIDDEN | Optional |
171
+ | `<deleteConstraint>` | FORBIDDEN (always CASCADE) | Required (`SetNull`, `Restrict`, `Cascade`) |
172
+ | `<lookupFilter>` | FORBIDDEN | Optional |
173
+ | `<relationshipOrder>` | Required (0 or 1) | Not applicable |
174
+ | `<reparentableMasterDetail>` | Optional | Not applicable |
175
+ | `<writeRequiresMasterRead>` | Optional | Not applicable |
175
176
 
176
177
  ### INCORRECT — Master-Detail with forbidden attributes:
177
178
 
@@ -451,7 +452,7 @@ Before generating CustomField XML, verify:
451
452
  - [ ] Is `precision ≤ 18`?
452
453
 
453
454
  ### Text Area Checks
454
- - [ ] For TextArea: Is `<length>255</length>` explicitly included?
455
+ - [ ] For TextArea: Is `<length>` **omitted**? (The API rejects an explicit `<length>` value on TextArea fields.)
455
456
  - [ ] For LongTextArea/Html: Is `<visibleLines>` set?
456
457
 
457
458
  ### Relationship Limit Checks
@@ -21,7 +21,7 @@ A picklist field can either define its values **inline** or **reference an exist
21
21
  value set** (a Global Value Set or a Standard Value Set). The shared set is defined
22
22
  once and reused across many fields.
23
23
 
24
- ### HARD RULE: `<valueSet>` is EITHER a reference OR inline — never both
24
+ ### HARD RULE: `<valueSet>` is EITHER a reference OR inline — never both
25
25
 
26
26
  A `<valueSet>` element must contain **exactly one** of:
27
27
 
@@ -30,7 +30,7 @@ A `<valueSet>` element must contain **exactly one** of:
30
30
 
31
31
  Including both in the same `<valueSet>` is a deployment error.
32
32
 
33
- #### INCORRECT — both reference and inline definition:
33
+ #### INCORRECT — both reference and inline definition:
34
34
 
35
35
  ```xml
36
36
  <CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
@@ -54,7 +54,7 @@ Including both in the same `<valueSet>` is a deployment error.
54
54
 
55
55
  **Error:** `Value set must reference a value set name or define a value set, but not both.`
56
56
 
57
- #### CORRECT — reference a Global Value Set:
57
+ #### CORRECT — reference a Global Value Set:
58
58
 
59
59
  ```xml
60
60
  <CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
@@ -88,7 +88,7 @@ the name you put inside it differs.
88
88
  > local project" warning) is expected org-storage display — keep local metadata on the bare name.
89
89
  > Never append `__c` to a value-set name either.
90
90
 
91
- #### CORRECT — reference a Standard Value Set (bare name, no suffix):
91
+ #### CORRECT — reference a Standard Value Set (bare name, no suffix):
92
92
 
93
93
  ```xml
94
94
  <CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
@@ -126,7 +126,7 @@ A **dependent** picklist filters its available values based on the selected valu
126
126
  **dependent** field via a `<controllingField>` element plus one `<valueSettings>` block
127
127
  per (controlling value → dependent value) pair.
128
128
 
129
- ### Use the MODERN API 38.0+ form ONLY
129
+ ### Use the MODERN API 38.0+ form ONLY
130
130
 
131
131
  | Form | Elements | Status |
132
132
  |------|----------|--------|
@@ -136,7 +136,7 @@ per (controlling value → dependent value) pair.
136
136
  Never emit the legacy `<picklist>`, `<picklistValues>`, or `<controllingFieldValues>`
137
137
  tags. They are not valid against the modern Metadata API and will fail deployment.
138
138
 
139
- ### HARD RULE: both the controlling and dependent field must be `<restricted>true</restricted>`
139
+ ### HARD RULE: both the controlling and dependent field must be `<restricted>true</restricted>`
140
140
 
141
141
  A field dependency requires a fixed, admin-defined value set on **both** ends. **Always emit
142
142
  `<restricted>true</restricted>` inside the `<valueSet>` of the controlling field AND the
@@ -186,7 +186,7 @@ Inside the dependent field's `<valueSet>`, in this order:
186
186
  > EMEA→UK,Germany) you emit **one block for each (controllingValue, dependentValue) pair** — four
187
187
  > pairs = four `<valueSettings>` blocks. And remember: both fields carry `<restricted>true</restricted>`.
188
188
 
189
- ### CORRECT — State dependent on Country (USA → California, Texas)
189
+ ### CORRECT — State dependent on Country (USA → California, Texas)
190
190
 
191
191
  **Controlling field — `Country__c` (a plain restricted picklist):**
192
192
 
@@ -258,7 +258,7 @@ Inside the dependent field's `<valueSet>`, in this order:
258
258
  > `<valueSettings>` block with that country's `<controllingFieldValue>` and
259
259
  > `<valueName>California</valueName>`.
260
260
 
261
- ### INCORRECT — deprecated legacy form:
261
+ ### INCORRECT — deprecated legacy form:
262
262
 
263
263
  ```xml
264
264
  <CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
@@ -282,7 +282,7 @@ legacy dependency elements are not valid in the modern `<valueSet>` structure.
282
282
 
283
283
  ## 3. Enhanced Value Attributes
284
284
 
285
- ### Value-name fidelity — do NOT underscore picklist value names
285
+ ### Value-name fidelity — do NOT underscore picklist value names
286
286
 
287
287
  A **picklist value's `<fullName>` is NOT a field API name** and must NOT be transformed.
288
288
  Use the value text **exactly as the user spelled it**, spaces and all. A value the user
@@ -315,7 +315,7 @@ Inline `<value>` entries (CustomValue subfields) support more than `<fullName>`,
315
315
 
316
316
  These are independent of `<default>` and `<label>` and may be combined freely.
317
317
 
318
- ### CORRECT — Status picklist with colors and an inactive value
318
+ ### CORRECT — Status picklist with colors and an inactive value
319
319
 
320
320
  ```xml
321
321
  <CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
@@ -367,7 +367,7 @@ The Metadata API rejects malformed picklist values at deploy time. Two common fa
367
367
  Two `<value>` entries with the same `<fullName>` inside one `<valueSetDefinition>` are
368
368
  rejected.
369
369
 
370
- #### INCORRECT — duplicate value:
370
+ #### INCORRECT — duplicate value:
371
371
 
372
372
  ```xml
373
373
  <valueSetDefinition>
@@ -398,7 +398,7 @@ The stricter "only alphanumerics and single underscores, no leading digit, no do
398
398
  or trailing underscore" rule applies to the *field* `<fullName>` (the `__c`-suffixed
399
399
  API name), not to picklist value fullNames.
400
400
 
401
- #### INCORRECT — invalid value API name:
401
+ #### INCORRECT — invalid value API name:
402
402
 
403
403
  ```xml
404
404
  <value>
@@ -410,7 +410,7 @@ API name), not to picklist value fullNames.
410
410
 
411
411
  **Error:** `Invalid fullName: must begin with a letter and use only alphanumeric characters and underscores`
412
412
 
413
- #### CORRECT:
413
+ #### CORRECT:
414
414
 
415
415
  ```xml
416
416
  <value>
@@ -454,7 +454,7 @@ include a `<fullName>`** element — the record type's developer name (e.g. `<fu
454
454
  matching the filename `Internal.recordType-meta.xml`. It's bare (no object prefix); the object
455
455
  comes from the `objects/<Object>/` folder path.
456
456
 
457
- ### STEP 1 — Decide if this object needs a BusinessProcess (do this BEFORE writing files)
457
+ ### STEP 1 — Decide if this object needs a BusinessProcess (do this BEFORE writing files)
458
458
 
459
459
  A record type on a **BusinessProcess-gated object — Opportunity, Lead, Case, or Solution —
460
460
  will NOT deploy without a `<businessProcess>` reference**, even when it only filters a *custom*
@@ -472,7 +472,7 @@ developer name instead of generating a new one (confirm via the grounding MCP's
472
472
  if available; otherwise generate a minimal one). For everything else, **do not invent a
473
473
  BusinessProcess** — adding one to a custom-object record type is wrong.
474
474
 
475
- #### CORRECT — Opportunity "Enterprise" record type, two deployable files
475
+ #### CORRECT — Opportunity "Enterprise" record type, two deployable files
476
476
 
477
477
  ```xml
478
478
  <!-- File 1: objects/Opportunity/businessProcesses/Enterprise_Sales_Process.businessProcess-meta.xml -->
@@ -519,7 +519,7 @@ BusinessProcess** — adding one to a custom-object record type is wrong.
519
519
  </RecordType>
520
520
  ```
521
521
 
522
- #### INCORRECT — BusinessProcess file emitted but NOT referenced (most common failure)
522
+ #### INCORRECT — BusinessProcess file emitted but NOT referenced (most common failure)
523
523
 
524
524
  ```xml
525
525
  <!-- File 1 (businessProcesses/Enterprise_Sales_Process...) was generated correctly, BUT -->
@@ -571,7 +571,7 @@ RecordType (filters the field's values; references the BusinessProcess)
571
571
  - For Opportunity/Lead/Case/Solution, the `<businessProcess>` must exist (same package or
572
572
  already in the org) before the RecordType.
573
573
 
574
- ### UI-sync gotcha — values may not auto-display after API deploy
574
+ ### UI-sync gotcha — values may not auto-display after API deploy
575
575
 
576
576
  When `<picklistValues>` are loaded via the Metadata API, the values are correctly associated
577
577
  under the hood, **but they may not automatically appear as "Selected Values" in the Record
@@ -1,8 +1,11 @@
1
1
  ---
2
2
  name: platform-custom-lightning-type-generate
3
- description: "Use this skill when users need to create Custom Lightning Types (CLTs) for Einstein Agent actions or structured input/output schemas. Trigger when users mention CLT, Custom Lightning Types, Custom Lightning Types (CLTs) with widget/mosaic/fragment rendition/renderer, JSON schemas for agents, type definitions, lightning__objectType, or editor/renderer configurations. When widget renditions are requested, you MUST first read the widget-rendition.md reference file in this skill's references/ directory and follow its complete workflow. This is complex - always use this skill for CLT work."
3
+ description: "Use this skill when users need to create Custom Lightning Types (CLTs) for Einstein Agent actions or structured input/output schemas. Trigger when users mention CLT, Custom Lightning Types, JSON schemas for agents, type definitions, lightning__objectType, or editor/renderer configurations. For widget renditions that combine a CLT with a Widget bundle, use the platform-lightning-type-widget-coordinate orchestrator instead. This is complex - always use this skill for CLT work."
4
4
  metadata:
5
5
  version: "1.0"
6
+ minApiVersion: "60.0"
7
+ relatedSkills:
8
+ - "platform-lightning-type-widget-coordinate"
6
9
  ---
7
10
 
8
11
  ## When to Use This Skill
@@ -12,7 +15,6 @@ Use this skill when you need to:
12
15
  - Generate JSON Schema-based type definitions for Lightning Platform
13
16
  - Configure CLTs for Einstein Agent actions
14
17
  - Set up editor and renderer configurations for custom UI
15
- - Create CLTs with widget/mosaic/fragment rendition
16
18
  - Troubleshoot deployment errors related to Custom Lightning Types
17
19
 
18
20
  ## Specification
@@ -54,6 +56,7 @@ Custom Lightning Types (CLTs) are JSON Schema-based type definitions used by the
54
56
  - **Apex class CLTs are minimal**:
55
57
  - Include **only** `title`, `description` (optional), and `lightning:type` set to `@apexClassType/...`.
56
58
  - Do **not** add `type`, `properties`, `required`, or `unevaluatedProperties`.
59
+ - **No shell metacharacters that trigger the Vibes safe-shell filter.** In any Bash tool call emitted by this skill, do NOT use command substitution (`$(…)` or backticks), process substitution (`<(…)`, `>(…)`), brace expansion (`{a,b,c}` or `{1..N}`), or `eval` / `exec`. Vibes forces manual approval on these patterns even under Bypass mode and stalls the eval. Emit separate commands (`mkdir -p a && mkdir -p b`) or print each value with its own command and reason about the output rather than capturing it in a shell variable.
57
60
 
58
61
  ## Additional CLT Metaschema Validations
59
62
  - **Org namespace validation**: titles/descriptions and other string fields may be validated to ensure you are not using an org namespace in places that are disallowed.
@@ -66,7 +69,7 @@ When you need the full list of supported primitive `lightning:type` identifiers,
66
69
 
67
70
  ## Generation Workflow
68
71
  1. **Confirm the CLT approach**
69
- - If referencing Apex: capture the exact class reference (`@apexClassType/namespace__ClassName$InnerClass`).
72
+ - If referencing Apex: capture the exact class reference (@apexClassType/namespace__ClassName$InnerClass).
70
73
  - If using standard primitives: list the fields, their Lightning primitive types, and which fields are required.
71
74
  2. **Draft `schema.json`**
72
75
  - **DO NOT include `"$schema"` at the top**
@@ -100,26 +103,18 @@ When you need the full list of supported primitive `lightning:type` identifiers,
100
103
  - **Avoid known-invalid patterns**:
101
104
  - Do not use `es_property_editors/inputList`.
102
105
  - Do not use `itemSchema` attributes.
103
- 4. **(Optional) Draft `renderer.json`** (only if custom UI or mosaic rendition is required)
106
+ 4. **(Optional) Draft `renderer.json`** (only if custom UI or widget rendition is required)
104
107
  - **Supported shape:** Top-level `renderer` object with `renderer.componentOverrides` and `renderer.layout`.
105
108
  - Top-level `renderer` object.
106
109
  - Use `renderer.componentOverrides` for component overrides.
107
110
  - Use `renderer.layout` for layout.
108
111
  - **DEPRECATED**: Do NOT use `propertyRenderers` or `view` — these are legacy keys. Always use `componentOverrides` and `layout` instead.
109
- - **Root override pattern** (most common for fully custom rendering UI):
112
+ - **Widget rendition pattern** (reference an existing WidgetBundle as the root renderer): the renderer file is a thin wrapper that points at the widget by developer name (`"definition": "@widget/c/<widgetDeveloperName>"`) and maps CLT schema properties to widget attributes via `{!$attrs.<schemaPropertyName>}`. Do **NOT** duplicate the widget body inside `renderer.json`. See `references/widget-rendition.md` for the full shape, binding rules, and constraints. For the full Apex → Lightning Type → Widget pipeline, use the `platform-lightning-type-widget-coordinate` orchestrator instead of this skill.
113
+ - **Root override pattern** (most common for fully custom rendering UI with a custom LWC):
110
114
  - `renderer.componentOverrides["$"] = { "definition": "c/<yourRendererComponent>", "attributes": { ... } }`
111
115
  - Use `{!$attrs.<name>}` in attribute mappings when binding schema data to custom renderer component attributes.
112
116
  - **CRITICAL**: Attribute mappings like `{!$attrs.propertyName}` must reference properties that **actually exist** in your type schema. Referencing non-existent properties will fail validation.
113
117
  - **Type matching**: Attribute values must match the expected type for the component. For example, if a component expects a string attribute, passing an integer will fail validation.
114
- - **Widget renderer pattern** (for widget rendition):
115
- - **When to use:** Use this when users request "mosaic", "widget", "fragment", or "cross-platform rendering" for their CLT.
116
- - **Structure:** `renderer.componentOverrides["$"] = { "type": "mosaic", "definition": "tile/mosaic", "children": [ /* UEM tree of blocks and regions */ ] }`
117
- - **REQUIRED workflow:**
118
- - **STOP**: Do NOT attempt to create the widget renderer yourself.
119
- - **MANDATORY FIRST STEP**: You MUST fetch the reference file `references/widget-rendition.md` located in this skill's directory before proceeding.
120
- - Follow the complete workflow documented in `widget-rendition.md` using the generated CLT schema as the grounding schema.
121
- - The `widget-rendition.md` reference contains the full widget generation workflow: discovering UEM blocks via discoverUiComponents, calling getUiComponentSchemas, building the UEM tree, and writing renderer.json.
122
- - **Do not** attempt to generate widget rendition without first fetching the `widget-rendition.md` reference file.
123
118
  - **Property-level override pattern**:
124
119
  - `renderer.componentOverrides["<propertyName>"] = { "definition": "es_property_editors/outputText" | "es_property_editors/outputNumber" | "es_property_editors/outputImage" | ... }`. **Valid renderer components** (examples): `es_property_editors/outputText`, `es_property_editors/outputNumber`, `es_property_editors/outputImage`. Avoid input-style components in the renderer.
125
120
  - **Layout pattern for renderer**:
@@ -1,124 +1,40 @@
1
- # Widget Generation Guide
1
+ # Widget Rendition Pattern for CLT renderer.json
2
2
 
3
3
  ## Overview
4
- Widgets are reusable pieces of UI similar to templates, with placeholders for actual data values. The purpose of this file is to assist developers in creating mosaic renditions for CLTs.
5
4
 
6
- ## Purpose
7
- Widgets render data in a structured and unified way across various Salesforce experiences like Slack, Mobile, LEX etc.
5
+ When a Custom Lightning Type needs to render through a Widget bundle (authored by `platform-widget-generate`), the `renderer.json` uses a flat widget-reference pattern. The renderer points at the widget by developer name and maps each CLT schema property to the widget's attribute contract.
8
6
 
9
- ## Schema Grounding
10
- Widget generation is **always schema-grounded** using a CLT's schema. The schema describes the data shape the widget should render. Extract property names, types, required vs optional, and nesting from the schema; then follow the full **Workflow** below, using this extracted structure to guide every step. Do not add or remove properties relative to the schema.
7
+ > **For full widget generation** (Apex → Lightning Type → Widget pipeline), use the `platform-lightning-type-widget-coordinate` orchestrator. This file documents only the renderer.json wiring pattern for CLTs that reference an existing widget.
11
8
 
12
- ## Composition
13
- A widget is a UEM (Unified Experience Model) tree of blocks and regions. The widget you return must follow the Typescript interfaces below:
9
+ ## renderer.json Shape
14
10
 
15
- ```ts
16
- interface BlockType {
17
- type: 'block'
18
- definition: string // {namespace}/{blockName}
19
- attributes?: Record<string, any>
20
- children?: (BlockType | RegionType)[]
21
- }
22
-
23
- interface RegionType {
24
- type: 'region'
25
- name: string
26
- children: BlockType[]
11
+ ```json
12
+ {
13
+ "renderer": {
14
+ "componentOverrides": {
15
+ "$": {
16
+ "definition": "@widget/c/<widgetDeveloperName>",
17
+ "attributes": {
18
+ "<widgetAttrKey>": "{!$attrs.<schemaPropertyName>}"
19
+ }
20
+ }
21
+ }
22
+ }
27
23
  }
28
24
  ```
29
- ---
30
-
31
- ## Available Metadata Actions
32
-
33
- ### When to Use Each Action
34
-
35
- #### discoverUiComponents
36
-
37
- **Purpose:** Discover the palette of available blocks that can be used in widget composition.
38
-
39
- **Use for:** Finding available blocks before building your widget structure.
40
-
41
- **Input Parameters:**
42
- - `actionName` (**required***): "discoverUiComponents"
43
- - `metadataType` (**required**): "FRAGMENT"
44
- - `parameters` (**required**): JSON object with the below fields
45
- - `pageType` (**required**): "FRAGMENT"
46
- - `pageContext` (optional): JSON object - not required for FRAGMENT type
47
- - `searchQuery` (optional): String to filter components by name or description
48
-
49
- **Returns:** List of components with:
50
- - `definition`: Fully qualified name (e.g., "namespace/definiton")
51
- - `description`: Component description
52
- - `label`: Human-readable label
53
- - `attributes`: Optional attribute metadata
54
-
55
- #### getUiComponentSchemas
56
-
57
- **Purpose:** Get detailed JSON schemas for component configuration, including property types, required vs optional fields, and validation rules.
58
-
59
- **Use for:** You know which components you want but need to understand their properties before adding them to your widget.
60
-
61
- **Input Parameters:**
62
- - `actionName` (**required***): "getUiComponentSchemas"
63
- - `metadataType` (**required**): "FRAGMENT"
64
- - `parameters` (**required**): JSON object with the below fields
65
- - `pageType` (**required**): "FRAGMENT"
66
- - `componentDefinitions` (**required**): List of fully qualified names (e.g., ["namespace/definition"])
67
- - **CRITICAL**: NEVER include "tile/mosaic" in this list. "tile/mosaic" is a container component used in renderer.json structure and **should not** be passed to getUiComponentSchemas
68
- - `pageContext` (optional): JSON object - not required for FRAGMENT type
69
- - `includeKnowledge` (optional): Boolean, defaults to true - includes additional component-specific guidance
70
-
71
- **Returns:**
72
- - `componentSchemas`: List of results (supports partial failures)
73
- - **Success entries**: Contains JSON schema with property definitions, types, constraints
74
- - **Failure entries**: Contains error message explaining why schema couldn't be retrieved
75
- - `$defs`: Schema definitions and references (if schema transformation applied)
76
-
77
- **Key Feature:** Supports partial failures - if some components can't be found, you still get schemas for the successful ones.
78
-
79
- ---
80
-
81
- ## Attribute binding using placeholder syntax
82
-
83
- - **Where to use:** When block properties must display or pass runtime data from the grounding schema, use the **Placeholder Syntax** below so that the runtime binds values into the widget. Check each block's schema (from `getUiComponentSchemas`) for the correct property name (e.g. `value`, `text`, `label`).
84
- - **Placeholder Syntax:** Use `{!$attrs.<attrName>}` as the placeholder for each block property that should receive data.
85
- `<attrName>` **must** match the property name from the grounding schema so that the runtime can resolve its value.
86
- Example: for a schema property `title`, set the block property to `{!$attrs.title}`.
87
- - **List / iterative data:** Only the children (list items) hold bound values; the parent list block does not. For each item inside a list (e.g. `tile/listItem`), use `{!$attrs.<listAttrName>.item}` so the runtime binds the current item. `<listAttrName>` MUST match the schema property name of the list. Example: for `icons`, use `"{!$attrs.icons.item}"` on the list item.
88
-
89
- ---
90
-
91
- ## Workflow
92
-
93
- 1. **Schema Parsing**
94
- - Parse the schema and extract: property names, types, required vs optional, and nested structure. Use this as the **widget spec**.
95
-
96
- 2. **Discover Available Blocks** (**REQUIRED** - do NOT skip)
97
- - Use **discoverUiComponents metadata action** above to explore what blocks are available.
98
- - Use property types from the **widget spec** to inform `searchQuery` (e.g. text → "text", number → "number").
99
-
100
- 3. **Select Components**
101
- - Choose blocks that can represent each property in the **widget spec** from the results of step 2.
102
-
103
- 4. **Get Component Schemas** (**REQUIRED** - do NOT skip)
104
- - Use **getUiComponentSchemas metadata action** with the selected block definitions from step 3 and review block properties' metadata.
105
25
 
106
- 5. **Build Widget**
107
- - Construct the UEM tree. Map each property in the **widget spec** to block properties and preserve order of the **widget spec**.
108
- - For block properties that must show or pass runtime data, use the placeholder syntax (see **Attribute binding using placeholder syntax** above).
109
- - Use block properties from the schemas retrieved in step 4.
26
+ - `<widgetDeveloperName>` matches the widget bundle directory name under `uiWidgets/`.
27
+ - `<widgetAttrKey>` is a property under the widget's `schema.json` `properties.attributes.properties`.
28
+ - `<schemaPropertyName>` is a property on the Custom Lightning Type's schema.
29
+ - One attribute mapping per widget property — the set of attributes must match the widget's schema contract.
110
30
 
111
- 6. **Write output to CLT Bundle**
112
- - Always write to `lightningTypes/<TypeName>/lightningDesktopGenAi/renderer.json` (or the correct target subfolder for the product surface, e.g. `experienceBuilder/`, `lightningMobileGenAi/`, `enhancedWebChat/` when applicable).
113
- Check **required root override pattern** below -
114
- `renderer.componentOverrides["$"] = { "type": "mosaic", "definition": "tile/mosaic", "children": [ ... ] — array of UEM nodes - contains the widget UEM generated using the **Workflow** steps 1-5 above }`
31
+ ## Attribute Binding
115
32
 
116
- ---
33
+ Use `{!$attrs.<name>}` syntax in attribute values. `<name>` must match a property defined in the CLT's own `schema.json`. At runtime the renderer resolves these bindings and passes the live data to the widget.
117
34
 
118
- ## Important Notes
35
+ ## Constraints
119
36
 
120
- - **widget spec** includes both required and optional attributes - review carefully to ensure valid configuration.
121
- - When using **`execute_metadata_action`** tool, always supply **`parameters`** with the required fields above; missing `parameters` or required keys causes hard failures, not partial results.
122
- - Block definitions always follow the `{namespace}/{blockName}` convention.
123
- - Use the same definition format returned by `discoverUiComponents` when calling `getUiComponentSchemas`
124
- - Placeholder syntax for non-list properties is `{!$attrs.<attrName>}` and for list properties is `{!$attrs.<listAttrName>.item}`.
37
+ - Do NOT duplicate the widget UEM body inside `renderer.json` the widget bundle owns its own UEM tree.
38
+ - The widget bundle (`<pkgDir>/uiWidgets/<widgetDeveloperName>/`) must exist and be deployed before the Lightning Type that references it.
39
+ - Every attribute key in the renderer must resolve to a property in the widget's `schema.json` `properties.attributes.properties`.
40
+ - Write the renderer to `lightningTypes/<TypeName>/lightningDesktopGenAi/renderer.json` (or the correct target subfolder for the product surface).