⚡ setup-agents

⚡ setup-agents

Bootstrap AI agent rules for any Salesforce project in seconds.

Version CI Tests License Node.js

Personal open-source project by Jaime Terrats — not an official Salesforce product.

🤖 One command. 5 AI tools. Twenty-two role profiles.

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

📊 Project Status

Unit Tests

789

Passing

Role Profiles

22

Combinable

AI Tools

5

Cursor · VS Code · Codex · Claude · Agentforce

Commands

3

local · mcp · update

A4D Workflows

12

Auto-generated

E2E Tests

27

Playwright

EDD Coverage

100%

Error-first tests

✨ Features

🔍 Auto-Detection

Detects installed tools (.cursor/, .vscode/, AGENTS.md, CLAUDE.md, .a4drules/) and active profiles (cgcloud__, WaveDashboard, DataStream, Playwright) automatically.

🎭 Role Profiles

10 combinable profiles — Developer, Architect, BA, MuleSoft, UX, CGCloud, DevOps, QA, CRMA, Data Cloud. Each generates its own rule file.

🤝 Sub-agent Protocol

Generates sub-agent-protocol.mdc — a routing manifest mapping task types to responsible roles across your whole team.

⚙️ Agentforce Workflows

Creates .a4drules/workflows/ files invokable via /[workflow.md] in chat — deploy, run-tests, validate, create-apex-class, ADR, and more.

🔌 MCP Integration

sf setup-agents mcp wires @salesforce/mcp into Cursor for direct metadata, Apex, and sObject access from any org.

🔄 Auto-update

sf setup-agents update detects stale rule files (version mismatch) and regenerates only what's outdated — including workflow files.

📦 Extension Recommendations

Writes .vscode/extensions.json combining base Salesforce extensions with profile-specific tools for every team member.

🧩 VS Code Extension

A sidebar UI for teams that prefer point-and-click over terminal — configure profiles, connect orgs, and manage rules visually.

🛡️ Safe by Default

Never overwrites existing files without --force. Every file embeds a version token enabling precise staleness detection.

🚀 Quick Start

1. Install

sf plugins install \
  @jterrats/setup-agents

2. Run in your project

cd my-salesforce-project
sf setup-agents local

3. Select profiles

# Interactive multi-select prompt
# or pass profiles directly:
sf setup-agents local \
  --profile developer,architect
Unsigned Plugin — You will be prompted the first time:
sf plugins install @jterrats/setup-agents --no-verify

📂 Files Generated

Cursor

.cursor/rules/agent-guidelines.mdc
.cursor/rules/salesforce-standards.mdc
.cursor/rules/-standards.mdc
.cursor/rules/sub-agent-protocol.mdc

VS Code

.github/copilot-instructions.md
.vscode/extensions.json

Codex

AGENTS.md

Claude

CLAUDE.md

Agentforce

.a4drules/00-base-guidelines.md
.a4drules/01-salesforce-standards.md
.a4drules/-.md
.a4drules/99-sub-agent-protocol.md
.a4drules/workflows/*.md

Ready to set up your AI agents?

One command configures all your tools with role-specific rules.

View Commands VS Code Extension Browse Profiles GitHub ↗