daily-task-ritual
Skill0 starsChanged 3 months agoMITView on GitHub
The automation layer — the once-a-day ritual (launchd at 15:00 -> daily_ritual.py -> optional agent work loop), Telegram delivery of the digest (text + optional macOS voice note via notify.py), and the continuous watch loop (watch.py — reminders, review requests with inline buttons, agent trigger). How each is wired, run, extended, debugged, and the safety model. Use this whenever asked about the daily/scheduled run, the digest, notifications/напоминания, review buttons, "почему не сработала автоматизация", changing the schedule or what the agent may do unattended, or before editing anything under automation/.
- Reads credentials
In this repository6 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- db-schema-changeSkill
- mcp-tool-changeSkill
- ship-releaseSkill
- task-board-workerSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 85
Check automation/logs/run-<date>.log and launchd.err.log.
- Distinctive: line 90
No digest usually means the tracker was unreachable (API key or URL) — the script logs which.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
The daily task ritual
Once a day the assistant should check the board and move work forward without
the human kicking it off. That runs in two layers with a deliberate safety
split, both in automation/:
- Deterministic layer (
automation/daily_ritual.py) — always runs, never mutates the board. Health-checks the tracker, reads it over REST, classifies the board (build_situation), and writes a dated digest toautomation/logs/ordered by what needs the human first: overdue, waiting-review, blocked, unassigned-to-triage, due-soon, then the agent side. This is the guaranteed daily deliverable — the human always gets "here is your board today" even if the agent layer is off or fails. - Agent work loop (opt-in,
DAILY_RITUAL_WORK=1) — gives a model ONLY thetask_assistant_*MCP tools and the worker instructions, then it claims -> acts -> finishes tasks towaiting_review. What it did is folded back into the digest.WORK_RUNNERpicks the backend (automation/work_runner.py):claude= headless Claude Code CLI on the user's subscription (no API key; needsclaude /loginonce andWORK_CLAUDE_BINfor launchd),api/unset = the Anthropic-API loop inwork_loop.py(needsANTHROPIC_API_KEY). Both run behind the SAME rails, enforced in the MCP server's worker mode (TASK_MCP_WORKER_MODE,TASK_MCP_CLAIM_BUDGET— refuses done/cancelled, caps claims).
Since 0.9.0 two more pieces live in automation/:
- Outbound Telegram (
notify.py) — withTELEGRAM_BOT_TOKEN+TELEGRAM_NOTIFY_CHAT_IDthe ritual delivers the digest as a message (plus a spoken voice note withTELEGRAM_DIGEST_VOICE=1, macOSsay/afconvertonly). Send failures log and never break callers;--no-notifyskips delivery. - Watch loop (
watch.py, opt-in,install.sh --watch) — polls everyWATCH_INTERVAL(30s): pushes due reminders (stampsreminder_last_sent_atonly after delivery), announceswaiting_reviewentries with ✅/🔁/✋ inline buttons (presses are handled by the polling adapter — the bot's singlegetUpdatesconsumer; never add a second one), and withWATCH_WORK=1kicks the work loop when agent-ready backlog appears. State inautomation/.watch_state.json.
Wiring
Native: automation/install.sh installs the scheduler for the current OS —
launchd on macOS (automation/com.taskassistant.daily.plist, 15:00 local),
a systemd user timer or crontab entry on Linux. All of them run
automation/daily_run.sh -> automation/daily_ritual.py; the runner reuses a
running tracker or starts a temporary one for the duration and stops it after.
The user runs install.sh themselves — it schedules an agent that acts on their
behalf, so it is never auto-loaded.
Docker: the ritual service in docker-compose.yml runs
automation/scheduler.py, which sleeps until RITUAL_TIME (env, local to
TZ) daily and executes the same daily_ritual.py against the tracker
service. Self-hosting guide: docs/SELF_HOSTING.md.
Safety model (enforced in code, not the prompt)
- The deterministic layer never writes to the board.
- The agent gets no shell, repo, or web access — only the MCP tools.
work_loop._dispatchrejectsupdate_task(status="done"): only the human closes tasks. The agent's terminal state iswaiting_review.--max-taskscaps claims per run; over budget, the claim tool refuses, so an unattended run cannot run away.- These rails have unit tests (
tests/test_work_loop.py) that use no API key — keep them green when touching the loop.
Common changes
- Schedule/time: the
StartCalendarIntervalin the plist; re-runinstall.sh. For twice-daily, add a second<dict>under aStartCalendarIntervalarray. - What the agent may do: edit
SYSTEM_PROMPTinautomation/work_loop.py, but keep the never-close-tasks and claim-budget rails in_dispatch. - Digest content/order:
build_situation/render_digest; both are pure and covered bytests/test_daily_ritual.py. - Model/cost:
DAILY_RITUAL_MODEL(defaultclaude-sonnet-5; board meta-work does not need a bigger tier).
Debugging a missed or wrong run
- Check
automation/logs/run-<date>.logandlaunchd.err.log. - Confirm the job:
launchctl print gui/$(id -u)/com.taskassistant.daily. - Reproduce by hand:
automation/daily_run.sh --no-work(digest only) or.venv/bin/python automation/daily_ritual.py --no-workagainst a running tracker. - No digest usually means the tracker was unreachable (API key or URL) — the script logs which.
Full runbook: automation/README.md. Ship changes via ship-release.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

