AtlatestRepositoryminder
1# Minder
2
3Scheduled task channel server for Claude Code sessions, built with Sigil.
4
5## Architecture
6
7Minder is an MCP channel server that manages cron-based scheduled tasks and
8pushes events into a running Claude Code session via the `claude/channel`
9protocol.
11```
12minder/
13├── package.sgl # Package definition
14├── dev-redirects.sgl # Points deps at local sigil + sigil-later
15├── minder.yaml # Schedules (optional)
16├── src/minder/
17│ ├── main.sgl # Entry point: channel MCP server
18│ ├── config.sgl # Config loading (YAML)
19│ └── scheduler.sgl # Cron scheduling via sigil-later
20└── test/
21 └── test-config.sgl
22```
24## Configuration
26Schedules via `minder.yaml`:
27```yaml
28schedules:
29 check-services:
30 cron: "*/30 * * * *"
31 prompt: "Check service health"
32```
34## Dependencies
36- **sigil-mcp** — MCP server framework (channel notifications)
37- **sigil-later** — Cron-based task scheduling
38- **sigil-yaml** — Config file parsing
39- **sigil-log** — Structured logging
41## Building
43Always build within a Guix shell:
45```bash
46guix shell -m ../sigil/manifest.scm -- env CC=gcc \
47 ../sigil/build/release/bin/sigil build --redirects dev-redirects.sgl
48```
50## Testing
52```bash
53guix shell -m ../sigil/manifest.scm -- env CC=gcc \
54 ../sigil/build/release/bin/sigil -L build/dev/lib test --redirects dev-redirects.sgl
55```
57## Running
59Minder is designed to be spawned by Claude Code as a channel MCP server:
61```bash
62claude --channels server:minder
63```
65Register it in `.mcp.json`:
66```json
68 "mcpServers": {
69 "minder": {
70 "command": "./build/dev/bin/minder",
71 "env": {}
72 }
73 }
75```
77## Stale Cache
79After rebuilding, clear the global module cache:
81```bash
82rm -rf ~/.cache/sigil/lib/0.7.0/minder/
83```
85## Key Implementation Notes
87- YAML dict keys from `yaml-decode` are **keywords** — use `keyword->string`
88- Struct constructors match the struct name (not `make-` prefixed)
89- The MCP server loop runs inside `with-async` so scheduler goroutines
90 can interleave with stdin reads
91- `channel-notify!` from `(sigil mcp channel)` sends channel events
92- sigil-later tasks spawn their own goroutines via `later-every!`