Skip to content

Default policy

defaultPolicy is the baseline, moderate‑mode policy preset used when no explicit policy is provided.

It enables safe, predictable behavior without enforcing strict scanning, analysis, or decision overrides. This preset is intentionally minimal: it performs no automatic rejections, reviews, warnings, escalations, or overrides.

It is designed to be a neutral, low‑interference policy suitable for general use and for contributors learning the system.

Signature

export const defaultPolicy: Policy

Behavior

Mode

Moderate mode provides balanced behavior:

  • No strict enforcement.
  • No permissive downgrades.
  • No automatic scanning.
  • No analysis features enabled.

It is the "do nothing unless asked" mode.

Decision configuration

decide: {
    reject: [],
    review: [],
    warn: [],
    override: {},
    escalate: {},
}
  • reject: No event codes automatically cause rejection.
  • review: No event codes automatically trigger review.
  • warn: No event codes automatically become warnings.
  • override: No severity shifts applied.
  • escalate: No severity escalations applied.

This means all parse, scan, and validation events are interpreted exactly as emitted.

Analysis configuration

analysis: {
    diff: false,
    explain: false,
    replay: false,
    telemetry: false,
}

All analysis features are disabled:

  • No diffing.
  • No explanation traces.
  • No replay logs.
  • No telemetry.

This keeps runtime overhead minimal.

Scan configuration

Scan: false

Scanning is disabled by default.

No structural scanning or deep inspection occurs unless explicitly enabled by the user or a preset.

Exception configuration

exception: {
    bigint: false,
}

No structural exceptions are allowed. bigint values are not implicitly permitted. These types must be explicitly allowed by policy or normalization rules.

Design rationale

  • Provides a neutral baseline for contributors.
  • Avoids surprising behavior by disabling all automatic decisions.
  • Keeps the pipeline predictable: events flow through untouched.
  • Ensures that parsing, validation, and boundary rules behave exactly as written.
  • Encourages explicit configuration rather than implicit assumptions.

When to use

Use defaultPolicy when:

  • You want predictable, low‑interference behavior.
  • You are building or testing new boundaries.
  • You want contributors to understand event flow without policy transforms.
  • You want to layer custom rules on top of a clean slate.

This applies the moderate, no‑surprises policy to the boundary.