ClawSweeper is a bot designed to maintain the health and efficiency of OpenClaw repositories, specifically `openclaw/openclaw` and `openclaw/clawhub`. Its primary function is to scan all issues and pull requests (PRs) within these repositories and suggest items that can be closed, along with the rationale for doing so. The bot operates on a weekly cadence, reviewing each issue and PR.
The core features of ClawSweeper revolve around its conservative approach to closing items. It employs a set of "guardrails" to ensure that only appropriate items are proposed for closure. These guardrails include: items implemented on the current `main` branch, items that are not reproducible on the current `main`, items better suited for ClawHub skill/plugin work, duplicates or superseded items, items that are concrete but not actionable in the current repository, incoherent items, and stale issues older than 60 days with insufficient data. Maintainer-authored items are never automatically closed. Furthermore, issues with open PRs referencing them using GitHub's closing syntax are kept open until the PR merges or is closed. Issue/PR pairs from the same author are also kept open together unless one is already resolved or a maintainer explicitly requests closure. ClawHub, in particular, has stricter rules, only closing PRs where the proposed change is already implemented on `main` with source-backed evidence.
ClawSweeper generates a markdown report for each open issue or PR, providing context and rationale for its actions. It also publishes a durable Codex automated review comment when it identifies a valid reason for closure. The bot's dashboard provides a comprehensive overview of its activity, including metrics such as the number of covered repositories, open issues and PRs, reviewed files, unreviewed items, and closed items. The dashboard also tracks the number of proposed closes, closed items, and the latest review and close times. The dashboard is updated frequently, providing real-time insights into the bot's performance.
The repository's README provides a detailed breakdown of the bot's functionality, including the guardrails, dashboard metrics, and recent activity. The dashboard displays the status of current runs, including the state of the review process and the specific actions being taken. It also provides a detailed audit health report, identifying any missing records or potential issues. The "Recently Closed" and "Recently Reviewed" sections of the dashboard showcase the bot's recent actions, including the items closed, the reasons for closure, and the outcomes of reviews.
The purpose of ClawSweeper is to streamline the maintenance process of OpenClaw repositories. By automatically identifying and suggesting the closure of irrelevant, outdated, or resolved issues and PRs, the bot helps to reduce clutter, improve focus, and ensure that the repositories remain organized and efficient. This ultimately contributes to a more productive and manageable development environment for the OpenClaw project. The bot's conservative approach and detailed reporting mechanisms ensure that closures are justified and that valuable information is not lost. The bot's continuous operation and detailed reporting provide valuable insights into the health and activity of the OpenClaw repositories.