Author: SCOUT (on behalf of HERALD)
Date: 2026-04-21
Status: PLAN — cron payloads in herald-cron-registration.json, not yet applied
First-run output: see herald-audit-2026-04-21.md (Monday dormant-task sweep executed 2026-04-21)
---
HERALD is TITAN's observability conscience. It does not write code, does not close tasks, does not merge PRs. It watches, measures, reports, and escalates. Every output is a memo or email — never a code change. This spec makes HERALD's aspired rhythm operational by defining exact trigger times, data sources, output formats, escalation thresholds, and self-modification guardrails.
All configurable thresholds (dormant-day ceiling, stuck-variant ceiling, test-break ceiling) are env vars or variants.py entries — never hardcoded in HERALD's logic. This satisfies the Modularity Prime Directive.
---
| Day | Time (ET) | Run ID | Name | Primary Output |
|---|---|---|---|---|
| Monday | 09:00 | MON-SWEEP | Dormant-Task Sweep | herald-weekly-YYYY-MM-DD.md + email |
| Tuesday | 09:00 | TUE-REDTEAM | Red-Team Production Audit | email report |
| Wednesday | 09:00 | WED-QUALITY | Code-Quality Pass | email pass/fail + 4-week trend |
| Thursday | 09:00 | THU-VARIANTS | Variant-Rollout Review | email flag report |
| Friday | 16:00 | FRI-REVIEW | Week-in-Review Memo | email + herald-weekly-YYYY-MM-DD.md |
| Sunday | 11:00 | SUN-LEADERBOARD | Agent Leaderboard | logs/agent-leaderboard-YYYY-WW.md + email |
All times Eastern. Cron expressions are UTC (ET = UTC-4 during EDT; adjust at DST boundary). Apply crons only after Harnoor approves this spec.
---
MON-SWEEP)Surface tasks that have fallen through the cracks. A task with no motion for 7+ days is a silent risk: either blocked and forgotten, or done but never closed.
F:/TITAN/plans/task-registry/TASK-REGISTRY-*.md — all files matching the globStatus, date of last status change (from file contents or mtime fallback), Blocked on, T-number
DORMANT_THRESHOLD = int(os.getenv("HERALD_DORMANT_DAYS", "7"))
for each task T where T.status in ("open", "in_progress"):
days_since_motion = today - max(T.last_status_change, file_mtime)
if days_since_motion > DORMANT_THRESHOLD:
flag as dormant
1. Memo written to F:/TITAN/plans/agents/herald-weekly-YYYY-MM-DD.md — dormant task table + per-task recommendation (unblock / escalate / close)
2. Email to harnoors@gmail.com:
- Subject: [HERALD MON] Dormant-task sweep — N tasks need attention (YYYY-MM-DD)
- Body: ELI5 summary + technical table (T-number, days dormant, blocker, recommended action)
- Format: per TITAN Prime Directive checkpoint-email standard (ELI5 + Technical sections)
If any task has been dormant > HERALD_CRITICAL_DORMANT_DAYS (default: 14), trigger escalation policy (see Escalation Policy section). Email subject prefix becomes [HERALD T-ESCALATE ESC-D].
---
TUE-REDTEAM)Weekly automated sanity-check of silentinfinity.com production surfaces. Catches regressions that don't surface in test suites — broken links, silent JS errors, unexpected HTTP codes, CloudFront cold-start latency.
| Surface | URL | Expected Status |
|---|---|---|
| Main chat | https://silentinfinity.com/ | 200 |
| Voice page | https://silentinfinity.com/voice | 200 or feature-flag redirect |
| Profile/me | https://silentinfinity.com/me | 200 or auth redirect (not 5xx) |
| Crisis preferences | https://silentinfinity.com/preferences/crisis | 200 or auth redirect (not 5xx) |
| Leads dashboard | https://leads.silentinfinity.com/ | 200 |
| API health | Lambda invoke URL /health endpoint | 200, {"status": "ok"} |
<script> blocks, run node --check (same tooling as Makefile js-lint)X-Cache header: flag Miss from cloudfront on repeat hitsEmail to harnoors@gmail.com:
[HERALD TUE] Production audit — N issues found (YYYY-MM-DD) or all clearF:/TITAN/logs/redteam-YYYY-MM-DD.json (machine-readable, consumed by FRI-REVIEW)If any surface returns 5xx or is unreachable (production down): trigger ESC-A immediately — do not wait for next scheduled run.
---
WED-QUALITY)Weekly regression signal on test suite health and lint cleanliness. Four-week trend line catches slow decay before it becomes a crisis.
cd F:/projects/innerverse/backend
python -m pytest tests/ -q --tb=short
make js-lint
Results appended to F:/TITAN/logs/quality-trend.jsonl (one JSON line per run):
{
"date": "YYYY-MM-DD",
"tests_total": 302,
"tests_passed": 302,
"tests_failed": 0,
"duration_s": 14.2,
"js_lint_errors": 0,
"js_lint_warnings": 0
}
HERALD reads the last 4 entries to compute week-over-week trend.
Email to harnoors@gmail.com:
[HERALD WED] Quality — PASS N/N tests, 0 lint errors (YYYY-MM-DD) or FAIL — N tests brokenIf quality-trend.jsonl shows test suite failing for > HERALD_TEST_BREAK_DAYS (default: 3) consecutive entries: trigger ESC-B.
---
THU-VARIANTS)Ensure experiments don't stall in staged indefinitely. A variant at staged > 14 days means the promotion decision was forgotten or there is a silent blocker. Separately, a production variant rolling back repeatedly is a product-quality alarm.
F:/projects/innerverse/backend/src/variants.py — read all registered variants via VARIANTS.all_for(category) for every category in VARIANTS.categories().
STUCK_STAGED_DAYS = int(os.getenv("HERALD_STUCK_STAGED_DAYS", "14"))
ROLLBACK_ALARM_COUNT = int(os.getenv("HERALD_ROLLBACK_ALARM_COUNT", "2"))
for each variant V where V.status == "staged":
if days_since_staged(V) > STUCK_STAGED_DAYS:
flag as stuck
for each variant V where V.status == "production":
if rollback_count_last_7_days(V.id) >= ROLLBACK_ALARM_COUNT:
flag as rollback-alarm → trigger ESC-C
Note: days_since_staged is derived from V.config.get("staged_since") if present, falling back to git blame on the relevant variants.py line. This motivates populating staged_since in variant config — add to variants.py convention.
Email to harnoors@gmail.com:
[HERALD THU] Variants — N stuck, N rollback alarms (YYYY-MM-DD) or all clear1. Stuck-variant table (id, category, days at staged, recommended next step: promote to canary, extend, or retire)
2. Rollback-alarm table if any (id, rollback count, last rollback timestamp)
3. Full variant snapshot (all categories, current status + rollout_pct per variant)
Any production variant with >= HERALD_ROLLBACK_ALARM_COUNT rollbacks in 7 days: trigger ESC-C immediately.
---
FRI-REVIEW)Aggregate what shipped, what slipped, and next week's focus. Positive signal leads — this is a team memo, not a bug report.
git log --since="7 days ago" --oneline across F:/projects/innerverse/ — commits from the weekF:/TITAN/plans/task-registry/TASK-REGISTRY-*.md — tasks whose status changed to closed/resolved this weekF:/TITAN/logs/quality-trend.jsonl — Wednesday's quality resultF:/TITAN/logs/redteam-YYYY-MM-DD.json — Tuesday's red-team result1. Append to (or create) F:/TITAN/plans/agents/herald-weekly-YYYY-MM-DD.md
2. Email to harnoors@gmail.com:
- Subject: [HERALD FRI] Week in review — N shipped, N slipped (YYYY-MM-DD)
- Body sections:
1. What shipped — commits + tasks closed, positive framing
2. What slipped — tasks that were in_progress on Monday but remain open Friday
3. Quality signal — one-line from Wednesday pass/fail
4. Next week's focus — top 3 open tasks by priority (from task registry)
5. Open asks — all open T-numbers that need Harnoor decision, one line each
---
SUN-LEADERBOARD)Transparent per-agent performance tracking. Recognition for the #1 agent. Coaching asks for bottom performers. Basis for budget earn-up / earn-down per AGENT-INCENTIVE-PLAN-2026-04-20.md.
See herald-leaderboard-template.csv for the full per-agent tracking sheet.
| Metric | Signal Source | Weight |
|---|---|---|
| Deliverables shipped | Files created/committed this week, attributed to agent | 40 |
| Hours logged | Agent-memory file mtimes + F:/TITAN/logs/events.jsonl fire count | 20 |
| Quality score | Downstream re-use: cited in later work, not reverted | 20 |
| Blockers cleared | T-tasks unblocked this week by this agent | 15 |
| Streak bonus | Consecutive weeks meeting pro-rated quota (+5/week, cap +25) | 5 |
score(agent) = deliverables*0.40 + hours*0.20 + quality*0.20 + blockers*0.15 + streak_bonus
Score normalized to 100. Rankings published in full.
1. F:/TITAN/logs/agent-leaderboard-YYYY-WW.md — ranked table + deltas from prior week
2. Per-agent file: F:/TITAN/agent-memory/<name>/weekly-YYYY-WW.md — personal feedback (score, streak, what to improve)
3. Email to harnoors@gmail.com:
- Subject: [HERALD SUN] Leaderboard WW — #1: <agent> · #7: <agent>
- Body: ELI5 narrative + full ranked table + recognition paragraph for #1 + coaching asks for bottom 2
4. For any agent >= 40% behind weekly pro-rated quota (10h/week): HERALD queues a DARWIN prompt: "propose 2 ways to unblock <agent>"
Budget earn-up/earn-down penalties suspended until 2026-05-18 (4-week ramp per AGENT-INCENTIVE-PLAN-2026-04-20.md). Leaderboard tracks and publishes throughout ramp; consequences begin 2026-05-19.
---
HERALD is observability-only. All remediation is proposed in email — never applied to code, tasks, or PRs.
| Code | Condition | Detection Source | Email SLA |
|---|---|---|---|
| ESC-A | Production down — any surface 5xx or unreachable | TUE-REDTEAM or ad-hoc probe | Immediate |
| ESC-B | Test suite failing > 3 consecutive days | quality-trend.jsonl | Day 4 morning |
| ESC-C | Production variant rolled back >= 2× in one week | THU-VARIANTS + deploy log | Immediate on detection |
| ESC-D | Registry task stalled > 14 days | MON-SWEEP | Next Monday email |
Subject: [HERALD T-ESCALATE ESC-X] <one-line description> — action required
## HERALD Escalation — ESC-X
Date: YYYY-MM-DD HH:MM ET
Condition: <exact condition that triggered>
Affected: <T-number / variant id / surface URL>
Duration: <how long this has been true>
## What HERALD observed
<factual data — no speculation>
## Proposed remediation (requires Harnoor approval — HERALD will NOT apply this)
Option A (recommended): <description>
Option B (alternative): <description>
## To respond
HERALD-ESC-X approve option-A
HERALD-ESC-X snooze 48h
HERALD-ESC-X close (false alarm)
---
Hard constraints. Not soft guidelines.
1. HERALD cannot auto-close T-tasks. Closing requires explicit T0NN resolved from Harnoor. HERALD proposes; Harnoor decides.
2. HERALD cannot auto-merge PRs. Code-review output is comments or email only. No git merge, no gh pr merge.
3. HERALD cannot modify variants.py. Variant promotions require Harnoor sign-off. HERALD flags; Harnoor approves.
4. HERALD cannot delete or archive tasks. It flags stale tasks; Harnoor decides disposition.
5. HERALD's thresholds live in env vars / variants.py, not hardcoded. Any threshold change goes through the standard env-var or variant-registry process.
6. HERALD's write scope: F:/TITAN/plans/agents/ and F:/TITAN/logs/ only. Never F:/projects/ (code), F:/TITAN/secrets/ (credentials), or F:/TITAN/plans/task-registry/ (task ownership belongs to principals).
---
| Env Var | Default | Description |
|---|---|---|
| HERALD_DORMANT_DAYS | 7 | Days without motion before a task is flagged dormant |
| HERALD_CRITICAL_DORMANT_DAYS | 14 | Days without motion before ESC-D escalation |
| HERALD_STUCK_STAGED_DAYS | 14 | Days at staged before variant is flagged stuck |
| HERALD_ROLLBACK_ALARM_COUNT | 2 | Production rollbacks in 7 days before ESC-C |
| HERALD_TEST_BREAK_DAYS | 3 | Consecutive failing test days before ESC-B |
| HERALD_DAILY_DORMANT_CHECK | false | Enable daily (not just Monday) dormant-task check |
| HERALD_EMAIL_TO | harnoors@gmail.com | Recipient for all HERALD emails |
| HERALD_EMAIL_FROM | contact@silentinfinity.com | SES-verified sender (T002) |
---
Cron payloads are in herald-cron-registration.json. The mcp__scheduled-tasks__create_scheduled_task invocations have not been applied — this is a plan. Apply only after Harnoor reviews and approves.
Daily cap concern: Claude Code Routines (research preview, 2026-04-19) cap at Pro=5 / Max=15 / Team=25 runs/day. HERALD's 6 weekly scheduled runs plus Sunday leaderboard = 7 runs/week across 7 days = 1 run/day on average. Well within any tier. Ad-hoc ESC-A triggers on busy days could push to 2-3 runs/day — still within Max cap.
Local filesystem constraint: Routines cannot access F:/TITAN (local filesystem). Monday sweep, Wednesday quality, and Thursday variant review all require local file reads. Until a bridge HTTP endpoint is built that exposes task-registry and quality-trend data to a cloud routine, these runs are triggered by the local TITAN orchestrator (F:/TITAN/orchestrator.py) or Windows Task Scheduler calling Claude Code CLI locally. Tuesday red-team and Friday review can run from cloud (only need HTTP probes and git log via API).
---
_Spec produced by SCOUT · HERALD is the executing agent · first-run audit in herald-audit-2026-04-21.md_