Skip to content

Add schedules feature as a pi-web skill #86

Description

@setkyar

Problem

pi-web has a full-featured Schedules system (cron-based automated pi agent runs, CRUD API, Svelte UI) — but the pi coding agent itself has no knowledge of it. When a user asks pi to help with scheduling, explain how schedules work, debug a schedule issue, or create a skill related to schedules, pi draws a blank.

We have one project-local skill (memory in .pi/skills/memory/SKILL.md), and schedules is an obvious second: it is a first-class pi-web subsystem with its own package, API, frontend, and push notification integration.

What should the skill cover

A .pi/skills/schedules/SKILL.md should explain:

  • Concept: what schedules are (automated pi agent runs on a timer), how they fire (new session + instructions as first message), manual-only vs cron-based
  • Architecture: the 3 layers (data → scheduler → API), SQLite tables, cron math
  • API: REST endpoints and payloads for CRUD, run-now, and run history
  • Frontend: /schedules page, the frequency-preset UI, model/project picker, run log
  • Push notifications: schedule-done vs session-done
  • Common debugging scenarios: why a schedule did not fire, how to inspect run history, manual vs enabled interaction

Relevant code paths

Area Path
Data model + store internal/schedules/schedule.go
Scheduler ticker internal/server/scheduler.go
REST API internal/server/schedules_api.go
Frontend page web/src/routes/SchedulesPage.svelte
Cron helpers web/src/index/schedules.js
Push integration internal/server/push.go, internal/server/status.go
Route registration internal/server/server.go
CSS internal/ui/embedded/styles/schedules.css
Tests internal/schedules/schedule_test.go, internal/server/scheduler_test.go, web/src/index/schedules.test.js

Existing skill to follow as template

.pi/skills/memory/SKILL.md — follows the format of YAML frontmatter (name, description) followed by markdown docs with sections on core files, common commands, rules, and when-to-use guidance.

Acceptance criteria

  • .pi/skills/schedules/SKILL.md exists with frontmatter (name: schedules, clear description)
  • Covers all subsystems listed above at a usable level of detail
  • Describes API endpoints with example payloads
  • Covers common debugging/troubleshooting scenarios
  • Follows the same format conventions as the memory skill

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationenhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions