{
  "_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-0164",
    "kind": "work",
    "objective": "Add the problems layer and run lineage: tables problems, problem_sources, work_runs; nullable problem_id, task_id, run_id, session_manifest_hash on agent_turns; every invocation path records task_id and run_id.",
    "detail": "Orchestration spec data changes 1-6. Object model: Goal or Problem -> work packet (work_tasks) -> Run (one bounded attempt by one executor). Turns are evidence attached to runs, never the thing the owner browses. state_handle becomes a handoff reference inside a run.",
    "state": "open",
    "priority": 2,
    "revision": 1,
    "depends_on": [],
    "permitted_capabilities": [
      "D1_EXEC",
      "D1_QUERY",
      "CODE_LEASE_START",
      "CODE_LEASE_COMMIT",
      "DEPLOY_LEASE"
    ],
    "acceptance_tests": [
      {
        "type": "sql_count_at_least",
        "sql": "select count(*) n from pragma_table_info('agent_turns') where name in ('problem_id','task_id','run_id','session_manifest_hash')",
        "min": 4
      },
      {
        "type": "sql_count_at_least",
        "sql": "select count(*) n from sqlite_master where type='table' and name in ('problems','problem_sources','work_runs')",
        "min": 3
      }
    ],
    "required_evidence": [
      "migration_commit"
    ],
    "parent_task": null,
    "supersedes": null,
    "failure": null,
    "failure_count": 0,
    "last_result": null,
    "completed_at": null,
    "created_at": "2026-09-08T04:54:46-07:00",
    "updated_at": "2026-09-08T04:54:46-07:00",
    "audit": "/api/work/task/WT-0164/audit",
    "submit_to": "/api/work/task/WT-0164/submit"
  }
}