Collaboration is a key part of real-world software engineering. Graphite follows clear PR conventions to keep code review efficient, maintain a clean project history, and respect the time of maintainers and contributors alike. Familiarizing yourself with these guidelines before opening your first PR will save everyone significant time and confusion.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/GraphiteEditor/Graphite/llms.txt
Use this file to discover all available pages before exploring further.
Before Opening a PR
This guide assumes you understand the fundamentals of Git: commits, branches, and working with multiple remotes. If you are new to Git, you will need to learn those topics independently before contributing. A good starting point is the Graphite intro webcast, which also recommends the Git Graph VS Code extension for visualizing your branch history. If you are using any AI tools in your development workflow, read the AI contribution policy before submitting your PR.Branch Naming
Create a new branch before making your first commit. Keep branch names short but sufficiently descriptive, using kebab-case (hyphens between words).- ✅
fix-path-tool-selection-history - ✅
add-blur-node - ❌
feature/add-blur-node— do not usefeature/,fix/, or similar prefixes - ❌
my-changes— too vague to be useful
Opening a Pull Request
Open a PR on GitHub
Navigate to the Graphite repository on GitHub. You will see a prompt to open a PR for your recently pushed branch.
Mark it as a Draft
Unless your PR is immediately ready for review, open it as a Draft. Use the dropdown arrow next to “Create pull request” and select “Create draft pull request”. If you already opened a regular PR, use the “Convert to draft” option in the sidebar.Mark the PR as ready for review — and ping a maintainer — only when your code fully implements the required functionality and you have tested it thoroughly.
Write a descriptive title
Your PR title becomes the commit message in the project’s Git history. Use sentence case and imperative mood:
- ✅
Fix path tool selection history - ✅
Add Gaussian blur node - ❌
fixed the path tool— past tense - ❌
Path tool fix— not imperative
Reference issues in the description
If you are working on a task from the For tracking issues that should not be auto-closed, use
#✅code-todo-list Discord channel, right-click the exact message, select “Copy Message Link”, and paste that link into your PR description.If you are working on a GitHub issue, include a reference in the PR description using one of GitHub’s closing keywords:Part of #123 instead. After the PR merges, update this to Closes #123 so the tracking issue links to the merged PR.If there is no associated issue, remove the pre-filled “Closes #” text from the description entirely.PR Drafts
Always open new PRs as drafts first. The draft state signals that work is still in progress and no review is expected yet. Convert to “Ready for review” only when the implementation is complete and tested.- Draft PR → work is in progress; the ball is in your court
- Ready for review → implementation is complete; awaiting maintainer feedback
Commit Message Conventions
Individual commit messages within your branch should follow the same conventions as the PR title: sentence case and imperative mood. These messages appear in the project Git history after squash-merge, so they should be concise but meaningful.- ✅
Fix incorrect color conversion in blend node - ✅
Refactor layer ordering logic - ❌
wip - ❌
fixed stuff
Code Review Etiquette
Before requesting review, it is your responsibility to:- Build and test your changes thoroughly — do not request review for code that obviously fails or breaks surrounding functionality
- Do a self-review — read over the full diff in GitHub’s “Files changed” tab and catch your own mistakes before a maintainer has to
- Remove debug artifacts — no leftover debugging code, commented-out lines, or unintended whitespace changes
- Understand the feature — if you don’t understand why your change matters to a Graphite user, spend time using the editor and asking questions in Discord
Submitting a PR that obviously fails to implement the task or breaks existing functionality in an apparent way may be interpreted as low-effort or AI-generated spam, which can result in a ban under the AI contribution policy.
Passing CI
After pushing to your PR branch, CI will build and test your code automatically. PRs from forks require a maintainer to approve the CI run first. Your goal is for the “Editor: Dev & CI / build (pull_request)” check to show a ✅. If it fails, investigate the logs — ask a maintainer to share them if you don’t have access. Before pushing, run these locally to catch failures early:Keeping Your Branch Up to Date
Always start your work from the latestmaster commit. As master advances, your branch will need to be synced before it can be merged.
When there are no conflicts, use GitHub’s “Update branch” button (or prefer “Update with rebase” from the dropdown) to keep the history linear.
master into your branch every day while waiting for review — it is unnecessary and can interfere with the reviewer’s workflow. Only sync when there are conflicts that must be resolved.
After Merging
Once your PR is merged:- Comment on the referenced issue — leave any comment (e.g., “I opened PR #456”) so the maintainers can assign the issue to you. GitHub only allows assignments to users who have commented on an issue, and assignments are made at merge time to keep closed issues cleanly organized.
- Update tracking issue links — change any
Part of #123references in your PR description toCloses #123. - Claim your role — post in
#📄developmenton Discord to be assigned the “Code Contributor” role after your first merged PR.