From 8c7ab535de2b1046b93dd68ab605a8fec63c645c Mon Sep 17 00:00:00 2001 From: Rob Snow Date: Tue, 17 Nov 2026 17:49:46 +1100 Subject: [PATCH] chore: improve agent submissions --- .github/ISSUE_TEMPLATE/Bug_Report.yml | 3 +++ .github/PULL_REQUEST_TEMPLATE.md | 14 ++++++++++---- AGENTS.md | 17 +++++++++++++++-- CONTRIBUTING.md | 22 ++++++++++++++++++---- perf/README.md | 10 ++++++++++ 5 files changed, 56 insertions(+), 10 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/Bug_Report.yml b/.github/ISSUE_TEMPLATE/Bug_Report.yml index 33999ee6341..a3468e41565 100644 --- a/.github/ISSUE_TEMPLATE/Bug_Report.yml +++ b/.github/ISSUE_TEMPLATE/Bug_Report.yml @@ -11,6 +11,9 @@ body: id: general-summary attributes: label: Provide a general summary of the issue here + description: | + Include a simple, real-life example of how the issue occurs, such as what someone is trying to do in your app when they run into it. + If you found the issue by reading code or running tests, explain how it could happen in a real app. validations: required: true - type: textarea diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 1c49ac6d1cf..b2c68f96dbc 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,10 +1,13 @@ - + Closes ## Summary +Explain any inapplicable coverage and note what remains untested. + --> ## Release impact @@ -29,7 +35,7 @@ Explain any inapplicable coverage and note what remains untested. --> ## โœ… PR Checklist - [ ] I followed the [contributing guide](https://github.com/adobe/react-spectrum/blob/main/CONTRIBUTING.md). -- [ ] I tested this change locally and included the results in Test Instructions, or explained why testing does not apply. +- [ ] I tested this change locally and filled out Test Instructions, or explained why they don't apply. - [ ] I understand and can explain every change in this PR. If I used AI assistance, I followed the [AI contribution guidance](https://github.com/adobe/react-spectrum/blob/main/CONTRIBUTING.md#ai-assisted-contributions). ## ๐Ÿงข Your Project diff --git a/AGENTS.md b/AGENTS.md index 43f8c6ae4b3..4027818266d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -43,6 +43,19 @@ Run only one of the Parcel 3 Storybooks at a time: both public Storybook servers - **Match the surrounding code** โ€” follow the naming, structure, and patterns of neighboring files. - **Before committing** โ€” run `yarn format ` to format the files you changed, and include the formatting fixes in your commit. Then run `yarn format:check` to verify formatting. CI runs this check as part of `yarn lint`. - **Commit format** โ€” use conventional-commit prefixes (`fix:`, `feat:`, `chore:`, `docs:`) as seen in the git history. +- **Performance fixes** โ€” prove the improvement with the [benchmark harness](perf/README.md) and include the confirmed results in the PR. See [Performance changes](CONTRIBUTING.md#performance-changes). + +## Keep a human in the loop + +The person you're working with must be part of the entire process, not just reviewing the end result. Agree on the problem and approach with them before implementing, and have them review your changes and anything you write before it's pushed or posted. Don't open issues or PRs, push commits, or reply to reviewers on your own. See [AI-assisted contributions](CONTRIBUTING.md#ai-assisted-contributions). + +## Writing on GitHub + +Keep everything you write on GitHub (issues, PR descriptions, comments, and review replies) concise and realistic: + +- **Lead with the point.** Skip filler: greetings, thanks, "happy to help", restating the diff or the reviewer, narrating your process, bumps asking for review, and closing summaries. +- **Only claim what you verified.** Don't inflate impact or certainty, and say what you didn't test. +- **Describe bugs with a simple, real-life example** of what someone does in an app and what goes wrong, not just the faulty code path or a contrived input. ## Filing GitHub issues @@ -51,7 +64,7 @@ This repository uses GitHub issue **forms** defined in [`.github/ISSUE_TEMPLATE/ - **Search first.** Check existing open and closed issues to avoid duplicates. - **Prefer the web flow** so the correct form is applied: - **If filing via the `gh` CLI, replicate the template's fields in the body.** `gh issue create --template` does *not* render these YAML issue forms, so passing `--template` alone will not produce a valid issue. Instead, fill in the chosen template's fields manually. For a bug report (`Bug_Report.yml`), include: - - a general summary + - a general summary, including a simple, real-life example of how the issue occurs - Expected Behavior - Current Behavior - Possible Solution (optional) @@ -71,4 +84,4 @@ Read the relevant file before starting that kind of work (other agents: read the - Styling S2 components โ†’ [`docs/contributing/s2-styling.md`](docs/contributing/s2-styling.md) - Adding user-facing strings โ†’ [`docs/contributing/i18n-strings.md`](docs/contributing/i18n-strings.md) - Touching generated code (icons) โ†’ [`docs/contributing/codegen.md`](docs/contributing/codegen.md) -- Comments and opening a PR โ†’ [`docs/contributing/pull-requests.md`](docs/contributing/pull-requests.md) +- Code comments and opening a PR โ†’ [`docs/contributing/pull-requests.md`](docs/contributing/pull-requests.md) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3fc4026f89f..b199b23da37 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,9 +12,9 @@ We adhere to the Adobe [code of conduct](https://github.com/adobe/react-spectrum ### Bugs We use [GitHub issues](https://github.com/adobe/react-spectrum/issues) to track work and log bugs. Please check existing issues before filing anything new. We do our best to respond to issues within a few days. If you would like to contribute a fix, please let us know by leaving a comment on the issue. -The best way to reduce back and forth on a bug is provide a small code example exhibiting the issue along with steps to reproduce it. If you would like to work on a bugfix yourself, make sure an issue exists first. +The best way to reduce back and forth on a bug is to provide a simple, real-life example of how it occurs, a small code example exhibiting the issue, and steps to reproduce it. If you would like to work on a bugfix yourself, make sure an issue exists first. -Please follow the issue templates when filing new ones and add as much information as possible. +Please follow the issue templates when filing new ones and fill in the information they ask for. ### Feature requests Our components can always be improved upon. If you have a feature request, you can use our Feature Request issue template. For larger scopes of work, it is a good idea to open a Request For Comments (RFC) first to gather feedback from the team. Please follow our RFC [template](https://github.com/adobe/react-spectrum/blob/main/rfcs/template.md). Make a PR to add your RFC to the [rfcs folder](https://github.com/adobe/react-spectrum/tree/main/rfcs) to give the team and the community a chance to discuss the proposal. @@ -31,6 +31,7 @@ A few things to keep in mind before submitting a pull request: - Reference the issue in the description - Make sure linting and tests pass - Include relevant unit tests +- For performance changes, include benchmark results. See [performance changes](#performance-changes) - Add/update stories in storybook for your changes - Update documentation - Remember that all submissions require review, please be patient. @@ -54,6 +55,7 @@ If there is no issue, include the information requested by the relevant[bug repo For bug fixes, include: +- A simple, real-life example of how the issue occurs, such as what someone is trying to do in your app when they run into it. If you found the issue by reading code or running tests, explain how it could happen in a real app. - What happens and what you expected to happen. - What you are trying to accomplish and how the bug affects you. - Reproduction steps and a minimal example we can use to verify the problem. @@ -65,6 +67,10 @@ Documentation and routine maintenance changes should explain their purpose; they Search existing issues and PRs before opening either, and link related work when you find it. A PR can also be the starting point for a design discussion; opening it does not mean the proposed scope or approach has been approved. +### Performance changes + +If a PR is meant to improve performance, show that it does with data from the [benchmark harness](perf/README.md). Compare your change against its base branch in scenarios that exercise the code you changed, confirm the result, and include it in the PR as described in [Share the result](perf/README.md#4-share-the-result). If no scenario covers your change, [add one](perf/README.md#add-a-scenario). Don't claim an improvement the harness hasn't confirmed. + ## AI-assisted contributions Setting expectations: the AI doesn't contribute to React Spectrum, you do. The AI is a tool, but you are still the author, and you own every line, every decision, and every explanation. @@ -93,9 +99,17 @@ Even if you haven't tested all of these, it's hugely helpful to us to know where One of the biggest issues we face with the rise of AI contributions is the wrong root cause but with a lot of details asserting why it is, in fact, the issue. Press the AI, and ask both it and yourself "is this the root cause, or a symptom?" and "what else could cause this?" before committing to a solution. -### Keep a human in the loop of the conversation +### Keep a human in the loop + +A human must be part of the entire process, from the first issue or comment through the final review, not just when new commits are pushed. That means you: + +- Agree on the problem and approach before implementing. +- Review and understand every change before opening the PR or pushing new commits. +- Write or review every issue, PR description, and comment before it's posted. + +Don't let an agent open an issue or PR, or respond to reviewers, on its own. -When you iterate between reviews, be sure you can say what changed and why, one sentence is enough. A PR that transforms completely between every review without explanation is exhausting to follow and makes us feel like we're arguing with a machine instead of collaborating with a person. +When you iterate between reviews, be sure you can say what changed and why; one sentence is enough. A PR that transforms completely between every review without explanation is exhausting to follow and makes us feel like we're arguing with a machine instead of collaborating with a person. #### Requirements of front end code diff --git a/perf/README.md b/perf/README.md index 2ffe1f59e21..34c72119e04 100644 --- a/perf/README.md +++ b/perf/README.md @@ -86,6 +86,16 @@ The confirmation `summary.md` places each repeat beside the original: Judge the size of the change from the confirmation runs: selecting an initial run because it showed an effect can overstate that effect. +### 4. Share the result + +A PR that claims a performance improvement must show it with results from this suite. Include: + +- The commands you ran, with any `--scenario`, `--scale`, or `--cpu` options. +- The result table from `report.md`, plus the lines at the top of the report that record the browser, CPU, settings, and builds. +- The table from the confirmation `summary.md`. Describe the size of the change using the confirmation runs. + +Report results as measured, including any regressions. If a scenario your change targets is inconclusive, within the practical threshold, or not confirmed, say so rather than claiming an improvement. `smoke` compares a build with itself and `run` measures a single build, so neither can show an improvement. + ## Choose a workload A filter accepts an exact scenario ID or a whole fixture, separated by commas. For example, `--scenario table.scroll,collection` runs one table action and all collection-mutation actions.