Skip to main content
Domain profiles are Attesta’s mechanism for encoding industry-specific compliance knowledge into the risk scoring and approval pipeline. Each profile contains risk patterns, sensitive terms, critical actions, escalation rules, and challenge templates tailored to a specific regulatory domain.

Architecture

A domain profile is defined by the DomainProfile dataclass, which contains all the domain-specific configuration that layers on top of Attesta’s base scoring engine.

DomainProfile Structure

RiskPattern

Each risk pattern defines a regex that matches against a specific part of the action context:

EscalationRule

Escalation rules define conditions that require additional approvers or notifications beyond the standard challenge:
Supported condition forms:

DomainChallengeTemplate

Challenge templates provide domain-specific questions for comprehension challenges:

Domain Registry

The DomainRegistry manages all registered domain profiles:

Merge Strategy

When merging multiple domains via DomainRegistry.merge(), the strategy is conservative — it always picks the stricter option:
  • Lists (risk_patterns, critical_actions, etc.): Union of all entries
  • Dicts (sensitive_terms, min_review_overrides): Union with max value for conflicts
  • Scalars (base_risk_floor, production_multiplier): Take the higher value
This guarantees that combining domains never weakens the overall policy.

Registering Presets

You can register profiles as loadable presets for use in attesta.yaml:

Activation

Activate domain profiles via attesta.yaml or programmatically:

Next Steps

Custom Domains

Build and deploy custom domain profiles

Custom Risk Scorer

Build risk scorers from scratch