Skip to content

fix(pull): name the skills a pull removes because they are no longer delivered (#911) - #917

Open
rubenmarcus wants to merge 1 commit into
Tencent:mainfrom
rubenmarcus:fix/pull-removed-skills-notice
Open

rubenmarcus wants to merge 1 commit into
Tencent:mainfrom
rubenmarcus:fix/pull-removed-skills-notice

Conversation

@rubenmarcus

Copy link
Copy Markdown

Summary

teamai pull now names the skills it removes because they are no longer delivered here, in one info line. Before, a member who picked a role or project (or whose admin added manifest/projects.yaml) lost their root skills with only a debug line calling them "excluded" and a summary that said No resources to sync. When a removed skill is a root skill in role or project mode, the line also says how to get it back: teamai tags subscribe <tag>.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature causing existing behavior to change)
  • Documentation only
  • Refactor / internal cleanup

Test Plan

  • npx tsc --noEmit passes
  • npm run lint passes (exit 0)
  • npx vitest run passes: 342 files, 5495 passed, 1 skipped
  • Added/updated tests for the change

Two tests in src/__tests__/pull-namespace-override.test.ts, following the proposal in the issue:

  • a root skill received through a tag, then the tag dropped: the skill is removed and the info line names it with the teamai tags subscribe <tag> hint
  • a namespace skill whose namespace deactivates: removed and named, without the tag hint (that hint only applies to root skills)

Both fail on main (3a9a24a) and pass with the fix:

# main
Tests  2 failed | 25 passed (27)
# this branch
Tests  27 passed (27)

Real CLI, the reproduction from the issue (bare git team repo with skills/shared-skill, teamai pull, then an admin adds manifest/projects.yaml with one project and the member pulls again with no --project).

On main:

$ teamai pull
✔ [user] Team repo: 2 file(s) changed
ℹ [user] No resources to sync
$ ls ~/.claude/skills
teamai

On this branch:

$ teamai pull
✔ [user] Team repo: 2 file(s) changed
ℹ [user] Removed 1 skill(s) no longer delivered here: shared-skill. While the team uses roles or projects, root skills arrive only through a tag: `teamai tags subscribe <tag>`.
ℹ [user] No resources to sync
$ ls ~/.claude/skills
teamai

Related Issues

Fixes #911

Notes for Reviewers

  • Step 3b in src/pull.ts collects the removed names across tools into one set, so a skill removed from several tools is named once. Skills the member excluded with teamai exclude keep the old debug line: that removal is what they asked for.
  • cleanupInactiveNamespaceSkills now returns the names it removed and they join the same line, as the issue suggests. Its existing callers in tests ignore the return value.
  • Delivery does not change. Root skills are still not delivered by default in role or project mode; that stays a design decision for the maintainers, as the issue says.
  • Docs: docs/usage-guide.md and docs/usage-guide.zh-CN.md no longer say a member with no project still gets common, and gain a bullet on root skills arriving through a tag. docs/designs/multi-project-management.md notes the skills exception on the <type>/ root line. CHANGELOG entry under Unreleased / Bug Fixes.

Prepared with AI assistance (Claude Opus 5.5 via Claude Code) and reviewed before submission.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] pull removes root skills without a word when roles or projects take effect

1 participant