Agent Skills › dartsim/dart › dart-backport-pr

dart-backport-pr

GitHub

用于将已合并到 main 分支的 PR 或提交回移植(backport)到指定的 release-* 稳定或维护分支。流程包括验证源状态、检查目标分支差异、创建主题分支、执行 cherry-pick 及解决冲突,确保代码正确同步至发布版本。

.agents/skills/dart-backport-pr/SKILL.md dartsim/dart

触发场景

需要将功能从主分支同步到旧版本分支 修复已发布版本的 bug 并需要回溯代码

安装

npx skills add dartsim/dart --skill dart-backport-pr -g -y
更多选项

非标准路径

npx skills add https://github.com/dartsim/dart/tree/main/.agents/skills/dart-backport-pr -g -y

不安装直接使用

npx skills use dartsim/dart@dart-backport-pr

指定 Agent (Claude Code)

npx skills add dartsim/dart --skill dart-backport-pr -a claude-code -g -y

安装 repo 全部 skill

npx skills add dartsim/dart --all -g -y

预览 repo 内 skill

npx skills add dartsim/dart --list

SKILL.md

Frontmatter
{
    "name": "dart-backport-pr",
    "description": "DART Backport PR: backport a merged main PR to a stabilization or maintenance release branch"
}

dart-backport-pr

Use this skill to run the DART dart-backport-pr workflow. The editable workflow source lives in .claude/commands/; this generated skill is its entrypoint for Codex and Muse.

Invocation

  • Claude Code: /dart-backport-pr <arguments>
  • Codex: $dart-backport-pr <arguments>
  • Muse: /dart-backport-pr <arguments>

Treat the text after the skill name, or the user's request when the skill is loaded on demand, as $ARGUMENTS. When the workflow references $1, $2, etc., map those to the positional values supplied by the user.

Command Body

Backport PR or commits: $ARGUMENTS

Required Reading

@AGENTS.md @docs/onboarding/contributing.md @docs/onboarding/release-management.md @docs/onboarding/changelog.md

Workflow

New patches land on main. Use this workflow to backport merged PRs to a selected release-* stabilization or maintenance branch. A release branch may be cut from an approved stabilization commit before its first release tag, or from a published release tag.

For a source change involving model/scene structure, physics behavior, or Filament output, use the release branch's dart-verify-sim workflow to preserve the text oracle and assessed visual evidence. Document a visual exception when the release branch cannot render the claim.

  1. Verify the source PR or commit is merged to main:
    gh pr view <SOURCE_PR> --json state,mergedAt,baseRefName,mergeCommit
    
  2. Resolve the target from the live backport PR base or the selected release branch. Fetch it and read its docs/onboarding/release-management.md § "Release target"; verify the exact DART <Next release> milestone is open on GitHub. Publishing requires explicit maintainer/user approval. Check whether an equivalent change already exists on that branch:
    git fetch origin <RELEASE_BRANCH> main
    git cherry -v --abbrev=40 origin/<RELEASE_BRANCH> origin/main | grep <COMMIT_HASH>
    
  3. Create a topic branch from the release target without resetting an existing local branch:
    BRANCH=backport/<SOURCE_PR>-to-<RELEASE_BRANCH>
    if git show-ref --verify --quiet "refs/heads/$BRANCH"; then
      if [ -n "$(git status --short)" ] || [ "$(git rev-parse "$BRANCH")" \
          != "$(git rev-parse "origin/<RELEASE_BRANCH>")" ]; then
        echo "existing $BRANCH is dirty or diverges from the release tip" >&2
        exit 1  # stop and ask before resetting or cherry-picking onto it
      fi
      git switch "$BRANCH"
    else
      git switch --no-track -c "$BRANCH" origin/<RELEASE_BRANCH>
    fi
    
  4. Cherry-pick with provenance: git cherry-pick -x <COMMIT_HASH>.
  5. Resolve conflicts minimally; stop and ask if conflicts are broad or change behavior.
  6. Run /dart-changelog decide or $dart-changelog decide against the backport diff and release target before opening the release PR. If an entry is required but needs the backport PR number, draft the decision and keep the finalize/update follow-up local until explicit approval permits another push. Do not skip the changelog decision just because this is a backport. Release branches take no fragments: if the cherry-pick added changelog.d/ fragments, delete them and let dart-changelog write the entry into the release branch's CHANGELOG.md.
  7. Run pixi run lint and the smallest relevant release-branch checks.
  8. Ask for explicit maintainer/user approval before pushing or opening the PR. After approval, open it as a draft against the release branch with the resolved next-release milestone and the PR template, then follow docs/onboarding/ai-tools.md § "PR Lifecycle". If the changelog decision was deferred for the PR number, run /dart-changelog finalize or $dart-changelog finalize and push the follow-up only after explicit approval.

Output

  • Backport PR URL
  • Source PR/commit
  • Conflicts resolved, if any
  • Changelog decision and any deferred finalize follow-up
  • Checks run and CI status

版本历史

  • aa707ae 当前 2026-11-02 12:51
  • f630c91 2026-10-18 20:24

    新增 Muse 客户端支持;更新文档以反映 release-6.19 分支退役及 DART 7.0 发布线变更;明确仅对从发布标签切出的 release-6.* 分支应用反向移植。

  • deb9869 2026-09-08 21:44
  • bcd584e 2026-09-02 23:39

    更新触发条件:针对涉及模型/场景结构、物理行为或 GUI 输出的变更,强制使用目标分支的 dart-verify-sim 工作流以保留视觉证据;新增对 AI-infra 和 workflow-doc 类型 backport 的能力库存对比逻辑。

  • b9fbefc 2026-07-19 11:29

同 Skill 集合

.agents/skills/dart-analyze/SKILL.md
.agents/skills/dart-architecture/SKILL.md
.agents/skills/dart-audit-agent-compliance/SKILL.md
.agents/skills/dart-benchmark-packet/SKILL.md
.agents/skills/dart-branch-cleanup/SKILL.md
.agents/skills/dart-build/SKILL.md
.agents/skills/dart-changelog/SKILL.md
.agents/skills/dart-ci/SKILL.md
.agents/skills/dart-close-issue/SKILL.md
.agents/skills/dart-contribute/SKILL.md
.agents/skills/dart-deps/SKILL.md
.agents/skills/dart-docs-update/SKILL.md
.agents/skills/dart-downstream-fix/SKILL.md
.agents/skills/dart-execute-packet/SKILL.md
.agents/skills/dart-fix-issue/SKILL.md
.agents/skills/dart-io/SKILL.md
.agents/skills/dart-manage-pr/SKILL.md
.agents/skills/dart-mechanical-refactor/SKILL.md
.agents/skills/dart-model-upgrade/SKILL.md
.agents/skills/dart-new-task/SKILL.md
.agents/skills/dart-next/SKILL.md
.agents/skills/dart-perf/SKILL.md
.agents/skills/dart-plan-update/SKILL.md
.agents/skills/dart-pr/SKILL.md
.agents/skills/dart-python/SKILL.md
.agents/skills/dart-references/SKILL.md
.agents/skills/dart-release-ci-fix/SKILL.md
.agents/skills/dart-release-merge-main/SKILL.md
.agents/skills/dart-release-packaging/SKILL.md
.agents/skills/dart-resume/SKILL.md
.agents/skills/dart-retro/SKILL.md
.agents/skills/dart-review-pr/SKILL.md
.agents/skills/dart-test/SKILL.md
.agents/skills/dart-triage-issue/SKILL.md
.agents/skills/dart-ultrawork/SKILL.md
.agents/skills/dart-verify-sim/SKILL.md
.claude/skills/dart-architecture/SKILL.md
.claude/skills/dart-build/SKILL.md
.claude/skills/dart-ci/SKILL.md
.claude/skills/dart-contribute/SKILL.md
.claude/skills/dart-io/SKILL.md
.claude/skills/dart-perf/SKILL.md
.claude/skills/dart-python/SKILL.md
.claude/skills/dart-references/SKILL.md
.claude/skills/dart-test/SKILL.md
.claude/skills/dart-verify-sim/SKILL.md
.codex/skills/dart-analyze/SKILL.md
.codex/skills/dart-architecture/SKILL.md
.codex/skills/dart-audit-agent-compliance/SKILL.md

元信息

文件数
0
版本
aa707ae
Hash
54eeb7d8
收录时间
2026-07-19 11:29

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-11-03 07:20
浙ICP备14020137号-1