Multi-Agent Workflow

December 26, 2025 ยท View on GitHub

LDF supports using multiple AI agents to review your specs and code from different perspectives. This catches issues that a single agent might miss.

Overview

AgentStrengthUse For
Your Primary ToolContext retention, implementationDevelopment, code generation
ChatGPTPattern recognition, alternativesSpec review, code audit, security
GeminiEdge cases, thoroughnessGap analysis, architecture review

Quick Start

1. Generate an Audit Request

ldf audit --type spec-review --spec user-auth

This creates a structured audit request with your spec content.

2. Send to External Agent

  1. Open ChatGPT or Gemini
  2. Paste the prompt from multi-agent/prompts/chatgpt/spec-review.md
  3. Paste the generated audit request
  4. Submit for review

3. Import Feedback

Save the response and import it:

ldf audit --import audit-response.md --spec user-auth

Available Audit Types

TypeCommandBest Agent
Spec Reviewldf audit --type spec-reviewChatGPT
Code Auditldf audit --type code-auditChatGPT
Securityldf audit --type securityChatGPT
Pre-Launchldf audit --type pre-launchChatGPT
Gap Analysisldf audit --type gap-analysisGemini
Edge Casesldf audit --type edge-casesGemini
Architectureldf audit --type architectureGemini
Full (All Types)ldf audit --type fullBoth

When to Audit

PhaseRecommended Audit
After drafting requirementsspec-review, gap-analysis
After design completearchitecture
Before implementationedge-cases
Before mergecode-audit
Security-sensitive featuressecurity
Before production releasepre-launch, full

Detailed Documentation

For comprehensive documentation including:

  • Detailed workflow diagrams
  • Audit templates
  • Best practices
  • Automated workflow (API integration)
  • FAQ

See the Multi-Agent README.

Prompts Reference

ChatGPT Prompts

Gemini Prompts

Security Best Practices

API Key Management

Always use environment variables for API keys:

ServiceEnvironment Variable
OpenAI/ChatGPTOPENAI_API_KEY
Google GeminiGOOGLE_AI_API_KEY

Important: Never store API keys in .ldf/config.yaml - this file may be committed to version control and could expose your credentials.