work-start-day
Create or refresh today's daily note, populate yesterday summary and agenda, post daily status comments when appropriate, create meeting sections, and run $pr-daily.
On macOS, run every linear ... command outside the sandbox on the first
attempt so the CLI can access credentials stored in the system keychain. Use
scoped escalation with prefix_rule: ["linear"]. If a sandboxed command
reports No keyring entry or No API key configured, retry outside the
sandbox before asking the user to authenticate. Never print, log, or expose
linear auth token or an API key.
Workflow
- Determine paths:
```bash
today_date=$(date +%Y-%m-%d)
today_day=$(date +%A)
today_year=$(date +%Y)
today_file="${today_date} ${today_day}"
vault="$HOME/2ndBrain"
notes_dir="${vault}/daily-notes/${today_year}"
```
- Create today's note if missing from
${vault}/templates/daily-note.md. Replace Obsidian date placeholders and fix the yesterday link to the most recent earlier daily note.
- Update startup checks:
- Query macOS GitHub Actions runner status with
gh api orgs/getditto/actions/runner-groups/8/runners. - Leave #team-devx unchecked unless a Slack integration is available.
- Leave the Casper budget checkbox unchecked (user fills in current spend manually until an API is available).
- Build the
## Yesterdaysection from:
- Previous daily note.
- Active Linear tickets from DEVX and DXO.
- GitHub PRs authored or updated by the user since the previous work day.
- GitHub PRs reviewed by the user since the previous work day.
Preserve the auto-population comment for reruns.
- Build today's agenda:
- Calendar events from available work calendar MCP tools, if configured.
- DEVX/DXO tickets in
triage,backlog, orunstartedstate for the active cycle. - In-progress tickets that need daily comments.
If calendar tools are unavailable, report that and continue with Linear/GitHub sections.
- Post daily Linear status comments for in-progress tickets that do not already have today's comment by the user. Use
linear-cli:linear-clibefore Linear CLI commands.
- Add or update Work Items sections in today's note using the same format as
$work-track; setcommented:: truefor tickets that received comments.
- Populate empty meeting sections under
# Meetingswith one H2 per meeting.
- Run
$pr-dailyto set up the daily branch and draft PR.
- Report daily note path, previous note, meetings, tickets needing comment, tickets to pick up, branch, and PR.
Edge cases
- Running twice in one day should be idempotent.
- Monday should use the most recent previous note, normally Friday.
- Missing Linear, GitHub, or calendar auth should be reported without discarding other completed sections.
- If today's note already has a populated Yesterday section, do not overwrite it; refresh agenda and meetings only.