Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion docs/archive/plans/2026-08-14-branch-governance-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

> **设计日期**:2026-08-14
> **适用仓库**:`Prismer-AI/luminclaw`
> **状态**:已确认,待实施
> **状态**:已实施(2026-08-14)

## 1. 目标

Expand Down Expand Up @@ -123,3 +123,11 @@ GitHub classic branch protection 本身不能限定 PR 来源分支,因此由
- 本地工作树干净,停留在最新 develop。

若 CI 失败,停止合并并修复 feature;若保护 API 拒绝配置,保留已推送分支并报告具体规则,不用管理员权限绕过失败检查。任何远端分支删除只针对已合并的 `feature/docs-reorganization`。

## 10. 实施记录

- PR #1 已按 `feature/docs-reorganization → develop` 路径通过 Feature CI 并 squash merge;
- develop 合并提交 `cc110b7` 的 Integration CI 已通过 TypeScript、Embedded、npm pack 和 Rust 检查;
- main 保持在发布基线 `9f1bf56`,未接收本次文档与治理变更;
- develop 和 main 的 required checks、PR、strict、线性历史、对话解决、管理员约束及禁止 force-push/delete 均已通过 GitHub API 核验;
- 仓库默认分支仍为 main,且已启用 PR 合并后自动删除 head branch。
Original file line number Diff line number Diff line change
Expand Up @@ -43,59 +43,59 @@ Add a Branch Workflow section with branch roles, branch creation from develop, P

Add enforceable agent rules: begin work from updated develop, use `feature/<topic>`, run feature checks, PR to develop, and never bypass protected checks or push directly to long-lived branches.

- [ ] **Step 3: Finalize the design status**
- [x] **Step 3: Finalize the design status**

After remote verification succeeds, change the design status from `待实施` to `已实施`.

### Task 3: Create and publish branches

**Files:** Git refs and remote branches only.

- [ ] **Step 1: Commit CI and guide changes on the current feature work**
- [x] **Step 1: Commit CI and guide changes on the current feature work**

Run local Feature CI commands, commit the workflows/guides/plan, then rename `OOXXXXOO/lumin` to `feature/docs-reorganization`.

- [ ] **Step 2: Create and push develop from main**
- [x] **Step 2: Create and push develop from main**

Create local develop at `main` (`9f1bf56`) and push it to origin with upstream tracking. Do not move main.

- [ ] **Step 3: Push the feature branch**
- [x] **Step 3: Push the feature branch**

Push `feature/docs-reorganization` to origin and set upstream.

### Task 4: Validate and merge the first feature PR

**Files:** GitHub pull request and develop branch.

- [ ] **Step 1: Open the PR**
- [x] **Step 1: Open the PR**

Create `feature/docs-reorganization → develop` with a summary of the documentation structure, agent guides, CI, and branch governance.

- [ ] **Step 2: Wait for Feature CI**
- [x] **Step 2: Wait for Feature CI**

Use `gh pr checks --watch`; require both `feature-source-policy` and `feature-typescript` to succeed. Do not bypass failures.

- [ ] **Step 3: Protect develop**
- [x] **Step 3: Protect develop**

Configure classic branch protection with strict required checks, required PRs, linear history, conversation resolution, admin enforcement, and force-push/deletion disabled.

- [ ] **Step 4: Squash merge and clean the feature branch**
- [x] **Step 4: Squash merge and clean the feature branch**

Squash merge the PR, switch the worktree to develop, fast-forward from origin, then delete the merged local and remote feature branch.

### Task 5: Validate develop and protect main

**Files:** GitHub Actions runs, repository settings, main branch protection.

- [ ] **Step 1: Wait for Integration CI on develop**
- [x] **Step 1: Wait for Integration CI on develop**

Require `integration-typescript` and `integration-rust` to pass on the merged develop commit. The source-policy job is intentionally skipped on a push event.

- [ ] **Step 2: Protect main**
- [x] **Step 2: Protect main**

Require strict `integration-source-policy`, `integration-typescript`, and `integration-rust` checks plus PRs, linear history, conversation resolution, admin enforcement, and force-push/deletion disabled.

- [ ] **Step 3: Enable automatic head-branch deletion**
- [x] **Step 3: Enable automatic head-branch deletion**

Set repository `delete_branch_on_merge=true`; keep main as the default branch and do not create a release PR or npm publication.

Expand All @@ -104,14 +104,14 @@ Set repository `delete_branch_on_merge=true`; keep main as the default branch an
**Files:**
- Modify: `docs/archive/plans/2026-08-14-branch-governance-implementation-plan.md`

- [ ] **Step 1: Inspect remote branches and protections**
- [x] **Step 1: Inspect remote branches and protections**

Verify main/develop SHAs, default branch, required checks, PR requirement, admin enforcement, linear history, conversation resolution, and force-push/deletion settings via `gh api`.

- [ ] **Step 2: Verify local state**
- [x] **Step 2: Verify local state**

Confirm the current branch is clean develop, main remains at `9f1bf56`, and the completed feature is absent locally and remotely.

- [ ] **Step 3: Mark the design and plan complete**
- [x] **Step 3: Mark the design and plan complete**

Commit the final status updates to develop through a follow-up feature branch and the same protected PR flow; do not push directly to develop.
Loading