UNPKG

sf-agent-framework

Version:

AI Agent Orchestration Framework for Salesforce Development - Two-phase architecture with 70% context reduction

73 lines (48 loc) 2.45 kB
# Tutorial: Modernizing a Legacy App with SF-Agent This tutorial will guide you through the process of modernizing a legacy Salesforce application using the SF-Agent Framework. ## Prerequisites - You have an existing Salesforce application that you want to modernize. - You have installed the SF-Agent Framework in your project. ## Step 1: Document the Existing Application The first step is to create comprehensive documentation for your existing application. This will provide the necessary context for the AI agents to understand the codebase. ```bash # Document the entire application sf-agent task document-all ``` This command will analyze your codebase and generate a series of documentation files in the `docs` folder. ## Step 2: Identify Areas for Improvement Once you have the documentation, you can use the `sf-architect` agent to identify areas for improvement. ```bash # Analyze the architecture for technical debt and refactoring opportunities sf-agent task analyze-architecture ``` The agent will provide a report with recommendations for modernization. ## Step 3: Create a Refactoring Plan Based on the recommendations from the architect, you can create a refactoring plan. Use the `sf-product-manager` to create a PRD for the modernization project. ```bash # Create a PRD for the modernization project sf-agent workflow create-brownfield-prd --feature "Modernize App" ``` Then, use the `sf-architect` to create a new architecture document that reflects the modernization plan. ```bash # Create a new architecture for the modernized app sf-agent workflow create-brownfield-architecture --prd docs/modernize-app-prd.md ``` ## Step 4: Implement the Refactoring With the planning complete, you can now start implementing the refactoring. Follow the standard development workflow to implement the stories. ```bash # Shard the documents sf-agent shard docs/modernize-app-prd.md sf-agent shard docs/modernize-app-architecture.md # Implement the stories sf-agent story next sf-agent story implement STORY-ID ``` ## Step 5: Test and Deploy After implementing the changes, be sure to thoroughly test the application to ensure that the refactoring has not introduced any regressions. Once you are confident that the application is stable, you can deploy the changes to your Salesforce org. ```bash # Test the application sf-agent workflow test-feature --feature "Modernized App" # Deploy the changes sf-agent deploy ```