| | I want to contribute a bug fix to pnpm (https://github.com/pnpm/pnpm). |
| | 1. Set up |
| | - Fork and clone the repo: gh repo fork pnpm/pnpm --clone, then cd into it. |
| | - Read CONTRIBUTING.md and any AGENTS.md / CLAUDE.md files, and follow them. |
| | They explain how to install dependencies, build, run tests, and add changesets. |
| | 2. Pick an issue |
| | - List open bugs that nobody is working on yet: |
| | gh issue list -R pnpm/pnpm --state open --label "type: bug" --limit 100 \ |
| | --search "no:assignee -label:\"state: has PR\" -label:\"state: in progress\" -label:\"state: blocked\" -label:\"state: needs design\" -linked:pr" |
| | - Choose ONE issue that has clear reproduction steps and a scope you can fix in a |
| | single focused PR. Skip issues that need a design decision or depend on a specific OS |
| | or registry setup you can't reproduce. |
| | - Read the whole thread, and check that there isn't already an open PR for it |
| | and that nobody has commented that they are working on it. |
| | - Tell me which issue you picked and why before you continue. |
| | - Once I confirm, leave a short comment on the issue so others don't start on it too: |
| | gh issue comment <number> -R pnpm/pnpm --body "I'm working on a fix for this." |
| | 3. Reproduce |
| | - Reproduce the bug locally first. If you can't reproduce it, stop and tell me |
| | instead of guessing a fix. |
| | - Write a failing test that captures the bug. |
| | 4. Fix |
| | - Make the smallest change that fixes the root cause. Don't refactor unrelated code. |
| | - Match the style of the code around it. |
| | - Run the tests covering the changed packages, plus lint, and make sure they pass. |
| | - Add a changeset if CONTRIBUTING.md asks for one. |
| | 5. Open a PR |
| | - Commit on a new branch, push to my fork, and open a PR against pnpm/pnpm main |
| | with gh pr create. |
| | - Put "close #<issue number>" in the description, explain the root cause and |
| | the fix, and say how you tested it. |
| | - Mention that the PR was written with the help of an AI agent. |
| | - Watch CI and fix any failures. |
| | If you stop working on the issue at any point (for example, because you can't reproduce it), |
| | comment on it again to say so, so that someone else can pick it up. |
| | Apart from the comments above, don't post on the issue or the PR for me without asking first. |