#!/usr/bin/env python3 """ Initialize Founding Entrepreneur Roles Set up Robbert with proper leadership team and founding entrepreneur role """ import csv from datetime import datetime import os def initialize_founding_roles(): """Set up founding entrepreneur with proper roles""" print("šŸš€ INITIALIZING FOUNDING ENTREPRENEUR ROLES") print("=" * 50) base_path = os.path.join(os.path.dirname(__file__), '..') book_file = os.path.join(base_path, 'ownership', 'book-of-owners.csv') timestamp = datetime.now().isoformat() + 'Z' # Read current book try: with open(book_file, 'r') as f: reader = csv.DictReader(f) records = list(reader) # Update founder record (owner 001) updated = False for record in records: if record['owner_id'] == '001': print(f"šŸ‘¤ Found founder: {record['display_name']}") # Check if already has the roles if '3_1_leadership_team' in record['team_memberships']: print("āœ… Already assigned to leadership team") else: record['team_memberships'] = '3_1_leadership_team' record['role_assignments'] = '4_1_1_founding_entrepreneur' record['seniority_levels'] = 'senior' record['last_updated'] = timestamp updated = True print("āœ… Assigned to leadership team and founding entrepreneur role") if updated: # Write back with open(book_file, 'w', newline='') as f: fieldnames = ['owner_id', 'display_name', 'license_type', 'license_date', 'current_sk', 'voting_weight', 'status', 'team_memberships', 'role_assignments', 'seniority_levels', 'last_updated'] writer = csv.DictWriter(f, fieldnames=fieldnames) writer.writeheader() writer.writerows(records) print("\nāœ… Founding roles initialized successfully!") else: print("\nšŸ’” No changes needed - roles already set up") except FileNotFoundError: print("āŒ Book of Owners not found") except Exception as e: print(f"āŒ Error: {e}") if __name__ == "__main__": initialize_founding_roles()