dsh-agent-team-presets 0.3.2 → 0.3.4

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.
Files changed (121) hide show
  1. package/NOTICE +58 -3
  2. package/README.md +73 -398
  3. package/README.zh.md +79 -404
  4. package/assets/card-patches/catalog.json +30 -0
  5. package/assets/card-patches/dsh-context-0.85.0.client.js.gz +0 -0
  6. package/assets/card-patches/dsh-context-0.85.1.client.js.gz +0 -0
  7. package/assets/card-patches/dsh-context-0.87.0.client.js.gz +0 -0
  8. package/assets/skills/agent-leader-communication/SKILL.md +100 -0
  9. package/assets/skills/agent-subagent-orchestration/SKILL.md +56 -0
  10. package/assets/skills/agent-subagent-orchestration/references/executor-parallel-execution.md +56 -0
  11. package/assets/skills/agent-subagent-orchestration/references/leader-discovery.md +53 -0
  12. package/assets/skills/agent-subagent-orchestration/references/subagent-communication.md +58 -0
  13. package/assets/skills/backend-architecture-workflow/SKILL.md +55 -0
  14. package/assets/skills/backend-architecture-workflow/references/README.md +9 -0
  15. package/assets/skills/backend-architecture-workflow/references/architecture-audit.md +70 -0
  16. package/assets/skills/backend-architecture-workflow/references/architecture-decay-risks.md +75 -0
  17. package/assets/skills/backend-architecture-workflow/references/architecture-design.md +151 -0
  18. package/assets/skills/backend-architecture-workflow/references/bugfix-regression.md +63 -0
  19. package/assets/skills/backend-architecture-workflow/references/complex-bug-diagnosis.md +104 -0
  20. package/assets/skills/executor-short-task-workflow/SKILL.md +48 -0
  21. package/assets/skills/executor-short-task-workflow/references/agent-communication.md +44 -0
  22. package/assets/skills/executor-short-task-workflow/references/verification-and-reporting.md +45 -0
  23. package/assets/skills/frontend-engineering-workflow/SKILL.md +47 -0
  24. package/assets/skills/frontend-engineering-workflow/references/README.md +7 -0
  25. package/assets/skills/frontend-engineering-workflow/references/frontend-implementation.md +46 -0
  26. package/assets/skills/frontend-engineering-workflow/references/visual-design.md +43 -0
  27. package/assets/skills/frontend-engineering-workflow/references/visual-qa.md +126 -0
  28. package/assets/skills/fullstack-advisor/SKILL.md +50 -0
  29. package/assets/skills/fullstack-advisor/references/brooks-principles.md +51 -0
  30. package/assets/skills/fullstack-advisor/references/consultant-communication.md +51 -0
  31. package/assets/skills/fullstack-advisor/references/consultation-workflow.md +71 -0
  32. package/assets/skills/git-release-hygiene/SKILL.md +33 -21
  33. package/assets/skills/git-release-hygiene/references/git-safety.md +66 -0
  34. package/assets/skills/git-release-hygiene/references/pr-changelog.md +98 -0
  35. package/assets/skills/git-release-hygiene/references/release-standard.md +139 -0
  36. package/assets/skills/git-release-hygiene/references/validation-checklist.md +42 -0
  37. package/assets/skills/github-repository-presentation/SKILL.md +49 -130
  38. package/assets/skills/github-repository-presentation/references/bilingual-writing.md +43 -0
  39. package/assets/skills/github-repository-presentation/references/documentation-architecture.md +156 -0
  40. package/assets/skills/github-repository-presentation/references/readme-standard.md +273 -0
  41. package/assets/skills/github-repository-presentation/references/release-notes.md +70 -0
  42. package/assets/skills/github-repository-presentation/references/validation-checklist.md +47 -0
  43. package/assets/skills/independent-code-review-workflow/SKILL.md +60 -0
  44. package/assets/skills/independent-code-review-workflow/references/README.md +9 -0
  45. package/assets/skills/independent-code-review-workflow/references/decay-risks.md +99 -0
  46. package/assets/skills/independent-code-review-workflow/references/review-checklist.md +53 -0
  47. package/assets/skills/independent-code-review-workflow/references/review-methodology.md +113 -0
  48. package/assets/skills/independent-code-review-workflow/references/review-severity.md +49 -0
  49. package/assets/skills/independent-code-review-workflow/references/test-quality-review.md +71 -0
  50. package/assets/skills/leader-long-task-orchestration/SKILL.md +49 -0
  51. package/assets/skills/leader-long-task-orchestration/references/delivery-plan-template.md +73 -0
  52. package/assets/skills/leader-long-task-orchestration/references/product-alignment.md +46 -0
  53. package/assets/skills/leader-long-task-orchestration/references/rolling-wave-planning.md +32 -0
  54. package/assets/skills/leader-long-task-orchestration/references/technical-decisions-and-escalation.md +34 -0
  55. package/assets/skills/leader-medium-task-workflow/SKILL.md +55 -0
  56. package/assets/skills/leader-medium-task-workflow/references/task-board-and-leader-todo.md +41 -0
  57. package/docs/builtin-team-skills.md +82 -0
  58. package/docs/builtin-team-skills.zh.md +82 -0
  59. package/docs/builtin-teams.md +62 -0
  60. package/docs/builtin-teams.zh.md +62 -0
  61. package/docs/developer/architecture.md +54 -0
  62. package/docs/developer/architecture.zh.md +54 -0
  63. package/docs/guide/install.md +86 -0
  64. package/docs/guide/install.zh.md +86 -0
  65. package/docs/guide/integrations.md +50 -0
  66. package/docs/guide/integrations.zh.md +50 -0
  67. package/docs/guide/team-skills.md +68 -0
  68. package/docs/guide/team-skills.zh.md +68 -0
  69. package/docs/guide/using-teams.md +92 -0
  70. package/docs/guide/using-teams.zh.md +92 -0
  71. package/docs/index.md +53 -0
  72. package/docs/index.zh.md +53 -0
  73. package/docs/reference/tools-and-permissions.md +62 -0
  74. package/docs/reference/tools-and-permissions.zh.md +62 -0
  75. package/docs/reference/troubleshooting.md +59 -0
  76. package/docs/reference/troubleshooting.zh.md +59 -0
  77. package/icon.webp +0 -0
  78. package/lib/client.js +1459 -253
  79. package/lib/index.js +960 -342
  80. package/lib/typert.host.js +402 -29
  81. package/lib/typert.remote-client.d.ts +9 -9
  82. package/lib/typert.remote-client.d.ts.map +1 -1
  83. package/lib/typert.remote-client.js +402 -29
  84. package/lib/types/client/CardPatchView.js +21 -1
  85. package/lib/types/client/ComposerTeamSelect.js +24 -8
  86. package/lib/types/client/TeamAgentView.d.ts +1 -1
  87. package/lib/types/client/TeamAgentView.js +11 -6
  88. package/lib/types/client/TeamImportDialog.d.ts +4 -15
  89. package/lib/types/client/TeamImportDialog.js +29 -25
  90. package/lib/types/client/TeamPresetsSection.js +14 -5
  91. package/lib/types/client/TeamSkillsView.d.ts +5 -4
  92. package/lib/types/client/TeamSkillsView.js +64 -15
  93. package/lib/types/client/locales.d.ts +41 -2
  94. package/lib/types/client/locales.js +185 -8
  95. package/lib/types/client/team-presets-controller.d.ts +15 -2
  96. package/lib/types/client/team-presets-controller.js +86 -30
  97. package/lib/types/client/team-skills-controller.d.ts +14 -5
  98. package/lib/types/client/team-skills-controller.js +71 -37
  99. package/lib/types/index.js +57 -19
  100. package/lib/types/preset-editor.js +3 -4
  101. package/lib/types/preset-transfer.d.ts +1 -1
  102. package/lib/types/presets.d.ts +21 -23
  103. package/lib/types/presets.js +72 -36
  104. package/lib/types/team-catalog.d.ts +50 -3
  105. package/lib/types/team-catalog.js +214 -43
  106. package/lib/types/team-mode.d.ts +48 -0
  107. package/lib/types/team-mode.js +64 -0
  108. package/lib/types/team-skills/import.d.ts +17 -7
  109. package/lib/types/team-skills/import.js +115 -21
  110. package/lib/types/team-skills/index.d.ts +2 -3
  111. package/lib/types/team-skills/index.js +4 -8
  112. package/lib/types/team-skills/manager.d.ts +24 -15
  113. package/lib/types/team-skills/manager.js +98 -105
  114. package/lib/types/team-skills/official-bindings.d.ts +29 -0
  115. package/lib/types/team-skills/official-bindings.js +51 -0
  116. package/lib/types/team-skills/service.d.ts +7 -12
  117. package/lib/types/team-skills/service.js +143 -63
  118. package/lib/types/team-skills/store.d.ts +27 -6
  119. package/lib/types/team-skills/store.js +151 -15
  120. package/lib/types/types.d.ts +18 -4
  121. package/package.json +21 -2
@@ -0,0 +1,50 @@
1
+ # Subagent card badges
2
+
3
+ Cards in **dsh-context** (Fleet view, top bar) and **dsh-better-sidebar** (Tasks page, right sidebar) can mark the subagents this plugin created with a small `Preset` tag. Neither target published such a service at the time of writing, so this plugin ships prebuilt replacement bundles for a fixed set of versions and installs them from Settings.
4
+
5
+ [中文](<integrations.zh.md>) · [Documentation index](../index.md) · [README](../../README.md)
6
+
7
+ ## How the integration works
8
+
9
+ The badge is an adapter, not a dependency:
10
+
11
+ - **Opt-in by target.** Each target must expose its optional card-badge service (`contextAgentCardBadges` / `betterSidebarAgentCardBadges`, protocol version 1). This plugin registers into a service only when it appears, requires neither package, and keeps working unchanged when neither is installed.
12
+ - **Exact identity.** A tag appears only for a card whose real child Session id matches a durable member snapshot written before creation, so ordinary subagents and workflow placeholder nodes stay unmarked. The lookup reads stored records and never resumes or reads a card's Agent.
13
+ - **Layout neutral.** The tag is one inline, theme-token chip with fixed height; it adds no card row and clips inside the existing badge area.
14
+
15
+ ## Install it from Settings
16
+
17
+ The replacements are offered in **Settings → Agent Team presets → Integrations**, one row per target:
18
+
19
+ | Target | Versions this build patches | What the row offers |
20
+ | --- | --- | --- |
21
+ | `dsh-context` | 0.84.0, 0.84.1, 0.85.0, 0.85.1, 0.87.0 | Install patch / Remove patch |
22
+ | `dsh-better-sidebar` | 0.32.0, 0.32.1 | Install patch / Remove patch |
23
+
24
+ Each row reports its own state and the page never guesses: `not installed`, `version not supported`, `not patched`, `patched`, `modified by something else`. A `version not supported` row names the **installed** version and the **highest one this build patches**, in the reader's language — the only decision that state raises is which side to update. **Install patch** asks for confirmation, backs up the target's `lib/client.js`, then writes this plugin's build of the same source; **Remove patch** restores that backup and deletes it.
25
+
26
+ **No restart and no page reload.** The running server's `client-hmr` transport stat-polls every client bundle, republishes the changed one (`clientModules.rebuilt`), and the page reloads that plugin in place — the row turns `active` within about a second and the badge appears on the cards. If a row stays `patched` without going `active`, reload the page once.
27
+
28
+ ### Safety rules
29
+
30
+ - A target whose bundle matches neither the published build nor this plugin's replacement is refused, because overwriting it would destroy an edit this plugin cannot reproduce.
31
+ - Each row is classified by the version that is actually installed and lists every version this build ships a replacement for. A version outside that list reports `version not supported`; supporting one is a verified rebuild, not a code rewrite (see below).
32
+ - Upgrading a patched target replaces its bundle, which silently removes the patch — the row then reports `not patched` again.
33
+
34
+ ### Adopting a new upstream release
35
+
36
+ New upstream releases are adopted with:
37
+
38
+ ```sh
39
+ node tools/card-patches.mjs rebuild --target <id> --version <version> --write
40
+ ```
41
+
42
+ The command clones the release, applies the source patch, builds it, and refuses to publish anything unless the rebuilt bundle still registers the card service. Adding a version keeps the older ones patchable, and a shipped `assets/card-patches/catalog.json` reaches new versions without a code change.
43
+
44
+ If you would rather not use the bundled builds, the same change is available as source patches in [`contrib/agent-card-badges`](../../contrib/agent-card-badges/README.md) for applying to the matching target and rebuilding it yourself, and as upstream-ready changes for the target maintainers.
45
+
46
+ ## Related
47
+
48
+ - [Getting started](./getting-started.md) — where the Integrations page sits in the walkthrough
49
+ - [Private Team Skills](team-skills.md) — the per-agent scope the tagged members run in
50
+ - [Documentation index](../index.md)
@@ -0,0 +1,50 @@
1
+ # 子代理卡片预设标签
2
+
3
+ **dsh-context**(顶部编队)与 **dsh-better-sidebar**(右侧任务管理)里的子代理卡片,可以给本插件创建的子代理加上一个 `预设` 小标签。到目前为止这两个目标插件都还没有发布该服务,因此本插件为固定的一组版本随包提供预构建替换包,并在设置页里安装。
4
+
5
+ [English](<integrations.md>) · [文档索引](../index.zh.md) · [README](../../README.zh.md)
6
+
7
+ ## 接入方式
8
+
9
+ 标签是一个适配器,不是依赖:
10
+
11
+ - **按目标启用。** 目标插件必须提供自己的可选卡片标签服务(`contextAgentCardBadges` / `betterSidebarAgentCardBadges`,协议版本 1)。只有该服务出现时本插件才注册进去;本插件不依赖这两个包,两者都没装时行为完全不变。
12
+ - **精确身份。** 只有卡片对应的真实子会话 ID 与创建前写入的持久成员快照一致时才会显示标签,因此普通子代理与工作流占位节点不会被误标。查询只读已存储的记录,不会唤醒或读取卡片对应的 Agent。
13
+ - **不改变布局。** 标签是一个行内主题色小块,高度固定;不新增卡片行,并在既有标签区内裁剪。
14
+
15
+ ## 在设置页里安装
16
+
17
+ 替换包在 **设置 → 团队预设 → 插件联动** 中提供,每个目标一行:
18
+
19
+ | 目标插件 | 本版补丁适配的版本 | 该行可执行的操作 |
20
+ | --- | --- | --- |
21
+ | `dsh-context` | 0.84.0、0.84.1、0.85.0、0.85.1、0.87.0 | 安装补丁 / 卸载补丁 |
22
+ | `dsh-better-sidebar` | 0.32.0、0.32.1 | 安装补丁 / 卸载补丁 |
23
+
24
+ 每一行报告自己的真实状态,页面不做猜测:`not installed`、`version not supported`、`not patched`、`patched`、`modified by something else`。出现 `version not supported` 时,该行会用你的语言点名**已安装的版本**与**本版最高适配的版本**——这时唯一要决定的就是升级哪一侧。**安装补丁**会先弹出确认框,备份目标插件的 `lib/client.js`,再写入本插件用同一份源码构建的替换包;**卸载补丁**从该备份还原并删除备份。
25
+
26
+ **不需要重启,也不需要刷新页面。** 运行中的服务器由 `client-hmr` 持续轮询每个插件的浏览器包,发现变化就重新发布(`clientModules.rebuilt`),页面随之就地重新加载该插件——约一秒后该行变为 `active`,卡片上的标签同时出现。若某行停留在 `patched` 而没有变为 `active`,刷新一次页面即可。
27
+
28
+ ### 安全规则
29
+
30
+ - 如果目标插件的浏览器包既不是发布版、也不是本插件的替换版,操作会被拒绝:覆盖它等于毁掉一份本插件无法重现的改动。
31
+ - 每一行按**实际安装的版本**判定状态,并列出本版为其准备替换包的全部版本;不在列表中的版本显示 `version not supported`。支持新版本是一次「校验后重建」,不需要改代码(见下文)。
32
+ - 升级已打补丁的目标插件会覆盖其浏览器包,补丁随之消失,该行会重新显示 `not patched`。
33
+
34
+ ### 跟进上游新版本
35
+
36
+ 上游发版后用下面的命令跟进:
37
+
38
+ ```sh
39
+ node tools/card-patches.mjs rebuild --target <id> --version <version> --write
40
+ ```
41
+
42
+ 它会克隆对应版本、应用源码补丁、重新构建,并且只有在重建后的包仍然注册卡片服务时才允许发布。新增版本不会挤掉旧版本;随包的 `assets/card-patches/catalog.json` 可以在不改代码的情况下覆盖新版本。
43
+
44
+ 如果不希望使用随包构建,同样的改动也以源码补丁形式放在 [`contrib/agent-card-badges`](../../contrib/agent-card-badges/README.md),可自行应用到匹配版本并重新构建;这些改动同样是可直接提交给目标维护者的上游改动。
45
+
46
+ ## 相关
47
+
48
+ - [新手必读(图文)](<getting-started.zh.md>)——插件联动页在图文走查中的位置
49
+ - [私有团队技能](<team-skills.zh.md>)——被打标签的成员所运行的作用域
50
+ - [文档索引](<../index.zh.md>)
@@ -0,0 +1,68 @@
1
+ # Private Team Skills
2
+
3
+ This plugin keeps its own Team Skill library: folders or `.zip` archives imported into a plugin-owned store and registered **only** inside the Agent scope of the member they are assigned to. A fresh install also ships ten built-in skills, already bound to the roles of the built-in Teams; the inventory is in [Built-in Team Skills](../builtin-team-skills.md).
4
+
5
+ [中文](<team-skills.zh.md>) · [Documentation index](../index.md) · [README](../../README.md)
6
+
7
+ ## Private store and scope isolation
8
+
9
+ Skills in Harness are typically registered into the global environment, which exposes every skill to every agent. This plugin adds a private Team Skill subsystem:
10
+
11
+ 1. **Private library:** skills live in a plugin-managed directory (`~/.dsh/agent-team-presets/team-skills` or a storage domain), isolated from host and profile skills.
12
+ 2. **Per-Agent registration:** when a member is summoned, its assigned skills are registered **exclusively inside that member's Agent scope**. Other members and the captain cannot see or invoke them unless those skills are explicitly assigned to them too.
13
+ 3. **Official built-in skills:** ten shipped skills in three kinds — six workflow, two delivery, two method — pre-bound to the roles of the built-in Teams. The inventory, the per-role default bindings, and the category filter are documented in [Built-in Team Skills](../builtin-team-skills.md); `agent-subagent-orchestration` is bound only to the captain and the executor, so advisors stay single-threaded.
14
+ 4. **Local copies and restore:** built-in skills are read-only. Each editable copy gets a unique numbered name, and its creation dialog can optionally move roles already bound to the built-in skill. Restoring resets the copy’s content and returns those roles to the built-in skill.
15
+ 5. **Category filter:** the skill library and the member assignment grid each open with a category dropdown (All categories / Workflow / Delivery / Method / Custom). A single skill is drawn exactly as before; the filter only decides which skills are listed, never what a role holds, and the member heading keeps counting every installed skill.
16
+ 6. **Localized skill names:** the page labels a shipped skill in the reader's language — a Chinese page shows 「Git 提交与发布规范」 where an English page shows `git-release-hygiene`. The mapping is presentation only: the catalogue the model reads, the stored binding, the preset document, and the asset directory all keep the English `skillId`, so switching language or editing a label never touches the storage format and never breaks a cross-deployment import. A skill this build does not ship keeps showing its English id.
17
+ 7. **Origin labels and badges:** skills carry a color-coded origin tag in every view:
18
+
19
+ | Origin | Shown as | Color |
20
+ |---|---|---|
21
+ | Built-in (插件内置) | 插件内置 | blue |
22
+ | Custom (自定义) | 自定义 | purple |
23
+ | Override (本地副本) | 本地副本 | amber |
24
+
25
+ Isolation is enforced when the member is created, not later: the creation edge waits for that Agent's own registration, so a role whose deployment cannot publish its skills is refused at creation with the reason instead of starting with an empty catalogue. An unreadable private library is likewise refused rather than read as "no assignment".
26
+
27
+ ## Import, directory scan, and dependencies
28
+
29
+ - **Folder import:** choose an external skill folder in the Web interface to add it to the library.
30
+ - **Scan import folder:** the scanner uses `SKILL.md`’s `name` to identify each skill. Click **Scan import folder** to publish new skills and updated packages. An update keeps the existing role bindings and dependency settings. A package with a built-in skill name is refused.
31
+ - **Edit a scanned skill:** opening the skill library checks whether source files or paths changed, including binary resources. Click **Scan import folder** to publish disk changes. Saving an edit from the skill panel writes back to the source and publishes immediately. Scan any pending disk changes before saving from the panel. A removed source folder leaves the last published version and bindings available.
32
+
33
+ Team Skill dependencies are stored as library metadata. Import preserves `SKILL.md` byte for byte and warns about each top-level `executables`, `mcpServers`, or `otherSkills` key in its YAML frontmatter. Those keys have no effect on dependency configuration, regardless of their values.
34
+
35
+ The dependency panel in the Web interface is read-only. To change dependencies for an editable skill, have your DSH agent call `set_team_skill_dependencies` with the skill name or asset ID. Pass the complete declaration as the `dependencies_json` string. Each array can be empty to clear that dependency category. Use `list_team_skills` to find the exact `assetId` for entries in `otherSkills`.
36
+
37
+ This example sets dependencies for a skill named `report-writer`.
38
+
39
+ ```json
40
+ {
41
+ "skill_id": "report-writer",
42
+ "dependencies_json": "{\"executables\":[\"pandoc\"],\"mcpServers\":[{\"serverName\":\"docs\",\"required\":true}],\"otherSkills\":[\"custom:report-style\"]}"
43
+ }
44
+ ```
45
+
46
+ | Field | What DSH users configure | What the plugin checks |
47
+ |---|---|---|
48
+ | `executables` | Install each command separately and put it on the `PATH` seen by the running DSH process. On Windows the lookup also uses `PATHEXT`. | Each entry must resolve to an executable file. Missing commands block assignment (`dependency-missing`). |
49
+ | `mcpServers` | Set up and enable each server in the DSH profile or composition. Once its tools are available, authorize the `mcp__<server>__<name>` tools in the relevant role's tool policy. | Lists the declarations. Required servers are reported as `unverified`, and MCP declarations never block assignment or establish a connection. |
50
+ | `otherSkills` | Install the listed Team Skills separately. To make one available to a role, explicitly assign it to that role as well. | Checks that each asset ID exists in the library. Missing assets block assignment (`dependency-missing`). |
51
+
52
+ **Guarded deletion:** deletion is blocked while a skill is bound to any team role, used by a running member, or required by another skill. The confirmation dialog lists every holding team and member role (for example `标准研发团队 → executor`) and keeps the confirm button disabled until those bindings are cleared.
53
+
54
+ ## Share presets
55
+
56
+ **Export** saves one Team as a JSON document (format version 2). **Import preset** reads the document and stages it in the editor.
57
+
58
+ - **Shared fields:** team name, purpose, display metadata (summary, tags, use cases, quick prompts, notes), captain and member names, descriptions, prompts, and colors.
59
+ - **Built-in skill bindings:** version 2 can carry `officialSkills` declarations mapping a built-in skill ID to a role name. The import preview reports invalid declarations and built-in skills missing from this installation. Built-in teams still use their catalog defaults. The document carries neither custom bindings nor skill files.
60
+ - **Local fields:** model routes, reasoning effort, tool permissions, and local category bindings are **never exported**; a document that carries them is rejected on import.
61
+ - **Name collisions:** replace the existing preset or create a renamed copy. Replacement preserves local routes and tool policies on matched roles.
62
+ - Review imported prompts before executing tasks, especially when the document comes from a third party.
63
+
64
+ ## Related
65
+
66
+ - [Built-in Team Skills](../builtin-team-skills.md) — the ten shipped skills and their default bindings
67
+ - [Built-in Teams](../builtin-teams.md) — the nine presets these roles belong to
68
+ - [Getting started](./getting-started.md) — the skill library and member page, screen by screen
@@ -0,0 +1,68 @@
1
+ # 私有团队技能
2
+
3
+ 本插件自带一套团队技能(Team Skill)私有库:导入的技能文件夹或 `.zip` 包存放在插件专属存储中,并且**只在被分配成员自己的 Agent 作用域内**注册。新装环境还随包提供 10 个内置技能,已默认绑定到内置团队的各角色;完整清单见[内置团队技能](<../builtin-team-skills.zh.md>)。
4
+
5
+ [English](<team-skills.md>) · [文档索引](../index.zh.md) · [README](../../README.zh.md)
6
+
7
+ ## 私有库存储与严格作用域隔离
8
+
9
+ 传统 Harness 技能一般注册到全局环境,所有智能体都能看到。本插件实现了 Team Skill 私有技能子系统:
10
+
11
+ 1. **私有库:** 技能统一存放在插件专属目录(`~/.dsh/agent-team-presets/team-skills` 或独立存储域),与宿主、Profile 的技能相互隔离。
12
+ 2. **角色 Agent 作用域隔离:** 成员被召唤时,其绑定的专属技能**严格仅在该成员的 Agent Scope 内注册**。其他队员和队长既看不到也调不到,除非同样把这些技能显式分配给他们。
13
+ 3. **官方内置技能:** 随包提供 10 个技能,分工作流型、交付型与方法型三类(6 / 2 / 2),默认绑定到内置团队的各角色。完整清单、各角色默认绑定与分类筛选见[内置团队技能](<../builtin-team-skills.zh.md>);`agent-subagent-orchestration` 只绑定队长与执行者,顾问保持单线程。
14
+ 4. **本地副本与恢复:** 内置技能只读。每份可编辑副本都有独立的编号名称,创建时可选择切换已绑定内置技能的角色。恢复会重置副本内容,并将使用该副本的角色切回内置版。
15
+ 5. **分类筛选:** 团队技能库与成员分配网格的列表顶部各有一个分类下拉框(全部分类 / 工作流型 / 交付型 / 方法型 / 自定义)。单条技能的展示方式不变;筛选只影响列出哪些技能,不影响某个角色持有哪些技能,成员页标题也始终按全部已安装技能统计。
16
+ 6. **随包技能的中英文名:** 界面按当前语言显示技能名——中文界面显示「Git 提交与发布规范」,英文界面显示 `git-release-hygiene`。这张映射表**仅用于展示**:模型读到的技能目录、存储的绑定、预设文档与磁盘上的资产目录一律仍是英文 `skillId`,因此切换语言或修改显示名都不会动存储格式,也不会破坏跨部署导入。本版本未收录的技能继续显示其英文 id。
17
+ 7. **来源标签与色标:** 各视图都会给出按来源区分的色标:
18
+
19
+ | 来源 | 界面显示 | 颜色 |
20
+ |---|---|---|
21
+ | 插件内置(Built-in) | 插件内置 | 蓝色 |
22
+ | 自定义(Custom) | 自定义 | 紫色 |
23
+ | 本地副本(Override) | 本地副本 | 琥珀色 |
24
+
25
+ 隔离在创建成员时就已落实,而不是事后补:创建流程会等待该 Agent 自身的注册完成,因此无法发布技能的部署在创建阶段即被拒绝并给出原因,而不是先起一个空技能目录;私有库读不出来时同样拒绝,而不会把「读不到」当成「没有分配」。
26
+
27
+ ## 导入、目录扫描与依赖守护
28
+
29
+ - **文件夹导入:** 在 Web 界面选择外部技能文件夹,将它添加到技能库。
30
+ - **扫描导入目录:** 用 `SKILL.md` 里的 `name` 识别技能。点击「扫描导入目录」后,发布新技能和已有技能的新版本。更新保留角色绑定和依赖设置。包名撞到内置技能时会被拒绝。
31
+ - **编辑扫描导入的技能:** 打开技能库时会检测来源目录的文件变化,包括文件路径和二进制资源。直接修改磁盘后,点击「扫描导入目录」发布新版。通过技能面板保存时,修改写回来源目录并立即发布。若磁盘已有待更新内容,请先扫描再保存。来源目录被移除后,上一版技能及其绑定仍然可用。
32
+
33
+ 团队技能的依赖单独保存在技能库的资产元数据中。导入会原样保留 `SKILL.md` 的字节,并对 YAML frontmatter 中显式出现的顶层 `executables`、`mcpServers` 和 `otherSkills` 字段逐项提示。无论字段值是什么,都不会应用为依赖配置。
34
+
35
+ Web 界面的依赖面板仅供查看。要修改可编辑技能的依赖,请让 DSH 智能体调用 `set_team_skill_dependencies`,传入技能名或资产 ID,并将完整的依赖声明作为 `dependencies_json` 字符串传给工具。需要清除某类依赖时,可将对应数组设为空。`otherSkills` 使用资产 ID,可通过 `list_team_skills` 查询对应的 `assetId`。
36
+
37
+ 以下示例为名为 `report-writer` 的技能设置依赖。
38
+
39
+ ```json
40
+ {
41
+ "skill_id": "report-writer",
42
+ "dependencies_json": "{\"executables\":[\"pandoc\"],\"mcpServers\":[{\"serverName\":\"docs\",\"required\":true}],\"otherSkills\":[\"custom:report-style\"]}"
43
+ }
44
+ ```
45
+
46
+ | 字段 | 如何准备依赖 | 插件如何检查 |
47
+ |---|---|---|
48
+ | `executables` | 单独安装各命令,并将其加入运行中的 DSH 进程能看到的 `PATH`。Windows 查找时还会使用 `PATHEXT`。 | 每项都必须能找到可执行文件。缺失命令会阻断分配(`dependency-missing`)。 |
49
+ | `mcpServers` | 在 DSH 的 Profile 或组合配置中配置并启用服务。服务工具可用后,在相应角色的工具策略中授权 `mcp__<server>__<name>` 工具。 | 显示声明,标记必需服务为 `unverified`。MCP 声明不会阻断分配,也不会建立连接。 |
50
+ | `otherSkills` | 单独安装声明的团队技能。要让角色能够使用其中一项,还要把它单独分配给该角色。 | 检查各资产 ID 是否存在于技能库。缺失资产会阻断分配(`dependency-missing`)。 |
51
+
52
+ **强阻断保护的删除:** 技能只要被任何团队角色分配、被运行中的成员占用,或被其他技能依赖,删除即被阻断。删除确认框会列出所有持有者(团队与角色,例如 `标准研发团队 → executor`),并在这些绑定解除前保持确认按钮禁用。
53
+
54
+ ## 分享预设
55
+
56
+ **导出**将一个团队保存为 JSON 文档(格式版本 2)。**导入预设**读取该文档并暂存到编辑器中。
57
+
58
+ - **分享的字段:** 团队名称、用途、展示元数据(简介、标签、适用场景、推荐任务、备注),以及队长与成员的名称、描述、提示词、颜色。
59
+ - **内置技能绑定:** 版本 2 可通过 `officialSkills` 声明内置技能 ID 与角色名的对应关系。导入预览会提示无效声明,以及当前环境里缺少的内置技能。内置团队仍使用随包默认绑定。预设文件不携带自定义绑定或技能文件。
60
+ - **本地字段:** 模型路由、推理强度、工具权限与本地分类归属**绝不导出**;携带这些字段的文档在导入时被拒绝。
61
+ - **名称冲突:** 可覆盖已有预设,或改名新建。覆盖时会保留匹配角色上的本地路由与工具策略。
62
+ - 执行任务前请先审阅导入的提示词,尤其是来自第三方的文档。
63
+
64
+ ## 相关
65
+
66
+ - [内置团队技能](<../builtin-team-skills.zh.md>)——10 个随包技能及其默认绑定
67
+ - [内置团队](<../builtin-teams.zh.md>)——这些角色所属的九个预设
68
+ - [新手必读(图文)](<getting-started.zh.md>)——技能库与成员页的逐屏说明
@@ -0,0 +1,92 @@
1
+ # Using Teams
2
+
3
+ How to configure a Team, start it in a conversation, and what each field on the settings page controls.
4
+
5
+ [中文](<using-teams.zh.md>) · [Documentation index](../index.md) · [README](../../README.md)
6
+
7
+ ## Configure and use a Team
8
+
9
+ 1. Open **Settings → Agent team presets**.
10
+ 2. Select a built-in Team, duplicate an existing one, or click **New Team**.
11
+ 3. Configure its name, purpose, display metadata, category, captain, and member roles.
12
+ 4. For each member, configure its provider/model route, reasoning effort, tool policy, and assigned Team Skills.
13
+ 5. Press **Save** in the shared footer. Edits remain staged drafts until saved.
14
+ 6. Select the Team from the conversation composer's Team control, then prompt the captain to coordinate the task.
15
+
16
+ Example prompt for a Team with execution and review roles:
17
+
18
+ > Use the selected Team. Have the executor implement the agreed changes and regression tests, then ask the reviewer to inspect them independently. Summarize changes, test results, and remaining risks.
19
+
20
+ A preset role is a template. Summoning creates an instance with a unique target such as `executor` or `executor-2`. Use `send_message` with the returned target to continue working with an existing instance rather than spawning a new one.
21
+
22
+ Selecting **No preset** (`不加载预设`) disarms the Team application once the captain and teammates become idle, restoring standard session contributions without changing the active model.
23
+
24
+ ### Talk to one member directly
25
+
26
+ Hover a Team row in the composer picker to open its member panel. The captain is listed first with the **Session model** route; every member follows with its configured provider · model and role description.
27
+
28
+ - Selecting the **captain** applies the Team normally: the captain leads, may summon members, and keeps the model the Session already selected.
29
+ - Selecting a **member** starts an individual conversation with that member. Its role card (name, role description, and standing system prompt) becomes the Session persona, its tool policy and assigned Team Skills apply, and the captain briefing plus `spawn_team_member` are **not** installed. The Session model switches to that member's configured provider/model and reasoning effort. A member with no configured route keeps the Session's current model.
30
+ - Switching back to the captain does not restore an earlier model: the captain always follows whatever model the Session currently has selected.
31
+ - Role and model changes wait for a running task to reach its boundary, exactly like a Team change. A selection naming a member that no longer exists is refused and the Session stays locked rather than silently falling back to the captain.
32
+
33
+ ### Fields
34
+
35
+ | Field | Purpose |
36
+ |---|---|
37
+ | Team name and purpose | Identify the preset and explain what work it handles. |
38
+ | Category | Assign the Team to a local category for organization in lists and picker. |
39
+ | Display metadata | Summary, tags, use cases, quick prompts, and notes. Purely presentation-only; never injected into LLM context tokens. |
40
+ | Captain | The lead agent. A nonempty captain prompt replaces its persona prefix; the captain keeps the conversation's model. |
41
+ | Members | Reusable role templates the captain can summon. |
42
+ | Name | Role display name and target base. ASCII letters/digits and hyphens (max 64 chars, not `lead`). |
43
+ | Description | Role responsibilities for the captain to select appropriate members (max 200 chars). |
44
+ | Color | Accent color distinguishing the role in settings and the roster. |
45
+ | Provider / Model | Members only. Route from the deployment's model catalog. |
46
+ | Reasoning effort | Members only. Options depend on model support; empty uses route default. |
47
+ | Allowed tools | Independent all-tools or custom allow-list policy. |
48
+ | Team Skills | Assigned private skills, registered exclusively in this Agent's scope upon creation. |
49
+ | System prompt | Standing role instructions. `{{variable}}` denotes prompt template variables. |
50
+
51
+ ### Built-in presets
52
+
53
+ A fresh installation seeds nine editable Teams across two series — three development-scale Teams and six work-mode Teams:
54
+
55
+ | Series | Teams |
56
+ |---|---|
57
+ | **研发规模系列 (Classic Development Scale)** | 轻量研发团队 `builtin-lightweight` · 标准研发团队 `builtin-standard` · 全栈软件研发团队 `builtin-fullstack` |
58
+ | **工作模式系列 (Work Modes)** | 需求探索 `builtin-discovery` · 架构规划 `builtin-planning` · 既定工作流执行 `builtin-workflow` · 工程研发协作 `builtin-engineering` · 独立代码与安全审计 `builtin-audit` · 科研协作 `builtin-research` |
59
+
60
+ Each preset's roles, its intended use, and the Team Skills those roles receive are documented in [Built-in Teams](../builtin-teams.md) and [Built-in Team Skills](../builtin-team-skills.md).
61
+
62
+ Default presets are seeded once per profile. Deleting or editing a built-in preset is respected across restarts, which also means a Team list that lost its shipped presets some other way (a hand-edited or restored settings file) does not get them back by itself: the Host logs a warning and the page shows a notice pointing at **Restore built-in presets**. That button stages a draft, so save afterwards. Restoring brings back shipped fields and official rosters while preserving local member model routes and tool policies.
63
+
64
+ ## Display metadata, categories, and search
65
+
66
+ ### Presentation-only display metadata
67
+
68
+ Each Team preset supports rich metadata:
69
+
70
+ - **Summary**: One-line description shown on cards and intros.
71
+ - **Tags**: Keyword chips for filtering and categorization.
72
+ - **Use cases**: Recommended project scenarios.
73
+ - **Quick prompts**: Ready-to-use task templates shown when selecting the Team.
74
+ - **Notes**: Operational reminders or cautions.
75
+
76
+ **Token economy:** Display metadata is stored in the preset document and used by the UI for search, grouping, and cards, but is **never injected into the runtime LLM prompt context**.
77
+
78
+ ### Local categories and hierarchical filtering
79
+
80
+ - **Category manager:** Click **管理团队预设分类** in the Settings list to open a dedicated management page. Create, rename, reorder, and delete categories, and inspect team counts per category.
81
+ - **Local isolation:** Categories and team-category bindings are saved in profile settings and are **never exported** with shareable preset documents.
82
+ - **Two-level filters:** The Teams list provides two independent filter rows:
83
+ - **来源 (Source):** 全部 (All), 插件内置 (Built-in), 自定义 (Custom).
84
+ - **分类 (Category):** For built-in teams, filters by official series (研发规模 / 工作模式); for custom teams, filters by user-created categories.
85
+ - **Instant search:** A responsive search box searches team names, summaries, tags, use cases, and quick prompts with real-time matched count reporting.
86
+ - **Composer integration:** The conversation composer's Team picker mirrors these source filters and search capabilities, with `不加载预设` pinned to the top.
87
+
88
+ ## Next
89
+
90
+ - [Install and upgrade](install.md)
91
+ - [Getting started](getting-started.md) — the illustrated walkthrough, screen by screen.
92
+ - [Built-in Teams](../builtin-teams.md) — roles and intended use of all nine presets.
@@ -0,0 +1,92 @@
1
+ # 使用团队
2
+
3
+ 如何配置一个团队、在会话中启用它,以及设置页每个字段控制什么。
4
+
5
+ [English](<using-teams.md>) · [文档索引](../index.zh.md) · [README](../../README.zh.md)
6
+
7
+ ## 配置与使用团队
8
+
9
+ 1. 打开 **设置 → 智能体团队预设**。
10
+ 2. 选择内置团队、复制已有团队,或点击 **新建团队**。
11
+ 3. 设置团队名称、用途、展示元数据、所属分类、队长与成员角色。
12
+ 4. 为各成员配置独立的模型路由、推理强度、工具权限与专属 Team Skill。
13
+ 5. 点击共享页脚中的 **保存**。未保存前的修改均为草稿。
14
+ 6. 在会话输入区的团队选择器中选中该团队,要求队长调度角色完成任务。
15
+
16
+ 例如针对包含研发与审查角色的团队:
17
+
18
+ > 使用当前团队。让研发执行者完成约定改动并补全回归测试,再让独立审查员进行质量检查。最后汇总改动、测试结果与剩余风险。
19
+
20
+ 预设角色是召唤模板。每次召唤会创建带唯一 target(如 `executor` 或 `executor-2`)的实例。需要继续已有成员工作时,使用 `send_message` 发向返回的 target,而不是重新创建实例。
21
+
22
+ 选择 **不加载预设(No preset)** 会在队长与队员全部空闲后卸载团队应用,恢复常规会话行为,不改变已选模型。
23
+
24
+ ### 与单个成员单独对话
25
+
26
+ 在输入区团队选择器中悬浮某个团队,会展开成员面板:队长排在最前,模型一栏显示 **会话模型**;其后是各队员的「提供方 · 模型」与角色描述。
27
+
28
+ - 选择 **队长** 即常规应用该团队:队长主导本会话、可召唤队员,并继续使用会话已选的模型。
29
+ - 选择 **队员** 即与该成员单独对话:该成员的角色卡(名称、角色描述、独立系统提示词)成为本会话 persona,其工具策略与已分配的 Team Skill 生效,不再安装队长简报与 `spawn_team_member`;同时会话模型自动切换为该成员配置的提供方/模型与推理强度。未配置路由的成员保持会话当前模型。
30
+ - 再切回队长不会恢复旧模型:队长始终跟随会话当前所选模型。
31
+ - 角色与模型的切换和团队切换一样,会等待运行中的任务到达边界;若所选成员已被删除,则拒绝该选择并保持会话锁定,绝不静默回退到队长。
32
+
33
+ ### 字段说明
34
+
35
+ | 字段 | 用途 |
36
+ |---|---|
37
+ | 团队名称与用途 | 标识预设,并说明适合处理什么工作。 |
38
+ | 所属分类 | 归入自建分类,便于在列表与选择器中归纳。 |
39
+ | 展示元数据 | 简介、标签、适用场景、推荐任务与备注。仅供界面展示与检索,不注入 LLM 运行时上下文。 |
40
+ | 队长 | 当前会话的主智能体。非空的队长提示词会替换其 persona 前缀;队长使用会话当前模型。 |
41
+ | 成员 | 队长可召唤的角色模板。 |
42
+ | 名称 | 角色显示名称与 target 基础。ASCII 字母/数字/连字符(最多 64 字符,不能为 `lead`)。 |
43
+ | 描述 | 说明角色职责,供队长选人决策(建议 200 字符以内)。 |
44
+ | 颜色 | 在设置页和名册中区分角色的强调色。 |
45
+ | 提供商 / 模型 | 仅成员可配置。从部署的模型目录中独立选择路由。 |
46
+ | 推理强度 | 仅成员可配置。取决于模型支持,留空使用路由默认值。 |
47
+ | 允许的工具 | 独立配置所有工具或自定义白名单策略。 |
48
+ | Team Skills | 专属技能分配。成员被召唤时,仅在该 Agent 作用域内注册生效。 |
49
+ | 系统提示词 | 固定的角色指令。`{{variable}}` 会作为模板变量处理。 |
50
+
51
+ ### 内置预设
52
+
53
+ 全新安装会初始化九个可编辑的团队,划分为两大系列——三个研发规模团队与六个工作模式团队:
54
+
55
+ | 系列 | 团队 |
56
+ |---|---|
57
+ | **研发规模系列** | 轻量研发团队 `builtin-lightweight` · 标准研发团队 `builtin-standard` · 全栈软件研发团队 `builtin-fullstack` |
58
+ | **工作模式系列** | 需求探索 `builtin-discovery` · 架构规划 `builtin-planning` · 既定工作流执行 `builtin-workflow` · 工程研发协作 `builtin-engineering` · 独立代码与安全审计 `builtin-audit` · 科研协作 `builtin-research` |
59
+
60
+ 每个预设的角色、适用场景,以及这些角色拿到哪些团队技能,见[内置团队](../builtin-teams.md)与[内置团队技能](../builtin-team-skills.md)。
61
+
62
+ 内置预设在每个 profile 中只初始化一次,用户对其编辑或删除会被持久记忆。这也意味着如果团队列表是因为别的原因丢的(手改配置、配置回滚),插件不会自己补回来:宿主会写一条 warn 日志,设置页顶部也会出现提示,指向 **恢复内置预设**(它只改草稿,恢复后要保存)。恢复会重置内置字段与角色,但完整保留匹配角色的模型路由与工具策略。
63
+
64
+ ## 展示元数据、本地分类与搜索
65
+
66
+ ### 纯前端展示元数据
67
+
68
+ 每个预设均支持完整的展示元数据:
69
+
70
+ - **简介 (Summary)**:卡片与选择器中展示的一句话定位。
71
+ - **标签 (Tags)**:用于快速分类与检索的关键词。
72
+ - **适用场景 (Use Cases)**:适合该团队的项目与工作类型。
73
+ - **推荐任务 (Quick Prompts)**:选中该团队后展示的推荐快捷任务。
74
+ - **备注 (Notes)**:协作注意事项或说明。
75
+
76
+ **Token 保护:** 展示元数据保存在预设文档中,仅在界面与检索中展示,**绝不注入 LLM 运行时提示词中**,不占用任何模型上下文。
77
+
78
+ ### 本地分类与层级筛选
79
+
80
+ - **分类管理页:** 点击设置列表中的 **管理团队预设分类** 即可进入独立管理页。支持新建分类、重命名、上下移动排序以及删除分类,清晰显示每个分类下的团队数量。
81
+ - **本地隔离:** 分类与团队分类归属仅保存在当前 profile 本地,导出预设时**绝不会随文件导出**。
82
+ - **双排联动筛选:**
83
+ - **来源 (Source):** 全部、插件内置、自定义。
84
+ - **分类 (Category):** 针对内置团队显示研发规模与工作模式两大系列;针对自定义团队显示用户自建分类,互斥切换。
85
+ - **实时搜索:** 输入关键词即时全文检索名称、简介、标签、适用场景与推荐任务,并实时显示匹配数量。
86
+ - **输入区联动:** 会话输入区的团队选择器完全镜像支持上述来源筛选与搜索能力,并将 `不使用团队` 固顶在最上方。
87
+
88
+ ## 接下来
89
+
90
+ - [安装与升级](install.zh.md)
91
+ - [新手必读(图文)](getting-started.zh.md) —— 逐屏走查。
92
+ - [内置团队](../builtin-teams.md) —— 九个预设的角色与适用场景。
package/docs/index.md ADDED
@@ -0,0 +1,53 @@
1
+ # Documentation
2
+
3
+ Entry point for the `dsh-agent-team-presets` documentation. The [README](../README.md) is the overview and install entry; everything that goes deeper starts here.
4
+
5
+ [中文](<index.zh.md>)
6
+
7
+ ## Start here
8
+
9
+ | If you want to… | Read |
10
+ |---|---|
11
+ | Install the plugin and see it work, screen by screen | [Getting started](guide/getting-started.md) — the illustrated walkthrough |
12
+ | Choose an install channel, pin a version, upgrade safely | [Install and upgrade](guide/install.md) |
13
+ | Configure a Team, its members, metadata, and categories | [Using Teams](guide/using-teams.md) |
14
+ | Understand the private Team Skill library and preset sharing | [Private Team Skills](guide/team-skills.md) |
15
+ | Add the subagent card badges | [Integrations](guide/integrations.md) |
16
+ | Review agent-facing tools, tool policies, and security boundaries | [Tools and permissions](reference/tools-and-permissions.md) |
17
+ | Diagnose a Team, member, or install problem | [Troubleshooting](reference/troubleshooting.md) |
18
+ | Know what the nine built-in Teams contain and what each role is for | [Built-in Teams](builtin-teams.md) |
19
+ | Know which Team Skill a role receives, and what those skills do | [Built-in Team Skills](builtin-team-skills.md) |
20
+ | Work on the plugin itself | [Architecture and development](developer/architecture.md) |
21
+
22
+ ## Document map
23
+
24
+ | Document | Covers | In the npm package |
25
+ |---|---|---|
26
+ | [README.md](../README.md) · [中文](../README.zh.md) | Overview, why, features, quick start, documentation map | yes |
27
+ | [docs/guide/getting-started.md](guide/getting-started.md) · [中文](guide/getting-started.zh.md) | The illustrated walkthrough: picking a Team, editing members, the skill library, integrations | no — references screenshots the tarball does not carry |
28
+ | [docs/guide/install.md](guide/install.md) · [中文](guide/install.zh.md) | Install channels, registry choice, pinned versions, upgrade safety, verification | yes |
29
+ | [docs/guide/using-teams.md](guide/using-teams.md) · [中文](guide/using-teams.zh.md) | Configuring a Team, the member panel, every field, display metadata, categories, search | yes |
30
+ | [docs/guide/team-skills.md](guide/team-skills.md) · [中文](guide/team-skills.zh.md) | The private skill store, per-agent scope, import and scanning, dependency checks, preset sharing | yes |
31
+ | [docs/guide/integrations.md](guide/integrations.md) · [中文](guide/integrations.zh.md) | Subagent card badges and the prebuilt replacement bundles | yes |
32
+ | [docs/reference/tools-and-permissions.md](reference/tools-and-permissions.md) · [中文](reference/tools-and-permissions.zh.md) | Agent-facing tools, policy modes, first-turn registration, security boundaries | yes |
33
+ | [docs/reference/troubleshooting.md](reference/troubleshooting.md) · [中文](reference/troubleshooting.zh.md) | Configuration overrides, the built-in troubleshooting skill, common issues, known limitations | yes |
34
+ | [docs/developer/architecture.md](developer/architecture.md) · [中文](developer/architecture.zh.md) | How the plugin integrates, source map, development commands | yes |
35
+ | [docs/builtin-teams.md](builtin-teams.md) · [中文](builtin-teams.zh.md) | The nine built-in presets: series, roles, intended use, restore semantics, where the record lives | yes |
36
+ | [docs/builtin-team-skills.md](builtin-team-skills.md) · [中文](builtin-team-skills.zh.md) | The ten shipped Team Skills: categories, default bindings per role, local overrides, scope | yes |
37
+ | `docs/internal/` | Development notes, audits, acceptance and release evidence | no — local working material, excluded from the repository |
38
+
39
+ Every public document above ships with the package except the illustrated walkthrough, which references screenshots the tarball does not carry. `docs/internal/` is excluded from the repository itself and is never linked from a public page.
40
+
41
+ ## Conventions used in these documents
42
+
43
+ - **Team names** are given in their original form with the stored identity next to them, for example 轻量研发团队 `builtin-lightweight`. The identity is what a configuration file, an export, or a bug report should quote.
44
+ - **Role names** are the exact stored names (`team-lead`, `executor`, `repository-specialist`). They are what a default skill binding matches on, so they are quoted verbatim rather than translated.
45
+ - **Skill ids** are the kebab-case names the model uses (`git-release-hygiene`); the Chinese column is a display name only.
46
+ - Bilingual documents are kept in step: `X.md` and `X.zh.md` state the same facts.
47
+
48
+ ## Related
49
+
50
+ - [Getting started](guide/getting-started.md)
51
+ - [Using Teams](guide/using-teams.md)
52
+ - [Built-in Teams](builtin-teams.md)
53
+ - [Built-in Team Skills](builtin-team-skills.md)
@@ -0,0 +1,53 @@
1
+ # 文档
2
+
3
+ `dsh-agent-team-presets` 的文档入口。[README](<../README.zh.md>) 是总览与安装入口;需要更深入的内容都从这里进。
4
+
5
+ [English](<index.md>)
6
+
7
+ ## 从这里开始
8
+
9
+ | 你想… | 读这个 |
10
+ |---|---|
11
+ | 装上插件并逐步看到效果(带截图) | [新手必读(图文)](<guide/getting-started.zh.md>) |
12
+ | 选择安装渠道、固定版本、安全升级 | [安装与升级](<guide/install.zh.md>) |
13
+ | 配置团队、成员、展示元数据与分类 | [使用团队](<guide/using-teams.zh.md>) |
14
+ | 了解私有团队技能库与预设分享 | [私有团队技能](<guide/team-skills.zh.md>) |
15
+ | 打开子代理卡片标签 | [集成](<guide/integrations.zh.md>) |
16
+ | 了解面向智能体的工具、工具策略与安全边界 | [工具权限与安全](<reference/tools-and-permissions.zh.md>) |
17
+ | 排查团队、成员或安装问题 | [排障](<reference/troubleshooting.zh.md>) |
18
+ | 知道九个内置团队各包含什么、每个角色负责什么 | [内置团队](<builtin-teams.zh.md>) |
19
+ | 知道某个角色拿到哪些团队技能、这些技能做什么 | [内置团队技能](<builtin-team-skills.zh.md>) |
20
+ | 参与插件本身的开发 | [架构与开发](<developer/architecture.zh.md>) |
21
+
22
+ ## 文档地图
23
+
24
+ | 文档 | 覆盖内容 | 是否随 npm 包发布 |
25
+ |---|---|---|
26
+ | [README.md](../README.md) · [中文](<../README.zh.md>) | 总览、为什么需要、主要功能、快速开始、文档导航 | 是 |
27
+ | [docs/guide/getting-started.md](guide/getting-started.md) · [中文](<guide/getting-started.zh.md>) | 图文走查:选团队、改成员、技能库、插件联动 | 否——引用的截图不在发布包里 |
28
+ | [docs/guide/install.md](guide/install.md) · [中文](<guide/install.zh.md>) | 安装渠道、安装源选择、固定版本、升级安全、安装校验 | 是 |
29
+ | [docs/guide/using-teams.md](guide/using-teams.md) · [中文](<guide/using-teams.zh.md>) | 配置团队、成员面板、字段含义、展示元数据、分类与搜索 | 是 |
30
+ | [docs/guide/team-skills.md](guide/team-skills.md) · [中文](<guide/team-skills.zh.md>) | 私有技能库、按角色作用域、导入与扫描、依赖检查、预设分享 | 是 |
31
+ | [docs/guide/integrations.md](guide/integrations.md) · [中文](<guide/integrations.zh.md>) | 子代理卡片标签与随包替换包 | 是 |
32
+ | [docs/reference/tools-and-permissions.md](reference/tools-and-permissions.md) · [中文](<reference/tools-and-permissions.zh.md>) | 面向智能体的工具、策略模式、首轮注册、安全边界 | 是 |
33
+ | [docs/reference/troubleshooting.md](reference/troubleshooting.md) · [中文](<reference/troubleshooting.zh.md>) | 配置被覆盖、内置排障技能、常见问题、已知限制 | 是 |
34
+ | [docs/developer/architecture.md](developer/architecture.md) · [中文](<developer/architecture.zh.md>) | 集成方式、源码导航、开发命令 | 是 |
35
+ | [docs/builtin-teams.md](builtin-teams.md) · [中文](<builtin-teams.zh.md>) | 九个内置预设:系列、角色、适用场景、恢复语义、记录存放位置 | 是 |
36
+ | [docs/builtin-team-skills.md](builtin-team-skills.md) · [中文](<builtin-team-skills.zh.md>) | 10 个随包团队技能:分类、各角色默认绑定、本地副本、作用域 | 是 |
37
+ | `docs/internal/` | 开发笔记、审计、验收与发布证据 | 否——本地材料,不入库 |
38
+
39
+ 除图文走查外,上面每份公开文档都随包发布;图文走查引用的截图不在发布包里。`docs/internal/` 本身不入库,也不会被任何公开页面链接。
40
+
41
+ ## 本文档的约定
42
+
43
+ - **团队名**保留原文并附上存储标识,例如 轻量研发团队 `builtin-lightweight`。标识才是配置文件、导出文档与缺陷报告应当引用的东西。
44
+ - **角色名**用存储中的原名(`team-lead`、`executor`、`repository-specialist`)。默认技能绑定就是按它匹配的,所以照引不译。
45
+ - **技能 id** 是模型使用的 kebab-case 名(`git-release-hygiene`);中文那一列只是显示名。
46
+ - 双语文档保持同步:`X.md` 与 `X.zh.md` 陈述同样的事实。
47
+
48
+ ## 相关
49
+
50
+ - [新手必读(图文)](<guide/getting-started.zh.md>)
51
+ - [使用团队](<guide/using-teams.zh.md>)
52
+ - [内置团队](<builtin-teams.zh.md>)
53
+ - [内置团队技能](<builtin-team-skills.zh.md>)
@@ -0,0 +1,62 @@
1
+ # Tools and permissions
2
+
3
+ Root sessions expose six tools that read and maintain Team presets and Team Skills, and every captain and member role carries its own tool policy. This page records that tool surface, the two policy modes, the guarantee a member's first turn depends on, and where the allow-list stops.
4
+
5
+ [中文](<tools-and-permissions.zh.md>) · [Documentation index](../index.md) · [README](../../README.md)
6
+
7
+ ## Agent-facing tools
8
+
9
+ Root sessions register tools allowing agents to inspect and update presets and skills programmatically, subject to tool policies.
10
+
11
+ ### Team preset tools
12
+
13
+ - **`get_team_preset`**: Reads the active or specified Team preset, returning its purpose, role descriptions, prompts, roster, and settings revision.
14
+ - **`update_team_preset`**: Updates team/captain descriptions and member prompts/descriptions using compare-and-set revision checks. Requires direct human turn and Host approval. Returns `team-busy` if affected members are currently active.
15
+
16
+ ### Team Skill tools
17
+
18
+ - **`list_team_skills`**: Lists installed private Team Skills, origins, dependencies, and role assignment status.
19
+ - **`assign_team_skill`**: Assigns one Team Skill to a role in a Team (isolated to that agent scope).
20
+ - **`unassign_team_skill`**: Removes a Team Skill assignment from a role.
21
+ - **`remove_team_skill`**: Deletes a Team Skill from the library, enforcing blocker checks.
22
+
23
+ Both preset tools act on the Team record in the active profile's configuration rather than on the shipped catalog: an edit through `update_team_preset` changes the Team this profile runs and never rewrites a built-in preset. The Skill tools act on the private library described in [Team Skills](../guide/team-skills.md), which is also where their assignment rules come from.
24
+
25
+ ## Policy modes
26
+
27
+ A captain and each member carry a policy of their own. There are two modes:
28
+
29
+ | Mode | What it permits |
30
+ |---|---|
31
+ | **Default: all tools** | No allow-list restriction beyond deployment permissions and role rules. |
32
+ | **Custom allowed tools** | Only the selected tool names. Coordination tools (`send_message`, `list_agents`, `team_task_*`) must be explicitly allowed if needed. |
33
+
34
+ Captain and member policies are independent: granting a tool to the captain does not grant it to members.
35
+
36
+ **The `skill` tool is always admitted, and is not offered as a choice.** It publishes the catalog and loads instruction text rather than granting a capability, and the Host withholds that whole catalog from an Agent that cannot see it. A custom allow-list therefore cannot remove it, and the settings page does not list it: a checkbox for it would be a control that can never do anything. Documents written by an earlier version that still name it keep loading unchanged — the entry is admitted implicitly, never reported as unavailable, and never needs removing.
37
+
38
+ ## Custom allow-lists on PTC sessions
39
+
40
+ **Custom tool allow-lists work on PTC by giving that Session its own native surface.** The Host cannot restore an inherited executor after a release, so the plugin never releases one: on a PTC preset it mounts the Harness native tool executor on the Session's Agent scope and leaves the deployment executor alone. The trade-off is deliberate — that Session stops using `run_code` for the rest of its life, while other Sessions and the all-tools mode keep PTC. If mounting fails, or the surface still exposes the PTC transport afterwards, the application is refused and nothing is left behind, because no executor was ever released.
41
+
42
+ ## What a member's first turn guarantees
43
+
44
+ An assigned Team Skill is only useful if the member can load it on the turn that asks for it, so the plugin makes the registration part of member creation rather than a background step:
45
+
46
+ - **Members**: the creation edge awaits that Agent's own registration before it completes. A role that holds assigned Team Skills but whose deployment cannot publish them — no skill service composed, the private library unreadable, or the registration refused — is **refused at creation** with the reason, instead of starting with an empty catalog while every surface says the skill is bound. Roles with no assignment keep working on deployments that compose no skill service.
47
+ - **The captain**: the same registration is performed inside the Session's creation edge, after the Team application it depends on. A captain whose assignment cannot be published does not refuse the Team — a Session that is already running must not lose its capability policy — and the failure is reported at the Agent identity.
48
+ - **Unreadable library is not an empty library.** When the private store cannot be opened the plugin cannot even enumerate a role's bindings, so it refuses member creation rather than reading the unknown as "no assignment". Repair the library path (or start again) to recover.
49
+
50
+ ## Security boundaries
51
+
52
+ - The allow-list is **not a filesystem, process, or network sandbox**. Allowed tools (such as bash) retain their native capabilities. Maintain appropriate Harness sandbox and approval policies.
53
+ - Custom policy mode disallows general-purpose `run_code` and ordinary `subagent` / `workflow` delegation to preserve strict policy contracts. Use preset Team members for delegation.
54
+ - Managed members require their durable configuration on resume. Missing or corrupted records are refused loud rather than falling back to unrestricted defaults.
55
+
56
+ ## Related
57
+
58
+ - [Install](../guide/install.md) — the requirements a policy relies on, including the PTC constraint above
59
+ - [Using Teams](../guide/using-teams.md) — where the captain's and each member's policy is edited
60
+ - [Team Skills](../guide/team-skills.md) — the private library these tools read and write
61
+ - [Troubleshooting](troubleshooting.md) — when a policy refusal or a missing dependency blocks the work
62
+ - [Documentation index](../index.md) — every document by topic