📊 核心功能
- AI 驱动的后端代码自动生成
- 支持 FastAPI/Spring Boot/NestJS
- 完整分层架构 (Controller/Service/Repository/Model)
- 自动代码质量检查和安全扫描
- 单元测试自动生成
- 人机协同审核机制
🏗️ 技术架构
Prompt Templates
↓
Claude Code API
↓
Code Parser
↓
Quality Checker
↓
File Generator
📝 生成的代码示例 - Controller 层
from fastapi import APIRouter, Depends, HTTPException
from typing import List
router = APIRouter(prefix="/users", tags=["users"])
@router.get("/")
def list_users(skip: int = 0, limit: int = 100):
return []
@router.get("/{user_id}")
def get_user(user_id: int):
return {"id": user_id}
代码行数
15
函数数量
2
文档覆盖率
100%
质量评分
92/100
✅ 代码质量保证
语法正确性
✓ AST 验证通过
代码复杂度
圈复杂度 < 10
安全检查
无安全问题
风格检查
符合 PEP8
📁 项目结构
generated_project/
├── src/
│ ├── api/v1/ # Controllers
│ ├── services/ # Business Logic
│ ├── repositories/ # Data Access
│ ├── models/ # SQLAlchemy Models
│ └── schemas/ # Pydantic Schemas
├── tests/
│ ├── unit/ # Unit Tests
│ └── integration/ # Integration Tests
├── migrations/ # Database Migrations
└── docs/ # Documentation
🎯 使用示例
python -m src.main --feature user_management \
--description "User CRUD with authentication"
from src.agents import create_new_agent
agent = await create_new_agent(output_dir="./my_project")
results = await agent.generate_full_feature(
feature_name="products",
feature_description="Product management system",
require_tests=True
)