plans/faster-pr-workflows.md
Generated by swarm planning session on 2026-02-15
Improve the speed of landing PRs for the maintainer (wwwillchen/keppo-bot) by optimizing the CI pipeline, automating the fix-and-retry loop, and improving developer feedback during wait times. The current workflow is already highly automated — this plan targets the remaining friction: CI wall-clock time, human-in-the-loop steps, and the "waiting black hole" between push and merge.
The current PR landing flow involves a multi-cycle loop: push → wait for CI (~10-15 min) → wait for AI review (~10-30 min) → address comments → re-push → wait again. Each iteration adds latency, and for 3-4 PRs per day, this compounds into 1-2 hours of waiting plus context-switching costs. The quality gates (multi-reviewer AI review, comprehensive E2E testing, lint/type checks) are working well — the problem is throughput, not quality.
/pr skill entry point/fast-push (optimize existing skill instead)/pr command that detects what my PR needs and does the right thing, so I don't need to remember which of 10+ skills to invoke.needs-human:review-issue./pr — unified entry point detects uncommitted changes, runs lint/format/type-check/unit-tests locally, commits, pushes, creates/updates PR/pr kicks off a background PR watcher that polls CI statusneeds-human:review-issue label applied, developer investigates/pr runs local validation and pushes. Terminal shows progress via task tracking.needs-human:review-issue label. Terminal notification. Developer investigates./pr is the primary entry point. It inspects current state (uncommitted changes? open PR? failing checks? review comments?) and routes to the appropriate action./pr push, /pr fix, /pr watch, /pr rebasegh pr checks --watch or polling gh pr checks every 30 secondsAll changes are to the CI/CD pipeline, GitHub Actions workflows, and Claude Code skills. No application code changes.
| Component | Change | Complexity |
|---|---|---|
.github/workflows/ci.yml | Add persistent caching, merge build+E2E for self-hosted, tiered test selection | Medium |
.github/workflows/pr-review-responder.yml | Remove label requirement for privileged authors, move to self-hosted runners | Small |
scripts/ci-cleanup-macos.sh | Preserve caches (Playwright, pnpm store, nextjs-template, scaffold deps) | Small |
playwright.config.ts | Add test tagging/grouping for tiered selection | Medium |
.claude/skills/pr/SKILL.md (new) | Unified /pr entry point that routes to sub-skills | Medium |
.claude/skills/pr-watch/SKILL.md (new) | Background CI status watcher with terminal notifications | Small |
.claude/skills/fast-push/SKILL.md | Optimize for speed — reduce unnecessary steps | Small |
None. All improvements are to pipeline/tooling configuration.
None. Internal tooling only.
cc:request:2, cc:request:3, cc:request:4 get reached?)scripts/ci-cleanup-macos.sh behavior — confirm what's already cached vs. cleanedscripts/ci-cleanup-macos.sh to keep these cached (keyed on lockfile/dependency hashes). Note: node_modules/ already persists (cleanup script doesn't remove it), so npm ci is already partially cached — focus caching effort on Playwright, pnpm store, and template deps.npx playwright install chromium. Check if nextjs-template exists and is up-to-date before cloning.date commands at each step boundary to establish baseline.pr-review-responder.yml to trigger for all privileged-author PRs, not just those with cc:request label. Auto-apply cc:request on PR creation for privileged authors, or remove the label check entirely.ubuntu-latest which cannot execute Electron Playwright tests. Moving to self-hosted enables the fix loop to actually fix E2E failures, not just lint/type/unit failures.check-changes job: Classify changed files into tiers:
full-ci escape label: Allow forcing full CI via a label for cases where the tier classification seems wrong. Post a CI comment explaining which tier was selected and why./pr skill: Single entry point that inspects state and routes:
/fast-push behavior into /pr as the default for deterministic operations (use haiku), with opus reserved for reasoning-heavy tasks (conflict resolution, complex review responses). Deprecate /fast-push as a separate entry point./pr-watch skill: Background watcher that polls gh pr checks and notifies on completion. Should surface specific failure type (lint, type-check, unit test, E2E) so developer knows whether to intervene or let auto-fix handle it. Could be as simple as gh pr checks --watch with a terminal bell on exit.| Risk | Likelihood | Impact | Mitigation |
|---|---|---|---|
| Stale caches cause false CI passes on self-hosted runners | Medium | High | Hash-based cache keys, periodic full cache clear, nightly clean build |
| Tiered test selection misses regressions | Medium | High | Conservative tier classification, full-ci escape label, nightly full suite, always full CI on main push |
| Auto-fix loop on self-hosted runners consumes capacity | Low | Medium | 2+ runners available; add concurrency limits if needed |
| Merged build+E2E job can't retry just E2E on flakes | Medium | Medium | Monitor flake rate; revert to split jobs if flake-retry savings > artifact-transfer savings |
Unified /pr skill makes wrong routing decision | Low | Low | Show what action will be taken before executing; sub-commands for manual override |
| Moving pr-review-responder to self-hosted increases runner load | Low | Low | 2+ runners available; responder runs are short-lived |
| Decision | Options Considered | Chosen | Reasoning |
|---|---|---|---|
| Auto-merge approach | Default auto-merge, auto-merge on cc:done, keep current | Keep current | User prefers the deliberate "merge-when-ready" checkpoint. Focus speed improvements elsewhere. |
| Target persona | Maintainer only, both maintainer + contributors | Maintainer only | Focused scope delivers faster. External contributor improvements deferred. |
| Fast push implementation | Bash script, optimize existing skill, both paths | Optimize existing skill | Avoids maintaining two implementations. User prefers single path. |
| Runner capacity | Constrained (1 runner), unconstrained (2+) | 2+ runners available | Runner capacity is not a constraint. Can add more concurrent workflows freely. |
| Review blocking merge | Non-blocking (post-merge review), blocking | Keep blocking | Team consensus: post-merge review comments have low compliance. Keeping review as blocking preserves quality gate. Speed up the review instead of removing it. |
| Bash fast-push script | Build it, don't build it | Don't build | UX team raised valid concern about fragmentation. Optimize /fast-push skill instead. |
Generated by dyad:swarm-to-plan