Alert Script

Alert Script

Location

scripts/chla-code-alert.sh — git-tracked in domus-captures.

How It Works

The script uses awk to parse the AsciiDoc table structure in codes.adoc:

  1. Reads each project row (5-column table: Project, Code, Combo, Activity, Budget)

  2. Checks if the Code field is empty — if so, the project is unbillable

  3. Evaluates deadlines from a configurable array against today’s date

  4. Sends notify-send at the appropriate urgency tier

Tiered Escalation

Tier Threshold Behavior Timeout

1 — Informational

> 14 days

notify-send low urgency

10s

2 — Warning

⇐ 7 days

notify-send normal urgency

30s

3 — Critical

⇐ 3 days or overdue

notify-send critical urgency + optional sound

Persistent (0)

Configuration

All tunable values are at the top of the script:

TIER1_DAYS=14        # > this = informational
TIER2_DAYS=7         # <= this = warning
TIER3_DAYS=3         # <= this = critical

TIER3_SOUND=""       # Set to .oga path to enable alarm

Adding Deadlines

Edit the DEADLINES array in the script:

declare -a DEADLINES=(
    "VNC Blocking|2026-06-15"
    "Mandiant Remediation|2026-07-01"
)

Usage

# Dry run — terminal output only, no notifications
./scripts/chla-code-alert.sh --dry-run

# Live — sends desktop notification
./scripts/chla-code-alert.sh