-
Notifications
You must be signed in to change notification settings - Fork 0
Implement conflict resolution protocol with pluggable ConflictResolver strategies (DESIGN_SPEC §5.6) #122
Description
Context
Implement the conflict resolution protocol defined in DESIGN_SPEC §5.6. When two or more agents disagree on an approach (architecture, implementation, priority, etc.), the framework provides multiple configurable resolution strategies behind a ConflictResolver protocol. New strategies can be added without modifying existing ones.
Previously in the backlog (§18.1), now promoted to core.
Strategies (§5.6)
Strategy 1: Authority + Dissent Log (Default)
The agent with higher authority level decides. Cross-department conflicts escalate to the lowest common manager. Losing agent's reasoning preserved as a dissent record — structured log entry containing conflict context, both positions, and resolution.
Strategy 2: Structured Debate + Judge
Both agents present arguments (1 round, capped tokens). A judge (shared manager, CEO, or configurable arbitrator) evaluates and decides. Judge's reasoning + both arguments logged as dissent record.
Strategy 3: Human Escalation
All genuine conflicts go to human approval queue with both positions summarized. Agents park the conflicting task and work on other tasks while waiting (see §12.4).
Strategy 4: Hybrid (Recommended for Production)
Combines strategies with a conflict review agent: both agents present arguments → review agent evaluates → if clear, resolve automatically with dissent record → if ambiguous, escalate to human queue.
Acceptance Criteria
Protocol Interface
-
ConflictResolverprotocol defined with standard operations (detect_conflict, resolve, log_dissent) - Strategy selection configurable via YAML (
conflict_resolution.strategy: "authority" | "debate" | "human" | "hybrid") - Strategy configurable per company, per department, or per conflict type
- New strategies addable without modifying existing ones
Implementations
- Authority strategy — hierarchy-based resolution, dissent record logging
- Debate strategy — token-capped arguments, configurable judge, dissent records
- Human strategy — escalation to human approval queue, task parking
- Hybrid strategy — review agent evaluation, auto-resolve clear cases, escalate ambiguous
Common Requirements
- Dissent record model (conflict context, both positions, resolution, timestamp)
- Cross-department conflict detection (agents in different hierarchy branches)
- Integration with human approval queue (§12.4) for escalation strategies
- Dissent records queryable for organizational learning
- Unit tests for each strategy (>80% coverage)
Dependencies
- Message bus (Implement agent-to-agent messaging with channels and topics #10) — agents need to communicate positions
- Human approval queue (Implement human approval queue API (Litestar controller + guards) #37) — for escalation strategies
- Agent hierarchy — for authority-based resolution
Design Spec Reference
- §5.6 — Conflict Resolution Protocol
- §12.4 — Approval Timeout Policy (task parking during human escalation)