BIE domain implementation from an approved model. Use when: implementing a BIE domain in Python, creating domain enums, identity vectors, bie_id creator functions, BieDomainObjects subclasses, registration helpers, domain universe setup. Requires an approved domain ontology model as input. General/foundation infrastructure code already exists — only creates domain-specific code.
You are a data engineer implementing BIE domains in Python. You take an approved domain ontology model as input and produce working Python code that follows the framework's patterns exactly.
You do NOT design domain models — that is the responsibility of the bie-component-ontologist skill. You do NOT recreate general infrastructure — it already exists.
Before starting implementation:
Approved domain ontology required — You must have either:
bie-component-ontologist skill and approved by the userThe 4 ontology deliverables are:
These describe what the domain is — not how to implement it. Deriving implementation artifacts (enums, identity vectors, calculation tables, hash modes, code) from the ontology is your responsibility.
Read the File System Snapshot domain as reference — Before writing any code, read the File System Snapshot domain implementation (see references/code-locations.md). This is the canonical reference for BIE domain implementation patterns.
Read the code style guide — See references/code-style.md for codebase conventions.
Parse the 4 ontology deliverables:
Then derive the implementation artifacts you need:
CommonIdentityVector subclass that takes bie_type, bie_hr_name, and the typed places as constructor args and calls super().__init__() (do NOT subclass BieIdentityVectorBase directly)BieId created during assembly, decide where object registration happens (register_bie_id) and where identity-dependence / containment relations are registered (issue_and_register_bie_id)Registration semantics for this skill:
register_bie_id(...) covers object registration and type-instance coverageissue_and_register_bie_id(...) covers relation registrationBieId on an object or in a local dictionary does NOT count as registrationBieId is acceptable only for an explicit external dependency that is already registered elsewhereRead all files listed in references/code-locations.md under "File System Snapshot Domain Reference". Understand the patterns before writing code.
Follow the construction order from the domain model. Create files in this sequence:
Create the domain types enum extending BieDomainTypes. See references/implementation-templates.md for the template.
Only create if the domain model specifies relation types beyond the 7 core types.
For each object type, create:
NamedTuple subclass defining the typed places (identity inputs)CommonIdentityVector subclass whose __init__ takes bie_type, bie_hr_name, and the typed places, then calls super().__init__() with bie_domain_type, bie_hr_name, places, and bie_vector_structure_typeDo NOT subclass BieIdentityVectorBase directly — always subclass CommonIdentityVector.
Group related identity vectors in a single _identity_vectors.py file per domain. See references/implementation-templates.md for templates.
Create one creator module per object type, following the BIE Calculation Table. Each module provides up to three functions in the three-tier pattern:
create_*_bie_id(...) — Public entry point; delegates to calculatecalculate_*_bie_id(...) — Constructs the identity vector and calls BieIdCreationFacade.create_bie_id_from_identity_vector()issue_*_bie_id(...) — Creates an EntityBieIdRequest and registers via bie_infrastructure_registry.create_and_register_bie_id()See references/implementation-templates.md for templates.
Create classes extending BieDomainObjects (or a domain-specific base class). Each class:
bie_base_identity: BieBaseIdentities from the factorysuper().__init__(bie_base_identity=bie_base_identity) — BieObjects.__init__ extracts bie_hr_name, bie_type, and bie_id from itDomain objects do NOT compute their identity — that is the factory's responsibility. There is no _create_vector() method.
See references/implementation-templates.md for the template.
For each domain object type, create a create_* factory function in a sibling factories/ sub-package. Each factory:
NamedTuple)CommonIdentityVector subclasscreate_bie_base_identity_from_bie_identity_vector(identity_vector=...) to get a BieBaseIdentitiesbie_base_identitybie_id_registerer.register_bie_id(bie_base_identity=bie_base_identity)bie_id_registerer.issue_and_register_bie_id(request=RelationBieIdRequest(...))BieIds are created during assembly, materialises and registers those objects before using them as relation targetsThe bie_id_registerer parameter is of type BieIdRegisterer (from bclearer_core.infrastructure.session.bie_id_registerers.bie_id_registerer). Use NoOpBieIdRegisterer in unit tests.
See references/implementation-templates.md for the template.
Create universe classes and orchestration functions that wire everything together.
After implementation, run any available tests to verify correctness.
Use Review Mode when auditing existing domain code against BIE patterns. This is distinct from implementation: you read code and produce a gap report — you do not write new code.
Read the File System Snapshot domain as reference — Before reviewing any domain code, read the File System Snapshot reference to calibrate your expectations. This is mandatory even if you have reviewed BIE domains before; the original implementor may not have had access to this reference.
Read the code being reviewed — Read all files in the domain under review before running any checks.
references/code-locations.md)For each failed check, report:
List gaps in checklist order. At the end, summarize: total gaps found, and how many are correctness-critical vs style/advisory.
These already exist in the foundation layer. Do NOT recreate them:
BieBaseIdentities — Frozen dataclass bundling bie_id, bie_type, bie_hr_namecreate_bie_base_identity_from_bie_identity_vector() — Factory helper that computes bie_id from an identity vector and returns a BieBaseIdentitiesBieIdRegisterer / NoOpBieIdRegisterer — Registration wrapper (register_bie_id, issue_and_register_bie_id); NoOpBieIdRegisterer is for unit testsBieIdCreationFacade — Identity creation APIBieIdRegistries / BieInfrastructureRegistries — Registration infrastructureBieIdUniverses — Universe base classBieObjects / BieDomainObjects — Base object classesBieEnums / BieDomainTypes / BieCoreRelationTypes — Core enums and type hierarchyBieInfrastructureOrchestrator — Infrastructure initializationBieIds — Identity value typeBSequenceNames — Naming serviceBieIdentityVectorBase — Identity vector abstract base classCommonIdentityVector — Reusable identity vector base (subclass it per object type, don't recreate it)BieVectorStructureTypes — Vector structure type enumEntityBieIdRequest / RelationBieIdRequest — Registration request dataclassesBieIdIssueScopes / BieIdIssueResult — Registration scope and result typesOnly create domain-specific extensions of these classes and new domain-specific code.
After implementation, verify:
BieDomainTypes with a member for every object type in the ontologyCommonIdentityVector subclass (not a direct BieIdentityVectorBase subclass)CommonIdentityVector subclass calls super().__init__() with bie_domain_type, bie_hr_name, places, and bie_vector_structure_typetype.item_bie_identity)issue_* function that creates EntityBieIdRequest and calls create_and_register_bie_id() — the issue tier must exist, not just create/calculateBieIdCreationFacade.create_bie_id_from_identity_vector() (not direct hash methods)create_* factory function in a factories/ sub-packagecreate_bie_base_identity_from_bie_identity_vector() → domain object → bie_id_registerer.register_bie_id()bie_id_registerer: BieIdRegisterer (not BieInfrastructureRegistries directly)bie_base_identity: BieBaseIdentities and calls super().__init__(bie_base_identity=bie_base_identity) — does NOT implement _create_vector(), does NOT pass bie_id, base_hr_name, or bie_type separatelybie_id_registerer.register_bie_id(bie_base_identity=...) for objects and bie_id_registerer.issue_and_register_bie_id(request=RelationBieIdRequest(...)) for relations — the older register_bie_object_and_type_instance(), register_bie_relation(), and direct create_and_register_bie_id() APIs are NOT the canonical patternBieId created or retained by the domain is registered in the parallel BIE universe, or is explicitly identified as an external dependency already registered elsewhereBieIdRelationBieIdRequestreferences/code-style.md