Skip to content

docs: [No QA] Document MelvinBot workflow for contributors and C+#93066

Merged
neil-marcellini merged 12 commits into
mainfrom
melvinbot-contributor-docs
Jun 12, 2026
Merged

docs: [No QA] Document MelvinBot workflow for contributors and C+#93066
neil-marcellini merged 12 commits into
mainfrom
melvinbot-contributor-docs

Conversation

@neil-marcellini

@neil-marcellini neil-marcellini commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Explanation of Change

(Neil's AI agent)

Adds contributingGuides/HOW_TO_WORK_WITH_MELVINBOT.md documenting how contributors, C+, and CMEs work with MelvinBot on App issues: proposal review before implementation, C+ PR ownership after Melvin implements, and CME review/merge. Links the guide prominently from CONTRIBUTING.md and HOW_TO_BECOME_A_CONTRIBUTOR_PLUS.md.

Fixed Issues

$ #93064
PROPOSAL:

Tests

N/A

  • Verify that no errors appear in the JS console

Offline tests

N/A — documentation only

QA Steps

N/A — documentation only

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

N/A

Android: Native

N/A — documentation only

Android: mWeb Chrome

N/A — documentation only

iOS: Native

N/A — documentation only

iOS: mWeb Safari

N/A — documentation only

MacOS: Chrome / Safari

N/A — documentation only

Adds a dedicated guide for proposal review, C+ PR ownership, and CME merge
on MelvinBot issues, and links it prominently from CONTRIBUTING.md.

Co-authored-by: Cursor <cursoragent@cursor.com>
@neil-marcellini neil-marcellini requested a review from a team as a code owner June 9, 2026 13:02
@melvin-bot melvin-bot Bot requested review from ShridharGoel and removed request for a team June 9, 2026 13:02
@melvin-bot

melvin-bot Bot commented Jun 9, 2026

Copy link
Copy Markdown

@ShridharGoel Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

Comment thread contributingGuides/HOW_TO_WORK_WITH_MELVINBOT.md Outdated
neil-marcellini and others added 6 commits June 9, 2026 09:09
Co-authored-by: Cursor <cursoragent@cursor.com>
Fixes spellcheck failure on the Melv acronym in CONTRIBUTING.md.

Co-authored-by: Cursor <cursoragent@cursor.com>
C+ who cannot edit Melvin-authored PR descriptions should post the full
body or checklist in a details block and ask Melvin to apply it; CMEs
may review that comment directly.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Reorder Phase 1 so C+ recommends via 🎀👀🎀, CME approves, then C+ asks
Melvin to implement—not immediately after C+ review.

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread contributingGuides/CONTRIBUTING.md Outdated
Comment thread contributingGuides/HOW_TO_WORK_WITH_MELVINBOT.md
Comment thread contributingGuides/HOW_TO_WORK_WITH_MELVINBOT.md Outdated
Comment thread contributingGuides/HOW_TO_WORK_WITH_MELVINBOT.md Outdated
Comment thread contributingGuides/HOW_TO_WORK_WITH_MELVINBOT.md Outdated
C+ members who cannot edit the PR body directly should use this workaround:

1. On the **pull request**, post a comment with the exact content you want in the PR description. Put the full body inside a `<details>` block so the PR thread stays readable. Include the complete [PR template](https://github.com/Expensify/App/blob/main/.github/PULL_REQUEST_TEMPLATE.md) when possible: Explanation of Change, Fixed Issues, Tests, Offline tests, QA Steps, a fully checked PR Author Checklist, and Screenshots/Videos sections as needed.
2. In the same comment, ask Melvin to copy that content into the pull request body, for example:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No we don't want contributors to workaround Melvin's permissions like this. Leaving the comment is fine

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I disagree that this is working around Melvin's permissions. Melvin has the ability to update its own PRs of course. In this process the C+ is the human author working with Melvin to write a PR. It would be great if we could give them the ability to edit the description directly, but since they aren't technically the author they don't have write access. If they had used AI in Cursor or Claude Code they could manually edit the PR description since they would have write access in that case; so this should work the same.

As a reviewer, I also think it's easier if the PR description is properly filled out, vs having to dig for a specific comment. Is that ok with you or is there some specific vulnerability here I'm missing? If there is, we should fix it at the MelvinBot permission level, since a C+ can already ask Melvin to do this today.

@Julesssss Julesssss Jun 11, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah we need a better long-term permissions fix. I do agree with the easy of the main checklist, that's the ideal solution.

But the problem is that we are not fully confident with Melvin's permissions being properly locked down, and haven't had any time to improve how it works yet. We needed to crack down on external contributors pushing the boundaries of Melvin with smart prompting, this being one case. @mallenexpensify may recall more details.

Comment thread contributingGuides/HOW_TO_WORK_WITH_MELVINBOT.md Outdated
Comment thread contributingGuides/CONTRIBUTING.md Outdated
neil-marcellini and others added 5 commits June 10, 2026 07:23
Clarify MelvinBot Help Wanted exception, first-come-first-serve proposal
order, proposal link when asking Melvin to implement, @MelvinBot tagging
for PR tweaks, and Reviewer-only screenshots/videos.

Co-authored-by: Cursor <cursoragent@cursor.com>
@neil-marcellini

Copy link
Copy Markdown
Contributor Author

Thanks for your reviews @Julesssss @ShridharGoel. Updated and ready for another review.

@Julesssss Julesssss left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about this still. We've told contributors to not ask Melvin to do things they don't have permission to do themselves. This would be an exception so if you merge please share an update and tag the team to let them know.

@neil-marcellini neil-marcellini merged commit 23e38e8 into main Jun 12, 2026
17 of 20 checks passed
@neil-marcellini neil-marcellini deleted the melvinbot-contributor-docs branch June 12, 2026 00:05
@github-actions

Copy link
Copy Markdown
Contributor

🚧 @neil-marcellini has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/neil-marcellini in version: 9.4.7-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Bundle Size Analysis (Sentry):

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/puneetlath in version: 9.4.7-4 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

|------|----------------------------------|
| **MelvinBot** | Posts the first proposal on the issue. Implements the accepted solution when asked. Opens a draft PR with MelvinBot as the GitHub author. |
| **Contributor** | May submit their own proposal if they have a meaningfully different approach. Must not open a PR until a proposal is accepted and they are hired on the job. |
| **Contributor+ (C+)** | Reviews proposals (Melvin's and any contributor proposals) using the same standards as any other job. Recommends acceptance to the CME. After the CME approves, asks Melvin to implement, then owns the PR as the human author before sending it for final review. |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

asks Melvin to implement

This is only if Melv's proposal is accepted. I think it should be

asks the assigned contributor to create a PR or Melvin to implement

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MelvinBot create a new PR with this change

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this PR is already merged, I opened a follow-up draft PR with mallenexpensify's suggested change: #93735

The C+ row now reads "asks the assigned contributor to create a PR or Melvin to implement". Please mark it "Ready for review" when it looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants