Skip to content

[feat] Make team-wiki-codebase skill self-contained in teamai (no external team-wiki CLI) for IDE users #360

Closed

Description

@m0Nst3r873

Problem

team-wiki-codebase 是 teamai 的 builtin skill(见 src/builtin-skills.ts 的 BUILTIN_SKILL_NAMES)。teamai pull / teamai init 会通过 deployBuiltinSkills() 自动把它下发到纯 IDE 用户的 .claude/skills/、.cursor/skills/、.codebuddy/skills/ 等目录。

但该 skill 的 SKILL.md 全程 hard-code 依赖一个独立的、需额外安装的 team-wiki CLI(compile code / compile docs / reconcile / refresh / evaluate),而 team-wiki 既不在 teamai 的 bin,也不在依赖里。

后果:一个只安装了 teamai 的纯 IDE 用户,激活 /team-wiki-codebase 后,会在 Phase 0 的第一条命令

team-wiki compile code <repo> <wiki> --extract ast,heuristic --write

直接 command not found: team-wiki。这个由 teamai 主动分发的 builtin skill,对纯 IDE 用户实际不可用——除非用户再去装一个外部插件,而这正是本 issue 希望消除的接入负担。

关键点:底层能力 teamai 大多已经实现,只是没有以 IDE 用户可直接调用的命令面暴露:

team-wiki 命令 teamai 现状 证据
compile code ... --write 等价逻辑已实现,接口不同(codebase --extract 无 <wiki-root> / --dry-run,且不触发 enrich) src/codebase-extract.ts, src/codebase-cmd.ts
reconcile <wiki> --write 已实现但未暴露 CLI src/wiki-engine/knowledge-reconciler.ts:189
深度知识生成(K2/K3、G1–G9) deepEnrich() 已实现,但注册为 hidden 命令,只在 import --from-repo 内部跑 src/deep-enrich.ts, src/index.ts:903
evaluate <wiki> 缺失(codebase --lint 是一致性检查,非 structuralEdgeRatio 等图谱质量度量) src/codebase-wiki-lint.ts
compile docs <docs> <wiki> 缺失(仅 import --from-iwiki 对接在线 iWiki,无本地文档目录编译) —

此外,SKILL.md:18 引用的 ../GRAPH-CAPABILITIES.md 在仓库中不存在(死链),会随 skill 一起下发给 IDE 用户。

Proposed Solution

目标:让 teamai 原生支撑 IDE 用户跑通 team-wiki-codebase,不再依赖任何外部 team-wiki 插件。

按性价比排序:

  1. 暴露已实现但隐藏/内部的能力(改动最小、收益最大,直接消除 IDE 用户的外部依赖):
    • 将 reconcileKnowledge()(wiki-engine/knowledge-reconciler.ts)暴露为 teamai codebase --reconcile。
    • 将 deepEnrich() 从 hidden 提升为公开子命令(如 teamai codebase --deep-enrich --project <slug>)。
  2. 对齐 compile code 接口:给 teamai codebase --extract 增加显式 --wiki-root <path> 与 --dry-run,使其可直接替代 team-wiki compile code。
  3. 改写 SKILL.md:让 skill 全程调用 teamai codebase ...(及其它 teamai 子命令)而非 team-wiki ...,使这个 builtin skill 自洽——装了 teamai 即可用,无需外部插件。
  4. 修复死链 GRAPH-CAPABILITIES.md:补齐文档,或在 skill 内移除引用。
  5. 缺口能力作为后续增量:本地文档编译(对应 compile docs)、图谱质量指标(对应 evaluate 的 structuralEdgeRatio 等)。

验收标准:一个只安装了 teamai、未安装 team-wiki 的 IDE 用户,teamai pull 后激活 /team-wiki-codebase,能端到端跑完而不出现 command not found 或死链。

Alternatives Considered

Additional Context

Activity

  1. added
    enhancement
    on Aug 28, 2026
  2. opsnull commented on Sep 8, 2026

    @opsnull

    作为一个外部用户,请问如何安装 team-wiki CLI 呢?缺少这个工具,block 整个 codebase wiki 和召回等 teamai 核心特性的使用。

  3. jimpablo commented on Sep 8, 2026

    @jimpablo
    Contributor

    I'd like to take a narrow first slice of this, not the full command-surface rewrite.

    Plan:

    1. Point skills/team-wiki-codebase at existing teamai codebase --extract instead of team-wiki compile code for Phase 0.
    2. Remove the dead GRAPH-CAPABILITIES.md link.
    3. Unhide --extract in teamai codebase --help.
    4. If later team-wiki steps are still missing, skip/stop with an English message that teamai is the CLI — no extra plugin.

    Out of scope for this PR: exposing --reconcile / --deep-enrich, and adding --wiki-root / --dry-run.

  4. added
    help wanted
    on Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementhelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions