chore(git-workflow): 炼境自身分支策略 — complexity-gated feat/* + PR CI 覆盖
All checks were successful
Push & PR Check / check (push) Successful in 46s

This commit is contained in:
lanrtop 2026-07-04 09:45:40 +09:00
parent 9881b568b6
commit 8e9c53f182
2 changed files with 23 additions and 3 deletions

View File

@ -1,8 +1,10 @@
# 前端类型检查 + 单元测试(每次 push master 触发) # 前端类型检查 + 单元测试(push master/feat/* 或向 master 发 PR 时触发)
name: Push Check name: Push & PR Check
on: on:
push: push:
branches: [master, 'feat/**']
pull_request:
branches: [master] branches: [master]
jobs: jobs:

View File

@ -166,9 +166,27 @@ docs/templates/ 炼境接入包模板草案(设计层)
## Git 工作流 ## Git 工作流
`docs/ai-context/git-workflow.md`分支策略 + Conventional Commits + Rules-Applied trailer + PR 规范)。 `docs/ai-context/git-workflow.md`Conventional Commits + Rules-Applied trailer + PR 规范)。
**commit 必须符合 Conventional Commits**lefthook 强制),炼境据此采集飞轮数据。 **commit 必须符合 Conventional Commits**lefthook 强制),炼境据此采集飞轮数据。
### 炼境自身的分支策略
> `git-workflow.md` 是分发给被管理子项目的接入包模板dev→main 双分支)。
> 炼境自身使用以下策略,不套用子项目模板。
| 任务复杂度 | 分支策略 |
|-----------|---------|
| S简单增删改 | 直接 push `master`,不开分支 |
| M中等逻辑 | 开 `feat/<blueprint-module-id>` 分支,完成后 PR → `master` |
| L复杂系统 | 开 `feat/<blueprint-module-id>` 分支,必须走 PR + CI 验证 |
**分支命名**:直接对应蓝图模块 ID`feat/manage-multi-view`、`feat/flywheel-intelligence`。
**为什么 M/L 要开分支**
- PR body 是 agent 自验报告的归宿飞轮从中采集结构化数据PR 事件比 push 事件包含更多意图信息)
- feat/* 分支触发 PR CI是 agent 自验链条的最后一环(本地 typecheck → PR CI → 人终验)
- 炼境推荐子项目走 PR 工作流,自身也应遵守同一套规范
## agent 按钮与验证路径 ## agent 按钮与验证路径
> 完整体系设计见 `docs/ai-context/agent-button-system.md` > 完整体系设计见 `docs/ai-context/agent-button-system.md`