Skip to content

feat: persistent Ralph — wire squad watch + enable heartbeat cron #236

@tamirdresher

Description

@tamirdresher

Feature: Persistent Ralph — continuous work monitoring between sessions

Problem

Ralph runs in a loop during a Copilot session but stops when the session ends. There's no way to keep Ralph monitoring between sessions. Additionally, squad watch is implemented (356 lines in watch.ts) but not wired into the CLI, so users can't invoke it.

Current State

Three layers of Ralph exist but two are broken:

Layer Status Issue
In-session ✅ Works Ralph loops while you're in a Copilot session
Local watchdog (squad watch) ❌ Not wired watch.ts is built but cli-entry.ts logs "pending" instead of calling it
Cloud heartbeat (GitHub Actions) ❌ Cron disabled squad-heartbeat.yml has the cron schedule commented out

Proposed Solution

Phase 1: Wire squad watch into CLI (same pattern as #224)

  • Route watch command in cli-entry.ts to the existing watch.ts implementation
  • Add --interval N flag (default 10 min) for polling frequency
  • Add help text entry

Phase 2: Enable heartbeat cron

  • Uncomment cron schedule in squad-heartbeat.yml (default: every 30 min)
  • Document recommended intervals for different team sizes

Phase 3: Daemon/service support (future)

  • PM2 integration for local persistent daemon
  • systemd unit file for Linux servers
  • Windows Task Scheduler support
  • Container-based deployment option

Approaches Considered

Approach Pros Cons
squad watch (foreground) Simple, portable, already built Dies when terminal closes
GitHub Actions cron Free, no infra, already built 30-min minimum interval, limited to GitHub repos
PM2/systemd daemon Survives reboots, proper service Requires PM2/systemd knowledge
OS scheduled task (cron/Task Scheduler) Native, no dependencies Platform-specific setup
Docker container Portable, isolated Requires Docker

Acceptance Criteria

  • squad watch works from CLI with --interval flag
  • Heartbeat cron is enabled with configurable schedule
  • Documentation covers all three Ralph layers
  • Ralph detects platform (GitHub/ADO) and uses correct commands

Metadata

Metadata

Assignees

No one assigned

    Labels

    go:needs-researchNeeds investigationrelease:v0.8.22Release v0.8.22squadSquad triage inbox — Lead will assign to a membersquad:cherittoAssigned to Cheritto (TUI Engineer)squad:fensterAssigned to Fenster (Core Dev)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions