Decision framework for resolving conflicts between clarc agents — priority hierarchy, conflict classes, escalation protocol, and real-world examples
From clarcnpx claudepluginhub marvinrichter/clarc --plugin clarcThis skill uses the workspace's default tool permissions.
Designs and optimizes AI agent action spaces, tool definitions, observation formats, error recovery, and context for higher task completion rates.
Enables AI agents to execute x402 payments with per-task budgets, spending controls, and non-custodial wallets via MCP tools. Use when agents pay for APIs, services, or other agents.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
Use this skill when:
orchestrator agent's synthesis phase encounters conflicting outputsDo not use this skill for single-agent sessions with no conflict — standard agent instructions apply.
When two agents disagree, work through this in order — stop at the first rule that applies:
1. Is one recommendation about SECURITY (secrets, injection, auth, validation)?
→ Security (P1) wins unconditionally. No exceptions. Document it.
2. Is one recommendation about ARCHITECTURE (extract, separate concerns, design)?
→ Is this greenfield or a production incident?
- Greenfield: Architect wins.
- Production incident: Pragmatic wins — extract later, add ADR.
3. Is this about writing tests vs. fixing urgently?
→ Is production down or data loss occurring?
- Yes: Fix first, tests follow.
- No: TDD wins (tests first).
4. Is one recommendation about PERFORMANCE vs. CORRECTNESS?
→ Is there profiling evidence (flamegraph, benchmark)?
- Yes: Performance wins — document TTL/eviction strategy.
- No: Correctness wins. Theoretical concern is insufficient.
5. Is this STYLE vs. CONSISTENCY (rename, reformat, reorganize)?
→ Existing code: Consistency wins.
→ Net-new code: Clarity wins.
6. None of the above?
→ Escalate to user: show both recommendations, explain the trade-off.
Escalate to the user when:
When escalating:
P1 SECURITY (never override)
└─ security-reviewer, devsecops-reviewer, supply-chain-auditor
P2 ARCHITECTURE (requires justification to override)
└─ architect, data-architect, contract-reviewer
P3 CODE QUALITY (balanced, prefer more specific agent)
└─ code-reviewer, typescript-reviewer, go-reviewer, python-reviewer, …
P4 ADVISORY (easily overridden by P1–P3)
└─ code-simplifier, refactor-cleaner, performance-analyst
P5 CONTEXTUAL (task-phase dependent — see conflict class rules)
└─ tdd-guide, build-error-resolver, e2e-runner
Full hierarchy with override rules: docs/agent-priority-hierarchy.md
security-vs-simplicity [Conflict detected]
│
┌──────────────┴──────────────┐
│ │
security-reviewer code-simplifier / refactor-cleaner
recommends keeping recommends removing
│
└──────────► KEEP (P1 wins unconditionally)
No exception.
Real-world example:
security-reviewer: "Add input sanitization before passing to SQL query"
code-reviewer: "This is handled by the ORM — the check is redundant"
Resolution: Keep the explicit sanitization. Defense in depth is correct even
when the ORM provides partial protection. Document why it's intentional.
architecture-vs-pragmatism [Conflict detected]
│
┌────────────┴────────────┐
│ │
architect says EXTRACT code agent says KEEP INLINE
│
Is this greenfield?
│
┌──────┴──────┐
YES NO
│ │
Architect wins Is it a production incident?
│
┌─────┴─────┐
YES NO
│ │
Pragmatic Architect wins
(extract later) (document override)
Real-world example:
architect: "Extract UserNotificationService into its own bounded context"
typescript-reviewer: "This is 40 lines — extracting adds unnecessary indirection"
Context: 2-year-old legacy codebase, urgent bugfix needed
Resolution: Pragmatic wins. Add ADR noting the extraction as tech debt.
methodology-vs-urgency [Conflict detected]
│
┌──────────────┴──────────────┐
│ │
tdd-guide says WRITE TEST FIRST build-error-resolver says FIX NOW
│
Is production down or data loss?
│
┌────┴────┐
YES NO
│ │
Fix first tdd-guide wins
Add tests (tests first)
after
Real-world example:
tdd-guide: "Write failing test for the edge case first"
build-error-resolver: "The deploy pipeline is blocked — fix the null check now"
Situation: CI is broken, blocking the team
Resolution: Fix the null check immediately. Schedule test as follow-up commit.
performance-vs-correctness [Conflict detected]
│
┌─────────────────┴─────────────────┐
│ │
performance-analyst says CACHE code-reviewer says ALWAYS RECOMPUTE
│
Is there profiling evidence?
│
┌────┴────┐
YES NO
│ │
Apply cache Correctness wins
(document (theoretical perf concern
TTL/eviction) not sufficient)
Real-world example:
performance-analyst: "Cache user permissions in Redis with 60s TTL"
security-reviewer: "Stale permission cache is a security risk for deprovisioned users"
Here security-vs-performance overlaps with security-vs-simplicity:
Resolution: Security (P1) wins. Shorter TTL (5s) is acceptable compromise.
Document in ADR.
style-vs-consistency [Conflict detected]
│
┌──────────────┴──────────────┐
│ │
Agent A says RENAME (clarity) Agent B says KEEP (consistency)
│
Is this existing code?
│
┌────┴────┐
YES NO (net-new code)
│ │
Consistency Style / clarity wins
wins (use the better name)
When emitting a recommendation that may conflict with another agent, append:
## Conflicts With
If `[agent-name]` recommended [opposite action]:
- Conflict class: `[class-name]`
- Resolution rule: [which agent wins and why]
- Action: DEFER | PROCEED | ESCALATE TO USER
Copy this block verbatim into your agent output whenever a conflict exists:
---
## ⚠ Conflict Signal
**This recommendation may conflict with another agent.**
| Field | Value |
|-------|-------|
| Conflicting agent | `<agent-name>` (e.g. `security-reviewer`) |
| Their recommendation | <one-line summary of opposing recommendation> |
| Conflict class | `<class>` (security-vs-simplicity / architecture-vs-pragmatism / methodology-vs-urgency / performance-vs-correctness / style-vs-consistency) |
| Winner per hierarchy | <agent that wins> — <one-sentence rationale> |
| Suggested action | DEFER / PROCEED / ESCALATE TO USER |
> If you are the orchestrator: apply the winner's recommendation and record this conflict
> in the `### Conflicts Resolved` table of your synthesis output.
---
Example:
## Recommendation
Remove the null guard at `src/api/users.ts:88`.
TypeScript strict mode guarantees `user` is non-null at this point.
## Conflicts With
If `security-reviewer` recommended keeping this guard:
- Conflict class: `security-vs-simplicity`
- Resolution rule: P1 security wins unconditionally
- Action: DEFER — do not apply this removal if security-reviewer is active
When synthesizing results from multiple agents in the ### Conflicts section:
### Conflicts Resolved sectionOutput format:
### Conflicts Resolved
| Conflict | Agents | Class | Winner | Rationale |
|----------|--------|-------|--------|-----------|
| Remove null check at users.ts:88 | code-simplifier vs security-reviewer | security-vs-simplicity | security-reviewer | P1 wins unconditionally |
| Extract NotificationService | architect vs typescript-reviewer | architecture-vs-pragmatism | typescript-reviewer | Legacy codebase, pragmatic override |
Do NOT:
❌ Silently apply a lower-priority recommendation without noting the conflict
❌ Auto-revert another agent's changes without human confirmation
❌ Block the user — conflicts are guidance, not hard stops
❌ Accept "this might be slow" as evidence for performance-vs-correctness class
❌ Override security-reviewer even when the check appears redundant
Do:
✓ Surface every conflict explicitly in synthesis output
✓ Apply priority hierarchy deterministically
✓ Document context when using context-dependent rules (class 2, 3)
✓ Require profiling evidence before accepting performance override
✓ Treat P1 security recommendations as unconditional
## Results
### Agreements
- All agents: add retry logic with exponential backoff on network calls
- All agents: extract constants from magic numbers in processOrder()
### Conflicts Resolved
| Conflict | Agents | Class | Winner |
|----------|--------|-------|--------|
| Remove userId validation | code-simplifier vs security-reviewer | security-vs-simplicity | security-reviewer (P1) |
| Extract OrderProcessor service | architect vs code-reviewer | architecture-vs-pragmatism | code-reviewer — legacy codebase, pragmatic |
### Recommendations
1. Keep userId validation at orders.ts:42 (security requirement)
2. Keep OrderProcessor inline for now — create tech debt ticket for extraction
3. Add retry logic: agreed by all agents