

























@@ -1,20 +1,42 @@
11---
22name: clownfish-cloud-pr
3-description: Use when launching Clownfish in GitHub Actions to create or update one guarded GitHub implementation PR from issue/PR refs, a ClawSweeper report, or a custom maintainer prompt.
3+description: Use when launching Clownfish in GitHub Actions to create or update one guarded GitHub implementation PR from issue/PR refs, a ClawSweeper report, a custom maintainer prompt, or to opt an existing Clownfish PR into ClawSweeper-reviewed cloud automerge.
44---
5566# Clownfish Cloud PR
7788Use this skill when the user wants Codex to ask Clownfish to create a PR in the
99cloud from issue/PR refs plus a custom prompt.
101011-## Create One Job
11+## Start
12121313```bash
1414cd ~/Projects/clownfish
1515git status --short --branch
1616gh variable list --repo openclaw/clownfish --json name,value \
1717 --jq 'map(select(.name|test("^CLOWNFISH_"))) | sort_by(.name) | .[] | {name,value}'
18+```
19+20+Keep merge gated unless Peter explicitly opens it. Execute/fix gates are closed
21+unless the repo variables are literally `1`; normal fix-PR work needs an
22+intentional execution window:
23+24+```bash
25+gh variable set CLOWNFISH_ALLOW_EXECUTE --repo openclaw/clownfish --body 1
26+gh variable set CLOWNFISH_ALLOW_FIX_PR --repo openclaw/clownfish --body 1
27+gh variable set CLOWNFISH_ALLOW_MERGE --repo openclaw/clownfish --body 0
28+gh variable set CLOWNFISH_ALLOW_AUTOMERGE --repo openclaw/clownfish --body 0
29+```
30+31+Reset `CLOWNFISH_ALLOW_EXECUTE=0` and `CLOWNFISH_ALLOW_FIX_PR=0` after the
32+window. If those vars are absent or not `1`, execute/autonomous workflow runs
33+stay plan-only/no-mutation.
34+35+## Create One Job
36+37+From refs and a custom prompt:
38+39+```bash
1840npm run create-job -- \
1941 --repo openclaw/openclaw \
2042 --refs 123,456 \
@@ -30,7 +52,8 @@ npm run create-job -- \
30523153The script checks for an existing open PR/body match and remote branch named
3254`clownfish/<cluster-id>` before writing a duplicate job. Use `--dry-run` to
33-inspect the exact job body.
55+inspect the exact job body and `--force` only after deciding the duplicate check
56+is stale.
34573558## Ask For A Replacement PR
3659@@ -68,18 +91,7 @@ npm run dispatch -- jobs/openclaw/inbox/clawsweeper-openclaw-openclaw-123.md \
6891```
69927093Do not use `--dispatch` until the job is committed and pushed; the workflow
71-reads the job path from GitHub. Execute/fix gates are closed unless the repo
72-variables are literally `1`; open them only for the execution window:
73-74-```bash
75-gh variable set CLOWNFISH_ALLOW_EXECUTE --repo openclaw/clownfish --body 1
76-gh variable set CLOWNFISH_ALLOW_FIX_PR --repo openclaw/clownfish --body 1
77-gh variable set CLOWNFISH_ALLOW_MERGE --repo openclaw/clownfish --body 0
78-```
79-80-Reset `CLOWNFISH_ALLOW_EXECUTE=0` and `CLOWNFISH_ALLOW_FIX_PR=0` after the
81-window. Keep `CLOWNFISH_ALLOW_MERGE=0` unless Peter explicitly opens the merge
82-gate.
94+reads the job path from GitHub.
83958496## Maintainer Comment Commands
8597@@ -94,6 +106,7 @@ Supported commands:
94106/clownfish fix ci
95107/clownfish address review
96108/clownfish rebase
109+/clownfish automerge
97110/clownfish explain
98111/clownfish stop
99112@openclaw-clownfish fix ci
@@ -112,12 +125,47 @@ npm run comment-router -- --repo openclaw/openclaw --execute --wait-for-capacity
112125Scheduled routing stays dry until `CLOWNFISH_COMMENT_ROUTER_EXECUTE=1` is set in
113126`openclaw/clownfish` repo variables.
114127128+## Bounded ClawSweeper-Reviewed Automerge
129+130+Use this only for an existing Clownfish PR that maps back to a `clownfish/*`
131+branch and job file:
132+133+```text
134+/clownfish automerge
135+```
136+137+The router verifies the commenter is a maintainer, adds
138+`clownfish:automerge`, dispatches ClawSweeper for the current PR head, and
139+waits for trusted ClawSweeper markers. `needs-changes` / `fix-required`
140+dispatches the normal repair worker. `pass`, `approved`, or `no-changes` may
141+merge only when the marker SHA matches the current PR head, checks are green,
142+GitHub says the PR is mergeable, no `clownfish:human-review` label is present,
143+and both merge gates are open:
144+145+```bash
146+gh variable set CLOWNFISH_ALLOW_MERGE --repo openclaw/clownfish --body 1
147+gh variable set CLOWNFISH_ALLOW_AUTOMERGE --repo openclaw/clownfish --body 1
148+```
149+150+The actual merge command is pinned with GitHub's head-match guard, so a branch
151+push after ClawSweeper reviewed cannot merge an unreviewed head. If either
152+merge gate is closed when ClawSweeper passes, Clownfish labels the PR
153+`clownfish:merge-ready` only after readiness checks have passed; failing checks,
154+stale heads, conflicts, draft state, or human-review labels must not get that
155+label. Pause with `/clownfish stop`, which adds `clownfish:human-review`.
156+157+The repair loop is capped by `CLOWNFISH_CLAWSWEEPER_MAX_REPAIRS_PER_PR`
158+(default `5`) and `CLOWNFISH_CLAWSWEEPER_MAX_REPAIRS_PER_HEAD` (default `1`).
159+115160## Guardrails
116161117162- One cluster, one branch, one PR: `clownfish/<cluster-id>`.
118163- No security-sensitive work.
119164- New replacement PRs are capped per touched area by
120165`CLOWNFISH_MAX_ACTIVE_PRS_PER_AREA`.
166+- Do not merge from Clownfish unless Peter explicitly asks.
167+- Do not open `CLOWNFISH_ALLOW_AUTOMERGE` unless Peter explicitly asks for an
168+ automerge window.
121169- Do not close duplicates before the fix PR path exists, lands, or is proven
122170 unnecessary.
123171- Codex workers do not get GitHub tokens; deterministic scripts own writes.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。