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>
This commit is contained in:
1 parent
17671b2b22
commit
13fdcdef6f
1 file changed
+32
@@ -14,6 +14,38 @@ AI 进任何团队项目前的读取顺序:
|
||||
|
||||
项目自己的 `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 中文**——给人读的入口
|
||||
|
||||
Reference in new issue
Block a user