Skip to content

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

Merged
jeff-r2026 merged 2 commits into
Tencent:mainfrom
rubenmarcus:fix/pull-removed-skills-notice
Sep 30, 2026
Merged

jeff-r2026 merged 2 commits into
Tencent:mainfrom
rubenmarcus:fix/pull-removed-skills-notice

Conversation

@rubenmarcus

Copy link
Copy Markdown
Contributor

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.

@jeff-r2026 jeff-r2026 self-assigned this Sep 30, 2026
@github-actions

Copy link
Copy Markdown
  • [P2 non-blocking] src/pull.ts:1293 — Cleanup phase does not reliably identify whether the installed skill came from a root tag or an inactive namespace. For example, if tagged root skills/review and inactive skills/frontend/review are byte-identical, unsubscribing the tag lets cleanupInactiveNamespaceSkills remove the root copy, but rootSkillUndelivered remains false, so the promised tags subscribe recovery hint is omitted. Track the delivered source/provenance rather than inferring it from which cleanup phase removed the directory.
  • [P2 non-blocking] docs/usage-guide.md:241 — “with no role, no skills” contradicts the immediately following documented behavior: a member without a role can still receive root skills through tag subscriptions. The equivalent statement in docs/usage-guide.zh-CN.md:224 has the same issue; qualify this as “no namespace skills” in both versions.

…s byte-identical to its inactive namespace source (Tencent#917 review)
@rubenmarcus

Copy link
Copy Markdown
Contributor Author

Both findings are real, fixed in bb14e67.

pull.ts provenance. You were right that the phase cannot answer this question. The hint now follows the repo instead: pull records which skill names exist at the root (teamItems without a namespace, the tag catalog) and shows the tags subscribe hint exactly when a removed skill has a root copy, regardless of which cleanup phase removed the directory. Two consequences: the byte-identical twin case you described keeps the hint, and a namespace-only skill removed by the Step 3b sweep no longer gets a hint it cannot act on (tags subscribe cannot deliver a skill with no root copy). RED on 1e406b0: the twin test fails with the hint missing, the namespace-only test pins the no-hint contract. GREEN on bb14e67: 29/29 in pull-namespace-override.test.ts, full suite 5497 passed.

usage-guide wording. Qualified as "no namespace skills" in both usage-guide.md and usage-guide.zh-CN.md.

CHANGELOG entry added under Bug Fixes.

@github-actions

Copy link
Copy Markdown
  • [P2 non-blocking] src/pull.ts:1303 — The recovery hint checks only whether a same-name root skill exists. If that root skill has no tags in tags.yaml, no teamai tags subscribe <tag> command can deliver it because resolveDesiredSkills admits only explicit tag matches in role/project mode. Check that the root skill actually has a subscribable tag before promising recovery.
  • [P2 non-blocking] src/pull.ts:1301 — Every removal from inactive-namespace cleanup is reported as “no longer delivered,” even when the skill is in excludedSkills. For example, excluding an installed namespace skill and switching away from its role before the next pull reports it as an involuntary removal and may suggest subscribing, although exclusion still prevents delivery. Filter excluded names here as Step 3b does.

The two earlier findings are resolved in the current diff. The PR description includes sufficient real-CLI verification for this runtime change.

@jeff-r2026
jeff-r2026 merged commit 128844f into Tencent:main Sep 30, 2026
13 checks passed
Walternater pushed a commit to Walternater/teamai-cli that referenced this pull request Nov 2, 2026
…delivered (Tencent#911) (Tencent#917)

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

* fix(pull): keep the tags subscribe hint when the removed skill copy is byte-identical to its inactive namespace source (Tencent#917 review)
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

2 participants