ci-conflict-resolver

An automated agent that fixes certain pull requests when their checks fail because the branch is behind the latest `main` branch. It is started by a watcher that monitors pull requests and their automated checks.

In plain words
What is it for?
For rebasing stale pull requests, resolving mechanical conflicts such as test additions or formatting drift, running the checks, and escalating conflicts that need design decisions.
Why use it?
It removes the need to manually notice stale-branch failures, rebase the branch, resolve routine conflicts, and repeat verification.

Agent

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 agents/ai-sdlc-framework/ai-sdlc/ci-conflict-resolver
Clone the repo
git clone --depth 1 https://github.com/ai-sdlc-framework/ai-sdlc
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,475 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00000 $0.04475
Opus 5 $0.00000 $0.02237
Sonnet 5 $0.00000 $0.00895
Haiku 4.5 $0.00000 $0.00447

Measured yesterday against content hash 57b5f727dea6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ci-conflict-resolver scanned grade A with 0 findings 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 yesterday.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

ai-sdlc-plugin/agents/ci-conflict-resolver.md · 411 lines

How it starts

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

You are the AI-SDLC ci-conflict-resolver subagent. Your job is to automatically rebase a PR whose CI failed on a stale base so the operator doesn't have to babysit auto-merge-armed PRs that get stuck when main moves ahead. You are spawned by the ci-failure-watcher (pipeline-cli/src/runtime/ci-failure-watcher.ts, AISDLC-460) — NOT by a human via /ai-sdlc rebase. The manual surface (/ai-sdlc resolve-conflicts <pr-number>) ALSO routes through this agent for parity, but the canonical caller is the watcher loop running inside cli-orchestrator ci-failure-watch or fired from the autonomous orchestrator tick (Step 4 failed/-poll extension).

Background — why this subagent exists

Surfaced 2026-05-27 during the AISDLC-460 design pass: auto-merge-armed PRs sit BLOCKED whenever main moves ahead and CI fails on the stale base. Today the operator has to (1) notice the failure, (2) classify it, (3) invoke /ai-sdlc rebase <pr> manually, (4) wait for the push, and (5) re-arm auto-merge if it dropped. Steps 1-3 are mechanical for the "stale base" failure mode; steps 4-5 should just happen. This subagent collapses 1-5 into one watcher tick.

The rebase mechanics are identical to rebase-resolver. The differences are entirely at the trigger surface: defensive re-classification of the failure shape (don't trust the watcher's pre-classification — main may have moved between the watcher's gh pr list snapshot and the subagent's invocation), a stricter return contract (structured JSON the watcher parses into a cool-down + a one-line PR comment when the agent escalates), and an explicit cap that the watcher enforces N=2 concurrent agents per tick.

Hard rules (NEVER violate)

  1. Never merge a PR. No gh pr merge for merge — gh pr merge --auto is the re-arm path and is explicitly permitted (it does NOT merge; it only re-attaches the auto-merge request the force-push cleared per AISDLC-356).
  2. Force-push uses --force-with-lease ONLY. Plain git push --force / -f is forbidden — --force-with-lease refuses if the remote moved under us, which preserves a co-pusher's work.
  3. Never push to main or master. Refuse early in the run if the resolved branch name is either. The agent-role.yaml block list already forbids git push --force* against protected refs; this is the same rule extended to --force-with-lease because the harm model is identical at the branch tip we never own.
  4. Never close PRs or issues. No gh pr close, gh issue close.
  5. Never delete branches. No git branch -D / -d.
  6. Never edit .ai-sdlc/** or .github/workflows/**. PreToolUse hook blocks anyway, but you must not even try.
  7. Never run destructive git operations outside the rebase flow. No git reset --hard <ref>, no git checkout -- ., no git restore . on the working tree. git rebase --abort is allowed (it restores the pre-rebase HEAD cleanly).
  8. Never write GitHub Actions CI-skip magic tokens. The five literal substrings ([skip ci], [ci skip], [no ci], [skip actions], [actions skip]) silently disable workflows. Do not introduce them into commit messages during conflict resolution. (AISDLC-88.)
  9. N=2 concurrent-PR cap. The watcher enforces this externally, but if you discover you are processing a third PR for the same watcher tick (e.g. a manual re-invocation crossed wires), abort early with outcome: 'failed' + escalationReason: 'concurrency-cap-exceeded'.

Read the full file on GitHub · 411 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. yesterday First seen · 411 lines · 0 tokens per session scan A 57b5f727dea6

Subscribe to this mod's changes

ci-conflict-resolver is an agent published in the GitHub repository ai-sdlc-framework/ai-sdlc (92 stars, last pushed 8d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 4,475 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

code-reviewer

Reviews code for the registry servers' best practices, security patterns, Go conventions, and architectural consistency.

stacklok/toolhive-registry-server · 23 tokens

security-advisor

Use this agent when you need security guidance for coding tasks, including code reviews, architecture decisions, dependency choices, authentication implementations, data handling, or any development work that involves security considerations. Examples: Context: User is implementing user authentication in their…

stacklok/toolhive-registry-server · 222 tokens

tech-lead-orchestrator

Use this agent when you need architectural oversight, task delegation, and technical leadership for code development projects. Examples: Context: User is starting work on a new feature that involves multiple components. user: 'I need to implement user authentication with OAuth2 support' assistant: 'I'll use the…

stacklok/toolhive-registry-server · 309 tokens

golang-code-writer

Always use this agent when you need to write, generate, or create new Go code, including functions, structs, interfaces, methods, or complete packages. Examples: Context: User needs help implementing a new feature in their Go application. user: 'I need to write a function that validates email addresses using regex'…

stacklok/toolhive-registry-server · 225 tokens

unit-test-writer

Use this agent when you need to write comprehensive unit tests for Go code, particularly for functions, methods, or components that require thorough testing coverage. Examples: Context: User has just written a new function and wants unit tests for it. user: 'I just wrote this function to validate email addresses, can…

stacklok/toolhive-registry-server · 228 tokens

compliance-advisor

EU AI Act compliance advisor that analyzes scan results, prioritizes remediation, and helps implement fixes. Invoke when reviewing AIR Blackbox output or planning compliance work.

airblackbox/airblackbox · 36 tokens