1 line
2.7 KiB
JSON
1 line
2.7 KiB
JSON
{"content": "---\nname: overnight-pr-routine-loop\ndescription: A nightly routine that watches your open PRs, auto-fixes build failures, answers review comments in a fresh worktree, and rebases stale branches while you sleep.\ncategory: operations\ninterval: daily\nstop-condition: Every fixable PR is green and updated; anything ambiguous is left flagged for human review.\ncomponents: [command:git-workflow/worktree-init, command:git-workflow/create-pr, agent:git/git-workflow-manager, hook:automation/slack-notifications]\ntags: [schedule, pull-requests, automation, loop]\n---\n\n# Overnight PR Routine\n\n> **Loop Engineering** — the `/schedule` verb runs a routine *while you are gone*. This is the \"I don't write code, I write loops, and they write the code while I sleep\" pattern: a scheduled routine that lands the fixable PRs overnight.\n\n## 🎯 Goal\nEach night, work the open-PR queue: auto-fix build failures, answer review comments in an isolated worktree, rebase stale branches — and leave anything ambiguous for a human in the morning.\n\n## ⏱️ Schedule\nTrigger: `daily` (overnight routine, runs while your laptop is closed).\n\n## ▶️ Run it\n```\n/schedule every night, watch my open PRs. For each: auto-fix build failures, answer review comments in a fresh worktree, and rebase what is stale. Leave anything ambiguous or product-sensitive for me. Keep state in git so a crash loses nothing. Post a morning summary.\n```\n\n## 🔁 Iteration steps\n1. **Perceive** — list open PRs and their CI/review state.\n2. **Isolate** — spin a fresh worktree per PR with `/worktree-init` (no cross-contamination).\n3. **Act** — `git-workflow-manager` fixes build failures, addresses review comments, rebases stale branches.\n4. **Verify** — re-run CI; push only when green; ambiguous items are flagged, never guessed.\n5. **Report** — post a morning summary via `slack-notifications`; update each PR with `/create-pr`.\n\n## 🛑 Stopping condition\nEvery fixable PR is green and updated; ambiguous/product-sensitive items are flagged for human review (not auto-merged).\n\n## 💰 Budget & guardrails\nA nightly spend ceiling; never auto-merges; isolated worktrees so parallel fixes don't collide; state in git so a crash is recoverable.\n\n## 🧩 Referenced components\n- `command:git-workflow/worktree-init` — isolated workspace per PR.\n- `command:git-workflow/create-pr` — updates/opens PRs.\n- `agent:git/git-workflow-manager` — safe rebases, fixes and comment replies.\n- `hook:automation/slack-notifications` — the morning summary.\n\n## 💡 Example\nYou wake up to three PRs rebased and green, two review comments answered with commits, and one PR flagged \"needs a product decision\" — exactly the one you should look at.\n"} |