# summary

Configure AI agent rules for the local development environment.

# description

Sets up agent rule files for AI coding assistants in the current project directory.

Supported tools:

- **cursor** — Creates `.cursor/rules/agent-guidelines.mdc` and per-profile rule files for Cursor AI.
- **vscode** — Creates `.github/copilot-instructions.md` and `.vscode/extensions.json` for GitHub Copilot.
- **codex** — Creates `AGENTS.md` for OpenAI Codex CLI.
- **claude** — Creates `CLAUDE.md` for Anthropic Claude Code.
- **agentforce** — Creates `.a4drules/` numbered markdown files for Agentforce Vibes Extension.

If `--rules` is omitted, the command auto-detects installed tools based on existing directories
(`.cursor`, `.vscode`, `AGENTS.md`, `CLAUDE.md`, `.a4drules`). If none are detected, all tools are configured.

If `--profile` is omitted, the command auto-detects profiles from the project structure and
presents a selection prompt. If nothing is selected, the `developer` profile is used by default.

Use `--force` to overwrite existing files (useful when running `sf setup-agents update` under the hood).

# flags.rules.summary

Target AI tool to configure (cursor, vscode, codex, claude, agentforce).

# flags.rules.description

Specify which AI coding assistant to configure. Valid options are `cursor`, `vscode`, `codex`, `claude`, or `agentforce`.
When omitted, the command auto-detects tools present in the project; if none are found, all tools are configured.

# flags.profile.summary

Role profiles to configure (comma-separated).

# flags.profile.description

Specify one or more role profiles as a comma-separated list. Each profile generates a dedicated
rule file with role-specific agent guidance and adds the relevant VS Code extensions.

Valid profiles: developer, architect, ba, pm, mulesoft, ux, cgcloud, devops, qa, crma, commerce, data360, admin, sfmc, security, service, cpq, omnistudio, fsl, ai, slack, tableau

When omitted, the command auto-detects profiles from the project structure and presents an
interactive multi-select prompt. If no profile is selected, `developer` is used as the default.

# flags.force.summary

Overwrite existing rule files.

# flags.force.description

Force overwrite of all generated files, even if they already exist.
Use this flag after updating your profiles or when the plugin version has changed.

# flags.open-orchestra.summary

Generate optional Open Orchestra integration artifacts.

# flags.open-orchestra.description

Create `.setup-agents/open-orchestra/` with profile-to-role mapping and boundary documentation.
This does not install Open Orchestra or enable runtime orchestration by default.

# flags.scope.summary

Cursor rule scope: project (default) or user (~/.cursor/rules).

# flags.scope.description

Controls where Cursor rule files are written. Use `user` to install rules globally in `~/.cursor/rules` so they apply to every project. Defaults to `project` (writes to `.cursor/rules/` in the current workspace).

# flags.quick.summary

Generate rules only — skip orchestration state, playbooks, and docs sync.

# flags.quick.description

Quick mode generates AI rule files for the selected tools and profiles but does not create `.setup-agents/state/`, playbooks, offline runbook, or documentation sync. Use this for a minimal onboarding experience.

# flags.advisory.summary

Generate advisory role guidance without project-scoped rule files.

# flags.advisory.description

Create `.setup-agents/advisory/` with consultative role guidance for sessions outside a project workspace.
Advisory mode does not create `AGENTS.md`, `CLAUDE.md`, `.cursor/rules/`, `.codex/`, or `.a4drules/`.

# examples

- Configure all detected AI tools with interactive profile selection:

  <%= config.bin %> <%= command.id %>

- Configure only Cursor rules:

  <%= config.bin %> <%= command.id %> --rules cursor

- Configure only GitHub Copilot instructions for VS Code:

  <%= config.bin %> <%= command.id %> --rules vscode

- Configure only Codex (AGENTS.md):

  <%= config.bin %> <%= command.id %> --rules codex

- Configure Claude Code (CLAUDE.md):

  <%= config.bin %> <%= command.id %> --rules claude

- Configure Agentforce Vibes rules:

  <%= config.bin %> <%= command.id %> --rules agentforce

- Configure with a specific profile:

  <%= config.bin %> <%= command.id %> --profile developer

- Configure with multiple combined profiles:

  <%= config.bin %> <%= command.id %> --profile developer,architect,cgcloud

- Configure QA automation profile:

  <%= config.bin %> <%= command.id %> --profile qa

- Force overwrite all existing rule files:

  <%= config.bin %> <%= command.id %> --force

- Generate optional Open Orchestra integration artifacts:

  <%= config.bin %> <%= command.id %> --open-orchestra

- Generate advisory guidance outside a project workspace:

  <%= config.bin %> <%= command.id %> --advisory --profile architect,ba

# info.configuring

Configuring %s...

# info.fileCreated

✔ Created: %s

# info.profileConfigured

✔ Profile configured: %s

# info.done

Setup complete. Configured: %s

# info.advisoryDone

Advisory mode ready at %s

# warn.noToolsDetected

No tools were detected and no --rules flag was provided. Nothing to configure.

# warn.fileExists

Skipped (already exists): %s

# warn.profileDefault

No profile selected. Using default: developer.

# warn.unknownProfiles

Unknown profile(s): %s. Valid profiles: %s

# prompt.selectTools

Select the AI tools to configure:

# prompt.selectProfiles

Select your role profile(s):

# prompt.confirmCGCloud

Consumer Goods Cloud (cgcloud\_\_) namespace detected. Add CGCloud profile?

# prompt.cursorRuleScope

This looks like a Salesforce project. Where should the Salesforce standards rule be applied?

# prompt.cursorRuleScopeProject

Project-level — create .cursor/rules/salesforce-standards.mdc (this project only)

# prompt.cursorRuleScopeUser

User-level — print content to copy into Cursor Settings → Rules for AI (all projects)

# info.cursorUserLevelInstructions

To apply this rule globally, open Cursor → Settings → Rules for AI and paste the following:

# info.sfExtensionsCreated

✔ Created: %s (Salesforce extension recommendations)

# warn.sfExtensionsExist

Skipped (already exists): %s

# info.teamConfig

Using team config: %s (%s). Pass --force to override.

# prompt.onboarding.roles

What roles are active on this project? (select all that apply)

# prompt.onboarding.clouds

Which Salesforce clouds or products are in scope? (select all that apply)

# prompt.onboarding.advanced

Configure advanced profile selection?

# prompt.onboarding.advanced.no

No — use my selections above

# prompt.onboarding.advanced.yes

Yes — pick from the full profile list
