Pr Sweep
Sweep open pull requests a fork contributes to an upstream GitHub repo: an adversarial review, findings addressed, branches brought up to date, and merges — with queryable per-PR and run-summary resources. Ships the sweeper prompt as a bundled asset.
Relicense from AGPL-3.0-only to MIT.
| Argument | Type | Description |
|---|---|---|
| upstreamRepo | string | Upstream GitHub repo as owner/name (e.g. Kilo-Org/kilocode) |
| forkRepo | string | Fork GitHub repo as owner/name (e.g. maphew/kilocode) |
| workdir | string | Local checkout directory for the upstream repo |
| agent? | enum | Headless agent to run the sweep |
| mainBranch? | string | Base branch to rebase and merge into |
| swampRepoDir? | string | Path to the swamp repo that owns this workflow. Optional: only used to find a legacy `<swampRepoDir>/.kilo/agents/pr-sweeper.md` prompt override; the bundled prompt is used otherwise. |
| sweeperPrompt? | string | Absolute path to a custom sweeper prompt file. Overrides both the bundled prompt and the legacy `<swampRepoDir>/.kilo/agents/pr-sweeper.md` lookup. |
| resyncBehind? | boolean | After the agent run, re-fetch the base branch and bring any behind PR branch up to date |
| updateStrategy? | enum | How to update a behind branch: merge the base in (no force-push) or rebase onto it (force-push) |
Resources
Declare license: AGPL-3.0-only in the manifest; no model, workflow, or schema changes.
Initial publish from maphew/swamp-extensions. Bundles the sweeper prompt (prompts/pr-sweeper.md) so the model is self-contained: swampRepoDir is now optional and a custom prompt can be supplied with sweeperPrompt. agent now selects claude/codex/opencode/kilo instead of always running kilo. Records mergeStateStatus on per-PR results and a truncated flag on summaries, and adds an upgrade entry for the source move.
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit2/2earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License2/2earned
- Verified public repository2/2earned
Spawns a subprocess with Deno.Command().
- models/src/pr_sweep.ts:209 — gh CLI is the PR-sweep contract.
- models/src/pr_sweep.ts:269 — the whole point is to run the agent.
- models/src/pr_sweep.ts:335 — gh CLI is the PR-sweep contract.
- models/src/pr_sweep.ts:471 — branch sync runs real git commands.