dominds 1.2.5 → 1.2.7

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 (149) hide show
  1. package/dist/agent-priming.js +2051 -0
  2. package/dist/apps/app-lock-file.js +228 -0
  3. package/dist/apps/assigned-port.js +124 -0
  4. package/dist/apps/enabled-apps.js +472 -7
  5. package/dist/apps/manifest.js +37 -0
  6. package/dist/apps/override-paths.js +19 -6
  7. package/dist/apps/problems.js +43 -0
  8. package/dist/apps/resolution-file.js +370 -0
  9. package/dist/apps/runtime.js +5 -17
  10. package/dist/apps/teammates.js +102 -1
  11. package/dist/cli/disable.js +10 -6
  12. package/dist/cli/enable.js +21 -19
  13. package/dist/cli/install.js +40 -18
  14. package/dist/cli/uninstall.js +6 -6
  15. package/dist/cli/update.js +38 -13
  16. package/dist/dialog.js +5 -0
  17. package/dist/docs/app-constitution.md +85 -18
  18. package/dist/docs/app-constitution.zh.md +86 -21
  19. package/dist/docs/dialog-system.md +1 -1
  20. package/dist/docs/dialog-system.zh.md +1 -1
  21. package/dist/docs/dominds-agent-priming.md +218 -0
  22. package/dist/docs/dominds-agent-priming.zh.md +196 -0
  23. package/dist/docs/drive-logic-context-refactor-plan.zh.md +338 -0
  24. package/dist/docs/keep-going.md +176 -0
  25. package/dist/docs/keep-going.zh.md +162 -0
  26. package/dist/docs/showing-by-doing.md +208 -0
  27. package/dist/docs/showing-by-doing.zh.md +177 -0
  28. package/dist/docs/team-mgmt-toolset.md +482 -0
  29. package/dist/docs/team-mgmt-toolset.zh.md +426 -0
  30. package/dist/llm/defaults.yaml +1 -1
  31. package/dist/llm/driver.js +4093 -0
  32. package/dist/llm/kernel-driver/drive.js +5 -2
  33. package/dist/llm/kernel-driver/flow.js +3 -0
  34. package/dist/minds/promptdocs.js +263 -0
  35. package/dist/problems.js +67 -16
  36. package/dist/server/api-routes.js +333 -0
  37. package/dist/server/prompts-routes.js +545 -0
  38. package/dist/server/server-core.js +4 -0
  39. package/dist/server/websocket-handler.js +17 -0
  40. package/dist/shared/team-mgmt-manual.js +120 -0
  41. package/dist/shared/types/prompts.js +2 -0
  42. package/dist/shared/types/tellask.js +8 -0
  43. package/dist/showing-by-doing.js +1091 -0
  44. package/dist/snippets/README.en.md +3 -0
  45. package/dist/snippets/README.md +4 -0
  46. package/dist/static/assets/{_basePickBy-CF9r08iy.js → _basePickBy-BMCtwrV7.js} +3 -3
  47. package/dist/static/assets/{_basePickBy-CF9r08iy.js.map → _basePickBy-BMCtwrV7.js.map} +1 -1
  48. package/dist/static/assets/{_baseUniq-CxKv0cd4.js → _baseUniq-BuyCgJiA.js} +2 -2
  49. package/dist/static/assets/{_baseUniq-CxKv0cd4.js.map → _baseUniq-BuyCgJiA.js.map} +1 -1
  50. package/dist/static/assets/{arc-C9JyvnlB.js → arc-BDuN8lwA.js} +2 -2
  51. package/dist/static/assets/{arc-C9JyvnlB.js.map → arc-BDuN8lwA.js.map} +1 -1
  52. package/dist/static/assets/{architectureDiagram-VXUJARFQ-CpcUgjHf.js → architectureDiagram-VXUJARFQ-C-ekqGAD.js} +7 -7
  53. package/dist/static/assets/{architectureDiagram-VXUJARFQ-CpcUgjHf.js.map → architectureDiagram-VXUJARFQ-C-ekqGAD.js.map} +1 -1
  54. package/dist/static/assets/{blockDiagram-VD42YOAC-BA9vtmm7.js → blockDiagram-VD42YOAC-CgQiNuuQ.js} +7 -7
  55. package/dist/static/assets/{blockDiagram-VD42YOAC-BA9vtmm7.js.map → blockDiagram-VD42YOAC-CgQiNuuQ.js.map} +1 -1
  56. package/dist/static/assets/{c4Diagram-YG6GDRKO-D49MGNdF.js → c4Diagram-YG6GDRKO-DONC39q-.js} +3 -3
  57. package/dist/static/assets/{c4Diagram-YG6GDRKO-D49MGNdF.js.map → c4Diagram-YG6GDRKO-DONC39q-.js.map} +1 -1
  58. package/dist/static/assets/{channel-B4KzL0Kg.js → channel-CJTFwXIG.js} +2 -2
  59. package/dist/static/assets/{channel-B4KzL0Kg.js.map → channel-CJTFwXIG.js.map} +1 -1
  60. package/dist/static/assets/{chunk-4BX2VUAB-0F-1ayl0.js → chunk-4BX2VUAB-NaIy4uLJ.js} +2 -2
  61. package/dist/static/assets/{chunk-4BX2VUAB-0F-1ayl0.js.map → chunk-4BX2VUAB-NaIy4uLJ.js.map} +1 -1
  62. package/dist/static/assets/{chunk-55IACEB6-Dnl2HDTZ.js → chunk-55IACEB6-JUKI_Ayx.js} +2 -2
  63. package/dist/static/assets/{chunk-55IACEB6-Dnl2HDTZ.js.map → chunk-55IACEB6-JUKI_Ayx.js.map} +1 -1
  64. package/dist/static/assets/{chunk-B4BG7PRW-Bhx5RbkQ.js → chunk-B4BG7PRW-dIswFJDn.js} +5 -5
  65. package/dist/static/assets/{chunk-B4BG7PRW-Bhx5RbkQ.js.map → chunk-B4BG7PRW-dIswFJDn.js.map} +1 -1
  66. package/dist/static/assets/{chunk-DI55MBZ5-EYd1wL3E.js → chunk-DI55MBZ5-DU2b_N30.js} +4 -4
  67. package/dist/static/assets/{chunk-DI55MBZ5-EYd1wL3E.js.map → chunk-DI55MBZ5-DU2b_N30.js.map} +1 -1
  68. package/dist/static/assets/{chunk-FMBD7UC4-DAjkhhUU.js → chunk-FMBD7UC4-BgExcScw.js} +2 -2
  69. package/dist/static/assets/{chunk-FMBD7UC4-DAjkhhUU.js.map → chunk-FMBD7UC4-BgExcScw.js.map} +1 -1
  70. package/dist/static/assets/{chunk-QN33PNHL-CK6TY7IE.js → chunk-QN33PNHL-bitxyqh7.js} +2 -2
  71. package/dist/static/assets/{chunk-QN33PNHL-CK6TY7IE.js.map → chunk-QN33PNHL-bitxyqh7.js.map} +1 -1
  72. package/dist/static/assets/{chunk-QZHKN3VN-CketngiE.js → chunk-QZHKN3VN-Cor8u7DT.js} +2 -2
  73. package/dist/static/assets/{chunk-QZHKN3VN-CketngiE.js.map → chunk-QZHKN3VN-Cor8u7DT.js.map} +1 -1
  74. package/dist/static/assets/{chunk-TZMSLE5B-Bcuvqo45.js → chunk-TZMSLE5B-Aceoxav_.js} +2 -2
  75. package/dist/static/assets/{chunk-TZMSLE5B-Bcuvqo45.js.map → chunk-TZMSLE5B-Aceoxav_.js.map} +1 -1
  76. package/dist/static/assets/{classDiagram-2ON5EDUG-CaP4T3r4.js → classDiagram-2ON5EDUG-D1Q6a8Hg.js} +6 -6
  77. package/dist/static/assets/{classDiagram-2ON5EDUG-CaP4T3r4.js.map → classDiagram-2ON5EDUG-D1Q6a8Hg.js.map} +1 -1
  78. package/dist/static/assets/{classDiagram-v2-WZHVMYZB-CaP4T3r4.js → classDiagram-v2-WZHVMYZB-D1Q6a8Hg.js} +6 -6
  79. package/dist/static/assets/{classDiagram-v2-WZHVMYZB-CaP4T3r4.js.map → classDiagram-v2-WZHVMYZB-D1Q6a8Hg.js.map} +1 -1
  80. package/dist/static/assets/{clone-C-JULvnG.js → clone-MlWbv1V0.js} +2 -2
  81. package/dist/static/assets/{clone-C-JULvnG.js.map → clone-MlWbv1V0.js.map} +1 -1
  82. package/dist/static/assets/{cose-bilkent-S5V4N54A-vXCmi_eC.js → cose-bilkent-S5V4N54A-DWPCXSrn.js} +2 -2
  83. package/dist/static/assets/{cose-bilkent-S5V4N54A-vXCmi_eC.js.map → cose-bilkent-S5V4N54A-DWPCXSrn.js.map} +1 -1
  84. package/dist/static/assets/{dagre-6UL2VRFP-bhGzX6kO.js → dagre-6UL2VRFP-C8ptQ9V3.js} +7 -7
  85. package/dist/static/assets/{dagre-6UL2VRFP-bhGzX6kO.js.map → dagre-6UL2VRFP-C8ptQ9V3.js.map} +1 -1
  86. package/dist/static/assets/{diagram-PSM6KHXK-BUKfmfGk.js → diagram-PSM6KHXK-Bgf1FqkE.js} +8 -8
  87. package/dist/static/assets/{diagram-PSM6KHXK-BUKfmfGk.js.map → diagram-PSM6KHXK-Bgf1FqkE.js.map} +1 -1
  88. package/dist/static/assets/{diagram-QEK2KX5R-DYlq3uFq.js → diagram-QEK2KX5R-BZ5xzofU.js} +7 -7
  89. package/dist/static/assets/{diagram-QEK2KX5R-DYlq3uFq.js.map → diagram-QEK2KX5R-BZ5xzofU.js.map} +1 -1
  90. package/dist/static/assets/{diagram-S2PKOQOG-CjxkLHWG.js → diagram-S2PKOQOG-Dwp47T9I.js} +7 -7
  91. package/dist/static/assets/{diagram-S2PKOQOG-CjxkLHWG.js.map → diagram-S2PKOQOG-Dwp47T9I.js.map} +1 -1
  92. package/dist/static/assets/{erDiagram-Q2GNP2WA-S3hR85On.js → erDiagram-Q2GNP2WA-Cx4weIHl.js} +5 -5
  93. package/dist/static/assets/{erDiagram-Q2GNP2WA-S3hR85On.js.map → erDiagram-Q2GNP2WA-Cx4weIHl.js.map} +1 -1
  94. package/dist/static/assets/{flowDiagram-NV44I4VS-aBmNMuQ0.js → flowDiagram-NV44I4VS-vNUuIeRk.js} +6 -6
  95. package/dist/static/assets/{flowDiagram-NV44I4VS-aBmNMuQ0.js.map → flowDiagram-NV44I4VS-vNUuIeRk.js.map} +1 -1
  96. package/dist/static/assets/{ganttDiagram-JELNMOA3-DJxXaiW1.js → ganttDiagram-JELNMOA3-BEfozJAr.js} +3 -3
  97. package/dist/static/assets/{ganttDiagram-JELNMOA3-DJxXaiW1.js.map → ganttDiagram-JELNMOA3-BEfozJAr.js.map} +1 -1
  98. package/dist/static/assets/{gitGraphDiagram-V2S2FVAM-DEOBCM0G.js → gitGraphDiagram-V2S2FVAM-eHxwc3d9.js} +8 -8
  99. package/dist/static/assets/{gitGraphDiagram-V2S2FVAM-DEOBCM0G.js.map → gitGraphDiagram-V2S2FVAM-eHxwc3d9.js.map} +1 -1
  100. package/dist/static/assets/{graph-DwrKSIE7.js → graph-C6a6uAok.js} +3 -3
  101. package/dist/static/assets/{graph-DwrKSIE7.js.map → graph-C6a6uAok.js.map} +1 -1
  102. package/dist/static/assets/{index-HWTRvE2k.js → index-D3TQbAKh.js} +383 -59
  103. package/dist/static/assets/index-D3TQbAKh.js.map +1 -0
  104. package/dist/static/assets/{infoDiagram-HS3SLOUP-BH9kVuYd.js → infoDiagram-HS3SLOUP-CX0NiId3.js} +6 -6
  105. package/dist/static/assets/{infoDiagram-HS3SLOUP-BH9kVuYd.js.map → infoDiagram-HS3SLOUP-CX0NiId3.js.map} +1 -1
  106. package/dist/static/assets/{journeyDiagram-XKPGCS4Q-Dap7AcjR.js → journeyDiagram-XKPGCS4Q-C1IepPZ-.js} +5 -5
  107. package/dist/static/assets/{journeyDiagram-XKPGCS4Q-Dap7AcjR.js.map → journeyDiagram-XKPGCS4Q-C1IepPZ-.js.map} +1 -1
  108. package/dist/static/assets/{kanban-definition-3W4ZIXB7-4NOl8MEj.js → kanban-definition-3W4ZIXB7-uMNX4Z1W.js} +3 -3
  109. package/dist/static/assets/{kanban-definition-3W4ZIXB7-4NOl8MEj.js.map → kanban-definition-3W4ZIXB7-uMNX4Z1W.js.map} +1 -1
  110. package/dist/static/assets/{layout-D6uIxu1E.js → layout-CpE3kk5z.js} +5 -5
  111. package/dist/static/assets/{layout-D6uIxu1E.js.map → layout-CpE3kk5z.js.map} +1 -1
  112. package/dist/static/assets/{linear-CvBOGQA2.js → linear-DV8laXr9.js} +2 -2
  113. package/dist/static/assets/{linear-CvBOGQA2.js.map → linear-DV8laXr9.js.map} +1 -1
  114. package/dist/static/assets/{mindmap-definition-VGOIOE7T-ugsrLNY5.js → mindmap-definition-VGOIOE7T-CKjgVM9S.js} +4 -4
  115. package/dist/static/assets/{mindmap-definition-VGOIOE7T-ugsrLNY5.js.map → mindmap-definition-VGOIOE7T-CKjgVM9S.js.map} +1 -1
  116. package/dist/static/assets/{pieDiagram-ADFJNKIX-CdVZjM8g.js → pieDiagram-ADFJNKIX-BBonlNyT.js} +8 -8
  117. package/dist/static/assets/{pieDiagram-ADFJNKIX-CdVZjM8g.js.map → pieDiagram-ADFJNKIX-BBonlNyT.js.map} +1 -1
  118. package/dist/static/assets/{quadrantDiagram-AYHSOK5B-A6m5lZKd.js → quadrantDiagram-AYHSOK5B-BTI8HbBu.js} +3 -3
  119. package/dist/static/assets/{quadrantDiagram-AYHSOK5B-A6m5lZKd.js.map → quadrantDiagram-AYHSOK5B-BTI8HbBu.js.map} +1 -1
  120. package/dist/static/assets/{requirementDiagram-UZGBJVZJ-Cac3zSJH.js → requirementDiagram-UZGBJVZJ-ZtSr9Q5R.js} +4 -4
  121. package/dist/static/assets/{requirementDiagram-UZGBJVZJ-Cac3zSJH.js.map → requirementDiagram-UZGBJVZJ-ZtSr9Q5R.js.map} +1 -1
  122. package/dist/static/assets/{sankeyDiagram-TZEHDZUN-DXDdUUl1.js → sankeyDiagram-TZEHDZUN-DibLVGzg.js} +2 -2
  123. package/dist/static/assets/{sankeyDiagram-TZEHDZUN-DXDdUUl1.js.map → sankeyDiagram-TZEHDZUN-DibLVGzg.js.map} +1 -1
  124. package/dist/static/assets/{sequenceDiagram-WL72ISMW-Domsjl5Y.js → sequenceDiagram-WL72ISMW-qXatfzVt.js} +4 -4
  125. package/dist/static/assets/{sequenceDiagram-WL72ISMW-Domsjl5Y.js.map → sequenceDiagram-WL72ISMW-qXatfzVt.js.map} +1 -1
  126. package/dist/static/assets/{stateDiagram-FKZM4ZOC-Bu0lRQK1.js → stateDiagram-FKZM4ZOC-7fgxCQHo.js} +9 -9
  127. package/dist/static/assets/{stateDiagram-FKZM4ZOC-Bu0lRQK1.js.map → stateDiagram-FKZM4ZOC-7fgxCQHo.js.map} +1 -1
  128. package/dist/static/assets/{stateDiagram-v2-4FDKWEC3-D0K-n3ic.js → stateDiagram-v2-4FDKWEC3-DcWlOAnF.js} +5 -5
  129. package/dist/static/assets/{stateDiagram-v2-4FDKWEC3-D0K-n3ic.js.map → stateDiagram-v2-4FDKWEC3-DcWlOAnF.js.map} +1 -1
  130. package/dist/static/assets/{timeline-definition-IT6M3QCI-BGvpddwR.js → timeline-definition-IT6M3QCI-iX2MRdpY.js} +3 -3
  131. package/dist/static/assets/{timeline-definition-IT6M3QCI-BGvpddwR.js.map → timeline-definition-IT6M3QCI-iX2MRdpY.js.map} +1 -1
  132. package/dist/static/assets/{treemap-GDKQZRPO-BoOzOm2j.js → treemap-GDKQZRPO-AVRnyXu1.js} +5 -5
  133. package/dist/static/assets/{treemap-GDKQZRPO-BoOzOm2j.js.map → treemap-GDKQZRPO-AVRnyXu1.js.map} +1 -1
  134. package/dist/static/assets/{xychartDiagram-PRI3JC2R-C_h3_ICR.js → xychartDiagram-PRI3JC2R-DVYEo5aJ.js} +3 -3
  135. package/dist/static/assets/{xychartDiagram-PRI3JC2R-C_h3_ICR.js.map → xychartDiagram-PRI3JC2R-DVYEo5aJ.js.map} +1 -1
  136. package/dist/static/index.html +1 -1
  137. package/dist/team.js +52 -48
  138. package/dist/tellask.js +439 -0
  139. package/dist/tools/context-health.js +177 -0
  140. package/dist/tools/diag.js +583 -0
  141. package/dist/tools/fs.js +194 -68
  142. package/dist/tools/prompts/memory/en/principles.md +13 -5
  143. package/dist/tools/prompts/memory/en/tools.md +11 -36
  144. package/dist/tools/prompts/memory/zh/principles.md +18 -8
  145. package/dist/tools/prompts/memory/zh/tools.md +11 -36
  146. package/dist/tools/team-mgmt.js +3487 -0
  147. package/dist/utils/task-doc.js +236 -0
  148. package/package.json +1 -1
  149. package/dist/static/assets/index-HWTRvE2k.js.map +0 -1
@@ -0,0 +1,482 @@
1
+ # Team Management Toolset (`team-mgmt`)
2
+
3
+ Chinese version: [中文版](./team-mgmt-toolset.zh.md)
4
+
5
+ This document specifies a dedicated **team management toolset** whose only job is managing the
6
+ rtws’s “mindset” configuration files under `.minds/` (team roster, LLM providers, and agent
7
+ minds files), without granting broad rtws access.
8
+
9
+ The outer repository root is the **rtws** (runtime workspace). All paths below are relative to the
10
+ rtws root.
11
+
12
+ ## Motivation
13
+
14
+ We want a safe way for a “team manager” agent (typically the shadow teammate `fuxi`) to:
15
+
16
+ - Create/update `.minds/team.yaml` (team roster + permissions + toolsets).
17
+ - Create/update `.minds/llm.yaml` (LLM provider definitions overriding defaults).
18
+ - Create/update `.minds/mcp.yaml` (MCP server definitions that register dynamic toolsets).
19
+ - Create/update `.minds/team/<member>/{persona,knowledge,lessons}.md` (agent minds).
20
+
21
+ At the same time, we do **not** want to hand that agent full rtws read/write (e.g. the
22
+ equivalent of the `ws_mod` toolset + unrestricted `read_dirs`/`write_dirs`), because:
23
+
24
+ - Editing `.minds/team.yaml` is inherently a **privilege escalation surface** (it controls tool
25
+ availability and directory permissions).
26
+ - Editing `.minds/llm.yaml` can change network destinations and model/provider behaviors.
27
+ - A “bootstrap” team manager should be able to configure the team without being able to change the
28
+ product code, `.dialogs/`, etc.
29
+
30
+ ## Migration Plan (Replacing legacy builtin team-manager knowledge)
31
+
32
+ This document is a **design spec** for the new `team-mgmt` toolset. It is not something we should
33
+ ever tell an agent to “look up” at runtime.
34
+
35
+ Instead, the runtime “single source of truth” for team management guidance should be
36
+ the function tool `team_mgmt_manual`.
37
+
38
+ Historically, some of the guidance lived in a legacy builtin “team manager” mind set inside the
39
+ `dominds/` source tree. That legacy builtin is being removed. The runtime “single source of truth”
40
+ should be the `team_mgmt_manual` tool output.
41
+
42
+ Planned change:
43
+
44
+ - Add a new function tool `team_mgmt_manual` whose responses cover the team-management topics (file
45
+ formats, workflows, safety).
46
+ - Remove legacy builtin guidance to avoid duplication. If any stub remains, it must point to
47
+ `team_mgmt_manual` (and not to this design document).
48
+
49
+ Rationale:
50
+
51
+ - The manual is versioned with the tool behavior, so it stays accurate.
52
+ - The framework source tree should not be the “primary” place the team config format is explained.
53
+ Each rtws may have different policies and defaults.
54
+
55
+ ## Current Problem Statement
56
+
57
+ In typical deployments we deny direct `.minds/` access via the general-purpose rtws tools:
58
+
59
+ - `fs` / `txt` (`list_dir`, `read_file`, `overwrite_entire_file`, …)
60
+
61
+ This makes sense for “normal” agents, but it blocks the team manager from doing its job.
62
+
63
+ ## Goals / Non-Goals
64
+
65
+ **Goals**
66
+
67
+ - Enable a trusted team manager to manage only the `.minds/` configuration surface.
68
+ - Provide a single “manual” tool to teach the correct file formats and safe best practices.
69
+ - Keep the tool behavior predictable and statically scoping paths to `.minds/` (no clever
70
+ auto-discovery outside that subtree).
71
+
72
+ **Non-goals**
73
+
74
+ - Replacing the existing `ws_read` / `ws_mod` toolsets.
75
+ - Providing general-purpose file editing across the repo.
76
+ - Making `.minds/` broadly writable by default team members.
77
+
78
+ ## Proposed `team-mgmt` Toolset
79
+
80
+ The `team-mgmt` toolset mirrors a minimal subset of `fs`/`txt`, but **hard-scopes** all operations to
81
+ `.minds/` and rejects anything outside.
82
+
83
+ ### Naming Conventions (Human / UI)
84
+
85
+ - **Tools** use `snake_case` (underscore-separated) for tool IDs (e.g. `team_mgmt_manual`). Avoid
86
+ `kebab-case` aliases for tool IDs; if UX needs a friendlier label, treat that as presentation-only.
87
+ - **Teammates** use either `kebab-case` (hyphen-separated) or an “internet name” (dot-separated).
88
+ - This is a convention for docs/UI/readability only; do not enforce it via validation or other
89
+ technical mechanisms.
90
+
91
+ ### Tools
92
+
93
+ Recommended tools (names are suggestions; use `snake_case` to match existing tools):
94
+
95
+ | Tool name | Based on | Purpose | Default allowlist scope |
96
+ | -------------------------------------- | -------- | --------------------------------------------------------------------------------- | ----------------------- |
97
+ | `team_mgmt_list_dir` | `fs` | List directories/files under `.minds/` | `.minds/**` |
98
+ | `team_mgmt_read_file` | `txt` | Read a text file under `.minds/` | `.minds/**` |
99
+ | `team_mgmt_create_new_file` | `txt` | Create a new file under `.minds/` (empty content allowed; refuses overwrite) | `.minds/**` |
100
+ | `team_mgmt_overwrite_entire_file` | `txt` | Overwrite an existing file under `.minds/` (guarded exception path) | `.minds/**` |
101
+ | `team_mgmt_prepare_file_range_edit` | `txt` | Prepare a single-file edit by line range under `.minds/` (returns a diff hunk id) | `.minds/**` |
102
+ | `team_mgmt_prepare_file_append` | `txt` | Prepare an append-to-EOF edit under `.minds/` (returns a diff hunk id) | `.minds/**` |
103
+ | `team_mgmt_prepare_file_insert_after` | `txt` | Prepare inserting after an anchor under `.minds/` (returns a diff hunk id) | `.minds/**` |
104
+ | `team_mgmt_prepare_file_insert_before` | `txt` | Prepare inserting before an anchor under `.minds/` (returns a diff hunk id) | `.minds/**` |
105
+ | `team_mgmt_prepare_file_block_replace` | `txt` | Prepare a block replace between anchors under `.minds/` (returns a diff hunk id) | `.minds/**` |
106
+ | `team_mgmt_apply_file_modification` | `txt` | Apply a planned modification by hunk id under `.minds/` | `.minds/**` |
107
+ | `team_mgmt_mk_dir` | `fs` | Create directories under `.minds/` | `.minds/**` |
108
+ | `team_mgmt_move_file` | `fs` | Move/rename files under `.minds/` | `.minds/**` |
109
+ | `team_mgmt_move_dir` | `fs` | Move/rename directories under `.minds/` | `.minds/**` |
110
+ | `team_mgmt_rm_file` | `fs` | Delete files under `.minds/` | `.minds/**` |
111
+ | `team_mgmt_rm_dir` | `fs` | Delete directories under `.minds/` | `.minds/**` |
112
+ | `team_mgmt_validate_team_cfg` | new | Validate `.minds/team.yaml` and publish issues to the Problems panel | `.minds/**` |
113
+ | `team_mgmt_manual` | new | Built-in “how-to” manual (see below) | N/A |
114
+
115
+ Notes:
116
+
117
+ - Include the full `.minds/` lifecycle (create, update, rename/move, delete). The team manager must
118
+ be able to correct mistakes and recover from accidental corruptions (including ones introduced by
119
+ other tools).
120
+ - After any change to `.minds/team.yaml`, the team manager should run `team_mgmt_validate_team_cfg({})`
121
+ to ensure all errors are detected and surfaced (and to avoid silently omitting broken member configs).
122
+ - Path handling should be strict:
123
+ - Reject absolute paths.
124
+ - Reject paths containing `..`.
125
+ - Reject any path that resolves outside `.minds/` after normalization.
126
+ - Prefer an explicit allowlist over “anything in the rtws”.
127
+ - For `team-mgmt`, that explicit allowlist is `.minds/**` (including `.minds/memory/**`) so the
128
+ team manager can repair accidental corruptions made by other tools (even though `.minds/memory/**`
129
+ already has dedicated `memory` / `team_memory` tools for normal use).
130
+ - Require explicit `.minds/...` paths and validate them; do not support “implicitly scoped” paths
131
+ like `team.yaml`.
132
+
133
+ ### Why a dedicated toolset (instead of only `read_dirs` / `write_dirs`)?
134
+
135
+ `read_dirs` / `write_dirs` are still valuable, but they are configured in `.minds/team.yaml`, which
136
+ may not exist during bootstrap. A dedicated `team-mgmt` toolset:
137
+
138
+ - Lets the team manager create `.minds/team.yaml` safely from “zero state”.
139
+ - Keeps the scope bounded even if the member’s directory allow/deny lists are empty.
140
+ - Makes it easy to grant _just_ team management capabilities to an ad-hoc agent without full rtws
141
+ access.
142
+
143
+ ## `team_mgmt_manual`
144
+
145
+ We need a single in-chat manual tool so the team manager can reliably self-serve guidance without
146
+ reading source code.
147
+
148
+ ### Command shape
149
+
150
+ - `team_mgmt_manual({ "topics": [] })` → show a short index (topics).
151
+ - `team_mgmt_manual({ "topics": ["topics"] })` → list topics.
152
+ - `team_mgmt_manual({ "topics": ["llm"] })` → how to manage `.minds/llm.yaml` (+ templates).
153
+ - `team_mgmt_manual({ "topics": ["llm", "builtin-defaults"] })` → show builtin providers/models (from defaults).
154
+ - `team_mgmt_manual({ "topics": ["mcp"] })` → how to manage `.minds/mcp.yaml` (+ templates).
155
+ - `team_mgmt_manual({ "topics": ["mcp"] })` → how to manage `.minds/mcp.yaml` (transports, env/headers, tools whitelist/blacklist, naming transforms, hot reload, leasing).
156
+ - `team_mgmt_manual({ "topics": ["mcp", "troubleshooting"] })` → common MCP failure modes and how to recover.
157
+ - `team_mgmt_manual({ "topics": ["team"] })` → how to manage `.minds/team.yaml` (+ templates).
158
+ - `team_mgmt_manual({ "topics": ["team", "member-properties"] })` → list supported member fields and meanings.
159
+ - `team_mgmt_manual({ "topics": ["minds"] })` → how to manage `.minds/team/<id>/*.md` (persona/knowledge/lessons).
160
+ - `team_mgmt_manual({ "topics": ["permissions"] })` → how `read_dirs`/`write_dirs` and deny-lists work.
161
+ - `team_mgmt_manual({ "topics": ["troubleshooting"] })` → common failure modes and how to recover.
162
+
163
+ The manual should accept **multiple** `topics` entries (a simple topic “path”); the tool should
164
+ select the most specific match and fall back to the nearest parent when needed.
165
+
166
+ If UX wants a friendlier label than `team_mgmt_manual`, treat that as presentation-only; the
167
+ canonical tool ID remains `team_mgmt_manual`.
168
+
169
+ ## Manual Coverage Requirements (legacy coverage)
170
+
171
+ As part of the migration away from the legacy builtin team-manager knowledge files, the manual
172
+ must cover (at minimum) the information that used to live there:
173
+
174
+ - `!team`:
175
+ - Explain `member_defaults`, `default_responder`, and `members` (structure overview).
176
+ - Include an explicit “member configuration properties” reference (fields table) via
177
+ `!team !member-properties`:
178
+ - `name`, `icon`, `gofor`, `provider`, `model`, `toolsets`, `tools`, `streaming`, `hidden`
179
+ - `read_dirs`, `no_read_dirs`, `write_dirs`, `no_write_dirs`
180
+ - `!llm`:
181
+ - Explain the provider map structure used by `.minds/llm.yaml` and how it relates to
182
+ `.minds/team.yaml` (`provider` + `model` keys).
183
+ - Provide a “builtin defaults” view via `!llm !builtin-defaults`.
184
+ - Implementation guidance: render this content from `dominds/main/llm/defaults.yaml` at runtime
185
+ (or via a shared helper) rather than copy/pasting a static block into code, so it won’t drift.
186
+ - `!mcp`:
187
+ - Explain `.minds/mcp.yaml` as the source of dynamic MCP toolsets.
188
+ - Explain how MCP servers map to toolsets (`<serverId>`) and how those toolsets are granted via
189
+ `.minds/team.yaml`.
190
+ - Explain tool exposure controls (whitelist/blacklist) and naming transforms (prefix/suffix).
191
+ - Explain secret/env wiring patterns and operational troubleshooting (Problems + logs, restart,
192
+ hot reload semantics).
193
+
194
+ ## Dynamic Loading from the Dominds Installation (Runtime Resources)
195
+
196
+ Where appropriate, the manual should **dynamically load** its “reference” content from the running
197
+ `dominds` installation (i.e. the files and registries shipped with the installed backend), rather
198
+ than duplicating that content in:
199
+
200
+ - `.minds/*` (rtws state), or
201
+ - docs, or
202
+ - hardcoded strings inside tool implementations.
203
+
204
+ This keeps the manual accurate when the framework changes, and avoids documentation drift.
205
+
206
+ Recommended sources by topic:
207
+
208
+ - `team_mgmt_manual({ "topics": ["llm", "builtin-defaults"] })`
209
+ - Load from the same installation resource the runtime uses for defaults:
210
+ `dominds/main/llm/defaults.yaml` (via `__dirname` resolution in the backend build output).
211
+ - Prefer reusing `LlmConfig.load()` and formatting its merged view, or adding a helper that returns
212
+ both “defaults-only” and “merged” provider maps.
213
+ - `team_mgmt_manual({ "topics": ["toolsets"] })` (if added)
214
+ - Load from the in-memory registries at runtime (`listToolsets()` / `listTools()` in
215
+ `dominds/main/tools/registry.ts`), rather than maintaining a separate list.
216
+
217
+ Keep these as **static/manual text** (not dynamically loaded):
218
+
219
+ - High-level explanations, best practices, and “why” sections.
220
+ - Schema summaries (e.g. the member field table). These can be authored as a stable contract and
221
+ validated in code reviews; runtime introspection of TypeScript types is not reliable post-build.
222
+
223
+ ## Managing `.minds/llm.yaml`
224
+
225
+ ### What it does
226
+
227
+ `dominds` loads built-in provider definitions from `dominds/main/llm/defaults.yaml` and then merges
228
+ in rtws overrides from `.minds/llm.yaml` (rtws keys override defaults). See:
229
+
230
+ - `dominds/main/llm/client.ts` (`LlmConfig.load()`)
231
+ - `dominds/main/llm/defaults.yaml` (builtin provider catalog)
232
+
233
+ ### File format (template)
234
+
235
+ `.minds/llm.yaml` must contain a `providers` object. Each provider is keyed by a short identifier
236
+ used in `.minds/team.yaml` member configurations.
237
+
238
+ `apiType` notes (common values):
239
+
240
+ - `openai`: uses the OpenAI **Responses API** (best for OpenAI official endpoints; requires a `/v1`-style `responses` endpoint)
241
+ - `openai-compatible`: uses the OpenAI **Chat Completions API** (best for most “OpenAI-compatible” third-party/proxy endpoints; e.g. Volcano Engine Ark `.../api/v3`)
242
+ - **Vision support**: if the provider/model supports multimodal Chat Completions, Dominds will pass tool-output images (`func_result_msg.contentItems[].type=input_image`, e.g. from MCP tools) to the model as `image_url` inputs after reading the persisted artifact; unsupported mime types are downgraded to text.
243
+
244
+ ```yaml
245
+ providers:
246
+ openai:
247
+ name: OpenAI
248
+ apiType: openai
249
+ baseUrl: https://api.openai.com/v1
250
+ apiKeyEnvVar: OPENAI_API_KEY
251
+ tech_spec_url: https://platform.openai.com/docs
252
+ api_mgmt_url: https://platform.openai.com/api-keys
253
+ models:
254
+ gpt-5.2:
255
+ name: GPT-5.2
256
+ context_length: 272000
257
+ input_length: 272000
258
+ output_length: 32768
259
+ context_window: 272K
260
+ ```
261
+
262
+ Best practices:
263
+
264
+ - Store **no secrets** in `.minds/llm.yaml`. Use `apiKeyEnvVar` and environment variables.
265
+ - Add only providers you truly need. Most setups should rely on `defaults.yaml`.
266
+ - Keep model keys stable; they become the `model` values used in `.minds/team.yaml`.
267
+
268
+ ## Managing `.minds/mcp.yaml` (MCP Servers)
269
+
270
+ ### What it does
271
+
272
+ `.minds/mcp.yaml` configures MCP (Model Context Protocol) servers as a first-class tool source.
273
+ Each configured server registers a Dominds **toolset** named `<serverId>` and a set of tools
274
+ under that toolset.
275
+
276
+ This file is **hot-reloaded** at runtime (no server restart required). If the file is absent, MCP
277
+ support is disabled (no dynamic MCP toolsets are registered).
278
+
279
+ Reference specs:
280
+
281
+ - MCP behavior and semantics: [`mcp-support.md`](./mcp-support.md)
282
+
283
+ ### Mapping: server → toolset (and granting it)
284
+
285
+ - Server ID `sdk_http` registers toolset `sdk_http`.
286
+ - To allow a teammate to use the MCP tools, grant the toolset in `.minds/team.yaml`:
287
+
288
+ ```yaml
289
+ members:
290
+ alice:
291
+ toolsets:
292
+ - ws_read
293
+ - sdk_http
294
+ ```
295
+
296
+ Notes:
297
+
298
+ - MCP tool names are global across all toolsets (built-in + MCP). Collisions cause tools to be
299
+ skipped and should surface via Problems + logs.
300
+ - `mcp_admin` is a built-in toolset that contains `mcp_restart` (best-effort per-server restart).
301
+
302
+ ### File format (template)
303
+
304
+ ```yaml
305
+ version: 1
306
+ servers:
307
+ <serverId>:
308
+ # Transport: stdio
309
+ transport: stdio
310
+ command: npx
311
+ args: ['-y', '@playwright/mcp@latest']
312
+ env: {}
313
+
314
+ # Transport: streamable_http
315
+ # transport: streamable_http
316
+ # url: http://127.0.0.1:3000/mcp
317
+ # headers: {}
318
+ # sessionId: '' # optional
319
+
320
+ # Tool exposure controls
321
+ tools:
322
+ whitelist: [] # optional
323
+ blacklist: [] # optional
324
+
325
+ # Tool name transforms
326
+ transform: [] # optional
327
+ ```
328
+
329
+ ### Tool exposure controls (whitelist / blacklist)
330
+
331
+ Use `tools.whitelist` / `tools.blacklist` to reduce the exposed tool surface and avoid UI clutter.
332
+ Patterns use `*` wildcards and apply to the **original MCP tool name** (before transforms), so
333
+ filters remain stable even if naming transforms change later.
334
+
335
+ ### Naming transforms (prefix / suffix)
336
+
337
+ MCP servers often export short/common tool names (`open`, `search`, `list`, …). Use transforms to
338
+ avoid global collisions and make tool names recognizable:
339
+
340
+ ```yaml
341
+ transform:
342
+ - prefix: 'playwright_'
343
+ - suffix: '_mcp'
344
+ ```
345
+
346
+ ### Env and headers wiring
347
+
348
+ Prefer copying from the host environment for secrets:
349
+
350
+ ```yaml
351
+ env:
352
+ MCP_TOKEN:
353
+ env: MY_LOCAL_MCP_TOKEN
354
+ ```
355
+
356
+ For `streamable_http`, `headers` supports the same literal-or-env mapping.
357
+
358
+ ### Operational behavior (hot reload + last-known-good)
359
+
360
+ - Config edits should apply without restart.
361
+ - If a server update fails (spawn/connect/schema/name collision/etc.), the system should keep that
362
+ server’s **last-known-good** toolset registered and surface a Problem describing the failure.
363
+ - Deleting `.minds/mcp.yaml` should unregister all MCP-derived toolsets/tools and auto-clear related
364
+ MCP Problems.
365
+
366
+ ## Managing `.minds/team.yaml`
367
+
368
+ ### What it does
369
+
370
+ `.minds/team.yaml` defines:
371
+
372
+ - The team roster (`members`).
373
+ - Defaults applied to all members (`member_defaults`).
374
+ - Tool availability (`toolsets` / `tools`).
375
+ - Directory access control for rtws file tools (`read_dirs`, `write_dirs`, `no_*`).
376
+
377
+ The file is loaded by `Team.load()` in `dominds/main/team.ts`. If the file is absent, the runtime
378
+ bootstraps a default team (today it creates shadow members `fuxi` + `pangu`).
379
+
380
+ ### File format (template)
381
+
382
+ ```yaml
383
+ member_defaults:
384
+ provider: codex
385
+ model: gpt-5.2
386
+ toolsets:
387
+ - ws_read
388
+ - memory
389
+ # Default posture: deny `.minds/` edits for normal members.
390
+ # (Team management should be done via `team-mgmt` tools, not general file tools.)
391
+ no_read_dirs:
392
+ - .minds/team.yaml
393
+ - .minds/llm.yaml
394
+ - .minds/mcp.yaml
395
+ - .minds/team/**
396
+ no_write_dirs:
397
+ - .minds/**
398
+
399
+ default_responder: fuxi
400
+
401
+ members:
402
+ # Example visible teammate (recommended): define at least one non-hidden responder for daily work.
403
+ dev:
404
+ name: Dev
405
+ icon: '🧑‍💻'
406
+ toolsets:
407
+ - ws_mod
408
+ - os
409
+ streaming: true
410
+ ```
411
+
412
+ Important notes:
413
+
414
+ - `member_defaults.provider` and `member_defaults.model` are required (see validation in
415
+ `dominds/main/team.ts` and server error messages in `dominds/main/server/api-routes.ts`).
416
+ - Member objects use **prototype fallback** to `member_defaults` (see `Object.setPrototypeOf` in
417
+ `dominds/main/team.ts`). Omitted properties inherit defaults automatically.
418
+ - Directory patterns are evaluated by `matchesPattern()` in `dominds/main/access-control.ts`:
419
+ - Patterns behave like “directory scopes”, and support `*` and `**`.
420
+ - Deny-lists (`no_*`) are checked before allow-lists (`*_dirs`).
421
+
422
+ Best practices:
423
+
424
+ - Make `member_defaults` conservative. Grant additional tools/dirs on a per-member basis.
425
+ - Prefer toolsets over individually enumerating tools unless you need a one-off tool.
426
+ - Keep `.minds/team.yaml` ownership tight; only the team manager should be able to edit it.
427
+ - Avoid repeating built-in constraints in `team.yaml`:
428
+ - `*.tsk/**` (encapsulated Taskdocs) are hard-denied for all general file tools.
429
+ - `.minds/**` is hard-denied for general file tools; only the dedicated `team-mgmt` toolset can access it.
430
+ Put these in `no_*` only when you need extra explicitness; they are enforced regardless.
431
+
432
+ ## Managing `.minds/team/<member>/*.md` (agent minds)
433
+
434
+ The runtime reads these on every dialog start:
435
+
436
+ - `.minds/team/<id>/persona.md`
437
+ - `.minds/team/<id>/knowledge.md`
438
+ - `.minds/team/<id>/lessons.md`
439
+
440
+ See `dominds/main/minds/load.ts` (`readAgentMind()`).
441
+
442
+ Suggested structure:
443
+
444
+ ```
445
+ .minds/
446
+ team.yaml
447
+ llm.yaml
448
+ team/
449
+ fuxi/
450
+ persona.md
451
+ knowledge.md
452
+ lessons.md
453
+ pangu/
454
+ persona.md
455
+ knowledge.md
456
+ lessons.md
457
+ ```
458
+
459
+ ## Bootstrap Policy: Shadow bootstrap members
460
+
461
+ Preferred behavior for initial bootstrap:
462
+
463
+ - The shadow `fuxi` instance should get `team-mgmt` (and the manual tool), not broad `ws_mod`.
464
+ - The shadow `pangu` instance should get broad rtws toolsets (e.g. `ws_read`, `ws_mod`, `os`), but not `team-mgmt`.
465
+ - After `.minds/team.yaml` is created, the team definition becomes the source of truth.
466
+
467
+ This avoids needing to grant full rtws access to configure the team.
468
+
469
+ ## Troubleshooting
470
+
471
+ - **“Missing required provider/model”**: Ensure `.minds/team.yaml` has `member_defaults.provider` and
472
+ `member_defaults.model`.
473
+ - **Provider not found**: Ensure `.minds/team.yaml` `provider` keys exist in merged provider config
474
+ (`dominds/main/llm/defaults.yaml` + `.minds/llm.yaml`).
475
+ - **Access denied when editing `.minds/`**: Intended for general file tools; use `team-mgmt` tools.
476
+ - **MCP tools not visible in Tools view**:
477
+ - Confirm `.minds/mcp.yaml` exists and is valid.
478
+ - Open **Problems** and look for MCP-related errors.
479
+ - Confirm the teammate is granted the relevant `<serverId>` toolset in `.minds/team.yaml`.
480
+ - **MCP server keeps failing to (re)load**:
481
+ - Check Problems details (missing env var, invalid tool name, collisions, connection errors).
482
+ - After fixing config, use `mcp_restart` (from `mcp_admin`) for a best-effort per-server restart.