# E4.M4 — SecurityTierZoneFlags

## Summary

| Field | Value |
|--------|--------|
| **Module ID** | E4.M4 |
| **Epic** | [Epic 4 — World Topology](../epics/epic_04_world_topology.md) |
| **Stage target** | Prototype |
| **Status** | Planned (see [dependency register](module_dependency_register.md)) |

## Purpose

Layer on top of the zone graph that tags each zone with security tier (e.g. high / low / contested) and exposes **server-authoritative** policy state and entry-warning payloads. Enables PvP eligibility ([E6.M1](E6_M1_PvPEligibilityAndFlagState.md)) and risk UX without circular dependencies: Epic 6 consumes this data; E4.M4 does not depend on Epic 6.

## Responsibilities

- Assign and persist `SecurityTier` per zone (from data on [E4.M1](E4_M1_ZoneGraphAndTravelRules.md)).
- Publish `ZonePolicyState` for server and client display alignment.
- Emit or serve `ZoneEntryWarning` when players transition into higher-risk zones.

## Key contracts

| Contract | Role |
|----------|------|
| `SecurityTier` | Discrete tier driving PvP and risk rules. |
| `ZonePolicyState` | Authoritative flags for what is allowed in-zone. |
| `ZoneEntryWarning` | Structured warning for consent flows and UI copy. |

## Module dependencies

- **E4.M1** — [ZoneGraphAndTravelRules](E4_M1_ZoneGraphAndTravelRules.md): `ZoneDef`, edges, and travel context for tier attachment.

## Dependents (by design)

- **E6.M1** — [PvPEligibilityAndFlagState](E6_M1_PvPEligibilityAndFlagState.md): who may engage in PvP where.
- **E6.M2** — [ConsentAndRiskUxSignals](E6_M2_ConsentAndRiskUxSignals.md): risk UI from tier and warnings.

## Related implementation slices

See Epic 4 **Slice 2 — Security tier tagging and UI hooks**: server and client agree on tier at transitions; entry-warning contract stable for Epic 6; telemetry `security_zone_enter`, `security_zone_exit` aligned with PvP events.

## Risks and telemetry

- Client/server mismatch: server is source of truth; client prediction display-only.
- Coordinate with Epic 6 prototype gates for optionality and clarity.

## Source anchors

- Master plan: [`neon_sprawl_vision.plan.md`](../../../neon_sprawl_vision.plan.md) — Core Epic Map, Epic 4.
- [Module dependency register](module_dependency_register.md)
