schema_version: 1
snapshot_version: 1

service_name: delivery
commercial_product: Torbat Driver
current_version: "0.10.8.0"
current_phase: delivery-10.8
last_completed_phase: delivery-10.8
next_phase: delivery-10.9

completed_phases:
  - delivery-reg
  - delivery-10.0
  - delivery-10.1
  - delivery-10.2
  - delivery-10.3
  - delivery-10.4
  - delivery-10.5
  - delivery-10.6
  - delivery-10.7
  - delivery-10.8

remaining_phases:
  - delivery-10.9
  - delivery-10.10

registered_modules:
  - organizations
  - hubs
  - drivers
  - fleet
  - vehicle_types
  - vehicles
  - availability
  - shifts
  - working_zones
  - pricing_rules
  - capabilities
  - bundles
  - dispatch
  - routing
  - optimization
  - tracking
  - proof_of_delivery
  - customer_tracking
  - settlement
  - external_providers
  - routing_engines
  - configuration
  - audit

enabled_capabilities:
  - delivery.foundation
  - delivery.drivers
  - delivery.fleet
  - delivery.vehicle_types
  - delivery.vehicles
  - delivery.driver_availability
  - delivery.shifts
  - delivery.working_zones
  - delivery.pricing_rules
  - delivery.capabilities_catalog
  - delivery.capability_bundles
  - delivery.dispatch_engine
  - delivery.routing
  - delivery.optimization
  - delivery.tracking
  - delivery.proof_of_delivery
  - delivery.customer_tracking
  - delivery.settlement

enabled_bundles:
  - Torbat Driver

public_apis:
  - method: GET
    path: /health
    permission: public
  - method: GET
    path: /capabilities
    permission: public
  - method: GET
    path: /metrics
    permission: public
  - method: "*"
    path: /api/v1/drivers
    permission: delivery.drivers.*
  - method: "*"
    path: /api/v1/fleets
    permission: delivery.fleets.*
  - method: "*"
    path: /api/v1/vehicle-types
    permission: delivery.vehicle_types.*
  - method: "*"
    path: /api/v1/vehicles
    permission: delivery.vehicles.*
  - method: "*"
    path: /api/v1/shifts
    permission: delivery.shifts.*
  - method: "*"
    path: /api/v1/working-zones
    permission: delivery.working_zones.*
  - method: "*"
    path: /api/v1/pricing-rules
    permission: delivery.pricing_rules.*
  - method: "*"
    path: /api/v1/capabilities
    permission: delivery.capabilities.*
  - method: "*"
    path: /api/v1/bundles
    permission: delivery.bundles.*
  - method: "*"
    path: /api/v1/dispatch/jobs
    permission: delivery.dispatch.jobs.*
  - method: "*"
    path: /api/v1/dispatch/assignments
    permission: delivery.dispatch.assignments.*
  - method: "*"
    path: /api/v1/routes
    permission: delivery.routes.*
  - method: "*"
    path: /api/v1/optimization
    permission: delivery.optimization.*
  - method: "*"
    path: /api/v1/tracking
    permission: delivery.tracking.*
  - method: "*"
    path: /api/v1/proof-of-delivery
    permission: delivery.proof_of_delivery.*
  - method: "*"
    path: /api/v1/customer-tracking
    permission: delivery.customer_tracking.*
  - method: "*"
    path: /api/v1/settlements
    permission: delivery.settlement.*

published_events:
  - event_type: delivery.driver.created
    version: "0.10.1.0"
  - event_type: delivery.fleet.created
    version: "0.10.2.0"
  - event_type: delivery.vehicle.created
    version: "0.10.2.0"
  - event_type: delivery.driver_availability.updated
    version: "0.10.3.0"
  - event_type: delivery.shift.created
    version: "0.10.3.0"
  - event_type: delivery.pricing_rule.created
    version: "0.10.4.0"
  - event_type: delivery.dispatch_job.created
    version: "0.10.5.0"
  - event_type: delivery.route_plan.created
    version: "0.10.6.0"
  - event_type: delivery.tracking_session.started
    version: "0.10.7.0"
  - event_type: delivery.proof_of_delivery.captured
    version: "0.10.7.0"
  - event_type: delivery.settlement_intent.settled
    version: "0.10.8.0"

permission_prefix: delivery.*

active_adrs:
  - ADR-001
  - ADR-003
  - ADR-006
  - ADR-010
  - ADR-015

integration_contracts:
  - AccountingProvider (settlement refs only)
  - CommunicationProvider (future 10.9)
  - RoutingEngineProvider (routing adapters)
  - StorageProvider (POD file refs)
  - CRMProvider
  - LoyaltyProvider
  - IdentityProvider

known_limitations:
  - Merchant connector and app API surfaces deferred to 10.9
  - Fleet analytics and AI hooks deferred to 10.10
  - Outbox drain worker not yet implemented
  - Frontend phase gates for new APIs pending frontend update
  - Ops note: delivery_db.alembic_version.version_num widened to varchar(128) on deploy host (revision id length)

deployment:
  host: "192.168.10.162"
  date: "2026-07-27"
  version: "0.10.8.0"
  migration_head: "0008_phase_107_108_tracking_settlement"
  health: ok
  openapi: ok

open_todos: []

last_handover_reference: docs/phase-handover/phase-10-8.md
last_updated: "2026-07-27"
