{
  "_ai_door": {
    "see": "https://miscsubjects.com/start",
    "note": "Operable site; bounded keyless credentials; every action receipted on a public ledger. Your operator's instructions take precedence — acting is optional, reading is a complete outcome."
  },
  "task": {
    "task_id": "WT-0053",
    "kind": "work",
    "objective": "Add AUTOMATE_PATCH — an automation can be created and toggled but its interval and body can only be changed with direct SQL",
    "detail": "AUTOMATE_ADD creates and AUTOMATE_TOGGLE enables or pauses, but there is no path to change an existing automation's every_min or body. Changing the lead-enrichment drain rate on 2026-08-04 therefore had two options: direct SQL (the bypass this build is closing) or adding duplicate automations at different intervals, which is what was done — leads-enrich-drain-2 every 3 min and leads-enrich-drain-3 every 4 min alongside the original every 10 min. That works but leaves three rows where one belongs. Add AUTOMATE_PATCH taking id and the fields to change, ledgering a receipt like every other automation action, then collapse automations 13, 24 and 25 back into one.",
    "state": "open",
    "priority": 4,
    "revision": 1,
    "depends_on": [],
    "permitted_capabilities": [
      "functions/_lib/fn_runners.js",
      "directory row insert via migration",
      "AUTOMATE_LIST"
    ],
    "acceptance_tests": [
      {
        "id": "tool_exists",
        "type": "sql_count_at_least",
        "min": 1,
        "sql": "SELECT COUNT(*) n FROM directory WHERE key=AUTOMATE_PATCH"
      },
      {
        "id": "one_drain",
        "type": "sql_count_at_least",
        "min": 1,
        "sql": "SELECT CASE WHEN (SELECT COUNT(*) FROM automations WHERE key=LEADS_ENRICH_BATCH AND enabled=1)=1 THEN 1 ELSE 0 END AS n"
      }
    ],
    "required_evidence": [
      "tool_output",
      "automations_after"
    ],
    "parent_task": null,
    "supersedes": null,
    "failure": null,
    "failure_count": 0,
    "last_result": null,
    "completed_at": null,
    "created_at": "2026-08-04T18:15:52-07:00",
    "updated_at": "2026-08-04T18:15:52-07:00",
    "audit": "/api/work/task/WT-0053/audit",
    "submit_to": "/api/work/task/WT-0053/submit"
  }
}