Skip to content

designthynk/AgentSpec

 
 

Repository files navigation

AgentSpec logo

AgentSpec: Salesforce Agentforce Development Framework

AgentSpec 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.

Why AgentSpec?

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.

Getting Started

Prerequisites

  • Node.js >= 20.19.0
  • Salesforce CLI (sf) installed and authenticated

Installation

From Source (recommended for development):

git clone https://github.com/designthynk/AgentSpec.git
cd AgentSpec
npm install -g .

From npm (once published):

npm install -g @designthynk/agentspec

Initialization

Navigate to your Salesforce DX project and run:

agentspec init

This will create the openspec/ directory structure with the necessary Salesforce-specific templates.

Workflow

  1. Draft Proposal: agentspec init (if not already done) -> Ask your AI to create a change proposal.
  2. Spec: Define requirements in specs/.
  3. Implement: Use sf and MCP tools to build in the org.
  4. Verify: Run tests and update specs.
  5. Archive: agentspec archive <change-id> to merge changes into the permanent specs.

Upstream Updates

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).

Credits & Acknowledgments

AgentSpec is built on top of OpenSpec by the Fission AI team. We are grateful for their work on creating a robust spec-driven development framework.

Key Resources:

This project adapts OpenSpec's methodology specifically for Salesforce Agentforce development, integrating MCP-first workflows and the Salesforce CLI agent lifecycle.

License

MIT

About

Spec-driven development for AI coding assistants.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 99.1%
  • JavaScript 0.9%