mit einem Klick
create-diff
// Create a YugabyteDB Phorge diff for the current branch's changes. Use when the user wants to publish their changes for review.
// Create a YugabyteDB Phorge diff for the current branch's changes. Use when the user wants to publish their changes for review.
Create a Pull Request for the current branch's changes. Use when the user wants to publish a branch for review as a GitHub PR.
Review YugabyteDB backport diffs by comparing them against their original commits/diffs. Use when the user provides a Phorge backport diff ID (e.g. D51405) and wants to verify the backport is correct, or when reviewing backport revisions.
| name | create-diff |
| description | Create a YugabyteDB Phorge diff for the current branch's changes. Use when the user wants to publish their changes for review. |
Create a Phorge diff for the current branch using arc diff --create.
Treat Phorge as public. Two reasons: (1) Phorge revisions and the Jenkins logs they trigger are visible to anyone with company access, not just the reviewers you @-mention; (2) anything you put into the test code, code comments, fixtures, or golden outputs on this diff lands on the public GitHub repo verbatim when this work is later upstreamed via a PR — there is no separate scrubbing pass at that boundary. So apply the public-repo rules now: diff title, summary, test plan, inline comments, commit messages, code, tests, fixtures, golden output, and filenames all get the same treatment as a public GitHub PR.
Never put any of the following into the diff title, summary, test plan, Phorge comments, commit messages, code comments, test code, test fixtures, golden output, or filenames:
customer-1, acme-corp, or a generic description.192.0.2.0/24 / 198.51.100.0/24 /
203.0.113.0/24 (RFC 5737), IPv6 2001:db8::/32 (RFC 3849),
hostnames example.com / example.org / example.net (RFC 2606),
names Alice/Bob/Carol, phone numbers 555-0100–555-0199.t1, users, id, value) that demonstrates
the same defect.PLAT-20518), internal hostnames, vault paths.
Use placeholders like AKIAIOSFODNN7EXAMPLE in mocks.applies to the test code and test data you write too** — .cc, .py,
.java, .sql, golden .out files, YAML fixtures, mock responses.
If a customer's reproducer uses acme_orders with a customer_email
column populated with real addresses, rewrite it as t1/email with
user@example.com before the test goes anywhere near a diff.
When the source is a customer report: read the original from the
internal source (JIRA / support ticket / Slack) — don't paste or link
it. Reproduce locally with synthetic inputs. Land only the synthetic
reproducer. Reference the issue by internal ticket ID (PLAT-20518)
only.
If you're unsure whether a string is sensitive, don't write it down --
ask the user. See src/AGENTS.md section on Confidentiality for the
canonical list.
This rule applies at every step below: Step 1 (commit message), Steps 3-3.5 (issue body if auto-creating), Step 4 (title), and Step 6 (summary / test plan).
This skill requires arc (Arcanist) to be installed and configured for
the YugabyteDB Phorge instance. If arc is not available, instruct the
user to set it up.
arc diff --create requires a clean working copy — any unstaged or
untracked changes on the branch must be committed first.
Run git status. If there are uncommitted changes:
git add -A/. — pick files
explicitly so secrets or stray artifacts don't get included).If the branch already has at least one commit and the working copy is clean, skip to Step 2.
Run ./build-support/lint.sh from the repo root. Report the output to
the user.
arc diff --create.You will need a GitHub or JIRA issue describing the issue this diff is fixing in order to create the diff. Normally there is a one-to-one relationship between tracking issues and diffs.
First, check which area the changes touch:
src/, java/, cmake_modules/,
build-support/), remind the user that most core DB changes should
have a GitHub issue.managed/), remind the user
that most platform changes should have a JIRA ticket.Second, scan the current conversation history for any issue reference
the user has already mentioned (i.e., GitHub issue numbers like
#31151, JIRA keys like PLAT-20518, or URLs pointing at either). If
you find a candidate, surface it to the user and ask them to confirm
it's the one to use before asking them to supply a fresh one. Only
prompt for a new reference if no candidate is found or the user rejects
the candidate.
When asking the user for a tracking reference, acceptable forms are:
#31151)PLAT-20518)
Offer to auto-create a GitHub issue or JIRA ticket if the user
doesn't have one yet.To auto create a GitHub issue:
gh issue create, pick a matching issue template
from .github/ISSUE_TEMPLATE/ based on the component (e.g.,
docDB.yml for DocDB, ysql.yml for YSQL, ycql.yml for YCQL,
cdc.yml for CDC, ui.yml for YBA/UI, yugabyted.yml for
yugabyted, docs.yml for docs, feature_request.yml as the generic
fallback for tooling/other, etc.).labels and
pass them via --label, (b) construct a markdown body mirroring the
template's body sections (e.g., ### Description textarea → ## Description + user-facing content; Issue Type dropdown → pick one
of the listed options; sensitivity checkbox → include a confirming
line).gh issue create --assignee @me --repo yugabyte/yugabyte-db --title <...> --body-file <path> --label <labels>.To auto create a JIRA issue:
PLAT)createJiraIssue to create it. Confirm the summary/description with the user before creating.Prompt the user for the following, one at a time:
Component — the component tag that will appear in the title
(e.g., DocDB, YSQL, YBA, CDC, xCluster). If the user is
unsure, suggest a component based on the files changed (e.g.,
src/yb/ → DocDB, src/postgres/ → YSQL, managed/ → YBA).
Title — a short description of the change. If the user doesn't provide one, propose a title, possibly based on the commit messages on the branch if they are informative, and confirm it with the user.
Construct the title in the format:
[<#GH issue> or <JIRA>] <Component>: <Title>
Examples:
[#31151] DocDB: Fix SamplingProfilerTest.EstimatedBytesAndCount in release[PLAT-20518] YBA: Fix full move edit universe to populate userIntentOverrides during configure callBased on the files changed on the branch, decide the default subscriber:
src/, java/, cmake_modules/,
build-support/, etc.) → add ybase as a subscriber.managed/) → add yugaware as
a subscriber.ybase and yugaware.Confirm the subscriber list with the user before creating the diff.
arc diff --createConfidentiality — final scrub before publishing. Phorge is treated
as public (company-wide visible + test code lands on the public GitHub
repo verbatim when upstreamed). Before composing the message file,
re-read the summary, test plan, commit messages, and the test code
being added, and confirm none of the following appear: customer names
or identifiers (universe UUIDs, account IDs, support cases, environment
names, region/zone names); PII (real names / emails / phone numbers /
postal addresses / IP addresses — use RFC 5737/3849 documentation ranges
in tests); unanonymized customer schemas (table / column / query text /
query plans / sample rows from a real customer — reconstruct a synthetic
reproducer); credentials, tokens, certificates, private keys, or license
keys; internal-only hostnames, URLs, Grafana/Slack/Linear links, or
vault paths; unreleased internal information (roadmap, SLAs, embargoed
security findings, internal infra hostnames). See the top of this skill
and src/AGENTS.md Confidentiality for the full rule. If unsure
whether a string is sensitive, don't write it down — ask the user.
Run arc diff --create without using the Phorge MCP server. Do
not amend the user's existing commit to change its title — always
pass the Phorge revision title and body via --message-file so the
local commit stays untouched.
A typical invocation:
arc diff --create --message-file <path> --reviewers <reviewers> --cc <subscribers> <base>
Pre-fill the message file with:
ybase and/or yugaware per Step 4If tests were added or considered important to verify the change works, add the commands for running those tests to the test plan.
Show the user the resulting diff URL (e.g., https://phorge.dev.yugabyte.com/D<id>).
After the diff is created, post a comment on the new revision with the exact text:
trigger Jenkins
Use arc to post the comment (do not use the Phorge MCP server). For
example:
echo "trigger jenkins" | arc call-conduit differential.createcomment -- '{"revision_id": "<id>", "message": "trigger jenkins"}'
Or use whatever arc subcommand is appropriate for the local setup.
Confirm the comment was posted successfully.
Output:
trigger Jenkins was postedarc CLI
only../build-support/lint.sh first; a failing lint should
block diff creation.[<issue>] <Component>: <Title>. Don't
deviate.ybase for DB, yugaware for YBA/platform — add both when changes
span both.trigger jenkins comment kicks off continuous integration
testing; forgetting it is a common mistake.