sf-forcekit
v1.1.0
Published
Universal AI context pack for Salesforce projects. Works with Claude, Cursor, Copilot, Codex, Windsurf, Gemini, Cline, Roo, Amazon Q, Aider, and any LLM.
Maintainers
Readme
forcekit — Universal AI Context for Salesforce Projects
A structured, agent-agnostic context layer for AI-assisted Salesforce development. Drop this
forcekit/directory into any SFDX project and connect it to any AI coding tool. Updated for Salesforce Summer '26 (API v67.0) — secure-by-default Apex, MCP, Agentforce Subagents.
⚡ Quick Install
Run the following command from your SFDX project root to install the context pack and automatically generate all AI tool bridge files:
npx sf-forcekit init --bridge allThis will scaffold the forcekit/ context directory and create configuration files for Claude Code, Cursor, Copilot, Windsurf, Gemini, Cline, Roo Code, Amazon Q, and Aider.
🆕 What's New in v1.1.0 (Summer '26)
- Secure-by-Default Apex (API v67.0) — Updated all conventions, quality gates, and prompts for the v67.0 paradigm where
WITH USER_MODEandwith sharingare automatic defaults.WITH SECURITY_ENFORCEDis marked deprecated. - Agentforce Subagents — Updated terminology (Topics → Subagents), added MCP Server integration guide, Agent Script, Agentforce Builder, Testing API.
- MCP Hosted Servers (Headless 360) — New section covering GA hosted MCP servers for connecting external AI clients to Salesforce.
- API Version Maintenance — Updated retirement schedule: v21–v30 retired, v31–v40 retiring Summer '28, SOAP
login()retiring Summer '27. - Updated Quality Gates — Added checks for deprecated
WITH SECURITY_ENFORCEDand justifiedWITH SYSTEM_MODEusage.
🧭 Compatibility & Bridge Files
ForceKit automatically links with your preferred AI coding assistants using lightweight bridge files in your project root:
| Assistant / IDE | Bridge File Generated | Setup Command |
| :--- | :--- | :--- |
| All Tools | All of the below | npx sf-forcekit init --bridge all |
| Claude Code | CLAUDE.md | npx sf-forcekit init --bridge claude |
| Cursor | .cursor/rules/salesforce-context.mdc | npx sf-forcekit init --bridge cursor |
| GitHub Copilot | .github/copilot-instructions.md | npx sf-forcekit init --bridge copilot |
| Windsurf | .windsurf/rules/salesforce-context.md | npx sf-forcekit init --bridge windsurf |
| Gemini / Antigravity | .gemini/instructions.md | npx sf-forcekit init --bridge gemini |
| Cline | .clinerules/salesforce-context.md | npx sf-forcekit init --bridge cline |
| Roo Code | .roo/rules/salesforce-context.md | npx sf-forcekit init --bridge roo |
| Amazon Q | .amazonq/rules/salesforce-context.md | npx sf-forcekit init --bridge amazonq |
| Aider | .aider.conf.yml | npx sf-forcekit init --bridge aider |
📁 Directory Structure
forcekit/
├── rules.md ← 🤖 AGENT START HERE — Master behavior rules
├── governance.md ← 🛡️ SECURITY & GOVERNANCE — Metadata ownership & HITL rules
├── source-of-truth.md ← 🚫 ANTI-HALLUCINATION — Salesforce CLI verifications
├── inventory.md ← 🤖 AUTO-UPDATED — Registry of active metadata
├── conventions.md ← Coding standards (Apex, LWC, Flows, Sharing, Security)
├── current-state.md ← 🤖 AUTO-UPDATED — Live session log, tasks & changes
├── org-context.md ← Target org type, alias, edition, and limits
├── deployment.md ← Deploy/retrieve workflows & CI/CD patterns
├── quality-gates.md ← Validation checklists & pre-deploy checks
├── known-issues.md ← Platform bugs and workarounds
├── prompts/ ← Scoped instructions per task (apex, lwc, flows, testing)
├── scripts/ ← Automation scripts (install, state updates, static checks)
└── templates/ ← Boilerplate starters (TriggerHandler, Service, Selector)🤖 Workflow
For Developers
- Run
npx sf-forcekit init --bridge all. - Configure your org alias in
forcekit/org-context.md. - Commit the
forcekit/directory and generated bridge files.
For AI Agents
- Read
forcekit/rules.mdfirst to load behavior protocols. - Verify Salesforce metadata using
forcekit/inventory.mdbefore referencing. - Automatically update
forcekit/current-state.mdwith session goals, blockers, and changed files.
🛠️ CLI Automation Scripts
The included helper script automates context management for your agent:
# Auto-scan project and update inventory.md
python3 forcekit/scripts/update_state.py scan
# Perform static linting (hardcoded IDs, missing USER_MODE, DML in loops)
python3 forcekit/scripts/update_state.py check
# Sync active org details and daily governor limits
python3 forcekit/scripts/update_state.py sync-org --target-org <alias>
# Query the org to verify if specific metadata exists
python3 forcekit/scripts/update_state.py verify --type field --object Account --name Name
# Cache active schema definitions to prevent hallucinations
python3 forcekit/scripts/update_state.py cache-schema
# Start & End session logging
python3 forcekit/scripts/update_state.py session-start --agent "Agent" --goal "Task Goal"
python3 forcekit/scripts/update_state.py session-end --summary "What was done" --files "force-app/..."📄 License
MIT
