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:
-
Reads each project row (5-column table: Project, Code, Combo, Activity, Budget)
-
Checks if the Code field is empty — if so, the project is unbillable
-
Evaluates deadlines from a configurable array against today’s date
-
Sends
notify-sendat the appropriate urgency tier
Tiered Escalation
| Tier | Threshold | Behavior | Timeout |
|---|---|---|---|
1 — Informational |
> 14 days |
|
10s |
2 — Warning |
⇐ 7 days |
|
30s |
3 — Critical |
⇐ 3 days or overdue |
|
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