@salesforce/afv-skills 1.30.0 → 1.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/skills/agentforce-bot-upgrade/SKILL.md +217 -0
- package/skills/agentforce-bot-upgrade/references/extraction-blueprint.md +242 -0
- package/skills/agentforce-bot-upgrade/references/generate-agent-spec.md +128 -0
- package/skills/agentforce-bot-upgrade/references/handoff-output-format.md +208 -0
- package/skills/agentforce-bot-upgrade/references/input-contract.md +101 -0
- package/skills/agentforce-bot-upgrade/references/mapping-rules.md +113 -0
- package/skills/agentforce-bot-upgrade/references/planner-workflow-reference.md +78 -0
- package/skills/agentforce-bot-upgrade/references/post-conversion-enhancements-reference.md +67 -0
- package/skills/agentforce-bot-upgrade/references/quality-checklist.md +33 -0
- package/skills/agentforce-bot-upgrade/references/sf-cli-bot-reference.md +116 -0
- package/skills/data360-code-extension-generate/SKILL.md +15 -2
- package/skills/dx-devops-work-item-manage/SKILL.md +270 -0
- package/skills/dx-devops-work-item-manage/examples/common-workflows.md +479 -0
- package/skills/dx-devops-work-item-manage/references/cli-commands.md +476 -0
- package/skills/dx-org-manage/SKILL.md +8 -5
- package/skills/dx-org-trial-expiration-check/SKILL.md +239 -0
- package/skills/dx-org-trial-expiration-check/scripts/check_expiration.sh +588 -0
- package/skills/dx-pkg-post-install-configure/SKILL.md +184 -0
- package/skills/experience-ui-bundle-app-coordinate/SKILL.md +202 -35
- 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-custom-app-generate/SKILL.md +29 -5
- package/skills/experience-ui-bundle-custom-app-generate/references/configure-metadata-custom-application.md +1 -1
- package/skills/experience-ui-bundle-custom-app-generate/scripts/resolve-uibundle-path.sh +30 -0
- package/skills/experience-ui-bundle-features-generate/SKILL.md +86 -11
- package/skills/experience-ui-bundle-features-generate/references/conflict-resolution-schema.json +20 -0
- package/skills/experience-ui-bundle-features-generate/scripts/verify-react-bundle.sh +14 -0
- package/skills/experience-ui-bundle-frontend-generate/SKILL.md +6 -1
- package/skills/experience-ui-bundle-frontend-generate/references/component.md +34 -1
- package/skills/experience-ui-bundle-frontend-generate/references/page.md +1 -1
- 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/experience-ui-bundle-project-generate/SKILL.md +111 -0
- package/skills/experience-ui-bundle-project-generate/scripts/flatten-project.mjs +33 -0
- 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-lightning-type-generate/SKILL.md +9 -14
- package/skills/platform-custom-lightning-type-generate/references/widget-rendition.md +27 -111
- 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-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-lightning-type-widget-coordinate/SKILL.md +214 -0
- package/skills/platform-lightning-type-widget-coordinate/examples/existing-lightning-type-with-widget-prompt.md +80 -0
- package/skills/platform-lightning-type-widget-coordinate/examples/new-lightning-type-with-widget-prompt.md +75 -0
- package/skills/platform-lightning-type-widget-coordinate/references/build-plan-format.md +67 -0
- package/skills/platform-lightning-type-widget-coordinate/references/lightning-type-discovery.md +124 -0
- package/skills/platform-lightning-type-widget-coordinate/references/validation-gates.md +130 -0
- package/skills/platform-metadata-api-context-get/SKILL.md +13 -10
- package/skills/platform-sharing-owd-configure/SKILL.md +142 -0
- package/skills/platform-sharing-owd-configure/examples/get_owd_output.md +38 -0
- package/skills/platform-sharing-owd-configure/examples/update_owd_output.md +44 -0
- package/skills/platform-sharing-owd-configure/references/access_levels.md +49 -0
- package/skills/platform-sharing-owd-configure/references/metadata_api_approach.md +69 -0
- package/skills/platform-sharing-rules-generate/SKILL.md +89 -19
- package/skills/platform-sharing-rules-generate/examples/test-cases.md +381 -0
- package/skills/platform-widget-generate/SKILL.md +241 -0
- package/skills/platform-widget-generate/examples/conditional.json +73 -0
- package/skills/platform-widget-generate/examples/list-with-foreach.json +66 -0
- package/skills/platform-widget-generate/examples/single-object.json +64 -0
- package/skills/platform-widget-generate/references/schema-from-lightning-type.md +76 -0
- package/skills/platform-widget-generate/references/widget-bundle-layout.md +116 -0
- package/skills/platform-widget-generate/references/widget-meta-directives.md +130 -0
- package/skills/sales-agentforce-pipeline-management-configure/SKILL.md +268 -0
- package/skills/sales-agentforce-pipeline-management-configure/assets/field-completion-template.genAiPromptTemplate-meta.xml +141 -0
- package/skills/sales-agentforce-pipeline-management-configure/assets/pipeline_management_flow.flow-meta.xml +548 -0
- package/skills/sales-agentforce-pipeline-management-configure/assets/sales_management_agent.agent +2938 -0
- package/skills/sales-agentforce-pipeline-management-configure/assets/sales_management_agent.bundle-meta.xml +4 -0
- package/skills/sales-agentforce-pipeline-management-configure/assets/sfdx-project.json +12 -0
- package/skills/sales-agentforce-pipeline-management-configure/assets/stage-descriptions/bant.txt +11 -0
- package/skills/sales-agentforce-pipeline-management-configure/assets/stage-descriptions/meddic.txt +11 -0
- package/skills/sales-agentforce-pipeline-management-configure/assets/stage-descriptions/spiced.txt +11 -0
- package/skills/sales-agentforce-pipeline-management-configure/examples/custom-prompt-instructions.md +317 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/admin-communication.md +355 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/agent-creation.md +383 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/auth-and-cli.md +146 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/automation-matrix.md +23 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/autonomous-updates.md +215 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/canonical-agent-path.md +75 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/data-sources.md +155 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/field-completion-prompt-template.md +120 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/field-completion-prompts.md +149 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/flags.md +13 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/flow-clone-from-template.md +447 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/metadata-inventory.md +330 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/opportunity-stages.md +246 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/repair-diagnostics.md +265 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/setup-order.md +263 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/soap-api-enablement.md +528 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/CHANGES.md +180 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/README.md +56 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/add-field-suggestion.sh +679 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/create-agent.sh +302 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/create-flow.sh +250 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/define-agent-access.sh +430 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/deploy-settings.sh +77 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/enable-deal-agent.sh +241 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/enable-prerequisites.sh +538 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/flow-debug-and-verify.sh +385 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/retrieve-settings.sh +131 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/setup-all.sh +2791 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/shared/agent-bundle-publish.sh +189 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/shared/agent-detection.sh +239 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/shared/flow-builder.sh +238 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/shared/psg.sh +48 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/shared/soap.sh +140 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/shared/stage-descriptions.sh +448 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/shared/test-opp.sh +166 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/verify-all.sh +636 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/verify-prompt-generation.sh +346 -0
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: dx-pkg-post-install-configure
|
|
3
|
+
description: "Use this skill to automate managed package post-install configuration. Package-agnostic — works with any managed package (LMA, FMA, work.com, Certinia, etc.). TRIGGER when: user installs a managed package and needs post-install configuration, mentions LMA/FMA/work.com post-install setup, asks to configure permission sets/FLS/page layouts for an installed package, says 'post-install', 'package setup', 'configure LMA', 'set up FMA', 'post-install steps'. DO NOT TRIGGER for: standalone permission set assignment (use dx-org-permission-set-assign), generating permission set metadata XML (use platform-permission-set-generate), package installation, or org switching."
|
|
4
|
+
metadata:
|
|
5
|
+
version: "2.2"
|
|
6
|
+
minApiVersion: "67.0"
|
|
7
|
+
cliTools:
|
|
8
|
+
- tool: ["sf"]
|
|
9
|
+
semver: ">=2.0.0"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## When to Use This Skill
|
|
13
|
+
|
|
14
|
+
Use when automating post-install configuration for any Salesforce managed package. This skill reads the package's post-install documentation, discovers available execution methods, and automates the configuration steps — including permission sets, object/field permissions, page layouts, Visualforce page access, and tab settings.
|
|
15
|
+
|
|
16
|
+
## Input
|
|
17
|
+
|
|
18
|
+
- **Required:** Package name (e.g., `LMA`, `FMA`, `work.com`)
|
|
19
|
+
- **Optional:** Path to post-install doc (PDF, markdown, URL)
|
|
20
|
+
|
|
21
|
+
If no doc is provided, ask the user to supply it.
|
|
22
|
+
|
|
23
|
+
## Workflow
|
|
24
|
+
|
|
25
|
+
Execute phases in order. Each phase must pass before proceeding.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
### Phase 1: Discover Available Execution Methods
|
|
30
|
+
|
|
31
|
+
**Priority order:**
|
|
32
|
+
1. Org-native platform MCP servers (highest — direct org access via Headless 360)
|
|
33
|
+
2. Claude Code external MCP servers (sf-sobject-all, sf-sobject-all-sb, etc.)
|
|
34
|
+
3. sf CLI fallback (always available if authenticated)
|
|
35
|
+
|
|
36
|
+
#### Step 1A: Resolve org API version
|
|
37
|
+
|
|
38
|
+
Discover the org's current API version dynamically — never hardcode a version number:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
sf org display --target-org <alias> --json
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
From the JSON response, read `result.apiVersion` (e.g., `"67.0"`). Store this value and use it as `v<apiVersion>` in all subsequent REST paths. If the command fails, fall back to the `minApiVersion` declared in this skill's metadata (`67.0`).
|
|
45
|
+
|
|
46
|
+
#### Step 1B: Check for org-native platform MCP servers
|
|
47
|
+
|
|
48
|
+
Query the Tooling API for MCP server availability:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
sf api request rest "/services/data/v<apiVersion>/tooling/query?q=SELECT+Id,DeveloperName,MasterLabel+FROM+McpServerAccess" --target-org <alias>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
#### Step 1C: Determine execution method
|
|
55
|
+
|
|
56
|
+
Check which Claude Code MCP tools are available and authenticated.
|
|
57
|
+
|
|
58
|
+
**MCP tool prefixes by org type:**
|
|
59
|
+
|
|
60
|
+
| Org Type | Tool Prefix |
|
|
61
|
+
|---|---|
|
|
62
|
+
| Production | `mcp__sf-sobject-all__` |
|
|
63
|
+
| Sandbox | `mcp__sf-sobject-all-sb__` |
|
|
64
|
+
| Falcon Test (pc-rnd) | `mcp__sf-sobject-all-falcon__` |
|
|
65
|
+
|
|
66
|
+
If MCP needs auth, call the authenticate tool. If auth fails, fall back to sf CLI.
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
### Phase 2: Verify Authentication & Org Identity
|
|
71
|
+
|
|
72
|
+
1. Run a lightweight test query (`SELECT Id, Name, IsSandbox FROM Organization`)
|
|
73
|
+
2. If MCP auth fails, automatically fall back to sf CLI
|
|
74
|
+
3. Display org info and ask user to confirm before proceeding
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
### Phase 3: Verify Package Installation
|
|
79
|
+
|
|
80
|
+
1. Determine the package namespace (ask user if unknown)
|
|
81
|
+
2. Check via Tooling API (`InstalledSubscriberPackage`) — do NOT use `PackageLicense`
|
|
82
|
+
3. If package not found, stop and inform user
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
### Phase 4: Read and Parse Post-Install Document
|
|
87
|
+
|
|
88
|
+
Read the provided document and extract discrete configuration steps.
|
|
89
|
+
|
|
90
|
+
**Supported formats:** PDF, markdown, URL (via WebFetch), pasted text.
|
|
91
|
+
|
|
92
|
+
**Parsing approach:**
|
|
93
|
+
1. Extract each numbered/bulleted step from the document
|
|
94
|
+
2. Present the extracted steps to the user for validation before proceeding
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
### Phase 5: Classify Steps & Interactive Plan Review
|
|
99
|
+
|
|
100
|
+
For each step extracted from the doc, classify as Automated or Manual.
|
|
101
|
+
|
|
102
|
+
#### Automation capabilities reference
|
|
103
|
+
|
|
104
|
+
**Via MCP (sobject-all) or sf CLI CRUD:**
|
|
105
|
+
- Record CRUD on any standard or custom object (PermissionSet, ObjectPermissions,
|
|
106
|
+
FieldPermissions, SetupEntityAccess, PermissionSetTabSetting, PermissionSetAssignment, etc.)
|
|
107
|
+
|
|
108
|
+
**Via Metadata API retrieve/deploy (sf CLI):**
|
|
109
|
+
- Page layout modifications (add related lists, fields, sections)
|
|
110
|
+
- Profile settings
|
|
111
|
+
- Custom metadata type records
|
|
112
|
+
|
|
113
|
+
**Via sf CLI Tooling API:**
|
|
114
|
+
- Tooling queries (InstalledSubscriberPackage, ApexPage, ApexClass, etc.)
|
|
115
|
+
- Any REST-accessible Tooling operation
|
|
116
|
+
|
|
117
|
+
**Manual (no API path — requires Setup UI):**
|
|
118
|
+
- System permissions not exposed via REST
|
|
119
|
+
- Connected app OAuth configuration
|
|
120
|
+
- Environment Hub linkage
|
|
121
|
+
|
|
122
|
+
#### Interactive approval
|
|
123
|
+
|
|
124
|
+
Present the classified plan and let the user choose:
|
|
125
|
+
- **"Approve all"** — Execute all steps as planned
|
|
126
|
+
- **"Let me choose"** — Select which steps to approve/skip
|
|
127
|
+
- **"I have questions"** — Discuss specific steps before deciding
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
### Phase 6: Execute Approved Steps
|
|
132
|
+
|
|
133
|
+
For each approved step, use the resolved execution method.
|
|
134
|
+
|
|
135
|
+
#### Execution method reference
|
|
136
|
+
|
|
137
|
+
| Operation | Via MCP | Via sf CLI |
|
|
138
|
+
|---|---|---|
|
|
139
|
+
| SOQL query | `soqlQuery` tool | `sf data query --query "<SOQL>" --target-org <alias> --json` |
|
|
140
|
+
| Create record | `createSobjectRecord` tool | `sf data create record --sobject <Object> --values "..." --target-org <alias> --json` |
|
|
141
|
+
| Update record | `updateSobjectRecord` tool | `sf data update record --sobject <Object> --record-id <id> --values "..." --target-org <alias> --json` |
|
|
142
|
+
| Describe object | `getObjectSchema` tool | `sf api request rest "/services/data/v<apiVersion>/sobjects/<Object>/describe" --target-org <alias>` |
|
|
143
|
+
| Page layout | N/A | Metadata API retrieve/deploy |
|
|
144
|
+
|
|
145
|
+
#### Page layout modifications via Metadata API
|
|
146
|
+
|
|
147
|
+
Use `sf project retrieve start` → edit the layout XML → `sf project deploy start`.
|
|
148
|
+
|
|
149
|
+
#### Execution rules
|
|
150
|
+
|
|
151
|
+
- **Idempotency:** Before creating any record, query to check if it already exists. Skip if so.
|
|
152
|
+
- **Report after each step:** Show success count, skipped items, and reasons.
|
|
153
|
+
- **Automatic fallback:** If MCP fails mid-execution, retry via sf CLI.
|
|
154
|
+
- **On failure:** Report error, ask user to retry/skip/stop.
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
### Phase 7: Guide Manual Steps (if any)
|
|
159
|
+
|
|
160
|
+
If any steps could not be automated, present each with Setup navigation instructions.
|
|
161
|
+
Wait for user confirmation before proceeding to the next.
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
### Phase 8: Summary
|
|
166
|
+
|
|
167
|
+
Display final summary with step-by-step status, method used, and any skipped items.
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## Error Handling
|
|
172
|
+
|
|
173
|
+
- **Auth failure mid-execution:** Stop, ask user to re-auth, offer to resume
|
|
174
|
+
- **Duplicate record errors:** Treat as "already configured", skip and continue
|
|
175
|
+
- **Permission errors:** Report which permission is missing, suggest resolution
|
|
176
|
+
- **Unknown step type:** Ask user to clarify, offer to mark as manual
|
|
177
|
+
|
|
178
|
+
## Notes
|
|
179
|
+
|
|
180
|
+
- **Priority: org-native MCP > Claude Code MCP > sf CLI > manual**
|
|
181
|
+
- sf CLI is always a valid fallback for all CRUD and Tooling API operations
|
|
182
|
+
- Page layout modifications are automated via Metadata API retrieve/deploy
|
|
183
|
+
- Always verify org identity before making changes
|
|
184
|
+
- All actions respect the authenticated user's permissions
|
|
@@ -3,7 +3,17 @@ 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:
|
|
6
|
+
relatedSkills:
|
|
7
|
+
- "experience-ui-bundle-project-generate"
|
|
8
|
+
- "experience-ui-bundle-metadata-generate"
|
|
9
|
+
- "experience-ui-bundle-features-generate"
|
|
10
|
+
- "experience-ui-bundle-salesforce-data-access"
|
|
11
|
+
- "experience-ui-bundle-frontend-generate"
|
|
12
|
+
- "experience-ui-bundle-agentforce-client-generate"
|
|
13
|
+
- "experience-ui-bundle-file-upload-generate"
|
|
14
|
+
- "experience-ui-bundle-deploy"
|
|
15
|
+
- "experience-ui-bundle-site-generate"
|
|
16
|
+
- "experience-ui-bundle-custom-app-generate"
|
|
7
17
|
---
|
|
8
18
|
|
|
9
19
|
# Building a UI Bundle App
|
|
@@ -12,6 +22,8 @@ metadata:
|
|
|
12
22
|
|
|
13
23
|
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
24
|
|
|
25
|
+
**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.
|
|
26
|
+
|
|
15
27
|
## When to Use This Skill
|
|
16
28
|
|
|
17
29
|
**Use when:**
|
|
@@ -38,23 +50,75 @@ Build a complete, deployable Salesforce React UI bundle application from a natur
|
|
|
38
50
|
|
|
39
51
|
---
|
|
40
52
|
|
|
53
|
+
## Prompt Classification Keywords
|
|
54
|
+
|
|
55
|
+
This skill makes two decisions directly from the raw prompt text. Use these tables as the single
|
|
56
|
+
source for both — do not restate or re-derive the lists elsewhere in this file.
|
|
57
|
+
|
|
58
|
+
**1. Phase 2 (Features) is required if the prompt mentions ANY of:**
|
|
59
|
+
|
|
60
|
+
| Category | Keywords | Notes |
|
|
61
|
+
|----------|----------|-------|
|
|
62
|
+
| Data features | search, filter, sort, pagination, table, grid, list | |
|
|
63
|
+
| Navigation | navigation, nav, menu, routing | |
|
|
64
|
+
| Authentication | authentication, auth, login, logout, user session, user login | |
|
|
65
|
+
| Integrations | upload, file | |
|
|
66
|
+
| UI | shadcn, components, forms, buttons, cards | |
|
|
67
|
+
| 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 |
|
|
68
|
+
|
|
69
|
+
Negating one category (e.g. "without authentication", "no login required", "public access") does
|
|
70
|
+
**not** cancel triggers from another category — each is evaluated independently. Example: "no
|
|
71
|
+
login required, with filtering" still triggers Phase 2 because "filtering" matches Data features.
|
|
72
|
+
Skip Phase 2 only when the prompt matches none of the keywords above.
|
|
73
|
+
|
|
74
|
+
**2. Hosting target — extract from prompt keywords:**
|
|
75
|
+
|
|
76
|
+
| Hosting target | Keywords |
|
|
77
|
+
|-----------------|----------|
|
|
78
|
+
| Experience Site | "Experience Site", "Community", "external users", "public users", "guest users" |
|
|
79
|
+
| Custom Application | "Custom Application", "internal users", "Lightning app" |
|
|
80
|
+
|
|
81
|
+
If the prompt matches neither list, or matches both, ask the user to clarify before proceeding — do not guess.
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
41
85
|
## Dependency Graph & Build Order
|
|
42
86
|
|
|
87
|
+
### Phase 0: Template Offer & Bootstrap (Prerequisites)
|
|
88
|
+
|
|
89
|
+
```text
|
|
90
|
+
Offer prebuilt starter template (experience-ui-bundle-project-generate)
|
|
91
|
+
v
|
|
92
|
+
If template chosen: scaffold via sf template generate project -- Phase 1 skipped
|
|
93
|
+
v
|
|
94
|
+
If declined: run scripts/check-sfdx-project.sh
|
|
95
|
+
v
|
|
96
|
+
If missing: create sfdx-project.json
|
|
97
|
+
v
|
|
98
|
+
Verify project directory initialized
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
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.
|
|
102
|
+
|
|
103
|
+
**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.
|
|
104
|
+
|
|
43
105
|
### Phase 1: Scaffolding (Foundation)
|
|
44
106
|
|
|
45
107
|
```text
|
|
46
|
-
|
|
108
|
+
Determine hosting target (Experience Site / Custom Application)
|
|
109
|
+
v
|
|
110
|
+
UI Bundle scaffold (sf template generate ui-bundle --template reactbasic)
|
|
47
111
|
v
|
|
48
112
|
Install dependencies (npm install)
|
|
49
113
|
v
|
|
50
|
-
Bundle metadata (uibundle-meta.xml
|
|
114
|
+
Bundle metadata (uibundle-meta.xml with <target>, ui-bundle.json)
|
|
51
115
|
v
|
|
52
116
|
CSP Trusted Sites (if external domains needed)
|
|
53
117
|
```
|
|
54
118
|
|
|
55
|
-
Creates the UI bundle directory structure, meta XML, and optional routing/headers config. All subsequent phases require the scaffold to exist.
|
|
119
|
+
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
120
|
|
|
57
|
-
### Phase 2: Features (
|
|
121
|
+
### Phase 2: Features (Required if prompt mentions feature keywords — see "Prompt Classification Keywords" above)
|
|
58
122
|
|
|
59
123
|
```text
|
|
60
124
|
Search project code (src/) for existing implementations
|
|
@@ -65,10 +129,12 @@ Search, describe, and install features (auth, shadcn, search, navigation, GraphQ
|
|
|
65
129
|
v
|
|
66
130
|
Resolve conflicts (two-pass: --on-conflict error, then --conflict-resolution)
|
|
67
131
|
v
|
|
68
|
-
Integrate
|
|
132
|
+
Integrate __examples__ files into target files (verify build succeeds), then delete them
|
|
69
133
|
```
|
|
70
134
|
|
|
71
|
-
Installs pre-built, tested feature packages.
|
|
135
|
+
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.
|
|
136
|
+
|
|
137
|
+
Only skip this phase if the app is truly a minimal "hello world" with no interactive features (no trigger keywords present at all).
|
|
72
138
|
|
|
73
139
|
### Phase 3: Data Access (Backend Wiring)
|
|
74
140
|
|
|
@@ -123,16 +189,16 @@ Post-deploy configuration (permissions, profiles, named credentials, connected a
|
|
|
123
189
|
Import data (if data plan exists)
|
|
124
190
|
v
|
|
125
191
|
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)*
|
|
192
|
+
*(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
193
|
v
|
|
128
194
|
Final UI bundle build (rebuilds with the deployed schema)
|
|
129
195
|
```
|
|
130
196
|
|
|
131
197
|
Follows the canonical 7-step deployment sequence. Must deploy metadata before fetching schema. Must assign permissions before schema fetch.
|
|
132
198
|
|
|
133
|
-
### Phase 7: Hosting Target
|
|
199
|
+
### Phase 7: Hosting Target Infrastructure
|
|
134
200
|
|
|
135
|
-
Choose **one** of the following based on the app's audience:
|
|
201
|
+
Deploy the hosting target infrastructure determined in Phase 1. Choose **one** of the following based on the app's audience:
|
|
136
202
|
|
|
137
203
|
#### Phase 7a: Experience Site (External)
|
|
138
204
|
|
|
@@ -144,7 +210,7 @@ Generate site metadata (Network, CustomSite, DigitalExperience)
|
|
|
144
210
|
Deploy site infrastructure
|
|
145
211
|
```
|
|
146
212
|
|
|
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.
|
|
213
|
+
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
214
|
|
|
149
215
|
#### Phase 7b: Custom Application (Internal)
|
|
150
216
|
|
|
@@ -153,17 +219,30 @@ Resolve app properties (appName, appNamespace, appLabel)
|
|
|
153
219
|
v
|
|
154
220
|
Generate CustomApplication metadata (applications/*.app-meta.xml)
|
|
155
221
|
v
|
|
156
|
-
Add <target>CustomApplication</target> to .uibundle-meta.xml
|
|
157
|
-
v
|
|
158
222
|
Deploy custom application
|
|
159
223
|
```
|
|
160
224
|
|
|
161
|
-
Creates a Custom Application entry in the Lightning App Launcher. Use when the app is for internal users accessing it within Lightning Experience.
|
|
225
|
+
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
226
|
|
|
163
227
|
---
|
|
164
228
|
|
|
165
229
|
## Execution Workflow
|
|
166
230
|
|
|
231
|
+
### STEP 0: Offer a Prebuilt Template (before scaffolding from scratch)
|
|
232
|
+
|
|
233
|
+
**Before** analyzing requirements or scaffolding, check whether a prebuilt starter template fits —
|
|
234
|
+
it is faster and less error-prone than building from scratch.
|
|
235
|
+
|
|
236
|
+
- **Load skill: Invoke `experience-ui-bundle-project-generate`.** It offers two minimal React starter
|
|
237
|
+
projects (internal / employee-facing and external / customer-facing) and, if the user picks one,
|
|
238
|
+
generates it into the project directory with `sf template generate project`.
|
|
239
|
+
- **If the user chooses a template:** the scaffolding phase (Phase 1) is effectively done. Skip
|
|
240
|
+
straight to populating/customizing the project — continue at the phase that matches what they
|
|
241
|
+
want to change (typically Phase 4 UI, or Phase 3 data access), then Phase 6 deployment.
|
|
242
|
+
- **If the user declines** (wants to start from scratch, or none fit): proceed normally to STEP 1.
|
|
243
|
+
|
|
244
|
+
Do not skip this step silently — always offer the choice at the start of a from-scratch app build.
|
|
245
|
+
|
|
167
246
|
### STEP 1: Requirements Analysis & Planning
|
|
168
247
|
|
|
169
248
|
**Actions:**
|
|
@@ -173,8 +252,12 @@ Creates a Custom Application entry in the Lightning App Launcher. Use when the a
|
|
|
173
252
|
3. Extract pages and navigation structure
|
|
174
253
|
4. Identify data entities and Salesforce objects needed
|
|
175
254
|
5. Detect feature requirements (authentication, search, file upload, chat)
|
|
176
|
-
6. Determine
|
|
255
|
+
6. Determine hosting target (Experience Site OR Custom Application) — see "Prompt Classification Keywords" above; if ambiguous, ask user to clarify before proceeding
|
|
177
256
|
7. Identify external domains for CSP registration
|
|
257
|
+
8. **Check for conflicting requirements** — STOP and ask user if any of the following conflicts are detected:
|
|
258
|
+
- "No authentication" OR "public/guest access" AND "user-specific data" OR "show current user's data" OR "My [Entity]" view
|
|
259
|
+
- "External users" AND "Custom Application" (Custom Apps are internal-only)
|
|
260
|
+
- "Public access" AND features requiring login (file upload, user profile, personalization)
|
|
178
261
|
|
|
179
262
|
> **The plan MUST contain an explicit grounding step before any query authoring.** Do not list
|
|
180
263
|
> guessed object/field names as settled facts and defer verification to codegen. The data-access
|
|
@@ -183,6 +266,18 @@ Creates a Custom Application entry in the Lightning App Launcher. Use when the a
|
|
|
183
266
|
> authors queries first and codegens later is the failure mode that produces guessed fields and
|
|
184
267
|
> hand-stubbed types — do not emit it.
|
|
185
268
|
|
|
269
|
+
**Before proceeding to Output (Build Plan), validate:**
|
|
270
|
+
|
|
271
|
+
- [ ] **No conflicting requirements detected** — if conflicts exist (see action #8 above), STOP and report:
|
|
272
|
+
```text
|
|
273
|
+
ERROR: Conflicting requirements detected:
|
|
274
|
+
- [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"]
|
|
275
|
+
|
|
276
|
+
RESOLUTION NEEDED: Please clarify:
|
|
277
|
+
- [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)?"]
|
|
278
|
+
```
|
|
279
|
+
**Do NOT proceed to build plan generation or any phase execution until this conflict is resolved.**
|
|
280
|
+
|
|
186
281
|
**Output: Build Plan**
|
|
187
282
|
|
|
188
283
|
```text
|
|
@@ -190,6 +285,7 @@ UI Bundle App Build Plan: [App Name]
|
|
|
190
285
|
|
|
191
286
|
SCAFFOLDING:
|
|
192
287
|
- App name: [PascalCase name]
|
|
288
|
+
- Hosting target: [Experience Site / Custom Application] **REQUIRED**
|
|
193
289
|
- Routing: [SPA rewrites, trailing slash config]
|
|
194
290
|
- External domains: [domains needing CSP registration]
|
|
195
291
|
|
|
@@ -214,10 +310,10 @@ INTEGRATIONS (if applicable):
|
|
|
214
310
|
|
|
215
311
|
DEPLOYMENT:
|
|
216
312
|
- Target org: [org alias if known]
|
|
217
|
-
- Hosting target: [Experience Site / Custom Application / none]
|
|
218
313
|
|
|
219
314
|
SKILL LOAD ORDER:
|
|
220
|
-
|
|
315
|
+
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)
|
|
316
|
+
1. experience-ui-bundle-metadata-generate (determines hosting target FIRST)
|
|
221
317
|
2. experience-ui-bundle-features-generate (if features needed)
|
|
222
318
|
3. experience-ui-bundle-salesforce-data-access (if data access needed)
|
|
223
319
|
4. experience-ui-bundle-frontend-generate
|
|
@@ -239,33 +335,45 @@ Execute each phase sequentially. Complete all steps within a phase before moving
|
|
|
239
335
|
| **3. Verify** | Run lint and build from the UI bundle directory | Catch errors before moving to the next phase |
|
|
240
336
|
| **4. Checkpoint** | Confirm phase completion before proceeding | Ensures dependencies are satisfied for the next phase |
|
|
241
337
|
|
|
242
|
-
**Do NOT skip step 1 (loading the skill).** Even if you remember the skill's content, skills evolve. Always load the current version.
|
|
338
|
+
**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
339
|
|
|
244
340
|
---
|
|
245
341
|
|
|
246
|
-
**Phase
|
|
342
|
+
**Phase 0 -- Template Offer & Bootstrap** (always, before scaffolding)
|
|
343
|
+
- 1. Load skill: Invoke `experience-ui-bundle-project-generate`
|
|
344
|
+
- 2. Execute: Offer the two starter templates; if the user picks one, generate it into the project dir with `sf template generate project`
|
|
345
|
+
- 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.
|
|
346
|
+
- 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).
|
|
347
|
+
- 5. Checkpoint: SFDX project ready -- proceed to Phase 1
|
|
348
|
+
|
|
349
|
+
**Phase 1 -- Scaffolding** (skip if a template was generated in Phase 0)
|
|
247
350
|
- 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
|
|
351
|
+
- 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.
|
|
352
|
+
- 3. Verify: Confirm directory structure and metadata files exist with hosting target specified
|
|
250
353
|
- 4. Checkpoint: UI bundle scaffold is ready -- proceed to Phase 2
|
|
251
354
|
|
|
252
|
-
**Phase 2 -- Features** (
|
|
355
|
+
**Phase 2 -- Features** (Required if prompt mentions feature keywords — see "Prompt Classification Keywords" above)
|
|
253
356
|
- 1. Load skill: Invoke `experience-ui-bundle-features-generate`
|
|
254
357
|
- 2. Execute: Install dependencies, search and install features, integrate example files
|
|
255
358
|
- 3. Verify: Run `npm run build` to confirm features integrate cleanly
|
|
256
|
-
-
|
|
359
|
+
- **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
360
|
|
|
258
361
|
**Phase 3 -- Data Access** (skip if no Salesforce data needed)
|
|
259
362
|
- 1. Load skill: Invoke `experience-ui-bundle-salesforce-data-access`
|
|
260
|
-
- 2. Execute:
|
|
261
|
-
- 3. Verify: Run `npx eslint` on files with GraphQL queries
|
|
363
|
+
- 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.
|
|
364
|
+
- 3. Verify: Run `npx eslint` on files with GraphQL queries. Verify schema is non-empty.
|
|
262
365
|
- 4. Checkpoint: Data layer ready -- proceed to Phase 4
|
|
263
366
|
|
|
264
|
-
**Phase 4 -- UI**
|
|
367
|
+
**Phase 4 -- UI** (ALWAYS REQUIRED - CANNOT BE SKIPPED)
|
|
265
368
|
- 1. Load skill: Invoke `experience-ui-bundle-frontend-generate`
|
|
266
369
|
- 2. Execute: Build layout, pages, components, navigation. Replace all boilerplate.
|
|
370
|
+
- If Phase 2 was skipped: Generate UI components from scratch without feature templates
|
|
371
|
+
- If Phase 3 was skipped: Use mock data or static content for display
|
|
372
|
+
- Phase 4 MUST execute even if prior phases were skipped
|
|
267
373
|
- 3. Verify: Run lint and build -- 0 errors required
|
|
268
|
-
- 4. Checkpoint: UI complete -- proceed to Phase 5
|
|
374
|
+
- 4. Checkpoint: UI complete -- proceed to Phase 5 if integrations needed, or stop here if building only
|
|
375
|
+
|
|
376
|
+
⚠️ **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
377
|
|
|
270
378
|
**Phase 5 -- Integrations** (skip if not requested)
|
|
271
379
|
- 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 +383,76 @@ Execute each phase sequentially. Complete all steps within a phase before moving
|
|
|
275
383
|
|
|
276
384
|
**Phase 6 -- Deployment**
|
|
277
385
|
- 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
|
|
386
|
+
- 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.
|
|
387
|
+
- 3. Verify: Confirm deployment succeeds, app is accessible, and the re-fetched schema is non-empty
|
|
388
|
+
- 4. Checkpoint: App deployed -- proceed to Phase 7 if hosting target deployment is needed
|
|
281
389
|
|
|
282
390
|
**Phase 7a -- Experience Site** (skip if not requested or if Custom Application chosen)
|
|
283
391
|
- 1. Load skill: Invoke `experience-ui-bundle-site-generate`
|
|
284
392
|
- 2. Execute: Resolve properties, generate site metadata, deploy
|
|
285
|
-
- 3. Verify: Confirm site URL is accessible
|
|
393
|
+
- 3. Verify: Confirm site URL is accessible (hosting target already verified by `scripts/check-hosting-target.sh` in trigger evaluation)
|
|
286
394
|
- 4. Checkpoint: Site live -- build complete
|
|
395
|
+
- **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
|
|
396
|
+
- **Note**: The `<target>ExperienceSite</target>` was already set in meta XML during Phase 1 -- do not add it again
|
|
287
397
|
|
|
288
398
|
**Phase 7b -- Custom Application** (skip if not requested or if Experience Site chosen)
|
|
289
399
|
- 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
|
|
400
|
+
- 2. Execute: Resolve app properties, generate CustomApplication metadata
|
|
401
|
+
- 3. Verify: Confirm app appears in App Launcher (hosting target already verified by `scripts/check-hosting-target.sh` in trigger evaluation)
|
|
292
402
|
- 4. Checkpoint: App registered -- build complete
|
|
403
|
+
- **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
|
|
404
|
+
- **Note**: The `<target>CustomApplication</target>` was already set in meta XML during Phase 1 -- do not add it again
|
|
405
|
+
|
|
406
|
+
### STEP 2.5: Phase Completion Validation
|
|
407
|
+
|
|
408
|
+
Before proceeding to STEP 3 (Final Summary), validate that all required phases were executed:
|
|
409
|
+
|
|
410
|
+
**Critical Validation (MUST pass):**
|
|
411
|
+
- [ ] **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:
|
|
412
|
+
```text
|
|
413
|
+
ERROR: No SFDX project detected. Phase 0 (Bootstrap) is REQUIRED before scaffolding.
|
|
414
|
+
Run `sf project generate` (or create sfdx-project.json) before invoking
|
|
415
|
+
`sf template generate ui-bundle`.
|
|
416
|
+
```
|
|
417
|
+
If a template was used in Phase 0, this check is satisfied by the template's own scaffolding — skip re-running the script.
|
|
418
|
+
|
|
419
|
+
- [ ] **Phase 1 hosting target resolved**: Run `scripts/check-hosting-target.sh`. If it returns non-zero, STOP and report error:
|
|
420
|
+
```text
|
|
421
|
+
ERROR: Hosting target was not resolved in Phase 1. A UI bundle without a <target> in its
|
|
422
|
+
meta XML will not be visible in the org. Determine Experience Site vs Custom Application
|
|
423
|
+
(see "Prompt Classification Keywords" above; ask the user if ambiguous) before proceeding
|
|
424
|
+
past Phase 1 -- do not defer this to Phase 7 and do not record "none"/"skipped".
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
- [ ] **Phase 4 (Frontend) executed**: If Phase 4 was NOT executed, STOP and report error:
|
|
428
|
+
```text
|
|
429
|
+
ERROR: Phase 4 (UI/Frontend generation) is REQUIRED for all UI bundle apps.
|
|
430
|
+
Cannot complete build without generating the React user interface.
|
|
431
|
+
Please review the phase execution logic and ensure Phase 4 is always executed.
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
- [ ] **Phase 7 hosting infrastructure deployed**: If neither Phase 7a nor Phase 7b was executed, STOP and report error:
|
|
435
|
+
```text
|
|
436
|
+
ERROR: Hosting target infrastructure (Phase 7a Experience Site or Phase 7b Custom
|
|
437
|
+
Application) was not deployed. The app was built but is not reachable by any user.
|
|
438
|
+
Exactly one of Phase 7a/7b must run -- it is never optional or "skipped".
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
**Warning Validation (log warnings, but can proceed):**
|
|
442
|
+
- [ ] **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):
|
|
443
|
+
```text
|
|
444
|
+
WARNING: Phase 2 (Features) was skipped but prompt contains feature keywords.
|
|
445
|
+
This may indicate a trigger detection failure. Generated UI may be missing
|
|
446
|
+
required feature functionality. Consider re-running with Phase 2 included.
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
- [ ] **Phase 3 execution**: If Phase 3 was skipped but prompt mentions Salesforce objects, "GraphQL", "data", or "query":
|
|
450
|
+
```text
|
|
451
|
+
WARNING: Phase 3 (Data Access) was skipped but prompt mentions Salesforce data.
|
|
452
|
+
Generated UI may not connect to backend correctly. Verify data access is working.
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
**Proceed to STEP 3 only if all Critical Validation checks pass (Phase 0, hosting target, Phase 4, Phase 7).**
|
|
293
456
|
|
|
294
457
|
### STEP 3: Final Summary
|
|
295
458
|
|
|
@@ -299,13 +462,14 @@ After all phases complete, present a build summary:
|
|
|
299
462
|
UI Bundle App Build Complete: [App Name]
|
|
300
463
|
|
|
301
464
|
PHASES COMPLETED:
|
|
302
|
-
[x] Phase
|
|
465
|
+
[x] Phase 0: Template Offer & Bootstrap -- [template used: <name> / declined; SFDX project verified/created]
|
|
466
|
+
[x] Phase 1: Scaffolding -- [app name] UI bundle created with hosting target [Experience Site / Custom Application]
|
|
303
467
|
[x] Phase 2: Features -- [list of features installed, or "skipped"]
|
|
304
468
|
[x] Phase 3: Data Access -- [list of entities wired up]
|
|
305
469
|
[x] Phase 4: UI -- [count] pages, [count] components
|
|
306
470
|
[x] Phase 5: Integrations -- [list or "none"]
|
|
307
471
|
[x] Phase 6: Deployment -- deployed to [org]
|
|
308
|
-
[x] Phase 7: Hosting Target -- [Experience Site URL / Custom Application name
|
|
472
|
+
[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
473
|
|
|
310
474
|
FILES GENERATED:
|
|
311
475
|
[list key files and their paths]
|
|
@@ -321,8 +485,10 @@ NEXT STEPS:
|
|
|
321
485
|
Before presenting the build as complete, verify:
|
|
322
486
|
|
|
323
487
|
- [ ] **Scaffold exists**: UI bundle directory with valid meta XML and ui-bundle.json
|
|
488
|
+
- [ ] **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
489
|
- [ ] **Dependencies installed**: `node_modules/` exists and `package.json` has expected packages
|
|
325
490
|
- [ ] **Build passes**: `npm run build` produces `dist/` with no errors
|
|
491
|
+
- [ ] **Dist content exists**: `dist/` contains index.html, JS/CSS bundles, and assets (not just an empty directory)
|
|
326
492
|
- [ ] **Lint passes**: `npx eslint src/` reports 0 errors
|
|
327
493
|
- [ ] **No boilerplate**: All placeholder text, default titles, and template content has been replaced
|
|
328
494
|
- [ ] **Navigation works**: `appLayout.tsx` has real nav items matching created pages
|
|
@@ -337,6 +503,7 @@ Before presenting the build as complete, verify:
|
|
|
337
503
|
|
|
338
504
|
- App purpose is too vague to determine pages or data needs
|
|
339
505
|
- User wants features that conflict (e.g., "no authentication" + "show user-specific data")
|
|
506
|
+
- Hosting target cannot be determined (ask: "Is this for internal users (Custom Application) or external users (Experience Site)?")
|
|
340
507
|
- Target org is unknown and deployment is requested
|
|
341
508
|
|
|
342
509
|
### 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'
|