⚙️ ALLOY RUNE DIFFICULTY: Apprentice Behavioral

The Template Method: The Skeleton Ritual

Define the skeleton of an algorithm in an operation, deferring some steps to subclasses.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Template Method
ARCANUM SCHOOL: Necromancy // Skeleton-Ritual
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// ALLOY PATTERN //
abstract sig RitualFramework {
  invocation: one SpellPhase,
  climax: one SpellPhase
}

sig FireRitual extends RitualFramework {}
sig VoidRitual extends RitualFramework {}

sig SpellPhase {}

fact "Phases Are Distinct" {
  all r: RitualFramework | r.invocation != r.climax
}

run {} for 4

The Template Method: The Skeleton Ritual

The RitualFramework dictates the mandatory sequence of the arcane arts: an invocation followed by a climax. Concrete subclasses like FireRitual inherit this exact skeleton. The fact Phases Are Distinct ensures the ritual does not accidentally overlap its own temporal constraints.

Runic Tags: #behavioral #template method #framework