teamai-cli 0.16.2

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/package.json ADDED
@@ -0,0 +1,66 @@
1
+ {
2
+ "name": "teamai-cli",
3
+ "version": "0.16.2",
4
+ "description": "TeamAI — team AI experience sharing framework (skills, rules, docs, env sync across Claude Code, Cursor, Codex, etc.)",
5
+ "type": "module",
6
+ "bin": {
7
+ "teamai": "dist/index.js"
8
+ },
9
+ "files": [
10
+ "dist/**/*.js",
11
+ "skills",
12
+ "README.md",
13
+ "CHANGELOG.md",
14
+ "LICENSE"
15
+ ],
16
+ "publishConfig": {
17
+ "access": "public"
18
+ },
19
+ "scripts": {
20
+ "build": "tsup",
21
+ "dev": "tsup --watch",
22
+ "test": "vitest run",
23
+ "test:e2e": "vitest run --config vitest.e2e.config.ts",
24
+ "test:watch": "vitest",
25
+ "test:coverage": "vitest run --coverage",
26
+ "typecheck": "tsc --noEmit",
27
+ "release": "standard-version",
28
+ "prepublishOnly": "npm run build"
29
+ },
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "git+https://github.com/Tencent/teamai-cli.git"
33
+ },
34
+ "homepage": "https://github.com/Tencent/teamai-cli#readme",
35
+ "bugs": {
36
+ "url": "https://github.com/Tencent/teamai-cli/issues"
37
+ },
38
+ "keywords": [
39
+ "ai",
40
+ "team",
41
+ "devkit",
42
+ "skills",
43
+ "sharing"
44
+ ],
45
+ "author": "jeffyxu <jeffyxu@tencent.com>",
46
+ "license": "MIT",
47
+ "dependencies": {
48
+ "chalk": "^5.3.0",
49
+ "commander": "^12.1.0",
50
+ "fs-extra": "^11.2.0",
51
+ "gray-matter": "^4.0.3",
52
+ "ora": "^8.1.0",
53
+ "simple-git": "^3.27.0",
54
+ "yaml": "^2.6.0",
55
+ "zod": "^3.24.0"
56
+ },
57
+ "devDependencies": {
58
+ "@types/fs-extra": "^11.0.4",
59
+ "@types/node": "^20.17.0",
60
+ "@vitest/coverage-v8": "^2.1.9",
61
+ "standard-version": "^9.5.0",
62
+ "tsup": "^8.3.0",
63
+ "typescript": "^5.7.0",
64
+ "vitest": "^2.1.0"
65
+ }
66
+ }
@@ -0,0 +1,87 @@
1
+ ---
2
+ name: teamai-share-learnings
3
+ description: "Contribute — 分享 Session 经验到团队知识库"
4
+ ---
5
+
6
+ # Contribute — 分享 Session 经验到团队知识库
7
+
8
+ 总结本次 AI 编码 session 中学到的经验,推送到团队知识库。
9
+
10
+ **【重要】所有生成的文档必须使用中文撰写。**
11
+
12
+ ## When to Use
13
+
14
+ - When teamai suggests this session has valuable content worth sharing
15
+ - When you've solved a tricky problem and want to document the solution
16
+ - When you've discovered a useful workflow or pattern
17
+ - After a long session with diverse tool usage
18
+
19
+ ## How It Works
20
+
21
+ 1. **总结**:回顾本次 session 的工具使用、解决的问题、发现的模式
22
+ 2. **生成文档**:用中文撰写 Markdown 文档,涵盖:
23
+ - 任务/问题是什么
24
+ - 关键决策及原因
25
+ - 解决方案、变通方法或发现的模式
26
+ - 哪些工具/skill 特别有用
27
+ - 踩坑点和注意事项
28
+ 3. **保存临时文件**:写入临时文件
29
+ 4. **推送到团队**:运行 `teamai contribute --file <path> --title "<title>"`
30
+
31
+ ## Document Template
32
+
33
+ **【必须】文档必须包含 YAML frontmatter,用于搜索索引和知识发现。**
34
+
35
+ ```markdown
36
+ ---
37
+ title: "<简短标题,描述核心问题或发现>"
38
+ author: <username>
39
+ date: <YYYY-MM-DD>
40
+ tags: [tag1, tag2, tag3]
41
+ ---
42
+
43
+ ## 背景
44
+ 在做什么?遇到了什么问题?
45
+
46
+ ## 解决方案
47
+ 怎么解决的?关键步骤是什么?
48
+
49
+ ## 经验总结
50
+ - 经验 1
51
+ - 经验 2
52
+
53
+ ## 相关 Skills
54
+ - skill-name-1
55
+ - skill-name-2
56
+ ```
57
+
58
+ ### Frontmatter 字段说明
59
+
60
+ | 字段 | 必须 | 说明 | 示例 |
61
+ |------|------|------|------|
62
+ | title | ✅ | 简短标题(<60 字符) | "K8s Pod OOM 排查指南" |
63
+ | author | ✅ | 贡献者用户名 | jeffyxu |
64
+ | date | ✅ | 日期 YYYY-MM-DD | 2026-03-28 |
65
+ | tags | ✅ | 2-5 个关键标签 | [k8s, oom, troubleshooting] |
66
+
67
+ ### Tags 选择建议
68
+
69
+ 从以下类别中选择 2-5 个:
70
+ - **技术栈**: python, typescript, go, k8s, docker, sglang, cuda
71
+ - **问题类型**: troubleshooting, performance, deployment, config, api
72
+ - **模式**: workflow, pattern, tool-usage, best-practice
73
+ - **场景**: debugging, testing, monitoring, security
74
+
75
+ ## Example
76
+
77
+ ```bash
78
+ # AI 生成总结文档到 /tmp/session-summary.md 后
79
+ teamai contribute --file /tmp/session-summary.md --title "K8s pod 启动超时排查"
80
+ ```
81
+
82
+ ## Important
83
+
84
+ - Run this as a **sub-agent** (Agent tool) to avoid polluting the main session's context
85
+ - The document is pushed directly to master in the team repo's `learnings/` directory
86
+ - Team members will see it on their next `teamai pull`
87
+ - Keep summaries concise and actionable — this is a knowledge base, not a diary