# EOD Google Doc Report

Compile all daily site activity into a formatted report, upload to Google Drive, insert photos inline, and share the link to Rocky.

## Trigger
Rocky says: "compile the daily report" or "put together the report for today" — typically EOD, after last site visit.

## Pre-conditions
- Google Workspace is connected (LFCS service account or Rocky's account OAuth). If not yet connected, notify Rocky and offer markdown fallback.
- Job number is known (or TBC placeholder created for untracked jobs).
- Photos have been sent through Telegram during the day and cached locally.

## Procedure

### Step 1 — Gather inputs
- Scan session for all entries relevant to the target job today: diary entries, delay events, crew hours, materials in, issues/RFIs raised, weather
- Confirm photo cache paths: `/root/.hermes/image_cache/img_*.jpg`
- Identify the job folder in vault (even if TBC placeholder)

### Step 2 — Build the report body
Use this structure:
```markdown
# Daily Site Report — [Job Name] — YYYY-MM-DD

## Weather
[brief description — e.g. fine, rain from 09:30–10:15, cleared by 11:00]

## Crew on Site
- [Name] — [trade] — [hours] hrs [shift]
- ...

## Work Completed
- [bullet list of all activities]
- include: rebar prep, pour prep, delays, weather stoppages, any variations or issues flagged

## Materials In
- [delivery records if any]

## Issues / RFIs / Variations Raised
- [list each with one-line description]

## Photos
[paste each photo with caption below]
```

### Step 3 — Upload photos to Drive
1. Create/find job folder in Google Drive under `LFCS/Operations/Jobs/[Job Name]/07b - Photos/`
2. Upload each photo to that folder
3. Note the Drive share URLs for each photo

### Step 4 — Create Google Doc
1. Create new Google Doc in the job's Drive folder titled: `[Job Name] — Daily Report — YYYY-MM-DD`
2. Insert report body from Step 2
3. Insert photos inline — use `![caption](drive_url)` format, referencing uploaded Drive photos
4. Set document to "Anyone with link can view"

### Step 5 — Deliver link
Send Rocky the Google Doc URL via Telegram with one-line confirmation: *"Daily report for [Job] — [date]: [link]"*

## Fallback (if Google Workspace not connected)
- Save as a well-structured `.md` file in the job's vault folder at `07d - Daily Diary/YYYY-MM-DD.md`
- Auto-sync picks it up within 30 min
- Note in reply: *"Google Doc pending connection — markdown version synced to vault, print-to-PDF available from there"*

## Photo handling rules
- Rocky sends photos via Telegram — they land in `/root/.hermes/image_cache/`
- Today's session photos: `img_d08dec5f80cf.jpg` (steel mat), `img_c623276cb01d.jpg` (rebar prep post-rain), `img_d977d96e260f.jpg` (pour in progress)
- Always write `MEDIA:/root/.hermes/image_cache/img_XXXX.jpg` reference in the report so it's clear which photo goes where
- Photos inserted into Google Doc should use Drive-hosted URLs, not local cache paths (upload first, then swap)