Skip to content

Commit 6561fa6

Browse files
committed
Merge origin/main into alix/oc-t25-01-matrix-shared-key
2 parents 2f115ff + 414616f commit 6561fa6

344 files changed

Lines changed: 17213 additions & 8864 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.agents/skills/clawsweeper/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ loop. The router:
257257
checks are green, GitHub says mergeable, no human-review label is present,
258258
the PR is not draft, and both merge gates are open.
259259

260-
Missing changelog is not a review finding or merge blocker. If repairing a user-facing change, add/update changelog automatically when practical; never ask or block solely on it.
260+
Missing changelog is never a review finding or merge blocker. `CHANGELOG.md` is release-only; record user-facing release-note context in the PR body or squash message, never edit the changelog for normal repairs.
261261

262262
If ClawSweeper passes while merge gates are closed, it labels
263263
`clawsweeper:merge-ready` and comments instead of merging. `@clawsweeper stop`

‎.agents/skills/openclaw-landable-bug-sweep/SKILL.md‎

Lines changed: 84 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,72 @@ Autonomous maintainer workflow for producing a requested batch of landable OpenC
99
Use for broad issue/PR sweeps where the bar is high and the output is PRs, not notes.
1010
Do not use for plugin SDK/API boundary work; those need separate architecture review.
1111

12+
## Mandatory orchestration contract
13+
14+
- Only the original user-facing root conversation is the control plane. It
15+
decomposes work, assigns explicit issue/PR/file ownership, directly spawns
16+
bounded collaboration workers and independent verifiers, coordinates safety,
17+
tracks completion, and reports actual worker-verified terminal outcomes.
18+
- A delegated collaboration subagent is a hands-on execution owner, not another
19+
user-facing root orchestrator. It performs its assigned work directly; this
20+
contract must not recursively prevent workers from acting. Nested workers
21+
require explicit root authorization plus root-tracked capacity, ownership,
22+
and completion. Do not create separate Codex app tasks or threads.
23+
- Workers perform all discovery, source/dependency/Codex inspection,
24+
reproductions, issue/PR investigations, edits/refactors, tests/proof/CI,
25+
GitHub reads/writes, comments, closures, commits, pushes, and any separately
26+
authorized landing. The acting worker personally verifies dependency
27+
contracts and inspects sibling `../codex` before making a Codex verdict.
28+
- Root coordinates checkout/file ownership, serializes shared Git/ref/index
29+
mutations and conflicting test/edit activity, tracks exact heads, and enforces
30+
authorization, source-trust, security, ownership, and landing gates through
31+
assigned workers. Root never switches from orchestration to execution because
32+
a worker stalls, fails, or lacks capacity; reassign the bounded work instead.
33+
34+
## Requested authority
35+
36+
- The default deliverable is verified **landable PR URLs**, not merged PRs. An
37+
explicitly requested repair-and-prepare sweep authorizes workers to repair,
38+
refactor, verify, commit, push, and update PRs within its requested scope;
39+
it does not authorize landing without an explicit landing request.
40+
- `review`, `triage`, `list`, or a `landable-shortlist` alone remains read-only:
41+
no unsolicited push, public comment, closure, replacement PR, or merge.
42+
- An explicit autonomous `process`, `resolve`, or `fix-and-land` request for
43+
named items also authorizes workers to close those proven fixed on current
44+
`main` and land verified fixes through `$openclaw-pr-maintainer` and the
45+
repo-native `scripts/pr` workflow. Preserve exact-head and ownership gates.
46+
- Explicit full-authority unattended execution is standing approval for all
47+
evidence-backed work within the named sweep, including necessary task-owned
48+
or repo-managed PR worktrees, credited PR repair/replacement, proof comments,
49+
exact-head CI repair, scoped publication, proven current-`main` closures, and
50+
requested native landing. Never ask routine approval questions or disturb
51+
unrelated dirty changes; the root stays orchestration-only and workers own
52+
execution through verified completion. Preserve source-trust, direct acting-
53+
worker Codex inspection, required exact-head CI/security/owner gates, and
54+
explicit exact-count/scope approval for more than 50 close/reopen actions.
55+
- Optional unavailable provider/channel live proof may be replaced only when
56+
the user explicitly relaxes it: use failing/passing focused owner-boundary
57+
regression, direct producer/caller/sibling/dependency-source evidence,
58+
independent review, and green exact-head required CI; disclose the missing
59+
live/rank-up proof. Never waive mandatory external-API, security-sensitive,
60+
risk-required, or explicitly requested live verification.
61+
1262
## Target
1363

1464
Use `batch_size` from the request, defaulting to `5` and capped at `20`.
1565
Return up to that many qualified PR URLs, each with:
1666

1767
- bug summary
1868
- why the fix is low-risk
19-
- proof: rebased-head local/Testbox/live commands or run IDs
69+
- proof: exact-head local/Testbox/live commands or run IDs
2070
- autoreview: clean result on the exact head being shown
2171
- CI green on the exact pushed PR head
2272
- issue/duplicate cleanup done or still pending
2373

2474
The URLs may be existing PRs that were reviewed/fixed, or new PRs created from issues/clusters.
25-
Do not present a PR URL to the maintainer until it has been refreshed on current `main`, left-tested, autoreviewed clean, pushed, and verified green in live GitHub CI.
26-
If code, tests, changelog, PR body, or branch base changes after autoreview, rerun autoreview before showing the URL.
75+
Do not present a PR URL until its exact published head is left-tested, autoreviewed clean, and verified green in live GitHub CI.
76+
Refresh a PR branch only for an actual conflict, failing exact-head check or repo-native guard, explicit user request, or proven material stale-base risk; never rebase merely because `main` advanced.
77+
If production code, tests, or the reviewed head changes after autoreview, rerun autoreview before showing the URL.
2778
Do not pad a batch when the bounded search yields fewer qualified PRs.
2879

2980
## Inputs
@@ -46,15 +97,16 @@ Accept only when all are true:
4697
- root cause is proven in current code
4798
- dependency behavior checked via upstream docs/source/types when relevant
4899
- production/runtime diff is small, ideally much smaller than 500 LOC and always below 500 LOC
100+
- production LOC is net-neutral or net-negative when feasible; count tests separately and justify any production increase
49101
- tests may be larger, but focused
50102
- no new dependency
51103
- no new config option
52104
- no backward-incompatible behavior
53105
- no security/product/owner-boundary decision needed
54106
- no plugin SDK, public plugin API, or `src/plugin-sdk/**` boundary change
55-
- no broad refactor smell
107+
- any refactor stays within the proven root cause, owner boundary, and small-sweep risk limits
56108
- focused proof is feasible
57-
- branch can be rebased/refreshed and pushed, or a replacement PR can be created
109+
- existing branch can be safely updated when needed, or an authorized replacement is justified
58110

59111
Good examples:
60112

@@ -68,19 +120,21 @@ Reject:
68120
- feature requests, new knobs, migrations, release work, workflow policy, support
69121
- plugin SDK/API boundary changes, including compatibility shims, new SDK methods, SDK exports, or plugin-facing channel/provider seams
70122
- auth/security boundary changes unless explicitly assigned
71-
- bugs needing live credentials that are unavailable
72-
- PRs with red CI unless you fix, rebase, push, and recheck them green
73-
- PRs you only reviewed locally but did not refresh/push/check live
123+
- bugs requiring unavailable credentials for mandatory external-API, security,
124+
risk-required, or explicitly requested live verification
125+
- PRs with red CI unless you fix, update the head as needed, push, and recheck them green
126+
- PRs whose changed head was not pushed or whose exact-head CI was not verified live
74127
- PRs whose final head has not passed `$autoreview`
75-
- fixes whose clean shape is a larger architecture move
128+
- fixes requiring an out-of-scope product, architecture, or ownership decision
76129
- speculative reports without reproducible/provable cause
77130
- UI/UX changes requiring product judgment
78131

79132
## Sweep Loop
80133

81134
1. Start clean:
82135
- `git status -sb`
83-
- `git pull --ff-only`
136+
- update a clean, exclusively owned base checkout with `git pull --ff-only` only when needed and root-authorized
137+
- never pull, switch, or mutate a shared checkout while sibling workers are active
84138
- verify branch is expected, usually `main`
85139
2. Build candidate clusters:
86140
- `gitcrawl` open issues/PRs, neighbors, and search
@@ -90,28 +144,28 @@ Reject:
90144
- read issue/PR body, comments, labels, linked refs, current source, adjacent tests
91145
- exclude PRs authored by wide-access maintainers until `created_at` is at least 14 days old; only a named PR or explicit maintainer-work request overrides
92146
- identify opener/author and preserve credit
93-
- decide: `repair-existing-pr`, `create-new-pr`, `close-fixed-on-main`, `close-duplicate`, or `reject`
147+
- decide: `repair-existing-pr`, `create-new-pr`, `fixed-on-main`, `duplicate`, or `reject`; close only when authorized
94148
4. Prove before patching:
95149
- failing test, focused repro, log/source proof, or dependency contract proof
96-
- if already fixed on `main`, prove with current source/test/commit and close kindly
150+
- if already fixed on `main`, prove with current source/test/commit; close kindly only when authorized
97151
5. Patch:
98-
- prefer existing PR when good and writable
99-
- if unwritable or wrong shape, create own PR and preserve useful contributor credit
100-
- if no PR exists, create one
152+
- rewrite/refactor an existing editable PR into the correct owner-boundary fix first, even when its incoming implementation is the wrong shape
153+
- create an authorized replacement only when the original branch is uneditable or unsafe to update; preserve credit and close the source only after the replacement exists and closure is authorized
154+
- if no PR exists, create one only when publication is authorized
101155
- add regression test when it fits
102156
- release-note context for user-facing fixes in PR body or commit message; credit human reporter/contributor when known
103-
6. Review, refresh, and publish:
104-
- rebase or otherwise refresh the PR branch on current `origin/main`
105-
- resolve drift, including newly exposed CI failures, rather than counting the PR as ready
157+
6. Review, verify, and publish:
158+
- refresh the PR branch only for a real conflict, failing exact-head check or wrapper guard, explicit request, or demonstrated material stale-base risk
159+
- resolve actual conflicts or CI failures rather than counting the PR as ready
106160
- do not add `CHANGELOG.md` during normal sweep PRs; release automation generates it from PRs and commits
107-
- left-test the rebased head with the smallest meaningful local/Testbox/live command that proves the bug
161+
- left-test the exact candidate head with the smallest meaningful local/Testbox/live command that proves the bug
108162
- run `$autoreview` until no accepted/actionable findings remain before creating, updating, or presenting the PR URL
109-
- create/update PR with real body and proof fields
110-
- push the exact reviewed head
163+
- create/update PR with real body and proof fields when authorized
164+
- push the exact reviewed head only when an authorized change requires publication
111165
- verify live GitHub CI is green for that pushed head; do not count pending, red, dirty, conflicting, or externally blocked PRs in the five
112166
7. Hygiene:
113-
- close duplicates and fixed-on-main issues/PRs with proof as soon as you notice them during the sweep
114-
- never mutate more than five associated items in one cluster without explicit confirmation
167+
- close duplicates and fixed-on-main issues/PRs with proof only when closure is authorized; otherwise report the evidence
168+
- mutate more than five associated items in one cluster only when the explicitly authorized bounded scope includes them; more than 50 close/reopen actions still require separate exact-count/scope approval
115169
- comments must be kind, concrete, and include proof/PR/commit links
116170
8. Repeat until `batch_size` landable PR URLs are ready or the bounded qualified queue is exhausted.
117171

@@ -124,10 +178,10 @@ validation evidence; inspect the code, tests, and CI before judging correctness.
124178
## Existing PR Rules
125179

126180
- Review code path beyond the diff before trusting it.
127-
- If PR is good: rebase/refresh on current `main`, fix small issues, left-test, autoreview clean, push, and get CI green before showing or counting it.
128-
- If PR is not good but has a useful idea: recreate locally, co-author when warranted, close original with thanks and explanation.
129-
- If PR is duplicate or fixed on `main`: comment proof, close.
130-
- If maintainer cannot push to contributor branch: create own branch/PR, preserve useful commits or credit.
181+
- If PR is good: fix concrete issues, left-test and autoreview the exact head, publish authorized changes, and require exact-head green CI before showing it.
182+
- If PR is incomplete or wrong-layer but editable: rewrite/refactor the existing PR at the root-cause owner, preserve author credit, and verify its corrected head.
183+
- If PR is duplicate or fixed on current `main`: comment proof and close only when closure is authorized; otherwise report the evidence.
184+
- If the source branch is uneditable or unsafe to update: create a replacement only when authorized, preserve useful commits/credit, and close the original only after the replacement exists and closure is authorized.
131185
- If CI turns red after local proof, treat that as normal work: inspect the failing job, fix or reject, rerun, and only count the PR once green.
132186

133187
## Output Ledger
@@ -141,8 +195,10 @@ accepted:
141195
bug:
142196
root cause:
143197
fix:
198+
production LOC:
199+
test LOC:
144200
risk:
145-
rebase/head:
201+
head/base status:
146202
left-test:
147203
autoreview:
148204
CI:

0 commit comments

Comments
 (0)