# Standup notes

Yesterday, today and blockers, written by your agent each morning, with a button to mark the standup done.

**Sizes:** small (today), medium (today and the buttons), large (all three sections)
**Interaction:** buttons, answered by a listener; `droplet_ask` for typed blockers
**Freshness:** your agent, each working morning

## Widget

```json
{
  "slug": "standup",
  "title": "Standup",
  "symbol": "person.3.fill",
  "accent": "#0A84FF",
  "blocks": [
    { "type": "text", "style": "title", "text": "Yesterday" },
    { "type": "list", "items": ["Finished the auth refactor", "Reviewed 3 PRs"] },
    { "type": "text", "style": "title", "text": "Today" },
    { "type": "list", "items": ["Tests for the auth module", "Start the dashboard redesign"] },
    { "type": "text", "style": "caption", "text": "Blockers: none" },
    { "type": "buttons", "color": "#30D158", "items": [
      { "label": "Done", "id": "standup-done", "symbol": "checkmark.circle.fill" },
      { "label": "Blocker", "id": "standup-blocker", "symbol": "exclamationmark.triangle" }
    ] }
  ],
  "sizes": { "small": [3], "medium": [3, 5], "large": [0, 1, 2, 3, 4, 5] },
  "lock": { "rectangular": 3, "inline": "Standup at 09:30" }
}
```

Medium: today's list (2 rows, 38 pt) and the buttons. Section headings are title-style text blocks because a list's own `title` shows only on large. On large the five blocks above the pinned buttons take about 200 of the 242 pt left.

## Handler

```javascript
// standup-handler.mjs, run by listen.mjs
import { readFileSync } from "node:fs";
const event = JSON.parse(readFileSync(0, "utf8"));
const { widgets } = await droplet("list_widgets");           // your helper for the HTTP API
const blocks = widgets.find((w) => w.slug === "standup").blocks;

if (event.target === "standup-done") {
  blocks[4] = { type: "text", style: "caption", text: "Standup done" };
  console.log(JSON.stringify({ blocks }));
}

if (event.target === "standup-blocker") {
  blocks[4] = { type: "text", style: "caption", text: "Waiting for your blocker…" };
  console.log(JSON.stringify({ blocks }));                // acknowledge first
  const asked = await droplet("ask", { question: "What's blocking you today?", kind: "input", default_answer: "Waiting on a review", risk: "low" });
  let r = asked;
  while (r.status === "pending") r = await droplet("get_answer", { request_id: asked.request_id, wait_seconds: 50 });
  if (r.status === "answered") {
    blocks[4] = { type: "text", style: "caption", text: `Blockers: ${r.answer}`.slice(0, 120) };
    console.log(JSON.stringify({ blocks }));
  }
}
```

Every update changes only block 4, so the other blocks, `sizes` and `lock` stay as they are. `ask` sends a notification; that's fine here because the user just asked to add a blocker.

## Morning setup

Each working morning, before standup, have your agent write Yesterday from the user's commits or tickets and Today from their plan (items under 40 characters), and reset block 4 to "Blockers: none". Use versions if they want it only on weekdays: `{"when": {"from": "07:00", "to": "11:00", "days": ["mon","tue","wed","thu","fri"]}}`.
