PulseContext.regulated constructor
PulseContext.regulated({
- required String actor,
- required String framework,
- String? reason,
- PulseContext? baseContext,
- Sensitivity sensitivity = Sensitivity.confidential,
Creates a PulseContext anchored to a specific Regulatory Framework (e.g., GDPR, HIPAA, SOC2).
This factory is a Human‑Centric Shortcut designed to enforce institutional safety constraints automatically. It pre‑configures:
complianceto the specified framework (static pillar).auditLeveltofull(forensic trace).strategytodeterministic.sensitivitytoconfidential(or as provided).
When to use
Use this when the pulse contains regulated data (e.g., PII, financial info) that must be audited and handled with extra care.
How it works
The factory populates all necessary provenance dimensions to ensure compliance. The resulting pulse will be fully audited and carry the required legal markers.
Non‑obvious
- The
auditLevelis forced tofull– you cannot reduce it. - The
strategyis set todeterministicto avoid probabilistic reasoning on regulated data.
Example
final context = PulseContext.regulated(
actor: 'Payment_Processor_B',
framework: 'PCI-DSS',
reason: 'Authorizing Transaction #992',
);
Parameters:
actor: The entity originating the regulated stimulus.framework: The legal/regulatory protocol (e.g., 'GDPR', 'HIPAA').reason: The immediate justification.baseContext: Ancestral Context for lineage.sensitivity: Data classification, defaulting to Sensitivity.confidential.
Implementation
factory PulseContext.regulated({
required String actor,
required String framework,
String? reason,
PulseContext? baseContext,
Sensitivity sensitivity = Sensitivity.confidential,
}) {
return PulseContext.fromEntries([
// Static Pillars
Provenance.actor.entry(actor),
Provenance.compliance.entry(framework),
Provenance.sensitivity.entry(sensitivity),
Provenance.traceId.entry(Identity.next()),
if (baseContext != null)
Provenance.parentTraceId.entry(baseContext.traceId!),
// Operational Boundaries (Escalated for Compliance)
Provenance.auditLevel.entry(AuditLevel.full),
Provenance.strategy.entry(ReasoningStrategy.deterministic),
Provenance.priority.entry(85), // High priority due to regulatory nature
Provenance.purpose.entry('REGULATED_TRANSACTION'),
Provenance.reason
.entry(reason ?? 'Executing within $framework framework.'),
Provenance.confidence.entry(1.0),
]);
}