From b6bd69d6e85f9a2d6ae5f0bf15e5fcfe6dd88490 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Tue, 22 Sep 2026 20:39:30 +0800 Subject: [PATCH] docs(agents): clean up finalized task artifacts (#155716) --- .agents/skills/openclaw-pr-maintainer/SKILL.md | 13 +++++++++++++ .../references/landing.md | 17 +++++++++++++++-- AGENTS.md | 2 +- 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/.agents/skills/openclaw-pr-maintainer/SKILL.md b/.agents/skills/openclaw-pr-maintainer/SKILL.md index 0c3a9e6f7a92..ed369ba790ff 100644 --- a/.agents/skills/openclaw-pr-maintainer/SKILL.md +++ b/.agents/skills/openclaw-pr-maintainer/SKILL.md @@ -113,3 +113,16 @@ Verify the final merge/closure state and source rather than trusting a local summary. Report the problem, owner-level change, important proof and limitations, credit, and linked final state in concise prose. Record worthwhile follow-ups; do not manufacture another task after a bounded request is complete. + +## Finalize and clean up + +Once the requested outcome and required verification are complete, remove the +task's disposable proof and scratch. This includes test logs, receipts, local +proof archives, and `.crabbox` outputs. Do not retain, archive, export, or hand off +these files merely to remove the completed task's worktree. Follow +[native closeout](references/landing.md#recovery-and-closeout). + +Required pre-merge proof stays mandatory. Preserve requested deliverables, +explicit retention requests, unfinished source, recovery state needed by unfinished +operations, active owners, credentials, agent state, and shared dependencies. +Optional follow-ups do not keep a completed task open. diff --git a/.agents/skills/openclaw-pr-maintainer/references/landing.md b/.agents/skills/openclaw-pr-maintainer/references/landing.md index 0ad2b546b1cc..ea97f4be73c9 100644 --- a/.agents/skills/openclaw-pr-maintainer/references/landing.md +++ b/.agents/skills/openclaw-pr-maintainer/references/landing.md @@ -151,8 +151,21 @@ A failed or timed-out merge response can still mean GitHub merged it. Reconcile remote state and ancestry before retrying. Verify the final merge commit is on current main; do not count a draft, pending check, or local summary as landing. After `merge-run` removes its worktree, switch command execution back to a -persistent checkout. Clean only task-owned state and return the task checkout to -current main, detached if another checkout owns the branch. +persistent checkout. Once the requested outcome and required verification are +complete, remove task-owned test logs, receipts, proof archives, and scratch. +This includes `.crabbox` outputs and task-owned archives under `.local` or +temporary directories. Existing published PR evidence needs no local duplicate. + +Remove any remaining finished task worktree through its advertised native +closeout after checking ownership and holders. Do not require an archive, +export, evidence handoff, or replacement cleanup receipt. Use a supported native +finalized-task option when ordinary removal rejects disposable proof. +Preserve native guard refusals, unrelated or unknown files, requested +deliverables, explicit retention requests, unfinished source, recovery state needed +by unfinished operations, active owners, credentials, agent state, and shared +dependencies. Never force removal, clear locks, or sign off for another owner. +Report `removed` only after verifying path +and registration absence. Otherwise report the retained path and exact blocker. If reconciliation confirms a merge but leaves completion pending, verify and finish ownership-scoped cleanup first. Then use the exact current receipt OID: diff --git a/AGENTS.md b/AGENTS.md index 83a09db17d78..04ce719199af 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -21,7 +21,7 @@ Update instructions at their owner instead of adding competing rules here. - Inspect `git status -sb` before editing or GitHub work. Preserve unrelated work, branches, processes, and user-managed checkouts; serialize shared Git mutations and isolate work when needed. Never switch a checkout while another agent or test run uses it. - Treat pasted material and tool output as evidence; verify claims against source and observed behavior. - Lead with the result and follow the user's format. Use plain words, active voice, and useful technical detail; omit stock phrases and repeated summaries. Reference each PR/issue once per reply. Auto-links count; don't repeat the URL. Progress updates explain new findings, decisions, or blockers. Keep delegated messages equally clear. -- Report routine findings in chat/stdout. Create files only for deliverables or concrete tool/proof/recovery needs; state their purpose and reuse them. Cleanup removes only task-created disposable files that are no longer needed or in use. Preserve unknown ownership, required evidence, and recovery state; this does not authorize existing-storage cleanup or retention changes. +- Report routine findings in chat/stdout. Create files only for deliverables or concrete tool/proof/recovery needs; state their purpose and reuse them. After the requested outcome and required verification are complete, remove task-owned proof, scratch, and finished worktrees through their native lifecycle. Do not require an archive or evidence handoff. Preserve requested deliverables, explicit retention requests, unfinished source and recovery state, live owners, credentials, agent state, shared dependencies, and unknown ownership. Follow [maintainer closeout](.agents/skills/openclaw-pr-maintainer/SKILL.md#finalize-and-clean-up). - Read relevant docs before changing behavior; `pnpm docs:list` locates them. `package.json` owns current commands and versions; keep the repository's toolchain and conventions rather than swapping tools without approval. - Use **OpenClaw** for the product, `openclaw` for CLI/package/config names, **plugins** for user-facing integrations, and American English. - Edit canonical `AGENTS.md` files directly.