@salesforce/afv-skills 1.1.0 → 1.3.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 +6 -5
- package/skills/accessing-webapp-data/SKILL.md +178 -0
- package/skills/agentforce-development/SKILL.md +427 -0
- package/skills/agentforce-development/assets/README-legacy.md +89 -0
- package/skills/agentforce-development/assets/agent-spec-template.md +90 -0
- package/skills/agentforce-development/assets/agents/README.md +45 -0
- package/skills/agentforce-development/assets/agents/hello-world.agent +60 -0
- package/skills/agentforce-development/assets/agents/multi-topic.agent +105 -0
- package/skills/agentforce-development/assets/agents/production-faq.agent +101 -0
- package/skills/agentforce-development/assets/agents/production-faq.bundle-meta.xml +4 -0
- package/skills/agentforce-development/assets/agents/simple-qa.agent +72 -0
- package/skills/agentforce-development/assets/apex/models-api-queueable.cls +225 -0
- package/skills/agentforce-development/assets/bundle-meta.xml +23 -0
- package/skills/agentforce-development/assets/components/apex-action.agent +52 -0
- package/skills/agentforce-development/assets/components/error-handling.agent +58 -0
- package/skills/agentforce-development/assets/components/escalation-setup.agent +169 -0
- package/skills/agentforce-development/assets/components/flow-action.agent +66 -0
- package/skills/agentforce-development/assets/components/n-ary-conditions.agent +110 -0
- package/skills/agentforce-development/assets/components/topic-with-actions.agent +40 -0
- package/skills/agentforce-development/assets/deterministic-routing.agent +166 -0
- package/skills/agentforce-development/assets/escalation-pattern.agent +209 -0
- package/skills/agentforce-development/assets/flow-action-lookup.agent +115 -0
- package/skills/agentforce-development/assets/hub-and-spoke.agent +104 -0
- package/skills/agentforce-development/assets/invocable-apex-template.cls +187 -0
- package/skills/agentforce-development/assets/local-info-agent-annotated.agent +355 -0
- package/skills/agentforce-development/assets/metadata/basic-prompt-template.promptTemplate-meta.xml +109 -0
- package/skills/agentforce-development/assets/metadata/genai-function-apex.xml +92 -0
- package/skills/agentforce-development/assets/metadata/genai-function-flow.xml +57 -0
- package/skills/agentforce-development/assets/metadata/genai-plugin.xml +72 -0
- package/skills/agentforce-development/assets/metadata/http-callout-flow.flow-meta.xml +348 -0
- package/skills/agentforce-development/assets/metadata/record-grounded-prompt.promptTemplate-meta.xml +136 -0
- package/skills/agentforce-development/assets/minimal-starter.agent +42 -0
- package/skills/agentforce-development/assets/patterns/README.md +254 -0
- package/skills/agentforce-development/assets/patterns/action-callbacks.agent +178 -0
- package/skills/agentforce-development/assets/patterns/advanced-input-bindings.agent +141 -0
- package/skills/agentforce-development/assets/patterns/bidirectional-routing.agent +156 -0
- package/skills/agentforce-development/assets/patterns/critical-input-collection.agent +244 -0
- package/skills/agentforce-development/assets/patterns/delegation-routing.agent +89 -0
- package/skills/agentforce-development/assets/patterns/lifecycle-events.agent +127 -0
- package/skills/agentforce-development/assets/patterns/llm-controlled-actions.agent +184 -0
- package/skills/agentforce-development/assets/patterns/multi-step-workflow.agent +282 -0
- package/skills/agentforce-development/assets/patterns/open-gate-routing.agent +286 -0
- package/skills/agentforce-development/assets/patterns/procedural-instructions.agent +273 -0
- package/skills/agentforce-development/assets/patterns/prompt-template-action.agent +188 -0
- package/skills/agentforce-development/assets/patterns/system-instruction-overrides.agent +293 -0
- package/skills/agentforce-development/assets/prompt-rag-search.agent +131 -0
- package/skills/agentforce-development/assets/template-multi-topic.agent +160 -0
- package/skills/agentforce-development/assets/template-single-topic.agent +81 -0
- package/skills/agentforce-development/assets/verification-gate.agent +208 -0
- package/skills/agentforce-development/references/action-prompt-templates.md +164 -0
- package/skills/agentforce-development/references/actions-reference.md +592 -0
- package/skills/agentforce-development/references/agent-access-guide.md +72 -0
- package/skills/agentforce-development/references/agent-design-and-spec-creation.md +1010 -0
- package/skills/agentforce-development/references/agent-metadata-and-lifecycle.md +575 -0
- package/skills/agentforce-development/references/agent-script-core-language.md +1218 -0
- package/skills/agentforce-development/references/agent-topic-map-diagrams.md +323 -0
- package/skills/agentforce-development/references/agent-user-setup.md +526 -0
- package/skills/agentforce-development/references/agent-validation-and-debugging.md +803 -0
- package/skills/agentforce-development/references/known-issues.md +353 -0
- package/skills/agentforce-development/references/minimal-examples.md +67 -0
- package/skills/agentforce-development/references/production-gotchas.md +279 -0
- package/skills/agentforce-development/references/salesforce-cli-for-agents.md +393 -0
- package/skills/agentforce-development/references/version-history.md +23 -0
- package/skills/building-webapp-data-visualization/SKILL.md +72 -0
- package/skills/building-webapp-data-visualization/implementation/bar-line-chart.md +316 -0
- package/skills/building-webapp-data-visualization/implementation/dashboard-layout.md +189 -0
- package/skills/building-webapp-data-visualization/implementation/donut-chart.md +181 -0
- package/skills/building-webapp-data-visualization/implementation/stat-card.md +150 -0
- package/skills/building-webapp-react-components/SKILL.md +96 -0
- package/skills/building-webapp-react-components/implementation/component.md +78 -0
- package/skills/building-webapp-react-components/implementation/header-footer.md +132 -0
- package/skills/building-webapp-react-components/implementation/page.md +93 -0
- package/skills/configuring-webapp-csp-trusted-sites/SKILL.md +90 -0
- package/skills/configuring-webapp-csp-trusted-sites/implementation/metadata-format.md +281 -0
- package/skills/configuring-webapp-metadata/SKILL.md +158 -0
- package/skills/creating-webapp/SKILL.md +141 -0
- package/skills/deploying-webapp-to-salesforce/SKILL.md +229 -0
- package/skills/exploring-webapp-graphql-schema/SKILL.md +149 -0
- package/skills/fetching-webapp-rest-api/SKILL.md +167 -0
- package/skills/{salesforce-custom-application → generating-custom-application}/SKILL.md +2 -4
- package/skills/{salesforce-custom-field → generating-custom-field}/SKILL.md +1 -5
- package/skills/{salesforce-custom-lightning-type → generating-custom-lightning-type}/SKILL.md +36 -2
- package/skills/{salesforce-custom-object → generating-custom-object}/SKILL.md +1 -1
- package/skills/generating-custom-tab/SKILL.md +154 -0
- package/skills/generating-experience-lwr-site/SKILL.md +196 -0
- package/skills/generating-experience-lwr-site/docs/bootstrap-template-byo-lwr.md +224 -0
- package/skills/generating-experience-lwr-site/docs/configure-content-brandingSet.md +131 -0
- package/skills/generating-experience-lwr-site/docs/configure-content-route.md +232 -0
- package/skills/generating-experience-lwr-site/docs/configure-content-themeLayout.md +141 -0
- package/skills/generating-experience-lwr-site/docs/configure-content-view.md +233 -0
- package/skills/generating-experience-lwr-site/docs/configure-guest-sharing-rules.md +42 -0
- package/skills/generating-experience-lwr-site/docs/handle-component-and-region-ids.md +27 -0
- package/skills/generating-experience-lwr-site/docs/handle-ui-components.md +215 -0
- package/skills/generating-experience-react-site/SKILL.md +67 -0
- package/skills/generating-experience-react-site/docs/configure-metadata-custom-site.md +41 -0
- package/skills/generating-experience-react-site/docs/configure-metadata-digital-experience-bundle.md +17 -0
- package/skills/generating-experience-react-site/docs/configure-metadata-digital-experience-config.md +21 -0
- package/skills/generating-experience-react-site/docs/configure-metadata-digital-experience.md +38 -0
- package/skills/generating-experience-react-site/docs/configure-metadata-network.md +72 -0
- package/skills/{salesforce-flexipage → generating-flexipage}/SKILL.md +86 -9
- package/skills/{salesforce-flow → generating-flow}/SKILL.md +3 -3
- package/skills/generating-fragment/SKILL.md +117 -0
- package/skills/generating-lightning-app/SKILL.md +423 -0
- package/skills/{salesforce-list-view → generating-list-view}/SKILL.md +1 -1
- package/skills/generating-permission-set/SKILL.md +174 -0
- package/skills/{salesforce-validation-rule → generating-validation-rule}/SKILL.md +1 -1
- package/skills/generating-webapp-graphql-mutation-query/SKILL.md +258 -0
- package/skills/generating-webapp-graphql-read-query/SKILL.md +253 -0
- package/skills/implementing-webapp-file-upload/SKILL.md +396 -0
- package/skills/installing-webapp-features/SKILL.md +210 -0
- package/skills/managing-webapp-agentforce-conversation-client/SKILL.md +186 -0
- package/skills/managing-webapp-agentforce-conversation-client/references/constraints.md +134 -0
- package/skills/managing-webapp-agentforce-conversation-client/references/examples.md +132 -0
- package/skills/managing-webapp-agentforce-conversation-client/references/style-tokens.md +101 -0
- package/skills/managing-webapp-agentforce-conversation-client/references/troubleshooting.md +57 -0
- package/skills/switching-org/SKILL.md +28 -0
- package/skills/using-webapp-graphql/SKILL.md +324 -0
- package/skills/using-webapp-graphql/shared-schema.graphqls +1150 -0
- package/skills/apex-class/SKILL.md +0 -253
- package/skills/apex-class/examples/AccountDeduplicationBatch.cls +0 -148
- package/skills/apex-class/examples/AccountSelector.cls +0 -193
- package/skills/apex-class/examples/AccountService.cls +0 -201
- package/skills/apex-class/templates/abstract.cls +0 -128
- package/skills/apex-class/templates/batch.cls +0 -125
- package/skills/apex-class/templates/domain.cls +0 -102
- package/skills/apex-class/templates/dto.cls +0 -108
- package/skills/apex-class/templates/exception.cls +0 -51
- package/skills/apex-class/templates/interface.cls +0 -25
- package/skills/apex-class/templates/queueable.cls +0 -92
- package/skills/apex-class/templates/schedulable.cls +0 -75
- package/skills/apex-class/templates/selector.cls +0 -92
- package/skills/apex-class/templates/service.cls +0 -69
- package/skills/apex-class/templates/utility.cls +0 -97
- package/skills/apex-test-class/SKILL.md +0 -101
- package/skills/apex-test-class/references/assertion-patterns.md +0 -209
- package/skills/apex-test-class/references/async-testing.md +0 -276
- package/skills/apex-test-class/references/mocking-patterns.md +0 -219
- package/skills/apex-test-class/references/test-data-factory.md +0 -176
- package/skills/deployment-readiness-check/SKILL.md +0 -257
- package/skills/deployment-readiness-check/assets/deployment_checklist.md +0 -286
- package/skills/deployment-readiness-check/references/rollback_procedures.md +0 -308
- package/skills/deployment-readiness-check/scripts/check_metadata.sh +0 -207
- package/skills/salesforce-custom-tab/SKILL.md +0 -78
- package/skills/salesforce-experience-site/SKILL.md +0 -178
- package/skills/salesforce-fragment/SKILL.md +0 -42
- package/skills/salesforce-lightning-app-build/SKILL.md +0 -254
- package/skills/salesforce-web-app-creating-records/SKILL.md +0 -84
- package/skills/salesforce-web-app-feature/SKILL.md +0 -70
- package/skills/salesforce-web-app-list-and-create-records/SKILL.md +0 -36
- package/skills/salesforce-web-application/SKILL.md +0 -34
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: generating-fragment
|
|
3
|
+
description: Use this skill when users need to create or edit Salesforce Fragments (reusable UI pieces). Trigger when users mention fragments, UEM blocks, reusable UI templates, structured rendering across Slack/Mobile/LEX, or block-based layouts. Also use when users want to create unified experience components. Always use this skill for any fragment work.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## When to Use This Skill
|
|
7
|
+
|
|
8
|
+
Use this skill when you need to:
|
|
9
|
+
- Create reusable UI fragments for Salesforce experiences
|
|
10
|
+
- Generate Fragment metadata following UEM structure
|
|
11
|
+
- Build fragments for Slack, Mobile, LEX, and other Salesforce experiences
|
|
12
|
+
- Troubleshoot deployment errors related to Fragments
|
|
13
|
+
|
|
14
|
+
## Specification
|
|
15
|
+
|
|
16
|
+
# Fragment Generation Guide
|
|
17
|
+
|
|
18
|
+
## 📋 Overview
|
|
19
|
+
Fragments are reusable pieces of UI similar to templates, with placeholders for actual data values. The purpose of this file is to assist developers in creating and editing fragments.
|
|
20
|
+
|
|
21
|
+
## 🎯 Purpose
|
|
22
|
+
Fragments render data in a structured and unified way across various Salesforce experiences like Slack, Mobile, LEX etc
|
|
23
|
+
|
|
24
|
+
## ⚙️ Composition
|
|
25
|
+
A fragment is a UEM (Unified Experience Model) tree of blocks and regions. The fragment you return must follow the Typescript interfaces below:
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
interface BlockType {
|
|
29
|
+
type: 'block'
|
|
30
|
+
definition: string // {namespace}/{blockName}
|
|
31
|
+
attributes?: Record<string, any>
|
|
32
|
+
children?: (BlockType | RegionType)[]
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
interface RegionType {
|
|
36
|
+
type: 'region'
|
|
37
|
+
name: string
|
|
38
|
+
children: BlockType[]
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## 🔧 Available Metadata Actions
|
|
45
|
+
|
|
46
|
+
### When to Use Each Action
|
|
47
|
+
|
|
48
|
+
#### discoverUiComponents
|
|
49
|
+
|
|
50
|
+
**When:** You want to see what block components are available for fragments.
|
|
51
|
+
|
|
52
|
+
**Purpose:** Discover the palette of available blocks that can be used in fragment composition.
|
|
53
|
+
|
|
54
|
+
**Input Parameters:**
|
|
55
|
+
- `pageType` (required): "FRAGMENT"
|
|
56
|
+
- `pageContext` (optional): JSON object - not required for FRAGMENT type
|
|
57
|
+
- `searchQuery` (optional): String to filter components by name or description
|
|
58
|
+
|
|
59
|
+
**Returns:** List of components with:
|
|
60
|
+
- `definition`: Fully qualified name (e.g., "namespace/definiton")
|
|
61
|
+
- `description`: Component description
|
|
62
|
+
- `label`: Human-readable label
|
|
63
|
+
- `attributes`: Optional attribute metadata
|
|
64
|
+
|
|
65
|
+
**Use for:** Finding available blocks before building your fragment structure.
|
|
66
|
+
|
|
67
|
+
#### getUiComponentSchemas
|
|
68
|
+
|
|
69
|
+
**When:** You know which components you want but need to understand their properties and attributes.
|
|
70
|
+
|
|
71
|
+
**Purpose:** Get detailed JSON schemas for component configuration, including property types, required vs optional fields, and validation rules.
|
|
72
|
+
|
|
73
|
+
**Input Parameters:**
|
|
74
|
+
- `pageType` (required): "FRAGMENT"
|
|
75
|
+
- `pageContext` (optional): JSON object - not required for FRAGMENT type
|
|
76
|
+
- `componentDefinitions` (required): List of fully qualified names (e.g., ["namespace/definition"])
|
|
77
|
+
- `includeKnowledge` (optional): Boolean, defaults to true - includes additional component-specific guidance
|
|
78
|
+
|
|
79
|
+
**Returns:**
|
|
80
|
+
- `componentSchemas`: List of results (supports partial failures)
|
|
81
|
+
- **Success entries**: Contains JSON schema with property definitions, types, constraints
|
|
82
|
+
- **Failure entries**: Contains error message explaining why schema couldn't be retrieved
|
|
83
|
+
- `$defs`: Schema definitions and references (if schema transformation applied)
|
|
84
|
+
|
|
85
|
+
**Use for:** Understanding how to configure component attributes before adding blocks to your fragment.
|
|
86
|
+
|
|
87
|
+
**Key Feature:** Supports partial failures - if some components can't be found, you still get schemas for the successful ones.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## 💡 Typical Workflow
|
|
92
|
+
|
|
93
|
+
1. **Discover Available Blocks**
|
|
94
|
+
- Use `discoverUiComponents` to explore what blocks are available
|
|
95
|
+
- Optional: Use `searchQuery` to filter by keywords (e.g., "text", "button", "image")
|
|
96
|
+
|
|
97
|
+
2. **Select Components**
|
|
98
|
+
- Choose blocks that fit your fragment requirements
|
|
99
|
+
- Note their fully qualified definitions (e.g., "namespace/definition")
|
|
100
|
+
|
|
101
|
+
3. **Get Component Schemas**
|
|
102
|
+
- Use `getUiComponentSchemas` with the selected component definitions
|
|
103
|
+
- Review the JSON schemas to understand required and optional attributes
|
|
104
|
+
|
|
105
|
+
4. **Build Fragment**
|
|
106
|
+
- Construct your fragment using the UEM tree structure
|
|
107
|
+
- Configure block attributes according to the schemas
|
|
108
|
+
- Use the TypeScript interfaces defined above
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## ⚠️ Important Notes
|
|
113
|
+
|
|
114
|
+
- Block definitions always follow the `{namespace}/{blockName}` convention
|
|
115
|
+
- Use the same definition format returned by `discoverUiComponents` when calling `getUiComponentSchemas`
|
|
116
|
+
- The FRAGMENT page type doesn't require additional `pageContext` parameters
|
|
117
|
+
- Schemas include both required and optional attributes - review carefully to ensure valid configuration
|
|
@@ -0,0 +1,423 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: generating-lightning-app
|
|
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.
|
|
4
|
+
metadata:
|
|
5
|
+
version: "1.0"
|
|
6
|
+
related-skills: generating-custom-object, generating-custom-field, generating-custom-tab, generating-flexipage, generating-custom-application, generating-flow, generating-validation-rule, generating-list-view, generating-permission-set
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Generating Lightning App
|
|
10
|
+
|
|
11
|
+
## Overview
|
|
12
|
+
|
|
13
|
+
Build a complete, deployable Salesforce Lightning Experience application from a natural language description by defining a Lightning Custom Application and orchestrating its dependent metadata types in correct dependency order. Invoke specialized metadata skills when available; generate metadata directly when no skill exists.
|
|
14
|
+
|
|
15
|
+
## When to Use This Skill
|
|
16
|
+
|
|
17
|
+
**Use when:**
|
|
18
|
+
|
|
19
|
+
- User requests a "Lightning app", or "end-to-end solution"
|
|
20
|
+
- User says "build an app", "create an application", "build a [type] app" (project management, tracking, etc.)
|
|
21
|
+
- The work produces a custom app (CustomApplication) plus supporting metadata, not a lone object, page, or tab in isolation
|
|
22
|
+
|
|
23
|
+
**Examples that should trigger this skill:**
|
|
24
|
+
|
|
25
|
+
- "Build a project management lightning app with Tasks, Resources, and Supplies objects"
|
|
26
|
+
- "Create a LEX app to track vehicles with Lightning pages and permission sets"
|
|
27
|
+
- "I need a Space Station management system with multiple objects and relationships"
|
|
28
|
+
- "Build an employee onboarding lightning app with custom Lightning Record Pages"
|
|
29
|
+
|
|
30
|
+
**Do NOT use when:**
|
|
31
|
+
|
|
32
|
+
- Creating a single metadata component (use specific metadata skill instead)
|
|
33
|
+
- Troubleshooting or debugging existing metadata
|
|
34
|
+
- Building Salesforce Classic apps (not Lightning Experience)
|
|
35
|
+
- User asks for just one object, or just one page, or just one permission set (without others)
|
|
36
|
+
- User only needs to create or configure an app container (grouping existing tabs) without other metadata; use `generating-custom-application` instead
|
|
37
|
+
|
|
38
|
+
## Metadata Type Registry
|
|
39
|
+
|
|
40
|
+
This table shows which metadata types are commonly needed for Lightning Experience apps, their skill availability, and API context requirement.
|
|
41
|
+
|
|
42
|
+
| Metadata Type | Skill Name | API Context | Usage Rule |
|
|
43
|
+
|---------------|------------|-------------|------------|
|
|
44
|
+
| **Custom Object** | `generating-custom-object` | `salesforce-api-context` | MUST load skill AND call API context |
|
|
45
|
+
| **Custom Field** | `generating-custom-field` | `salesforce-api-context` | MUST load skill AND call API context |
|
|
46
|
+
| **Custom Tab** | `generating-custom-tab` | `salesforce-api-context` | MUST load skill AND call API context |
|
|
47
|
+
| **FlexiPage** | `generating-flexipage` | `salesforce-api-context` | MUST load skill AND call API context |
|
|
48
|
+
| **Custom Application** | `generating-custom-application` | `salesforce-api-context` | MUST load skill AND call API context |
|
|
49
|
+
| **List View** | `generating-list-view` | `salesforce-api-context` | MUST load skill AND call API context (if requested) |
|
|
50
|
+
| **Validation Rule** | `generating-validation-rule` | `salesforce-api-context` | MUST load skill AND call API context (if requested) |
|
|
51
|
+
| **Flow** | `generating-flow` | `metadata-experts` pipeline | MUST load skill AND run pipeline. **Exempt from `salesforce-api-context`**. |
|
|
52
|
+
| **Permission Set** | `generating-permission-set` | `salesforce-api-context` | MUST load skill AND call API context |
|
|
53
|
+
|
|
54
|
+
### Usage Rules
|
|
55
|
+
|
|
56
|
+
**SKILL RULE**: When a skill exists for a metadata type, you **MUST** load that skill. Do NOT generate metadata directly without loading the skill first.
|
|
57
|
+
|
|
58
|
+
**API CONTEXT RULE**: For every metadata type (except Flow), you **MUST** call `salesforce-api-context` tools before generating. Do NOT generate metadata without calling API context first. The skill provides structure and rules; API context confirms what is valid for the current API version. Both are essential.
|
|
59
|
+
|
|
60
|
+
**FALLBACK RULE**: When no skill exists for a metadata type you need, generate the metadata directly using your knowledge of Salesforce Metadata API and best practices. API context is still required.
|
|
61
|
+
|
|
62
|
+
**RATIONALE**: Skills contain validated patterns and constraints. API context provides version-specific accuracy. Together they prevent deployment failures.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Dependency Graph & Build Order
|
|
67
|
+
|
|
68
|
+
### Phase 1: Data Model (Foundation)
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
Custom Objects (no dependencies)
|
|
72
|
+
↓
|
|
73
|
+
Custom Fields (depends on: Objects exist)
|
|
74
|
+
↓
|
|
75
|
+
Relationships (depends on: Both parent and child objects + fields exist)
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
**Metadata types in this phase:**
|
|
79
|
+
|
|
80
|
+
1. `generating-custom-object` - once, with all objects
|
|
81
|
+
2. `generating-custom-field` - once, with all fields (including Master-Detail, Lookup, Roll-up Summary)
|
|
82
|
+
|
|
83
|
+
### Phase 2: Business Logic (Optional - only if requested)
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
Validation Rules (depends on: Fields exist)
|
|
87
|
+
↓
|
|
88
|
+
Flows (depends on: Objects, Fields exist)
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
**Metadata types in this phase (only if user requested):**
|
|
92
|
+
|
|
93
|
+
1. `generating-validation-rule` - once, if validation requirements mentioned
|
|
94
|
+
2. `generating-flow` - once, if automation/workflow requirements mentioned
|
|
95
|
+
|
|
96
|
+
### Phase 3: User Interface
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
List Views (depends on: Objects, Fields exist)
|
|
100
|
+
↓
|
|
101
|
+
Custom Tabs (depends on: Objects exist)
|
|
102
|
+
↓
|
|
103
|
+
FlexiPages (depends on: Objects, Tabs exist)
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
**Metadata types in this phase:**
|
|
107
|
+
|
|
108
|
+
1. `generating-list-view` - once, for filtered record views (if requested)
|
|
109
|
+
2. `generating-custom-tab` - once, with all object tabs
|
|
110
|
+
3. `generating-flexipage` - once, with all record/home/app pages
|
|
111
|
+
|
|
112
|
+
### Phase 4: Application Assembly
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
Custom Application (depends on: Tabs exist)
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
**Metadata types in this phase:**
|
|
119
|
+
|
|
120
|
+
1. `generating-custom-application` - once, to create the Lightning App container
|
|
121
|
+
|
|
122
|
+
### Phase 5: Security & Access
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
Permission Sets (depends on: Objects, Fields, Tabs, App exist)
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
**Metadata types in this phase:**
|
|
129
|
+
|
|
130
|
+
1. `generating-permission-set` - once, with all permission sets and access to:
|
|
131
|
+
- Objects (Read, Create, Edit, Delete)
|
|
132
|
+
- Fields (Read, Edit)
|
|
133
|
+
- Tabs (Visible)
|
|
134
|
+
- Custom Application (Visible)
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Execution Workflow
|
|
139
|
+
|
|
140
|
+
### STEP 1: Requirements Analysis & Planning
|
|
141
|
+
|
|
142
|
+
**Actions:**
|
|
143
|
+
|
|
144
|
+
1. Parse user's natural language request
|
|
145
|
+
2. Extract business entities (become Custom Objects)
|
|
146
|
+
3. Extract attributes/properties (become Custom Fields)
|
|
147
|
+
4. Identify relationships (Master-Detail, Lookup)
|
|
148
|
+
5. Detect validation requirements (become Validation Rules)
|
|
149
|
+
6. Detect automation requirements (become Flows)
|
|
150
|
+
7. Identify user personas (inform Permission Sets)
|
|
151
|
+
|
|
152
|
+
**Output: Build Plan**
|
|
153
|
+
|
|
154
|
+
Generate a structured plan listing:
|
|
155
|
+
|
|
156
|
+
```
|
|
157
|
+
Lightning App Build Plan: [App Name]
|
|
158
|
+
|
|
159
|
+
DATA MODEL:
|
|
160
|
+
- Custom Objects: [list with object names]
|
|
161
|
+
- Custom Fields: [list grouped by object]
|
|
162
|
+
- Relationships: [list M-D and Lookup relationships]
|
|
163
|
+
|
|
164
|
+
BUSINESS LOGIC (if applicable):
|
|
165
|
+
- Validation Rules: [list with object and rule name]
|
|
166
|
+
- Flows: [list with flow name and type]
|
|
167
|
+
|
|
168
|
+
USER INTERFACE:
|
|
169
|
+
- List Views (if requested): [list with object and view name]
|
|
170
|
+
- Custom Tabs: [list with object]
|
|
171
|
+
- FlexiPages: [list with page name and type]
|
|
172
|
+
- Custom Application: [app name]
|
|
173
|
+
|
|
174
|
+
SECURITY:
|
|
175
|
+
- Permission Sets: [list with purpose]
|
|
176
|
+
|
|
177
|
+
PER-TYPE EXECUTION (skill + API context for each):
|
|
178
|
+
- CustomObject: load generating-custom-object + call salesforce-api-context
|
|
179
|
+
- CustomField: load generating-custom-field + call salesforce-api-context
|
|
180
|
+
- ValidationRule: load generating-validation-rule + call salesforce-api-context (if requested)
|
|
181
|
+
- Flow: load generating-flow + run metadata-experts pipeline (if requested)
|
|
182
|
+
- ListView: load generating-list-view + call salesforce-api-context (if requested)
|
|
183
|
+
- CustomTab: load generating-custom-tab + call salesforce-api-context
|
|
184
|
+
- FlexiPage: load generating-flexipage + call salesforce-api-context
|
|
185
|
+
- CustomApplication: load generating-custom-application + call salesforce-api-context
|
|
186
|
+
- PermissionSet: load generating-permission-set + call salesforce-api-context
|
|
187
|
+
|
|
188
|
+
STATUS LINES TO EMIT BEFORE FILE WRITES:
|
|
189
|
+
- `type=<Type> skill=complete mcp=complete|unavailable mcp_tools=<tool-list|none>`
|
|
190
|
+
- Flow exception: `type=Flow skill=complete pipeline=complete`
|
|
191
|
+
|
|
192
|
+
DEPENDENCY ORDER:
|
|
193
|
+
1. Phase 1: Data Model (Objects -> Fields)
|
|
194
|
+
2. Phase 2: Business Logic (Validation Rules -> Flows)
|
|
195
|
+
3. Phase 3: User Interface (List Views -> Tabs -> Pages)
|
|
196
|
+
4. Phase 4: App Assembly (Application)
|
|
197
|
+
5. Phase 5: Security (Permission Sets)
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### STEP 2: Per-Type Execution
|
|
201
|
+
|
|
202
|
+
Execute these four steps for each metadata type, one type at a time. Complete all four steps for the current type before moving to the next type. Do NOT skip any step.
|
|
203
|
+
|
|
204
|
+
| Step | What to do | Why |
|
|
205
|
+
|------|-----------|-----|
|
|
206
|
+
| **① Load skill** | Search for and read the per-type SKILL.md | Gives you the XML structure, required elements, naming rules, and validation constraints |
|
|
207
|
+
| **② Call API context** | Call `salesforce-api-context` tools for this metadata type using one or more of: `get_metadata_type_sections`, `get_metadata_type_context`, `get_metadata_type_fields`, `get_metadata_type_fields_properties`, `search_metadata_types` | Gives you the current valid values — allowed enum values, required vs. optional fields, child types for this API version. The skill provides structure; API context provides version-specific accuracy. |
|
|
208
|
+
| **③ Record status** | Emit: `type=<Type> skill=complete mcp=complete\|unavailable mcp_tools=<tool-list\|none>` | Confirms both steps were attempted before any files are written and records which API context tools were used |
|
|
209
|
+
| **④ Generate files** | Generate all files for this type, then checkpoint | Only after ①②③ are done. Verify, then move to the next type. |
|
|
210
|
+
|
|
211
|
+
**Do NOT combine ① and ② into a single action or skip ② after completing ①.** They are separate steps that serve different purposes. After loading the skill you may feel ready to generate — stop and do ② first.
|
|
212
|
+
|
|
213
|
+
If `salesforce-api-context` is unavailable after a real attempt, record `mcp=unavailable` and generate using skill knowledge alone. Not attempting ② at all is a bug.
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
**1. Custom Objects**
|
|
218
|
+
- ① Load skill: Read `generating-custom-object` SKILL.md
|
|
219
|
+
- ② API context: Call `salesforce-api-context` for CustomObject
|
|
220
|
+
- ③ Status: `type=CustomObject skill=complete mcp=complete|unavailable mcp_tools=<tool-list|none>`
|
|
221
|
+
- ④ Generate + Checkpoint: Generate all Custom Object files, then proceed to #2
|
|
222
|
+
|
|
223
|
+
**2. Custom Fields**
|
|
224
|
+
- ① Load skill: Read `generating-custom-field` SKILL.md
|
|
225
|
+
- ② API context: Call `salesforce-api-context` for CustomField
|
|
226
|
+
- ③ Status: `type=CustomField skill=complete mcp=complete|unavailable mcp_tools=<tool-list|none>`
|
|
227
|
+
- ④ Generate + Checkpoint: Generate all Custom Field files, then proceed to #3
|
|
228
|
+
|
|
229
|
+
**3. Validation Rules** (only if requested)
|
|
230
|
+
- ① Load skill: Read `generating-validation-rule` SKILL.md
|
|
231
|
+
- ② API context: Call `salesforce-api-context` for ValidationRule
|
|
232
|
+
- ③ Status: `type=ValidationRule skill=complete mcp=complete|unavailable mcp_tools=<tool-list|none>`
|
|
233
|
+
- ④ Generate + Checkpoint: Generate all Validation Rule files, then proceed to #4
|
|
234
|
+
|
|
235
|
+
**4. Flows** (only if requested)
|
|
236
|
+
- ① Load skill: Read `generating-flow` SKILL.md
|
|
237
|
+
- ② Pipeline: Run `metadata-experts/execute_metadata_action` 3-step pipeline (exempt from `salesforce-api-context`)
|
|
238
|
+
- ③ Status: `type=Flow skill=complete pipeline=complete`
|
|
239
|
+
- ④ Generate + Checkpoint: Generate all Flow files via the pipeline, then proceed to #5
|
|
240
|
+
|
|
241
|
+
**5. List Views** (only if requested)
|
|
242
|
+
- ① Load skill: Read `generating-list-view` SKILL.md
|
|
243
|
+
- ② API context: Call `salesforce-api-context` for ListView
|
|
244
|
+
- ③ Status: `type=ListView skill=complete mcp=complete|unavailable mcp_tools=<tool-list|none>`
|
|
245
|
+
- ④ Generate + Checkpoint: Generate all List View files, then proceed to #6
|
|
246
|
+
|
|
247
|
+
**6. Custom Tabs**
|
|
248
|
+
- ① Load skill: Read `generating-custom-tab` SKILL.md
|
|
249
|
+
- ② API context: Call `salesforce-api-context` for CustomTab
|
|
250
|
+
- ③ Status: `type=CustomTab skill=complete mcp=complete|unavailable mcp_tools=<tool-list|none>`
|
|
251
|
+
- ④ Generate + Checkpoint: Generate all Custom Tab files, then proceed to #7
|
|
252
|
+
|
|
253
|
+
**7. FlexiPages**
|
|
254
|
+
- ① Load skill: Read `generating-flexipage` SKILL.md
|
|
255
|
+
- ② API context: Call `salesforce-api-context` for FlexiPage
|
|
256
|
+
- ③ Status: `type=FlexiPage skill=complete mcp=complete|unavailable mcp_tools=<tool-list|none>`
|
|
257
|
+
- ④ Generate + Checkpoint: Generate all FlexiPage files, then proceed to #8
|
|
258
|
+
|
|
259
|
+
**8. Custom Application**
|
|
260
|
+
- ① Load skill: Read `generating-custom-application` SKILL.md
|
|
261
|
+
- ② API context: Call `salesforce-api-context` for CustomApplication
|
|
262
|
+
- ③ Status: `type=CustomApplication skill=complete mcp=complete|unavailable mcp_tools=<tool-list|none>`
|
|
263
|
+
- ④ Generate + Checkpoint: Generate the Custom Application file, then proceed to #9
|
|
264
|
+
|
|
265
|
+
**9. Permission Sets**
|
|
266
|
+
- ① Load skill: Read `generating-permission-set` SKILL.md
|
|
267
|
+
- ② API context: Call `salesforce-api-context` for PermissionSet
|
|
268
|
+
- ③ Status: `type=PermissionSet skill=complete mcp=complete|unavailable mcp_tools=<tool-list|none>`
|
|
269
|
+
- ④ Generate + Checkpoint: Generate all Permission Set files — all types complete
|
|
270
|
+
|
|
271
|
+
### STEP 3: Final Artifact Assembly
|
|
272
|
+
|
|
273
|
+
After all phases complete, consolidate outputs into deployment-ready structure.
|
|
274
|
+
|
|
275
|
+
---
|
|
276
|
+
|
|
277
|
+
## Output
|
|
278
|
+
|
|
279
|
+
The completed build produces:
|
|
280
|
+
|
|
281
|
+
1. **Salesforce DX Project Directory** containing all generated metadata
|
|
282
|
+
- Organized by standard SFDX structure: `force-app/main/default/`
|
|
283
|
+
2. **Metadata Files** - One file per component, organized by type:
|
|
284
|
+
|
|
285
|
+
```
|
|
286
|
+
force-app/main/default/
|
|
287
|
+
├── objects/ # Custom Objects (.object-meta.xml)
|
|
288
|
+
├── fields/ # Custom Fields (.field-meta.xml)
|
|
289
|
+
├── tabs/ # Custom Tabs (.tab-meta.xml)
|
|
290
|
+
├── flexipages/ # Lightning Pages (.flexipage-meta.xml)
|
|
291
|
+
├── applications/ # Custom Applications (.app-meta.xml)
|
|
292
|
+
├── permissionsets/ # Permission Sets (.permissionset-meta.xml)
|
|
293
|
+
├── flows/ # Flows (.flow-meta.xml) - if applicable
|
|
294
|
+
└── objects/.../validationRules/ # Validation Rules (.validationRule-meta.xml) - if applicable
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
3. **Deployment Manifest** (`package.xml`)
|
|
298
|
+
- Lists all components with proper API version
|
|
299
|
+
- Organized by metadata type in dependency order
|
|
300
|
+
- Ready for Salesforce CLI deployment or Metadata API deployment
|
|
301
|
+
4. **Build Summary Report** - A markdown file listing:
|
|
302
|
+
- Every component created
|
|
303
|
+
- Component type and API name
|
|
304
|
+
- File path location
|
|
305
|
+
- Dependency relationships
|
|
306
|
+
- Any warnings or recommendations
|
|
307
|
+
|
|
308
|
+
**Example Summary Structure:**
|
|
309
|
+
|
|
310
|
+
```
|
|
311
|
+
Lightning App Build Complete: Project Management App
|
|
312
|
+
|
|
313
|
+
METADATA GENERATED:
|
|
314
|
+
1 Custom Objects
|
|
315
|
+
- Project__c -> force-app/main/default/objects/Project__c/Project__c.object-meta.xml
|
|
316
|
+
- Task__c -> force-app/main/default/objects/Task__c/Task__c.object-meta.xml
|
|
317
|
+
- Resource__c -> force-app/main/default/objects/Resource__c/Resource__c.object-meta.xml
|
|
318
|
+
|
|
319
|
+
2 Custom Fields
|
|
320
|
+
- Project__c.Name -> force-app/main/default/objects/Project__c/fields/Name.field-meta.xml
|
|
321
|
+
- Project__c.Status__c -> force-app/main/default/objects/Project__c/fields/Status__c.field-meta.xml
|
|
322
|
+
[... etc ...]
|
|
323
|
+
|
|
324
|
+
3 Custom Tabs
|
|
325
|
+
- Project__c -> force-app/main/default/tabs/Project__c.tab-meta.xml
|
|
326
|
+
[... etc ...]
|
|
327
|
+
|
|
328
|
+
4 Lightning Record Pages
|
|
329
|
+
- Project_Record_Page -> force-app/main/default/flexipages/Project_Record_Page.flexipage-meta.xml
|
|
330
|
+
[... etc ...]
|
|
331
|
+
|
|
332
|
+
5 Custom Application
|
|
333
|
+
- Project_Management -> force-app/main/default/applications/Project_Management.app-meta.xml
|
|
334
|
+
|
|
335
|
+
6 Permission Sets
|
|
336
|
+
- Project_Manager -> force-app/main/default/permissionsets/Project_Manager.permissionset-meta.xml
|
|
337
|
+
- Project_User -> force-app/main/default/permissionsets/Project_User.permissionset-meta.xml
|
|
338
|
+
|
|
339
|
+
WARNINGS: None
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
---
|
|
343
|
+
|
|
344
|
+
## Validation
|
|
345
|
+
|
|
346
|
+
Before presenting the completed build to the user, verify cross-component integrity:
|
|
347
|
+
|
|
348
|
+
- [ ] **Object-Tab Coverage**: Every Custom Object has at least one Custom Tab
|
|
349
|
+
- [ ] **Relationship Integrity**: Every Custom Object referenced in a relationship (parent or child) exists in the build
|
|
350
|
+
- [ ] **Field References in Pages**: Every field referenced in a FlexiPage exists on the corresponding object
|
|
351
|
+
- [ ] **Tab References in App**: Every tab referenced in the Custom Application was successfully created
|
|
352
|
+
- [ ] **Permission Set Completeness**: Permission Sets grant access to all generated objects, fields, tabs, and the application
|
|
353
|
+
- [ ] **No Orphaned Components**: No tabs without objects, no pages without corresponding tabs, no app without tabs
|
|
354
|
+
- [ ] **Deployment Manifest Completeness**: `package.xml` includes all generated components in proper dependency order
|
|
355
|
+
|
|
356
|
+
**Validation Failure Handling (Category 2):**
|
|
357
|
+
|
|
358
|
+
- If validation fails, include failed checks in the Build Summary Report under a `VALIDATION WARNINGS` section
|
|
359
|
+
- These are post-generation issues — do NOT block delivery of the build, but clearly communicate what needs manual review or correction
|
|
360
|
+
- Provide specific remediation steps for each failed validation check
|
|
361
|
+
|
|
362
|
+
**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.
|
|
363
|
+
|
|
364
|
+
---
|
|
365
|
+
|
|
366
|
+
## Error Handling
|
|
367
|
+
|
|
368
|
+
### Category 1: Stop and Ask User
|
|
369
|
+
|
|
370
|
+
Stop execution and ask for clarification if:
|
|
371
|
+
|
|
372
|
+
- User request is too vague to extract any objects or fields
|
|
373
|
+
- Conflicting requirements detected (e.g., "make it private" + "everyone should see it")
|
|
374
|
+
- Invalid Salesforce naming detected (reserved words like `Order`, `Group`)
|
|
375
|
+
|
|
376
|
+
### Category 2: Post-Generation Warnings (Log Warning, Continue)
|
|
377
|
+
|
|
378
|
+
Log warning and continue if:
|
|
379
|
+
|
|
380
|
+
- Cross-component validation check fails (e.g., field referenced in FlexiPage doesn't exist on object)
|
|
381
|
+
- Optional component generation fails (e.g., List View generation has minor issues)
|
|
382
|
+
- Validation Rule or Flow has minor output issues
|
|
383
|
+
|
|
384
|
+
**Warning Pattern:**
|
|
385
|
+
|
|
386
|
+
```
|
|
387
|
+
Warning: [Component Type] generation encountered issue
|
|
388
|
+
Component: [Name]
|
|
389
|
+
Issue: [Description]
|
|
390
|
+
Impact: [What won't work]
|
|
391
|
+
Recommendation: [How to fix manually]
|
|
392
|
+
Continuing with remaining components...
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
---
|
|
396
|
+
|
|
397
|
+
## Best Practices
|
|
398
|
+
|
|
399
|
+
### 1. Always Follow Dependency Order
|
|
400
|
+
|
|
401
|
+
Never invoke skills out of sequence. Fields need objects, pages need tabs, apps need tabs.
|
|
402
|
+
|
|
403
|
+
### 2. Use Skills When Available
|
|
404
|
+
|
|
405
|
+
Don't reinvent the wheel. Specialized skills have field-specific validation that prevents deployment errors.
|
|
406
|
+
|
|
407
|
+
### 3. Generate Thoughtful Defaults
|
|
408
|
+
|
|
409
|
+
When user doesn't specify details:
|
|
410
|
+
|
|
411
|
+
- Use Text name fields for human entities
|
|
412
|
+
- Use AutoNumber for transactions
|
|
413
|
+
- Enable Search and Reports for user-facing objects
|
|
414
|
+
- Set sharingModel based on relationships
|
|
415
|
+
|
|
416
|
+
### 4. Validate Before Building
|
|
417
|
+
|
|
418
|
+
Check for:
|
|
419
|
+
|
|
420
|
+
- Reserved words in API names
|
|
421
|
+
- Relationship limits (max 2 M-D per object)
|
|
422
|
+
- Name length limits
|
|
423
|
+
- Duplicate names
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: generating-list-view
|
|
3
3
|
description: Use this skill when users need to create, generate, or validate Salesforce List View metadata. Trigger when users mention list views, filtered record lists, creating views, setting up record columns, filtering records by criteria, or ask about list view visibility. Also use when users say things like "I need a view that shows...", "filter records by...", "create a list view for...", or when they're working with ListView XML files and need validation or troubleshooting.
|
|
4
4
|
---
|
|
5
5
|
|