# core/risk — AGENTS.md

## Purpose

Risk assessment for tool calls and workflow operations: maps tool execution tiers to risk levels and evaluates `RiskContext` to produce a `RiskSummary`.

## Ownership

CORREX kernel team.

## Local Contracts

- `RiskAssessor` — interface; `DefaultRiskAssessor` applies `TierMapping` to produce `RiskSummary`. `NoOpRiskAssessor` always returns clean (used in test contexts).
- `RiskContext` — input to assessment: tool identity, parameters, session context.
- `TierMapping` — maps `Tier` values (from `core:events`) to `RiskLevel`. Tier levels are the canonical risk signal — do not invent secondary risk signals here.
- `RiskSummary` / `RiskAction` / `RiskLevel` / `RiskSignal` — vocabulary types (defined in `core:events`; referenced here).
- Hard Invariant #5: all tools declare execution tier; tier drives risk level. Risk assessment is not optional.

## Work Guidance

- `DefaultRiskAssessor` is stateless — no event sourcing needed here.
- Do not add approval logic here; that belongs in `core:approvals`. Risk assessment produces a summary; approval evaluation consumes it.

## Verification

```bash
./gradlew :core:risk:test --rerun-tasks
```

## Child DOX Index

No child AGENTS.md (leaf module).
