[
  {
    "id": 1,
    "category": "code",
    "prompt": "Write a JavaScript dedupeById(rows) that preserves the first occurrence, accepts id 0, and never mutates input. Include tests."
  },
  {
    "id": 2,
    "category": "code",
    "prompt": "Fix: function sum(xs){return xs.reduce((a,b)=>a+b)}. Support empty arrays; reject nonfinite numbers. Include tests."
  },
  {
    "id": 3,
    "category": "code",
    "prompt": "Write a TypeScript parsePort(value:string):number that accepts only decimal integers from 1 to 65535. Include edge tests."
  },
  {
    "id": 4,
    "category": "code",
    "prompt": "Write Python merge_intervals(intervals) for closed intervals. Preserve input and include tests for touching and nested ranges."
  },
  {
    "id": 5,
    "category": "code",
    "prompt": "Review this SQL: SELECT * FROM users WHERE email = ' + userInput + '. Explain the injection flaw and show a parameterized PostgreSQL query."
  },
  {
    "id": 6,
    "category": "code",
    "prompt": "Implement a JavaScript retry(fn, attempts) with exponential delays, no retry after success and no retry on AbortError. Include tests or test pseudocode."
  },
  {
    "id": 7,
    "category": "code",
    "prompt": "Implement a TypeScript fixed-capacity LRU cache using Map. Explain get and set ordering and cover capacity zero."
  },
  {
    "id": 8,
    "category": "code",
    "prompt": "Write a Python CSV parser using the standard library that correctly handles quoted commas and newlines. Return dictionaries and include a tiny example."
  },
  {
    "id": 9,
    "category": "code",
    "prompt": "Implement a JavaScript safeRelativeRedirect(input) allowing only same-origin relative paths. Reject //evil.test, backslashes and control characters. Include tests."
  },
  {
    "id": 10,
    "category": "code",
    "prompt": "Create a TypeScript credit ledger transaction sketch: reserve before a request, settle actual usage once, release unused funds. Explain concurrency and idempotency."
  },
  {
    "id": 11,
    "category": "reason",
    "prompt": "A costs $30 plus $2 per task. B costs $10 plus $4 per task. At what integer task counts is A cheaper? Show the boundary."
  },
  {
    "id": 12,
    "category": "reason",
    "prompt": "Three boxes labeled apples, oranges, mixed are all mislabeled. You may draw one fruit from one box. Explain how to relabel all three."
  },
  {
    "id": 13,
    "category": "reason",
    "prompt": "Schedule A (2 days), B (3 days after A), C (4 days after A), D (1 day after B and C). Unlimited parallel workers. Give earliest finish and critical path."
  },
  {
    "id": 14,
    "category": "reason",
    "prompt": "All dax are wugs. Some wugs are zims. Must some dax be zims? Answer and provide a counterexample if not."
  },
  {
    "id": 15,
    "category": "reason",
    "prompt": "A fair coin is flipped twice. Given at least one head, what is the probability of two heads? Explain the sample space."
  },
  {
    "id": 16,
    "category": "write",
    "prompt": "Write exactly three bullet points for a client update: prototype complete, testing Friday, integration delayed two days. Do not invent a launch date."
  },
  {
    "id": 17,
    "category": "write",
    "prompt": "Rewrite politely in under 50 words: You still have not sent the assets. We cannot finish without them. Ask for delivery by Thursday."
  },
  {
    "id": 18,
    "category": "write",
    "prompt": "Summarize only these facts in two sentences: Project Cedar budget $8000. Spent $3000. Deadline November 2. Testing owner Maya. Do not invent progress."
  },
  {
    "id": 19,
    "category": "write",
    "prompt": "Draft a release note under 80 words. Facts: CSV export added; duplicate row bug fixed; exports limited to 10000 rows. Include the limitation clearly."
  },
  {
    "id": 20,
    "category": "write",
    "prompt": "Write a four-step checklist for reviewing AI-generated code before deployment. Each step must start with a verb. Do not claim automated checks guarantee security."
  }
]
