openteam 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +143 -132
- package/examples/dev-team/architect.md +1 -0
- package/examples/dev-team/developer.md +1 -0
- package/examples/dev-team/pm.md +1 -0
- package/examples/dev-team/qa.md +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,189 +1,200 @@
|
|
|
1
1
|
# OpenTeam
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Agent team collaboration framework. Pluggable CLI backend (Claude Code / OpenCode).
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## What it does
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
- Daemon
|
|
10
|
-
-
|
|
7
|
+
- Multi-agent teams with async messaging (MCP-based)
|
|
8
|
+
- Built-in task board with dependency tracking and auto-notification
|
|
9
|
+
- Daemon manages the full lifecycle: server, agent panes, health checks, respawn
|
|
10
|
+
- Real-time dashboard (embedded TUI)
|
|
11
|
+
- Works with tmux or zellij
|
|
11
12
|
|
|
12
|
-
##
|
|
13
|
+
## Requirements
|
|
13
14
|
|
|
14
|
-
|
|
|
15
|
-
|
|
15
|
+
| Dependency | Version |
|
|
16
|
+
|---|---|
|
|
16
17
|
| Node.js | 18+ |
|
|
17
|
-
| tmux
|
|
18
|
+
| tmux or zellij | any |
|
|
18
19
|
|
|
19
|
-
##
|
|
20
|
+
## Install
|
|
20
21
|
|
|
21
22
|
```bash
|
|
22
23
|
npm install -g openteam
|
|
23
24
|
```
|
|
24
25
|
|
|
25
|
-
##
|
|
26
|
+
## Quick Start
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
```bash
|
|
29
|
+
# 1. Install a built-in team template
|
|
30
|
+
openteam setup
|
|
30
31
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"plugin": ["openteam"]
|
|
34
|
-
}
|
|
32
|
+
# 2. Start the team
|
|
33
|
+
openteam start dev
|
|
35
34
|
```
|
|
36
35
|
|
|
37
|
-
|
|
36
|
+
`openteam setup` walks you through:
|
|
38
37
|
|
|
39
|
-
创建 `~/.opencode/agents/<team>/team.json`:
|
|
40
|
-
|
|
41
|
-
```json
|
|
42
|
-
{
|
|
43
|
-
"name": "myteam",
|
|
44
|
-
"leader": "pm",
|
|
45
|
-
"host": "127.0.0.1",
|
|
46
|
-
"port": 0,
|
|
47
|
-
"agents": ["pm", "architect", "developer", "qa"]
|
|
48
|
-
}
|
|
49
38
|
```
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
39
|
+
Available team templates:
|
|
40
|
+
|
|
41
|
+
1) dev-team
|
|
42
|
+
A four-role agent team for software development.
|
|
43
|
+
agents: pm, architect, developer, qa
|
|
44
|
+
|
|
45
|
+
Install "dev-team"? (Y/n): Y
|
|
46
|
+
Team name (team1): dev
|
|
47
|
+
Default CLI (claude-code):
|
|
48
|
+
Enable yolo mode? (y/N): y
|
|
49
|
+
|
|
50
|
+
✓ Team "dev" installed
|
|
51
|
+
|
|
52
|
+
Template: dev-team
|
|
53
|
+
Config: ~/.openteam/teams/dev/team.json
|
|
54
|
+
Leader: pm
|
|
55
|
+
Agents: pm, architect, developer, qa
|
|
56
|
+
CLI: claude-code
|
|
57
|
+
Agent defs: 4 → ~/.openteam/agents
|
|
58
|
+
Skills: 12 → ~/.openteam/skills
|
|
62
59
|
```
|
|
63
60
|
|
|
64
|
-
##
|
|
61
|
+
## CLI Commands
|
|
65
62
|
|
|
66
|
-
|
|
63
|
+
| Command | Description |
|
|
64
|
+
|---|---|
|
|
65
|
+
| `openteam setup` | Install a built-in team template (interactive) |
|
|
66
|
+
| `openteam start [team]` | Start team (creates tmux/zellij session + daemon) |
|
|
67
|
+
| `openteam start [team] -d` | Start in background |
|
|
68
|
+
| `openteam list` / `openteam ls` | List running team instances |
|
|
69
|
+
| `openteam list -a` | List all teams (including stopped) |
|
|
70
|
+
| `openteam stop <target>` | Stop team (by name or instance ID) |
|
|
71
|
+
| `openteam inspect <team>` | Show runtime status and agent online state |
|
|
67
72
|
|
|
68
|
-
|
|
73
|
+
The same team can run in multiple project directories simultaneously. Use `--dir` to target a specific instance when ambiguous.
|
|
69
74
|
|
|
70
|
-
|
|
71
|
-
|-------|------|------|
|
|
72
|
-
| **pm**(leader) | 产品经理 | 澄清需求、编写 PRD、协调团队 |
|
|
73
|
-
| **architect** | 架构师 | 阅读代码库、设计实现方案、架构评审 |
|
|
74
|
-
| **developer** | 开发者 | 按方案实现代码、编写单元测试 |
|
|
75
|
-
| **qa** | 测试工程师 | 设计测试计划、执行验收测试、提交 Bug |
|
|
75
|
+
## Team Tools (MCP)
|
|
76
76
|
|
|
77
|
-
|
|
77
|
+
Agents communicate through two MCP tools exposed by the openteam server:
|
|
78
78
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
实现方案 (并行)
|
|
84
|
-
↓
|
|
85
|
-
Developer 实现 + 单元测试
|
|
86
|
-
↓
|
|
87
|
-
QA 执行验收测试
|
|
88
|
-
↓
|
|
89
|
-
PM 向用户汇报结果
|
|
90
|
-
```
|
|
79
|
+
| Tool | Access | Description |
|
|
80
|
+
|---|---|---|
|
|
81
|
+
| `msg` | All agents (leader can broadcast) | Async messaging between agents |
|
|
82
|
+
| `taskboard` | `create`: leader only; `done`/`list`: all | Task management with dependency tracking |
|
|
91
83
|
|
|
92
|
-
|
|
84
|
+
Messages are delivered to agent queues and injected into the CLI via PTY. Offline agents receive messages when they reconnect.
|
|
93
85
|
|
|
94
|
-
|
|
95
|
-
- **Architect**: `codebase-mapping`、`implementation-planning`、`architecture-review`
|
|
96
|
-
- **QA**: `test-plan-design`、`acceptance-testing`、`bug-reporting`
|
|
86
|
+
## Example: Dev Team
|
|
97
87
|
|
|
98
|
-
|
|
88
|
+
`examples/dev-team/` provides a complete four-role development team, ready to use.
|
|
99
89
|
|
|
100
|
-
|
|
101
|
-
# 复制团队配置
|
|
102
|
-
mkdir -p ~/.opencode/agents/dev-team
|
|
103
|
-
cp examples/dev-team/team.json ~/.opencode/agents/dev-team/
|
|
90
|
+
### Roles
|
|
104
91
|
|
|
105
|
-
|
|
106
|
-
|
|
92
|
+
| Agent | Role | Responsibilities |
|
|
93
|
+
|---|---|---|
|
|
94
|
+
| **pm** (leader) | Product Manager | Clarify requirements, write PRDs, coordinate |
|
|
95
|
+
| **architect** | Architect | Read codebase, design implementation plans, review |
|
|
96
|
+
| **developer** | Developer | Implement per plan, write unit tests |
|
|
97
|
+
| **qa** | QA Engineer | Design test plans, run acceptance tests, report bugs |
|
|
107
98
|
|
|
108
|
-
|
|
109
|
-
cp -r examples/dev-team/skills/* ~/.opencode/skills/
|
|
99
|
+
### Workflow
|
|
110
100
|
|
|
111
|
-
|
|
112
|
-
|
|
101
|
+
```
|
|
102
|
+
User request → PM clarifies requirements & writes PRD
|
|
103
|
+
↓ ↓
|
|
104
|
+
Architect designs QA designs test plan
|
|
105
|
+
implementation plan (in parallel)
|
|
106
|
+
↓
|
|
107
|
+
Developer implements + unit tests
|
|
108
|
+
↓
|
|
109
|
+
QA runs acceptance tests
|
|
110
|
+
↓
|
|
111
|
+
PM reports results to user
|
|
113
112
|
```
|
|
114
113
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
| 命令 | 说明 |
|
|
118
|
-
|------|------|
|
|
119
|
-
| `openteam start [team]` | 启动团队(创建 tmux/zellij session + daemon) |
|
|
120
|
-
| `openteam start [team] -d` | 后台启动 |
|
|
121
|
-
| `openteam start [team] --dir <directory>` | 指定项目目录 |
|
|
122
|
-
| `openteam list` / `openteam ls` | 列出所有已配置团队及运行状态 |
|
|
123
|
-
| `openteam inspect <team>` | 查看运行状态与会话有效性 |
|
|
124
|
-
| `openteam inspect <team> --dir <directory>` | 指定项目目录 |
|
|
125
|
-
| `openteam stop <target>` | 停止团队(SIGTERM daemon) |
|
|
126
|
-
|
|
127
|
-
同一团队可在不同项目目录启动多个实例。当存在多个实例时,`inspect`、`stop` 需要 `--dir` 指定目标实例。
|
|
114
|
+
### Built-in Skills
|
|
128
115
|
|
|
129
|
-
|
|
116
|
+
- **PM**: `requirement-clarification`, `prd-generation`, `system-discovery`
|
|
117
|
+
- **Architect**: `codebase-mapping`, `implementation-planning`, `architecture-review`
|
|
118
|
+
- **QA**: `test-plan-design`, `acceptance-testing`, `bug-reporting`
|
|
130
119
|
|
|
131
|
-
|
|
132
|
-
|------|------|------|
|
|
133
|
-
| `msg` | 全员可用(仅 leader 可广播) | 异步消息;目标离线会自动唤醒并建会话 |
|
|
134
|
-
| `command` | 仅 leader | `status` / `free` / `redirect` |
|
|
135
|
-
| `taskboard` | create 仅 leader;done/list 全员 | 任务管理:创建、完成、查看。完成后自动通知下游 |
|
|
120
|
+
## Configuration
|
|
136
121
|
|
|
137
|
-
### `
|
|
122
|
+
### Team config (`~/.openteam/teams/<team>/team.json`)
|
|
138
123
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
124
|
+
```json
|
|
125
|
+
{
|
|
126
|
+
"name": "dev",
|
|
127
|
+
"leader": "pm",
|
|
128
|
+
"agents": ["pm", "architect", "developer", "qa"],
|
|
129
|
+
"default_cli": "claude-code",
|
|
130
|
+
"cli_config": {
|
|
131
|
+
"claude-code": {
|
|
132
|
+
"args": ["--permission-mode", "bypassPermissions"]
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
```
|
|
142
137
|
|
|
143
|
-
|
|
138
|
+
- `leader` must be in `agents`.
|
|
139
|
+
- `cli_config` passes extra arguments to the underlying CLI.
|
|
140
|
+
- `port` (optional): fixed port; default `0` auto-selects from 4096-4200.
|
|
144
141
|
|
|
145
|
-
|
|
142
|
+
### Directory layout
|
|
146
143
|
|
|
147
|
-
```text
|
|
148
|
-
~/.opencode/agents/<team>/
|
|
149
|
-
├── team.json # 团队配置(团队级)
|
|
150
|
-
├── <agent>.md # agent 提示词(团队级)
|
|
151
|
-
└── <hash>/ # 项目级状态目录(hash = projectDir 的 SHA-256 前 8 位)
|
|
152
|
-
├── .runtime.json # daemon/serve/mux 运行状态
|
|
153
|
-
└── .active-sessions.json # agent → [{ sessionId, cwd }] 会话映射
|
|
154
144
|
```
|
|
145
|
+
~/.openteam/
|
|
146
|
+
├── settings.json # Global settings
|
|
147
|
+
├── agents/ # Agent definitions (shared across teams)
|
|
148
|
+
│ ├── pm.md
|
|
149
|
+
│ ├── architect.md
|
|
150
|
+
│ └── ...
|
|
151
|
+
├── skills/ # Skill definitions
|
|
152
|
+
│ ├── requirement-clarification/
|
|
153
|
+
│ └── ...
|
|
154
|
+
└── teams/
|
|
155
|
+
└── <team>/
|
|
156
|
+
├── team.json # Team config
|
|
157
|
+
└── <hash>/ # Project-scoped runtime state
|
|
158
|
+
├── .state.json # daemon/server/mux state
|
|
159
|
+
└── .tasks.json # Task board data
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Project isolation: `<hash>` = first 8 hex chars of SHA-256(projectDir).
|
|
155
163
|
|
|
156
|
-
|
|
157
|
-
- `.active-sessions.json` 持久化 agent 的多实例会话映射。
|
|
164
|
+
## Architecture
|
|
158
165
|
|
|
159
|
-
|
|
166
|
+
```
|
|
167
|
+
bin/openteam.js CLI entry (Commander routing)
|
|
168
|
+
|
|
169
|
+
src/
|
|
170
|
+
├── interfaces/ Who's calling
|
|
171
|
+
│ ├── cli.js Commands: setup, start, stop, list, inspect
|
|
172
|
+
│ ├── daemon/ Daemon lifecycle (server + panes + health)
|
|
173
|
+
│ └── dashboard/ Embedded TUI (blessed)
|
|
174
|
+
├── server/ Communication layer
|
|
175
|
+
│ ├── hub.js In-memory message queue
|
|
176
|
+
│ ├── mcp.js MCP tools (msg + taskboard)
|
|
177
|
+
│ └── routes.js REST API (register/messages/status/tasks)
|
|
178
|
+
├── adapters/ CLI abstraction (claude-code / opencode)
|
|
179
|
+
├── wrapper/ PTY bridge (register → MCP config → spawn CLI → poll)
|
|
180
|
+
├── capabilities/ Business logic (taskboard)
|
|
181
|
+
└── foundation/ Infrastructure (config, state, terminal, logger)
|
|
182
|
+
```
|
|
160
183
|
|
|
161
|
-
|
|
162
|
-
- `stop` 向 daemon 发送 SIGTERM;daemon 负责停止 serve 和清理 runtime,CLI 会在 daemon 退出后兜底销毁 mux session。
|
|
184
|
+
Dependency rule: `Interfaces → Capabilities → Foundation`. No reverse dependencies.
|
|
163
185
|
|
|
164
|
-
##
|
|
186
|
+
## Debugging
|
|
165
187
|
|
|
166
188
|
```bash
|
|
167
|
-
#
|
|
189
|
+
# Enable logging
|
|
168
190
|
OPENTEAM_LOG=1 openteam start myteam
|
|
169
191
|
|
|
170
|
-
#
|
|
192
|
+
# Set log level (debug/info/warn/error)
|
|
171
193
|
OPENTEAM_LOG=1 OPENTEAM_LOG_LEVEL=debug openteam start myteam
|
|
172
194
|
```
|
|
173
195
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
## 上游依赖说明
|
|
177
|
-
|
|
178
|
-
代码通过 `@opencode-ai/plugin/tool` 子路径导入,绕过上游根入口在 Node ESM 下的扩展名问题。
|
|
179
|
-
|
|
180
|
-
## 更多文档
|
|
181
|
-
|
|
182
|
-
- 架构与模块边界:`docs/architecture.md`
|
|
183
|
-
- 开发与验证:`docs/development-guide.md`
|
|
184
|
-
- 示例团队:`examples/dev-team/readme.md`
|
|
185
|
-
- 历史设计记录:`docs/archive/`
|
|
196
|
+
Log file: `~/.openteam/openteam.log`
|
|
186
197
|
|
|
187
|
-
##
|
|
198
|
+
## License
|
|
188
199
|
|
|
189
200
|
MIT
|
package/examples/dev-team/pm.md
CHANGED
package/examples/dev-team/qa.md
CHANGED