teamai-cli 0.25.0-beta.2 → 0.25.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/README.ja.md +41 -3
- package/README.ko.md +41 -3
- package/README.md +41 -4
- package/README.th.md +41 -3
- package/README.zh-CN.md +41 -4
- package/dist/index.js +3681 -2849
- package/package.json +1 -1
- package/skills/teamai/SKILL.md +152 -0
- package/skills/teamai/references/contribute-member.md +100 -0
- package/skills/teamai/references/join-member.md +149 -0
- package/skills/teamai/references/manage-admin.md +148 -0
- package/skills/teamai/references/setup-admin.md +328 -0
- package/skills/teamai/references/troubleshooting.md +133 -0
- package/skills/teamai/references/uninstall.md +57 -0
- package/skills/teamai-share-learnings/SKILL.md +1 -1
package/package.json
CHANGED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: teamai
|
|
3
|
+
description: >-
|
|
4
|
+
Guide for TeamAI — the CLI that syncs a team's AI skills, rules, docs, and env
|
|
5
|
+
across AI coding tools (set up, join, manage, contribute, uninstall). Invoke
|
|
6
|
+
ONLY when the user explicitly runs `/teamai`. Do NOT auto-trigger from ordinary
|
|
7
|
+
conversation, even if words like "team", "skill", or "sync" appear.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# TeamAI — Team AI Skills & Rules Sync
|
|
11
|
+
|
|
12
|
+
You are guiding a user through TeamAI. **They may not know Git.** You run the
|
|
13
|
+
commands; they only make choices when you ask. Follow the steps literally —
|
|
14
|
+
do not skip, reorder, or invent commands.
|
|
15
|
+
|
|
16
|
+
## STEP 0 — Progressive disclosure (do this first, every time)
|
|
17
|
+
|
|
18
|
+
Look at what the user typed after `/teamai`.
|
|
19
|
+
|
|
20
|
+
**If they gave NO scenario** (bare `/teamai`, or only greetings/no task):
|
|
21
|
+
print the menu below **exactly**, then **STOP and wait**. Take no other action —
|
|
22
|
+
do not run any command, do not read any reference file yet.
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
teamai — Team AI Skills & Rules Sync
|
|
26
|
+
|
|
27
|
+
Usage examples (copy one to get started):
|
|
28
|
+
|
|
29
|
+
🏗️ Admin — set up a new team repo:
|
|
30
|
+
/teamai Help me set up TeamAI for my team from scratch
|
|
31
|
+
|
|
32
|
+
🤝 Member — join an existing team:
|
|
33
|
+
/teamai Help me join my team's TeamAI, repo URL is https://...
|
|
34
|
+
|
|
35
|
+
🔧 Admin — daily management (publish & update skills, rules, MCP, env):
|
|
36
|
+
/teamai I already have TeamAI set up, help me manage it
|
|
37
|
+
|
|
38
|
+
📊 Anyone — open the team dashboard:
|
|
39
|
+
/teamai Open the TeamAI dashboard
|
|
40
|
+
|
|
41
|
+
💡 Member — share a skill with the team (just ask in plain language):
|
|
42
|
+
/teamai Share this <skill-name> skill with my team
|
|
43
|
+
|
|
44
|
+
🗑️ Anyone — remove TeamAI from this machine:
|
|
45
|
+
/teamai Uninstall TeamAI
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
> **Sharing a session's learnings is automatic — not a menu choice.** TeamAI
|
|
49
|
+
> prompts on its own at the end of a session that produced something worth sharing,
|
|
50
|
+
> and the **`teamai-share-learnings`** skill takes over. The user does not invoke
|
|
51
|
+
> `/teamai` for it. (Only appears when the admin left team sharing enabled — on by
|
|
52
|
+
> default.)
|
|
53
|
+
|
|
54
|
+
**If they DID describe a scenario**, match it to one row of the table below,
|
|
55
|
+
then open that reference file and follow it step by step.
|
|
56
|
+
|
|
57
|
+
| The user wants to… | Load this reference |
|
|
58
|
+
|-----------------------------------------------------|------------------------------------------|
|
|
59
|
+
| Set up TeamAI for a team from scratch (create repo) | `references/setup-admin.md` |
|
|
60
|
+
| Join their team (with or without a repo URL) | `references/join-member.md` |
|
|
61
|
+
| Manage a team: publish/update skills, rules, MCP, env, invite members | `references/manage-admin.md` |
|
|
62
|
+
| Share / publish a skill with the team ("share this xxx skill") — any member, not just admins | `references/contribute-member.md` |
|
|
63
|
+
| Open the team dashboard (web UI) | run `teamai dashboard` (see cheat sheet) |
|
|
64
|
+
| Remove / uninstall TeamAI from this machine | `references/uninstall.md` |
|
|
65
|
+
|
|
66
|
+
> **Sharing session learnings is automatic, via a separate skill — do not route it
|
|
67
|
+
> here.** TeamAI prompts on its own at the end of a session worth sharing, and the
|
|
68
|
+
> **`teamai-share-learnings`** skill summarizes the session and runs
|
|
69
|
+
> `teamai contribute`. The user does not ask for it through `/teamai`. (Only when
|
|
70
|
+
> the admin left team sharing on — the default.) `contribute-member.md` here is for
|
|
71
|
+
> a member **publishing a reusable skill** on request ("share this xxx skill with
|
|
72
|
+
> my team").
|
|
73
|
+
|
|
74
|
+
Choosing between "set up" and "join": a user **setting up a new team** becomes its
|
|
75
|
+
admin and creates the repo; a user **joining an existing team** needs a repo URL
|
|
76
|
+
from their admin. If someone wants to join but has no URL, that is still the
|
|
77
|
+
**join** flow — `join-member.md` tells them to ask their admin for it. Do **not**
|
|
78
|
+
send a would-be member to the setup/create-repo flow just because they lack a URL.
|
|
79
|
+
|
|
80
|
+
If the request is ambiguous (e.g. "help me with teamai" with no direction),
|
|
81
|
+
ask ONE short question to pick a row, then proceed. When something breaks at any
|
|
82
|
+
step, load `references/troubleshooting.md`.
|
|
83
|
+
|
|
84
|
+
## Global rules (apply to every scenario)
|
|
85
|
+
|
|
86
|
+
1. **Reply in the user's language — including every example and hand-off blurb.**
|
|
87
|
+
Answer in whatever language the user used to invoke the skill (Chinese in →
|
|
88
|
+
Chinese out, English in → English out, and so on), for the whole conversation.
|
|
89
|
+
This applies to **everything you write**, not just prose: the reference files
|
|
90
|
+
below are written in English, but any ready-made sentence they hand you — the
|
|
91
|
+
invite line you give an admin to forward to members, the one-line explanations,
|
|
92
|
+
the "what's next" summary — **must be translated into the user's language before
|
|
93
|
+
you show it.** Do not paste an English example at a Chinese-speaking user.
|
|
94
|
+
*Only* commands, flags, URLs, file paths, and code identifiers stay verbatim
|
|
95
|
+
(never translate `teamai pull`, `--scope user`, `/teamai`, a repo URL, etc.).
|
|
96
|
+
Example: for a Chinese user, the member-invite line becomes
|
|
97
|
+
`/teamai 帮我加入团队的 TeamAI,仓库地址是 https://...`, not the English form.
|
|
98
|
+
2. **Never teach Git.** Do not mention branches, commits, clone, or push/pull of
|
|
99
|
+
Git itself. TeamAI hides all of that. The user thinks in terms of "my team's
|
|
100
|
+
skills", not repositories.
|
|
101
|
+
3. **Always use a full URL** for the team repo (e.g.
|
|
102
|
+
`https://github.com/yourorg/yourrepo`). Never use the `owner/repo` short form.
|
|
103
|
+
4. **You run the commands.** Only pause to ask the user when you need a web login,
|
|
104
|
+
a value only they know, or a genuine either/or choice. Show each command before
|
|
105
|
+
you run it, in one short line.
|
|
106
|
+
5. **Detect the current AI tool first.** TeamAI behaves differently per host. Note
|
|
107
|
+
which tool this conversation is running in (Claude Code, Cursor, CodeBuddy,
|
|
108
|
+
WorkBuddy, ChatGPT App, Codex, OpenCode, Kiro, Gemini CLI, …). When you reopen a
|
|
109
|
+
session, use the name of **this** tool — do not assume Claude Code or Cursor.
|
|
110
|
+
Some hosts need extra manual steps for hooks — see
|
|
111
|
+
`references/troubleshooting.md` ("Agent-specific caveats").
|
|
112
|
+
6. **Prerequisite:** Node.js ≥ 20. Install once with `npm install -g teamai-cli`
|
|
113
|
+
and verify with `teamai --version`.
|
|
114
|
+
7. **Finish with `teamai doctor`.** Every setup/onboarding flow ends by running
|
|
115
|
+
`teamai doctor` and resolving whatever it reports before you call it done.
|
|
116
|
+
8. **After init, resources appear on the NEXT session.** `teamai init` injects a
|
|
117
|
+
session-start hook that auto-runs `teamai pull`. It is normal that the skills/
|
|
118
|
+
rules directories are empty right after init — they fill in when the user opens
|
|
119
|
+
a fresh session in this tool. To sync immediately, run `teamai pull`.
|
|
120
|
+
9. **Don't limit which AI tools get set up — cover all of them by default.** Unless
|
|
121
|
+
the user explicitly says "only install to Claude Code" (or names specific
|
|
122
|
+
tools), do **not** pass `--agent` to restrict the install. Let `teamai init` set
|
|
123
|
+
up **every AI tool already installed on the machine** (omitting `--agent` gives
|
|
124
|
+
an interactive picker; select all detected tools, or the user's stated subset).
|
|
125
|
+
**After init, report which agents were set up** — tell the user, in their
|
|
126
|
+
language, exactly which tools will now auto-start TeamAI (and which detected
|
|
127
|
+
tools were skipped and why, e.g. Codex trust-gate / CodeBuddy design). Verify
|
|
128
|
+
the real per-tool result with `teamai doctor` / `teamai hooks list`.
|
|
129
|
+
|
|
130
|
+
## Command cheat sheet (ground truth — do not invent flags)
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
teamai init <full-repo-url> # Set up / join a team (configure provider, clone, register)
|
|
134
|
+
teamai init <url> --scope user # Install for the whole machine instead of just this project
|
|
135
|
+
teamai pull # Sync team resources into local AI tools now
|
|
136
|
+
teamai push # Publish your local skills/rules/docs to the team
|
|
137
|
+
teamai doctor # Diagnose configuration and hook problems
|
|
138
|
+
teamai status # Show local vs team differences
|
|
139
|
+
teamai list # List resources (skills|rules|docs|env|agents|hooks|mcp)
|
|
140
|
+
teamai members # See team members (subcommand: teamai members list)
|
|
141
|
+
teamai roles # Manage roles / resource namespaces
|
|
142
|
+
teamai projects # Manage multiple projects from one repo (list|set|members)
|
|
143
|
+
teamai packages # Install team-declared npm packages & Claude plugins
|
|
144
|
+
teamai env # Manage shared team environment variables
|
|
145
|
+
teamai dashboard # Open the AI coding session dashboard (web UI, default port 3721)
|
|
146
|
+
teamai contribute --file <p> --title <t> # Contribute a knowledge doc (usually via the teamai-share-learnings skill)
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Anything not in this cheat sheet: check `teamai <command> --help` before using it.
|
|
150
|
+
Do **not** guess flags (for example, there is no member-invite flag in the CLI —
|
|
151
|
+
inviting a member is done on the Git platform's website; see
|
|
152
|
+
`references/manage-admin.md`).
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Scenario: Member — publish a reusable skill
|
|
2
|
+
|
|
3
|
+
Goal: the user turns something they built into team knowledge everyone can pull.
|
|
4
|
+
**Any member can do this — you do not need to be an admin.** The usual entry point
|
|
5
|
+
is the user just asking in plain language, e.g. *"share this xxx skill with my
|
|
6
|
+
team"* / *"把这个 xxx skill 分享给团队"* — then you run the publish for them.
|
|
7
|
+
|
|
8
|
+
## Which kind of contribution?
|
|
9
|
+
|
|
10
|
+
- **A learning** (a lesson, a gotcha, how you solved something) → this is
|
|
11
|
+
**automatic**: TeamAI prompts at the end of a session worth sharing and the
|
|
12
|
+
dedicated **`teamai-share-learnings`** skill takes over (it summarizes the
|
|
13
|
+
session and runs `teamai contribute`). The user does not come through this flow
|
|
14
|
+
for it. (Step A below is only a manual fallback for when that skill isn't
|
|
15
|
+
available.)
|
|
16
|
+
- **A reusable skill** (a `SKILL.md` others invoke) → author the skill, then
|
|
17
|
+
`teamai push` (Step B — the main purpose of this reference).
|
|
18
|
+
|
|
19
|
+
## Step A — Contribute a learning by hand (fallback only)
|
|
20
|
+
|
|
21
|
+
> Prefer the **`teamai-share-learnings`** skill. Use these manual steps only if it
|
|
22
|
+
> is unavailable in the current tool.
|
|
23
|
+
|
|
24
|
+
1. Write a short Markdown doc that captures the lesson. Keep it concrete and
|
|
25
|
+
actionable — a knowledge base, not a diary. Include YAML frontmatter for search
|
|
26
|
+
indexing:
|
|
27
|
+
|
|
28
|
+
```markdown
|
|
29
|
+
---
|
|
30
|
+
title: "<short title of the problem or finding>"
|
|
31
|
+
author: <username>
|
|
32
|
+
date: <YYYY-MM-DD>
|
|
33
|
+
tags: [tag1, tag2, tag3]
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Background
|
|
37
|
+
What were you doing? What went wrong?
|
|
38
|
+
|
|
39
|
+
## Solution
|
|
40
|
+
How did you fix it? Key steps.
|
|
41
|
+
|
|
42
|
+
## Takeaways
|
|
43
|
+
- Lesson 1
|
|
44
|
+
- Lesson 2
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
2. Save it to a temp file, then push it to the team:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
teamai contribute --file /tmp/my-learning.md --title "K8s pod startup timeout"
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
The doc lands in the team's `learnings/` and appears for teammates on their next
|
|
54
|
+
`teamai pull`. It is also searchable via `teamai recall`.
|
|
55
|
+
|
|
56
|
+
> Tip: if there is a dedicated learnings skill available in this tool
|
|
57
|
+
> (`teamai-share-learnings`), you can use it to auto-summarize the current session
|
|
58
|
+
> instead of writing the doc by hand.
|
|
59
|
+
|
|
60
|
+
## Step B — Contribute a reusable skill
|
|
61
|
+
|
|
62
|
+
1. Create the skill directory with a `SKILL.md`:
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
skills/my-skill/SKILL.md
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Minimal frontmatter:
|
|
69
|
+
|
|
70
|
+
```markdown
|
|
71
|
+
---
|
|
72
|
+
name: my-skill
|
|
73
|
+
description: "One line — what it does and when to use it"
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
# My Skill
|
|
77
|
+
|
|
78
|
+
Step-by-step instructions the AI should follow.
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
2. Publish it:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
teamai push --skill skills/my-skill # one skill
|
|
85
|
+
# or
|
|
86
|
+
teamai push # review and push everything
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
To publish into a specific role namespace: `teamai push --skill <path> --role <id>`.
|
|
90
|
+
|
|
91
|
+
## After contributing
|
|
92
|
+
|
|
93
|
+
- Confirm it landed: `teamai list skills` (or `teamai status`).
|
|
94
|
+
- Teammates receive it automatically on their next session, or via `teamai pull`.
|
|
95
|
+
|
|
96
|
+
## If push is denied
|
|
97
|
+
|
|
98
|
+
A permission error usually means you don't have write access to the team repo.
|
|
99
|
+
Copy the exact error to your admin and ask them to grant access. (In read-only
|
|
100
|
+
HTTP mode, `contribute` / `push` are not available — you can only consume.)
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# Scenario: Member — join an existing team
|
|
2
|
+
|
|
3
|
+
Goal: the user joins a team that already has a TeamAI repo. You need the team
|
|
4
|
+
repo's **full URL** (the admin shares it). Do NOT create a new repo.
|
|
5
|
+
|
|
6
|
+
Run the commands yourself. Only stop to ask when a step says "ASK".
|
|
7
|
+
|
|
8
|
+
## Step 0 — Get the repo URL (REQUIRED — stop if missing)
|
|
9
|
+
|
|
10
|
+
A member joins an **existing** repo. You need its full URL from the admin.
|
|
11
|
+
|
|
12
|
+
If the user has not given a full URL, ask for it:
|
|
13
|
+
*"Paste the full team repo URL your admin gave you (e.g.
|
|
14
|
+
https://github.com/yourorg/yourrepo)."* Do not proceed with `owner/repo` short
|
|
15
|
+
form.
|
|
16
|
+
|
|
17
|
+
**If the user does not have the URL, STOP here.** Do not guess a URL, do not probe
|
|
18
|
+
platforms, and — most importantly — **do not create a new repo.** Tell the user:
|
|
19
|
+
*"Ask your team's TeamAI admin for the repository URL, then come back and paste it
|
|
20
|
+
here."* A member without a repo URL cannot continue; creating one would fork the
|
|
21
|
+
team into a second, empty repo. (Setting up a brand-new team repo is the admin
|
|
22
|
+
flow — see `setup-admin.md` — not this one.)
|
|
23
|
+
|
|
24
|
+
## Step 1 — Install and verify
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npm install -g teamai-cli
|
|
28
|
+
teamai --version
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
If it fails, Node.js ≥ 20 is missing — have them install Node 20+ first.
|
|
32
|
+
|
|
33
|
+
## Step 2 — Choose scope (ASK)
|
|
34
|
+
|
|
35
|
+
- **This project only** (default): `cd` into the project directory first.
|
|
36
|
+
- **Whole machine**: add `--scope user`.
|
|
37
|
+
|
|
38
|
+
## Step 3 — Log in to the same platform as the URL
|
|
39
|
+
|
|
40
|
+
Match the login to the URL's host (do NOT create a second repo):
|
|
41
|
+
|
|
42
|
+
- **`git.woa.com/...`** (Tencent TGit / 工蜂) → **you run both the `gf` install and
|
|
43
|
+
the `gf … auth login`** (never tell the user to run them). Use the exact
|
|
44
|
+
download/verify commands and login step from `setup-admin.md` (Step 3, Tencent
|
|
45
|
+
TGit). The user's only action is approving the login URL in their browser / iOA.
|
|
46
|
+
No `GITLAB_URL` needed. (Headless only: pre-set `TGIT_TOKEN`.)
|
|
47
|
+
- **`cnb.cool/...`** → install the CNB CLI, then authorize, in this order:
|
|
48
|
+
1. `npm install -g @cnbcool/cnb-cli`
|
|
49
|
+
2. `cnb login` — have the user approve it in the browser (OAuth2 device flow);
|
|
50
|
+
wait until they confirm before continuing.
|
|
51
|
+
- **`github.com/...`** → `gh auth login`
|
|
52
|
+
- **`gitlab.com/...`** or self-hosted GitLab → set `GITLAB_TOKEN` (and `GITLAB_URL`
|
|
53
|
+
for self-hosted, with `api` scope)
|
|
54
|
+
|
|
55
|
+
If they have no account on that platform, they register there, then ask the admin
|
|
56
|
+
to add them to the repo.
|
|
57
|
+
|
|
58
|
+
## Step 4 — Initialize with the URL (you run it)
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
# this project only (run from inside the project)
|
|
62
|
+
teamai init https://<platform>/<org>/<repo>
|
|
63
|
+
|
|
64
|
+
# or whole machine
|
|
65
|
+
teamai init https://<platform>/<org>/<repo> --scope user
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**Set up all their AI tools by default (global rule 9).** Don't add `--agent` to
|
|
69
|
+
restrict the install unless the user said to. Omitting it gives a picker — select
|
|
70
|
+
**every AI tool already installed**. Afterwards, **tell the user (in their
|
|
71
|
+
language) which agents will now auto-sync TeamAI**, and note any detected tool that
|
|
72
|
+
was skipped and why.
|
|
73
|
+
|
|
74
|
+
**Read-only / restricted environments (no Git access):** some sandboxed hosts
|
|
75
|
+
cannot use Git. If the admin provides an HTTP endpoint + API key instead, use:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
teamai init --http https://your-team-host/api --token <api-key>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
This is a read-only consumer mode — `push` / `contribute` are not available, but
|
|
82
|
+
skills and rules still sync.
|
|
83
|
+
|
|
84
|
+
## Step 5 — Verify with doctor
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
teamai doctor
|
|
88
|
+
teamai hooks list # per-tool: which AI tools actually got the hooks
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Fix anything `doctor` reports. **Do not trust the "Hooks injected into all AI tool
|
|
92
|
+
settings" message alone** — it prints even for tools where nothing was written.
|
|
93
|
+
Check the real per-tool status with `teamai doctor` / `teamai hooks list`. Only the
|
|
94
|
+
tool you set up (e.g. `claude`) is expected to show hooks installed; some tools are
|
|
95
|
+
skipped by design or not yet supported (CLI behaviour, not a broken setup). If it
|
|
96
|
+
flags hook problems, load `troubleshooting.md` ("Which tools actually get hooks").
|
|
97
|
+
|
|
98
|
+
## Step 6 — Confirm the skills actually arrived
|
|
99
|
+
|
|
100
|
+
Team resources sync on **session start**, so they may be empty right after init.
|
|
101
|
+
To confirm now:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
teamai pull # sync immediately
|
|
105
|
+
teamai list # see the team skills / rules / docs you now have
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Then tell the user: from now on, **opening a new session in this AI tool
|
|
109
|
+
auto-syncs** the latest team resources — no manual step needed. If their tool has
|
|
110
|
+
no session-start hook (e.g. Gemini CLI, JoyCode), they run `teamai pull` by hand.
|
|
111
|
+
|
|
112
|
+
**Reassure them about privacy** (in their language): *"TeamAI does not send any of
|
|
113
|
+
your session data to third parties. The only place anything is reported is the team
|
|
114
|
+
repo you just joined — usage counts and knowledge you choose to contribute, never
|
|
115
|
+
your raw conversation content."* (Team reporting is opt-in and carries counts +
|
|
116
|
+
tool names only, on a separate branch of that same repo.)
|
|
117
|
+
|
|
118
|
+
## Agent-specific note
|
|
119
|
+
|
|
120
|
+
If this conversation is running in **ChatGPT App** or **WorkBuddy**, the hooks
|
|
121
|
+
that drive auto-sync need an extra manual step — load `troubleshooting.md`
|
|
122
|
+
("Agent-specific caveats") and walk the user through it before finishing.
|
|
123
|
+
|
|
124
|
+
## If something is denied
|
|
125
|
+
|
|
126
|
+
Permission errors (can't clone, can't read) usually mean the admin has not added
|
|
127
|
+
this user to the repo yet. Have them copy the exact error message to their admin.
|
|
128
|
+
|
|
129
|
+
## Wrap up in the user's language, and how to leave
|
|
130
|
+
|
|
131
|
+
Summarize the outcome **in the user's own language** (global rule 1). Cover:
|
|
132
|
+
|
|
133
|
+
1. **They're done — sync is automatic.** From now on, opening a session in this AI
|
|
134
|
+
tool keeps their team skills up to date; no commands needed.
|
|
135
|
+
2. **Sharing a session learning is automatic — no command to remember.** When a
|
|
136
|
+
session produced something worth sharing, TeamAI **prompts them on its own** (at
|
|
137
|
+
the end of the session) and the `teamai-share-learnings` skill takes over to
|
|
138
|
+
summarize and contribute it. They do **not** invoke `/teamai` for this. (This
|
|
139
|
+
prompt only appears if the admin left team sharing enabled — it is on by
|
|
140
|
+
default; the admin can turn it off in `teamai.yaml`.)
|
|
141
|
+
3. **They can also contribute a skill — just ask in plain language.** A member does
|
|
142
|
+
not need to be an admin to publish a skill. They tell TeamAI something like
|
|
143
|
+
*"share this xxx skill with my team"* / *"把这个 xxx skill 分享给团队"*, and you
|
|
144
|
+
run the publish for them (see `contribute-member.md`).
|
|
145
|
+
4. **How to leave — via the skill, not raw commands.** They can remove TeamAI any
|
|
146
|
+
time by re-invoking the skill; you'll run it for them:
|
|
147
|
+
`/teamai 卸载` / `/teamai Uninstall TeamAI`.
|
|
148
|
+
One line, in their language: *"This only removes things from your machine; the
|
|
149
|
+
team repo stays — rejoin any time with `/teamai` and the repo URL."*
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# Scenario: Admin — day-to-day management
|
|
2
|
+
|
|
3
|
+
The user already ran `teamai init`. Do NOT re-init or re-register. Before changing
|
|
4
|
+
anything, say what you are about to change. Pick the task below that matches.
|
|
5
|
+
|
|
6
|
+
Day-to-day management is mostly **publishing and updating team resources — skills,
|
|
7
|
+
rules, MCP servers, and env** — plus inviting members and checking the dashboard.
|
|
8
|
+
|
|
9
|
+
## Publish or update a skill / rule / doc
|
|
10
|
+
|
|
11
|
+
The user (or you) creates or edits a skill, rule, or doc locally, then publishes it
|
|
12
|
+
to the team. The same `teamai push` handles both new resources and updates to
|
|
13
|
+
existing ones:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
teamai push # review the diff, then confirm
|
|
17
|
+
teamai push --all # push everything without per-item confirmation
|
|
18
|
+
teamai push --skill <path> # push one specific skill
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Members receive it automatically the next time they open a session (or when they
|
|
22
|
+
run `teamai pull`).
|
|
23
|
+
|
|
24
|
+
## Publish or update team MCP servers
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
teamai mcp list # team MCP servers + per-tool install status
|
|
28
|
+
teamai mcp inject # push team MCP servers into every AI tool's config
|
|
29
|
+
teamai mcp remove # remove teamai-managed MCP servers
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
MCP definitions travel with the team repo like skills/rules — edit, then the
|
|
33
|
+
members pick them up on sync.
|
|
34
|
+
|
|
35
|
+
## Invite a member
|
|
36
|
+
|
|
37
|
+
There is **no CLI invite flag.** Inviting is done on the Git platform's website:
|
|
38
|
+
|
|
39
|
+
1. On the platform (GitHub / GitLab / CNB), add the person to the team repo
|
|
40
|
+
(Settings → Collaborators / Members).
|
|
41
|
+
2. Send them the **full repo URL** and this line to paste into their AI tool:
|
|
42
|
+
`/teamai Help me join my team's TeamAI, repo URL is <URL>`
|
|
43
|
+
|
|
44
|
+
(If you want to see who is already registered: `teamai members` /
|
|
45
|
+
`teamai members list`.)
|
|
46
|
+
|
|
47
|
+
## See members and resources
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
teamai members list # registered team members
|
|
51
|
+
teamai list # all resource types
|
|
52
|
+
teamai list skills # just skills
|
|
53
|
+
teamai status # local vs team differences
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Roles (skill namespaces per job function)
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
teamai roles list # roles defined + your current role
|
|
60
|
+
teamai roles init # create the roles manifest (admin, interactive)
|
|
61
|
+
teamai roles add <id> # add a role
|
|
62
|
+
teamai roles update <id> # change a role's namespaces / description
|
|
63
|
+
teamai roles remove <id> # remove a role
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
After editing roles, `teamai push` to publish the manifest. Members re-sync on
|
|
67
|
+
their next session.
|
|
68
|
+
|
|
69
|
+
## Projects (manage several projects from one repo)
|
|
70
|
+
|
|
71
|
+
`project` is a second dispatch dimension alongside `role` — one team repo can serve
|
|
72
|
+
multiple projects, each with its own skills/rules/learnings, without a separate
|
|
73
|
+
repo per project:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
teamai projects list # projects defined + the ones active in this directory
|
|
77
|
+
teamai projects set <id> # set the active project(s) for this directory
|
|
78
|
+
teamai projects members <id> # who is registered on a project
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
A member gets the union of their role resources and their active project's
|
|
82
|
+
resources. Admins declare projects in `manifest/projects.yaml`, then `teamai push`.
|
|
83
|
+
|
|
84
|
+
## Team dashboard (web UI)
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
teamai dashboard # start the AI coding session dashboard (default port 3721)
|
|
88
|
+
teamai dashboard --port 8080 # custom port
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Opens a local web UI for team coding-session activity and knowledge-base health.
|
|
92
|
+
|
|
93
|
+
## Team packages (npm + Claude plugins)
|
|
94
|
+
|
|
95
|
+
Declare packages once; members get a prompt to install them (TeamAI never runs
|
|
96
|
+
third-party package code automatically):
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
teamai packages install typescript # npm dependency
|
|
100
|
+
teamai packages install eslint@latest --global # global CLI tool
|
|
101
|
+
teamai packages install code-review@claude-plugins-official # Claude plugin
|
|
102
|
+
teamai push # share the updated teamai.yaml
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Shared environment variables
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
teamai env list # list (values masked)
|
|
109
|
+
teamai env list --reveal # show values in plaintext
|
|
110
|
+
teamai env add <KEY> <VALUE> # add or update
|
|
111
|
+
teamai env remove <KEY> # remove
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## When sync fails
|
|
115
|
+
|
|
116
|
+
Run `teamai doctor` first. If it reports hook or path problems, load
|
|
117
|
+
`troubleshooting.md`. Have the affected member reopen their session; if their tool
|
|
118
|
+
has no session-start hook, they run `teamai pull` manually.
|
|
119
|
+
|
|
120
|
+
## Capture a lesson learned
|
|
121
|
+
|
|
122
|
+
Turning a tricky fix into team knowledge is **automatic**: at the end of a session
|
|
123
|
+
worth sharing, TeamAI prompts the member and the dedicated
|
|
124
|
+
**`teamai-share-learnings`** skill summarizes the session and runs
|
|
125
|
+
`teamai contribute`. Nobody has to invoke it by hand.
|
|
126
|
+
(Publishing a **reusable skill** someone authored is a different task — any member
|
|
127
|
+
can do it, see `contribute-member.md`.)
|
|
128
|
+
|
|
129
|
+
### Turn the sharing prompt on or off (admin)
|
|
130
|
+
|
|
131
|
+
The auto-share prompt is **on by default**. To disable it team-wide, set this in
|
|
132
|
+
`teamai.yaml` and `teamai push`:
|
|
133
|
+
|
|
134
|
+
```yaml
|
|
135
|
+
sharing:
|
|
136
|
+
contributeHint:
|
|
137
|
+
enabled: false # team-wide default; members can still override locally
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Resolution order: `TEAMAI_CONTRIBUTE_HINT_DISABLED=1` env kill switch > a member's
|
|
141
|
+
local override > this team setting > default (on). Turning it off here only removes
|
|
142
|
+
the nudge; members can still contribute on request.
|
|
143
|
+
|
|
144
|
+
## Don't
|
|
145
|
+
|
|
146
|
+
- Don't hand-run raw `git` commands.
|
|
147
|
+
- Don't create a second team repo.
|
|
148
|
+
- Don't use `owner/repo` short form — always the full URL.
|