Busflow Docs

Internal documentation portal

Skip to content
Reviewed 11 May 2026

Completed TODOs β€” Archive ​

Items pruned from TODOS.md. Kept for historical reference.

1. Product & Domain Specifications ​

  • State Machines & Lifecycles:

    • Booking state machine in L3 level-3-domain-2-booking-state-machine.md, ServiceLeg state machine in L3 level-3-domain-3-serviceleg-state-machine.md, Ticket lifecycle in event-contracts-commerce.md.
  • Trigger-Based Messaging Logic:

    • Full 22-entry trigger_event registry in notification-pipeline-protocol.md Β§7, fallback chain in Β§6.
  • Communications Architecture β€” Remaining Sections:

    • (1) channel-provisioning-protocol.md, (2) notification-pipeline-protocol.md, (3) inbox-protocol.md, (4) observability in communications.md Β§Observability.

2. Technical & Architecture Details ​

  • Concrete Database Schema (ERD):

    • Separated into schema-backoffice.md, schema-commerce.md, schema-operations.md, schema-communications.md and linked in database.md.
  • Dispatch Board Blocking Schema Gaps:

    • Schemas for vehicle_inspections, crew_absences, crew_qualifications defined in Backoffice; leg_assignments updated for sub-contracting in Operations. ADR-007 and ADR-008 approved.
  • Offline Sync & Conflict Resolution Concept:

    • offline-sync-protocol.md created with full conflict resolution matrix.
  • Event-Driven Architecture (EDA) & Queues Review:

    • workflow-orchestration.md fully specifies Hasura ET β†’ BullMQ β†’ NestJS patterns. Event catalog documents 53 events with triggers and consumers.
  • L3-5.2.2 Secrets Management Architect Loop:

    • Architect loop executed and hardened into ADR-029, secrets-rotation-runbook.md, and the .github/workflows/secrets-sync.yml stub. Drilldown + per-loop notes archived under supporting/reviews/archive/.
  • Domain 5 / L3 Architect-Loop Roll-up:

    • Cascaded into infrastructure.md Β§5/Β§6 + Β§6.2, observability.md, gdpr-strategy.md Β§1/Β§4, ADR-022 – ADR-029, seven protocol runbooks, skeleton implementation stubs, and deferred migration DDL. Source drilldown + per-loop artifacts archived under supporting/reviews/archive/.
  • Disaster Recovery & Backups:

    • Backup retention, restore procedures, automated verification pipeline, producer liveness, and SLA-tiered DR drill cadence documented in infrastructure.md Β§6.
  • Docker System Prune Cron:

    • docker-pruner global service in docker-compose.infra.yml β€” runs every Sunday at ~03:00 UTC on all nodes.

3. Documentation Housekeeping ​

  • Identify & Remove Redundant or Obsolete Documentation:
    • Removed 8 old iteration docs and consolidated duplicate architectural text.

4. AI Agent & Tooling Setup ​

  • Project AI Agent Setup β€” Skills, Instructions & Folder Hygiene:

    • Consolidated all AI config into .agents/ β€” skills, workflows, prompts, and docs. Deleted .antigravity/, .jules/, .pi/, CONTEXT.md. CLAUDE.md reduced to a 3-line pointer. HANDBOOK.md serves as the single centralized entry point.
  • Evaluate Storybook as Replacement for Histoire:

    • Removed studio/storybook β€” keep Histoire for now; reassess when Vite 8 compatibility becomes a blocker.

5. Docs, Product & Architecture Refactoring ​

  • Use AI to question EVERYTHING (Comprehensive Review & Refactoring):
    • Full 4-level iterative review executed across 6 domains. 49 review artifacts produced, 21 ADRs committed, 14 protocols finalized. All domains at "Ready to Code" status.

6. Deferred Design Decisions (TourDeparture Refactoring) ​

  • Tour Content Model (Backoffice & Commerce):

    • Content lives as a content JSONB column on tour_templates, validated by TourContentSchema in @busflow/types. Per-departure notes use departure_notes TEXT on tour_departures. Commerce projection deferred to the Publish flow milestone.
  • Make sure current system is ready to be localizable & adaptable for other markets (Added: LegalForm entity and default_locale/currency on Operator)

6b. Boarding Points Drilldown β€” Design Decisions ​

  • Boarding Surcharge β†’ Commerce Flow:

    • Ancillary-based flow confirmed. Commerce auto-creates a commerce.ancillaries row with type = 'BOARDING_SURCHARGE' during submitCheckout.
  • Door Pickup Surcharge: Replaces or Stacks?

    • Standalone β€” each pickup mode carries its own independent surcharge.
  • door_pickup_address on Commerce Passengers:

    • Added door_pickup_address JSONB and is_door_pickup BOOLEAN to commerce.passengers.
  • checkout_sessions.selected_options Extension:

    • Extended the TypeScript interface with is_door_pickup: boolean and door_pickup_address?.
  • max_door_pickups Enforcement in Commerce:

    • max_door_pickups lives on the template. Commerce counts existing door pickup bookings at checkout time.
  • Boarding Point Archive Behavior:

    • Same pattern as ancillary catalog archiving. Archived items stay on existing assignments.
  • Boarding Point Onboarding Seeds:

    • No seeds. Boarding points are location-specific. Concierge Onboarding wizard prompts for the first library item.

7. TODOS Pruning Audit (2026-05-11) ​

Items removed during a validity audit. Completed items resolved by ADRs or infrastructure implementation.

  • Preview Environment Isolation & Resource Limits:

    • Fully implemented: docker-compose.preview.yml with resource limits on all services, Swarm placement constraints (node.labels.tier != observability), concurrency cap (MAX_PREVIEWS=5) in preview.yml workflow, and ephemeral per-preview database strategy.
  • Β§ 25 UStG Per-Line Tax Split:

    • Resolved by ADR-012. Tax deferred to Phase 3 FinancialLedger at departure-level aggregate. SB-2 closed.
  • Multi-currency Bookings & FX Rate Infrastructure:

    • Resolved by ADR-035. Phased rollout specified (Phase 2a/2b/3). SB-1 closed.
  • JSONB Audit Diffing:

    • Duplicate of SB-5 in the Strategic Blind Spots tracker. SB tracker owns this item.
  • Driver Compliance Subdomain Extraction (DutyActivity):

  • Agency Payouts / Commission Ledgers:

    • Implementation detail (settlement infrastructure). Removed from documentation TODOs; will surface naturally during Phase 2 commerce implementation.
  • NotebookLM Integration & Docs Reduction:

    • Descoped (2026-05-11). The dual-brain concept never materialized β€” no MCP connector exists and Google ships no public API. Strategic intelligence lives in docs/ under PARA, accessible to all agents. The context-engine / docs-hub RAG stack covers the queryable-knowledge use case within the monorepo toolchain.
  • Partial Recalculation (Dirty-Flag Engine):

    • Relocated to idea file. Assessed as non-issue at current scale (≀72 variants).
  • IP Tracker β€” Automatic Company Profiling:

    • Relocated to idea file. Marketing growth idea.
  • Bus Tourism Company Discovery & Booking Engine Crawler:

    • Relocated to idea file. Sales intelligence tooling.
  • Evaluate "busflow-ceo" Repo Extraction:

    • Relocated to idea file. Deferred strategic decision with an explicit trigger.

Internal documentation β€” Busflow