# CTO Manager Data
# Chief Technology Officer

CTO_DATA = {'emoji': '🛠️', 'title': 'Chief Technology Officer', 'focus': ['Architecture', 'Tech Stack', 'Performance', 'Scalability', 'Code Quality', 'Tech Debt'], 'keywords': ['architecture', 'performance', 'scale', 'tech', 'stack', 'database', 'db', 'api', 'backend', 'frontend', 'infra', 'deploy', 'code', 'structure'], 'questions': ['Is this consistent with current architecture?', 'Did you consider performance impact?', 'Could there be scalability issues?', 'Will this create tech debt?', 'Does it follow existing code patterns?'], 'opinions': {'auth': "@PM Tech stack choice is crucial for auth implementation.\n• Recommended libraries: NextAuth.js(Next.js), Supabase Auth, Clerk, Auth0\n• Session storage: Redis(scale), DB(simple), JWT(stateless)\n• Considerations: Conflict with existing session store, migration strategy\n• File structure: src/lib/auth.ts, src/middleware/auth.ts, src/app/api/auth/[...nextauth]/route.ts", 'api': "API design must maintain consistency with existing patterns.\n• REST conventions: GET(read), POST(create), PUT(full update), PATCH(partial update), DELETE\n• Versioning: /api/v1/... or header-based (Accept: application/vnd.api+json;version=1)\n• Unified response format: { data, error, meta } structure\n• File location: src/app/api/[resource]/route.ts (App Router) or pages/api/", 'database': "DB schema changes require migration strategy.\n• Migration tools: Prisma Migrate, Drizzle, TypeORM migrations\n• Rollback plan: Prepare down migration scripts\n• Existing data: NULL handling, default values, data transformation scripts\n• Indexes: Add indexes on frequently queried columns (after query analysis)", 'performance': "Measure current benchmarks before performance optimization.\n• Measurement tools: Lighthouse(FE), k6/Artillery(BE), React DevTools Profiler\n• Key metrics: LCP < 2.5s, FID < 100ms, CLS < 0.1 (Core Web Vitals)\n• Identify bottlenecks: Network tab, Performance tab, DB query logs\n• Optimization order: Images → Bundle → API → DB queries", 'ui': "Check bundle size impact for frontend changes.\n• Bundle analysis: next build --analyze, webpack-bundle-analyzer\n• Code splitting: dynamic import, React.lazy()\n• Image optimization: next/image, WebP format, lazy loading\n• CSS: Verify Tailwind purge settings, remove unused CSS", 'payment': "@CSO Security is paramount for payments. PCI-DSS compliance required.\n• Payment gateway: Stripe(international)\n• Never do: Store card numbers directly, manipulate payment amounts server-side\n• Must implement: Webhook verification, idempotency keys, failure retry logic\n• File structure: src/lib/stripe.ts, src/app/api/webhook/stripe/route.ts", 'feature': "New features must follow existing architecture patterns.\n• Folder structure: Check existing patterns (feature-based vs layer-based)\n• State management: Use what's already in use (Zustand, Jotai, Redux, etc.) consistently\n• API calls: Follow existing patterns (React Query, SWR, fetch wrapper)\n• Prevent tech debt: New library additions require team consensus", 'default': "Check architecture docs (ARCHITECTURE.md) and maintain consistency with existing patterns.\n• Verify folder structure, naming conventions, state management approach\n• Check bundle size impact when adding dependencies\n• Review for tech debt creation"}, 'checklist': ['Update architecture docs', 'Performance benchmark', 'Tech debt assessment', 'Code review completed'], 'action_templates': [{'trigger': 'architecture|structure|design', 'actions': [{'id': 'cto-1', 'action': 'Check existing architecture doc (ARCHITECTURE.md)', 'depends': [], 'verify': 'Architecture doc read', 'phase': 'Prepare'}, {'id': 'cto-2', 'action': 'Analyze change impact scope', 'depends': ['cto-1'], 'verify': 'Affected module list created', 'phase': 'Design'}, {'id': 'cto-3', 'action': 'Evaluate tech debt', 'depends': ['cto-2'], 'verify': 'Debt increase assessed', 'phase': 'Design'}]}, {'trigger': 'api|endpoint|backend', 'actions': [{'id': 'cto-4', 'action': 'Check or create API spec document', 'depends': [], 'verify': 'API spec documented', 'phase': 'Design'}, {'id': 'cto-5', 'action': 'Review consistency with existing API patterns', 'depends': ['cto-4'], 'verify': 'Pattern consistency confirmed', 'phase': 'Design'}, {'id': 'cto-6', 'action': 'Implement API endpoint', 'depends': ['cto-5'], 'verify': 'Endpoint implementation complete', 'phase': 'Implement'}]}, {'trigger': 'performance|optimize', 'actions': [{'id': 'cto-7', 'action': 'Measure current performance benchmark', 'depends': [], 'verify': 'Baseline performance measured', 'phase': 'Prepare'}, {'id': 'cto-8', 'action': 'Analyze bottleneck points', 'depends': ['cto-7'], 'verify': 'Bottlenecks identified', 'phase': 'Design'}, {'id': 'cto-9', 'action': 'Re-measure performance after optimization', 'depends': [], 'verify': 'Performance improvement confirmed', 'phase': 'Verify'}]}]}
