From ab34d3c6fccad56c88b059fe188adeaddf5dbfb1 Mon Sep 17 00:00:00 2001 From: Debasis Mandal Date: Wed, 29 Jul 2026 02:39:18 -0400 Subject: [PATCH 1/3] docs: retarget PRs to AMD-Ecosystem/flashinfer The GitHub repo moved from ROCm/flashinfer to AMD-Ecosystem/flashinfer. Update the PR-target safeguards in CLAUDE.md and the pr-workflow skill (repo slug, gh set-default check, gh api paths, GraphQL owner) to match. Co-Authored-By: Claude Opus 4.8 (1M context) --- .claude/skills/pr-workflow/SKILL.md | 26 +++++++++++++------------- CLAUDE.md | 8 ++++---- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.claude/skills/pr-workflow/SKILL.md b/.claude/skills/pr-workflow/SKILL.md index a4feb4b11a..c823459f9a 100644 --- a/.claude/skills/pr-workflow/SKILL.md +++ b/.claude/skills/pr-workflow/SKILL.md @@ -1,26 +1,26 @@ --- name: pr-workflow -description: How to create and edit PRs on the ROCm/flashinfer GitHub repo (which publishes the amd-flashinfer package) — gh CLI quirks and the project's PR-description conventions. +description: How to create and edit PRs on the AMD-Ecosystem/flashinfer GitHub repo (which publishes the amd-flashinfer package) — gh CLI quirks and the project's PR-description conventions. --- -# PR Workflow (ROCm/flashinfer) +# PR Workflow (AMD-Ecosystem/flashinfer) -> The GitHub repo is `ROCm/flashinfer`; the Python package it publishes is +> The GitHub repo is `AMD-Ecosystem/flashinfer`; the Python package it publishes is > `amd-flashinfer`. All `gh` commands below target the GitHub repo. ## CRITICAL: PR target safeguard (fail-closed) -`ROCm/flashinfer` is a **GitHub fork** of `flashinfer-ai/flashinfer` (the true +`AMD-Ecosystem/flashinfer` is a **GitHub fork** of `flashinfer-ai/flashinfer` (the true upstream). Because of this, `gh pr create` defaults the PR base to the fork-parent `flashinfer-ai/flashinfer` unless explicitly overridden. **A PR must NEVER be opened against `flashinfer-ai/flashinfer`.** -All PRs go to **`ROCm/flashinfer`**, base branch **`amd-integration`**. +All PRs go to **`AMD-Ecosystem/flashinfer`**, base branch **`amd-integration`**. **Before ANY `gh pr create`, run this pre-flight check and ABORT if it fails:** ```bash -gh repo set-default --view # MUST print exactly: ROCm/flashinfer +gh repo set-default --view # MUST print exactly: AMD-Ecosystem/flashinfer ``` If it prints anything else (or errors), STOP — do not create the PR. Report the @@ -29,7 +29,7 @@ mismatch to the user instead. Never guess the target. **Always pass the target and base explicitly** — never rely on gh defaults: ```bash -gh pr create --repo ROCm/flashinfer --base amd-integration \ +gh pr create --repo AMD-Ecosystem/flashinfer --base amd-integration \ --title "" --body "$(cat /tmp/pr_body.md)" ``` @@ -41,8 +41,8 @@ better to fail to raise a PR and explain why than to raise one against upstream. These are local config (not checked in) and must be redone per clone: ```bash -git remote -v # origin should be ROCm/flashinfer; there must be NO flashinfer-ai remote -gh repo set-default ROCm/flashinfer # pin gh base repo so it does not fall back to the fork parent +git remote -v # origin should be AMD-Ecosystem/flashinfer; there must be NO flashinfer-ai remote +gh repo set-default AMD-Ecosystem/flashinfer # pin gh base repo so it does not fall back to the fork parent ``` If a remote pointing at `flashinfer-ai/flashinfer` exists, remove it: @@ -93,10 +93,10 @@ reset. It is always better to fail to raise a PR than to push to or PR from ```bash # Update PR description -gh api repos/ROCm/flashinfer/pulls/<number> --method PATCH --field body="<body>" +gh api repos/AMD-Ecosystem/flashinfer/pulls/<number> --method PATCH --field body="<body>" # Or from a file -gh api repos/ROCm/flashinfer/pulls/<number> --method PATCH --field body="$(cat /tmp/pr_body.md)" +gh api repos/AMD-Ecosystem/flashinfer/pulls/<number> --method PATCH --field body="$(cat /tmp/pr_body.md)" ``` Ask the user to confirm before running `git push` or `gh pr create` — these @@ -159,14 +159,14 @@ not exposed via REST (replying to a comment is available over REST — see below # Bump `first:` if a PR may have more than 50 threads / 10 comments per thread — # this query is not exhaustive beyond those limits. gh api graphql -f query=' -{ repository(owner:"ROCm", name:"flashinfer") { +{ repository(owner:"AMD-Ecosystem", name:"flashinfer") { pullRequest(number: <PR>) { reviewThreads(first: 50) { nodes { id isResolved comments(first: 10) { nodes { databaseId author { login } path body } } } } } } }' # Reply to a comment (use the databaseId from above) -gh api repos/ROCm/flashinfer/pulls/<PR>/comments/<commentDatabaseId>/replies \ +gh api repos/AMD-Ecosystem/flashinfer/pulls/<PR>/comments/<commentDatabaseId>/replies \ --method POST --field body="<reply>" # Resolve a thread (use the thread node id, e.g. PRRT_...) diff --git a/CLAUDE.md b/CLAUDE.md index de89f5083b..c313324b16 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -6,12 +6,12 @@ ## CRITICAL: PR target -All PRs go to **`ROCm/flashinfer`**, base branch **`amd-integration`** — NEVER +All PRs go to **`AMD-Ecosystem/flashinfer`**, base branch **`amd-integration`** — NEVER to `flashinfer-ai/flashinfer` (the fork parent / true upstream). `gh pr create` defaults the base to the fork parent, so always pass -`--repo ROCm/flashinfer --base amd-integration` explicitly, and run `gh repo set-default --view` first — -it MUST print `ROCm/flashinfer` or you abort. If the target owner cannot be -positively confirmed as `ROCm`, do not create the PR; stop and report why. +`--repo AMD-Ecosystem/flashinfer --base amd-integration` explicitly, and run `gh repo set-default --view` first — +it MUST print `AMD-Ecosystem/flashinfer` or you abort. If the target owner cannot be +positively confirmed as `AMD-Ecosystem`, do not create the PR; stop and report why. Failing to raise a PR is always preferable to raising one against upstream. Also NEVER push to or raise a PR from the `amd-integration` branch itself — it From ea6516eb9470122d2cc45a2f3c5c1b89152d8b01 Mon Sep 17 00:00:00 2001 From: Debasis Mandal <debasis.mandal@amd.com> Date: Wed, 29 Jul 2026 12:09:58 -0400 Subject: [PATCH 2/3] docs: note that GitHub-rendered bodies must not be hard-wrapped Add a PR/issue body formatting rule to CLAUDE.md: GitHub renders a single newline inside a paragraph as <br>, so column-wrapped prose breaks mid-sentence. Write each paragraph/bullet on one line and soft-wrap. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --- CLAUDE.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index c313324b16..713b961468 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -24,6 +24,15 @@ followed by `git reset --hard origin/amd-integration` to restore an abort condition too. Full procedure: `pr-workflow` skill. +## PR / issue body formatting + +Do not hard-wrap the body to a fixed column. GitHub renders a single newline +inside a paragraph as a `<br>`, so column-wrapped prose shows up as broken +mid-sentence lines. Write each paragraph and each bullet as one line and let the +browser soft-wrap; use blank lines only to separate paragraphs/list items. (Same +for issue bodies and PR/issue comments — anything GitHub renders.) This is the +opposite of the repo's `.md`/`.py` source files, which are wrapped normally. + ## Essential Commands | Task | Command | From c4a2c828da82a2e27bc12141e3a411f077459523 Mon Sep 17 00:00:00 2001 From: Debasis Mandal <debasis.mandal@amd.com> Date: Wed, 29 Jul 2026 12:13:44 -0400 Subject: [PATCH 3/3] docs: add branch-naming and ask-before-pushing rules to CLAUDE.md Port the "Branch naming" and "CRITICAL: ask before pushing to remote" sections from AMD-Ecosystem/flashinfer-bench's pr-workflow skill, placed in the same relative position (after the PR-target section). Repo name adapted to AMD-Ecosystem/flashinfer. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --- CLAUDE.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 713b961468..d25e071898 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -24,6 +24,27 @@ followed by `git reset --hard origin/amd-integration` to restore an abort condition too. Full procedure: `pr-workflow` skill. +## Branch naming + +Topic branches are created off `origin/amd-integration` and named with **plain +hyphenated words** describing the change: + +- ✅ `pr-workflow-push-safety`, `timing-torch-events`, `aiter-solution-generator` +- ❌ **no `rocm/` prefix** — the entire fork is ROCm, so it's redundant noise. +- ❌ **no plan-phase labels** (`p1`, `p2`, …) from `ROCM_PORT_PLAN.md` — name the + *change*, not the plan milestone. + +## CRITICAL: ask before pushing to remote (fail-closed) + +**Never `git push` (or `gh pr create`, which pushes) without first getting the +user's explicit "yes" for that specific push.** It publishes to a shared repo. +This applies to every push — the initial branch push, force-pushes after a +rebase, and follow-up pushes addressing review comments; a prior "yes" does not +authorize a later push. State exactly what will be pushed and where (branch → +`AMD-Ecosystem/flashinfer`) and wait. Local-only work (commits, the quality +gate, the local review) needs no confirmation — only the network push does. When +in doubt, hold the push and ask. + ## PR / issue body formatting Do not hard-wrap the body to a fixed column. GitHub renders a single newline