63 lines
2.3 KiB
Python
63 lines
2.3 KiB
Python
![]() |
#!/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()
|