Files
praxis/README.md
T
阿白叔andClaude Opus 4.7 161559a83d docs: add new-project bootstrap prompt to README
Add a copy-pasteable prompt for humans to drop into Claude Code /
Codex when starting a new project. The prompt makes the AI fetch
team-guide, ask consolidated questions, scaffold project files
(AGENTS.md, CLAUDE.md, .gitignore, .gitattributes, .env.example,
README.md), and stop for confirmation before first commit.

Also covers the existing-project case (补规范) by swapping the
scaffolding step.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 13:15:40 +08:00

93 lines
4.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# team-guide
我们小团队的 AI 协作开发约定。**给 AI 看的**——每个项目里 AI 开干前先读这里。
完整规则在 [`AGENTS.md`](AGENTS.md)(英文)。这份 README 只是入口说明。
## 这个仓库怎么用
AI 进任何团队项目前的读取顺序:
1. [`AGENTS.md`](AGENTS.md) —— 团队通用规则
2. [`library/README.md`](library/README.md) —— 按当前任务挑相关条目读
3. 项目自己的 `AGENTS.md` —— 只放项目特定的东西
项目自己的 `AGENTS.md` **不重复** team-guide 里的内容,引用就行。
## 开新项目时丢给 AI 的提示词
复制下面这段,发给 Claude Code / Codex 当首句话——它会自己读完规则、问你必要信息、把项目脚手架(`AGENTS.md` / `CLAUDE.md` / `.gitignore` / `.gitattributes` / `.env.example`)建好,然后等你确认再开干。
```text
请按以下顺序为本项目做初始化:
1. 拉取并阅读 https://git.simgreek.com/simgreek/team-guide 的最新内容(至少读 AGENTS.md 和 library/nodejs-project/SPEC.md,如果是 Node 项目)。
2. 读完后,问我以下信息(一次性问完,不要一条一条挤牙膏):
- 项目名 / 一句话定位
- 技术栈(Node 版本、是否 Next.js / Express / 其他)
- 远端仓库地址(gitee / git.simgreek.com / 其他)
- 协作主分支名(main / dev)
- 是否产品项目(要发分发渠道);是的话,分发渠道是什么
- 需要哪些环境变量(只要变量名,不要值)
3. 拿到回答后,按 team-guide 的规范:
- git init(如果还没)+ 配 .gitignore(含 node_modules / .env* / 构建产物 / .claude/settings.local.json 等)
- 落 .gitattributes(强制 LF,.bat/.cmd 用 CRLF,二进制文件标 binary)
- 写 .env.example(仅变量名)
- 写项目根 AGENTS.md,遵循 team-guide §2 的骨架,引用 team-guide 而不是复制规则
- CLAUDE.md 写一行:@AGENTS.md
- 写 README.md(中文,给人看,三段:是什么 / 怎么跑 / 怎么配 .env)
4. 全部建好后,列出新增 / 修改的文件,告诉我下一步该 commit 哪些,等我确认再 git add + commit。第一个 commit 不要直接 push。
5. 整个过程严格遵守 team-guide 的「AI 必须停下问人」规则——任务模糊、范围敏感、远端冲突、--force、上传分发渠道,这些必须停下来确认。
```
老项目要补规范(已有代码、还没接入 team-guide),把第 3 步换成"补齐缺失的文件,不要覆盖现有的内容;冲突先列出来问我"。
## 语言策略
- **本 README 中文**——给人读的入口
- **AGENTS.md / CLAUDE.md / library/ 全英文**——给 AI 读
- **commit、PR 标题、分支名、tag 注释全英文**——AI 工具和搜索吃英文 metadata 更准
## 目录
```
team-guide/
├── README.md ← 中文入口(你正在看)
├── AGENTS.md ← 全部团队规则(英文)
├── CLAUDE.md ← 一行 @AGENTS.md import
└── library/ ← 窄主题专项规范
├── README.md ← catalog
└── <topic>/SPEC.md
```
## 版本管理
本仓库按日期打 tag:`YYYYMMDD`(同一天多次发布加 `-N` 后缀)。tag 不可改、不可删、不可 force-push。
具体规则见 [`AGENTS.md`](AGENTS.md) §3 Git workflow。项目仓库自己用各自的 tag 方案(通常 semver `vX.Y.Z`),写在项目的 `AGENTS.md` 里。
## Library 怎么扩
碰到跨项目的具体话题、塞进 AGENTS.md 会拖肿(比如"PII 处理"、"eval 报告格式"),就在 `library/<topic>/` 下写 `SPEC.md`。
收录标准(同时满足):
1. 至少踩过两次
2. 比 AGENTS.md 通用规则窄
3. 步骤稳定到能写下来
加一条要同时更新 [`library/README.md`](library/README.md) 的 catalog 表。
## 远端
[git.simgreek.com/simgreek/team-guide](https://git.simgreek.com/simgreek/team-guide) ·
[tags 列表](https://git.simgreek.com/simgreek/team-guide/tags)
## License
Internal.