resolve-conflicts

resolve-conflicts is a command for coding agents from ai-sdlc-framework/ai-sdlc. It costs 85 tokens per session (2,158 once invoked), scanned A, original, Apache-2.0.

A command that manually starts a conflict-resolution process for one pull request. A pull request conflict happens when its changes no longer apply cleanly to the latest version of the main code line.

In plain words
What is it for?
Use it to rebase a conflicting pull request and restore its automated checks or merge request when appropriate.
Why use it?
It lets an operator resolve a stale pull request immediately instead of waiting for an automated watcher to notice it.

Command

Part of the ai-sdlc plugin — 1 skill, 16 commands, 9 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/ai-sdlc-framework/ai-sdlc/resolve-conflicts
Clone the repo
git clone --depth 1 https://github.com/ai-sdlc-framework/ai-sdlc

Or install ai-sdlc, the plugin that ships this one along with the rest of its 1 skill, 16 commands, 9 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for resolve-conflicts

README.md
[![agentmods](https://agentmods.dev/badge/commands/ai-sdlc-framework/ai-sdlc/resolve-conflicts.svg)](https://agentmods.dev/commands/ai-sdlc-framework/ai-sdlc/resolve-conflicts)
Your own site
<a href="https://agentmods.dev/commands/ai-sdlc-framework/ai-sdlc/resolve-conflicts"><img src="https://agentmods.dev/badge/commands/ai-sdlc-framework/ai-sdlc/resolve-conflicts.svg" alt="Measured on agentmods" height="20"></a>
Per session 85 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,158 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00085 $0.02158
Opus 5 $0.00043 $0.01079
Sonnet 5 $0.00017 $0.00432
Haiku 4.5 $0.00009 $0.00216

Measured 4d ago against content hash 94d9fd65135b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

resolve-conflicts scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

const { execFile } = await import('node:child_process');
ai-sdlc-plugin/commands/resolve-conflicts.md · 208 lines

How it starts

The opening of the file, as written. The whole thing — 208 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Manually invoke the ci-conflict-resolver subagent for PR #$ARGUMENTS. This is the AISDLC-460 manual escape hatch — the watcher will pick it up on the next tick anyway, but the operator sometimes wants to drive the rebase + re-arm immediately (e.g. an auto-merge-armed PR is stuck and you want it cleared before walking away).

Why this lives in a slash command (not the agent directly)

Plugin subagents cannot use the Agent tool (the harness filters it out one level deep — empirical proof in AISDLC-69.2 / AISDLC-98). The slash command body runs in the main Claude Code session which DOES have Agent, so it can spawn ci-conflict-resolver directly. This is the same architecture pattern as /ai-sdlc rebase and /ai-sdlc execute.

Hard rules (NEVER violate)

  1. Never merge a PR. Do not run gh pr merge for merge — gh pr merge --auto is the re-arm path the agent owns and is explicitly permitted (it does NOT merge; it only re-attaches the auto-merge request that the force-push cleared per AISDLC-356).
  2. Never force-push with plain --force / -f. Always use --force-with-lease. The agent enforces this; this command does not push directly.
  3. Never push to main or master. The agent refuses; this command also refuses at Step 1.
  4. Never close PRs or issues.
  5. Never delete branches.
  6. Never edit .ai-sdlc/** or .github/workflows/**.
  7. Never write GitHub Actions CI-skip magic tokens. (AISDLC-88.)

Step 0 — Validate input

PR=$ARGUMENTS
if [ -z "$PR" ] || ! echo "$PR" | grep -qE '^[0-9]+$'; then
  echo "ERROR: pass a PR number, e.g. /ai-sdlc resolve-conflicts 1234"
  exit 1
fi

Step 1 — Locate PR + worktree

gh pr view "$PR" --json number,title,headRefName,headRefOid,body,state,mergeStateStatus,statusCheckRollup \
  > /tmp/resolve-conflicts-pr-${PR}.json

BRANCH=$(jq -r '.headRefName' /tmp/resolve-conflicts-pr-${PR}.json)
HEAD_SHA=$(jq -r '.headRefOid' /tmp/resolve-conflicts-pr-${PR}.json)
TITLE=$(jq -r '.title' /tmp/resolve-conflicts-pr-${PR}.json)

# Refuse on main/master (Hard Rule 3).
if [ "$BRANCH" = "main" ] || [ "$BRANCH" = "master" ]; then
  echo "ERROR: refusing to operate on protected branch $BRANCH"
  exit 1
fi

TASK_ID_LOWER=$(echo "$BRANCH" | sed -E 's|^ai-sdlc/([a-z]+-[0-9.]+).*|\1|')
WORKTREE_PATH=".worktrees/$TASK_ID_LOWER"

if [ ! -d "$WORKTREE_PATH" ]; then
  git fetch origin "$BRANCH"
  mkdir -p .worktrees
  git worktree add "$WORKTREE_PATH" "origin/$BRANCH"
fi

Read the full file on GitHub · 208 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 208 lines · 85 tokens per session scan A 94d9fd65135b

Subscribe to this mod's changes

resolve-conflicts is a command published in the GitHub repository ai-sdlc-framework/ai-sdlc (100 stars, last pushed 10d ago), licensed Apache-2.0. It adds 85 tokens to every session and 2,158 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.