$ show openclaw/clawsweeper
ClawSweeper is a production GitHub App and CLI that autonomously reviews issues and pull requests across OpenClaw repositories, writes durable markdown reports with YAML front matter, applies conservative close/merge/repair actions behind policy guards, and runs Codex/OpenClaw-powered fix, automerge, and issue-implementation repair pipelines. It is deployed as a set of GitHub Actions workflows plus a Cloudflare Workers dashboard backed by Durable Objects, R2, and a separate git state repository with ledgers, canonical record tuples, and telemetry. This is a hard operational bot, not a library or user-facing product; it consumes GitHub webhook and scheduled sweep data and emits state, review records, notifications, and merge/close mutations.
The LLM identified 5 files worth highlighting for reuse:
Locale-independent, deterministic JSON serializer that orders object keys by UTF-16 code units and is used for content digests and equality checks. It is self-contained, dependency-free, and can be dropped into any project needing stable canonical JSON for signing, caching, or diffing.
Captures long-running subprocess output to a capped file while retaining a bounded in-memory tail with a truncation marker. This solves a recurring problem when running AI/Codex processes with unbounded stdout, and is extractable as a reusable process-output utility.
Isolates authenticated git operations by stripping local config, signing callbacks, URL rewrites, and object-store redirects from the subprocess environment. This is a strong security pattern for any tool that runs git commands on behalf of users while preventing credential or config leakage.
Validates and sanitizes evidence URLs to allow only trusted GitHub domains, preventing prompt-injection and spoofed external links from entering review reports. The allow-list approach is a reusable guardrail for LLM-generated content that must reference external sources.
SQLite-backed ETag cache for GitHub API responses with configurable retention and capacity caps. It reduces API quota consumption while preserving freshness, and the pattern is reusable for any REST client with conditional GET support.