📄 Auditor: Logistics & Conflict

Purpose

Looks across ALL upcoming events in a time window and spots risks and opportunities that only emerge from the cross-event view. This is the auditor that finds things no individual event review would catch — crew double-bookings, direct transfer opportunities, warehouse bottlenecks, and schedule conflicts where one event's flexibility threatens another event's firm commitments.

Key difference from other auditors: This auditor sees all events at once, not one at a time. A human reviewing Event A sees it's fine. A human reviewing Event B sees it's fine. Only by looking at both together — and knowing they share a crew member — does the conflict become visible.

Owner

Findings route to: Planning Manager

How to Run

python -m event_audit logistics --days 14
python -m event_audit logistics --days 21 --depth deep
python -m event_audit logistics --event 1094 1266 1347

The --days flag is the primary usage — it fetches all confirmed/planned production and install events in the given window. You can also pass specific event IDs to analyze a subset.

What It Reads

From Odoo (x_events model)

For ALL events in the window:
- x_name, x_studio_date, x_studio_client, x_studio_event_type
- x_studio_selection_field_kt_1j462te0b (event status)
- x_studio_ship_date, x_studio_return_date
- x_studio_venue, x_studio_venue_room
- All handoff, promise, and scorecard fields (same as Sales Readiness)

From Odoo (planning.slot)

For each event:
- employee_id — Who is assigned (by name)
- role_id — What role (A1, V1, SET/STR1, etc.)
- start_datetime, end_datetime — Shift timing
- state — Published or draft
- allocated_hours

From Odoo (res.partner — venue records)

  • name, street, city — For proximity analysis between venues

What It Checks

Conflicts (must resolve)

Pattern What It Catches
Crew double-booking Same employee assigned to overlapping time windows across events
Soft/firm schedule conflict Event A has a flexible end time, Event B has a firm start, shared crew
Unsustainable shift gaps 11pm end to 6am start = 7 hours, technically non-overlapping but not sustainable

Risks (should monitor)

Pattern What It Catches
Warehouse bottleneck Multiple preps or depreps on the same day
Tight turnarounds Return date equals ship date of another event
Unassigned shifts Planning slots with no employee within 7 days of event
Widespread scorecard gaps Multiple events with Red on the same metric

Opportunities (cost savings)

Pattern What It Catches
Direct transfer Event A strikes near Event B's venue — skip the warehouse
Shared transport Same venue or nearby venues on the same day — consolidate trucks
Leave gear on-site Continuous SIT presence at a venue across multiple events
Crew reuse Strike crew finishes and another event nearby needs setup help

Findings Output

Creates structured records in x_audit_run (one cross-event run, not linked to a single event) and x_audit_finding with the x_affected_event_ids many2many field linking each finding to all events it affects.

Findings appear in the Audit Findings tab on each affected event, and in the Audit > Open Findings workbook for the Planning Manager to review.

Depth Levels

  • Quick — Crew double-bookings and ship date overlaps only
  • Standard — Crew conflicts, equipment window overlaps, warehouse bottlenecks, venue proximity
  • Deep — Full analysis including transfer opportunities, gap staffing, schedule risk inference

Prompt

Full prompt at scripts/event_audit/prompts/logistics.md. Key instructions:

  • Name employees when flagging crew conflicts
  • Include event IDs so findings link to records
  • Check gaps between shifts, not just overlaps
  • Consider travel time between venues (same city = 15 min, FSJ to GP = 4+ hours)
  • Don't flag remote/livestream events for transport conflicts
  • Note warehouse capacity peaks (4 ships on Monday, 0 on Tuesday = problem)
  • Highlight quiet windows (good for maintenance or catch-up)

Performance Notes

This auditor takes longer than single-event auditors because it processes all events with their planning slots. A 14-day window with ~20 events typically takes 2-3 minutes. For 21+ days, allow up to 5 minutes.

Data Quality Dependency

This auditor produces better results when the upstream auditors have been run:
- Venue Auditor — Complete venue addresses enable proximity analysis
- Promise Auditor — Complete scope data enables equipment conflict detection
- Sales Readiness — Complete handoff data enables staffing gap analysis

Events with poor data quality (no venue, no scope, no crew) will be flagged as risks but can't be fully analyzed for logistics optimization.

Learnings File

scripts/event_audit/learnings/logistics.md

Configuration File

scripts/event_audit/auditors/logistics.yaml