---
id: ADR-MBR-STR-008
title: Keep Pure Lifecycle Decisions Isolated
product_area: membership
module: structure
revision: 1
status: proposed
design_intent: confirmed
source_sha:
  services-membership: 5994c270e8a37a30f848e99ba5b5ee6b87c08893
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
decision: >-
  The term module keeps pure decision functions isolated from other repository modules, with domain hooks and
  callers supplying records, settings, locks and persistence.
constrains:
  - SVC-MBR-STR-terms
  - DOM-MBR-STR-005
  - WF-MBR-STR-006
origin: >-
  D-45 (decided 2026-10-17): services-membership:README.md#The term engine (the engine imports nothing of
  Membership and is extracted later)
alternatives:
  - option: Embed lifecycle calculations in Memberships.
    why_not: >-
      That would tie reuse to the first adopting domain rather than preserving the recorded extraction
      boundary.
  - option: Give the engine its own holding and term tables.
    why_not: >-
      Holding identity and term details are domain records; an engine-owned schema would require a different
      adoption contract.
consequences:
  - The recorded isolation boundary supports later extraction when another domain adopts terms.
  - The domain owns transactional reads and writes around the engine's decisions.
  - An isolation test checks imports across the module boundary.
supersedes: []
evidence:
  - >-
    services-membership at 5994c270: modules/terms/services/define-term-engine.ts;
    modules/terms/tests/unit/isolation.spec.ts; modules/memberships/services/membership-engine.ts
---

# Keep Pure Lifecycle Decisions Isolated

## Context

Membership needs shared date, status and continuity calculations now, and the recorded architecture anticipates other term-based products later.

## Decision

This record cites the existing extraction decision. Pure helpers are deterministic, while facade methods can obtain live settings through the adopting domain's hooks; operational persistence remains outside the engine.

## Alternatives Considered

Embed lifecycle calculations in Memberships. That would tie reuse to the first adopting domain rather than preserving the recorded extraction boundary. Give the engine its own holding and term tables. Holding identity and term details are domain records; an engine-owned schema would require a different adoption contract.

## Consequences

The recorded isolation boundary supports later extraction when another domain adopts terms. The domain owns transactional reads and writes around the engine's decisions. An isolation test checks imports across the module boundary.
