ADR-004: Layer 4 interaction: ou/ scopes #ExecutionPlan by role, type, name, and layer
| Field | Value |
|---|---|
| Status | accepted |
| Date | 2026-01-31 |
Context
The 3-layer model produces complete execution plans. Different operators need narrowed views: ops sees everything, dev sees DNS only, readonly sees info actions only.
Decision
Add ou/ package (Layer 4) with #InteractionCtx that narrows #ExecutionPlan via CUE comprehensions.
Rationale
CUE comprehensions are the natural filtering mechanism — no runtime logic, just struct narrowing.
Consequences
- Architecture becomes 4 layers: definition, template, value, interaction
-
InteractionCtx consumes #ExecutionPlan — no direct dependency on vocab/ or template/
- Operator roles use struct-as-set for visible_categories
- Hydra JSON-LD generation is explicit: consumer passes scoped view to #ApiDocumentation