Goal
Design workers that process background jobs safely and predictably.
When to Use
- Work should not happen in the request-response path.
- The system needs retries, delayed jobs, or asynchronous execution.
- A worker or scheduled processor needs structural review.
Instructions
- Define the job trigger, payload, and success condition.
- Design idempotency, retries, backoff, and failure visibility.
- Clarify worker responsibilities, dependencies, and environment needs.
- Define what the producer guarantees and what the worker validates.
Constraints
- Do not overload one worker with unrelated jobs.
- Do not rely on at-most-once assumptions.
- Keep job payloads explicit and versionable.
Output Format
- worker purpose
- job contract
- retry and idempotency plan
- monitoring notes
Examples
- "Design a worker for report generation."
- "How should this email queue processor be structured?"