platform/jewel/docs/jewel-contribution-guide.md
This document describes how to contribute to the IntelliJ Jewel project — a subproject of the IntelliJ Community repository. Jewel is developed both publicly on GitHub and internally within JetBrains’ monorepo. This guide focuses on how contributions flow between these two environments, how the Merge Robot and Patronus CI work, and what contributors (both external and internal) should expect.
Jewel sources live inside the internal IntelliJ monorepo and are mirrored publicly as part of the intellij-community repository.
When a change is proposed publicly, it must go through:
The process ensures that all Jewel changes are reviewed both externally and internally, integrated safely into the full IntelliJ codebase, and synchronized transparently back to GitHub.
Only the following paths are considered Jewel-related and follow this special contribution flow:
community/platform/jewel
community/libraries/skiko
community/libraries/compose-runtime-desktop
community/libraries/compose-foundation-desktop
community/libraries/compose-foundation-desktop-junit
community/libraries/detekt-compose-rules
community/build/src/org/jetbrains/intellij/build/JewelMavenArtifacts.kt
community/build/src/JewelMavenArtifactsBuildTarget.kt
Changes outside these paths are considered unrelated to Jewel and follow standard IntelliJ contribution rules.
Note: auto-generated changes to AllIconsKeys.kt are allowed outside of this process.
Public mirror of the IntelliJ Community repository, where Jewel contributors open pull requests. Link: https://github.com/JetBrains/intellij-community
Commit messages MUST start with [JEWEL-xxx] (where xxx is a YouTrack issue ID), and PRs with user-visible changes in APIs or behaviour MUST contain a release notes section at the end of the PR description, using the necessary parts of this template:
## Release notes
### ⚠️ Important Changes
*
### New features
*
### Bug fixes
*
### Deprecated API
*
It’s a Slack bot and an internal automation service that:
github/pr-<id>/<hash>.Interacting with IJ Community PR Robot:
list - list all MRs that are currently running on Patronus CIapprove <github-pr-id> - mark PR as approved without waiting for Github approvals (Use with caution!)merge <github-pr-id> - trigger Patronus CI job to merge Github PR to masterstatus <github-pr-id> - check status of a Patronus CI job for Github PRrecreate <github-pr-id> - recreate internal github/pr-<id>/<hash> branch — used when the PR branch was modified (e.g., rebased) and the internal branch needs to be updatedclose <github-pr-id> - close Github PRrebase <github-pr-id> - rebase internal github/pr-<id>/<hash> branch with the latest master staterestart <github-pr-id> - restart Patronus CI jobhelp - list all available commandsInternal continuous integration system that validates Jewel changes inside the full IntelliJ monorepo. It ensures that Jewel remains compatible with all IntelliJ platform modules and products.
master branch if CI job succeeds.Synchronizes Jewel commits between internal monorepository and public GitHub community mirror repository, making merged changes publicly available.
This is the official flow for all external contributions to Jewel.
Open a Pull Request on GitHub against the intellij-community repository.
The change must only affect Jewel-related paths listed above.
Receive one external and one internal approval.
Wait for GitHub checks to pass. All Jewel Github Action CI checks must be green before merge can proceed.
Add a Ready to merge comment to the PR once all approvals and checks are complete.
This comment signals the Merge Robot to begin internal validation.
Merge Robot triggers Patronus CI internally in the IntelliJ monorepo. Patronus re-runs a full internal test suite using the same code as the PR.
If Patronus is green: Merge Robot merges the change internally and syncs it back to GitHub. The PR is automatically closed.
If Patronus fails: The PR is not merged automatically. An internal JetBrains developer must fix the issue manually on a dedicated branch:
github/pr-<id>/<hash>
After the fix, the process continues from step 5.
Changes to Jewel code not following the above process, and especially changes made without Patronus and GitHub CI, are strictly forbidden.
| Type | Required Approvals | Merge Trigger | CI Validation | Merge Responsible |
|---|---|---|---|---|
| External PR (GitHub) | 2 Jewel team approvals (1 external + 1 internal) | “Ready for merge” comment | GitHub + Patronus CI | Merge Robot |
| Internal PR (touches Jewel) | 2 Jewel team approvals (1 external + 1 internal) | Internal merge request | Patronus CI | Merge Robot |
| Internal-only change* | Internal approval | Direct merge | Patronus CI | Internal Developer |
* An example of internal-only change is adding / removing modules from the modules.xml file in the monorepo .idea directory.
* Internal Jewel team approval refers to approval provided by a Jewel team developer employed by JetBrains.
* External Jewel team approval refers to approval provided by a Jewel team developer who works outside of JetBrains (currently at Google or Touchlab).
Ready for merge.Ready for merge comment is posted.If Patronus fails, the corresponding internal branch (community/github-pr-<id>) remains open.
The author should first determine whether the failure can be resolved within the publicly available sources.
If the fix can be made publicly, the author proceeds with updating the pull request on GitHub. They then use the recreate command on the Merge Bot to fetch all changes and re-run patronus.
If the issue cannot be addressed in public code (e.g., it depends on internal-only components), a JetBrains developer investigates and applies the fix internally, re-runs Patronus, and completes the merge once the pipeline passes successfully.
When internal developers make changes that affect Jewel-related files, those changes must also undergo external review.
jewel/<jewel-id>jewel/<jewel-id>| Step | Action | System | Result |
|---|---|---|---|
| 1 | Contributor opens PR on GitHub | GitHub | PR created |
| 2 | External + internal reviewers approve | GitHub | Approvals complete |
| 3 | Jewel checks green | GitHub | ✅ Ready for merge |
| 4 | Contributor adds comment “Ready for merge” | GitHub | Merge Robot triggers |
| 5 | Merge Robot runs Patronus CI | Internal | Internal validation |
| 6 | Patronus passes | Internal | Merge + sync |
| 7 | Patronus fails | Internal | Internal dev fixes in community/github-pr-<id> |
This process ensures stable, transparent, and collaborative development of Jewel across both the internal and public ecosystems.