Repository navigation
docs(distribution): recipe for restricting skills to some members (role gating pitfall + enforced-rule adoption) - #1096
Conversation
Document that namespace gating only applies once a member sets a role (no-role members get an unfiltered, backward-compatible sync), how init forces the role choice, what pull withdraws after a role switch, and the enforced-rule pattern that prompts legacy members to pick a role. Also clarify that tags are an additive opt-in channel and never restrict. EN + zh-CN mirrored.
|
No findings confidently supported by the current diff.
Reviewed only the specified diff; did not run, build, or install anything from the PR. |
|
Thanks for the contribution. We'd like to keep the documentation simple and easy to follow. Could you simplify this section and mirror the change in the zh-CN version? |
|
Thanks @hsuchifeng — simplified in 5d40437..latest: the section is now ~16 lines per language (was 32). Dropped the full rule-body example and the init picker mechanics; kept the fail-open pitfall, the one-time The zh-CN mirror has been included since the first commit ( For reference, the mechanism claims in the section were verified against v0.27.0 source and a live team repo:
Happy to trim further or relocate if you'd prefer. |
|
No findings confidently supported by the current diff.
Reviewed only the specified diff; did not run, build, or install anything from the PR. |
…le gating pitfall + enforced-rule adoption) (Tencent#1096)
Summary
Adds a "Restricting skills to some members" recipe to the distribution guide (EN + zh-CN, mirrored). It documents behavior that is easy to get wrong when a team starts gating skills by namespace:
primaryRolegets an unfiltered sync (every namespace reaches them) —manifest/roles.yamlalone restricts no one.teamai initalready forces the role choice (auto-select for one role, picker for several, hard failure non-interactively without--role), but members initialized before the manifest existed stay unfiltered until they runteamai roles set.sharing.rules.enforced, which members cannot delete) that makes agents checkteamai roles listand prompt the member to pick a role.All statements were verified against a live team repo running teamai-cli 0.27.0 (fail-open behavior for role-less members, withdrawal on role switch, enforced-rule delivery).
Type of Change
Test Plan
npx tsc --noEmitpassesnpm run lintpassesnpx vitest runpassesN/A — docs only, no code touched.
Related Issues
None.
Notes for Reviewers
Two files, one section each, inserted between "Roles and projects" and "Tags" (zh-CN mirrors EN at the same position). Happy to reword, shorten, or relocate (e.g. split between
distribution.mdandmember-guide.md) if maintainers prefer. If there is appetite for making this first-class (e.g. asharing.roles.required: truethat makes pull warn/refuse for role-less members instead of failing open), I can follow up with a feature issue.