| name | dart-manage-pr |
| description | DART Manage PR: manage an open DART pull request through CI, review, merge, and cleanup |
dart-manage-pr
Use this skill in Codex to run the DART dart-manage-pr workflow. The editable
workflow source lives in .claude/commands/; this file is its generated adapter
in the shared .agents/skills/ catalog.
Invocation
- Claude Code:
/dart-manage-pr <arguments>
- Codex:
$dart-manage-pr <arguments>
Treat the text after the skill name as $ARGUMENTS. When the workflow
references $1, $2, etc., map those to the positional values supplied by the
user.
Command Body
Manage an open DART pull request after explicit maintainer/user approval for
mutations: $ARGUMENTS
Required Reading
@AGENTS.md
@docs/onboarding/contributing.md
@docs/onboarding/ci-cd.md
@docs/onboarding/testing.md
@docs/onboarding/ai-reviews.md
Modes
mode=manage (default): run the full PR-management loop below to the next
terminal state.
mode=merge: maintainer-only. Complete the local pre-merge validation in
step 6 and merge a ready PR only after explicit maintainer/user approval for
the merge.
Invocation Contract
When the user says manage <PR> or continue managing <PR> without limiting
the request to status-only, treat that as approval to run the full
PR-management loop to the next terminal state:
- required policy metadata checked and corrected when stale;
- CI monitored until green, failed, or blocked;
- merge conflicts reproduced and resolved locally;
- review comments addressed, pushed, resolved, and re-reviewed when appropriate;
- PR body/testing evidence refreshed when it no longer matches the branch.
This explicit approval covers routine PR-maintenance mutations for that loop:
additive fix commits and pushes, PR description/metadata corrections, resolving
already-addressed review threads, rerunning failed CI jobs, and requesting a
fresh AI review after follow-up fixes. It does not cover merging the PR into
the target branch, force-pushes, branch deletion, PR closure, base-branch
changes, or human reviewer requests; ask separately for those.
Do not call the PR managed just because checks are green. Continue until the PR
is mergeable with required checks complete and addressed review threads
resolved, or until a concrete blocker remains.
Identify the PR
Use the PR number or URL from $ARGUMENTS. If none is provided, infer the PR
from the current branch:
gh pr view --json number,url,headRefName,baseRefName
Then inspect the full state:
gh pr view <PR_NUMBER> --json number,title,state,isDraft,baseRefName,headRefName,mergeStateStatus,milestone,url,reviewDecision,statusCheckRollup
gh pr checks <PR_NUMBER>
Workflow
- Confirm scope and policy:
- Monitor CI:
gh pr checks <PR_NUMBER> --watch --interval 30 --fail-fast
If checks are still queued or running, report the current jobs and keep
watching unless the user asked only for status. Also poll mergeability:
gh pr view <PR_NUMBER> --json mergeStateStatus,headRefOid,isDraft,reviewDecision
If GitHub reports conflicts, fetch the target branch and resolve them before
treating green checks as sufficient.
- Fix failures:
- Inspect the newest failed run or job, not an older cancelled run. Use the
dart-fix-ci workflow for non-trivial CI debugging.
- Reproduce locally with the relevant
pixi run ... task or focused test.
Output
Report:
- PR number, URL, base, head, draft state, milestone, and merge status.
- CI summary: passing, failing, pending, or skipped checks.
- Review summary, independent-review status, and whether
@codex review ran.
- Reviewed head, completed round count, trigger/completion evidence, and any
strategy-checkpoint outcome or missing review coverage.
- Local pre-merge validation state when
mode=merge ran.
- Commits pushed, merge action, and branch cleanup action.
- Remaining blockers or next action.