@salesforce/afv-skills 1.29.0 → 1.31.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.
- package/README.md +2 -0
- package/package.json +1 -1
- package/skills/agentforce-architecture-analyze/README.md +2 -8
- package/skills/agentforce-architecture-analyze/SKILL.md +2 -2
- package/skills/agentforce-architecture-analyze/references/contract.json +4 -4
- package/skills/agentforce-architecture-analyze/references/soql_fields.md +1 -1
- package/skills/data360-activate/README.md +0 -1
- package/skills/data360-activate/SKILL.md +0 -2
- package/skills/data360-code-extension-generate/SKILL.md +15 -2
- package/skills/data360-connect/README.md +0 -2
- package/skills/data360-connect/SKILL.md +0 -2
- package/skills/data360-harmonize/SKILL.md +0 -1
- package/skills/data360-orchestrate/README.md +0 -7
- package/skills/data360-orchestrate/SKILL.md +0 -2
- package/skills/data360-prepare/README.md +0 -1
- package/skills/data360-prepare/SKILL.md +0 -1
- package/skills/data360-query/README.md +0 -1
- package/skills/data360-query/SKILL.md +0 -1
- package/skills/data360-segment/README.md +0 -1
- package/skills/data360-segment/SKILL.md +0 -2
- package/skills/dx-pkg-post-install-configure/SKILL.md +184 -0
- package/skills/experience-cms-brand-apply/SKILL.md +47 -16
- package/skills/experience-lwc-generate/README.md +3 -2
- package/skills/experience-lwc-generate/references/async-notification-patterns.md +1 -1
- package/skills/experience-lwc-generate/references/component-patterns.md +3 -3
- package/skills/experience-lwc-generate/references/flow-integration-guide.md +1 -1
- package/skills/experience-lwc-generate/references/lwc-best-practices.md +4 -4
- package/skills/experience-lwc-generate/references/scoring-and-testing.md +1 -1
- package/skills/experience-lwc-generate/references/state-management.md +2 -2
- package/skills/experience-lwc-generate/references/triangle-pattern.md +3 -3
- package/skills/experience-lwc-generate/scripts/post-tool-validate.py +2 -2
- package/skills/experience-lwc-generate/scripts/template_validator.py +1 -1
- package/skills/experience-ui-bundle-app-coordinate/SKILL.md +198 -34
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-hosting-target.sh +26 -0
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-sfdx-project.sh +15 -0
- package/skills/experience-ui-bundle-metadata-generate/SKILL.md +19 -8
- package/skills/experience-ui-bundle-metadata-generate/references/csp-metadata-format.md +2 -2
- package/skills/experience-ui-bundle-metadata-generate/scripts/check-api-version.sh +30 -0
- package/skills/external-diagram-mermaid-generate/README.md +2 -2
- package/skills/external-diagram-mermaid-generate/SKILL.md +1 -3
- package/skills/external-diagram-mermaid-generate/assets/agentforce/agent-flow.md +4 -4
- package/skills/external-diagram-mermaid-generate/assets/architecture/system-landscape.md +1 -1
- package/skills/external-diagram-mermaid-generate/assets/datamodel/b2b-commerce-erd.md +3 -3
- package/skills/external-diagram-mermaid-generate/assets/datamodel/campaigns-erd.md +1 -1
- package/skills/external-diagram-mermaid-generate/assets/datamodel/consent-erd.md +2 -2
- package/skills/external-diagram-mermaid-generate/assets/datamodel/files-erd.md +2 -2
- package/skills/external-diagram-mermaid-generate/assets/datamodel/forecasting-erd.md +2 -2
- package/skills/external-diagram-mermaid-generate/assets/datamodel/fsl-erd.md +2 -2
- package/skills/external-diagram-mermaid-generate/assets/datamodel/party-model-erd.md +1 -1
- package/skills/external-diagram-mermaid-generate/assets/datamodel/quote-order-erd.md +3 -3
- package/skills/external-diagram-mermaid-generate/assets/datamodel/revenue-cloud-erd.md +2 -2
- package/skills/external-diagram-mermaid-generate/assets/datamodel/sales-cloud-erd.md +1 -1
- package/skills/external-diagram-mermaid-generate/assets/datamodel/salesforce-erd.md +1 -1
- package/skills/external-diagram-mermaid-generate/assets/datamodel/scheduler-erd.md +2 -2
- package/skills/external-diagram-mermaid-generate/assets/datamodel/service-cloud-erd.md +3 -3
- package/skills/external-diagram-mermaid-generate/assets/datamodel/territory-management-erd.md +1 -1
- package/skills/external-diagram-mermaid-generate/assets/integration/api-sequence.md +1 -1
- package/skills/external-diagram-mermaid-generate/assets/oauth/authorization-code-pkce.md +1 -1
- package/skills/external-diagram-mermaid-generate/assets/oauth/authorization-code.md +1 -1
- package/skills/external-diagram-mermaid-generate/assets/oauth/client-credentials.md +1 -1
- package/skills/external-diagram-mermaid-generate/assets/oauth/device-authorization.md +2 -2
- package/skills/external-diagram-mermaid-generate/assets/oauth/jwt-bearer.md +2 -2
- package/skills/external-diagram-mermaid-generate/assets/oauth/refresh-token.md +1 -1
- package/skills/external-diagram-mermaid-generate/assets/oauth/user-agent-social-sign-on.md +2 -2
- package/skills/external-diagram-mermaid-generate/assets/role-hierarchy/user-hierarchy.md +1 -1
- package/skills/external-diagram-mermaid-generate/references/color-palette.md +13 -13
- package/skills/external-diagram-mermaid-generate/references/diagram-conventions.md +5 -5
- package/skills/external-diagram-mermaid-generate/references/erd-conventions.md +1 -1
- package/skills/external-diagram-mermaid-generate/references/mermaid-styling.md +2 -2
- package/skills/external-diagram-mermaid-generate/references/preview-guide.md +1 -1
- package/skills/external-diagram-mermaid-generate/references/usage-examples.md +9 -9
- package/skills/external-diagram-mermaid-generate/scripts/README.md +1 -1
- package/skills/integration-connectivity-connected-app-configure/README.md +4 -5
- package/skills/integration-connectivity-connected-app-configure/SKILL.md +2 -2
- package/skills/integration-connectivity-connected-app-configure/references/example-usage.md +7 -7
- package/skills/integration-connectivity-connected-app-configure/references/migration-guide.md +1 -1
- package/skills/integration-connectivity-connected-app-configure/references/oauth-flows-reference.md +1 -1
- package/skills/integration-connectivity-connected-app-configure/references/testing-validation-guide.md +3 -3
- package/skills/integration-connectivity-generate/README.md +1 -1
- package/skills/integration-connectivity-generate/SKILL.md +6 -0
- package/skills/integration-connectivity-generate/assets/callouts/rest-queueable-callout.cls +1 -1
- package/skills/integration-connectivity-generate/assets/external-services/external-service-operations.md +1 -1
- package/skills/integration-connectivity-generate/assets/soap/wsdl2apex-guide.md +1 -1
- package/skills/integration-connectivity-generate/references/callout-patterns.md +4 -0
- package/skills/integration-connectivity-generate/references/cdc-guide.md +2 -2
- package/skills/integration-connectivity-generate/references/event-driven-architecture-guide.md +5 -5
- package/skills/integration-connectivity-generate/references/event-patterns.md +3 -2
- package/skills/integration-connectivity-generate/references/external-services-guide.md +4 -1
- package/skills/integration-connectivity-generate/references/messaging-api-v2.md +2 -2
- package/skills/integration-connectivity-generate/references/named-credentials-automation.md +1 -1
- package/skills/integration-connectivity-generate/references/named-credentials-guide.md +12 -2
- package/skills/integration-connectivity-generate/references/platform-events-guide.md +3 -3
- package/skills/integration-connectivity-generate/references/rest-callout-patterns.md +1 -1
- package/skills/integration-connectivity-generate/references/scoring-rubric.md +1 -1
- package/skills/integration-connectivity-generate/references/security-best-practices.md +5 -2
- package/skills/integration-connectivity-generate/scripts/configure-named-credential.sh +16 -5
- package/skills/integration-connectivity-generate/scripts/set-api-credential.sh +11 -2
- package/skills/integration-connectivity-generate/scripts/suggest_credential_setup.py +4 -3
- package/skills/integration-connectivity-generate/scripts/validate_integration.py +1 -1
- package/skills/omnistudio-callable-apex-generate/README.md +1 -5
- package/skills/omnistudio-callable-apex-generate/SKILL.md +14 -4
- package/skills/omnistudio-callable-apex-generate/assets/pattern_callable_vanilla.cls +8 -1
- package/skills/omnistudio-callable-apex-generate/examples/Test_VlocityOpenInterface2Conversion/TRANSCRIPT.md +1 -1
- package/skills/omnistudio-callable-apex-generate/examples/Test_VlocityOpenInterfaceConversion/TRANSCRIPT.md +1 -1
- package/skills/omnistudio-datamapper-generate/SKILL.md +1 -1
- package/skills/omnistudio-datamapper-generate/assets/completion-summary-template.md +2 -2
- package/skills/omnistudio-datamapper-generate/references/best-practices.md +9 -9
- package/skills/omnistudio-datamapper-generate/references/naming-conventions.md +6 -6
- package/skills/omnistudio-datapacks-deploy/README.md +1 -1
- package/skills/omnistudio-datapacks-deploy/examples/business-internet-plus-bundle/deploy-business-internet-plus-bundle.yaml +1 -1
- package/skills/omnistudio-dependencies-analyze/SKILL.md +12 -5
- package/skills/omnistudio-dependencies-analyze/references/dependency-patterns.md +9 -9
- package/skills/omnistudio-dependencies-analyze/references/namespace-guide.md +1 -1
- package/skills/omnistudio-epc-catalog-generate/README.md +1 -1
- package/skills/omnistudio-flexcard-generate/SKILL.md +11 -4
- package/skills/omnistudio-flexcard-generate/references/best-practices.md +6 -6
- package/skills/omnistudio-flexcard-generate/references/data-binding-guide.md +9 -9
- package/skills/omnistudio-integration-procedure-generate/SKILL.md +9 -1
- package/skills/omnistudio-integration-procedure-generate/references/element-types.md +3 -3
- package/skills/omnistudio-omniscript-generate/SKILL.md +2 -2
- package/skills/omnistudio-omniscript-generate/references/best-practices.md +1 -1
- package/skills/omnistudio-omniscript-generate/scripts/check-duplicate-omniscript.sh +8 -0
- package/skills/omnistudio-omniscript-generate/scripts/deploy-omniscript.sh +8 -0
- package/skills/platform-apex-logs-debug/README.md +2 -2
- package/skills/platform-apex-logs-debug/references/cli-commands.md +2 -2
- package/skills/platform-apex-logs-debug/references/debug-log-reference.md +16 -16
- package/skills/platform-apex-logs-debug/references/log-analysis-tools.md +2 -2
- package/skills/platform-apex-test-run/README.md +1 -1
- package/skills/platform-apex-test-run/references/test-fix-loop.md +2 -2
- package/skills/platform-apex-test-run/references/testing-best-practices.md +3 -3
- package/skills/platform-custom-field-generate/SKILL.md +12 -11
- package/skills/platform-custom-field-generate/references/advanced-picklists.md +17 -17
- package/skills/platform-custom-report-type-generate/SKILL.md +259 -0
- package/skills/platform-custom-report-type-generate/examples/AccountProjectsWithTasks.reportType-meta.xml +51 -0
- package/skills/platform-custom-report-type-generate/examples/AccountsWithIndustry.reportType-meta.xml +27 -0
- package/skills/platform-custom-report-type-generate/examples/AccountsWithProjects.reportType-meta.xml +44 -0
- package/skills/platform-custom-report-type-generate/references/category-values.md +32 -0
- package/skills/platform-custom-report-type-generate/references/errors-and-troubleshooting.md +24 -0
- package/skills/platform-data-manage/README.md +4 -4
- package/skills/platform-data-manage/references/bulk-testing-example.md +1 -1
- package/skills/platform-data-manage/references/crud-workflow-example.md +2 -2
- package/skills/platform-data-manage/references/orchestration.md +6 -6
- package/skills/platform-dataspace-access-configure/SKILL.md +318 -0
- package/skills/platform-docs-get/SKILL.md +4 -0
- package/skills/platform-docs-get/scripts/extract_salesforce_doc.py +78 -13
- package/skills/platform-encryption-configure/SKILL.md +122 -0
- package/skills/platform-encryption-configure/assets/EncryptionKey.settings-meta.xml +17 -0
- package/skills/platform-encryption-configure/assets/PlatformEncryption.settings-meta.xml +15 -0
- package/skills/platform-encryption-configure/assets/encrypted-field.field-meta.xml +22 -0
- package/skills/platform-encryption-configure/examples/cache-only-keys.settings-meta.xml +11 -0
- package/skills/platform-encryption-configure/references/encryption-schemes.md +34 -0
- package/skills/platform-encryption-configure/references/key-models.md +34 -0
- package/skills/platform-encryption-configure/references/tenant-secret-lifecycle.md +23 -0
- package/skills/platform-encryption-configure/scripts/validate-encryption-metadata.sh +54 -0
- package/skills/platform-flexipage-generate/SKILL.md +281 -346
- package/skills/platform-flexipage-generate/references/cli_commands.md +39 -0
- package/skills/platform-flexipage-generate/references/flexipage_fieldSection.md +162 -0
- package/skills/platform-flexipage-generate/references/flexipage_richText.md +84 -0
- package/skills/platform-flexipage-generate/references/identifiers_and_regions.md +167 -0
- package/skills/platform-flexipage-generate/references/mcp_action_examples.md +104 -0
- package/skills/platform-flexipage-generate/references/record_flexipage_dynamicHighlights.md +119 -0
- package/skills/platform-flexipage-generate/references/xml_rules.md +335 -0
- package/skills/platform-flexipage-generate/scripts/resolve-component-instructions.sh +42 -0
- package/skills/platform-flexipage-generate/scripts/scan-lwc-components.sh +113 -0
- package/skills/platform-metadata-api-context-get/SKILL.md +13 -10
- package/skills/platform-metadata-deploy/README.md +2 -2
- package/skills/platform-metadata-deploy/references/agent-deployment-guide.md +2 -2
- package/skills/platform-metadata-deploy/references/deployment-workflows.md +16 -16
- package/skills/platform-metadata-deploy/references/orchestration.md +3 -3
- package/skills/platform-metadata-deploy/references/trigger-deployment-safety.md +2 -2
- package/skills/platform-models-api-configure/SKILL.md +140 -0
- package/skills/platform-models-api-configure/scripts/get-orgjwt.sh +48 -0
- package/skills/platform-policy-rule-generate/SKILL.md +260 -0
- package/skills/platform-policy-rule-generate/references/deploy-errors.md +54 -0
- package/skills/platform-policy-rule-generate/references/fixtures-index.md +29 -0
- package/skills/platform-policy-rule-generate/references/policy-schema-full.md +250 -0
- package/skills/platform-policy-rule-generate/references/templates-access.md +132 -0
- package/skills/platform-policy-rule-generate/references/templates-advanced.md +58 -0
- package/skills/platform-policy-rule-generate/references/templates-record.md +75 -0
- package/skills/platform-policy-rule-generate/references/templates-transform.md +70 -0
- package/skills/platform-policy-rule-generate/references/templates.md +10 -0
- package/skills/platform-policy-rule-generate/references/ui-compatibility.md +142 -0
- package/skills/platform-soql-query/README.md +1 -1
- package/skills/platform-soql-query/SKILL.md +1 -1
- package/skills/platform-soql-query/references/anti-patterns.md +1 -1
- package/skills/platform-soql-query/references/field-coverage-rules.md +1 -1
- package/skills/platform-soql-query/references/query-optimization.md +1 -1
- package/skills/platform-soql-query/scripts/post-tool-validate.py +3 -3
- package/skills/data360-activate/CREDITS.md +0 -5
- package/skills/data360-connect/CREDITS.md +0 -5
- package/skills/data360-harmonize/CREDITS.md +0 -3
- package/skills/data360-orchestrate/CREDITS.md +0 -15
- package/skills/data360-orchestrate/UPSTREAM.md +0 -45
- package/skills/data360-prepare/CREDITS.md +0 -7
- package/skills/data360-query/CREDITS.md +0 -7
- package/skills/data360-segment/CREDITS.md +0 -3
- package/skills/experience-lwc-generate/CREDITS.md +0 -5
- package/skills/external-diagram-mermaid-generate/CREDITS.md +0 -46
- package/skills/external-diagram-visual-generate/CREDITS.md +0 -80
- package/skills/external-diagram-visual-generate/README.md +0 -83
- package/skills/external-diagram-visual-generate/SKILL.md +0 -207
- package/skills/external-diagram-visual-generate/assets/architecture/integration-flow.md +0 -55
- package/skills/external-diagram-visual-generate/assets/erd/core-objects.md +0 -131
- package/skills/external-diagram-visual-generate/assets/erd/custom-objects.md +0 -60
- package/skills/external-diagram-visual-generate/assets/lwc/dashboard-card.md +0 -45
- package/skills/external-diagram-visual-generate/assets/lwc/data-table.md +0 -57
- package/skills/external-diagram-visual-generate/assets/lwc/record-form.md +0 -60
- package/skills/external-diagram-visual-generate/assets/review/apex-review.md +0 -57
- package/skills/external-diagram-visual-generate/assets/review/lwc-review.md +0 -48
- package/skills/external-diagram-visual-generate/references/architect-aesthetic-guide.md +0 -257
- package/skills/external-diagram-visual-generate/references/examples-index.md +0 -35
- package/skills/external-diagram-visual-generate/references/gemini-cli-setup.md +0 -65
- package/skills/external-diagram-visual-generate/references/interview-questions.md +0 -529
- package/skills/external-diagram-visual-generate/references/iteration-workflow.md +0 -173
- package/skills/external-diagram-visual-generate/scripts/check-prerequisites.sh +0 -101
- package/skills/external-diagram-visual-generate/scripts/generate_image.py +0 -243
- package/skills/integration-connectivity-connected-app-configure/CREDITS.md +0 -3
- package/skills/integration-connectivity-generate/CREDITS.md +0 -5
- package/skills/omnistudio-callable-apex-generate/CREDITS.md +0 -9
- package/skills/omnistudio-datamapper-generate/CREDITS.md +0 -5
- package/skills/omnistudio-datapacks-deploy/CREDITS.md +0 -5
- package/skills/omnistudio-dependencies-analyze/CREDITS.md +0 -5
- package/skills/omnistudio-epc-catalog-generate/CREDITS.md +0 -14
- package/skills/omnistudio-flexcard-generate/CREDITS.md +0 -5
- package/skills/omnistudio-integration-procedure-generate/CREDITS.md +0 -5
- package/skills/omnistudio-omniscript-generate/CREDITS.md +0 -5
- package/skills/platform-apex-generate/CREDITS.md +0 -5
- package/skills/platform-apex-logs-debug/CREDITS.md +0 -22
- package/skills/platform-apex-test-generate/CREDITS.md +0 -5
- package/skills/platform-apex-test-run/CREDITS.md +0 -22
- package/skills/platform-data-manage/CREDITS.md +0 -5
- package/skills/platform-metadata-deploy/CREDITS.md +0 -25
- package/skills/platform-soql-query/CREDITS.md +0 -21
- /package/skills/omnistudio-callable-apex-generate/examples/Test_VlocityOpenInterfaceConversion/{MyCustomVlocityOpenInterface2.cls → MyCustomClass.cls} +0 -0
|
@@ -7,7 +7,7 @@ This guide covers building Lightning Web Components for use in Salesforce Flow S
|
|
|
7
7
|
|
|
8
8
|
## Overview
|
|
9
9
|
|
|
10
|
-
```
|
|
10
|
+
```text
|
|
11
11
|
┌─────────────────────────────────────────────────────────────────────┐
|
|
12
12
|
│ FLOW ↔ LWC COMMUNICATION │
|
|
13
13
|
├─────────────────────────────────────────────────────────────────────┤
|
|
@@ -9,7 +9,7 @@ This guide provides comprehensive best practices for building production-ready L
|
|
|
9
9
|
|
|
10
10
|
The PICKLES Framework provides a structured approach to LWC architecture. Use it as a checklist during component design and implementation.
|
|
11
11
|
|
|
12
|
-
```
|
|
12
|
+
```text
|
|
13
13
|
🥒 P - Prototype → Validate ideas with wireframes & mock data
|
|
14
14
|
🥒 I - Integrate → Choose data source (LDS, Apex, GraphQL)
|
|
15
15
|
🥒 C - Composition → Structure component hierarchy & communication
|
|
@@ -29,7 +29,7 @@ The PICKLES Framework provides a structured approach to LWC architecture. Use it
|
|
|
29
29
|
|
|
30
30
|
Each component should do one thing well.
|
|
31
31
|
|
|
32
|
-
```
|
|
32
|
+
```text
|
|
33
33
|
✅ GOOD: accountCard, accountList, accountForm (separate components)
|
|
34
34
|
❌ BAD: accountManager (does display, list, and form in one)
|
|
35
35
|
```
|
|
@@ -52,7 +52,7 @@ Build complex UIs by composing simple components.
|
|
|
52
52
|
|
|
53
53
|
Data flows down (props), events bubble up.
|
|
54
54
|
|
|
55
|
-
```
|
|
55
|
+
```text
|
|
56
56
|
┌─────────────────────────────────────────────────────────────────┐
|
|
57
57
|
│ DATA FLOW PATTERN │
|
|
58
58
|
├─────────────────────────────────────────────────────────────────┤
|
|
@@ -268,7 +268,7 @@ this.dispatchEvent(new CustomEvent('change', {
|
|
|
268
268
|
|
|
269
269
|
### Event Naming Conventions
|
|
270
270
|
|
|
271
|
-
```
|
|
271
|
+
```text
|
|
272
272
|
✅ GOOD ❌ BAD
|
|
273
273
|
──────────────────────── ────────────────────────
|
|
274
274
|
onselect onSelectItem
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
| **PICKLES Compliance** | 25 | Architecture methodology adherence (optional) |
|
|
17
17
|
|
|
18
18
|
**Scoring Thresholds**:
|
|
19
|
-
```
|
|
19
|
+
```text
|
|
20
20
|
⭐⭐⭐⭐⭐ 150-165 pts → Production-ready, full SLDS 2 + Dark Mode
|
|
21
21
|
⭐⭐⭐⭐ 125-149 pts → Good component, minor styling issues
|
|
22
22
|
⭐⭐⭐ 100-124 pts → Functional, needs SLDS cleanup
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
LWC state management has evolved beyond simple reactive properties. This guide covers modern patterns for managing complex state across components, including the `@lwc/state` library and Salesforce Platform State Managers.
|
|
13
13
|
|
|
14
|
-
```
|
|
14
|
+
```text
|
|
15
15
|
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
16
16
|
│ STATE MANAGEMENT SPECTRUM │
|
|
17
17
|
├─────────────────────────────────────────────────────────────────────────────┤
|
|
@@ -588,7 +588,7 @@ disconnectedCallback() {
|
|
|
588
588
|
|
|
589
589
|
## Best Practices Summary
|
|
590
590
|
|
|
591
|
-
```
|
|
591
|
+
```text
|
|
592
592
|
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
593
593
|
│ STATE MANAGEMENT BEST PRACTICES │
|
|
594
594
|
├─────────────────────────────────────────────────────────────────────────────┤
|
|
@@ -7,7 +7,7 @@ The **Triangle Architecture** is a foundational Salesforce pattern where Flow, L
|
|
|
7
7
|
|
|
8
8
|
## Architecture Overview
|
|
9
9
|
|
|
10
|
-
```
|
|
10
|
+
```text
|
|
11
11
|
┌─────────────────────────────────────┐
|
|
12
12
|
│ FLOW │
|
|
13
13
|
│ (Orchestrator) │
|
|
@@ -54,7 +54,7 @@ The **Triangle Architecture** is a foundational Salesforce pattern where Flow, L
|
|
|
54
54
|
|
|
55
55
|
**Use Case**: Custom UI component for user selection within a guided Flow.
|
|
56
56
|
|
|
57
|
-
```
|
|
57
|
+
```text
|
|
58
58
|
┌─────────┐ @api (in) ┌─────────┐
|
|
59
59
|
│ FLOW │ ────────────────▶ │ LWC │
|
|
60
60
|
│ Screen │ │ Screen │
|
|
@@ -320,7 +320,7 @@ describe('c-record-selector', () => {
|
|
|
320
320
|
|
|
321
321
|
When deploying integrated triangle solutions:
|
|
322
322
|
|
|
323
|
-
```
|
|
323
|
+
```text
|
|
324
324
|
1. APEX CLASSES
|
|
325
325
|
└── @AuraEnabled controllers (LWC depends on these)
|
|
326
326
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
2
|
"""
|
|
3
|
-
Post-Tool Validation Hook for
|
|
3
|
+
Post-Tool Validation Hook for experience-lwc-generate plugin.
|
|
4
4
|
|
|
5
5
|
This hook runs AFTER Write or Edit tool completes and provides SLDS 2
|
|
6
6
|
validation feedback for LWC files (*.html, *.css, *.js).
|
|
@@ -38,7 +38,7 @@ for _ca_path in _CODE_ANALYZER_CANDIDATES:
|
|
|
38
38
|
break
|
|
39
39
|
|
|
40
40
|
# Also add shared dir for other shared modules
|
|
41
|
-
PLUGIN_ROOT = os.path.dirname(os.path.dirname(SCRIPT_DIR)) #
|
|
41
|
+
PLUGIN_ROOT = os.path.dirname(os.path.dirname(SCRIPT_DIR)) # experience-lwc-generate/
|
|
42
42
|
SKILLS_ROOT = os.path.dirname(PLUGIN_ROOT)
|
|
43
43
|
SHARED_DIR = os.path.join(SKILLS_ROOT, "shared")
|
|
44
44
|
if os.path.isdir(SHARED_DIR):
|
|
@@ -282,7 +282,7 @@ def format_output(results: Dict) -> str:
|
|
|
282
282
|
output_parts.append(f" ... and {remaining} more issues")
|
|
283
283
|
|
|
284
284
|
output_parts.append("─" * 50)
|
|
285
|
-
output_parts.append("📚 See:
|
|
285
|
+
output_parts.append("📚 See: experience-lwc-generate/references/template-anti-patterns.md")
|
|
286
286
|
|
|
287
287
|
return "\n".join(output_parts)
|
|
288
288
|
|
|
@@ -3,7 +3,14 @@ name: experience-ui-bundle-app-coordinate
|
|
|
3
3
|
description: "MUST activate when the user wants to build, create, or generate a React application, React app, web application, single-page application (SPA), or frontend application — even if no project files exist yet. MUST also activate when the project contains a uiBundles/*/src/ directory or sfdx-project.json and the prompt says create, build, construct, or generate a new app, site, or page from scratch — even if the prompt also describes visual styling. MUST also activate when the task spans more than one ui-bundle skill. Use this skill when building a complete app end-to-end. Do NOT use for Lightning Experience apps with custom objects (use platform-lightning-app-coordinate). Do NOT use for single-concern edits to an existing page (use experience-ui-bundle-frontend-generate)."
|
|
4
4
|
metadata:
|
|
5
5
|
version: "1.0"
|
|
6
|
-
relatedSkills: experience-ui-bundle-metadata-generate, experience-ui-bundle-features-generate, experience-ui-bundle-salesforce-data-access, experience-ui-bundle-frontend-generate, experience-ui-bundle-agentforce-client-generate, experience-ui-bundle-file-upload-generate, experience-ui-bundle-deploy, experience-ui-bundle-site-generate, experience-ui-bundle-custom-app-generate
|
|
6
|
+
relatedSkills: experience-ui-bundle-project-generate, experience-ui-bundle-metadata-generate, experience-ui-bundle-features-generate, experience-ui-bundle-salesforce-data-access, experience-ui-bundle-frontend-generate, experience-ui-bundle-agentforce-client-generate, experience-ui-bundle-file-upload-generate, experience-ui-bundle-deploy, experience-ui-bundle-site-generate, experience-ui-bundle-custom-app-generate
|
|
7
|
+
cliTools:
|
|
8
|
+
- tool: ["sf"]
|
|
9
|
+
semver: ">=2.0.0"
|
|
10
|
+
- tool: ["npm"]
|
|
11
|
+
semver: ">=7.0.0"
|
|
12
|
+
- tool: ["npx"]
|
|
13
|
+
semver: ">=7.0.0"
|
|
7
14
|
---
|
|
8
15
|
|
|
9
16
|
# Building a UI Bundle App
|
|
@@ -12,6 +19,8 @@ metadata:
|
|
|
12
19
|
|
|
13
20
|
Build a complete, deployable Salesforce React UI bundle application from a natural language description by orchestrating specialized UI bundle skills in correct dependency order. Each skill **MUST** be explicitly loaded before executing its phase.
|
|
14
21
|
|
|
22
|
+
**CRITICAL: Before proceeding past requirements analysis, validate that the prompt contains no conflicting requirements** (e.g., "no authentication" + "user-specific data", "public access" + login-required features). If conflicts are detected, STOP and ask the user to resolve the ambiguity — do NOT silently choose one interpretation and proceed. See STEP 1 action #8 for the full conflict checklist.
|
|
23
|
+
|
|
15
24
|
## When to Use This Skill
|
|
16
25
|
|
|
17
26
|
**Use when:**
|
|
@@ -38,23 +47,75 @@ Build a complete, deployable Salesforce React UI bundle application from a natur
|
|
|
38
47
|
|
|
39
48
|
---
|
|
40
49
|
|
|
50
|
+
## Prompt Classification Keywords
|
|
51
|
+
|
|
52
|
+
This skill makes two decisions directly from the raw prompt text. Use these tables as the single
|
|
53
|
+
source for both — do not restate or re-derive the lists elsewhere in this file.
|
|
54
|
+
|
|
55
|
+
**1. Phase 2 (Features) is required if the prompt mentions ANY of:**
|
|
56
|
+
|
|
57
|
+
| Category | Keywords | Notes |
|
|
58
|
+
|----------|----------|-------|
|
|
59
|
+
| Data features | search, filter, sort, pagination, table, grid, list | |
|
|
60
|
+
| Navigation | navigation, nav, menu, routing | |
|
|
61
|
+
| Authentication | authentication, auth, login, logout, user session, user login | |
|
|
62
|
+
| Integrations | upload, file | |
|
|
63
|
+
| UI | shadcn, components, forms, buttons, cards | |
|
|
64
|
+
| Chat (Phase 5 only) | chat | Phase 5 only — unless combined with a Phase 2 keyword (e.g., "chat with authentication"), then Phase 2 runs first for auth prerequisites |
|
|
65
|
+
|
|
66
|
+
Negating one category (e.g. "without authentication", "no login required", "public access") does
|
|
67
|
+
**not** cancel triggers from another category — each is evaluated independently. Example: "no
|
|
68
|
+
login required, with filtering" still triggers Phase 2 because "filtering" matches Data features.
|
|
69
|
+
Skip Phase 2 only when the prompt matches none of the keywords above.
|
|
70
|
+
|
|
71
|
+
**2. Hosting target — extract from prompt keywords:**
|
|
72
|
+
|
|
73
|
+
| Hosting target | Keywords |
|
|
74
|
+
|-----------------|----------|
|
|
75
|
+
| Experience Site | "Experience Site", "Community", "external users", "public users", "guest users" |
|
|
76
|
+
| Custom Application | "Custom Application", "internal users", "Lightning app" |
|
|
77
|
+
|
|
78
|
+
If the prompt matches neither list, or matches both, ask the user to clarify before proceeding — do not guess.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
41
82
|
## Dependency Graph & Build Order
|
|
42
83
|
|
|
84
|
+
### Phase 0: Template Offer & Bootstrap (Prerequisites)
|
|
85
|
+
|
|
86
|
+
```text
|
|
87
|
+
Offer prebuilt starter template (experience-ui-bundle-project-generate)
|
|
88
|
+
v
|
|
89
|
+
If template chosen: scaffold via sf template generate project -- Phase 1 skipped
|
|
90
|
+
v
|
|
91
|
+
If declined: run scripts/check-sfdx-project.sh
|
|
92
|
+
v
|
|
93
|
+
If missing: create sfdx-project.json
|
|
94
|
+
v
|
|
95
|
+
Verify project directory initialized
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Offers a faster, less error-prone starting point before building from scratch. If no template is used, ensures an SFDX project exists before attempting to generate a UI bundle — without this, `sf template generate ui-bundle` will fail with a hard error. Always check first — do not assume the project structure exists.
|
|
99
|
+
|
|
100
|
+
**Action:** Load `experience-ui-bundle-project-generate` and offer the two starter templates. If declined, run `scripts/check-sfdx-project.sh` and report any errors it returns. If the script reports an error, create the missing `sfdx-project.json` before proceeding.
|
|
101
|
+
|
|
43
102
|
### Phase 1: Scaffolding (Foundation)
|
|
44
103
|
|
|
45
104
|
```text
|
|
46
|
-
|
|
105
|
+
Determine hosting target (Experience Site / Custom Application)
|
|
106
|
+
v
|
|
107
|
+
UI Bundle scaffold (sf template generate ui-bundle --template reactbasic)
|
|
47
108
|
v
|
|
48
109
|
Install dependencies (npm install)
|
|
49
110
|
v
|
|
50
|
-
Bundle metadata (uibundle-meta.xml
|
|
111
|
+
Bundle metadata (uibundle-meta.xml with <target>, ui-bundle.json)
|
|
51
112
|
v
|
|
52
113
|
CSP Trusted Sites (if external domains needed)
|
|
53
114
|
```
|
|
54
115
|
|
|
55
|
-
Creates the UI bundle directory structure, meta XML, and optional routing/headers config. All subsequent phases require the scaffold to exist.
|
|
116
|
+
Creates the UI bundle directory structure, meta XML (including hosting target), and optional routing/headers config. **CRITICAL**: Hosting target must be determined FIRST because the metadata skill requires `<target>` in Phase 1. All subsequent phases require the scaffold to exist.
|
|
56
117
|
|
|
57
|
-
### Phase 2: Features (
|
|
118
|
+
### Phase 2: Features (Required if prompt mentions feature keywords — see "Prompt Classification Keywords" above)
|
|
58
119
|
|
|
59
120
|
```text
|
|
60
121
|
Search project code (src/) for existing implementations
|
|
@@ -68,7 +129,9 @@ Resolve conflicts (two-pass: --on-conflict error, then --conflict-resolution)
|
|
|
68
129
|
Integrate __example__ files into target files, then delete them
|
|
69
130
|
```
|
|
70
131
|
|
|
71
|
-
Installs pre-built, tested feature packages.
|
|
132
|
+
Installs pre-built, tested feature packages. See "Prompt Classification Keywords" above for the full trigger keyword list and negative-phrasing handling — these features provide the foundation that UI components build on top of.
|
|
133
|
+
|
|
134
|
+
Only skip this phase if the app is truly a minimal "hello world" with no interactive features (no trigger keywords present at all).
|
|
72
135
|
|
|
73
136
|
### Phase 3: Data Access (Backend Wiring)
|
|
74
137
|
|
|
@@ -123,16 +186,16 @@ Post-deploy configuration (permissions, profiles, named credentials, connected a
|
|
|
123
186
|
Import data (if data plan exists)
|
|
124
187
|
v
|
|
125
188
|
Fetch GraphQL schema and run codegen
|
|
126
|
-
*(Re-fetches schema from the deployed org -- required because the remote schema may differ from the local one used in Phase 3)*
|
|
189
|
+
*(Re-fetches schema from the deployed org -- required because the remote schema may differ from the local one used in Phase 3. Guard against an empty or stale result -- Salesforce Edge caching can briefly serve the pre-deploy schema; re-fetch/retry before trusting it as empty and before running codegen)*
|
|
127
190
|
v
|
|
128
191
|
Final UI bundle build (rebuilds with the deployed schema)
|
|
129
192
|
```
|
|
130
193
|
|
|
131
194
|
Follows the canonical 7-step deployment sequence. Must deploy metadata before fetching schema. Must assign permissions before schema fetch.
|
|
132
195
|
|
|
133
|
-
### Phase 7: Hosting Target
|
|
196
|
+
### Phase 7: Hosting Target Infrastructure
|
|
134
197
|
|
|
135
|
-
Choose **one** of the following based on the app's audience:
|
|
198
|
+
Deploy the hosting target infrastructure determined in Phase 1. Choose **one** of the following based on the app's audience:
|
|
136
199
|
|
|
137
200
|
#### Phase 7a: Experience Site (External)
|
|
138
201
|
|
|
@@ -144,7 +207,7 @@ Generate site metadata (Network, CustomSite, DigitalExperience)
|
|
|
144
207
|
Deploy site infrastructure
|
|
145
208
|
```
|
|
146
209
|
|
|
147
|
-
Creates the Digital Experience site that hosts the UI bundle. Use when the user wants a public-facing or authenticated site URL for external users.
|
|
210
|
+
Creates the Digital Experience site that hosts the UI bundle. Use when the user wants a public-facing or authenticated site URL for external users. **Note**: The `<target>ExperienceSite</target>` was already set in meta XML during Phase 1.
|
|
148
211
|
|
|
149
212
|
#### Phase 7b: Custom Application (Internal)
|
|
150
213
|
|
|
@@ -153,17 +216,30 @@ Resolve app properties (appName, appNamespace, appLabel)
|
|
|
153
216
|
v
|
|
154
217
|
Generate CustomApplication metadata (applications/*.app-meta.xml)
|
|
155
218
|
v
|
|
156
|
-
Add <target>CustomApplication</target> to .uibundle-meta.xml
|
|
157
|
-
v
|
|
158
219
|
Deploy custom application
|
|
159
220
|
```
|
|
160
221
|
|
|
161
|
-
Creates a Custom Application entry in the Lightning App Launcher. Use when the app is for internal users accessing it within Lightning Experience.
|
|
222
|
+
Creates a Custom Application entry in the Lightning App Launcher. Use when the app is for internal users accessing it within Lightning Experience. **Note**: The `<target>CustomApplication</target>` was already set in meta XML during Phase 1.
|
|
162
223
|
|
|
163
224
|
---
|
|
164
225
|
|
|
165
226
|
## Execution Workflow
|
|
166
227
|
|
|
228
|
+
### STEP 0: Offer a Prebuilt Template (before scaffolding from scratch)
|
|
229
|
+
|
|
230
|
+
**Before** analyzing requirements or scaffolding, check whether a prebuilt starter template fits —
|
|
231
|
+
it is faster and less error-prone than building from scratch.
|
|
232
|
+
|
|
233
|
+
- **Load skill: Invoke `experience-ui-bundle-project-generate`.** It offers two minimal React starter
|
|
234
|
+
projects (internal / employee-facing and external / customer-facing) and, if the user picks one,
|
|
235
|
+
generates it into the project directory with `sf template generate project`.
|
|
236
|
+
- **If the user chooses a template:** the scaffolding phase (Phase 1) is effectively done. Skip
|
|
237
|
+
straight to populating/customizing the project — continue at the phase that matches what they
|
|
238
|
+
want to change (typically Phase 4 UI, or Phase 3 data access), then Phase 6 deployment.
|
|
239
|
+
- **If the user declines** (wants to start from scratch, or none fit): proceed normally to STEP 1.
|
|
240
|
+
|
|
241
|
+
Do not skip this step silently — always offer the choice at the start of a from-scratch app build.
|
|
242
|
+
|
|
167
243
|
### STEP 1: Requirements Analysis & Planning
|
|
168
244
|
|
|
169
245
|
**Actions:**
|
|
@@ -173,8 +249,12 @@ Creates a Custom Application entry in the Lightning App Launcher. Use when the a
|
|
|
173
249
|
3. Extract pages and navigation structure
|
|
174
250
|
4. Identify data entities and Salesforce objects needed
|
|
175
251
|
5. Detect feature requirements (authentication, search, file upload, chat)
|
|
176
|
-
6. Determine
|
|
252
|
+
6. Determine hosting target (Experience Site OR Custom Application) — see "Prompt Classification Keywords" above; if ambiguous, ask user to clarify before proceeding
|
|
177
253
|
7. Identify external domains for CSP registration
|
|
254
|
+
8. **Check for conflicting requirements** — STOP and ask user if any of the following conflicts are detected:
|
|
255
|
+
- "No authentication" OR "public/guest access" AND "user-specific data" OR "show current user's data" OR "My [Entity]" view
|
|
256
|
+
- "External users" AND "Custom Application" (Custom Apps are internal-only)
|
|
257
|
+
- "Public access" AND features requiring login (file upload, user profile, personalization)
|
|
178
258
|
|
|
179
259
|
> **The plan MUST contain an explicit grounding step before any query authoring.** Do not list
|
|
180
260
|
> guessed object/field names as settled facts and defer verification to codegen. The data-access
|
|
@@ -183,6 +263,18 @@ Creates a Custom Application entry in the Lightning App Launcher. Use when the a
|
|
|
183
263
|
> authors queries first and codegens later is the failure mode that produces guessed fields and
|
|
184
264
|
> hand-stubbed types — do not emit it.
|
|
185
265
|
|
|
266
|
+
**Before proceeding to Output (Build Plan), validate:**
|
|
267
|
+
|
|
268
|
+
- [ ] **No conflicting requirements detected** — if conflicts exist (see action #8 above), STOP and report:
|
|
269
|
+
```text
|
|
270
|
+
ERROR: Conflicting requirements detected:
|
|
271
|
+
- [describe the specific conflict, e.g., "The prompt requires 'no authentication' while also requiring a 'My Cases' view scoped to the current user's identity"]
|
|
272
|
+
|
|
273
|
+
RESOLUTION NEEDED: Please clarify:
|
|
274
|
+
- [specific question, e.g., "Should the app require login (removing the 'no authentication' requirement), or should all data be public (removing the user-scoped view)?"]
|
|
275
|
+
```
|
|
276
|
+
**Do NOT proceed to build plan generation or any phase execution until this conflict is resolved.**
|
|
277
|
+
|
|
186
278
|
**Output: Build Plan**
|
|
187
279
|
|
|
188
280
|
```text
|
|
@@ -190,6 +282,7 @@ UI Bundle App Build Plan: [App Name]
|
|
|
190
282
|
|
|
191
283
|
SCAFFOLDING:
|
|
192
284
|
- App name: [PascalCase name]
|
|
285
|
+
- Hosting target: [Experience Site / Custom Application] **REQUIRED**
|
|
193
286
|
- Routing: [SPA rewrites, trailing slash config]
|
|
194
287
|
- External domains: [domains needing CSP registration]
|
|
195
288
|
|
|
@@ -214,10 +307,10 @@ INTEGRATIONS (if applicable):
|
|
|
214
307
|
|
|
215
308
|
DEPLOYMENT:
|
|
216
309
|
- Target org: [org alias if known]
|
|
217
|
-
- Hosting target: [Experience Site / Custom Application / none]
|
|
218
310
|
|
|
219
311
|
SKILL LOAD ORDER:
|
|
220
|
-
|
|
312
|
+
0. experience-ui-bundle-project-generate (offer a prebuilt template first; if chosen, Phase 1 scaffolding is skipped; if declined, run the Bootstrap check for an existing SFDX project -- no skill load required)
|
|
313
|
+
1. experience-ui-bundle-metadata-generate (determines hosting target FIRST)
|
|
221
314
|
2. experience-ui-bundle-features-generate (if features needed)
|
|
222
315
|
3. experience-ui-bundle-salesforce-data-access (if data access needed)
|
|
223
316
|
4. experience-ui-bundle-frontend-generate
|
|
@@ -239,33 +332,45 @@ Execute each phase sequentially. Complete all steps within a phase before moving
|
|
|
239
332
|
| **3. Verify** | Run lint and build from the UI bundle directory | Catch errors before moving to the next phase |
|
|
240
333
|
| **4. Checkpoint** | Confirm phase completion before proceeding | Ensures dependencies are satisfied for the next phase |
|
|
241
334
|
|
|
242
|
-
**Do NOT skip step 1 (loading the skill).** Even if you remember the skill's content, skills evolve. Always load the current version.
|
|
335
|
+
**CRITICAL: Do NOT skip step 1 (loading the skill).** Even if you remember the skill's content, skills evolve. Always load the current version. **Skipping or reordering phases produces broken, non-deployable apps.** Phase dependencies are strict and cannot be violated.
|
|
243
336
|
|
|
244
337
|
---
|
|
245
338
|
|
|
246
|
-
**Phase
|
|
339
|
+
**Phase 0 -- Template Offer & Bootstrap** (always, before scaffolding)
|
|
340
|
+
- 1. Load skill: Invoke `experience-ui-bundle-project-generate`
|
|
341
|
+
- 2. Execute: Offer the two starter templates; if the user picks one, generate it into the project dir with `sf template generate project`
|
|
342
|
+
- 3. Decision: If a template was used, the project is scaffolded (including a valid SFDX project structure) — skip Phase 1 and continue at the phase matching the user's customization (usually Phase 4 UI). If declined, proceed to the Bootstrap check below.
|
|
343
|
+
- 4. Bootstrap (no skill load required, only if no template was used): Run `scripts/check-sfdx-project.sh` and report any errors it returns. If the script reports an error, create the SFDX project structure (`sf project generate` or manually create sfdx-project.json).
|
|
344
|
+
- 5. Checkpoint: SFDX project ready -- proceed to Phase 1
|
|
345
|
+
|
|
346
|
+
**Phase 1 -- Scaffolding** (skip if a template was generated in Phase 0)
|
|
247
347
|
- 1. Load skill: Invoke `experience-ui-bundle-metadata-generate`
|
|
248
|
-
- 2. Execute: Run `sf template generate ui-bundle`, install dependencies (`npm install`), configure meta XML, ui-bundle.json, and CSP trusted sites
|
|
249
|
-
- 3. Verify: Confirm directory structure and metadata files exist
|
|
348
|
+
- 2. Execute: Determine hosting target (Experience Site / Custom Application) FIRST. Run `sf template generate ui-bundle --template reactbasic`, install dependencies (`npm install`), configure meta XML (with `<target>`), ui-bundle.json, and CSP trusted sites.
|
|
349
|
+
- 3. Verify: Confirm directory structure and metadata files exist with hosting target specified
|
|
250
350
|
- 4. Checkpoint: UI bundle scaffold is ready -- proceed to Phase 2
|
|
251
351
|
|
|
252
|
-
**Phase 2 -- Features** (
|
|
352
|
+
**Phase 2 -- Features** (Required if prompt mentions feature keywords — see "Prompt Classification Keywords" above)
|
|
253
353
|
- 1. Load skill: Invoke `experience-ui-bundle-features-generate`
|
|
254
354
|
- 2. Execute: Install dependencies, search and install features, integrate example files
|
|
255
355
|
- 3. Verify: Run `npm run build` to confirm features integrate cleanly
|
|
256
|
-
-
|
|
356
|
+
- **Trigger conditions**: See "Prompt Classification Keywords" above for the full keyword list (by category) and how negative phrasing is handled -- negating one category does not cancel triggers from another.
|
|
257
357
|
|
|
258
358
|
**Phase 3 -- Data Access** (skip if no Salesforce data needed)
|
|
259
359
|
- 1. Load skill: Invoke `experience-ui-bundle-salesforce-data-access`
|
|
260
|
-
- 2. Execute:
|
|
261
|
-
- 3. Verify: Run `npx eslint` on files with GraphQL queries
|
|
360
|
+
- 2. Execute: Check preconditions (authenticated org, npm dependencies installed). Fetch schema (`npm run graphql:schema`), guard against empty schema. Look up entities, generate queries/mutations, wire into components.
|
|
361
|
+
- 3. Verify: Run `npx eslint` on files with GraphQL queries. Verify schema is non-empty.
|
|
262
362
|
- 4. Checkpoint: Data layer ready -- proceed to Phase 4
|
|
263
363
|
|
|
264
|
-
**Phase 4 -- UI**
|
|
364
|
+
**Phase 4 -- UI** (ALWAYS REQUIRED - CANNOT BE SKIPPED)
|
|
265
365
|
- 1. Load skill: Invoke `experience-ui-bundle-frontend-generate`
|
|
266
366
|
- 2. Execute: Build layout, pages, components, navigation. Replace all boilerplate.
|
|
367
|
+
- If Phase 2 was skipped: Generate UI components from scratch without feature templates
|
|
368
|
+
- If Phase 3 was skipped: Use mock data or static content for display
|
|
369
|
+
- Phase 4 MUST execute even if prior phases were skipped
|
|
267
370
|
- 3. Verify: Run lint and build -- 0 errors required
|
|
268
|
-
- 4. Checkpoint: UI complete -- proceed to Phase 5
|
|
371
|
+
- 4. Checkpoint: UI complete -- proceed to Phase 5 if integrations needed, or stop here if building only
|
|
372
|
+
|
|
373
|
+
⚠️ **CRITICAL**: Phase 4 generates the actual React user interface. Skipping it results in a UI bundle with only metadata and no user-facing pages or components. ALWAYS execute Phase 4 for every UI bundle build.
|
|
269
374
|
|
|
270
375
|
**Phase 5 -- Integrations** (skip if not requested)
|
|
271
376
|
- 1. Load skill(s): Invoke `experience-ui-bundle-agentforce-client-generate` (5a) and/or `experience-ui-bundle-file-upload-generate` (5b). If both are needed, they are independent and can be executed in parallel.
|
|
@@ -275,21 +380,76 @@ Execute each phase sequentially. Complete all steps within a phase before moving
|
|
|
275
380
|
|
|
276
381
|
**Phase 6 -- Deployment**
|
|
277
382
|
- 1. Load skill: Invoke `experience-ui-bundle-deploy`
|
|
278
|
-
- 2. Execute: Follow the 7-step deployment sequence (auth, build, deploy, permissions, data, schema, final build)
|
|
279
|
-
- 3. Verify: Confirm deployment succeeds and
|
|
280
|
-
- 4. Checkpoint: App deployed -- proceed to Phase 7 if needed
|
|
383
|
+
- 2. Execute: Check preconditions (authenticated org, successful build). Follow the 7-step deployment sequence (auth, build, deploy, permissions, data, schema, final build). When available, prefer using a project-level `scripts/org-setup.mjs` automation script over re-deriving the deployment flow each run. Guard the post-deploy schema re-fetch against an empty/stale result (Edge caching) before running final codegen -- retry rather than trusting an empty schema.
|
|
384
|
+
- 3. Verify: Confirm deployment succeeds, app is accessible, and the re-fetched schema is non-empty
|
|
385
|
+
- 4. Checkpoint: App deployed -- proceed to Phase 7 if hosting target deployment is needed
|
|
281
386
|
|
|
282
387
|
**Phase 7a -- Experience Site** (skip if not requested or if Custom Application chosen)
|
|
283
388
|
- 1. Load skill: Invoke `experience-ui-bundle-site-generate`
|
|
284
389
|
- 2. Execute: Resolve properties, generate site metadata, deploy
|
|
285
|
-
- 3. Verify: Confirm site URL is accessible
|
|
390
|
+
- 3. Verify: Confirm site URL is accessible (hosting target already verified by `scripts/check-hosting-target.sh` in trigger evaluation)
|
|
286
391
|
- 4. Checkpoint: Site live -- build complete
|
|
392
|
+
- **Trigger conditions**: Run `scripts/check-hosting-target.sh` and check output for "ExperienceSite" OR prompt matches an Experience Site keyword in "Prompt Classification Keywords" above
|
|
393
|
+
- **Note**: The `<target>ExperienceSite</target>` was already set in meta XML during Phase 1 -- do not add it again
|
|
287
394
|
|
|
288
395
|
**Phase 7b -- Custom Application** (skip if not requested or if Experience Site chosen)
|
|
289
396
|
- 1. Load skill: Invoke `experience-ui-bundle-custom-app-generate`
|
|
290
|
-
- 2. Execute: Resolve app properties, generate CustomApplication metadata
|
|
291
|
-
- 3. Verify: Confirm app appears in App Launcher
|
|
397
|
+
- 2. Execute: Resolve app properties, generate CustomApplication metadata
|
|
398
|
+
- 3. Verify: Confirm app appears in App Launcher (hosting target already verified by `scripts/check-hosting-target.sh` in trigger evaluation)
|
|
292
399
|
- 4. Checkpoint: App registered -- build complete
|
|
400
|
+
- **Trigger conditions**: Run `scripts/check-hosting-target.sh` and check output for "CustomApplication" OR prompt matches a Custom Application keyword in "Prompt Classification Keywords" above
|
|
401
|
+
- **Note**: The `<target>CustomApplication</target>` was already set in meta XML during Phase 1 -- do not add it again
|
|
402
|
+
|
|
403
|
+
### STEP 2.5: Phase Completion Validation
|
|
404
|
+
|
|
405
|
+
Before proceeding to STEP 3 (Final Summary), validate that all required phases were executed:
|
|
406
|
+
|
|
407
|
+
**Critical Validation (MUST pass):**
|
|
408
|
+
- [ ] **Phase 0 (Template Offer & Bootstrap) executed**: If no template was used, run `scripts/check-sfdx-project.sh`. If it returns non-zero, STOP and report error:
|
|
409
|
+
```text
|
|
410
|
+
ERROR: No SFDX project detected. Phase 0 (Bootstrap) is REQUIRED before scaffolding.
|
|
411
|
+
Run `sf project generate` (or create sfdx-project.json) before invoking
|
|
412
|
+
`sf template generate ui-bundle`.
|
|
413
|
+
```
|
|
414
|
+
If a template was used in Phase 0, this check is satisfied by the template's own scaffolding — skip re-running the script.
|
|
415
|
+
|
|
416
|
+
- [ ] **Phase 1 hosting target resolved**: Run `scripts/check-hosting-target.sh`. If it returns non-zero, STOP and report error:
|
|
417
|
+
```text
|
|
418
|
+
ERROR: Hosting target was not resolved in Phase 1. A UI bundle without a <target> in its
|
|
419
|
+
meta XML will not be visible in the org. Determine Experience Site vs Custom Application
|
|
420
|
+
(see "Prompt Classification Keywords" above; ask the user if ambiguous) before proceeding
|
|
421
|
+
past Phase 1 -- do not defer this to Phase 7 and do not record "none"/"skipped".
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
- [ ] **Phase 4 (Frontend) executed**: If Phase 4 was NOT executed, STOP and report error:
|
|
425
|
+
```text
|
|
426
|
+
ERROR: Phase 4 (UI/Frontend generation) is REQUIRED for all UI bundle apps.
|
|
427
|
+
Cannot complete build without generating the React user interface.
|
|
428
|
+
Please review the phase execution logic and ensure Phase 4 is always executed.
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
- [ ] **Phase 7 hosting infrastructure deployed**: If neither Phase 7a nor Phase 7b was executed, STOP and report error:
|
|
432
|
+
```text
|
|
433
|
+
ERROR: Hosting target infrastructure (Phase 7a Experience Site or Phase 7b Custom
|
|
434
|
+
Application) was not deployed. The app was built but is not reachable by any user.
|
|
435
|
+
Exactly one of Phase 7a/7b must run -- it is never optional or "skipped".
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
**Warning Validation (log warnings, but can proceed):**
|
|
439
|
+
- [ ] **Phase 2 execution**: If Phase 2 was skipped but the prompt matches any keyword in "Prompt Classification Keywords" above (data features, navigation, authentication, integrations, or UI category):
|
|
440
|
+
```text
|
|
441
|
+
WARNING: Phase 2 (Features) was skipped but prompt contains feature keywords.
|
|
442
|
+
This may indicate a trigger detection failure. Generated UI may be missing
|
|
443
|
+
required feature functionality. Consider re-running with Phase 2 included.
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
- [ ] **Phase 3 execution**: If Phase 3 was skipped but prompt mentions Salesforce objects, "GraphQL", "data", or "query":
|
|
447
|
+
```text
|
|
448
|
+
WARNING: Phase 3 (Data Access) was skipped but prompt mentions Salesforce data.
|
|
449
|
+
Generated UI may not connect to backend correctly. Verify data access is working.
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
**Proceed to STEP 3 only if all Critical Validation checks pass (Phase 0, hosting target, Phase 4, Phase 7).**
|
|
293
453
|
|
|
294
454
|
### STEP 3: Final Summary
|
|
295
455
|
|
|
@@ -299,13 +459,14 @@ After all phases complete, present a build summary:
|
|
|
299
459
|
UI Bundle App Build Complete: [App Name]
|
|
300
460
|
|
|
301
461
|
PHASES COMPLETED:
|
|
302
|
-
[x] Phase
|
|
462
|
+
[x] Phase 0: Template Offer & Bootstrap -- [template used: <name> / declined; SFDX project verified/created]
|
|
463
|
+
[x] Phase 1: Scaffolding -- [app name] UI bundle created with hosting target [Experience Site / Custom Application]
|
|
303
464
|
[x] Phase 2: Features -- [list of features installed, or "skipped"]
|
|
304
465
|
[x] Phase 3: Data Access -- [list of entities wired up]
|
|
305
466
|
[x] Phase 4: UI -- [count] pages, [count] components
|
|
306
467
|
[x] Phase 5: Integrations -- [list or "none"]
|
|
307
468
|
[x] Phase 6: Deployment -- deployed to [org]
|
|
308
|
-
[x] Phase 7: Hosting Target -- [Experience Site URL / Custom Application name
|
|
469
|
+
[x] Phase 7: Hosting Target -- [Experience Site URL / Custom Application name] **(never "skipped" -- Phase 1 requires a target, so exactly one of 7a/7b always runs)**
|
|
309
470
|
|
|
310
471
|
FILES GENERATED:
|
|
311
472
|
[list key files and their paths]
|
|
@@ -321,8 +482,10 @@ NEXT STEPS:
|
|
|
321
482
|
Before presenting the build as complete, verify:
|
|
322
483
|
|
|
323
484
|
- [ ] **Scaffold exists**: UI bundle directory with valid meta XML and ui-bundle.json
|
|
485
|
+
- [ ] **Hosting target resolved and deployed**: Meta XML contains `<target>ExperienceSite</target>` or `<target>CustomApplication</target>` (never left unset), and the matching Phase 7a or 7b infrastructure was generated and deployed -- not skipped
|
|
324
486
|
- [ ] **Dependencies installed**: `node_modules/` exists and `package.json` has expected packages
|
|
325
487
|
- [ ] **Build passes**: `npm run build` produces `dist/` with no errors
|
|
488
|
+
- [ ] **Dist content exists**: `dist/` contains index.html, JS/CSS bundles, and assets (not just an empty directory)
|
|
326
489
|
- [ ] **Lint passes**: `npx eslint src/` reports 0 errors
|
|
327
490
|
- [ ] **No boilerplate**: All placeholder text, default titles, and template content has been replaced
|
|
328
491
|
- [ ] **Navigation works**: `appLayout.tsx` has real nav items matching created pages
|
|
@@ -337,6 +500,7 @@ Before presenting the build as complete, verify:
|
|
|
337
500
|
|
|
338
501
|
- App purpose is too vague to determine pages or data needs
|
|
339
502
|
- User wants features that conflict (e.g., "no authentication" + "show user-specific data")
|
|
503
|
+
- Hosting target cannot be determined (ask: "Is this for internal users (Custom Application) or external users (Experience Site)?")
|
|
340
504
|
- Target org is unknown and deployment is requested
|
|
341
505
|
|
|
342
506
|
### Category 2: Log Warning, Continue
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Check which hosting target is configured in .uibundle-meta.xml files
|
|
3
|
+
|
|
4
|
+
# Find all .uibundle-meta.xml files
|
|
5
|
+
META_FILES=$(find . -name "*.uibundle-meta.xml" -type f 2>/dev/null)
|
|
6
|
+
|
|
7
|
+
if [ -z "$META_FILES" ]; then
|
|
8
|
+
echo "ERROR: No .uibundle-meta.xml files found"
|
|
9
|
+
exit 1
|
|
10
|
+
fi
|
|
11
|
+
|
|
12
|
+
# Check for ExperienceSite target
|
|
13
|
+
if echo "$META_FILES" | xargs grep -q '<target>ExperienceSite</target>' 2>/dev/null; then
|
|
14
|
+
echo "ExperienceSite"
|
|
15
|
+
exit 0
|
|
16
|
+
fi
|
|
17
|
+
|
|
18
|
+
# Check for CustomApplication target
|
|
19
|
+
if echo "$META_FILES" | xargs grep -q '<target>CustomApplication</target>' 2>/dev/null; then
|
|
20
|
+
echo "CustomApplication"
|
|
21
|
+
exit 0
|
|
22
|
+
fi
|
|
23
|
+
|
|
24
|
+
# No valid target found
|
|
25
|
+
echo "ERROR: No valid hosting target found in .uibundle-meta.xml"
|
|
26
|
+
exit 1
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Check if sfdx-project.json exists and is valid JSON
|
|
3
|
+
|
|
4
|
+
if [ ! -f sfdx-project.json ]; then
|
|
5
|
+
echo 'ERROR: sfdx-project.json not found'
|
|
6
|
+
exit 1
|
|
7
|
+
fi
|
|
8
|
+
|
|
9
|
+
# Validate JSON format using python (more portable than node)
|
|
10
|
+
if ! python3 -c "import json; json.load(open('sfdx-project.json'))" 2>/dev/null; then
|
|
11
|
+
echo 'ERROR: sfdx-project.json is not valid JSON'
|
|
12
|
+
exit 1
|
|
13
|
+
fi
|
|
14
|
+
|
|
15
|
+
echo 'sfdx-project.json is valid'
|
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: experience-ui-bundle-metadata-generate
|
|
3
|
-
description: "
|
|
3
|
+
description: "Use this skill when adding a front-end React UI bundle to an existing project or configuring UI bundle metadata and config files. TRIGGER when: adding or scaffolding a new UI bundle inside a project that already exists; running sf template generate ui-bundle; editing ui-bundle.json routing, headers, or output directory; working with *.uibundle-meta.xml files; or registering CSP Trusted Sites, resolving blocked images or fonts or external API calls, or editing cspTrustedSites/*.cspTrustedSite-meta.xml files. DO NOT TRIGGER when: creating a brand-new Salesforce project from scratch, where the whole SFDX starter project (UI bundle plus Experience Site metadata and toolchain) is generated together (use experience-ui-bundle-project-generate)."
|
|
4
4
|
metadata:
|
|
5
5
|
version: "1.0"
|
|
6
|
+
minApiVersion: "51.0"
|
|
7
|
+
relatedSkills:
|
|
8
|
+
- "experience-ui-bundle-frontend-generate"
|
|
9
|
+
- "experience-ui-bundle-custom-app-generate"
|
|
10
|
+
- "experience-ui-bundle-site-generate"
|
|
11
|
+
cliTools:
|
|
12
|
+
- tool: ["sf"]
|
|
13
|
+
semver: ">=2.0.0"
|
|
14
|
+
- tool: ["jq"]
|
|
15
|
+
semver: ">=1.6"
|
|
6
16
|
---
|
|
7
17
|
|
|
8
18
|
# UI Bundle Metadata
|
|
@@ -11,9 +21,9 @@ metadata:
|
|
|
11
21
|
|
|
12
22
|
Use `sf template generate ui-bundle` to create new apps — not create-react-app, Vite, or other generic scaffolds.
|
|
13
23
|
|
|
14
|
-
**Always pass `--template reactbasic`** to scaffold a React-based bundle.
|
|
15
|
-
|
|
16
|
-
|
|
24
|
+
- **Always pass `--template reactbasic`** to scaffold a React-based bundle.
|
|
25
|
+
- **UI bundle name (`-n`):** Alphanumerical only — no spaces, hyphens, underscores, or special characters.
|
|
26
|
+
- Pass `--output-dir` to use a different location for template generation.
|
|
17
27
|
|
|
18
28
|
**Example:**
|
|
19
29
|
```bash
|
|
@@ -21,10 +31,11 @@ sf template generate ui-bundle -n CoffeeBoutique --template reactbasic
|
|
|
21
31
|
```
|
|
22
32
|
|
|
23
33
|
After generation:
|
|
24
|
-
1.
|
|
25
|
-
2.
|
|
26
|
-
3.
|
|
27
|
-
4.
|
|
34
|
+
1. **Verify API version** — run `bash <skill_dir>/scripts/check-api-version.sh` from the project root to ensure `sourceApiVersion` in `sfdx-project.json` is 67.0 or higher. The script will automatically update it if needed.
|
|
35
|
+
2. Replace all default boilerplate — "React App", "Vite + React", default `<title>`, placeholder text
|
|
36
|
+
3. Populate the home page with real content (landing section, banners, hero, navigation)
|
|
37
|
+
4. Update navigation and placeholders (see the `experience-ui-bundle-frontend-generate` skill)
|
|
38
|
+
5. **Configure a hosting target** — a UI bundle without a `<target>` in its meta XML will not be visible in the org. Use `experience-ui-bundle-custom-app-generate` for internal (App Launcher) apps or `experience-ui-bundle-site-generate` for external (Experience Site) apps.
|
|
28
39
|
|
|
29
40
|
Always install dependencies before running any scripts in the UI bundle directory.
|
|
30
41
|
|