teamai-cli 0.21.0-beta.0 → 0.21.0-beta.10

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/CHANGELOG.md CHANGED
@@ -22,6 +22,10 @@ All notable changes to this project will be documented in this file. See [standa
22
22
  - `teamai skill` 或 `teamai skill list`:等价 `teamai list skills --source all`
23
23
  - `teamai skill show <name>`:查看单个 skill 的来源标签、命名空间、贡献者、`tags.yaml` 中的 tags、已安装的 agent 列表,以及 frontmatter 中的描述(最多 160 字符)。不渲染完整 SKILL.md 正文
24
24
 
25
+ ### 🐛 修复
26
+
27
+ - **项目级 source 配置持久化**(#335):`teamai pull` 自动上报 usage 时不再丢弃 `source add`/`remove` 尚未提交的 `teamai.yaml` 改动,后续 pull 可正常部署订阅 skills 并写入安装清单
28
+
25
29
  ## [0.14.2] (2026-04-16)
26
30
 
27
31
  ### 🐛 修复
package/README.md CHANGED
@@ -11,14 +11,9 @@
11
11
  [![npm downloads](https://img.shields.io/npm/dm/teamai-cli.svg)](https://www.npmjs.com/package/teamai-cli)
12
12
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
13
13
 
14
- [![User Chat](https://img.shields.io/badge/User_Chat-Discord-5865F2?logo=discord&logoColor=white)](https://discord.gg/gervEZm58g)
15
- [![Developer Chat](https://img.shields.io/badge/Developer_Chat-Discord-5865F2?logo=discord&logoColor=white)](https://discord.gg/DeHHxPnfZF)
14
+ Make every AI coding agent work by the best harness.
16
15
 
17
- Make every AI coding agent work by the same harness.
18
-
19
- Git-native management of skills, rules, and docs across Claude Code / Codex / CodeBuddy / WorkBuddy / OpenCode and more.
20
-
21
- For you or your whole team.
16
+ Git-native management of skills, rules, MCP, env vars, knowledge base, and more — across Claude Code / Codex / CodeBuddy / WorkBuddy / OpenCode and more.
22
17
 
23
18
  ## Quick Start
24
19
 
@@ -30,55 +25,81 @@ npm install -g teamai-cli
30
25
 
31
26
  ### Team admin / solo user
32
27
 
33
- Create a shared-experience repo on your git host (GitHub, TGit, CNB, or a self-hosted Git service), **grant write access to team members**, then have them run `teamai init https://github.com/yourorg/yourrepo`.
34
-
35
- > Solo use needs no separate repo setup: `teamai init` checks the target repo and creates it automatically if it doesn't exist.
36
-
37
- > Self-hosted GitLab/Gitea-style services use your HTTPS credential helper or SSH key. Create the repository first; merge requests are created manually for now. See [Git Provider docs](docs/providers.md).
28
+ Create a shared-experience repo on your git host (GitHub, GitLab, CNB, TGit, or a private Git service), **grant write access to team members**, then run `teamai init https://github.com/yourorg/yourrepo`.
38
29
 
39
30
  > **No team repo yet?** Start from a template pre-loaded with production-ready skills, rules, and review agents. Browse the [teamai-hub](https://github.com/teamai-hub) org, click **Use this template**, then `teamai init` against your new repo.
40
31
 
41
32
  ### Team members
42
33
 
43
34
  ```bash
35
+ # Choose one, depending on where you want resources installed
36
+
44
37
  # Project-scope init (default, resources installed under the project directory)
45
38
  cd /path/to/my-project
46
39
  teamai init https://github.com/yourorg/yourrepo
47
40
 
48
- # User-scope init (resources installed under ~/)
41
+ # Or, user-scope init (resources installed under ~/)
49
42
  teamai init https://github.com/yourorg/yourrepo --scope user
50
-
51
- # Optional layered setup: keep a project repo active while inheriting safe
52
- # resources and searchable knowledge from an initialized user-scope repo
53
- cd /path/to/my-project
54
- teamai init https://github.com/yourorg/project-repo --inherit-user-scope
55
43
  ```
56
44
 
57
45
  Once initialized, every AI session automatically pulls the latest skills / rules and other Harness updates published by admins — no manual sync needed.
58
46
 
59
- ### Single-repo mode (the business repo *is* the team repo)
60
-
61
- No separate team repo. Run `teamai init .` inside an existing project and its own git repo becomes the team repo:
62
-
63
- ```bash
64
- cd /path/to/my-project
65
- teamai init . # interactive: pick which AI tools to set up
66
- teamai init . --agent claude,codex # non-interactive: Claude Code + Codex
67
- ```
68
-
69
- - **Knowledge** (skills / rules / docs / learnings) is committed to your repo's **main branch** under `.teamai/`, so a plain `git clone` already carries the whole team setup.
70
- - **Reports** (member registrations, session summaries, votes, usage stats) go to a separate **`teamai-reports` orphan branch** — they never touch main.
71
- - **You choose which AI tools to set up.** `--agent claude,codex` (repeatable/comma-separated), an interactive picker when omitted, or — in non-interactive contexts — whichever tools you already use under `~/`. teamai creates each selected tool's dir, injects hooks, and commits its settings.
72
- - **Clone = initialized.** When a teammate clones the repo, the next `teamai` command (or AI session) auto-detects the `mode: self` marker in `.teamai/teamai.yaml` and finishes local setup automatically — no need to re-type repo/role.
73
- - All of teamai's git operations run in isolated worktrees, so your working tree and current branch are never touched.
74
-
75
- `teamai init .` commits `.teamai/` (skills, rules, docs, learnings, `teamai.yaml`, `.gitignore`) plus each selected tool's settings (e.g. `.claude/settings.json`, `.codex/hooks.json`) for you; just push main so teammates get auto-initialized on clone.
76
-
77
47
  > **Full usage guide:** [docs/usage-guide.md](docs/usage-guide.md) ([中文版](docs/usage-guide.zh-CN.md)) — covers everything from team creation to day-to-day use.
78
48
 
49
+ ## Overview
50
+
51
+ <table>
52
+ <thead>
53
+ <tr>
54
+ <th rowspan="2">Agent</th>
55
+ <th colspan="7">Harness</th>
56
+ <th colspan="3">Knowledge Base</th>
57
+ <th colspan="3">Analytics</th>
58
+ </tr>
59
+ <tr>
60
+ <th>skills</th><th>rules</th><th>docs</th><th>env</th><th>agents</th><th>hooks</th><th>mcp</th>
61
+ <th>learnings</th><th>codebase</th><th>teamwiki</th>
62
+ <th>usage</th><th>sessions</th><th>dashboard</th>
63
+ </tr>
64
+ </thead>
65
+ <tbody>
66
+ <tr><td>Claude Code</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>
67
+ <tr><td>Codex</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>
68
+ <tr><td>Cursor</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>
69
+ <tr><td>CodeBuddy</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>
70
+ <tr><td>OpenCode</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>
71
+ <tr><td>WorkBuddy</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>
72
+ <tr><td>OpenClaw</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>
73
+ <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>
74
+ <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>
75
+ </tbody>
76
+ </table>
77
+
78
+ **Git providers** — GitHub · GitLab · CNB · TGit · private Git service.
79
+
80
+ ### Distribution Controls
81
+
82
+ Team-wide settings an admin configures once and delivers to every member on `teamai pull`:
83
+
84
+ | Capability | Command | What it does |
85
+ |------------|---------|--------------|
86
+ | **Roles** | `teamai roles` | Define role → namespace mappings so each member syncs only the skills for their role. |
87
+ | **Tags** | `teamai tags` | Tag skills / rules so members subscribe to just the tags they need. |
88
+ | **Sources** | `teamai source` | Subscribe to additional skill repos — other teams' public repos, or shared/public repos within your own org; subscribed skills sync automatically on pull. |
89
+
90
+ ### Analytics
91
+
92
+ Insight into how the team actually uses its AI tools:
93
+
94
+ | Capability | Command | What it shows |
95
+ |------------|---------|---------------|
96
+ | **Usage** | `teamai digest` | Weekly team digest — token usage, conversation volume, and intervention rate. |
97
+ | **Sessions** | `teamai session save` | Privacy-scrubbed per-session summaries (tool sequence, prompt turns, interventions) that feed the digest's Session Highlights. |
98
+ | **Dashboard** | `teamai dashboard` | Web dashboard showing team members' live coding-session status, intervention count, and token usage. |
99
+
79
100
  ## Harness Management & Distribution
80
101
 
81
- TeamAI keeps skills, rules, docs, and hooks in a shared git repo and distributes them to every member's local AI tools through a "push → review & merge → pull" flow — with support for subscribing to other teams' Harness.
102
+ TeamAI keeps skills, rules, docs, and hooks in a shared git repo and distributes them to every member's local AI tools through a "push → review & merge → pull" flow — with support for subscribing to other teams' or shared repos' Harness.
82
103
 
83
104
  ### How It Works
84
105
 
@@ -88,7 +109,7 @@ teamai push → create branch + MR → reviewer approves + merges
88
109
  SessionStart hook → teamai pull → synced to local AI tools
89
110
  ```
90
111
 
91
- Members push changes via `teamai push`, which opens a Merge Request for review. 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.
112
+ Members push changes via `teamai push`, which opens a Merge Request for review. 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. 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.
92
113
 
93
114
  ### Team Hooks
94
115
 
@@ -127,9 +148,9 @@ servers:
127
148
  teamai mcp list | inject | remove
128
149
  ```
129
150
 
130
- ### Cross-team Skill Subscription
151
+ ### Skill Subscription Sources
131
152
 
132
- Subscribe to other teams' public skill repos:
153
+ Subscribe to additional skill repos — other teams' public repos, or shared/public repos within your own org:
133
154
 
134
155
  ```bash
135
156
  teamai source add https://github.com/other-team/teamai-public.git --name other-team
@@ -138,7 +159,8 @@ teamai source browse other-team # browse available skills
138
159
  teamai source remove other-team
139
160
  ```
140
161
 
141
- Subscribed skills sync automatically on `teamai pull`.
162
+ The add/remove change takes effect locally right away, and subscribed skills sync on the next
163
+ `teamai pull`. Run `teamai push` when you want to share the `teamai.yaml` change with teammates.
142
164
 
143
165
  ## Knowledge Base
144
166
 
@@ -180,21 +202,6 @@ Author: member-b | Score: 12.0 | Tags: deploy, config
180
202
  Matched: conflict | Missing: port
181
203
  ```
182
204
 
183
- A `Matched: … | Missing: …` line appears whenever a hit does not cover every
184
- query term (omitted when all terms matched). Recall returns its top matches by
185
- score without filtering on coverage: a hit missing all of your distinctive
186
- terms is topically adjacent, not an answer. Judging that is the caller's job —
187
- the score alone cannot express it. Entries matching on title, date, author and
188
- content are collapsed, so the same learning shared twice does not occupy two
189
- slots.
190
-
191
- **Coverage spans two parts:**
192
-
193
- - **Shared search index** (`search-index.json`): four categories — learnings (session experience), docs (team docs), rules (coding rules), and skills (each `SKILL.md`) — sourced from the corresponding team-repo directories, (re)built on `teamai pull` / `teamai contribute`.
194
- - **Codebase knowledge graph** (`teamwiki/`): produced by `teamai import`, queried live at search time.
195
-
196
- Ranking uses BM25 + graph-boost. When the current working directory contains a project-scope config, Recall searches that project; if the project enables `--inherit-user-scope`, it then searches user knowledge, tags each result with its origin, and lets an identical project entry override the user entry. Without a project config in the current directory, Recall searches the user scope. Active-scope hits are implicitly upvoted; inherited user hits remain read-only while the project is active.
197
-
198
205
  ### Codebase Knowledge Graph
199
206
 
200
207
  `teamai import` parses source repos into a structured graph under `teamwiki/`, enabling structurally-aware retrieval:
@@ -224,16 +231,15 @@ When a recall hit comes from a codebase page, the result includes a `Sources:` l
224
231
  | `teamai ci extract-mr --url <url>` | CI: extract knowledge from MR, post comments, write after merge |
225
232
  | `teamai members` | List team members |
226
233
  | `teamai roles` | Manage team roles and namespaces |
234
+ | `teamai tags` | Manage tag-based skill/rule filtering |
227
235
  | `teamai skill exclude add/remove/list` | Manage skills excluded from local sync ([usage guide](docs/usage-guide.md#excluding-skills-you-dont-need)) |
228
- | `teamai source` | Manage cross-team skill subscriptions |
236
+ | `teamai source` | Manage skill subscription sources (other teams or your org's shared repos) |
229
237
  | `teamai remove <type> <name>` | Remove a resource and open MR |
230
238
  | `teamai session save` | Record a privacy-scrubbed session summary to a monthly log (`--push` feeds `digest`) |
231
239
  | `teamai digest` | Generate weekly team usage digest |
232
240
  | `teamai doctor` | Diagnose configuration issues |
233
241
  | `teamai uninstall` | Remove all teamai resources and hooks |
234
242
 
235
- Global options: `--dry-run`, `--verbose`
236
-
237
243
  ## License
238
244
 
239
245
  [MIT](LICENSE)
package/README.zh-CN.md CHANGED
@@ -11,14 +11,9 @@
11
11
  [![npm downloads](https://img.shields.io/npm/dm/teamai-cli.svg)](https://www.npmjs.com/package/teamai-cli)
12
12
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
13
13
 
14
- [![用户交流](https://img.shields.io/badge/用户交流-Discord-5865F2?logo=discord&logoColor=white)](https://discord.gg/gervEZm58g)
15
- [![开发者交流](https://img.shields.io/badge/开发者交流-Discord-5865F2?logo=discord&logoColor=white)](https://discord.gg/DeHHxPnfZF)
14
+ 面向 AI 智能体的团队 Harness 管理和分发工具。
16
15
 
17
- 面向 AI 智能体的团队 Harness 分发工具。
18
-
19
- 通过 Git 统一管理 skills、rules、docs,驾驭 Claude Code / Codex / CodeBuddy / WorkBuddy / OpenCode 等多种 AI 工具。
20
-
21
- 一个人也能用,团队用更强。
16
+ 通过 Git 统一管理 skills、rules、mcp、环境变量、知识库等 Harness,驾驭 Claude Code / Codex / CodeBuddy / WorkBuddy / OpenCode 等多种 AI 工具。
22
17
 
23
18
  ## 快速开始
24
19
 
@@ -30,55 +25,81 @@ npm install -g teamai-cli
30
25
 
31
26
  ### 团队管理员 / 个人使用者
32
27
 
33
- 在 Git 托管平台(GitHub、TGit、CNB 或自建 Git 服务)创建共享经验仓库,**授予团队成员写权限**,然后让他们运行 `teamai init https://github.com/yourorg/yourrepo`。
34
-
35
- > 个人使用无需单独建仓:`teamai init` 会检查目标仓库,不存在时自动创建。
36
-
37
- > 自建 GitLab/Gitea 等服务支持 HTTPS Credential Helper 或 SSH Key;需预先创建仓库,MR 暂时手动创建。详见 [Git Provider 说明](docs/providers.md)。
28
+ 在 Git 托管平台(GitHub、GitLab、CNB、TGit,或私有 Git 服务)创建共享经验仓库,**授予团队成员写权限**,然后运行 `teamai init https://github.com/yourorg/yourrepo`。
38
29
 
39
30
  > **还没有团队仓库?** 可以从内置了成套 skills、rules、review agents 的模板起步。浏览 [teamai-hub](https://github.com/teamai-hub) org,点 **Use this template** 生成自己的仓库,再对它执行 `teamai init`。
40
31
 
41
32
  ### 团队成员
42
33
 
43
34
  ```bash
35
+ # 二选一:按你想要的安装范围选择其中一条
36
+
44
37
  # 项目级初始化(默认,资源安装到项目目录下)
45
38
  cd /path/to/my-project
46
39
  teamai init https://github.com/yourorg/yourrepo
47
40
 
48
- # 用户级初始化(资源安装到 ~/ 下)
41
+ # 或者,用户级初始化(资源安装到 ~/ 下)
49
42
  teamai init https://github.com/yourorg/yourrepo --scope user
50
-
51
- # 可选的分层模式:项目仓库保持为当前 scope,同时继承已初始化的
52
- # user scope 中的安全资源和可检索知识
53
- cd /path/to/my-project
54
- teamai init https://github.com/yourorg/project-repo --inherit-user-scope
55
43
  ```
56
44
 
57
45
  初始化完成后,每次开启 AI 会话时都会自动拉取管理员发布的 skills / rules 等 Harness 更新,无需手动同步。
58
46
 
59
- ### 单仓模式(业务仓即团队仓)
60
-
61
- 无需单独的团队仓库。在已有项目里运行 `teamai init .`,让它自己的 git 仓库直接充当团队仓:
62
-
63
- ```bash
64
- cd /path/to/my-project
65
- teamai init . # 交互式:选择要启用哪些 AI 工具
66
- teamai init . --agent claude,codex # 非交互:启用 Claude Code + Codex
67
- ```
68
-
69
- - **知识资产**(skills / rules / docs / learnings)提交到仓库 **main 分支**的 `.teamai/` 目录,因此一次普通 `git clone` 就带上了整套团队配置。
70
- - **上报数据**(成员注册、会话摘要、投票、使用统计)走独立的 **`teamai-reports` 孤儿分支** —— 永不污染 main。
71
- - **由你选择启用哪些 AI 工具。** `--agent claude,codex`(可重复/逗号分隔),省略时弹交互选择框,非交互场景则按你本机 `~/` 下已装的工具来建。teamai 为每个所选工具建目录、注入 hooks、并提交其 settings。
72
- - **克隆即初始化。** 团队成员 clone 仓库后,下一条 `teamai` 命令(或 AI 会话)会自动识别 `.teamai/teamai.yaml` 里的 `mode: self` 标记并自动完成本机初始化 —— 无需手抄 repo/role 参数。
73
- - teamai 的所有 git 操作都在隔离的 worktree 中进行,绝不触碰你的工作区和当前分支。
74
-
75
- `teamai init .` 会帮你把 `.teamai/`(skills、rules、docs、learnings、`teamai.yaml`、`.gitignore`)以及每个所选工具的 settings(如 `.claude/settings.json`、`.codex/hooks.json`)提交好;推送 main 后团队成员 clone 即可自动初始化。
76
-
77
47
  > **完整使用指南**:[docs/usage-guide.zh-CN.md](docs/usage-guide.zh-CN.md)([English](docs/usage-guide.md))— 涵盖从团队创建到日常使用的全流程。
78
48
 
49
+ ## 功能概览
50
+
51
+ <table>
52
+ <thead>
53
+ <tr>
54
+ <th rowspan="2">Agent</th>
55
+ <th colspan="7">Harness</th>
56
+ <th colspan="3">知识库</th>
57
+ <th colspan="3">使用分析</th>
58
+ </tr>
59
+ <tr>
60
+ <th>skills</th><th>rules</th><th>docs</th><th>env</th><th>agents</th><th>hooks</th><th>mcp</th>
61
+ <th>learnings</th><th>codebase</th><th>teamwiki</th>
62
+ <th>usage</th><th>sessions</th><th>dashboard</th>
63
+ </tr>
64
+ </thead>
65
+ <tbody>
66
+ <tr><td>Claude Code</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>
67
+ <tr><td>Codex</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>
68
+ <tr><td>Cursor</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>
69
+ <tr><td>CodeBuddy</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>
70
+ <tr><td>OpenCode</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>
71
+ <tr><td>WorkBuddy</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>
72
+ <tr><td>OpenClaw</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>
73
+ <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>
74
+ <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>
75
+ </tbody>
76
+ </table>
77
+
78
+ **Git 托管平台** —— GitHub · GitLab · CNB · TGit · 私有 Git 服务。
79
+
80
+ ### 分发策略
81
+
82
+ 管理员一次配置、随 `teamai pull` 分发给每位成员的团队级设置:
83
+
84
+ | 能力 | 命令 | 作用 |
85
+ |------|------|------|
86
+ | **角色(Roles)** | `teamai roles` | 定义「角色 → 命名空间」映射,让每位成员只同步与自身角色匹配的 skills。 |
87
+ | **标签(Tags)** | `teamai tags` | 给 skills / rules 打标签,成员只订阅自己需要的标签。 |
88
+ | **订阅源(Sources)** | `teamai source` | 订阅额外的 skill 仓库——其他团队的公开仓库,或本团队内的公共/共享仓库;已订阅的 skills 会在 pull 时自动同步。 |
89
+
90
+ ### 使用分析
91
+
92
+ 洞察团队实际如何使用 AI 工具:
93
+
94
+ | 能力 | 命令 | 呈现内容 |
95
+ |------|------|----------|
96
+ | **用量(Usage)** | `teamai digest` | 团队周报——token 用量、会话量、干预率。 |
97
+ | **会话(Sessions)** | `teamai session save` | 脱敏的单会话摘要(工具序列、对话轮次、干预次数),喂给周报的 Session Highlights。 |
98
+ | **看板(Dashboard)** | `teamai dashboard` | Web 看板,实时展示成员的编码会话状态、干预次数和 token 用量。 |
99
+
79
100
  ## Harness 管理和分发
80
101
 
81
- TeamAI 把 skills、rules、docs、hooks 统一存放在共享 Git 仓库,通过「push → 评审合并 → pull」的流程分发到每位成员的本地 AI 工具,并支持订阅其他团队的 Harness。
102
+ TeamAI 把 skills、rules、docs、hooks 统一存放在共享 Git 仓库,通过「push → 评审合并 → pull」的流程分发到每位成员的本地 AI 工具,并支持订阅其他团队或公共仓库的 Harness。
82
103
 
83
104
  ### 工作原理
84
105
 
@@ -88,7 +109,7 @@ teamai push → 创建分支 + MR → reviewer 审批合并
88
109
  SessionStart hook → teamai pull → 同步到本地 AI 工具
89
110
  ```
90
111
 
91
- 成员通过 `teamai push` 提交变更并创建合并请求供审核。合并后,`teamai pull`(由 SessionStart hook 在会话启动时自动触发)将最新资源同步到本地。Skills 会同步到 `~/.claude/skills/`、`~/.codex/skills/`、`~/.cursor/skills/`、`~/.codebuddy/skills/` 等目录。
112
+ 成员通过 `teamai push` 提交变更并创建合并请求供审核。合并后,`teamai pull`(由 SessionStart hook 在会话启动时自动触发)将最新资源同步到本地。Skills 会同步到 `~/.claude/skills/`、`~/.codex/skills/`、`~/.cursor/skills/`、`~/.codebuddy/skills/` 等目录。在 **project scope** 安装下,SessionStart 会先为当前工具创建项目根目录(例如 `<project>/.claude`),再 pull 写入;单独执行 `teamai pull` 仍不会凭空创建 Agent 目录。
92
113
 
93
114
  ### 团队 Hooks
94
115
 
@@ -127,9 +148,9 @@ servers:
127
148
  teamai mcp list | inject | remove
128
149
  ```
129
150
 
130
- ### 跨团队 Skill 订阅
151
+ ### Skill 订阅源
131
152
 
132
- 订阅其他团队的公开 skill 仓库:
153
+ 订阅额外的 skill 仓库——其他团队的公开仓库,或本团队内的公共/共享仓库:
133
154
 
134
155
  ```bash
135
156
  teamai source add https://github.com/other-team/teamai-public.git --name other-team
@@ -138,7 +159,8 @@ teamai source browse other-team # 浏览可用 skills
138
159
  teamai source remove other-team
139
160
  ```
140
161
 
141
- 订阅的 skills `teamai pull` 时自动同步。
162
+ 添加/移除会立即在本机生效,订阅的 skills 会在下一次 `teamai pull` 时同步。需要将
163
+ `teamai.yaml` 的改动分享给团队成员时,再运行 `teamai push`。
142
164
 
143
165
  ## 知识库
144
166
 
@@ -180,18 +202,6 @@ Author: member-b | Score: 12.0 | Tags: deploy, config
180
202
  Matched: conflict | Missing: port
181
203
  ```
182
204
 
183
- 当某条结果未覆盖全部查询词时,会输出 `Matched: … | Missing: …` 行(全部命中时省略)。
184
- recall 按分数返回 top 结果,**不会**按覆盖度过滤:若你的关键区分词全在 `Missing:` 里,
185
- 说明这条只是主题相邻,并非答案。这个判断由调用方来做 —— 分数本身无法表达它。
186
- 标题、日期、作者与内容均相同的条目会被合并,因此同一条 learning 被分享两次不会占用两个名额。
187
-
188
- **检索内容覆盖两部分**:
189
-
190
- - **共享检索索引**(`search-index.json`):learnings(session 经验)、docs(团队文档)、rules(编码规则)、skills(各 `SKILL.md`)四类,源自团队仓库对应目录,在 `teamai pull` / `teamai contribute` 时构建重建。
191
- - **代码知识图谱**(`teamwiki/`):由 `teamai import` 生成,检索时实时查询。
192
-
193
- 排序采用 BM25 + 图谱增强。当前工作目录包含 project scope 配置时,Recall 先检索该项目;如果项目启用了 `--inherit-user-scope`,再检索 user 知识并标注结果来源,相同条目由 project 版本覆盖 user 版本。当前目录没有 project 配置时,Recall 检索 user scope。当前 scope 的命中会隐式投票,项目运行期间继承的 user 命中保持只读。
194
-
195
205
  ### 代码知识图谱
196
206
 
197
207
  `teamai import` 将源码仓库解析为 `teamwiki/` 下的结构化图谱,实现结构感知的检索:
@@ -221,16 +231,15 @@ teamai codebase --lint # 健康检查
221
231
  | `teamai ci extract-mr --url <url>` | CI:从 MR 提取知识、发评论、合并后写入 |
222
232
  | `teamai members` | 查看团队成员 |
223
233
  | `teamai roles` | 管理团队角色和命名空间 |
234
+ | `teamai tags` | 管理基于标签的 skill/rule 过滤 |
224
235
  | `teamai skill exclude add/remove/list` | 管理不参与本地同步的 skills([使用指南](docs/usage-guide.zh-CN.md#排除个人不需要的-skill)) |
225
- | `teamai source` | 管理跨团队 skill 订阅 |
236
+ | `teamai source` | 管理 skill 订阅源(其他团队或本团队公共仓库) |
226
237
  | `teamai remove <type> <name>` | 删除资源并创建 MR |
227
238
  | `teamai session save` | 将脱敏后的 session 摘要记录到月度日志(`--push` 可喂给 `digest`) |
228
239
  | `teamai digest` | 生成团队周报 |
229
240
  | `teamai doctor` | 诊断配置问题 |
230
241
  | `teamai uninstall` | 移除所有 teamai 资源和 hooks |
231
242
 
232
- 全局选项:`--dry-run`、`--verbose`
233
-
234
243
  ## 许可证
235
244
 
236
245
  [MIT](LICENSE)