"""The Terminology Handbook concept lifecycle closed value set.A Handbook concept fragment (``_data/terminology/concepts/*.toml``) declaresone ``lifecycle`` token, and that axis is read on both sides of the shippingboundary: the build-time glossary generator and Pagefind card projector select``approved`` concepts for publication, and the shipped product reader(:func:`~application.corpus_search.terminology.search_terminology`) filters the runtimeterminology search on the same token. Only the value set lives here — decidingwhich concepts *hold* which lifecycle stays an authoring judgement (the``aeat-documentation`` discipline reserves ``approved`` fortaxpayer- and operator-facing vocabulary and keeps internal machinery concepts``deprecated`` but dev-resolvable).The set is declared as a :class:`enum.StrEnum` in ``core`` per thecore-authority discipline (closed axes live in ``core/``, hydrated atboundaries, asserted as members in tests). ``core`` is the only home bothsides can reach: the terminology-handbook authoring tooling thatcompiles the fragments is not shipped in the wheel, so a declaration livingbeside that schema is unimportable from ``cadrumo``. This mirrors thealready-shared four-language axis(:class:`~core.external_constants.OutputLanguage`), which the Handbook schemalikewise consumes from ``core`` rather than redeclaring. TheHandbook-internal axes with no shipped reader — ``ConceptDomain`` and``TermStatus`` — stay declared beside the schema they constrain.Each member's value is byte-identical to the token stored in the conceptfragments, so a stored ``lifecycle`` hydrates to its member and an unknowntoken is refused at the boundary rather than silently filtered out."""from__future__importannotationsfromenumimportStrEnum
[docs]classConceptLifecycle(StrEnum):"""Four-state lifecycle of a Terminology Handbook concept. A concept moves ``DRAFT`` (scaffolded, curation pending) -> ``APPROVED`` (curated, shippable) and may later be ``DEPRECATED`` (discouraged but still resolvable) or ``RETIRED`` (tombstoned). A ``RETIRED`` concept MUST carry ``replaced_by``; records are never deleted, only inactivated (the SNOMED immutable-id inactivation pattern the git-native Handbook borrows). Attributes: DRAFT: Scaffolded by the authoring tooling, curation pending. Excluded from the generated glossary, the shipped Pagefind index, and the product terminology search. APPROVED: Curated and ratified taxpayer- or operator-facing vocabulary. The only lifecycle that publishes and the only one the shipped search surfaces by default. DEPRECATED: Discouraged but still resolvable — the home of internal machinery concepts that stay available to the developer/agent corpus while excluded from the taxpayer glossary. RETIRED: Tombstoned, carrying a ``replaced_by`` successor. """DRAFT="draft"APPROVED="approved"DEPRECATED="deprecated"RETIRED="retired"