sf-agent-framework
Version:
AI Agent Orchestration Framework for Salesforce Development - Two-phase architecture with 70% context reduction
316 lines (307 loc) • 11.2 kB
YAML
workflow:
id: salesforce-interactive-implementation
name: Interactive Salesforce Implementation Workflow
description: >-
Adaptive workflow that guides users through Salesforce implementation
with dynamic branching based on project needs and complexity
version: 2.0.0
type: interactive
phases:
- name: Project Initialization
interactive: true
steps:
- id: project_type
name: Determine Project Type
user_choice: true
question: What type of Salesforce implementation is this?
choices:
- value: greenfield
label: New Salesforce Org (Greenfield)
recommended: false
- value: brownfield
label: Existing Org Enhancement (Brownfield)
recommended: true
- value: migration
label: Data/System Migration
recommended: false
branches:
greenfield:
id: greenfield_branch
steps:
- name: Org Setup Planning
agent: sf-architect
task: org-setup
creates: org-setup-plan.md
- name: Security Model Design
agent: sf-security-architect
task: access-model-design
creates: security-model.md
brownfield:
id: brownfield_branch
steps:
- name: Org Assessment
agent: sf-admin
task: document-org
creates: org-assessment.md
- name: Gap Analysis
agent: sf-business-analyst
task: gap-analysis
creates: gap-analysis.md
migration:
id: migration_branch
steps:
- name: Data Assessment
agent: sf-data-architect
task: data-assessment
creates: data-assessment.md
- name: Migration Planning
agent: sf-data-migration-specialist
task: migration-planning
creates: migration-plan.md
- name: Requirements Gathering
interactive: true
prerequisites:
- artifact: org-assessment.md
optional: true
steps:
- id: requirements_depth
name: Requirements Gathering Approach
user_choice: true
question: How would you like to gather requirements?
choices:
- value: comprehensive
label: Comprehensive Analysis (Recommended for complex projects)
recommended: true
- value: rapid
label: Rapid Requirements (For simple enhancements)
recommended: false
- value: iterative
label: Iterative Discovery (Agile approach)
recommended: false
branches:
comprehensive:
steps:
- name: Stakeholder Analysis
agent: sf-business-analyst
task: requirement-elicitation
creates: stakeholder-requirements.md
- name: Process Mapping
agent: sf-business-analyst
task: process-mapping
creates: process-maps.md
- name: Requirements Documentation
agent: sf-product-manager
task: create-doc
creates: requirements.md
rapid:
steps:
- name: Quick Requirements Capture
agent: sf-product-owner
task: user-story-creation
creates: user-stories.md
iterative:
steps:
- name: Sprint 0 Planning
agent: sf-product-owner
task: create-doc
creates: sprint-0-plan.md
- name: Initial Backlog
agent: sf-product-manager
task: user-story-creation
creates: initial-backlog.md
- name: Architecture Design
conditional: true
conditions:
- description: Complex project requiring architecture
context_check:
path: context.complexity
operator: in
value: [complex, enterprise]
then_branch:
name: Full Architecture Design
steps:
- name: Solution Architecture
agent: sf-architect
task: solution-design
creates: solution-architecture.md
- name: Technical Architecture
agent: sf-technical-architect
task: create-doc
creates: technical-architecture.md
- name: Integration Architecture
agent: sf-integration-architect
task: integration-planning
creates: integration-design.md
optional: true
- name: Data Architecture
agent: sf-data-architect
task: data-model-design
creates: data-model.md
- description: Simple project with minimal architecture needs
context_check:
path: context.complexity
operator: equals
value: simple
then_branch:
name: Lightweight Design
steps:
- name: Basic Design Document
agent: sf-architect
task: create-doc
creates: design-overview.md
default_branch:
name: Standard Architecture
steps:
- name: Solution Design
agent: sf-architect
task: solution-design
creates: solution-design.md
- name: Development Planning
parallel: true
tracks:
- id: technical_track
name: Technical Planning
default: true
steps:
- name: Development Standards
agent: sf-developer
task: create-doc
creates: coding-standards.md
- name: Git Strategy
agent: sf-devops-lead
task: create-doc
creates: git-strategy.md
- name: CI/CD Pipeline Design
agent: sf-build-engineer
task: pipeline-setup
creates: pipeline-config.yaml
- id: testing_track
name: Testing Strategy
default: true
steps:
- name: Test Plan Creation
agent: sf-qa
task: create-doc
creates: test-plan.md
- name: Test Data Strategy
agent: sf-data-architect
task: create-doc
creates: test-data-strategy.md
- id: deployment_track
name: Deployment Planning
default: false
steps:
- name: Deployment Strategy
agent: sf-release-manager
task: deployment-orchestration
creates: deployment-plan.md
- name: Rollback Procedures
agent: sf-devops-lead
task: rollback-procedures
creates: rollback-plan.md
- name: Validation & Approval
validation_gate:
name: Pre-Development Checkpoint
required: true
checks:
- name: Requirements Complete
type: artifact_exists
artifact: requirements.md
- name: Architecture Approved
type: manual_review
question: Has the architecture been reviewed and approved by stakeholders?
- name: Security Review
type: manual_review
question: Has the security model been reviewed by the security team?
- name: Automated Checks
type: automated
script: validate-readiness.sh
- name: Story Creation
interactive: true
steps:
- id: story_generation
name: Story Generation Strategy
user_choice: true
question: How would you like to generate implementation stories?
choices:
- value: ai_generated
label: AI-Generated from Requirements
recommended: true
- value: manual
label: Manual Story Creation
recommended: false
- value: hybrid
label: AI-Assisted with Manual Review
recommended: false
branches:
ai_generated:
steps:
- name: Shard Requirements
agent: sf-orchestrator
task: document-sharding
creates: stories/
- name: Generate Story Queue
agent: sf-orchestrator
task: story-queue-creation
creates: story-queue.yaml
manual:
steps:
- name: Story Workshop
agent: sf-product-owner
task: workshop-facilitation
creates: story-workshop-notes.md
- name: Story Documentation
agent: sf-business-analyst
task: user-story-creation
creates: stories/
hybrid:
nested_choice:
id: review_depth
question: How thorough should the review process be?
choices:
- value: quick
label: Quick Review
- value: detailed
label: Detailed Review with Refinement
branches:
quick:
steps:
- name: Generate and Review
agent: sf-orchestrator
task: story-generation-review
creates: stories/
detailed:
steps:
- name: Generate Draft Stories
agent: sf-orchestrator
task: story-generation
creates: draft-stories/
- name: Refinement Session
agent: sf-product-owner
task: story-refinement
creates: refined-stories/
- name: Final Story Creation
agent: sf-orchestrator
task: story-finalization
creates: stories/
- name: Development Execution
interactive: false
steps:
- name: Switch to Development Phase
action: phase_transition
from: planning
to: development
- name: Initialize Development Context
agent: sf-orchestrator
task: context-optimization
- name: Begin Story Implementation
agent: sf-developer
task: story-implementation
metadata:
supports_resume: true
estimated_duration: varies
recommended_for:
- greenfield_implementations
- brownfield_enhancements
- complex_projects
- agile_teams