Close of Day
Run this skill once per day to:
- generate a situation report
- back up state before cleanup, if needed
- clean low-value timeline traffic
- update daily notes in the same task
Workflow
This skill runs:
/workspace/scripts/situate.tswith--update-notes- optional restic backup (
/workspace/.piclaw/restic/backup.sh) before cleanup - timeline cleanup groups covering reloads, compaction, greetings, slash-command chatter, command responses, one-word acknowledgements, transitions, version/build/git noise, and similar low-value traffic
- the
situate-daily-notesworkflow immediately afterwards for a full close-of-day run
Use the messages tool for cleanup and summarisation where available:
search+deletefor cleanup candidate discovery/removalsearch+getfor daily-note summarisation work
For web:*, the session scope covers all web session trees (root chats plus branches), not just the visible tab.
Usage
bun run /workspace/.pi/skills/close-of-day/close-of-day.ts \
--days 1 \
--chat-jid web:default \
--report /workspace/exports/close-of-day.md \
--cleanup
Common modes
--dry-run— preview cleanup only (default behaviour for deletion)--apply— perform deletions--include-media— allow deletion of messages with attachments--skip-backup— skip restic backup--situate-only— generate or update the situation report only; this is a partial maintenance pass--cleanup-only— run cleanup only; this is a partial maintenance pass
Flags
--days <n>— how many days to include in the situation report and cleanup search window--since <iso8601>— override window start for cleanup--chat-jid <jid>— target chat context (defaultweb:default)--report <path>— report path (default/workspace/exports/close-of-day-<DATE>.md)--include-media— delete messages that still have attachments--skip-backup— skip restic backup--backup-cmd <command>— override backup command--situate-only— skip cleanup and daily-note completion--cleanup-only— skip situate and daily-note completion
Completion criteria
Do not report “day closed” until all of the following are done:
- situation report generated
- backup run, unless explicitly skipped
- cleanup run
/workspace/.pi/skills/situate-daily-notes/SKILL.mdfollowed and the relevant daily notes updated in the same task
If you use --situate-only or --cleanup-only, treat the run as a partial maintenance pass, not as a completed close-of-day.
Behaviour
- cleanup defaults to dry-run so counts can be reviewed first
- attachment-bearing threads are skipped unless
--include-mediais set - if
web:*session trees diverge, preserve branch separation in the resulting daily summaries instead of blending them together - the generated close-of-day report is an intermediate working artifact for the daily-notes phase
Output artifacts
Expect these to remain consistent after a full run:
notes/daily/YYYY-MM-DD.mdnotes/daily/*.agent.jsonnotes/memory/current-state.mdnotes/memory/recent-context.mdnotes/memory/MEMORY.md
For ad-hoc cleanup groups without the daily-note workflow, use timeline-cleanup directly.