Skip to content

prod-watch

Production watch — one issue per real problem

Every 15 minutes: read-only logs, metrics and database checks raise candidates by rule; an agent explains each against the code; a calibrated classifier decides; one issue per problem, comments throttled, uncertain ones go to a person. Writes a heartbeat so its own silence is detectable.

Source templates/prod-watch/workflow.yaml
Category debugging-ops
Trigger manual (wfx run) · schedule */15 * * * *
Steps 6
Human approval before none
Providers named claude-cli
Terminal window
wfx templates prod-watch
wfx new prod-watch --as my-prod-watch
wfx dryrun my-prod-watch

Watches production on a schedule — error logs, uptime and host metrics, and database checks that say work failed or stopped, all read-only. Anything wrong is explained against the code, judged by a calibrated classifier, and filed as ONE issue per problem; a problem it is unsure about stops the run and asks a person instead of filing a guess. Every run leaves a heartbeat.

  • env: PRODUCT, ISSUE_REPO, ISSUE_LABEL — where issues go
  • collect step env: OBS_SSH / LOKI_URL / PROM_URL / LOKI_QUERY for logs and metrics; DB_PSQL for database checks (leave empty to skip a source)
  • checks/: your rules, one file each — the shipped ones are generic examples (probes, disk, memory, exporter, long transactions); see checks/failed_jobs.sql.example
  • triage skills: add your product’s production map skill beside prod-signal-triage (what is normal, known false positives, neighbours that are not yours)
  • the project env store needs TYPESAFE_API_KEY (or OPENROUTER_API_KEY) for the classifier: wfx env set TYPESAFE_API_KEY –project <p>
  • optional HEARTBEAT_URL: an external dead-man’s switch (healthchecks.io style GET) for when the scheduler itself dies
Input Type Default Required Meaning
window_min integer 20
dry_run boolean false
# Step Kind Skills Gates
1 collect
Collect production signals
shell (run:) exitCode = 2 → fail
2 heartbeat
Write the heartbeat
shell (run:)
3 triage
Explain and connect to the code
agent
on claude-cli
prod-signal-triage
4 verdict
Judge each finding (JEV)
shell + classifier (wfx judge) exitCode = 2 → fail
5 file
File issues
shell (run:) exitCode = 1 → fail
6 escalate
Ask a person about the uncertain ones
agent
on claude-cli
approval-desk
  • escalate may call ask_human; answer with wfx answer <run-id> -m "...".