Adds scripts/cron-runtime.ts (119 LOC) that reads crons/*.md frontmatter
and schedules each cron with the croner npm package, replacing the
1,900-LOC heartbeat daemon per SPEC v0.7 §"Croner runtime".
- Frontmatter parser: id, schedule, timezone, enabled, overlap, catchup
- Skips files where enabled is false
- Fires each cron's markdown body as a prompt to claude -p (CRON_AGENT_BIN
env var overrides the binary)
- Logs to crons/cron-runtime.log (ISO timestamp, cron id, status)
- PID lock at crons/.pid prevents double-firing; stale locks are stolen
- Clean SIGTERM/SIGINT cleanup unlinks the PID file
Adds 9 vitest tests covering frontmatter parsing, skip-when-disabled,
PID-lock acquisition, live-process collision, and stale-lock recovery.
Wires scripts/__tests__/ into a root vitest.config.ts so pnpm run test
picks them up.
Refs #210
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>