# AM Look-Ahead — Morning Briefing for Rocky

## When to use

Cron fires ~06:00 Sydney time. Rocky needs a 4–6 line Telegram summary covering:
- today's planned activity
- any blockers
- RFIs to chase
- deliveries expected

If nothing is active or nothing notable is happening, reply with exactly one line.

## Active Job Identification

Check BOTH:
1. `/home/ccuser/opsman-work/Jobs/Ongoing Jobs/` — active jobs with site work started
2. `/home/ccuser/opsman-work/Jobs/Upcoming/` — jobs with `start_date` within ±7 days of today

**If a job appears in Ongoing Jobs/ but its programme/RFI register files are empty (0 lines or header-only), the real data is in Upcoming/. Read from Upcoming/ for that job.** The skeleton folder is a common state when the job was promoted to "ongoing" but the full data copy was never completed.

File-level quick check: read the first 5 lines of each candidate file. If `total_lines < 5` and the content is only a header, the data is elsewhere.

## Files to Read

For each active job, read in this order:

1. `00-brief.md` — job type, client, start date
2. `04 - Programme and Scheduling/programme-24wk.md` — today's row (find row where first column is this week)
3. `06 - Correspondence/06b - RFIs/_REGISTER.md` — any Cat A still Pending
4. `10 - Subcontractors/_subbie-schedule.md` (or `06 - Correspondence/06c - Subcontractors/_schedule.md`) — anyone booked today
5. `Job-Tracker.md` — today's planned activity / hours entry

## Today's Row in programme-24wk.md

The programme is a markdown table. Today's row is the one whose week-of date falls on or immediately before today. Week rows span Mon–Sun. To find today's row:

```
grep -n "Wk [0-9]" <programme> | tail -5  # show last 5 week headers
```

Then read around that line number to get tasks + notes for this week.

If the table has no rows yet (empty or header-only), check Upcoming/ for the same job.

## Output Format

```
[Job name] (job no.) | [Day, e.g. Tue 10 Jun]
• Today: [one sentence — what should happen]
• Blocker: [specific thing blocking progress, or "none"]
• RFIs: [Cat A pending count + top 1-2 to chase, or "none"]
• Deliveries: [expected today, or "none recorded"]
• [One actionable thing Rocky should do this morning]
```

**If no active jobs:** `No active jobs today.` (one line)

**If active job but nothing notable:** `Hornsby — quiet day, no planned pours or deliveries.` (one line)

## Pitfalls

- Programme file empty (0 lines or header only) → read from Upcoming/ for same job name
- RFI register empty → same fallback
- Subbie schedule doesn't exist → report "no subbies booked today"
- Job-Tracker empty → report "Job-Tracker blank — no hours logged yet"
- Do NOT produce a multi-section report when nothing is active. One line.
- Cron runs silently — if you produce "[SILENT]" the system suppresses delivery. Only use it when there are genuinely zero active jobs and zero open items to surface.

## Verification

After composing:
- Count lines. Must be ≤6 lines. Trim aggressively.
- Check: does this give Rocky something actionable? If the summary is all "nothing" statements, collapse to one line.
- Confirm today's date is in the header line.