AutoJob runs on three parts joined by one table

The web app on Vercel talks to a Spring Boot api. The api and a Python worker share no HTTP, only a Postgres task table. The api decides everything; the worker fetches, renders and fills forms. The pink route is one approved application.

3runtime units plus Postgres
7task types, only APPLY not idempotent
15applications max per IST day
13binding decisions (AD-1 to AD-13)
0LLM calls in the api

AutoJob runs all day and needs one tap from Kush

The api is the only clock (AD-10), on India time. If it was down at a scheduled time, it runs the missed job on startup.

Follow-ups: reminder on day 7, marked ghosted on day 14 unless snoozed.

A task can never be submitted twice

QUEUED→RUNNING⇄BLOCKED→DONEFAILEDCANCELLED
  • The worker claims a task with FOR UPDATE SKIP LOCKED and gets a claim_token. Every later write must carry it.
  • Only the api resets stale tasks. Idempotent tasks go back to QUEUED. A stale APPLY becomes a "verify manually" Blocker and is never re-queued.
  • APPLY phases only move forward: FILLING, SUBMITTING, SUBMITTED.
  • Two worker lanes: one browser for APPLY, one lane for everything else, so a Blocker never stalls discovery.

A Blocker waits ten minutes for Kush

  • The worker hits a CAPTCHA, an SMS code, an unknown question, an unsupported form or a login wall, and sets BLOCKED with a numbered seq.
  • The api records blocker(task_id, seq) and pushes to the iPhone.
  • Kush answers in the app; the answer can be saved to the Answer Bank.
  • The worker resumes. If ten minutes pass with no answer, the timeout loses to any answer that already arrived, and Kush gets a link to finish by hand.

Thirteen decisions every story must follow

DecisionRule in one line

Stack, pinned on 2026-12-05

Deployed like RoutineOS, by hand

api on host port 8082, Postgres on 5434, worker with no port. Nginx and certbot serve autojob.161.118.167.148.nip.io. The worker joins the routineos_default network to reach OmniRoute. Deploys are Direct mode from /home/ubuntu/deploys/job-search-agent.

Left for later stories

  • Score weights and rules
  • Alert Email parsers per portal, once Kush names the portals
  • Workday form details
  • Backups, push-to-deploy, multi-user