Google Sign-In Required

Use your company Google account to access the BetterFleet private content.

Back to private home

BetterFleet Support Private
Skip to content
BetterFleet Dev Wiki
Evidence, Ownership, and Lineage
Initializing search
    bf-dev
    • Home
    • Process
    • Products
    • Reference
    • Decisions
    • Work
    • Operations
    bf-dev
    • Home
      • Process Handbook
      • BetterFleet Workflow Map
      • Product Development System
      • Product Engineering Workflow
        • Process Workflows
        • Work Intake and Weekly Planning
        • Product Engineering Workflow in Linear
        • Product Engineering Delivery
        • Agent Guidance
        • Workflow
        • Skills
        • Skill Sources
        • Process Guides
        • GitLab Feature Flags
        • In-App Docs Authoring
        • Release Notes
        • Process Templates
        • Release Plan: <title>
      • Process Publishing
      • Product overview
        • General Reference
          • Core Domain Training
          • System Topology
          • Two-Axis Ontology Model
          • Ontology Primer
          • Worked Example
          • Evidence, Ownership, and Lineage
            • Ownership Pattern
            • Vehicle Activity Lineage
            • Energy System Lineage
            • Session And Commercial Lineage
            • Implementation Boundary Reminder
            • Lineage Checklist
          • Energy Management
          • Standards and Protocol Map
          • Charging, Roaming, and Commercial Model
          • Charge Planning and Operations
          • Cross-Cutting Domains
          • Domain Coverage Matrix
        • BetterFleet Product Ontology
        • Core Operations Data Ontology
        • BetterFleet R&D Plan
        • Index
        • Architecture
        • Manage Product Capabilities
        • Manage Data and State
        • Manage Service Interaction Flows
        • Manage Reference
        • Manage Internal Application Diagrams
          • Manage Authorization And Permissions
          • bf-manage-core Auth and Authorization Model
          • Manage Authorization and Permissions
          • bf-manage-web Auth and Permission Model
          • Manage Service Catalog
          • bf-depot-sim
          • bf-digital-twin (Manage Role)
          • bf-fleet-health
          • bf-manage-connect
          • bf-manage-core
          • bf-manage-incidents
          • bf-manage-roaming
          • bf-manage-sitepwrmon
          • bf-manage-web
          • bf-schedule-creator (Manage Role)
          • bf-support-microsite
          • bf-telematics
        • Index
        • Architecture
        • Plan Reference
        • Plan Internal Application Diagrams
        • Plan Migration and Flags
        • Plan Simulation Request Lifecycle
          • Plan Service Catalog
          • bf-bnl-schedule-analysis-compute
          • bf-bnl-settings
          • bf-bnl-ui
          • bf-digital-twin (Plan Role)
          • bf-route-modelling
          • bf-schedule-creator (Plan Role)
      • Where to Ask Product Questions
      • Reference
        • Platform Reference
        • Platform Architecture
        • Script Runtime Model
        • Compose Profiles and Modes
        • Repository Map
        • Monolithic Git Transition FAQ
        • Monolithic Git Sizing
        • CI and Release Integration
        • Shared Reference
        • Shared Infrastructure Architecture
        • Secrets and Env Strategy
        • Vendors and Local Dependencies
        • System Reference
        • Cloud Data Dependencies
        • Ports and URLs
        • Service Matrix
          • API Docs
          • OCPI API Docs
          • OCPP API Docs
          • OSCP API Docs
          • VDV API Docs
          • Yard State API Docs
        • System Design
        • System Design: BBA Microgrid Controller Generic Packet Translation
        • System Design: Depot Simulation
        • System Design: IoT Sensor Packet
        • System Design: Microgrid Energy Orchestration
          • System Design: OCPP Profile 3 And ISO 15118 PKI
          • Architecture: BetterFleet OCPP Profile 3 and ISO 15118 PKI
          • Specification: BetterFleet OCPP Profile 3 and ISO 15118 Certificate Lifecycle Management
          • System Design: On-Prem Control
          • Challenge
          • Specification: BetterFleet On-Prem Continuity Control
          • System Design: OSCP
          • OSCP Protocol Documentation
          • Depot Sim Testing Requirements
          • System Design: OSCP Flexibility Provider Domain
      • Decisions
        • Architecture Decision Records
        • 0001 - Record architecture decisions
        • 0002 - Cognito for Authentication and Authorisation
        • 0003 - AWS Amplify for Authentication
        • 0004 - DynamoDB for default database
        • 0005 - Data Persistence
        • 0006 - Trunk-Based Development
        • 0007 - Generalised principle for automation
        • 0008 - Naming Repositories, Services, and URLs
        • 0009 - Use Timezone Aware DateTimes and UTC
        • 0010 - Use semantic release
        • 0011 - Centralized feature flag repository
        • 0012 - Use Named Exports in Storybook
        • 0013 - RESTful TITLE GraphQL
        • 0014 - Service Granularity
        • 0015 - Async/co-routine exception handling pattern
        • 0016 - Logging & log levels
        • 0017 - Instantiated Models
        • 0018 - Repository Pattern for Database Access
        • 0019 - Use of Design Tokens in TypeScript React Application
        • 0020 - API backwards compatibility and versioning
        • 0021 - Alembic Migration strategy
        • 0022 - Consistent react-hook-form usage
        • 0023 - Domain Event-Driven Architecture
        • 0024 - Domain Event Bus Tech Stack
        • 0025 - No enum types in DB table columns
        • 0026 - In-Memory Ormar Stores for Repository testing
        • 0027 - Storing Tab State in Query and Local Storage
        • 0028 - Adopt OpenTelemetry Semantic Conventions for Structured Logging
        • 0029 - Adopt RFC 9457 for HTTP Error Responses
        • 0030 - Use GitLab registry and Terraform state for ECS services
        • 0031 - Adopt DDD, Hexagonal Architecture, and CQRS for Python Domain Services
      • Work
        • Active Work
          • Work: Bba Microgrid Controller
          • Implementation Specification: BBA Microgrid Controller
          • BBA Microgrid Controller Deliverables (Stories)
          • Work: BFDev Monolithic Git
          • Challenge
          • Specification: BFDev Monolithic Git v2
          • BFDev Monolithic Git v2 Stories
          • Work: Complex Circuit Load Balancing
          • Implementation Specification: Complex Circuit Load Balancing
          • Complex Circuit Load Balancing Deliverables (Stories)
            • COR-10 and COR-11 Consolidation Review
          • Work: Dispatch Reliability and Reconciliation
          • Challenge
          • Specification: Dispatch Reliability and Reconciliation
          • Dispatch Reliability and Reconciliation (Unit User Stories)
            • Dispatch populated vehicle cards grey surface snapshot
            • Dispatch Visual Review
          • Work: Enable Scheduled Managed Charger Access
          • Challenge: Enable Scheduled Managed Charger Access
          • Specification Exploration Dossier: Enable Scheduled Managed Charger Access
          • Specification Review: Enable Scheduled Managed Charger Access
          • Specification: Enable Scheduled Managed Charger Access
          • Work: Guided Cut-Off and Release Orchestration
          • Specification: Guided Cut-Off and Release Orchestration
          • Guided Cut-Off and Release Orchestration (Unit User Stories)
          • Work: Production Deployment Validation
          • Challenge
          • Work: Scheduled Report Parity
          • Specification: Scheduled Report Parity
          • Work: Telematics
          • Telematics EventBridge Path
          • Telematics Ingress Architecture
          • Specification: Telematics Migration into bf-manage-core with 5-Minute Freshness and Health Visibility
          • Telematics Core Migration MVP (Implementation-Time BDD)
          • Work: Vector Derms
          • Implementation Specification: Vector DERMS
          • Vector DERMS Deliverables (Stories)
          • Work: Visiting Vehicle Charging Visibility
          • Specification: Visiting Vehicle Charging Visibility
          • Visiting Vehicle Charging Visibility (Unit User Stories)
          • Work: Workspace Owned Stripe Roaming
          • Specification: Workspace-Owned Stripe Credentials for Roaming Payments
        • Backlog Work
          • Work: Microgrid
          • Microgrid Backlog Stories
          • Work: Mobile Ops Companion
          • Challenge
          • Specification: Mobile Operations Companion v1
          • Mobile Operations Companion Deliverables (Stories)
          • Work: Oscp
          • OSCP Backlog Stories
        • Archived Work
          • Work: Code Canonical Orchestration
          • Challenge
          • Specification: Product Engineering Workflow
          • Product Engineering Workflow Deliverables (Unit User Stories)
          • Work: Release Notes Automation
          • Release Plan: Release Notes Automation
          • Release Notes Automation Backlog Stories
      • Operations
      • Onboarding Runbook
        • Operations Runbooks
        • Production Hotfix Release
        • Staging Hotfix Release
        • Manage Staging Release Validation
        • Terraform Plan Dry Runs
        • Operations Tooling
        • Code Indexing
        • Operations Evidence
        • Database Restoration Test Report
      • Daily Operations Runbook
      • Testing Guide
      • Troubleshooting
    • Ownership Pattern
    • Vehicle Activity Lineage
    • Energy System Lineage
    • Session And Commercial Lineage
    • Implementation Boundary Reminder
    • Lineage Checklist
    1. Home
    2. Products
    3. General
    4. Core Domain Training
    general reference

    Evidence, Ownership, and Lineage¶

    The ontology becomes useful when teams can trace a product decision back to its evidence. A feature should say which source owns the raw fact, which projection gives it domain meaning, and which consumer is allowed to act on it.

    Ownership Pattern¶

    flowchart LR
      Raw["Raw evidence<br/>protocol payloads, telemetry, schedules, meters, logs"]
      Owner["Evidence owner<br/>source system or adapter boundary"]
      Projection["Domain projection<br/>vehicle activity, energy system, charging, commercial record"]
      Decision["Decision owner<br/>domain use case or aggregate"]
      Consumer["Consumer<br/>UI, report, support, API, downstream event"]
      Audit["Lineage and audit<br/>source id, timestamps, version, confidence"]
    
      Raw --> Owner
      Owner --> Projection
      Projection --> Decision
      Projection --> Consumer
      Decision --> Consumer
      Owner --> Audit
      Projection --> Audit
      Decision --> Audit

    Use this pattern before adding a new feed or report:

    1. Name the raw evidence.
    2. Name the evidence owner.
    3. Name the core concept or projection it supports.
    4. Name the domain decision that can act on it.
    5. Name the consumer and the lineage it needs.

    Vehicle Activity Lineage¶

    vehicle activity is a projection. It joins evidence about movement, assignment, energy state, charging state, readiness, and health.

    flowchart TB
      subgraph Evidence["Evidence feeds"]
        Telematics["Telematics<br/>location, motion, SoC"]
        Trips["Trip observations<br/>movement episodes"]
        Schedule["Schedule and dispatch<br/>blocks, duties, assignments"]
        Charging["Charging sessions<br/>start, stop, meter, status"]
        Faults["Incidents and diagnostics<br/>faults, degraded state"]
      end
    
      subgraph Projection["Vehicle activity projection"]
        Mobility["mobility state"]
        Assignment["assignment state"]
        Energy["energy state"]
        ChargeState["charging state"]
        Readiness["readiness state"]
        Health["health state"]
      end
    
      subgraph Consumers["Consumers"]
        Dispatch["dispatch confidence"]
        SmartCharging["charging priority"]
        Incidents["incident impact"]
        Reports["fleet and charging reports"]
        Support["support explanation"]
      end
    
      Telematics --> Mobility
      Telematics --> Energy
      Trips --> Mobility
      Schedule --> Assignment
      Charging --> ChargeState
      Charging --> Energy
      Faults --> Health
      Assignment --> Readiness
      Energy --> Readiness
      ChargeState --> Readiness
      Health --> Readiness
      Readiness --> Dispatch
      Readiness --> SmartCharging
      Health --> Incidents
      Mobility --> Reports
      ChargeState --> Reports
      Readiness --> Support

    The projection should preserve time validity and source lineage. If telematics, schedule, and charging feeds disagree, the projection should expose the confidence or conflict rather than hiding it in a report.

    Energy System Lineage¶

    energy system is the supply-side projection. It joins topology, power, constraints, allocation, and quality state.

    flowchart TB
      subgraph Inputs["Supply-side evidence"]
        Topology["Topology config<br/>microgrid, nodes, circuits"]
        Meters["Meter telemetry<br/>site load, circuit load"]
        Chargers["Charger telemetry<br/>status, active demand"]
        Envelopes["External envelopes<br/>OSCP, OpenADR, DERMS"]
        Tariffs["Tariffs and carbon factors"]
        Storage["Storage / generation state"]
        Control["Control history<br/>profiles, limits, fallback"]
      end
    
      subgraph EnergySystem["Energy system projection"]
        Source["energy source"]
        Resource["energy resource"]
        TopologyState["topology state"]
        Power["power state"]
        Constraint["constraint state"]
        Allocation["allocation state"]
        Quality["quality state"]
      end
    
      subgraph Consumers["Consumers"]
        Balancing["smart charging allocation"]
        EnergyOps["energy operations"]
        Dispatch["readiness confidence"]
        Incidents["capacity and control incidents"]
        Reports["cost, carbon, compliance"]
      end
    
      Topology --> TopologyState
      Meters --> Power
      Chargers --> Resource
      Chargers --> Power
      Envelopes --> Constraint
      Tariffs --> Constraint
      Storage --> Source
      Storage --> Resource
      Control --> Allocation
      Control --> Quality
      Constraint --> Balancing
      Power --> Balancing
      TopologyState --> Balancing
      Source --> EnergyOps
      Resource --> EnergyOps
      Quality --> Incidents
      Allocation --> Dispatch
      Constraint --> Reports
      Power --> Reports

    The microgrid owns generic physical topology and constraint state. Grid or protocol identity should stay in the OSCP, OpenADR, DERMS, or adapter boundary unless the product feature is about that identity.

    Session And Commercial Lineage¶

    Physical, operational, and commercial records share evidence, but they answer different questions.

    flowchart LR
      RawSession["Raw charger evidence<br/>transaction, meter values, status"]
      Physical["Physical session<br/>energy transfer"]
      Operational["Operational session<br/>vehicle, work, readiness, policy"]
      Commercial["Commercial record<br/>access, tariff, CDR, settlement"]
      Report["Report row<br/>cost, carbon, reliability, proof"]
      Support["Support view<br/>what happened and why"]
    
      RawSession --> Physical
      Physical --> Operational
      Physical --> Commercial
      Operational --> Report
      Commercial --> Report
      Physical --> Support
      Operational --> Support

    When a report says a vehicle missed readiness, it should be possible to trace the statement back through the readiness target, allocation decision, command, session, meter evidence, and any relevant fault or envelope.

    Implementation Boundary Reminder¶

    The implementation should follow the same shape as the ontology:

    • Domain code owns invariants and state transitions.
    • Service command code coordinates use cases through ports.
    • Queries return read models or projections.
    • Adapters own protocol, database, external API, and event-bus details.
    • Cross-context access should go through ports, events, or anti-corruption adapters.

    This aligns with ADR 0031: Adopt DDD, Hexagonal Architecture, and CQRS for Python Domain Services.

    Lineage Checklist¶

    Before changing a feed, projection, report, or support view, confirm:

    • Which raw evidence supports the value?
    • Which source owns the evidence?
    • Which timestamps and identifiers must be retained?
    • Which projection resolves the domain meaning?
    • Which domain decision may act on it?
    • Which consumers need confidence, freshness, or conflict information?
    • Which report or audit trail must still be rebuildable?
    Made with Material for MkDocs
    BFDev Docs Assistant
    New conversation?
    Ask one focused question at a time, this helps the assistant provide accurate answers about what's been implemented in BetterFleet.