Files
team/.claude/agents/isos-agents-config.md
T
2026-04-19 21:47:08 +08:00

142 lines
4.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ISOS Agent Team 配置
## Agent 团队概述
本配置定义了 ISOS 项目的 4 个核心 Agent,每个 Agent 专注于特定领域,支持并行开发和高效协作。
## 团队组成
| Agent | 角色 | 文件 | Command | 主要职责 |
|-------|------|------|---------|----------|
| **isos-backend-agent** | 后端开发 | `.claude/agents/isos-backend-agent.md` | `/isos-backend` | FastAPI + SQLite 开发 |
| **isos-frontend-agent** | 前端开发 | `.claude/agents/isos-frontend-agent.md` | `/isos-frontend` | Svelte 5 + PyWebView |
| **isos-test-agent** | 测试工程师 | `.claude/agents/isos-test-agent.md` | `/isos-test` | 全级别测试和覆盖率 |
| **isos-project-manager-agent** | 项目经理 | `.claude/agents/isos-project-manager-agent.md` | `/isos-pm` | 任务分发和进度管理 |
## 使用方法
### 1. 团队协作模式(推荐)
```bash
# 1. 启动 4 Pane 团队工作空间(自动命名并加载角色提示词)
/isos-tmux-team
# 2. Pane 1(PM)已自动加载项目经理提示词
# 3. PM 向其他 Pane 分发任务
# 向 Pane 2(后端)发送后端任务
# 向 Pane 3(前端)发送前端任务
# 向 Pane 4(测试)发送测试任务
```
### 2. 单独使用各 Agent
```bash
# 启动后端开发 Agent
/isos-backend
# 启动前端开发 Agent
/isos-frontend
# 启动测试 Agent
/isos-test
# 启动项目经理 Agent
/isos-pm
```
## 里程碑模板
> 根据实际项目需要定义里程碑和角色分工。
| 里程碑 | 后端 | 前端 | 测试 |
|--------|:----:|:----:|:----:|
| M1: 基础架构 | ● | ● | ○ |
| M2: 核心功能 A | ● | | ● |
| M3: 核心功能 B | | ● | ● |
| M4: 核心功能 C | | ● | ● |
| M5: 集成与同步 | ● | ● | ● |
| M6: 部署与打包 | ● | ● | ● |
| M7: 增强功能 | | ● | ● |
| M8: 运维功能 | ● | | ● |
● 主要负责 ○ 配合测试
## 技术栈概览
### 后端开发 Agent
- Python 3.12+, mypy strict
- FastAPI 0.109+, SQLite 3.45+
- ruff format + ruff check
- Docker 24+
- uv 包管理
### 前端开发 Agent
- Svelte 5runes: $state, $derived, $effect
- PyWebView, TypeScript strict
- Vite + npm, Node.js 22+
- Python 3.12+Service 层)
- IPC 通信:Svelte ↔ Python HTTPS
### 测试 Agent
- pytest, pytest-cov, pytest-mock
- httpxAPI 测试)
- PlaywrightE2E 测试)
- freezegun, hypothesis
- 覆盖率:核心模块>90%, 其他>75%
### 项目经理 Agent
- 任务分析和分发
- 进度跟踪和协调
- 代码审查协调
- 验收检查
- Agent 生命周期管理
## 协作流程
### 典型任务流转(以前端功能开发为例)
1. **PM 分析**:前端任务(UI + Service 层),无后端依赖
2. **PM → 前端 Agent**:发送任务提示词
3. **前端 Agent 完成**:UI 组件 + API 路由 + 单元测试
4. **PM 验收**:类型检查 + 测试 + 覆盖率
5. **PM → 测试 Agent**:发送接口测试任务
6. **测试 Agent 完成**API 接口测试 + 覆盖率分析
7. **PM 验收**:测试通过 + 覆盖率达标
### 并行开发场景(前后端并行开发为例)
1. **PM 分析**:后端(API 路由)+ 前端(UI + Service 层)并行
2. **PM → 后端 Agent**:发送 API 开发任务
**PM → 前端 Agent**:发送前端开发任务
3. **后端 Agent 完成**API 接口 + 单元测试
4. **前端 Agent 完成**UI 组件 + Service 层 + 单元测试
5. **PM → 测试 Agent**:发送集成测试任务
6. **测试 Agent 完成**:集成测试 + 覆盖率分析
7. **PM 验收**:全部测试通过 + 覆盖率达标
## 注意事项
1. **Agent 生命周期**:完成任务后必须立即 shutdown
2. **模块独立性**:各模块完全独立,禁止跨模块代码引用
3. **版本控制**:使用 Jujutsu (jj),主分支 trunk
4. **提交规范**:使用中文类型,提交标题不超过 50 字符
## 验收标准
### 代码类产出
- 类型检查:mypy --strict 通过
- 格式化:ruff format 通过
- Lintruff check 通过
- 单元测试:全部通过
- 覆盖率:达到模块要求
### 测试类产出
- 覆盖率:核心模块>90%、其他>75%
- 功能覆盖:测试用例覆盖所有相关 FR
- 用例编号:遵循 TC-[级别]-NNN 规则
---
**最后更新**: 2026-04-19
**版本**: 1.0.0