@team-ai/teamai-cli 0.40.9 → 0.50.0

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 (163) hide show
  1. package/CHANGELOG.md +167 -11
  2. package/README.ja.md +32 -29
  3. package/README.ko.md +32 -29
  4. package/README.md +32 -29
  5. package/README.th.md +32 -29
  6. package/README.zh-CN.md +32 -29
  7. package/agents/README.md +68 -0
  8. package/agents/README.zh-CN.md +68 -0
  9. package/agents/teamai-recall.md +10 -9
  10. package/dist/cli.js +210551 -136899
  11. package/dist/index.js +291 -0
  12. package/dist/runtime-paseo.js +27562 -0
  13. package/dist/runtime-sandbox.js +94740 -0
  14. package/dist/runtime-t3.js +41891 -0
  15. package/drivers/teamai-claude.yaml +6 -0
  16. package/drivers/teamai-codex.yaml +6 -0
  17. package/drivers/teamai-local.yaml +5 -0
  18. package/drivers/teamai-opencode.yaml +6 -0
  19. package/drivers/teamai-paseo.yaml +6 -0
  20. package/drivers/teamai-sandbox.yaml +7 -0
  21. package/drivers/teamai-t3.yaml +8 -0
  22. package/hooks/teamai-env-hint/HOOK.yaml +1 -0
  23. package/hooks/teamai-env-hint/README.md +80 -0
  24. package/hooks/teamai-env-hint/README.zh-CN.md +80 -0
  25. package/hooks/teamai-env-hint/exec.md +1 -0
  26. package/hooks/teamai-env-hint/secrets-rule.md +1 -0
  27. package/hooks/teamai-env-hint/secrets.md +1 -0
  28. package/hooks/teamai-env-hint/variables.md +1 -0
  29. package/hooks/teamai-friction-reminder/HOOK.yaml +1 -0
  30. package/hooks/teamai-friction-reminder/README.md +117 -0
  31. package/hooks/teamai-friction-reminder/README.zh-CN.md +117 -0
  32. package/hooks/teamai-friction-reminder/action-gap.md +1 -0
  33. package/hooks/teamai-friction-reminder/action-gap.zh.md +1 -0
  34. package/hooks/teamai-friction-reminder/action-share-learnings.md +1 -0
  35. package/hooks/teamai-friction-reminder/action-share-learnings.zh.md +1 -0
  36. package/hooks/teamai-friction-reminder/action.md +1 -0
  37. package/hooks/teamai-friction-reminder/action.zh.md +1 -0
  38. package/hooks/teamai-friction-reminder/gap-reasons.md +1 -0
  39. package/hooks/teamai-friction-reminder/gap-reasons.zh.md +1 -0
  40. package/hooks/teamai-friction-reminder/gap.md +1 -0
  41. package/hooks/teamai-friction-reminder/gap.zh.md +1 -0
  42. package/hooks/teamai-friction-reminder/params.yaml +12 -0
  43. package/hooks/teamai-friction-reminder/problem-reasons.md +1 -0
  44. package/hooks/teamai-friction-reminder/problem-reasons.zh.md +1 -0
  45. package/hooks/teamai-friction-reminder/problem.md +1 -0
  46. package/hooks/teamai-friction-reminder/problem.zh.md +1 -0
  47. package/hooks/teamai-friction-reminder/reason-correction.md +1 -0
  48. package/hooks/teamai-friction-reminder/reason-correction.zh.md +1 -0
  49. package/hooks/teamai-friction-reminder/reason-interrupt.md +1 -0
  50. package/hooks/teamai-friction-reminder/reason-interrupt.zh.md +1 -0
  51. package/hooks/teamai-friction-reminder/reason-tool-error.md +1 -0
  52. package/hooks/teamai-friction-reminder/reason-tool-error.zh.md +1 -0
  53. package/hooks/teamai-friction-reminder/reason-tool-reject.md +1 -0
  54. package/hooks/teamai-friction-reminder/reason-tool-reject.zh.md +1 -0
  55. package/hooks/teamai-friction-reminder/task.md +1 -0
  56. package/hooks/teamai-friction-reminder/task.zh.md +1 -0
  57. package/hooks/teamai-mr-hint/HOOK.yaml +1 -0
  58. package/hooks/teamai-mr-hint/README.md +81 -0
  59. package/hooks/teamai-mr-hint/README.zh-CN.md +81 -0
  60. package/hooks/teamai-mr-hint/offer-command.en.md +7 -0
  61. package/hooks/teamai-mr-hint/offer-command.md +10 -0
  62. package/hooks/teamai-mr-hint/offer-workflow.en.md +7 -0
  63. package/hooks/teamai-mr-hint/offer-workflow.md +10 -0
  64. package/hooks/teamai-mr-hint/params.yaml +2 -0
  65. package/hooks/teamai-package-hint/HOOK.yaml +1 -0
  66. package/hooks/teamai-package-hint/README.md +64 -0
  67. package/hooks/teamai-package-hint/README.zh-CN.md +64 -0
  68. package/hooks/teamai-package-hint/message.md +3 -0
  69. package/hooks/teamai-todowrite-hint/HOOK.yaml +1 -0
  70. package/hooks/teamai-todowrite-hint/README.md +68 -0
  71. package/hooks/teamai-todowrite-hint/README.zh-CN.md +68 -0
  72. package/hooks/teamai-todowrite-hint/message.en.md +6 -0
  73. package/hooks/teamai-todowrite-hint/message.md +9 -0
  74. package/package.json +41 -14
  75. package/rules/teamai-recall/README.md +78 -0
  76. package/rules/teamai-recall/README.zh-CN.md +78 -0
  77. package/rules/teamai-recall/RULE.en.md +36 -0
  78. package/rules/teamai-recall/RULE.md +43 -0
  79. package/rules/teamai-recall/block-direct.md +27 -0
  80. package/rules/teamai-recall/block.en.md +42 -0
  81. package/rules/teamai-recall/block.md +44 -0
  82. package/runtimes/teamai-paseo.yaml +5 -0
  83. package/runtimes/teamai-sandbox.yaml +3 -0
  84. package/runtimes/teamai-t3.yaml +5 -0
  85. package/sandboxes/teamai-bwrap.yaml +2 -0
  86. package/sandboxes/teamai-default.yaml +4 -0
  87. package/sandboxes/teamai-docker.yaml +5 -0
  88. package/sandboxes/teamai-podman.yaml +4 -0
  89. package/sandboxes/teamai-sbx.yaml +4 -0
  90. package/sandboxes/teamai-seatbelt.yaml +2 -0
  91. package/sandboxes/teamai-vercel.yaml +4 -0
  92. package/scorers/README.md +103 -0
  93. package/scorers/README.zh-CN.md +103 -0
  94. package/scorers/teamai-adoption.md +11 -0
  95. package/scorers/teamai-correctness.md +17 -0
  96. package/scorers/teamai-routing.md +11 -0
  97. package/skill-data/core/SKILL.md +4 -3
  98. package/skill-data/core/references/commands.md +300 -67
  99. package/skill-data/core/references/contribute-member.md +4 -4
  100. package/skill-data/core/references/troubleshooting.md +128 -18
  101. package/skill-data/setup/references/join-member.md +13 -9
  102. package/skill-data/setup/references/manage-admin.md +41 -17
  103. package/skill-data/setup/references/setup-admin.md +2 -2
  104. package/skill-data/setup/references/uninstall.md +30 -9
  105. package/skill-data/share/SKILL.md +17 -12
  106. package/skill-data/share/references/doc-template.md +3 -4
  107. package/skill-data/wiki/SKILL.md +1 -1
  108. package/skill-data/wiki/references/agents/graph-rag-agent.md +5 -1
  109. package/skill-data/workflow/SKILL.md +39 -16
  110. package/skill-data/workflow/references/fleet.md +13 -0
  111. package/skill-data/workflow/references/judging.md +17 -10
  112. package/skill-data/workflow/references/places.md +64 -7
  113. package/skill-data/workflow/references/sandbox.md +3 -3
  114. package/skill-data/workflow/references/session-hosts.md +27 -0
  115. package/skill-data/workflow-local/SKILL.md +4 -3
  116. package/skill-data/workflow-local/references/ci.md +1 -1
  117. package/skills/teamai/SKILL.md +4 -3
  118. package/workflows/README.md +103 -0
  119. package/workflows/README.zh-CN.md +103 -0
  120. package/workflows/teamai-benchmark.yaml +78 -0
  121. package/workflows/teamai-ci-extract-mr.yaml +66 -0
  122. package/workflows/teamai-codebase-deep-enrich/README.md +123 -0
  123. package/workflows/teamai-codebase-deep-enrich/README.zh-CN.md +123 -0
  124. package/workflows/teamai-codebase-deep-enrich/WORKFLOW.yaml +119 -0
  125. package/workflows/teamai-codebase-deep-enrich/architecture.md +30 -0
  126. package/workflows/teamai-codebase-deep-enrich/component.md +30 -0
  127. package/workflows/teamai-codebase-deep-enrich/params.yaml +1 -0
  128. package/workflows/teamai-codebase-deep-enrich/scenarios.md +32 -0
  129. package/workflows/teamai-codebase-enrich.yaml +98 -0
  130. package/workflows/teamai-draft-learning-updates/README.md +116 -0
  131. package/workflows/teamai-draft-learning-updates/README.zh-CN.md +116 -0
  132. package/workflows/teamai-draft-learning-updates/WORKFLOW.yaml +61 -0
  133. package/workflows/teamai-draft-learning-updates/params.yaml +4 -0
  134. package/workflows/teamai-finished-sessions/README.md +101 -0
  135. package/workflows/teamai-finished-sessions/README.zh-CN.md +101 -0
  136. package/workflows/teamai-finished-sessions/WORKFLOW.yaml +43 -0
  137. package/workflows/teamai-finished-sessions/params.yaml +1 -0
  138. package/workflows/teamai-import-from-iwiki.yaml +90 -0
  139. package/workflows/teamai-import-from-mr/README.md +104 -0
  140. package/workflows/teamai-import-from-mr/README.zh-CN.md +104 -0
  141. package/workflows/teamai-import-from-mr/WORKFLOW.yaml +94 -0
  142. package/workflows/teamai-import-from-mr/draft.en.md +48 -0
  143. package/workflows/teamai-import-from-mr/draft.zh.md +48 -0
  144. package/workflows/teamai-import-from-repo/README.md +106 -0
  145. package/workflows/teamai-import-from-repo/README.zh-CN.md +106 -0
  146. package/workflows/teamai-import-from-repo/WORKFLOW.yaml +109 -0
  147. package/workflows/teamai-import-from-repo/narrative.md +83 -0
  148. package/workflows/teamai-import-learnings.yaml +83 -0
  149. package/workflows/teamai-import-rules.yaml +34 -0
  150. package/workflows/teamai-new-scorer.yaml +54 -0
  151. package/workflows/teamai-promote-learning/README.md +122 -0
  152. package/workflows/teamai-promote-learning/README.zh-CN.md +122 -0
  153. package/workflows/teamai-promote-learning/WORKFLOW.yaml +102 -0
  154. package/workflows/teamai-promote-learning/params.yaml +4 -0
  155. package/workflows/teamai-score.yaml +121 -0
  156. package/workflows/teamai-self-improvement.yaml +37 -0
  157. package/workflows/teamai-session-to-task.yaml +69 -0
  158. package/workflows/teamai-sessions-to-tasks.yaml +62 -0
  159. package/workflows/teamai-share-learnings-from-sessions.yaml +36 -0
  160. package/workflows/teamai-share-learnings.yaml +25 -0
  161. package/workflows/teamai-share-session.yaml +21 -0
  162. package/workflows/teamai-try-scorer.yaml +32 -0
  163. package/skill-data/workflow/references/hosts.md +0 -27
@@ -17,7 +17,7 @@ thing now.
17
17
 
18
18
  - **A learning** (a lesson, a gotcha, how you solved something) → this is
19
19
  **automatic** once recall is on (off by default) and the teamai config loads: TeamAI prompts at the end of a session worth sharing and
20
- offers the `session-close` workflow, whose learning step runs the `share` skill
20
+ offers the `teamai-share-learnings` workflow, whose learning step runs the `share` skill
21
21
  (`teamai skill get share`) to summarize the session before `teamai contribute`. The user does not come through this flow
22
22
  for it. (Step A below is only a manual fallback for while recall is off.)
23
23
  - **A reusable skill** (a `SKILL.md` others invoke) → author the skill, then
@@ -117,7 +117,7 @@ The doc lands in the team's `learnings/` and appears for teammates on their next
117
117
  to reset a team-repo clone with user changes, so commit or stash unrelated
118
118
  modified, staged, untracked, or conflicted files before retrying.
119
119
 
120
- In single-repo mode, a skill or rule under `.teamai/` that matches an older
120
+ In self mode, a skill or rule under `.teamai/` that matches an older
121
121
  version of the team's file, as it does when the branch is behind the default
122
122
  branch, is skipped with a warning that it "is an older version of" that file:
123
123
  pushing it would revert a teammate's update. To publish an edit of it, bring
@@ -138,7 +138,7 @@ The doc lands in the team's `learnings/` and appears for teammates on their next
138
138
  Before listing rules, `push` refreshes copies whose bodies still match a recorded
139
139
  sync revision. The header teamai generates for a tool's own rules format
140
140
  (Cursor `.mdc`, JoyCode's own `.mdc`, Copilot `applyTo`, Kiro `inclusion`, Qoder
141
- `trigger`, Trae `globs`/`alwaysApply`, CodeBuddy and WorkBuddy `alwaysApply`, Oh My Pi `alwaysApply`/`globs`) does not count as a local edit: unedited old copies update in that
141
+ `trigger`, Trae `globs`/`alwaysApply`, CodeBuddy and WorkBuddy `alwaysApply`, Oh My Pi `alwaysApply`/`globs`, Antigravity `trigger`) does not count as a local edit: unedited old copies update in that
142
142
  format, including under `COPILOT_HOME` in user scope. Genuine local body edits remain push candidates.
143
143
  Rule pre-sync leaves tools excluded by `enabledAgents` or `disabledAgents` untouched.
144
144
  When only team `paths` change, `applyTo` refreshes if the local file still matches
@@ -155,7 +155,7 @@ team repo, then run `teamai pull`. Doctor also reports team-owned OpenCode globs
155
155
  or inline blocks left after the last rule is removed.
156
156
 
157
157
  A new file in the rules directory of a tool with a rules format of its own
158
- (Cursor, JoyCode, Copilot, Kiro, Qoder, Trae, CodeBuddy, WorkBuddy, Oh My Pi) is the
158
+ (Cursor, JoyCode, Copilot, Kiro, Qoder, Trae, CodeBuddy, WorkBuddy, Oh My Pi, Antigravity) is the
159
159
  member's own rule in that tool's format: push never offers it, and pull leaves
160
160
  it. To author a new team rule, write it as a plain `.md` in `.claude/rules/`
161
161
  (scope it with `paths:` frontmatter, which teamai renders into each tool's
@@ -26,6 +26,15 @@ the same lock reclaims it, and a process exiting normally removes the locks it
26
26
  still holds. `teamai doctor` reports leftover lock files, and
27
27
  `teamai doctor --fix` removes the ones whose owner is provably dead.
28
28
 
29
+ `teamai/<run>/…` branches are left by failed or cancelled workflow runs, or by a
30
+ succeeded run that could not delete one. `teamai doctor --fix` removes them once
31
+ `workflows.retention` (default `14d`) has passed since the run settled, and keeps
32
+ pull request branches. Do not delete them by hand while the run may be retried.
33
+
34
+ ## "Skipped role-required skill namespaces"
35
+
36
+ The team lists these namespaces in `sharing.skills.roleRequiredNamespaces`, and the effective roles do not receive them. Run `teamai roles list`, select a role with `teamai roles set <role>`, then `teamai pull`. When the team assigns roles through `manifest/members.yaml`, ask the team to change that assignment instead. Tags and projects do not bypass the condition. Do not select a role for the member without their choice.
37
+
29
38
  ## "My skills / rules aren't showing up"
30
39
 
31
40
  This is the #1 onboarding issue. In order:
@@ -54,13 +63,13 @@ This is the #1 onboarding issue. In order:
54
63
  With `sharing.gitExclude` on, Codex's team hooks run from `~/.codex/hooks.json`
55
64
  instead (one `hook-dispatch <Event> --tool codex --team-hooks` entry per event)
56
65
  while the project's `.codex/hooks.json` is tracked or holds entries of its own,
57
- and always in single-repo mode.
66
+ and always in self mode.
58
67
  Existing Claude/Codex main-checkout hook files count as installed targets
59
68
  even when HOME and current worktree tool roots are missing. Injection and
60
69
  pull update team hooks and restore HOME built-ins; removal clears managed
61
70
  main-checkout hooks without recreating HOME roots.
62
71
  If Git-hook installation fails after writing agent hooks, `hooks inject`,
63
- `init` and self-repo bootstrap still attempt Codex trust. Injection preserves
72
+ `init` and self-mode bootstrap still attempt Codex trust. Injection preserves
64
73
  the installation error without reporting overall success. Init reports the
65
74
  error and retains exit code 1 while completing local setup, including HTTP
66
75
  initialization. Bootstrap records the error in the debug log and continues
@@ -75,7 +84,7 @@ This is the #1 onboarding issue. In order:
75
84
  then retry removal.
76
85
  If you initialized workspace scope but expected machine-wide resources, re-run
77
86
  with `--scope user`.
78
- 5. **Tool has no hook surface** (e.g. Gemini CLI, JoyCode): there is no auto-sync;
87
+ 5. **Tool has no hook surface** (e.g. Gemini CLI): there is no auto-sync;
79
88
  run `teamai pull` manually each time.
80
89
  6. **Claude Code or Codex reads a different directory** (`CLAUDE_CONFIG_DIR` or
81
90
  `CODEX_HOME` is set). `teamai doctor` reports `Claude Code root matches
@@ -84,7 +93,10 @@ This is the #1 onboarding issue. In order:
84
93
  `teamai init` from a shell that has the variable exported; it records the root
85
94
  and moves the install. If the check says the value cannot be synced to (outside
86
95
  your home, or neither a plain directory in it nor one under `.config/`), fix the
87
- variable first. `<tool> home matches <variable>` (`XDG_CONFIG_HOME`,
96
+ variable first. `Claude Code root exists` / `Codex root exists` fails when the
97
+ recorded root is gone; pull skips the tool and a workflow step does not start it
98
+ until you re-run `teamai init` with the variable set to the root it uses, or blank
99
+ to clear the record. `<tool> home matches <variable>` (`XDG_CONFIG_HOME`,
88
100
  `HERMES_HOME`, `COPILOT_HOME`, ...) is the same check for the homes recorded in
89
101
  `~/.teamai/tool-homes.json`, and `<tool> home exists` fails when a recorded home
90
102
  is gone; re-run `teamai init` from the shell with the variable you want.
@@ -118,6 +130,15 @@ This is the #1 onboarding issue. In order:
118
130
  reports it as `tool homes record is readable`. Fix the entry the reason
119
131
  names (each home must be an absolute directory), or delete the file and
120
132
  re-run `teamai init` from a shell your tools run in.
133
+ 9. **The files are there, but the tool has not trusted the project.**
134
+ `teamai doctor` reports `<Tool> trusts this project, so it loads its team
135
+ <resource>` or `<Tool> approves this project's team MCP servers` and names
136
+ the tool's own file. `⚠` means the tool has not asked yet: it asks when the
137
+ user opens it in the project, and doctor still passes, so nothing is needed
138
+ for a tool the user does not use here. `✖` means a no (a rejection, a
139
+ setting that turns it off) or an answer teamai cannot read: follow the fix.
140
+ On a machine that only runs the tool headless, add the entry the fix names.
141
+ Do not edit a trust file for the user without asking.
121
142
 
122
143
  ## Path names appear in skill usage statistics
123
144
 
@@ -204,11 +225,59 @@ held, or a git error, relay the fix the line gives.
204
225
 
205
226
  For new HTTP local-agent MCP installs, a failed initial ownership-manifest write leaves the MCP config and Git exclusions unchanged. Retry the install after fixing the manifest write error. A bare Copilot entry beside `mcpServers` is removed only with a matching ownership record proving a completed bare write. Older records without that evidence preserve the bare entry. A bare ownership record cannot claim a same-named member entry under `mcpServers`: updates skip the collision, and removal leaves that keyed entry alone. An unmarked Copilot record needs a matching keyed hash that does not also match the bare entry. Completed writes record `bare: true` or `bare: false`; missing placement remains unproven, including after a failed placement-record write. Existing JSON MCP updates keep the old ownership until the config write completes; a later manifest failure restores the config. `uninstall_mcp` keeps ownership if reading or writing the config fails, and restores the entry if removing its manifest record fails. MCP reconcile also restores all configs written before an ownership-save failure. If restoration fails too, repair the named configs and ownership records before retrying; the error reports both failures, and configs still carrying credentials stay excluded from Git.
206
227
 
228
+ ## "<dir>/ is a <type> folder, which this teamai cannot read yet; it was skipped"
229
+
230
+ An older teamai's `pull`, `status`, `doctor` and `review --branch` print one
231
+ such line per directory that holds a folder marker of a type it cannot read,
232
+ such as `AGENT.md` under `agents/` or `SCORER.md` under `scorers/`. This
233
+ release reads every folder type. Nothing in the directory is
234
+ delivered, run or pushed; the rest of the team repo is. A hook-started pull writes it to
235
+ `~/.teamai/debug.log`.
236
+
237
+ ```console
238
+ $ teamai pull
239
+ ⚠ agents/reviewer/ is an agent folder, which this teamai cannot read yet; it was skipped. Run teamai update.
240
+ ```
241
+
242
+ - The team means it as a folder: tell the user to run `teamai update`, then
243
+ `teamai pull`.
244
+ - The file is an old resource that only happens to carry the name: the team
245
+ renames it with `git mv`. Do not rename it for them.
246
+ - Only the exact name counts: `rule.md` or `workflow.yaml` is read as before.
247
+
248
+ ## "rules/<dir>/ holds RULE.md, so it is one folder, and <file> in it is one of its files, no longer read on its own"
249
+
250
+ `pull` prints this once, when `rules/<dir>/` gains a `RULE.md` and pull removes
251
+ the copy of `<file>` it delivered before as a rule of its own. The
252
+ file is now part of the rule `<dir>`, delivered with the folder. A folder that
253
+ was always a folder pulls without it, and its language variants (`RULE.zh.md`)
254
+ are never named. `review --branch` names every such file.
255
+
256
+ - The team meant it as part of the folder, such as a `checklist.md` the rule
257
+ names through `${TEAMAI_RULE_DIR}`: nothing to do.
258
+ - A file used to be a rule of its own, such as `rules/onboarding/db.md` beside
259
+ an old `rules/onboarding/RULE.md` that arrived as `onboarding/RULE`: the team
260
+ renames `RULE.md` (`git mv rules/onboarding/RULE.md rules/onboarding/overview.md`)
261
+ or moves the file out of the folder. Do not do it for them.
262
+
263
+ ## "agents/<dir>/ holds AGENT.md, so it is one folder, and <file> in it is one of its files, no longer read on its own"
264
+
265
+ `pull` prints this once, when the namespace `agents/<dir>/` gains an
266
+ `AGENT.md` and pull removes the copy it delivered before of an agent the
267
+ namespace held. `<dir>` is now one agent, and `<file>` is one of its files. A
268
+ copy the member changed stays, named in its own line.
269
+
270
+ - The team meant it, such as a `rubric.md` the agent names through
271
+ `${TEAMAI_AGENT_DIR}`: nothing to do.
272
+ - The namespace's agents should stay agents: the team moves `AGENT.md` into a
273
+ folder of its own (`git mv agents/<dir>/AGENT.md agents/<dir>/<name>/AGENT.md`).
274
+ Do not do it for them.
275
+
207
276
  ## "Workspace child <path> is left out" / "<item> differs between ..."
208
277
 
209
278
  `pull` in a workspace prints these; `teamai doctor` repeats the first.
210
279
 
211
- - **Left out**: that repo uses another team repo, is in single-repo mode, or
280
+ - **Left out**: that repo uses another team repo, is in self mode, or
212
281
  its config cannot be read. The line gives the reason. To include it, run
213
282
  `teamai init <this workspace's team repo>` in it; otherwise it keeps working
214
283
  on its own and nothing needs doing.
@@ -217,6 +286,10 @@ For new HTTP local-agent MCP installs, a failed initial ownership-manifest write
217
286
  installed for it before stays, in the place the workspace's rules give it. Tell the user to make the two copies equal in the team repo or
218
287
  rename one. Each repo still receives its own copy.
219
288
 
289
+ ## `tool_not_accepted`: a team tool's command did not run
290
+
291
+ The step's tool is a team instance (`tools/<name>.yaml` or `tools/<name>/TOOL.yaml` in the team repo) that sets `command`, and no one accepted that file on this machine. An agent cannot accept it: tell the person to run the same `teamai workflow start …` once in their own terminal, read the file it names, and answer `y`. An edit to the file asks again.
292
+
220
293
  ## Permission / access denied
221
294
 
222
295
  `init`, `pull`, or `push` failing with a permission error usually means the user
@@ -288,8 +361,18 @@ Different AI hosts handle the hooks that TeamAI injects differently. When this
288
361
  conversation runs in one of these, proactively walk the user through the extra
289
362
  step — do not assume auto-sync just works.
290
363
 
364
+ ### JoyCode Desktop
365
+
366
+ Review and trust each TeamAI hook in **Settings > Hooks** before it can run.
367
+ Until the hooks are trusted and enabled, run `teamai pull` at the start of each
368
+ session.
369
+
370
+
291
371
  ### Codex
292
372
 
373
+ Codex's `/hooks` list labels team hooks by ID, HTTP agent hooks by slug, built-ins as
374
+ `teamai-<Event>`, and shared team-hook dispatchers as `teamai-team-<Event>`.
375
+
293
376
  Codex runs a non-managed hook only once it is **trusted**. `teamai init`, `pull`
294
377
  and `teamai hooks inject` trust the hooks they write (and, in a project, the main
295
378
  checkout, or the current worktree when Git cannot locate a main checkout) through `codex app-server`.
@@ -320,7 +403,7 @@ Cursor writes hooks to `~/.cursor/hooks.json` and also runs `~/.claude/settings.
320
403
 
321
404
  ### Copilot CLI
322
405
 
323
- Built-in hooks use `$COPILOT_HOME/hooks/teamai.json` (default `~/.copilot/hooks/teamai.json`) for normal project installs. Custom team hooks stay in `.github/hooks/teamai.json`; self mode keeps built-ins there too. The next `init`, `pull`, or `hooks inject` migrates each project’s generated built-ins, preserving unrelated hooks. Self sessions skip the global copy. Otherwise each event runs once among the copies a session loaded (global files under any name, or a legacy project command a running host still holds): the first copy claims the event under `~/.teamai/copilot-hook-claims/` and the others exit. A payload without a `timestamp`, or a claim that cannot be written, runs every loaded copy. A cached copy stops once no enabled JSON file Copilot loads holds its built-in: a global copy checks `$COPILOT_HOME/hooks/`, and a legacy project copy checks that directory and its project’s `.github/hooks/`. Hook dispatch uses the working directory’s project config, including its `builtin.disabled`; `builtin.overrides` timeouts do not apply to the shared file. A custom hooks filename keeps its name in `$COPILOT_HOME/hooks/`. Project uninstall preserves the shared global hooks; `hooks remove` removes the built-ins from every JSON file in `$COPILOT_HOME/hooks/`, including filenames other projects configured.
406
+ Built-in hooks use `$COPILOT_HOME/hooks/teamai.json` (default `~/.copilot/hooks/teamai.json`) for normal project installs. Custom team hooks stay in `.github/hooks/teamai.json`; self mode keeps built-ins there too. The next `init`, `pull`, or `hooks inject` migrates each project’s generated built-ins, preserving unrelated hooks. Self sessions skip the global copy. Otherwise each event runs once among the copies a session loaded (global files under any name, or a legacy project command a running host still holds): the first copy claims the event under `~/.teamai/copilot-hook-claims/` and the others exit. A payload without a `timestamp`, or a claim that cannot be written, runs every loaded copy. A cached copy stops once no enabled JSON file Copilot loads holds its built-in: a global copy checks `$COPILOT_HOME/hooks/`, and a legacy project copy checks that directory and its project’s `.github/hooks/`. Hook dispatch uses the working directory’s project config, including its `builtin.disabled`; `builtin.overrides` timeouts do not apply to the shared file. A custom hooks filename keeps its name in `$COPILOT_HOME/hooks/`. Project uninstall keeps the global hooks while another install on the machine may run Copilot, and removes them with the last one; `hooks remove` removes the built-ins from every JSON file in `$COPILOT_HOME/hooks/`, including filenames other projects configured.
324
407
 
325
408
  Copilot CLI runs a trusted project's `.claude/settings.json` as well as its own `.github/hooks/teamai.json`. `hook-dispatch --tool claude` exits only when `COPILOT_PROJECT_DIR` is set and a valid version-1 hook file without `disableAllHooks`, in the project or global hook directory, has a command containing `--tool copilot`; self mode checks only the project directory. A team hook command written for `claude` exits only when an active version-1 JSON file in `$COPILOT_PROJECT_DIR/.github/hooks/` holds the same command for the same event and matcher, so a hook the project sends only to Claude, or to Copilot for another event or matcher, keeps running. `COPILOT_CLI` is not a signal: Copilot sets it on every subprocess, including a Claude session started from its shell. Copilot does not run `~/.claude/settings.json`. Re-run `teamai pull` or `teamai hooks inject` so an already installed team hook picks up the guard.
326
409
 
@@ -340,39 +423,54 @@ hook entry; if unsure of the exact config, run `teamai doctor` and `teamai hooks
340
423
  to see what should be present, then have them replicate it. Until then, they can
341
424
  sync with a manual `teamai pull`.
342
425
 
343
- Skip this on WorkBuddy 5.7+ with only `~/.workbuddy-ai/`. teamai does not know yet
344
- where 5.7 reads hooks, so it writes none, and `teamai doctor` names them under
426
+ Skip this on WorkBuddy AI (the international edition) with only `~/.workbuddy-ai/`. TeamAI
427
+ does not know yet where it runs hooks from, so it writes none, and `teamai doctor` names them under
345
428
  `workbuddy receives ...`. Do not hand-register a hook there; sync with `teamai pull`.
346
429
 
347
430
  ### Muse Code
348
431
 
349
432
  Hooks go in the `hooks` block of `~/.config/muse/settings.json` (`$XDG_CONFIG_HOME/muse/settings.json` when that is set), which Muse runs in every workspace; a project's `.muse/hooks.json` runs only once the workspace is trusted. Muse starts each hook with an emptied environment, so a variable set only on the command that launched `muse` (such as `TEAMAI_HOOKS_DISABLED=1 muse`) does not reach the hook. The hook command runs `bash -lc`, so export it in `~/.bash_profile` or `~/.profile` instead.
350
433
 
434
+ ### Antigravity
435
+
436
+ The agy CLI, Antigravity 2.0 and Antigravity IDE read hooks only from `~/.gemini/config/hooks.json`, in every workspace, so teamai's are user-wide: one named hook, `teamai`, beside the member's own. Team hooks with `tools: [agy]` run through it and get the Claude Code payload. When the file is not valid JSON, pull leaves it as it is and warns; fix the JSON, then run `teamai hooks inject`. A hook named `hooks` with `teamai hook-dispatch` commands is what a team's own `toolPaths.agy` wrote before agy was built in; the next pull removes those commands.
437
+
351
438
  ### Tools without a writable hook surface
352
439
 
353
- Gemini CLI, JoyCode, and similar tools have no TeamAI-writable hook surface —
440
+ Gemini CLI and similar tools have no TeamAI-writable hook surface —
354
441
  there is no auto-sync. Tell the user to run `teamai pull` manually at the start of
355
442
  each session.
356
443
 
357
444
  ## "A recalled doc got no upvote"
358
445
 
446
+ First run `teamai recall status`: while recall is off for the scope, the hooks
447
+ record no adoption and cast no vote. Recall is off until the team sets
448
+ `sharing.recall.enabled: true`, and a member's `recallEnabled` or
449
+ `TEAMAI_RECALL_DISABLED=1` overrides it.
450
+
359
451
  A recalled doc is upvoted once per session when the session that ran the recall
360
452
  opens it within 24 hours: a file read, a reader command (`cat`, `sed -n`, …), or
361
453
  a search whose output shows its lines. Listing the doc does not count, and
362
- neither does working from the recall subagent's summary alone; only the opt-in
363
- judge (`TEAMAI_UPVOTE_JUDGE=1`) credits that. For Codex, Muse and ZCode it uses the Stop payload's final reply and this session's settled recall log; a Claude transcript is not required. `teamai stats` shows each recent
364
- session's runs, recalled docs and adopted docs. Per agent:
454
+ neither does working from the recall subagent's summary alone; with
455
+ `recall_adoption: true` (team `scorers/scoring.yaml` or the member's
456
+ `scoring` in `config.yaml`), the finished session's adoption question credits
457
+ that instead, once `teamai-score` judges the session. `TEAMAI_UPVOTE_JUDGE=1`
458
+ reads as that member setting and no longer runs a Stop hook judge.
459
+ `teamai stats` shows each recent session's runs, recalled docs and adopted
460
+ docs. Per agent:
365
461
 
366
462
  - **Claude Code, Codex (0.134+), CodeBuddy (2.103.1+), WorkBuddy, Qoder,
367
463
  OpenCode, OMP**: both a recall the main agent runs and one the
368
464
  `teamai-recall` subagent runs are credited when the main agent opens the doc.
369
465
  On OMP the subagent's recall needs the main session's file on disk, so a
370
466
  `--no-session` run credits only the main agent's own recalls.
371
- - **Cursor, Copilot CLI, ZCode, Pi**: only a recall the main agent runs
467
+ - **Cursor, Copilot CLI, ZCode, Pi, JoyCode**: only a recall the main agent runs
372
468
  itself. A subagent's recall is not linked to the main session, and Pi has no
373
469
  TeamAI subagent.
374
- - **OpenClaw, Hermes, Kiro, JoyCode, Trae**: no PostToolUse hook, so recalls never
470
+ - **OpenClaw, Hermes, Kiro, Trae**: no PostToolUse hook, so recalls never
375
471
  vote.
472
+ - **Antigravity**: its PostToolUse carries no tool output, so a recall never
473
+ reaches the recall log and never votes.
376
474
 
377
475
  A read after the session's last Stop is credited at SubagentStop, at Copilot CLI's
378
476
  SessionEnd, or at the next `teamai pull`.
@@ -434,10 +532,10 @@ An HTTP prompt sync that cannot clean retired blocks reports a failed ACK and
434
532
  keeps its previous cache and manifest for the server's retry.
435
533
  OpenClaw HTTP prompts require an existing resolved user workspace, but not an
436
534
  existing `AGENTS.md`: the prompt sync creates that file and preserves personal
437
- text already in it. When the server sends no workspace and `openclaw.json` is
438
- not plain JSON, OpenClaw is skipped and the ACK names that reason; the ACK
439
- fails only when no tool received the prompt. Make the file plain JSON, then
440
- retry.
535
+ text already in it. teamai reads `openclaw.json` as OpenClaw does, comments and
536
+ other JSON5 included. When the server sends no workspace and the file does not
537
+ parse as JSON5 either, OpenClaw is skipped and the ACK names that reason; the
538
+ ACK fails only when no tool received the prompt. Fix the file, then retry.
441
539
 
442
540
  OpenCode registration saves ownership before activating a new config entry.
443
541
  If the state write fails, repair the state directory's permissions and retry
@@ -470,6 +568,8 @@ Doctor checks the serialized rules reply against the user config `hooks.maxOutpu
470
568
 
471
569
  Pi reads `AGENTS.override.md` before `AGENTS.md` in the same directory. In user scope, pull writes rules and instruction blocks into the existing override and strips only TeamAI blocks from the older configured file. Personal text in both files is preserved, including on uninstall. Without an override, the configured user file remains the target.
472
570
 
571
+ Pi reads the override from 0.84.0 (`@earendil-works/pi-coding-agent`). An older Pi, including every `@mariozechner/pi-coding-agent` release, reads only `AGENTS.md` and never sees the team instructions; `doctor` fails `Pi reads the AGENTS.override.md holding the team instructions`. Upgrade Pi (from `@mariozechner/pi-coding-agent`, uninstall that package first, or npm stops on the existing `pi` command), or move the member's text from the override into `AGENTS.md`, delete the override, and run `teamai pull`.
572
+
473
573
  ## A file blocks skill delivery
474
574
 
475
575
  When a file occupies a tool skills directory, doctor fails the directory check even if delivery skipped that tool. Move the file aside and run `teamai pull`. Uninstall keeps the blocking file and cleans the other managed resources.
@@ -487,3 +587,13 @@ A recreated namespace source can be edited directly; the retired flattened copy
487
587
  ## Hermes hooks after moving Node or TeamAI
488
588
 
489
589
  The generated status script and instructions plugin capture the installed Node executable and TeamAI entry. After moving or reinstalling either, run `teamai pull` or `teamai hooks inject`, then restart Hermes.
590
+
591
+ ## Hermes sessions miss the team instructions
592
+
593
+ `doctor` warns "Hermes's last logged session took teamai's instructions section" when Hermes logged that it dropped teamai's plugin section in a session on this machine, whichever project it ran in. The fix line quotes Hermes's reason:
594
+
595
+ - `exceeded the aggregate session budget` or `section-count budget`: other plugins' sections, filled first when their id sorts before `teamai.instructions`, took Hermes's 8,000-character, 32-section budget. Disable a plugin the member does not need (`plugins.disabled` in the Hermes `config.yaml`) or shorten its section.
596
+ - `exceeded max_chars`: that project's team instructions are over 4,000 characters. Run `teamai doctor` in that project; it names what to shorten.
597
+ - Anything else: run `teamai hooks inject`.
598
+
599
+ Then start a new Hermes session. `logs/agent.log` in the Hermes home lists each section and its size.
@@ -97,8 +97,8 @@ teamai init https://<platform>/<org>/<repo> --scope user
97
97
  **Set up all their AI tools by default (global rule 9).** Don't add `--agent` to
98
98
  restrict the install unless the user said to. Omitting it gives a picker — select
99
99
  **every AI tool already installed**. Afterwards, **tell the user (in their
100
- language) which agents will now auto-sync TeamAI**, and note any detected tool that
101
- was skipped and why.
100
+ language) which agents will auto-sync TeamAI**, including any required hook-trust step,
101
+ and note any detected tool that was skipped and why.
102
102
 
103
103
  **Read-only / restricted environments (no Git access):** some sandboxed hosts
104
104
  cannot use Git. If the admin provides an HTTP endpoint + API key instead, use:
@@ -120,7 +120,9 @@ project, not per worktree.
120
120
  **Claude Code or Codex kept in a different directory (`CLAUDE_CONFIG_DIR`,
121
121
  `CODEX_HOME`):** `init` records that directory (as `toolRoots.claude` /
122
122
  `toolRoots.codex` in the local config) and syncs every path of that tool there,
123
- so run `init` from a shell that has the variable exported. Re-running `init` after
123
+ so run `init` from a shell that has the variable exported. A directory outside the
124
+ home directory is recorded only for that tool's sessions: teamai reads them there
125
+ and keeps syncing the tool's other files to its default root, as `init` says. Re-running `init` after
124
126
  changing it moves the install (the old root's hooks and managed MCP servers are
125
127
  removed, and for Claude Code its delivered model credentials; its skills and rules
126
128
  are left and named in the output). To end the relocation, run `init` once with the
@@ -142,8 +144,8 @@ section "Which tools actually get hooks".
142
144
  ## Step 6 — Confirm the skills actually arrived
143
145
 
144
146
  `teamai init` does not copy team skills, rules or MCP. They arrive on the next
145
- session start, or when you run `teamai pull`. A workspace-scope init run without a
146
- terminal and without `--agent` creates no tool directory; that directory appears
147
+ session start when its hook is trusted and enabled, or when you run `teamai pull`.
148
+ A workspace-scope init run without a terminal and without `--agent` creates no tool directory; that directory appears
147
149
  when the user first opens that tool in the project, and that session start pulls.
148
150
  To confirm after a session start or a pull:
149
151
 
@@ -151,9 +153,11 @@ To confirm after a session start or a pull:
151
153
  teamai list # see the team skills / rules / docs you now have
152
154
  ```
153
155
 
154
- Then tell the user: from now on, **opening a new session in this AI tool
155
- auto-syncs** the latest team resources — no manual step needed. If their tool has
156
- no session-start hook (e.g. Gemini CLI, JoyCode), they run `teamai pull` by hand.
156
+ Then explain how this tool syncs. For JoyCode Desktop, the user must review and
157
+ trust each TeamAI hook in **Settings > Hooks** before it can run. Until the hooks
158
+ are trusted and enabled, run `teamai pull` at the start of each session. Other
159
+ tools with an enabled session-start hook auto-sync on a new session; for tools
160
+ without one (e.g. Gemini CLI), run `teamai pull` by hand.
157
161
 
158
162
  **Reassure them about privacy** (in their language): *"TeamAI does not send any of
159
163
  your session data to third parties. The only place anything is reported is the team
@@ -179,7 +183,7 @@ Summarize the outcome **in the user's own language** (global rule 1). Cover:
179
183
  tool keeps their team skills up to date; no commands needed.
180
184
  2. **Sharing a session learning is automatic — no command to remember.** When a
181
185
  session produced something worth sharing, TeamAI **prompts them on its own** (at
182
- the end of the session) and offers the `session-close` workflow, whose learning step
186
+ the end of the session) and offers the `teamai-share-learnings` workflow, whose learning step
183
187
  runs the `share` skill (`teamai skill get share`) with them to summarize and contribute it. They do **not** invoke `/teamai` for this. (This
184
188
  prompt only appears when recall is on — it is off by default; the admin turns it
185
189
  on in `teamai.yaml` (`sharing.recall.enabled`), a member with `teamai recall enable` — and the admin has not switched the
@@ -35,14 +35,14 @@ teamai mcp remove --dry-run # preview removal without changing tool configs or m
35
35
  teamai mcp remove # remove teamai-managed MCP servers
36
36
  ```
37
37
 
38
- `mcp inject` and `mcp remove` return exit code 1 if a tool config cannot be read or parsed, including in a dry run. Other tools may still change. Fix the config named in the warning and rerun the command; the unreadable config and its ownership records are kept for that retry.
38
+ `mcp inject` and `mcp remove` return exit code 1 if a tool config cannot be read or parsed, or if a proposed Codex edit would produce invalid TOML. This also applies in a dry run. Other tools may still change. Fix the config named in the warning and rerun the command. The affected config and its ownership records are kept for that retry.
39
39
 
40
40
  MCP definitions travel with the team repo like skills/rules — edit, then the
41
41
  members pick them up on sync.
42
42
 
43
43
  A server with a `${VAR}` the tool cannot expand itself gets the resolved value
44
44
  written into its project config (`.mcp.json`, `.cursor/mcp.json`, ...). With
45
- `sharing.gitExclude` on, Claude's (not in a single-repo team, whose worktrees
45
+ `sharing.gitExclude` on, Claude's (not in a team in self mode, whose worktrees
46
46
  each read their own branch's servers) and CodeBuddy's and WorkBuddy's servers go to their local
47
47
  scopes in `~/.claude.json` and `.codebuddy.json` instead, outside the project,
48
48
  and the next pull (on an HTTP-backed team, the local agent's next sync) moves
@@ -88,9 +88,11 @@ workspace also lists a file an older local agent wrote a credential into; `teama
88
88
 
89
89
  ZCode servers use `mcp.servers` in `~/.zcode/cli/config.json` or the project's `.zcode/config.json`. This follows the 3.16.2 source; 3.15.1 is not certified. Pull moves only unchanged teamai entries out of `~/.agents/mcp.json`. Doctor names other servers there because the desktop app stops reading that fallback once the native config has servers.
90
90
 
91
+ Antigravity takes user servers in `~/.gemini/config/mcp_config.json`. It reads a project's servers only from a plugin, so teamai writes them to `.agents/plugins/teamai/mcp_config.json` with a `plugin.json` (`{"name": "teamai"}`) beside it. agy takes stdio and HTTP servers; pull skips an `sse` server for agy with a warning. `agy mcp list` shows only the user file's servers.
92
+
91
93
  WorkBuddy uses the first existing user file in `~/.workbuddy/.mcp.json`, `~/.workbuddy/mcp.json`, and `~/.codebuddy.json`. `CODEBUDDY_CONFIG_DIR` moves the last file. A project uses `.mcp.json`, or `mcp.json` when only that exists. With `sharing.gitExclude` on, its servers use `projects[<project path>].mcpServers` in `.codebuddy.json`. These paths follow the CodeBuddy 2.168.0 engine; WorkBuddy's launcher binding is not certified. Pull removes only unchanged teamai entries from the former `.workbuddy/mcp.json` project file.
92
94
 
93
- When `.workbuddy-ai/` exists in the home or project (WorkBuddy 5.7+), the default skills path moves to `.workbuddy-ai/skills`. Every other surface still waits for `.workbuddy/`, so a member with only `.workbuddy-ai/` gets no rules, team instructions, agents, MCP servers or hooks, and `teamai doctor` fails `workbuddy receives ...` with the ones held.
95
+ When `.workbuddy-ai/` exists in the home or project (WorkBuddy AI, the international edition), the default skills path moves to `.workbuddy-ai/skills`. Every other surface still waits for `.workbuddy/`, so a member with only `.workbuddy-ai/` gets no rules, team instructions, agents, MCP servers or hooks, and `teamai doctor` fails `workbuddy receives ...` with the ones held.
94
96
 
95
97
  When a tool's home or configured MCP path moves, pull leaves old copies in place and names them once. Remove them after no tool reads them. Doctor reports unread mappings, moved files, and project MCP that is read only from a session started at the project root. Internal builds with an unknown MCP channel get a note instead of a guessed config.
96
98
 
@@ -158,7 +160,7 @@ teamai projects remove <id> # remove a project
158
160
  A workspace (a folder set up with `init`) also delivers the projects of the
159
161
  repos set up inside it, up to three levels down, with no list to keep: `teamai
160
162
  projects list` there shows each one and what it selects. A repo that uses
161
- another team repo, or single-repo mode, is left out and named.
163
+ another team repo, or self mode, is left out and named.
162
164
 
163
165
  A member gets the union of their role resources and their active project's
164
166
  resources. Admins declare projects in `manifest/projects.yaml` with the commands
@@ -172,7 +174,7 @@ keep the project's content in the team repo until members have pulled: that is
172
174
  what lets their next pull clean up the copies they deployed.
173
175
 
174
176
  `roles init/add/update/remove` and `projects add/update/remove` previews, and resource removal
175
- previews, refuse a team clone with uncommitted changes. Commit or stash them before retrying. Single-repo
177
+ previews, refuse a team clone with uncommitted changes. Commit or stash them before retrying. Self mode
176
178
  previews still work with dirty business files because they read origin. Clone
177
179
  previews refresh the configured upstream first, even when its branch or remote
178
180
  name differs. A failed fast-forward or missing upstream uses origin/current-branch
@@ -199,10 +201,20 @@ a namespace every role activates: `rules/code-style.md` is replaced by
199
201
  `rules/common/code-style.md` would reach them alongside it. The same skill or
200
202
  agent name in two namespaces one member has active is an error naming both
201
203
  files; two namespace rules or claudemd files of one name are both delivered.
204
+
205
+ Shared instructions live in `claudemd/`, or in `agentsmd/` when the team names
206
+ that directory that way — the same rules apply under either name. A repo with
207
+ both directories delivers a same-named file once, the `agentsmd/` copy first.
208
+
202
209
  A replacement must be usable to replace anything: a skill directory needs its
203
210
  `SKILL.md` (pull names one without it), and while an agent file does not parse
204
- the root agent stays installed. `teamai doctor` lists each replacement as a note. Teams without roles or
205
- projects are unaffected.
211
+ the root agent stays installed. `teamai doctor` lists each replacement as a note.
212
+
213
+ A member with no role or project (on a team without `manifest/projects.yaml`)
214
+ gets every skill namespace, so nothing replaces anything: the root skill wins
215
+ over a namespace skill of its name, then the namespace that sorts first, and
216
+ `pull` names each copy it skipped and the role that would deliver it
217
+ (`docs/guide/distribution.md`, "One skill name in the root and in namespaces").
206
218
 
207
219
  Docs have no override. A top-level `docs/<ns>/` that any role or project lists
208
220
  under `resources.docs` reaches only members with that namespace active; a
@@ -221,10 +233,11 @@ necessarily the project's manifest id.
221
233
 
222
234
  With `sharing.gitExclude.enabled: true` in `teamai.yaml`, each member's pull lists
223
235
  the skills and rules (one file per line, never a skill's directory, so a file a
224
- member adds to a delivered skill stays visible), agents, `teamai-context` files, hook
225
- files and team docs (one file per line) it delivered into a project, and each shared
226
- config file (MCP, `.codex/hooks.json`, OpenCode's) while it holds only teamai's entries,
227
- in teamai's `delivered` block in the clone's
236
+ member adds to a delivered skill stays visible), agents, `teamai-context`
237
+ files, hook files and team docs (one file per line) it delivered into a project,
238
+ and each shared config file (MCP, `.codex/hooks.json`, OpenCode's) and `CLAUDE.md`
239
+ instruction files (including `.claude-internal/CLAUDE.md` and `.tclaude/CLAUDE.md`)
240
+ while it holds only teamai's entries, in teamai's `delivered` block in the clone's
228
241
  `.git/info/exclude` (local to the clone, never committed), so `git add -A` does
229
242
  not commit them; a member's own files, and copies they edited, stay visible. `init` writes it for a
230
243
  new team; an existing team adds the line and commits it through the normal
@@ -233,6 +246,10 @@ true|false` in the project's `config.yaml` (`~/.teamai/projects/<slug>/config.ya
233
246
  Either takes effect on the next pull, no `--force`; turned off, the next pull
234
247
  removes only that block. `teamai doctor` says where the setting comes from and
235
248
  what git still sees; `teamai pull --dry-run` previews the block.
249
+ In a team in self mode the committed hook settings keep only the built-ins; the
250
+ team's hooks for Claude Code, CodeBuddy and Qoder go to the `settings.local.json`
251
+ beside them, listed in that block, and Codex's run from `~/.codex/hooks.json`.
252
+ The other tools have no such file, so their team hooks stay in the committed file.
236
253
 
237
254
  ## Team dashboard (web UI)
238
255
 
@@ -241,7 +258,7 @@ teamai dashboard # start the AI coding session dashboard (default po
241
258
  teamai dashboard --port 8080 # custom port
242
259
  ```
243
260
 
244
- Opens a local web UI for team coding-session activity, workflow runs, scorer pass rates, and knowledge-base health.
261
+ Opens a local web UI for team coding-session activity, workflow runs, scorer pass rates, benchmark runs over time, and knowledge-base health.
245
262
 
246
263
  ## Team packages (npm + Claude plugins)
247
264
 
@@ -265,7 +282,7 @@ teamai env add <KEY> <VALUE> --project <id> # or --role <ns>: in that namespac
265
282
  teamai env remove <KEY> # remove (same --role / --project)
266
283
  teamai env add <KEY> --secret -d "<what it is for>" --url <where to get one> # declare a secret in env/secrets.yaml, no value (same --role / --project)
267
284
  teamai env remove <KEY> --secret # remove a declared secret (plain `env remove` does too when env.yaml does not set <KEY>)
268
- teamai remove mcp <name> # root mcp/mcp.yaml if it has the name, else the one namespace file; --role / --project pick a namespace
285
+ teamai remove mcp <name> # root mcp/mcp.yaml or mcp/<name>/ if it has the name, else the one namespace; --role / --project pick a namespace
269
286
  ```
270
287
 
271
288
  Env variables, team hooks and MCP servers are scoped like skills: the root file
@@ -273,7 +290,14 @@ Env variables, team hooks and MCP servers are scoped like skills: the root file
273
290
  `env/<ns>/env.yaml`, `hooks/<ns>/hooks.yaml`, `mcp/<ns>/mcp.yaml` reach only
274
291
  members whose role or project lists `<ns>` under `resources.env`, `resources.hooks`
275
292
  or `resources.mcp`. A namespace entry replaces the root entry of the same key, hook
276
- id or server name. Hooks and MCP servers have no add command, and `teamai push`
293
+ id or server name. A hook that runs a script is a folder, `hooks/[<ns>/]<id>/HOOK.yaml`
294
+ beside the script, its command naming it as `"${TEAMAI_HOOK_DIR}/scan.sh"`; an id
295
+ both in `hooks.yaml` and as a folder stops team hooks like a repeated name. An MCP
296
+ server the team writes is a folder too, `mcp/[<ns>/]<name>/MCP.yaml` beside its files,
297
+ stdio only, its args naming them as `"${TEAMAI_MCP_DIR}/server.py"`; a name both in
298
+ `mcp.yaml` and as a folder stops team MCP the same way. `teamai remove mcp <name>`
299
+ removes a server folder as it removes an `mcp.yaml` server.
300
+ Hooks and MCP servers have no add command, and `teamai push`
277
301
  does not pick up `hooks/` or `mcp/`: edit the file in the team repo, then commit
278
302
  and push it with git. `teamai doctor` lists each override.
279
303
 
@@ -329,10 +353,10 @@ has no session-start hook, they run `teamai pull` manually.
329
353
  Turning a tricky fix into team knowledge is **automatic** once recall is on for
330
354
  the team (`sharing.recall.enabled: true` in `teamai.yaml`, then `teamai push`; it is
331
355
  off by default, and `teamai recall enable` turns it on for one machine only): at the end of a session
332
- worth sharing, TeamAI prompts the member and offers the `session-close` workflow:
356
+ worth sharing, TeamAI prompts the member and offers the `teamai-share-learnings` workflow:
333
357
  its learning step runs the `share` skill (`teamai skill get share`) to summarize the
334
- session, and its contribute step runs `teamai contribute`. A team file
335
- `workflows/session-close.yaml` replaces teamai's default. Nobody has to invoke it by hand. (A member whose teamai config
358
+ session, and its contribute step runs `teamai contribute` for each learning. A team file
359
+ `workflows/teamai-share-learnings.yaml` replaces teamai's default. Nobody has to invoke it by hand. (A member whose teamai config
336
360
  cannot be loaded gets no prompt; `teamai skill get share` names the file and the error.)
337
361
 
338
362
  Teams that work in English set `language: en` in `teamai.yaml` and `teamai push`.
@@ -287,10 +287,10 @@ day-to-day work — they can keep letting the AI run things for them:
287
287
  `/teamai Share this <skill-name> skill with my team` — see
288
288
  `"$(teamai skill path core)/references/contribute-member.md"`.
289
289
  - Sharing a **session's learnings** needs no command from them: TeamAI prompts on
290
- its own at the end of a session worth sharing and offers the `session-close`
290
+ its own at the end of a session worth sharing and offers the `teamai-share-learnings`
291
291
  workflow, whose learning step runs the `share` skill (`teamai skill get share`)
292
292
  with them; once they confirm, it can also publish and score the session. A team
293
- replaces it with its own `workflows/session-close.yaml`. (Only once recall is on — off by default;
293
+ replaces it with its own `workflows/teamai-share-learnings.yaml`. (Only once recall is on — off by default;
294
294
  turn it on team-wide with `sharing.recall.enabled: true` in `teamai.yaml`, then
295
295
  `teamai push`. Never on a read-only HTTP source, or while a member's teamai
296
296
  config cannot be loaded. A team that works in English also sets `language: en`
@@ -26,7 +26,11 @@ machine** (all tools)?"*
26
26
  user scope but keeps the data of each project still set up, and names them
27
27
  (`Kept the data of N project(s) still set up on this machine: ...`). Each of
28
28
  those needs `teamai uninstall` run in it; after the last one, one more
29
- `teamai uninstall` outside any project removes what is left in `~/.teamai`.
29
+ `teamai uninstall` outside any project removes what is left in `~/.teamai`,
30
+ except the user's own `drivers/`, `runtimes/`, `sandboxes/` and `tools/` there.
31
+ That last one also removes the warm images and sbx templates teamai's sandbox
32
+ recorded making, one `Removed …` line each, after its preview lists them; one
33
+ it cannot remove is a warning with the command that does.
30
34
 
31
35
  Reassure them (in their language): *"This only removes things from your computer.
32
36
  Your team's repo on the website is untouched — you can rejoin any time with
@@ -36,6 +40,8 @@ Your team's repo on the website is untouched — you can rejoin any time with
36
40
 
37
41
  A targeted project exclusion needs the same confirmation even when there are no local files to remove. `--dry-run` and declining confirmation leave the project config unchanged.
38
42
 
43
+ For a whole-machine uninstall, check the preview before removing the last configured workspace. If it lists built-in hooks under "Kept for other teamai installs" and the user confirms that no other workspace, checkout, user-scope install, or HTTP agent needs them, run `teamai hooks remove` in that workspace before uninstalling it. The final outside-project uninstall can remove remaining TeamAI data even when it has no configuration to clean up the tool hooks.
44
+
39
45
  Whole machine:
40
46
 
41
47
  ```bash
@@ -64,7 +70,7 @@ and give it your team repo URL."*
64
70
 
65
71
  ## Notes
66
72
 
67
- - If no valid configuration is found and TeamAI reports "home directory only," uninstall removes `~/.teamai` but keeps each project still set up (or registered in `~/.teamai/env-scopes`) and the shared files it reads, as a user-scope uninstall does.
73
+ - If no valid configuration is found and TeamAI reports "home directory only," uninstall removes `~/.teamai` but keeps each project still set up (or registered in `~/.teamai/env-scopes`), the shared files it reads, and the user's own `drivers/`, `runtimes/`, `sandboxes/` and `tools/`, as a user-scope uninstall does.
68
74
  - Project uninstall keeps the shared Claude/Codex team hooks in the main checkout
69
75
  while another checkout uses them. A targeted uninstall releases only the selected
70
76
  tool. Checkouts that exclude a tool do not retain its shared hook. Bare-repository
@@ -88,7 +94,7 @@ and give it your team repo URL."*
88
94
  - Uninstall removes the team-rules block from the file a tool with no rules
89
95
  format reads in user scope (`~/.codex/AGENTS.md`, `~/.zcode/AGENTS.md`,
90
96
  `$DSH_HOME/AGENTS.md`, the OpenClaw workspace `AGENTS.md`,
91
- `~/.pi/agent/AGENTS.override.md` when present, otherwise `~/.pi/agent/AGENTS.md`, `~/.joycode/rules.txt`, `~/.config/muse/AGENTS.md`), and the file when teamai
97
+ `$PI_CODING_AGENT_DIR/AGENTS.override.md` when set and present, otherwise `$PI_CODING_AGENT_DIR/AGENTS.md` (or the same paths under `~/.pi/agent` when unset), `$JOYCODE_HOME/rules.txt` when set, otherwise `~/.joycode/rules.txt`, `${XDG_CONFIG_HOME:-~/.config}/muse/AGENTS.md`), and the file when teamai
92
98
  created it for the block alone.
93
99
  - Uninstall cleans legacy Codex rule copies at the recorded `toolRoots`
94
100
  location, including publishers' bare local filenames, and the copies earlier
@@ -111,11 +117,25 @@ and give it your team repo URL."*
111
117
  - If an OpenCode config entry cannot be removed, repair its config or permissions
112
118
  and retry the same uninstall command. Uninstall reports failure and keeps
113
119
  its ownership record and shared data directory, even for the last tool.
114
- - Project uninstall keeps the global Pi and Oh My Pi extensions, Hermes
115
- plugin and config, OpenCode's user plugin, and the Codex family's
116
- user-level hooks, which the user
117
- scope, the HTTP agent or another project may use, and names them. If none
118
- does, run `teamai hooks remove` in the project first: it removes them.
120
+ - Project uninstall keeps a tool's machine-wide hooks (the Codex family's and
121
+ Copilot's user hooks, the Pi and Oh My Pi extensions, OpenCode's user
122
+ plugin, the Kiro, Antigravity, OpenClaw and DeepSeek Harness hooks, and the
123
+ Hermes plugin) while the user scope, the HTTP agent or another project on
124
+ this machine may run that tool, a project whose config does not parse
125
+ included, and names them; with none, it removes them.
126
+ `uninstall --agent <tool>` keeps them. The built-ins in a tool's home
127
+ settings stay on the same terms, but go with `--agent` when nothing else
128
+ runs the tool.
129
+ - In a project, uninstall removes the worktrees failed or cancelled workflow
130
+ runs kept when nothing in one is left out of its branch, and keeps the
131
+ branches (`teamai/<run>/…`): they are the user's. A worktree with uncommitted
132
+ changes, a file git ignores (an `.env`), or a HEAD on no branch stays, named with the
133
+ `git -C <checkout> worktree remove --force <dir>` command that removes it;
134
+ tell the user to save what they need first. teamai's worktree setup (its
135
+ exclude block and `extensions.worktreeConfig`) stays while one is left.
136
+ - In self mode, uninstall keeps a `teamai-learnings` or `teamai-reports` branch
137
+ that holds commits origin does not have, such as a publish that could not
138
+ push, and names it: have the user push it or delete it with `git branch -D`.
119
139
  Targeted project Codex uninstall keeps project config and records its
120
140
  exclusion, even without local resources. Legacy project hook copies go.
121
141
  User-scope uninstall removes these global channels, the Hermes and Oh My
@@ -152,7 +172,8 @@ and give it your team repo URL."*
152
172
  `Git exclude blocks (teamai's):`. An incomplete uninstall keeps the line of
153
173
  every file still on disk until the retry. With no configuration found (a
154
174
  machine set up only with `init --http`, uninstall run outside its projects),
155
- uninstall removes `~/.teamai/` and the HTTP source, and first teamai's lines
175
+ uninstall removes `~/.teamai/` (but the user's own `drivers/`, `runtimes/`,
176
+ `sandboxes/` and `tools/`) and the HTTP source, and first teamai's lines
156
177
  from every exclude file its records name, but the line of a file it leaves on
157
178
  disk (named), and the local agent's MCP servers in Claude's and CodeBuddy's
158
179
  local scopes that are still as it wrote them (a changed copy stays, named).