Skip to main content

Always On

Always On turns PilotDeck from a passive Q&A tool into an agent platform that can keep working. It includes two capabilities:

  • Discovery: scan a WorkSpace while it is idle, find issues, and generate reports
  • Cron: run predefined work on a schedule

Discovery

Discovery is the core Always On capability. When a WorkSpace is idle and the gates pass, the agent analyzes the WorkSpace and generates a Discovery Plan and Report.

Flow

   ┌─────────────────┐
│ Discovery Gate │ ← cooldown/budget/busy checks
└───────┬─────────┘
│ pass

┌─────────────────┐
│ Discovery Plan │ ← generated by the agent
│ (Markdown) │
└───────┬─────────┘


┌─────────────────┐
│ Execution │ ← isolated workspace
└───────┬─────────┘


┌─────────────────┐
│ Discovery Report │ ← final report
│ (Markdown) │
└─────────────────┘

Gates

Discovery only runs after these checks pass:

GateDescription
CooldownEnough time has passed since the last Discovery run
BudgetThe daily Discovery budget has not been exceeded
BusyThe WorkSpace has no active user sessions
EnabledAlways On is enabled in config
ScheduleThe current time is inside the allowed window

Discovery Plan and Report

A Discovery Plan is Markdown with metadata and task estimates:

<!-- discovery-plan-metadata: version=1, priority=medium -->
# Discovery Plan: Code Quality Check

## Goal
Analyze code quality issues in the project

## Tasks
1. Check unused dependencies
2. Scan for potential security issues
3. Analyze complexity hotspots

After execution, PilotDeck writes a Discovery Report:

<!-- discovery-report-metadata: version=1, status=completed -->
# Discovery Report: Code Quality Check

## Findings
1. 3 unused npm dependencies
2. `src/utils/auth.ts` contains a hardcoded secret
3. `src/services/` has high average complexity

Workspace Isolation

Create a Git worktree as an isolated working directory and clean it up after execution:

alwaysOn:
workspace:
strategy: git-worktree

Configure Discovery

alwaysOn:
enabled: true
trigger:
cooldownMinutes: 60
dailyBudget: 5
schedule:
startHour: 9
endHour: 22
execution:
maxTokens: 100000
workspace:
strategy: git-worktree
dormancy:
idleMinutes: 10

Cron Jobs

Cron supports one-time and recurring scheduled work.

pilotdeck cron create       --session "cli:project=/Users/me/app:s_main"       --message "Run the test suite and report results"       --once "2025-01-15T09:00:00Z"

Cron CLI

pilotdeck cron list
pilotdeck cron list --history
pilotdeck cron create --session <sessionKey> --message <text> --cron <expression>
pilotdeck cron delete <taskId>
pilotdeck cron stop <taskId>
pilotdeck cron stop --run <runId>

Cron Configuration

cron:
enabled: true
maxConcurrent: 3
historyRetentionDays: 30
注意 · Warning

Cron and Discovery require a long-running pilotdeck server process. One-shot CLI mode does not support them.

Data Storage

~/.pilotdeck/projects/<project-id>/
├── always-on/
│ ├── discovery-state.json
│ ├── plans/
│ ├── reports/
│ └── run-events/
└── cron/
├── tasks.json
└── history/