Decouple task priority from integration topology #620

Merged
weichen merged 9 commits from feature/norm-remediation-u3 into feature/norm-remediation 2026-10-18 17:15:06 +00:00
2 changed files with 265 additions and 8 deletions
@@ -0,0 +1,256 @@
# feature/norm-remediation-u3 任务卡
任务主记录:PR #620 https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/620;状态:已完成(合入前闭合);owner:weichen
- 权威仓:ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-Dev.git;目标分支:feature/norm-remediation;R0(initial_base_sha)= fe0f1cd4649f11b0d855ec39b882b8ca37fffb6b
- 工作区:/home/weichen/projects/Agent-System-Dev-wt-feature-norm-remediation-u3(worktree);分支:feature/norm-remediation-u3
- 分支类型:child;initiative_id:feature-norm-remediation;root_target:main;immediate_target:feature/norm-remediation;accepting_requirements:false;parent_branch:feature/norm-remediation;parent_head_sha:fe0f1cd4649f11b0d855ec39b882b8ca37fffb6b;parent_pr:https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/616;parent_source:origin
- 需求分流:免(父 initiative 子任务登记已列出 feature/norm-remediation-u3;parent_head_sha=fe0f1cd4649f11b0d855ec39b882b8ca37fffb6b)
- 授权与交付终点:用户于 2026-10-18 授权按规范整改计划实施 U3,并按本仓门禁将子任务合入 `feature/norm-remediation`。仅允许调整 Dev `policy/delivery.md` 的任务通道分类与拓扑选择规则;未授权修改脚本、分支命令/流程、CI/平台设置、其他 U-ID 或 Guidelines。
- 交付模式:goal-first(目标、范围和交付终点一次确认;范围内连续推进)
- 实施执行:agent-per-unit(配置:AGENT-EXECUTION.md)
- 合入执行:agent(已授权交付范围内,Review 通过、冲突解决且当前 HEAD 的 CI 通过后合入)
- 流程依据:仓库根目录 policy/delivery.md(归档后仍按仓库根目录定位)
## 目标与非目标
目标:让修复/完善/扩展/新增类别决定优先级,而 standalone、child、initiative 拓扑由集成、依赖与验收需要决定。独立可验收工作(含小完善/新能力)可 standalone;多依赖单元、跨单元集成或共同最终验收需要 initiative;修复若属于 L1 范围则可作为 child,同时保留 fix/hotfix 优先级。JOIN 必须与 initiative 已记录目标/验收一致;远端发现不可核验仍不得判断 NEW 或建分支。
范围:`policy/delivery.md`「层级、任务通道与分级门禁」。非目标:不改脚本、任务字段、命令、分支模型、triage 事实来源、门禁/排队规则或平台行为。
计划:[U1-U7 规范整改计划](</home/weichen/projects/Agent-System-Dev-wt-feature-norm-remediation-plan/docs/superpowers/plans/2026-10-18-0849-fix-development-norm-remediation-plan.md>),U3。
## Agent 实施收据
路由与 fail-stop 规则见根目录 AGENT-EXECUTION.md 与 policy/delivery.md;每次尝试一行,原始日志留在源码外收据路径。
| 单元 ID | 预期范围 | 配置摘要 | 角色 | 候选顺序 | attempt | CLI/模型 | 终态 | transport | fallback | 源码外收据路径 |
|---|---|---|---|---|---|---|---|---|---|---|
| norm-u3-task-channel-by-integration-need | `policy/delivery.md` task channel/topology policy | caefcb72 | implementation | cursor, agy, pi | 1 | cursor-agent-stable / auto | success | 98447e269cea | 0 | /tmp/norm-u3-task-channel-policy-receipt.json |
| norm-u3-independent-policy-review | fresh-session review of policy/delivery.md scenarios | caefcb72 | review | pi, antigravity, cursor, codex | 1 | pi / MiniMax-M3 | success | cb582d170cc4 | 0 | /tmp/norm-u3-independent-review-receipt.json |
## 同步记录
| 节点 | sync_base_sha | tested_head_sha | checked_at |
|---|---|---|---|
| 启动 | fe0f1cd4649f11b0d855ec39b882b8ca37fffb6b | fe0f1cd4649f11b0d855ec39b882b8ca37fffb6b | 2026-10-18T16:45:52Z |
## 证据(Evidence)
<!-- CMD="<命令>" make evidence 写入;手抄/转写输出视为无效证据(AGENTS.md 证据与验证门禁)。 -->
| 时间(UTC) | 命令 | 被测HEAD | exit | 来源 | sha256(16) |
|---|---|---|---|---|---|
## 结果与验证
- 结果:U3 将类别与集成拓扑分开:修复类别保留优先级及 hotfix 插队;独立可验收的修复、完善和新能力可走 standalone;多依赖单元、跨单元集成或共同最终验收才建立 initiative;符合在途 L1 目标与验收的工作可 JOIN/child,远端不可核验仍拒绝 NEW。
- 验证:`git diff --check && make test-affected` 通过;受影响目标为 `test-worktree` 与 `test-governance`,其中治理测试 495 项通过、18 项 skip(SELF,HEAD `98447e269ceaf1982405580d4ce5549d47b165c4`)。worker 对四个验收场景逐项核对;host 复核实际 diff 与原有分级表/triage 规则,无矛盾。SELF 收据已写入本卡。
- 影响与剩余项:
## 合入与清理
- Review 记录:host Review 完成(base `d3223f5ec13bb5456ccb96dd136374f6cce94253`,head `98447e269ceaf1982405580d4ce5549d47b165c4`;目标优先级与集成拓扑分离、修复可 standalone 或 child、JOIN/NEW/REMOTE_UNVERIFIED 条件和现有门禁均符合 U3;无阻塞 finding)
- 独立 Review(fresh session,单元 `norm-u3-independent-policy-review`,仅检视 `policy/delivery.md` 在 `d3223f5ec13bb5456ccb96dd136374f6cce94253..98447e269ceaf1982405580d4ce5549d47b165c4` 的 diff,未接触其它文件、未做 `git add`/`commit`/`push`/PR/合入/索引/配置改动):`policy/delivery.md` 净改动 +9/-8,集中于 standalone 定位(line 163)、任务通道两步判定(line 193–200)与分级门禁表(line 210)。
- 场景 1(小完善/新能力仍可 standalone):通过。line 163 明确 standalone 涵盖「修复、完善与新能力」;line 196 再次声明「小完善与新能力同样适用」并把「完善、扩展、新增不设额外优先级」写死。
- 场景 2(多依赖单元 + 共同最终验收 → L1,即便含修复):通过。line 197 L1 触发条件为「多个相互依赖的单元、跨单元集成或一个共同最终验收需要阶段集成与组合验证」,与「类别只决定优先级」正交;line 198 显式允许「工作(含修复)」作为在途 L1 的 child。
- 场景 3(属于在途 L1 集成契约的修复保留优先级且不被强推 main):通过。line 193 保留 `fix/`/`hotfix/` 队列优先级与 #518 插队权;line 198 允许该类修复走 child;分级表把原「L1 或修复→main」改为「L1 或 standalone→main」(line 210),移除对修复的 main 强制通路。修复合入主干的快慢继续由类别决定,而非由拓扑决定。
- 场景 4(远端不可核验时拒绝建分支):通过。line 168「不得得出 `NEW`」、line 170「不一致或远端不可核验时拒绝,不建分支」保持原样;line 198 任务通道节内再次写入「远端发现不可核验时不得得出 `NEW`、不建分支」,与既有分流契约一致且重复强化。
- 跨节一致性:合并调度 line 363「standalone/修复 PR」、line 366「`fix/`、`hotfix/` 优先」与本 diff 共同表述一致;修复 PR 仍以 standalone 形式占用 #518 窗口并享有优先级,子任务合入(child → L1)按 line 207 表「L2→L1」走轻量门禁且不排窗口,符合「类别只决定优先级,拓扑只决定目标」的原则。
- 残余非阻塞注意:line 363 措辞「standalone/修复 PR」在拓扑语境下存在轻微冗余(standalone 修复已由「standalone」覆盖),但当前未引发歧义、不阻塞 U3 验收,可作为后续治理 L1 增量整理。
- 结论:**无阻塞 finding**;U3 验收四条场景均在 `policy/delivery.md` 文本中得到明确、可独立验证的支撑。未声明 CI 通过(按约束)。
- 冲突记录:NOT_RUN(最新目标同步、冲突处置、组合兼容核验及复审/补测)
- CI 记录:NOT_RUN(当前 HEAD 完整 SHA、全部必需检查、运行链接、执行身份及 GATE 结果)
- 合入记录:NOT_RUN(交付授权范围、PR、被核验 HEAD、合入 SHA、目标分支及内容核验)
- 清理记录:NOT_RUN(授权依据、写者退出确认、worktree/分支/任务卡处置)
<!-- Local receipt: SELF. Digests detect corruption; they do not authenticate a reviewer or CI. -->
```json
{
"summary_schema": 1,
"source": "SELF",
"timestamp": "2026-10-18T16:45:08.496457+00:00",
"command": "make precheck",
"exit_code": 0,
"cwd": "/home/weichen/projects/Agent-System-Dev-wt-feature-norm-remediation",
"before_head": "fe0f1cd4649f11b0d855ec39b882b8ca37fffb6b",
"after_head": "fe0f1cd4649f11b0d855ec39b882b8ca37fffb6b",
"branch": "feature/norm-remediation",
"target_branch": "feature/norm-remediation",
"target_head": "fe0f1cd4649f11b0d855ec39b882b8ca37fffb6b",
"root_target": "main",
"immediate_target": "main",
"before_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"after_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"output_tail": [
"make[1]: Entering directory '/home/weichen/projects/Agent-System-Dev-wt-feature-norm-remediation'",
"[repo] branch=feature/norm-remediation head=fe0f1cd464",
"[remote] origin/feature/norm-remediation=fe0f1cd464 ahead=0 behind=0",
"[tree] clean submodules_drift=0 uninit=0",
"[worktrees] linked=7",
"[recycle] merged un-recycled branches: feature/layered-python-env feature/norm-remediation-u2",
"[initiatives] local cards (not authoritative): none",
"[hooks] core.hooksPath=scripts/hooks(pre-commit/post-merge 实际接线)",
"[facts] policy/facts.md 6 条事实均在有效期内",
"[required-reading] core/baseline.md, workflows/delivery.md §1, policy/delivery.md",
"[R0] fe0f1cd464(完整:fe0f1cd4649f11b0d855ec39b882b8ca37fffb6b)",
"[worktree] before-sync: recursive component checks passed",
"[verdict] READY — 保留本次 precheck receipt 后建任务工作区:PRECHECK_RECEIPT=/tmp/task-precheck.json make task-start NAME=feature/your-branch",
"make[1]: Leaving directory '/home/weichen/projects/Agent-System-Dev-wt-feature-norm-remediation'"
],
"output_sha256": "ee1240abc7866d6b272cf3c307a650b907dc7b36ae662335d8573d8c3dd7240c",
"receipt_sha256": "92b34a0bd5532f33b1598e25686504a91dab621b36f372e7e0d31c18addb4c3a",
"receipt_path": "/home/weichen/.cache/agent-system-dev/evidence/92b34a0bd5532f33b1598e25686504a91dab621b36f372e7e0d31c18addb4c3a.json"
}
```
<!-- Local receipt: SELF. Digests detect corruption; they do not authenticate a reviewer or CI. -->
```json
{
"summary_schema": 1,
"source": "SELF",
"timestamp": "2026-10-18T16:47:54.838263+00:00",
"command": "git diff --check && make test-affected",
"exit_code": 0,
"cwd": "/home/weichen/projects/Agent-System-Dev-wt-feature-norm-remediation-u3",
"before_head": "98447e269ceaf1982405580d4ce5549d47b165c4",
"after_head": "98447e269ceaf1982405580d4ce5549d47b165c4",
"branch": "feature/norm-remediation-u3",
"target_branch": "main",
"target_head": "eef7e5e778cabcb6216f74b74213a3d7511f383b",
"root_target": "feature/norm-remediation",
"immediate_target": "feature/norm-remediation",
"before_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"after_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"output_tail": [
"test_invalid_json_is_denied (test_write_guard.WriteGuardTests.test_invalid_json_is_denied) ... ok",
"test_missing_parent_on_main_is_denied (test_write_guard.WriteGuardTests.test_missing_parent_on_main_is_denied) ... ok",
"test_missing_unknown_and_malformed_write_input_are_denied (test_write_guard.WriteGuardTests.test_missing_unknown_and_malformed_write_input_are_denied) ... ok",
"test_non_git_destination_is_explicitly_outside_scope (test_write_guard.WriteGuardTests.test_non_git_destination_is_explicitly_outside_scope) ... ok",
"test_nonwrite_tools_are_outside_scope (test_write_guard.WriteGuardTests.test_nonwrite_tools_are_outside_scope) ... ok",
"test_relative_path_uses_hook_cwd_not_process_cwd (test_write_guard.WriteGuardTests.test_relative_path_uses_hook_cwd_not_process_cwd) ... ok",
"test_symlink_into_main_with_missing_parents_is_denied (test_write_guard.WriteGuardTests.test_symlink_into_main_with_missing_parents_is_denied) ... ok",
"test_valid_multi_file_patch_on_feature_is_allowed (test_write_guard.WriteGuardTests.test_valid_multi_file_patch_on_feature_is_allowed) ... ok",
"",
"----------------------------------------------------------------------",
"Ran 495 tests in 357.921s",
"",
"OK (skipped=18)",
"make[2]: Leaving directory '/home/weichen/projects/Agent-System-Dev-wt-feature-norm-remediation-u3'",
"make[1]: Leaving directory '/home/weichen/projects/Agent-System-Dev-wt-feature-norm-remediation-u3'"
],
"output_sha256": "56d1d5d11197d500505b98bd63f64e1c4a3375eee0bbf51b5cb7f948d3de1e24",
"receipt_sha256": "f214edd4293ec312c8ef1e50b1761db12563fe8c7f19c73dc82a95003b06e28a",
"receipt_path": "/home/weichen/.cache/agent-system-dev/evidence/f214edd4293ec312c8ef1e50b1761db12563fe8c7f19c73dc82a95003b06e28a.json"
}
```
<!-- Local receipt: SELF. Digests detect corruption; they do not authenticate a reviewer or CI. -->
```json
{
"summary_schema": 1,
"source": "SELF",
"timestamp": "2026-10-18T16:55:49.532309+00:00",
"command": "make task-sync",
"exit_code": 0,
"cwd": "/home/weichen/projects/Agent-System-Dev-wt-feature-norm-remediation-u3",
"before_head": "f4a95e5698b6d31752f206f26094d31980a00f7e",
"after_head": "f4a95e5698b6d31752f206f26094d31980a00f7e",
"branch": "feature/norm-remediation-u3",
"target_branch": "main",
"target_head": "eef7e5e778cabcb6216f74b74213a3d7511f383b",
"root_target": "feature/norm-remediation",
"immediate_target": "feature/norm-remediation",
"before_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"after_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"output_tail": [
"make[1]: Entering directory '/home/weichen/projects/Agent-System-Dev-wt-feature-norm-remediation-u3'",
"[worktree] before-sync: recursive component checks passed",
"[worktree] before-update: recursive component checks passed",
"[worktree] materialize: recursive component checks passed",
"[worktree] after-sync: recursive component checks passed",
"[evidence] WARN JSON receipt line 59: recorded HEAD predates non-card changes ——关键检查须重跑并以 make evidence 重新写入",
"[synced] sync_base=fe0f1cd4649f11b0d855ec39b882b8ca37fffb6b tested_head=f4a95e5698b6d31752f206f26094d31980a00f7e checked_at=2026-10-18T16:56:14Z changed=0 sync_target=feature/norm-remediation",
"[next] 跑正式验收(make test 等),证据写入任务卡",
"make[1]: Leaving directory '/home/weichen/projects/Agent-System-Dev-wt-feature-norm-remediation-u3'"
],
"output_sha256": "c2b5f39f8fc6cc8a30af9012b2eb46ced09d2ddbcab9ad490762a4bfc85a613d",
"receipt_sha256": "b42f1564d10e97928cdfd2f39fd6eda97e969f22bfbcff4668543a7c3be93dce",
"receipt_path": "/home/weichen/.cache/agent-system-dev/evidence/b42f1564d10e97928cdfd2f39fd6eda97e969f22bfbcff4668543a7c3be93dce.json"
}
```
## 闭合记录(合入前折叠)
- 本卡在 PR #620(https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/620)合入前闭合并归档,随该 PR 一同合入。
- 该 PR 的合并提交即本任务的落地记录。
- 合入后无需回填,也无需单独的闭合 PR。
<!-- Local receipt: SELF. Digests detect corruption; they do not authenticate a reviewer or CI. -->
```json
{
"summary_schema": 1,
"source": "SELF",
"timestamp": "2026-10-18T17:00:44.968802+00:00",
"command": "make task-close SELF=1",
"exit_code": 0,
"cwd": "/home/weichen/projects/Agent-System-Dev-wt-feature-norm-remediation-u3",
"before_head": "56d16ac458de980511da70f9dbeec4f0fbdab6e9",
"after_head": "1f34c35e446a3a93959fda4daf7bbdcab0819f81",
"branch": "feature/norm-remediation-u3",
"target_branch": "main",
"target_head": "eef7e5e778cabcb6216f74b74213a3d7511f383b",
"root_target": "feature/norm-remediation",
"immediate_target": "feature/norm-remediation",
"before_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"after_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"output_tail": [
"make[1]: Entering directory '/home/weichen/projects/Agent-System-Dev-wt-feature-norm-remediation-u3'",
"admit: ok",
"remote: ",
"remote: Create a new pull request for 'feature/norm-remediation-u3': ",
"remote: https://git-panel.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/new/feature/norm-remediation-u3 ",
"remote: ",
"[closed] .task/feature-norm-remediation-u3.md 已在 PR #620 合入前闭合并归档;合入后无需 task-close",
"make[1]: Leaving directory '/home/weichen/projects/Agent-System-Dev-wt-feature-norm-remediation-u3'"
],
"output_sha256": "656fc7c46263e0b49916551bc77638a287adaf06f42197540607c9ae0fb564a4",
"receipt_sha256": "183eb304dfa804b340e56d129108f413f5616aa653a3225d5f5ee58e505bc013",
"receipt_path": "/home/weichen/.cache/agent-system-dev/evidence/183eb304dfa804b340e56d129108f413f5616aa653a3225d5f5ee58e505bc013.json"
}
```
<!-- Local receipt: SELF. Digests detect corruption; they do not authenticate a reviewer or CI. -->
```json
{
"summary_schema": 1,
"source": "SELF",
"timestamp": "2026-10-18T17:03:30.573232+00:00",
"command": "make task-sync",
"exit_code": 0,
"cwd": "/home/weichen/projects/Agent-System-Dev-wt-feature-norm-remediation-u3",
"before_head": "532c7f3b6098d8071925afa48633b840b1148b69",
"after_head": "532c7f3b6098d8071925afa48633b840b1148b69",
"branch": "feature/norm-remediation-u3",
"target_branch": "main",
"target_head": "eef7e5e778cabcb6216f74b74213a3d7511f383b",
"root_target": "main",
"immediate_target": "feature/norm-remediation",
"before_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"after_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"output_tail": [
"make[1]: Entering directory '/home/weichen/projects/Agent-System-Dev-wt-feature-norm-remediation-u3'",
"[worktree] before-sync: recursive component checks passed",
"[worktree] before-update: recursive component checks passed",
"[worktree] materialize: recursive component checks passed",
"[worktree] after-sync: recursive component checks passed",
"[evidence] WARN JSON receipt line 68: recorded HEAD predates non-card changes ——关键检查须重跑并以 make evidence 重新写入",
"[synced] sync_base=fe0f1cd4649f11b0d855ec39b882b8ca37fffb6b tested_head=532c7f3b6098d8071925afa48633b840b1148b69 checked_at=2026-10-18T17:03:56Z changed=0 sync_target=feature/norm-remediation",
"[next] 跑正式验收(make test 等),证据写入任务卡",
"make[1]: Leaving directory '/home/weichen/projects/Agent-System-Dev-wt-feature-norm-remediation-u3'"
],
"output_sha256": "13d0ce871c7520312e4e6b199dac9274b1fc6f65d26ab150e84d9b35a3305fd2",
"receipt_sha256": "ad5add14e897beee093e25645f0c30b280175676b0b7826ea6cb634b07b772df",
"receipt_path": "/home/weichen/.cache/agent-system-dev/evidence/ad5add14e897beee093e25645f0c30b280175676b0b7826ea6cb634b07b772df.json"
}
```
+9 -8
View File
@@ -160,7 +160,7 @@ host 可以直接编写并提交的豁免只有 `.task/**`、`docs/superpowers/s
- **`main`**:稳定基线,仅接纳已完成并通过最终组合准入的结果。
- **大任务集成分支(initiative)**:从最新 `origin/main` 建立,根目标与即时目标均为 `main`。负责跨单元目标的阶段集成、组合验证与最终交付。合入主干后关闭、归档与回收,不作为长期存在的 develop 分支。
- **子任务分支(child)**:从远端所属大任务分支的当前头建立(须等于分流收据核验的 head,`make task-start` 校验),即时目标为大任务分支。负责一个有界单元的实施、独立 Review 与局部验证,通过 PR 合入大任务分支。
- **普通任务分支(standalone)**:无需阶段集成的小需求或独立修复,直接从最新 `origin/main` 建立并向 `main` 交付。
- **普通任务分支(standalone)**:可独立验收、无需阶段集成与组合验证的工作(含修复、完善与新能力),直接从最新 `origin/main` 建立并向 `main` 交付。
每个任务卡记录 `root_target` 与 `immediate_target`(子任务为所属大任务分支,其余为 `main`)。`make task-resume`、`make task-sync` 与 `make task-finish` 以 `immediate_target` 为准;任务卡默认在合入前以 `make task-close SELF=1` 闭合并随本 PR 合入(归档后上述命令仍从 `.task/archive/` 读取合入前闭合的卡);遗留卡的 `make task-close` 仅在 `FOLD=--fold` 时以其为闭合 PR base。
@@ -190,12 +190,13 @@ L1 章程与运行:
- 子任务可继承 L1 章程中的全部或部分领域规则,并在子任务卡注明继承范围。
- L1 不追 `main`,只在最终窗口、需要 `main` 上某修复、或长周期 L1 的里程碑/每周一次时运行 `make task-sync`。
任务通道按 修复/完善/扩展/新增 分类:
- **修复**:`fix/`(P0 生产事故用 `hotfix/`),standalone 直达 `main`,在合入队列中优先;hotfix 可在 #518 写明原因后插队。
- **完善**:进入所在领域的“完善列车” L1,按周或按批合入 `main`。
- **扩展**:优先 JOIN 同主题在途 L1,没有时新建。
- **新增**:建立 L1 并写章程。
- 治理与规范调整集中到一个治理 L1。
任务通道分两步判定,类别与拓扑互不替代:
- **类别只决定优先级**:修复用 `fix/`(P0 生产事故用 `hotfix/`),在合入队列中优先;hotfix 可在 #518 写明原因后插队。完善、扩展、新增不设额外优先级。
- **拓扑只按集成与验收需要决定**,不因工作被称为新增、完善或规模大而建 L1:
- **standalone**:工作有自己的验收、没有依赖单元、不共享集成契约、也不需要协同发布验证时,从 `main` 切出并直达 `main`;小完善与新能力同样适用。可独立验收的修复默认为 standalone。
- **L1**:多个相互依赖的单元、跨单元集成或一个共同最终验收需要阶段集成与组合验证时,建立 L1 并写章程。
- **child**:工作(含修复)属于某在途 L1 的共同范围、依赖链或验收时,作为其子任务。只有该 L1 已记录的目标与验收确实覆盖此工作、且加入不会悄然改变其已约定范围时才 `JOIN`;否则按上两条判定 `NEW`。远端发现不可核验时不得得出 `NEW`、不建分支。
- 治理与规范调整同样按上述拓扑判定;需要 L1 时集中到一个治理 L1。
- 只改记录(任务卡、报告)的变更不单独推进 `main`,随所属任务 PR 合入。
- 组件 pin 跟随用到它的 L1/任务一起推进,不单独开 pin PR(紧急修复除外)。
@@ -206,7 +207,7 @@ L1 章程与运行:
| 单元→L2 | worker 自检 + host 最小直接检查(`make test-affected`) | host 审阅实际 diff | 无 | 无 | 无 |
| L2→L1 | `make task-sync` 同步 L1 头 + `make test-affected` | 一次全新会话独立 Review | 轻量 CI(PR base 非 `main` 时只跑 `test` 作业,`test-pg`/`svc-realcombo` 跳过)作为 GATE | 不排 #518 窗口、不需分流收据(已登记子任务)、不要求三段证据;任务卡合入前 `make task-close SELF=1` | 无 |
| L1 的 WIP PR | — | — | 完整 CI,作为非阻塞预警 | — | — |
| L1 或修复→main | 最终窗口内 `make task-sync` + 完整组合验证 | 整体独立 Review | 完整 CI(`test`、`test-pg`、`svc-realcombo`) | #518 窗口、三段证据、合入前折叠闭合 | L1 最终一次用户专属验收(如有) |
| L1 或 standalone→main | 最终窗口内 `make task-sync` + 完整组合验证 | 整体独立 Review | 完整 CI(`test`、`test-pg`、`svc-realcombo`) | #518 窗口、三段证据、合入前折叠闭合 | L1 最终一次用户专属验收(如有) |
人工审批只保留 L1 章程确认、L1 最终用户专属验收与高后果双钥匙操作;等待 CI 一律 `make ci-wait SHA=<完整 SHA>`。