Bootstrap AI agent rules for any Salesforce project in seconds.
Personal open-source project by Jaime Terrats — not an official Salesforce product.
setup-agents configures Cursor, GitHub Copilot, OpenAI Codex, Anthropic Claude Code, and Agentforce Vibes with role-aware rules so every AI assistant in your team has the same architectural context.
sf plugins install @jterrats/setup-agents
cd my-salesforce-project
sf setup-agents local
Passing
Combinable
Cursor · VS Code · Codex · Claude · Agentforce
local · mcp · update
Auto-generated
Playwright
Error-first tests
Detects installed tools (.cursor/, .vscode/, AGENTS.md, CLAUDE.md, .a4drules/) and active profiles (cgcloud__, WaveDashboard, DataStream, Playwright) automatically.
10 combinable profiles — Developer, Architect, BA, MuleSoft, UX, CGCloud, DevOps, QA, CRMA, Data Cloud. Each generates its own rule file.
Generates sub-agent-protocol.mdc — a routing manifest mapping task types to responsible roles across your whole team.
Creates .a4drules/workflows/ files invokable via /[workflow.md] in chat — deploy, run-tests, validate, create-apex-class, ADR, and more.
sf setup-agents mcp wires @salesforce/mcp into Cursor for direct metadata, Apex, and sObject access from any org.
sf setup-agents update detects stale rule files (version mismatch) and regenerates only what's outdated — including workflow files.
Writes .vscode/extensions.json combining base Salesforce extensions with profile-specific tools for every team member.
A sidebar UI for teams that prefer point-and-click over terminal — configure profiles, connect orgs, and manage rules visually.
Never overwrites existing files without --force. Every file embeds a version token enabling precise staleness detection.
sf plugins install \
@jterrats/setup-agents
cd my-salesforce-project
sf setup-agents local
# Interactive multi-select prompt
# or pass profiles directly:
sf setup-agents local \
--profile developer,architect
sf plugins install @jterrats/setup-agents --no-verify
.cursor/rules/agent-guidelines.mdc.cursor/rules/salesforce-standards.mdc.cursor/rules/.cursor/rules/sub-agent-protocol.mdc
.github/copilot-instructions.md.vscode/extensions.json
AGENTS.md
CLAUDE.md
.a4drules/00-base-guidelines.md.a4drules/01-salesforce-standards.md.a4drules/.a4drules/99-sub-agent-protocol.md.a4drules/workflows/*.md
One command configures all your tools with role-specific rules.
View Commands VS Code Extension Browse Profiles GitHub ↗