Sharpen the sync evidence warning to non-card changes only

Why: evidence rows are written before their containing card commit, so a naive
HEAD-diff would flag every task's evidence as stale and train people to ignore
the warning.

Evidence: bash -n clean; the live task-sync for this task exercises the new
path (warning fires only when a non-.task diff follows an evidence row's HEAD).

Impact: scripts/task.sh cmd_sync now excludes .task from the staleness diff;
AGENTS.md wording aligned (three-output evidence via make evidence).

Refs: task card evidence table; guidelines verification.md tool-written rule.
This commit is contained in:
2026-10-05 10:51:39 +00:00
parent 6518f6ed0a
commit 0123cec450
3 changed files with 30 additions and 6 deletions
+2 -2
View File
@@ -24,8 +24,8 @@
允许的堆叠例外):任务卡显式记录父任务与父 PR;子分支命名 `<type>/<父slug>-<子题>`,
不嵌 SHA;合入顺序固定父→子;父合入后子分支须 `make task-sync` 并入最新 main 并把 PR
base 改回 main,方可声明可合入(分支保护要求 head 含 origin/main,未同步必被拦)。
- **验收、请求审核、合入前**各运行一次 `make task-sync`;完成声明附 precheck、task-sync、
测试三段输出。
- **验收、请求审核、合入前**各运行一次 `make task-sync`;完成声明的 precheck、task-sync、
测试三段输出由 `make evidence` 写入任务卡(见「证据与验证门禁」),不手抄。
- 合入后**在 worktree 内**运行 `make task-finish` 回收 worktree 与分支(脚本会把
当前目录当 worktree 回收——在主检出运行会误删主检出,已加防护);放弃未合入
工作用 `make task-finish ABANDON="--abandon <原因>"` 并记录原因。