teamai-cli 0.24.0-beta.1 → 0.24.0-beta.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 CHANGED
@@ -13,6 +13,16 @@
13
13
 
14
14
  TeamAI manages your team's skills, rules, MCP, and knowledge across Claude Code, Codex, CodeBuddy, WorkBuddy, OpenCode, Cursor, and other AI agents.
15
15
 
16
+ ## Contributors
17
+
18
+ Thanks to everyone who has contributed to TeamAI!
19
+
20
+ <a href="https://github.com/Tencent/teamai-cli/graphs/contributors">
21
+ <img src="https://contrib.rocks/image?repo=Tencent/teamai-cli" alt="Contributors" />
22
+ </a>
23
+
24
+ Made with [contrib.rocks](https://contrib.rocks).
25
+
16
26
  ## Quick Start
17
27
 
18
28
  ### Install
@@ -46,13 +56,13 @@ Once initialized, every AI session automatically pulls the latest skills / rules
46
56
 
47
57
  ## Product architecture
48
58
 
49
- **Team Execution × Team Context × Team Improvement**:
59
+ **Team Execution × Team Context (beta) × Team Improvement (beta)**:
50
60
 
51
61
  | Layer | Job | In this CLI today |
52
62
  |-------|-----|-------------------|
53
63
  | **Team Execution** | Make every agent work the team's way | `init` / `pull` / `push`, skills, rules, agents, hooks, MCP, env |
54
- | **Team Context** | Make every agent understand the team | recall, learnings, codebase graph, teamwiki... |
55
- | **Team Improvement** | Make every execution improve the team | friction-based share-learnings, sessions, digest, dashboard... |
64
+ | **Team Context** (beta) | Make every agent understand the team | recall, learnings, codebase graph, teamwiki... |
65
+ | **Team Improvement** (beta) | Make every execution improve the team | friction-based share-learnings, sessions, digest, dashboard... |
56
66
 
57
67
  ## Overview
58
68
 
@@ -61,8 +71,8 @@ Once initialized, every AI session automatically pulls the latest skills / rules
61
71
  <tr>
62
72
  <th rowspan="2">Agent</th>
63
73
  <th colspan="7">Team Execution</th>
64
- <th colspan="3">Team Context</th>
65
- <th colspan="3">Team Improvement</th>
74
+ <th colspan="3">Team Context (beta)</th>
75
+ <th colspan="3">Team Improvement (beta)</th>
66
76
  </tr>
67
77
  <tr>
68
78
  <th>skills</th><th>rules</th><th>docs</th><th>env</th><th>agents</th><th>hooks</th><th>mcp</th>
@@ -81,6 +91,7 @@ Once initialized, every AI session automatically pulls the latest skills / rules
81
91
  <tr><td>Hermes</td><td align="center">✓</td><td align="center">—</td><td align="center">✓</td><td align="center">✓</td><td align="center">—</td><td align="center">—</td><td align="center">—</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">—</td><td align="center">—</td><td align="center">—</td></tr>
82
92
  <tr><td>DeepSeek Harness</td><td align="center">✓</td><td align="center">—</td><td align="center">✓</td><td align="center">—</td><td align="center">—</td><td align="center">—</td><td align="center">—</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">—</td><td align="center">—</td><td align="center">—</td></tr>
83
93
  <tr><td>Qoder</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td></tr>
94
+ <tr><td>ZCode</td><td align="center">✓</td><td align="center">—</td><td align="center">✓</td><td align="center">—</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td></tr>
84
95
  </tbody>
85
96
  </table>
86
97
 
@@ -110,74 +121,27 @@ teamai push → create branch + MR → reviewer approves + merges
110
121
  SessionStart hook → teamai pull → synced to local AI tools
111
122
  ```
112
123
 
113
- Members push changes via `teamai push`, which opens a Merge Request for review. Re-running `teamai push` on a resource that is still waiting in an unmerged PR updates that PR in place instead of opening a duplicate. Once merged, `teamai pull` (triggered automatically on session start via the SessionStart hook) syncs the latest resources locally. Skills sync to `~/.claude/skills/`, `~/.codex/skills/`, `~/.cursor/skills/`, `~/.codebuddy/skills/`, etc. For Codex, an existing skill under `~/.agents/skills/` is updated there instead of duplicated under `~/.codex/skills/`. In a **project-scope** install, SessionStart first creates that tool's project root (e.g. `<project>/.claude`) if it is missing, then pulls into it — a bare `teamai pull` still will not invent agent directories.
114
-
115
- ### Team Hooks
116
-
117
- Declare custom hooks in `hooks/hooks.yaml` and `teamai pull` delivers them to every AI tool:
118
-
119
- ```yaml
120
- hooks:
121
- - id: block-secret
122
- description: Scan for secrets before commit
123
- event: PreToolUse
124
- matcher: Bash
125
- command: 'bash -lc "~/.teamai/team-scripts/scan-secret.sh" || true'
126
- tools: [claude, cursor]
127
- ```
128
-
129
- ```bash
130
- teamai hooks list # list effective hooks
131
- teamai hooks inject # re-reconcile into every installed tool
132
- teamai hooks remove # remove all teamai-managed hooks
133
- ```
134
-
135
- ### Team MCP Servers
136
-
137
- Declare once in `mcp/mcp.yaml`; `teamai pull` writes each tool's native config. Use `${VAR}` for secrets.
138
-
139
- ```yaml
140
- servers:
141
- - name: gpu-analysis
142
- transport: http # stdio | http | sse
143
- url: https://example.com/api/mcp
144
- headers:
145
- Authorization: Bearer ${GPU_ANALYSIS_TOKEN}
146
- ```
147
-
148
- ```bash
149
- teamai mcp list | inject | remove
150
- ```
151
-
152
- ### Skill Subscription Sources
153
-
154
- Subscribe to additional skill repos — other teams' public repos, or shared/public repos within your own org:
155
-
156
- ```bash
157
- teamai source add https://github.com/other-team/teamai-public.git --name other-team
158
- teamai source list
159
- teamai source browse other-team # browse available skills
160
- teamai source remove other-team
161
- ```
162
-
163
- The add/remove change takes effect locally right away, and subscribed skills sync on the next
164
- `teamai pull`. Run `teamai push` when you want to share the `teamai.yaml` change with teammates.
124
+ ### What Gets Shared
165
125
 
166
- ### Team Packages
126
+ Each resource is delivered to every agent:
167
127
 
168
- Share and restore the team's npm packages and Claude Code plugins:
128
+ | Resource | In the team repo | Notes |
129
+ |----------|------------------|-------|
130
+ | **Skills** | `skills/<name>/SKILL.md` | |
131
+ | **Rules** | `rules/*.md` | |
132
+ | **Docs** | `docs/` | Foundational project docs; not all loaded by default (progressive disclosure) |
133
+ | **Agents** | `agents/<name>.yaml` | |
134
+ | **Culture** | `culture.md` | Team mission, values, and working principles — injected into each agent's CLAUDE.md / AGENTS.md so every session inherits them |
135
+ | **CLAUDE.md** | `claudemd/*.md` | |
136
+ | **Env** | `env/` | Shared team-level environment variables and switches; do not put secrets here |
137
+ | **Hooks** | `hooks/hooks.yaml` | |
138
+ | **MCP** | `mcp/mcp.yaml` | |
139
+ | **Packages** | `teamai.yaml` | Currently npm packages and Claude Code plugins only |
140
+ | **Models** | — | Not implemented for every provider yet |
169
141
 
170
- ```bash
171
- teamai packages install typescript
172
- teamai packages install typescript@5.9.2 --npm
173
- teamai packages install code-review@claude-plugins-official
174
- teamai push # Share the declarations
175
- teamai packages # Install everything declared by the team
176
- ```
177
-
178
- See the [Usage Guide](docs/usage-guide.md#team-packages) for the complete workflow and configuration.
142
+ For file formats and full workflows, see the [Usage Guide](docs/usage-guide.md).
179
143
 
180
- ## Team Context
144
+ ## Team Context (beta)
181
145
 
182
146
  > Every agent understands how the team works.
183
147
 
@@ -227,7 +191,7 @@ Matched: conflict | Missing: port
227
191
  teamai import --from-repo https://github.com/org/repo
228
192
  teamai import --from-org myorg # batch import all repos
229
193
  teamai codebase --extract /path/to/repo # local extract into teamwiki/
230
- teamai codebase --lint # health check
194
+ teamai codebase --lint --output /path/to/repo # check the locally extracted graph
231
195
  ```
232
196
 
233
197
  The graph stores components, interfaces, configs, and cross-repo import edges. `teamai recall` uses it for graph-boosted re-ranking.
@@ -240,10 +204,20 @@ Edges come from two tracks that run together, with AST results taking precedence
240
204
 
241
205
  The WASM parser is a pure-JavaScript dependency — no native toolchain is required. If it fails to load for any reason, extraction falls back to the heuristic track and records an `AST_UNAVAILABLE` gap. Set `TEAMAI_SKIP_AST=1` to force heuristic-only extraction.
242
206
 
243
- ## Team Improvement
207
+ ## Team Improvement (beta)
244
208
 
245
209
  > Every execution makes the entire team smarter.
246
210
 
211
+ ### Maintenance
212
+
213
+ As skills and knowledge accumulate, prune what the team no longer uses. `teamai recall maintenance` archives low-confidence learnings and flags stale skills, rules, and docs for cleanup or updates:
214
+
215
+ ```bash
216
+ teamai recall maintenance --prune --dry-run # preview
217
+ teamai recall maintenance --prune --archive # archive unused learnings
218
+ teamai recall maintenance --update-quality # draft updates for stale skills / docs
219
+ ```
220
+
247
221
  Insight into how the team actually uses its AI tools, and a starting point for turning session friction into shared skills, rules, and knowledge:
248
222
 
249
223
  | Capability | Command | What it shows |
@@ -289,13 +263,3 @@ Insight into how the team actually uses its AI tools, and a starting point for t
289
263
  ## Contributing
290
264
 
291
265
  PRs are welcome! Please read [CONTRIBUTING.md](.github/CONTRIBUTING.md) first.
292
-
293
- ## Contributors
294
-
295
- Thanks to everyone who has contributed to TeamAI!
296
-
297
- <a href="https://github.com/Tencent/teamai-cli/graphs/contributors">
298
- <img src="https://contrib.rocks/image?repo=Tencent/teamai-cli" alt="Contributors" />
299
- </a>
300
-
301
- Made with [contrib.rocks](https://contrib.rocks).
package/README.zh-CN.md CHANGED
@@ -13,6 +13,16 @@
13
13
 
14
14
  TeamAI 统一管理团队的 Skills、Rules、MCP 和知识,驾驭 Claude Code、Codex、CodeBuddy、WorkBuddy、OpenCode、Cursor 等 AI Agents。
15
15
 
16
+ ## 贡献者
17
+
18
+ 感谢每一位为 TeamAI 贡献代码的伙伴!
19
+
20
+ <a href="https://github.com/Tencent/teamai-cli/graphs/contributors">
21
+ <img src="https://contrib.rocks/image?repo=Tencent/teamai-cli" alt="Contributors" />
22
+ </a>
23
+
24
+ 由 [contrib.rocks](https://contrib.rocks) 生成。
25
+
16
26
  ## 快速开始
17
27
 
18
28
  ### 安装
@@ -46,13 +56,13 @@ teamai init https://github.com/yourorg/yourrepo --scope user
46
56
 
47
57
  ## 产品架构
48
58
 
49
- **Team Execution × Team Context × Team Improvement**:
59
+ **Team Execution × Team Context (beta) × Team Improvement (beta)**:
50
60
 
51
61
  | 层 | 要解决的问题 | 当前 CLI 中的体现 |
52
62
  |----|--------------|-------------------|
53
63
  | **Team Execution** | 让每个 Agent 按团队的方式工作 | `init` / `pull` / `push`,skills、rules、agents、hooks、MCP、env |
54
- | **Team Context** | 让每个 Agent 理解整个团队 | recall、learnings、代码知识图谱、teamwiki... |
55
- | **Team Improvement** | 让每一次执行都成为团队能力的积累 | 基于摩擦信号的经验分享、sessions、digest、dashboard... |
64
+ | **Team Context** (beta) | 让每个 Agent 理解整个团队 | recall、learnings、代码知识图谱、teamwiki... |
65
+ | **Team Improvement** (beta) | 让每一次执行都成为团队能力的积累 | 基于摩擦信号的经验分享、sessions、digest、dashboard... |
56
66
 
57
67
  ## 功能概览
58
68
 
@@ -61,8 +71,8 @@ teamai init https://github.com/yourorg/yourrepo --scope user
61
71
  <tr>
62
72
  <th rowspan="2">Agent</th>
63
73
  <th colspan="7">Team Execution</th>
64
- <th colspan="3">Team Context</th>
65
- <th colspan="3">Team Improvement</th>
74
+ <th colspan="3">Team Context (beta)</th>
75
+ <th colspan="3">Team Improvement (beta)</th>
66
76
  </tr>
67
77
  <tr>
68
78
  <th>skills</th><th>rules</th><th>docs</th><th>env</th><th>agents</th><th>hooks</th><th>mcp</th>
@@ -81,6 +91,7 @@ teamai init https://github.com/yourorg/yourrepo --scope user
81
91
  <tr><td>Hermes</td><td align="center">✓</td><td align="center">—</td><td align="center">✓</td><td align="center">✓</td><td align="center">—</td><td align="center">—</td><td align="center">—</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">—</td><td align="center">—</td><td align="center">—</td></tr>
82
92
  <tr><td>DeepSeek Harness</td><td align="center">✓</td><td align="center">—</td><td align="center">✓</td><td align="center">—</td><td align="center">—</td><td align="center">—</td><td align="center">—</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">—</td><td align="center">—</td><td align="center">—</td></tr>
83
93
  <tr><td>Qoder</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td></tr>
94
+ <tr><td>ZCode</td><td align="center">✓</td><td align="center">—</td><td align="center">✓</td><td align="center">—</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td><td align="center">✓</td></tr>
84
95
  </tbody>
85
96
  </table>
86
97
 
@@ -110,74 +121,27 @@ teamai push → 创建分支 + MR → reviewer 审批合并
110
121
  SessionStart hook → teamai pull → 同步到本地 AI 工具
111
122
  ```
112
123
 
113
- 成员通过 `teamai push` 提交变更并创建合并请求供审核。若某个资源已在未合并的 PR 中等待评审,再次对它执行 `teamai push` 会就地更新该 PR,而非新开一个重复的 PR。合并后,`teamai pull`(由 SessionStart hook 在会话启动时自动触发)将最新资源同步到本地。Skills 会同步到 `~/.claude/skills/`、`~/.codex/skills/`、`~/.cursor/skills/`、`~/.codebuddy/skills/` 等目录。对于 Codex,若 skill 已存在于 `~/.agents/skills/`,则会在原位置更新,不会在 `~/.codex/skills/` 创建重复副本。在 **project scope** 安装下,SessionStart 会先为当前工具创建项目根目录(例如 `<project>/.claude`),再 pull 写入;单独执行 `teamai pull` 仍不会凭空创建 Agent 目录。
114
-
115
- ### 团队 Hooks
116
-
117
- 在 `hooks/hooks.yaml` 中声明自定义 hooks,`teamai pull` 自动分发到所有 AI 工具:
118
-
119
- ```yaml
120
- hooks:
121
- - id: block-secret
122
- description: 提交前扫描密钥
123
- event: PreToolUse
124
- matcher: Bash
125
- command: 'bash -lc "~/.teamai/team-scripts/scan-secret.sh" || true'
126
- tools: [claude, cursor]
127
- ```
128
-
129
- ```bash
130
- teamai hooks list # 查看生效的 hooks
131
- teamai hooks inject # 重新注入到每个已安装的工具
132
- teamai hooks remove # 移除所有 teamai 管理的 hooks
133
- ```
134
-
135
- ### 团队 MCP Server
136
-
137
- 在 `mcp/mcp.yaml` 中声明一次,`teamai pull` 按各工具原生格式写入。密钥用 `${VAR}`。
138
-
139
- ```yaml
140
- servers:
141
- - name: gpu-analysis
142
- transport: http # stdio | http | sse
143
- url: https://example.com/api/mcp
144
- headers:
145
- Authorization: Bearer ${GPU_ANALYSIS_TOKEN}
146
- ```
147
-
148
- ```bash
149
- teamai mcp list | inject | remove
150
- ```
151
-
152
- ### Skill 订阅源
153
-
154
- 订阅额外的 skill 仓库——其他团队的公开仓库,或本团队内的公共/共享仓库:
155
-
156
- ```bash
157
- teamai source add https://github.com/other-team/teamai-public.git --name other-team
158
- teamai source list
159
- teamai source browse other-team # 浏览可用 skills
160
- teamai source remove other-team
161
- ```
162
-
163
- 添加/移除会立即在本机生效,订阅的 skills 会在下一次 `teamai pull` 时同步。需要将
164
- `teamai.yaml` 的改动分享给团队成员时,再运行 `teamai push`。
124
+ ### 分发内容
165
125
 
166
- ### 团队包
126
+ 每类资源分发到每个 Agent:
167
127
 
168
- 共享并一键恢复团队的 npm 包和 Claude Code 插件:
128
+ | 资源 | 团队仓库中的位置 | 备注 |
129
+ |------|------------------|------|
130
+ | **Skills** | `skills/<name>/SKILL.md` | |
131
+ | **Rules** | `rules/*.md` | |
132
+ | **Docs** | `docs/` | 项目基础文档,默认不全量加载(渐进式披露) |
133
+ | **Agents** | `agents/<name>.yaml` | |
134
+ | **Culture** | `culture.md` | 团队使命、价值观与协作准则——注入各 Agent 的 CLAUDE.md / AGENTS.md,成为每次会话的行事底色 |
135
+ | **CLAUDE.md** | `claudemd/*.md` | |
136
+ | **Env** | `env/` | 通用环境变量、团队级开关;不建议直接放密钥 |
137
+ | **Hooks** | `hooks/hooks.yaml` | |
138
+ | **MCP** | `mcp/mcp.yaml` | |
139
+ | **Packages** | `teamai.yaml` | 目前只支持 npm 包和 Claude 插件 |
140
+ | **Models** | — | 暂时没有对全部 provider 实现 |
169
141
 
170
- ```bash
171
- teamai packages install typescript
172
- teamai packages install typescript@5.9.2 --npm
173
- teamai packages install code-review@claude-plugins-official
174
- teamai push # 分享团队声明
175
- teamai packages # 安装团队声明的全部包
176
- ```
177
-
178
- 完整工作流和配置见[使用指南](docs/usage-guide.zh-CN.md#团队包)。
142
+ 文件格式与完整工作流见[使用指南](docs/usage-guide.zh-CN.md)。
179
143
 
180
- ## Team Context
144
+ ## Team Context (beta)
181
145
 
182
146
  > Every agent understands how the team works.
183
147
 
@@ -227,7 +191,7 @@ Matched: conflict | Missing: port
227
191
  teamai import --from-repo https://github.com/org/repo
228
192
  teamai import --from-org myorg # 批量导入所有仓库
229
193
  teamai codebase --extract /path/to/repo # 本地提取到 teamwiki/
230
- teamai codebase --lint # 健康检查
194
+ teamai codebase --lint --output /path/to/repo # 检查本地提取的图谱
231
195
  ```
232
196
 
233
197
  图谱存储组件、接口、配置和跨仓库依赖边。`teamai recall` 利用图谱进行增强排名。
@@ -240,10 +204,20 @@ teamai codebase --lint # 健康检查
240
204
 
241
205
  WASM 解析器是纯 JavaScript 依赖,无需任何原生编译工具链。若因任何原因加载失败,提取会降级到启发式轨并记录一条 `AST_UNAVAILABLE` gap。设置 `TEAMAI_SKIP_AST=1` 可强制仅使用启发式提取。
242
206
 
243
- ## Team Improvement
207
+ ## Team Improvement (beta)
244
208
 
245
209
  > Every execution makes the entire team smarter.
246
210
 
211
+ ### Maintenance
212
+
213
+ 随着 skills 和知识积累,可以把团队不再使用的内容清掉。`teamai recall maintenance` 会归档低置信度 learnings,并标出过时的 skills、rules 和 docs,供清理或更新:
214
+
215
+ ```bash
216
+ teamai recall maintenance --prune --dry-run # 预览
217
+ teamai recall maintenance --prune --archive # 归档无用 learnings
218
+ teamai recall maintenance --update-quality # 为过时 skills / docs 生成更新草稿
219
+ ```
220
+
247
221
  洞察团队实际如何使用 AI 工具,也是把 session 中的摩擦转化为共享 Skill、Rule 和知识的起点:
248
222
 
249
223
  | 能力 | 命令 | 呈现内容 |
@@ -289,13 +263,3 @@ WASM 解析器是纯 JavaScript 依赖,无需任何原生编译工具链。若
289
263
  ## 贡献
290
264
 
291
265
  欢迎提交 PR!请先阅读 [CONTRIBUTING.md](.github/CONTRIBUTING.md)。
292
-
293
- ## 贡献者
294
-
295
- 感谢每一位为 TeamAI 贡献代码的伙伴!
296
-
297
- <a href="https://github.com/Tencent/teamai-cli/graphs/contributors">
298
- <img src="https://contrib.rocks/image?repo=Tencent/teamai-cli" alt="Contributors" />
299
- </a>
300
-
301
- 由 [contrib.rocks](https://contrib.rocks) 生成。