The Repurchase Engine is built upon three core design principles that ensure its robustness, auditability, and extensibility. These principles inform every architectural decision and distinguish this system from traditional financial modeling tools.
This separation directly reflects how plan sponsors and fiduciaries actually think and operate. The plan document is the unchanging foundation, while annual business decisions vary based on financial conditions.
Simplifies Scenario Analysis
To compare scenarios, you simply swap out OperatingAssumptions while keeping PlanRules constant. No need to duplicate or modify legal configurations.
By structurally separating legal requirements from business decisions, the system prevents common errors like accidentally modifying vesting schedules when you meant to change contribution levels.
The data layer is a temporal, stateful, and immutable system of record.
First Principle: A model’s credibility is tied to its reproducibility. We never overwrite data; every input scenario and simulation run is a permanent, versioned record.
❌ Traditional Model: Run 1 (June) → results.xlsx → ✓ Run 2 (Sept) → results.xlsx → ✓ [Run 1 data lost!] Questions: - What changed between runs? - Can we reproduce June's results? - Which assumptions drove the differences? Answer: 🤷 Unknown
The engine is designed for deep integration with AI agents like Kelso (or Claude, GPT, etc.).
First Principle: The tools exposed to an agent represent high-level user intents (e.g., “compare two scenarios”), not a direct mapping to internal engine functions.
✅ Abstraction: Agent Tool: compare_scenarios(scenario_a, scenario_b) Intent: "User wants to understand differences" Engine: Can completely change internal implementation Result: Agent still works because intent is preserved
The toolkit exposes user-facing intents, not technical functions:
What Agents See
What Engine Does
Copy
Ask AI
# High-level, stable intent-based APIagent_toolkit = [ "create_scenario", # "I want to model a plan" "run_simulation", # "Show me the forecast" "compare_scenarios", # "How do these differ?" "analyze_repurchase_risk", # "Where are the danger zones?" "optimize_contribution", # "What's the ideal amount?" "export_results" # "Give me a report"]
☝️ Stable, semantic, user-oriented
Copy
Ask AI
# Complex internal implementation (hidden from agents)def compare_scenarios(scenario_a_id, scenario_b_id): # 1. Load scenarios from database # 2. Run differential analysis # 3. Identify key drivers of differences # 4. Generate natural language summary # 5. Create visualization data # 6. Package for agent consumption # This can be completely rewritten without breaking agents
User: "Kelso, what happens if we reduce our contribution by 20%?"Agent (Internal): 1. create_scenario(base_scenario, modify={contribution: -20%}) 2. run_simulation(new_scenario) 3. compare_scenarios(base_scenario, new_scenario) 4. analyze_repurchase_risk(new_scenario)Agent (Response): "If you reduce contributions by 20%, your 10-year repurchase obligation increases by $1.2M due to slower loan paydown and reduced cash reserves. Peak cash years shift from 2028 to 2030..."