You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .agents/skills/PR_WORKFLOW.md
+48-5Lines changed: 48 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,11 @@
1
-
# PR Review Instructions
1
+
# PR Workflow for Maintainers
2
2
3
3
Please read this in full and do not skip sections.
4
+
This is the single source of truth for the maintainer PR workflow.
5
+
6
+
## Triage order
7
+
8
+
Process PRs **oldest to newest**. Older PRs are more likely to have merge conflicts and stale dependencies; resolving them first keeps the queue healthy and avoids snowballing rebase pain.
4
9
5
10
## Working rule
6
11
@@ -9,9 +14,9 @@ Always pause between skills to evaluate technical direction, not just command su
9
14
10
15
These three skills must be used in order:
11
16
12
-
1.`review-pr`
13
-
2.`prepare-pr`
14
-
3.`merge-pr`
17
+
1.`review-pr` — review only, produce findings
18
+
2.`prepare-pr` — rebase, fix, gate, push to PR head branch
19
+
3.`merge-pr` — squash-merge, verify MERGED state, clean up
15
20
16
21
They are necessary, but not sufficient. Maintainers must steer between steps and understand the code before moving forward.
17
22
@@ -31,6 +36,43 @@ Do not continue if you cannot verify the problem is real or test the fix.
31
36
- Harden changes. Always evaluate security impact and abuse paths.
32
37
- Understand the system before changing it. Never make the codebase messier just to clear a PR queue.
33
38
39
+
## Rebase and conflict resolution
40
+
41
+
Before any substantive review or prep work, **always rebase the PR branch onto current `main` and resolve merge conflicts first**. A PR that cannot cleanly rebase is not ready for review — fix conflicts before evaluating correctness.
42
+
43
+
- During `prepare-pr`: rebase onto `main` is the first step, before fixing findings or running gates.
44
+
- If conflicts are complex or touch areas you do not understand, stop and escalate.
45
+
- Prefer **rebase** for linear history; **squash** when commit history is messy or unhelpful.
46
+
47
+
## Commit and changelog rules
48
+
49
+
- Create commits with `scripts/committer "<msg>" <file...>`; avoid manual `git add`/`git commit` so staging stays scoped.
50
+
- Follow concise, action-oriented commit messages (e.g., `CLI: add verbose flag to send`).
51
+
- Group related changes; avoid bundling unrelated refactors.
52
+
- Changelog workflow: keep latest released version at top (no `Unreleased`); after publishing, bump version and start a new top section.
53
+
- When working on a PR: add a changelog entry with the PR number and thank the contributor.
54
+
- When working on an issue: reference the issue in the changelog entry.
55
+
- Pure test additions/fixes generally do **not** need a changelog entry unless they alter user-facing behavior or the user asks for one.
56
+
57
+
## Co-contributor and clawtributors
58
+
59
+
- If we squash, add the PR author as a co-contributor in the commit.
60
+
- If you review a PR and later do work on it, land via merge/squash (no direct-main commits) and always add the PR author as a co-contributor.
61
+
- When merging a PR: leave a PR comment that explains exactly what we did and include the SHA hashes.
62
+
- When merging a PR from a new contributor: run `bun scripts/update-clawtributors.ts` to add their avatar to the README "Thanks to all clawtributors" list, then commit the regenerated README.
-**Landing mode:** create an integration branch from `main`, bring in PR commits (**prefer rebase** for linear history; **merge allowed** when complexity/conflicts make it safer), apply fixes, add changelog (+ thanks + PR #), run full gate **locally before committing** (`pnpm build && pnpm check && pnpm test`), commit, merge back to `main`, then `git switch main` (never stay on a topic branch after landing). Important: contributor needs to be in git graph after this!
68
+
69
+
## Pre-review safety checks
70
+
71
+
- Before starting a review when a GH Issue/PR is pasted: run `git pull`; if there are local changes or unpushed commits, stop and alert the user before reviewing.
72
+
- PR review calls: prefer a single `gh pr view --json ...` to batch metadata/comments; run `gh pr diff` only when needed.
73
+
- PRs should summarize scope, note testing performed, and mention any user-facing changes or new flags.
74
+
- Read `docs/help/submitting-a-pr.md` ([Submitting a PR](https://docs.openclaw.ai/help/submitting-a-pr)) for what we expect from contributors.
75
+
34
76
## Unified workflow
35
77
36
78
Entry criteria:
@@ -72,7 +114,7 @@ Stop and escalate instead of continuing if:
72
114
Purpose:
73
115
74
116
- Make the PR merge-ready on its head branch.
75
-
- Rebase onto current `main`, fix blocker/important findings, and run gates.
117
+
- Rebase onto current `main` first, then fix blocker/important findings, then run gates.
76
118
77
119
Expected output:
78
120
@@ -124,3 +166,4 @@ Maintainer checkpoint after merge:
124
166
125
167
- Were any refactors intentionally deferred and now need follow-up issue(s)?
126
168
- Did this reveal broader architecture or test gaps we should address?
169
+
- Run `bun scripts/update-clawtributors.ts` if the contributor is new.
Copy file name to clipboardExpand all lines: .github/workflows/auto-response.yml
+33-2Lines changed: 33 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -39,6 +39,11 @@ jobs:
39
39
message:
40
40
"Please use [our support server](https://discord.gg/clawd) and ask in #help or #users-helping-users to resolve this, or follow the stuck FAQ at https://docs.openclaw.ai/help/faq#im-stuck-whats-the-fastest-way-to-get-unstuck.",
**Full maintainer PR workflow:**`.agents/skills/PR_WORKFLOW.md` -- triage order, quality bar, rebase rules, commit/changelog conventions, co-contributor policy, and the 3-step skill pipeline (`review-pr` > `prepare-pr` > `merge-pr`).
96
+
93
97
- Create commits with `scripts/committer "<msg>" <file...>`; avoid manual `git add`/`git commit` so staging stays scoped.
94
98
- Follow concise, action-oriented commit messages (e.g., `CLI: add verbose flag to send`).
95
99
- Group related changes; avoid bundling unrelated refactors.
96
-
- Changelog workflow: keep latest released version at top (no `Unreleased`); after publishing, bump version and start a new top section.
97
-
- PRs should summarize scope, note testing performed, and mention any user-facing changes or new flags.
98
100
- Read this when submitting a PR: `docs/help/submitting-a-pr.md` ([Submitting a PR](https://docs.openclaw.ai/help/submitting-a-pr))
99
101
- Read this when submitting an issue: `docs/help/submitting-an-issue.md` ([Submitting an Issue](https://docs.openclaw.ai/help/submitting-an-issue))
100
-
- PR review flow: when given a PR link, review via `gh pr view`/`gh pr diff` and do **not** change branches.
101
-
- PR review calls: prefer a single `gh pr view --json ...` to batch metadata/comments; run `gh pr diff` only when needed.
102
-
- Before starting a review when a GH Issue/PR is pasted: run `git pull`; if there are local changes or unpushed commits, stop and alert the user before reviewing.
103
-
- Goal: merge PRs. Prefer **rebase** when commits are clean; **squash** when history is messy.
104
-
- PR merge flow: create a temp branch from `main`, merge the PR branch into it (prefer squash unless commit history is important; use rebase/merge when it is). Always try to merge the PR unless it’s truly difficult, then use another approach. If we squash, add the PR author as a co-contributor. Apply fixes, add changelog entry (include PR # + thanks), run full gate before the final commit, commit, merge back to `main`, delete the temp branch, and end on `main`.
105
-
- If you review a PR and later do work on it, land via merge/squash (no direct-main commits) and always add the PR author as a co-contributor.
106
-
- When working on a PR: add a changelog entry with the PR number and thank the contributor.
107
-
- When working on an issue: reference the issue in the changelog entry.
108
-
- When merging a PR: leave a PR comment that explains exactly what we did and include the SHA hashes.
109
-
- When merging a PR from a new contributor: add their avatar to the README “Thanks to all clawtributors” thumbnail list.
110
-
- After merging a PR: run `bun scripts/update-clawtributors.ts` if the contributor is missing, then commit the regenerated README.
111
102
112
103
## Shorthand Commands
113
104
114
105
-`sync`: if working tree is dirty, commit all changes (pick a sensible Conventional Commit message), then `git pull --rebase`; if rebase conflicts and cannot resolve, stop; otherwise `git push`.
-**Landing mode:** create an integration branch from `main`, bring in PR commits (**prefer rebase** for linear history; **merge allowed** when complexity/conflicts make it safer), apply fixes, add changelog (+ thanks + PR #), run full gate **locally before committing** (`pnpm build && pnpm check && pnpm test`), commit, merge back to `main`, then `git switch main` (never stay on a topic branch after landing). Important: contributor needs to be in git graph after this!
120
-
121
107
## Security & Configuration Tips
122
108
123
109
- Web provider stores creds at `~/.openclaw/credentials/`; rerun `openclaw login` if logged out.
0 commit comments