Files
Agent-System-Dev/AGENTS.md
T
weichen f31fd5f62d Add the task-startup gate scripts and local hooks
Why: agents skipped triggered reading and wrote into shared checkouts holding
other tasks' in-flight changes; the 2026-09-30 empty-list incident session
found 24 overlapping in-flight files only by accident at first write.
Evidence: positive/negative suite in a real scratch repo passed 19/19
(precheck READY/BUSY/SYNC_REQUIRED, start refuse/establish, hook main/badname/
longsubject refusals, sync checkpoint, finish recycle and abandon double-
confirm); the suite caught three real defects (pipefail empty-grep abort,
worktree gitdir COMMIT_EDITMSG resolution, message checks in the wrong hook
phase).
Impact: make setup enables pre-commit/commit-msg hooks; make precheck/task-
start/task-sync/task-finish provide the governed path; no existing workflow
removed. AGENTS.md carries the resident gate rules.
Refs: Development-Guidelines 0.1.0-draft.7; task card .task/delivery-mechanism.md
2026-09-30 03:11:58 +00:00

1.5 KiB
Raw Blame History

Agent 工作说明(Agent-System-Dev)

本仓开发遵循 Development-Guidelines(见 deps/development-guidelines,gitlink 固定版本): 核心规则与术语见其 core/,按任务触发阅读 standards/ 专题;日常交付走 workflows/delivery.md。

任务启动门禁(强制)

  • 任务启动或恢复后,第一次写操作前运行 make precheck 并附完整输出;verdict 为 SHARED_WORKSPACE_BUSY / SYNC_REQUIRED 时不得编辑。
  • 按其必读清单完成阅读,然后 make task-start NAME=feature/<slug> 建立独立 worktree + feature 分支(自动记录 R0 与任务卡);任务中途不重复运行 precheck。
  • 验收、请求审核、合入前各运行一次 make task-sync;完成声明附 precheck、task-sync、 测试三段输出。
  • 合入后运行 make task-finish 回收 worktree 与分支;放弃未合入工作用 make task-finish ABANDON="--abandon <原因>" 并记录原因。

提交与 PR

  • 主题行:英文祈使句一行(≤100 列,不以句点结尾);body 写 Why: / Evidence: / Impact: / Refs: 四段;任务卡与 PR 描述为同一份文档。
  • 跨仓 gitlink 变更须经组合验证(make test)后在 Dev 仓推进;受保护分支经 PR 合入。
  • 模块边界、公开契约与隔离档位见 policy/modules/(如有)与 PROJECT.md。
  • 验证命令见 PROJECT.md「验证」节;完成声明须附实际命令输出证据。
  • 首次克隆本仓后运行 make setup 启用本地 pre-commit 钩子。