docs: add product project spec, distinguish date vs semver tags
Distill task_assistant's COLLABORATION_AND_RELEASE_WORKFLOW into a team-wide product project spec and clarify when each tag style applies. - Add docs/08-product-spec.md: semver triplet (internal/display/tag), manifest schema, dist-channel separation, user-confirmed update flow, feedback/log handling, sensitive-info scan, release flow, minimum delivery checklist - docs/03-git-workflow.md: split tagging into spec (YYYYMMDD) vs product (vX.Y.Z) sections, link to 08 - README.md, CLAUDE.md, AGENTS.md: update versioning section and doc index to reference 08 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
1 parent
154f592f3c
commit
dfa84743f9
5 files changed
+380
-25
No files matched your search
+36
-9
@@ -72,20 +72,35 @@ Reviewer 检查清单:
|
||||
|
||||
## Tag(版本管理)
|
||||
|
||||
按日期打 tag:`YYYYMMDD`(比如 `20260520`)。每个 tag 是 `main`
|
||||
某一时刻的快照——值得指着说"我们就按这版来"。
|
||||
按项目类型分两种 tag 风格:
|
||||
|
||||
规则:
|
||||
| 项目类型 | Tag 格式 | 例子 | 用在哪儿 |
|
||||
| -------- | ------------------- | -------------------------- | ------------------------------------- |
|
||||
| 规范类 | `YYYYMMDD[-N]` | `20260520`、`20260520-2` | team-guide、规约文档、内部约定仓库 |
|
||||
| 产品类 | `vX.Y.Z` | `v0.2.4` | task_assistant、有版本和发行包的产品 |
|
||||
|
||||
- 只在 `main` 上打 tag。功能分支打 tag 是 smell。
|
||||
- 一天最多一个 tag。同一天再切一个,加 `-N` 后缀:`20260520-2`、
|
||||
`20260520-3`。
|
||||
判断标准:会有"用户"拿到这个项目的版本化产物——产品类。否则——规范
|
||||
类。详细规则见 [`docs/08-product-spec.md`](08-product-spec.md)。
|
||||
|
||||
每个 tag 是 `main` 某一时刻的快照——值得指着说"我们就按这版来"。
|
||||
|
||||
通用规则(两类都适用):
|
||||
|
||||
- 只在 `main`(规范类)或 `dev`(产品类)上打 tag。功能分支打 tag
|
||||
是 smell。
|
||||
- 用 annotated tag,不用 lightweight。`git tag -a` 加一两句说自上次
|
||||
tag 以来改了什么。
|
||||
- Tag 一旦推到远端就不能改、不能删、不能 force-tag。错了就再切一个。
|
||||
- Tag commit、push tag、告诉大家 tag 名字——这就是发布。
|
||||
|
||||
切 tag:
|
||||
规范类专属:一天最多一个 tag。同一天再切一个,加 `-N` 后缀:
|
||||
`20260520-2`、`20260520-3`。
|
||||
|
||||
产品类专属:semver 三元组、产品 README 必备版本字段同步、tag
|
||||
message 用 `<Project> V<x.y.z>`——细则见
|
||||
[`docs/08-product-spec.md`](08-product-spec.md)。
|
||||
|
||||
切 tag(规范类):
|
||||
|
||||
```bash
|
||||
git checkout main
|
||||
@@ -94,6 +109,15 @@ git tag -a 20260520 -m "team-guide 20260520: bilingual README, dated tags"
|
||||
git push origin 20260520
|
||||
```
|
||||
|
||||
切 tag(产品类):
|
||||
|
||||
```bash
|
||||
git checkout dev
|
||||
git pull --ff-only <remote> dev
|
||||
git tag -a v0.2.4 HEAD -m "<Project> V0.2.4"
|
||||
git push <remote> v0.2.4
|
||||
```
|
||||
|
||||
查看 / 对比:
|
||||
|
||||
```bash
|
||||
@@ -102,17 +126,20 @@ git show 20260520 # 看一个 tag 里有什么
|
||||
git log --oneline 20260513..20260520 # 两个 tag 之间改了什么
|
||||
```
|
||||
|
||||
什么时候切 tag:
|
||||
什么时候切 tag(规范类):
|
||||
|
||||
- 本仓库的 docs 改了,队友需要重新读。
|
||||
- 加了、删了或重组了 template。
|
||||
- 新的约定正式生效(不是还在讨论)。
|
||||
|
||||
什么时候**不**切 tag:
|
||||
什么时候**不**切 tag(规范类):
|
||||
|
||||
- 改错别字、调格式、修死链 → 直接 push 到 `main`。
|
||||
- 还在讨论的草稿 → 走 PR,不打 tag。
|
||||
|
||||
产品类切 tag 跟着发版走,触发条件由[最低交付标准](08-product-spec.md#最低交付标准每次可给别人用的版本)
|
||||
决定。
|
||||
|
||||
## 不要做的事
|
||||
|
||||
- 不要 `git push --force` 到 `main`。永远不要。push 到自己分支
|
||||
|
||||
Reference in new issue
Block a user