focus-block
Purpose
Starts and ends Pomodoro-style focus sessions, toggles Do Not Disturb when available, and records the work in a markdown journal.
Runbook
- Set
JOURNAL_PATH(default:~/notes/focus-log.md); create the file if absent. - Check whether a session is already open by looking for
status: openin the journal. - Run
scripts/start-session.sh "task description"to open a new session. The script generates a session ID, appends a journal record, and attempts to enable DND. - Work for 25 minutes; the start script prints the standard Pomodoro reminder.
- Run
scripts/end-session.shto close the active session and record its duration. - After every 4 completed Pomodoros, suggest a 20-minute break.
- Run
scripts/status.shat any time to review today’s focus history.
Stop conditions
- Warn but do not abort if DND integration is unavailable.
- Abort if
JOURNAL_PATHresolves to a directory. - Do not allow two open sessions simultaneously; abort with an informative message.
- Never delete journal entries.
Output format
A completed journal entry appended to JOURNAL_PATH:
## Focus Session 20240615-a3f1
- task: Write architecture doc
- start: 2024-06-15T14:30:00
- end: 2024-06-15T14:55:00
- duration_minutes: 25
- status: complete
Example invocations
JOURNAL_PATH=~/notes/focus-log.md skills/focus-block/scripts/start-session.sh "write SKILL.md docs"skills/focus-block/scripts/end-session.shskills/focus-block/scripts/status.sh- "Start a 25-minute focus block for writing the weekly brief."