|
| 1 | +# Contributing to ClawSweeper |
| 2 | + |
| 3 | +ClawSweeper is the conservative maintenance bot for OpenClaw repositories. This |
| 4 | +guide is for people and coding agents preparing or updating a ClawSweeper pull |
| 5 | +request. It complements the repository's [README](README.md) and |
| 6 | +[AGENTS.md](AGENTS.md); the latter is the binding instruction file for agents. |
| 7 | + |
| 8 | +## Before You Start |
| 9 | + |
| 10 | +- Keep one focused problem and one pull request together. Check open pull |
| 11 | + requests first so a new change does not duplicate active work. |
| 12 | +- Start an issue or ask a maintainer before broad product, architecture, |
| 13 | + automation, workflow, or security work. Route security-sensitive work through |
| 14 | + the repository's security handling instead of a normal public PR. |
| 15 | +- For an `openclaw/openclaw` target PR, do not submit a normal PR that edits |
| 16 | + `CHANGELOG.md`. That changelog is release-owned; put release-note context in |
| 17 | + the PR body and commit message. For ClawSweeper or another target repository, |
| 18 | + follow that repository's release-note policy. |
| 19 | +- Read the root `AGENTS.md`, then any scoped instructions for files you touch. |
| 20 | + Coding agents must follow those instructions even when this guide is shorter. |
| 21 | + |
| 22 | +## Local Setup and Focused Validation |
| 23 | + |
| 24 | +ClawSweeper requires Node 24 or newer. |
| 25 | + |
| 26 | +```bash |
| 27 | +corepack enable |
| 28 | +pnpm install |
| 29 | +pnpm run build |
| 30 | +pnpm run check |
| 31 | +``` |
| 32 | + |
| 33 | +Use the narrowest meaningful validation for the changed surface first. For a |
| 34 | +docs-only change, run `git diff --check` and verify the changed links and |
| 35 | +commands. For code, test, workflow, queue, API, UI, package, or integration |
| 36 | +changes, follow `AGENTS.md`: run focused behavior validation and the mandatory |
| 37 | +Codex review loop before opening or updating a PR. |
| 38 | + |
| 39 | +## Create or Update a Pull Request |
| 40 | + |
| 41 | +Use the [pull request template](.github/pull_request_template.md). Keep these |
| 42 | +main-body sections current: |
| 43 | + |
| 44 | +- **What Problem This Solves** — the concrete user, product, or operator |
| 45 | + problem and trigger. |
| 46 | +- **Why This Change Was Made** — the shipped solution, important boundary, and |
| 47 | + non-goals. |
| 48 | +- **User Impact** — the observable benefit, or a clear statement that there is |
| 49 | + no user-visible change. |
| 50 | +- **Evidence** — focused tests, CI, screenshots, terminal output, live |
| 51 | + observations, redacted logs, or artifact links that make the validation easy |
| 52 | + to inspect. |
| 53 | + |
| 54 | +For code-bearing changes, keep an executed `## Real Behavior Proof` package in |
| 55 | +the main PR body. State the claim, exercised surface, scenario or fixture, |
| 56 | +command and environment, observed result, artifact or trace, and limits. Tests |
| 57 | +and CI support the claim but do not replace proof of a changed runtime, |
| 58 | +workflow, queue, API, UI, package, or integration path. Redact tokens, private |
| 59 | +URLs, user data, and unrelated logs before posting evidence. |
| 60 | + |
| 61 | +## Review Conversations Are Author-Owned |
| 62 | + |
| 63 | +Treat a ClawSweeper or maintainer result as the next-step checklist for the PR, |
| 64 | +not as a handoff. |
| 65 | + |
| 66 | +1. Read the latest durable ClawSweeper comment, its reviewed head, proof |
| 67 | + guidance, accepted findings, and any contributor-facing blocker. |
| 68 | +2. Address every accepted or actionable finding. Apply an applicable |
| 69 | + `Rank-up moves:` item, or explain the exception in the main PR body; those |
| 70 | + optional moves are not blockers by themselves. |
| 71 | +3. Put the updated proof and each finding's disposition or supporting evidence |
| 72 | + in the main PR body. Do not leave required proof only in a comment. |
| 73 | +4. If the branch head or PR body changed after the latest durable review, treat |
| 74 | + that review and any affected proof as stale. Rerun the affected proof and |
| 75 | + wait until the next review applies to the current head and body. |
| 76 | +5. Request `@clawsweeper re-review` only after the branch, body, proof, and |
| 77 | + relevant checks are current. PR authors and users with repository write |
| 78 | + access may use `@clawsweeper re-review` or `@clawsweeper re-run`; plain |
| 79 | + `@clawsweeper review` is maintainer-only. Do not dispatch a review workflow |
| 80 | + directly. |
| 81 | + |
| 82 | +`status: ⏳ waiting on author` or `status: 📣 needs proof` means the next action |
| 83 | +belongs to the author. Let the normal queue finish after a current re-review; |
| 84 | +repeated commands before the requested changes are present add noise rather |
| 85 | +than evidence. |
| 86 | + |
| 87 | +## Readiness and Landing |
| 88 | + |
| 89 | +`proof: sufficient` and `status: 👀 ready for maintainer look` are evidence for |
| 90 | +maintainer review, not approval to merge. Contributors must not use maintainer |
| 91 | +repair, autofix, automerge, approve, or workflow-dispatch routes. Agents must |
| 92 | +not merge or enable/execute automerge without the user's explicit approval in |
| 93 | +the current conversation, even when a PR is otherwise ready. Normal ClawSweeper |
| 94 | +mutation and merge routes remain maintainer-controlled and subject to their |
| 95 | +separate exact-head, check, mergeability, and policy gates. |
| 96 | + |
| 97 | +If a human maintainer is already actively repairing or reviewing the PR, do not |
| 98 | +work on the branch or summon a parallel ClawSweeper lane. Keep the discussion on |
| 99 | +the PR; ask for maintainer direction only when the next decision or proof |
| 100 | +requires it. |
0 commit comments