* fix(rules): inline rules without frontmatter, naming path-scoped globs hermesRulesText becomes inlinedRulesText, the one renderer for tools that read rules from a single instructions file. It strips frontmatter and leads a path-scoped rule with 'Applies to files matching: <globs>'. Hermes SOUL.md and doctor's Hermes check use it. Part of #938. * fix(rules): inline team rules into Codex AGENTS.md in project scope Codex reads instructions from AGENTS.md, not from .codex/rules, so the copies pull wrote there never reached it (#938). The codex defaults drop rules and gain claudemd (AGENTS.md, ~/.codex/AGENTS.md at user scope). pullAllRules syncs a [teamai:team-rules] block into that file once per path while an enabled, installed Codex-family tool maps it, and removes it otherwise. syncManagedInstructions probes rules ?? settings, so a machine without Codex gets no ~/.codex. * fix(rules): render the Codex team-rules block with inlinedRulesText Follows the T3 rename, so a path-scoped rule reaches AGENTS.md without frontmatter, after its Applies to line. * test(rules): cover Codex AGENTS.md in user scope, culture, shared instructions and recall Codex now reaches AGENTS.md through its default claudemd path; these tests pin user scope (~/.codex/AGENTS.md), a full project-scope pull writing all four teamai blocks into one AGENTS.md, and recall on/off. Also corrects the injectRecallBlockIntoTools comment, which listed Codex as skipped. * fix(rules): remove Codex team rules and their old copies on uninstall Uninstall strips the [teamai:team-rules] block and scans the legacy .codex/rules directory for teamai's copies. A shared instruction file now keeps only the blocks a remaining enabled, installed tool would write, so --agent codex drops the team-rules block while Pi keeps its own. * fix(doctor): check the team-rules block in Codex AGENTS.md Codex reads no rules directory, so doctor now compares the team-rules block in each AGENTS.md an enabled, installed Codex-family tool maps with what pull renders. It fails on a missing or stale block, on an AGENTS.override.md that Codex reads instead, and on an entry with no claudemd path. The file list comes from RulesHandler, the same resolver the pull writes through. * fix(rules): remove the .codex/rules copies earlier pulls delivered Codex never read the <rule>.md copies teamai wrote to .codex/rules (and .codex-internal/rules, .tcodex/rules). Every rules sync now removes the ones that still hold what teamai delivered, including teamai-recall.md, keeps edited copies and names them, and leaves *.rules alone. * docs(rules): document where Codex reads team rules (AGENTS.md) * fix(rules): give Codex its AGENTS.md rules on an already-synced pull A CLI upgrade with the team repo unchanged takes the "Already synced" fast path, which never ran the rules sync. So a member upgrading from 0.22.0 got no team-rules block in AGENTS.md and kept the old .codex/rules copies until the repo moved or they ran pull --force. The fast path now runs the Codex part of the rules sync (block + reclaim) and nothing else. * fix(doctor): tell a Codex member a plain pull restores the team-rules block The already-synced pull now rewrites the block, so the fix text no longer sends the member to pull --force. * fix(rules): give codex-internal and tcodex the codex instructions layout codex-internal and tcodex drop their rules path and read team rules from AGENTS.md like codex. Codex-family instruction writers probe rules ?? settings ?? skills, so a team entry with neither rules nor settings no longer counts as installed. writesInstructionBlock is the one answer to which blocks a tool gets, shared by pull's writers and uninstall. * fix(rules): keep an empty AGENTS.md that held no team-rules block removeClaudeMdSection now reports whether it removed a section and can delete a file left holding only whitespace. The team-rules sync and recall off use it, so a pull that removed nothing no longer deletes a member's own empty AGENTS.md. * fix(doctor): pass the Codex team-rules check when no rule has a body When every team rule is frontmatter only, pull writes no team-rules block, so a missing block is correct and an AGENTS.override.md shadows nothing. Also note that an empty override shadows AGENTS.md too. * fix(doctor): a plain pull applies the Codex claudemd toolPaths fix Editing teamai.yaml moves the team repo, so a plain pull does the full sync; --force is not needed. Matches the other Codex block checks. * fix(uninstall): name the instruction file uninstall cleans The summary and result lines said CLAUDE.md for every instruction file, including Codex's AGENTS.md. They now print the file's path under an 'Instruction-file blocks' heading. * refactor(recall): gate the recall block on writesInstructionBlock recall on now asks the same question as pull's recall writer and uninstall, so the three cannot drift. No behavior change. * fix(rules): reclaim .codex/rules copies of rules the team removed The tombstone cleanup walks toolPath.rules, which Codex no longer has, so a copy of a rule tombstoned after the member's last pre-#938 pull stayed forever. The legacy reclaim now removes tombstoned names too, keeping and naming a copy the member changed since delivery (#822). * test(rules): cover codex-internal and tcodex in reclaim, doctor and uninstall Parametrizes the project-scope legacy reclaim, the four Codex doctor failure cases and the full uninstall over the Codex family. * test(pull): cover the project-scope Codex fast path after an upgrade * test(local-agent): pin the prompt sync into Codex's AGENTS.md With Codex's default claudemd (#938), an HTTP prompt command reported by Codex writes the shared-instructions block into ~/.codex/AGENTS.md when ~/.codex exists, and creates nothing when it does not. * refactor(rules): move rulePaths into rule-format It reads a tool-neutral rule's paths: frontmatter, which both the Copilot renderer and the inlined-rules renderer use; it no longer lives in the Copilot module. * fix(doctor): ask nothing of a Codex entry that delivers no rules to it A team toolPaths entry such as codex: { agents: .codex/agents } has neither rules nor claudemd: the team sends Codex no rules on purpose, like any tool without a rules path. Doctor failed it on every member's machine (E2E doctor-delivery-cli). It now fails only an entry that still lists the pre-#938 rules path without claudemd. Part of #938. * fix(rules): keep a teamai-recall.md the member edited since the last pull The legacy Codex reclaim removed any .codex/rules/teamai-recall.md that opened with the recall heading, so text a member appended after the last pull that wrote it was deleted. The built-in rule is not in the delivery ledger, so match the file against the exact bodies teamai deployed instead; an edited copy is kept and named like other legacy copies. * fix(rules): keep a member's empty AGENTS.md when the team-rules block goes Removing the last block deleted any instructions file it left empty, so an empty AGENTS.md a repository tracked was deleted once Codex was disabled or the team had no rules left. injectClaudeMdSection now creates a file as just the block, and deleteIfEmpty deletes only a file that opens with it; a member's empty file is written back empty. Also describe the per-block cleanup of shared instruction files in the deployed uninstall skill. * fix(rules): address review on uninstall, remove, doctor and markers - uninstall and the legacy [teamai:rules] strip remove blocks through removeClaudeMdSection, so a member's empty AGENTS.md survives them as it does pull. Removing a block at the top of a file keeps the next one there, so a file teamai created still goes with its last block. - `remove rules` refreshes with the rules this member's pull delivers (role, project and tag selection) instead of every rule in the repo. - doctor reports a Codex team-rules block left behind when the team has no rules, and nothing else in that case. - teamRulesBlock strips the block markers wherever they appear in a rule, not only as whole lines, since the block is located by substring. * refactor(rules): split legacy Codex rule-copy ownership out of the reclaim legacyRuleCopies classifies each .codex/rules copy (and the codex-internal and tcodex dirs) as teamai's or edited, on the ledger, team-render, tombstone and shipped-recall proofs reclaimLegacyRuleCopies used inline. Read-only and public so uninstall can apply the same check. No behavior change. * fix(uninstall): keep edited legacy Codex rule copies, remove removed rules' copies Uninstall picked every .md in a legacy rules dir whose name matched a current team rule or a built-in, so it deleted copies a pull had kept as the member's edits, and left copies of rules the team had tombstoned. It now takes the legacy dirs from RulesHandler.legacyRuleCopies, the check pull reclaims by: owned copies go, edited ones stay and are named in one English warning. The tool's current rules dir is unchanged. Addresses the codex-review findings on #940. * fix(rules): give Codex the team rules through its session-start hook The project AGENTS.md the earlier revision wrote the rules into is read by Cursor, Copilot, OpenCode and Claude too, which already get the rules in their own format. The Codex family now gets them from the teamai session-start hook instead, and pull writes no rule file for it. - A team-rules handler adds the user-scope rules, then the cwd project's, as pull resolves them, skipping a scope that does not enable the tool. It adds nothing on resume, whose history already holds them. - A SubagentStart entry gives a fresh subagent the same rules. - Both entries set additionalContextLimit: 0; past 2,500 tokens Codex keeps only the start and end of a hook's context. - doctor checks the limit on the session-start entry; the AGENTS.md block check, its markers and its uninstall handling are gone. The block never shipped. - Culture, shared instructions and recall still go to AGENTS.md; the old .codex/rules cleanup and the remove-rules role filter are unchanged. For #938. * test(tool-roots): expect Codex's instruction file under CODEX_HOME #942 pinned Codex's default paths before #938 moved its rules to the session-start hook: no rules path, and an AGENTS.md that follows the root in user scope. * fix(rules): keep Codex's project content out of AGENTS.md (#945) The project AGENTS.md is the owners' file, and Cursor, Copilot, OpenCode and Claude read it too. The Codex family now takes its project content from the session hooks and its user content from its own AGENTS.md: - Project scope: no `claudemd` in the Codex-family defaults, so pull writes nothing to the project AGENTS.md. The session-start and subagent-start hooks add the project's rules plus the culture, claudemd/ and recall blocks, leaving out a block another tool already wrote into the project AGENTS.md. - User scope: the team rules go into a team-rules block of ~/.codex/AGENTS.md (and the variants' homes), beside the other blocks; the hook adds nothing outside a project. The "Already synced" pull writes the block too. - doctor checks that block in user scope, and both hook entries' limit in a project. uninstall removes the block. For #938. * fix(rules): keep tombstoned Codex copies without delivery records
141 KiB
Changelog
All notable changes to this project will be documented in this file. See standard-version for commit guidelines.
[Unreleased]
💥 Breaking Changes
- An env variable, hook or MCP server with a key its schema does not know, such as a misspelled
role:or a hand-addednotes:, is no longer delivered to anyone: the key used to be dropped silently, so a misspelled restriction shipped the entry to every member.teamai pull, the list commands,teamai statusandteamai doctorname the file, the entry and the key.teamai env addalso warns when it updates a variable carrying the unknown key; it,teamai env removeandteamai remove mcpkeep the key when they rewrite the file. A key that a later version adds to these entries is unknown to this one too, so an entry that uses it is not delivered to a member still on this version: upgrade every member before the team uses a new entry key, as for a newresources:key (for #822). manifest/projects.yamlandmanifest/roles.yamlnow reject a resource namespace that is not a single path segment, as a project id already had to be (the id keeps its own narrower ASCII rule). A namespace becomes a directory component (skills/<namespace>/,agents/<namespace>/,learnings/<namespace>/), so../evil,a/b,C:evil, a bare.., any name with a trailing.or space — which Win32 strips, making..arrive as..andfrontend.asfrontend— and a Windows device name such asCONorCOM1underresources:no longer parse; the error names the offending entry. Nothing else is rejected: a namespace that is a plain directory name still parses, non-ASCII names and names with a space included. A manifest that fails to parse now reports the offending entry on one line (Invalid projects manifest: projects.0.resources.skills.1: ...) instead of dumping a raw validation object. Two namespaces of one resource type that differ only by case (frontend,Frontend) are rejected too, within a manifest and between the two, since they name one directory on Windows and macOS. A manifest that ships any of these — a device name, a trailing., a case-only pair — parsed before and fails every pull now; rename the directory and the entry together.- Upgrade every member before a team declares a new axis.
resources:inmanifest/roles.yamlandmanifest/projects.yamlacceptsenv,hooks,mcp,modelsanddocs, but teamai 0.25.0 and the 0.26.0 betas reject aresources:key they do not know, so a team that declares one breaks pull for every member still on those versions. From this version on, an unknownresources:key prints one warning naming the role or project and the key, and the scope syncs as if the key were absent;teamai rolesandteamai projectskeep the key when they save the manifest.teamai roles|projects add/update --namespacesnever write the new keys, so nothing declares them until an admin does by hand (for #707). - Per-entry scoping of env variables, hooks and MCP servers gives way to namespace files (see Features).
projects:on anenv/env.yamlvariable, ahooks/hooks.yamlhook or anmcp/mcp.yamlserver, androles:on an env variable, existed only in the 0.26.0 betas and are removed: such an entry now reaches nobody, and pull, the list commands and status warn with the namespace file to move it to, one per listed id, so a project-only value never falls through to the whole team.teamai env addalso warns when it updates an existing variable carrying either removed key, and preserves the key.roles:on hooks and MCP servers, which 0.25.0 shipped, is deprecated: it keeps filtering for one more minor release as 0.25.0 did, a name repeated in one file under differentroles:included, pull warns once per run andteamai doctorhas a check, both naming every target file. There is no automatic migration; move each entry into the file the warning names and drop the key. A member with no role in a team withroles.yamlreceived everyroles:-scoped hook and server; once they move intohooks/<ns>/ormcp/<ns>/, that member no longer does (for #707). - Each tool reads only its own
tool_extras.<tool>from a YAML agent. Qoder, Qoder CN, ZCode and OMP used to receivetool_extras.claudeand ignore their own key, whichteamai pushwrote their edits to, so an edit never reached them; a team that relied on Claude extras reaching these tools moves those fields totool_extras.qoder,tool_extras.qoder-cn,tool_extras.zcodeortool_extras.omp. tclaude and tcodex readtool_extras.tclaudeandtool_extras.tcodexand fill the fields those lack fromtool_extras.claudeandtool_extras.codex, andteamai pushwrites their edits to their own key instead of the Claude or Codex one. The first ordinary pull after updating re-renders a copy an older CLI wrote this way when that CLI recorded delivering it and the member has not changed it since; any other copy is left as it is until the team next changes the agent (for #830). - Upgrade every member before a team introduces model aliases. An older CLI ignores
models/aliases.yamland writesmodel: stronginto every tool as is, a model no tool knows, and itsteamai pushreads a model changed in a deployed copy as an edit, so it can replacemodel: strongin the team's agent with a concrete model such asopus. Have everyone update first, then addmodels/aliases.yamland move agents to an alias. TeamAI does not check versions; the first ordinary pull after a member updates replaces a literalmodel: strongwith the resolved model (for #830).
✨ Features
-
A YAML agent can set
model: strong,model: fast, or an alias the team defines in an optionalmodels/aliases.yaml, which maps each alias per tool to that tool's own model value and an optional effort.teamai pullwrites the mapped model into every tool's agent file, and the effort into that tool's own field:effortfor Claude, claude-internal, tclaude, CodeBuddy, Qoder and Qoder CN,model_reasoning_effortfor Codex, codex-internal and tcodex,variantfor OpenCode. Cursor receives its model string as written, so its bracket form (claude-opus-5[effort=high]) carries the effort; Copilot receives the first entry as one model string. Copilot, Cursor, Kiro, WorkBuddy, JoyCode, ZCode and OMP get no effort field: an effort mapped for them is dropped, and pull warns once, naming the alias and the tool. The-internalandtvariants use theclaudeorcodexentry and Qoder CN theqoderentry unless the alias has their own key; no other tool inherits one. A tool the alias does not map, or any tool when the team has no aliases file, gets nomodelfield and runs on its default, never a literalstrong.tool_extras.<tool>.modelskips the alias for that tool, and an extras effort alone overrides the alias's effort. Amodelthat is not a string now makes the agent fail to parse; a legacy.mdagent whosemodelis an alias is copied as is with a warning. Whilemodels/aliases.yamlcannot be read, pull holds every agent that sets amodel, since the file may define any name, and push skips them. Pull records the model each agent copy received, so an ordinary pull applies a changed resolution even when the team repo has not moved, which fixes an agent an older CLI wrote withmodel: strongas is, and delivers a copy that is missing; a copy the member edited is kept, and that pull names it with how to take the new model. Pull warns when an alias an agent resolved through is removed, also where the alias gave a tool no model field (for #830). -
A member overrides a team model alias on their own machine in
~/.teamai/models/aliases.yaml, in the samealiases:shape. An entry replaces the team's whole entry for that tool, effort included, and~ordefaultgives the tool no model field and no effort; onlytool_extras.<tool>.modelwins over it. Keys arestrong,fastor an alias the team defines, so a member can mapstrongbefore the team has an aliases file, and any other name has no effect. The file applies in every scope and to every team using that alias name, and an ordinary pull applies an edit to it. While it cannot be read, pull holds the agents whosemodelis an alias, naming the file, and push skips them; since the file can make no name an alias, agents with a concrete model are delivered and pushed as usual. In the team file,defaultis written as a model value and~is an error. When pull keeps an edited copy whose deployed version changed, it now saysthe version teamai would deploy there ... has changed sinceinstead of blaming the team, since the change may be the member's override (for #830). -
On a tool switched with
teamai models switch, an agent whosemodelis an alias no longer sends an account model to the gateway: Claude keeps a resolvedopus,sonnetorhaiku, which the switch routes to gateway models, and drops any other model; Codex, OpenCode, CodeBuddy and WorkBuddy get nomodelfield, so they use their native inheritance (for Codex,[agents].default_subagent_modelor the parent session's model), not the profile's model. No switched tool gets an effort, the alias's or one set intool_extras.<tool>, unlesstool_extras.<tool>also pins a model.tool_extras.<tool>.model, a concretemodeland a member's~/defaultare unchanged, and claude-internal, tclaude, codex-internal and tcodex are never treated as switched. A tool counts as switched only while its live settings path matches the recorded switch and still holds what TeamAI wrote, the checksmodels restoremakes, so a stale record for anotherCODEX_HOMEorCLAUDE_CONFIG_DIRhas no effect. An ordinary pull aftermodels switchormodels restorerewrites the affected agents. While the switch records or a switched tool's settings cannot be read, pull holds alias agents in the tools concerned and says why (for #830). -
teamai pushkeeps model aliases intact. For an agent whosemodelis an alias, a copy whose model and effort match what the last pull wrote or what a pull would write now is unedited, so pushing before pulling an alias change reports nothing. Push never proposes a concretemodelover the alias and never writes the alias's effort intotool_extras, so adding an unrelated field no longer pins the effort. A hand-edited model or effort is reported as drift and left out, in--dry-runtoo, with where to make the change instead: the member's override file, the team'smodels/aliases.yaml, orteamai models restore --agent <tool>for a switched tool; the agent's other edits still push, and editing two tools no longer skips the agent over their different models. Writing an alias name in a deployed copy proposesmodel: <alias>. A new agent pushed from a tool's directory keeps its literal model. Push's warning about a kept copy whose deployed version changed now saysThe version teamai would deploy at <path> ... has changedinstead of blaming the team, and for an agent it ignores a change of the model resolution alone, which push does not replace (for #830). -
A broken model aliases file never changes anyone's models. A structural error in
models/aliases.yamlor~/.teamai/models/aliases.yaml(YAML that does not parse, a wrong type, a bad alias name, an effort without a model,~in the team file, top-level keys but noaliases:, such as a misspelledalias:) makesteamai pullkeep every agent with amodelas deployed, deploy none of them anew and leave their recorded models alone, with a warning naming the file, and once the file is fixed an ordinary pull delivers them, including ones it never deployed and team changes that arrived meanwhile (a pull that holds an agent, on an unchanged team repo too, says so and does not count the team revision as synced, so the next one syncs in full, and sends nopullwebhook;teamai pull --dry-runnames the agents it would hold);teamai pushskips those agents with the reason and pushes the rest. While it lasts, inactive-namespace cleanup leaves the root agent a held namespace agent replaces in place. A tool key teamai does not know, an option field other thanmodelandeffort, and an alias named like a tool's own model alias (opus,sonnet,haiku,fable,inherit,default,auto,lite) are dropped with a warning and the rest of the file applies;gatewaysinside an alias is ignored silently. Pull now prints an aliases warning only when it delivers an agent that uses that alias, for a tool entry only to that tool, instead of on every pull (for #830). -
Model aliases can be scoped:
models/<ns>/aliases.yaml, read where<ns>is active inresources.models, replaces the root alias of the same name whole for members with that namespace active. The same alias in two active namespaces holds agents with amodelfield, naming both files, as a structural error does. A name defined in any aliases file of the team repo, active or not, is an alias, so an agent whose alias only an inactive namespace defines gets nomodelfield instead of the name written literally, and a member's local entry for it applies. Pull warns once per such alias, naming its files, and says to activate the namespace or, if the name was meant as a concrete model such asgpt-5-codex, to rename the alias; a structural error in any of these files holds alias agents too. Pull records which file each agent copy's model came from, and pull warnings and push drift name that file.teamai doctornotes an alias that agents you receive use when a namespace not active for you defines it (for #830). -
teamai doctorshows how each agent's model alias resolved: per agent that uses an alias and per installed tool, the model and effort the tool receives and the step that decided it (extras,switched,local,team,default) with its source file, as notes. A member's~/defaultreadstool default (chosen in <path>), a Codex-family model without effort says the session's effort carries over, and a line names what the last pull deployed when that differs. Every aliases entry this CLI drops is a note too. A new failing check,Agent model aliases can be resolved, names the reason, file and held agents while a structural error in any aliases file, a namespace conflict or an unreadable switched tool's settings holds agents; it also runs after an interactive pull.Every team agent reaches a toolno longer counts held agents, andAgents delivered to <tool>lists a copy that only carries the previous resolution asmodel changed since the last pull, which a plainteamai pullfixes, so it does not fail the check. Pull now names the agents it holds for one reason in a single warning and leaves them out ofSynced N agents(for #830). -
Env variables, hooks and MCP servers are scoped the way skills and agents are.
env/<ns>/env.yaml,hooks/<ns>/hooks.yamlandmcp/<ns>/mcp.yamlreach only members whose role or directory's project lists<ns>underresources.env,resources.hooksorresources.mcp; the root files still reach everyone. A namespace entry replaces the root entry of the same variablekey, hookidor servername, whole: an MCP override carries its owncommand,args,envandtools:, and one withouttools:reaches every tool. When a namespace stops being active the next pull,Already syncedincluded, restores the root entries it overrode and removes the ones only it had;env.shis rewritten even whenenv/env.yamlis missing or declares nothing, and MCP${VAR}reads the same resolved variables.teamai env addandteamai env removetake--role <ns>/--project <id>to edit a namespace file (--rolewarns when no role or project declares the namespace; neither edits a file that does not parse, and--projectchanges nothing when the team repo cannot be refreshed),teamai pushpicks up a change to anyenv/<ns>/env.yaml, andteamai remove mcp <name>removes from the root file when it defines the name, otherwise from the one namespace file that does, asking for--role/--projectonly when several do, and removing nothing by a bare name the root file does not define while an MCP file does not parse; a flag that names a file that does not parse says so instead of reporting the name as not found.teamai env list,teamai mcp list,teamai hooks listandteamai list <env|hooks|mcp> --source reposhow each entry's namespace and whether it overrides the root, andteamai statusandteamai doctorcount per namespace. A hooks or MCP file that cannot be resolved makesteamai hooks injectandteamai mcp injectexit 1 instead of reporting success, and hooks or model profiles that cannot be resolved failteamai doctor'sTeam hooks can be resolvedorTeam model profiles can be resolved, whereteamai statuspoints. A declared namespace matches its directory case-folded, as docs namespaces do, soenv/Checkout/servesenv: [checkout]on Linux too, and--role/--projectwrite into that directory. So a checkout project can pointAPI_BASEor a shared MCP server at its own backend under the same name (for #707). -
An item in an active namespace replaces the root item of the same name for skills, agents, rules and CLAUDE.md fragments too, so contradictory versions are no longer delivered side by side. An agent in
agents/<ns>/replaces the root agent of the same stem instead of failing the pull, and deactivating the namespace brings the root agent back; a root file of the same stem no longer withdraws a placement record.rules/<ns>/<name>.mdreplacesrules/<name>.md, in Hermes'SOUL.mdblock too; deeper paths replace nothing. In the rule directories shared with a member's own rules (JoyCode, OMP, Pi, Copilot), the replaced root copy is removed while it is what teamai delivered, now or at the last pull, and an edited copy is kept and named on each pull.claudemd/<ns>/<name>.mdreplacesclaudemd/<name>.mdin the managed block. A root skill received through a tag is replaced by an active namespace skill of the same name; root skills are still not delivered by default in role or project mode, and among tag matches the root skill wins over one in an inactive namespace. Installing a skill removes the files that another team version of it has and the new one lacks, when they match that version byte for byte, so switching between versions leaves nothing of the other behind, while a file you added or edited stays; one at a path another version has is named on each pull.teamai pushwrites an edit of a replacing item back to its namespace and never to the root, and the skills push scan covers project namespaces as well as role ones.teamai recallindexes the skills and rules you receive rather than every one in the repo, so a replaced root rule or a rule of an inactive namespace is not returned. Two namespace rules or CLAUDE.md files of one name are both delivered, since each keeps its own place. A replacement that cannot be used replaces nothing: a skill directory withoutSKILL.mdis not delivered (pull names it), and while an agent file does not parse the agent it would replace stays installed.teamai doctorlists every replacement as a note, in--jsonundernotes; without roles or projects nothing changes, and the notes list each name the team repo defines more than once. Keep content a project may override at the root: a namespace item never gives way, so a rule inrules/common/is delivered beside a project's rule of the same name (for #707). -
docs/<ns>/can be scoped: once any role or project lists<ns>underresources.docs, those docs reach only the members who have that namespace active. Adocs/<dir>/that no role or project lists stays shared, so existing subdirectories keep reaching everyone. When the namespace stops being active, the next pull removes the local copies that still match the team file byte for byte, now or in an earlier team commit, and keeps an edited one, naming it. The docs mirror ofsharing.docs.localDircopies only the docs a member receives and never removes such an edited copy.teamai recallandteamai doctor'sTeam docs deliveredfollow the same filter, and doctor does not report a kept copy as stale.team-codebasecannot be a docs namespace, sincedocs/team-codebase/is the legacy codebase output; a manifest that declares it fails to load (for #707). -
Team model profiles can be scoped:
models/<ns>/models.yaml, declared underresources.models, replaces the root profile of the sameidfor members with that namespace active. Agents switched toteam:<id>follow the override on the next pull and return to the root profile when it deactivates; a profile that existed only in a namespace you left keeps your agent settings, and pull says itis no longer active in your namespaces. A stored team API key is bound to the profileidand the origin (scheme, host, port) of itsbase_url, so an override never sends your key to another gateway: when a profile moves to an origin you have no key for, pull leaves the agents switched to it alone and printsRun `teamai models switch team:<id>` to set a key for it., and the key for the first gateway is kept for when you leave the namespace. The same applies when the team moves the root profile to another origin, with or without roles and projects, so each member runs the switch once per new gateway. Model profiles exist only in the 0.26.0 betas, so no stable release is affected. A key stored by a beta is bound once, at the first command or pull that reads it: to the gateway TeamAI last wrote it into for your agents, or, if no agent was switched to that profile, to the root profile's current gateway. If the team moved the root profile to another origin since your agent was switched, pull leaves that agent alone and asks for the switch, rather than sending the old key to the new host.teamai models listshows the file each team profile comes from, andteamai pushrefuses any invalid models file (for #707). -
Built-in skill content ships inside the npm package and is printed by the installed CLI:
teamai skill get <core|setup|wiki|share> [--full] [--all],teamai skill path <name>for the directory holding a skill's scripts, andteamai skill list --jsonfor the catalog. Agents receive one file,skills/teamai/SKILL.md, a discovery stub that points at those commands, so what an agent reads always matches the CLI version it is running.teamai pullremoves theteam-wiki-codebase,teamai-share-learningsandteamai/references/*.mdtrees earlier releases copied into every agent directory, removing only files whose content a release shipped (an edited file, or a member's own skill under an old name, stays), archiving each removed file under~/.teamai/removed-skills/<run>/…first, and keeping any directory that holds a member's own file;teamai uninstallremoves only the packaged files from CLI-owned skill directories by the same rule.shareis served only while recall is on and the team source is writable (not a read-only HTTP one), and the end-of-session share reminder is withheld until then too. The served workflows are English; learning and knowledge-base documents are still written in Simplified Chinese, and an existing knowledge base keeps its file names and headings. The legacy names still resolve as aliases (for #678, #730). -
teamai doctornow checks what landed for every resource, not only skills and docs.Rules delivered to <tool>andAgents delivered to <tool>ask the resource handler where an item lands — a rule's filename and content change per tool, an agent's destination comes from its render and itstargets:— and compare a delivered rule with the bytes the handler renders for that tool, so a.mdcwhoseglobsdrifted from the team rule'spaths:is reported rather than passing on the presence of its frontmatter keys. An agent is compared with the bytes its render produces, so a copy left behind by an older spec is reported rather than counted as delivered.Every team agent reaches a toolnames an agent that renders for no installed tool, and is reported whenever a tool is installed to receive agents, including when no agent renders anywhere. Two tools do not read a rules directory and get a check each:Team rules are active in opencodefails whenopencode.jsonstops listing the glob that makes the delivered.mdfiles load at all, andTeam rules are inlined in Hermes SOUL.mdcompares the managed block ofSOUL.mdwith what the team rules inline to.MCP servers delivered to <tool>compares each server the team resolves for a tool with the entry in that tool's own config — the entry, not the name, since reconciliation leaves an entry teamai does not own alone, so an unrelated server under a team name holds the key while the team's definition never arrives — and names any the reconcile skipped with its reason, so an unresolved${VAR}is reported with the variable instead of being mentioned once during a pull and never again. Anmcp.yamlthat does not parse is reported asTeam MCP servers can be readrather than read as a team shipping no MCP at all.Env variables injected in shell profilestops at the marker comment no longer: it checks thatenv/env.yamlparses and declares its variables undervariables:(an explicitvariables: []is an empty configuration and fails nothing), that each reachedenv.shwith the declared value — read back through the generator's own inverse, so a multiline value quoted across several lines is matched rather than reported stale — and that the injected block would actually load it. The two expensive registries, rules and agents, are built forteamai doctoronly, so the checks at the end of a pull keep their budget (for #624). -
A manual
teamai pullends by running theteamai doctorchecks and printing each one that failed, with its fix. It prints nothing when they all pass, the exit code is unchanged, and the SessionStart hook path (--silent) and--dry-runrun no checks, so session startup is untouched. Provider authentication checks are left toteamai doctor: the pull just used the provider. So is any check that pull already reported in its own words on that run — the queued-learnings warning is not immediately repeated as a check telling you to run the pull you just ran. A check the pull stayed silent about is still printed (for #598). -
teamai doctornow checks what landed, not only the plumbing.Skills delivered to <tool>compares the skills your roles, tag subscriptions and exclusions resolve to against each installed tool's directory, reporting a skill that never arrived separately from one that arrived unreadable (SKILL.mdmissing, unparseable frontmatter, or anamethat does not match the directory, which keeps the agent from discovering it).Team docs delivereddoes the same for the docs bundle againstsharing.docs.localDir.<tool> is installedfails whenenabledAgentslists a tool with no directory here, instead of skipping it silently, and reports an installed one as passing so--jsoncarries an entry either way. Resolving a skill's destination without a team copy to compare against no longer warns about a Codex shared-directory conflict, so a read-onlydoctorstops reporting one for copies the pull treats as identical. The installed check asks the same resolver the sync uses, so OpenClaw is judged at its workspace directory rather than its tool root.Team docs deliveredrequires each expected document to be a readable file, not merely a name that exists. And a pull that found a scope locked by another process runs no checks at the end, since they would read a clone that process may have mid-write (for #598). -
teamai removeaccepts--forceto skip its confirmation prompt, spelled the same way asteamai uninstall --force. Without a TTY the prompt answers itself with no, so this is the only way to remove a resource from a script or a test (for #591). -
MCP servers in
mcp/mcp.yamland hooks inhooks/hooks.yamlaccept an optionalroles:list and ship only to members holding one of those roles; a role change removes the previous role's entries on the next pull, andteamai mcp list/teamai hooks listshow the restriction (for #563). -
Agents can be scoped by role or project:
agents/<namespace>/ships only to members whoseroles.yaml/projects.yamlentry lists that namespace under a new optionalagents:key, and a role change removes the previous namespaces' agents on the next pull (for #563). -
First-class Kiro support: skills, steering rules, JSON subagents with CLI
agentSpawnsession-start hooks, and MCP sync to.kiro/(for #500). -
Multi-project management:
roleandprojecttogether resolve resource namespaces, and project-private learnings are isolated (#426, for #375). -
Data partitions auto-migrate a legacy
.teamai, resume interrupted migrations, smoke-check the clone, and keep a git-ignored backup (#439, for #374). -
Teams add their own course-correction words via
sharing.intervention.correctionKeywordsinteamai.yaml. The built-in list still covers only Chinese, English and Japanese, so corrections typed in other languages count only once the team configures them. TheUserPromptSubmithook now stores acorrectionflag on each dashboard prompt event (for #564). -
teamai init <repo> --provider <name>uses the named provider instead of detecting one, so a member of a team on self-hosted GitLab can join with--provider gitand their existing Git authentication, withoutGITLAB_TOKEN. The choice is saved in that machine's local config and takes precedence over the team'steamai.yamlproviderfor PR/MR creation and forteamai doctor's provider checks; an existingteamai.yamlis unchanged, so other members keep the team's provider, and ateamai.yamlthatinitcreates records the providerinitwould detect without the flag rather thangit, and stops with aGITLAB_URLhint on an unconfigured self-hosted GitLab.--provider gitlabon a host that is not the configuredGITLAB_URLorTEAMAI_GITLAB_HOSTstops with a hint instead of sending the token to gitlab.com. Withgit,teamai pushpushes the branch and leaves the merge request to be opened on the Git host, exiting non-zero as it does for aprovider: gitteam repo. Re-runninginitwithout--providerreturns to auto-detection. The value must be one oftgit,github,cnb,gitlab,gitcodeorgit, and--providercannot be combined with--http(for #789). -
Pi Coding Agent can use team model profiles, so
teamai models switchreaches it like every other supported agent. TeamAI writes one provider into~/.pi/agent/models.json, keyed by the profile ref and labelled with itsname, holding every catalog model. Pi resolves the api and the URL per model, so that one provider covers a catalog spanning all three protocols; a model served over several protocols is registered once, preferring an OpenAI one, and declaring a model such asclaude-opus-4-8in ananthropic-only group pins it to Anthropic Messages. The key is the profile ref rather than the bareid, which is unique only within one catalog file, so a root and a namespace profile sharing an id do not overwrite one another. A key configured from the environment is written as$VAR, Pi's own indirection, so no secret lands in the file, and a member's other providers in the same file are never touched — a switch over one TeamAI already wrote is not a collision, while a first switch refuses a provider the member already has under that ref. Pi'ssettings.jsonis left alone, so the default model stays the member's choice, as Claude's/modelpick already is, andPI_CODING_AGENT_DIRis honored the wayCODEX_HOMEis.teamai models restoreputs the file back, removing the key the last switch created even when the team has since re-pointed the profile at a different ref, and restoring without--agentnow covers Pi too.
🐛 Bug Fixes
- Team rules reach Codex,
codex-internalandtcodex. Pull used to copy them to.codex/rules/<name>.md, which Codex does not read, andteamai doctorreported them delivered. In user scope they now go into a team-rules block of the tool's ownAGENTS.md(~/.codex/AGENTS.md), beside the culture, shared-instructions and recall blocks. In a project the session-start hook adds the project's rules and those blocks to each session, and to a spawned subagent through a newSubagentStartentry, withadditionalContextLimit: 0so Codex keeps them whole; pull leaves the projectAGENTS.md, which other tools read too, unchanged. Pull removes the.mdcopies earlier pulls left in.codex/rules/, keeping an edited one with a warning. Pull and uninstall keep a removed rule's legacy copy unless it matches its recorded delivery hash; a missing record proves nothing about local edits. A path-scoped rule is rendered without frontmatter after anApplies to files matching: <globs>line, in Hermes'SOUL.mdtoo.teamai doctorchecks the user-scope block and, in a project, both hook entries' limit. The public Codex asks once to approve the changed teamai hooks (for #938). teamai pullnames the skills it removes because they are no longer delivered here, in one line, instead of adebugline calling them excluded and a summary that saysNo resources to sync. Picking a role or project, or an admin addingmanifest/projects.yaml, takes root skills away, since the rootskills/is then the tag catalog; the line then says thatteamai tags subscribe <tag>brings one back. A namespace skill removed because its namespace is no longer active is named too. The usage guide and the multi-project design no longer say a member with no project still getscommonor every root item (for #911).teamai pullkeeps theteamai tags subscribe <tag>recovery line when the skill directory it removes is byte-identical to an inactive namespace copy: that copy made the namespace cleanup phase remove the directory first, and the hint was lost, because pull inferred whether a root skill had left from which phase did the removing. The hint now follows the repo — it appears exactly when the team repo holds the removed skill at the root, the copy a tag delivers — so a namespace-only skill removed on deactivation is still named without the hint. The usage guide no longer says a member with no role gets no skills at all, in English or Chinese: root skills still arrive through a tag (review of #917).teamai pullkeeps a skill, rule or agent you changed since teamai delivered it instead of overwriting it, and names it:Kept <path>: you changed it since teamai delivered it, with a warning when the team version has changed since, whichteamai pushrepeats for that copy, since the SessionStart pull is silent. Pull records the sha256 of what it writes at each path in the checkout's record, and the pre-push sync records its writes too, so a copy counts as changed only against that record; a skill counts as one copy, and files only you added do not count. The copies of other tools still update.--forcekeeps these copies,--dry-runprintsWould keep <path>, and a copy of an item the team removed stays when you changed it. To take the team version, delete your copy and runteamai pull --force. There is no record before the first full pull on this version, or in a new worktree, so that pull overwrites as before. A file you added to a skill at a path another team version of it has is no longer named on every pull, andteamai doctorno longer fails a rules or agents check, or points atteamai pull --force, for a kept copy: it lists one aschanged by you (kept by pull)beside any other problem (for #822).- On macOS, the git commands behind pull, push, reports and learnings publishing no longer wait on a PATH search each time they run. teamai spawned
gitby name, and on macOS that lookup costs a few milliseconds for each PATH entry ahead of git's directory: 30-67 ms per call with a typical PATH, while git itself takes about 8 ms. teamai now runs thegitthat lookup would pick by its absolute path, found once and again whenever PATH changes or thatgitis gone or no longer executable, and only once agit --versionby that path starts. On macOS 26 an up-to-dateteamai pulldrops from 1.3 s to 0.4 s with a 42-entry PATH, and from 2.0 s to 0.4 s with the PATH an npm script gives; macOS 27 no longer shows the lookup cost. Windows, a PATH with an empty or relative entry, a firstgiton PATH that does not start (a missing interpreter, no execute permission), and the few one-off git calls outside these paths (provider clone, version and user probes) keep the bare-name spawn (for #868). - On Node 24,
teamai codebase --extract, and theteamai importand CI extract paths that run it, no longer abort withFatal process out of memory: Zoneon a repository with.swiftfiles. V8's optimizing Wasm compiler (nodejs/node#63421) ran out of memory on the tree-sitter grammars, so the AST track now keeps them on V8's baseline tier on Node 24 and later. That also cuts the TypeScript grammar's peak memory there from about 1.4 GB to about 0.1 GB, for a parse about 1.6x slower; Node 20 and 22 are unchanged (for #860). teamai remove mcp ambiguousremoves a server namedambiguousfrommcp/mcp.yaml. The name matched the valueremoveused internally to mean "refused", so the command printedNothing was removed., exited 1, and gave no reason (for #862).- When
TEAMAI_GITLAB_HOSTandGITLAB_URLname different hosts, GitLab commands stop with an error naming both, before any request. A repo onTEAMAI_GITLAB_HOSTwas detected as GitLab while every API call, the token included, went toGITLAB_URL. An invalidGITLAB_URLis now reported as such byinitinstead of as a failed GitLab login (for #789). - A misspelled top-level key in
mcp/mcp.yamlorhooks/hooks.yaml(server:forservers:,hook:forhooks:) no longer removes every installed team MCP server or hook: such a file read as empty. It now fails like a file that does not parse, so pull keeps what is installed, and pull andteamai doctorname the file, the keys found and the key expected. An extra top-level key besideservers:orhooks:is still ignored (for #822). - The closing line of
teamai recalloutput is in English (for #822). - The dashboard event log no longer drops events to a compaction race.
~/.teamai/dashboard/events.jsonlis appended by every dashboard hook on the machine, and compaction shrank it by a lock-free read → filter → temp-file → rename, so an event appended between the rewrite's read and its rename was overwritten and lost: the dashboard's sessions, interventions and prompt counts under-counted until the next rebuild. Every writer that may modify the file now takesevents.jsonl.lock(theacquireLockretry the usage file took for the same lost update, #803): a hook append waits up to ~250 ms, inside its foreground budget, and one that gives up records its line in anevents.pending-<uuid>.jsonlside file that the next lock holder folds into the file before it writes, so an event is late, never gone; the line'spendingIdkeeps a fold from appending a side file twice, identical events in separate side files are both kept, and the id stays in the raw file — a compaction keeps it too, as the usage file's rewrite does — until the side file itself is gone, while no reader ever sees it. Side files fold in their events' own time order, and a compaction classifies sessions in time order as every reader does, so a side file that outlived newer appends cannot place an older event after them and re-mark a live session stopped. A compaction that finds the log below its threshold and no side files to fold still runs lock-free, so the common case costs one read and no lock. A rewrite waits up to ~5 s for a peer's rewrite and skips — leaving the file as it is for the next compaction — when a live holder outlasts the wait, and a lock whose owner is gone is reclaimed (for #804). - A broken team file no longer wipes or downgrades what a member has installed. An
mcp/mcp.yamlorhooks/hooks.yamlthat did not parse reconciled to an empty set and removed every team MCP server or hook from every tool, and two active namespaces defining one skill or agent aborted the pull for the whole scope, skipping rules, env, docs and cleanup. Now a file in the active set that does not parse or cannot be read, a name repeated inside one file, or one name in two active namespaces stops only that resource type for the run: env keepsenv.sh, hooks and MCP keep their entries (the built-in hooks, with the session-start pull, are still installed where missing: with the root hooks file'sbuiltin:overrides when it parses, and otherwise with their defaults only in a tool that has none yet;teamai initsays the team hooks were not installed), model profiles leave switched agents alone, skills and agents keep what is installed, and every other type still syncs. The warning names the file or both files and the fix, and for env, hooks, MCP and models is also written to~/.teamai/debug.logfor session-start pulls (for #707). - In single-repo (
kind: self) mode, every checkout of the business repo now publishes learnings and reports. Theteamai-learningsandteamai-reportscheckouts and the queue of unpublished learnings lived in each checkout's own.teamai/, and git checks a branch out in one worktree only, so the first checkout to create them locked every other one out ('teamai-learnings' is already used by worktree), and a learning queued in a linked worktree was deleted with it by a plaingit worktree remove. They now live in the project partition that every checkout shares, and the search index is kept per checkout, sorecallno longer serves another checkout's index with paths into it. On upgrade,init,pull,push,contributeandimport --from-mrmigrate a checkout's old install, moving its queue into the partition without overwriting anything (or intopending-learnings.selfwhen another checkout has since switched the project to another kind; an old git-mode install beside the knowledge of a switch to single-repo mode goes to.teamai.bak, its queue topending-learnings.git);contributeandimport --from-mrstop, saving nothing, while that data cannot move out of the checkout; and the first command that needs a side-branch checkout removes the old one from.teamai/; one with uncommitted changes is kept, a warning names it and says what to do, andrecall maintenanceandrecall promotestop until then, while another command holds the learnings or reports lock, and when a checkout cannot be created, naming the cause. A git-mode install of the same project uses the same partition paths, so a checkout that belongs to the other repository is refused, never reused or removed, with the command that clears it, and so is one whose repository was moved or deleted; its votes are not counted,initdeletes the search indexes built for the old repository, learnings the old install still had queued are set aside inpending-learnings.<old kind>rather than published by the new one (and inpending-learnings.<kind>-<repo>wheninitpoints an install at another team repository of the same kind, which onmainpublished them to the new one; the same repository written another way keeps them, #823 item 13), anduninstalllists every unpublished queue before it asks. (for #808). - A scope's usage file no longer grows without bound where it is never reported: an http source, a team with
usageReport: false, or a remote that rejects every push.teamai pullkeeps its newest 5,000 events, soteamai statsstill shows recent usage there, the local file being its only source. In a reporting scope whose report does not complete while it holds more than 5,000 events, the dropped events were never reported. The cap runs after the report has removed the events it sent, so it cannot shift that removal onto events not yet reported, and a file at or below the cap is not rewritten. Hook appends, the report's truncate and the cap now share one lock beside the usage file, and a rewrite goes through a temp file that keeps the file's mode, so a rewrite no longer loses an event recorded while it runs, nor the file on a kill or a full disk. A hook that cannot take the lock within ~250 ms records its event in a*.pending-<id>.jsonlfile beside it, which the next lock holder appends; a rewrite that cannot take it within ~5 s leaves the file as it is. A pending file gets no wider mode than the usage file (owner-only while there is none), and an in-workspace.teamai/.gitignoreignores the lock, a rewrite's temp copy and the pending files;pullandpushadd those entries to an existing single-repo one, and the first pending file or rewrite adds them to an existing project-scope one (for #788). teamai statsno longer counts a session twice, and no longer counts another project's sessions. Its dashboard section added the whole machine's localevents.jsonlmetrics to the scope's already-reported totals from the team repo, so every session that apullhad reported — and that stays in the event log until compaction — was counted once by the team total and once again locally, and sessions whosecwdbelonged to a different project were added to this scope's as well. It now filters the event log the wayteamai pullreports it (only the sessions recorded in the current scope, see #785) and adds only what that scope has not reported yet, derived from the same per-scopereported-*snapshots the report path advances — so the local figure agrees with the team's instead of exceeding it. When the reported totals could not be read at all (no stats file, an unreadable one, a reports worktree that is not there), or when they exist but hold nothing yet, nothing is subtracted — a snapshot can name a session the team file never received, so a non-empty team total is what licenses trusting them, and a session the member can see happening is never hidden. The per-repo and by-hour breakdowns read that same filtered log, so they stay inside the scope; they answer a different question from the headline — what this machine's retained event log holds, per repo — and both the headings and the--by-repo/--by-timeflag descriptions now name that source instead of presenting them as a split of the headline (for #768).- The data-partition migration no longer retires a legacy
<repo>/.teamai/while the partition'sconfig.yamlcannot be read.teamai init,pullandpushtook a partition config that merely existed as a finished migration and renamed the legacy directory to.teamai.bak, although it held the only config that still loaded. A partitionconfig.yamlthat is empty or cannot be opened, does not parse, does not validate, or is notscope: projectnow leaves the legacy directory in place and names the file to fix; once it is fixed, the next of those commands retires it as before. A partition directory whoseconfig.yamlwas moved aside is no longer replaced by a fresh copy of the legacy directory, which deleted what the partition held; the migration waits and says to restore the file or move the directory aside (for #797). teamai recall <query>searches nothing in a project whose config exists but cannot be read, and says why. Detection skipped the broken file and searched whatever loaded next: the user scope, or a legacy.teamai/behind a broken partition that may belong to another team, whose knowledge was returned and whose documents got recalled counts. It now printsNothing was searched: <file>: <reason>. Fix the file, or move it aside and run `teamai init` to write a new one.and exits 1, andrecall --checkdoes the same instead of printingNOT_RELEVANT, which told the recall subagent the team had no knowledge. Theteamai-recallsubagent a pull from this release deploys relays that line to the member, telling the main conversation to move the file or re-runteamai initonly with their consent. (for #796).teamai pullsyncs nothing in a project whose config exists but cannot be read, and says why. Detection skipped the broken file and pulled whatever loaded next: the user scope, or a legacy.teamai/behind a broken partition that may belong to another team, whose skills, rules and docs were deployed and to which the project's usage was reported. It now printsNothing was synced: <file>: <reason>. Fix the file, or move it aside and run `teamai init` to write a new one.and exits 1. A session start there runs no pull, seeds no agent directory and stashes no package hint;teamai pull --silent, which hooks from beforehook-dispatchstill run, prints nothing, writes the reason to~/.teamai/debug.logand exits 1. This is the rule team hooks and usage follow since #748 (for #784).- The legacy
teamai dashboard-reportcommand no longer records dashboard events in a directory that never set up teamai. A current install writes onlyteamai hook-dispatch, whose dashboard-report handler declaresrequiresConfigand is dropped when no config resolves for the hook'scwd; the old subcommand stayed ungated, so a hook left behind by an earlier install kept recording events for every project it fired in, and those sessions were then reported by whichever scope pulled next. It now applies the same gateteamai contribute-checkwas given, asked about the session'scwd— or, for a host that sends none, the directory the hook runs in (for #768). - The lock behind
pull,push, the reports and learnings worktrees, learnings publishing, migration, self-mode bootstrap and the update check no longer hands one lock to two live processes. Reclaiming a stale lock renamed over whatever file was there once it had judged the lock stale, and it judged live locks stale: one that had just been released (and could be re-created by a third process before the rename), one whose owner had created it but not yet written it, one owned by a process running as another user (for example asudo teamairun), and one it could not read. Under 16 processes contending on one lock, about 1% of acquisitions overlapped another holder, enough for two pulls to report the same usage twice. Now only a lock whose owner is provably gone is reclaimed; a lock that vanished gets one more exclusive create, and a new lock is published with its content already in place (written to a temp file, then hard-linked to the lock name; a filesystem without hard links falls back to the previous create). A lock that names no owner (empty, partly written, unreadable) is never reclaimed: if a crash left one,pullandpushreport busy until it is removed, and a warning names the file. Migration skips the lock's temporary files, which a contending pull creates and removes while the copy runs. With the change, the same stress run shows no overlap (for #760). - Team hooks stay out of projects that never set up teamai. A project-scope install puts its hooks in the home directory, so they fire in every project on the machine, and with no config for the directory they used to run anyway: the end-of-session share reminder (shown there even with recall off, a case a configured team never sees), the TodoWrite recall nudge, and the local recording of sessions and skill usage that a later report from another project pushed to its team. A handler that needs a team now declares
requiresConfig, and the dispatcher drops it when neither a project nor a user config resolves for the hook'scwd; only machine-level work runs there (CLI update check, session-start pull, local agent, package hints the pull stashed). A config that exists but fails to parse reads the same way, so it withholds team prompts rather than running all of them, and for team hooks and skill usage an unreadable project config never falls back to the user scope, nor to a lower-priority project config such as a legacy.teamai/behind a broken partition. A host that sends nocwd(OpenClaw) resolves the project from the directory it runs the hook in, acwdthat no longer exists resolves to the user scope instead of failing the hook, and the legacyteamai contribute-checkcommand that older installs still call follows the same rule (for #748). - Every team hook handler now works in the scope
hook-dispatchresolved for the hook'scwd. The team correction keywords, votes and webhooks read their config again from the directory the hook process ran in, so when thatcwdno longer existed (a deleted worktree) and the host started the hook inside another project, that project's keywords were applied, the session's votes were recorded under its member and pushed to its team, and its webhooks fired. The background handlers (session-start pull, webhooks, update check) also run again when thatcwdno longer exists: on macOS and Linux their detached process was started in it, so the start failed silently and none of them ran. It now starts in the temp directory, as on Windows (for #752). - Votes stay with the team of the scope they were cast in. Every scope used to record into one
~/.teamai/votes/<user>.yaml, so a vote cast in one project (byteamai recall feedback, a recall search, or a Stop hook whose push failed) was pushed to the team of whichever scope synced next. Votes now go to the data directory of the scope that resolves for the session's directory (<dataHome>/votes/for a project,~/.teamai/user-votes/for the user scope), and the Stop hook, the pull report,teamai recall feedbackand the knowledge-base vote view each read only that scope's votes. Since a scope's file starts empty,teamai recall feedback --negativealso counts the upvotes that scope's team already holds, so a doc upvoted before the upgrade can still be lowered. In a project whose config cannot be read,teamai recall feedbackrecords nothing and exits 1 instead of recording into the user scope, a recall search records no recalled count, and the knowledge-base report names the broken file instead of showing the user scope's votes. Votes in~/.teamai/votes/name no project, whether an earlier release left them there or writes them again after a rollback, so this release never reads or pushes them; the team'svotes/<user>.yamlkeeps its format (for #787). - Skill usage stays with the team of the project it was recorded in. Every scope used to append to one
~/.teamai/usage.jsonl, so whichever project pulled next reported every project's skills to its own team, including skills that exist only in an unrelated private repo. Usage now goes to the data directory of the scope that resolves for the session's directory (<dataHome>/usage.jsonl: the project partition, or<repo>/.teamaifor an install not yet migrated to one, and~/.teamai/user-usage.jsonlfor the user scope), each report reads and truncates only its own file, andteamai statsshows the current scope's usage. Events in~/.teamai/usage.jsonlname no project, whether an earlier release left them there or writes them again after a rollback, so they are never read or reported. Stats already pushed are not rewritten (for #748). teamai initno longer hangs without a terminal. When the provider had no session it spawnedgh auth login --web(orgf auth login,cnb login) with inherited stdio and waited for a browser device flow that nobody could complete, about five minutes for GitHub, then exited with the provider's error and no hint of the missing credential. Each login now refuses up front when the run is not interactive and names the credential to prepare (GITHUB_TOKEN/GH_TOKEN,CNB_TOKEN, or for TGit a priorgf auth login, since aTGIT_TOKENPAT is REST-API-only and cannot clone). A run is non-interactive when stdin is not a TTY or whenCIorTEAMAI_NONINTERACTIVEis set, so an agent sandbox with a pseudo-terminal can declare itself unattended, and every prompt in the CLI follows the same rule.gitalso runs with its prompts closed in that case —GIT_TERMINAL_PROMPT=0,GIT_ASKPASS=echoandGCM_INTERACTIVE=never, each only where the caller set nothing — so a missing clone credential fails at once instead of waiting on a terminal prompt or an askpass or credential-manager dialog.sshkeeps its own settings: its batch flag is only reachable throughGIT_SSH_COMMAND, which would override each repository'score.sshCommand(for #711).- A
manifest/roles.yamlthat exists but does not parse now fails the pull for that scope instead of warning and syncing with no role filter at all, for a member with no role as much as for one with a role. The same applies toinitandpush, which each fell back to a guess at the namespaces when any error came out of the loader. The legacy role migration skips with a warning instead of failing, so every command,pullincluded, still loads the config and can fetch the fixed manifest; until it can run, the member holds no role rather than every role, so hooks and MCP servers scoped byroles:reach them no more than skills do. For a member with no active project that fallback meant an unfiltered sync, so a broken manifest delivered every namespace it was written to gate. Only an absent manifest still means "this team does not use roles"; an unreadable or empty file is an error, as it now is formanifest/projects.yamltoo.pushstops at its scan for such a manifest (exit 2) even with--role <ns>, since the scan needs it to tell which namespaces are the member's. teamai members listandteamai projects membersread the roster registered before the reports switch, so a team upgrading past the orphan-branch split no longer sees "No team members registered" while itsmembers/still lives on the default branch. The default-branch copy becomes a read-only inherited root, the way learnings' already was: listed in union with theteamai-reportscopy, with the branch copy winning when the same file exists on both; nothing is copied or deleted, and a coldmembers liststill does not publish the reports branch. Member registration merges against the inherited copy too, so a re-init keeps the originalregisteredAtand projects. Fixes #735.- Cache GC now rejects partial integers such as
12abc, decimals, zero and unsafe integers for--max-bytesand--stale-daysbefore deleting anything. An invalidTEAMAI_CACHE_MAX_BYTESvalue falls back to the default 5 GB limit instead of using a numeric prefix. - Each scope reports only the dashboard sessions recorded in it. Every scope read one machine-wide event log and picked its sessions out by the
cwdthey started in, so a user-scope pull reported every project's sessions to the user team, a project never reported its Copilot sessions (teamai does not record Copilot'scwd), and a session started under a symlinked path (or/tmpfor/private/tmpon macOS) never matched its project. Each event now records a key (a hash, so no path is stored) of the data directory of the scopehook-dispatchresolved, and a report keeps only its own scope's. A session in a directory that resolves to no project (a subdirectory of a non-git project, a git submodule or nested clone) is the user scope's, as for skill usage. A session is reported once, whole, by the scope it started in, even after acdinto another project: its Stop carries the whole transcript's totals, so reporting its later part elsewhere would count them twice. A session ends with its session end or process exit (a process exit recorded right after its session end is the same session), so a later session that reuses its ID (Copilot's fallback ID is the parent process ID) is attributed and counted on its own, even when an earlier release reported that ID for another scope. Events recorded by an earlier release go to the scope theircwdresolves to now (a nested clone under a project is not the project's); events with nocwd, or one removed since, are reported by no one. The usage guide explains how to remove by hand a skill an earlier release reported intostats/<user>.yamlfrom another project (for #785). - Each scope keeps its own snapshots of the dashboard sessions it already reported. They were machine-wide and keyed by session ID, so a session ID reused in another scope (Copilot's fallback ID is the parent process ID) was taken as already reported there and sent nothing. Each scope now keeps its own (
<dataHome>/dashboard/reported-*.json, and~/.teamai/dashboard/user-reported-*.jsonfor the user scope), seeded the first time from the shared~/.teamai/dashboard/reported-*.json, so the first report after the upgrade sends nothing already reported. The shared file is no longer written; after a rollback an earlier release writes it again, and only a scope not yet seeded reads it (for #786). - Usage reporting scopes sessions by path on Windows too. The project/user scope filter compared an event's
cwdagainstprojectRootwith a hard-coded/separator, so on Windows only a session started in the project root itself matched: every session started in a subdirectory was dropped from the project team's report and counted in the user scope's instead, which is the isolation the usage guide promises. Windows paths are also compared case-insensitively, so a drive letter or a directory name spelled with different case in the two sources no longer leaks a project session into the user scope. POSIX paths keep their own rules: case-sensitive, and a\in a filename stays part of the name. teamai tags subscribeandteamai tags unsubscribenow invalidate the pull revision cache, asteamai skill excludealready does, so the nextteamai pullapplies the new subscriptions instead of reporting "Already synced" when the team repo has not changed.teamai pullnow deletes a tombstoned agent under all three render extensions, so the Codex.tomland Kiro.jsoncopies of a removed agent no longer survive on other machines. The cleanup also runs when the team repo rev is unchanged, so an upgrade reaches machines that already pulled the tombstone with an older CLI.teamai remove agents <name>also honoursenabledAgentsand no longer deletes from excluded tools. Fixes #576.teamai remove rules <name>andteamai remove skills <name>now honourenabledAgentsand leave excluded tools untouched, matching the whitelistteamai pullalready applies when it cleans up a tombstoned resource. Fixes #590.teamai pullandteamai mcp injectno longer write team MCP servers into installed tools outsideenabledAgentsor listed indisabledAgents, the same gate skills, rules, agents and hooks already use. Servers injected before the upgrade are left in place, andteamai uninstallstill removes them.teamai import --cache-statusand--cache-gcnow expose their existing JSON output through the CLI--jsonoption.- Course-correction matching normalizes prompts and keywords to Unicode NFC, so composed and decomposed accents match. Stored prompt summaries and the 60-second correction window are unchanged. Fixes #573.
- Course-correction detection matches keywords in space-separated scripts as whole words, so Spanish "segundo" no longer counts as
undo(for #564). teamai doctorno longer assumes TGit before initialization and now exits with code 1 when any diagnostic check fails.- MCP
requiresis resolved fromPATH(including WindowsPATHEXT), soteamai mcp injectno longer skips servers such asuvxon Windows (#540, for #539). - The GitHub and CNB providers resolve their CLI to a launchable absolute path and start it through cross-spawn, so on Windows they no longer answer "installed" while every call fails silently (#520).
enabledAgentsnow also gates CLI builtin deploy, CLAUDE.md-class injects, and last-pull skip-sync targets, so an already-installed tool outside the whitelist is not written to (#510).teamai statuscounts rule files in subdirectories recursively (#437).- Codex Stop-phase contribution hints are deferred to the next prompt, so the host no longer rejects
additionalContext(#441). - Agent version detection launches the agent CLI through cross-spawn, so on Windows an npm-installed agent CLI such as
codebuddy,claudeoropenclaw(a.cmdshim) reports its version instead of an emptyagent_version.
📝 Documentation
- Align the public usage guides, drop internal-only details, and cover the missing commands and configuration (#442).
- Document
teamai projectsin the bilingual READMEs as the lead distribution control, including learnings isolation (#490, for #487).
0.23.0 (2026-09-08)
✨ Features
- Declarative team package management with npm and Claude plugin adapters, team distribution, install hints, and doctor checks; the shipped entry point is
teamai packages install(#380, #428). - First-class Qoder and JoyCode support that preserves personal rules and native metadata (#420, #413).
- ClawPro model configs can be synced, applied, and reported per tool (#393).
contributesupports Japanese course-correction prompts, andsharing.contributeHint.enabledturns the share hint off (#431, #432).- Plugin install commands substitute any scalar field (#400).
🔧 Refactoring
- Project data moves into the
~/.teamai/projects/<slug>/partition, unifying machine data, state, resource cache, and the worktree ownership model (#397, #402, #406). - The top-level
installcommand from the prereleases is nowpackages install(#428).
🐛 Bug Fixes
- Partition migration adds scope locks, clone race protection, a per-worktree MCP manifest, uninstall cleanup, and legacy ownership migration (#414, #417).
- Fix project-scope recall configuration and the self-mode maintenance report paths and refresh (#398, #401).
- Plugin install commands run with Bash, and an unclosed YAML frontmatter delimiter now warns (#399, #409).
- Agent changes are compared using rendered native content, and commits in isolated worktrees skip repository hooks (#411, #422).
- Codex token snapshots are kept per rollout, partial reports preserve existing counters, and MCP inventory is scoped to the current tool (#423, #429, #433).
- push/pull unit tests no longer share the real
.sync-lock, removing the parallel Vitest race (#438).
📝 Documentation
- Align README and the usage guide with the product architecture, trim the agent instructions, and add Contributors (#412, #415, #430, #434).
0.22.0 (2026-09-02)
✨ Features
- Add the GitCode provider (#376).
- Team-controlled commit co-author attribution across AI tools (#365).
- Dashboard gains a knowledge base health report and collects CodeBuddy
toolReject/toolErrorfriction (#368, #336). - The wiki engine adds a WASM tree-sitter AST track for the code knowledge graph (#304).
- The data layout gains an atomic lock and separates
projectAnchorfromworkspaceRoot(#387).
🐛 Bug Fixes
- Cursor rules are written as
.mdcwith derived frontmatter, and stale per-tool agent siblings are cleaned up (#345, #349). - Fix the project-scope doctor env path and Cursor SessionStart workspace root resolution (#348, #353).
- push updates the open PR instead of opening duplicates, and
--skillkeeps other resources' open-PR records (#350, #359). import --dirruns reconcile and deep enrichment, and init always deploysteam-wiki-codebase(#362, #358).- hook-dispatch no longer blocks on a tty prompt, injection scope is unified, and project hooks are isolated across a shared home (#366, #370, #377).
- pull reconciles a diverged team-repo clone without data loss (#367).
- SKILL.md frontmatter handles CRLF, BOM, object values, and malformed metadata (#378, #383).
- Fix vote/contribute hints clobbering each other, clipped KB Health labels, and repeated ClawPro binding prompts in worktrees (#384, #389, #392).
🔧 CI/CD
- npm publishing moves to trusted publishing (#381).
0.21.0 (2026-08-27)
✨ Features
- Support generic private Git hosts and a GitLab provider for self-hosted instances (#301, #307).
- OpenCode syncs skills, rules, subagents, and MCP in both scopes, and receives hooks as a native plugin (#306, #326).
- Add DeepSeek Harness as a supported agent (#319).
- local-agent can install and uninstall MCP servers over the HTTP sync channel (#290).
🐛 Bug Fixes
- Harden Git/GitLab credentials: reject embedded credentials, keep the PAT out of clone URLs and MR fetches, and align the clone timeout (#308, #314).
- Resolve the user home and the built-in agents directory consistently on Windows (#309, #310, #324).
- Fix silent capability loss when upgrading from old versions, verify a cached clone's remote before reuse, and run
gf authfrom a neutral cwd (#311, #329, #312). - push carries
teamai.yamland role-scoped skill changes; pull preserves role isolation for tag subscriptions, keeps pending source config, and syncs newly available agent targets (#323, #338, #337, #340, #343). - uninstall removes managed agents and OpenClaw skills, and the "no workspace dir" warning is silenced when OpenClaw is absent (#339, #347).
- Fix the invalid OpenCode agent configuration generated when recall is enabled (#344).
🔒 Security
- Patch runtime advisories in
simple-gitandjs-yaml(#316).
🔧 CI/CD
- Prereleases publish to their own dist-tag and never to
latest(#317).
0.20.0 (2026-08-20)
✨ Features
- Single-repo mode: a business repository can act as the team repository (#292).
- recall expands keywords bilingually for cross-language retrieval (#302).
🐛 Bug Fixes
- recall reports per-term coverage, and scoring defects, body truncation, and duplicate results are fixed (#289, #297, #298).
- Guard the self/single-repo report flow against resetting the business repository (#299).
- Fix the OpenClaw skill path, manifest enrichment import paths, and container agent id/version detection (#295, #293, #291).
- TGit clone/fetch must use an OAuth token, never a REST-only PAT (#287).
0.19.0 (2026-08-06)
💥 Breaking Changes
teamai initdefaults to project scope and accepts the repository as a positional argument; user scope now requires--scope user(#256).
✨ Features
- The local-agent sync/ack channel installs and uninstalls session hooks and runs
uninstall_teamai(#238, #249, #265). - Add Hermes agent sync, hooks, and configuration support (#269).
- Opt-in inheritance of user-scope resources while keeping scopes isolated by default (#281).
🐛 Bug Fixes
- Simplify project-scope hook injection and dispatch, and skip injection safely when
/bin/shis absent (#272, #274). - WorkBuddy ephemeral directories no longer re-prompt for binding, and prompts are deduplicated per session (#270, #271).
- Stop the command loop after uninstall, detect empty hooks residue, and improve recall's CJK inference, relevance threshold, and query quality (#273, #276, #278).
- Share hints explain the friction that triggered them, and
codebasedrops a stale flag, stale help text, and Chinese strings (#282, #268).
⚡ Performance
- Tighten the hook STDIN timeout, add error guards, and move pull to the background (#275).
0.18.0 (2026-07-30)
✨ Features
- Add the
mcpresource: team-declared MCP servers merge into each AI tool's native format, withteamai mcp list/inject/remove(#252). teamai uninstall --agent <tool>uninstalls a single tool and records the disabled state persistently (#244).- local-agent reads a unified
cmds[]from the sync response (#261).
🐛 Bug Fixes
- MR import tolerates malformed learning frontmatter, and workspace paths are normalized on case-insensitive filesystems (#241, #243).
- Git-provider-only hints no longer leak to HTTP users or users without a matching remote, and total foreground hook time is bounded (#247, #248).
- uninstall removes MCP servers before deleting the manifest and lists the removed servers in the summary (#253, #254).
teamai listcovers every resource type, and env values are masked unless--revealis passed (#255).- Improve project-scope MCP secret resolution,
requirescommand validation, and remote server formats; GUI IDEs receive resolved variable values (#258, #259, #262, #263).
0.17.7 (2026-07-27)
💥 Breaking Changes
- Complete the move to the teamwiki knowledge graph, removing the old domains subsystem, legacy aggregate/codebase-lint, the hidden
domains driftcommand, obsolete flags, and the old CI sync template (#225).
✨ Features
- Add
teamai recall --check, a side-effect-free relevance pre-check (#234). - codebase recall results include
Sources:anchors to the source files (#240). - The local-agent binding prompt is enabled by default (#237).
🐛 Bug Fixes
- pull still refreshes the CLAUDE.md recall block on the "Already synced" fast path (#223).
- hooks inject/remove no longer create root directories for tools that are not installed, and a non-Git team repo directory is re-cloned (#224, #236).
⚡ Performance
- PostToolUse local-agent sync runs in the background (#231).
0.17.6 (2026-07-22)
🐛 Bug Fixes
- Fix duplicate binding cards in the CloudStudio sandbox while keeping the workspace binding prompt (#220).
- Reported workspaces are attributed to the AI tool that installed them, and tool root directories are created before installing workspace resources (#221, #222).
0.17.5 (2026-07-22)
✨ Features
teamai statsadds--by-repoand--by-time, andteamai session savestores and pushes session summaries (#193, #192).- Add the CNB Git provider with interactive login and headless
CNB_TOKENauth (#208). - local-agent re-runs plugins when the backend-supplied commands change (#209).
🐛 Bug Fixes
- Correct the TGit REST auth scheme and standardize on
TGIT_TOKEN(#210, #212). - push clears its timeout timer, and CodeBuddy hooks no longer keep the event loop alive (#211, #214, #218).
- The source manifest stores a Git baseline so imports are genuinely incremental (#215).
- Workspace-scope resources install into project directories and are reported as a full snapshot (#216, #219).
0.17.4 (2026-07-20)
✨ Features
- The Stop hook asks for a citation when recall ran but no document was declared as used (#181).
- local-agent installs, updates, runs, and uninstalls backend plugins, including path mapping (#185, #186, #187).
- Add per-user skill exclusion in local config, applied during pull (#194).
- Add secret redaction, and
contributescores contribution value from session friction (#191, #204). - local-agent workspace binding targets a project instead of a group (#203).
🐛 Bug Fixes
- uninstall cleans the built-in recall agent, rule, and skills, and
agent_typevariants are normalized before reporting (#183, #188). - Avoid opening a duplicate import MR when only metadata changed (#190).
0.17.3 (2026-07-14)
✨ Features
- Add the HTTP local-agent lifecycle, project binding prompt, and WorkBuddy/CodeBuddy support (#152).
- Git users can attach HTTP report/sync/ack sources via
source add-http/remove-http/list(#168). - Add backend request logging, an update cache, a WorkBuddy hook timeout, and a binding-prompt toggle (#166, #172).
🐛 Bug Fixes
- Fix the paths that prevented
contribute-checkhints from firing (#160). - Fix local-agent ids, install paths, resource naming, installed-resource scanning, version reporting, and log identity (#161, #162, #167, #169, #170, #171).
- Scope resource install, uninstall, and hook injection strictly to the requesting tool, and fix hook routing and empty
hook_event_namehandling (#174, #176, #177, #179).
🔧 Refactoring
- Remove the deprecated
/repoHTTP team repository snapshot path (#180).
0.17.2 (2026-07-07)
🐛 Bug Fixes
- The team knowledge recall rule relaxes from
MUSTtoSHOULDwith three explicit skip conditions, and the TodoWrite reminder is softened to match (#158).
0.17.1 (2026-07-06)
✨ Features
- Knowledge base dual-count voting and automated maintenance: adoption detection, multi-device sync, confidence updates, promotion, and pruning (#137).
teamai init --agent <name>limits hook injection to the given tools and accumulates across runs (#155).
🐛 Bug Fixes
- Coding CI triggers on
main, and the default Vitest timeout is raised to reduce CI flakiness (#149, #150).
0.17.0 (2026-07-03)
✨ Features
- Add
teamai hooks list, and unify team-declared and built-in hooks into one data model and reconcile flow (#62, #65). - Build a deterministic codebase knowledge pipeline, plus deep-enrich, graph-aware recall, and the
team-wiki-codebaseskill (#55, #56). - Support a git-free HTTP team source with API keys, machine identity, and hooks-driven agent status reporting (#68).
- Dashboard and stats add Human Intervention, prompt counts, and token usage (#70, #78, #122).
- Isolate user scope when project scope is installed, and add
tclaude/tcodexplus native Codex hooks (#77, #64, #103). - Recall becomes progressive route → context → lookup retrieval with G-document routing and multi-hop analysis (#102).
- MR import supports incremental updates from a facts cache, and import gains structured progress and English-only output (#112, #117).
- Recall can be toggled by a team default with a local override (#126).
🐛 Bug Fixes
- Fix TGit argument quoting, CodeBuddy tool-name normalization, batch import races, and path traversal (#60, #66, #67, #74).
- Fix batches of recall, knowledge graph, reconcile, and scope isolation defects (#91, #97, #98).
- Fix Dashboard prompt/token counts and duplicate dispatch, and fix project-scope usage/digest reporting (#105, #107, #108, #109, #111, #118).
- doctor, init, hooks, and built-in skill deployment skip targets that are absent or disabled (#116, #128, #135).
- Version comparison handles prerelease identifiers correctly (#147).
🔧 Refactoring
- Decommission the old
teamai-wikiskill and thewiki/resource type (#90). - Remove the auto-recall PostToolUse hook in favor of the
teamai-recallsubagent (#106).
0.16.9 (2026-06-25)
✨ Features
- Add
teamai ci extract-mr: extract learning and codebase suggestions from an MR/PR, with comment, write, and reaction-based rejection modes (#36, #39). teamai doctoraddsghCLI install and login checks for the GitHub provider (#45).
🐛 Bug Fixes
uninstallcleans every TeamAI section from CLAUDE.md (#33).- Values written to
env.share shell-quoted (#40). - Remove project-scope hooks left behind in user-level tool settings (#44).
0.16.8 (2026-06-18)
✨ Features
- Add knowledge import and codebase maintenance covering local directories, workspaces, MR/PR, iWiki, repository lists, and organization-wide imports (#28).
- Add the
agentsresource and the built-inteamai-recallsubagent, plus TodoWrite and merged-MR hints (#28). contribute-checkadds knowledge gap awareness, recall quality scoring, and git-commit down-weighting (#30).
0.16.7 (2026-06-12)
✨ Features
- Merge the TeamAI commands for one hook event into a single
hook-dispatchprocess (be158d4). - The first session after an upgrade migrates legacy standalone hooks to the dispatch format (
b0edb75). teamai initshows the actual user/project storage paths before asking for a scope (843ed79).
0.16.6 (2026-05-27)
🐛 Bug Fixes
- The release pipeline moves to Node.js 22, and
NPM_TOKENauth is restored after the OIDC trusted publisher attempt so npm publishing works.
0.16.5 (2026-05-27)
✨ Features
- An environment variable disables wiki pull, push, and built-in skill deployment, and
statusshows the disabled state (#22).
🐛 Bug Fixes
- Unify wiki skill path resolution and
teamai pushscope logic, fixing wrong paths under project scope (#15).
0.16.4 (2026-05-19)
💥 Breaking Changes
- The wiki moves from per-agent directories to a shared location:
~/.teamai/wiki/for user scope and<projectRoot>/.teamai/wiki/for project scope (#9, !186).
🐛 Bug Fixes
- Exclude a nested
.gitwhen copying skills so no gitlink/submodule is created (#12). - Disable file-level parallelism in the GitHub E2E run, fixing the missing
dist/index.jscaused by concurrent cleanup (#5).
📝 Documentation
- English is the default README on GitHub, and the Chinese version moves to
README.zh-CN.md(#2, #3, #4).
0.16.3 (2026-05-09)
🐛 Bug Fixes
- pull filters rules by the current role's knowledge namespaces; root-level rules are always kept, and everything syncs when no role is configured (!182).
🔧 Refactoring
- Normalize npm package metadata: drop the redundant
./in thebinpath and standardize the repository URL.
📝 Documentation
- Update the project tagline to "The team harness for AI agents" (!180, !181, !184).
0.16.2 (2026-05-01)
⚡ Performance
- Optimize Stop hooks: shorten the update timeout, add a
contribute-checkfast path and score cache, and lower the Dashboard JSONL compaction threshold (!176).
0.16.1 (2026-04-29)
🐛 Bug Fixes
- Ensure
SKILL.mdfrontmatter during pull and built-in skill deployment so Codex does not refuse to load them (!177).
📝 Documentation
- Update to the Tencent MIT License, remove ROADMAP/TODOS, and add open-source badges plus a full English README (!170, !171, !172, !174, !175).
0.16.0 (2026-04-27)
💥 Breaking Changes
teamai listnow shows both the team repository and installed agents;--source reporestores the old behavior (!162).
✨ Features
- The provider for a bare
owner/repois inferred from the installed package name, andTEAMAI_DEFAULT_PROVIDERoverrides it (!161). - Add the built-in
/wikiskill with multi-source ingestion, incremental updates, query, check, and export (!117). teamai listadds--sourceand--agent, plus theteamai skill list/showcommands (!162).teamai.yamladds a team-levelautoUpdatepolicy, andteamai push --skillsupports force-push and recursive skill scanning (!164, !167).
🐛 Bug Fixes
- Complete wiki repository push, failure rollback, remove, and tombstone cleanup (!163).
- Fix built-in wiki skill detection, hidden/workspace directory scanning, and false "modified" reports (!168, !169).
0.15.0 (2026-04-20)
💥 Breaking Changes
- The default provider for a bare
owner/repobecomes GitHub; TGit users need a full URL or an explicit provider (!156). - The public package is
teamai-cli; internal tnpm releases restore the@tencent/teamai-cliname (!156).
✨ Features
- Add the GitHub provider with
gh/GITHUB_TOKENauth, clone, repository creation, and pull requests (!156). - Add dual-channel npm/tnpm publishing, and let the update check pick the registry from the package name (!156).
🐛 Bug Fixes
- Detect
main/masterdynamically, fixing GitHub push, branch cleanup, and PR creation (!156). doctorreads project-scope config first, andsource addclones through the matching provider (!156).
🔧 CI/CD
- GitHub Actions adds a Node 20/22 × Ubuntu/macOS matrix and E2E coverage for the main commands; Coding CI is hardened to match (!157, !158).
0.14.4 (2026-04-17)
✨ Features
- Dashboard cards show the AI output, first prompt, and last prompt by default, with Markdown rendering (!153, !154).
- Session states become
AI Working,Your Turn, andEnded(!153).
🐛 Bug Fixes
- push syncs teammates' updates before scanning while keeping real local edits, so resources are no longer reported as modified (!152).
- Dashboard cards sort stably by total runtime (!151).
0.14.3 (2026-04-17)
🐛 Bug Fixes
- The Stop hook waits for user input and monitors the AI tool process, ending the session only after that process exits (!149).
- The CodeBuddy team instruction path is corrected from
.codebuddy/CLAUDE.mdto.codebuddy/CODEBUDDY.md(!150).
[0.14.2] (2026-04-16)
🐛 修复
- pull role filtering: 修复当团队无
tags.yaml或用户无 tag 订阅时,teamai pull同步角色外命名空间 skills 的问题 (!148)
[0.14.0] (2026-04-16)
✨ 新功能
- 跨团队 Skill 订阅(Cross-team Source):
teamai source add/remove/list/browse订阅其他团队的公共 skill 仓库,pull 时自动同步订阅源的 skills (!141)teamai source add <repo> [--name <alias>]— 添加订阅源teamai source remove <name>— 移除订阅源并清理其 skillsteamai source list— 列出已配置的订阅源teamai source browse <name>— 浏览订阅源的公共 skills
- 团队文化注入(Culture Engine Phase 1):在团队仓库创建
culture.md,teamai pull时自动编译并注入到各 AI 工具的CLAUDE.md中 (!84)- 支持 YAML frontmatter 定义公司/团队信息(name, mission, vision, values, goals)
- Markdown body 部分作为团队文化指引正文注入
- 通用 CLAUDE.md section 注入工具(
utils/claudemd.ts),被 rules 和 culture 共用
- Uninstall 命令:
teamai uninstall [--force]智能清理所有 teamai 管理的资源(hooks、CLAUDE.md 块、skills、rules、env、docs、~/.teamai/),保留用户自建内容,支持--dry-run预览 (!137) - Dashboard 全生命周期会话展示:dashboard 新增完整 session 生命周期追踪,支持展开查看会话详情(prompt 摘要、工具调用序列、时间线) (!140)
- codex-internal 工具支持:hooks 注入和资源同步新增对 codex-internal 的适配,与 claude-internal 同等待遇 (!143)
- CLAUDE.md 团队知识库引用:pull 时自动在 CLAUDE.md 中添加
~/.teamai/learnings/目录引用,AI 工具可直接发现团队知识库 (!139) - Init 非交互模式:新增
--role <id>和--force参数,支持完全非交互式初始化,适合 CI/CD 和 AI agent 自动化 (!138)teamai init --repo owner/repo --scope user --role hai_dev --force- 非 TTY 环境下自动使用默认值,不再 hang
- 共享 Prompt 工具:统一 6 个模块(init/uninstall/update/remove/push/roles-cmd)的 readline 实现为单例模式,修复管道输入兼容性问题 (!138)
- Push 交互式命名空间选择:推送新 skill 时,CLI 自动检测团队仓库中的命名空间并提供交互式选择,无需手动指定
--role(!128)- 有
primaryRole时,从 manifest 展开可用 namespace 列表 - 无
primaryRole时,自动扫描团队仓库目录结构 - 单一命名空间时自动选中,
--silent模式下使用默认值
- 有
- Push 自动注入 YAML Frontmatter:推送 skill 时自动检查
SKILL.md,缺少name/descriptionfrontmatter 则自动补全 (!130)- 从目录名推导
name,从第一个标题或有意义文本行推导description - 已有完整 frontmatter 的文件不做任何修改
- 从目录名推导
🐛 修复
- Pull cache 失效修复:切换 role 后自动清理过期 skills 缓存,确保新角色立即生效 (!142)
- Learnings 改为扁平共享模型:learnings 不再按角色 namespace 隔离,全团队共享 (!126)
- Push role 模式过滤修正:修复 role 模式下误显示非允许命名空间 skill 的问题 (!127)
- Push 支持无 role 的 namespaced 仓库:无
primaryRole配置时也能正确推送到有命名空间结构的团队仓库 (!129) - Votes 不再阻塞 push:votes 改为本地存储(
~/.teamai/votes/),由teamai pull的 auto-report 统一同步到团队仓库,不再直接写入 repo 导致脏文件阻塞 git 操作 (!131) - Pull 跳过未安装的 AI 工具:pull 时检测工具是否已安装,跳过未安装工具,不再创建多余的空目录 (!132)
- Team repo 自动恢复:push/pull 前自动检测并恢复 team repo 的脏状态(unmerged 文件、残留 push 分支),使用
git reset --hard+ 切回 master (!133, !134) - Auto-recall 误判修复:修复源代码中的错误关键词被 auto-recall 误判为运行时错误触发搜索的问题 (!135)
0.13.2 (2026-04-10)
🐛 修复
- 修复 Cursor hooks.json 中残留已废弃的
userPromptSubmit事件 key 导致 "Invalid hooks.json" 报错的问题 (!122)
0.13.3 (2026-04-10)
✨ 新功能
- Roles CRUD 命令:新增
teamai roles add/remove/update,管理员无需手动编辑 YAML 即可管理团队角色 (!125)teamai roles add <id> --namespaces <ns> [-d <desc>]— 添加角色teamai roles remove <id>— 删除角色teamai roles update <id> --add-namespaces/--remove-namespaces— 修改角色
🐛 修复
- Pull 安全降级:成员配置的角色被删除后,pull 不再崩溃,改为 warn + 回退全量同步 (!125)
- Push namespace 解析:从 manifest 读取实际 namespace 列表,不再错误地将 role id 当作 namespace (!125)
🔧 重构
- 抽出
pushManifestChange()和pullLatest()共用函数,消除rolesInit中的重复代码 (!125) - 新增
saveRolesManifest()含写前校验,防止写入非法 manifest (!125)
0.13.1 (2026-04-09)
✨ 新功能
- Roles 管理:新增
teamai roles命令组(init/list/set),支持团队角色的创建、列举和切换 (!113) - Role-aware Skill 同步:
teamai pull/push支持按角色过滤 skill,不同角色看到不同的技能集 (!100) - Local Pushignore:skill 目录支持
.pushignore文件,push 时自动排除不需要同步的本地文件 (!114) - Marketplace 自动刷新:skill push/remove 后自动刷新
.codebuddy-plugin/marketplace.json,兼容 CodeBuddy 插件市场 (!119)
🐛 修复
- 修复 roles manifest 缺失时
teamai initrole 选择报错的问题 (!112) - 修复 auto-recall 对自身输出产生递归误报的问题 (!111)
- 修复 auto-recall 搜索精度不足,新增 title/tag 匹配要求,跳过只读命令 (!104)
- 修复 Stop hook 使用错误的 output schema(
hookSpecificOutput→stopReason)(!107, !108)
⚡ 性能优化
- Team Repo 同步加速:当 team repo HEAD 未变化时跳过资源同步,避免无意义的文件扫描 (!110)
- Auto-recall 精准匹配:matcher 从通配符
*收窄为 4 个精确工具,减少不必要的触发 (!106)
♻️ 重构
- 统一 recall 机制 — hook 搜索工具,删除 session-recall 和 recall rule (!102)
contribute-check从 PostToolUse hook 迁移到 Stop hook,减少每次工具调用的开销 (!103)role bucket重命名为namespace,语义更清晰 (!105)
📝 文档
- 添加 CLAUDE.md 项目说明和发布流程 (!97)
- 文档中 tnpm 替换为标准 npm + --registry (!118)
0.9.1 (2026-03-30)
🔧 修复 debug.log 始终为空的问题
~/.teamai/debug.log 现在能正确记录所有 hook 运行时的调试和错误信息,方便排查 teamai 后台行为。
问题根因
Hook 命令通过 2>>~/.teamai/debug.log 捕获 stderr,但代码中所有日志(包括错误)都写到 stdout(console.log),且 --verbose 默认关闭——三重静默导致 debug.log 永远为空。
修复方案
- File Transport:所有
log.debug()和log.error()调用现在同时写入~/.teamai/debug.log,不再依赖 shell 的 stderr 重定向 - ISO 时间戳:每行日志带
2026-03-30T06:32:14.123Z [DEBUG]格式前缀 - 错误级别拆分:catch 块中的失败信息从
log.debug改为log.error,方便grep ERROR ~/.teamai/debug.log快速定位问题 - 自动 Rotation:debug.log 超过 5MB 自动轮转为
debug.log.1,总占用不超过 10MB - 同步写入:使用
appendFileSync确保短命 hook 进程不丢日志
使用方式
# 查看最近的调试日志
tail -20 ~/.teamai/debug.log
# 快速找错误
grep ERROR ~/.teamai/debug.log
0.9.0 (2026-03-29)
🔌 内置规则自动部署 — AI 工具零配置接入团队知识库
teamai pull 现在会自动将 CLI 内置的 AI 规则(rules)部署到所有已安装的 AI 工具目录中,团队成员无需手动配置,pull 一次即可让 Claude Code / Cursor 等工具自动搜索团队知识库。
工作原理
teamai pull执行时,自动检测已安装的 AI 工具(Claude Code、Cursor 等)- 将内置规则写入各工具的
rules/目录:~/.claude/rules/teamai-recall.md~/.claude-internal/rules/teamai-recall.md~/.cursor/rules/teamai-recall.md
- 规则内容随 CLI 版本更新,每次 pull 自动同步最新版本
首个内置规则:teamai-recall
该规则指导 AI 在遇到错误、部署问题或不熟悉的模式时,先搜索团队知识库再从零开始解决:
teamai recall "API timeout retry"
teamai recall "K8s OOM pod restart"
设计要点
- 零配置 — pull 即生效,团队成员不需要手动复制规则文件
- 跳过未安装工具 — 自动检测,只部署到已安装的 AI 工具
- 与团队规则隔离 —
teamai push不会误将内置规则推送到团队仓库 - 可扩展 — 后续可轻松添加更多内置规则
完善知识飞轮闭环
contribute(写入) → pull(同步+索引+部署规则) → AI 自动 recall(搜索) → upvote(投票)
↑ NEW
0.8.1 (2026-03-28)
Digest 隐私改进 + Skill 动态展示
隐私改进
- 移除 digest 中的个人可推断信息 —
(142 uses by 3 member(s))→(142 uses),小团队中不再能反推谁用了什么 - 移除 skill 推荐中的百分比 —
used by 57% of team→popular with your team,同理保护隐私
新功能
- Digest 新增 Skill 动态 —
teamai digest现在展示近 7 天新增和更新的 Skill- 🆕 New Skills This Week — 新创建的 skill,显示作者
- 🔄 Recently Updated Skills — 有内容更新的 skill
- 数据来源:team repo 的 git log,零额外配置
示例
🆕 New Skills This Week:
• hai-gpu-sold-report (by jeffyxu)
• hai-prod-db (by keitewang)
🔄 Recently Updated Skills:
• tke-deploy
• hai-deploy-quick
• tapd-tech-design
0.8.0 (2026-03-28)
🧠 Git-Native Memory — 团队知识回忆系统
借鉴 vectorize-io/hindsight 的 retain/recall 记忆模型,为 teamai 补全知识飞轮的"读出路径"。之前通过 /teamai-share-learnings 贡献的经验文档写了没人看,现在 AI 可以通过 teamai recall 自动搜索和引用。
知识飞轮闭环: contribute(写入) → pull(同步+索引) → recall(搜索) → upvote(投票) → 排序优化
新功能
teamai recall <query>— 搜索团队知识库,返回按相关性排名的结果 (!81)- Pull 自动同步 learnings —
teamai pull现在会同步learnings/目录到本地,并自动重建搜索索引 - Hybrid 中英文搜索 — Intl.Segmenter 拆分英文词 + CJK bigrams 捕捉中文复合词(如"超时""排查"),解决纯 Segmenter 把中文拆成单字的问题
- 搜索自动投票 — recall 返回结果时自动为文档投票(
votes/<user>.yaml),好文档随时间自然浮到顶部 - Frontmatter 标准化 — SKILL.md 模板要求 AI 生成的文档包含
title/author/date/tagsYAML frontmatter,提升搜索精准度
搜索评分规则
| 匹配类型 | 分值 | 说明 |
|---|---|---|
| 标题命中 | ×3 | frontmatter title 中的词匹配 |
| 标签命中 | ×2 | frontmatter tags 中的词匹配 |
| 正文命中 | ×1 | 文档正文(前 2000 字)中的词匹配 |
| 投票加分 | +0.5/票 | 每票 +0.5,上限 5 分 |
示例
$ teamai recall "fuse 端口"
--- [teamai:recall:start] --- (1 result)
[1/1] MR 审查发现 FUSE 端口冲突 Bug 及 UpdateInferService 接口测试验证 ★1
Author: jeffyxu | Date: 2026-03-28 | Score: 18.5
Tags: troubleshooting, code-review, tdd, hai_flow, fuse, k8s
File: ~/.teamai/learnings/mr审查发现fuse端口冲突bug及...md
--- [teamai:recall:end] ---
技术细节
| 文件 | 说明 |
|---|---|
src/utils/search-index.ts |
搜索引擎核心:hybrid tokenize, buildIndex, loadIndex, search |
src/recall.ts |
recall CLI 命令 + autoUpvote |
src/types.ts |
LearningDoc, SearchIndex, UserVotes 类型 |
src/pull.ts |
learnings 同步 + 索引重建(内联实现,不继承 ResourceHandler) |
src/team-push.ts |
auto-report 扩展:投票数据随 pull 捎带推送 |
测试: 29 个新测试,全量 444 通过。
设计文档: docs/designs/git-native-memory.md
0.7.1 (2026-03-28)
改进 contribute 经验分享系统
目录重命名: ai-docs/ → learnings/,语义更清晰。
smartScore 评分修复: 之前的评分逻辑导致提醒从未触发(13 个 session,0 个达标)。
- 新增 toolCount 梯度维度(30→10, 50→15, 80+→20,max 20 分)
- Skill/Error 权重从 25 分降至 15 分(大多数有价值 session 不一定用到)
- 阈值从 60 降至 35
- 真实数据验证:7 个历史 session 中 6 个可触发(之前 0 个)
文件名格式: data-<slug>-<random>.md → <slug>-<date>-<random>.md,加入日期便于辨识。
中文文档模板: SKILL.md 改为中文模板,AI 生成的经验文档默认中文撰写。
测试: 新增 2 个测试用例(toolCount gradient + 典型 session 集成),全量 12 个 contribute-check 测试通过。
0.7.0 (2026-03-28)
🚀 teamai hooks 子命令 + update 钩子刷新修复
CLI 升级后新钩子永远无法自动注入的 bug 终于修复。根因:update.ts 在 npm install -g 后直接调用内存中的 injectHooksToAllTools(),但 Node.js 进程仍加载旧版代码,新版代码在磁盘上却不会被重新加载。
新命令:
teamai hooks inject— 将 teamai 钩子注入所有 AI 工具的 settings 文件(支持--silent静默模式)teamai hooks remove— 从所有 AI 工具的 settings 文件中移除 teamai 钩子
Bug Fix:
teamai update安装新版后,改为 spawnteamai hooks inject --silent子进程,确保加载磁盘上的新版代码,而非旧进程内存中的过时代码
Doctor 增强:
teamai doctor钩子检查从只检查pull/ description prefix 改为校验全部 6 个子命令(pull, update, track, track-slash, dashboard-report, contribute-check)- 缺失子命令时建议运行
teamai hooks inject
新 CLI 命令:
| Command | Description |
|---|---|
teamai hooks inject |
注入 teamai 钩子到所有 AI 工具 settings |
teamai hooks remove |
移除所有 AI 工具 settings 中的 teamai 钩子 |
测试:
- 新增 11 个测试用例(hooks-cmd 7 + doctor 4),全量 413 测试通过
For Existing Users:
无需手动操作。下次 teamai update 时新版代码会正确刷新钩子。如需手动修复,运行 teamai hooks inject。
0.6.2 (2026-03-27)
Improvements
- contribute-check: rename
hinted→evaluated, addsmartScorefield (!78)hinted语义不准确(实际含义是"已评估"而非"已提示用户"),重命名为evaluated- 新增
smartScore字段,持久化评估分数便于排查 session 为何未触发 hint readContributeState向后兼容旧格式,自动迁移hinted→evaluated- Cursor 端补上遗漏的
contribute-checkhook
0.6.1 (2026-03-27)
Bug Fixes
- contribute-check: per-session state files to prevent multi-window overwrite (!77)
contribute-state.json单文件被多窗口互相覆盖,toolCount 反复归零- 改为
~/.teamai/sessions/{sessionId}.json,每个 session 独立文件,零竞争 - 写入时自动清理超过 24h 的旧 session 文件
CONTRIBUTE_BASE_THRESHOLD从 100 降到 50,匹配实际 session 工具调用分布
0.6.0 (2026-03-27)
🚀 Session 经验自动分享
AI coding session 中使用超过 100 次工具调用时,系统智能评估 session 价值并提示用户分享经验给团队。
工作原理:
AI coding session
│
▼ PostToolUse hook 每次工具调用自动计数(~1ms)
│
├─ < 100 次 → 静默计数
│
▼ 达到 100 次 → 智能评分
│
├─ 分数不够(只是重复调用同一个工具)→ 不打扰
│
▼ 分数达标(工具多样、用了 skill、有错误重试、session 够长)
│
AI 提示:"本次 session 内容丰富,建议运行 /teamai-share-learnings 分享经验"
│
▼ 用户同意 → AI sub-agent 生成摘要 → push 到团队仓库 ai-docs/
新命令:
teamai contribute --file <path> --title <title>— 将经验文档推送到团队仓库ai-docs/目录teamai contribute-check --stdin— hook 内部使用,智能阈值检测
内置 Skill:
/teamai-share-learnings— AI sub-agent 总结 session 经验并推送到团队仓库- 随
teamai pull/init自动部署到本地,CLI 升级时 skill 内容跟着更新 teamai push自动排除内置 skill,不会推到团队 repo
智能评分机制:
- 工具多样性(用了多少种不同工具)— 最高 30 分
- Skill 使用(触发了复杂工作流)— 25 分
- 错误和重试(踩坑经验更有价值)— 25 分
- Session 时长(> 30 分钟)— 20 分
- 总分 ≥ 60 才触发提示
性能设计:
- 两层检测:前 99 次只读写小 JSON state 文件(~1ms),不读 events.jsonl
- 达到 100 次时一次性读取 events.jsonl 做智能评估
- 每个 session 最多提示一次(去重),用户可忽略
技术细节:
- 新增
contribute-check.ts(阈值检测 + STDOUT hint)、contribute.ts(push 命令)、builtin-skills.ts(内置 skill 自动部署) - 修改
hooks.ts(新增 PostToolUse contribute-check hook)、pull.ts/init.ts(内置 skill 部署) - 15 个新单测 + 更新现有 hooks 测试
0.5.2 (2026-03-26)
Bug Fixes
- clean up stale local rule files during pull (merge request !71) (30a4662)
teamai pull现在会自动清理本地已从 team repo 删除的 rule 文件- 之前从 team repo 删除 rule 后,本地
~/.claude/rules/等目录会残留过期副本 - 清理逻辑:对比本地
.md文件与 team repo,删除上游已不存在的文件 - 自动清理删除后留下的空子目录
- 仅影响
.md文件,其他文件类型不受影响 - 新增 5 个测试用例覆盖各种清理场景
0.5.1 (2026-03-25)
Bug Fixes
- skip tracking slash commands for non-existent skills (merge request !70) (8eb2778)
- 输入
/data等不存在的 skill 不再被计入teamai stats统计 - 新增
skillExistsOnDisk()检查,验证 SKILL.md 存在后才记录 - 仅影响 slash command 路径,Skill tool 调用不受影响
- 输入
0.5.0 (2026-03-25)
🚀 AI Coding Session Dashboard (Phase 1)
新增 teamai dashboard 命令,在浏览器中实时展示所有 AI coding session 的状态。解决多窗口 Alt+Tab 切换的痛点。
新命令:
teamai dashboard— 启动本地 Web UI(默认 localhost:3721),展示 session 状态卡片teamai dashboard -p <port>— 自定义端口teamai dashboard-report --stdin --tool <name>— hook 内部使用,上报 session 事件
Dashboard 功能:
- 🟢🟡🔴⚪ 状态灯:running / waiting / error / idle
- Session 卡片展示:工作目录 (cwd)、首个 prompt 摘要、最后使用工具、活动时间
- SSE 实时推送,延迟 < 3 秒
- Session 识别:session_id 优先 + PID+cwd fallback
- 自动清理:Stop hook + 5 分钟 idle 超时 + 30 分钟移除
- JSONL 事件日志 + 超过 10,000 行自动 compact
- 暗色主题 Web UI,零新依赖(Node.js 内置 http 模块)
Hook 变更:
- 新增 4 个独立 dashboard hooks(SessionStart / PostToolUse / UserPromptSubmit / Stop)
- 与现有 usage tracking hooks 完全解耦,可独立开关
Features
- add AI coding session dashboard (Phase 1) (merge request !69) (25308dd)
Bug Fixes
- cleanup all teamai hooks (including outdated descriptions) before re-inject (8352449)
- usage tracking tool field + auto hook cleanup (merge request !68) (3086278)
- usage tracking tool field correctly identifies each AI tool (merge request !67) (dfd51ca)
[0.4.7] - 2026-03-24
Fixed
- 彻底清理重复 hooks:
cleanupLegacyHooks现在清理所有命令含 teamai 的条目(无论有无 description),修复了 description 关键词改名(如 "Check for updates" → "Auto-update")导致的重复问题
Tests
- 新增过时 description 清理测试,全量 340 测试通过
[0.4.6] - 2026-03-24
Fixed
- Usage tracking
tool字段归因修复:hook 命令从teamai track --stdin改为teamai track --stdin --tool <name>,每个工具的 settings.json 注入各自标识(claude / claude-internal / codebuddy 等),usage 数据不再全部记为'claude' - 清理遗留重复 hooks:早期版本注入的 hook 无
description字段导致重复堆积,新增cleanupLegacyHooks()在注入前自动清理,非 teamai hook(如 continuous-learning)不受影响
Added
- Update 后自动刷新 hooks:
teamai update成功安装新版后自动调用injectHooksToAllTools(),老用户无需重新teamai init,未初始化则静默跳过 track/track-slashCLI 命令新增--tool <name>option,缺省默认'claude'(向后兼容)
Tests
- 新增 17 个测试:--tool 参数传递、向后兼容、hook 命令字符串验证、遗留 hook 清理、非 teamai hook 保留、update 后 hooks 刷新
- 全量 317 测试通过,零回归
For Existing Users
无需任何手动操作。下次 session 结束时 Stop hook 触发 teamai update → 自动安装新版 → 自动刷新 hooks + 清理重复条目。
[0.4.5] - 2026-03-24
Added
- Slash Command 使用追踪:新增
UserPromptSubmithook 检测/slash-command调用(如/plan-eng-review、/tdd),自动记录到usage.jsonl- 新增
teamai track-slash --stdinCLI 命令,解析 Claude Code 的UserPromptSubmithook JSON - 支持冒号命名空间格式(如
/gstack:tdd) teamai init自动注入UserPromptSubmithook 到 Claude Code settings.json
- 新增
Fixed
- Usage 上报竞态条件:
reportUsageToTeam改为先git pull获取最新远端 stats 再合并本地数据,防止并发 push 时相互覆盖导致数据丢失
Changed
- Hooks 注入重构:
hooks.ts从 200+ 行嵌套 if/else 重构为数据驱动的CLAUDE_HOOKS[]数组 + 通用ensureClaudeHook()函数,新增 hook 只需加一行定义 stats.ts和team-push.ts之间新增交叉引用注释,标注两处 merge 逻辑的关联
Tests
- 新增 8 个 trackSlashCommand 测试:合法追踪、冒号命名空间、非 slash 忽略、空 prompt、空 STDIN、畸形 JSON、known-skills 更新
- 全量 302 测试通过,零回归
For Existing Users
存量用户下次 teamai pull 或重新运行 teamai init 后,UserPromptSubmit hook 会自动注入,无需手动操作。
[0.4.4] - 2026-03-22
Added
- Cursor Skill 使用追踪:通过 postToolUse hook (matcher:
Read) 检测 SKILL.md 文件读取,自动记录 Cursor 用户的 skill 使用到usage.jsonlteamai init自动注入 postToolUse hook 到 Cursor 的hooks.jsonUsageEvent.tool字段区分cursor/claude,支持按工具来源分析使用数据- 适配 Cursor 原生 STDIN 格式(
file_path字段),经实际 hook 触发验证
- Hook 自动更新:stop hook 从
teamai update --check改为teamai update,支持根据 updatePolicy 自动安装更新(不再仅打印提示)doUpdate通过 TTY 检测区分 hook/手动模式,非 TTY 环境下 prompt 策略自动降级为提示
Tests
- 新增 7 个测试:Cursor Read + SKILL.md 路径追踪、file_path 原生格式、非 SKILL.md 忽略、工具来源标记验证
- 全量 294 测试通过,零回归
For Existing Users
存量 Cursor 用户需重新运行 teamai init 以注入 postToolUse hook。Claude Code 用户无需操作,hook 会在下次会话结束时自动更新。
[0.4.3] - 2026-03-22
Fixed
- Stats 数据每次上报后丢失(Critical):
reportUsageToTeam每次teamai pull时直接覆写stats/<user>.yaml,不与历史数据合并,导致之前累积的统计全部丢失。修复后先读取已有 stats 文件,count 累加、lastUsed 取更新值 teamai stats在 pull 后显示空数据:showStats只读usage.jsonl(每次成功上报后被 truncate 清空),导致用户看到 "No skill usage data yet"。修复后同时读取本地usage.jsonl(未上报事件)+ 团队仓库stats/<user>.yaml(已上报历史),合并展示完整统计- Skill 名提取字段兼容性不足:
extractSkillName仅检查skill/name字段,遗漏部分 AI 工具的 hook 格式- 新增
skill_name、command字段支持 - 支持从 SKILL.md 文件路径(如
/root/.cursor/skills/tdd/SKILL.md)中自动提取 skill 目录名
- 新增
Tests
- 新增 17 个测试用例:mergeStats 合并逻辑(4)、extractSkillName 多格式提取(9)、边界条件(4)
- 全量 288 测试通过,零回归
[0.4.2] - 2026-03-20
Fixed
- Skill 使用追踪完全失效:PostToolUse hook 通过环境变量 (
$CLAUDE_TOOL_NAME) 读取数据,但 Claude Code 实际通过 STDIN JSON 传递。hook 每次收到空参数,从未记录任何真实 skill 使用事件- 新增
teamai track --stdin模式,从 STDIN 读取 Claude Code hook JSON 并解析tool_name/tool_input - Hook 命令从
'teamai track "$CLAUDE_TOOL_NAME" ...'改为'teamai track --stdin' - 旧 CLI 参数方式仍兼容,支持手动测试
- 新增
- Skill 推荐始终显示 "you haven't tried it":
usage.jsonl上报到团队仓库后被 truncate 清空,但推荐引擎只读usage.jsonl,丢失全部历史数据- 新增
~/.teamai/known-skills.json持久化已用 skill 集合,不受 truncate 影响 - 推荐引擎合并
usage.jsonl(未上报事件)+known-skills.json(历史记录)两个数据源
- 新增
- Hook 错误不再静默丢弃:stderr 从
/dev/null改为追加到~/.teamai/debug.log,方便排查
For Existing Users
存量用户下次 teamai pull 时 hook 会自动升级为 --stdin 模式,无需手动操作。
[0.4.1] - 2026-03-20
Fixed
scanLocalForPush()crash bug:遍历toolPaths时缺少toolPath.skillsnull 检查,当工具配置没有skills字段时teamai push会崩溃 (TypeError)。该 bug 在 v0.3.13 重构时遗漏 (!61)ToolPathsSchema.skills从 required 改为 optional,与运行时防御性检查一致
Removed
- 清理
syncTargets僵尸配置:v0.3.13 已改为自动检测工具,但syncTargets残留在 schema、init、28+ 处测试中。全部清除 init生成的teamai.yaml不再包含sharing.skills.syncTargets字段
[0.4.0] - 2026-03-19
Added
- Skill Usage Tracking: PostToolUse hook 自动追踪 Skill 工具调用,写入
~/.teamai/usage.jsonlteamai track <toolName> [toolInput]— hook 调用的底层命令,自带 skill name 校验(防 path traversal)teamai stats— 查看本地 skill 使用统计(次数 + 最近使用时间)teamai init自动注入 PostToolUse hook 到 Claude Code / Claude Internal / CodeBuddy 的 settings.json
- 团队 Usage 自动上报:
teamai pull时自动聚合本地 usage 数据为stats/<user>.yaml并 git push 到团队仓库- Best-effort 策略,5s 超时,失败不阻塞 session 启动
- 上报成功后自动截断本地 JSONL,文件永远很小
- Skill Health Score: 两维评分 = usage(0-60) + freshness(0-40),0-100 分显示为 ★★★★★
- Skill 推荐:
teamai pull后自动推荐团队热门但用户未使用的 skill - Session 记录:
teamai save-session [--summary "..."]收集会话工具使用记录并评估价值- 有价值(含错误/重试/踩坑)的 session 标记为可推送
- 按月聚合存储到
~/.teamai/sessions/<year-month>.md
- 团队周报:
teamai digest生成团队 AI 工具使用周报(最热 skill、活跃成员、session 摘要) - 新增设计文档
docs/designs/team-intelligence-platform.md - 新增
TODOS.md记录延迟工作项
New CLI Commands
| Command | Description |
|---|---|
teamai track |
追踪工具使用(PostToolUse hook 调用) |
teamai stats |
查看本地 skill 使用统计 |
teamai save-session |
保存会话工具使用摘要 |
teamai digest |
生成团队周报 |
For Existing Users
存量用户需重新运行 teamai init 以注入 PostToolUse hook。
[0.3.14] - 2026-03-19
Added
- 自动更新功能:新增
teamai update [--check]命令,支持从 tnpm 检查并安装最新版本- 24 小时版本检查缓存,避免频繁请求 registry
- 可配置更新策略:
auto(自动安装)、prompt(提示确认)、skip(跳过) - PID 文件锁防止并发安装冲突
- Session 结束自动检查更新:
teamai init自动注入 Stop/SessionEnd hook,AI 工具会话结束时自动检测新版本
[0.3.13] - 2026-03-17
Added
- OpenClaw 支持:skills 和 rules 自动同步到
~/.openclaw/skills/和~/.openclaw/rules/(!57)
Changed
- Skills sync 改为自动检测已安装工具,不再依赖
syncTargets配置 (!58)- 遍历所有
toolPaths并通过isToolInstalled检测~/下目录是否存在 - 新增工具无需修改
teamai.yaml即可自动同步 - 与 rules sync 行为保持一致
- 遍历所有
Fixed
- Cursor skills 路径修正:
.cursor/skills-cursor→.cursor/skills(!56)
[0.3.12] - 2026-03-12
Fixed
teamai pulldocs 数量显示修复:之前始终显示 "Synced 1 docs",现在正确显示实际文件数(如 "Synced 2 docs")teamai statusdocs 计数修复:之前用listDirs统计目录数(结果为 0),改为用listFiles统计实际文档文件数
[0.3.11] - 2026-03-12
Fixed
- 文件系统操作(目录扫描、内容比较、复制、mtime 计算)全局过滤
__pycache__/、.pyc、.DS_Store、node_modules等无关文件,避免 push/pull 时产生误判的"已修改"diff
[0.3.10] - 2026-03-11
Added
- Rules 子目录支持:
teamai push/pull递归扫描 rules 目录,支持按语言/类别组织规则文件(如common/、python/、golang/)(!52) - 新增
listFilesRecursive()工具函数用于递归文件遍历 teamai push默认显示每个资源的源文件路径
Changed
- CLAUDE.md 引用从逐文件列举改为目录级引用(
~/.claude/rules/),减少上下文占用 - CLAUDE.md 新增 docs 目录引用(
~/.teamai/docs/) teamai pull日志从 "Merged N rule(s) into CLAUDE.md" 改为 "Synced N rule(s)"
[0.3.9] - 2026-03-10
Fixed
teamai init --repo group/subgroup/repo多级路径支持:gf repo clone不支持三级及以上路径,改为回退到带 OAuth token 的git clonegfCreateRepo查找 namespace 时使用full_path匹配,修复多级 group 下创建仓库 namespace 匹配失败的问题
[0.3.8] - 2026-03-10
Added
teamai pushskill 推送时自动维护 CONTRIBUTORS 文件,记录每个 skill 的贡献者 (!46)
Fixed
gfGetOAuthToken返回用户密码而非 OAuth token (!47)- OAuth token 改为从
~/.netrc读取,替代不可靠的git credential fill(!48) - 修正 OAuth token 相关的误导性注释 (!49)
gf mr createMR title/description 使用 shell 单引号,修复换行符丢失问题 (!50)- 支持多级 group 路径的仓库 URL 解析(如
group/subgroup/repo)(!42)
Changed
- 简化 README,按角色(管理员/成员)分离快速上手指南 (!43, !45)
[0.3.7] - 2026-03-09
Fixed
gf mr create创建 MR 时 PushNotFastForward 错误:pushRepoBranch在 push 后切回 master,导致 gf 内部 push HEAD 时分支不匹配。现在保持 HEAD 在 source branch 直到 MR 创建完成
[0.3.6] - 2026-03-09
Fixed
teamai remove创建 MR 失败("remote not found"):gfMrCreate调用缺少cwd参数,导致 gf CLI 在错误目录下执行
[0.3.5] - 2026-03-09
Fixed
teamai members读取前先git pull,确保能看到远程新注册的成员teamai init已配置 reviewer 的团队仓库,新成员加入时不再重复提示配置 reviewer
[0.3.3] - 2026-03-09
Fixed
teamai init新成员注册 push 失败:当团队仓库中缺少某些.gitkeep文件时,git add报错导致整个 push 失败,成员注册信息无法推送到远程 (!36)
[0.3.2] - 2026-03-09
Added
teamai push/teamai status检测本地已修改的 rules,在差异扫描中标记 modified 状态 (!31)- 新增
src/utils/fs.ts文件内容比对工具函数,支持跨工具目录的内容一致性检查 - 新增
fs-compare.test.ts、rules.test.ts、skills.test.ts、skip-uninstalled-tools.test.ts测试文件
Fixed
teamai pull跳过未安装的 AI 工具,不再向不存在的工具目录同步资源 (!34)teamai push扫描改为跨所有工具目录比对内容,修复时间戳比较的 timing bug (!33)teamai doctor不再误报 Cursor hook 缺失 (!32)
Changed
- 项目名称由 "Team AI DevKit" 更名为 "团队 AI 经验共享框架 TeamAI" (!35)
[0.3.1] - 2026-03-08
Added
teamai pullenv 变量注入改为 source 文件引用方式,避免直接修改 shell profile (!30)- env push 改为 deferred 模式,减少不必要的 MR 创建
[0.3.0] - 2026-03-08
Changed
- 重构资源类型:移除 hooks 和 instincts 资源类型,简化架构 (!26)
Fixed
teamai init处理不存在和空仓库的场景 (!27)teamai initclone path 修复及误判仓库不存在的问题 (!28)
Removed
- 删除
teamai sync命令(不安全的双向同步) (!29) - 删除
src/resources/hooks-config.ts和src/resources/instincts.ts
[0.2.4] - 2026-03-08
Removed
- 删除
teamai sync命令:该命令在 pull 阶段会无提示覆盖本地修改,存在数据丢失风险。请分别使用teamai push和teamai pull
[0.2.3] - 2026-03-08
Fixed
teamai initclone path 不再交互确认,直接使用默认路径~/.teamai/team-repo- 修复仓库存在却误判为"不存在"的问题:git 对象统计中的
reused 404被误匹配为 HTTP 404
[0.2.2] - 2026-03-07
Fixed
teamai init不存在的远程仓库自动创建:检测到仓库不存在时询问用户确认,通过 TGit API 自动创建teamai init空仓库克隆兜底:克隆空仓库后目录不存在时,自动git init+ 配置 remotepushRepoDirectly首次 push 设置 upstream (git push -u origin <branch>),兼容 main/master 等分支名
Added
gfGetOAuthToken()从 git credential store 提取 OAuth tokengfCreateRepo()通过 TGit REST API (Bearer auth) 创建远程仓库RepoNotFoundError错误类型,区分"仓库不存在"和其他克隆错误initRepo()本地 git 初始化 + 添加 remote 的工具函数init.test.ts覆盖空仓库兜底、自动创建、用户拒绝、创建失败等场景
[0.2.1] - 2026-03-07
Fixed
- 修复 gf CLI 下载地址错误:改为从
mirrors.tencent.com官方源下载 - 修复平台架构名称:x64/arm64(之前误用 amd64)
[0.2.0] - 2026-03-07
Changed
- 认证方式改造:使用工蜂 CLI (
gf) 替代手动 Private Token 配置teamai init自动安装 gf CLI 到~/.teamai/gf/(无需 sudo)- 通过
gf auth login交互式 OAuth 登录(支持 iOA、浏览器设备码、手动 Token) - 不再需要手动获取和配置
TGIT_TOKEN
- Clone 方式改造:使用
gf repo clone替代 simple-git clone- gf clone 自动将 OAuth token 嵌入 remote URL,后续 git pull/push 无需额外认证
- MR 创建改造:使用
gf mr create替代 TGit v3 REST API- reviewer 直接传 username,不再需要查询 user ID
- 影响
teamai push、teamai remove、teamai env add/remove
Removed
- 删除
src/utils/tgit-api.ts(TGit v3 REST API 客户端)及其测试文件 - 不再需要
TGIT_TOKEN环境变量 - 移除手动 token 配置流程(
askSecret、openBrowser、saveTokenToEnvFile) - 移除
resolveRepo预检查(getProject、isRepoEmpty、fileExistsInRepo)
Added
- 新增
src/utils/gf-cli.ts:gf CLI 安装、认证、clone、MR 创建的完整封装 teamai doctor新增 gf CLI 安装和认证状态检查
[0.1.14] - 2026-03-06
Added
- 团队环境变量同步:新增
env资源类型,支持从团队仓库env/env.yaml同步环境变量到成员的 shell 配置文件 (!23) teamai env list— 列出团队环境变量teamai env add <key> <value>— 添加/更新环境变量(通过 branch + MR 流程)teamai env remove <key>— 删除环境变量(通过 branch + MR 流程)teamai pull自动将 env 变量注入 ~/.bashrc 或 ~/.zshrc,使用标记注释[teamai:env:start/end]实现幂等更新teamai pull同时写入~/.teamai/env作为 KEY=VALUE 格式备份teamai status显示 env 变量计数,teamai list env显示变量详情teamai doctor新增 shell profile env 注入检查项teamai init创建env/目录,默认配置含env: { injectShellProfile: true }- 支持
sharing.env.shellProfilePath自定义注入路径,sharing.env.injectShellProfile: false禁用注入
[0.1.13] - 2026-03-06
Added
teamai pull输出详情:显示 skills/instincts 的新增/更新数量(如3 new, 29 updated),hooks 显示实际条目数 (!20)- TGit API
fileExistsInRepo辅助函数:检查远程仓库文件是否存在 (!18)
Fixed
teamai --version从package.json动态读取版本号,不再硬编码(修复 0.1.12 版本号不一致问题)- 修复 MR 创建时
web_url返回 undefined 及 reviewer 未设置的问题(TGit v3 API 兼容) (!17) teamai init对已有 teamai 仓库/已注册成员跳过多余确认提示 (!18, !19)teamai init使用default_branch替代硬编码master检查远程文件 (!19)- Session start hook 去掉
--silent,新会话启动时可见 pull 输出;teamai init自动更新旧版 hook command (!20) teamai pulldocs 目录只有.gitkeep时跳过同步,复制时过滤 dot 文件 (!20)
[0.1.11] - 2026-03-05
Added
- CodeBuddy IDE 支持:hooks/skills/rules 同步覆盖 CodeBuddy 工具目录 (!15)
- 分支 + MR 工作流:
teamai push改为创建独立分支并自动创建 Merge Request,支持 reviewer 审批 (!14) - Tombstone 机制:已删除的资源不会被
teamai push重新推送 (!12)
Changed
- 简化成员管理:移除 readonly/write 角色系统,所有成员统一权限 (!13)
[0.1.9] - 2026-03-05
Added
teamai remove <type> <name>命令:从团队仓库和本地删除 skills/rules 资源 (!10)- Cursor hooks 支持:
teamai init自动注入.cursor/hooks.json格式的 SessionStart hook (!9)
Fixed
- 文档与代码对齐 (!11)
[0.1.7] - 2026-03-05
Added
teamai push支持推送 rules 到团队仓库 (!6)- 成员角色管理:支持 readonly/write 角色区分 (!5)
teamai init --repo支持短格式owner/repo(!1)
Changed
- Rules 分发改为独立文件同步到各工具 rules 目录,不再内联到 CLAUDE.md (!7)
Fixed
teamai init自动配置 git user (!4)- TGIT_TOKEN 获取链接更新为
/profile/account(!2)
[0.1.0] - 2026-03-03
Added
- 初始发布
teamai init— 初始化团队仓库关联、注册成员、注入 SessionStart hooksteamai push— 推送本地 skills 到团队仓库teamai pull— 拉取团队资源(skills、rules、hooks、docs)到本地 AI 工具目录teamai sync— 双向同步(push + pull)teamai status— 查看本地与团队仓库的差异teamai list— 列出团队资源teamai members— 列出团队成员teamai doctor— 诊断配置问题- 支持 Claude Code、Codex、Claude Code Internal、Cursor 四种 AI 工具
- SessionStart hook 自动拉取团队最新内容