docs: split language by audience, add Codex / AGENTS.md spec
Language policy: Chinese for human-facing files (README, docs/, human-fillable templates), English for AI-facing files (CLAUDE.md, AGENTS.md, AI templates). Commits / PRs / branches / tags stay English. - Translate docs/01-06 to Chinese - Translate README.md, PR / handoff / project README templates to Chinese - Drop README.en.md (redundant once language policy is explicit) - Rewrite CLAUDE.md and CLAUDE.md.template under the new policy - Add AGENTS.md (root) and templates/AGENTS.md.template for Codex - Add docs/07-codex.md covering Codex usage and AGENTS.md / CLAUDE.md sync rules Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
1 parent
411f0b8182
commit
154f592f3c
16 files changed
+901
-690
No files matched your search
+61
-79
@@ -1,41 +1,37 @@
|
||||
# 06 — Handoff
|
||||
# 06 — Handoff(交接)
|
||||
|
||||
Task packages, deliverables, and how we hand work between team members
|
||||
or to external consumers.
|
||||
任务包、交付物、团队成员之间或对外部消费方的交接。
|
||||
|
||||
## Why this matters
|
||||
## 为什么这事重要
|
||||
|
||||
Handoff failures cost more than the original work. A package that's
|
||||
"obviously how it works" to the author is a half-day of confusion for
|
||||
the recipient. Treat handoff as part of the deliverable, not as
|
||||
afterthought packaging.
|
||||
交接出问题的成本比原工作高。作者觉得"显然就是这么用的"的包,到接收方
|
||||
手里是半天的迷茫。把交接当**交付物的一部分**对待,不是事后包装。
|
||||
|
||||
## Two kinds of handoff
|
||||
## 两种 handoff
|
||||
|
||||
1. **Internal** — passing work to another team member (or future-you).
|
||||
Usually a branch, a PR, or a half-finished prototype.
|
||||
2. **External** — shipping a versioned artifact to a partner, customer,
|
||||
or downstream pipeline. Usually a zip, a dataset, or a release.
|
||||
1. **内部** —— 把工作交给队友(或未来的你)。通常是分支、PR、半成品
|
||||
原型。
|
||||
2. **外部** —— 给伙伴、客户或下游 pipeline 发版本化产物。通常是 zip、
|
||||
数据集、release。
|
||||
|
||||
Both use the checklist in `templates/HANDOFF_CHECKLIST.template.md`. The
|
||||
external case has a higher bar.
|
||||
两种都用 `templates/HANDOFF_CHECKLIST.template.md`。外部的标准更高。
|
||||
|
||||
## Task packages
|
||||
## 任务包
|
||||
|
||||
When we ship a task package (e.g. `praxis-sample-5.zip`,
|
||||
`task-assistant-v0.2-handoff-*.zip`), it must contain:
|
||||
我们发的任务包(比如 `praxis-sample-5.zip`、
|
||||
`task-assistant-v0.2-handoff-*.zip`)必须包含:
|
||||
|
||||
```
|
||||
<package>/
|
||||
├── README.md ← what this is, who it's for, how to use it
|
||||
├── CHANGELOG.md ← what changed since the last version
|
||||
├── VERIFICATION.md ← counts, checksums, sanity checks
|
||||
├── manifest.json ← machine-readable metadata
|
||||
├── data/ ← the actual deliverable
|
||||
└── scripts/ ← only what's needed to use the package
|
||||
├── README.md ← 这是什么、给谁用、怎么用
|
||||
├── CHANGELOG.md ← 自上一版改了什么
|
||||
├── VERIFICATION.md ← 计数、checksum、合理性检查
|
||||
├── manifest.json ← 机器可读的元数据
|
||||
├── data/ ← 真正的交付物
|
||||
└── scripts/ ← 用这个包必须的脚本
|
||||
```
|
||||
|
||||
`manifest.json` minimum fields:
|
||||
`manifest.json` 至少要有:
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -49,73 +45,59 @@ When we ship a task package (e.g. `praxis-sample-5.zip`,
|
||||
}
|
||||
```
|
||||
|
||||
If you can't fill a field, leave it as `null` and explain in the README.
|
||||
Never make one up.
|
||||
填不出的字段写 `null`,在 README 里解释。**永远不要瞎编**。
|
||||
|
||||
## Internal handoff (branch / PR)
|
||||
## 内部 handoff(分支 / PR)
|
||||
|
||||
Before handing off:
|
||||
交出去之前:
|
||||
|
||||
- PR description is current. The summary describes what shipped, not
|
||||
what was attempted.
|
||||
- The "test plan" section in the PR template is filled in honestly. If
|
||||
you didn't test something, say so — don't bury it.
|
||||
- Any AI-assisted decisions that surprised you go in a `## Notes for
|
||||
reviewer` section. "Claude tried X first, that didn't work because Y,
|
||||
here's the working approach" saves the reviewer a re-derivation.
|
||||
- Local-only state (env vars, scratch data) is documented or scripted.
|
||||
"Works on my machine" is not a handoff.
|
||||
- PR description 是最新的。Summary 写实际交付了什么,不是尝试过什么。
|
||||
- PR template 里的 "test plan" 老老实实填。没测就说没测——别埋。
|
||||
- AI 协作中让你意外的决策放进 `## Notes for reviewer`。"AI 先试了 X
|
||||
不行因为 Y,最后用了 Z"——省 reviewer 重推一遍。
|
||||
- 本地状态(env var、临时数据)要文档化或脚本化。"在我机器上能跑"
|
||||
不算交接。
|
||||
|
||||
The recipient should be able to:
|
||||
接收方应该能:
|
||||
|
||||
1. `git checkout` the branch
|
||||
2. Read the PR description
|
||||
3. Run the test plan
|
||||
4. Form an opinion
|
||||
1. `git checkout` 这个分支
|
||||
2. 读 PR description
|
||||
3. 跑 test plan
|
||||
4. 形成自己的判断
|
||||
|
||||
— without messaging you. If they have to message you, the handoff is
|
||||
incomplete.
|
||||
—— **不用问你**。如果接收方还要私聊你,handoff 就是不完整的。
|
||||
|
||||
## External handoff (versioned artifact)
|
||||
## 外部 handoff(版本化产物)
|
||||
|
||||
Higher bar. In addition to the task package contents above:
|
||||
标准更高。除上面任务包内容外:
|
||||
|
||||
- **Reproducibility.** Someone with access to the source repo can
|
||||
rebuild the artifact from the commit hash in `manifest.json`. Test
|
||||
this at least once before the first release.
|
||||
- **Verification report.** A machine-checkable report (JSON or
|
||||
similar) showing the artifact passed our pre-ship checks. Include
|
||||
what was checked and the result.
|
||||
- **Provenance.** If the artifact was generated using AI assistance,
|
||||
note the model and any human-in-the-loop steps. Not for ceremony —
|
||||
for debugging when something looks wrong six months from now.
|
||||
- **License & attribution.** Even for internal partners. Be explicit
|
||||
about what they can and can't do with the data.
|
||||
- **可重现。** 有源码访问的人能从 `manifest.json` 里的 commit hash
|
||||
重建产物。第一次发布前测一遍。
|
||||
- **验证报告。** 一份机器可读(JSON 之类)的报告,记录预发检查的
|
||||
通过情况。写清楚检查了什么、结果是什么。
|
||||
- **来源(provenance)。** AI 协助生成的,写明用的哪个模型、人工
|
||||
审核步骤是什么。不是为了仪式感——是为了半年后产物有问题时好查。
|
||||
- **License 与署名。** 内部伙伴也要写。明确他们能用、不能用。
|
||||
|
||||
## What NOT to ship
|
||||
## 不要发的东西
|
||||
|
||||
- Files larger than ~500 MB without a conversation about delivery
|
||||
channel.
|
||||
- Anything containing real PII unless that was explicitly the deal.
|
||||
- `.env`, secrets, API keys, internal hostnames.
|
||||
- "Final final v3" filenames. Use the version field. If it's `final`,
|
||||
it's `v1.0`.
|
||||
- A package without a README. Even a one-line README beats none.
|
||||
- 没聊过传输渠道的 ~500 MB 以上文件。
|
||||
- 含真实 PII 的内容——除非交付协议里就明确包含。
|
||||
- `.env`、密钥、API key、内部主机名。
|
||||
- "final final v3" 命名。用 version 字段。要是 final,那就是 `v1.0`。
|
||||
- 没有 README 的包。一行 README 也比没有强。
|
||||
|
||||
## Receiving a handoff
|
||||
## 收到 handoff 时
|
||||
|
||||
When you're on the receiving end:
|
||||
你是接收方:
|
||||
|
||||
1. Read the README first, fully. Resist the urge to start running
|
||||
scripts.
|
||||
2. Run the verification report. If it doesn't pass, stop and message
|
||||
the sender before doing anything else.
|
||||
3. Note any surprise — naming, missing files, version mismatch — and
|
||||
send it back to the sender within a day. Drift gets worse with
|
||||
silence.
|
||||
1. 先**完整读** README。忍住直接跑脚本的冲动。
|
||||
2. 跑一遍验证报告。不通过——停下来联系发送方再做任何事。
|
||||
3. 任何意外(命名、缺文件、版本不对)一天内反馈给发送方。drift 不
|
||||
反馈只会越来越歪。
|
||||
|
||||
## Templates
|
||||
## 模板
|
||||
|
||||
- `templates/HANDOFF_CHECKLIST.template.md` — fill out per handoff,
|
||||
ships in the package.
|
||||
- `templates/PR_DESCRIPTION.template.md` — for internal handoff via PR.
|
||||
- `templates/HANDOFF_CHECKLIST.template.md` —— 每次交接填一份,跟
|
||||
包一起发。
|
||||
- `templates/PR_DESCRIPTION.template.md` —— 内部 handoff 走 PR 用。
|
||||
Reference in new issue
Block a user