Skip to content

Rule Precedence Hierarchy

Description

This rule defines the precedence hierarchy used to resolve conflicts between rules originating from different sources within the CAS system.

It ensures consistent and predictable behaviour when multiple rules apply to the same context.

Precedence Model

The system MUST apply the following precedence order:

Global Rules > Project Rules > Prompt Rules

Interpretation

  • Global Rules
    • Define system-wide invariants and governance constraints
    • Act as hard constraints
    • MUST NOT be overridden
  • Project Rules
    • Define context-specific constraints within a project
    • MUST NOT violate global rules
    • May override prompt behaviour where applicable
  • Prompt Rules
    • Define execution-level behaviour
    • Act as default behaviour only
    • MUST defer to both global and project rules

Rules

  • In case of conflict, the higher-precedence rule MUST be applied.
  • Lower-precedence rules MUST NOT override higher-precedence rules.
  • Conflicts MUST be:
    • detected (via rules-conflict-detector)
    • resolved using this precedence model
    • explicitly surfaced in governance artefacts

Rationale

A clear precedence hierarchy prevents:

  • inconsistent system behaviour
  • duplication of governance logic
  • ambiguity in rule interpretation

It enables scalable governance across multiple projects and prompts.

Applies To

  • rule conflict detection and resolution
  • prompt execution behaviour
  • AEM and AID generation
  • any system component interpreting rules

Example

If a global rule mandates that all patterns must be classified according to the Pattern Classification Framework, a project rule cannot override this requirement. However, a project rule could specify that for a particular project, certain pattern categories are preferred, as long as it does not violate the global classification requirement. Prompt rules could then specify how to apply these classifications during execution, but must defer to both the global and project rules.

Consequences

Benefits

  • deterministic rule resolution
  • consistent behaviour across all components
  • reduced duplication in prompts
  • improved traceability and explainability

Risks if not followed

  • conflicting outputs across prompts
  • silent overrides of critical constraints
  • governance drift and loss of trust in system outputs

βΈ»


See Also