Skip to content

Multi-Agent Workflows

This document explains how to orchestrate multiple AI tools (ChatGPT, Cursor, Factory agents) in workflows. It is written for ConnectSoft team members who use multiple AI tools in their work.

Effective AI collaboration involves orchestrating multiple tools—ChatGPT for thinking, Cursor for code, Factory agents for production generation. This guide shows how to combine them effectively.

Note

Each AI tool has strengths. Use ChatGPT for high-level thinking, Cursor for code editing, and Factory agents for production code generation. Combine them strategically.

Typical Workflow Patterns

Pattern 1: Think/Design → Implement → Commit → Factory Integration

Workflow: 1. ChatGPT - Think through architecture and design 2. Cursor - Implement initial code structure 3. Git - Commit to repository 4. Factory - Generate production code using Factory agents

Use When: - Designing new features or services - Exploring architectural options - Creating templates or libraries

Pattern 2: Refine Docs → Push Through MkDocs

Workflow: 1. ChatGPT - Draft or refine documentation 2. Cursor - Edit Markdown files 3. MkDocs - Build and preview documentation site 4. Git - Commit and deploy

Use When: - Creating or updating documentation - Maintaining documentation consistency - Adding cross-links and diagrams

Pattern 3: Factory Run → Review → Refine

Workflow: 1. Factory - Generate code via Factory agents 2. ChatGPT - Review and suggest improvements 3. Cursor - Refine generated code 4. Git - Commit refined code

Use When: - Reviewing Factory-generated code - Customizing generated code - Adding domain-specific logic

Example: Designing a New Platform Capability

Scenario: Adding Advanced Analytics to Audit Platform

Step 1: Think in ChatGPT

Prompt:

You are a ConnectSoft platform architect designing advanced analytics for the Audit Platform.

Goal: Design analytics capabilities for audit events.

Requirements:
- Real-time dashboards
- Historical trend analysis
- Custom report generation
- Multi-tenant data isolation

Constraints:
- Must integrate with existing Audit Platform
- Must use ConnectSoft patterns
- Must support high-volume event processing

Output:
- Architecture design
- API design
- Data model
- Integration points

Output: Architecture design, API contracts, data model

Step 2: Implement in Cursor

  • Open Audit Platform repository in Cursor
  • Create new analytics service structure
  • Implement API endpoints
  • Add tests
  • Update documentation

Step 3: Commit and Review

  • Commit changes to feature branch
  • Create PR
  • Review with team
  • Merge to main

Step 4: Factory Integration

  • Update Factory templates to include analytics
  • Generate analytics service via Factory
  • Validate Factory-generated code
  • Deploy

Example: Updating a Template and Docs

Scenario: Adding Event Sourcing Support to Microservice Template

Step 1: Design in ChatGPT

Prompt:

You are a ConnectSoft template architect.

Goal: Add event sourcing support to the microservice template.

Context:
- Current template: ConnectSoft microservice template
- Pattern: Event sourcing for audit trail
- Libraries: MassTransit, NHibernate

Output:
- Template changes needed
- New template parameters
- Library dependencies
- Documentation updates

Output: Template design, parameter changes, documentation structure

Step 2: Update Template in Cursor

  • Open template repository
  • Add event sourcing components
  • Update template parameters
  • Add event store implementation
  • Update tests

Step 3: Update Documentation

  • Update template documentation
  • Add event sourcing examples
  • Update getting started guide
  • Add to template catalog

Step 4: Test and Validate

  • Generate sample service from template
  • Test event sourcing functionality
  • Validate tests pass
  • Review generated code quality

Hand-Offs Between Tools

Copying Outputs

Best Practices: - Copy ChatGPT outputs to Cursor for editing - Save prompts for future reference - Document decisions in ADRs/BDRs - Track changes in Git

Saving Prompts

Prompt Management: - Save effective prompts for reuse - Document prompt patterns - Share prompts with team - Version prompts with code

Tracking Decisions

Decision Tracking: - Document AI-assisted decisions in ADRs/BDRs - Link decisions to code changes - Track decision rationale - Review decisions periodically

See: Decision Records Process for ADR/BDR process.

Risks and Safeguards

Risk 1: Over-Reliance on AI Suggestions

Problem: Accepting AI suggestions without critical review

Safeguard: - Always review AI outputs critically - Question assumptions - Validate against ConnectSoft patterns - Get human review for critical decisions

Risk 2: Inconsistent Style

Problem: AI outputs don't match ConnectSoft style

Safeguard: - Use style guides in prompts - Review outputs for style compliance - Use Cursor with ConnectSoft instructions - Regular style reviews

See: Documentation Style Guide for documentation style.

See: Brand & UI Kit for brand guidelines.

Risk 3: Leaking Sensitive Information

Problem: Accidentally pasting secrets or customer data

Safeguard: - Never paste secrets into AI tools - Use environment variables - Review outputs for data leakage - Use public context only

Warning

Security Risks: 1. Over-Reliance - Don't accept AI suggestions without review 2. Inconsistent Style - Always check style compliance 3. Data Leakage - Never paste secrets or customer data 4. Decision Quality - Critical decisions require human judgment