sf-agent-framework
Version:
AI Agent Orchestration Framework for Salesforce Development - Two-phase architecture with 70% context reduction
104 lines (64 loc) • 2.96 kB
Markdown
# Tutorial: Your First Feature from Idea to Deployment
This tutorial will walk you through the entire process of building a new feature using the SF-Agent Framework, from initial idea to deployment.
## Prerequisites
- You have installed the SF-Agent Framework.
- You have a Salesforce org to deploy to.
## Phase 1: Planning
In this phase, we will use the planning agents to create the requirements and architecture for our new feature.
### 1. Define the Feature
For this tutorial, we will be building a simple "Project Tracker" feature that allows users to create and manage projects.
### 2. Create the PRD
We will use the `sf-product-manager` agent to create a Product Requirements Document (PRD) for our feature.
```bash
# Start the PRD creation workflow
sf-agent workflow create-prd --feature "Project Tracker"
```
The agent will ask you a series of questions about the feature. Answer them to the best of your ability. At the end of the process, you will have a `prd.md` file in your `docs` folder.
### 3. Create the Architecture
Next, we will use the `sf-architect` agent to create the architecture for our feature.
```bash
# Start the architecture creation workflow
sf-agent workflow create-architecture --prd docs/prd.md
```
The agent will use the PRD to create a detailed architecture document, which will be saved as `architecture.md` in your `docs` folder.
## Phase 2: Development
Now that we have our planning artifacts, we can move on to the development phase.
### 1. Shard the Documents
To provide focused context to our development agents, we will shard the PRD and architecture documents.
```bash
# Shard the PRD
sf-agent shard docs/prd.md
# Shard the architecture document
sf-agent shard docs/architecture.md
```
### 2. Implement Stories
Now we can start implementing the user stories. The `sf-developer` agent will guide us through this process.
```bash
# Get the next story from the queue
sf-agent story next
# Implement the story
sf-agent story implement STORY-ID
```
Repeat this process until all stories have been implemented.
### 3. Test the Feature
Once the development is complete, we will use the `sf-qa` agent to test the feature.
```bash
# Start the testing workflow
sf-agent workflow test-feature --feature "Project Tracker"
```
The agent will run a series of tests and provide a report of the results.
## Phase 3: Deployment
With the feature developed and tested, we are now ready to deploy it to our Salesforce org.
### 1. Create a Deployment Plan
We will use the `sf-devops-lead` agent to create a deployment plan.
```bash
# Create a deployment plan
sf-agent workflow create-deployment-plan --feature "Project Tracker"
```
### 2. Deploy to Salesforce
Finally, we can deploy the feature to our Salesforce org.
```bash
# Deploy the feature
sf-agent deploy --plan docs/deployment-plan.md
```
Congratulations! You have successfully built and deployed a new feature using the SF-Agent Framework.