---
name: diary-builder
description: "Produce the today's diary block for the morning round. Reads the calendar and the CRM to surface every viewing, valuation, market appraisal, vendor meeting, and completion call for today, with times, addresses, contact, and postcode."
---

# Diary builder

A building-block skill the operator never names. Called by `morning-round` to build the diary block of the daily snapshot.

## What it does

Reads today's calendar entries from the connected calendar (M365 or Google). For each entry it correlates the CRM record so that the line shows the right contact and the property context, not just a calendar title. Items not tied to a CRM record still appear, marked as "calendar entry, no CRM match".

## Output shape

A list, one line per entry, sorted by start time. Each line shows:

- Start time and duration
- Activity type: viewing, valuation, market appraisal, vendor meeting, completion call, other
- Address with postcode
- Contact name and role (vendor, buyer, applicant)

If the order of addresses by postcode is not geographically sensible, a one-line note flags it so the operator can resequence before they leave the office.

## What it does not do

- It does not produce the prep pack for any valuation in the diary. That is `valuation-prep`, which the operator invokes after reading the diary.
- It does not chase anyone. The diary is read-only output.
- It does not modify the calendar.

## Connectors

Read: calendar, CRM. No writes.

## Profile keys

- `realagent.diary.postcode_ordering` (boolean, default true)
- `realagent.diary.show_internal_events` (boolean, default false)
