agent-team
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseagent-team
agent-team
Manages AI team roles using git worktrees + terminal multiplexer tabs. Each role runs in its own isolated worktree (branch ) and opens as a full-permission AI session in a new tab.
team/<name>For directory layout and bidirectional communication details, see references/details.md.
借助git worktrees + 终端多路复用器标签页管理AI团队角色。每个角色在独立的工作树(分支)中运行,并在新标签页中以全权限AI会话的形式打开。
team/<name>有关目录结构和双向通信的详细信息,请参阅references/details.md。
Install
安装
bash
brew tap JsonLee12138/agent-team && brew install agent-teambash
brew tap JsonLee12138/agent-team && brew install agent-teamUpgrade
升级
bash
brew update && brew upgrade agent-teambash
brew update && brew upgrade agent-teamUsage
使用方法
Run from within a project git repository:
bash
agent-team <command>Use tmux backend (default is WezTerm):
bash
AGENT_TEAM_BACKEND=tmux agent-team <command>在项目的Git仓库内运行:
bash
agent-team <command>使用tmux后端(默认是WezTerm):
bash
AGENT_TEAM_BACKEND=tmux agent-team <command>Brainstorming (Required Before Assign)
头脑风暴(分配前必须执行)
When the user intends to assign new work to a role, you MUST brainstorm first:
- Explore context — check the role's , existing
prompt.md, and project stateopenspec/specs/ - Ask clarifying questions — one at a time, prefer multiple choice when possible
- Propose 2-3 approaches — with trade-offs and your recommendation
- User confirms design — get explicit approval
- Write proposal — save the confirmed design to a temp file
- Execute assign — run
agent-team assign <name> "<desc>" --proposal <file>
Rules:
- Brainstorming is mandatory for new work assignments
- Can be skipped when user explicitly says "just assign" or provides a complete design
- One question at a time. YAGNI. Explore alternatives before settling.
当用户打算为角色分配新工作时,必须先进行头脑风暴:
- 探索上下文 — 检查角色的、现有
prompt.md以及项目状态openspec/specs/ - 提出澄清问题 — 一次一个问题,尽可能使用选择题形式
- 提出2-3种方案 — 说明权衡取舍并给出你的推荐
- 用户确认设计 — 获取明确的批准
- 撰写提案 — 将确认后的设计保存到临时文件
- 执行分配 — 运行
agent-team assign <name> "<desc>" --proposal <file>
规则:
- 对于新工作分配,头脑风暴是强制性的
- 当用户明确表示“直接分配”或提供完整设计时,可以跳过
- 一次只提一个问题。遵循YAGNI原则。在确定方案前探索替代选项。
Commands
命令
Create a role
创建角色
bash
agent-team create <name>Creates git branch + worktree at . Generates:
team/<name>.worktrees/<name>/- — provider, description, pane tracking
agents/teams/<name>/config.yaml - — role system prompt (edit this to define the role)
agents/teams/<name>/prompt.md - — OpenSpec project structure for change management
openspec/
After creating, guide the user to edit to define the role's expertise and behavior.
prompt.mdbash
agent-team create <name>创建 Git分支 + 工作树至。生成以下内容:
team/<name>.worktrees/<name>/- — 提供商、描述、面板跟踪配置
agents/teams/<name>/config.yaml - — 角色系统提示词(编辑此文件定义角色)
agents/teams/<name>/prompt.md - — 用于变更管理的OpenSpec项目结构
openspec/
创建完成后,引导用户编辑以定义角色的专业领域和行为。
prompt.mdOpen a role session
打开角色会话
bash
agent-team open <name> [claude|codex|opencode] [--model <model>]- Generates in worktree root from
CLAUDE.md(auto-injected as system context)prompt.md - Spawns a new terminal tab titled running the chosen AI provider
<name> - Provider priority: CLI argument > > claude
config.yaml default_provider - Model priority: flag >
--model> provider defaultconfig.yaml default_model
bash
agent-team open <name> [claude|codex|opencode] [--model <model>]- 从在工作树根目录生成
prompt.md(自动注入为系统上下文)CLAUDE.md - 在新的终端标签页中启动标题为的指定AI提供商会话
<name> - 提供商优先级:CLI参数 > 中的
config.yaml> claudedefault_provider - 模型优先级:标志 >
--model中的config.yaml> 提供商默认模型default_model
Open all sessions
打开所有会话
bash
agent-team open-all [claude|codex|opencode] [--model <model>]Opens every role that has a config.yaml.
bash
agent-team open-all [claude|codex|opencode] [--model <model>]打开所有拥有的角色会话。
config.yamlAssign a change
分配任务
bash
agent-team assign <name> "<description>" [claude|codex|opencode] [--model <model>] [--proposal <file>]- Creates an OpenSpec change at
openspec/changes/<timestamp>-<slug>/ - Writes the proposal file from flag (or empty if not provided)
--proposal - Auto-opens the role session if not running
- Sends a notification to the running session
[New Change Assigned]
The role will then use to proceed through specs → design → tasks → apply.
/opsx:continuebash
agent-team assign <name> "<description>" [claude|codex|opencode] [--model <model>] [--proposal <file>]- 在创建OpenSpec变更记录
openspec/changes/<timestamp>-<slug>/ - 从标志指定的文件写入提案内容(未提供则为空)
--proposal - 如果角色会话未运行,则自动启动
- 向运行中的会话发送通知
[New Change Assigned]
角色随后将使用按规范→设计→任务→实施的流程推进。
/opsx:continueReply to a role
回复角色
bash
agent-team reply <name> "<answer>"Sends a reply to a role's running session, prefixed with .
[Main Controller Reply]bash
agent-team reply <name> "<answer>"向角色的运行中会话发送回复,前缀为。
[Main Controller Reply]Reply to main controller (used by roles)
回复主控制器(角色使用)
bash
agent-team reply-main "<message>"Sends a message from the role back to the main controller's session, prefixed with . Automatically detects the current role from the worktree directory and reads the controller's pane ID from .
[Role: <name>]config.yamlbash
agent-team reply-main "<message>"从角色向主控制器会话发送消息,前缀为。会自动从工作树目录检测当前角色,并从读取控制器的面板ID。
[Role: <name>]config.yamlCheck status
查看状态
bash
agent-team statusShows all roles, session status (running/stopped), and active OpenSpec changes.
bash
agent-team status显示所有角色、会话状态(运行中/已停止)以及活跃的OpenSpec变更记录。
Merge completed work
合并已完成工作
bash
agent-team merge <name>Merges into the current branch with . Run afterward to clean up.
team/<name>--no-ffdeletebash
agent-team merge <name>使用将分支合并到当前分支。之后运行命令清理。
--no-ffteam/<name>deleteDelete a role
删除角色
bash
agent-team delete <name>Closes the running session (if any), removes the worktree, and deletes the branch.
team/<name>bash
agent-team delete <name>关闭运行中的会话(如果存在),移除工作树,并删除分支。
team/<name>