Skip to content

Commit f36b758

Browse files
authored
Merge branch 'main' into experience-lwr-site
2 parents 7834ce4 + 5e009c7 commit f36b758

1 file changed

Lines changed: 102 additions & 10 deletions

File tree

  • skills/salesforce-lightning-app-build

skills/salesforce-lightning-app-build/SKILL.md

Lines changed: 102 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
---
22
name: salesforce-lightning-app-build
3-
description: Use this skill to build and orchestrate complete Salesforce Lightning Applications (LEX Apps), custom projects, or end-to-end business solutions from a natural language scenario. Triggers when a user requests a "custom app", a "business solution", or describes any scenario requiring multiple interconnected Salesforce components to be built together into a complete Lightning Experience (LEX) Application. Orchestrates the sequenced creation of Custom Objects, Relationships, Fields, Lightning Record Pages, Custom Tabs, Custom Applications, Permission Sets, and OPTIONALLY Flows and Validation Rules.
3+
description: Build complete Salesforce Lightning Experience applications from natural language descriptions. Use this skill when a user requests a "complete app", "Lightning app", "business solution", "management system", or describes a scenario requiring multiple interconnected Salesforce components (objects, fields, pages, tabs, security). Orchestrates all required metadata types in proper dependency order to produce a deployable application.
44
metadata:
55
category: orchestration
6-
related-skills: salesforce-custom-object, salesforce-custom-field, salesforce-custom-tab, salesforce-flexipage, salesforce-custom-application, salesforce-flow, salesforce-validation-rule, salesforce-list-view
6+
version: "1.0"
7+
related-skills: salesforce-custom-object, salesforce-custom-field, salesforce-custom-tab, salesforce-flexipage, salesforce-custom-application, salesforce-flow, salesforce-validation-rule, salesforce-list-view, generate-permission-set
78
---
89

910
# Salesforce Lightning Application Build
1011

1112
## Overview
1213

13-
Build complete Lightning Experience applications from natural language by orchestrating multiple metadata types in proper dependency order. This skill acts as a "conductor" that invokes specialized metadata skills when available, or generates metadata directly when no skill exists.
14+
Build a complete, deployable Salesforce Lightning Experience application from a natural language description by orchestrating multiple metadata types in correct dependency order. Invoke specialized metadata skills when available; generate metadata directly when no skill exists.
1415

1516
## When to Use This Skill
1617
**Use when:**
@@ -34,7 +35,6 @@ Build complete Lightning Experience applications from natural language by orches
3435
- Troubleshooting or debugging existing metadata
3536
- Building Salesforce Classic apps (not Lightning Experience)
3637
- User asks for just one object, or just one page, or just one permission set (without others)
37-
---
3838

3939
## Metadata Type Registry
4040

@@ -50,7 +50,7 @@ This table shows which metadata types are commonly needed for LEX apps and their
5050
| **List View** | ✅ YES | `salesforce-list-view` | MUST use skill |
5151
| **Validation Rule** | ✅ YES | `salesforce-validation-rule` | MUST use skill (if requested) |
5252
| **Flow** | ✅ YES | `salesforce-flow` | MUST use skill (if requested) |
53-
| **Permission Set** | ❌ NO | - | Generate directly using Metadata API knowledge |
53+
| **Permission Set** | ✅ YES | `generate-permission-set` | MUST use skill |
5454

5555
### Skill Usage Rules
5656

@@ -115,8 +115,8 @@ Custom Application (depends on: Tabs exist)
115115
Permission Sets (depends on: Objects, Fields, Tabs, App exist)
116116
```
117117

118-
**Fallback generation (no skill available):**
119-
1. Generate Permission Set XML directly with access to:
118+
**Skills to invoke:**
119+
1. `generate-permission-set` for each permission set with access to:
120120
- Objects (Read, Create, Edit, Delete)
121121
- Fields (Read, Edit)
122122
- Tabs (Visible)
@@ -170,7 +170,7 @@ METADATA SKILLS TO INVOKE:
170170
- salesforce-custom-tab (x N)
171171
- salesforce-flexipage (x N)
172172
- salesforce-custom-application (x 1)
173-
- [fallback] Permission Set XML generation (x N)
173+
- generate-permission-set (x N)
174174
175175
DEPENDENCY ORDER:
176176
1. Phase 1: Data Model (Objects → Fields)
@@ -198,7 +198,99 @@ Execute in strict dependency order. For each metadata component:
198198
- For Custom Tab → Invoke `salesforce-custom-tab`
199199
- For FlexiPage → Invoke `salesforce-flexipage`
200200
- For Custom Application → Invoke `salesforce-custom-application`
201-
- For Permission Sets (no skill) → Generate XML directly
201+
- For Permission Set → Invoke `generate-permission-set`
202+
203+
### STEP 3: Final Artifact Assembly
204+
205+
After all phases complete, consolidate outputs into deployment-ready structure.
206+
207+
---
208+
209+
## Output
210+
211+
The completed build produces:
212+
213+
1. **Salesforce DX Project Directory** containing all generated metadata
214+
- Organized by standard SFDX structure: `force-app/main/default/`
215+
216+
2. **Metadata Files** - One file per component, organized by type:
217+
```
218+
force-app/main/default/
219+
├── objects/ # Custom Objects (.object-meta.xml)
220+
├── fields/ # Custom Fields (.field-meta.xml)
221+
├── tabs/ # Custom Tabs (.tab-meta.xml)
222+
├── flexipages/ # Lightning Pages (.flexipage-meta.xml)
223+
├── applications/ # Custom Applications (.app-meta.xml)
224+
├── permissionsets/ # Permission Sets (.permissionset-meta.xml)
225+
├── flows/ # Flows (.flow-meta.xml) - if applicable
226+
└── objects/.../validationRules/ # Validation Rules (.validationRule-meta.xml) - if applicable
227+
```
228+
229+
3. **Deployment Manifest** (`package.xml`)
230+
- Lists all components with proper API version
231+
- Organized by metadata type in dependency order
232+
- Ready for Salesforce CLI deployment or Metadata API deployment
233+
234+
4. **Build Summary Report** - A markdown file listing:
235+
- Every component created
236+
- Component type and API name
237+
- File path location
238+
- Dependency relationships
239+
- Any warnings or recommendations
240+
241+
**Example Summary Structure:**
242+
```
243+
📦 Lightning App Build Complete: Project Management App
244+
245+
METADATA GENERATED:
246+
✅ 3 Custom Objects
247+
- Project__c → force-app/main/default/objects/Project__c/Project__c.object-meta.xml
248+
- Task__c → force-app/main/default/objects/Task__c/Task__c.object-meta.xml
249+
- Resource__c → force-app/main/default/objects/Resource__c/Resource__c.object-meta.xml
250+
251+
✅ 12 Custom Fields
252+
- Project__c.Name → force-app/main/default/objects/Project__c/fields/Name.field-meta.xml
253+
- Project__c.Status__c → force-app/main/default/objects/Project__c/fields/Status__c.field-meta.xml
254+
[... etc ...]
255+
256+
✅ 3 Custom Tabs
257+
- Project__c → force-app/main/default/tabs/Project__c.tab-meta.xml
258+
[... etc ...]
259+
260+
✅ 3 Lightning Record Pages
261+
- Project_Record_Page → force-app/main/default/flexipages/Project_Record_Page.flexipage-meta.xml
262+
[... etc ...]
263+
264+
✅ 1 Custom Application
265+
- Project_Management → force-app/main/default/applications/Project_Management.app-meta.xml
266+
267+
✅ 2 Permission Sets
268+
- Project_Manager → force-app/main/default/permissionsets/Project_Manager.permissionset-meta.xml
269+
- Project_User → force-app/main/default/permissionsets/Project_User.permissionset-meta.xml
270+
271+
⚠️ WARNINGS: None
272+
```
273+
274+
---
275+
276+
## Validation
277+
278+
Before presenting the completed build to the user, verify cross-component integrity:
279+
280+
- [ ] **Object-Tab Coverage**: Every Custom Object has at least one Custom Tab
281+
- [ ] **Relationship Integrity**: Every Custom Object referenced in a relationship (parent or child) exists in the build
282+
- [ ] **Field References in Pages**: Every field referenced in a FlexiPage exists on the corresponding object
283+
- [ ] **Tab References in App**: Every tab referenced in the Custom Application was successfully created
284+
- [ ] **Permission Set Completeness**: Permission Sets grant access to all generated objects, fields, tabs, and the application
285+
- [ ] **No Orphaned Components**: No tabs without objects, no pages without corresponding tabs, no app without tabs
286+
- [ ] **Deployment Manifest Completeness**: `package.xml` includes all generated components in proper dependency order
287+
288+
**Validation Failure Handling:**
289+
- If validation fails, include failed checks in the Build Summary Report under a `⚠️ VALIDATION WARNINGS` section
290+
- Do NOT block delivery of the build, but clearly communicate what needs manual review or correction
291+
- Provide specific remediation steps for each failed validation check
292+
293+
**Note**: Individual component validations (reserved words, name lengths, field types, etc.) are handled by specialized metadata skills and do not need to be re-validated here.
202294

203295
---
204296

@@ -246,7 +338,7 @@ When user doesn't specify details:
246338
- Enable Search and Reports for user-facing objects
247339
- Set sharingModel based on relationships
248340

249-
### 5. Validate Before Building
341+
### 4. Validate Before Building
250342
Check for:
251343
- Reserved words in API names
252344
- Relationship limits (max 2 M-D per object)

0 commit comments

Comments
 (0)