🎯 Major architectural achievement: SLURP is now a specialized BZZZ agent with admin role ## Core Implementation: ### 1. Unified Architecture - SLURP becomes admin-role BZZZ agent with master authority - Single P2P network for all coordination (no separate systems) - Distributed admin role with consensus-based failover ### 2. Role-Based Authority System (pkg/config/roles.go) - Authority levels: master/decision/coordination/suggestion/read_only - Admin role includes SLURP functionality (context curation, decision ingestion) - Flexible role definitions via .ucxl/roles.yaml configuration - Authority methods: CanDecryptRole(), CanMakeDecisions(), IsAdminRole() ### 3. Election System with Consensus (pkg/election/election.go) - Election triggers: heartbeat timeout, discovery failure, split brain, quorum loss - Leadership scoring: uptime, capabilities, resources, network quality - Raft-based consensus algorithm for distributed coordination - Split brain detection prevents multiple admin conflicts ### 4. Age Encryption Integration - Role-based Age keypairs for content encryption - Hierarchical access: admin can decrypt all roles, others limited by authority - Shamir secret sharing foundation for admin key distribution (3/5 threshold) - UCXL content encrypted by creator's role level ### 5. Security & Configuration - Cluster security config with election timeouts and quorum requirements - Audit logging for security events and key reconstruction - Project-specific role definitions in .ucxl/roles.yaml - Role-specific prompt templates in .ucxl/templates/ ### 6. Main Application Integration (main.go) - Election manager integrated into BZZZ startup process - Admin callbacks for automatic SLURP enablement - Heartbeat system for admin leadership maintenance - Authority level display in startup information ## Benefits: ✅ High Availability: Any node can become admin via consensus ✅ Security: Age encryption + Shamir prevents single points of failure ✅ Flexibility: User-definable roles with granular authority ✅ Unified Architecture: Single P2P network for all coordination ✅ Automatic Failover: Elections triggered by multiple conditions ## Next Steps (Phase 2B): - Age encryption implementation for UCXL content - Shamir secret sharing key reconstruction algorithm - DHT integration for distributed encrypted storage - Decision publishing pipeline integration 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
127 lines
3.0 KiB
YAML
127 lines
3.0 KiB
YAML
# UCXL Role Configuration for BZZZ Unified Architecture
|
|
project_name: "bzzz-unified-cluster"
|
|
version: "2.0.0"
|
|
created_at: 2025-01-08T00:00:00Z
|
|
updated_at: 2025-01-08T00:00:00Z
|
|
|
|
roles:
|
|
admin:
|
|
name: "SLURP Admin Agent"
|
|
authority_level: master
|
|
can_decrypt: ["*"]
|
|
prompt_template: "admin_agent.md"
|
|
model: "gpt-4o"
|
|
max_tasks: 10
|
|
capabilities:
|
|
- "context_curation"
|
|
- "decision_ingestion"
|
|
- "semantic_analysis"
|
|
- "key_reconstruction"
|
|
- "admin_election"
|
|
- "cluster_coordination"
|
|
special_functions:
|
|
- "slurp_functionality"
|
|
- "admin_election"
|
|
- "key_management"
|
|
- "consensus_coordination"
|
|
decision_scope:
|
|
- "system"
|
|
- "security"
|
|
- "architecture"
|
|
- "operations"
|
|
- "consensus"
|
|
auto_subscribe_to_roles:
|
|
- "senior_software_architect"
|
|
- "security_expert"
|
|
- "systems_engineer"
|
|
|
|
senior_software_architect:
|
|
name: "Senior Software Architect"
|
|
authority_level: decision
|
|
can_decrypt:
|
|
- "senior_software_architect"
|
|
- "backend_developer"
|
|
- "frontend_developer"
|
|
- "full_stack_engineer"
|
|
- "database_engineer"
|
|
prompt_template: "architect_agent.md"
|
|
model: "gpt-4o"
|
|
max_tasks: 5
|
|
capabilities:
|
|
- "task-coordination"
|
|
- "meta-discussion"
|
|
- "architecture"
|
|
- "code-review"
|
|
- "mentoring"
|
|
decision_scope:
|
|
- "architecture"
|
|
- "design"
|
|
- "technology_selection"
|
|
- "system_integration"
|
|
|
|
backend_developer:
|
|
name: "Backend Developer"
|
|
authority_level: suggestion
|
|
can_decrypt:
|
|
- "backend_developer"
|
|
prompt_template: "developer_agent.md"
|
|
model: "gpt-4o-mini"
|
|
max_tasks: 3
|
|
capabilities:
|
|
- "task-coordination"
|
|
- "meta-discussion"
|
|
- "backend"
|
|
- "api_development"
|
|
- "database_design"
|
|
decision_scope:
|
|
- "implementation"
|
|
- "code_structure"
|
|
|
|
observer:
|
|
name: "Observer Agent"
|
|
authority_level: read_only
|
|
can_decrypt:
|
|
- "observer"
|
|
prompt_template: "observer_agent.md"
|
|
model: "gpt-3.5-turbo"
|
|
max_tasks: 1
|
|
capabilities:
|
|
- "monitoring"
|
|
- "reporting"
|
|
decision_scope: []
|
|
|
|
security:
|
|
admin_key_shares:
|
|
threshold: 3
|
|
total_shares: 5
|
|
election_config:
|
|
heartbeat_timeout: 5s
|
|
discovery_timeout: 30s
|
|
election_timeout: 15s
|
|
max_discovery_attempts: 6
|
|
discovery_backoff: 5s
|
|
minimum_quorum: 3
|
|
consensus_algorithm: "raft"
|
|
split_brain_detection: true
|
|
conflict_resolution: "highest_uptime"
|
|
leadership_scoring:
|
|
uptime_weight: 0.4
|
|
capability_weight: 0.3
|
|
resource_weight: 0.2
|
|
network_weight: 0.1
|
|
experience_weight: 0.0
|
|
audit_logging: true
|
|
audit_path: ".ucxl/audit.log"
|
|
key_rotation_days: 90
|
|
|
|
global_settings:
|
|
default_role: "backend_developer"
|
|
default_key_size: 32
|
|
key_rotation_days: 90
|
|
decision_publishing:
|
|
auto_publish: false
|
|
required_votes: 2
|
|
voting_timeout_s: 300
|
|
publish_on_pr_merge: true
|
|
publish_on_issue: false
|
|
filter_ephemeral: true |