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 -- sigil deps install
47guix shell -m ../sigil/manifest.scm -- sigil build -c release
48```
50Use installed Sigil 0.23.3 with `SIGIL_REDIRECTS` unset for releases.
51The lock selects published registry packages. Release C compilation uses
52GCC with `-march=x86-64 -mtune=generic` for CPU portability.
53Use `--redirects dev-redirects.sgl` only for local dependency development.
55## Testing
57```bash
58guix shell -m ../sigil/manifest.scm -- sigil test
59```
61## Running
63Minder is designed to be spawned by Claude Code as a channel MCP server:
65```bash
66claude --channels server:minder
67```
69Register it in `.mcp.json`:
70```json
72 "mcpServers": {
73 "minder": {
74 "command": "./build/dev/bin/minder",
75 "env": {}
76 }
77 }
79```
81## Stale Cache
83After rebuilding, clear the global module cache:
85```bash
86rm -rf ~/.cache/sigil/lib/0.7.0/minder/
87```
89## Key Implementation Notes
91- YAML dict keys from `yaml-decode` are **keywords** — use `keyword->string`
92- Struct constructors match the struct name (not `make-` prefixed)
93- The MCP server loop runs inside `with-async` so scheduler goroutines
94 can interleave with stdin reads
95- `channel-notify!` from `(sigil mcp channel)` sends channel events
96- sigil-later tasks spawn their own goroutines via `later-every!`