Practical patterns, starters & CLI tools for loop engineering with AI coding agents. Design systems that prompt and orchestrate agents (inspired by Addy Osmani and Boris Cherny). Includes loop-audit, loop-init, loop-cost.
TypeScript agentic-aiai-agentsai-codinganthropicautomationclaudeclaude-codecodexcoding-agentsdevops-automationdevtoolsgithub-actionsgrokllmloop-engineeringmcpprompt-engineering
docs: add Windsurf PR Babysitter example (#208)
Chanhyo Jung666448737aa0
diff --git a/examples/README.md b/examples/README.mdindex d4e8e50..8e98c97 100644--- a/examples/README.md+++ b/examples/README.md@@ -23,7 +23,7 @@ Start with [primitives-matrix.md](../docs/primitives-matrix.md) to map capabilit| Pattern | Grok | Claude | Codex | OpenClaw | Cursor | Windsurf | Opencode | Hermes | GH Actions ||---------|------|--------|-------|----------|--------|----------|----------|--------|------------|| Daily Triage | [grok/daily-triage.md](./grok/daily-triage.md) | [claude-code/daily-triage.md](./claude-code/daily-triage.md) | [codex/daily-triage.md](./codex/daily-triage.md) | [openclaw/daily-triage.md](./openclaw/daily-triage.md) | [cursor/daily-triage.md](./cursor/daily-triage.md) | [windsurf/daily-triage.md](./windsurf/daily-triage.md) | [opencode/daily-triage.md](./opencode/daily-triage.md) | [hermes/daily-triage.md](./hermes/daily-triage.md) | [github-actions/daily-triage.yml](./github-actions/daily-triage.yml) |-| PR Babysitter | [grok/pr-babysitter.md](./grok/pr-babysitter.md) | [claude-code/pr-babysitter.md](./claude-code/pr-babysitter.md) | [codex/pr-babysitter.md](./codex/pr-babysitter.md) | [openclaw/pr-babysitter.md](./openclaw/pr-babysitter.md) | [cursor/pr-babysitter.md](./cursor/pr-babysitter.md) | — | [opencode/pr-babysitter.md](./opencode/pr-babysitter.md) | — | [github-actions/pr-babysitter.yml](./github-actions/pr-babysitter.yml) |+| PR Babysitter | [grok/pr-babysitter.md](./grok/pr-babysitter.md) | [claude-code/pr-babysitter.md](./claude-code/pr-babysitter.md) | [codex/pr-babysitter.md](./codex/pr-babysitter.md) | [openclaw/pr-babysitter.md](./openclaw/pr-babysitter.md) | [cursor/pr-babysitter.md](./cursor/pr-babysitter.md) | [windsurf/pr-babysitter.md](./windsurf/pr-babysitter.md) | [opencode/pr-babysitter.md](./opencode/pr-babysitter.md) | — | [github-actions/pr-babysitter.yml](./github-actions/pr-babysitter.yml) || CI Sweeper | [grok/ci-sweeper.md](./grok/ci-sweeper.md) | [claude-code/ci-sweeper.md](./claude-code/ci-sweeper.md) | [codex/ci-sweeper.md](./codex/ci-sweeper.md) | [openclaw/ci-sweeper.md](./openclaw/ci-sweeper.md) | — | — | [opencode/ci-sweeper.md](./opencode/ci-sweeper.md) | — | [github-actions/ci-sweeper.yml](./github-actions/ci-sweeper.yml) || Post-Merge Cleanup | [grok/post-merge-cleanup.md](./grok/post-merge-cleanup.md) | [claude-code/post-merge-cleanup.md](./claude-code/post-merge-cleanup.md) | [codex/post-merge-cleanup.md](./codex/post-merge-cleanup.md) | [openclaw/post-merge-cleanup.md](./openclaw/post-merge-cleanup.md) | — | — | [opencode/post-merge-cleanup.md](./opencode/post-merge-cleanup.md) | — | [github-actions/post-merge-cleanup.yml](./github-actions/post-merge-cleanup.yml) || Dependency Sweeper | [grok/dependency-sweeper.md](./grok/dependency-sweeper.md) | [claude-code/dependency-sweeper.md](./claude-code/dependency-sweeper.md) | [codex/dependency-sweeper.md](./codex/dependency-sweeper.md) | [openclaw/dependency-sweeper.md](./openclaw/dependency-sweeper.md) | — | — | [opencode/dependency-sweeper.md](./opencode/dependency-sweeper.md) | — | [github-actions/dependency-sweeper.yml](./github-actions/dependency-sweeper.yml) |diff --git a/examples/windsurf/README.md b/examples/windsurf/README.mdindex d13102b..cfe8c56 100644--- a/examples/windsurf/README.md+++ b/examples/windsurf/README.md@@ -1,14 +1,15 @@# Windsurf Examples-Copy-pasteable loop patterns for Windsurf, using Cascade Workflows for scheduling and `.windsurf/rules/` for persistent skill context.+Copy-pasteable loop patterns for Windsurf, using Cascade Workflows as the manual workflow surface and `.windsurf/rules/` for persistent skill context. External reminders or triggers can provide cadence, but should not merge or act on PRs.| Example | Cadence | Risk | File ||---|---|---|---|| Daily Triage | 1d–2h (manual `/daily-triage`) | Low | [daily-triage.md](daily-triage.md) |+| PR Babysitter | 5m–15m (manual `/pr-babysitter`; external reminder optional) | Medium | [pr-babysitter.md](pr-babysitter.md) |No `loop-init --tool windsurf` yet — copy `SKILL.md` + `STATE.md` from any starter (e.g. `starters/minimal-loop`), then follow the example to wire a Cascade Workflow.Audit after copying:```bashnpx @cobusgreyling/loop-audit . --suggest-```\ No newline at end of file+```diff --git a/examples/windsurf/pr-babysitter.md b/examples/windsurf/pr-babysitter.mdnew file mode 100644index 0000000..aad55c5--- /dev/null+++ b/examples/windsurf/pr-babysitter.md@@ -0,0 +1,68 @@+# PR Babysitter — Windsurf (Cascade Workflows)++This is a practical, copy-pasteable example of a PR babysitter loop using Windsurf's Cascade.++Windsurf has no native `/loop` scheduler or built-in cron. Map the loop to a **Cascade Workflow** (`.windsurf/workflows/pr-babysitter.md`) and invoke it manually with `/pr-babysitter`; if you need unattended cadence, pair it with an external reminder or scheduler such as GitHub Actions cron, `launchd`, `cron`, or systemd that prompts a human to run the workflow.++## Workflow (week one — report only)++Create `.windsurf/workflows/pr-babysitter.md`:++```markdown+# PR Babysitter++**Description:** Check watched pull requests, update state, and report blockers. No auto-merge.++1. Read `pr-babysitter-state.md` and the `pr-review-triage` rule.+2. List open PRs you care about and summarize CI, review, merge conflict, and stale-review status.+3. Update `pr-babysitter-state.md` with current status, last action, and attempts.+4. Do not push fixes, comment on PRs, or merge in week one — report only.+5. Flag ambiguous or high-risk work for human review.+```++Invoke in Cascade with `/pr-babysitter` on your chosen cadence.++For an unattended cadence, keep Windsurf as the reviewer/triage surface and use an external scheduler only to remind a human or open a human-gated prompt. Do not let the scheduler comment, push fixes, approve, label, close, or merge PRs.++## Progression++- **Week one — report only.** Append to `pr-babysitter-state.md`. Read the state yourself before acting on any suggestion.+- **Add minimal fixes.** Allow fixes only for low-risk, allowlisted PRs, and only in an isolated worktree.+- **Add verifier split.** Use a separate checker/verifier before any PR comment or proposed fix is posted.+- **Add connectors.** Wire GitHub MCP or CLI access read-only first; enable comments only after the report-only loop is trusted.++## Requirements++- `pr-babysitter-state.md` in the repo root, copied from `starters/pr-babysitter/pr-babysitter-state.md.example`+- The `pr-review-triage` skill copied into `.windsurf/rules/pr-review-triage.md` from `starters/pr-babysitter/.grok/skills/pr-review-triage/SKILL.md` or another starter variant+- A `.windsurf/workflows/pr-babysitter.md` workflow like the one above+- Manual `/pr-babysitter` invoke for week one; external scheduler or reminder optional after that, with all PR actions still human-gated++## Example pr-babysitter-state.md++```markdown+# PR Babysitter State++Last run: 2026-07-05 09:00 UTC++## Watched PRs++- #1234 (fix-login-redirect)+ Status: CI green | changes requested | not ready+ Attempts: 1/3+ Last action: Reported blocking review comment; no code changes made.+ Human decision: Waiting for maintainer guidance before proposing a fix.++## Escalated (human required)++- #1240 touches auth/session code — keep report-only.+```++## Notes++- Start with PRs you own or explicitly care about; avoid scanning the whole org on every run.+- Keep week-one output short: ready, blocked, stale, or needs human decision.+- Sign any future comments clearly, for example `🤖 Loop Engineering — PR Babysitter`.+- See [patterns/pr-babysitter.md](../../patterns/pr-babysitter.md) and [starters/pr-babysitter](../../starters/pr-babysitter/) for the full pattern spec.++See the [primitives matrix](../../docs/primitives-matrix.md) for how Windsurf maps to the same loop shape.