← back to Ticket System
TICKET-KINDS.md
50 lines
# Ticket kinds and recurring-work policy
Ticket kind describes what a record **is**. Status describes where that record is in its lifecycle. They are intentionally independent.
## `task`
A bounded unit of work with a verifiable finish. Incidents, repairs, installs, audits, and changes to a cron job remain tasks even when their text mentions a schedule.
- Eligible for urgency ranking and **Run Now**.
- Close when the stated result is verified.
- If it was spawned by recurring work, set `parent_id` to the loop or job registry.
## `continuous_loop`
An event-driven or condition-driven standing outcome with no fixed wall-clock trigger. Examples: keep a queue clear, continuously improve data quality, or react whenever new input appears.
- Listed separately from the task queue and excluded from age/deadline urgency.
- The parent is a registry, not an indefinitely `doing` task.
- Each concrete iteration, defect, or gated action becomes a bounded child task.
- Use `open` for enabled, `blocked` for degraded, `stopped` for disabled, and `done` only when retired.
- If the loop actually wakes on a fixed interval, designate it `scheduled_job` instead.
## `scheduled_job`
A recurring process whose identity includes a real time trigger: cron, launchd `StartInterval`/calendar interval, or an equivalent scheduler.
- Record cadence or cron expression, scheduler label, timezone, and enabled state.
- Treat the operating system or scheduler as the source of truth; prose in a ticket is not a scheduler.
- The parent registry is excluded from urgency and **Run Now**. Each failure/remediation is a child `task`.
- Jobs must be idempotent, prevent overlapping runs, log start/end/result, expose last/next run, and create an incident task after a defined failure threshold.
- Customer-facing sends, spend, production writes, DNS, and other gates remain gated on every run; scheduling never grants approval.
## Commands
```sh
tk designate TK-22 continuous_loop
tk designate TK-10986 scheduled_job --cadence 10m \
--scheduler-label com.steve.codex-yoloforever \
--timezone America/Los_Angeles --enabled true
tk designate TK-123 task --parent TK-10986
tk list --kind continuous_loop
tk list --kind scheduled_job
```
The board provides separate **Task Queue**, **Continuous Loops**, and **Scheduled Jobs** views. Legacy records default to `task`, and migrations use append-only designation events.
## Audit rule
Run `node scripts/audit-ticket-kinds.mjs` for a read-only inventory. Use `--apply` only for high-confidence classifications. Ambiguous recurrence stays a task in the review list; false negatives are safer than hiding bounded work from the actionable queue.