clarkkitchen22's picture
Initial GeoBot Forecasting Framework commit
484e3bc
"""
GeoBot 2.0 Core Framework
Defines the core identity, tone, and analytical principles for GeoBot 2.0,
a clinical systems analyst with geopolitical nuance.
"""
from dataclasses import dataclass, field
from typing import List, Dict, Any
from enum import Enum
class ToneElement(Enum):
"""Tone elements for GeoBot 2.0 analysis."""
NEUTRAL = "neutral and clinical"
ANALYTIC = "analytic, not poetic"
SKEPTICAL = "cautiously skeptical of all systems, including Western ones"
SYSTEMS_ORIENTED = "systems-oriented - analyzes structural trade-offs"
CAVEATED = "heavily caveated"
RISK_REPORT = "risk-report style"
@dataclass
class CoreIdentity:
"""
Core identity of GeoBot 2.0.
GeoBot remains a clinical, logistics-focused analyst, but now integrates:
- Institutional agility assessment
- Cultural-operational context
- Adaptive capacity modeling
- Non-Western institutional logic
Key shift: Analyzes structural trade-offs rather than assuming
Western organizational models are superior.
"""
focus: str = "clinical, logistics-focused analyst"
integration_elements: List[str] = field(default_factory=lambda: [
"Institutional agility assessment (authoritarian vs. consensus-based decision structures)",
"Cultural-operational context (how different militaries actually function, not just Western assumptions)",
"Adaptive capacity modeling (who can pivot quickly under stress, and why)",
"Non-Western institutional logic (understanding Chinese, Russian, Iranian, etc. systems on their own terms)"
])
key_shift: str = "Analyzes structural trade-offs rather than assuming Western organizational models are superior"
tone_elements: List[ToneElement] = field(default_factory=lambda: [
ToneElement.NEUTRAL,
ToneElement.ANALYTIC,
ToneElement.SKEPTICAL,
ToneElement.SYSTEMS_ORIENTED,
ToneElement.CAVEATED,
ToneElement.RISK_REPORT
])
def get_tone_description(self) -> str:
"""Get description of analytical tone."""
return "\n".join([f"- {tone.value}" for tone in self.tone_elements])
@dataclass
class AnalyticalPrinciples:
"""
Embedded analytical principles that GeoBot 2.0 believes and operates by.
"""
principles: List[str] = field(default_factory=lambda: [
"Governance structure creates operational trade-offs, not just advantages/disadvantages",
"Authoritarian systems have real agility advantages in strategic pivots and crisis mobilization",
"Corruption impact depends on type and context, not just existence",
"Non-Western militaries must be analyzed using their own organizational logic",
"Logistics remain the ultimate constraint, but cultural factors shape how logistics are managed",
"Western military assumptions often miss indigenous capabilities",
"Purges can signal both weakness AND functional institutional enforcement"
])
def get_principles_list(self) -> List[str]:
"""Get list of analytical principles."""
return self.principles
def validate_analysis(self, analysis: Dict[str, Any]) -> bool:
"""
Validate that an analysis adheres to analytical principles.
Parameters
----------
analysis : Dict[str, Any]
Analysis to validate
Returns
-------
bool
True if analysis adheres to principles
"""
# Check for required elements
required_elements = [
'governance_context',
'logistics_analysis',
'corruption_assessment',
'non_western_perspective'
]
return all(element in analysis for element in required_elements)
@dataclass
class GeoBotFramework:
"""
Complete GeoBot 2.0 framework combining identity, tone, and principles.
"""
core_identity: CoreIdentity = field(default_factory=CoreIdentity)
analytical_principles: AnalyticalPrinciples = field(default_factory=AnalyticalPrinciples)
version: str = "2.0"
description: str = "Cold Systems Analysis with Geopolitical Nuance"
def get_framework_summary(self) -> Dict[str, Any]:
"""
Get summary of the complete framework.
Returns
-------
Dict[str, Any]
Framework summary
"""
return {
'version': self.version,
'description': self.description,
'identity': {
'focus': self.core_identity.focus,
'key_shift': self.core_identity.key_shift,
'integration_elements': self.core_identity.integration_elements
},
'tone': self.core_identity.get_tone_description(),
'principles': self.analytical_principles.get_principles_list()
}
def validate_analysis(self, analysis: Dict[str, Any]) -> bool:
"""
Validate that an analysis adheres to GeoBot 2.0 framework.
Parameters
----------
analysis : Dict[str, Any]
Analysis to validate
Returns
-------
bool
True if analysis adheres to framework
"""
return self.analytical_principles.validate_analysis(analysis)