ReviewOS

also looking at this

stacks/buddy

fix(cli): let packages.strategy reach its flags, and sync CLAUDE.md's embedded README

#1441
Merged glennmichael123 wants to merge fix/strategy-flag-default into main
4 files +182 -64
CLAUDE.mdmodified+164-58
Changes to CLAUDE.md
@@ -776,61 +776,82 @@ dist/
776776
777777**Purpose:** Documentation for the buddy package
778778
779> The fastest, most intelligent dependency management bot for modern JavaScript and TypeScript projects *(and PHP)*.
779**Sync:** manual — nothing regenerates this section. When README.md changes, copy its body (from the tagline blockquote through the licence, without the badge link definitions) back in here; `bun run check:docs` validates both files.
780780
781Buddy is a lightning-fast alternative to Dependabot and Renovate, purpose-built for modern JavaScript, TypeScript, and PHP ecosystems. It intelligently scans your projects, detects outdated & deprecated dependencies across multiple package managers, and creates beautifully formatted pull requests with comprehensive changelogs and metadata.
781> AI code review and dependency updates, in one teammate that runs on your CI with your keys.
782
783Buddy does two jobs that usually take two bots and two subscriptions.
784
785It **reviews code** — pull requests and your local working tree — posting inline findings anchored to the lines you changed, answering `@buddy` questions in the thread, gating merges with real check runs, and repairing failing CI when the fix is unambiguous. An alternative to CodeRabbit and friends, except it runs as a step in your own workflow, against a provider you choose, with no third-party app installed on your repository.
786
787It also **manages dependencies** — scanning across npm, Bun, yarn, pnpm, Composer, Docker, GitHub Actions, pkgx, Launchpad, Go, Rust, Python, Ruby and Zig, grouping related packages, fetching real changelogs, and keeping a pinned dashboard issue. An alternative to Dependabot and Renovate, and it will migrate your existing config from either.
788
789Neither half requires the other. Run the reviewer with no dependency workflows, run the updater with no API key, or run both.
782790
783791![Buddy Pull Request Example](.github/art/screenshot.png)
784792
785793## Features
786794
795### 🔍 **AI Code Review**
796
797- **Inline Findings**: _Anchored to changed lines, describing the failure rather than a style preference_
798- **Incremental by Default**: _A second push gets new findings, not the ones you already read_
799- **Conversational**: _`@buddy review`, `full-review`, `summary`, `pause`, `resume`, `rebase`, `remember` — or just ask a question_
800- **Local Review**: _`buddy review` reads your working tree, so problems are found before the PR exists_
801- **Works Without a Key**: _`--light` runs secret scanning, actionlint, shellcheck, hadolint, markdownlint and syntax checks with no model and no network_
802- **Merge Gates**: _Title format, description quality, linked issue and dependency policy published as a check run_
803- **CI Repair**: _`buddy fix-ci` classifies a failing run and opens the fix when it is clear_
804- **Pipeable**: _`--format json`, `github` annotations, or `agent` to hand findings straight to a coding agent_
805- **Your Provider**: _Anthropic, OpenAI, Google, OpenRouter, or any OpenAI-compatible endpoint_
806
787807### 🚀 **Performance & Speed**
788808
789- **Lightning Fast Execution**: *Built with Bun for maximum performance*
790- **Intelligent Scanning**: *Uses `bun outdated` and GitHub releases API for accurate, real-time dependency detection*
791- **Optimized CI/CD**: *Minimal resource usage with smart caching*
809- **Lightning Fast Execution**: _Built with Bun for maximum performance_
810- **Intelligent Scanning**: _Uses `bun outdated` and GitHub releases API for accurate, real-time dependency detection_
811- **Optimized CI/CD**: _Minimal resource usage with smart caching_
792812
793813### 📦 **Universal Package Support**
794814
795- **Multi-Package Manager**: *Full support for Bun, npm, yarn, pnpm, Composer, pkgx & Launchpad*
796- **GitHub Actions**: *Automatically updates workflow dependencies (`actions/checkout@v4`, etc.)*
797- **Docker Images**: *Detects and updates Dockerfile base images and versions*
798- **Lock File Awareness**: *Respects and updates all lock file formats*
815- **Multi-Package Manager**: _Full support for Bun, npm, yarn, pnpm, Composer, Zig, pkgx & Launchpad_
816- **GitHub Actions**: _Automatically updates workflow dependencies (`actions/checkout@v4`, etc.)_
817- **Docker Images**: _Detects and updates Dockerfile base images and versions_
818- **Zig Dependencies**: _Manages build.zig.zon dependencies with URL and hash tracking_
819- **Lock File Awareness**: _Respects and updates all lock file formats_
799820
800821### 🎯 **Smart Dependency Management**
801822
802- **Configurable Update Strategies**: *Choose from major, minor, patch, or all updates*
803- **Flexible Package Grouping**: *Group related packages for cleaner, focused PRs*
804- **Intelligent Conflict Detection**: *Prevents breaking changes with smart dependency analysis*
805- **Security-First Updates**: *Prioritizes security patches and vulnerability fixes*
823- **Configurable Update Strategies**: _Choose from major, minor, patch, or all updates_
824- **Flexible Package Grouping**: _Group related packages for cleaner, focused PRs_
825- **Intelligent Conflict Detection**: _Prevents breaking changes with smart dependency analysis_
826- **Security-First Updates**: _Checks every dependency against the [OSV.dev](https://osv.dev) advisory database, and creates vulnerability fixes as their own PR ahead of routine updates_
806827
807828### 📊 **Rich Dashboard & Monitoring**
808829
809- **Dependency Dashboard**: *Centralized GitHub issue with complete dependency overview*
810- **Interactive Rebase**: *One-click PR updates via checkbox interface*
811- **Real-time Status Tracking**: *Live monitoring of all open PRs and pending updates*
812- **Comprehensive Reporting**: *Detailed update summaries with confidence metrics*
830- **Dependency Dashboard**: _Centralized GitHub issue with complete dependency overview_
831- **Interactive Rebase**: _One-click PR updates via checkbox interface_
832- **Real-time Status Tracking**: _Live monitoring of all open PRs and pending updates_
833- **Comprehensive Reporting**: _Detailed update summaries with confidence metrics_
813834
814835### 🎨 **Beautiful Pull Requests**
815836
816- **Multi-Format Tables**: *Separate sections for npm, PHP/Composer, pkgx/Launchpad, and GitHub Actions*
817- **Rich Metadata**: *Confidence badges, adoption metrics, age indicators, and download stats*
818- **Detailed Changelogs**: *Automatic release notes and breaking change detection*
819- **Professional Formatting**: *Clean, readable PR descriptions with proper categorization*
837- **Multi-Format Tables**: _Separate sections for npm, PHP/Composer, Zig, pkgx/Launchpad, and GitHub Actions_
838- **Rich Metadata**: _Confidence badges, adoption metrics, age indicators, and download stats_
839- **Detailed Changelogs**: _Automatic release notes and breaking change detection_
840- **Professional Formatting**: _Clean, readable PR descriptions with proper categorization_
820841
821842### ⚙️ **Developer Experience**
822843
823- **Zero Configuration**: *Works immediately with intelligent defaults*
824- **Interactive Setup**: *Renovate-like guided configuration with validation*
825- **Migration Tools**: *Seamless import from existing Renovate and Dependabot setups*
826- **TypeScript Config**: *Full type safety with `buddy.config.ts`*
844- **Zero Configuration**: _Works immediately with intelligent defaults_
845- **Interactive Setup**: _Renovate-like guided configuration with validation_
846- **Migration Tools**: _Seamless import from existing Renovate and Dependabot setups_
847- **TypeScript Config**: _Full type safety with `buddy.config.ts`_
827848
828849### 🔌 **Extensible Integration**
829850
830- **Plugin Ecosystem**: *Built-in Slack, Discord, and Jira integrations*
831- **Custom Hooks**: *Extensible system for organization-specific workflows*
832- **CI/CD Ready**: *Pre-built GitHub Actions workflows for all use cases*
833- **API Access**: *Programmatic control for advanced automation*
851- **Plugin Ecosystem**: _Built-in Slack, Discord, and Jira integrations_
852- **Custom Hooks**: _Extensible system for organization-specific workflows_
853- **CI/CD Ready**: _Pre-built GitHub Actions workflows for all use cases_
854- **API Access**: _Programmatic control for advanced automation_
834855
835856## Quick Start
836857
@@ -963,9 +984,9 @@ Choose from several carefully crafted presets with smart recommendations:
963984**�� Step 8: Workflow Generation & Validation**
964985
965986- Generates two GitHub Actions workflows:
966 - `buddy.yml` - Unified workflow: rebase checks, scheduled updates and the dashboard
967 - `buddy-security.yml` - Security audit, kept separate so it triggers on its own path filters
968- Removes the stale `buddy-check.yml`, `buddy-update.yml`, `buddy-dashboard.yml` and `gh-audit.yml` if an earlier version left them behind
987 - `buddy.yml` - Unified workflow (rebase checks, dependency updates, dashboard management)
988 - `buddy-security.yml` - Security audit, kept separate so it can trigger on its own path filters
989- Removes stale `buddy-check.yml`, `buddy-update.yml` and `buddy-dashboard.yml` files from earlier versions
969990- **YAML validation** - Ensures generated workflows are syntactically correct
970991- **Security best practices** - Validates token usage and permissions
971992- **Workflow testing** - Verifies generated workflows meet requirements
@@ -1002,7 +1023,7 @@ buddy scan --verbose
10021023buddy scan --packages "react,typescript,@types/node"
10031024
10041025# Check packages with glob patterns
1005buddy scan --pattern "@types/*"
1026buddy scan --pattern "@types/_"
10061027
10071028# Apply different update strategies
10081029buddy scan --strategy minor
@@ -1221,11 +1242,11 @@ hooks run, and the plugin file chooses the URL.
12211242
12221243| Event | Description | Context |
12231244|-------|-------------|---------|
1224| `pre*setup` | Before setup begins | Initial configuration |
1225| `post*setup` | After setup completes | Full setup context |
1226| `step*complete` | After each setup step | Step-specific progress |
1227| `validation*error` | When validation fails | Error details and recovery |
1228| `setup*complete` | Final setup completion | Complete project context |
1245| `pre_setup` | Before setup begins | Initial configuration |
1246| `post_setup` | After setup completes | Full setup context |
1247| `step_complete` | After each setup step | Step-specific progress |
1248| `validation_error` | When validation fails | Error details and recovery |
1249| `setup_complete` | Final setup completion | Complete project context |
12291250
12301251### Programmatic Usage
12311252
@@ -1337,6 +1358,7 @@ For the rebase functionality to update GitHub Actions workflow files, you need p
13371358- ✅ **package.json** - npm/yarn/pnpm dependencies
13381359- ✅ **Lock files** - package-lock.json, yarn.lock, pnpm-lock.yaml, bun.lockb
13391360- ✅ **Dependency files** - deps.yaml, dependencies.yaml, pkgx.yaml
1361- ✅ **Zig manifests** - build.zig.zon with URL and hash updates
13401362- ✅ **GitHub Actions** - workflow files (with proper permissions)
13411363- ✅ **PR content** - Updated title, body, and metadata
13421364
@@ -1352,9 +1374,9 @@ buddy dashboard --title "My Dependencies"
13521374
13531375### Automated Dashboard Updates
13541376
1355Buddy includes a pre-built GitHub workflow (`.github/workflows/buddy.yml`) that automatically updates your dependency dashboard:
1377The unified workflow (`.github/workflows/buddy.yml`) automatically updates your dependency dashboard:
13561378
1357- **�� Scheduled**: Every 2 hours, 15 minutes after the dependency update run (cron `15 */2 * * *`)
1379- **�� Scheduled**: On the schedule your preset sets — often the same tick as the dependency update run
13581380- **��️ Manual**: Trigger from Actions tab with custom options
13591381- **�� Auto-Pin**: Keeps dashboard pinned by default
13601382- **�� Dry-Run**: Preview mode available
@@ -1419,6 +1441,7 @@ Buddy automatically detects and updates the following dependency file formats:
14191441- **package.json** - Traditional npm dependencies
14201442- **composer.json** - PHP dependencies from Packagist
14211443- **composer.lock** - PHP lock file with exact versions
1444- **build.zig.zon** - Zig package manager dependencies with URL and hash tracking
14221445- **deps.yaml**/**deps.yml** - Launchpad/pkgx dependency declarations
14231446- **dependencies.yaml**/**dependencies.yml** - Alternative dependency file format
14241447- **pkgx.yaml**/**pkgx.yml** - pkgx-specific dependency files
@@ -1429,11 +1452,19 @@ Buddy automatically detects and updates the following dependency file formats:
14291452- **.github/workflows/*.yml** - GitHub Actions workflow files
14301453- **.github/workflows/*.yaml** - Alternative YAML extension
14311454
1455#### Container Images
1456
1457Detected anywhere in the tree, in all three naming conventions:
1458
1459- `Dockerfile`, `Dockerfile.<suffix>` - e.g. `Dockerfile.prod`
1460- `<prefix>.dockerfile` - e.g. `docker/api.dockerfile`, common in monorepos
1461- `Containerfile`, `<prefix>.containerfile` - the OCI/Podman spelling
1462
14321463All dependency files are parsed using the `ts-pantry` library to ensure compatibility with the pkgx registry ecosystem while maintaining support for tools like Launchpad that reuse the same registry format. GitHub Actions are detected by parsing `uses:` statements in workflow files and checking for updates via the GitHub releases API.
14331464
14341465### Pull Request Format
14351466
1436Buddy generates comprehensive pull requests with **three separate dependency tables**:
1467Buddy generates comprehensive pull requests with **separate dependency tables** for each ecosystem:
14371468
14381469#### 1. npm Dependencies
14391470
@@ -1456,7 +1487,17 @@ Focused table for PHP packages from Packagist:
14561487| phpunit/phpunit | ^10.0.0 → ^10.3.0 | composer.json | ✅ Available |
14571488```
14581489
1459#### 3. Launchpad/pkgx Dependencies
1490#### 3. Zig Dependencies
1491
1492Focused table for Zig packages with repository links and update types:
1493
1494```
1495| Package | Change | Type | File |
1496|---------|--------|------|------|
1497| httpz | 0.5.0 → 0.6.0 | �� minor | build.zig.zon |
1498```
1499
1500#### 4. Launchpad/pkgx Dependencies
14601501
14611502Simplified table focusing on package updates and file locations:
14621503
@@ -1466,7 +1507,7 @@ Simplified table focusing on package updates and file locations:
14661507| bun.com | ^1.2.16 → ^1.2.19 | deps.yaml | ✅ Available |
14671508```
14681509
1469#### 4. GitHub Actions
1510#### 5. GitHub Actions
14701511
14711512Workflow automation updates with direct links to repositories:
14721513
@@ -1483,8 +1524,8 @@ Each table is followed by detailed release notes, changelogs, and package statis
14831524
14841525- **`all`**: Update all dependencies regardless of semver impact
14851526- **`major`**: Only major version updates
1486- **`minor`**: Major and minor updates (no patch-only)
1487- **`patch`**: All updates (major, minor, and patch)
1527- **`minor`**: Minor and patch updates (no majors)
1528- **`patch`**: Only patch updates
14881529
14891530## Auto-Merge Configuration
14901531
@@ -1504,20 +1545,20 @@ const config: BuddyConfig = {
15041545
15051546### Auto-Merge Strategies
15061547
1507- **`squash`**: Squash commits and merge *(recommended for clean history)*
1508- **`merge`**: Create a merge commit *(preserves individual commits)*
1509- **`rebase`**: Rebase and merge *(linear history without merge commits)*
1548- **`squash`**: Squash commits and merge _(recommended for clean history)_
1549- **`merge`**: Create a merge commit _(preserves individual commits)_
1550- **`rebase`**: Rebase and merge _(linear history without merge commits)_
15101551
15111552### Auto-Merge Conditions
15121553
1513- **`patch-only`**: Only auto-merge patch version updates *(safest)*
1514- **No conditions**: Auto-merge all updates *(use with caution)*
1554- **`patch-only`**: Only auto-merge patch version updates _(safest)_
1555- **No conditions**: Auto-merge all updates _(use with caution)_
15151556
15161557### Workflow-Specific Auto-Merge
15171558
15181559Each preset configures auto-merge appropriately:
15191560
1520- **High Frequency Updates**: Auto-merge patch updates only *(6AM, 12PM, 6PM)*, manual review for minor updates *(12AM)*
1561- **High Frequency Updates**: Auto-merge patch updates only _(6AM, 12PM, 6PM)_, manual review for minor updates _(12AM)_
15211562- **Security Focused**: Auto-merge security patches every 6 hours
15221563- **Standard Project**: Auto-merge daily patches, manual review for weekly/monthly updates
15231564- **Development/Testing**: No auto-merge, dry-run by default, enhanced testing features.
@@ -1637,6 +1678,9 @@ This PR was generated by [Buddy](https://github.com/stacksjs/buddy).
16371678| **Package Grouping** | �� Intelligent + flexible | �� Basic grouping | �� Advanced but complex |
16381679| **Dashboard** | �� Rich interactive dashboard | ❌ No dashboard | �� Basic dashboard |
16391680| **Migration Tools** | �� Automated import | ❌ Manual migration | ❌ Manual migration |
1681| **Vulnerability Alerts** | ✅ OSV.dev, prioritized PRs + dashboard | ✅ GitHub Advisory | ✅ OSV / GitHub Advisory |
1682| **Private Registries** | ✅ Config or `.npmrc`, per-scope | ✅ Supported | ✅ Supported |
1683| **GitHub Enterprise** | ✅ Zero-config on GHES runners | ✅ Supported | ✅ Supported |
16401684| **Self-hosting** | ✅ Full control | ❌ GitHub-only | ✅ Complex setup |
16411685| **Plugin System** | �� Extensible ecosystem | ❌ Limited | �� Advanced but complex |
16421686
@@ -1652,15 +1696,15 @@ name: Buddy Update
16521696on:
16531697 schedule:
16541698
1655 - cron: '0 */2 * * *' # Every 2 hours
1699 - cron: '0 _/2 _ _ _' # Every 2 hours
16561700
1657 workflow*dispatch:
1701 workflow_dispatch:
16581702 inputs:
16591703 strategy:
16601704 description: Update strategy
16611705 required: false
16621706 default: patch
1663 dry*run:
1707 dry_run:
16641708 description: Dry run (preview only)
16651709 required: false
16661710 default: true
@@ -1678,7 +1722,7 @@ jobs:
16781722 env:
16791723 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16801724
1681 - if: ${{ github.event.inputs.dry*run != 'true' }}
1725 - if: ${{ github.event.inputs.dry_run != 'true' }}
16821726
16831727 run: bunx @buddysh/buddy update --strategy ${{ github.event.inputs.strategy || 'patch' }} --verbose
16841728 env:
@@ -1704,12 +1748,12 @@ buddy generate-workflows
17041748
17051749The updated workflow system automatically:
17061750
1707- **Every 2 hours**: All configured strategies with dry-run by default
1751- **On your preset's schedule**: All configured strategies with dry-run by default
17081752- **Manual trigger**: Any strategy with configurable dry-run option
17091753- **Enhanced testing**: Comprehensive validation and summaries
17101754- **Failure handling**: Auto-creates GitHub issues
17111755- **Smart summaries**: Rich GitHub Actions summaries
1712- **Flexible scheduling**: Consistent 2-hour intervals for all presets
1756- **Flexible scheduling**: Each preset sets its own update and dashboard cadence
17131757
17141758### GitHub Actions Permissions Setup
17151759
@@ -1751,7 +1795,69 @@ This indicates the permissions above need to be enabled. Both GitHub CLI and RES
17511795
17521796For more details, see the [GitHub documentation on managing GitHub Actions settings](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#preventing-github-actions-from-creating-or-approving-pull-requests).
17531797
1754---
1798## Testing
1799
1800```bash
1801bun test
1802```
1803
1804## Build From Source
1805
1806```bash
1807bun install # not optional — see the note below
1808bun run build
1809```
1810
1811> [!NOTE]
1812> `bun install` is a hard prerequisite for every dev command. On a fresh clone without `node_modules`, `bun test` fails with over a hundred phantom errors (`Cannot find package 'ts-pantry'` and friends) that look like real bugs and are not.
1813>
1814> Git hooks (staged lint on `pre-commit`, gitlint on `commit-msg`) are declared in `package.json` but are not installed automatically — run `bunx bun-git-hooks` once after cloning to activate them.
1815
1816## Changelog
1817
1818Please see our [releases](https://github.com/stacksjs/buddy/releases) page for more information on what has changed recently.
1819
1820## Contributing
1821
1822Please see the [Contributing Guide](https://github.com/stacksjs/contributing) for details.
1823
1824## Community
1825
1826For help, discussion about best practices, or any other conversation that would benefit from being searchable:
1827
1828[Discussions on GitHub](https://github.com/stacksjs/buddy/discussions)
1829
1830For casual chit-chat with others using this package:
1831
1832[Join the Stacks Discord Server](https://stacksjs.com/discord)
1833
1834## Postcardware
1835
1836“Software that is free, but hopes for a postcard.” We love receiving postcards from around the world showing where Stacks is being used! We showcase them on our website too.
1837
1838Our address: Stacks.js, 12665 Village Ln #2306, Playa Vista, CA 90094, United States ��
1839
1840## Sponsors
1841
1842We would like to extend our thanks to the following sponsors for funding Stacks development. If you are interested in becoming a sponsor, please reach out to us.
1843
1844- [JetBrains](https://www.jetbrains.com/)
1845- [The Solana Foundation](https://solana.com/)
1846
1847## Credits
1848
1849- [Renovatebot](https://renovatebot.com/)
1850- [Dependabot](https://dependabot.com/)
1851- [Chris Breuer](https://github.com/chrisbbreuer)
1852- [All Contributors](../../contributors)
1853
1854And a special thanks to [Dan Scanlon](https://twitter.com/danscan) for donating the `stacks` name on npm ✨
1855
1856## License
1857
1858The MIT License (MIT). Please see [LICENSE](LICENSE.md) for more information.
1859
1860Made with ��
17551861
17561862## Linting
17571863