Skip to content
This repository was archived by the owner on Feb 27, 2026. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2134 commits
Select commit Hold shift + click to select a range
b4f1600
refactor(channels): dedupe discord channel lookup
steipete Feb 15, 2026
9adccca
Outbound: scope core send media roots by agent (#17268)
gumadeiras Feb 15, 2026
3783cd3
refactor(plugins): share empty registry factory
steipete Feb 15, 2026
aa4d212
refactor(auto-reply): share cleared exec fields
steipete Feb 15, 2026
fe303fc
refactor(cli): reuse skill missing summary
steipete Feb 15, 2026
08f16da
refactor(config): dedupe bindings migrations
steipete Feb 15, 2026
bf61d94
refactor(cli): dedupe daemon install finalize
steipete Feb 15, 2026
2da512e
refactor(agent): centralize fallback run helpers
sebslight Feb 15, 2026
10feda1
refactor(reply-tests): share harness mock bundle
sebslight Feb 15, 2026
6277698
test(discord): fix updated test harness mocks
sebslight Feb 15, 2026
b567ba5
fix(sandbox): allow registry entries without agent scope
sebslight Feb 15, 2026
9143f33
refactor(tools): dedupe alsoAllow merge
steipete Feb 15, 2026
6e36d95
refactor(config): share agent model schema
steipete Feb 15, 2026
fabe480
refactor(line): dedupe config schema
steipete Feb 15, 2026
c906121
fix(line): build config schema from common base
steipete Feb 15, 2026
1ab5fcc
refactor(line): share source info parsing
steipete Feb 15, 2026
9f393a0
fix(line): restore bot-message-context types
steipete Feb 15, 2026
ca4c2b3
refactor(auto-reply): share mode-switch events
steipete Feb 15, 2026
da2fde7
refactor(slack): share room context hints
steipete Feb 15, 2026
3ce0e80
refactor(commands): dedupe cleanup path resolution
steipete Feb 15, 2026
cbf6ee3
refactor(models): share primary/fallback merge
steipete Feb 15, 2026
b2c4269
refactor(discord): reuse preflight param types
steipete Feb 15, 2026
ac3db09
refactor(discord): share component allowlist check
steipete Feb 15, 2026
b74c3d8
refactor(shared): dedupe chat content text extraction
steipete Feb 15, 2026
63ab5bf
refactor(discord): share component route + ack
steipete Feb 15, 2026
25be519
refactor(channels): share allowlist resolution summary
steipete Feb 15, 2026
b3ef3fc
refactor(cron): share legacy delivery helpers
steipete Feb 15, 2026
b6069fc
feat: support per-channel ackReaction config (#17092) (thanks @zerone0x)
thewilloftheshadow Feb 15, 2026
5c88d3c
refactor(media): share fileExists
steipete Feb 15, 2026
a0e7631
refactor(exec-approvals): share socket default merge
steipete Feb 15, 2026
c6b3736
fix: dedupe probe/token base types (#16986) (thanks @iyoda)
thewilloftheshadow Feb 15, 2026
9084c4e
refactor(pi): share session manager runtime registry
steipete Feb 15, 2026
04f00f8
refactor(commands): share default model applier
steipete Feb 15, 2026
1f1e976
refactor(allowlists): share user entry collection
steipete Feb 15, 2026
813b96a
refactor(commands): share cleanup plan resolver
steipete Feb 15, 2026
be9b5ce
fix(ci): stabilize state-dir dependent tests
steipete Feb 15, 2026
2e758d3
refactor(gateway): share node event sessionKey parsing
steipete Feb 15, 2026
01ca3da
refactor(gateway): share tailscale prompt constants
steipete Feb 15, 2026
65f8b46
fix(ci): stabilize media and session store tests
steipete Feb 15, 2026
dce3e4b
refactor(cli): dedupe hook enable/disable logic
steipete Feb 15, 2026
7773c54
refactor(telegram): share allowFrom normalization
steipete Feb 15, 2026
7ef956d
refactor(browser): share client-actions url helpers
steipete Feb 15, 2026
394e69a
refactor(cli): share browser resize output helper
steipete Feb 15, 2026
a2c6951
refactor(browser): reuse CDP fetch helpers
steipete Feb 15, 2026
b2d8b95
refactor(models): dedupe MiniMax provider models
steipete Feb 15, 2026
d9c891e
refactor(channels): share threading tool context
steipete Feb 15, 2026
95c986d
refactor(models): share model picker auth checker
steipete Feb 15, 2026
41f546f
Discord: add preflight role allowlist regression test
thewilloftheshadow Feb 15, 2026
8678b10
Docs: add discord role allowlist changelog entry
thewilloftheshadow Feb 15, 2026
a5b8733
refactor(onboard): reuse applyAgentDefaultModelPrimary
steipete Feb 15, 2026
137079f
refactor(shared): share entry requirements evaluation
steipete Feb 15, 2026
99caaef
Revert "Docs: add discord role allowlist changelog entry"
thewilloftheshadow Feb 15, 2026
f92900f
Revert "Discord: add preflight role allowlist regression test"
thewilloftheshadow Feb 15, 2026
c118f6c
fix(discord): fix component parsing and modal field typing
steipete Feb 15, 2026
6f2f88d
refactor(status): reuse Requirements types
steipete Feb 15, 2026
9a5e617
fix(discord): align message action send parameters
steipete Feb 15, 2026
6a4144f
refactor(auto-reply): dedupe chunk early returns
steipete Feb 15, 2026
99fda7b
refactor(models): share fallback command logic
steipete Feb 15, 2026
c7b6d6a
refactor(plugins): reuse createEmptyPluginRegistry
steipete Feb 15, 2026
c682634
fix(discord): role-based allowlist never matches (Carbon Role objects…
xinhuagu Feb 15, 2026
5248b75
refactor(shared): reuse isPidAlive
steipete Feb 15, 2026
a2ceadc
refactor(gateway): dedupe assistant delta parsing
steipete Feb 15, 2026
8249010
refactor(pi): dedupe compaction failure
steipete Feb 15, 2026
699136f
refactor(msteams): share credential prompt
steipete Feb 15, 2026
0653e8d
refactor(matrix): dedupe group config resolution
steipete Feb 15, 2026
de10377
refactor(tlon): share urbit poke/scry ops
steipete Feb 15, 2026
719280d
refactor(bluebubbles): share multipart helpers
steipete Feb 15, 2026
8854878
fix(bluebubbles): use Buffer for multipart body
steipete Feb 15, 2026
b2088d2
perf(test): speed up process poll timeout tests
steipete Feb 15, 2026
a742d44
perf(test): stub config + persistence in subagent registry tests
steipete Feb 15, 2026
e3f4cab
perf(test): speed up update-cli unit tests
steipete Feb 15, 2026
a4b958e
perf(test): cover embedding chunk limits without indexing
steipete Feb 15, 2026
a8f3a57
perf(telegram): lazy import proxy + timeout deps in audit
steipete Feb 15, 2026
a615887
refactor(imessage): split monitor inbound processing
steipete Feb 15, 2026
c25026f
perf(plugins): lazy-create jiti loader
steipete Feb 15, 2026
5c5af2b
perf(wizard): lazy-load onboarding deps
steipete Feb 15, 2026
38f430e
perf(models): lazy-load heavy deps in models list
steipete Feb 15, 2026
8fdde04
perf(auto-reply): avoid skill scans for inline directives
steipete Feb 15, 2026
92f8c0f
perf(test): speed up suites and reduce fs churn
steipete Feb 15, 2026
108f0ef
fix(test): remove stale cleanup calls in cron regressions
steipete Feb 15, 2026
80eb91d
refactor(plugin-sdk): add shared helper utilities
steipete Feb 15, 2026
00e63da
refactor(webhooks): reuse plugin-sdk webhook path helpers
steipete Feb 15, 2026
bdfa2b4
refactor(media): reuse buildAgentMediaPayload
steipete Feb 15, 2026
342e9ca
refactor(status): reuse plugin-sdk status helpers
steipete Feb 15, 2026
59c0b2b
refactor(auth): reuse oauth auth result helper
steipete Feb 15, 2026
75f33e9
fix(web): disallow workspace-* roots without explicit localRoots
steipete Feb 15, 2026
6c33bd9
ci: reduce node test OOM on linux
steipete Feb 15, 2026
8ccbd00
chore: ignore OpenClawKit SwiftPM artifacts
steipete Feb 15, 2026
a3419e4
refactor(swift): dedupe AnyCodable
steipete Feb 15, 2026
c75fe7e
fix(swift): make SwiftPM tests deterministic
steipete Feb 15, 2026
3a075f0
fix(macos): drop duplicate AnyCodable helpers
steipete Feb 15, 2026
375e161
refactor(macos): dedupe file watcher
steipete Feb 15, 2026
f37b1c1
refactor(macos): centralize presence system info
steipete Feb 15, 2026
2181893
refactor(swift): share primary IPv4 lookup
steipete Feb 15, 2026
c8779ef
refactor(macos): share pairing alert plumbing
steipete Feb 15, 2026
71009ab
refactor(macos): share tailnet IPv4 detection
steipete Feb 15, 2026
b30ed6c
refactor(ios): share EventKit auth gating
steipete Feb 15, 2026
ef2c66a
refactor(camera): centralize JPEG transcode cap
steipete Feb 15, 2026
778959b
refactor(ios): dedupe gateway helpers
steipete Feb 15, 2026
3cd786c
refactor(swift): share discovery status text
steipete Feb 15, 2026
b4f14d6
Gateway: hide BOOTSTRAP in agent files after onboarding completes (#1…
gumadeiras Feb 15, 2026
02ff9f4
refactor(test): dedupe image tool e2e fixtures
steipete Feb 15, 2026
4920ca6
refactor(ui): dedupe usage session rows
steipete Feb 15, 2026
2ac3e78
refactor(test): dedupe followup queue fixtures
steipete Feb 15, 2026
c623c51
refactor(ui): share app mount hooks
steipete Feb 15, 2026
5c233f4
fix(ui): drop unused vi in test helper
steipete Feb 15, 2026
69418cc
fix (tui): preserve copy-sensitive token wrapping
vignesh07 Feb 15, 2026
150c581
fix (agents): honor configured contextWindow overrides
vignesh07 Feb 15, 2026
059573a
chore (changelog): attribute issues #17515 #17466 #17505 #17404
vignesh07 Feb 15, 2026
a02e575
refactor(test): dedupe pi embedded subscribe e2e harness
steipete Feb 15, 2026
5958454
refactor(test): share auth profile order fixtures
steipete Feb 15, 2026
856e1a3
refactor(test): share skills e2e helper
steipete Feb 15, 2026
aabe4d9
refactor(test): reuse env snapshot helper
steipete Feb 15, 2026
84601bf
fix(test): fix pi embedded subscribe harness typing
steipete Feb 15, 2026
c3812a1
refactor(test): share gateway e2e registry helper
steipete Feb 15, 2026
27deda2
fix(test): drop unused gateway e2e PluginRegistry imports
steipete Feb 15, 2026
ff4f59e
feat(image-tool): support multiple images in a single tool call (#17512)
tyler6204 Feb 15, 2026
c9bb6bd
refactor(infra): extract json file + async lock helpers
steipete Feb 15, 2026
012b674
refactor(infra): share isTailnetIPv4 helper
steipete Feb 15, 2026
50abdaf
refactor(infra): dedupe openclaw root candidate scan
steipete Feb 15, 2026
0c77851
fix(agents): mark required-param tool errors as non-retryable (#17533)
Takhoffman Feb 15, 2026
c92bcf2
refactor(infra): dedupe device pairing token updates
steipete Feb 15, 2026
8cd20e2
refactor(infra): share jsonl transcript reader
steipete Feb 15, 2026
5117194
refactor(test): dedupe terminal restore stubs
steipete Feb 15, 2026
3c6cff5
refactor(config): share agent sandbox schema
steipete Feb 15, 2026
7c822d0
feat(plugins): expose llm input/output hook payloads (openclaw#16724)…
SecondThread Feb 15, 2026
5fb4032
refactor(test): share overflow compaction mocks
steipete Feb 15, 2026
d9d9348
refactor(test): share tool hook handler ctx
steipete Feb 15, 2026
8e7b7a2
refactor(test): dedupe commands e2e wizard setup
steipete Feb 15, 2026
a1ff0e4
refactor(test): dedupe sessions_spawn thinking assertions
steipete Feb 15, 2026
e588849
refactor(test): reuse pi embedded subscribe session harness
steipete Feb 15, 2026
d491c78
refactor(test): share gateway ws e2e harness
steipete Feb 15, 2026
a948212
fix(ui): show session labels in selector and standardize session key …
tyler6204 Feb 15, 2026
6b4590b
fix(agents): stabilize sessions_spawn e2e suite
steipete Feb 15, 2026
1b455b6
refactor(test): dedupe gateway hooks server setup
steipete Feb 15, 2026
99909f7
refactor(test): share gateway server start helper
steipete Feb 15, 2026
8ba16a8
refactor(test): reuse withGatewayServer in auth/http suites
steipete Feb 15, 2026
0b56472
refactor(test): dedupe ios/android gateway client id tests
steipete Feb 15, 2026
65ea200
refactor(test): share env var helpers
steipete Feb 15, 2026
a91553c
perf(slack): consolidate slash tests
steipete Feb 15, 2026
def7446
perf(test): consolidate runReplyAgent suites
steipete Feb 15, 2026
4fc7222
perf(test): speed up slack slash suite
steipete Feb 15, 2026
f749365
perf(test): consolidate telegram create bot suites
steipete Feb 15, 2026
ce92291
perf(test): consolidate telegram send suites
steipete Feb 15, 2026
023091d
perf(test): consolidate slack tool-result suites
steipete Feb 15, 2026
f8925b7
perf(test): consolidate reply commands suites
steipete Feb 15, 2026
51709c6
perf(test): consolidate model selection suites
steipete Feb 15, 2026
53ec783
perf(test): consolidate session suites
steipete Feb 15, 2026
ed276d3
perf(test): consolidate inbound reply suites
steipete Feb 15, 2026
2158b09
perf(test): consolidate discord monitor utils
steipete Feb 15, 2026
704c8ed
perf(test): consolidate sessions config suites
steipete Feb 15, 2026
36b5f0c
perf(test): consolidate gateway server-methods suites
steipete Feb 15, 2026
34b088e
perf(test): consolidate infra outbound suites
steipete Feb 15, 2026
d75cd40
perf(test): consolidate reply utility suites
steipete Feb 15, 2026
a1c50b4
perf(test): consolidate channel plugin suites
steipete Feb 15, 2026
37086d0
perf(test): consolidate sessions tool e2e suites
steipete Feb 15, 2026
722bfaa
perf(test): consolidate reply plumbing/state suites
steipete Feb 15, 2026
c59a472
perf(test): consolidate memory tool e2e suites
steipete Feb 15, 2026
74294a4
perf(test): consolidate web auto-reply suites
steipete Feb 15, 2026
a7f6c95
perf(test): consolidate slack monitor suites
steipete Feb 15, 2026
c528830
perf(test): consolidate reply flow suites
steipete Feb 15, 2026
0e2d8b8
perf(test): consolidate channel action suites
steipete Feb 15, 2026
bbcbaba
fix(ci): repair e2e mocks and tool schemas
steipete Feb 15, 2026
89155aa
fix(test): load sessions_spawn harness before tools
steipete Feb 15, 2026
eef1323
fix(test): make sessions_spawn e2e harness ordering stable
steipete Feb 15, 2026
632b71c
fix(test): avoid inheriting process.env in nix config e2e
steipete Feb 15, 2026
bed0e07
fix(cli): clear plugin manifest cache after install
steipete Feb 15, 2026
70f86e3
refactor(test): reuse shared env snapshots
steipete Feb 15, 2026
31980bc
refactor(test): dedupe gateway env restores
steipete Feb 15, 2026
a68ed3f
refactor(test): reuse env snapshots in gateway call tests
steipete Feb 15, 2026
e3445f5
docs(changelog): note inter-session provenance security fix
steipete Feb 15, 2026
d8d9d37
docs(agents): add GHSA patch/publish notes
steipete Feb 15, 2026
35ab521
refactor(test): simplify voicewake env cleanup
steipete Feb 15, 2026
f0e373b
refactor(test): simplify state dir env restore
steipete Feb 15, 2026
abd009b
refactor(test): dedupe openresponses server setup
steipete Feb 15, 2026
d27a763
refactor(test): reuse env helper in temp home harness
steipete Feb 15, 2026
f809ff5
refactor(test): reuse env snapshot helper
steipete Feb 15, 2026
961ca61
refactor(test): dedupe onboard auth env cleanup
steipete Feb 15, 2026
e9c8540
refactor(test): simplify model auth env restore
steipete Feb 15, 2026
94e84e6
refactor(test): clean up gateway tool env restore
steipete Feb 15, 2026
a90e007
refactor(test): reuse env snapshot in gateway ws harness
steipete Feb 15, 2026
7bb0b7d
refactor(test): simplify config io env snapshot
steipete Feb 15, 2026
07dea4c
refactor(test): dedupe auth choice env cleanup
steipete Feb 15, 2026
ee2fa5f
refactor(test): reuse env snapshots in unit suites
steipete Feb 16, 2026
fe73878
fix(gateway): preserve session mapping across gateway restarts
shakkernerd Feb 15, 2026
b562aa6
fix(gateway): keep boot sessions ephemeral without remapping main
shakkernerd Feb 15, 2026
c07036e
chore: Update deps.
cpojer Feb 16, 2026
e075a33
refactor(test): simplify oauth/profile env restore
steipete Feb 16, 2026
997b9ad
refactor(test): dedupe provider api key env restore
steipete Feb 16, 2026
4bdb857
chore: Use proper pnpm caching in one CI step.
cpojer Feb 16, 2026
cedd520
refactor(test): simplify state dir env helpers
steipete Feb 16, 2026
7857096
refactor(test): reuse env snapshot in model scan
steipete Feb 16, 2026
e3a93d6
refactor(test): dedupe safe-bins mocks
steipete Feb 16, 2026
ab000bc
refactor(test): dedupe qianfan env restore
steipete Feb 16, 2026
115cfb4
gateway: add cron finished-run webhook (#14535)
advaitpaliwal Feb 16, 2026
76015aa
refactor(test): dedupe copilot env restores
steipete Feb 16, 2026
72baa58
refactor(test): fix copilot env restore
steipete Feb 16, 2026
e9ed5fe
refactor(test): dedupe token exchange env cleanup
steipete Feb 16, 2026
be4a490
refactor(test): fix update-cli env restore
steipete Feb 16, 2026
67bfe8f
perf(test): cut gateway unit suite overhead
steipete Feb 15, 2026
a91bcd2
fix(test): avoid fake-timers hang in gateway lock
steipete Feb 15, 2026
1287abe
perf(test): consolidate browser utility tests
steipete Feb 15, 2026
2d5004c
perf(test): consolidate CLI utility tests
steipete Feb 15, 2026
5709b30
perf(test): consolidate config misc suites
steipete Feb 15, 2026
f934725
perf(test): consolidate channel misc suites
steipete Feb 15, 2026
3fd40fc
perf(test): fold media constants assertions into mime suite
steipete Feb 15, 2026
5e3b211
perf(test): fold gmail watcher assertions into hooks install suite
steipete Feb 15, 2026
5529473
perf(test): fold browser server-context helper into utils suite
steipete Feb 15, 2026
2cf060f
perf(test): consolidate media-understanding misc suites
steipete Feb 15, 2026
c82dc02
perf(test): fold tui command parsing into tui suite
steipete Feb 15, 2026
725f63f
perf(test): fold restart recovery helper into spawn utils suite
steipete Feb 15, 2026
55fd88e
perf(test): consolidate utils parsing helpers
steipete Feb 15, 2026
5baa08e
perf(test): fold model-default assertions into command utils suite
steipete Feb 15, 2026
a508c34
perf(test): fold signal daemon log parsing into probe suite
steipete Feb 15, 2026
6288c51
perf(test): fold secret equality assertions into audit extra suite
steipete Feb 15, 2026
3830a4b
perf(test): fold acp session store assertions into mapper suite
steipete Feb 15, 2026
3a7b1b3
perf(test): consolidate shared utility suites
steipete Feb 15, 2026
ba3a0e7
perf(test): fold gateway server utils into misc suite
steipete Feb 16, 2026
acb2a1c
perf(test): fold discord voice hardening into web media suite
steipete Feb 16, 2026
60ce38d
perf(test): drop redundant line signature unit test
steipete Feb 16, 2026
fdd0e78
perf(test): fold exec approvals socket defaults into main suite
steipete Feb 16, 2026
fd3d452
fix(ci): fix ui cron test mock signature
steipete Feb 16, 2026
166cf6a
fix(web_fetch): cap response body before parsing
steipete Feb 16, 2026
412c1d0
perf(test): fold logger import side-effects test into diagnostic suite
steipete Feb 16, 2026
fddf8a6
perf(test): fold pi extensions runtime registry tests into agents suite
steipete Feb 16, 2026
ae1880a
refactor(frontmatter): share openclaw manifest parsing
steipete Feb 16, 2026
8251f7c
refactor(memory): dedupe batch helpers
steipete Feb 16, 2026
d8691ff
refactor(memory): share sync progress helpers
steipete Feb 16, 2026
652318e
refactor(media): share http error handling
steipete Feb 16, 2026
58cf37c
refactor(memory): reuse batch utils in gemini
steipete Feb 16, 2026
0dbc51a
refactor(daemon): share service description resolve
steipete Feb 16, 2026
5ecc364
fix(daemon): drop unused formatGatewayServiceDescription import
steipete Feb 16, 2026
32221e1
refactor(probe): share withTimeout
steipete Feb 16, 2026
dece9e8
refactor(update): share package.json readers
steipete Feb 16, 2026
cb46ea0
refactor(models): dedupe set default model updates
steipete Feb 16, 2026
f8fbeb5
refactor(protocol): dedupe cron/config schemas
steipete Feb 16, 2026
2b2c3a0
refactor(imessage): dedupe outbound media limit resolve
steipete Feb 16, 2026
d00adfe
refactor(signal): dedupe outbound media limit resolve
steipete Feb 16, 2026
753491a
refactor(slack): dedupe outbound send flow
steipete Feb 16, 2026
f03ea76
fix(slack): tighten threadId type to satisfy lint
steipete Feb 16, 2026
b6871d9
refactor(outbound): dedupe attachment hydration
steipete Feb 16, 2026
57d5a8d
refactor(outbound): dedupe directory list call
steipete Feb 16, 2026
14fb2c0
Gateway/Control UI: preserve partial output on abort (#15026)
advaitpaliwal Feb 16, 2026
4ab25a2
refactor(outbound): reuse message gateway call
steipete Feb 16, 2026
00c91c3
refactor(outbound): dedupe queued delivery param types
steipete Feb 16, 2026
d5ee766
refactor(outbound): dedupe channel handler params
steipete Feb 16, 2026
4aaafe5
refactor(net): share hostname normalization
steipete Feb 16, 2026
e84b20a
refactor(status-issues): share enabled/configured account gate
steipete Feb 16, 2026
78484ca
Merge remote-tracking branch 'upstream/main' into 02-15-update_to_ups…
neekolas Feb 16, 2026
10af839
fix(convos): align extension types with current plugin SDK
neekolas Feb 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
181 changes: 181 additions & 0 deletions .agents/archive/PR_WORKFLOW_V1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
# PR Workflow for Maintainers

Please read this in full and do not skip sections.
This is the single source of truth for the maintainer PR workflow.

## Triage order

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.

## Working rule

Skills execute workflow. Maintainers provide judgment.
Always pause between skills to evaluate technical direction, not just command success.

These three skills must be used in order:

1. `review-pr` — review only, produce findings
2. `prepare-pr` — rebase, fix, gate, push to PR head branch
3. `merge-pr` — squash-merge, verify MERGED state, clean up

They are necessary, but not sufficient. Maintainers must steer between steps and understand the code before moving forward.

Treat PRs as reports first, code second.
If submitted code is low quality, ignore it and implement the best solution for the problem.

Do not continue if you cannot verify the problem is real or test the fix.

## Coding Agent

Use ChatGPT 5.3 Codex High. Fall back to 5.2 Codex High or 5.3 Codex Medium if necessary.

## PR quality bar

- Do not trust PR code by default.
- Do not merge changes you cannot validate with a reproducible problem and a tested fix.
- Keep types strict. Do not use `any` in implementation code.
- Keep external-input boundaries typed and validated, including CLI input, environment variables, network payloads, and tool output.
- Keep implementations properly scoped. Fix root causes, not local symptoms.
- Identify and reuse canonical sources of truth so behavior does not drift across the codebase.
- Harden changes. Always evaluate security impact and abuse paths.
- Understand the system before changing it. Never make the codebase messier just to clear a PR queue.

## Rebase and conflict resolution

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.

- During `prepare-pr`: rebase onto `main` as the first step, before fixing findings or running gates.
- If conflicts are complex or touch areas you do not understand, stop and escalate.
- Prefer **rebase** for linear history; **squash** when commit history is messy or unhelpful.

## Commit and changelog rules

- Create commits with `scripts/committer "<msg>" <file...>`; avoid manual `git add`/`git commit` so staging stays scoped.
- Follow concise, action-oriented commit messages (e.g., `CLI: add verbose flag to send`).
- During `prepare-pr`, use this commit subject format: `fix: <summary> (openclaw#<PR>) thanks @<pr-author>`.
- Group related changes; avoid bundling unrelated refactors.
- Changelog workflow: keep the latest released version at the top (no `Unreleased`); after publishing, bump the version and start a new top section.
- When working on a PR: add a changelog entry with the PR number and thank the contributor.
- When working on an issue: reference the issue in the changelog entry.
- Pure test additions/fixes generally do **not** need a changelog entry unless they alter user-facing behavior or the user asks for one.

## Co-contributor and clawtributors

- If we squash, add the PR author as a co-contributor in the commit body using a `Co-authored-by:` trailer.
- When maintainer prepares and merges the PR, add the maintainer as an additional `Co-authored-by:` trailer too.
- Avoid `--auto` merges for maintainer landings. Merge only after checks are green so the maintainer account is the actor and attribution is deterministic.
- For squash merges, set `--author-email` to a reviewer-owned email with fallback candidates; if merge fails due to author-email validation, retry once with the next candidate.
- 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.
- When merging a PR: leave a PR comment that explains exactly what we did, include the SHA hashes, and record the comment URL in the final report.
- 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.

## Review mode vs landing mode

- **Review mode (PR link only):** read `gh pr view`/`gh pr diff`; **do not** switch branches; **do not** change code.
- **Landing mode (exception path):** use only when normal `review-pr -> prepare-pr -> merge-pr` flow cannot safely preserve attribution or cannot satisfy branch protection. 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: the contributor needs to be in the git graph after this!

## Pre-review safety checks

- Before starting a review when a GH Issue/PR is pasted: use an isolated `.worktrees/pr-<PR>` checkout from `origin/main`. Do not require a clean main checkout, and do not run `git pull` in a dirty main checkout.
- PR review calls: prefer a single `gh pr view --json ...` to batch metadata/comments; run `gh pr diff` only when needed.
- PRs should summarize scope, note testing performed, and mention any user-facing changes or new flags.
- Read `docs/help/submitting-a-pr.md` ([Submitting a PR](https://docs.openclaw.ai/help/submitting-a-pr)) for what we expect from contributors.

## Unified workflow

Entry criteria:

- PR URL/number is known.
- Problem statement is clear enough to attempt reproduction.
- A realistic verification path exists (tests, integration checks, or explicit manual validation).

### 1) `review-pr`

Purpose:

- Review only: correctness, value, security risk, tests, docs, and changelog impact.
- Produce structured findings and a recommendation.

Expected output:

- Recommendation: ready, needs work, needs discussion, or close.
- `.local/review.md` with actionable findings.

Maintainer checkpoint before `prepare-pr`:

```
What problem are they trying to solve?
What is the most optimal implementation?
Can we fix up everything?
Do we have any questions?
```

Stop and escalate instead of continuing if:

- The problem cannot be reproduced or confirmed.
- The proposed PR scope does not match the stated problem.
- The design introduces unresolved security or trust-boundary concerns.

### 2) `prepare-pr`

Purpose:

- Make the PR merge-ready on its head branch.
- Rebase onto current `main` first, then fix blocker/important findings, then run gates.
- In fresh worktrees, bootstrap dependencies before local gates (`pnpm install --frozen-lockfile`).

Expected output:

- Updated code and tests on the PR head branch.
- `.local/prep.md` with changes, verification, and current HEAD SHA.
- Final status: `PR is ready for /mergepr`.

Maintainer checkpoint before `merge-pr`:

```
Is this the most optimal implementation?
Is the code properly scoped?
Is the code properly reusing existing logic in the codebase?
Is the code properly typed?
Is the code hardened?
Do we have enough tests?
Do we need regression tests?
Are tests using fake timers where appropriate? (e.g., debounce/throttle, retry backoff, timeout branches, delayed callbacks, polling loops)
Do not add performative tests, ensure tests are real and there are no regressions.
Do you see any follow-up refactors we should do?
Take your time, fix it properly, refactor if necessary.
Did any changes introduce any potential security vulnerabilities?
```

Stop and escalate instead of continuing if:

- You cannot verify behavior changes with meaningful tests or validation.
- Fixing findings requires broad architecture changes outside safe PR scope.
- Security hardening requirements remain unresolved.

### 3) `merge-pr`

Purpose:

- Merge only after review and prep artifacts are present and checks are green.
- Use deterministic squash merge flow (`--match-head-commit` + explicit subject/body with co-author trailer), then verify the PR ends in `MERGED` state.
- If no required checks are configured on the PR, treat that as acceptable and continue after branch-up-to-date validation.

Go or no-go checklist before merge:

- All BLOCKER and IMPORTANT findings are resolved.
- Verification is meaningful and regression risk is acceptably low.
- Docs and changelog are updated when required.
- Required CI checks are green and the branch is not behind `main`.

Expected output:

- Successful merge commit and recorded merge SHA.
- Worktree cleanup after successful merge.
- Comment on PR indicating merge was successful.

Maintainer checkpoint after merge:

- Were any refactors intentionally deferred and now need follow-up issue(s)?
- Did this reveal broader architecture or test gaps we should address?
- Run `bun scripts/update-clawtributors.ts` if the contributor is new.
Loading
Loading