
Bie Data Engineer
- 34 installs
- 2 repo stars
- Updated July 17, 2026
- ontoledgy/ol_ai_context_library
Helps with ai & agent building tasks.
About
bie-data-engineer is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted coding.
- bie-data-engineer
- AI & Agent Building
- AI-coding skill
Bie Data Engineer by the numbers
- 34 all-time installs (skills.sh)
- Ranked #8,822 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/ontoledgy/ol_ai_context_library --skill bie-data-engineerAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 34 |
|---|---|
| repo stars | ★ 2 |
| Last updated | July 17, 2026 |
| Repository | ontoledgy/ol_ai_context_library ↗ |
What it does
Helps with ai & agent building tasks.
Files
BIE Data Engineer
Role
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.
Prerequisites
Before starting implementation:
1. Approved domain ontology required — You must have either:
- An ontology model produced by the
bie-component-ontologistskill and approved by the user - An ontology model provided directly by the user (with the 4 ontology deliverables or equivalent)
The 4 ontology deliverables are: 1. Domain Object Types and Hierarchy 2. Domain Relation Types 3. Object Type Identity Dependence Relation Types 4. Construction Order
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.
2. 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.
3. Read the code style guide — See references/code-style.md for codebase conventions.
Implementation Workflow
Step 1: Read the Approved Domain Ontology
Parse the 4 ontology deliverables: 1. Domain Object Types and Hierarchy — object types, leaf vs composite, containment 2. Domain Relation Types — which object types relate to which others and via what relation type 3. Object Type Identity Dependence Relation Types — which object types each type's identity depends on 4. Construction Order — leaf-first ordering derived from identity dependencies
Then derive the implementation artifacts you need:
- Enum definitions — map object types to enum members, determine if domain-specific relation type enums are needed
- Identity Vectors — for each object type, define a NamedTuple of typed places and a
CommonIdentityVectorsubclass that takesbie_type,bie_hr_name, and the typed places as constructor args and callssuper().__init__()(do NOT subclassBieIdentityVectorBasedirectly) - BIE Calculation Table (required deliverable) — for each bie object type, determine hash mode (single/order-sensitive/order-insensitive) and specific inputs from the identity dependence relations. This table must be produced and shown to the user before any code is written — it is a first-class output artifact alongside the identity vectors file
- Relation registrations — determine the bie_id_tuples to register from the relation types table
Step 2: Read the File System Snapshot Domain Reference
Read all files listed in references/code-locations.md under "File System Snapshot Domain Reference". Understand the patterns before writing code.
Step 3: Create Files in Order
Follow the construction order from the domain model. Create files in this sequence:
3.1 Domain Types Enum
Create the domain types enum extending BieDomainTypes. See references/implementation-templates.md for the template.
3.2 Domain Relation Types Enum (if needed)
Only create if the domain model specifies relation types beyond the 7 core types.
3.3 Identity Vectors
For each object type, create:
- A
NamedTuplesubclass defining the typed places (identity inputs) - A
CommonIdentityVectorsubclass whose__init__takesbie_type,bie_hr_name, and the typed places, then callssuper().__init__()withbie_domain_type,bie_hr_name,places, andbie_vector_structure_type
Do 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.
3.4 BIE ID Creator Functions
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 tocalculatecalculate_*_bie_id(...)— Constructs the identity vector and callsBieIdCreationFacade.create_bie_id_from_identity_vector()issue_*_bie_id(...)— Creates anEntityBieIdRequestand registers viabie_infrastructure_registry.create_and_register_bie_id()
See references/implementation-templates.md for templates.
3.5 Domain Object Classes
Create classes extending BieDomainObjects (or a domain-specific base class). Each class: 1. Stores all domain-specific attributes as instance variables 2. Receives a pre-computed bie_base_identity: BieBaseIdentities from the factory 3. Calls super().__init__(bie_base_identity=bie_base_identity) — BieObjects.__init__ extracts bie_hr_name, bie_type, and bie_id from it
Domain 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.
3.6 Factory Functions
For each domain object type, create a create_* factory function in a sibling factories/ sub-package. Each factory: 1. Builds the identity vector places (NamedTuple) 2. Constructs the CommonIdentityVector subclass 3. Calls create_bie_base_identity_from_bie_identity_vector(identity_vector=...) to get a BieBaseIdentities 4. Constructs the domain object, passing bie_base_identity 5. Registers via bie_id_registerer.register_bie_id(bie_base_identity=bie_base_identity) 6. Registers relations via bie_id_registerer.issue_and_register_bie_id(request=RelationBieIdRequest(...))
The 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.
3.7 Universe/Orchestration Integration
Create universe classes and orchestration functions that wire everything together.
Step 4: Run Tests
After implementation, run any available tests to verify correctness.
Review Mode
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.
Prerequisites for Review
1. 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.
2. Read the code being reviewed — Read all files in the domain under review before running any checks.
Review Steps
1. Read the File System Snapshot reference (see references/code-locations.md) 2. Read all files in the domain under review 3. Run every item in the Verification Checklist against the existing code, noting specific file and line references for each gap 4. Produce a gap report
Gap Report Format
For each failed check, report:
- Check: Which verification checklist item failed
- File: File path
- Line: Line number(s)
- Issue: Specific description of the gap
- Fix: Suggested remediation
List gaps in checklist order. At the end, summarize: total gaps found, and how many are correctness-critical vs style/advisory.
What NOT to Create
These already exist in the foundation layer. Do NOT recreate them:
BieBaseIdentities— Frozen dataclass bundlingbie_id,bie_type,bie_hr_namecreate_bie_base_identity_from_bie_identity_vector()— Factory helper that computesbie_idfrom an identity vector and returns aBieBaseIdentitiesBieIdRegisterer/NoOpBieIdRegisterer— Registration wrapper (register_bie_id,issue_and_register_bie_id);NoOpBieIdRegistereris 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 types
Only create domain-specific extensions of these classes and new domain-specific code.
Verification Checklist
After implementation, verify:
- [ ] Domain enum extends
BieDomainTypeswith a member for every object type in the ontology - [ ] Each object type has a NamedTuple places definition and a
CommonIdentityVectorsubclass (not a directBieIdentityVectorBasesubclass) - [ ] Each
CommonIdentityVectorsubclass callssuper().__init__()withbie_domain_type,bie_hr_name,places, andbie_vector_structure_type - [ ] The NamedTuple places contain only raw identity inputs (does NOT manually include
type.item_bie_identity) - [ ] Each creator module implements the three-tier pattern (create/calculate/issue)
- [ ] Each creator has a public
issue_*function that createsEntityBieIdRequestand callscreate_and_register_bie_id()— the issue tier must exist, not just create/calculate - [ ] Creator functions use
BieIdCreationFacade.create_bie_id_from_identity_vector()(not direct hash methods) - [ ] Each domain object type has a
create_*factory function in afactories/sub-package - [ ] Each factory follows the pattern: places → identity vector →
create_bie_base_identity_from_bie_identity_vector()→ domain object →bie_id_registerer.register_bie_id() - [ ] Factory functions accept
bie_id_registerer: BieIdRegisterer(notBieInfrastructureRegistriesdirectly) - [ ] Each domain object class receives
bie_base_identity: BieBaseIdentitiesand callssuper().__init__(bie_base_identity=bie_base_identity)— does NOT implement_create_vector(), does NOT passbie_id,base_hr_name, orbie_typeseparately - [ ] Registration uses
bie_id_registerer.register_bie_id(bie_base_identity=...)for objects andbie_id_registerer.issue_and_register_bie_id(request=RelationBieIdRequest(...))for relations — the olderregister_bie_object_and_type_instance(),register_bie_relation(), and directcreate_and_register_bie_id()APIs are NOT the canonical pattern - [ ] Parts are constructed before wholes (matches construction order from ontology)
- [ ] Construction order is documented in the identity vectors module or domain module docstring
- [ ] All relation types from the ontology are registered via
RelationBieIdRequest - [ ] Code style matches
references/code-style.md - [ ] All imports use full package paths
Code Locations
Core Framework
Identification Services
Package: bclearer_orchestration_services.identification_services.b_identity_ecosystem
| Class | Module path (relative to package) |
|---|---|
| BieIds | objects.bie_ids |
| BieEnums | common_knowledge.bie_enums |
| BieDomainTypes | common_knowledge.bie_domain_types |
| BieCoreRelationTypes | common_knowledge.bie_core_relation_types |
| BieCoreDomainTypes | common_knowledge.bie_core_domain_types |
| BieIdCreationFacade | bie_id_creation_module.bie_id_creation_facade |
| BieIdentityVectorBase | bie_id_creation_module.identity_vectors.bie_identity_vector_base |
| CommonIdentityVector | bie_id_creation_module.identity_vectors.common_identity_vector |
| BieVectorStructureTypes | bie_id_creation_module.common_knowledge.types.bie_vector_structure_types |
| BieIdRegistries | objects.bie_id_registries |
| BieIdUniverses | objects.bie_id_universes |
| BieInfrastructureRegistries | infrastructure.registrations.bie_infrastructure_registries |
| EntityBieIdRequest | registrations.helpers.registerers.bie_id_issue_requests |
| RelationBieIdRequest | registrations.helpers.registerers.bie_id_issue_requests |
| BieIdIssueScopes | registrations.helpers.registerers.bie_id_issue_requests |
| BieIdIssueResult | registrations.helpers.registerers.bie_id_issue_result |
Naming Service
Package: bclearer_orchestration_services.identification_services.naming_service
| Class | Module path (relative to package) |
|---|---|
| BSequenceNames | b_sequence_names |
Base Object Classes
Package: bclearer_core.bie
| Class | Module path (relative to package) |
|---|---|
| BieObjects | top.bie_objects |
| BieDomainObjects | domain.bie_domain_objects |
| BieBaseIdentities | top.bie_base_identities |
| create_bie_base_identity_from_bie_identity_vector | top.bie_base_identities |
Registration Helpers
Package: bclearer_core.infrastructure.session
| Class | Module path (relative to package) |
|---|---|
| BieIdRegisterer | bie_id_registerers.bie_id_registerer |
| NoOpBieIdRegisterer | bie_id_registerers.bie_id_registerer |
File System Snapshot Domain Reference (canonical implementation example)
Package: bclearer_orchestration_services.file_system_snapshot_service.universe
| File | Purpose |
|---|---|
common_knowledge/bie_file_system_snapshot_domain_types.py | Domain types enum (extends BieDomainTypes) |
bie/bie_id_creators/file_system_snapshot_identity_vectors.py | Identity vectors (NamedTuple places + CommonIdentityVector subclasses) |
bie/bie_id_creators/file_system_snapshot_object_bie_id_creator.py | Three-tier creator (create/calculate/issue) |
bie/bie_id_creators/file_reference_number_extended_object_bie_id_creator.py | Three-tier creator for extended object |
objects/snapshots/file_system_snapshot_objects.py | Domain object base class |
objects/snapshots/individual_file_system_snapshot_objects.py | Domain object — receives bie_base_identity, no _create_vector() |
objects/snapshots/individual_file_system_snapshot_files.py | Concrete domain object — receives bie_base_identity |
objects/snapshots/factories/individual_file_system_snapshot_files_factory.py | Factory — places → vector → BieBaseIdentities → object → register |
objects/extended/file_reference_numbers.py | Extended object — receives bie_base_identity |
objects/extended/factories/file_reference_numbers_factory.py | Factory for extended object |
objects/verses/file_system_snapshot_universes.py | Universe setup and orchestration |
objects/verses/factories/file_system_snapshot_universes_factory.py | Universe factory |
Documentation
| File | Purpose |
|---|---|
docs/bie_implementation_analysis.md | Full BIE design and implementation guide |
Code Style Conventions
Follow these conventions exactly. They are consistent throughout the codebase.
Line Continuations
Use backslash \ continuations for assignments and returns:
result = \
some_function()
return \
resultNamed Keyword Arguments
Always use named keyword arguments in function calls (no positional args after the first):
BieIdCreationFacade.create_bie_id_for_single_object(
input_object=input_object,
bie_domain_type=bie_domain_type)Naming
- Verbose descriptive variable names — no abbreviations
- Classes:
PascalCasewith role suffix (...Types,...Objects,...Wrappers,...Registries) - Functions:
snake_caseverbs (create_...,register_...,get_...) - Files:
snake_casematching class/function name
Class Inheritance
Put the parent class on a separate indented line:
class MyDomainEnums(
BieEnums):Enum Members
Each member on its own block with = \ continuation:
BIE_SOME_TYPE = \
auto()Imports
Use full package import paths with backslash continuation for long imports:
from bclearer_orchestration_services.identification_services.b_identity_ecosystem.bie_id_creation_module.bie_id_creation_facade import \
BieIdCreationFacadeFunction Signatures
Parameters each on their own indented line, return type after \:
def create_something(
input_a: str,
input_b: str) \
-> BieIds:Lists
Multiline with items indented inside brackets:
input_objects = \
[
item_a,
item_b
]NamedTuples
Class definition with parent on separate indented line (same as class inheritance):
class SomeVectorPlaces(
NamedTuple):
field_a: BieIds
field_b: strFrozen Dataclasses
Request/response objects use @dataclass(frozen=True):
@dataclass(frozen=True)
class SomeRequest:
input_objects: Tuple[object, ...]
bie_id_type_id: Optional[BieIds]Implementation Templates
All templates are derived from the File System Snapshot domain implementation. Follow these patterns exactly.
Domain Types Enum
from enum import auto
from bclearer_orchestration_services.identification_services.b_identity_ecosystem.common_knowledge.bie_domain_types import \
BieDomainTypes
class BieDomainNameTypes(
BieDomainTypes):
NOT_SET = \
auto()
BIE_OBJECT_TYPE_A = \
auto()
BIE_OBJECT_TYPE_B = \
auto()Notes:
- Extends
BieDomainTypes(notBieEnumsdirectly) - Class inheritance on separate indented line
- Each member on its own line with
= \continuation andauto()indented below - Always include
NOT_SETas first member - Member names:
BIE_prefix + descriptive name (e.g.,BIE_WORKBOOKS,BIE_RELATIVE_PATHS)
Identity Vector
For each object type, define a NamedTuple of typed places and a CommonIdentityVector subclass. Group related identity vectors in a single _identity_vectors.py file per domain.
There are two styles depending on whether the vector class serves one object type or multiple:
Style A: Type-hardcoded (one vector class, one object type)
Use when the identity vector class is specific to exactly one object type. Hardcode bie_domain_type inside __init__.
from typing import NamedTuple
from bclearer_orchestration_services.identification_services.b_identity_ecosystem.bie_id_creation_module.common_knowledge.types.bie_vector_structure_types import \
BieVectorStructureTypes
from bclearer_orchestration_services.identification_services.b_identity_ecosystem.bie_id_creation_module.identity_vectors.common_identity_vector import \
CommonIdentityVector
from bclearer_orchestration_services.identification_services.b_identity_ecosystem.objects.bie_ids import \
BieIds
from your_domain.common_knowledge.your_domain_types import BieDomainNameTypes
class ObjectTypeAIdentityVectorPlaces(
NamedTuple):
object_a_name: str
class ObjectTypeAIdentityVector(
CommonIdentityVector):
def __init__(
self,
*,
bie_hr_name: str,
places: ObjectTypeAIdentityVectorPlaces) \
-> None:
super().__init__(
bie_domain_type=BieDomainNameTypes.BIE_OBJECT_TYPE_A,
bie_hr_name=bie_hr_name,
places=places,
bie_vector_structure_type=BieVectorStructureTypes.MULTI_DIMENSIONAL_ORDER_SENSITIVE)
class ObjectTypeBIdentityVectorPlaces(
NamedTuple):
object_a_bie_id: BieIds
object_b_value: str
class ObjectTypeBIdentityVector(
CommonIdentityVector):
def __init__(
self,
*,
bie_hr_name: str,
places: ObjectTypeBIdentityVectorPlaces) \
-> None:
super().__init__(
bie_domain_type=BieDomainNameTypes.BIE_OBJECT_TYPE_B,
bie_hr_name=bie_hr_name,
places=places,
bie_vector_structure_type=BieVectorStructureTypes.MULTI_DIMENSIONAL_ORDER_SENSITIVE)Style B: Type-parameterized (one vector class, multiple object types)
Use when the same vector structure is shared by multiple object types (e.g., file snapshots vs folder snapshots). The bie_type is passed in from the factory.
from bclearer_orchestration_services.identification_services.b_identity_ecosystem.common_knowledge.bie_types import \
BieTypes
class ObjectTypeSharedIdentityVector(
CommonIdentityVector):
def __init__(
self,
*,
bie_type: BieTypes,
bie_hr_name: str,
places: ObjectTypeSharedIdentityVectorPlaces) \
-> None:
super().__init__(
bie_domain_type=bie_type,
bie_hr_name=bie_hr_name,
places=places,
bie_vector_structure_type=BieVectorStructureTypes.MULTI_DIMENSIONAL_ORDER_SENSITIVE)Notes:
- Identity vector classes subclass
CommonIdentityVector— do NOT subclassBieIdentityVectorBasedirectly - Constructor uses keyword-only args (
*) bie_hr_name— a human-readable name for the identity; typically the primary descriptive attribute of the objectplaces— a NamedTuple instance containing the raw identity inputs;CommonIdentityVectorvalidates that places is a NamedTuple with no None valuesbie_vector_structure_type— determines the hashing strategy (single, order-sensitive, order-insensitive)- The NamedTuple places contain ONLY the raw identity inputs — do NOT manually include
type.item_bie_identity - The facade's two-step process: (1) hash input_objects (from places) to get base bie_id, (2)
order_sensitive(bie_domain_type.item_bie_identity, base_bie_id) - No custom
_validate_places()function is needed —CommonIdentityVectorvalidates internally
BIE ID Creator Function (Three-Tier Pattern)
Each creator module provides three functions: create, calculate, and issue.
from bclearer_orchestration_services.identification_services.b_identity_ecosystem.bie_id_creation_module.bie_id_creation_facade import \
BieIdCreationFacade
from bclearer_orchestration_services.identification_services.b_identity_ecosystem.objects.bie_ids import \
BieIds
from bclearer_orchestration_services.identification_services.b_identity_ecosystem.registrations.helpers.registerers.bie_id_issue_requests import \
BieIdIssueScopes, EntityBieIdRequest
from bclearer_orchestration_services.identification_services.naming_service.b_sequence_names import \
BSequenceNames
from your_domain.common_knowledge.your_domain_types import BieDomainNameTypes
from your_domain.bie.bie_id_creators.your_domain_identity_vectors import \
ObjectTypeBIdentityVector, ObjectTypeBIdentityVectorPlaces
def create_object_type_b_bie_id(
object_a_bie_id: BieIds,
object_b_value: str) \
-> BieIds:
return \
calculate_object_type_b_bie_id(
object_a_bie_id=object_a_bie_id,
object_b_value=object_b_value)
def calculate_object_type_b_bie_id(
object_a_bie_id: BieIds,
object_b_value: str) \
-> BieIds:
identity_vector = \
__get_identity_vector(
object_a_bie_id=object_a_bie_id,
object_b_value=object_b_value)
return \
BieIdCreationFacade.create_bie_id_from_identity_vector(
vector=identity_vector)
def issue_object_type_b_bie_id(
object_a_bie_id: BieIds,
object_b_value: str,
bie_infrastructure_registry,
bie_id_type_id: BieIds = None,
b_sequence_name: BSequenceNames = None) \
-> BieIds:
input_objects = \
__get_input_objects(
object_a_bie_id=object_a_bie_id,
object_b_value=object_b_value)
if bie_id_type_id is None:
bie_id_type_id = \
BieDomainNameTypes.BIE_OBJECT_TYPE_B.item_bie_identity
if b_sequence_name is None:
b_sequence_name = \
BSequenceNames(
initial_b_sequence_name_list=['object_type_b_bie_id'])
issue_request = \
EntityBieIdRequest(
input_objects=tuple(input_objects),
bie_id_type_id=bie_id_type_id,
b_sequence_name=b_sequence_name,
issue_scope=BieIdIssueScopes.INFRASTRUCTURE)
issue_result = \
bie_infrastructure_registry.create_and_register_bie_id(
request=issue_request)
return \
issue_result.bie_id
def __get_input_objects(
object_a_bie_id: BieIds,
object_b_value: str) \
-> list:
identity_vector = \
__get_identity_vector(
object_a_bie_id=object_a_bie_id,
object_b_value=object_b_value)
return \
identity_vector.input_objects()
def __get_identity_vector(
object_a_bie_id: BieIds,
object_b_value: str) \
-> ObjectTypeBIdentityVector:
return \
ObjectTypeBIdentityVector(
bie_type=BieDomainNameTypes.BIE_OBJECT_TYPE_B,
bie_hr_name=object_b_value,
places=ObjectTypeBIdentityVectorPlaces(
object_a_bie_id=object_a_bie_id,
object_b_value=object_b_value))Notes:
create— pure computation, no side effects; delegates tocalculatecalculate— constructs identity vector and callsBieIdCreationFacade.create_bie_id_from_identity_vector()issue— createsEntityBieIdRequestand registers viacreate_and_register_bie_id(); defaults type and name if not provided- Private
__get_identity_vectorcreates aCommonIdentityVectorsubclass instance with the domain type, human-readable name, and typed places __get_input_objectsdelegates to the identity vector'sinput_objects()method
Domain Object Class
Domain objects are passive data holders. They receive a pre-computed BieBaseIdentities from the factory and pass it to super().__init__. There is no _create_vector() method.
from bclearer_core.bie.domain.bie_domain_objects import \
BieDomainObjects
from bclearer_core.bie.top.bie_base_identities import \
BieBaseIdentities
from bclearer_orchestration_services.identification_services.b_identity_ecosystem.objects.bie_ids import \
BieIds
class ObjectTypeBObjects(
BieDomainObjects):
def __init__(
self,
object_a_bie_id: BieIds,
object_b_value: str,
bie_base_identity: BieBaseIdentities) \
-> None:
self.object_a_bie_id = \
object_a_bie_id
self.object_b_value = \
object_b_value
super().__init__(
bie_base_identity=bie_base_identity)Notes:
- Instance attributes are set BEFORE calling
super().__init__ bie_base_identityis received from the factory — the object does NOT compute itsuper().__init__(bie_base_identity=bie_base_identity)—BieObjectsextractsbie_hr_name,bie_type, andbie_idfrom it- Do NOT pass
bie_id,base_hr_name, orbie_domain_typeseparately - Do NOT implement
_create_vector()— that method no longer exists inBieObjects
Factory Function
For each domain object type, create a create_* factory function in a factories/ sub-package. The factory owns all identity construction and registration logic. Pattern: places → vector → BieBaseIdentities → object → register.
from bclearer_core.bie.top.bie_base_identities import \
BieBaseIdentities, create_bie_base_identity_from_bie_identity_vector
from bclearer_core.infrastructure.session.bie_id_registerers.bie_id_registerer import \
BieIdRegisterer
from bclearer_orchestration_services.identification_services.b_identity_ecosystem.common_knowledge.bie_core_relation_types import \
BieCoreRelationTypes
from bclearer_orchestration_services.identification_services.b_identity_ecosystem.objects.bie_ids import \
BieIds
from bclearer_orchestration_services.identification_services.b_identity_ecosystem.registrations.helpers.registerers.bie_id_issue_requests import \
RelationBieIdRequest
from bclearer_orchestration_services.identification_services.naming_service.b_sequence_names import \
BSequenceNames
from your_domain.common_knowledge.your_domain_types import BieDomainNameTypes
from your_domain.bie.bie_id_creators.your_domain_identity_vectors import \
ObjectTypeBIdentityVector, ObjectTypeBIdentityVectorPlaces
from your_domain.objects.object_type_b_objects import ObjectTypeBObjects
def create_object_type_b_objects(
*,
object_a_bie_id: BieIds,
object_b_value: str,
bie_id_registerer: BieIdRegisterer) \
-> ObjectTypeBObjects:
bie_base_identity = \
_create_object_type_b_bie_base_identity(
object_a_bie_id=object_a_bie_id,
object_b_value=object_b_value)
object_type_b = \
ObjectTypeBObjects(
object_a_bie_id=object_a_bie_id,
object_b_value=object_b_value,
bie_base_identity=bie_base_identity)
bie_id_registerer.register_bie_id(
bie_base_identity=bie_base_identity)
bie_id_registerer.issue_and_register_bie_id(
request=RelationBieIdRequest(
bie_place_1_id=object_type_b.bie_id,
bie_place_2_id=object_a_bie_id,
bie_relation_type_id=BieCoreRelationTypes.BIE_WHOLES_PARTS.item_bie_identity,
b_sequence_name=BSequenceNames(
initial_b_sequence_name_list=['object_type_b_whole_part'])))
return \
object_type_b
def _create_object_type_b_bie_base_identity(
*,
object_a_bie_id: BieIds,
object_b_value: str) \
-> BieBaseIdentities:
places = \
ObjectTypeBIdentityVectorPlaces(
object_a_bie_id=object_a_bie_id,
object_b_value=object_b_value)
return \
create_bie_base_identity_from_bie_identity_vector(
identity_vector=ObjectTypeBIdentityVector(
bie_hr_name=object_b_value,
places=places))Notes:
- Factory accepts
bie_id_registerer: BieIdRegisterer— useBieIdRegisterer(wraps real registry) in production,NoOpBieIdRegistererin unit tests register_bie_id(bie_base_identity=...)— registers the object and its type-instance relation in one callissue_and_register_bie_id(request=RelationBieIdRequest(...))— registers a relation between two objects- The private
_create_*_bie_base_identityhelper isolates identity construction — testable independently - For type-parameterized vectors (Style B), pass
bie_type=BieDomainNameTypes.BIE_OBJECT_TYPE_Bto the vector constructor
Registration
Registration is done inside factory functions via BieIdRegisterer (see Factory Function template above).
The canonical methods are:
bie_id_registerer.register_bie_id(bie_base_identity=...)— registers an object and its type-instance relationbie_id_registerer.issue_and_register_bie_id(request=RelationBieIdRequest(...))— registers a relation between two objects
RelationBieIdRequest fields:
bie_place_1_id— part/child object'sbie_idbie_place_2_id— whole/parent object'sbie_idbie_relation_type_id— e.g.,BieCoreRelationTypes.BIE_WHOLES_PARTS.item_bie_identityb_sequence_name— aBSequenceNameswith a descriptive label
Deprecated patterns — do NOT use:
register_bie_object_and_type_instance()/register_bie_relation()helper functions- Direct
bie_infrastructure_registry.create_and_register_bie_id()calls inside domain objects EntityBieIdRequestin registration code (useregister_bie_idinstead for entity registration)