scc-universal 1.2.1 → 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.
Files changed (47) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.cursor/agents/sf-agentforce-agent.md +88 -40
  3. package/.cursor/skills/prompt-optimizer/SKILL.md +21 -21
  4. package/.cursor/skills/sf-2gp-security-review/SKILL.md +167 -0
  5. package/.cursor/skills/sf-agentforce-development/SKILL.md +385 -348
  6. package/.cursor/skills/sf-cli-reference/SKILL.md +221 -0
  7. package/.cursor/skills/sf-harness-audit/SKILL.md +2 -2
  8. package/.cursor/skills/sf-quickstart/SKILL.md +1 -1
  9. package/.cursor-plugin/plugin.json +1 -1
  10. package/README.md +8 -38
  11. package/agents/sf-agentforce-agent.md +88 -40
  12. package/docs/ARCHITECTURE.md +4 -3
  13. package/docs/authoring-guide.md +1 -1
  14. package/docs/hook-development.md +1 -1
  15. package/examples/agentforce-action/README.md +4 -4
  16. package/examples/devops-pipeline/README.md +4 -4
  17. package/examples/integration-pattern/README.md +4 -4
  18. package/examples/platform-events/README.md +4 -4
  19. package/examples/security-audit/README.md +3 -3
  20. package/examples/visualforce-migration/README.md +4 -4
  21. package/manifests/install-modules.json +9 -3
  22. package/package.json +2 -2
  23. package/scripts/lib/install-executor.js +23 -12
  24. package/skills/_reference/AGENTFORCE_PATTERNS.md +433 -51
  25. package/skills/_reference/APPEXCHANGE_REVIEW.md +427 -0
  26. package/skills/_reference/SF_CLI_COMMANDS.md +812 -0
  27. package/skills/prompt-optimizer/SKILL.md +21 -21
  28. package/skills/sf-2gp-security-review/SKILL.md +168 -0
  29. package/skills/sf-agentforce-development/SKILL.md +385 -348
  30. package/skills/sf-cli-reference/SKILL.md +225 -0
  31. package/skills/sf-harness-audit/SKILL.md +2 -2
  32. package/skills/sf-quickstart/SKILL.md +1 -1
  33. package/.cursor/hooks/adapter.js +0 -81
  34. package/.cursor/hooks/after-file-edit.js +0 -26
  35. package/.cursor/hooks/after-mcp-execution.js +0 -12
  36. package/.cursor/hooks/after-shell-execution.js +0 -30
  37. package/.cursor/hooks/after-tab-file-edit.js +0 -12
  38. package/.cursor/hooks/before-mcp-execution.js +0 -11
  39. package/.cursor/hooks/before-read-file.js +0 -13
  40. package/.cursor/hooks/before-shell-execution.js +0 -29
  41. package/.cursor/hooks/before-submit-prompt.js +0 -23
  42. package/.cursor/hooks/pre-compact.js +0 -7
  43. package/.cursor/hooks/session-end.js +0 -10
  44. package/.cursor/hooks/session-start.js +0 -10
  45. package/.cursor/hooks/stop.js +0 -18
  46. package/.cursor/hooks/subagent-start.js +0 -10
  47. package/.cursor/hooks/subagent-stop.js +0 -10
@@ -96,13 +96,13 @@ Map intent + scope + tech stack (from Phase 0) to specific SCC components.
96
96
 
97
97
  | Intent | Invocable Skills | Skills | Agents |
98
98
  |--------|----------|--------|--------|
99
- | New Feature | /sf-tdd-workflow, /sf-apex-best-practices | sf-apex-best-practices, sf-apex-enterprise-patterns | sf-architect, sf-apex-agent, sf-review-agent |
100
- | Bug Fix | /sf-tdd-workflow, /sf-build-fix | sf-apex-testing, sf-debugging | sf-bugfix-agent, sf-apex-agent |
101
- | Refactor | /refactor-clean, /sf-apex-best-practices | sf-trigger-frameworks, sf-apex-enterprise-patterns | refactor-cleaner, sf-review-agent |
102
- | Testing | /sf-tdd-workflow, /sf-apex-testing, /sf-e2e-testing | sf-apex-testing, sf-tdd-workflow | sf-apex-agent |
103
- | Review | /sf-apex-best-practices, /sf-lwc-development, /sf-security | sf-security | sf-review-agent, sf-review-agent |
99
+ | New Feature | sf-tdd-workflow, sf-apex-best-practices | sf-apex-best-practices, sf-apex-enterprise-patterns | sf-architect, sf-apex-agent, sf-review-agent |
100
+ | Bug Fix | sf-tdd-workflow, sf-build-fix | sf-apex-testing, sf-debugging | sf-bugfix-agent, sf-apex-agent |
101
+ | Refactor | /refactor-clean, sf-apex-best-practices | sf-trigger-frameworks, sf-apex-enterprise-patterns | refactor-cleaner, sf-review-agent |
102
+ | Testing | sf-tdd-workflow, sf-apex-testing, sf-e2e-testing | sf-apex-testing, sf-tdd-workflow | sf-apex-agent |
103
+ | Review | sf-apex-best-practices, sf-lwc-development, sf-security | sf-security | sf-review-agent, sf-review-agent |
104
104
  | Documentation | /update-docs | — | doc-updater, deep-researcher |
105
- | Infrastructure | /sf-deployment | sf-devops-ci-cd, sf-deployment | sf-architect |
105
+ | Infrastructure | sf-deployment | sf-devops-ci-cd, sf-deployment | sf-architect |
106
106
  | Design (EPIC) | — | — | sf-architect, sf-architect |
107
107
 
108
108
  #### By Tech Stack
@@ -164,7 +164,7 @@ For tasks that exceed a single session, split into sequential prompts:
164
164
 
165
165
  - Prompt 1: Research + Plan (use search-first skill, then sf-architect agent)
166
166
  - Prompt 2-N: Implement one phase per prompt (each ends with sf-review-agent agent)
167
- - Final Prompt: Integration test + /sf-apex-best-practices across all phases
167
+ - Final Prompt: Integration test + sf-apex-best-practices across all phases
168
168
  - Use /save-session and /resume-session to preserve context between sessions
169
169
 
170
170
  ---
@@ -191,7 +191,7 @@ If Phase 0 auto-detected the answer, state it instead of asking.
191
191
 
192
192
  | Type | Component | Purpose |
193
193
  |------|-----------|---------|
194
- | Command | /sf-tdd-workflow | TDD workflow for Apex |
194
+ | Command | sf-tdd-workflow | TDD workflow for Apex |
195
195
  | Skill | sf-apex-best-practices | Apex coding standards |
196
196
  | Agent | sf-review-agent | Post-implementation review |
197
197
  | Model | Sonnet | Recommended for this scope |
@@ -209,7 +209,7 @@ The prompt must be self-contained and ready to copy-paste. Include:
209
209
  - Scope boundaries (what NOT to do)
210
210
 
211
211
  For items that reference blueprint, write: "Use the sf-architect agent to..."
212
- (not `/blueprint`, since sf-architect is an agent, not a command).
212
+ (not `sf-architect agent`, since sf-architect is an agent, not a command).
213
213
 
214
214
  ### Section 4: Optimized Prompt — Quick Version
215
215
 
@@ -217,12 +217,12 @@ A compact version for experienced SCC users. Vary by intent type:
217
217
 
218
218
  | Intent | Quick Pattern |
219
219
  |--------|--------------|
220
- | New Feature | `Use sf-architect agent for [feature]. /sf-tdd-workflow to implement. /sf-apex-best-practices. Use sf-review-agent agent.` |
221
- | Bug Fix | `/sf-tdd-workflow — write failing test for [bug]. Fix to green. Use sf-review-agent agent.` |
222
- | Refactor | `/refactor-clean [scope]. /sf-apex-best-practices. Use sf-review-agent agent.` |
220
+ | New Feature | `Use sf-architect agent for [feature]. sf-tdd-workflow to implement. sf-apex-best-practices. Use sf-review-agent agent.` |
221
+ | Bug Fix | `sf-tdd-workflow — write failing test for [bug]. Fix to green. Use sf-review-agent agent.` |
222
+ | Refactor | `/refactor-clean [scope]. sf-apex-best-practices. Use sf-review-agent agent.` |
223
223
  | Research | `Use search-first skill for [topic]. Use sf-architect agent based on findings.` |
224
- | Testing | `/sf-tdd-workflow [class]. /sf-e2e-testing for critical flows. /sf-apex-testing.` |
225
- | Review | `/sf-apex-best-practices. Then use sf-review-agent agent.` |
224
+ | Testing | `sf-tdd-workflow [class]. sf-e2e-testing for critical flows. sf-apex-testing.` |
225
+ | Review | `sf-apex-best-practices. Then use sf-review-agent agent.` |
226
226
  | Docs | `/update-docs. Use deep-researcher agent.` |
227
227
  | EPIC | `Use sf-architect agent for "[objective]". Execute phases with sf-review-agent agent gates.` |
228
228
 
@@ -270,9 +270,9 @@ Technical requirements:
270
270
 
271
271
  Workflow:
272
272
  1. Use sf-architect agent to plan trigger handler structure and business logic
273
- 2. /sf-tdd-workflow — write failing test class first (use @TestSetup and test data factory)
273
+ 2. sf-tdd-workflow — write failing test class first (use @TestSetup and test data factory)
274
274
  3. Implement AccountTrigger and AccountTriggerHandler
275
- 4. /sf-apex-best-practices to review implementation
275
+ 4. sf-apex-best-practices to review implementation
276
276
  5. Use sf-review-agent agent to verify all tests pass and coverage reaches 75%+
277
277
 
278
278
  Security requirements:
@@ -282,7 +282,7 @@ Security requirements:
282
282
  Acceptance criteria:
283
283
  - Test coverage 85%+
284
284
  - Zero governor limit violations
285
- - Passes /sf-security review
285
+ - Passes sf-security review
286
286
  ```
287
287
 
288
288
  ### Example 2: Moderate English Prompt
@@ -312,10 +312,10 @@ Requirements:
312
312
 
313
313
  Workflow:
314
314
  1. Use sf-architect agent for the endpoint structure, validation logic, and error response envelope
315
- 2. /sf-tdd-workflow — write tests for success, validation failure, permission failure
315
+ 2. sf-tdd-workflow — write tests for success, validation failure, permission failure
316
316
  3. Implement AccountAPI class following existing REST patterns
317
- 4. /sf-security — verify CRUD/FLS enforcement
318
- 5. /sf-apex-best-practices
317
+ 4. sf-security — verify CRUD/FLS enforcement
318
+ 5. sf-apex-best-practices
319
319
  6. Use sf-review-agent agent — run full test suite, confirm no regressions
320
320
 
321
321
  Do not:
@@ -345,7 +345,7 @@ Before executing, answer these questions in the blueprint:
345
345
  The blueprint should produce phases like:
346
346
  - Phase 1: Audit all existing triggers and document business logic
347
347
  - Phase 2: Implement TriggerHandler base class and factory
348
- - Phase 3: Migrate highest-priority object triggers with /sf-tdd-workflow gates
348
+ - Phase 3: Migrate highest-priority object triggers with sf-tdd-workflow gates
349
349
  - Phase 4: Migrate remaining triggers
350
350
  - Phase N: Remove legacy trigger code, run full regression
351
351
 
@@ -0,0 +1,168 @@
1
+ ---
2
+ name: sf-2gp-security-review
3
+ description: "Use when user asks for a 2GP security review, AppExchange readiness check, or pass/fail prediction for Apex, LWC, SOQL. Do NOT use for general security patterns."
4
+ origin: SCC
5
+ user-invocable: true
6
+ disable-model-invocation: true
7
+ ---
8
+
9
+ # Salesforce 2GP Managed Package Security Review
10
+
11
+ ## When to Use
12
+
13
+ - User asks for a 2GP managed package security review or AppExchange readiness assessment
14
+ - User wants a pass/fail prediction for their managed package security review submission
15
+ - User needs a 2GP license qualification checklist or submission readiness scoring
16
+
17
+ This skill performs a comprehensive security review of a Salesforce 2GP managed package,
18
+ assesses readiness for AppExchange security review, and produces a pass/fail prediction
19
+ with actionable remediation steps.
20
+
21
+ ## How This Skill Works
22
+
23
+ When invoked, you will:
24
+
25
+ 1. **Discover** the package structure (scan for Apex, LWC, objects, permissions, config)
26
+ 2. **Audit** every file against the security review criteria below
27
+ 3. **Score** each category (PASS / WARN / FAIL)
28
+ 4. **Produce** a structured report with an overall pass/fail prediction and remediation plan
29
+
30
+ The output is a detailed markdown report saved to the project's `docs/security/` directory.
31
+
32
+ ---
33
+
34
+ ## Step 1 — Package Discovery
35
+
36
+ Before auditing, build a complete inventory of the package contents. Run these searches
37
+ against the project's `force-app/` directory:
38
+
39
+ ```
40
+ Apex classes: force-app/**/classes/*.cls
41
+ Apex triggers: force-app/**/triggers/*.trigger
42
+ LWC components: force-app/**/lwc/*/
43
+ Aura components: force-app/**/aura/*/
44
+ Visualforce pages: force-app/**/pages/*.page
45
+ Custom objects: force-app/**/objects/*/
46
+ Permission sets: force-app/**/permissionsets/*/
47
+ Custom metadata: force-app/**/customMetadata/*/
48
+ Static resources: force-app/**/staticresources/*/
49
+ Named credentials: force-app/**/namedCredentials/*/
50
+ Remote site settings: force-app/**/remoteSiteSettings/*/
51
+ Connected apps: force-app/**/connectedApps/*/
52
+ ```
53
+
54
+ Record the count of each metadata type. This inventory becomes the header of your report.
55
+
56
+ ---
57
+
58
+ ## Step 2 — Security Audit Categories
59
+
60
+ Audit every file from Step 1 against 15 categories. For each category, assign a status:
61
+ PASS (no issues), WARN (minor issues, unlikely to fail review), or FAIL (will likely
62
+ fail AppExchange security review).
63
+
64
+ Audit criteria, grep patterns, and PASS/WARN/FAIL thresholds for all 15 categories:
65
+
66
+ @../_reference/APPEXCHANGE_REVIEW.md
67
+
68
+ Supporting reference for implementation patterns:
69
+
70
+ - CRUD/FLS, sharing, injection, XSS, Named Credentials: @../_reference/SECURITY_PATTERNS.md
71
+ - Sharing model details: @../_reference/SHARING_MODEL.md
72
+ - Testing standards and annotations: @../_reference/TESTING_STANDARDS.md
73
+ - Namespace, versioning, package CLI: @../_reference/PACKAGE_DEVELOPMENT.md
74
+ - Governor limits and anti-patterns: @../_reference/GOVERNOR_LIMITS.md
75
+ - LWC lifecycle and patterns: @../_reference/LWC_PATTERNS.md
76
+
77
+ **Categories:**
78
+
79
+ 1. CRUD/FLS Enforcement (CRITICAL — #1 failure reason)
80
+ 2. Sharing Model Enforcement
81
+ 3. SOQL/DML Injection Prevention
82
+ 4. Sensitive Data Exposure
83
+ 5. XSS and Content Security Policy
84
+ 6. External Callout Security
85
+ 7. Third-Party Library Vulnerabilities
86
+ 8. Code Coverage
87
+ 9. Namespace and Packaging Compliance
88
+ 10. Permission Model
89
+ 11. Governor Limit Safety
90
+ 12. Lightning Web Security (LWS) Compliance
91
+ 13. Connected App and OAuth Configuration
92
+ 14. Data at Rest and in Transit
93
+ 15. Documentation and Submission Readiness
94
+
95
+ ---
96
+
97
+ ## Step 3 — 2GP License Qualification Checklist
98
+
99
+ After the security audit, assess readiness for 2GP licensing and AppExchange distribution.
100
+ Check every item and mark as DONE, NOT DONE, or N/A.
101
+
102
+ Full checklist (Dev Hub, package config, code quality, submission, ISV, post-review):
103
+
104
+ @../_reference/APPEXCHANGE_REVIEW.md (section: 2GP License Qualification Checklist)
105
+
106
+ ---
107
+
108
+ ## Step 4 — Pass/Fail Prediction
109
+
110
+ After completing the audit and checklist, calculate the overall score using the scoring
111
+ rules and produce one of these verdicts: READY TO SUBMIT / NEEDS REMEDIATION / MAJOR
112
+ REWORK NEEDED.
113
+
114
+ Scoring rules and verdict criteria:
115
+
116
+ @../_reference/APPEXCHANGE_REVIEW.md (section: Scoring Rules)
117
+
118
+ ---
119
+
120
+ ## Step 5 — Report Output
121
+
122
+ Generate a markdown report with this structure and save it to `docs/security/security-review-report.md`:
123
+
124
+ ```markdown
125
+ # Security Review Report — [Package Name]
126
+ Generated: [Date]
127
+ Package Version: [version from sfdx-project.json]
128
+ Namespace: [namespace]
129
+
130
+ ## Package Inventory
131
+ | Metadata Type | Count |
132
+ |--------------|-------|
133
+ | Apex Classes | X |
134
+ | ... | ... |
135
+
136
+ ## Security Audit Results
137
+ ### Overall Verdict: [READY TO SUBMIT / NEEDS REMEDIATION / MAJOR REWORK]
138
+ Score: X/15 categories passing
139
+
140
+ ### Category Results
141
+ | # | Category | Status | Issues |
142
+ |---|----------|--------|--------|
143
+ | 1 | CRUD/FLS Enforcement | PASS/WARN/FAIL | Details |
144
+ | ... | ... | ... | ... |
145
+
146
+ ### Critical Findings (FAIL)
147
+ [List each FAIL with file path, line number, and specific remediation]
148
+
149
+ ### Warnings
150
+ [List each WARN with recommendation]
151
+
152
+ ## 2GP License Qualification
153
+ [Checklist with DONE/NOT DONE status for each item]
154
+
155
+ ## Remediation Plan
156
+ [Prioritized list of fixes, ordered by: automatic fails first, then likely fails, then warnings]
157
+
158
+ ## Appendix: Scanner Commands
159
+ [Commands the user should run for Code Analyzer, Checkmarx, etc.]
160
+ ```
161
+
162
+ ---
163
+
164
+ ## Related
165
+
166
+ - Scanner commands: @../_reference/APPEXCHANGE_REVIEW.md (section: Scanner Commands)
167
+ - Top 20 failures: @../_reference/APPEXCHANGE_REVIEW.md (section: Top 20 Failures)
168
+ - 2026 platform changes: @../_reference/APPEXCHANGE_REVIEW.md (section: 2026 Considerations)