---
name: wrapup
description: End-of-day summary — captures time logged, work done, agenda check. Updates daily note, suggests task status updates. Run at end of day or on demand.
allowed-tools: Bash(task-cli:*), mcp__nanoclaw__send_message
---

# End-of-Day Wrapup

Capture today's work, compare against the morning plan, prepare carry-over for tomorrow.

## Step 1: Gather Today's Activity (run in parallel)

### Time Entries

```bash
task-cli summary -s $(date +%Y-%m-%d) -e $(date +%Y-%m-%d)
task-cli current
```

### Tasks Worked On Today

```bash
task-cli list -s doing
task-cli list -s done
```

Cross-reference with time entries to identify tasks that had work today.

## Step 2: Read Today's Daily Note

Read `daily-notes/YYYY-MM-DD.md` (today's date). Compare the morning priorities/agenda against what actually happened.

If no daily note exists, skip the comparison.

## Step 3: Send Telegram Summary

Use `mcp__nanoclaw__send_message` to send the wrapup:

```
*Day's End — YYYY-MM-DD*

*Time logged:*
• ClientA — 3.5h (task description)
• ClientB — 2h (task description)
• Total: 5.5h

*What got done:*
• [ClientA] Task title — completed GA4 migration
• [ClientB] Task title — reviewed PR, pushed fixes

*Agenda check:*
✅ Priority 1 — done
✅ Priority 2 — done
⏩ Priority 3 — carry over (blocked on client response)
🆕 Unplanned: urgent bug fix

*Running timer:*
⏱️ ClientA — "task desc" (2h 15m) — still running
```

Keep it scannable. Bold section headers. Reference tasks by client and title, not GitHub issue numbers.

## Step 4: Ask for Tomorrow's Notes

Ask Peter: "Anything to carry over or note for tomorrow?"

Wait for a response. If Peter says nothing / "nope" / similar, proceed with auto-generated carry-over from unfinished items.

## Step 5: Update Today's Daily Note

Update `daily-notes/YYYY-MM-DD.md` (create if it doesn't exist):

```markdown
# YYYY-MM-DD

## Time Logged
| Client | Hours | Description |
|-|-|-|
| ClientA | 3.5 | Task description |
| Total | 5.5 | |

## What Got Done
- [ClientA] Task title — completed GA4 migration
- [ClientB] Task title — reviewed PR, pushed fixes

## Agenda Check
- [x] Priority 1
- [x] Priority 2
- [ ] Priority 3 (carry over — blocked on client)

## Tomorrow
- [ ] Priority 3 (carried from today)
- [ ] Peter's explicit notes
- [ ] Any flagged follow-ups
```

## Step 6: Suggest Task Status Updates

For tasks that had work done today (matching time entries), check if any should be moved to `done`. Show each proposed status change and ask for approval before updating.

Example:
> Task "GA4 migration audit" (ClientA) — 2.5h today, currently `doing`
> Move to `done`? [y/n]

Use `task-cli move <task_id> done` to update approved tasks.

## Rules

- Keep the summary tight — Peter wants to wrap up, not read an essay.
- Always ask before changing task statuses.
- If a timer is still running, mention it but do NOT stop it automatically.
- Carry-over items must be specific and actionable.
- Reference tasks by client and title — never use GitHub issue numbers.
- If a data source fails, include what you have and note the failure.
