Agent Skillsdartsim/dart › dart-contribute

dart-contribute

GitHub

指导DART项目的代码贡献流程,涵盖分支命名规范、PR创建步骤、Lint测试执行及PR描述撰写标准。

.codex/skills/dart-contribute/SKILL.md dartsim/dart

Trigger Scenarios

用户询问如何向DART项目提交代码 需要创建或管理DART相关的Pull Request 涉及DART项目的分支命名与合并策略

Install

npx skills add dartsim/dart --skill dart-contribute -g -y
More Options

Non-standard path

npx skills add https://github.com/dartsim/dart/tree/main/.codex/skills/dart-contribute -g -y

Use without installing

npx skills use dartsim/dart@dart-contribute

指定 Agent (Claude Code)

npx skills add dartsim/dart --skill dart-contribute -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-contribute",
    "description": "DART Contribute: branching, PRs, review workflow, and dual-PR bugfixes"
}

DART Contribution Workflow

Load this skill when contributing code to DART.

Full Documentation

For complete guide: docs/onboarding/contributing.md

For code style: docs/onboarding/code-style.md

Branch Naming

  • feature/<topic> - New features
  • fix/<topic> - Bug fixes
  • refactor/<topic> - Refactoring
  • docs/<topic> - Documentation

PR Workflow

# Features, docs, and non-bugfix refactors start from main
git checkout -b <type>/<topic> origin/main

# Bug fixes that apply to the current release line start from the active DART 6 LTS branch
DART6_LTS_BRANCH=$(git branch -r --list 'origin/release-6.*' | sed 's|.*/||' | sort -V | tail -1)
git checkout -b "fix/<topic>-${DART6_LTS_BRANCH#release-}" "origin/$DART6_LTS_BRANCH"

# Make changes, then
pixi run lint
pixi run test-all
# On Linux hosts with a visible NVIDIA CUDA runtime
pixi run -e cuda test-all

# After explicit maintainer/user approval, push and create PR
git push -u origin HEAD
gh pr create --draft --base <target-branch> --milestone "<milestone>"

Use --base main --milestone "DART 7.0" for main PRs and the branch-matching DART 6.x patch milestone for active DART 6 LTS PRs.

Rule of thumb: run pixi run lint before committing so auto-fixes are included.

Use .github/PULL_REQUEST_TEMPLATE.md and keep DART's default order: Summary, Motivation / Problem, Changes / Key Changes, optional Before / After, Testing, Breaking Changes, and Related Issues / PRs. Keep Summary first as the reviewer skim target. If the motivation is necessary to understand the outcome, make the first Summary sentence problem-oriented, then put the fuller why in Motivation / Problem rather than moving Motivation above Summary.

Write PR descriptions for a user or downstream maintainer who is not already familiar with the implementation. Lead Summary and Motivation with what changes for them, what stays compatible, how they opt in or migrate, and why the evidence matters; keep implementation mechanics in Changes unless they explain user-visible risk.

When a PR has meaningful user-facing API, workflow, behavior, or performance impact, add a concise Before / After section. Cover only relevant dimensions, phrase rows as user-visible before/after outcomes, and for performance claims name the baseline explicitly: CPU path, parent commit, main, or prior implementation, plus workload, metric, and important limitations.

Use plain descriptive commit messages and PR titles. Do not prefix them with agent tags such as [codex], [claude], or [opencode].

For already-published PRs, keep history inspectable with additive commits. If the PR branch needs the latest target branch, use explicit maintainer/user approval to update that published branch by merging the target branch and pushing normally. Do not rebase published PR branches by default because that invalidates existing CI runs and makes PR review/comment history harder to follow. Rebase or force-push only when the maintainer explicitly requests it.

Milestones (Required)

Always set a milestone when creating PRs after explicit maintainer/user approval:

Target Branch Milestone
main DART 7.0 (or next major)
Active DART 6 LTS release-6.* branch Branch-matching DART 6.x patch
# After explicit maintainer/user approval, set milestone on existing PR
gh pr edit <PR#> --milestone "DART 7.0"

# List available milestones
gh api repos/dartsim/dart/milestones --jq '.[] | .title'

CRITICAL: Bug Fix Dual-PR

Bug fixes require PRs to BOTH release lines:

  1. Active DART 6 LTS release-6.* branch - Current DART 6 maintenance line
  2. main - Next release

Steps:

  1. Fix on the active DART 6 LTS branch first
  2. Cherry-pick to main
  3. After explicit maintainer/user approval, create separate PRs for each

CHANGELOG (After Approved PR Exists)

Use the dart-changelog routine with docs/onboarding/changelog.md as the source of truth. After the approved PR exists, check if CHANGELOG.md needs updating:

Change Type Update CHANGELOG?
Bug fixes ✅ Yes
New features ✅ Yes
Breaking changes ✅ Yes (in Breaking Changes section)
Documentation improvements ✅ Yes (in Tooling and Docs)
CI/tooling changes ✅ Yes (in Tooling and Docs)
Refactoring (no behavior change) ⚠️ Maybe (if significant)
Dependency bumps ⚠️ Maybe (if user-facing)
Typo fixes ❌ No

Format: - Reader-visible outcome. ([#PR](https://github.com/dartsim/dart/pull/PR))

Keep entries concise. If details need more than a few wrapped lines, move the details to the owner doc, plan, or migration note and link that document. Do not add one bullet per PR when several PRs ship one reader-visible outcome; merge them into one human-readable release-note entry.

# Example entry in CHANGELOG.md under appropriate section:
- Added AI-native documentation with AGENTS.md and module-specific guides. ([#2446](https://github.com/dartsim/dart/pull/2446))

Code Review

  • Address all feedback
  • Keep changes minimal
  • Update tests if behavior changed
  • Run full validation, then ask for explicit maintainer/user approval before pushing fixes

CI Loop

gh run watch <RUN_ID> --interval 30

Fix failures until green.

Version History

  • e0d13fd Current 2026-07-05 10:37

Same Skill Collection

.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-python/SKILL.md
.claude/skills/dart-references/SKILL.md
.claude/skills/dart-test/SKILL.md
.codex/skills/dart-analyze/SKILL.md
.codex/skills/dart-architecture/SKILL.md
.codex/skills/dart-audit-agent-compliance/SKILL.md
.codex/skills/dart-backport-pr/SKILL.md
.codex/skills/dart-benchmark-packet/SKILL.md
.codex/skills/dart-branch-cleanup/SKILL.md
.codex/skills/dart-build/SKILL.md
.codex/skills/dart-changelog/SKILL.md
.codex/skills/dart-ci/SKILL.md
.codex/skills/dart-close-issue/SKILL.md
.codex/skills/dart-deps/SKILL.md
.codex/skills/dart-docs-update/SKILL.md
.codex/skills/dart-downstream-fix/SKILL.md
.codex/skills/dart-execute-packet/SKILL.md
.codex/skills/dart-fix-ci/SKILL.md
.codex/skills/dart-fix-issue/SKILL.md
.codex/skills/dart-io/SKILL.md
.codex/skills/dart-manage-pr/SKILL.md
.codex/skills/dart-mechanical-refactor/SKILL.md
.codex/skills/dart-new-task/SKILL.md
.codex/skills/dart-next/SKILL.md
.codex/skills/dart-plan-update/SKILL.md
.codex/skills/dart-pr/SKILL.md
.codex/skills/dart-python/SKILL.md
.codex/skills/dart-references/SKILL.md
.codex/skills/dart-release-merge-main/SKILL.md
.codex/skills/dart-release-packaging/SKILL.md
.codex/skills/dart-resume/SKILL.md
.codex/skills/dart-retrospect/SKILL.md
.codex/skills/dart-review-pr/SKILL.md
.codex/skills/dart-test/SKILL.md
.codex/skills/dart-triage-issue/SKILL.md

Metadata

Files
0
Version
e0d13fd
Hash
83f9dc57
Indexed
2026-07-05 10:37

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-09 17:44
浙ICP备14020137号-1 $Гость$