# E5.M2 — NpcAiAndBehaviorProfiles

## Summary

| Field | Value |
|--------|--------|
| **Module ID** | E5.M2 |
| **Epic** | [Epic 5 — PvE Combat](../epics/epic_05_pve_combat.md) |
| **Stage target** | Prototype |
| **Status** | Planned (see [dependency register](module_dependency_register.md)) |

## Purpose

Enemy archetype behavior loops, aggro logic, and telegraph scheduling on top of [E5.M1 — CombatRulesEngine](E5_M1_CombatRulesEngine.md).

## Responsibilities

- Run `NpcBehaviorDef`; emit `TelegraphEvent`; apply `AggroRule` / threat integration with combat state.

## Key contracts

| Contract | Role |
|----------|------|
| `NpcBehaviorDef` | Archetype scripts or state machines. |
| `TelegraphEvent` | Telegraph timing for UI and dodge windows. |
| `AggroRule` | Target selection and leash behavior. |

## Module dependencies

- **E5.M1** — CombatRulesEngine.

## Dependents (by design)

- **E4.M2** — SpawnEcologyController.
- **E5.M3** — EncounterAndRewardTables.

## Related implementation slices

Epic 5 **Slice 2** — three archetypes; `telegraph_fired`, `npc_state_transition`.

## Source anchors

- Master plan: [`neon_sprawl_vision.plan.md`](../../../neon_sprawl_vision.plan.md) — Epic 5.
- [Module dependency register](module_dependency_register.md)
