feat: draft PR workflow + stale PR cleanup for agent teams (#1706)

Agents now open draft PRs immediately after first commit and convert
to non-draft when work is complete, enabling visibility into in-progress
work. Security reviewer skips draft PRs. Stale drafts (7+ days) are
auto-closed. Refactor pr-maintainer picks up stale non-draft PRs (3+ days).

Co-authored-by: lab <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
A 2026-02-22 09:28:12 -08:00 committed by GitHub
parent 21f7e7683f
commit d79c941593
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 45 additions and 17 deletions

View file

@ -368,6 +368,14 @@ refactor.yml — GitHub Actions workflow that POSTs to the trigger server
- If a PR can't be merged (conflicts, superseded, wrong approach), close it with `gh pr close {number} --comment "Reason"`
- Never rebase main or use `--force` unless explicitly asked
### Draft PR Workflow (for autonomous agents)
- **Commit early and often** — make small, incremental commits as you work
- **Push and open a draft PR immediately**`gh pr create --draft` after your first commit
- **Keep working on the draft PR** — push additional commits to the same branch
- **Convert to non-draft when ready for review**`gh pr ready NUMBER`
- Draft PRs that go stale (no updates for 1 week) will be auto-closed
## After Each Change
1. `bash -n {file}` syntax check on all modified scripts