ReviewOS

also looking at this

stacks/buddy

feat(events): one notification story — fire every declared event, trim setup to its real job

#1449
Merged glennmichael123 wants to merge refactor/setup-plugin-trim into main
14 files +308 -81
README.mdmodified+11-12
Changes to README.md
@@ -379,7 +379,7 @@ const result = await migrator.migrateFromRenovate('renovate.json')
379379
380380## Integration Ecosystem
381381
382Buddy includes an extensible plugin system that enables integrations with popular collaboration and project management tools.
382Buddy includes a setup-time plugin system that notifies your collaboration tools when `buddy setup` completes. (Runtime events — scans, pull requests, merges — go through the `notifications` key in `buddy.config.ts` instead; that is the system a new integration should hook into.)
383383
384384### Built-in Integrations
385385
@@ -397,8 +397,7 @@ echo "https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK" > .buddy/slack-webhoo
397397
398398- Rich setup completion notifications
399399- Repository and project details
400- Error notifications for setup failures
401- Configurable channel and username
400- Reads the webhook from the env var, or from the `.buddy/slack-webhook` file
402401
403402#### Discord Integration
404403
@@ -444,8 +443,7 @@ Create custom integrations by defining plugins in `.buddy/plugins/`:
444443 "version": "1.0.0",
445444 "enabled": true,
446445 "triggers": [
447 { "event": "setup_complete" },
448 { "event": "validation_error" }
446 { "event": "setup_complete" }
449447 ],
450448 "hooks": [
451449 {
@@ -470,13 +468,14 @@ hooks run, and the plugin file chooses the URL.
470468
471469### Plugin Events
472470
473| Event | Description | Context |
474|-------|-------------|---------|
475| `pre_setup` | Before setup begins | Initial configuration |
476| `post_setup` | After setup completes | Full setup context |
477| `step_complete` | After each setup step | Step-specific progress |
478| `validation_error` | When validation fails | Error details and recovery |
479| `setup_complete` | Final setup completion | Complete project context |
471Setup fires exactly one event: **`setup_complete`**, once, when setup finishes
472— in interactive and non-interactive runs alike. Triggers naming anything else
473still load (files written against the retired `pre_setup` / `post_setup` /
474`step_complete` / `validation_error` vocabulary are tolerated) but never fire.
475
476For runtime notifications — scans, pull requests, merges — use the
477`notifications` key in `buddy.config.ts`: an exported webhook env var alone
478does nothing at runtime.
480479
481480### Programmatic Usage
482481