Implements muda-audit.sh to measure the 7 wastes across the fleet: 1. Overproduction — agent issues created vs closed 2. Waiting — rate-limited API attempts from loop logs 3. Transport — issues closed-and-redirected 4. Overprocessing — PR diff size outliers (>500 lines for non-epics) 5. Inventory — issues open >30 days with no activity 6. Motion — git clone/rebase operations per issue from logs 7. Defects — PRs closed without merge vs merged - fleet/muda_audit.py: core audit logic using gitea_client.py - fleet/muda-audit.sh: thin bash wrapper - cron/jobs.json: add Hermes cron job for weekly Sunday 21:00 runs - cron/muda-audit.crontab: raw crontab snippet for host-level scheduling Posts waste report to Telegram with week-over-week trends and top 3 elimination suggestions. Part of Epic: #345 Closes: #350
20 lines
637 B
Bash
Executable File
20 lines
637 B
Bash
Executable File
#!/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" "$@"
|