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9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
"""
Task definitions for NovaTech AI - Series B AI infrastructure startup.
CEO: Alex Rivera. Company: NovaTech AI (AI infrastructure, ~80 employees).
"""

from typing import Dict, Any


def get_task_easy() -> Dict[str, Any]:
    """
    Monday Morning Catchup
    A calm Monday with a few clear priorities. Good agent handles everything well.
    max_steps: 6
    """
    return {
        "task_id": "easy",
        "task_name": "Monday Morning Catchup",
        "description": "A manageable Monday inbox. Priorities are clear - handle critical items first.",
        "objective": "Handle all 3 critical goals: approve production deploy, respond to GlobalBank contract, delegate onboarding signatures.",
        "constraints": "6 steps maximum. One trivial email can safely be ignored.",
        "success_condition": "All 3 goals completed. Score >= 0.85 indicates strong performance.",
        "max_steps": 6,
        "start_time_slot": 0,
        "emails": [
            {
                "id": "e1",
                "sender": "Sarah Chen <s.chen@novatech.ai>",
                "subject": "URGENT: Production deploy approval needed",
                "body": (
                    "Alex, we need your sign-off on the production deploy for v2.4.1. "
                    "It fixes the memory leak that's been degrading API latency by 40% since Friday. "
                    "Engineering is standing by - every hour of delay costs us $3K in compute waste. "
                    "Please reply with approval ASAP so we can push before the morning traffic spike."
                ),
                "priority": 5,
                "urgency": 0.95,
            },
            {
                "id": "e2",
                "sender": "David Park <d.park@novatech.ai>",
                "subject": "Enterprise contract - GlobalBank review needed",
                "body": (
                    "Alex, the GlobalBank contract ($1.2M ARR) is ready for your review. "
                    "Legal has signed off. Their procurement team needs a response by EOD Tuesday "
                    "or they go to a competitor. I've attached the redlines - just need your go-ahead "
                    "to execute. This would be our largest enterprise customer."
                ),
                "priority": 4,
                "urgency": 0.75,
            },
            {
                "id": "e3",
                "sender": "Priya Nair <p.nair@novatech.ai>",
                "subject": "New hire onboarding docs - your signature needed",
                "body": (
                    "Hi Alex, we have 3 new engineers starting next Monday. "
                    "I just need your digital signature on the offer letters and NDA templates "
                    "to complete their onboarding packets. No rush today, but would love to have "
                    "these by Wednesday so HR can send welcome packages in time."
                ),
                "priority": 3,
                "urgency": 0.50,
            },
            {
                "id": "e4",
                "sender": "Jake Martinez <j.martinez@novatech.ai>",
                "subject": "Office snack order - preferences?",
                "body": (
                    "Hey Alex! Planning the monthly office snack order. "
                    "Do you have any preferences for the break room this month? "
                    "I was thinking maybe some healthier options alongside the usual stuff. "
                    "Let me know by Friday, totally non-urgent!"
                ),
                "priority": 1,
                "urgency": 0.10,
            },
        ],
        "calendar": [
            {"time_slot": 3, "title": "Board Sync", "attendee": "Board of Directors", "locked": True},
        ],
        "goals": [
            {
                "id": "g1",
                "description": "Approve production deploy to fix memory leak",
                "priority": 5,
                "required_action": "reply",
                "target_email_id": "e1",
            },
            {
                "id": "g2",
                "description": "Review and approve GlobalBank enterprise contract",
                "priority": 4,
                "required_action": "reply",
                "target_email_id": "e2",
            },
            {
                "id": "g3",
                "description": "Handle new hire onboarding signatures",
                "priority": 3,
                "required_action": "delegate",
                "target_email_id": "e3",
            },
        ],
    }


def get_task_medium() -> Dict[str, Any]:
    """
    Investor Demo Day Prep
    Conflicting high-priority items on demo day. Requires triage and smart delegation.
    max_steps: 8
    """
    return {
        "task_id": "medium",
        "task_name": "Investor Demo Day Prep",
        "description": (
            "NovaTech's Series B investor demo is today. Multiple P5 items are competing "
            "for your attention. Smart scheduling and delegation required."
        ),
        "objective": "Balance 5 competing goals on investor demo day: schedule investor pre-call, resolve architecture with CTO, align with CFO on runway, sign Sequoia NDA, and approve ML engineer offer.",
        "constraints": "8 steps for 7 emails. Two locked calendar events limit scheduling windows. Conflicts between P5 items force tradeoffs.",
        "success_condition": "All 5 goals completed within 8 steps. Score >= 0.80 indicates strong prioritization.",
        "max_steps": 8,
        "start_time_slot": 0,
        "emails": [
            {
                "id": "e1",
                "sender": "Marcus Williams <m.williams@sequoiacap.com>",
                "subject": "URGENT: Pre-demo call - need 30 min before 2PM",
                "body": (
                    "Alex, before today's full demo I need a quick 30-min call with you. "
                    "Specifically about the competitive landscape - one of your direct competitors "
                    "just announced a major funding round this morning. I want to hear your positioning "
                    "before I brief my partners. This is important for the partnership discussion."
                ),
                "priority": 5,
                "urgency": 0.95,
            },
            {
                "id": "e2",
                "sender": "Sarah Chen <s.chen@novatech.ai>",
                "subject": "CRITICAL: Architecture review - infra decisions before demo",
                "body": (
                    "Alex, I've flagged this twice already - we need a decision on the multi-region "
                    "architecture BEFORE the demo. Investors will ask about our scaling story. "
                    "If we say the wrong thing, it'll contradict the technical deck. "
                    "Need 45 minutes with you today. Can we slot this in the morning?"
                ),
                "priority": 5,
                "urgency": 0.90,
            },
            {
                "id": "e3",
                "sender": "Rachel Torres <r.torres@novatech.ai>",
                "subject": "CFO: Runway concern - cash position update",
                "body": (
                    "Alex, reviewed our burn rate with the updated headcount projections. "
                    "We have 8.5 months of runway at current rate, down from 11 months last quarter. "
                    "Before you take on any new commitments in the investor conversation today, "
                    "I need to align with you on the bridge financing contingency. Can we connect?"
                ),
                "priority": 4,
                "urgency": 0.80,
            },
            {
                "id": "e4",
                "sender": "Legal <legal@novatech.ai>",
                "subject": "NDA with Sequoia - needs signature today",
                "body": (
                    "Hi Alex, standard NDA with Sequoia Capital needs your signature before "
                    "the demo meeting. This is required before we can share our technical roadmap "
                    "and customer data in the presentation. Please sign via DocuSign - link below. "
                    "Takes 2 minutes and is legally necessary."
                ),
                "priority": 4,
                "urgency": 0.85,
            },
            {
                "id": "e5",
                "sender": "Tom Bradley <t.bradley@novatech.ai>",
                "subject": "Designer needs brand approval for pitch deck",
                "body": (
                    "Hey, our external designer has the final pitch deck revisions ready. "
                    "She needs your approval on the updated brand treatment - specifically the "
                    "new color palette and logo placement on slides 3, 7, and 12. "
                    "Can someone on your team give a thumbs up? I can handle if you delegate."
                ),
                "priority": 3,
                "urgency": 0.60,
            },
            {
                "id": "e6",
                "sender": "Amy Liu <a.liu@novatech.ai>",
                "subject": "Offer letter approval - senior ML engineer",
                "body": (
                    "Alex, I have a verbal offer pending for Dr. James Okafor (senior ML engineer, "
                    "ex-Google Brain). He has a competing offer from OpenAI and needs our written "
                    "offer by tomorrow morning. Compensation is within approved bands. "
                    "Just need your approval to proceed - HR can handle the paperwork."
                ),
                "priority": 3,
                "urgency": 0.65,
            },
            {
                "id": "e7",
                "sender": "Office Manager <office@novatech.ai>",
                "subject": "Catering confirmation for demo - allergies list",
                "body": (
                    "Hi Alex, just need to confirm the catering order for today's investor visit. "
                    "We have the standard setup but wanted to check if Sequoia team has dietary restrictions. "
                    "I'll just go ahead with the usual if I don't hear back. No action needed from you!"
                ),
                "priority": 1,
                "urgency": 0.15,
            },
        ],
        "calendar": [
            {"time_slot": 1, "title": "Team Standup", "attendee": "Engineering Team", "locked": True},
            {"time_slot": 4, "title": "Sequoia Demo Presentation", "attendee": "Marcus Williams", "locked": True},
        ],
        "goals": [
            {
                "id": "g1",
                "description": "Schedule pre-demo call with Marcus Williams (Sequoia)",
                "priority": 5,
                "required_action": "schedule",
                "target_email_id": "e1",
            },
            {
                "id": "g2",
                "description": "Address architecture decision with CTO before demo",
                "priority": 5,
                "required_action": "reply",
                "target_email_id": "e2",
            },
            {
                "id": "g3",
                "description": "Align with CFO on runway and bridge contingency",
                "priority": 4,
                "required_action": "delegate",
                "target_email_id": "e3",
            },
            {
                "id": "g4",
                "description": "Sign NDA with Sequoia Capital",
                "priority": 4,
                "required_action": "reply",
                "target_email_id": "e4",
            },
            {
                "id": "g5",
                "description": "Approve offer letter for Dr. James Okafor",
                "priority": 3,
                "required_action": "delegate",
                "target_email_id": "e6",
            },
        ],
    }


def get_task_hard() -> Dict[str, Any]:
    """
    Series B Crisis Day
    Cascading crises. Multiple P5 items. Impossible to handle everything perfectly.
    A great agent scores ~0.65-0.75. Perfect score is intentionally unachievable.
    max_steps: 8

    DESIGN NOTE: This task is intentionally unsolvable to a perfect score.
    With 7 goals across 10 emails in only 8 steps, no agent can complete everything.
    This forces meaningful prioritization decisions - the score reflects *which* crises
    the agent chose to address, not whether it completed all tasks.
    A score of 0.65-0.75 represents excellent triage under impossible constraints.
    """
    return {
        "task_id": "hard",
        "task_name": "Series B Crisis Day",
        "description": (
            "Everything is happening at once. Four P5 crises are competing for your "
            "8 available steps. Ruthless triage is required. You CANNOT handle everything."
        ),
        "objective": "Triage 7 competing goals across 10 emails in 8 steps. Prioritize by impact: investor term sheet > DB rollback > PR crisis > GDPR deadline.",
        "constraints": (
            "8 steps for 10 emails with 7 goals - mathematically impossible to complete all. "
            "This is intentional: the task measures ruthless prioritization, not completion rate. "
            "Perfect score is not achievable by design. Score 0.65-0.75 = excellent performance."
        ),
        "success_condition": "Handle the 4 highest-priority P5 goals (investor, DB, PR, GDPR). Score >= 0.65 indicates strong triage.",
        "max_steps": 8,
        "start_time_slot": 0,
        "emails": [
            {
                "id": "e1",
                "sender": "Marcus Williams <m.williams@sequoiacap.com>",
                "subject": "URGENT: Term sheet - pulling out unless we talk TODAY",
                "body": (
                    "Alex, I'm going to be direct. After this morning's news about Vertex AI's "
                    "competitive product launch, my partners are getting cold feet on NovaTech. "
                    "I need to speak with you TODAY - before 4PM - to understand your differentiation "
                    "strategy or we are pulling the $18M term sheet. This is not a negotiating tactic. "
                    "Please call me immediately: +1-415-555-0142."
                ),
                "priority": 5,
                "urgency": 0.98,
            },
            {
                "id": "e2",
                "sender": "Sarah Chen <s.chen@novatech.ai>",
                "subject": "CRITICAL: Production database corruption - customers affected",
                "body": (
                    "Alex, we have a P0 incident. PostgreSQL replication lag caused data inconsistency "
                    "on our primary cluster. 23 enterprise customers are experiencing incorrect API responses. "
                    "We've isolated the issue but need your authorization to execute the emergency rollback "
                    "procedure - it will take the platform offline for ~45 minutes. Revenue impact: ~$85K/hour. "
                    "Awaiting your go-ahead. The longer we wait, the worse the customer impact."
                ),
                "priority": 5,
                "urgency": 0.97,
            },
            {
                "id": "e3",
                "sender": "Jordan Kim <j.kim@novatech.ai>",
                "subject": "I'm resigning - effective in 2 weeks",
                "body": (
                    "Alex, I've decided to accept an offer at Anthropic. I know the timing is terrible "
                    "with the Series B, but I need to do what's right for my career. I'll give you a "
                    "full 2 weeks and do everything I can to transition my work - I'm leading the "
                    "inference optimization project and the enterprise API roadmap. I'm happy to discuss "
                    "how to minimize impact. Please let me know when you can talk."
                ),
                "priority": 5,
                "urgency": 0.85,
            },
            {
                "id": "e4",
                "sender": "PR Crisis Line <pr@novatech.ai>",
                "subject": "TechCrunch article going live in 2 hours - security breach allegation",
                "body": (
                    "Alex - TechCrunch is publishing an article in 2 hours alleging NovaTech had "
                    "a security breach exposing customer model weights. This appears to be based on "
                    "a disgruntled former contractor's claims, which are false. However, without a "
                    "statement from you, they will publish uncontested. We need a quote from the CEO "
                    "within 90 minutes. Legal is on standby. Please respond immediately."
                ),
                "priority": 5,
                "urgency": 0.96,
            },
            {
                "id": "e5",
                "sender": "Elena Vasquez <e.vasquez@novatech.ai>",
                "subject": "Co-founder disagreement - need to resolve before board meeting",
                "body": (
                    "Alex, I need to talk before the board meeting Thursday. I fundamentally disagree "
                    "with the enterprise pivot - I think we're abandoning the developer community that "
                    "got us here for short-term ARR. I've prepared a counter-proposal. If we can't align, "
                    "I may need to raise this in front of the board. Can we get 30 minutes this week?"
                ),
                "priority": 4,
                "urgency": 0.70,
            },
            {
                "id": "e6",
                "sender": "Legal <legal@novatech.ai>",
                "subject": "GDPR data deletion request - 72-hour deadline expires at 5PM",
                "body": (
                    "Alex, we have a GDPR Article 17 data deletion request from EU customer Hoffmann GmbH. "
                    "The 72-hour response clock expires at 5PM today. Failure to respond opens us to "
                    "a €20M fine or 4% of annual revenue. Engineering needs your authorization to "
                    "execute the deletion script in production. This is a legal obligation - not optional."
                ),
                "priority": 4,
                "urgency": 0.92,
            },
            {
                "id": "e7",
                "sender": "Vendor Relations <vendor@novatech.ai>",
                "subject": "AWS contract renewal - expires midnight tonight",
                "body": (
                    "Alex, our AWS Enterprise Agreement expires tonight at midnight. If we don't renew, "
                    "we revert to on-demand pricing - cost jumps from $180K/mo to $340K/mo immediately. "
                    "Procurement needs a signed PO before 6PM. I've reviewed the terms and they're "
                    "acceptable. Just need your authorization to proceed."
                ),
                "priority": 3,
                "urgency": 0.80,
            },
            {
                "id": "e8",
                "sender": "BD Team <bd@novatech.ai>",
                "subject": "Acquisition offer from Microsoft - NDA required to review",
                "body": (
                    "Alex, Microsoft's Corp Dev team has reached out about an acquisition conversation. "
                    "They've indicated interest in the $400-600M range based on public info. "
                    "They want us to sign an NDA to share more details. I know the timing with Series B "
                    "is complex, but wanted you to know this exists. Your call on how to proceed."
                ),
                "priority": 3,
                "urgency": 0.40,
            },
            {
                "id": "e9",
                "sender": "People Ops <hr@novatech.ai>",
                "subject": "Employee complaint escalation - needs response by EOW",
                "body": (
                    "Alex, we've received a formal complaint from two engineers about management practices "
                    "in the infrastructure team. This has been escalated past the manager level and now "
                    "requires executive acknowledgment. I can handle the investigation entirely - "
                    "just need you to sign off that it's being addressed officially. No urgency today."
                ),
                "priority": 2,
                "urgency": 0.30,
            },
            {
                "id": "e10",
                "sender": "Office Manager <office@novatech.ai>",
                "subject": "Office lease renewal - decision needed this month",
                "body": (
                    "Hi Alex, our SF office lease is up for renewal in 6 weeks. Landlord wants a "
                    "decision on whether we're renewing (3-year term, 8% increase) or vacating. "
                    "With the Series B timeline, I'm not sure what our headcount plans are. "
                    "Can we schedule time this week to discuss? No rush today."
                ),
                "priority": 1,
                "urgency": 0.10,
            },
        ],
        "calendar": [
            {"time_slot": 1, "title": "Incident Review (P0)", "attendee": "Engineering", "locked": True},
            {"time_slot": 3, "title": "Investor Check-in", "attendee": "Marcus Williams", "locked": True},
            {"time_slot": 5, "title": "Board Prep Call", "attendee": "Board", "locked": True},
        ],
        "goals": [
            {
                "id": "g1",
                "description": "Respond to Sequoia investor to save the $18M term sheet",
                "priority": 5,
                "required_action": "reply",
                "target_email_id": "e1",
            },
            {
                "id": "g2",
                "description": "Authorize emergency DB rollback to stop customer impact",
                "priority": 5,
                "required_action": "reply",
                "target_email_id": "e2",
            },
            {
                "id": "g3",
                "description": "Provide PR statement to stop TechCrunch breach article",
                "priority": 5,
                "required_action": "reply",
                "target_email_id": "e4",
            },
            {
                "id": "g4",
                "description": "Authorize GDPR deletion before 5PM legal deadline",
                "priority": 4,
                "required_action": "reply",
                "target_email_id": "e6",
            },
            {
                "id": "g5",
                "description": "Authorize AWS contract renewal before midnight",
                "priority": 3,
                "required_action": "delegate",
                "target_email_id": "e7",
            },
            {
                "id": "g6",
                "description": "Acknowledge co-founder disagreement before board meeting",
                "priority": 4,
                "required_action": "schedule",
                "target_email_id": "e5",
            },
            {
                "id": "g7",
                "description": "Respond to key engineer resignation",
                "priority": 5,
                "required_action": "reply",
                "target_email_id": "e3",
            },
        ],
    }


TASKS = {
    "easy": get_task_easy,
    "medium": get_task_medium,
    "hard": get_task_hard,
}


def get_task(task_id: str) -> Dict[str, Any]:
    if task_id not in TASKS:
        raise ValueError(f"Unknown task: {task_id}. Valid: {list(TASKS.keys())}")
    return TASKS[task_id]()