Domain Templates API
The voiage.domain_templates module handles domain template discovery, JSON schema validation, and lifecycle serialization.
DomainTemplate
Section titled “DomainTemplate”Immutable dataclass representing an industry decision problem template.
template_id: str— Identifier (snake_case)version: str— Semantic version stringdomain: str— Vertical category (e.g.,customer_success,pricing_revenue)title: str— Human-readable descriptiondecisions: list[str]— Candidate interventionsinformation_actions: list[str]— Candidate studies / data collection trialsrequired_fields: list[str]— Parameter or dataset requirementscapabilities: list[str]— Supported VOI algorithms (evpi,evppi,evsi,enbs)maturity: str—candidate,experimental, orstablevalidation_level: str—registry_driven_worked_exampleortemplate_onlyto_dict() -> dict[str, Any]— Serialize to dictionaryfrom_dict(data: dict[str, Any]) -> DomainTemplate— Parse from dictionary
Functions
Section titled “Functions”load_domain_template_registry(registry_path: Path | None = None) -> list[DomainTemplate]
Section titled “load_domain_template_registry(registry_path: Path | None = None) -> list[DomainTemplate]”Loads all domain templates from the normative specs/domain-templates/registry.json manifest.
list_domain_templates(domain=None, capability=None, maturity=None, registry_path=None) -> list[DomainTemplate]
Section titled “list_domain_templates(domain=None, capability=None, maturity=None, registry_path=None) -> list[DomainTemplate]”Filters and discovers templates by domain, VOI capability, or maturity status.
get_domain_template(template_id: str, registry_path: Path | None = None) -> DomainTemplate
Section titled “get_domain_template(template_id: str, registry_path: Path | None = None) -> DomainTemplate”Retrieves a single template by ID; raises ValueError if not found.
validate_domain_template_registry(registry_path=None, schema_path=None) -> bool
Section titled “validate_domain_template_registry(registry_path=None, schema_path=None) -> bool”Validates all entries against specs/domain-templates/schemas/v1/domain-template.schema.json.
Validation boundary
Section titled “Validation boundary”stable currently means that the template is exercised through its registry
by a deterministic worked example. Experimental entries are template_only:
schema validation proves their structure, not analytical or domain validity.