scorpio 416bea4ce3 chore: add .gitignore, update plan.md
- Exclude binary, rooms/, agent memory, web/dist from git
- plan.md reflects current completed state

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04 22:17:50 +08:00

135 lines
5.1 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.

# Agent Team — 开发进度
**最后更新**: 2026-03-04
**仓库**: https://gitea.catter.cn/sdaduanbilei/agent-team.git
---
## 已完成
### Go 后端
- [x] `go.mod` 初始化依赖已锁定Go 1.20 兼容版本)
- [x] `internal/llm/client.go` — OpenAI 兼容客户端,支持 DeepSeek/Kimi/Ollama/OpenAI流式输出
- [x] `internal/agent/agent.go` — AGENT.md frontmatter 解析SOUL.md 加载memory 读写system prompt 构建
- [x] `internal/skill/skill.go` — agentskills.io 标准skill 发现/加载/XML 生成
- [x] `internal/room/room.go` — 群配置加载master orchestration 循环消息历史持久化memory 自动更新
- [x] `internal/hub/hub.go` — GitHub repo clone团队包安装
- [x] `internal/api/server.go` — Echo HTTP 服务WebSocket hub全部 REST 接口(含 skill 创建、workspace 文件预览、消息历史)
- [x] `cmd/server/main.go` — 入口
### React 前端
- [x] Vite + React + TypeScript + Tailwind v4
- [x] `web/src/types.ts` + `store.ts` — 类型定义Zustand storeWebSocket 流式消息
- [x] `App.tsx` — 四栏导航(群聊/Agents/Skills/市场)
- [x] `RoomSidebar.tsx` — 群列表实时状态创建群agent 下拉多选)
- [x] `ChatView.tsx` — 消息流右侧面板workspace 文件预览 Modal
- [x] `AgentsPage.tsx` — Monaco MD 编辑器AGENT.md/SOUL.md 编辑
- [x] `SkillsPage.tsx` — skill 列表,详情查看,新建 skill
- [x] `MarketPage.tsx` — GitHub 一键雇佣,发布说明
### 构建验证
- [x] `go build ./...` 通过
- [x] `npm run build` 通过386KB JS bundle
---
## 待完成
### 紧急(下次开始先做)
- [ ] **提交代码到 git** — 所有代码已写好但还未 commit/push
```bash
git add -A
git commit -m "feat: implement full agent-team platform"
git push
```
- [ ] **前端构建验证** — 确认 Tailwind v4 + Monaco Editor 能正常编译
```bash
cd web && npm run build
```
- [ ] **后端编译验证** — 已通过 `go build ./...`,但需要实际运行测试
```bash
DEEPSEEK_API_KEY=xxx go run cmd/server/main.go
```
### 功能补全
- [ ] **SkillsPage 组件** — skills 列表页面(查看/创建 skill目前 store 有 `fetchSkills` 但没有对应页面
- 在 `web/src/components/SkillsPage.tsx` 新建
- App.tsx 加入 skills 导航入口
- [ ] **Agent memory 自动更新** — 任务完成后 master 自动总结经验写入 `agents/<name>/memory/`
- 在 `internal/room/room.go` 的 orchestration 循环末尾调用 `agent.SaveMemory()`
- 需要让 master 生成一段经验总结
- [ ] **消息历史持久化** — 目前消息只在内存,刷新页面丢失
- 每条消息追加写入 `rooms/<id>/history/YYYY-MM-DD.md`
- 前端启动时通过 REST 接口加载历史
- [ ] **右侧面板 Skills tab** — 点击 Skills 抽屉按钮时展示群内可用 skills
- 调用 `GET /api/skills` 获取列表
- [ ] **Workspace 文件预览** — 点击产物文件名时展示 MD 内容
- 新增 `GET /api/rooms/:id/workspace/:filename` 接口
- 前端弹出 Modal 展示 ReactMarkdown 渲染
- [ ] **创建群时成员选择优化** — 目前是手动输入 agent 名,改为下拉多选
- 调用 `GET /api/agents` 获取列表,渲染 checkbox
- [ ] **Leader 群的 orchestration** — 目前 room.go 的 Handle 只支持单 masterLeader 群需要广播给多个 master
- Leader 群:用户消息广播给所有 master每个 master 在自己的部门群里处理
- [ ] **环境变量配置页** — 前端提供一个设置页,配置各 provider 的 API Key
- 写入本地 `.env` 文件或通过 `PUT /api/config` 接口
### 已知问题
- [ ] `web/src/App.css` 可以删除Vite 默认生成,已不需要)
- [ ] `web/src/assets/react.svg` 可以删除
- [ ] `web/public/vite.svg` 可以删除
- [ ] `main.tsx` 里的 `import './App.css'` 需要删除
---
## 环境要求
| 工具 | 版本 |
|------|------|
| Go | 1.20+ |
| Node.js | 18+ |
| git | 任意 |
## 启动方式
```bash
# 后端
export DEEPSEEK_API_KEY=your_key
go run cmd/server/main.go
# 前端(另一个终端)
cd web
npm install
npm run dev
# 访问 http://localhost:5173
```
## 关键设计决策(供参考)
1. **一切皆 MD** — agent 配置、soul、memory、tasks、history 全部是 MD 文件,无数据库
2. **Context 隔离** — 每个 agent 的 LLM 调用独立master 只看摘要,子 agent 只看自己的任务
3. **agentskills.io 标准** — skill 格式遵循开放标准,可复用社区 skill
4. **OpenAI 兼容接口** — 所有 provider 统一用 go-openai只改 BaseURL
5. **去中心化 Hub** — 团队包就是 GitHub repotopic `agent-team` 聚合发现
## 用户问题备忘
> "导演 agent 会不会忘记之前的内容?"
**答**:不会忘,通过两个机制保证:
1. **任务内 context**:整个 orchestration 循环分配→执行→review是同一个 `masterMsgs` 数组,导演始终看到完整对话
2. **跨任务 memory**:任务完成后经验写入 `agents/director/memory/`,下次任务时注入 system prompt
导演的 identitySOUL.md永远不变memory 会随经验积累越来越丰富。