Files
Agent-System/.cursor/skills/agentctl-integrate-closeout/SKILL.md
T
WeiCHEN 821a307feb feat(ops): add Cursor skills/MCP/rules/hooks for agentctl
Wrap the live coordinator in project Cursor capabilities so agents
default to leases, docs apply, and daemon enqueue. Track skills/hooks/mcp
via .gitignore exceptions; guard destructive git with ask permission.
2026-09-23 19:23:40 +08:00

2.0 KiB
Raw Blame History

name, description
name description
agentctl-integrate-closeout Validate a merge candidate, enqueue for daemon ff-only integrate, and close out five-state. Use when ready to land a task on local dev.

agentctl 集成与收口

权威:操作规范、验证契约。常驻 daemon 已装载时走 enqueue,勿手动 integrate(除非 daemon 停)。

候选

D=$(git -C /path/to/Agent-System rev-parse HEAD)   # 冻结 expected-dev
ID=integrate-<task>-YYYY-MM-DD
git worktree add -b feature/$ID .worktrees/$ID "$D"
cd .worktrees/$ID
python3 ../../scripts/agentctl.py task register --id "$ID" --owner Cursor --scope . --capability git:dev
python3 ../../scripts/agentctl.py with --task "$ID" \
  --resource path:. --resource git:index --resource git:dev -- bash -lc '
  git merge --no-ff -m "merge: candidate <feature> into dev" feature/<task>
'

第一父必须等于 $D。

validate → enqueue(daemon ff)

python3 ../../scripts/agentctl.py validate --task "$ID" -- <验收命令>
python3 ../../scripts/agentctl.py queue enqueue \
  --task "$ID" --expected-dev "$D" --head "$(git rev-parse HEAD)"
# 在任务 worktree 内 enqueue;数秒内 daemon 合入
python3 ../../scripts/agentctl.py queue list
python3 ../../scripts/agentctl.py daemon status

验收按验证契约选行;治理脚本用 unittest discover。

五态收口

字段 典型值
review_state accepted
integration_state merged_local_dev
deployment not_required 或 loaded_local_launchd
cleanup pending(独立维护者;禁止 --force)
remote_sync not_requested

CURRENT 行 → done(docs apply);task close --status done。

清理前

确认 tip 为 local_dev 祖先、证据已持久化、无 tracked/untracked 遗留、无进程占用。唯一日志/对话归档进 .doc/ops/evidence/ 后再 worktree remove。