@salesforce/afv-skills 1.54.0 → 1.56.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/package.json +1 -1
- package/skills/agentforce-generate/SKILL.md +8 -0
- package/skills/agentforce-generate/references/actions-reference.md +2 -2
- package/skills/agentforce-generate/references/voice-modality-reference.md +51 -15
- package/skills/agentforce-generate/references/voice-telephony-cli.md +193 -0
- package/skills/agentforce-observe/SKILL.md +13 -9
- package/skills/agentforce-observe/references/ahm-alerts.md +193 -14
- package/skills/automation-sandbox-post-copy-config-generate/SKILL.md +24 -15
- package/skills/automation-sandbox-post-copy-config-generate/assets/config_template.json +11 -0
- package/skills/automation-sandbox-post-copy-config-generate/assets/json_schema.json +33 -1
- package/skills/automation-sandbox-post-copy-config-generate/references/configuration_catalog.md +32 -1
- package/skills/automation-sandbox-post-copy-configure/SKILL.md +75 -71
- package/skills/automation-sandbox-post-copy-configure/assets/scheduled_apex_template.apex +13 -0
- package/skills/automation-sandbox-post-copy-configure/examples/sample_scheduled_apex_config.json +13 -0
- package/skills/automation-sandbox-post-copy-configure/references/scheduled_apex_path.md +155 -0
- package/skills/automation-sandbox-post-copy-configure/scripts/build-scheduled-apex.mjs +62 -0
- package/skills/automation-sandbox-post-copy-configure/scripts/soql-escape-job-name.mjs +28 -0
- package/skills/consumer-goods-accruals-datakit-deploy/SKILL.md +383 -0
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/setup.js +324 -0
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/00-check-prerequisites.js +63 -0
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/01-download-static-resource.js +100 -0
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/02-replace-org-id.js +46 -0
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/03-deploy-metadata.js +46 -0
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/04-deploy-engine.js +198 -0
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/05-deploy-tpm-accruals.js +231 -0
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/06-create-dataspace.js +82 -0
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/07-deploy-accruals-reports.js +517 -0
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/08-deploy-ui.js +416 -0
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/09-completion.js +44 -0
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/utils.js +514 -0
- package/skills/consumer-goods-sync-management-configure/SKILL.md +137 -0
- package/skills/consumer-goods-sync-management-configure/examples/scenarios.md +294 -0
- package/skills/consumer-goods-sync-management-configure/references/act1-setup-sync.md +333 -0
- package/skills/consumer-goods-sync-management-configure/references/act2-assign-users.md +324 -0
- package/skills/consumer-goods-sync-management-configure/references/act3-plan-verify.md +113 -0
- package/skills/consumer-goods-sync-management-configure/references/readiness-and-enablement.md +164 -0
- package/skills/consumer-goods-sync-management-configure/references/sync-management-app-install-backbone.md +159 -0
- package/skills/consumer-goods-sync-management-configure/references/transports-and-namespace.md +220 -0
- package/skills/consumer-goods-sync-management-configure/references/verify-and-smoke.md +175 -0
- package/skills/dx-org-analyze/README.md +310 -0
- package/skills/dx-org-analyze/SKILL.md +260 -0
- package/skills/dx-org-analyze/references/collection-details.md +88 -0
- package/skills/dx-org-analyze/references/report-format.md +67 -0
- package/skills/dx-org-analyze/scripts/collect_org_data.py +823 -0
- package/skills/dx-org-analyze/scripts/compute_diff.py +1101 -0
- package/skills/dx-org-analyze/scripts/introspect_org.py +400 -0
- package/skills/dx-org-analyze/tests/README.md +46 -0
- package/skills/dx-org-analyze/tests/fixtures/org_a.json +76 -0
- package/skills/dx-org-analyze/tests/fixtures/org_b.json +70 -0
- package/skills/dx-org-analyze/tests/test_compute_diff.sh +284 -0
- package/skills/dx-org-analyze/tests/test_consistency.sh +428 -0
- package/skills/dx-org-manage/SKILL.md +6 -50
- package/skills/dx-org-manage/examples/README.md +10 -16
- package/skills/dx-org-manage/references/scratch-org-create.md +1 -1
- package/skills/dx-org-manage/references/scratch-org-operations.md +1 -1
- package/skills/dx-org-shape-manage/SKILL.md +4 -3
- package/skills/education-cloud-domain-configure/references/gotchas-extended.md +1 -0
- package/skills/experience-accessibility-validate/SKILL.md +8 -5
- package/skills/experience-accessibility-validate/references/reviewers/sc-1-1-1-non-text-content.md +1 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-1-3-1-i-lists.md +0 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-1-3-1-ii-tables.md +20 -85
- package/skills/experience-accessibility-validate/references/reviewers/sc-1-3-1-iii-form-labels.md +4 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-1-3-1-iv-regions.md +0 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-1-3-1-v-groups.md +2 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-1-3-5-identify-input.md +0 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-1-4-3-contrast.md +4 -14
- package/skills/experience-accessibility-validate/references/reviewers/sc-2-1-1-keyboard.md +9 -5
- package/skills/experience-accessibility-validate/references/reviewers/sc-2-4-4-link-purpose.md +1 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-2-4-6-headings-labels.md +0 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-2-5-1-pointer-gestures.md +0 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-2-5-2-pointer-cancellation.md +0 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-2-5-3-label-in-name.md +0 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-2-5-7-dragging-movement.md +0 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-3-2-1-on-focus.md +0 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-3-2-2-on-input.md +1 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-3-3-1-error-identification.md +1 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-3-3-2-labels-instructions.md +1 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-3-3-3-error-suggestion.md +1 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-4-1-2-i-name.md +4 -5
- package/skills/experience-accessibility-validate/references/reviewers/sc-4-1-2-ii-role.md +1 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-4-1-2-iii-value.md +0 -4
- package/skills/experience-design-validate/SKILL.md +163 -0
- package/skills/experience-design-validate/references/ai.md +54 -0
- package/skills/experience-design-validate/references/components.md +61 -0
- package/skills/experience-design-validate/references/craft.md +158 -0
- package/skills/experience-design-validate/references/data.md +59 -0
- package/skills/experience-design-validate/references/forms-flows.md +57 -0
- package/skills/experience-design-validate/references/interaction.md +53 -0
- package/skills/experience-design-validate/references/navigation.md +51 -0
- package/skills/experience-design-validate/references/performance.md +56 -0
- package/skills/experience-design-validate/references/records.md +60 -0
- package/skills/experience-design-validate/references/responsive.md +48 -0
- package/skills/experience-design-validate/references/scoring-rubric.md +257 -0
- package/skills/experience-design-validate/references/state.md +53 -0
- package/skills/experience-design-validate/references/trust.md +47 -0
- package/skills/experience-design-validate/references/usability.md +35 -0
- package/skills/experience-design-validate/references/visual-system.md +183 -0
- package/skills/experience-lwc-accessibility-jest-run/SKILL.md +104 -25
- package/skills/experience-lwc-accessibility-jest-run/assets/jest.config.js +4 -0
- package/skills/experience-lwc-accessibility-jest-run/assets/sa11y-jest-setup.js +5 -0
- package/skills/experience-ui-bundle-app-coordinate/SKILL.md +5 -5
- package/skills/experience-ui-bundle-features-generate/SKILL.md +65 -36
- package/skills/experience-ui-bundle-features-generate/references/angular/features.md +74 -0
- package/skills/experience-ui-bundle-features-generate/references/react/features.md +59 -0
- package/skills/experience-ui-bundle-features-generate/scripts/detect-framework.sh +73 -0
- package/skills/experience-ui-bundle-frontend-generate/SKILL.md +2 -2
- package/skills/experience-ui-bundle-metadata-generate/SKILL.md +26 -14
- package/skills/experience-ui-bundle-metadata-generate/references/angular-metadata-generate.md +37 -0
- package/skills/experience-ui-bundle-metadata-generate/references/react-metadata-generate.md +32 -0
- package/skills/experience-ui-bundle-metadata-generate/scripts/detect-framework.sh +73 -0
- package/skills/experience-ui-bundle-metadata-generate/scripts/verify-bundle-location.sh +30 -8
- package/skills/field-service-data-capture-migrate/SKILL.md +391 -0
- package/skills/field-service-data-capture-migrate/assets/sample-legacy-flow.flow-meta.xml +163 -0
- package/skills/field-service-data-capture-migrate/references/architecture-notes.md +40 -0
- package/skills/field-service-data-capture-migrate/references/component-mapping.md +278 -0
- package/skills/field-service-data-capture-migrate/references/converter-builder-contract.md +183 -0
- package/skills/field-service-data-capture-migrate/references/dc-platform-rules.md +130 -0
- package/skills/field-service-data-capture-migrate/references/fsm-dc-capability-catalog.md +215 -0
- package/skills/field-service-data-capture-migrate/references/known-deploy-errors.md +36 -0
- package/skills/field-service-data-capture-migrate/references/migration-checklist.md +121 -0
- package/skills/field-service-data-capture-migrate/references/transformer-rules.md +132 -0
- package/skills/field-service-data-capture-migrate/scripts/analyze_flow.py +277 -0
- package/skills/field-service-data-capture-migrate/scripts/convert_to_dc_spec.py +1311 -0
- package/skills/field-service-data-capture-migrate/scripts/cud_analysis.py +402 -0
- package/skills/field-service-data-capture-migrate/scripts/deploy_flow.sh +230 -0
- package/skills/field-service-data-capture-migrate/scripts/discover_subflow_tree.py +230 -0
- package/skills/field-service-data-capture-migrate/scripts/flow_input.py +186 -0
- package/skills/field-service-data-capture-migrate/scripts/flow_xml_utils.py +39 -0
- package/skills/field-service-data-capture-migrate/scripts/fsm_dc_catalog.py +413 -0
- package/skills/field-service-data-capture-migrate/scripts/generate_summary.py +199 -0
- package/skills/field-service-data-capture-migrate/scripts/json_to_flow_xml.py +146 -0
- package/skills/field-service-data-capture-migrate/scripts/manual_review_flags.py +42 -0
- package/skills/field-service-data-capture-migrate/scripts/retrieve_flow_rest.sh +155 -0
- package/skills/field-service-data-capture-migrate/scripts/subflow_names.py +49 -0
- package/skills/field-service-data-capture-migrate/scripts/transform_flow.py +1661 -0
- package/skills/field-service-data-capture-migrate/scripts/validate_flow.sh +147 -0
- package/skills/field-service-data-capture-migrate/scripts/vendor/build_flow.py +1258 -0
- package/skills/life-sciences-fieldsalesrep-coordinate/SKILL.md +1 -1
- package/skills/life-sciences-fieldsalesrep-coordinate/references/orchestration-flow.md +1 -1
- package/skills/life-sciences-kam-coordinate/references/stage-5-data-and-plan-templates-overview.md +14 -1
- package/skills/mobile-apps-create/SKILL.md +1 -1
- package/skills/{platform-agentsetup-categories-fetch → platform-agenticsetup-categories-get}/SKILL.md +7 -7
- package/skills/platform-sandbox-configure/SKILL.md +108 -133
- package/skills/platform-sandbox-configure/references/api-response-shapes.md +39 -0
- package/skills/platform-sandbox-configure/references/definition-file-approach.md +73 -0
- package/skills/platform-widget-generate/SKILL.md +26 -18
- package/skills/platform-widget-generate/examples/formulas.json +191 -0
- package/skills/platform-widget-generate/references/widget-formulas.md +123 -0
- package/skills/platform-widget-generate/references/widget-meta-directives.md +4 -4
- package/skills/sales-call-scoring-configure/SKILL.md +318 -0
- package/skills/sales-call-scoring-configure/assets/best-practice-competencies.json +67 -0
- package/skills/sales-call-scoring-configure/assets/ootb-competencies.json +58 -0
- package/skills/sales-call-scoring-configure/references/admin-communication.md +79 -0
- package/skills/sales-call-scoring-configure/references/competency-crud.md +130 -0
- package/skills/sales-call-scoring-configure/scripts/create-competency.sh +166 -0
- package/skills/sales-call-scoring-configure/scripts/create-custom-competency.sh +166 -0
- package/skills/sales-call-scoring-configure/scripts/edit-competency.sh +185 -0
- package/skills/sales-call-scoring-configure/scripts/edit-custom-competency.sh +190 -0
- package/skills/sales-call-scoring-configure/scripts/enable-call-scoring.sh +436 -0
- package/skills/sales-call-scoring-configure/scripts/get-competency.sh +72 -0
- package/skills/sales-call-scoring-configure/scripts/get-custom-competency.sh +78 -0
- package/skills/sales-call-scoring-configure/scripts/install-best-practice-competencies.sh +223 -0
- package/skills/sales-call-scoring-configure/scripts/install-ootb-competencies.sh +237 -0
- package/skills/sales-call-scoring-configure/scripts/list-competencies.sh +99 -0
- package/skills/sales-call-scoring-configure/scripts/shared/auth.sh +116 -0
- package/skills/sales-call-scoring-configure/scripts/shared/cap.sh +86 -0
- package/skills/sales-call-scoring-configure/scripts/shared/soap.sh +267 -0
- package/skills/sales-call-scoring-configure/scripts/shared/soql.sh +25 -0
- package/skills/sales-call-scoring-configure/scripts/toggle-competency.sh +112 -0
- package/skills/sales-call-scoring-configure/scripts/toggle-custom-competency.sh +125 -0
- package/skills/sales-call-scoring-configure/scripts/verify-ootb-competencies.sh +116 -0
- package/skills/service-concierge-portal-generate/references/portal-deploy-runbook.md +1 -0
- package/skills/service-de-channel-activate/SKILL.md +6 -5
- package/skills/service-de-channel-create/SKILL.md +3 -3
- package/skills/service-de-channel-routing-configure/SKILL.md +3 -3
- package/skills/service-de-channel-settings-configure/SKILL.md +195 -0
- package/skills/service-de-channel-settings-configure/references/channel-settings-facets.md +152 -0
- package/skills/{service-de-channel-consent-configure → service-de-channel-settings-configure}/references/gotchas.md +3 -3
- package/skills/{service-de-channel-consent-configure → service-de-channel-settings-configure}/references/language-keywords.md +4 -4
- package/skills/{service-de-channel-consent-configure → service-de-channel-settings-configure}/references/worked-examples.md +14 -14
- package/skills/service-de-headless-channel-configure/SKILL.md +6 -6
- package/skills/service-de-headless-channel-configure/references/worked-examples.md +1 -1
- package/skills/service-helpagent-coordinate/SKILL.md +3 -2
- package/skills/service-helpagent-coordinate/references/channel-voice.md +15 -4
- package/skills/service-itsm-agentic-setup-agentforce-coordinate/SKILL.md +49 -31
- package/skills/service-itsm-agentic-setup-agentforce-coordinate/examples/output-templates.md +71 -6
- package/skills/service-itsm-agentic-setup-agentforce-coordinate/scripts/verify-child-verdict.mjs +26 -4
- package/skills/service-itsm-agentic-setup-cmdb-access-assign/SKILL.md +35 -10
- package/skills/service-itsm-agentic-setup-cmdb-access-assign/references/mcp-invocation.md +25 -5
- package/skills/service-itsm-agentic-setup-cmdb-bundle-deploy/SKILL.md +1 -1
- package/skills/service-itsm-agentic-setup-cmdb-configure/SKILL.md +5 -5
- package/skills/service-itsm-agentic-setup-cmdb-configure/references/mcp-invocation.md +1 -1
- package/skills/service-itsm-agentic-setup-cmdb-coordinate/SKILL.md +2 -2
- package/skills/service-itsm-agentic-setup-cmdb-coordinate/examples/output-templates.md +1 -1
- package/skills/service-itsm-agentic-setup-cmdb-discovery-configure/SKILL.md +25 -15
- package/skills/service-itsm-agentic-setup-employee-agent-configure/SKILL.md +8 -5
- package/skills/service-itsm-agentic-setup-employee-agent-configure/references/report-format.md +4 -2
- package/skills/service-itsm-agentic-setup-employee-agent-configure/references/workflow-detail.md +1 -1
- package/skills/service-itsm-agentic-setup-employee-agent-configure/scripts/render-report.mjs +29 -16
- package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/SKILL.md +8 -5
- package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/report-format.md +4 -2
- package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/workflow-detail.md +1 -1
- package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/render-report.mjs +29 -16
- package/skills/service-itsm-agentic-setup-incident-management/SKILL.md +138 -68
- package/skills/service-itsm-agentic-setup-incident-management/examples/output-templates.md +31 -15
- package/skills/service-itsm-agentic-setup-incident-management/references/incident-persona-psg.md +156 -0
- package/skills/service-itsm-agentic-setup-incident-management/references/incident-preferences.md +148 -0
- package/skills/service-itsm-agentic-setup-incident-management/references/major-incident-management.md +162 -0
- package/skills/service-itsm-agentic-setup-incident-management/references/service-mgmt-privilege.md +149 -0
- package/skills/service-itsm-agentic-setup-incident-sla-configure/SKILL.md +103 -89
- package/skills/service-itsm-agentic-setup-incident-sla-configure/assets/attach-milestone.json +2 -2
- package/skills/service-itsm-agentic-setup-incident-sla-configure/assets/predefined-incident-policy.json +21 -39
- package/skills/service-itsm-agentic-setup-incident-sla-configure/examples/milestone-patterns.md +3 -3
- package/skills/service-itsm-agentic-setup-incident-sla-configure/examples/output-templates.md +18 -1
- package/skills/service-itsm-agentic-setup-incident-sla-configure/references/mcp-invocation.md +63 -37
- package/skills/service-omni-attribute-routing-configure/SKILL.md +53 -0
- package/skills/service-omni-attribute-routing-configure/references/api-notes.md +7 -0
- package/skills/service-omni-attribute-routing-configure/scripts/configure-and-report.sh +224 -0
- package/skills/service-omni-attribute-routing-configure/scripts/tests/test_attribute_routing_contracts.py +137 -0
- package/skills/service-omni-channel-inventory-analyze/SKILL.md +96 -0
- package/skills/service-omni-channel-inventory-analyze/references/api-notes.md +52 -0
- package/skills/service-omni-channel-inventory-analyze/scripts/analyze.sh +185 -0
- package/skills/service-omni-channel-inventory-analyze/scripts/tests/_bootstrap.py +84 -0
- package/skills/service-omni-channel-inventory-analyze/scripts/tests/test_inventory_analyze_contracts.py +141 -0
- package/skills/service-omni-channel-limits-analyze/SKILL.md +70 -0
- package/skills/service-omni-channel-limits-analyze/references/api-notes.md +22 -0
- package/skills/service-omni-channel-limits-analyze/scripts/analyze.sh +159 -0
- package/skills/service-omni-channel-limits-analyze/scripts/tests/_bootstrap.py +87 -0
- package/skills/service-omni-channel-limits-analyze/scripts/tests/test_limits_analyze_contracts.py +99 -0
- package/skills/service-omni-channel-setup-coordinate/SKILL.md +12 -20
- package/skills/service-omni-channel-setup-coordinate/scripts/integration-driver.sh +55 -5
- package/skills/service-omni-channel-setup-coordinate/scripts/tests/test_omni_contracts.py +38 -0
- package/skills/service-omni-command-center-analyze/SKILL.md +2 -2
- package/skills/service-omni-command-center-analyze/scripts/analyze.sh +3 -3
- package/skills/dx-org-manage/examples/snapshots/error_output.json +0 -9
- package/skills/dx-org-manage/examples/snapshots/success_output.json +0 -15
- package/skills/dx-org-manage/references/cli_flags.md +0 -67
- package/skills/dx-org-manage/references/creating-snapshot.md +0 -103
- package/skills/dx-org-manage/references/snapshot_usage.md +0 -74
- package/skills/experience-accessibility-validate/scripts/contrast-ratio.py +0 -153
- package/skills/experience-lwc-accessibility-jest-run/references/running-sa11y-jest-tests.md +0 -205
- package/skills/experience-ui-bundle-features-generate/scripts/verify-react-bundle.sh +0 -14
- /package/skills/experience-ui-bundle-features-generate/references/{conflict-resolution-schema.json → common/conflict-resolution-schema.json} +0 -0
- /package/skills/{platform-agentsetup-categories-fetch → platform-agenticsetup-categories-get}/references/api-response-schema.md +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: experience-ui-bundle-features-generate
|
|
3
|
-
description: "MUST activate when the project contains a uiBundles/*/src/ directory and the user wants to add a pre-built feature — such as authentication (login, logout, protected routes, session management) or search (global search across pages and content) — instead of building it from scratch. Always run list first to see the current feature catalog, since it can include more than authentication and search. Always use this skill for installing pre-built features rather than hand-building them. DO NOT TRIGGER for Agentforce conversational client or file-upload features — use experience-ui-bundle-agentforce-client-generate and experience-ui-bundle-file-upload-generate respectively."
|
|
3
|
+
description: "MUST activate when the project contains a uiBundles/*/src/ directory (React or Angular) and the user wants to add a pre-built feature — such as authentication (login, logout, protected routes, session management) or search (global search across pages and content) — instead of building it from scratch. Always run list first to see the current feature catalog, since it can include more than authentication and search. Always use this skill for installing pre-built features rather than hand-building them. DO NOT TRIGGER for Agentforce conversational client or file-upload features — use experience-ui-bundle-agentforce-client-generate and experience-ui-bundle-file-upload-generate respectively."
|
|
4
4
|
metadata:
|
|
5
|
-
version: "1.
|
|
5
|
+
version: "1.2"
|
|
6
6
|
domains: ["Experience"]
|
|
7
7
|
relatedSkills: ["experience-ui-bundle-agentforce-client-generate", "experience-ui-bundle-file-upload-generate"]
|
|
8
8
|
cliTools:
|
|
@@ -19,41 +19,79 @@ metadata:
|
|
|
19
19
|
|
|
20
20
|
# UI Bundle Features
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
Install pre-built, tested feature packages into a Salesforce UI bundle with the
|
|
23
|
+
`@salesforce/ui-bundle-features` CLI instead of hand-building them. This file is the
|
|
24
|
+
**framework-neutral workflow spine**; the framework-specific detail — example file
|
|
25
|
+
extensions, the files features rewrite, how a feature's entry component is mounted, and the
|
|
26
|
+
build command — lives in a per-framework reference under `<SKILL_DIR>/references/<framework>/`.
|
|
23
27
|
|
|
24
|
-
Always check for an existing feature before building something from scratch. The
|
|
28
|
+
Always check for an existing feature before building something from scratch. The CLI is
|
|
29
|
+
framework-agnostic: it installs the framework-appropriate variant of each feature into the
|
|
30
|
+
detected bundle. Authentication and search are the most commonly used today; run
|
|
31
|
+
`list --verbose` for the full current catalog, since it can grow over time.
|
|
25
32
|
|
|
26
33
|
> **Ownership note:** Agentforce AI conversation clients and file-upload are owned by separate skills (`experience-ui-bundle-agentforce-client-generate`, `experience-ui-bundle-file-upload-generate`). If the catalog also lists an Agentforce or file-upload entry, do not install it from both places — confirm with the user which delivery path they want, and never install the same capability twice in one bundle.
|
|
27
34
|
|
|
28
35
|
> **Package name:** `@salesforce/ui-bundle-features` is the canonical package name. Some older templates/samples still reference the deprecated `@salesforce/ui-bundle-features-experimental` name — never use the `-experimental` suffix. If a command fails to resolve, confirm the published version with `npm view @salesforce/ui-bundle-features version` before assuming the package name is wrong.
|
|
29
36
|
|
|
30
|
-
|
|
37
|
+
## Step 0: Determine the framework
|
|
31
38
|
|
|
32
|
-
|
|
39
|
+
`<SKILL_DIR>` = the absolute path to **this skill's own directory** (the folder holding this
|
|
40
|
+
`SKILL.md`); resolve it from the skill path in context.
|
|
33
41
|
|
|
34
|
-
|
|
42
|
+
The framework is normally already decided by the calling context — passed down by the
|
|
43
|
+
coordinator skill that invoked this one, or stated in the user's request. Use that.
|
|
44
|
+
|
|
45
|
+
The frameworks this skill supports are exactly the reference folders under
|
|
46
|
+
`<SKILL_DIR>/references/`, each containing a `features.md` (so `react` →
|
|
47
|
+
`<SKILL_DIR>/references/react/features.md`). This is the single source of truth — adding a
|
|
48
|
+
framework means adding a reference folder, nothing here changes.
|
|
49
|
+
|
|
50
|
+
- **If the framework is known** — open `<SKILL_DIR>/references/<framework>/features.md` and
|
|
51
|
+
keep it alongside this spine. It supplies the example extensions, the integration targets,
|
|
52
|
+
the mount example, and the build command.
|
|
53
|
+
- **If it is unknown** (a standalone run where nobody said which) — run the deterministic
|
|
54
|
+
detector on the UI bundle root before asking anyone:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
bash "<SKILL_DIR>/scripts/detect-framework.sh" "<path-to-uiBundles/<name>/ dir>"
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Branch on the exit code (do not parse prose):
|
|
61
|
+
- `react` or `angular` (exit 0) → use that framework. **Do not ask the user** — detection is
|
|
62
|
+
deterministic. Open `<SKILL_DIR>/references/<framework>/features.md`.
|
|
63
|
+
- `ambiguous` (exit 2) → both frameworks present. List `<SKILL_DIR>/references/` and ask the
|
|
64
|
+
user which bundle to install into. If they name a framework with no matching reference
|
|
65
|
+
folder, it is not supported here — stop.
|
|
66
|
+
- `unknown` (exit 3) → **no supported framework detected. Terminate.** Report that neither
|
|
67
|
+
React nor Angular signals were found in the bundle, so features cannot be installed, and
|
|
68
|
+
stop. Do not guess.
|
|
69
|
+
|
|
70
|
+
Throughout the steps below, `<framework>` means the folder chosen here.
|
|
71
|
+
|
|
72
|
+
## Workflow
|
|
35
73
|
|
|
36
74
|
1. **Search project code first** — check `src/` for existing implementations before installing anything. Scope searches to `src/` to avoid matching `node_modules/` or `dist/`.
|
|
37
75
|
|
|
38
76
|
2. **Search available features** — use `npx @salesforce/ui-bundle-features list` with `--search <query>` to filter by keyword. Use `--verbose` for full descriptions.
|
|
39
77
|
|
|
40
|
-
3. **Describe a feature — MANDATORY before wiring.** Run `npx @salesforce/ui-bundle-features describe <feature>` and read the feature's README via `npm view <package> readme` (using the `Package:` name from that output) before wiring it. The README is the contract: it tells you how the feature is meant to be wired — including any drop-in entry component and the file each integration example belongs in. Cross-check against the copied-in source under `describe`'s `Copy Operations` destination — that source (and its JSDoc) is the version-matched truth for what's actually installed. Do not wire from assumptions about file names or component APIs. Skipping this is the most common reason a feature installs successfully but never actually runs.
|
|
78
|
+
3. **Describe a feature — MANDATORY before wiring.** Run `npx @salesforce/ui-bundle-features describe <feature>` and read the feature's README via `npm view <package> readme` (using the `Package:` name from that output) before wiring it. The README is the contract: it tells you how the feature is meant to be wired — including any drop-in entry component and the file each integration example belongs in. Cross-check against the copied-in source under `describe`'s `Copy Operations` destination — that source (and its JSDoc/comments) is the version-matched truth for what's actually installed, in the detected framework's file types. Do not wire from assumptions about file names or component APIs. Skipping this is the most common reason a feature installs successfully but never actually runs.
|
|
41
79
|
|
|
42
80
|
4. **Install** — use `npx @salesforce/ui-bundle-features install <feature> --ui-bundle-dir <name>`. Key options:
|
|
43
81
|
- `--dry-run` to preview changes
|
|
44
82
|
- `--yes` for non-interactive mode (skips conflicts)
|
|
45
83
|
- `--on-conflict error` to detect conflicts, then `--conflict-resolution <file>` to resolve them
|
|
46
84
|
|
|
47
|
-
Install features **before** doing custom frontend/layout work in this bundle — features may rewrite
|
|
85
|
+
Install features **before** doing custom frontend/layout work in this bundle — features may rewrite the app layout and routing files (see the framework reference for their names), and installing after hand-built layout changes risks collisions.
|
|
48
86
|
|
|
49
87
|
If no matching feature is found, ask the user before building a custom implementation — a relevant feature may exist under a different name.
|
|
50
88
|
|
|
51
|
-
|
|
89
|
+
## Conflict Handling
|
|
52
90
|
|
|
53
91
|
In non-interactive environments, use the two-pass approach:
|
|
54
92
|
|
|
55
93
|
1. Run install with `--on-conflict error` to detect conflicts without applying them.
|
|
56
|
-
2. Before writing the resolution file, read `references/conflict-resolution-schema.json` for the allowed keys and enum values.
|
|
94
|
+
2. Before writing the resolution file, read `references/common/conflict-resolution-schema.json` for the allowed keys and enum values.
|
|
57
95
|
3. Write a resolution file at `<ui-bundle-dir>/conflict-resolution.json` (path is relative to the UI bundle directory being installed into, not the repo root). Key it by the exact paths the CLI printed as conflicts in pass 1, verbatim:
|
|
58
96
|
```json
|
|
59
97
|
{
|
|
@@ -61,59 +99,52 @@ In non-interactive environments, use the two-pass approach:
|
|
|
61
99
|
"src/routes.tsx": "skip"
|
|
62
100
|
}
|
|
63
101
|
```
|
|
64
|
-
Any conflicting path *not* listed
|
|
102
|
+
(The conflict paths are whatever the CLI printed for the detected framework — the keys above are illustrative.) Any conflicting path *not* listed defaults to `skip` — the CLI will not overwrite a file you didn't explicitly mark `overwrite`.
|
|
65
103
|
4. Re-run install with `--conflict-resolution <path-to-that-file>`.
|
|
66
104
|
|
|
67
|
-
|
|
105
|
+
## Post-install: Integrating Example Files
|
|
68
106
|
|
|
69
|
-
Features may include example files under an `__examples__/` directory (plural) showing integration patterns. These are often full, working pages with concrete names
|
|
107
|
+
Features may include example files under an `__examples__/` directory (plural) showing integration patterns. These are often full, working pages with concrete names, not bare placeholder templates — in the detected framework's file types (see the framework reference). For each:
|
|
70
108
|
|
|
71
109
|
1. Read the example file to understand the pattern — treat it as a working reference implementation, not necessarily a stub.
|
|
72
110
|
2. Read the target file (shown in `describe` output).
|
|
73
111
|
3. Apply the pattern from the example into the target.
|
|
74
112
|
4. **CRITICAL — verify before deleting:**
|
|
75
113
|
```bash
|
|
76
|
-
# Verify the build passes with the integrated pattern
|
|
114
|
+
# Verify the build passes with the integrated pattern (build command per framework reference)
|
|
77
115
|
npm run build || {
|
|
78
116
|
echo "ERROR: Build failed after integration - do NOT delete __examples__/"
|
|
79
117
|
exit 1
|
|
80
118
|
}
|
|
81
|
-
|
|
82
|
-
# Verify the pattern from the example is actually present in the target
|
|
83
|
-
#
|
|
84
|
-
#
|
|
85
|
-
grep -q "SearchInput\|useSearch" src/pages/*.tsx src/components/*.tsx 2>/dev/null || {
|
|
86
|
-
echo "ERROR: Pattern from example not found in target files - integration incomplete"
|
|
87
|
-
echo "Do NOT delete __examples__/ until the pattern is confirmed present"
|
|
88
|
-
exit 1
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
# Only delete after both checks pass
|
|
92
|
-
rm -rf __examples__/
|
|
119
|
+
|
|
120
|
+
# Verify the pattern from the example is actually present in the target.
|
|
121
|
+
# Adjust the grep to a key symbol/import/component from the example, over the
|
|
122
|
+
# detected framework's source files (see the framework reference for a worked pattern).
|
|
93
123
|
```
|
|
124
|
+
Only delete `__examples__/` after **both** the build passes and the pattern is confirmed present in the target.
|
|
94
125
|
|
|
95
126
|
If either check fails, **do NOT delete `__examples__/`** — the integration is incomplete. Fix the integration first, then re-run the verification.
|
|
96
127
|
|
|
97
|
-
|
|
128
|
+
## Post-install: Mount the OOTB component, don't hand-roll a parallel one
|
|
98
129
|
|
|
99
|
-
When a feature ships an integration point, the UI **must** use it rather than a parallel hand-rolled version. For features that ship an entry component, mount it
|
|
130
|
+
When a feature ships an integration point, the UI **must** use it rather than a parallel hand-rolled version. For features that ship an entry component, mount it (the framework reference shows the mount idiom); do **not** author a bespoke page that queries data directly. A custom results page against seed data or a raw GraphQL call bypasses the installed, tested feature, so the deployed sObject/CMS logic never runs. The only exception is when the user **explicitly** opts out and asks for a custom one — confirm that intent, don't infer it.
|
|
100
131
|
|
|
101
|
-
|
|
132
|
+
## Hint Placeholders
|
|
102
133
|
|
|
103
134
|
Some copy paths use `<descriptive-name>` placeholders (e.g., `<desired-page-with-search-input>`) that the CLI does not resolve. After installation, rename or relocate these files to the intended target, or integrate their patterns into an existing file. This is separate from the `__examples__/` convention above — a single copy path can use either mechanism.
|
|
104
135
|
|
|
105
|
-
|
|
136
|
+
## Auth Feature: Org-Side Prerequisites
|
|
106
137
|
|
|
107
|
-
Installing the authentication feature only copies files — it does not configure the org. Before telling the user auth is done, flag that these org-side steps still need to happen (outside this skill's scope, but required for the feature to actually work):
|
|
138
|
+
Installing the authentication feature only copies files — it does not configure the org. This is framework-agnostic (pure org/metadata config). Before telling the user auth is done, flag that these org-side steps still need to happen (outside this skill's scope, but required for the feature to actually work):
|
|
108
139
|
|
|
109
140
|
- Digital Experiences (Experience Cloud) must be enabled, with Customer Community / Customer Community Plus licenses assigned to the relevant users, and Salesforce Sites enabled.
|
|
110
141
|
- The community and guest profiles need explicit Apex class access granted for the auth utility, login/registration, and password-reset classes — the CLI does not grant this automatically.
|
|
111
142
|
- Guest-profile sharing rules / org-wide defaults for any objects the auth flow touches.
|
|
112
143
|
- **Known limitation:** logout has a documented CSRF-handling gap (tracked as W-21253864) — call this out to the user rather than presenting logout as fully solved.
|
|
113
144
|
|
|
114
|
-
|
|
145
|
+
## CRITICAL: Resolve `<sfdxRoot>` After Every Install
|
|
115
146
|
|
|
116
|
-
The CLI may copy files under a literal `<sfdxRoot>` folder — an unresolved placeholder for this project's Salesforce DX metadata root (from `sfdx-project.json`'s `packageDirectories[].path`, e.g. `force-app/main/default`). Files left there are undeployable.
|
|
147
|
+
The CLI may copy files under a literal `<sfdxRoot>` folder — an unresolved placeholder for this project's Salesforce DX metadata root (from `sfdx-project.json`'s `packageDirectories[].path`, e.g. `force-app/main/default`). Files left there are undeployable. This is framework-agnostic.
|
|
117
148
|
|
|
118
149
|
**After every install:**
|
|
119
150
|
```bash
|
|
@@ -123,5 +154,3 @@ If found, move each file to `<metadata-root>/<same-relative-subpath>` (keep `-me
|
|
|
123
154
|
|
|
124
155
|
**Verification:**
|
|
125
156
|
- [ ] Re-run `find uiBundles/<AppName> -type d -regex '.*/<[^/]+>$'` — output must be empty before proceeding.
|
|
126
|
-
|
|
127
|
-
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Angular UI Bundle Features
|
|
2
|
+
|
|
3
|
+
Framework reference for the **Angular** path of `experience-ui-bundle-features-generate`. Read
|
|
4
|
+
this alongside the workflow spine in `SKILL.md`. The `@salesforce/ui-bundle-features` CLI
|
|
5
|
+
installs the Angular variant of each feature into an Angular UI bundle (an `angular.json` at/
|
|
6
|
+
above the bundle, `@angular/core` in `package.json`, standalone components as `.ts` + `.html`
|
|
7
|
+
pairs under `src/app/`).
|
|
8
|
+
|
|
9
|
+
## Example files
|
|
10
|
+
|
|
11
|
+
Features ship integration examples under `__examples__/` as Angular sources — a standalone
|
|
12
|
+
component is a **`.ts`** class + its **`.html`** template (e.g. `account-search.ts` +
|
|
13
|
+
`account-search.html`), often full working pages, not bare stubs. Integrate the pattern into
|
|
14
|
+
the target named in `describe` output, then verify before deleting the `__examples__/` dir.
|
|
15
|
+
|
|
16
|
+
> Do not assume file names or a `.component` infix — Angular UI bundle starters name
|
|
17
|
+
> components without it (`home.ts`, not `home.component.ts`). The `describe` `Copy Operations`
|
|
18
|
+
> destination and the copied-in source are the version-matched truth for what was installed.
|
|
19
|
+
|
|
20
|
+
## Files features may rewrite
|
|
21
|
+
|
|
22
|
+
Angular features commonly touch app wiring:
|
|
23
|
+
|
|
24
|
+
- `src/app/app.routes.ts` — route registration (route-based features add routes here)
|
|
25
|
+
- `src/app/app.ts` + `src/app/app.html` — root component and its template
|
|
26
|
+
- the app-layout component under `src/app/components/layout/` — the shell some features mount into
|
|
27
|
+
|
|
28
|
+
These are the paths to expect as conflicts in the two-pass conflict flow; resolve them per
|
|
29
|
+
`SKILL.md` → *Conflict Handling* (the exact paths are whatever the CLI prints).
|
|
30
|
+
|
|
31
|
+
## Mount the feature's entry component
|
|
32
|
+
|
|
33
|
+
Mount the OOTB component the feature ships rather than hand-rolling a parallel one. Angular
|
|
34
|
+
mounts by **selector** (in a template) or by **route** (lazy-loaded standalone component) —
|
|
35
|
+
use whichever `describe`/README specifies. For search mounted on a results page template:
|
|
36
|
+
|
|
37
|
+
```html
|
|
38
|
+
<!-- search-results.html — use the feature's selector; do NOT hand-roll a results page -->
|
|
39
|
+
<sf-search />
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Or as a route in `src/app/app.routes.ts`:
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
export const routes: Routes = [
|
|
46
|
+
{ path: "search", loadComponent: () =>
|
|
47
|
+
import("./features/search/search").then((m) => m.Search) }, // path per describe output
|
|
48
|
+
];
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Import the feature's standalone component into whichever component's `imports:` array hosts it.
|
|
52
|
+
|
|
53
|
+
## Build & verify
|
|
54
|
+
|
|
55
|
+
Build command (run from the UI bundle dir):
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
npm run build
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Worked grep for the *verify-before-delete* check — Angular splits usage across `.ts` (selector
|
|
62
|
+
registration, service imports, route entry) and `.html` (the mounted selector). Adjust the
|
|
63
|
+
symbol to one from the example you integrated:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
grep -rq "sf-search\|SearchService" src/app --include='*.ts' --include='*.html' 2>/dev/null || {
|
|
67
|
+
echo "ERROR: Pattern from example not found in target files - integration incomplete"
|
|
68
|
+
echo "Do NOT delete __examples__/ until the pattern is confirmed present"
|
|
69
|
+
exit 1
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Only `rm -rf __examples__/` after the build passes **and** this grep confirms the pattern is
|
|
74
|
+
present in the target.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# React UI Bundle Features
|
|
2
|
+
|
|
3
|
+
Framework reference for the **React** path of `experience-ui-bundle-features-generate`. Read
|
|
4
|
+
this alongside the workflow spine in `SKILL.md`. The `@salesforce/ui-bundle-features` CLI
|
|
5
|
+
installs the React variant of each feature into a React/Vite UI bundle (`"react"` in the
|
|
6
|
+
bundle `package.json`, `.tsx` sources under `src/`).
|
|
7
|
+
|
|
8
|
+
## Example files
|
|
9
|
+
|
|
10
|
+
Features ship integration examples under `__examples__/` as **`.tsx`** files — often full,
|
|
11
|
+
working pages with concrete names (e.g. `AccountSearch.tsx`), not bare stubs. Integrate the
|
|
12
|
+
pattern into the target file named in `describe` output, then verify before deleting the
|
|
13
|
+
`__examples__/` dir.
|
|
14
|
+
|
|
15
|
+
## Files features may rewrite
|
|
16
|
+
|
|
17
|
+
React features commonly touch the app shell and routing:
|
|
18
|
+
|
|
19
|
+
- `src/appLayout.tsx` — the app layout/shell
|
|
20
|
+
- `src/routes.tsx` — route registration
|
|
21
|
+
- `src/App.tsx` — app entry (some features mount here)
|
|
22
|
+
|
|
23
|
+
These are the paths to expect as conflicts in the two-pass conflict flow; resolve them per
|
|
24
|
+
`SKILL.md` → *Conflict Handling* (the exact paths are whatever the CLI prints).
|
|
25
|
+
|
|
26
|
+
## Mount the feature's entry component
|
|
27
|
+
|
|
28
|
+
Mount the OOTB component the feature ships rather than hand-rolling a parallel one. For search,
|
|
29
|
+
mount the feature's `<Search>` component (JSX) on the search-results page:
|
|
30
|
+
|
|
31
|
+
```tsx
|
|
32
|
+
import { Search } from "./features/search"; // path per describe output
|
|
33
|
+
// ...
|
|
34
|
+
export default function SearchResults() {
|
|
35
|
+
return <Search />; // do NOT hand-roll a results page
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Build & verify
|
|
40
|
+
|
|
41
|
+
Build command (run from the UI bundle dir):
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npm run build
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Worked grep for the *verify-before-delete* check (adjust the symbol to one from the example
|
|
48
|
+
you integrated — here the `SearchInput`/`useSearch` pattern integrated into a page):
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
grep -q "SearchInput\|useSearch" src/pages/*.tsx src/components/*.tsx 2>/dev/null || {
|
|
52
|
+
echo "ERROR: Pattern from example not found in target files - integration incomplete"
|
|
53
|
+
echo "Do NOT delete __examples__/ until the pattern is confirmed present"
|
|
54
|
+
exit 1
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Only `rm -rf __examples__/` after the build passes **and** this grep confirms the pattern is
|
|
59
|
+
present in the target.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
#
|
|
3
|
+
# detect-framework.sh — deterministic UI Bundle framework detector.
|
|
4
|
+
#
|
|
5
|
+
# Usage: bash detect-framework.sh [ROOT]
|
|
6
|
+
# ROOT app or uiBundle root to inspect (default: current directory)
|
|
7
|
+
#
|
|
8
|
+
# Prints exactly one of the following tokens to stdout, nothing else, and sets
|
|
9
|
+
# a matching exit code so callers can branch without parsing:
|
|
10
|
+
# react (exit 0) — React signals only
|
|
11
|
+
# angular (exit 0) — Angular signals only
|
|
12
|
+
# ambiguous (exit 2) — both React and Angular signals present
|
|
13
|
+
# unknown (exit 3) — neither framework detected
|
|
14
|
+
#
|
|
15
|
+
# Step 0 of the skill acts on the result: a single framework (exit 0) proceeds;
|
|
16
|
+
# `ambiguous` asks the user to disambiguate; `unknown` TERMINATES the workflow
|
|
17
|
+
# (no supported framework found — do not guess).
|
|
18
|
+
|
|
19
|
+
set -u
|
|
20
|
+
|
|
21
|
+
ROOT="${1:-.}"
|
|
22
|
+
angular=0
|
|
23
|
+
react=0
|
|
24
|
+
|
|
25
|
+
# Resolve ROOT to an absolute path when possible (for the angular.json walk-up).
|
|
26
|
+
abs_root="$(cd "$ROOT" 2>/dev/null && pwd || true)"
|
|
27
|
+
|
|
28
|
+
# 1) angular.json at or above ROOT → Angular workspace.
|
|
29
|
+
dir="$abs_root"
|
|
30
|
+
while [ -n "$dir" ]; do
|
|
31
|
+
[ -f "$dir/angular.json" ] && angular=1
|
|
32
|
+
[ "$dir" = "/" ] && break
|
|
33
|
+
dir="$(dirname "$dir")"
|
|
34
|
+
done
|
|
35
|
+
|
|
36
|
+
# 2) package.json dependencies (excluding node_modules).
|
|
37
|
+
while IFS= read -r pkg; do
|
|
38
|
+
[ -z "$pkg" ] && continue
|
|
39
|
+
grep -q '"@angular/core"' "$pkg" 2>/dev/null && angular=1
|
|
40
|
+
grep -Eq '"react"[[:space:]]*:' "$pkg" 2>/dev/null && react=1
|
|
41
|
+
done <<EOF
|
|
42
|
+
$(find "$ROOT" -type d -name node_modules -prune -o -type f -name package.json -print 2>/dev/null)
|
|
43
|
+
EOF
|
|
44
|
+
|
|
45
|
+
# 3) Source-file signatures (excluding node_modules).
|
|
46
|
+
has_file() {
|
|
47
|
+
find "$ROOT" -type d -name node_modules -prune -o -type f -name "$1" -print 2>/dev/null | grep -q .
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
# Angular: component files, routing module, or @Component-decorated classes.
|
|
51
|
+
has_file '*.component.ts' && angular=1
|
|
52
|
+
has_file 'app.routes.ts' && angular=1
|
|
53
|
+
if grep -rls --exclude-dir=node_modules --include='*.ts' '@Component' "$ROOT" 2>/dev/null | grep -q .; then
|
|
54
|
+
angular=1
|
|
55
|
+
fi
|
|
56
|
+
|
|
57
|
+
# React: JSX/TSX source files.
|
|
58
|
+
has_file '*.tsx' && react=1
|
|
59
|
+
has_file '*.jsx' && react=1
|
|
60
|
+
|
|
61
|
+
if [ "$angular" -eq 1 ] && [ "$react" -eq 1 ]; then
|
|
62
|
+
echo ambiguous
|
|
63
|
+
exit 2
|
|
64
|
+
elif [ "$angular" -eq 1 ]; then
|
|
65
|
+
echo angular
|
|
66
|
+
exit 0
|
|
67
|
+
elif [ "$react" -eq 1 ]; then
|
|
68
|
+
echo react
|
|
69
|
+
exit 0
|
|
70
|
+
else
|
|
71
|
+
echo unknown
|
|
72
|
+
exit 3
|
|
73
|
+
fi
|
|
@@ -60,11 +60,11 @@ A request to rename/rebrand the app (e.g. "call it X everywhere a user would see
|
|
|
60
60
|
Some capabilities ship as pre-built, tested feature packages. The catalog **evolves and is not something you can know from memory** — never decide from the request wording alone whether a capability "is" or "isn't" a feature. Before hand-writing any non-trivial capability (anything beyond a plain page, component, or styling change) in this skill:
|
|
61
61
|
|
|
62
62
|
1. **Consult the authoritative catalog.** Invoke `experience-ui-bundle-features-generate`, which runs `list` to show the *current* set of installable features. Do not rely on a hardcoded or remembered list — this skill deliberately names none, because any names it listed would go stale.
|
|
63
|
-
2. **Detect whether a matching feature is already installed** in the bundle — inspect `package.json` dependencies and existing `src/` files. If present,
|
|
63
|
+
2. **Detect whether a matching feature is already installed** in the bundle — inspect `package.json` dependencies and existing `src/` files. If present, do not reinstall or re-implement it — **but you must still adopt it**: invoke `experience-ui-bundle-features-generate` to `describe` it (which reads the feature's README — the adoption contract), wire it into the app, and, if the feature ships config (e.g. a `config.json`), set that for this app's data and use case. Installed-but-unconfigured is not done.
|
|
64
64
|
3. **If a matching feature exists in the catalog but isn't installed**, let `experience-ui-bundle-features-generate` install the tested package. Do not build it from scratch here.
|
|
65
65
|
4. **Only hand-build** a capability that has no matching catalog feature.
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
When this skill runs as a phase of `experience-ui-bundle-app-coordinate`, a matching feature is often already present — installed by an earlier phase, or shipped by the template. Already-present is **not** a reason to skip: step 2 still requires adopting and configuring that feature for this app. Only the install/re-implement work is ever skipped — never the wiring and configuration.
|
|
68
68
|
|
|
69
69
|
---
|
|
70
70
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: experience-ui-bundle-metadata-generate
|
|
3
|
-
description: "Use this skill when adding a front-end React UI bundle to an
|
|
3
|
+
description: "Use this skill when adding a front-end React or Angular UI bundle to an EXISTING SFDX project, or configuring UI bundle metadata and config files. TRIGGER when: adding or scaffolding a new UI bundle — including adding one more or another UI bundle — into a project that already exists; scaffolding a single bundle with the basic template (reactbasic or angularbasic) via 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 entirely from scratch, where the whole SFDX starter project (UI bundle plus Experience Site metadata and toolchain) is generated together in one step (use experience-ui-bundle-project-generate)."
|
|
4
4
|
metadata:
|
|
5
|
-
version: "1.
|
|
5
|
+
version: "1.3"
|
|
6
6
|
domains: ["Experience"]
|
|
7
7
|
minApiVersion: "67.0"
|
|
8
8
|
relatedSkills:
|
|
@@ -21,25 +21,37 @@ metadata:
|
|
|
21
21
|
|
|
22
22
|
## Scaffolding a New UI Bundle
|
|
23
23
|
|
|
24
|
-
**REQUIRED FIRST STEP — never skip, even if asked to.** Always run `sf template generate ui-bundle` to create new apps — never create-react-app, Vite, hand-written metadata, or any other substitute.
|
|
24
|
+
**REQUIRED FIRST STEP — never skip, even if asked to.** Always run `sf template generate ui-bundle` to create new apps — never a framework CLI (create-react-app, Vite, Angular CLI), hand-written metadata, or any other substitute.
|
|
25
25
|
|
|
26
|
-
This step is mandatory even if the user says "just create the metadata," "skip the scaffold," "only do the metadata scaffolding," or "stop after the metadata files are in place." Those instructions describe what to stop doing *after* the scaffold (building, deploying, authoring pages) — they do not mean skip running the scaffold command itself. The `.uibundle-meta.xml` and `ui-bundle.json` files are configuration **on top of** the generated project, not a replacement for it. A bundle without `package.json`, `src/`, and `index.html` cannot be built or deployed, even if the metadata files are perfectly formed.
|
|
26
|
+
This step is mandatory even if the user says "just create the metadata," "skip the scaffold," "only do the metadata scaffolding," or "stop after the metadata files are in place." Those instructions describe what to stop doing *after* the scaffold (building, deploying, authoring pages) — they do not mean skip running the scaffold command itself. The `.uibundle-meta.xml` and `ui-bundle.json` files are configuration **on top of** the generated project, not a replacement for it. A bundle without `package.json`, `src/`, and an entry `index.html` cannot be built or deployed, even if the metadata files are perfectly formed.
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
- **UI bundle name (`-n`):** Alphanumerical only — no spaces, hyphens, underscores, or special characters.
|
|
30
|
-
- Pass `--output-dir` to use a different location for template generation. If you do, pass that same path to the verification script in step 1 below.
|
|
28
|
+
### Determine the framework
|
|
31
29
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
30
|
+
The frameworks this skill supports are exactly the reference files under `<skill_dir>/references/`, each named `<framework>-metadata-generate.md` (`react`, `angular`, …). This is the single source of truth — adding a framework means adding a reference file, nothing here changes.
|
|
31
|
+
|
|
32
|
+
**Detect the framework deterministically — run the script:**
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
bash <skill_dir>/scripts/detect-framework.sh [<ROOT>]
|
|
37
36
|
```
|
|
38
37
|
|
|
38
|
+
`ROOT` defaults to the current directory; pass the bundle or project root when editing/configuring an existing bundle. The script prints exactly one token and sets a matching exit code — branch on it:
|
|
39
|
+
|
|
40
|
+
- `react` / `angular` (exit 0) — open `<skill_dir>/references/<framework>-metadata-generate.md` and use it.
|
|
41
|
+
- `ambiguous` (exit 2, both frameworks present) — ask the user which one, then use that reference.
|
|
42
|
+
- `unknown` (exit 3, no signals — e.g. scaffolding a brand-new bundle into a project that has none yet) — fall back to the calling context or the user's stated framework; if still undecided, list `<skill_dir>/references/`, derive the supported set by stripping the `-metadata-generate.md` suffix from each filename, and ask the user to pick.
|
|
43
|
+
|
|
44
|
+
If the calling context or the user already named the framework, that overrides detection — but still confirm a matching reference file exists. **Never guess.**
|
|
45
|
+
|
|
46
|
+
The reference file gives you the exact `--template` flag, the entry-file layout, and the default boilerplate strings to replace for that framework.
|
|
47
|
+
|
|
48
|
+
- **UI bundle name (`-n`):** Alphanumerical only — no spaces, hyphens, underscores, or special characters.
|
|
49
|
+
- Pass `--output-dir` to use a different location for template generation. If you do, pass that same path to the verification script in step 1 below.
|
|
50
|
+
|
|
39
51
|
After generation:
|
|
40
|
-
1. **Verify the scaffold is complete** — run `bash <skill_dir>/scripts/verify-bundle-location.sh <BundleName> [<CustomOutputDir>]` from the project root and follow any error output. This checks both the bundle's location AND that `package.json`, `src/`, and `index.html` exist — if any are missing, the scaffold step was skipped; go back and run `sf template generate ui-bundle` before continuing. Pass `<CustomOutputDir>` only if you used `--output-dir` during scaffolding;
|
|
52
|
+
1. **Verify the scaffold is complete** — run `bash <skill_dir>/scripts/verify-bundle-location.sh <BundleName> [<CustomOutputDir>] [<framework>]` from the project root and follow any error output. This checks both the bundle's location AND that `package.json`, `src/`, and an entry `index.html` exist — if any are missing, the scaffold step was skipped; go back and run `sf template generate ui-bundle` before continuing. Pass `<CustomOutputDir>` only if you used `--output-dir` during scaffolding (pass `""` to skip it while still supplying a framework); pass `<framework>` (`react` or `angular`) so the remediation hint uses the right template.
|
|
41
53
|
2. **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.
|
|
42
|
-
3. Replace all default boilerplate —
|
|
54
|
+
3. Replace all default boilerplate — the framework reference file lists the exact stock `<title>` and placeholder strings to replace
|
|
43
55
|
4. Populate the home page with real content (landing section, banners, hero, navigation)
|
|
44
56
|
5. Update navigation and placeholders (see the `experience-ui-bundle-frontend-generate` skill)
|
|
45
57
|
6. **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.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Angular UI Bundle Scaffold
|
|
2
|
+
|
|
3
|
+
Reference for the **Angular** path of `experience-ui-bundle-metadata-generate`. Use this to scaffold the bundle, then return to the "After generation" steps in `SKILL.md`.
|
|
4
|
+
|
|
5
|
+
## Scaffold command
|
|
6
|
+
|
|
7
|
+
Always pass `--template angularbasic` to scaffold an Angular bundle:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# Run from SFDX project root. The CLI creates the bundle under
|
|
11
|
+
# force-app/main/default/uiBundles/<AppName>/ — verify this before continuing.
|
|
12
|
+
sf template generate ui-bundle -n CoffeeBoutique --template angularbasic
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Pass `--output-dir` to generate at a different location. If you do, pass that same path to `verify-bundle-location.sh` in the verification step.
|
|
16
|
+
|
|
17
|
+
## What the scaffold produces
|
|
18
|
+
|
|
19
|
+
An Angular (TypeScript, standalone components) app under `force-app/main/default/uiBundles/<AppName>/`:
|
|
20
|
+
|
|
21
|
+
- **Entry HTML:** `src/index.html` (NOT the bundle root), mounting `<app-root>` and carrying a `<base href="/">`.
|
|
22
|
+
- **App entry:** `src/main.ts`; `src/app/app.ts` + `src/app/app.html`, `src/app/app.config.ts`, `src/app/app.routes.ts`; pages under `src/app/pages/`.
|
|
23
|
+
- **Build:** Angular CLI driven by `angular.json` with the `@angular-builders/custom-esbuild:application` builder. Salesforce integration (API-version substitution, org proxy, Live Preview / `SFDC_ENV` / base-href injection) is wired via the esbuild plugin + `middleware/` — no `vite.config.ts`.
|
|
24
|
+
- **Build output:** the builder's `outputPath.browser` is flattened to `dist/`, matching `ui-bundle.json` `outputDir: "dist"` — same as React.
|
|
25
|
+
|
|
26
|
+
## Default boilerplate to replace
|
|
27
|
+
|
|
28
|
+
Replace every stock string before shipping — searching for these is the fastest way to find them:
|
|
29
|
+
|
|
30
|
+
- `<title>MyAngularApp</title>` in `src/index.html` → a real product title.
|
|
31
|
+
- Default `<app-root>` welcome/landing markup in `src/app/app.html` and any placeholder page stubs under `src/app/pages/`.
|
|
32
|
+
- Placeholder navigation and empty routes (see `experience-ui-bundle-frontend-generate`).
|
|
33
|
+
|
|
34
|
+
## Notes
|
|
35
|
+
|
|
36
|
+
- **Dev-server port / CSP:** the Angular bundle's dev server is `sf-angular-serve` (the `package.json` `dev` script, provided by `@salesforce/angular-plugin-ui-bundle`), whose default port is `5173` — the same as React's Vite default — overridable with `SF_UIBUNDLE_PORT`. No Angular-specific CSP Trusted Site change is needed for local dev vs React.
|
|
37
|
+
- **Element/binding syntax:** Angular uses `<app-root>` and standalone components with native control flow (`@if` / `@for`) — not JSX. This only matters when authoring pages; the metadata and config files below are framework-neutral.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# React UI Bundle Scaffold
|
|
2
|
+
|
|
3
|
+
Reference for the **React** path of `experience-ui-bundle-metadata-generate`. Use this to scaffold the bundle, then return to the "After generation" steps in `SKILL.md`.
|
|
4
|
+
|
|
5
|
+
## Scaffold command
|
|
6
|
+
|
|
7
|
+
Always pass `--template reactbasic` to scaffold a React/Vite bundle:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# Run from SFDX project root. The CLI creates the bundle under
|
|
11
|
+
# force-app/main/default/uiBundles/<AppName>/ — verify this before continuing.
|
|
12
|
+
sf template generate ui-bundle -n CoffeeBoutique --template reactbasic
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Pass `--output-dir` to generate at a different location. If you do, pass that same path to `verify-bundle-location.sh` in the verification step.
|
|
16
|
+
|
|
17
|
+
## What the scaffold produces
|
|
18
|
+
|
|
19
|
+
A React + Vite (TypeScript) app under `force-app/main/default/uiBundles/<AppName>/`:
|
|
20
|
+
|
|
21
|
+
- **Entry HTML:** `index.html` at the bundle root, mounting `<div id="root">` and loading `src/app.tsx`.
|
|
22
|
+
- **App entry:** `src/app.tsx`; pages under `src/pages/`, components under `src/components/`.
|
|
23
|
+
- **Toolchain:** `vite.config.ts`, `package.json`, shadcn/ui primitives, Tailwind, GraphQL client + `codegen.yml`.
|
|
24
|
+
- **Build output:** `dist/` (matches `ui-bundle.json` `outputDir: "dist"`).
|
|
25
|
+
|
|
26
|
+
## Default boilerplate to replace
|
|
27
|
+
|
|
28
|
+
Replace every stock string before shipping — searching for these is the fastest way to find them:
|
|
29
|
+
|
|
30
|
+
- `<title>Welcome to React App</title>` in `index.html` → a real product title.
|
|
31
|
+
- Any "React App" / "Vite + React" placeholder copy and default hero/landing text.
|
|
32
|
+
- Placeholder navigation and empty page stubs (see `experience-ui-bundle-frontend-generate`).
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
#
|
|
3
|
+
# detect-framework.sh — deterministic UI Bundle framework detector.
|
|
4
|
+
#
|
|
5
|
+
# Usage: bash detect-framework.sh [ROOT]
|
|
6
|
+
# ROOT app or uiBundle root to inspect (default: current directory)
|
|
7
|
+
#
|
|
8
|
+
# Prints exactly one of the following tokens to stdout, nothing else, and sets
|
|
9
|
+
# a matching exit code so callers can branch without parsing:
|
|
10
|
+
# react (exit 0) — React signals only
|
|
11
|
+
# angular (exit 0) — Angular signals only
|
|
12
|
+
# ambiguous (exit 2) — both React and Angular signals present
|
|
13
|
+
# unknown (exit 3) — neither framework detected
|
|
14
|
+
#
|
|
15
|
+
# Step 0 of the skill acts on the result: a single framework (exit 0) proceeds;
|
|
16
|
+
# `ambiguous` asks the user to disambiguate; `unknown` TERMINATES the workflow
|
|
17
|
+
# (no supported framework found — do not guess).
|
|
18
|
+
|
|
19
|
+
set -u
|
|
20
|
+
|
|
21
|
+
ROOT="${1:-.}"
|
|
22
|
+
angular=0
|
|
23
|
+
react=0
|
|
24
|
+
|
|
25
|
+
# Resolve ROOT to an absolute path when possible (for the angular.json walk-up).
|
|
26
|
+
abs_root="$(cd "$ROOT" 2>/dev/null && pwd || true)"
|
|
27
|
+
|
|
28
|
+
# 1) angular.json at or above ROOT → Angular workspace.
|
|
29
|
+
dir="$abs_root"
|
|
30
|
+
while [ -n "$dir" ]; do
|
|
31
|
+
[ -f "$dir/angular.json" ] && angular=1
|
|
32
|
+
[ "$dir" = "/" ] && break
|
|
33
|
+
dir="$(dirname "$dir")"
|
|
34
|
+
done
|
|
35
|
+
|
|
36
|
+
# 2) package.json dependencies (excluding node_modules).
|
|
37
|
+
while IFS= read -r pkg; do
|
|
38
|
+
[ -z "$pkg" ] && continue
|
|
39
|
+
grep -q '"@angular/core"' "$pkg" 2>/dev/null && angular=1
|
|
40
|
+
grep -Eq '"react"[[:space:]]*:' "$pkg" 2>/dev/null && react=1
|
|
41
|
+
done <<EOF
|
|
42
|
+
$(find "$ROOT" -type d -name node_modules -prune -o -type f -name package.json -print 2>/dev/null)
|
|
43
|
+
EOF
|
|
44
|
+
|
|
45
|
+
# 3) Source-file signatures (excluding node_modules).
|
|
46
|
+
has_file() {
|
|
47
|
+
find "$ROOT" -type d -name node_modules -prune -o -type f -name "$1" -print 2>/dev/null | grep -q .
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
# Angular: component files, routing module, or @Component-decorated classes.
|
|
51
|
+
has_file '*.component.ts' && angular=1
|
|
52
|
+
has_file 'app.routes.ts' && angular=1
|
|
53
|
+
if grep -rls --exclude-dir=node_modules --include='*.ts' '@Component' "$ROOT" 2>/dev/null | grep -q .; then
|
|
54
|
+
angular=1
|
|
55
|
+
fi
|
|
56
|
+
|
|
57
|
+
# React: JSX/TSX source files.
|
|
58
|
+
has_file '*.tsx' && react=1
|
|
59
|
+
has_file '*.jsx' && react=1
|
|
60
|
+
|
|
61
|
+
if [ "$angular" -eq 1 ] && [ "$react" -eq 1 ]; then
|
|
62
|
+
echo ambiguous
|
|
63
|
+
exit 2
|
|
64
|
+
elif [ "$angular" -eq 1 ]; then
|
|
65
|
+
echo angular
|
|
66
|
+
exit 0
|
|
67
|
+
elif [ "$react" -eq 1 ]; then
|
|
68
|
+
echo react
|
|
69
|
+
exit 0
|
|
70
|
+
else
|
|
71
|
+
echo unknown
|
|
72
|
+
exit 3
|
|
73
|
+
fi
|