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 |
Use it
Section titled “Use it”wfx templates prod-watchwfx new prod-watch --as my-prod-watchwfx dryrun my-prod-watchWhat it does
Section titled “What it does”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.
What you fill in
Section titled “What you fill in”- 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
Inputs
Section titled “Inputs”| Input | Type | Default | Required | Meaning |
|---|---|---|---|---|
window_min |
integer | 20 |
||
dry_run |
boolean | false |
| # | Step | Kind | Skills | Gates |
|---|---|---|---|---|
| 1 | collectCollect production signals |
shell (run:) |
exitCode = 2 → fail |
|
| 2 | heartbeatWrite the heartbeat |
shell (run:) |
||
| 3 | triageExplain and connect to the code |
agent on claude-cli |
prod-signal-triage |
|
| 4 | verdictJudge each finding (JEV) |
shell + classifier (wfx judge) |
exitCode = 2 → fail |
|
| 5 | fileFile issues |
shell (run:) |
exitCode = 1 → fail |
|
| 6 | escalateAsk a person about the uncertain ones |
agent on claude-cli |
approval-desk |
Human gates
Section titled “Human gates”escalatemay callask_human; answer withwfx answer <run-id> -m "...".