ReviewOS

also looking at this

stacks/buddy

feat(setup): make the preset you pick the preset you get

#1412
Merged glennmichael123 wants to merge feat/preset-wiring into main
10 files +507 -61
docs/cli/setup.mdmodified+34-3
Changes to docs/cli/setup.md
@@ -280,7 +280,7 @@ Generates two workflows:
280280
281281#### 1. Unified Workflow (`buddy.yml`)
282282
283- **Schedule**: dependency updates every 2 hours, dashboard 15 minutes later, cleanup daily at 4 AM UTC, health report Monday at 9 AM UTC
283- **Schedule**: set by the preset you chose — see [Preset Details](#preset-details). Branch cleanup (daily, 4 AM UTC) and the dependency-health report (Monday, 9 AM UTC) are fixed, because housekeeping is the same job at any cadence
284284- **Events**: `pull_request`, `issues`, `issue_comment`, `pull_request_review_comment` and `workflow_run`, so a ticked rebase box or an `@buddy` comment is acted on immediately rather than waited for
285285- **Purpose**: One workflow covering checks, updates, the dashboard, reviews and comment commands
286286- **Features**: `workflow_dispatch` with a `job` input to run a single job by hand
@@ -430,7 +430,11 @@ buddy setup --non-interactive --token-setup new-pat
430430
431431### Preset Options
432432
433Every preset writes the same `buddy.yml`: dependency updates every 2 hours on the `patch` strategy, the dashboard 15 minutes behind them, and a manual trigger for running any single job. The preset records the cadence you intended — change the cadence itself in the workflow's `schedule:` block afterwards.
433The preset you choose decides the generated workflow's update and dashboard
434schedules, its default update strategy, and whether the generated config turns
435auto-merge on. Branch cleanup and the health report are the same in every
436preset. Nothing is locked in — the `schedule:` block is ordinary YAML you can
437edit afterwards.
434438
435439#### Standard Preset
436440
@@ -741,7 +745,34 @@ Configure GitHub Actions permissions:
741745
742746## Preset Details
743747
744A preset is a statement of intent. Setup prints the one you chose and then writes the same `buddy.yml` for every preset: dependency updates every 2 hours (`0 */2 * * *`) on the `patch` strategy, the dashboard 15 minutes later, branch cleanup daily at 4 AM UTC and a dependency-health report on Monday at 9 AM UTC. Edit that `schedule:` block to change the cadence.
748A preset sets four things: when dependency updates run, when the dashboard
749refreshes, which update strategy scheduled runs use, and whether the generated
750`buddy.config.ts` enables auto-merge.
751
752Two schedules are the same in every preset, because housekeeping does not get
753cheaper or riskier with cadence: branch cleanup daily at 4 AM UTC, and a
754dependency-health report on Monday at 9 AM UTC.
755
756Where a preset gives updates and the dashboard the same expression — most of
757them do — one cron entry starts both jobs rather than one of them winning.
758A preset that says `manual` for a schedule gets no scheduled trigger for that
759job at all; run it from the Actions tab.
760
761| Preset | Updates | Dashboard | Strategy | Auto-merge |
762| --- | --- | --- | --- | --- |
763| Standard | `0 9 * * 1,3,5` | same tick | `all` | — |
764| High Frequency | `0 */6 * * *` | `0 9 * * *` | `all` | patch only |
765| Security Focused | `0 */4 * * *` | `0 9 * * *` | `all` | patch only |
766| Minimal | `0 9 * * 1` | same tick | `all` | — |
767| Docker | `0 9 * * 1` | same tick | `all` | — |
768| Monorepo | `0 9 * * *` | same tick | `all` | — |
769| Development/Testing | `*/15 * * * *` | manual | `patch` | — |
770| Custom | manual | manual | `all` | — |
771
772Auto-merge is scoped to patch updates wherever a preset enables it. The preset
773carries a bare on/off, and generating an unconditional auto-merge from that
774would hand a new repository something more dangerous than the preset
775describes — widen it deliberately in `buddy.config.ts` if you want more.
745776
746777### Standard Setup (Recommended)
747778