scc-universal 1.1.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 (271) hide show
  1. package/.claude-plugin/plugin.json +44 -0
  2. package/.cursor/agents/deep-researcher.md +142 -0
  3. package/.cursor/agents/doc-updater.md +219 -0
  4. package/.cursor/agents/eval-runner.md +335 -0
  5. package/.cursor/agents/learning-engine.md +210 -0
  6. package/.cursor/agents/loop-operator.md +245 -0
  7. package/.cursor/agents/refactor-cleaner.md +119 -0
  8. package/.cursor/agents/sf-admin-agent.md +127 -0
  9. package/.cursor/agents/sf-agentforce-agent.md +126 -0
  10. package/.cursor/agents/sf-apex-agent.md +117 -0
  11. package/.cursor/agents/sf-architect.md +426 -0
  12. package/.cursor/agents/sf-aura-reviewer.md +369 -0
  13. package/.cursor/agents/sf-bugfix-agent.md +101 -0
  14. package/.cursor/agents/sf-flow-agent.md +155 -0
  15. package/.cursor/agents/sf-integration-agent.md +141 -0
  16. package/.cursor/agents/sf-lwc-agent.md +123 -0
  17. package/.cursor/agents/sf-review-agent.md +357 -0
  18. package/.cursor/agents/sf-visualforce-reviewer.md +465 -0
  19. package/.cursor/hooks/adapter.js +81 -0
  20. package/.cursor/hooks/after-file-edit.js +26 -0
  21. package/.cursor/hooks/after-mcp-execution.js +12 -0
  22. package/.cursor/hooks/after-shell-execution.js +30 -0
  23. package/.cursor/hooks/after-tab-file-edit.js +12 -0
  24. package/.cursor/hooks/before-mcp-execution.js +11 -0
  25. package/.cursor/hooks/before-read-file.js +13 -0
  26. package/.cursor/hooks/before-shell-execution.js +29 -0
  27. package/.cursor/hooks/before-submit-prompt.js +23 -0
  28. package/.cursor/hooks/pre-compact.js +7 -0
  29. package/.cursor/hooks/session-end.js +10 -0
  30. package/.cursor/hooks/session-start.js +10 -0
  31. package/.cursor/hooks/stop.js +18 -0
  32. package/.cursor/hooks/subagent-start.js +10 -0
  33. package/.cursor/hooks/subagent-stop.js +10 -0
  34. package/.cursor/hooks.json +107 -0
  35. package/.cursor/skills/aside/SKILL.md +115 -0
  36. package/.cursor/skills/checkpoint/SKILL.md +50 -0
  37. package/.cursor/skills/configure-scc/SKILL.md +160 -0
  38. package/.cursor/skills/continuous-agent-loop/SKILL.md +260 -0
  39. package/.cursor/skills/mcp-server-patterns/SKILL.md +142 -0
  40. package/.cursor/skills/model-route/SKILL.md +81 -0
  41. package/.cursor/skills/prompt-optimizer/SKILL.md +366 -0
  42. package/.cursor/skills/refactor-clean/SKILL.md +133 -0
  43. package/.cursor/skills/resume-session/SKILL.md +111 -0
  44. package/.cursor/skills/save-session/SKILL.md +183 -0
  45. package/.cursor/skills/search-first/SKILL.md +140 -0
  46. package/.cursor/skills/security-scan/SKILL.md +142 -0
  47. package/.cursor/skills/sessions/SKILL.md +124 -0
  48. package/.cursor/skills/sf-agentforce-development/SKILL.md +449 -0
  49. package/.cursor/skills/sf-apex-async-patterns/SKILL.md +324 -0
  50. package/.cursor/skills/sf-apex-best-practices/SKILL.md +421 -0
  51. package/.cursor/skills/sf-apex-constraints/SKILL.md +79 -0
  52. package/.cursor/skills/sf-apex-cursor/SKILL.md +336 -0
  53. package/.cursor/skills/sf-apex-enterprise-patterns/SKILL.md +344 -0
  54. package/.cursor/skills/sf-apex-testing/SKILL.md +407 -0
  55. package/.cursor/skills/sf-api-design/SKILL.md +237 -0
  56. package/.cursor/skills/sf-approval-processes/SKILL.md +312 -0
  57. package/.cursor/skills/sf-aura-development/SKILL.md +260 -0
  58. package/.cursor/skills/sf-build-fix/SKILL.md +120 -0
  59. package/.cursor/skills/sf-data-modeling/SKILL.md +274 -0
  60. package/.cursor/skills/sf-debugging/SKILL.md +362 -0
  61. package/.cursor/skills/sf-deployment/SKILL.md +291 -0
  62. package/.cursor/skills/sf-deployment-constraints/SKILL.md +153 -0
  63. package/.cursor/skills/sf-devops-ci-cd/SKILL.md +322 -0
  64. package/.cursor/skills/sf-docs-lookup/SKILL.md +100 -0
  65. package/.cursor/skills/sf-e2e-testing/SKILL.md +321 -0
  66. package/.cursor/skills/sf-experience-cloud/SKILL.md +248 -0
  67. package/.cursor/skills/sf-flow-development/SKILL.md +376 -0
  68. package/.cursor/skills/sf-governor-limits/SKILL.md +319 -0
  69. package/.cursor/skills/sf-harness-audit/SKILL.md +139 -0
  70. package/.cursor/skills/sf-help/SKILL.md +156 -0
  71. package/.cursor/skills/sf-integration/SKILL.md +479 -0
  72. package/.cursor/skills/sf-lwc-constraints/SKILL.md +128 -0
  73. package/.cursor/skills/sf-lwc-development/SKILL.md +302 -0
  74. package/.cursor/skills/sf-lwc-testing/SKILL.md +387 -0
  75. package/.cursor/skills/sf-metadata-management/SKILL.md +285 -0
  76. package/.cursor/skills/sf-platform-events-cdc/SKILL.md +372 -0
  77. package/.cursor/skills/sf-quickstart/SKILL.md +170 -0
  78. package/.cursor/skills/sf-security/SKILL.md +330 -0
  79. package/.cursor/skills/sf-security-constraints/SKILL.md +125 -0
  80. package/.cursor/skills/sf-soql-constraints/SKILL.md +129 -0
  81. package/.cursor/skills/sf-soql-optimization/SKILL.md +353 -0
  82. package/.cursor/skills/sf-tdd-workflow/SKILL.md +332 -0
  83. package/.cursor/skills/sf-testing-constraints/SKILL.md +198 -0
  84. package/.cursor/skills/sf-trigger-constraints/SKILL.md +88 -0
  85. package/.cursor/skills/sf-trigger-frameworks/SKILL.md +343 -0
  86. package/.cursor/skills/sf-visualforce-development/SKILL.md +259 -0
  87. package/.cursor/skills/strategic-compact/SKILL.md +205 -0
  88. package/.cursor/skills/update-docs/SKILL.md +162 -0
  89. package/.cursor/skills/update-platform-docs/SKILL.md +86 -0
  90. package/.cursor-plugin/plugin.json +26 -0
  91. package/LICENSE +21 -0
  92. package/README.md +522 -0
  93. package/agents/deep-researcher.md +145 -0
  94. package/agents/doc-updater.md +222 -0
  95. package/agents/eval-runner.md +340 -0
  96. package/agents/learning-engine.md +211 -0
  97. package/agents/loop-operator.md +247 -0
  98. package/agents/refactor-cleaner.md +122 -0
  99. package/agents/sf-admin-agent.md +131 -0
  100. package/agents/sf-agentforce-agent.md +132 -0
  101. package/agents/sf-apex-agent.md +124 -0
  102. package/agents/sf-architect.md +435 -0
  103. package/agents/sf-aura-reviewer.md +372 -0
  104. package/agents/sf-bugfix-agent.md +105 -0
  105. package/agents/sf-flow-agent.md +159 -0
  106. package/agents/sf-integration-agent.md +146 -0
  107. package/agents/sf-lwc-agent.md +127 -0
  108. package/agents/sf-review-agent.md +366 -0
  109. package/agents/sf-visualforce-reviewer.md +468 -0
  110. package/assets/logo.svg +18 -0
  111. package/docs/ARCHITECTURE.md +133 -0
  112. package/docs/authoring-guide.md +373 -0
  113. package/docs/hook-development.md +578 -0
  114. package/docs/token-optimization.md +139 -0
  115. package/docs/workflow-examples.md +645 -0
  116. package/examples/agentforce-action/README.md +227 -0
  117. package/examples/apex-trigger-handler/README.md +114 -0
  118. package/examples/devops-pipeline/README.md +325 -0
  119. package/examples/flow-automation/README.md +188 -0
  120. package/examples/integration-pattern/README.md +416 -0
  121. package/examples/lwc-component/README.md +180 -0
  122. package/examples/platform-events/README.md +492 -0
  123. package/examples/scratch-org-setup/README.md +138 -0
  124. package/examples/security-audit/README.md +244 -0
  125. package/examples/visualforce-migration/README.md +314 -0
  126. package/hooks/hooks.json +338 -0
  127. package/hooks/memory-persistence/README.md +73 -0
  128. package/manifests/install-modules.json +217 -0
  129. package/manifests/install-profiles.json +17 -0
  130. package/mcp-configs/mcp-servers.json +19 -0
  131. package/package.json +89 -0
  132. package/schemas/hooks.schema.json +123 -0
  133. package/schemas/install-modules.schema.json +76 -0
  134. package/schemas/install-profiles.schema.json +28 -0
  135. package/schemas/install-state.schema.json +73 -0
  136. package/schemas/package-manager.schema.json +18 -0
  137. package/schemas/plugin.schema.json +112 -0
  138. package/schemas/scc-install-config.schema.json +29 -0
  139. package/schemas/state-store.schema.json +111 -0
  140. package/scripts/cli/install-apply.js +170 -0
  141. package/scripts/cli/uninstall.js +193 -0
  142. package/scripts/hooks/check-console-log.js +101 -0
  143. package/scripts/hooks/check-hook-enabled.js +17 -0
  144. package/scripts/hooks/check-platform-docs-age.js +48 -0
  145. package/scripts/hooks/cost-tracker.js +78 -0
  146. package/scripts/hooks/doc-file-warning.js +63 -0
  147. package/scripts/hooks/evaluate-session.js +98 -0
  148. package/scripts/hooks/governor-check.js +220 -0
  149. package/scripts/hooks/learning-observe.sh +206 -0
  150. package/scripts/hooks/mcp-health-check.js +588 -0
  151. package/scripts/hooks/post-bash-build-complete.js +34 -0
  152. package/scripts/hooks/post-bash-pr-created.js +43 -0
  153. package/scripts/hooks/post-edit-console-warn.js +61 -0
  154. package/scripts/hooks/post-edit-format.js +79 -0
  155. package/scripts/hooks/post-edit-typecheck.js +98 -0
  156. package/scripts/hooks/post-write.js +168 -0
  157. package/scripts/hooks/pre-bash-git-push-reminder.js +35 -0
  158. package/scripts/hooks/pre-bash-tmux-reminder.js +47 -0
  159. package/scripts/hooks/pre-compact.js +51 -0
  160. package/scripts/hooks/pre-tool-use.js +163 -0
  161. package/scripts/hooks/pre-write-doc-warn.js +9 -0
  162. package/scripts/hooks/quality-gate.js +251 -0
  163. package/scripts/hooks/run-with-flags-shell.sh +32 -0
  164. package/scripts/hooks/run-with-flags.js +135 -0
  165. package/scripts/hooks/session-end-marker.js +29 -0
  166. package/scripts/hooks/session-end.js +311 -0
  167. package/scripts/hooks/session-start.js +202 -0
  168. package/scripts/hooks/sfdx-scanner-check.js +142 -0
  169. package/scripts/hooks/sfdx-validate.js +119 -0
  170. package/scripts/hooks/stop-hook.js +170 -0
  171. package/scripts/hooks/suggest-compact.js +67 -0
  172. package/scripts/lib/agent-adapter.js +82 -0
  173. package/scripts/lib/apex-analysis.js +194 -0
  174. package/scripts/lib/hook-flags.js +74 -0
  175. package/scripts/lib/install-config.js +73 -0
  176. package/scripts/lib/install-executor.js +363 -0
  177. package/scripts/lib/install-state.js +121 -0
  178. package/scripts/lib/orchestration-session.js +299 -0
  179. package/scripts/lib/package-manager.js +124 -0
  180. package/scripts/lib/project-detect.js +228 -0
  181. package/scripts/lib/schema-validator.js +190 -0
  182. package/scripts/lib/skill-adapter.js +100 -0
  183. package/scripts/lib/state-store.js +376 -0
  184. package/scripts/lib/tmux-worktree-orchestrator.js +598 -0
  185. package/scripts/lib/utils.js +313 -0
  186. package/scripts/scc.js +164 -0
  187. package/skills/_reference/AGENTFORCE_PATTERNS.md +112 -0
  188. package/skills/_reference/APEX_CURSOR.md +159 -0
  189. package/skills/_reference/API_VERSIONS.md +78 -0
  190. package/skills/_reference/APPROVAL_PROCESSES.md +105 -0
  191. package/skills/_reference/ASYNC_PATTERNS.md +163 -0
  192. package/skills/_reference/AURA_COMPONENTS.md +146 -0
  193. package/skills/_reference/DATA_MIGRATION_PATTERNS.md +151 -0
  194. package/skills/_reference/DATA_MODELING.md +124 -0
  195. package/skills/_reference/DEBUGGING_TOOLS.md +140 -0
  196. package/skills/_reference/DEPLOYMENT_CHECKLIST.md +87 -0
  197. package/skills/_reference/DEPRECATIONS.md +79 -0
  198. package/skills/_reference/DOCKER_CI_PATTERNS.md +138 -0
  199. package/skills/_reference/ENTERPRISE_PATTERNS.md +122 -0
  200. package/skills/_reference/EXPERIENCE_CLOUD.md +143 -0
  201. package/skills/_reference/FLOW_PATTERNS.md +113 -0
  202. package/skills/_reference/GOVERNOR_LIMITS.md +77 -0
  203. package/skills/_reference/INTEGRATION_PATTERNS.md +105 -0
  204. package/skills/_reference/LWC_PATTERNS.md +79 -0
  205. package/skills/_reference/METADATA_TYPES.md +115 -0
  206. package/skills/_reference/NAMING_CONVENTIONS.md +84 -0
  207. package/skills/_reference/PACKAGE_DEVELOPMENT.md +150 -0
  208. package/skills/_reference/PLATFORM_EVENTS.md +121 -0
  209. package/skills/_reference/REPORTING_API.md +143 -0
  210. package/skills/_reference/SCRATCH_ORG_PATTERNS.md +126 -0
  211. package/skills/_reference/SECURITY_PATTERNS.md +127 -0
  212. package/skills/_reference/SHARING_MODEL.md +120 -0
  213. package/skills/_reference/SOQL_PATTERNS.md +119 -0
  214. package/skills/_reference/TESTING_STANDARDS.md +96 -0
  215. package/skills/_reference/TRIGGER_PATTERNS.md +114 -0
  216. package/skills/_reference/VISUALFORCE_PATTERNS.md +121 -0
  217. package/skills/aside/SKILL.md +118 -0
  218. package/skills/checkpoint/SKILL.md +53 -0
  219. package/skills/configure-scc/SKILL.md +163 -0
  220. package/skills/continuous-agent-loop/SKILL.md +264 -0
  221. package/skills/mcp-server-patterns/SKILL.md +146 -0
  222. package/skills/model-route/SKILL.md +84 -0
  223. package/skills/prompt-optimizer/SKILL.md +369 -0
  224. package/skills/refactor-clean/SKILL.md +136 -0
  225. package/skills/resume-session/SKILL.md +114 -0
  226. package/skills/save-session/SKILL.md +186 -0
  227. package/skills/search-first/SKILL.md +144 -0
  228. package/skills/security-scan/SKILL.md +146 -0
  229. package/skills/sessions/SKILL.md +127 -0
  230. package/skills/sf-agentforce-development/SKILL.md +450 -0
  231. package/skills/sf-apex-async-patterns/SKILL.md +326 -0
  232. package/skills/sf-apex-best-practices/SKILL.md +425 -0
  233. package/skills/sf-apex-constraints/SKILL.md +81 -0
  234. package/skills/sf-apex-cursor/SKILL.md +338 -0
  235. package/skills/sf-apex-enterprise-patterns/SKILL.md +348 -0
  236. package/skills/sf-apex-testing/SKILL.md +409 -0
  237. package/skills/sf-api-design/SKILL.md +238 -0
  238. package/skills/sf-approval-processes/SKILL.md +315 -0
  239. package/skills/sf-aura-development/SKILL.md +263 -0
  240. package/skills/sf-build-fix/SKILL.md +121 -0
  241. package/skills/sf-data-modeling/SKILL.md +278 -0
  242. package/skills/sf-debugging/SKILL.md +363 -0
  243. package/skills/sf-deployment/SKILL.md +295 -0
  244. package/skills/sf-deployment-constraints/SKILL.md +155 -0
  245. package/skills/sf-devops-ci-cd/SKILL.md +325 -0
  246. package/skills/sf-docs-lookup/SKILL.md +103 -0
  247. package/skills/sf-e2e-testing/SKILL.md +324 -0
  248. package/skills/sf-experience-cloud/SKILL.md +249 -0
  249. package/skills/sf-flow-development/SKILL.md +377 -0
  250. package/skills/sf-governor-limits/SKILL.md +323 -0
  251. package/skills/sf-harness-audit/SKILL.md +142 -0
  252. package/skills/sf-help/SKILL.md +159 -0
  253. package/skills/sf-integration/SKILL.md +483 -0
  254. package/skills/sf-lwc-constraints/SKILL.md +130 -0
  255. package/skills/sf-lwc-development/SKILL.md +303 -0
  256. package/skills/sf-lwc-testing/SKILL.md +388 -0
  257. package/skills/sf-metadata-management/SKILL.md +288 -0
  258. package/skills/sf-platform-events-cdc/SKILL.md +375 -0
  259. package/skills/sf-quickstart/SKILL.md +173 -0
  260. package/skills/sf-security/SKILL.md +334 -0
  261. package/skills/sf-security-constraints/SKILL.md +127 -0
  262. package/skills/sf-soql-constraints/SKILL.md +131 -0
  263. package/skills/sf-soql-optimization/SKILL.md +354 -0
  264. package/skills/sf-tdd-workflow/SKILL.md +336 -0
  265. package/skills/sf-testing-constraints/SKILL.md +200 -0
  266. package/skills/sf-trigger-constraints/SKILL.md +90 -0
  267. package/skills/sf-trigger-frameworks/SKILL.md +347 -0
  268. package/skills/sf-visualforce-development/SKILL.md +260 -0
  269. package/skills/strategic-compact/SKILL.md +208 -0
  270. package/skills/update-docs/SKILL.md +165 -0
  271. package/skills/update-platform-docs/SKILL.md +90 -0
package/README.md ADDED
@@ -0,0 +1,522 @@
1
+ # Salesforce Claude Code (SCC)
2
+
3
+ [![npm version](https://img.shields.io/npm/v/scc-universal.svg)](https://www.npmjs.com/package/scc-universal)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
+ [![Node Version](https://img.shields.io/node/v/scc-universal.svg)](https://nodejs.org)
6
+
7
+ > The complete AI development system for Salesforce — expert agents, automated quality gates, and institutional knowledge, powered by @salesforce/mcp
8
+
9
+ SCC (`scc-universal` on npm) is a Claude Code plugin that supercharges your Salesforce development workflow with specialized AI agents, domain skills, lifecycle hooks, and always-on coding rules. Built for Apex, LWC, SOQL, Flow, Visualforce, Aura, DevOps, and Agentforce — covering every layer of the Salesforce platform.
10
+
11
+ ---
12
+
13
+ ## How It Works
14
+
15
+ SCC is a unified system where each layer serves a distinct role:
16
+
17
+ | Layer | What It Does | Examples |
18
+ |-------|-------------|----------|
19
+ | **@salesforce/mcp** | Platform capabilities — query orgs, deploy metadata, run tests, analyze code | Org management, SOQL queries, Apex test execution |
20
+ | **17 Agents** | Lean full-stack agents that design, build, test, and review | `sf-architect`, `sf-apex-agent`, `sf-lwc-agent`, `sf-review-agent` |
21
+ | **55 Skills** | Institutional knowledge + workflows — 17 user-invocable via `/skill-name`, 38 auto-activating | `/sf-help`, `/sf-quickstart`, `/configure-scc`, `/sessions` |
22
+ | **7 Constraint Skills** | Always-on governance via auto-activating skills | `sf-apex-constraints`, `sf-soql-constraints`, `sf-security-constraints`, `sf-trigger-constraints` |
23
+ | **29 Hooks** | Automated enforcement — quality gates run on every code change | SOQL-in-loop detection, PMD via sf scanner, privilege escalation checks |
24
+
25
+ **Together:** `@salesforce/mcp` gives Claude the hands to work with Salesforce. SCC gives Claude the brain to work well.
26
+
27
+ ---
28
+
29
+ ## What's Included
30
+
31
+ | Category | Count | Description |
32
+ |---|---|---|
33
+ | Agents | 17 | Specialized Salesforce subagents (11 domain + 6 platform) |
34
+ | Skills | 55 | Domain knowledge + workflow modules (17 user-invocable, 38 auto-activating) |
35
+ | Hooks | 29 | Lifecycle hooks (SessionStart, PreToolUse, PostToolUse, PostToolUseFailure, PreCompact, Stop, SessionEnd) |
36
+ | Harnesses | 2 | Claude Code, Cursor |
37
+
38
+ ---
39
+
40
+ ## Requirements
41
+
42
+ - **Node.js >= 20** — required to run the `npx scc` CLI
43
+ - **Python 3.x** — required for learning-engine agent (instinct CLI)
44
+
45
+ ---
46
+
47
+ ## Quick Install
48
+
49
+ ```bash
50
+ # Install everything
51
+ npx scc install all
52
+
53
+ # Install only Apex
54
+ npx scc install apex
55
+
56
+ # Install only LWC
57
+ npx scc install lwc
58
+
59
+ # Install only DevOps
60
+ npx scc install devops
61
+
62
+ # Diagnose / repair installed files
63
+ npx scc doctor
64
+ npx scc repair
65
+ ```
66
+
67
+ ### CLI Reference
68
+
69
+ | Command | Description |
70
+ |---|---|
71
+ | `scc install <target>` | Install SCC content (apex, lwc, all) |
72
+ | `scc plan` | Preview install manifest (dry run) |
73
+ | `scc list-installed` | Show currently installed SCC files |
74
+ | `scc doctor` | Diagnose missing or drifted files |
75
+ | `scc repair` | Restore drifted files |
76
+ | `scc status` | Query JSON state store |
77
+ | `scc sessions` | List saved sessions |
78
+ | `scc session-inspect` | Inspect a specific session's details |
79
+ | `scc uninstall` | Remove SCC-managed files |
80
+
81
+ **Install flags:**
82
+
83
+ | Flag | Description |
84
+ |---|---|
85
+ | `--profile <name>` | Install profile: `apex`, `lwc`, or `full` (default) |
86
+ | `--target <harness>` | Target harness: `claude` (default) or `cursor` |
87
+ | `--config <path>` | Custom install manifest path |
88
+ | `--dry-run` | Preview changes without applying (works with repair, uninstall) |
89
+ | `--json` | Output in JSON format |
90
+ | `--yes` | Skip confirmation prompts |
91
+
92
+ ### Install Modules
93
+
94
+ SCC content is organized into 7 modules. Profiles compose subsets:
95
+
96
+ | Module | Description | Depends On |
97
+ |---|---|---|
98
+ | `core` | Essential agents, core skills, lifecycle hooks | — |
99
+ | `apex` | Apex agents, skills, SOQL, constraints | core |
100
+ | `lwc` | LWC agent, skills, constraints | core |
101
+ | `platform` | Cross-domain agents, universal skills, debugging, integration | core |
102
+ | `devops` | CI/CD, deployment, scratch orgs | core |
103
+ | `security` | Security agent, CRUD/FLS, governor limits, SOQL optimization | core |
104
+ | `extended` | Flow, Visualforce, Aura, Agentforce, Admin, Events, API design | core |
105
+
106
+ | Profile | Modules Included |
107
+ |---|---|
108
+ | `apex` | core + apex + platform + devops + security |
109
+ | `lwc` | core + lwc + platform + devops + security |
110
+ | `full` | All 7 modules (default) |
111
+
112
+ ### Harness-Specific Instructions
113
+
114
+ **Claude Code** — files are auto-installed via `npx scc install all`. Agents, skills, commands, rules, and hooks are all activated.
115
+
116
+ **Cursor** — run `npx scc install all --target cursor`. Agents, skills, rules, and MCP config are auto-installed to `.cursor/` directory.
117
+
118
+ ---
119
+
120
+ ## Key Features
121
+
122
+ ### Apex Best Practices
123
+
124
+ - Bulkification patterns, governor limit awareness, and collections-first coding
125
+ - Trigger handler framework integration (FFLIB Enterprise Patterns + pragmatic single-trigger)
126
+ - Async Apex: Queueable, Batch, Schedulable design patterns
127
+ - Exception handling, custom exception hierarchies, and structured logging
128
+
129
+ ### LWC Patterns
130
+
131
+ - Component lifecycle management and reactive property wiring
132
+ - Base component usage, composition over inheritance
133
+ - Accessibility (ARIA) compliance and keyboard navigation
134
+ - Wire adapters, imperative Apex calls, and error boundary patterns
135
+
136
+ ### SOQL Optimization
137
+
138
+ - Index-aware WHERE clause construction and selectivity guidance
139
+ - Avoiding full-table scans and non-selective filters
140
+ - Parent-child relationship queries and aggregate optimization
141
+ - SOQL in loops detection and bulk query strategies
142
+
143
+ ### Trigger Frameworks
144
+
145
+ - FFLIB-style trigger dispatcher and domain layer integration
146
+ - Pragmatic single-trigger-per-object with handler routing
147
+ - Recursive prevention patterns and context-aware execution
148
+ - TriggerOperation enum usage and before/after separation
149
+
150
+ ### Security — CRUD / FLS / Sharing
151
+
152
+ - Schema.SObjectField.getDescribe() for FLS checks
153
+ - WITH SECURITY_ENFORCED and stripInaccessible() usage
154
+ - Sharing model enforcement and without sharing justification
155
+ - SOQL injection prevention and safe dynamic queries
156
+
157
+ ### DevOps / CI-CD
158
+
159
+ - SF CLI v2 (sf) command patterns and project structure
160
+ - Scratch org creation, source push/pull, and org pooling
161
+ - Metadata API vs Source format understanding
162
+ - GitHub Actions / GitLab CI pipeline patterns for Salesforce
163
+
164
+ ### Agentforce AI Agents
165
+
166
+ - Agentforce Agent Builder configuration and topic definitions
167
+ - Custom action creation (Apex, Flow, prompt templates)
168
+ - Agent testing and conversation design patterns
169
+ - Einstein AI feature integration
170
+
171
+ ### Salesforce MCP Integration
172
+
173
+ SCC is designed to complement the official [Salesforce MCP server](https://github.com/salesforce/salesforce-mcp). Install both for the full experience:
174
+
175
+ - **@salesforce/mcp** provides: org management, metadata deployment, SOQL queries, Apex test execution, code analysis, LWC tools, DevOps operations
176
+ - **SCC provides**: domain expertise to use those tools correctly, quality gates to catch mistakes, and institutional knowledge to follow best practices
177
+
178
+ MCP config is auto-installed by `npx scc install`:
179
+
180
+ ```bash
181
+ npx scc install all --target claude # Installs .mcp.json at project root
182
+ npx scc install all --target cursor # Installs .cursor/mcp.json
183
+ ```
184
+
185
+ ### Enhanced Quality Gates
186
+
187
+ SCC integrates with [Salesforce Code Analyzer](https://developer.salesforce.com/tools/sfdx-scanner) for machine-enforceable checks:
188
+
189
+ ```bash
190
+ # Install the scanner (one-time setup)
191
+ sf plugins install @salesforce/sfdx-scanner
192
+ ```
193
+
194
+ Once installed, SCC automatically runs PMD analysis:
195
+
196
+ - **Standard profile**: Scanner runs before `git push` and `sf project deploy`
197
+ - **Strict profile**: Scanner runs on every code edit
198
+ - Graceful no-op if scanner is not installed — SCC falls back to regex-based checks
199
+
200
+ ### Cross-Harness Support
201
+
202
+ All content is structured for use across multiple AI harnesses:
203
+
204
+ - **Claude Code** — primary harness with full hook integration
205
+ - **Cursor** — rules, skills, and hooks exported to `.cursor/` directory
206
+
207
+ ---
208
+
209
+ ## Agents
210
+
211
+ | Agent | Description |
212
+ |---|---|
213
+ | `sf-architect` | Orchestrator — analyze requirements, design solutions, decompose tasks, final review |
214
+ | `sf-apex-agent` | All Apex — classes, triggers, batch, async, callouts, tests (TDD) |
215
+ | `sf-lwc-agent` | All LWC — components, Jest tests, wire service, events, SLDS |
216
+ | `sf-flow-agent` | All Flow — record-triggered, screen, scheduled, approval processes |
217
+ | `sf-admin-agent` | All config — objects, permissions, sharing, metadata, Experience Cloud |
218
+ | `sf-integration-agent` | All integration — REST/SOAP callouts, Named Creds, Platform Events, CDC |
219
+ | `sf-agentforce-agent` | Agentforce — topics, custom Apex actions, prompt templates |
220
+ | `sf-review-agent` | Cross-domain review — security audit, performance, test coverage |
221
+ | `sf-bugfix-agent` | Fix build errors, test failures, deploy issues (minimal diff) |
222
+ | `sf-aura-reviewer` | Aura component review and LWC migration guidance |
223
+ | `sf-visualforce-reviewer` | Visualforce page review and migration guidance |
224
+ | `doc-updater` | Documentation generation and maintenance |
225
+ | `refactor-cleaner` | Code refactoring and cleanup |
226
+ | `loop-operator` | Autonomous loop execution and monitoring |
227
+ | `deep-researcher` | Multi-source Salesforce research and synthesis |
228
+ | `learning-engine` | Continuous learning from session patterns |
229
+ | `eval-runner` | Eval suite definition and execution |
230
+
231
+ ---
232
+
233
+ ## Skills
234
+
235
+ | Skill | Description |
236
+ |---|---|
237
+ | `sf-agentforce-development` | Agentforce agent design, topics, and actions |
238
+ | `sf-apex-async-patterns` | Queueable, Batch, Schedulable design |
239
+ | `sf-apex-best-practices` | Apex coding standards and patterns |
240
+ | `sf-apex-cursor` | Apex cursor-based pagination patterns |
241
+ | `sf-apex-enterprise-patterns` | FFLIB and enterprise Apex patterns |
242
+ | `sf-apex-testing` | @IsTest, test data factories, mock patterns |
243
+ | `configure-scc` | SCC plugin configuration and setup |
244
+ | `sf-devops-ci-cd` | GitHub Actions / GitLab CI for Salesforce |
245
+ | `sf-flow-development` | Flow types, fault handling, bulkification |
246
+ | `sf-governor-limits` | Limit tracking, monitoring, and avoidance |
247
+ | `sf-lwc-development` | Component composition, lifecycle, reactivity |
248
+ | `sf-lwc-testing` | LWC Jest testing and component test patterns |
249
+ | `sf-metadata-management` | Metadata API and source format management |
250
+ | `sf-data-modeling` | Object model, relationships, and data design |
251
+ | `sf-debugging` | Debug logs, checkpoints, and trace flags |
252
+ | `sf-deployment` | Deployment validation, partial deploys, rollback |
253
+ | `sf-integration` | REST/SOAP callouts, named credentials, auth |
254
+ | `sf-security` | CRUD/FLS, sharing, stripInaccessible patterns |
255
+ | `sf-api-design` | Salesforce API design and best practices |
256
+ | `sf-e2e-testing` | End-to-end testing for Salesforce apps |
257
+ | `sf-tdd-workflow` | Test-driven development for Salesforce |
258
+ | `sf-soql-optimization` | Index strategies, selective queries, bulkification |
259
+ | `strategic-compact` | Strategic context compaction patterns |
260
+ | `sf-trigger-frameworks` | FFLIB and pragmatic trigger handler patterns |
261
+ | `mcp-server-patterns` | MCP server design and integration patterns |
262
+ | `search-first` | Search-first development methodology |
263
+ | `security-scan` | Security scanning patterns and automation |
264
+ | `continuous-agent-loop` | Continuous autonomous agent loop patterns and controls |
265
+ | `prompt-optimizer` | Analyze and rewrite prompts to match SCC components for better agent performance |
266
+ | `sf-visualforce-development` | Visualforce page patterns, controllers, and migration to LWC |
267
+ | `sf-aura-development` | Aura component patterns and LWC migration strategies |
268
+ | `sf-platform-events-cdc` | Platform Events and Change Data Capture patterns |
269
+ | `sf-approval-processes` | Approval process design and automation patterns |
270
+ | `sf-experience-cloud` | Experience Cloud site development and customization |
271
+ | `sf-docs-lookup` | Official Salesforce documentation lookup |
272
+ | `sf-help` | Discover SCC skills, agents, and workflows |
273
+ | `sf-quickstart` | Interactive onboarding and project detection |
274
+ | `sf-build-fix` | Build error resolution and dependency fixes |
275
+ | `sf-harness-audit` | Audit SCC harness configuration |
276
+ | `update-platform-docs` | Update platform reference documentation |
277
+ | `aside` | Quick Salesforce answer mid-task without losing context |
278
+ | `checkpoint` | Save a development checkpoint via git stash for rollback |
279
+ | `model-route` | Route tasks to optimal Claude model tier by complexity |
280
+ | `refactor-clean` | Dead code removal and consolidation via PMD/Code Analyzer |
281
+ | `resume-session` | Resume a saved Salesforce development session |
282
+ | `save-session` | Persist session state for future resumption |
283
+ | `sessions` | List, load, and inspect saved sessions |
284
+ | `update-docs` | Sync documentation after Apex code changes |
285
+ | `sf-apex-constraints` | Always-on: governor limits, naming, bulkification rules |
286
+ | `sf-deployment-constraints` | Always-on: deploy safety, validation-only first, rollback readiness |
287
+ | `sf-lwc-constraints` | Always-on: LWC naming, security, accessibility, performance |
288
+ | `sf-security-constraints` | Always-on: CRUD/FLS, sharing, SOQL injection, XSS |
289
+ | `sf-soql-constraints` | Always-on: query safety, selectivity, governor compliance |
290
+ | `sf-testing-constraints` | Always-on: 75% coverage minimum, test isolation, assertions |
291
+ | `sf-trigger-constraints` | Always-on: one-trigger-per-object, handler delegation, recursion |
292
+
293
+ ---
294
+
295
+ ## Skills
296
+
297
+ 17 skills are user-invocable via `/skill-name`. 38 are auto-activating context skills (28 pattern + 7 constraint + 3 platform).
298
+
299
+ ### User-Invocable (17)
300
+
301
+ Invoke with `/skill-name` in Claude Code or Cursor.
302
+
303
+ | Skill | Description |
304
+ |---|---|
305
+ | `/sf-help` | Discover SCC skills, agents, and workflows |
306
+ | `/sf-quickstart` | Interactive onboarding and project detection |
307
+ | `/sf-docs-lookup` | Look up Salesforce documentation |
308
+ | `/sf-harness-audit` | Audit SCC harness configuration |
309
+ | `/sessions` | List and manage sessions |
310
+ | `/configure-scc` | Interactive SCC setup wizard for profiles, modules, and org config |
311
+ | `/continuous-agent-loop` | Multi-agent orchestration and autonomous loops |
312
+ | `/prompt-optimizer` | Optimize prompts for better agent performance |
313
+ | `/checkpoint` | Save a development checkpoint for rollback |
314
+ | `/save-session` | Save current session state |
315
+ | `/resume-session` | Resume a saved session |
316
+ | `/refactor-clean` | Dead code removal and consolidation |
317
+ | `/update-docs` | Update project documentation |
318
+ | `/update-platform-docs` | Update platform reference docs with latest release features |
319
+ | `/aside` | Quick side investigation without losing context |
320
+ | `/model-route` | Route tasks to optimal model by complexity |
321
+ | `/search-first` | Research existing tools and patterns before writing custom code |
322
+
323
+ ### Pattern Skills (28) — Agent-Consulted
324
+
325
+ Agents read these on demand for domain knowledge. Not directly invocable via `/`.
326
+
327
+ | Skill | Description |
328
+ |---|---|
329
+ | `sf-apex-best-practices` | Apex code review — governor limits, bulkification, security, patterns |
330
+ | `sf-apex-testing` | Run and analyze Apex test results with coverage |
331
+ | `sf-apex-async-patterns` | Batch vs Queueable vs @future decision framework |
332
+ | `sf-apex-enterprise-patterns` | FFLIB selector/domain/service/UoW layers |
333
+ | `sf-apex-cursor` | Cursor API for large SOQL result sets |
334
+ | `sf-trigger-frameworks` | Trigger framework patterns — One-Trigger-Per-Object, handler base class |
335
+ | `sf-soql-optimization` | Analyze and optimize SOQL queries for performance |
336
+ | `sf-governor-limits` | Governor limit audit — SOQL, DML, heap, CPU, callouts |
337
+ | `sf-lwc-development` | LWC component review — architecture, reactivity, accessibility |
338
+ | `sf-lwc-testing` | Jest testing for LWC — mocks, DOM queries, accessibility |
339
+ | `sf-flow-development` | Review Flows for best practices and anti-patterns |
340
+ | `sf-approval-processes` | Approval lifecycle, multi-step, delegation patterns |
341
+ | `sf-data-modeling` | Data modeling, sharing rules, and admin configuration |
342
+ | `sf-experience-cloud` | Experience Cloud sites, guest users, external sharing |
343
+ | `sf-metadata-management` | package.xml, .forceignore, source tracking |
344
+ | `sf-integration` | REST/SOAP callouts, Named Credentials, retry patterns |
345
+ | `sf-platform-events-cdc` | Platform Events and Change Data Capture review |
346
+ | `sf-api-design` | Custom REST endpoints, batch operations |
347
+ | `sf-agentforce-development` | Design and configure an Agentforce AI agent |
348
+ | `sf-security` | Security audit — CRUD/FLS, sharing, SOQL injection, XSS |
349
+ | `sf-e2e-testing` | End-to-end test patterns and deployment verification |
350
+ | `sf-debugging` | Debug using logs, debug levels, and tracing |
351
+ | `sf-deployment` | Deployment workflow — validate, test, deploy to sandbox or production |
352
+ | `sf-devops-ci-cd` | GitHub Actions, CI/CD, scratch org CI |
353
+ | `sf-tdd-workflow` | Test-driven Apex development with test-first workflow |
354
+ | `sf-build-fix` | Fix build errors and resolve dependencies |
355
+ | `sf-visualforce-development` | Visualforce review — XSS, ViewState, LWC migration |
356
+ | `sf-aura-development` | Aura component review — Locker Service, LWC migration |
357
+
358
+ ### Auto-Activating Skills
359
+
360
+ 38 skills activate automatically during development — no `/` invocation needed.
361
+
362
+ **Constraint Skills (always-on governance):**
363
+
364
+ | Skill | Enforces |
365
+ |---|---|
366
+ | `sf-apex-constraints` | Governor limits, naming conventions, bulkification, security |
367
+ | `sf-deployment-constraints` | Validation-only first, test coverage gates, metadata ordering |
368
+ | `sf-lwc-constraints` | LWC naming, security, accessibility, performance rules |
369
+ | `sf-security-constraints` | CRUD/FLS, sharing model, SOQL injection, XSS protection |
370
+ | `sf-soql-constraints` | Query safety, selectivity, governor limit compliance |
371
+ | `sf-testing-constraints` | 75% coverage minimum, test isolation, assertion requirements |
372
+ | `sf-trigger-constraints` | One-trigger-per-object, handler delegation, recursion prevention |
373
+
374
+ **Platform Context Skills (3):**
375
+
376
+ | Skill | Activates When |
377
+ |---|---|
378
+ | `mcp-server-patterns` | Building MCP servers for Salesforce integration |
379
+ | `security-scan` | Scanning Claude Code config for vulnerabilities and misconfigurations |
380
+ | `strategic-compact` | Managing context during long development sessions |
381
+
382
+ Pattern skills (28, listed above) also activate contextually when their domain is relevant.
383
+
384
+ ---
385
+
386
+ ## Hook Profiles
387
+
388
+ Control which hooks run via the `SCC_HOOK_PROFILE` environment variable:
389
+
390
+ | Profile | Description |
391
+ |---|---|
392
+ | `minimal` | Only critical hooks (session start context display) |
393
+ | `standard` | Recommended — session start + pre-tool validation + post-write reminders (default) |
394
+ | `strict` | All hooks enabled with additional enforcement and stop-hook summaries |
395
+
396
+ ### Environment Variables
397
+
398
+ | Variable | Values | Description |
399
+ |---|---|---|
400
+ | `SCC_HOOK_PROFILE` | `minimal`, `standard`, `strict` | Controls which hooks run (default: `standard`) |
401
+ | `SCC_DISABLED_HOOKS` | Comma-separated names | Disable specific hooks (e.g., `session-start,auto-format`) |
402
+ | `SF_ORG_ALIAS` | Any org alias | Default Salesforce target org for session context |
403
+ | `CLAUDE_PACKAGE_MANAGER` | `npm`, `pnpm`, `yarn`, `bun` | Override auto-detected package manager |
404
+
405
+ ---
406
+
407
+ ## Tips and Best Practices
408
+
409
+ ### Salesforce-Specific Workflows
410
+
411
+ **New Feature Development:**
412
+
413
+ 1. `/blueprint` - Plan the implementation (metadata types, governor limits)
414
+ 2. `/sf-tdd-workflow` - Write tests first, then implement
415
+ 3. `/sf-apex-best-practices` - Review your code
416
+ 4. `/sf-deployment` - Deploy to target org
417
+
418
+ **Code Review:**
419
+
420
+ 1. `/sf-apex-best-practices` - Full review of uncommitted changes
421
+ 2. `/sf-security` - Security-focused audit
422
+ 3. `/sf-governor-limits` - Check for governor limit issues
423
+
424
+ **Performance Optimization:**
425
+
426
+ 1. `/sf-soql-optimization` - Fix expensive queries
427
+ 2. `/sf-governor-limits` - Find limit violations
428
+ 3. Use the `sf-review-agent` for deep analysis
429
+
430
+ ### Context Window Management
431
+
432
+ - Keep MCP servers minimal (SF CLI MCP + 2-3 others)
433
+ - Use specific prompts: "Review AccountTrigger.cls" not "review everything"
434
+ - Use `/compact` when context gets large
435
+
436
+ ### Parallel Workflows
437
+
438
+ - Use `/fork` for non-overlapping tasks
439
+ - Use git worktrees for parallel scratch org work:
440
+
441
+ ```bash
442
+ git worktree add ../feature-branch feature-branch
443
+ cd ../feature-branch
444
+ sf org create scratch --alias feature-scratch
445
+ ```
446
+
447
+ ### Key Principles
448
+
449
+ 1. **Governor limits are king** — Every agent checks for limit violations
450
+ 2. **Test-first approach** — 75% is the SF minimum, aim for 85%+
451
+ 3. **Use the right agent** — Specialized agents give better results than generic prompts
452
+ 4. **Hook profiles matter** — Start with `standard`, move to `strict` for CI
453
+ 5. **Context is precious** — Be specific in prompts, disable unused MCPs
454
+ 6. **Security baked in** — CRUD/FLS and sharing model from the start
455
+
456
+ ---
457
+
458
+ ## Documentation
459
+
460
+ | Guide | Description |
461
+ |---|---|
462
+ | [Hook Development](docs/hook-development.md) | How to create, test, and deploy hooks with profile gating |
463
+ | [Authoring Guide](docs/authoring-guide.md) | Templates for creating agents, skills, and rules |
464
+ | [Workflow Examples](docs/workflow-examples.md) | Step-by-step walkthroughs for Apex TDD, LWC dev, deployment, security audit |
465
+ | [Architecture](docs/ARCHITECTURE.md) | System design overview with diagrams |
466
+ | [Token Optimization](docs/token-optimization.md) | Settings and habits to reduce token consumption |
467
+ | [Security Guide](the-security-guide.md) | CRUD/FLS, injection prevention, encryption, session security |
468
+ | [Troubleshooting](TROUBLESHOOTING.md) | Common issues and solutions |
469
+ | [Changelog](CHANGELOG.md) | Version history and release notes |
470
+
471
+ ---
472
+
473
+ ## Example Patterns
474
+
475
+ Production-ready implementations demonstrating Salesforce best practices:
476
+
477
+ | Pattern | Description |
478
+ |---|---|
479
+ | [Apex Trigger Handler](examples/apex-trigger-handler/) | One-trigger-per-object with virtual base handler |
480
+ | [LWC Component](examples/lwc-component/) | Wire service, Apex calls, Jest tests, meta.xml |
481
+ | [Platform Events & CDC](examples/platform-events/) | Real-time event-driven architecture with empApi |
482
+ | [Integration Pattern](examples/integration-pattern/) | Named Credentials, retry logic, async callouts |
483
+ | [Flow Automation](examples/flow-automation/) | Record-Triggered Before Save Flow with XML metadata |
484
+ | [Security Audit](examples/security-audit/) | CRUD/FLS, SOQL injection prevention, sharing model |
485
+ | [Agentforce Action](examples/agentforce-action/) | @InvocableMethod with structured inputs/outputs |
486
+ | [DevOps Pipeline](examples/devops-pipeline/) | GitHub Actions CI/CD with scratch orgs |
487
+ | [Scratch Org Setup](examples/scratch-org-setup/) | Automated org creation and data loading |
488
+ | [Visualforce Migration](examples/visualforce-migration/) | VF-to-LWC conversion patterns |
489
+
490
+ ---
491
+
492
+ ## Contributing
493
+
494
+ Contributions are welcome! Please follow these guidelines:
495
+
496
+ 1. Follow the existing file naming convention: lowercase with hyphens.
497
+ 2. All agents must have valid YAML frontmatter (`name`, `description`, `tools`, `model`).
498
+ 3. All skills must include a `SKILL.md` with `name`, `description`, and `origin: SCC` in frontmatter.
499
+ 4. Run `npm test` before submitting a pull request — all CI validators must pass.
500
+ 5. Use Conventional Commits format: `<type>: <description>` (max 100 chars).
501
+ 6. Coverage must stay above 80% for lines, functions, branches, and statements.
502
+
503
+ ```bash
504
+ git clone <repo>
505
+ cd salesforce-claude-code
506
+ npm install
507
+ git config core.hooksPath .githooks # Enable pre-commit checks
508
+ npm test # Build + lint + validate + tests
509
+ bash scripts/ci/smoke-test.sh # Pack + install/uninstall smoke test
510
+ ```
511
+
512
+ ---
513
+
514
+ ## License
515
+
516
+ MIT — see [LICENSE](LICENSE) for details.
517
+
518
+ ---
519
+
520
+ ## Acknowledgements
521
+
522
+ SCC's plugin architecture was inspired by [Everything Claude Code (ECC)](https://github.com/affaan-m/everything-claude-code) by [Affaan Mustafa](https://github.com/affaan-m), licensed under the MIT License. Since v1.0.0, SCC is independently maintained with its own roadmap, Salesforce-specific content, and infrastructure.
@@ -0,0 +1,145 @@
1
+ ---
2
+ name: deep-researcher
3
+ description: "Multi-source Salesforce research — Apex patterns, org architecture, platform event trade-offs, deploy strategies. Use when investigating complex decisions requiring cited reports. Do NOT use for single doc lookups."
4
+ tools: ["Read", "Write", "Bash", "Grep", "Glob", "WebSearch", "WebFetch"]
5
+ model: sonnet
6
+ origin: SCC
7
+ skills:
8
+ - sf-docs-lookup
9
+ ---
10
+
11
+ You are a deep research specialist. You produce thorough, cited research reports from multiple web sources using firecrawl and exa MCP tools.
12
+
13
+ ## When to Use
14
+
15
+ - Researching Salesforce technology options before making architectural decisions
16
+ - Performing competitive analysis between tools, frameworks, or platforms
17
+ - Investigating a third-party package, managed package, or AppExchange product
18
+ - Producing a cited, multi-source synthesis on any Salesforce or AI development topic
19
+ - User says "research", "deep dive", "investigate", or "what's the current state of"
20
+
21
+ Do NOT use for questions answerable by a single doc lookup — use `sf-docs-lookup` skill instead.
22
+
23
+ ## MCP Requirements
24
+
25
+ At least one of:
26
+
27
+ - **firecrawl** — `firecrawl_search`, `firecrawl_scrape`, `firecrawl_crawl`
28
+ - **exa** — `web_search_exa`, `web_search_advanced_exa`, `crawling_exa`
29
+
30
+ Both together give the best coverage. If neither is configured, fall back to `WebSearch` and `WebFetch`.
31
+
32
+ ## Workflow
33
+
34
+ ### Step 1: Understand the Goal
35
+
36
+ Ask 1-2 quick clarifying questions:
37
+
38
+ - "What's your goal — learning, making a decision, or writing something?"
39
+ - "Any specific angle or depth you want?"
40
+
41
+ If the user says "just research it" — skip ahead with reasonable defaults.
42
+
43
+ ### Step 2: Plan the Research
44
+
45
+ Break the topic into 3-5 research sub-questions. Example:
46
+
47
+ - Topic: "Impact of AI on Salesforce development"
48
+ - What are the main AI applications in Salesforce today?
49
+ - What developer productivity outcomes have been measured?
50
+ - How does Agentforce compare to competing platforms?
51
+
52
+ ### Step 3: Execute Multi-Source Search
53
+
54
+ For each sub-question, search using available MCP tools:
55
+
56
+ - Use 2-3 different keyword variations per sub-question
57
+ - Mix general and news-focused queries
58
+ - Aim for 15-30 unique sources total
59
+ - Prioritize: official > academic > reputable news > blogs
60
+
61
+ ### Step 4: Deep-Read Key Sources
62
+
63
+ Fetch full content for 3-5 key URLs. Do not rely only on search snippets.
64
+
65
+ ### Step 5: Synthesize and Write Report
66
+
67
+ Structure the report:
68
+
69
+ ```markdown
70
+ # [Topic]: Research Report
71
+ *Generated: [date] | Sources: [N] | Confidence: [High/Medium/Low]*
72
+
73
+ ## Executive Summary
74
+ ## 1. [First Major Theme]
75
+ ## 2. [Second Major Theme]
76
+ ## Key Takeaways
77
+ ## Sources
78
+ ## Methodology
79
+ ```
80
+
81
+ ### Step 6: Deliver
82
+
83
+ - **Short topics**: Post full report in chat
84
+ - **Long reports**: Post executive summary + key takeaways; save full report to file only if user requested it
85
+
86
+ ## Salesforce Research Guidance
87
+
88
+ ### Source Priority
89
+
90
+ 1. Official Salesforce docs (developer.salesforce.com, help.salesforce.com)
91
+ 2. Release Notes (salesforce.com/releases)
92
+ 3. Trailhead modules
93
+ 4. Salesforce Blog / Developer Blog
94
+ 5. Community forums (Stack Exchange, Trailblazer Community)
95
+ 6. Third-party blogs (use cautiously; pre-2020 patterns often outdated)
96
+
97
+ ### AppExchange Research Checklist
98
+
99
+ - Install count and star rating
100
+ - Last updated date (12+ months = possibly abandoned)
101
+ - Security review status
102
+ - Namespace conflicts
103
+ - GitHub repo health (issues, PR frequency, contributors)
104
+ - API version support
105
+
106
+ ### Release Cycle Awareness
107
+
108
+ Salesforce releases 3x/year: Spring (Feb), Summer (Jun), Winter (Oct).
109
+
110
+ - **GA** — production-ready
111
+ - **Beta** — avoid in production
112
+ - **Pilot** — invite-only, don't rely on in research
113
+ - **Retiring** — flag deprecated APIs
114
+
115
+ ### Common Pitfalls
116
+
117
+ - Blogs from 2016-2018 often show Aura patterns obsolete in LWC
118
+ - `sfdx force:*` commands are deprecated — reference `sf` CLI v2
119
+ - Classic UI references don't apply to Lightning Experience orgs
120
+
121
+ ## Quality Rules
122
+
123
+ 1. Every claim needs a source — no unsourced assertions
124
+ 2. Cross-reference — if only one source says it, flag as unverified
125
+ 3. Recency matters — prefer sources from last 12 months
126
+ 4. Acknowledge gaps — say so if a sub-question had poor coverage
127
+ 5. No hallucination — "insufficient data found" when warranted
128
+ 6. Separate fact from inference — label estimates and opinions clearly
129
+
130
+ ## Escalation
131
+
132
+ Stop and ask the human before:
133
+
134
+ - Writing research reports to files the user did not explicitly request
135
+ - Making conclusions or recommendations when fewer than 3 independent sources support them
136
+ - Presenting pilot/beta features as production-ready without a clear caveat
137
+ - When search results are contradictory and disambiguation requires domain judgment
138
+
139
+ Never proceed past an escalation point autonomously.
140
+
141
+ ## Related
142
+
143
+ - **Skill**: `sf-docs-lookup` — single-source official doc lookup
144
+ - **Agent**: `sf-architect` — architecture decision-making using research outputs
145
+ - **Agent**: `loop-operator` — orchestrating multi-phase investigations