ALL MEMOS Download .docx

HERALD Weekly Rhythm — Automated Peer-QA + Check-In Spec v1

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)

---

Purpose

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.

---

Rhythm Overview

| 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.

---

Monday 09:00 ET — Dormant-Task Sweep (MON-SWEEP)

Purpose

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.

Data Sources

Logic


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

Output

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)

Escalation Trigger

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].

---

Tuesday 09:00 ET — Red-Team Production Audit (TUE-REDTEAM)

Purpose

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.

Surfaces Checked

| 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"} |

Checks Performed Per Surface

Output

Email to harnoors@gmail.com:

Escalation Trigger

If any surface returns 5xx or is unreachable (production down): trigger ESC-A immediately — do not wait for next scheduled run.

---

Wednesday 09:00 ET — Code-Quality Pass (WED-QUALITY)

Purpose

Weekly regression signal on test suite health and lint cleanliness. Four-week trend line catches slow decay before it becomes a crisis.

Commands Run


cd F:/projects/innerverse/backend
python -m pytest tests/ -q --tb=short
make js-lint

Metrics Captured and Stored

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.

Output

Email to harnoors@gmail.com:

Escalation Trigger

If quality-trend.jsonl shows test suite failing for > HERALD_TEST_BREAK_DAYS (default: 3) consecutive entries: trigger ESC-B.

---

Thursday 09:00 ET — Variant-Rollout Review (THU-VARIANTS)

Purpose

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.

Data Source

F:/projects/innerverse/backend/src/variants.py — read all registered variants via VARIANTS.all_for(category) for every category in VARIANTS.categories().

Logic


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.

Output

Email to harnoors@gmail.com:

1. 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)

Escalation Trigger

Any production variant with >= HERALD_ROLLBACK_ALARM_COUNT rollbacks in 7 days: trigger ESC-C immediately.

---

Friday 16:00 ET — Week-in-Review Memo (FRI-REVIEW)

Purpose

Aggregate what shipped, what slipped, and next week's focus. Positive signal leads — this is a team memo, not a bug report.

Data Sources

Output

1. 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

---

Sunday 11:00 ET — Agent Leaderboard (SUN-LEADERBOARD)

Purpose

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.

Metric Schema

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 |

Weekly Score


score(agent) = deliverables*0.40 + hours*0.20 + quality*0.20 + blockers*0.15 + streak_bonus

Score normalized to 100. Rankings published in full.

Output

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>"

Ramp Mode

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.

---

Escalation Policy

HERALD is observability-only. All remediation is proposed in email — never applied to code, tasks, or PRs.

Alarm Conditions

| 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 |

Escalation Email Format


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)

---

Self-Modification Guardrails

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).

---

Configuration Reference

| 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) |

---

Scheduling Notes

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_