scc-universal 1.2.2 → 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/.claude-plugin/plugin.json +1 -1
- package/.cursor/agents/sf-agentforce-agent.md +88 -40
- package/.cursor/skills/sf-2gp-security-review/SKILL.md +167 -0
- package/.cursor/skills/sf-agentforce-development/SKILL.md +385 -348
- package/.cursor/skills/sf-cli-reference/SKILL.md +221 -0
- package/.cursor-plugin/plugin.json +1 -1
- package/agents/sf-agentforce-agent.md +88 -40
- package/manifests/install-modules.json +3 -1
- package/package.json +1 -1
- package/skills/_reference/AGENTFORCE_PATTERNS.md +433 -51
- package/skills/_reference/APPEXCHANGE_REVIEW.md +427 -0
- package/skills/_reference/SF_CLI_COMMANDS.md +812 -0
- package/skills/sf-2gp-security-review/SKILL.md +168 -0
- package/skills/sf-agentforce-development/SKILL.md +385 -348
- package/skills/sf-cli-reference/SKILL.md +225 -0
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sf-cli-reference
|
|
3
|
+
description: >-
|
|
4
|
+
Use when looking up Salesforce CLI sf commands — org login, project deploy, apex run test, data query, package install, scratch org creation. Do NOT use for web documentation lookup or Apex code patterns.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# SF CLI Command Reference
|
|
8
|
+
|
|
9
|
+
Reference: @../_reference/SF_CLI_COMMANDS.md
|
|
10
|
+
|
|
11
|
+
## When to Use
|
|
12
|
+
|
|
13
|
+
- When you need to find the right `sf` command for a Salesforce task
|
|
14
|
+
- When constructing CLI commands with correct flags and syntax
|
|
15
|
+
- When choosing between similar commands (e.g., deploy start vs deploy validate)
|
|
16
|
+
- When setting up org authentication (web, jwt, sfdx-url)
|
|
17
|
+
- When running Apex tests or querying data from the command line
|
|
18
|
+
- When managing scratch orgs, packages, or metadata via CLI
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Command Decision Tree
|
|
23
|
+
|
|
24
|
+
### Authenticate to an Org
|
|
25
|
+
|
|
26
|
+
| Scenario | Command | Key Flags |
|
|
27
|
+
|---|---|---|
|
|
28
|
+
| Interactive browser login | `sf org login web` | `--alias`, `--set-default` |
|
|
29
|
+
| CI/CD non-interactive login | `sf org login jwt` | `--client-id`, `--jwt-key-file`, `--username` |
|
|
30
|
+
| Auth URL from file | `sf org login sfdx-url` | `--sfdx-url-file` |
|
|
31
|
+
| Log out of an org | `sf org logout` | `--target-org`, `--no-prompt` |
|
|
32
|
+
| List all connected orgs | `sf org list` | `--all` |
|
|
33
|
+
| Open org in browser | `sf org open` | `--target-org`, `--path` |
|
|
34
|
+
| Display org details | `sf org display` | `--target-org`, `--verbose` |
|
|
35
|
+
|
|
36
|
+
### Deploy or Retrieve Source
|
|
37
|
+
|
|
38
|
+
| Scenario | Command | Key Flags |
|
|
39
|
+
|---|---|---|
|
|
40
|
+
| Deploy source directory | `sf project deploy start` | `--source-dir`, `--target-org` |
|
|
41
|
+
| Deploy with manifest | `sf project deploy start` | `--manifest`, `--target-org` |
|
|
42
|
+
| Deploy specific metadata | `sf project deploy start` | `--metadata "ApexClass:MyClass"` |
|
|
43
|
+
| Validate without deploying | `sf project deploy validate` | `--test-level`, `--target-org` |
|
|
44
|
+
| Quick deploy after validation | `sf project deploy quick` | `--job-id`, `--target-org` |
|
|
45
|
+
| Check deploy status | `sf project deploy report` | `--job-id` |
|
|
46
|
+
| Resume failed deploy | `sf project deploy resume` | `--job-id` |
|
|
47
|
+
| Cancel in-progress deploy | `sf project deploy cancel` | `--job-id` |
|
|
48
|
+
| Retrieve from org | `sf project retrieve start` | `--source-dir`, `--target-org` |
|
|
49
|
+
| Retrieve by manifest | `sf project retrieve start` | `--manifest` |
|
|
50
|
+
| Preview retrieval | `sf project retrieve preview` | `--target-org` |
|
|
51
|
+
| Generate manifest | `sf project generate manifest` | `--source-dir`, `--output-dir` |
|
|
52
|
+
| Convert source to mdapi | `sf project convert source` | `--root-dir`, `--output-dir` |
|
|
53
|
+
| Convert mdapi to source | `sf project convert mdapi` | `--root-dir`, `--output-dir` |
|
|
54
|
+
| Create new project | `sf project generate` | `--name`, `--template` |
|
|
55
|
+
|
|
56
|
+
### Run Apex Code and Tests
|
|
57
|
+
|
|
58
|
+
| Scenario | Command | Key Flags |
|
|
59
|
+
|---|---|---|
|
|
60
|
+
| Execute anonymous Apex | `sf apex run` | `--file`, `--target-org` |
|
|
61
|
+
| Run all local tests | `sf apex run test` | `--test-level RunLocalTests` |
|
|
62
|
+
| Run specific test classes | `sf apex run test` | `--class-names "MyTest,OtherTest"` |
|
|
63
|
+
| Run specific test methods | `sf apex run test` | `--tests "MyTest.testMethod"` |
|
|
64
|
+
| Run tests with coverage | `sf apex run test` | `--code-coverage`, `--output-dir` |
|
|
65
|
+
| Run test suite | `sf apex run test` | `--suite-names "MySuite"` |
|
|
66
|
+
| Stream debug logs live | `sf apex tail log` | `--target-org`, `--debug-level` |
|
|
67
|
+
| Get a specific log | `sf apex get log` | `--log-id` |
|
|
68
|
+
| List recent logs | `sf apex list log` | `--target-org` |
|
|
69
|
+
|
|
70
|
+
### Work with Data
|
|
71
|
+
|
|
72
|
+
| Scenario | Command | Key Flags |
|
|
73
|
+
|---|---|---|
|
|
74
|
+
| Run SOQL query | `sf data query` | `--query`, `--target-org` |
|
|
75
|
+
| Run SOQL from file | `sf data query` | `--file`, `--result-format` |
|
|
76
|
+
| Bulk SOQL query | `sf data query` | `--query`, `--bulk`, `--wait` |
|
|
77
|
+
| Run SOSL search | `sf data search` | `--query` |
|
|
78
|
+
| Create a record | `sf data create record` | `--sobject`, `--values` |
|
|
79
|
+
| Update a record | `sf data update record` | `--sobject`, `--record-id`, `--values` |
|
|
80
|
+
| Delete a record | `sf data delete record` | `--sobject`, `--record-id` |
|
|
81
|
+
| Bulk upsert from CSV | `sf data upsert bulk` | `--file`, `--sobject`, `--external-id` |
|
|
82
|
+
| Bulk delete from CSV | `sf data delete bulk` | `--file`, `--sobject` |
|
|
83
|
+
| Export data as tree | `sf data export tree` | `--query`, `--plan` |
|
|
84
|
+
| Import tree data | `sf data import tree` | `--plan`, `--target-org` |
|
|
85
|
+
|
|
86
|
+
### Manage Scratch Orgs and Sandboxes
|
|
87
|
+
|
|
88
|
+
| Scenario | Command | Key Flags |
|
|
89
|
+
|---|---|---|
|
|
90
|
+
| Create scratch org | `sf org create scratch` | `--definition-file`, `--alias`, `--duration-days` |
|
|
91
|
+
| Delete scratch org | `sf org delete scratch` | `--target-org`, `--no-prompt` |
|
|
92
|
+
| Create sandbox | `sf org create sandbox` | `--name`, `--definition-file`, `--alias` |
|
|
93
|
+
| Clone sandbox | `sf org create sandbox` | `--clone`, `--name` |
|
|
94
|
+
| Delete sandbox | `sf org delete sandbox` | `--target-org`, `--no-prompt` |
|
|
95
|
+
| Resume sandbox creation | `sf org resume sandbox` | `--name`, `--target-org` |
|
|
96
|
+
| Assign permission set | `sf org assign permset` | `--name`, `--target-org` |
|
|
97
|
+
| Create user | `sf org create user` | `--definition-file`, `--target-org` |
|
|
98
|
+
|
|
99
|
+
### Manage Packages
|
|
100
|
+
|
|
101
|
+
| Scenario | Command | Key Flags |
|
|
102
|
+
|---|---|---|
|
|
103
|
+
| Create package | `sf package create` | `--name`, `--package-type`, `--path` |
|
|
104
|
+
| Create version | `sf package version create` | `--package`, `--installation-key`, `--code-coverage` |
|
|
105
|
+
| Promote version | `sf package version promote` | `--package` |
|
|
106
|
+
| Install package | `sf package install` | `--package`, `--target-org` |
|
|
107
|
+
| Uninstall package | `sf package uninstall` | `--package`, `--target-org` |
|
|
108
|
+
| List versions | `sf package version list` | `--packages`, `--verbose` |
|
|
109
|
+
| List installed | `sf package installed list` | `--target-org` |
|
|
110
|
+
|
|
111
|
+
### Work with Agentforce / AI Agents
|
|
112
|
+
|
|
113
|
+
| Scenario | Command | Key Flags |
|
|
114
|
+
|---|---|---|
|
|
115
|
+
| Create agent | `sf agent create` | `--target-org` |
|
|
116
|
+
| Generate agent spec | `sf agent generate spec` | `--output-dir` |
|
|
117
|
+
| Generate agent tests | `sf agent generate test` | `--spec-file`, `--output-dir` |
|
|
118
|
+
| Run agent tests | `sf agent test run` | `--name`, `--target-org` |
|
|
119
|
+
| Preview agent | `sf agent preview` | `--name`, `--target-org` |
|
|
120
|
+
| Activate agent | `sf agent activate` | `--target-org` |
|
|
121
|
+
| Deactivate agent | `sf agent deactivate` | `--target-org` |
|
|
122
|
+
|
|
123
|
+
> Note: `sf agent` commands are actively evolving. Run `sf agent <command> --help` for the latest flags.
|
|
124
|
+
|
|
125
|
+
### Generate Code from Templates
|
|
126
|
+
|
|
127
|
+
| Scenario | Command | Key Flags |
|
|
128
|
+
|---|---|---|
|
|
129
|
+
| Generate Apex class | `sf apex generate class` | `--name`, `--output-dir`, `--template` |
|
|
130
|
+
| Generate Apex trigger | `sf apex generate trigger` | `--name`, `--sobject`, `--output-dir` |
|
|
131
|
+
| Generate LWC | `sf lightning generate component` | `--name`, `--type lwc` |
|
|
132
|
+
| Generate Aura component | `sf lightning generate component` | `--name`, `--type aura` |
|
|
133
|
+
| Generate Lightning event | `sf lightning generate event` | `--name`, `--output-dir` |
|
|
134
|
+
| Generate SObject | `sf schema generate sobject` | `--label`, `--output-dir` |
|
|
135
|
+
| Generate field | `sf schema generate field` | `--label`, `--object` |
|
|
136
|
+
| Generate platform event | `sf schema generate platformevent` | `--label`, `--output-dir` |
|
|
137
|
+
| Generate project | `sf project generate` | `--name`, `--template` |
|
|
138
|
+
|
|
139
|
+
### Other Utilities
|
|
140
|
+
|
|
141
|
+
| Scenario | Command | Key Flags |
|
|
142
|
+
|---|---|---|
|
|
143
|
+
| Set default org | `sf config set` | `target-org=myOrg` |
|
|
144
|
+
| List config values | `sf config list` | |
|
|
145
|
+
| Set alias | `sf alias set` | `myAlias=user@org.com` |
|
|
146
|
+
| Describe SObject | `sf sobject describe` | `--sobject`, `--target-org` |
|
|
147
|
+
| List SObjects | `sf sobject list` | `--sobject-type`, `--target-org` |
|
|
148
|
+
| REST API request | `sf api request rest` | (URL path), `--method`, `--body` |
|
|
149
|
+
| GraphQL request | `sf api request graphql` | `--body` |
|
|
150
|
+
| Run Flow tests | `sf logic run test` | `--target-org` |
|
|
151
|
+
| Diagnose CLI issues | `sf doctor` | |
|
|
152
|
+
| Install plugin | `sf plugins install` | (plugin name) |
|
|
153
|
+
| Update CLI | `sf update` | |
|
|
154
|
+
| Show release notes | `sf info releasenotes display` | |
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Workflow Patterns
|
|
159
|
+
|
|
160
|
+
### Authentication + Deploy
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
# Login and deploy source
|
|
164
|
+
sf org login web --alias myOrg --set-default
|
|
165
|
+
sf project deploy start --source-dir force-app --target-org myOrg --wait 30
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### CI/CD: Validate Then Quick Deploy
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
# Authenticate in CI
|
|
172
|
+
sf org login jwt \
|
|
173
|
+
--client-id $SF_CLIENT_ID \
|
|
174
|
+
--jwt-key-file server.key \
|
|
175
|
+
--username $SF_USERNAME \
|
|
176
|
+
--alias prod
|
|
177
|
+
|
|
178
|
+
# Validate (runs tests without committing)
|
|
179
|
+
sf project deploy validate \
|
|
180
|
+
--source-dir force-app \
|
|
181
|
+
--test-level RunLocalTests \
|
|
182
|
+
--target-org prod \
|
|
183
|
+
--wait 60
|
|
184
|
+
|
|
185
|
+
# Quick deploy after successful validation (use job ID from validation output)
|
|
186
|
+
sf project deploy quick --job-id $JOB_ID --target-org prod
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### Scratch Org Development Cycle
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
# Create scratch org
|
|
193
|
+
sf org create scratch \
|
|
194
|
+
--definition-file config/project-scratch-def.json \
|
|
195
|
+
--alias dev \
|
|
196
|
+
--duration-days 7 \
|
|
197
|
+
--set-default
|
|
198
|
+
|
|
199
|
+
# Push source and assign permissions
|
|
200
|
+
sf project deploy start --source-dir force-app --target-org dev
|
|
201
|
+
sf org assign permset --name MyPermSet --target-org dev
|
|
202
|
+
|
|
203
|
+
# Import sample data
|
|
204
|
+
sf data import tree --plan data/sample-data-plan.json --target-org dev
|
|
205
|
+
|
|
206
|
+
# Run tests
|
|
207
|
+
sf apex run test --test-level RunLocalTests --target-org dev --code-coverage
|
|
208
|
+
|
|
209
|
+
# Clean up
|
|
210
|
+
sf org delete scratch --target-org dev --no-prompt
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## Related
|
|
216
|
+
|
|
217
|
+
- **Skill**: `sf-deployment` -- detailed deployment strategies and error resolution
|
|
218
|
+
- **Skill**: `sf-devops-ci-cd` -- CI/CD pipeline setup with GitHub Actions
|
|
219
|
+
- **Skill**: `sf-debugging` -- debug log setup and analysis with CLI commands
|
|
220
|
+
- **Skill**: `sf-metadata-management` -- metadata types and source tracking
|
|
221
|
+
- **Skill**: `sf-docs-lookup` -- web search for official Salesforce documentation
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: sf-agentforce-agent
|
|
3
|
-
description: "Build and test Agentforce AI agents —
|
|
3
|
+
description: "Build and test Agentforce AI agents — Agent Script, topics, Apex actions, metadata deployment. Use PROACTIVELY when building Agentforce. Do NOT use for standard Apex."
|
|
4
4
|
tools: ["Read", "Write", "Edit", "Bash", "Grep", "Glob"]
|
|
5
5
|
model: sonnet
|
|
6
6
|
origin: SCC
|
|
@@ -11,15 +11,18 @@ skills:
|
|
|
11
11
|
- sf-agentforce-development
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
You are a Salesforce Agentforce developer. You design, build, test, and review Agentforce AI agents with custom actions and prompt templates. You follow TDD — write Apex tests for @InvocableMethod actions BEFORE the production class. You enforce topic limits and context engineering best practices.
|
|
14
|
+
You are a Salesforce Agentforce developer. You design, build, test, and review Agentforce AI agents with Agent Script, custom actions, and prompt templates. You follow TDD — write Apex tests for @InvocableMethod actions BEFORE the production class. You enforce topic limits and context engineering best practices. You default to Agent Script for all new agents.
|
|
15
15
|
|
|
16
16
|
## When to Use
|
|
17
17
|
|
|
18
|
-
- Creating Agentforce
|
|
18
|
+
- Creating Agentforce agents with Agent Script (`.agent` files)
|
|
19
|
+
- Generating and publishing authoring bundles
|
|
19
20
|
- Building custom Apex actions (`@InvocableMethod`) for agents
|
|
20
21
|
- Building Flow actions for agent orchestration
|
|
21
22
|
- Creating and testing Prompt Templates
|
|
22
|
-
-
|
|
23
|
+
- Configuring MCP Server, Named Query, or AuraEnabled actions
|
|
24
|
+
- Testing agent behavior with `sf agent test` and YAML test specs
|
|
25
|
+
- Deploying agent metadata (GenAi types, AiAuthoringBundle)
|
|
23
26
|
- Reviewing existing Agentforce configurations for context engineering quality
|
|
24
27
|
|
|
25
28
|
Do NOT use for standard Apex classes, LWC, or Flows unrelated to Agentforce.
|
|
@@ -29,16 +32,22 @@ Do NOT use for standard Apex classes, LWC, or Flows unrelated to Agentforce.
|
|
|
29
32
|
### Phase 1 — Assess
|
|
30
33
|
|
|
31
34
|
1. **Read the task from sf-architect** — check acceptance criteria, topic design, action scope, and grounding strategy. If no task plan exists, gather requirements directly.
|
|
32
|
-
2. Check existing Agentforce configuration in the org
|
|
35
|
+
2. Check existing Agentforce configuration in the org:
|
|
36
|
+
- Look for `aiAuthoringBundles/` directory (Agent Script)
|
|
37
|
+
- Inventory existing `.agent` files and their topics
|
|
38
|
+
- Check for classic config: `genAiPlugins/`, `genAiPlanners/`, `genAiPlannerBundles/`
|
|
33
39
|
3. Inventory existing `@InvocableMethod` classes and their labels/descriptions
|
|
34
40
|
4. Review existing topics — count total (max 10 recommended)
|
|
35
41
|
5. Review existing actions per topic — count total (max 12-15 per topic)
|
|
42
|
+
6. Determine approach: **Agent Script** (API v65+, recommended) or **Classic Setup** (API < v65)
|
|
36
43
|
|
|
37
44
|
### Phase 2 — Design Topics
|
|
38
45
|
|
|
39
46
|
Consult `sf-agentforce-development` skill for patterns.
|
|
40
47
|
|
|
41
|
-
**
|
|
48
|
+
**Default to Agent Script** for new agents. Use Classic Setup only for orgs on API < v65 or for minimal single-topic agents managed by admins.
|
|
49
|
+
|
|
50
|
+
**Topic Design Rules (both approaches):**
|
|
42
51
|
|
|
43
52
|
| Rule | Rationale |
|
|
44
53
|
|---|---|
|
|
@@ -46,9 +55,16 @@ Consult `sf-agentforce-development` skill for patterns.
|
|
|
46
55
|
| Max 12-15 actions per topic | Agent routing degrades with too many options |
|
|
47
56
|
| Topic scope: explicit WILL/WILL NOT | Prevents agent from attempting out-of-scope tasks |
|
|
48
57
|
| Topic instructions: positive framing | "Always do X" not "Don't do Y" — LLM responds better |
|
|
49
|
-
| No business rules in topic instructions | Put deterministic logic in action code
|
|
58
|
+
| No business rules in topic instructions | Put deterministic logic in action code or Agent Script `->` |
|
|
50
59
|
| Varied action verb names | "Locate", "Retrieve", "Calculate" — not "Get X", "Get Y", "Get Z" |
|
|
51
60
|
|
|
61
|
+
**Agent Script Design Considerations:**
|
|
62
|
+
|
|
63
|
+
- Plan block order: `config → variables → system → start_agent → topics`
|
|
64
|
+
- Identify which logic is deterministic (`->`) vs LLM-driven (`|`)
|
|
65
|
+
- Design variables for state that must persist across turns (mutable) or from session context (linked)
|
|
66
|
+
- Plan topic transitions: deterministic (`transition to`) for hard gates, LLM-selected for flexible routing
|
|
67
|
+
|
|
52
68
|
**Grounding Strategy:**
|
|
53
69
|
|
|
54
70
|
| Data Source | Use When |
|
|
@@ -56,72 +72,104 @@ Consult `sf-agentforce-development` skill for patterns.
|
|
|
56
72
|
| Knowledge Articles | FAQ-style, content that changes frequently |
|
|
57
73
|
| Custom Objects | Structured data queryable via SOQL in actions |
|
|
58
74
|
| External data via actions | Real-time data from APIs |
|
|
75
|
+
| MCP Server | Third-party integrations without custom Apex |
|
|
76
|
+
| Named Query | Simple read-only SOQL without Flow or Apex |
|
|
59
77
|
| Prompt Templates | Structured output formatting, consistent tone |
|
|
60
78
|
|
|
61
|
-
**Context Engineering Principles:**
|
|
62
|
-
|
|
63
|
-
1. Use variables to store key facts — don't rely on conversation memory
|
|
64
|
-
2. Eliminate contradictions across topic instructions, action instructions, and scope
|
|
65
|
-
3. Validate grounding data is current and accurate
|
|
66
|
-
4. Use structured actions for critical business logic — reserve natural language for conversational tasks
|
|
67
|
-
|
|
68
79
|
### Phase 3 — Test First (TDD)
|
|
69
80
|
|
|
70
|
-
|
|
81
|
+
**Apex action tests** — write before the production class (RED → GREEN):
|
|
71
82
|
|
|
72
83
|
1. Create test class: `[ActionClass]Test.cls`
|
|
73
84
|
2. Test with `@TestSetup` using `TestDataFactory`
|
|
74
|
-
3. Test cases:
|
|
75
|
-
|
|
76
|
-
- **Invalid inputs**: null, empty, wrong type → graceful error (not unhandled exception)
|
|
77
|
-
- **Bulk scenario**: List of inputs (Flow bulkification)
|
|
78
|
-
- **Permission test**: `System.runAs()` with user who should/shouldn't have access
|
|
79
|
-
4. Run test to confirm RED:
|
|
85
|
+
3. Test cases: valid inputs, invalid inputs, bulk scenario, permission test (`System.runAs()`)
|
|
86
|
+
4. Run to confirm RED:
|
|
80
87
|
|
|
81
88
|
```bash
|
|
82
89
|
sf apex run test --class-names "MyActionTest" --result-format human --wait 10
|
|
83
90
|
```
|
|
84
91
|
|
|
92
|
+
**Agent test spec** — generate YAML for end-to-end agent behavior:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
sf agent generate test-spec --output-file specs/testSpec.yaml
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Customize with test cases covering each topic, expected actions, and metrics.
|
|
99
|
+
|
|
85
100
|
### Phase 4 — Build Actions
|
|
86
101
|
|
|
87
102
|
1. Write `@InvocableMethod` Apex class with proper `InvocableVariable` inputs/outputs
|
|
88
103
|
2. Keep actions focused — one action per business operation
|
|
89
104
|
3. Use `with sharing` and enforce CRUD/FLS (`WITH USER_MODE`, `AccessLevel.USER_MODE`)
|
|
90
105
|
4. Clear, descriptive `label` and `description` — these are what the LLM reads to decide routing
|
|
91
|
-
5. `InvocableVariable` descriptions specify data type and format
|
|
106
|
+
5. `InvocableVariable` descriptions specify data type and format
|
|
92
107
|
6. Return structured output — the LLM needs to parse the response
|
|
108
|
+
7. Use `Database` class (partial success) not DML verbs (all-or-nothing)
|
|
109
|
+
8. For long-running work: enqueue Queueable, return requestId
|
|
110
|
+
9. Consider alternatives: MCP Server (external APIs), Named Query (read-only SOQL), AuraEnabled (reuse LWC controllers)
|
|
111
|
+
|
|
112
|
+
### Phase 5 — Build Agent
|
|
113
|
+
|
|
114
|
+
**Agent Script path (recommended):**
|
|
115
|
+
|
|
116
|
+
1. Generate authoring bundle: `sf agent generate authoring-bundle --spec specs/agentSpec.yaml --name "My Agent" --api-name My_Agent`
|
|
117
|
+
2. Edit `.agent` file — define config, variables, system, start_agent, topics
|
|
118
|
+
3. Map actions to topics in `reasoning.actions` blocks
|
|
119
|
+
4. Use `->` for deterministic logic, `|` for LLM prompts
|
|
120
|
+
5. Create Prompt Templates with clear output structure
|
|
121
|
+
6. Validate: `sf agent validate authoring-bundle`
|
|
122
|
+
7. Publish: `sf agent publish authoring-bundle --target-org MySandbox`
|
|
93
123
|
|
|
94
|
-
|
|
124
|
+
**Classic path (fallback):**
|
|
95
125
|
|
|
96
|
-
1.
|
|
97
|
-
2. Write
|
|
98
|
-
3.
|
|
99
|
-
4.
|
|
100
|
-
5.
|
|
126
|
+
1. Configure topics in Agentforce Builder UI
|
|
127
|
+
2. Write WILL/WILL NOT scope boundaries
|
|
128
|
+
3. Write numbered instructions (positive framing)
|
|
129
|
+
4. Map actions to topics — verify no orphaned actions
|
|
130
|
+
5. Create Prompt Templates
|
|
131
|
+
|
|
132
|
+
### Phase 6 — Test & Preview
|
|
101
133
|
|
|
102
134
|
```bash
|
|
103
|
-
|
|
135
|
+
# Preview — interactive testing
|
|
136
|
+
sf agent preview --target-org MySandbox
|
|
137
|
+
|
|
138
|
+
# Create agent tests in org from YAML spec
|
|
139
|
+
sf agent test create --spec specs/testSpec.yaml --target-org MySandbox
|
|
140
|
+
|
|
141
|
+
# Run tests — sync with output for review
|
|
142
|
+
sf agent test run --api-name My_Agent_Tests --wait 10 \
|
|
143
|
+
--result-format junit --output-dir ./test-results \
|
|
144
|
+
--target-org MySandbox
|
|
104
145
|
```
|
|
105
146
|
|
|
106
|
-
|
|
147
|
+
Review results for topic routing, action execution, outcome quality, and instruction adherence.
|
|
148
|
+
|
|
149
|
+
### Phase 7 — Self-Review
|
|
107
150
|
|
|
108
|
-
1.
|
|
109
|
-
2.
|
|
110
|
-
3.
|
|
111
|
-
4.
|
|
112
|
-
5.
|
|
113
|
-
6.
|
|
114
|
-
7.
|
|
115
|
-
8.
|
|
116
|
-
9.
|
|
117
|
-
10.
|
|
151
|
+
1. Agent Script validates without errors (`sf agent validate authoring-bundle`)
|
|
152
|
+
2. Authoring bundle publishes successfully
|
|
153
|
+
3. All actions use `with sharing` and enforce CRUD/FLS
|
|
154
|
+
4. Each action has clear, descriptive `label` and `description` (LLM reads these)
|
|
155
|
+
5. `InvocableVariable` inputs are required where needed, with format descriptions
|
|
156
|
+
6. Topic count <= 10, actions per topic <= 15
|
|
157
|
+
7. No contradictions between topic scope, topic instructions, and action instructions
|
|
158
|
+
8. No deterministic business rules in topic instructions (those go in action code or `->` logic)
|
|
159
|
+
9. Action verb names are varied across topics (not all "Get")
|
|
160
|
+
10. YAML test spec covers all topics with appropriate metrics
|
|
161
|
+
11. Test coverage includes valid, invalid, bulk, and permission cases for Apex actions
|
|
162
|
+
12. Grounding data (Knowledge Articles, custom objects) is current
|
|
163
|
+
13. All acceptance criteria from the architect's task plan are met
|
|
118
164
|
|
|
119
165
|
## Escalation
|
|
120
166
|
|
|
121
167
|
Stop and ask before:
|
|
122
168
|
|
|
169
|
+
- Publishing an authoring bundle to production without preview testing
|
|
123
170
|
- Modifying existing agent topics that are live in production
|
|
124
171
|
- Changing action labels/descriptions (affects agent routing — LLM may behave differently)
|
|
172
|
+
- Changing Agent Script `->` logic that affects deterministic control flow
|
|
125
173
|
- Adding more than 10 topics to a single agent
|
|
126
174
|
- Adding more than 15 actions to a single topic
|
|
127
175
|
- Deploying an agent without end-to-end testing via `sf agent test`
|
|
@@ -155,7 +155,8 @@
|
|
|
155
155
|
"paths": [
|
|
156
156
|
"skills/sf-devops-ci-cd/",
|
|
157
157
|
"skills/sf-deployment/",
|
|
158
|
-
"skills/sf-deployment-constraints/"
|
|
158
|
+
"skills/sf-deployment-constraints/",
|
|
159
|
+
"skills/sf-cli-reference/"
|
|
159
160
|
],
|
|
160
161
|
"targets": { "claude": ".claude/skills/", "cursor": ".cursor/skills/" }
|
|
161
162
|
}
|
|
@@ -173,6 +174,7 @@
|
|
|
173
174
|
{
|
|
174
175
|
"paths": [
|
|
175
176
|
"skills/sf-security/",
|
|
177
|
+
"skills/sf-2gp-security-review/",
|
|
176
178
|
"skills/sf-governor-limits/",
|
|
177
179
|
"skills/sf-soql-optimization/",
|
|
178
180
|
"skills/sf-security-constraints/"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "scc-universal",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Complete collection of production-ready Salesforce agents, skills, hooks, and MCP configurations for Claude Code and other AI harnesses. Salesforce Claude Code (SCC) — your AI-powered Salesforce development partner.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"salesforce",
|