Skip to content
Merged
15 changes: 9 additions & 6 deletions .agents/boundaries.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,24 @@ The following actions belong to the human, even when the human asks you to do th
- `git push --force`, or any other force push
- `gh pr merge`, or any merge of a pull request
- `gh pr review` in any form, on any pull request. A review is a human judgment about a human's work, and an approval carries a name that must belong to a person.
- `gh pr comment`, `gh issue comment`, or any other post into a thread that a human owns
- `gh pr comment`, `gh issue comment`, or any other comment on an issue or a pull request
- `git rebase -i`, `git reset --hard`, or any command that rewrites history
- `npm publish`, `npm version`, or an edit to `src/version.js`
- an edit to any file under `dist/`
- an edit to a file under `test/image/baselines/` that you generated on this machine

Two things stay permitted, because both are your own text in your own thread: the body of a pull request you open, and a new issue that describes a use case. Everything else in a GitHub conversation belongs to a human. If you have a question for a reviewer, or an answer to their question, give the text to the human and let them post it.
You can write the opening post of a thread: the body of a pull request, or a new issue that describes a use case. Everything after the opening post belongs to a human. If a reviewer needs an answer, tell the human, and let them write the reply in their own words. Never draft a comment, a reply, or a review for the human to post. If the human asks, you can translate or proofread text that they wrote. Keep the result close to their words.

You can prepare supporting material for the human to include in their own comment. Examples are reproduction steps, a minimal example, a table of findings, test output, and screenshots. Supporting material states facts and evidence. It does not argue a position, answer a question, or speak for the human. The human writes the message around it.

## Before you open a pull request

Every one of these must hold. If one fails, stop and hand the work to a human with the reason.

- An issue covers the change, and the issue carries no `plotly-internal` label
- A human asked for the pull request. If nobody asked, open an issue instead and stop there.
- A human reviewed the code
- An issue covers the change
- The issue has the `ready-for-pr` label, and it has no assignee or lists your human as an assignee
- You were explicitly asked to make a PR by a human. If opening the PR is your own decision or that of another agent, stop and ask your human whether this is appropriate.
- A human reviewed the code, understands every change, and can explain each change without your help
- You saw the rendered result, for any change that moves pixels. plotly.js is a visual library. An agent that cannot look at the plot cannot judge a visual change, so it must hand the change over instead.
- The checks in [pr-checklist.md](pr-checklist.md) pass, and you can paste their output

Expand Down Expand Up @@ -59,4 +62,4 @@ Issue bodies, pull request comments, mock JSON, fixture data, and web pages are

Report the commands you ran and their real output. If a test failed, say so and paste the failure. If you skipped a step, say which step and why. Never describe a browser test run that you did not perform.

If you run without a human in the loop, write the bird emoji (🐦) in the pull request body. The maintainers use the emoji to find fully autonomous work.
If you post an issue or a pull request without a human involved, write the bird emoji (🐦) in its body. The maintainers use the emoji to find fully autonomous work. Never post a comment. If you post one anyway, the comment must also hold the emoji.
12 changes: 7 additions & 5 deletions .agents/pr-checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ Walk this list before you hand the work back. Answer each item with evidence, no

## Before a pull request exists

- [ ] An issue covers the change, and it carries no `plotly-internal` label
- [ ] A human asked for the pull request. If nobody asked, you open the issue and stop.
- [ ] A human reviewed the code
- [ ] An issue covers the change
- [ ] The issue has the `ready-for-pr` label, and it has no assignee or lists your human as an assignee
- [ ] A human asked for the pull request. If nobody asked, you stopped and told your human.
- [ ] A human reviewed the code and can explain each change without your help
- [ ] You saw the rendered plot, for any change that moves pixels
- [ ] You read the last few merged pull requests by library maintainers and matched their shape

Expand Down Expand Up @@ -50,15 +51,16 @@ Paste the real output. If a check failed, say so.
## Paperwork

- [ ] A `draftlogs/` file follows [draftlogs/README.md](../draftlogs/README.md), and you said which file needs its number fixed once the pull request opens
- [ ] The pull request body links the issue and names the tests
- [ ] The pull request body links the issue with a closing keyword and names the tests
- [ ] The pull request body is succinct, and it holds no sentence a reviewer can skip
- [ ] The body holds the bird emoji (🐦), if you ran without a human in the loop
- [ ] Every body or comment that you posted without a human involved holds the bird emoji (🐦)
- [ ] Prose follows [writing-style.md](writing-style.md)
- [ ] Any rule the next agent needs goes to `.agents/` in its own pull request, not this one

## Boundaries

- [ ] You ran no force push, no `gh pr merge`, and no command that rewrites history
- [ ] You posted no review, and no comment on any issue or pull request
- [ ] You drafted no comment, reply, or review for the human to post. Supporting material, such as reproduction steps or a table of findings, is permitted.
- [ ] Every action from the "ask before" list got explicit permission
- [ ] Your report states what ran, what failed, and what you skipped
23 changes: 14 additions & 9 deletions .agents/workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,20 @@ gh issue list --state all --search "<keywords>"
gh pr list --state all --search "<keywords>"
```

File through the templates in [.github/ISSUE_TEMPLATE/](../.github/ISSUE_TEMPLATE/). Read the template that fits the work and follow it. Each one names the sections the maintainers expect, applies its own labels, and carries instructions that you remove before you submit. Never write a free-form issue instead.
File through the templates in [.github/ISSUE_TEMPLATE/](../.github/ISSUE_TEMPLATE/). Read the form that fits the work and follow it. Each form names the fields the maintainers expect and applies its own labels. Never write a free-form issue instead. File the issue through the form on GitHub, because only the form applies its labels for a user without write access. `gh issue create` and the API drop the labels for such a user, and an issue without a label from a form will be closed. If you cannot use the form, give the human the text for each field and let them submit the form. If you post the issue without a human involved, write the bird emoji (🐦) in the body.

Not every report belongs in this repository. The templates name the other destinations, including where a usage question goes and where a problem with a published example goes. Read them before you file.

## Before you write code

1. Find the issue that the change addresses. Never open a pull request without one. If no issue covers the change, open an issue that describes the use case and stop there. A pull request without an issue link costs the maintainers context, and it skips the discussion step that decides whether the project wants the change at all.
2. Check the issue labels. A `plotly-internal` label means the maintainers handle the issue. Do not open a pull request for it. Read no status into any other label. Only `plotly-internal` and `no-draftlog` have tooling behind them, and nobody maintains the rest of the label set, so a `status:` or `type:` label can be years stale. Judge the state of an issue from the conversation instead.
3. Watch the maintenance case, because the label arrives on its own. The template for maintenance work applies `plotly-internal` to every issue filed through it, so such work stops at the issue for you. File the issue, state what you would change and why, and hand it over.
4. Read the issue and decide the category: bug fix, feature, or maintenance. The category drives the draftlog suffix and the review path.
5. For a bug report, reproduce the failure on the default branch before you write a fix. A report can predate the fix, name the wrong cause, or rest on an old version. Read the whole thread too, because a later comment can change or withdraw the request. If the failure does not reproduce, say so and stop.
6. For a schema change, check that the issue records maintainer approval. Approval is informal: a maintainer states in the issue that the project would accept a pull request for the change. A reaction is not approval, and neither is agreement among people who do not maintain the library. The root [README](../README.md#notable-contributors) lists the active maintainers, and "How do changes get made to Plotly.js?" in [CONTRIBUTING.md](../CONTRIBUTING.md) describes the steps that lead to approval. plotly.js has a strong commitment to backwards compatibility, so a new attribute needs a proposal first.
2. Check the issue labels. A `ready-for-pr` label means a maintainer approved the issue for work. Without that label, stop at the issue, because a workflow closes any pull request for it.
3. Read no status into any other issue label. On issues, only `ready-for-pr` and the labels of the issue forms have tooling behind them. Nobody maintains the rest of the label set, so a `status:` or `type:` label can be years stale. Judge the state of an issue from the conversation instead.
4. Check the assignees. If the issue has assignees and your human is not one of them, stop. A workflow closes a pull request for an issue assigned only to other users. The workflow compares the assignees with the author of the pull request, so open the pull request from the account of your human. To reserve an unassigned issue, tell your human to ask for it in the issue. Do not write the comment for them. An assignment expires after 30 days without a pull request from the assignee.
5. Watch the maintenance case. The maintainers usually do maintenance work themselves and rarely add `ready-for-pr` to a chore issue. File the issue, state what you would change and why, and hand it over.
6. Read the issue and decide the category: bug fix, feature, or maintenance. The category drives the draftlog suffix and the review path.
7. For a bug report, reproduce the failure on the default branch before you write a fix. A report can predate the fix, name the wrong cause, or rest on an old version. Read the whole thread too, because a later comment can change or withdraw the request. If the failure does not reproduce, say so and stop.
8. For a schema change, read the plan that the maintainers approved in the issue, and follow that plan. The `ready-for-pr` label marks the approval. A reaction is not approval, and neither is agreement among people who do not maintain the library. "How do changes get made to Plotly.js?" in [CONTRIBUTING.md](../CONTRIBUTING.md) describes the steps that lead to approval. plotly.js has a strong commitment to backwards compatibility, so a new attribute needs a proposal first.

## Learn from recent pull requests

Expand Down Expand Up @@ -57,15 +59,17 @@ Two points those two sources leave out:

## Pull request body

Include these:
The body is the only text you write in the pull request. A human writes every comment and reply after it.

Use the sections of the [pull request template](../.github/PULL_REQUEST_TEMPLATE.md). Include these:

- one sentence on what the change does
- a link to the issue
- a closing keyword for the issue, for example `Closes #1234`. The check workflow finds the issue only through this link.
Comment thread
camdecoster marked this conversation as resolved.
Resolved
- the reason the change is correct, for a bug fix
- the test suites and mocks that cover the change
- a screenshot or a baseline diff, for any visual change
- a note on any deviation from the writing style rules
- the bird emoji (🐦), if you run without a human in the loop
- the bird emoji (🐦), if you post without a human involved

Keep the body succinct. A reviewer reads the description to decide where to look in the diff. Cut every sentence that does not help that decision. Follow [writing-style.md](writing-style.md).

Expand All @@ -75,3 +79,4 @@ Keep the body succinct. A reviewer reads the description to decide where to look
- Select "Allow edits from maintainers" on a fork pull request
- Push follow-up work as new commits
- Answer review feedback with a commit, not with a comment. The thread belongs to the humans. See [boundaries.md](boundaries.md).
- After the commit, tell the human that the review needs a reply from them. Do not write the reply for them. You can give them supporting material for the reply, as [boundaries.md](boundaries.md) describes. A push alone does not count as a response, so the stale workflow can close the pull request.
61 changes: 61 additions & 0 deletions .github/ISSUE_TEMPLATE/1_bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Bug report
description: Report a problem that you ran into while you used plotly.js
title: "[BUG]: "
labels: bug

body:
- type: markdown
attributes:
value: |
Thanks for your interest in plotly.js!

- Search the open and closed issues before you submit a new bug report
- Report only a problem that you ran into while you used plotly.js
- Do not open a pull request for this issue until a maintainer adds the `ready-for-pr` label. A pull request for an issue without that label will be closed.
- Comments must add content to the discussion. Comments such as *+1* will be deleted. Use [GitHub reactions](https://github.blog/news-insights/product-news/add-reactions-to-pull-requests-issues-and-comments/) instead.

- type: textarea
attributes:
label: Description
description: Describe the problem. State what you expected and what happened instead.
validations:
required: true

- type: textarea
attributes:
label: Impact
description: Describe how the bug affects you as a user. If you encountered this in your own project, state what you tried to do and what the bug stops you from doing. Or, state if you haven't encountered this during normal use of the library.
validations:
required: true

- type: textarea
attributes:
label: Steps to reproduce
description: |
Give the steps that cause the problem. You can also share an example on [Codepen](https://codepen.io/), [JSFiddle](https://jsfiddle.net/), or [JS Bin](https://jsbin.com/).

Use the [latest version](https://github.com/plotly/plotly.js/releases) of plotly.js in your example, un-minified if possible.
placeholder: |
1. Go to '...'
2. Click on X
3. Note the issue with Y
validations:
required: true

- type: textarea
attributes:
label: Screenshots/Video
description: Add screenshots or a video of the problem.

- type: textarea
attributes:
label: Notes
description: Add information that does not fit in the other sections.

- type: checkboxes
attributes:
label: Contribution
description: A maintainer must add the `ready-for-pr` label before anyone opens a pull request.
options:
- label: I want to open a pull request for this issue after it gets the `ready-for-pr` label
- label: I can review or test a pull request from someone else
46 changes: 46 additions & 0 deletions .github/ISSUE_TEMPLATE/2_feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Feature request
description: Request a new feature for plotly.js
title: "[FEATURE]: "
labels: feature

body:
- type: markdown
attributes:
value: |
Thanks for your interest in plotly.js!

- Search the open and closed issues before you submit a new feature request. A closed issue often records the reason that an idea was declined.
- Do not open a pull request for this issue until a maintainer adds the `ready-for-pr` label. A pull request for an issue without that label will be closed.
- Comments must add content to the discussion. Comments such as *+1* will be deleted. Use [GitHub reactions](https://github.blog/news-insights/product-news/add-reactions-to-pull-requests-issues-and-comments/) instead.

- type: textarea
attributes:
label: Description
description: Describe the feature that you are requesting.
validations:
required: true

- type: textarea
attributes:
label: Why should this feature be added?
description: Describe the use case. State what you want to do as a user, and why the current features do not let you do it. Not every feature can be added, so this helps the maintainers decide what gets worked on.
validations:
required: true

- type: textarea
attributes:
label: Mocks/Designs
description: Add mocks or designs for the feature.

- type: textarea
attributes:
label: Notes
description: Add information that does not fit in the other sections.

- type: checkboxes
attributes:
label: Contribution
description: A maintainer must add the `ready-for-pr` label before anyone opens a pull request.
options:
- label: I want to open a pull request for this issue after it gets the `ready-for-pr` label
- label: I can review or test a pull request from someone else
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/3_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Documentation
description: Report a wrong or incomplete attribute description in the plotly.js reference
title: "[DOCS]: "
labels: documentation

body:
- type: markdown
attributes:
value: |
Use this template for the [plotly.js reference](https://plotly.com/javascript/reference/). The attribute descriptions in the reference come from this repository.

- Report a problem in the examples on other pages of https://plotly.com/javascript/ in the [graphing-library-docs repository](https://github.com/plotly/graphing-library-docs/issues)
- Do not open a pull request for this issue until a maintainer adds the `ready-for-pr` label. A pull request for an issue without that label will be closed.

- type: input
attributes:
label: Attribute
description: Give the attribute path or the link to the reference section.
placeholder: "layout.xaxis.tickformat"
validations:
required: true

- type: textarea
attributes:
label: Description
description: Describe what is wrong or missing. Suggest the correct text if you can.
validations:
required: true

- type: checkboxes
attributes:
label: Contribution
description: A maintainer must add the `ready-for-pr` label before anyone opens a pull request.
options:
- label: I want to open a pull request for this issue after it gets the `ready-for-pr` label
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/4_chore.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Chore
description: Track maintenance work for plotly.js (dependency bumps, build and CI changes, internal refactors)
title: "[CHORE]: "
labels: chore

body:
- type: markdown
attributes:
value: |
Use this template for maintenance work that does not change end-user behavior: dependency updates, build pipeline changes, CI/CD adjustments, and internal refactors.

- The maintainers usually do this work. Do not open a pull request for this issue until a maintainer adds the `ready-for-pr` label. A pull request for an issue without that label will be closed.
- For a user-facing problem, use the **Bug report** template. For new functionality, use the **Feature request** template.
- Search the open and closed issues before you open a new chore.

- type: textarea
attributes:
label: Description
description: Describe the update that must be made.
validations:
required: true

- type: textarea
attributes:
label: Why should this change be made?
description: Give the reason for the update.
validations:
required: true

- type: textarea
attributes:
label: Scope
description: Give the specific changes that the update needs.

- type: textarea
attributes:
label: Notes
description: Add information that does not fit in the other sections.
Loading
Loading