Salesforce for developers — Overview
Salesforce for developers — Overview
Section titled “Salesforce for developers — Overview”Status: draft. This describes the org’s developer surface based on what exists in production. Actual dev practices — who codes, who deploys, branching model — need to be confirmed with the engineering team before marking
current.
The shape of custom code
Section titled “The shape of custom code”PWG’s Salesforce has a substantial custom-code footprint sitting alongside Financial Services Cloud:
| Artefact type | Count |
|---|---|
| Apex classes (total) | 3,230 |
| Apex classes (custom) | 156 |
| Apex triggers | 113 |
| Active Flows | 271 |
| Flow versions (total) | 1,611 |
| SObjects (custom) | 272 |
LWC, Aura, Custom Metadata Types, Custom Settings counts pending — they are not currently emitted by the automation inventory generator.
The custom-Apex count is small next to the total because the managed packages (FSC, DLRS, and others) contribute the bulk of the 3,230. The 156 custom classes are the code PWG owns and maintains.
Languages and frameworks in the org
Section titled “Languages and frameworks in the org”- Apex — business logic, triggers, batch jobs, Invocable methods.
- SOQL / SOSL — data access.
- Flow — the strongly-preferred automation surface. 271 active, 1,610 versions. One surviving Workflow Rule.
- Lightning Web Components — frontend extensions (TODO confirm inventory).
- DLRS (Declarative Lookup Rollup Summaries) — a managed package used instead of hand-rolling rollup Apex.
Repository layout
Section titled “Repository layout”| Directory | Contents |
|---|---|
mcp-server/ | Read-only MCP server + generator scripts (TypeScript) |
mcp-server/src/ | MCP tools, jsforce helpers, doc generators |
mcp-server/scripts/ | CLI entrypoints — runners for each doc generator |
docs/human/ | Curated narrative docs (federated to Shannon) |
docs/dev/ | Developer-facing curated narrative (this file) |
docs/generated/ | Auto-generated dumps — not federated |
analysis/ | Dated audit reports |
This repo does not contain Apex source. It is a documentation and analysis repo that reads the live production org over the MCP. Apex source lives wherever PWG’s deployment pipeline sources it from (TODO confirm — sfdx-project? unpackaged? managed package repo?).
MCP server in brief
Section titled “MCP server in brief”The mcp-server/ is a Node + jsforce + JWT Bearer MCP that exposes
read-only Salesforce access to Claude Code. Seven tools are shipped:
| Tool | What it does |
|---|---|
soql_query | SOQL against any readable object (DML keywords blocked) |
tooling_query | Tooling API SOQL (ApexClass, Flow, etc.) |
describe_global | SObject list, optionally custom-only |
describe_object | Fields, RTs, child relationships (24h disk cache) |
limits | Org governor limits snapshot |
event_log_files | List EventLogFile records |
event_log_download | Download a specific EventLogFile |
All tools enforce read-only at the protocol layer (non-GET REST is
rejected). The automation@pwg.com.au user carries only a
Claude MCP Read-Only Permission Set — no DML perms regardless.
Running the generators
Section titled “Running the generators”From mcp-server/:
npm installexport SF_PRIVATE_KEY_PATH=/path/to/server.keyexport SF_CONSUMER_KEY=...export SF_USERNAME=automation@pwg.com.auexport SF_LOGIN_URL=https://partnerswealthgroup.my.salesforce.com
npx tsx scripts/smoke-access.ts # JWT round-trip + whoaminpx tsx scripts/generate-all-docs.ts # Regenerate docs/generated/objects/See docs/generated/README.md for the full regeneration list.
Further reading
Section titled “Further reading”docs/dev/architecture.md— Apex and Flow architecturedocs/dev/integrations.md— callout patterns, auth flowsdocs/dev/admin-procedures.md— deployment, data loadsdocs/dev/known-issues.md— platform gotchas and limits