#!/usr/bin/env bash
# muda-audit.sh — Fleet waste elimination audit
# Part of Epic #345, Issue #350
#
# Measures the 7 wastes (Muda) across the Timmy Foundation fleet:
#   1. Overproduction  2. Waiting  3. Transport
#   4. Overprocessing    5. Inventory  6. Motion  7. Defects
#
# Posts report to Telegram and persists week-over-week metrics.
# Should be invoked weekly (Sunday night) via cron.

set -euo pipefail

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

# Ensure Python can find gitea_client.py in the repo root
export PYTHONPATH="${SCRIPT_DIR}/..:${PYTHONPATH:-}"

exec python3 "${SCRIPT_DIR}/muda_audit.py" "$@"
