Salesforce Agentforce Development Framework
npm install @designthynk/agentspecAgentSpec is a specialized framework for building, testing, and managing Salesforce Agentforce agents, flows, and Lightning Web Components (LWCs). It leverages the OpenSpec CLI to provide a spec-driven development workflow tailored for the Salesforce ecosystem.
Building Agentforce agents requires coordinating multiple metadata types (Agents, Flows, Apex, LWC) and adhering to strict platform rules. AgentSpec provides a structured workflow to ensure:
- Agreement before Implementation: Define agent behavior in specs before writing code.
- MCP First: Integrate Model Context Protocol (MCP) tools for real-time org insights.
- Salesforce Standards: Enforce security and coding best practices automatically.
sf) installed and authenticatedFrom Source (recommended for development):
``bash`
git clone https://github.com/designthynk/AgentSpec.git
cd AgentSpec
npm install -g .
From npm (once published):
`bash`
npm install -g @designthynk/agentspec
Navigate to your Salesforce DX project and run:
`bash`
agentspec init
This will create the openspec/ directory structure with the necessary Salesforce-specific templates.
1. Draft Proposal: agentspec init (if not already done) -> Ask your AI to create a change proposal.specs/
2. Spec: Define requirements in .sf
3. Implement: Use and MCP tools to build in the org.agentspec archive
4. Verify: Run tests and update specs.
5. Archive: to merge changes into the permanent specs.
AgentSpec is a fork of OpenSpec tailored for Salesforce. To benefit from upstream OpenSpec updates, you can merge changes from the OpenSpec repository into this project, resolving conflicts in src/core/templates/agents-template.ts` (where Salesforce-specific instructions live).
MIT