teamai-cli 0.23.0 → 0.23.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "teamai-cli",
3
- "version": "0.23.0",
3
+ "version": "0.23.1",
4
4
  "description": "TeamAI — Make Every Team AI Native (skill sync + shared knowledge base, powered by Git)",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,6 +1,6 @@
1
1
  # team-wiki-codebase — 大型代码库 AI 认知工程
2
2
 
3
- > Team Wiki 插件内置 skill:方法论、脚本与 Agent 规范均随 `team-wiki install` / `upgrade` 部署到项目的 `.codebuddy/`、`.cursor/` 等目录。
3
+ > TeamAI builtin skill:方法论、脚本与 Agent 规范随 `teamai pull` / `teamai init` 部署到项目的 `.codebuddy/`、`.cursor/` 等目录。TeamAI does not ship a separate team-wiki CLI. No extra plugin is required.
4
4
 
5
5
  ## 为什么需要这个 skill
6
6
 
@@ -22,7 +22,7 @@
22
22
  - 每条组件关系有置信度标注(`EXTRACTED` / `INFERRED` / `AMBIGUOUS`)
23
23
  - 每次生成后有准确性统计,超标自动警告
24
24
  - AI 读知识库而非读源码,**约 1/50 的 token 消耗**获得全局架构认知
25
- - Phase 0 可用 `team-wiki compile code --extract ast,heuristic` 生成可证据化的结构边(TS/JS/Python/Go)
25
+ - Phase 0 可用 `teamai codebase --extract` 生成可证据化的结构边(TS/JS/Python/Go AST + 多语言 heuristic
26
26
 
27
27
  ---
28
28
 
@@ -39,7 +39,7 @@
39
39
  ├── XX_{项目名}产品规则速查表.md
40
40
  ├── XX_{项目名}业务开发规范SOP.md
41
41
  ├── {反模式/RPC契约/排障记录} × N
42
- ├── _manifest.json ← 机器可读 manifest(供 team-wiki compile 快路径)
42
+ ├── _manifest.json ← 机器可读 manifest(供后续图谱合并)
43
43
  └── graph/ ← Graph RAG 图谱文档集
44
44
  ├── G1 组件依赖关系矩阵
45
45
  ├── G2 调用链路全景 + 状态机
@@ -6,7 +6,7 @@ description: |
6
6
 
7
7
  适用场景:项目有 10+ 仓库或微服务,AI 直接读代码无法全局理解、回答不准确、token 开销大。
8
8
 
9
- 产出:组件设计文档 × N + 架构总览 + 桥梁文档 + Graph RAG 图谱(G1~G9) + _manifest.json + team-wiki 编译产物。
9
+ 产出:组件设计文档 × N + 架构总览 + 桥梁文档 + Graph RAG 图谱(G1~G9) + _manifest.json + teamai extract graph (teamwiki/)。
10
10
 
11
11
  Trigger: team-wiki-codebase, code-to-knowledge, 代码知识库, 架构分析, 架构逆向
12
12
  Prerequisites: 可访问的源码目录(支持多仓库);本 skill 目录下 `references/` 与 `scripts/`
@@ -14,8 +14,8 @@ description: |
14
14
 
15
15
  # team-wiki-codebase — 大型代码库 AI 认知工程
16
16
 
17
- > 方法论与脚本位于本 skill 的 `references/`、`scripts/`(`team-wiki upgrade` 后出现在 `.cursor/skills/team-wiki-codebase/` 或 `.codebuddy/skills/team-wiki-codebase/`)。人类可读概览见 [README.md](./README.md)。
18
- > 图谱 CLI 能力见 [GRAPH-CAPABILITIES.md](../GRAPH-CAPABILITIES.md)。
17
+ > 方法论与脚本位于本 skill 的 `references/`、`scripts/`(`teamai pull` 后出现在 `.cursor/skills/team-wiki-codebase/` 或 `.codebuddy/skills/team-wiki-codebase/`)。人类可读概览见 [README.md](./README.md)。
18
+ > Phase 0 结构基线使用 `teamai codebase --extract`。TeamAI does not ship a separate team-wiki CLI. No extra plugin is required.
19
19
 
20
20
  **解决什么问题**:大型项目(10+ 仓库、数十微服务、迭代多年)让 AI 无法全局理解——上下文窗口装不下所有代码,组件关系散落各处,业务规则隐藏在深层调用链中。直接让 AI 读代码,既慢(海量 token)又不准(缺乏全局视角)。
21
21
 
@@ -300,22 +300,17 @@ FOR repo in repos:
300
300
 
301
301
  **Step 0D:CLI 结构基线(每个代码仓库,推荐)**
302
302
 
303
- 在 K1 深读之前,用 Team Wiki CLI 生成可证据化的 import/call 结构边(Python/Go/TS 等,`code-ast`)并与 regex 基线合并(`code-heuristic`):
303
+ 在 K1 深读之前,用 TeamAI 提取可证据化的 import/call 结构边(Python/Go/TS 等,`code-ast`)并与 regex 基线合并(`code-heuristic`):
304
304
 
305
305
  ```bash
306
- # 对每个 repo(<wiki_root> 通常为项目下的 .teamwiki .wiki)
307
- team-wiki compile code <repo_abs_path> <wiki_root> \
308
- --project <project_slug> \
309
- --extract ast,heuristic \
310
- --write
311
-
312
- # 预览 AST 统计(不写盘)
313
- team-wiki compile code <repo> <wiki> --extract ast --dry-run
306
+ # For each repo. Writes <repo>/teamwiki/ (evidence pages + .indices/graph-index.json).
307
+ # Existing flags only: --extract [path], optional --project <slug>, optional --incremental.
308
+ teamai codebase --extract <repo_abs_path> --project <project_slug>
314
309
  ```
315
310
 
316
- - 输出:`code/<project>/` index/component/relation 等页;`graph/<project>-graph-index.json`(结构边草案)。
317
- - K1/K2/K3 写 `_manifest.json` 的 `edges[]` 时:**优先引用** compile 的 `code-ast` 边 + `evidenceRefs`(`path:line`),Agent 推断标 `INFERRED`/`AMBIGUOUS`。
318
- - K3 完成后写入 wiki 图:`team-wiki compile code <output_dir> <wiki_root> --extract ast,heuristic --write`(有 `_manifest.json` 时走 manifest 快路径 merge `graph-index.json`)。
311
+ - Output: `teamwiki/evidence/code/<project>/` pages; `teamwiki/.indices/graph-index.json` (structural edges).
312
+ - K1/K2/K3 写 `_manifest.json` 的 `edges[]` 时:**优先引用** extract 的 `code-ast` 边 + `evidenceRefs`(`path:line`),Agent 推断标 `INFERRED`/`AMBIGUOUS`。
313
+ - After Phase K3, skip any extra graph compile / merge step that is not a `teamai` command. TeamAI does not ship a separate team-wiki CLI. Continue with this skill using `teamai` and the files under this skill directory. No extra plugin is required.
319
314
 
320
315
  写入初始 progress.json(current_phase: "phase0_done"),进入 **Phase K1**。
321
316
 
@@ -889,16 +884,16 @@ _review/ ← 过程文件(不入知识库)
889
884
 
890
885
  ---
891
886
 
892
- ## 与 Team Wiki CLI 的配合(必读)
887
+ ## 与 TeamAI CLI 的配合(必读)
893
888
 
894
889
  | 阶段 | 命令 / 路径 |
895
890
  |------|-------------|
896
- | Phase 0 结构基线 | `team-wiki compile code <repo> <wiki> --extract ast,heuristic --write` |
897
- | K3 后编译进 wiki | `team-wiki compile code <knowledge_output> <wiki> --write`(检测 `_manifest.json` manifest 快路径) |
898
- | 产品文档入图 | `team-wiki compile docs <docs> <wiki> --extract structure,entity --write` |
899
- | 产品↔代码桥接 | `team-wiki reconcile <wiki> --write` |
900
- | 一键刷新 | `team-wiki refresh <wiki> --repo <repo> [--docs <docs>] --extract-code ast,heuristic --write` |
901
- | 质量评估 | `team-wiki evaluate <wiki>`(含 `graph.structuralEdgeRatio` 等) |
891
+ | Phase 0 结构基线 | `teamai codebase --extract <repo> --project <slug>`(writes `<repo>/teamwiki/`) |
892
+ | K3 后编译进 wiki | Skip. TeamAI does not ship a separate team-wiki CLI. Continue with this skill using `teamai` and the files under this skill directory. No extra plugin is required. |
893
+ | 产品文档入图 | Skip. Same English note as above. |
894
+ | 产品↔代码桥接 | Skip. Same English note as above. |
895
+ | 一键刷新 | Use `teamai codebase --extract <repo> --project <slug> --incremental`, reusing the Phase 0 repository path and project slug even when running from another directory. Do not look for another CLI. |
896
+ | 质量评估 | Use `scripts/validate_kb.py` and `teamai codebase --lint --output <repo>` to check `<repo>/teamwiki/` (`--output` takes the repository root, not the `teamwiki/` directory). Skip any extra evaluate binary. |
902
897
 
903
898
  **路径约定**(本 skill 安装后):
904
899
 
@@ -906,4 +901,4 @@ _review/ ← 过程文件(不入知识库)
906
901
  - Agent:`references/agents/kb-doc-generator.md`、`references/agents/graph-rag-agent.md`
907
902
  - 脚本:`scripts/scan_repo.py`、`scripts/validate_kb.py`
908
903
 
909
- 所有流程在本 skill(`references/`、`scripts/`)与 `team-wiki` CLI 内完成。
904
+ 所有流程在本 skill(`references/`、`scripts/`)与 `teamai` CLI 内完成。No extra plugin is required.
@@ -31,7 +31,7 @@
31
31
  **边类型**: `[CALLS]`(同步RPC/HTTP) / `[PUBLISHES]`(异步MQ) / `[CONSUMES]`(MQ消费) / `[READS]`(DB读) / `[WRITES]`(DB写) / `[CONFIGURES]`(配置驱动) / `[MAPS_TO]`(产品→代码)
32
32
 
33
33
  **构建方法**(按可用性排序):
34
- 1. **`team-wiki compile code --extract ast,heuristic --write`** — Tree-sitter 结构边(**TS/JS/Python/Go** 等)+ 多语言 heuristic 事实页
34
+ 1. **`teamai codebase --extract`** — Tree-sitter 结构边(**TS/JS/Python/Go** 等)+ 多语言 heuristic 事实页(writes `teamwiki/`)
35
35
  2. Grep + Read(Agent K1/K2)— 补充动态路由、配置驱动调用
36
36
  3. 解析编排配置 → 模块→命令映射
37
37
  4. 解析 Proto/IDL/DDL → 数据结构和表关系(结构化文件,可精确解析)
@@ -39,7 +39,7 @@
39
39
  6. API 映射 → 外部 API 名称 → 内部 Handler 入口
40
40
 
41
41
  > `code-ast` 对相对 import 可产出 `DEPENDS_ON` 边;包级/动态调用仍可能遗漏,标 `[UNVERIFIED]` 或 `AMBIGUOUS`。
42
- > 能力 ID 与边优先级见插件内 `GRAPH-CAPABILITIES.md`。
42
+ > AST 结果优先于 heuristic。There is no separate capabilities doc in this package; use `teamai codebase --extract` output under `teamwiki/`.
43
43
 
44
44
  ## 输入源优先级
45
45