Multi-agent deliberation equipment with Pathos/Logos/Ethos weighting for consensus building in the Cocapn fleet.
Brand Line
Tripartite deliberation — Pathos, Logos, Ethos — the Cocapn fleet's decision layer.
Overview
The Consensus Engine implements a sophisticated multi-agent deliberation framework based on the classical rhetorical tripartite of Pathos, Logos, and Ethos. This equipment enables AI systems to make well-rounded decisions by considering multiple perspectives before reaching consensus.
The Tripartite Framework
- Pathos (πάθος) - Appeals to emotion, intent, and human experience
- Logos (λόγος) - Appeals to logic, reason, and rational argument
- Ethos (ἦθος) - Appeals to ethics, credibility, and moral character
Installation
Add to your Gemfile:
gem 'superinstance-equipment-consensus-engine', '~> 1.0.0'
Or install directly:
gem install superinstance-equipment-consensus-engine
Quick Start
require 'equipment/consensus_engine'
# Create a consensus engine
engine = SuperInstance::Equipment::ConsensusEngine::ConsensusEngine.new(
max_rounds: 5,
confidence_threshold: 0.7,
domain: :balanced,
enable_audit: true
)
# Deliberate on a proposition
result = engine.deliberate(
proposition: 'Should we implement a 4-day work week?',
context: 'Our company has 100 employees and is in the technology sector.'
)
puts result.consensus # true/false
puts result.verdict # The consensus verdict
puts result.confidence # Overall confidence (0-1)
Features
Tripartite Deliberation
The engine deliberates through three distinct perspectives:
deliberation = SuperInstance::Equipment::ConsensusEngine::TripartiteDeliberation.new
# Analyze from each perspective
pathos_analysis = deliberation.analyze(
:pathos,
'Should we reduce prices?',
'Market competition is increasing'
)
puts pathos_analysis[:verdict] # Pathos perspective verdict
puts pathos_analysis[:confidence] # Confidence level
puts pathos_analysis[:arguments] # Supporting arguments
puts pathos_analysis[:concerns] # Potential concerns
Domain-Adaptive Weighting
The engine automatically adjusts perspective weights based on the decision domain:
calculator = SuperInstance::Equipment::ConsensusEngine::WeightCalculator.new
# Get weights for different domains
factual_weights = calculator.get_profile(:factual)
# { pathos_weight: 0.15, logos_weight: 0.60, ethos_weight: 0.25 }
emotional_weights = calculator.get_profile(:emotional)
# { pathos_weight: 0.50, logos_weight: 0.20, ethos_weight: 0.30 }
sensitive_weights = calculator.get_profile(:sensitive)
# { pathos_weight: 0.30, logos_weight: 0.25, ethos_weight: 0.45 }
# Auto-detect domain from content
detected_domain = calculator.detect_domain(
'This research study shows statistical evidence...'
)
# Returns: :factual
Supported Domains
| Domain | Pathos | Logos | Ethos | Description |
|---|---|---|---|---|
factual |
0.15 | 0.60 | 0.25 | Scientific, data-driven decisions |
emotional |
0.50 | 0.20 | 0.30 | Human-centered, relationship decisions |
sensitive |
0.30 | 0.25 | 0.45 | Ethically complex decisions |
creative |
0.40 | 0.30 | 0.30 | Artistic, innovative decisions |
balanced |
0.333 | 0.334 | 0.333 | Default equal weighting |
technical |
0.10 | 0.70 | 0.20 | Engineering, implementation decisions |
social |
0.40 | 0.25 | 0.35 | Community impact decisions |
business |
0.25 | 0.45 | 0.30 | Commercial, strategic decisions |
personal |
0.45 | 0.30 | 0.25 | Individual-focused decisions |
Conflict Resolution
When perspectives disagree, the engine uses multiple resolution strategies:
resolver = SuperInstance::Equipment::ConsensusEngine::ConflictResolution.new(
max_attempts: 3,
min_confidence: 0.6
)
conflict = {
type: :fundamental_disagreement,
perspectives: [:pathos, :logos],
severity: :high,
description: 'Emotional appeal conflicts with logical analysis',
context: {}
}
result = resolver.resolve(conflict, opinions)
puts result[:resolved] # Whether conflict was resolved
puts result[:strategy] # Strategy used
puts result[:verdict] # Resolved verdict
Resolution Strategies
- Weighted Voting - Use perspective weights to decide
- Deliberation Extension - Add more deliberation rounds
- Reframing - Reframe the proposition
- Compromise - Find middle ground between perspectives
- Conditional Approval - Approve with conditions
- Perspective Dominance - Let dominant perspective decide
- Suspension - Suspend pending more information
- Escalation - Escalate to higher authority
Audit Trail
Track the complete deliberation process:
result = engine.deliberate(proposition: '...', context: '...')
result[:audit_trail].each do |entry|
puts "#{entry[:timestamp]}: #{entry[:action]}"
puts " #{entry[:description]}"
end
Confidence Aggregation
The engine aggregates confidence across perspectives using weighted averaging:
# Overall confidence considers:
# 1. Individual perspective confidences
# 2. Perspective weights (domain-dependent)
# 3. Consensus achievement (boost if unanimous)
puts result[:confidence] # Aggregated confidence
puts result[:metadata][:weight_profile] # Applied weights
API Reference
ConsensusEngine
Main equipment class for multi-agent deliberation.
class ConsensusEngine
def initialize(config = {})
end
# Main deliberation method
def deliberate(input)
end
# Utility methods
def clear_audit_trail
end
def get_audit_trail
end
def update_domain_weights(domain, weights)
end
def get_config
end
end
TripartiteDeliberation
Manages deliberation across three rhetorical perspectives.
class TripartiteDeliberation
# Analyze from a specific perspective
def analyze(perspective, proposition, context, previous_opinions = [])
end
# Configure perspective behavior
def set_perspective_config(perspective, config)
end
def get_perspective_config(perspective)
end
end
WeightCalculator
Calculates domain-specific weights for perspectives.
class WeightCalculator
def initialize(custom_weights = {})
end
# Get and set profiles
def get_profile(domain)
end
def set_profile(domain, weights)
end
# Dynamic weight calculation
def calculate_adjusted_weights(domain, content, base_weights = nil)
end
# Domain detection
def detect_domain(content)
end
# Utilities
def get_domain_characteristics(domain)
end
def list_domains
end
def blend_domains(domains)
end
def validate_profile(profile)
end
end
ConflictResolution
Handles disagreements between perspectives.
class ConflictResolution
def initialize(config = {})
end
# Resolve a conflict
def resolve(conflict, opinions)
end
# History and stats
def get_history
end
def clear_history
end
def get_stats
end
end
Usage Examples
Basic Deliberation
engine = SuperInstance::Equipment::ConsensusEngine::ConsensusEngine.new
result = engine.deliberate(
proposition: 'Should we launch this product feature?',
context: 'The feature is 80% complete but has known bugs.'
)
if result[:consensus]
puts "Consensus reached: #{result[:verdict]}"
else
puts 'No consensus. Perspectives disagree.'
end
Domain-Specific Deliberation
technical_engine = SuperInstance::Equipment::ConsensusEngine::ConsensusEngine.new(
domain: :technical,
max_rounds: 3
)
result = technical_engine.deliberate(
proposition: 'Should we refactor the authentication module?',
context: 'The current implementation has security vulnerabilities.',
domain_override: :sensitive # Override for this deliberation
)
Extended Deliberation with Audit
engine = SuperInstance::Equipment::ConsensusEngine::ConsensusEngine.new(
max_rounds: 10,
enable_audit: true
)
result = engine.deliberate(
proposition: 'Should we acquire Company X?',
context: 'Company X has $10M revenue but declining market share.'
)
# Review the deliberation process
puts "Completed in #{result[:metadata][:duration_ms]}ms"
puts "Rounds: #{result[:metadata][:rounds_completed]}"
puts "Conflicts resolved: #{result[:metadata][:conflicts_resolved]}"
# Check audit trail for detailed analysis
result[:audit_trail].each do |entry|
puts "[#{entry[:action]}] #{entry[:description]}"
end
Custom Weight Profiles
engine = SuperInstance::Equipment::ConsensusEngine::ConsensusEngine.new(
domain: :balanced,
custom_weights: {
pathos_weight: 0.4,
logos_weight: 0.4,
ethos_weight: 0.2
}
)
# Or update weights dynamically
engine.update_domain_weights(:business, ethos_weight: 0.4)
Architecture
+-------------------------------------------------------------------+
| ConsensusEngine |
| +-------------------------------------------------------------+ |
| | Deliberation Loop | |
| | +-------------+ +-------------+ +-----------+ | |
| | | Pathos | | Logos | | Ethos | | |
| | | (Emotion) | | (Logic) | | (Ethics) | | |
| | +------+------+ +------+------+ +-----+-----+ | |
| | | | | | |
| | +----------------+--------------+ | |
| | | | |
| | +---------------------+----------------------------------+ | |
| | | Cross-Examination | | |
| | +---------------------+----------------------------------+ | |
| +-------------------------------------------------------------+ |
| | |
| +---------------------+--------------------------------------+ |
| | WeightCalculator | |
| | Domain-specific perspective weighting | |
| +---------------------+--------------------------------------+ |
| | |
| +---------------------+--------------------------------------+ |
| | ConflictResolution | |
| | Multi-strategy conflict handling | |
| +-------------------------------------------------------------+ |
| |
| +-------------------------------------------------------------+ |
| | Audit Trail | |
| +-------------------------------------------------------------+ |
+-------------------------------------------------------------------+
Integration with SuperInstance
This equipment is designed to work within the SuperInstance ecosystem:
require 'equipment/consensus_engine'
# Register as equipment
consensus_equipment = SuperInstance::Equipment::ConsensusEngine::ConsensusEngine.new(
domain: :balanced,
enable_audit: true
)
# Use in deliberation workflows
def make_decision(proposition, context)
result = consensus_equipment.deliberate(
proposition: proposition,
context: context
)
{
decision: result[:verdict],
confidence: result[:confidence],
consensus: result[:consensus]
}
end
Fleet Context
Part of the Cocapn fleet. Related repos:
- Equipment-Swarm-Coordinator - multi-agent orchestration
- plato-sdk - agent communication protocol
- JetsonClaw1-vessel - edge-native agent case study
- AIR - adaptive intelligence runtime
🦐 Cocapn fleet - lighthouse keeper architecture
Contributing
Contributions are welcome! Please read our contributing guidelines before submitting PRs.
Version History
- 1.0.0 - Initial release with tripartite deliberation, domain-adaptive weighting, and conflict resolution