Skip to content

Commit fb3ec40

Browse files
authored
Merge pull request #50 from LeXwDeX/dev
Dev
2 parents dc4ab63 + 9c9270e commit fb3ec40

2 files changed

Lines changed: 87 additions & 20 deletions

File tree

.github/RELEASE_NOTES_TEMPLATE.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Release Notes Template
2+
3+
Copy this structure for every release. Keep section order and emoji headers consistent across releases. Omit sections that have no content — don't leave empty headers.
4+
5+
---
6+
7+
## opencode {VERSION}
8+
9+
{Prerelease/Stable} release from `{branch}` branch. {One-sentence summary — what's the headline change?}
10+
11+
---
12+
13+
### 🎯 Features
14+
15+
- **{Feature name}**: {Description. What does it do? Why does it matter? Reference PR # if applicable.}
16+
17+
---
18+
19+
### 🐛 Bug Fixes
20+
21+
- **{Bug}**: {Root cause in one sentence → fix in one sentence. What was broken, what changed.}
22+
23+
---
24+
25+
### 🏗️ Architecture / Refactor
26+
27+
- **{Change}**: {What was restructured and why. Only include if the change is user-visible or affects developers.}
28+
29+
---
30+
31+
### ⚙️ CI / Engineering
32+
33+
- {Change}: {What and why.}
34+
35+
---
36+
37+
### 📦 Dependencies / Tooling
38+
39+
- {Change}: {Version bump, revert, or tool addition/removal.}
40+
41+
---
42+
43+
### 🧪 Test Summary
44+
45+
```
46+
{module}: N pass
47+
{module}: N pass
48+
total: N tests, 0 failures
49+
typecheck: N/N packages green
50+
```
51+
52+
---
53+
54+
### 🔍 Verification
55+
56+
{How was this release verified? Cross-review rounds, TDD coverage, live e2e status, etc. Be honest about what was and wasn't tested.}
57+
58+
---
59+
60+
**Full changelog:** `{previous_tag}...{current_tag}`

AGENTS.md

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,42 @@
44
## Git Workflow (铁律)
55

66
```
7-
feat/* ──┐
8-
fix/* ───┤
9-
debug/* ─┼──merge──▶ main ──[ TDD 覆盖率 + CI + E2E 全绿 ]──▶ main 版本
10-
docs/* ──┤
11-
refactor/*┤
12-
test/* ──┤
13-
chore/* ─┘
7+
feat/**, fix/** ──PR(Typecheck 门禁)──▶ dev ──push 触发全量测试──▶
8+
dev ──手动 release-fork──▶ prerelease 测试版
9+
dev ──PR(全量测试门禁)──▶ main ──手动 release-fork──▶ 正式版
1410
```
1511

16-
**各类 `{type}/*` 分支汇总到 `main``main` 是唯一的质量门禁**:只有 TDD 覆盖率 + CI + E2E 全部通过,才产出可发布的版本
12+
**分层门禁**`dev` 是快速集成层(仅 Typecheck),`main` 是正式质量门禁(Typecheck + 全量 Unit Tests + E2E)。所有改动通过 PR 流转,禁止直推 `main``dev`(由 GitHub Rulesets 强制)
1713

18-
| Branch | CI/TDD | Purpose |
19-
|--------|--------|---------|
20-
| `{type}/{name}` | ❌ 不跑 | 功能/修复/调试/文档/重构/测试/杂务等开发,频繁变更 |
21-
| `main` |**只有 main 会触发 TDD 覆盖率 + CI + E2E 的 GitHub Actions** | 质量门禁 + 发版,全绿才产出新版本 |
14+
| Branch | 直推 | PR 门禁 | CI 触发 | Purpose |
15+
|--------|------|---------|---------|---------|
16+
| `{type}/**` | ✅ 允许 || ❌ 不跑 | 开发分支,频繁变更 |
17+
| `dev` | ❌ 禁止 | PR 必须通过 **Typecheck** | ✅ push 触发 Typecheck + 全量测试 | 快速集成层 |
18+
| `main` | ❌ 禁止 | PR 必须通过 **Typecheck + Unit Tests + E2E (linux + windows)** | ✅ push 触发全量 | 正式质量门禁 + 发版 |
2219

2320
**流程**
24-
1.`main` 切出 `{type}/{name}` 分支开发
25-
2. 完成后合并到 `main`
26-
3. `main` 必须全绿(TDD 覆盖率 + CI + E2E,由 GitHub Actions 配置触发)→ 产出新版本
27-
4. `main` 同时用于发版(`fork-release` 手动触发)
28-
29-
CI 配置:`ci-test.yml``ci-typecheck.yml` 仅在 push 到 `main` 时触发,`cancel-in-progress: false` 保证每次都跑完。
21+
1.`main` 切出 `feat/**``fix/**` 分支开发
22+
2. PR → `dev`(Typecheck 门禁,快速合并)
23+
3. push 到 `dev` 自动触发全量测试验证
24+
4.`dev` 手动 `release-fork` → 产出 **prerelease** 测试版
25+
5. PR `dev``main`(全量测试门禁:Typecheck + Unit Tests + E2E)
26+
6. 合并到 `main` 后手动 `release-fork` → 产出**正式版**
27+
28+
**Rulesets(GitHub Settings → Rules → Rulesets)**
29+
- `protect-main`:禁止直推/删除/force-push;PR 需通过 4 项检查(Typecheck、Unit Tests (linux)、E2E Tests (linux)、E2E Tests (windows))
30+
- `protect-dev`:禁止直推/删除/force-push;PR 需通过 Typecheck
31+
- `branch-naming`:只允许创建 `feat/**``fix/**``chore/**``docs/**``refactor/**``test/**``release/**``hotfix/**` 前缀的新分支
32+
33+
**CI 配置**
34+
- `ci-typecheck.yml`:push 到 `main`/`dev` + PR → `main`/`dev` 时触发(快速门禁)
35+
- `ci-test.yml`:push 到 `main`/`dev` + PR → `main` 时触发全量测试(`cancel-in-progress: false` 保证跑完)
36+
- `release-fork.yml`:手动触发;从 `dev` 发布自动标记 `--prerelease`,从 `main` 发布正式版
3037

3138
## Branch Names
3239

33-
Format: `{type}/{short-name}` where `type` is one of: `feat`, `fix`, `debug`, `docs`, `refactor`, `test`, `chore`. The short name uses hyphens, at most three words.
40+
Format: `{type}/{short-name}` where `type` is one of: `feat`, `fix`, `chore`, `docs`, `refactor`, `test`, `release`, `hotfix`. The short name uses hyphens, at most three words. Enforced by GitHub Ruleset `branch-naming`.
3441

35-
Examples: `feat/session-recovery`, `fix/scroll-state`, `debug/goal-loop`, `docs/branch-naming`, `refactor/dag-spawn`, `test/auth-flow`, `chore/regenerate-sdk`.
42+
Examples: `feat/session-recovery`, `fix/scroll-state`, `docs/branch-naming`, `refactor/dag-spawn`, `test/auth-flow`, `chore/regenerate-sdk`, `release/v1.18`, `hotfix/critical-patch`.
3643

3744
## Commits and PR Titles
3845

0 commit comments

Comments
 (0)