# Shadow AI vs Governed Assistant — Discrete-Event Simulator

## PURPOSE
Siroui Mushegian says: "Shadow AI, much like shadow IT, is something that concerns me every day. I'm worried about people trying to solve their own problems because I don't have time to solve them for them." This project simulates that exact anxiety. It models a population of employees who have analytics questions, a slow queue of human data analysts, and an optional governed self-service assistant (a Genie-style plain-language query tool). It measures how many questions end up leaking into ungoverned "shadow AI" channels, and how a governed assistant reduces that leak.

## WHY THIS MATTERS
The transcript's core claim is that self-service answers in "plain language" are what dissolve shadow AI — not more policy. A simulator lets a student test that claim without a production system: raise the assistant's coverage or lower its latency and watch the shadow-channel rate fall. It converts a governance intuition into a measurable, parameterised experiment.

## HOW TO BUILD
Use SimPy for the event loop and NumPy for deterministic random sampling. Arrivals are questions over a working day; each question has a service time at the human analyst. If an employee is unwilling to wait past a patience threshold, they defect to shadow AI. A governed assistant serves a fraction of questions (`assistant_coverage`) almost instantly, removing them from the human queue and from the shadow pool.

```python
def question(env, qid, analysts, cfg, stats, rng):
    yield env.timeout(rng.exponential(cfg.arrival_rate))
    if rng.random() < cfg.assistant_coverage:
        stats["governed"] += 1          # Genie-style self-service resolves it
        env.process(question(env, qid + 1, analysts, cfg, stats, rng))
        return
    if rng.random() < cfg.shadow_propensity:
        stats["shadow"] += 1            # employee solves it on their own
        env.process(question(env, qid + 1, analysts, cfg, stats, rng))
        return
    with analysts.request() as req:
        yield req
        yield env.timeout(rng.exponential(cfg.service_time))
        stats["human"] += 1
    env.process(question(env, qid + 1, analysts, cfg, stats, rng))
```

Run several coverage levels and print a table of shadow-AI rate vs coverage.

## WHEN TO USE IN PRODUCTION
Use it for capacity and governance planning: sizing a self-service analytics rollout, arguing for analyst headcount, or predicting shadow-tool adoption before launch. It is ideal in design reviews where someone asks "will people actually use this?" Do **not** use it to make claims about specific individuals, to replace real telemetry after launch, or where question-arrival behaviour is driven by rare events a simple Poisson model cannot capture.

## HOW IT HELPS STUDENTS
Students learn SimPy process modelling, resource contention, patience/defection dynamics, and NumPy-backed reproducible randomness. They practise turning a qualitative risk statement into a falsifiable simulation — a skill that transfers directly to capacity planning and AI governance work.

## STARTER CODE
`starter/main.py` defines the SimPy environment, employees, analyst resource, and a sweep over assistant coverage, with `# TODO` markers for cost weighting and confidence intervals.
