All checks were successful
Build and Deploy Log Center / build-and-deploy (push) Successful in 1m35s
52 lines
1.0 KiB
Markdown
52 lines
1.0 KiB
Markdown
# Repair Agent - 自动化 Bug 修复代理
|
||
|
||
本地运行的自动化 Bug 修复工具,从 Log Center 获取 Bug,使用 Claude Code CLI 进行修复。
|
||
|
||
## 安装
|
||
|
||
```bash
|
||
cd log_center/repair_agent
|
||
pip install -r requirements.txt
|
||
```
|
||
|
||
## 配置
|
||
|
||
复制 `.env.example` 为 `.env` 并配置:
|
||
|
||
```bash
|
||
cp .env.example .env
|
||
```
|
||
|
||
## 使用
|
||
|
||
```bash
|
||
# 查看待修复的 Bug
|
||
python -m repair_agent list
|
||
|
||
# 修复指定项目的所有 Bug
|
||
python -m repair_agent fix rtc_backend
|
||
|
||
# 修复单个 Bug
|
||
python -m repair_agent fix-one <bug_id>
|
||
|
||
# 查看状态
|
||
python -m repair_agent status
|
||
```
|
||
|
||
## 架构
|
||
|
||
```
|
||
repair_agent/
|
||
├── agent/
|
||
│ ├── core.py # 核心引擎
|
||
│ ├── task_manager.py # Log Center 交互
|
||
│ ├── git_manager.py # Git 操作
|
||
│ ├── claude_service.py # Claude CLI 调用
|
||
│ └── test_runner.py # 测试执行
|
||
├── config/
|
||
│ └── settings.py # 配置管理
|
||
├── models/
|
||
│ └── bug.py # 数据模型
|
||
└── __main__.py # CLI 入口
|
||
```
|