A LangGraph + Claude Code multi-agent system for automated software development.
English Documentation | 中文文档
This project implements a Manager-Worker architecture where:
- LangGraph acts as the Manager (orchestrates workflow, manages state, makes routing decisions)
- Claude Code CLI acts as the Worker (executes coding tasks via CLI)
The system takes a requirement and generates:
- Product Requirements Document (PRD) with multi-perspective review
- Technical Design Document
- Working code implementation
flowchart TD
Start([User Requirement]) --> PM[PM Agent<br/>Product Manager]
PM --> |Generate PRD.md| PM_Reviewer[PRD Reviewers<br/>PM + Dev + QA]
PM_Reviewer --> |Collect Reviews| PM_Revise[PM Agent<br/>Revise PRD]
PM_Revise --> |Revised PRD| PRD_Interrupt{Human Review?}
PRD_Interrupt -->|Approved| Architect[Architect Agent]
PRD_Interrupt -->|Feedback| PM_Revise
Architect --> |Generate Design.md<br/>+ tasks.json| Design_Interrupt{Human Review?}
Design_Interrupt -->|Approved| Coder[Coder Agent]
Design_Interrupt -->|Feedback| Architect
Coder --> |Execute Coding Tasks| Check{All Done?}
Check -->|No| Coder
Check -->|Yes| End([Complete])
style PM fill:#e1f5fe
style PM_Reviewer fill:#f3e5f5
style PM_Revise fill:#e1f5fe
style Architect fill:#fff3e0
style Coder fill:#e8f5e9
style PRD_Interrupt fill:#fff9c4
style Design_Interrupt fill:#fff9c4
Workflow Steps:
- PM Agent generates Product Requirements Document (PRD.md)
- PRD Reviewers (PM + Dev + QA perspectives) review and provide feedback
- PM Agent revises PRD based on reviewer feedback
- Human review checkpoint: modify PRD or provide feedback
- Architect Agent creates Technical Design (Design.md) and task breakdown (tasks.json)
- Human review checkpoint: modify design or task list
- Coder Agent loops through coding tasks until completion
autodev-agents/
├── src/
│ └── autodev/ # Main package
│ ├── __init__.py
│ ├── main.py # CLI entry point
│ ├── config/
│ │ ├── settings.py # Configuration & env management
│ │ └── prompts.py # Agent prompt templates
│ ├── core/
│ │ ├── state.py # AgentState TypedDict
│ │ ├── graph.py # LangGraph workflow definition
│ │ └── checkpoint_manager.py # Checkpoint setup
│ ├── agents/
│ │ ├── base.py # Base agent class
│ │ ├── pm_agent.py # PRD generation & revision
│ │ ├── prd_reviewer_agents.py # PRD reviewers (PM/Dev/QA)
│ │ ├── architect_agent.py # Technical design
│ │ └── coder_agent.py # Code execution loop
│ ├── tools/
│ │ ├── claude_cli.py # Claude Code CLI wrapper
│ │ ├── file_ops.py # File operations
│ │ └── validation.py # Output validators (strict/lenient modes)
│ └── utils/
│ ├── logger.py # Structured logging
│ └── helpers.py # Utilities
├── data/ # Checkpoint & data storage
├── workspace/ # Working directory for generated files
├── pyproject.toml
├── .env.example
└── README.md
- Clone the repository:
git clone <repository-url>
cd autodev-agents- Install in editable mode:
pip install -e .- Set up environment variables:
cp .env.example .env
# Edit .env and add your ANTHROPIC_API_KEY# Basic usage
autodev start "Build a simple Python CLI todo app with JSON storage"
# With human review enabled (pause after PRD and Design stages)
autodev start "Build a todo app" --human-loop
# Specify an existing project directory
autodev start "Add user authentication" --project-dir /path/to/project# Continue workflow after providing feedback
autodev continue <session_id>
# Provide feedback to revise current stage
autodev continue <session_id> --feedback "Add more details to section 3"# Show current state of a session
autodev status <session_id>
# Show artifacts (PRD, Design, or Tasks)
autodev show <session_id> --artifact prd
autodev show <session_id> --artifact design
autodev show <session_id> --artifact tasks# List all workflow sessions
autodev list-sessionsThe system includes a three-perspective PRD review process:
| Reviewer | Perspective | Focus Areas |
|---|---|---|
| PM Reviewer | Product Management | Requirement completeness, user value, business logic, user experience |
| Dev Reviewer | Development | Technical feasibility, implementation complexity, technical risks, design rationality |
| QA Reviewer | Testing | Testability, test coverage, quality standards, defect prevention |
- Initial PRD generation by PM Agent
- Parallel review by three specialist reviewers
- PM Agent consolidates feedback and revises PRD
- Human review checkpoint (optional with
--human-loop)
PRD.md- Revised PRD documentPRD_Reviews.md- Consolidated review feedback from all three perspectives
See .env.example for all configuration options:
| Variable | Description | Default |
|---|---|---|
ANTHROPIC_API_KEY |
Required for Claude API access | - |
DEFAULT_MODEL |
Model to use for agents | claude-3-5-sonnet-20241022 |
WORKSPACE_ROOT |
Directory for generated files | workspace |
DATA_ROOT |
Directory for checkpoints & data | data |
CLAUDE_CLI_TIMEOUT |
Timeout for Claude Code CLI commands | 300 |
CLAUDE_CLI_VALIDATION_MODE |
Task validation: lenient or strict |
lenient |
Lenient Mode (default):
- Tolerates ambiguous output
- Focuses on success indicators
- Reduces false positives
- Recommended for development/iteration
Strict Mode:
- Requires clear success indicators
- Fails on ambiguous output
- Higher confidence in task completion
- Recommended for production/release
- PM Agent: Generates PRD from requirements, revises based on review feedback
- PRD Reviewers: Three specialized reviewers (PM, Dev, QA perspectives)
- Architect Agent: Creates technical design and task breakdown
- Coder Agent: Executes coding tasks via Claude Code CLI
Requirement → [PM Agent] → PRD.md
→ [PM/Dev/QA Reviewers] → Reviews
→ [PM Agent Revise] → Revised PRD.md (human review)
→ [Architect Agent] → Design.md + tasks.json (human review)
→ [Coder Agent] → Code Implementation
Coder Agent executes coding tasks by calling Claude Code CLI.
claude --add-dir <work_dir> --permission-mode acceptEdits -p "<prompt>"| Parameter | Description | Example |
|---|---|---|
--add-dir |
Specify Claude Code working directory | --add-dir /path/to/project |
--permission-mode |
Auto-accept file edits | --permission-mode acceptEdits |
-p |
Prompt to execute | -p "Create a user class" |
--add-dir: Tells Claude Code which directory to work withwork_dir: Specifies the current working directory for command execution
These are typically set to the same path to ensure Claude Code operates in the correct directory.
MIT