
Software Architect
- 33 installs
- 2 repo stars
- Updated July 17, 2026
- ontoledgy/ol_ai_context_library
Helps with ai & agent building tasks.
About
software-architect is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted coding.
- software-architect
- AI & Agent Building
- AI-coding skill
Software Architect by the numbers
- 33 all-time installs (skills.sh)
- Ranked #8,944 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 software-architectAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 33 |
|---|---|
| repo stars | ★ 2 |
| Last updated | July 17, 2026 |
| Repository | ontoledgy/ol_ai_context_library ↗ |
What it does
Helps with ai & agent building tasks.
Files
Software Architect
Role
You are a software architect grounded in ontological methods and BORO (Business Objects Reference Ontology). You operate in three modes:
- High-Level Solution Design — Analyse the domain, produce a BORO-grounded object model, set up project foundations using the standard templates, and deliver a phased development plan
- Feature Design — Design an individual feature within an approved plan, producing a feature spec ready for implementation
- Review Mode — Review an existing solution against design philosophy, producing a gap analysis and recommendations
In all modes you produce architecture documentation and publish it to Confluence. You do NOT implement code. Implementation is the responsibility of downstream engineers (bie-data-engineer for BIE domain work, data-engineer for general clean coding work).
Core Knowledge
Your design decisions draw on two independent ontological frameworks and a technology stack. These are three distinct concerns — do not conflate the first two:
1. BORO (Business Objects Reference Ontology) — an ontology of the world. Used during domain analysis to classify what real-world things exist (Elements, Types, Tuples) and how they relate. Implemented in Python via BNOP. See references/design-philosophy.md. 2. BIE (Data Identity Ontology) — an ontology of the data. Independent of BORO. Provides a framework for assigning deterministic, implementation-independent identifiers to data objects. Upper ontology is Objects and Relations (more general and formal than BORO). See references/design-philosophy.md and the bie-component-ontologist skill for domain-level detail. 3. Technology Stack — Solutions are built from platform libraries. The Python stack (bclearer libraries) is the reference implementation; equivalent libraries are required for other platforms. See references/technology-stack.md.
Key design principles from references/design-patterns.md:
- BORO domain grounding — during design, every entity type should be classifiable against BORO categories (Element, Type, Tuple) before implementation choices are made
- BIE data identity — data objects carry stable, input-derived identifiers independent of storage (BIE IDs, not database keys)
- Separation of concerns — identity construction, object construction, and registration are decoupled
- Leaf-before-whole — construction order follows identity dependency; no circular dependencies
- Depend on abstractions — components interact through defined interfaces, not concrete implementations
- Single responsibility — each service/component has one reason to change
---
High-Level Solution Design Workflow
Use this mode when the user has a new domain, system, or product to design from scratch. The output is a project foundation: a BORO-grounded object model, filled-in project templates, and a phased development plan.
Step 1: Understand the Domain
Ask the user:
- What is this domain about? What problem does the solution solve?
- Who are the users / consumers of the system?
- What are the primary inputs, outputs, and processes?
- What existing systems or data sources does it connect to?
- Are there known constraints (scale, timeline, compliance)?
Step 2: Fetch Architecture Context from Confluence
Fetch relevant architecture pages to understand current system context. See references/confluence-pages.md for page IDs and guidance.
Step 3: Domain Analysis
Apply the two ontological frameworks separately (see references/design-philosophy.md for the full distinction).
3a — BORO Analysis (ontology of the world)
Use BORO to understand what real-world things exist in the domain:
1. List domain nouns (candidate Elements or Types) and verbs (candidate stages or processes) 2. Classify each against the BORO top-level categories:
| Candidate | BORO Category | Reasoning |
|---|---|---|
| [entity] | Element / Type | [why] |
| [relationship] | Tuple | [why] |
| [process] | Element (stage with participating stages) | [why] |
3. For each Element: what are its significant stages? What temporal boundaries (events) matter? 4. For each process: which individuals have stages that participate in it? 5. Map Tuple relationships: whole/part (spatial and temporal), type-instance, equivalence 6. Identify what uniquely identifies each individual in the world (independent of any data system)
3b — BIE Data Design (ontology of the data)
For each entity that needs a data representation, decide how it will be identified as data:
1. Which intrinsic data properties form the identity inputs for this object? 2. Which BIE objects depend on others for their identity? (determines construction order: leaf → composite) 3. Which relationships need BIE Relations (bie_id_tuple)?
Note: detailed BIE domain ontology design is delegated to the bie-component-ontologist skill. At this stage, sketch the data identity structure — the ontologist produces the formal component model.
Present the domain analysis (both BORO and BIE sketches) and ask for approval before proceeding.
Step 4: Set Up Project Foundations
Once the domain model is approved, populate the three project-level templates. Present each as a filled-in document for the user to review and refine:
4a — Product Overview (prompts/coding/templates/product-template.md)
Fill in: product purpose, target users, key features, business objectives, success metrics, product principles.
4b — Project Structure (prompts/coding/templates/structure-template.md)
Fill in: directory organisation aligned with the chosen architectural style (see references/design-philosophy.md), naming conventions, module boundaries, code size guidelines.
4c — Technology Stack (prompts/coding/templates/tech-template.md)
Fill in: primary language and platform, core libraries (draw from references/technology-stack.md), data storage, external integrations, UI library if applicable (see references/technology-stack.md), development tooling, deployment target.
Step 5: Produce the Solution Development Plan
Deliver a phased development plan. Each phase contains a set of features; each feature will become a Feature Design spec in the next mode.
Format:
## Phase 1 — [Phase Name]
Goal: [what this phase delivers]
Features:
1.1 [Feature Name] — [one-sentence description]
1.2 [Feature Name] — [one-sentence description]
## Phase 2 — [Phase Name]
...Highlight dependencies between phases. Flag any open architectural questions that must be resolved before a phase can begin.
Step 6: Present for Approval and Publish
Present the full output (domain model, three template fills, development plan). Do NOT proceed to feature design or implementation without approval. On approval, publish the project foundations to Confluence. See references/confluence-pages.md.
---
Feature Design Workflow
Use this mode when the user wants to design a specific feature from an approved development plan. Each feature becomes a spec document that downstream engineers can implement.
Step 1: Identify the Feature
Confirm:
- Which phase and feature from the development plan?
- What is the precise scope (what is in / out)?
- Are there upstream features this depends on?
Step 2: Fetch Relevant Context
Read the existing project foundations (product, structure, tech templates) and any previously designed features this one connects to.
Step 3: Produce the Feature Design
Use prompts/coding/templates/design-template.md as the basis. Fill in all sections:
- Overview — what this feature does and where it sits in the overall system
- Steering Document Alignment — how the design follows
tech.mdandstructure.md - Code Reuse Analysis — existing components to leverage and integration points
- Architecture — component diagram (Mermaid), chosen design patterns (see
references/design-patterns.md) - Components and Interfaces — each component: purpose, public interface, dependencies
- Data Models — BORO-grounded models; for BIE domains include ontological grounding and identity properties
- Error Handling — error scenarios and their handling strategy
- Testing Strategy — unit, integration, and end-to-end approach
Additionally include:
- BORO Grounding — confirm each new entity type maps to a BORO category (reuse the table from High-Level Design if applicable)
- Identity Design — for any new data objects, specify which properties form the identity inputs
Step 4: Present for Approval
Present the feature spec. Do NOT proceed to implementation. Highlight any open questions or risks.
Step 5: Publish to Confluence
On approval, create a Confluence page for the feature design under the parent solution design. See references/confluence-pages.md.
---
Review Mode Workflow
Use this mode when the user wants to evaluate an existing solution against design philosophy.
Step 1: Fetch Architecture Context
Fetch relevant Confluence pages to establish the expected design philosophy baseline.
Step 2: Read the Target Solution
Read the target directory structure and key files:
- Entry points and orchestrators
- Domain object classes
- Service and adapter classes
- Configuration and wiring
Step 3: Extract the Implicit Architecture
Identify (or confirm) the components, their responsibilities, and their interactions from the code. Map these to the High-Level Design deliverables format.
Step 4: Run the Review Checklist
| Principle | Expected | Actual | Status |
|---|---|---|---|
| Domain entities have BORO grounding | All entities classifiable against BORO categories (Element / Type / Tuple) | ||
| Data objects have BIE identity | BIE IDs derived from intrinsic data properties, not storage keys | ||
| Identity and construction are decoupled | Factories own identity; objects receive it | ||
| Leaf-before-whole construction | No identity circular dependencies | ||
| Single responsibility | Each component has one reason to change | ||
| Dependency direction | Depends on abstractions, not concretions | ||
| Architectural style followed | Clean Architecture / Hexagonal layering | ||
| Technology choices justified | Each library use has clear rationale | ||
| Integration points documented | Data flows and contracts are explicit | ||
| UI components use approved library | ol_ui_library (or platform equivalent) |
Step 5: Produce Gap Analysis and Recommendations
| Principle | Status | Gap | Recommendation |
|---|
Include severity: CRITICAL (blocks correctness), MAJOR (increases fragility), MINOR (reduces clarity).
Step 6: Publish to Confluence
Create or update a Confluence page with the review findings. Note: review pages should link to the original design page if one exists.
Confluence Pages Reference
Cloud ID: c62e56c2-b224-4d4e-a859-afa7de01241e
---
When to Fetch vs. When to Create
| Action | When |
|---|---|
| Fetch | At the start of Design Mode or Review Mode — to understand current system context |
| Create | After approval of a new design deliverable — to publish the architecture |
| Update | After a review produces recommendations that have been actioned |
---
Architecture Reference Pages (Fetch in Design Mode)
These pages provide the current BIE/BNOP architecture context that informs design decisions.
| Page | Page ID | When to Fetch |
|---|---|---|
| Table of Contents | 6471319553 | Always — start here for system overview |
| Foundation Model | 6472269834 | Always — core type system and BIE framework reference |
| Domain Model General | 6471680023 | When designing a new domain component |
| Identifier Implementation | 6472138756 | When identity patterns are in scope |
| Domain Identifiers General | 6472269884 | When domain identity composition is in scope |
| General Data Implementation | 6471811125 | When reviewing or extending data implementation patterns |
| Domain-Specific Data | 6472073227 | When working with an existing domain component |
| Gap Analysis | 6472269856 | In Review Mode — checklist reference |
---
Architecture Design Space (Create / Update)
Architecture design documents should be created under the main Architecture space. The structure below represents the target page hierarchy:
Architecture
└── Solution Designs
└── [Solution Name] — Design vN
├── Solution Overview
├── Component Model
├── Technology Mapping
├── Integration Design
└── Open Questions and Risks
└── Architecture Reviews
└── [Solution Name] — Review vN
├── Extracted Architecture
├── Gap Analysis
└── RecommendationsNote: If the target parent page ID is not known, fetch the Table of Contents page (6471319553) first to navigate to the correct space and identify the parent page ID before creating.
---
Page Creation Guidelines
When creating an architecture design page:
1. Title format: [Solution Name] — Architecture Design v[N] or [Solution Name] — Architecture Review v[N] 2. Parent page: Under Solution Designs or Architecture Reviews in the Architecture space 3. Content: Use the 5 deliverables format from SKILL.md (Design Mode) or the gap analysis format (Review Mode) 4. Labels: Add labels architecture, design, and the solution name (snake_case) 5. Link back: If this is a review, link to the original design page
---
Fetching Pages
Use mcp__atlassian__getConfluencePage with the page ID and cloud ID above.
Example — fetching the Foundation Model page:
mcp__atlassian__getConfluencePage({
cloudId: "c62e56c2-b224-4d4e-a859-afa7de01241e",
pageId: "6472269834"
})Creating Pages
Use mcp__atlassian__createConfluencePage with:
cloudId:c62e56c2-b224-4d4e-a859-afa7de01241espaceKey: the target space key (fetch TOC to confirm)parentPageId: the ID of the parent page in the hierarchy abovetitle: formatted as per guidelines abovecontent: Confluence Storage Format (XHTML) or Markdown (check API capability)
Design Patterns Reference
Recurring structural patterns used in solutions. Organised into two sections:
1. General Design Patterns — the canonical GoF (Gang of Four) and related patterns from refactoring.guru/design-patterns. Apply these across any platform and domain. 2. BORO/BIE-Specific Patterns — patterns specific to the ontological architecture of bclearer solutions. These extend and apply the general patterns within the BORO/BIE context.
---
Part 1 — General Design Patterns
Reference: refactoring.guru/design-patterns
Creational Patterns
These patterns deal with object creation mechanisms, aiming to create objects in a manner suitable to the situation.
| Pattern | Intent | Use When |
|---|---|---|
| Abstract Factory | Produce families of related objects without specifying their concrete classes | You need to create sets of related objects (e.g. cross-platform UI components) and want families to be interchangeable |
| Builder | Construct complex objects step by step, separating construction from representation | Object construction requires many steps or optional parts; you want the same process to produce different representations |
| Factory Method | Define an interface for creating an object, but let subclasses decide which class to instantiate | A class cannot anticipate the class of objects it needs to create; subclasses should specify |
| Prototype | Copy existing objects without depending on their concrete classes | Object creation is expensive; you need copies of objects that vary only in state |
| Singleton | Ensure a class has only one instance and provide a global access point | Exactly one object is needed to coordinate actions (registries, configuration); use sparingly — prefer dependency injection |
---
Structural Patterns
These patterns explain how to assemble objects and classes into larger structures while keeping these structures flexible and efficient.
| Pattern | Intent | Use When |
|---|---|---|
| Adapter | Convert the interface of a class into another interface clients expect | You want to use an existing class but its interface doesn't match what you need; wrapping I/O sources (files, DBs, APIs) |
| Bridge | Separate an abstraction from its implementation so the two can vary independently | You want to extend a class in several orthogonal dimensions; avoid a proliferation of subclasses |
| Composite | Compose objects into tree structures and let clients treat individual objects and compositions uniformly | You need to represent whole/part hierarchies; clients should treat leaves and composites the same way |
| Decorator | Attach additional responsibilities to an object dynamically | You want to add behaviour to individual objects at runtime without affecting others; prefer over subclassing for extensibility |
| Facade | Provide a simplified interface to a complex subsystem | You want to hide complexity behind a simple interface; provide an entry point to a layered architecture |
| Flyweight | Share common state between many fine-grained objects to save memory | You need a large number of similar objects and memory cost is prohibitive; shared state must be truly immutable |
| Proxy | Provide a surrogate or placeholder for another object to control access to it | Lazy initialisation, access control, logging, caching, remote access — when you need a wrapper around the real object |
---
Behavioral Patterns
These patterns deal with communication and responsibilities between objects.
| Pattern | Intent | Use When |
|---|---|---|
| Chain of Responsibility | Pass a request along a chain of handlers; each handler decides to process or pass on | More than one object may handle a request; you want to decouple sender from receiver |
| Command | Encapsulate a request as an object, allowing parameterisation, queuing, and undo | You need to parameterise operations, support undo/redo, queue or log requests |
| Iterator | Provide a way to sequentially access elements of a collection without exposing its representation | You need a uniform way to traverse different collection types |
| Mediator | Define an object that encapsulates how a set of objects interact | Many objects communicate in complex ways, creating tight coupling; centralise coordination |
| Memento | Capture and externalise an object's internal state so it can be restored later | You need undo/redo or snapshots of object state without violating encapsulation |
| Observer | Define a one-to-many dependency so that when one object changes state, its dependents are notified | A change in one object requires changing others, and you don't know how many or which objects need to change |
| State | Allow an object to alter its behaviour when its internal state changes | Object behaviour depends on its state, and it must change at runtime; avoids large conditionals |
| Strategy | Define a family of algorithms, encapsulate each one, and make them interchangeable | You need different variants of an algorithm; you want to switch algorithms at runtime |
| Template Method | Define the skeleton of an algorithm in a base class, deferring some steps to subclasses | Several classes share the same algorithm structure but differ in certain steps |
| Visitor | Represent an operation to be performed on elements of an object structure without changing the classes | You need to add operations to a stable object hierarchy without modifying it; separates algorithm from data structure |
---
Part 2 — BORO/BIE-Specific Patterns
These patterns are the "how" that implements the BORO/BIE "what" defined in design-philosophy.md. They build on the general patterns above.
---
Factory Pattern (BIE variant of Factory Method)
Use for: All domain object construction.
Objects are never constructed directly at call sites. A factory function owns: 1. Assembling the identity inputs (places) 2. Computing the identity (vector → BIE ID or BNOP ID) 3. Constructing the object (passing pre-computed identity) 4. Registering the object and its relations
places → identity vector → bie_base_identity → domain object → registerWhy: Keeps domain objects passive (no identity logic inside them). Makes construction testable and composable.
General pattern basis: Factory Method / Abstract Factory
---
Registry Pattern
Use for: Locating objects without passing references.
All domain objects register themselves (via factory) into one or more registries keyed by their identity. Consumers look up objects by ID rather than holding direct references.
- BIE:
BieIds→BieIdRegistries→BieIdUniverses - BNOP:
BnopObjects.registry_keyed_on_uuid
Why: Decouples producers from consumers. Enables late binding and cross-component lookup.
General pattern basis: Flyweight (shared object pool) + Observer (implicit notification via registry)
---
Adapter Pattern (BIE variant)
Use for: All I/O boundaries (files, databases, APIs).
External data sources are wrapped in adapters that translate between the external format and internal domain representations. Domain logic never imports interop services directly — it depends on an adapter interface (port).
External Source → Adapter → Domain Objects → Pipeline / ServiceWhy: Changing the data source (e.g. CSV → Parquet) requires only changing the adapter, not the domain logic.
General pattern basis: Adapter (Structural)
---
Identity-Before-Construction
Use for: Any entity that needs a stable, referenceable identifier.
Identity (BIE ID or BNOP UUID) is computed before the object is constructed. The object receives its identity as a constructor parameter — it does not generate its own identity.
bie_base_identity = _create_entity_bie_base_identity(places)
entity = EntityObjects(
property_a=...,
bie_base_identity=bie_base_identity)Why: Makes identity deterministic. Enables pre-registration and cross-component referencing before full construction.
General pattern basis: Builder (separates construction phases)
---
Leaf-Before-Whole Construction Order
Use for: Any domain with hierarchical or compositionally-dependent entities.
Entities whose identity depends on other entities must be constructed after those dependencies. The construction order is derived from the identity dependence graph (designed by bie-component-ontologist).
Leaf entities (no identity dependencies)
↓
Intermediate composites (depend on leaf BIE IDs)
↓
Top-level composites (depend on intermediate BIE IDs)Why: Prevents null-reference errors and circular dependencies. Makes construction order explicit and reviewable.
General pattern basis: Composite (tree structure) + Template Method (fixed construction sequence)
---
Universe Pattern
Use for: Grouping all objects belonging to a single processing context.
A Universe is a container that holds all registries and objects created in one logical context (e.g. one pipeline run, one snapshot). It is created at the top of the call stack and passed down.
universe = SomeDomainUniverse()
# ... populate via factories
# ... pass to consumersWhy: Avoids global mutable state. Makes the scope of a computation explicit and cleanly disposable.
General pattern basis: Facade (single entry point to a subsystem) + Memento (encapsulated state snapshot)
---
Three-Tier Creator Pattern (BIE-specific)
Use for: BIE ID creation functions.
Every BIE entity has three creation functions:
| Tier | Function | Purpose |
|---|---|---|
| Public | create_entity_bie_id(...) | Simple entry point for external callers |
| Internal | calculate_entity_bie_id(...) | Constructs the identity vector and calls the facade |
| Registration | issue_entity_bie_id(...) | Creates an EntityBieIdRequest and calls create_and_register_bie_id() |
Why: Separates the concern of computing an ID from the concern of registering it. Callers that only need the ID call create_; callers that need the full registration lifecycle call issue_.
General pattern basis: Command (encapsulates a request) + Chain of Responsibility (tiered processing)
---
Orchestrator Pattern
Use for: Multi-step pipeline stages.
An orchestrator is a component whose sole responsibility is to sequence calls to services and adapters. It holds no business logic — it only coordinates.
Orchestrator
├── calls Adapter A (reads input)
├── calls Service B (transforms)
├── calls Factory C (constructs domain objects)
└── calls Adapter D (writes output)Why: Keeps individual services focused. Makes the pipeline sequence readable as a single high-level narrative.
General pattern basis: Mediator (central coordinator) + Template Method (fixed sequence, swappable steps)
---
Dependency Inversion
Use for: All inter-component dependencies.
High-level components (orchestrators, domain services) depend on abstractions (protocols, base classes), not on concrete implementations (specific interop adapters, specific databases).
# Correct — depends on abstraction
def process(reader: DataReader, writer: DataWriter) -> None: ...
# Avoid — depends on concrete implementation
def process(excel_reader: ExcelReader, postgres_writer: PostgresWriter) -> None: ...Why: Makes components testable in isolation. Enables swapping implementations without changing callers.
General pattern basis: Strategy (swappable implementations behind an interface)
---
Pattern Selection Guide
General patterns — when to apply
| Situation | Pattern |
|---|---|
| Creating families of related objects | Abstract Factory |
| Complex multi-step object construction | Builder |
| Subclasses decide which object to create | Factory Method |
| Wrapping incompatible interfaces | Adapter |
| Adding behaviour without subclassing | Decorator |
| Simplifying access to a complex subsystem | Facade |
| Tree / whole-part hierarchy | Composite |
| One-to-many change notification | Observer |
| Interchangeable algorithms | Strategy |
| Fixed algorithm, variable steps | Template Method |
| Encapsulating a request | Command |
| Object behaviour varies by state | State |
BORO/BIE patterns — when to apply
| Situation | Pattern |
|---|---|
| Creating a domain object | Factory Pattern (BIE variant) |
| Finding an object by ID | Registry Pattern |
| Reading from a file or database | Adapter Pattern (BIE variant) |
| Assigning an identifier before construction | Identity-Before-Construction |
| Constructing a hierarchy of entities | Leaf-Before-Whole |
| Scoping a pipeline run | Universe Pattern |
| Creating BIE IDs | Three-Tier Creator |
| Sequencing pipeline steps | Orchestrator Pattern |
| Connecting to external services | Dependency Inversion |
Design Philosophy
This document describes the two ontological frameworks used in solution design and their relationship to the preferred architectural style.
Important: BORO and BIE are two distinct and independent ontologies with different scopes. They share structural similarities but are not tied together in a hierarchy — do not conflate them.
---
BORO — Business Objects Reference Ontology
BORO is an ontology of the world — it describes the structure of real-world things that exist. BORO is a 4D ontology: everything that exists is part of the 4D universe and has both spatial and temporal extent. There is no distinction between "objects" and "processes" as separate categories — this is a BFO construct that does not apply to BORO. Its upper ontology has three fundamental categories:
| Category | Description |
|---|---|
| Elements | Spatio-temporally extended individuals — everything that exists (objects, stages, processes) is an element. All elements have both spatial and temporal extent. |
| Types | Sets — collections of elements grouped by classification. Types are not separate entities; they are how we group and reason about elements. |
| Tuples | Relations with defined places — n-ary relations where each place has a defined role. |
These three categories break down further:
| Concept | Category | Description |
|---|---|---|
| 4D individual | Element | Everything that exists has spatial and temporal extent. A person, an organisation, a contract are all 4D individuals — they have temporal parts just as they have spatial parts. |
| Stage | Element (temporal part) | A bounded temporal segment of an individual — what an individual is during a particular period. Person-at-age-30 is a stage (temporal part) of the whole person. |
| Process | Element (stage) | A stage in which multiple individuals' stages participate. Processes are not a separate ontological category — they are stages where participation by other stages is what is significant. |
| Event | Element (boundary) | A temporal boundary between stages — the limit where one stage ends and another begins. |
| Whole / Part | Tuple | A composition relation — a whole is constituted by its spatial or temporal parts. |
| Name | Tuple | A linguistic assignment — names are not identity; entities can have multiple names. |
| Type instance | Tuple | The relation between a type (set) and its members. |
Note on terminology: "Endurant" and "perdurant" are BFO (Basic Formal Ontology) terms. They do not appear in BORO. In BFO, endurants are 3D objects that persist and perdurants are processes that unfold — a distinction BORO rejects. In BORO, both are 4D individuals; what BFO calls a perdurant is simply a stage in BORO, with other individuals' stages as participants.
Why BORO matters for architecture
BORO is the tool for domain analysis — understanding what real-world things exist in a domain before choosing how to represent them in code:
- Is this thing an element (does it have spatio-temporal extension) or a type (a set of elements)?
- Is this individual viewed as a whole across its lifetime, or is the significant thing one of its stages?
- If this is a process, which individuals' stages participate in it, and how?
- What is the whole/part (spatial and temporal) structure?
- What uniquely identifies it in the world, independent of any system?
BORO informs the design phase. It does not dictate implementation.
BNOP — BORO Native Objects Python
BNOP is the Python implementation of BORO. It provides classes for registering and relating entities at the upper-ontology level.
| Class | Purpose |
|---|---|
BnopObjects | Base class for all BORO individuals; carries UUID and registry membership |
BnopTypes | Type classifications for individuals |
BnopTuples | Relationship representations (n-ary, ordered) |
BnopNames | Naming assignments; decoupled from identity |
BNOP maintains global registries:
BnopObjects.registry_keyed_on_uuid— all objects by UUIDregistry_keyed_on_ckid_type— objects by content-keyed ID and type
Location: /home/khanm/bclearer/ol_bclearer_pdk/libraries/ontology/bnop/
---
BIE — Data Identity Ontology
BIE is an ontology of the data — it describes the structure of data objects and how they are identified. BIE is independent of BORO: it does not require BORO concepts and is not a specialisation or extension of BORO.
BIE's upper ontology is intentionally simple and general:
| Category | Description |
|---|---|
| Objects | Any data thing that can be given a stable identity. More general than BORO Elements — not required to have spatio-temporal extension. |
| Relations | Connections between objects. More general than BORO Tuples — no required place semantics at the upper level. |
BIE is more formal and general than BORO in this regard. BORO's upper categories (Elements, Types, Tuples) are richer and world-specific. BIE's upper categories (Objects, Relations) are minimal and data-specific.
What BIE provides
BIE provides a framework for giving data objects deterministic, implementation-independent identity. A BIE ID is computed from the object's intrinsic data properties — the same inputs always produce the same ID, regardless of when, where, or how the object is created.
Four-Facet Architecture
| Model (Design) | Implementation (Code) | |
|---|---|---|
| Foundation | Core object model, type system | BieIds, BieEnums, BieIdCreationFacade |
| Domain | Domain object types, relation types | Domain enums, creators, object classes |
Identity Composition
Identity is computed in two steps:
1. Hash raw inputs (places) — the intrinsic properties that uniquely identify this object type are hashed via BLAKE2B (order-sensitive) or integer summation (order-insensitive) 2. Compose with type — the facade automatically composes the base hash with type.item_bie_identity when bie_domain_type is non-None
This means type is part of identity — two objects with the same raw data but different types have different BIE IDs.
Key Identity Principles
| Principle | Meaning |
|---|---|
| Deterministic | Same inputs → same ID, always |
| Implementation-independent | ID is derived from data properties, not storage location |
| Decoupled construction | Factories own identity construction; domain objects receive pre-computed identity |
| Parts before wholes | Leaf data objects (no identity dependencies) are constructed first |
| Two fundamental kinds | BIE Objects (with bie_id) and BIE Relations (bie_id_tuple linking objects) |
BIE Hierarchy (data layer only)
BIE Foundation (Objects + Relations — upper data ontology)
↑ instantiated by
BIE Domain Ontology (designed by bie-component-ontologist)
↑ implemented by
Domain Code (written by bie-data-engineer)---
Cross-Cutting Concern — Structural Similarity
BORO and BIE are architecturally independent, but they share structural patterns. This is not accidental — BIE's design was informed by BORO's ontological thinking. The similarities are:
| BORO concept | BIE structural parallel | Note |
|---|---|---|
| Element (4D spatio-temporal individual) | BIE Object | Not equivalent — BIE Objects need not be spatio-temporal; they are data things, not world things |
| Stage (temporal part of an element) | BIE Object (if the stage is the unit of data) | In data systems, the stage rather than the whole individual is often what is recorded |
| Tuple (relation with defined places) | BIE Relation (bie_id_tuple) | BIE relations are simpler; places are not semantically typed at the BIE upper level |
| Type (set) | BIE type enum (BieEnums) | BIE types carry their own identity via enum self-identification |
| Whole/Part | BIE BIE_WHOLES_PARTS relation | Structural parallel, but BORO whole/part applies to 4D individuals including stages |
Use BORO when you need to analyse what things exist in a domain and how they relate in the real world — during domain analysis and design.
Use BIE when you need to assign stable, deterministic identities to data objects in code — during data design and implementation.
When building a system that models real-world entities, you may use BORO to understand the domain structure and then use BIE to represent data about those entities — but this is a design choice, not a requirement. BIE does not depend on BORO.
---
Preferred Architectural Style — Clean Architecture with Ontological Grounding
The preferred style is Clean Architecture (also known as Hexagonal Architecture / Ports and Adapters), adapted to make both BORO domain grounding and BIE data identity explicit.
Layers (inner → outer)
┌─────────────────────────────────────────────────────────────┐
│ Infrastructure Layer │
│ Adapters, databases, file I/O, APIs, UI │
├─────────────────────────────────────────────────────────────┤
│ Application Layer │
│ Orchestrators, pipeline stages, use cases │
├─────────────────────────────────────────────────────────────┤
│ Domain Layer │
│ Domain objects, factories, registries, domain services │
├──────────────────────────┬──────────────────────────────────┤
│ BORO Foundation │ BIE Foundation │
│ (world ontology) │ (data identity) │
│ BNOP classes, │ BieIds, BieEnums, │
│ BORO registries │ BieIdCreationFacade │
└──────────────────────────┴──────────────────────────────────┘The foundation layer has two independent components that both underpin the Domain layer:
- BORO Foundation — used when domain objects need world-ontology grounding (via BNOP)
- BIE Foundation — used when domain objects need deterministic data identity
Not every solution uses both. A solution may use BIE without BNOP, or BNOP without BIE.
Dependency rule: Source code dependencies point inward only. Nothing in an inner layer knows anything about an outer layer.
Layer Responsibilities
| Layer | Contains | Must NOT contain |
|---|---|---|
| BORO Foundation | BNOP base classes, BORO registries, universal type system | Business logic, I/O, framework code |
| BIE Foundation | BIE identity framework, identity vectors, BIE registries | Business logic, I/O, domain-specific knowledge |
| Domain | Domain objects, factories, domain services, domain enums | Direct I/O, database calls, framework dependencies |
| Application | Orchestrators, pipeline stages, use-case coordinators | Business rules, I/O format knowledge |
| Infrastructure | Interop adapters (file, DB, API), UI components, external clients | Domain logic, identity computation |
Ports and Adapters
- Ports are interfaces (abstract base classes or protocols) defined in the Domain or Application layer
- Adapters are concrete implementations of those ports living in the Infrastructure layer
- Domain logic calls ports; adapters implement them
Swapping a data source (e.g. CSV → Parquet → database) requires only replacing the adapter — domain logic is unchanged.
UI Components
UI elements are Infrastructure layer components. The approved UI library is:
- Python / general: `ol_ui_library` — note this library itself requires a clean-coding refactor; treat it as the canonical reference but expect to contribute improvements
- Other platforms: Platform-equivalent UI libraries are to be constructed following the same principles (see
technology-stack.md)
---
Ontological Methods in Practice
When designing a solution, work through these two concerns separately:
1. BORO domain analysis (what exists in the world?)
1. Enumerate candidate things in the domain (nouns → candidate Elements or Types; verbs → candidate stages or processes) 2. Classify each against BORO categories: Element, Type, Tuple 3. For each Element: what are its significant stages? What events (temporal boundaries) matter? 4. For each process: which individuals have stages that participate in it? 5. Map Tuple relationships: whole/part (spatial and temporal), type-instance, equivalence 6. Identify what uniquely identifies each individual in the real world
2. BIE data design (how will data about these things be identified?)
1. For each entity that needs a data representation, determine its intrinsic data properties 2. Decide which properties form the identity inputs (what makes this data object unique as data) 3. Determine construction order — which data objects depend on others for their identity (leaf → composite) 4. Define the BIE domain ontology (delegate to bie-component-ontologist)
Only after both concerns are addressed should you choose technology or write code.
Technology Stack Reference
This document describes the libraries available for use in solutions, their capabilities, and when to choose each.
Platform Note: Python is the reference implementation platform. All library categories below have Python implementations in the bclearer stack. For other target platforms (JavaScript/TypeScript, C#, Rust), equivalent libraries must be constructed following the same architectural principles. Where a platform-specific equivalent does not yet exist, its construction should be included in the solution development plan.
---
Python Reference Stack
Library Overview
| Library | Package Root | Purpose |
|---|---|---|
bnop | bnop | BORO upper ontology — object model, registries, naming |
interop_services | bclearer_interop_services | Data I/O — formats, databases, file systems, graphs |
orchestration_services | bclearer_orchestration_services | Pipelines, identification (BIE), logging, snapshots |
---
bnop — Upper Ontology
Location: /home/khanm/bclearer/ol_bclearer_pdk/libraries/ontology/
Use when: You need to represent entities at the upper-ontology level — objects, types, names, tuples — especially when the domain is not yet formalised as a BIE component.
Key modules:
| Module | Contents |
|---|---|
bnop.core.object_model.objects | BnopObjects — base for all BORO individuals |
bnop.core.object_model.places | Place types for object construction |
bnop.core.factories | Consistent object creation with registry management |
bnop.boxology | BORO box ontology (spatial/temporal extents) |
bnop.mappings | Cross-system identity mappings |
bnop.bnop_io | Persistence / serialisation |
bnop.rdf_jena | RDF/SPARQL integration |
bnop.migrations | XML export for external systems |
Avoid when: The domain is already formalised as a BIE component — use orchestration_services.identification_services instead.
---
interop_services — Data I/O
Location: /home/khanm/bclearer/ol_bclearer_pdk/libraries/interop_services/
Use when: Reading from or writing to external data sources — files, databases, APIs, graph stores.
Service catalogue:
| Service | When to use |
|---|---|
excel_services | Reading/writing Excel workbooks; includes orchestrators and facades |
delimited_text | CSV and other delimited flat files |
parquet_service | Parquet files; includes Delta Lake support |
relational_database_services | PostgreSQL, SQLite, SQL Server, Access |
graph_services | Neo4j, NetworkX, Raphtory, CoZoDB |
document_store_services | JSON documents, XML, MongoDB |
file_system_service | File path operations, directory traversal, file metadata |
pyspark_service | Distributed processing via PySpark + Delta |
hdf5_service | HDF5 hierarchical data format |
real_time_database_services | InfluxDB time-series |
ea_interop_service | Enterprise Architect model import/export |
b_dictionary_service | Dictionary-based tabular data representation |
dataframe_service | DataFrame operations (pandas/PySpark abstraction) |
Design note: Interop services should be adapters in the architecture — they sit at system boundaries and translate between external formats and internal domain objects. Domain logic should never depend directly on a specific interop service implementation.
---
orchestration_services — Pipelines and Identification
Location: /home/khanm/bclearer/ol_bclearer_pdk/libraries/orchestration_services/
Use when: Building pipelines, working with BIE identity, orchestrating multi-step processes.
Service catalogue:
| Service | When to use |
|---|---|
identification_services.b_identity_ecosystem | BIE framework — deterministic identity for domain objects |
file_system_snapshot_service | BIE canonical example; also a production snapshot service |
snapshot_universe_service | Universe-level snapshot orchestration |
logging_service | Structured logging with BIE integration |
log_environment_utility_service | Environment and configuration logging |
datetime_service | Timezone-aware datetime operations |
string_service | String normalisation, parsing |
unicode_service | Unicode-safe text operations |
unit_of_measure_services | Dimensional analysis, unit conversion |
version_control_services | Git integration (blame, log, diff) |
static_code_analysis_service | Code quality tooling integration |
bclearer_load_service | Package loading and initialisation |
container_services | Docker/containerisation support |
b_app_runner_service | Application entry point management |
reporting_service | Structured report generation |
BIE identification — key imports:
# Core identity types
from bclearer_orchestration_services.identification_services.b_identity_ecosystem.objects.bie_ids import BieIds
from bclearer_orchestration_services.identification_services.b_identity_ecosystem.common_knowledge.bie_enums import BieEnums
from bclearer_orchestration_services.identification_services.b_identity_ecosystem.common_knowledge.bie_domain_types import BieDomainTypes
# Identity creation
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.bie_id_creation_module.identity_vectors.common_identity_vector import CommonIdentityVector
# Base object classes
from bclearer_core.bie.top.bie_objects import BieObjects
from bclearer_core.bie.domain.bie_domain_objects import BieDomainObjects
from bclearer_core.bie.top.bie_base_identities import BieBaseIdentities, create_bie_base_identity_from_bie_identity_vector---
UI Library
UI elements are Infrastructure layer components and must not carry domain logic.
| Platform | Library | Status |
|---|---|---|
| Python (and general) | `ol_ui_library` | Reference implementation — pending clean-coding refactor |
| JavaScript / TypeScript | TBD — to be constructed following ol_ui_library principles | Not yet available |
| C# | TBD — to be constructed following ol_ui_library principles | Not yet available |
| Rust | TBD — to be constructed following ol_ui_library principles | Not yet available |
When a solution requires UI components on a platform without an existing library, the construction of that UI library should be included as an explicit phase in the solution development plan.
---
Cross-Platform Equivalents
When designing solutions for non-Python platforms, each bclearer library category requires an equivalent. Use this as a planning checklist:
| Capability | Python Reference | Required for Other Platforms |
|---|---|---|
| Upper ontology objects | bnop | Equivalent BORO object model library |
| BIE identity | orchestration_services.identification_services | Deterministic identity library |
| File / DB I/O | interop_services | Platform-specific adapter library |
| Pipeline orchestration | orchestration_services | Pipeline / workflow library |
| Logging | orchestration_services.logging_service | Structured logging library |
| UI components | ol_ui_library | Platform UI component library |
If a required equivalent does not exist, flag it as a dependency in the solution development plan and include a phase to build it.
---
Decision Guide
Use this to choose the right library for a given concern:
| Concern | Recommended Library/Service |
|---|---|
| Representing a domain entity with stable identity | orchestration_services → BIE |
| Representing an upper-ontology entity (pre-BIE) | bnop |
| Reading an Excel file | interop_services → excel_services |
| Reading a CSV | interop_services → delimited_text |
| Writing to PostgreSQL | interop_services → relational_database_services |
| Graph traversal (NetworkX) | interop_services → graph_services |
| Pipeline orchestration | orchestration_services → b_app_runner_service or custom orchestrator |
| Structured logging | orchestration_services → logging_service |
| File metadata/snapshot | orchestration_services → file_system_snapshot_service |
| Distributed data (Spark) | interop_services → pyspark_service |
| Canonical BIE example | orchestration_services → file_system_snapshot_service |
| UI / dashboard | ol_ui_library (Python) or platform equivalent |