995 B
995 B
Feature Plan: Policy Engine Middleware
Goal
Implement deterministic middleware policies for inbound/outbound message transforms and automations.
Why This Fits GIA
- Existing command/task/approval flows provide natural control points.
Scope
- Per-chat and per-person policy rules.
- Rule actions: notify, suggest rewrite, create task, rate-limit send, require approval.
- Dry-run/audit mode for every policy decision.
Implementation
- Add policy schema and evaluator (
if conditions -> actions). - Hook evaluator into compose send and inbound task intelligence paths.
- Add policy decision logs with trace IDs.
- Add UI for policy creation/testing with preview mode.
- Add safe defaults: all transform rules start as suggest-only.
Acceptance Criteria
- Policy decisions are deterministic and replayable.
- Any transform is visibly annotated in UI.
- Users can disable policy per chat instantly.
Out of Scope
- Natural-language-to-policy compiler in first release.